"config": {
"optimize-autoloader": true,
"autoloader-suffix": "AdvancedContentFilterAddon",
- "preferred-install": "dist",
- "fxp-asset": {
- "installer-paths": {
- "npm-asset-library": "vendor/asset",
- "bower-asset-library": "vendor/asset"
- }
- }
+ "preferred-install": "dist"
}
}
+++ /dev/null
-MIT License
-
-Copyright (c) 2017 Luke Childs
-
-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.
+++ /dev/null
-# cacheable-request
-
-> Wrap native HTTP requests with RFC compliant cache support
-
-[![Build Status](https://travis-ci.org/lukechilds/cacheable-request.svg?branch=master)](https://travis-ci.org/lukechilds/cacheable-request)
-[![Coverage Status](https://coveralls.io/repos/github/lukechilds/cacheable-request/badge.svg?branch=master)](https://coveralls.io/github/lukechilds/cacheable-request?branch=master)
-[![npm](https://img.shields.io/npm/dm/cacheable-request.svg)](https://www.npmjs.com/package/cacheable-request)
-[![npm](https://img.shields.io/npm/v/cacheable-request.svg)](https://www.npmjs.com/package/cacheable-request)
-
-[RFC 7234](http://httpwg.org/specs/rfc7234.html) compliant HTTP caching for native Node.js HTTP/HTTPS requests. Caching works out of the box in memory or is easily pluggable with a wide range of storage adapters.
-
-**Note:** This is a low level wrapper around the core HTTP modules, it's not a high level request library.
-
-## Features
-
-- Only stores cacheable responses as defined by RFC 7234
-- Fresh cache entries are served directly from cache
-- Stale cache entries are revalidated with `If-None-Match`/`If-Modified-Since` headers
-- 304 responses from revalidation requests use cached body
-- Updates `Age` header on cached responses
-- Can completely bypass cache on a per request basis
-- In memory cache by default
-- Official support for Redis, MongoDB, SQLite, PostgreSQL and MySQL storage adapters
-- Easily plug in your own or third-party storage adapters
-- If DB connection fails, cache is automatically bypassed ([disabled by default](#optsautomaticfailover))
-- Adds cache support to any existing HTTP code with minimal changes
-- Uses [http-cache-semantics](https://github.com/pornel/http-cache-semantics) internally for HTTP RFC 7234 compliance
-
-## Install
-
-```shell
-npm install --save cacheable-request
-```
-
-## Usage
-
-```js
-const http = require('http');
-const CacheableRequest = require('cacheable-request');
-
-// Then instead of
-const req = http.request('http://example.com', cb);
-req.end();
-
-// You can do
-const cacheableRequest = new CacheableRequest(http.request);
-const cacheReq = cacheableRequest('http://example.com', cb);
-cacheReq.on('request', req => req.end());
-// Future requests to 'example.com' will be returned from cache if still valid
-
-// You pass in any other http.request API compatible method to be wrapped with cache support:
-const cacheableRequest = new CacheableRequest(https.request);
-const cacheableRequest = new CacheableRequest(electron.net);
-```
-
-## Storage Adapters
-
-`cacheable-request` uses [Keyv](https://github.com/lukechilds/keyv) to support a wide range of storage adapters.
-
-For example, to use Redis as a cache backend, you just need to install the official Redis Keyv storage adapter:
-
-```
-npm install --save @keyv/redis
-```
-
-And then you can pass `CacheableRequest` your connection string:
-
-```js
-const cacheableRequest = new CacheableRequest(http.request, 'redis://user:pass@localhost:6379');
-```
-
-[View all official Keyv storage adapters.](https://github.com/lukechilds/keyv#official-storage-adapters)
-
-Keyv also supports anything that follows the Map API so it's easy to write your own storage adapter or use a third-party solution.
-
-e.g The following are all valid storage adapters
-
-```js
-const storageAdapter = new Map();
-// or
-const storageAdapter = require('./my-storage-adapter');
-// or
-const QuickLRU = require('quick-lru');
-const storageAdapter = new QuickLRU({ maxSize: 1000 });
-
-const cacheableRequest = new CacheableRequest(http.request, storageAdapter);
-```
-
-View the [Keyv docs](https://github.com/lukechilds/keyv) for more information on how to use storage adapters.
-
-## API
-
-### new cacheableRequest(request, [storageAdapter])
-
-Returns the provided request function wrapped with cache support.
-
-#### request
-
-Type: `function`
-
-Request function to wrap with cache support. Should be [`http.request`](https://nodejs.org/api/http.html#http_http_request_options_callback) or a similar API compatible request function.
-
-#### storageAdapter
-
-Type: `Keyv storage adapter`<br>
-Default: `new Map()`
-
-A [Keyv](https://github.com/lukechilds/keyv) storage adapter instance, or connection string if using with an official Keyv storage adapter.
-
-### Instance
-
-#### cacheableRequest(opts, [cb])
-
-Returns an event emitter.
-
-##### opts
-
-Type: `object`, `string`
-
-Any of the default request functions options plus:
-
-###### opts.cache
-
-Type: `boolean`<br>
-Default: `true`
-
-If the cache should be used. Setting this to false will completely bypass the cache for the current request.
-
-###### opts.strictTtl
-
-Type: `boolean`<br>
-Default: `false`
-
-If set to `false`, after a cached resource's TTL expires it is kept in the cache and will be revalidated on the next request with `If-None-Match`/`If-Modified-Since` headers.
-
-If set to `true` once a cached resource has expired it is deleted and will have to be re-requested.
-
-###### opts.automaticFailover
-
-Type: `boolean`<br>
-Default: `false`
-
-When set to `true`, if the DB connection fails we will automatically fallback to a network request. DB errors will still be emitted to notify you of the problem even though the request callback may succeed.
-
-##### cb
-
-Type: `function`
-
-The callback function which will receive the response as an argument.
-
-The response can be either a [Node.js HTTP response stream](https://nodejs.org/api/http.html#http_class_http_incomingmessage) or a [responselike object](https://github.com/lukechilds/responselike). The response will also have a `fromCache` property set with a boolean value.
-
-##### .on('request', request)
-
-`request` event to get the request object of the request.
-
-**Note:** This event will only fire if an HTTP request is actually made, not when a response is retrieved from cache. However, you should always handle the `request` event to end the request and handle any potential request errors.
-
-##### .on('response', response)
-
-`response` event to get the response object from the HTTP request or cache.
-
-##### .on('error', error)
-
-`error` event emitted in case of an error with the cache.
-
-Errors emitted here will be an instance of `CacheableRequest.RequestError` or `CacheableRequest.CacheError`. You will only ever receive a `RequestError` if the request function throws (normally caused by invalid user input). Normal request errors should be handled inside the `request` event.
-
-To properly handle all error scenarios you should use the following pattern:
-
-```js
-cacheableRequest('example.com', cb)
- .on('error', err => {
- if (err instanceof CacheableRequest.CacheError) {
- handleCacheError(err); // Cache error
- } else if (err instanceof CacheableRequest.RequestError) {
- handleRequestError(err); // Request function thrown
- }
- })
- .on('request', req => {
- req.on('error', handleRequestError); // Request error emitted
- req.end();
- });
-```
-
-**Note:** Database connection errors are emitted here, however `cacheable-request` will attempt to re-request the resource and bypass the cache on a connection error. Therefore a database connection error doesn't necessarily mean the request won't be fulfilled.
-
-## License
-
-MIT © Luke Childs
+++ /dev/null
-{
- "name": "cacheable-request",
- "version": "2.1.4",
- "description": "Wrap native HTTP requests with RFC compliant cache support",
- "main": "src/index.js",
- "scripts": {
- "test": "xo && nyc ava",
- "coverage": "nyc report --reporter=text-lcov | coveralls"
- },
- "xo": {
- "extends": "xo-lukechilds"
- },
- "repository": {
- "type": "git",
- "url": "git+https://github.com/lukechilds/cacheable-request.git"
- },
- "keywords": [
- "HTTP",
- "HTTPS",
- "cache",
- "caching",
- "layer",
- "cacheable",
- "RFC 7234",
- "RFC",
- "7234",
- "compliant"
- ],
- "author": "Luke Childs <lukechilds123@gmail.com> (http://lukechilds.co.uk)",
- "license": "MIT",
- "bugs": {
- "url": "https://github.com/lukechilds/cacheable-request/issues"
- },
- "homepage": "https://github.com/lukechilds/cacheable-request",
- "dependencies": {
- "clone-response": "1.0.2",
- "get-stream": "3.0.0",
- "http-cache-semantics": "3.8.1",
- "keyv": "3.0.0",
- "lowercase-keys": "1.0.0",
- "normalize-url": "2.0.1",
- "responselike": "1.0.2"
- },
- "devDependencies": {
- "@keyv/sqlite": "^1.2.6",
- "ava": "^0.24.0",
- "coveralls": "^3.0.0",
- "create-test-server": "^2.0.0",
- "delay": "^2.0.0",
- "eslint-config-xo-lukechilds": "^1.0.0",
- "nyc": "^11.0.2",
- "pify": "^3.0.0",
- "sqlite3": "^3.1.9",
- "this": "^1.0.2",
- "xo": "^0.19.0"
- }
-}
+++ /dev/null
-'use strict';
-
-const EventEmitter = require('events');
-const urlLib = require('url');
-const normalizeUrl = require('normalize-url');
-const getStream = require('get-stream');
-const CachePolicy = require('http-cache-semantics');
-const Response = require('responselike');
-const lowercaseKeys = require('lowercase-keys');
-const cloneResponse = require('clone-response');
-const Keyv = require('keyv');
-
-class CacheableRequest {
- constructor(request, cacheAdapter) {
- if (typeof request !== 'function') {
- throw new TypeError('Parameter `request` must be a function');
- }
-
- this.cache = new Keyv({
- uri: typeof cacheAdapter === 'string' && cacheAdapter,
- store: typeof cacheAdapter !== 'string' && cacheAdapter,
- namespace: 'cacheable-request'
- });
-
- return this.createCacheableRequest(request);
- }
-
- createCacheableRequest(request) {
- return (opts, cb) => {
- if (typeof opts === 'string') {
- opts = urlLib.parse(opts);
- }
- opts = Object.assign({
- headers: {},
- method: 'GET',
- cache: true,
- strictTtl: false,
- automaticFailover: false
- }, opts);
- opts.headers = lowercaseKeys(opts.headers);
-
- const ee = new EventEmitter();
- const url = normalizeUrl(urlLib.format(opts));
- const key = `${opts.method}:${url}`;
- let revalidate = false;
- let madeRequest = false;
-
- const makeRequest = opts => {
- madeRequest = true;
- const handler = response => {
- if (revalidate) {
- const revalidatedPolicy = CachePolicy.fromObject(revalidate.cachePolicy).revalidatedPolicy(opts, response);
- if (!revalidatedPolicy.modified) {
- const headers = revalidatedPolicy.policy.responseHeaders();
- response = new Response(response.statusCode, headers, revalidate.body, revalidate.url);
- response.cachePolicy = revalidatedPolicy.policy;
- response.fromCache = true;
- }
- }
-
- if (!response.fromCache) {
- response.cachePolicy = new CachePolicy(opts, response);
- response.fromCache = false;
- }
-
- let clonedResponse;
- if (opts.cache && response.cachePolicy.storable()) {
- clonedResponse = cloneResponse(response);
- getStream.buffer(response)
- .then(body => {
- const value = {
- cachePolicy: response.cachePolicy.toObject(),
- url: response.url,
- statusCode: response.fromCache ? revalidate.statusCode : response.statusCode,
- body
- };
- const ttl = opts.strictTtl ? response.cachePolicy.timeToLive() : undefined;
- return this.cache.set(key, value, ttl);
- })
- .catch(err => ee.emit('error', new CacheableRequest.CacheError(err)));
- } else if (opts.cache && revalidate) {
- this.cache.delete(key)
- .catch(err => ee.emit('error', new CacheableRequest.CacheError(err)));
- }
-
- ee.emit('response', clonedResponse || response);
- if (typeof cb === 'function') {
- cb(clonedResponse || response);
- }
- };
-
- try {
- const req = request(opts, handler);
- ee.emit('request', req);
- } catch (err) {
- ee.emit('error', new CacheableRequest.RequestError(err));
- }
- };
-
- const get = opts => Promise.resolve()
- .then(() => opts.cache ? this.cache.get(key) : undefined)
- .then(cacheEntry => {
- if (typeof cacheEntry === 'undefined') {
- return makeRequest(opts);
- }
-
- const policy = CachePolicy.fromObject(cacheEntry.cachePolicy);
- if (policy.satisfiesWithoutRevalidation(opts)) {
- const headers = policy.responseHeaders();
- const response = new Response(cacheEntry.statusCode, headers, cacheEntry.body, cacheEntry.url);
- response.cachePolicy = policy;
- response.fromCache = true;
-
- ee.emit('response', response);
- if (typeof cb === 'function') {
- cb(response);
- }
- } else {
- revalidate = cacheEntry;
- opts.headers = policy.revalidationHeaders(opts);
- makeRequest(opts);
- }
- });
-
- this.cache.on('error', err => ee.emit('error', new CacheableRequest.CacheError(err)));
-
- get(opts).catch(err => {
- if (opts.automaticFailover && !madeRequest) {
- makeRequest(opts);
- }
- ee.emit('error', new CacheableRequest.CacheError(err));
- });
-
- return ee;
- };
- }
-}
-
-CacheableRequest.RequestError = class extends Error {
- constructor(err) {
- super(err.message);
- this.name = 'RequestError';
- Object.assign(this, err);
- }
-};
-
-CacheableRequest.CacheError = class extends Error {
- constructor(err) {
- super(err.message);
- this.name = 'CacheError';
- Object.assign(this, err);
- }
-};
-
-module.exports = CacheableRequest;
+++ /dev/null
-MIT License
-
-Copyright (c) 2017 Luke Childs
-
-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.
+++ /dev/null
-# clone-response
-
-> Clone a Node.js HTTP response stream
-
-[![Build Status](https://travis-ci.org/lukechilds/clone-response.svg?branch=master)](https://travis-ci.org/lukechilds/clone-response)
-[![Coverage Status](https://coveralls.io/repos/github/lukechilds/clone-response/badge.svg?branch=master)](https://coveralls.io/github/lukechilds/clone-response?branch=master)
-[![npm](https://img.shields.io/npm/dm/clone-response.svg)](https://www.npmjs.com/package/clone-response)
-[![npm](https://img.shields.io/npm/v/clone-response.svg)](https://www.npmjs.com/package/clone-response)
-
-Returns a new stream and copies over all properties and methods from the original response giving you a complete duplicate.
-
-This is useful in situations where you need to consume the response stream but also want to pass an unconsumed stream somewhere else to be consumed later.
-
-## Install
-
-```shell
-npm install --save clone-response
-```
-
-## Usage
-
-```js
-const http = require('http');
-const cloneResponse = require('clone-response');
-
-http.get('http://example.com', response => {
- const clonedResponse = cloneResponse(response);
- response.pipe(process.stdout);
-
- setImmediate(() => {
- // The response stream has already been consumed by the time this executes,
- // however the cloned response stream is still available.
- doSomethingWithResponse(clonedResponse);
- });
-});
-```
-
-Please bear in mind that the process of cloning a stream consumes it. However, you can consume a stream multiple times in the same tick, therefore allowing you to create multiple clones. e.g:
-
-```js
-const clone1 = cloneResponse(response);
-const clone2 = cloneResponse(response);
-// response can still be consumed in this tick but cannot be consumed if passed
-// into any async callbacks. clone1 and clone2 can be passed around and be
-// consumed in the future.
-```
-
-## API
-
-### cloneResponse(response)
-
-Returns a clone of the passed in response.
-
-#### response
-
-Type: `stream`
-
-A [Node.js HTTP response stream](https://nodejs.org/api/http.html#http_class_http_incomingmessage) to clone.
-
-## License
-
-MIT © Luke Childs
+++ /dev/null
-{
- "name": "clone-response",
- "version": "1.0.2",
- "description": "Clone a Node.js HTTP response stream",
- "main": "src/index.js",
- "scripts": {
- "test": "xo && nyc ava",
- "coverage": "nyc report --reporter=text-lcov | coveralls"
- },
- "xo": {
- "extends": "xo-lukechilds"
- },
- "repository": {
- "type": "git",
- "url": "git+https://github.com/lukechilds/clone-response.git"
- },
- "keywords": [
- "clone",
- "duplicate",
- "copy",
- "response",
- "HTTP",
- "stream"
- ],
- "author": "Luke Childs <lukechilds123@gmail.com> (http://lukechilds.co.uk)",
- "license": "MIT",
- "bugs": {
- "url": "https://github.com/lukechilds/clone-response/issues"
- },
- "homepage": "https://github.com/lukechilds/clone-response",
- "dependencies": {
- "mimic-response": "^1.0.0"
- },
- "devDependencies": {
- "ava": "^0.22.0",
- "coveralls": "^2.13.1",
- "create-test-server": "^2.0.1",
- "eslint-config-xo-lukechilds": "^1.0.0",
- "get-stream": "^3.0.0",
- "nyc": "^11.0.2",
- "pify": "^3.0.0",
- "xo": "^0.19.0"
- }
-}
+++ /dev/null
-'use strict';
-
-const PassThrough = require('stream').PassThrough;
-const mimicResponse = require('mimic-response');
-
-const cloneResponse = response => {
- if (!(response && response.pipe)) {
- throw new TypeError('Parameter `response` must be a response stream.');
- }
-
- const clone = new PassThrough();
- mimicResponse(response, clone);
-
- return response.pipe(clone);
-};
-
-module.exports = cloneResponse;
+++ /dev/null
-Copyright Node.js contributors. All rights reserved.
-
-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.
+++ /dev/null
-# core-util-is
-
-The `util.is*` functions introduced in Node v0.12.
+++ /dev/null
-diff --git a/lib/util.js b/lib/util.js
-index a03e874..9074e8e 100644
---- a/lib/util.js
-+++ b/lib/util.js
-@@ -19,430 +19,6 @@
- // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
- // USE OR OTHER DEALINGS IN THE SOFTWARE.
-
--var formatRegExp = /%[sdj%]/g;
--exports.format = function(f) {
-- if (!isString(f)) {
-- var objects = [];
-- for (var i = 0; i < arguments.length; i++) {
-- objects.push(inspect(arguments[i]));
-- }
-- return objects.join(' ');
-- }
--
-- var i = 1;
-- var args = arguments;
-- var len = args.length;
-- var str = String(f).replace(formatRegExp, function(x) {
-- if (x === '%%') return '%';
-- if (i >= len) return x;
-- switch (x) {
-- case '%s': return String(args[i++]);
-- case '%d': return Number(args[i++]);
-- case '%j':
-- try {
-- return JSON.stringify(args[i++]);
-- } catch (_) {
-- return '[Circular]';
-- }
-- default:
-- return x;
-- }
-- });
-- for (var x = args[i]; i < len; x = args[++i]) {
-- if (isNull(x) || !isObject(x)) {
-- str += ' ' + x;
-- } else {
-- str += ' ' + inspect(x);
-- }
-- }
-- return str;
--};
--
--
--// Mark that a method should not be used.
--// Returns a modified function which warns once by default.
--// If --no-deprecation is set, then it is a no-op.
--exports.deprecate = function(fn, msg) {
-- // Allow for deprecating things in the process of starting up.
-- if (isUndefined(global.process)) {
-- return function() {
-- return exports.deprecate(fn, msg).apply(this, arguments);
-- };
-- }
--
-- if (process.noDeprecation === true) {
-- return fn;
-- }
--
-- var warned = false;
-- function deprecated() {
-- if (!warned) {
-- if (process.throwDeprecation) {
-- throw new Error(msg);
-- } else if (process.traceDeprecation) {
-- console.trace(msg);
-- } else {
-- console.error(msg);
-- }
-- warned = true;
-- }
-- return fn.apply(this, arguments);
-- }
--
-- return deprecated;
--};
--
--
--var debugs = {};
--var debugEnviron;
--exports.debuglog = function(set) {
-- if (isUndefined(debugEnviron))
-- debugEnviron = process.env.NODE_DEBUG || '';
-- set = set.toUpperCase();
-- if (!debugs[set]) {
-- if (new RegExp('\\b' + set + '\\b', 'i').test(debugEnviron)) {
-- var pid = process.pid;
-- debugs[set] = function() {
-- var msg = exports.format.apply(exports, arguments);
-- console.error('%s %d: %s', set, pid, msg);
-- };
-- } else {
-- debugs[set] = function() {};
-- }
-- }
-- return debugs[set];
--};
--
--
--/**
-- * Echos the value of a value. Trys to print the value out
-- * in the best way possible given the different types.
-- *
-- * @param {Object} obj The object to print out.
-- * @param {Object} opts Optional options object that alters the output.
-- */
--/* legacy: obj, showHidden, depth, colors*/
--function inspect(obj, opts) {
-- // default options
-- var ctx = {
-- seen: [],
-- stylize: stylizeNoColor
-- };
-- // legacy...
-- if (arguments.length >= 3) ctx.depth = arguments[2];
-- if (arguments.length >= 4) ctx.colors = arguments[3];
-- if (isBoolean(opts)) {
-- // legacy...
-- ctx.showHidden = opts;
-- } else if (opts) {
-- // got an "options" object
-- exports._extend(ctx, opts);
-- }
-- // set default options
-- if (isUndefined(ctx.showHidden)) ctx.showHidden = false;
-- if (isUndefined(ctx.depth)) ctx.depth = 2;
-- if (isUndefined(ctx.colors)) ctx.colors = false;
-- if (isUndefined(ctx.customInspect)) ctx.customInspect = true;
-- if (ctx.colors) ctx.stylize = stylizeWithColor;
-- return formatValue(ctx, obj, ctx.depth);
--}
--exports.inspect = inspect;
--
--
--// http://en.wikipedia.org/wiki/ANSI_escape_code#graphics
--inspect.colors = {
-- 'bold' : [1, 22],
-- 'italic' : [3, 23],
-- 'underline' : [4, 24],
-- 'inverse' : [7, 27],
-- 'white' : [37, 39],
-- 'grey' : [90, 39],
-- 'black' : [30, 39],
-- 'blue' : [34, 39],
-- 'cyan' : [36, 39],
-- 'green' : [32, 39],
-- 'magenta' : [35, 39],
-- 'red' : [31, 39],
-- 'yellow' : [33, 39]
--};
--
--// Don't use 'blue' not visible on cmd.exe
--inspect.styles = {
-- 'special': 'cyan',
-- 'number': 'yellow',
-- 'boolean': 'yellow',
-- 'undefined': 'grey',
-- 'null': 'bold',
-- 'string': 'green',
-- 'date': 'magenta',
-- // "name": intentionally not styling
-- 'regexp': 'red'
--};
--
--
--function stylizeWithColor(str, styleType) {
-- var style = inspect.styles[styleType];
--
-- if (style) {
-- return '\u001b[' + inspect.colors[style][0] + 'm' + str +
-- '\u001b[' + inspect.colors[style][1] + 'm';
-- } else {
-- return str;
-- }
--}
--
--
--function stylizeNoColor(str, styleType) {
-- return str;
--}
--
--
--function arrayToHash(array) {
-- var hash = {};
--
-- array.forEach(function(val, idx) {
-- hash[val] = true;
-- });
--
-- return hash;
--}
--
--
--function formatValue(ctx, value, recurseTimes) {
-- // Provide a hook for user-specified inspect functions.
-- // Check that value is an object with an inspect function on it
-- if (ctx.customInspect &&
-- value &&
-- isFunction(value.inspect) &&
-- // Filter out the util module, it's inspect function is special
-- value.inspect !== exports.inspect &&
-- // Also filter out any prototype objects using the circular check.
-- !(value.constructor && value.constructor.prototype === value)) {
-- var ret = value.inspect(recurseTimes, ctx);
-- if (!isString(ret)) {
-- ret = formatValue(ctx, ret, recurseTimes);
-- }
-- return ret;
-- }
--
-- // Primitive types cannot have properties
-- var primitive = formatPrimitive(ctx, value);
-- if (primitive) {
-- return primitive;
-- }
--
-- // Look up the keys of the object.
-- var keys = Object.keys(value);
-- var visibleKeys = arrayToHash(keys);
--
-- if (ctx.showHidden) {
-- keys = Object.getOwnPropertyNames(value);
-- }
--
-- // Some type of object without properties can be shortcutted.
-- if (keys.length === 0) {
-- if (isFunction(value)) {
-- var name = value.name ? ': ' + value.name : '';
-- return ctx.stylize('[Function' + name + ']', 'special');
-- }
-- if (isRegExp(value)) {
-- return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');
-- }
-- if (isDate(value)) {
-- return ctx.stylize(Date.prototype.toString.call(value), 'date');
-- }
-- if (isError(value)) {
-- return formatError(value);
-- }
-- }
--
-- var base = '', array = false, braces = ['{', '}'];
--
-- // Make Array say that they are Array
-- if (isArray(value)) {
-- array = true;
-- braces = ['[', ']'];
-- }
--
-- // Make functions say that they are functions
-- if (isFunction(value)) {
-- var n = value.name ? ': ' + value.name : '';
-- base = ' [Function' + n + ']';
-- }
--
-- // Make RegExps say that they are RegExps
-- if (isRegExp(value)) {
-- base = ' ' + RegExp.prototype.toString.call(value);
-- }
--
-- // Make dates with properties first say the date
-- if (isDate(value)) {
-- base = ' ' + Date.prototype.toUTCString.call(value);
-- }
--
-- // Make error with message first say the error
-- if (isError(value)) {
-- base = ' ' + formatError(value);
-- }
--
-- if (keys.length === 0 && (!array || value.length == 0)) {
-- return braces[0] + base + braces[1];
-- }
--
-- if (recurseTimes < 0) {
-- if (isRegExp(value)) {
-- return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');
-- } else {
-- return ctx.stylize('[Object]', 'special');
-- }
-- }
--
-- ctx.seen.push(value);
--
-- var output;
-- if (array) {
-- output = formatArray(ctx, value, recurseTimes, visibleKeys, keys);
-- } else {
-- output = keys.map(function(key) {
-- return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array);
-- });
-- }
--
-- ctx.seen.pop();
--
-- return reduceToSingleString(output, base, braces);
--}
--
--
--function formatPrimitive(ctx, value) {
-- if (isUndefined(value))
-- return ctx.stylize('undefined', 'undefined');
-- if (isString(value)) {
-- var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '')
-- .replace(/'/g, "\\'")
-- .replace(/\\"/g, '"') + '\'';
-- return ctx.stylize(simple, 'string');
-- }
-- if (isNumber(value)) {
-- // Format -0 as '-0'. Strict equality won't distinguish 0 from -0,
-- // so instead we use the fact that 1 / -0 < 0 whereas 1 / 0 > 0 .
-- if (value === 0 && 1 / value < 0)
-- return ctx.stylize('-0', 'number');
-- return ctx.stylize('' + value, 'number');
-- }
-- if (isBoolean(value))
-- return ctx.stylize('' + value, 'boolean');
-- // For some reason typeof null is "object", so special case here.
-- if (isNull(value))
-- return ctx.stylize('null', 'null');
--}
--
--
--function formatError(value) {
-- return '[' + Error.prototype.toString.call(value) + ']';
--}
--
--
--function formatArray(ctx, value, recurseTimes, visibleKeys, keys) {
-- var output = [];
-- for (var i = 0, l = value.length; i < l; ++i) {
-- if (hasOwnProperty(value, String(i))) {
-- output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,
-- String(i), true));
-- } else {
-- output.push('');
-- }
-- }
-- keys.forEach(function(key) {
-- if (!key.match(/^\d+$/)) {
-- output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,
-- key, true));
-- }
-- });
-- return output;
--}
--
--
--function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) {
-- var name, str, desc;
-- desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] };
-- if (desc.get) {
-- if (desc.set) {
-- str = ctx.stylize('[Getter/Setter]', 'special');
-- } else {
-- str = ctx.stylize('[Getter]', 'special');
-- }
-- } else {
-- if (desc.set) {
-- str = ctx.stylize('[Setter]', 'special');
-- }
-- }
-- if (!hasOwnProperty(visibleKeys, key)) {
-- name = '[' + key + ']';
-- }
-- if (!str) {
-- if (ctx.seen.indexOf(desc.value) < 0) {
-- if (isNull(recurseTimes)) {
-- str = formatValue(ctx, desc.value, null);
-- } else {
-- str = formatValue(ctx, desc.value, recurseTimes - 1);
-- }
-- if (str.indexOf('\n') > -1) {
-- if (array) {
-- str = str.split('\n').map(function(line) {
-- return ' ' + line;
-- }).join('\n').substr(2);
-- } else {
-- str = '\n' + str.split('\n').map(function(line) {
-- return ' ' + line;
-- }).join('\n');
-- }
-- }
-- } else {
-- str = ctx.stylize('[Circular]', 'special');
-- }
-- }
-- if (isUndefined(name)) {
-- if (array && key.match(/^\d+$/)) {
-- return str;
-- }
-- name = JSON.stringify('' + key);
-- if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) {
-- name = name.substr(1, name.length - 2);
-- name = ctx.stylize(name, 'name');
-- } else {
-- name = name.replace(/'/g, "\\'")
-- .replace(/\\"/g, '"')
-- .replace(/(^"|"$)/g, "'");
-- name = ctx.stylize(name, 'string');
-- }
-- }
--
-- return name + ': ' + str;
--}
--
--
--function reduceToSingleString(output, base, braces) {
-- var numLinesEst = 0;
-- var length = output.reduce(function(prev, cur) {
-- numLinesEst++;
-- if (cur.indexOf('\n') >= 0) numLinesEst++;
-- return prev + cur.replace(/\u001b\[\d\d?m/g, '').length + 1;
-- }, 0);
--
-- if (length > 60) {
-- return braces[0] +
-- (base === '' ? '' : base + '\n ') +
-- ' ' +
-- output.join(',\n ') +
-- ' ' +
-- braces[1];
-- }
--
-- return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1];
--}
--
--
- // NOTE: These type checking functions intentionally don't use `instanceof`
- // because it is fragile and can be easily faked with `Object.create()`.
- function isArray(ar) {
-@@ -522,166 +98,10 @@ function isPrimitive(arg) {
- exports.isPrimitive = isPrimitive;
-
- function isBuffer(arg) {
-- return arg instanceof Buffer;
-+ return Buffer.isBuffer(arg);
- }
- exports.isBuffer = isBuffer;
-
- function objectToString(o) {
- return Object.prototype.toString.call(o);
--}
--
--
--function pad(n) {
-- return n < 10 ? '0' + n.toString(10) : n.toString(10);
--}
--
--
--var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep',
-- 'Oct', 'Nov', 'Dec'];
--
--// 26 Feb 16:19:34
--function timestamp() {
-- var d = new Date();
-- var time = [pad(d.getHours()),
-- pad(d.getMinutes()),
-- pad(d.getSeconds())].join(':');
-- return [d.getDate(), months[d.getMonth()], time].join(' ');
--}
--
--
--// log is just a thin wrapper to console.log that prepends a timestamp
--exports.log = function() {
-- console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments));
--};
--
--
--/**
-- * Inherit the prototype methods from one constructor into another.
-- *
-- * The Function.prototype.inherits from lang.js rewritten as a standalone
-- * function (not on Function.prototype). NOTE: If this file is to be loaded
-- * during bootstrapping this function needs to be rewritten using some native
-- * functions as prototype setup using normal JavaScript does not work as
-- * expected during bootstrapping (see mirror.js in r114903).
-- *
-- * @param {function} ctor Constructor function which needs to inherit the
-- * prototype.
-- * @param {function} superCtor Constructor function to inherit prototype from.
-- */
--exports.inherits = function(ctor, superCtor) {
-- ctor.super_ = superCtor;
-- ctor.prototype = Object.create(superCtor.prototype, {
-- constructor: {
-- value: ctor,
-- enumerable: false,
-- writable: true,
-- configurable: true
-- }
-- });
--};
--
--exports._extend = function(origin, add) {
-- // Don't do anything if add isn't an object
-- if (!add || !isObject(add)) return origin;
--
-- var keys = Object.keys(add);
-- var i = keys.length;
-- while (i--) {
-- origin[keys[i]] = add[keys[i]];
-- }
-- return origin;
--};
--
--function hasOwnProperty(obj, prop) {
-- return Object.prototype.hasOwnProperty.call(obj, prop);
--}
--
--
--// Deprecated old stuff.
--
--exports.p = exports.deprecate(function() {
-- for (var i = 0, len = arguments.length; i < len; ++i) {
-- console.error(exports.inspect(arguments[i]));
-- }
--}, 'util.p: Use console.error() instead');
--
--
--exports.exec = exports.deprecate(function() {
-- return require('child_process').exec.apply(this, arguments);
--}, 'util.exec is now called `child_process.exec`.');
--
--
--exports.print = exports.deprecate(function() {
-- for (var i = 0, len = arguments.length; i < len; ++i) {
-- process.stdout.write(String(arguments[i]));
-- }
--}, 'util.print: Use console.log instead');
--
--
--exports.puts = exports.deprecate(function() {
-- for (var i = 0, len = arguments.length; i < len; ++i) {
-- process.stdout.write(arguments[i] + '\n');
-- }
--}, 'util.puts: Use console.log instead');
--
--
--exports.debug = exports.deprecate(function(x) {
-- process.stderr.write('DEBUG: ' + x + '\n');
--}, 'util.debug: Use console.error instead');
--
--
--exports.error = exports.deprecate(function(x) {
-- for (var i = 0, len = arguments.length; i < len; ++i) {
-- process.stderr.write(arguments[i] + '\n');
-- }
--}, 'util.error: Use console.error instead');
--
--
--exports.pump = exports.deprecate(function(readStream, writeStream, callback) {
-- var callbackCalled = false;
--
-- function call(a, b, c) {
-- if (callback && !callbackCalled) {
-- callback(a, b, c);
-- callbackCalled = true;
-- }
-- }
--
-- readStream.addListener('data', function(chunk) {
-- if (writeStream.write(chunk) === false) readStream.pause();
-- });
--
-- writeStream.addListener('drain', function() {
-- readStream.resume();
-- });
--
-- readStream.addListener('end', function() {
-- writeStream.end();
-- });
--
-- readStream.addListener('close', function() {
-- call();
-- });
--
-- readStream.addListener('error', function(err) {
-- writeStream.end();
-- call(err);
-- });
--
-- writeStream.addListener('error', function(err) {
-- readStream.destroy();
-- call(err);
-- });
--}, 'util.pump(): Use readableStream.pipe() instead');
--
--
--var uv;
--exports._errnoException = function(err, syscall) {
-- if (isUndefined(uv)) uv = process.binding('uv');
-- var errname = uv.errname(err);
-- var e = new Error(syscall + ' ' + errname);
-- e.code = errname;
-- e.errno = errname;
-- e.syscall = syscall;
-- return e;
--};
-+}
\ No newline at end of file
+++ /dev/null
-// 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.
-
-// NOTE: These type checking functions intentionally don't use `instanceof`
-// because it is fragile and can be easily faked with `Object.create()`.
-
-function isArray(arg) {
- if (Array.isArray) {
- return Array.isArray(arg);
- }
- return objectToString(arg) === '[object Array]';
-}
-exports.isArray = isArray;
-
-function isBoolean(arg) {
- return typeof arg === 'boolean';
-}
-exports.isBoolean = isBoolean;
-
-function isNull(arg) {
- return arg === null;
-}
-exports.isNull = isNull;
-
-function isNullOrUndefined(arg) {
- return arg == null;
-}
-exports.isNullOrUndefined = isNullOrUndefined;
-
-function isNumber(arg) {
- return typeof arg === 'number';
-}
-exports.isNumber = isNumber;
-
-function isString(arg) {
- return typeof arg === 'string';
-}
-exports.isString = isString;
-
-function isSymbol(arg) {
- return typeof arg === 'symbol';
-}
-exports.isSymbol = isSymbol;
-
-function isUndefined(arg) {
- return arg === void 0;
-}
-exports.isUndefined = isUndefined;
-
-function isRegExp(re) {
- return objectToString(re) === '[object RegExp]';
-}
-exports.isRegExp = isRegExp;
-
-function isObject(arg) {
- return typeof arg === 'object' && arg !== null;
-}
-exports.isObject = isObject;
-
-function isDate(d) {
- return objectToString(d) === '[object Date]';
-}
-exports.isDate = isDate;
-
-function isError(e) {
- return (objectToString(e) === '[object Error]' || e instanceof Error);
-}
-exports.isError = isError;
-
-function isFunction(arg) {
- return typeof arg === 'function';
-}
-exports.isFunction = isFunction;
-
-function isPrimitive(arg) {
- return arg === null ||
- typeof arg === 'boolean' ||
- typeof arg === 'number' ||
- typeof arg === 'string' ||
- typeof arg === 'symbol' || // ES6 symbol
- typeof arg === 'undefined';
-}
-exports.isPrimitive = isPrimitive;
-
-exports.isBuffer = Buffer.isBuffer;
-
-function objectToString(o) {
- return Object.prototype.toString.call(o);
-}
+++ /dev/null
-{
- "name": "core-util-is",
- "version": "1.0.2",
- "description": "The `util.is*` functions introduced in Node v0.12.",
- "main": "lib/util.js",
- "repository": {
- "type": "git",
- "url": "git://github.com/isaacs/core-util-is"
- },
- "keywords": [
- "util",
- "isBuffer",
- "isArray",
- "isNumber",
- "isString",
- "isRegExp",
- "isThis",
- "isThat",
- "polyfill"
- ],
- "author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)",
- "license": "MIT",
- "bugs": {
- "url": "https://github.com/isaacs/core-util-is/issues"
- },
- "scripts": {
- "test": "tap test.js"
- },
- "devDependencies": {
- "tap": "^2.3.0"
- }
-}
+++ /dev/null
-var assert = require('tap');
-
-var t = require('./lib/util');
-
-assert.equal(t.isArray([]), true);
-assert.equal(t.isArray({}), false);
-
-assert.equal(t.isBoolean(null), false);
-assert.equal(t.isBoolean(true), true);
-assert.equal(t.isBoolean(false), true);
-
-assert.equal(t.isNull(null), true);
-assert.equal(t.isNull(undefined), false);
-assert.equal(t.isNull(false), false);
-assert.equal(t.isNull(), false);
-
-assert.equal(t.isNullOrUndefined(null), true);
-assert.equal(t.isNullOrUndefined(undefined), true);
-assert.equal(t.isNullOrUndefined(false), false);
-assert.equal(t.isNullOrUndefined(), true);
-
-assert.equal(t.isNumber(null), false);
-assert.equal(t.isNumber('1'), false);
-assert.equal(t.isNumber(1), true);
-
-assert.equal(t.isString(null), false);
-assert.equal(t.isString('1'), true);
-assert.equal(t.isString(1), false);
-
-assert.equal(t.isSymbol(null), false);
-assert.equal(t.isSymbol('1'), false);
-assert.equal(t.isSymbol(1), false);
-assert.equal(t.isSymbol(Symbol()), true);
-
-assert.equal(t.isUndefined(null), false);
-assert.equal(t.isUndefined(undefined), true);
-assert.equal(t.isUndefined(false), false);
-assert.equal(t.isUndefined(), true);
-
-assert.equal(t.isRegExp(null), false);
-assert.equal(t.isRegExp('1'), false);
-assert.equal(t.isRegExp(new RegExp()), true);
-
-assert.equal(t.isObject({}), true);
-assert.equal(t.isObject([]), true);
-assert.equal(t.isObject(new RegExp()), true);
-assert.equal(t.isObject(new Date()), true);
-
-assert.equal(t.isDate(null), false);
-assert.equal(t.isDate('1'), false);
-assert.equal(t.isDate(new Date()), true);
-
-assert.equal(t.isError(null), false);
-assert.equal(t.isError({ err: true }), false);
-assert.equal(t.isError(new Error()), true);
-
-assert.equal(t.isFunction(null), false);
-assert.equal(t.isFunction({ }), false);
-assert.equal(t.isFunction(function() {}), true);
-
-assert.equal(t.isPrimitive(null), true);
-assert.equal(t.isPrimitive(''), true);
-assert.equal(t.isPrimitive(0), true);
-assert.equal(t.isPrimitive(new Date()), false);
-
-assert.equal(t.isBuffer(null), false);
-assert.equal(t.isBuffer({}), false);
-assert.equal(t.isBuffer(new Buffer(0)), true);
+++ /dev/null
-'use strict';
-var token = '%[a-f0-9]{2}';
-var singleMatcher = new RegExp(token, 'gi');
-var multiMatcher = new RegExp('(' + token + ')+', 'gi');
-
-function decodeComponents(components, split) {
- try {
- // Try to decode the entire string first
- return decodeURIComponent(components.join(''));
- } catch (err) {
- // Do nothing
- }
-
- if (components.length === 1) {
- return components;
- }
-
- split = split || 1;
-
- // Split the array in 2 parts
- var left = components.slice(0, split);
- var right = components.slice(split);
-
- return Array.prototype.concat.call([], decodeComponents(left), decodeComponents(right));
-}
-
-function decode(input) {
- try {
- return decodeURIComponent(input);
- } catch (err) {
- var tokens = input.match(singleMatcher);
-
- for (var i = 1; i < tokens.length; i++) {
- input = decodeComponents(tokens, i).join('');
-
- tokens = input.match(singleMatcher);
- }
-
- return input;
- }
-}
-
-function customDecodeURIComponent(input) {
- // Keep track of all the replacements and prefill the map with the `BOM`
- var replaceMap = {
- '%FE%FF': '\uFFFD\uFFFD',
- '%FF%FE': '\uFFFD\uFFFD'
- };
-
- var match = multiMatcher.exec(input);
- while (match) {
- try {
- // Decode as big chunks as possible
- replaceMap[match[0]] = decodeURIComponent(match[0]);
- } catch (err) {
- var result = decode(match[0]);
-
- if (result !== match[0]) {
- replaceMap[match[0]] = result;
- }
- }
-
- match = multiMatcher.exec(input);
- }
-
- // Add `%C2` at the end of the map to make sure it does not replace the combinator before everything else
- replaceMap['%C2'] = '\uFFFD';
-
- var entries = Object.keys(replaceMap);
-
- for (var i = 0; i < entries.length; i++) {
- // Replace all decoded components
- var key = entries[i];
- input = input.replace(new RegExp(key, 'g'), replaceMap[key]);
- }
-
- return input;
-}
-
-module.exports = function (encodedURI) {
- if (typeof encodedURI !== 'string') {
- throw new TypeError('Expected `encodedURI` to be of type `string`, got `' + typeof encodedURI + '`');
- }
-
- try {
- encodedURI = encodedURI.replace(/\+/g, ' ');
-
- // Try the built in decoder first
- return decodeURIComponent(encodedURI);
- } catch (err) {
- // Fallback to a more advanced decoder
- return customDecodeURIComponent(encodedURI);
- }
-};
+++ /dev/null
-The MIT License (MIT)
-
-Copyright (c) Sam Verschueren <sam.verschueren@gmail.com> (github.com/SamVerschueren)
-
-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.
+++ /dev/null
-{
- "name": "decode-uri-component",
- "version": "0.2.0",
- "description": "A better decodeURIComponent",
- "license": "MIT",
- "repository": "SamVerschueren/decode-uri-component",
- "author": {
- "name": "Sam Verschueren",
- "email": "sam.verschueren@gmail.com",
- "url": "github.com/SamVerschueren"
- },
- "engines": {
- "node": ">=0.10"
- },
- "scripts": {
- "test": "xo && nyc ava",
- "coveralls": "nyc report --reporter=text-lcov | coveralls"
- },
- "files": [
- "index.js"
- ],
- "keywords": [
- "decode",
- "uri",
- "component",
- "decodeuricomponent",
- "components",
- "decoder",
- "url"
- ],
- "devDependencies": {
- "ava": "^0.17.0",
- "coveralls": "^2.13.1",
- "nyc": "^10.3.2",
- "xo": "^0.16.0"
- }
-}
+++ /dev/null
-# decode-uri-component
-
-[![Build Status](https://travis-ci.org/SamVerschueren/decode-uri-component.svg?branch=master)](https://travis-ci.org/SamVerschueren/decode-uri-component) [![Coverage Status](https://coveralls.io/repos/SamVerschueren/decode-uri-component/badge.svg?branch=master&service=github)](https://coveralls.io/github/SamVerschueren/decode-uri-component?branch=master)
-
-> A better [decodeURIComponent](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/decodeURIComponent)
-
-
-## Why?
-
-- Decodes `+` to a space.
-- Converts the [BOM](https://en.wikipedia.org/wiki/Byte_order_mark) to a [replacement character](https://en.wikipedia.org/wiki/Specials_(Unicode_block)#Replacement_character) `�`.
-- Does not throw with invalid encoded input.
-- Decodes as much of the string as possible.
-
-
-## Install
-
-```
-$ npm install --save decode-uri-component
-```
-
-
-## Usage
-
-```js
-const decodeUriComponent = require('decode-uri-component');
-
-decodeUriComponent('%25');
-//=> '%'
-
-decodeUriComponent('%');
-//=> '%'
-
-decodeUriComponent('st%C3%A5le');
-//=> 'ståle'
-
-decodeUriComponent('%st%C3%A5le%');
-//=> '%ståle%'
-
-decodeUriComponent('%%7Bst%C3%A5le%7D%');
-//=> '%{ståle}%'
-
-decodeUriComponent('%7B%ab%%7C%de%%7D');
-//=> '{%ab%|%de%}'
-
-decodeUriComponent('%FE%FF');
-//=> '\uFFFD\uFFFD'
-
-decodeUriComponent('%C2');
-//=> '\uFFFD'
-
-decodeUriComponent('%C2%B5');
-//=> 'µ'
-```
-
-
-## API
-
-### decodeUriComponent(encodedURI)
-
-#### encodedURI
-
-Type: `string`
-
-An encoded component of a Uniform Resource Identifier.
-
-
-## License
-
-MIT © [Sam Verschueren](https://github.com/SamVerschueren)
+++ /dev/null
-'use strict';
-const PassThrough = require('stream').PassThrough;
-const zlib = require('zlib');
-const mimicResponse = require('mimic-response');
-
-module.exports = response => {
- // TODO: Use Array#includes when targeting Node.js 6
- if (['gzip', 'deflate'].indexOf(response.headers['content-encoding']) === -1) {
- return response;
- }
-
- const unzip = zlib.createUnzip();
- const stream = new PassThrough();
-
- mimicResponse(response, stream);
-
- unzip.on('error', err => {
- if (err.code === 'Z_BUF_ERROR') {
- stream.end();
- return;
- }
-
- stream.emit('error', err);
- });
-
- response.pipe(unzip).pipe(stream);
-
- return stream;
-};
+++ /dev/null
-`The MIT License (MIT)
-
-Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
-
-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.
+++ /dev/null
-{
- "name": "decompress-response",
- "version": "3.3.0",
- "description": "Decompress a HTTP response if needed",
- "license": "MIT",
- "repository": "sindresorhus/decompress-response",
- "maintainers": [
- {
- "name": "Sindre Sorhus",
- "email": "sindresorhus@gmail.com",
- "url": "sindresorhus.com"
- },
- {
- "name": "Vsevolod Strukchinsky",
- "email": "floatdrop@gmail.com",
- "url": "github.com/floatdrop"
- }
- ],
- "engines": {
- "node": ">=4"
- },
- "scripts": {
- "test": "xo && ava"
- },
- "files": [
- "index.js"
- ],
- "keywords": [
- "decompress",
- "response",
- "http",
- "https",
- "zlib",
- "gzip",
- "zip",
- "deflate",
- "unzip",
- "ungzip",
- "incoming",
- "message",
- "stream",
- "compressed"
- ],
- "dependencies": {
- "mimic-response": "^1.0.0"
- },
- "devDependencies": {
- "ava": "*",
- "get-stream": "^3.0.0",
- "pify": "^3.0.0",
- "xo": "*"
- }
-}
+++ /dev/null
-# decompress-response [![Build Status](https://travis-ci.org/sindresorhus/decompress-response.svg?branch=master)](https://travis-ci.org/sindresorhus/decompress-response)
-
-> Decompress a HTTP response if needed
-
-Decompresses the [response](https://nodejs.org/api/http.html#http_class_http_incomingmessage) from [`http.request`](https://nodejs.org/api/http.html#http_http_request_options_callback) if it's gzipped or deflated, otherwise just passes it through.
-
-Used by [`got`](https://github.com/sindresorhus/got).
-
-
-## Install
-
-```
-$ npm install decompress-response
-```
-
-
-## Usage
-
-```js
-const http = require('http');
-const decompressResponse = require('decompress-response');
-
-http.get('http://sindresorhus.com', response => {
- response = decompressResponse(response);
-});
-```
-
-
-## License
-
-MIT © [Sindre Sorhus](https://sindresorhus.com)
+++ /dev/null
-Copyright (c) 2013, Deoxxa Development
-======================================
-All rights reserved.
---------------------
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-3. Neither the name of Deoxxa Development nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY DEOXXA DEVELOPMENT ''AS IS'' AND ANY
-EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL DEOXXA DEVELOPMENT BE LIABLE FOR ANY
-DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+++ /dev/null
-# duplexer3 [![Build Status](https://travis-ci.org/floatdrop/duplexer3.svg?branch=master)](https://travis-ci.org/floatdrop/duplexer3) [![Coverage Status](https://coveralls.io/repos/floatdrop/duplexer3/badge.svg?branch=master&service=github)](https://coveralls.io/github/floatdrop/duplexer3?branch=master)
-
-Like [duplexer2](https://github.com/deoxxa/duplexer2) but using Streams3 without readable-stream dependency
-
-```javascript
-var stream = require("stream");
-
-var duplexer3 = require("duplexer3");
-
-var writable = new stream.Writable({objectMode: true}),
- readable = new stream.Readable({objectMode: true});
-
-writable._write = function _write(input, encoding, done) {
- if (readable.push(input)) {
- return done();
- } else {
- readable.once("drain", done);
- }
-};
-
-readable._read = function _read(n) {
- // no-op
-};
-
-// simulate the readable thing closing after a bit
-writable.once("finish", function() {
- setTimeout(function() {
- readable.push(null);
- }, 500);
-});
-
-var duplex = duplexer3(writable, readable);
-
-duplex.on("data", function(e) {
- console.log("got data", JSON.stringify(e));
-});
-
-duplex.on("finish", function() {
- console.log("got finish event");
-});
-
-duplex.on("end", function() {
- console.log("got end event");
-});
-
-duplex.write("oh, hi there", function() {
- console.log("finished writing");
-});
-
-duplex.end(function() {
- console.log("finished ending");
-});
-```
-
-```
-got data "oh, hi there"
-finished writing
-got finish event
-finished ending
-got end event
-```
-
-## Overview
-
-This is a reimplementation of [duplexer](https://www.npmjs.com/package/duplexer) using the
-Streams3 API which is standard in Node as of v4. Everything largely
-works the same.
-
-
-
-## Installation
-
-[Available via `npm`](https://docs.npmjs.com/cli/install):
-
-```
-$ npm i duplexer3
-```
-
-## API
-
-### duplexer3
-
-Creates a new `DuplexWrapper` object, which is the actual class that implements
-most of the fun stuff. All that fun stuff is hidden. DON'T LOOK.
-
-```javascript
-duplexer3([options], writable, readable)
-```
-
-```javascript
-const duplex = duplexer3(new stream.Writable(), new stream.Readable());
-```
-
-Arguments
-
-* __options__ - an object specifying the regular `stream.Duplex` options, as
- well as the properties described below.
-* __writable__ - a writable stream
-* __readable__ - a readable stream
-
-Options
-
-* __bubbleErrors__ - a boolean value that specifies whether to bubble errors
- from the underlying readable/writable streams. Default is `true`.
-
-
-## License
-
-3-clause BSD. [A copy](./LICENSE) is included with the source.
-
-## Contact
-
-* GitHub ([deoxxa](http://github.com/deoxxa))
-* Twitter ([@deoxxa](http://twitter.com/deoxxa))
-* Email ([deoxxa@fknsrs.biz](mailto:deoxxa@fknsrs.biz))
+++ /dev/null
-"use strict";
-
-var stream = require("stream");
-
-function DuplexWrapper(options, writable, readable) {
- if (typeof readable === "undefined") {
- readable = writable;
- writable = options;
- options = null;
- }
-
- stream.Duplex.call(this, options);
-
- if (typeof readable.read !== "function") {
- readable = (new stream.Readable(options)).wrap(readable);
- }
-
- this._writable = writable;
- this._readable = readable;
- this._waiting = false;
-
- var self = this;
-
- writable.once("finish", function() {
- self.end();
- });
-
- this.once("finish", function() {
- writable.end();
- });
-
- readable.on("readable", function() {
- if (self._waiting) {
- self._waiting = false;
- self._read();
- }
- });
-
- readable.once("end", function() {
- self.push(null);
- });
-
- if (!options || typeof options.bubbleErrors === "undefined" || options.bubbleErrors) {
- writable.on("error", function(err) {
- self.emit("error", err);
- });
-
- readable.on("error", function(err) {
- self.emit("error", err);
- });
- }
-}
-
-DuplexWrapper.prototype = Object.create(stream.Duplex.prototype, {constructor: {value: DuplexWrapper}});
-
-DuplexWrapper.prototype._write = function _write(input, encoding, done) {
- this._writable.write(input, encoding, done);
-};
-
-DuplexWrapper.prototype._read = function _read() {
- var buf;
- var reads = 0;
- while ((buf = this._readable.read()) !== null) {
- this.push(buf);
- reads++;
- }
- if (reads === 0) {
- this._waiting = true;
- }
-};
-
-module.exports = function duplex2(options, writable, readable) {
- return new DuplexWrapper(options, writable, readable);
-};
-
-module.exports.DuplexWrapper = DuplexWrapper;
+++ /dev/null
-{
- "name": "duplexer3",
- "version": "0.1.4",
- "description": "Like duplexer but using streams3",
- "engine": {
- "node": ">=4"
- },
- "files": [
- "index.js"
- ],
- "scripts": {
- "test": "mocha -R tap"
- },
- "repository": "floatdrop/duplexer3",
- "keywords": [
- "duplex",
- "duplexer",
- "stream",
- "stream3",
- "join",
- "combine"
- ],
- "author": "Conrad Pankoff <deoxxa@fknsrs.biz> (http://www.fknsrs.biz/)",
- "license": "BSD-3-Clause",
- "devDependencies": {
- "mocha": "^2.2.5"
- }
-}
+++ /dev/null
-language: node_js
-before_install:
- - npm install -g npm
-node_js:
- - "0.8"
- - "0.10"
- - "0.12"
- - "iojs"
+++ /dev/null
-## The MIT License (MIT) ##
-
-Copyright (c) 2014 Hugh Kennedy
-
-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.
+++ /dev/null
-# from2 [![Flattr this!](https://api.flattr.com/button/flattr-badge-large.png)](https://flattr.com/submit/auto?user_id=hughskennedy&url=http://github.com/hughsk/from2&title=from2&description=hughsk/from2%20on%20GitHub&language=en_GB&tags=flattr,github,javascript&category=software)[![experimental](http://hughsk.github.io/stability-badges/dist/experimental.svg)](http://github.com/hughsk/stability-badges) #
-
-`from2` is a high-level module for creating readable streams that properly handle backpressure.
-
-Convience wrapper for
-[readable-stream](http://github.com/isaacs/readable-stream)'s `ReadableStream`
-base class, with an API lifted from
-[from](http://github.com/dominictarr/from) and
-[through2](http://github.com/rvagg/through2).
-
-## Usage ##
-
-[![from2](https://nodei.co/npm/from2.png?mini=true)](https://nodei.co/npm/from2)
-
-### `stream = from2([opts], read)` ###
-
-Where `opts` are the options to pass on to the `ReadableStream` constructor,
-and `read(size, next)` is called when data is requested from the stream.
-
-* `size` is the recommended amount of data (in bytes) to retrieve.
-* `next(err)` should be called when you're ready to emit more data.
-
-For example, here's a readable stream that emits the contents of a given
-string:
-
-``` javascript
-var from = require('from2')
-
-function fromString(string) {
- return from(function(size, next) {
- // if there's no more content
- // left in the string, close the stream.
- if (string.length <= 0) return next(null, null)
-
- // Pull in a new chunk of text,
- // removing it from the string.
- var chunk = string.slice(0, size)
- string = string.slice(size)
-
- // Emit "chunk" from the stream.
- next(null, chunk)
- })
-}
-
-// pipe "hello world" out
-// to stdout.
-fromString('hello world').pipe(process.stdout)
-```
-
-### `stream = from2.obj([opts], read)` ###
-
-Shorthand for `from2({ objectMode: true }, read)`.
-
-### `createStream = from2.ctor([opts], read)` ###
-
-If you're creating similar streams in quick succession you can improve
-performance by generating a stream **constructor** that you can reuse instead
-of creating one-off streams on each call.
-
-Takes the same options as `from2`, instead returning a constructor which you
-can use to create new streams.
-
-### See Also
-
-- [from2-array](https://github.com/binocarlos/from2-array) - Create a from2 stream based on an array of source values.
-- [from2-string](https://github.com/yoshuawuyts/from2-string) - Create a stream from a string. Sugary wrapper around from2.
-
-## License ##
-
-MIT. See [LICENSE.md](http://github.com/hughsk/from2/blob/master/LICENSE.md) for details.
+++ /dev/null
-var Readable = require('readable-stream').Readable
-var inherits = require('inherits')
-
-module.exports = from2
-
-from2.ctor = ctor
-from2.obj = obj
-
-var Proto = ctor()
-
-function toFunction(list) {
- list = list.slice()
- return function (_, cb) {
- var err = null
- var item = list.length ? list.shift() : null
- if (item instanceof Error) {
- err = item
- item = null
- }
-
- cb(err, item)
- }
-}
-
-function from2(opts, read) {
- if (typeof opts !== 'object' || Array.isArray(opts)) {
- read = opts
- opts = {}
- }
-
- var rs = new Proto(opts)
- rs._from = Array.isArray(read) ? toFunction(read) : (read || noop)
- return rs
-}
-
-function ctor(opts, read) {
- if (typeof opts === 'function') {
- read = opts
- opts = {}
- }
-
- opts = defaults(opts)
-
- inherits(Class, Readable)
- function Class(override) {
- if (!(this instanceof Class)) return new Class(override)
- this._reading = false
- this._callback = check
- this.destroyed = false
- Readable.call(this, override || opts)
-
- var self = this
- var hwm = this._readableState.highWaterMark
-
- function check(err, data) {
- if (self.destroyed) return
- if (err) return self.destroy(err)
- if (data === null) return self.push(null)
- self._reading = false
- if (self.push(data)) self._read(hwm)
- }
- }
-
- Class.prototype._from = read || noop
- Class.prototype._read = function(size) {
- if (this._reading || this.destroyed) return
- this._reading = true
- this._from(size, this._callback)
- }
-
- Class.prototype.destroy = function(err) {
- if (this.destroyed) return
- this.destroyed = true
-
- var self = this
- process.nextTick(function() {
- if (err) self.emit('error', err)
- self.emit('close')
- })
- }
-
- return Class
-}
-
-function obj(opts, read) {
- if (typeof opts === 'function' || Array.isArray(opts)) {
- read = opts
- opts = {}
- }
-
- opts = defaults(opts)
- opts.objectMode = true
- opts.highWaterMark = 16
-
- return from2(opts, read)
-}
-
-function noop () {}
-
-function defaults(opts) {
- opts = opts || {}
- return opts
-}
+++ /dev/null
-{
- "name": "from2",
- "description": "Convenience wrapper for ReadableStream, with an API lifted from \"from\" and \"through2\"",
- "version": "2.3.0",
- "main": "index.js",
- "scripts": {
- "test": "node test"
- },
- "dependencies": {
- "inherits": "^2.0.1",
- "readable-stream": "^2.0.0"
- },
- "devDependencies": {
- "tape": "^4.0.0"
- },
- "author": "Hugh Kennedy <hughskennedy@gmail.com> (http://hughsk.io/)",
- "contributors": [
- "Mathias Buus <mathiasbuus@gmail.com>"
- ],
- "license": "MIT",
- "repository": {
- "type": "git",
- "url": "git://github.com/hughsk/from2"
- },
- "bugs": {
- "url": "https://github.com/hughsk/from2/issues"
- },
- "homepage": "https://github.com/hughsk/from2",
- "keywords": [
- "from",
- "stream",
- "readable",
- "pull",
- "convenience",
- "wrapper"
- ]
-}
+++ /dev/null
-var test = require('tape')
-var path = require('path')
-var from = require('./')
-var fs = require('fs')
-
-var tmp = path.resolve(
- __dirname, 'tmp.txt'
-)
-
-function fromString(string) {
- return from(function(size, next) {
- if (string.length <= 0) return next(null, null)
- var chunk = string.slice(0, size)
- string = string.slice(size)
- next(null, chunk)
- })
-}
-
-test('from2', function(t) {
- var contents = fs.readFileSync(__filename, 'utf8')
- var stream = fromString(contents)
-
- stream
- .pipe(fs.createWriteStream(tmp))
- .on('close', function() {
- t.equal(fs.readFileSync(tmp, 'utf8'), contents)
- fs.unlinkSync(tmp)
- t.end()
- })
-})
-
-test('old mode', function(t) {
- var contents = fs.readFileSync(__filename, 'utf8')
- var stream = fromString(contents)
- var buffer = ''
-
- stream.on('data', function(data) {
- buffer += data
- }).on('end', function() {
- t.equal(buffer, contents)
- t.end()
- })
-})
-
-test('destroy', function(t) {
- var stream = from(function(size, next) {
- process.nextTick(function() {
- next(null, 'no')
- })
- })
-
- stream.on('data', function(data) {
- t.ok(false)
- }).on('close', function() {
- t.ok(true)
- t.end()
- })
-
- stream.destroy()
-})
-
-test('arrays', function (t) {
- var input = ['a', 'b', 'c']
- var stream = from(input)
- var output = []
- stream.on('data', function (letter) {
- output.push(letter.toString())
- })
- stream.on('end', function () {
- t.deepEqual(input, output)
- t.end()
- })
-})
-
-test('obj arrays', function (t) {
- var input = [{foo:'a'}, {foo:'b'}, {foo:'c'}]
- var stream = from.obj(input)
- var output = []
- stream.on('data', function (letter) {
- output.push(letter)
- })
- stream.on('end', function () {
- t.deepEqual(input, output)
- t.end()
- })
-})
-
-
-test('arrays can emit errors', function (t) {
- var input = ['a', 'b', new Error('ooops'), 'c']
- var stream = from(input)
- var output = []
- stream.on('data', function (letter) {
- output.push(letter.toString())
- })
- stream.on('error', function(e){
- t.deepEqual(['a', 'b'], output)
- t.equal('ooops', e.message)
- t.end()
- })
- stream.on('end', function () {
- t.fail('the stream should have errored')
- })
-})
-
-test('obj arrays can emit errors', function (t) {
- var input = [{foo:'a'}, {foo:'b'}, new Error('ooops'), {foo:'c'}]
- var stream = from.obj(input)
- var output = []
- stream.on('data', function (letter) {
- output.push(letter)
- })
- stream.on('error', function(e){
- t.deepEqual([{foo:'a'}, {foo:'b'}], output)
- t.equal('ooops', e.message)
- t.end()
- })
- stream.on('end', function () {
- t.fail('the stream should have errored')
- })
-})
-
-
+++ /dev/null
-'use strict';
-const PassThrough = require('stream').PassThrough;
-
-module.exports = opts => {
- opts = Object.assign({}, opts);
-
- const array = opts.array;
- let encoding = opts.encoding;
- const buffer = encoding === 'buffer';
- let objectMode = false;
-
- if (array) {
- objectMode = !(encoding || buffer);
- } else {
- encoding = encoding || 'utf8';
- }
-
- if (buffer) {
- encoding = null;
- }
-
- let len = 0;
- const ret = [];
- const stream = new PassThrough({objectMode});
-
- if (encoding) {
- stream.setEncoding(encoding);
- }
-
- stream.on('data', chunk => {
- ret.push(chunk);
-
- if (objectMode) {
- len = ret.length;
- } else {
- len += chunk.length;
- }
- });
-
- stream.getBufferedValue = () => {
- if (array) {
- return ret;
- }
-
- return buffer ? Buffer.concat(ret, len) : ret.join('');
- };
-
- stream.getBufferedLength = () => len;
-
- return stream;
-};
+++ /dev/null
-'use strict';
-const bufferStream = require('./buffer-stream');
-
-function getStream(inputStream, opts) {
- if (!inputStream) {
- return Promise.reject(new Error('Expected a stream'));
- }
-
- opts = Object.assign({maxBuffer: Infinity}, opts);
-
- const maxBuffer = opts.maxBuffer;
- let stream;
- let clean;
-
- const p = new Promise((resolve, reject) => {
- const error = err => {
- if (err) { // null check
- err.bufferedData = stream.getBufferedValue();
- }
-
- reject(err);
- };
-
- stream = bufferStream(opts);
- inputStream.once('error', error);
- inputStream.pipe(stream);
-
- stream.on('data', () => {
- if (stream.getBufferedLength() > maxBuffer) {
- reject(new Error('maxBuffer exceeded'));
- }
- });
- stream.once('error', error);
- stream.on('end', resolve);
-
- clean = () => {
- // some streams doesn't implement the `stream.Readable` interface correctly
- if (inputStream.unpipe) {
- inputStream.unpipe(stream);
- }
- };
- });
-
- p.then(clean, clean);
-
- 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}));
+++ /dev/null
-The MIT License (MIT)
-
-Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
-
-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.
+++ /dev/null
-{
- "name": "get-stream",
- "version": "3.0.0",
- "description": "Get a stream as a string, buffer, or array",
- "license": "MIT",
- "repository": "sindresorhus/get-stream",
- "author": {
- "name": "Sindre Sorhus",
- "email": "sindresorhus@gmail.com",
- "url": "sindresorhus.com"
- },
- "engines": {
- "node": ">=4"
- },
- "scripts": {
- "test": "xo && ava"
- },
- "files": [
- "index.js",
- "buffer-stream.js"
- ],
- "keywords": [
- "get",
- "stream",
- "promise",
- "concat",
- "string",
- "str",
- "text",
- "buffer",
- "read",
- "data",
- "consume",
- "readable",
- "readablestream",
- "array",
- "object",
- "obj"
- ],
- "devDependencies": {
- "ava": "*",
- "into-stream": "^3.0.0",
- "xo": "*"
- },
- "xo": {
- "esnext": true
- }
-}
+++ /dev/null
-# get-stream [![Build Status](https://travis-ci.org/sindresorhus/get-stream.svg?branch=master)](https://travis-ci.org/sindresorhus/get-stream)
-
-> Get a stream as a string, buffer, or array
-
-
-## Install
-
-```
-$ npm install --save get-stream
-```
-
-
-## Usage
-
-```js
-const fs = require('fs');
-const getStream = require('get-stream');
-const stream = fs.createReadStream('unicorn.txt');
-
-getStream(stream).then(str => {
- console.log(str);
- /*
- ,,))))))));,
- __)))))))))))))),
- \|/ -\(((((''''((((((((.
- -*-==//////(('' . `)))))),
- /|\ ))| o ;-. '((((( ,(,
- ( `| / ) ;))))' ,_))^;(~
- | | | ,))((((_ _____------~~~-. %,;(;(>';'~
- o_); ; )))(((` ~---~ `:: \ %%~~)(v;(`('~
- ; ''''```` `: `:::|\,__,%% );`'; ~
- | _ ) / `:|`----' `-'
- ______/\/~ | / /
- /~;;.____/;;' / ___--,-( `;;;/
- / // _;______;'------~~~~~ /;;/\ /
- // | | / ; \;;,\
- (<_ | ; /',/-----' _>
- \_| ||_ //~;~~~~~~~~~
- `\_| (,~~
- \~\
- ~~
- */
-});
-```
-
-
-## API
-
-The methods returns a promise that resolves when the `end` event fires on the stream, indicating that there is no more data to be read. The stream is switched to flowing mode.
-
-### getStream(stream, [options])
-
-Get the `stream` as a string.
-
-#### options
-
-##### encoding
-
-Type: `string`<br>
-Default: `utf8`
-
-[Encoding](https://nodejs.org/api/buffer.html#buffer_buffer) of the incoming stream.
-
-##### maxBuffer
-
-Type: `number`<br>
-Default: `Infinity`
-
-Maximum length of the returned string. If it exceeds this value before the stream ends, the promise will be rejected.
-
-### getStream.buffer(stream, [options])
-
-Get the `stream` as a buffer.
-
-It honors the `maxBuffer` option as above, but it refers to byte length rather than string length.
-
-### getStream.array(stream, [options])
-
-Get the `stream` as an array of values.
-
-It honors both the `maxBuffer` and `encoding` options. The behavior changes slightly based on the encoding chosen:
-
-- When `encoding` is unset, it assumes an [object mode stream](https://nodesource.com/blog/understanding-object-streams/) and collects values emitted from `stream` unmodified. In this case `maxBuffer` refers to the number of items in the array (not the sum of their sizes).
-
-- When `encoding` is set to `buffer`, it collects an array of buffers. `maxBuffer` refers to the summed byte lengths of every buffer in the array.
-
-- When `encoding` is set to anything else, it collects an array of strings. `maxBuffer` refers to the summed character lengths of every string in the array.
-
-
-## Errors
-
-If the input stream emits an `error` event, the promise will be rejected with the error. The buffered data will be attached to the `bufferedData` property of the error.
-
-```js
-getStream(streamThatErrorsAtTheEnd('unicorn'))
- .catch(err => {
- console.log(err.bufferedData);
- //=> 'unicorn'
- });
-```
-
-
-## FAQ
-
-### How is this different from [`concat-stream`](https://github.com/maxogden/concat-stream)?
-
-This module accepts a stream instead of being one and returns a promise instead of using a callback. The API is simpler and it only supports returning a string, buffer, or array. It doesn't have a fragile type inference. You explicitly choose what you want. And it doesn't depend on the huge `readable-stream` package.
-
-
-## Related
-
-- [get-stdin](https://github.com/sindresorhus/get-stdin) - Get stdin as a string or buffer
-
-
-## License
-
-MIT © [Sindre Sorhus](https://sindresorhus.com)
+++ /dev/null
-'use strict';
-const urlLib = require('url');
-const http = require('http');
-const PCancelable = require('p-cancelable');
-const is = require('@sindresorhus/is');
-
-class GotError extends Error {
- constructor(message, error, opts) {
- super(message);
- Error.captureStackTrace(this, this.constructor);
- this.name = 'GotError';
-
- if (!is.undefined(error.code)) {
- this.code = error.code;
- }
-
- Object.assign(this, {
- host: opts.host,
- hostname: opts.hostname,
- method: opts.method,
- path: opts.path,
- protocol: opts.protocol,
- url: opts.href
- });
- }
-}
-
-module.exports.GotError = GotError;
-
-module.exports.CacheError = class extends GotError {
- constructor(error, opts) {
- super(error.message, error, opts);
- this.name = 'CacheError';
- }
-};
-
-module.exports.RequestError = class extends GotError {
- constructor(error, opts) {
- super(error.message, error, opts);
- this.name = 'RequestError';
- }
-};
-
-module.exports.ReadError = class extends GotError {
- constructor(error, opts) {
- super(error.message, error, opts);
- this.name = 'ReadError';
- }
-};
-
-module.exports.ParseError = class extends GotError {
- constructor(error, statusCode, opts, data) {
- super(`${error.message} in "${urlLib.format(opts)}": \n${data.slice(0, 77)}...`, error, opts);
- this.name = 'ParseError';
- this.statusCode = statusCode;
- this.statusMessage = http.STATUS_CODES[this.statusCode];
- }
-};
-
-module.exports.HTTPError = class extends GotError {
- constructor(statusCode, statusMessage, headers, opts) {
- if (statusMessage) {
- statusMessage = statusMessage.replace(/\r?\n/g, ' ').trim();
- } else {
- statusMessage = http.STATUS_CODES[statusCode];
- }
- super(`Response code ${statusCode} (${statusMessage})`, {}, opts);
- this.name = 'HTTPError';
- this.statusCode = statusCode;
- this.statusMessage = statusMessage;
- this.headers = headers;
- }
-};
-
-module.exports.MaxRedirectsError = class extends GotError {
- constructor(statusCode, redirectUrls, opts) {
- super('Redirected 10 times. Aborting.', {}, opts);
- this.name = 'MaxRedirectsError';
- this.statusCode = statusCode;
- this.statusMessage = http.STATUS_CODES[this.statusCode];
- this.redirectUrls = redirectUrls;
- }
-};
-
-module.exports.UnsupportedProtocolError = class extends GotError {
- constructor(opts) {
- super(`Unsupported protocol "${opts.protocol}"`, {}, opts);
- this.name = 'UnsupportedProtocolError';
- }
-};
-
-module.exports.CancelError = PCancelable.CancelError;
+++ /dev/null
-'use strict';
-const EventEmitter = require('events');
-const http = require('http');
-const https = require('https');
-const PassThrough = require('stream').PassThrough;
-const Transform = require('stream').Transform;
-const urlLib = require('url');
-const fs = require('fs');
-const querystring = require('querystring');
-const CacheableRequest = require('cacheable-request');
-const duplexer3 = require('duplexer3');
-const intoStream = require('into-stream');
-const is = require('@sindresorhus/is');
-const getStream = require('get-stream');
-const timedOut = require('timed-out');
-const urlParseLax = require('url-parse-lax');
-const urlToOptions = require('url-to-options');
-const lowercaseKeys = require('lowercase-keys');
-const decompressResponse = require('decompress-response');
-const mimicResponse = require('mimic-response');
-const isRetryAllowed = require('is-retry-allowed');
-const isURL = require('isurl');
-const PCancelable = require('p-cancelable');
-const pTimeout = require('p-timeout');
-const pify = require('pify');
-const Buffer = require('safe-buffer').Buffer;
-const pkg = require('./package.json');
-const errors = require('./errors');
-
-const getMethodRedirectCodes = new Set([300, 301, 302, 303, 304, 305, 307, 308]);
-const allMethodRedirectCodes = new Set([300, 303, 307, 308]);
-
-const isFormData = body => is.nodeStream(body) && is.function(body.getBoundary);
-
-const getBodySize = opts => {
- const body = opts.body;
-
- if (opts.headers['content-length']) {
- return Number(opts.headers['content-length']);
- }
-
- if (!body && !opts.stream) {
- return 0;
- }
-
- if (is.string(body)) {
- return Buffer.byteLength(body);
- }
-
- if (isFormData(body)) {
- return pify(body.getLength.bind(body))();
- }
-
- if (body instanceof fs.ReadStream) {
- return pify(fs.stat)(body.path).then(stat => stat.size);
- }
-
- if (is.nodeStream(body) && is.buffer(body._buffer)) {
- return body._buffer.length;
- }
-
- return null;
-};
-
-function requestAsEventEmitter(opts) {
- opts = opts || {};
-
- const ee = new EventEmitter();
- const requestUrl = opts.href || urlLib.resolve(urlLib.format(opts), opts.path);
- const redirects = [];
- const agents = is.object(opts.agent) ? opts.agent : null;
- let retryCount = 0;
- let redirectUrl;
- let uploadBodySize;
- let uploaded = 0;
-
- const get = opts => {
- if (opts.protocol !== 'http:' && opts.protocol !== 'https:') {
- ee.emit('error', new got.UnsupportedProtocolError(opts));
- return;
- }
-
- let fn = opts.protocol === 'https:' ? https : http;
-
- if (agents) {
- const protocolName = opts.protocol === 'https:' ? 'https' : 'http';
- opts.agent = agents[protocolName] || opts.agent;
- }
-
- if (opts.useElectronNet && process.versions.electron) {
- const electron = require('electron');
- fn = electron.net || electron.remote.net;
- }
-
- let progressInterval;
-
- const cacheableRequest = new CacheableRequest(fn.request, opts.cache);
- const cacheReq = cacheableRequest(opts, res => {
- clearInterval(progressInterval);
-
- ee.emit('uploadProgress', {
- percent: 1,
- transferred: uploaded,
- total: uploadBodySize
- });
-
- const statusCode = res.statusCode;
-
- res.url = redirectUrl || requestUrl;
- res.requestUrl = requestUrl;
-
- const followRedirect = opts.followRedirect && 'location' in res.headers;
- const redirectGet = followRedirect && getMethodRedirectCodes.has(statusCode);
- const redirectAll = followRedirect && allMethodRedirectCodes.has(statusCode);
-
- if (redirectAll || (redirectGet && (opts.method === 'GET' || opts.method === 'HEAD'))) {
- res.resume();
-
- if (statusCode === 303) {
- // Server responded with "see other", indicating that the resource exists at another location,
- // and the client should request it from that location via GET or HEAD.
- opts.method = 'GET';
- }
-
- if (redirects.length >= 10) {
- ee.emit('error', new got.MaxRedirectsError(statusCode, redirects, opts), null, res);
- return;
- }
-
- const bufferString = Buffer.from(res.headers.location, 'binary').toString();
-
- redirectUrl = urlLib.resolve(urlLib.format(opts), bufferString);
-
- redirects.push(redirectUrl);
-
- const redirectOpts = Object.assign({}, opts, urlLib.parse(redirectUrl));
-
- ee.emit('redirect', res, redirectOpts);
-
- get(redirectOpts);
-
- return;
- }
-
- setImmediate(() => {
- try {
- getResponse(res, opts, ee, redirects);
- } catch (e) {
- ee.emit('error', e);
- }
- });
- });
-
- cacheReq.on('error', err => {
- if (err instanceof CacheableRequest.RequestError) {
- ee.emit('error', new got.RequestError(err, opts));
- } else {
- ee.emit('error', new got.CacheError(err, opts));
- }
- });
-
- cacheReq.once('request', req => {
- let aborted = false;
- req.once('abort', _ => {
- aborted = true;
- });
-
- req.once('error', err => {
- clearInterval(progressInterval);
-
- if (aborted) {
- return;
- }
-
- const backoff = opts.retries(++retryCount, err);
-
- if (backoff) {
- setTimeout(get, backoff, opts);
- return;
- }
-
- ee.emit('error', new got.RequestError(err, opts));
- });
-
- ee.once('request', req => {
- ee.emit('uploadProgress', {
- percent: 0,
- transferred: 0,
- total: uploadBodySize
- });
-
- const socket = req.connection;
- if (socket) {
- // `._connecting` was the old property which was made public in node v6.1.0
- const isConnecting = socket.connecting === undefined ? socket._connecting : socket.connecting;
-
- const onSocketConnect = () => {
- const uploadEventFrequency = 150;
-
- progressInterval = setInterval(() => {
- const lastUploaded = uploaded;
- const headersSize = Buffer.byteLength(req._header);
- uploaded = socket.bytesWritten - headersSize;
-
- // Prevent the known issue of `bytesWritten` being larger than body size
- if (uploadBodySize && uploaded > uploadBodySize) {
- uploaded = uploadBodySize;
- }
-
- // Don't emit events with unchanged progress and
- // prevent last event from being emitted, because
- // it's emitted when `response` is emitted
- if (uploaded === lastUploaded || uploaded === uploadBodySize) {
- return;
- }
-
- ee.emit('uploadProgress', {
- percent: uploadBodySize ? uploaded / uploadBodySize : 0,
- transferred: uploaded,
- total: uploadBodySize
- });
- }, uploadEventFrequency);
- };
-
- // Only subscribe to 'connect' event if we're actually connecting a new
- // socket, otherwise if we're already connected (because this is a
- // keep-alive connection) do not bother. This is important since we won't
- // get a 'connect' event for an already connected socket.
- if (isConnecting) {
- socket.once('connect', onSocketConnect);
- } else {
- onSocketConnect();
- }
- }
- });
-
- if (opts.gotTimeout) {
- clearInterval(progressInterval);
- timedOut(req, opts.gotTimeout);
- }
-
- setImmediate(() => {
- ee.emit('request', req);
- });
- });
- };
-
- setImmediate(() => {
- Promise.resolve(getBodySize(opts))
- .then(size => {
- uploadBodySize = size;
- get(opts);
- })
- .catch(err => {
- ee.emit('error', err);
- });
- });
-
- return ee;
-}
-
-function getResponse(res, opts, ee, redirects) {
- const downloadBodySize = Number(res.headers['content-length']) || null;
- let downloaded = 0;
-
- const progressStream = new Transform({
- transform(chunk, encoding, callback) {
- downloaded += chunk.length;
-
- const percent = downloadBodySize ? downloaded / downloadBodySize : 0;
-
- // Let flush() be responsible for emitting the last event
- if (percent < 1) {
- ee.emit('downloadProgress', {
- percent,
- transferred: downloaded,
- total: downloadBodySize
- });
- }
-
- callback(null, chunk);
- },
-
- flush(callback) {
- ee.emit('downloadProgress', {
- percent: 1,
- transferred: downloaded,
- total: downloadBodySize
- });
-
- callback();
- }
- });
-
- mimicResponse(res, progressStream);
- progressStream.redirectUrls = redirects;
-
- const response = opts.decompress === true &&
- is.function(decompressResponse) &&
- opts.method !== 'HEAD' ? decompressResponse(progressStream) : progressStream;
-
- if (!opts.decompress && ['gzip', 'deflate'].indexOf(res.headers['content-encoding']) !== -1) {
- opts.encoding = null;
- }
-
- ee.emit('response', response);
-
- ee.emit('downloadProgress', {
- percent: 0,
- transferred: 0,
- total: downloadBodySize
- });
-
- res.pipe(progressStream);
-}
-
-function asPromise(opts) {
- const timeoutFn = requestPromise => opts.gotTimeout && opts.gotTimeout.request ?
- pTimeout(requestPromise, opts.gotTimeout.request, new got.RequestError({message: 'Request timed out', code: 'ETIMEDOUT'}, opts)) :
- requestPromise;
-
- const proxy = new EventEmitter();
-
- const cancelable = new PCancelable((resolve, reject, onCancel) => {
- const ee = requestAsEventEmitter(opts);
- let cancelOnRequest = false;
-
- onCancel(() => {
- cancelOnRequest = true;
- });
-
- ee.on('request', req => {
- if (cancelOnRequest) {
- req.abort();
- }
-
- onCancel(() => {
- req.abort();
- });
-
- if (is.nodeStream(opts.body)) {
- opts.body.pipe(req);
- opts.body = undefined;
- return;
- }
-
- req.end(opts.body);
- });
-
- ee.on('response', res => {
- const stream = is.null(opts.encoding) ? getStream.buffer(res) : getStream(res, opts);
-
- stream
- .catch(err => reject(new got.ReadError(err, opts)))
- .then(data => {
- const statusCode = res.statusCode;
- const limitStatusCode = opts.followRedirect ? 299 : 399;
-
- res.body = data;
-
- if (opts.json && res.body) {
- try {
- res.body = JSON.parse(res.body);
- } catch (err) {
- if (statusCode >= 200 && statusCode < 300) {
- throw new got.ParseError(err, statusCode, opts, data);
- }
- }
- }
-
- if (opts.throwHttpErrors && statusCode !== 304 && (statusCode < 200 || statusCode > limitStatusCode)) {
- throw new got.HTTPError(statusCode, res.statusMessage, res.headers, opts);
- }
-
- resolve(res);
- })
- .catch(err => {
- Object.defineProperty(err, 'response', {value: res});
- reject(err);
- });
- });
-
- ee.once('error', reject);
- ee.on('redirect', proxy.emit.bind(proxy, 'redirect'));
- ee.on('uploadProgress', proxy.emit.bind(proxy, 'uploadProgress'));
- ee.on('downloadProgress', proxy.emit.bind(proxy, 'downloadProgress'));
- });
-
- // Preserve backwards-compatibility
- // TODO: Remove this in the next major version
- Object.defineProperty(cancelable, 'canceled', {
- get() {
- return cancelable.isCanceled;
- }
- });
-
- const promise = timeoutFn(cancelable);
-
- promise.cancel = cancelable.cancel.bind(cancelable);
-
- promise.on = (name, fn) => {
- proxy.on(name, fn);
- return promise;
- };
-
- return promise;
-}
-
-function asStream(opts) {
- opts.stream = true;
-
- const input = new PassThrough();
- const output = new PassThrough();
- const proxy = duplexer3(input, output);
- let timeout;
-
- if (opts.gotTimeout && opts.gotTimeout.request) {
- timeout = setTimeout(() => {
- proxy.emit('error', new got.RequestError({message: 'Request timed out', code: 'ETIMEDOUT'}, opts));
- }, opts.gotTimeout.request);
- }
-
- if (opts.json) {
- throw new Error('Got can not be used as a stream when the `json` option is used');
- }
-
- if (opts.body) {
- proxy.write = () => {
- throw new Error('Got\'s stream is not writable when the `body` option is used');
- };
- }
-
- const ee = requestAsEventEmitter(opts);
-
- ee.on('request', req => {
- proxy.emit('request', req);
-
- if (is.nodeStream(opts.body)) {
- opts.body.pipe(req);
- return;
- }
-
- if (opts.body) {
- req.end(opts.body);
- return;
- }
-
- if (opts.method === 'POST' || opts.method === 'PUT' || opts.method === 'PATCH') {
- input.pipe(req);
- return;
- }
-
- req.end();
- });
-
- ee.on('response', res => {
- clearTimeout(timeout);
-
- const statusCode = res.statusCode;
-
- res.on('error', err => {
- proxy.emit('error', new got.ReadError(err, opts));
- });
-
- res.pipe(output);
-
- if (opts.throwHttpErrors && statusCode !== 304 && (statusCode < 200 || statusCode > 299)) {
- proxy.emit('error', new got.HTTPError(statusCode, res.statusMessage, res.headers, opts), null, res);
- return;
- }
-
- proxy.emit('response', res);
- });
-
- ee.on('error', proxy.emit.bind(proxy, 'error'));
- ee.on('redirect', proxy.emit.bind(proxy, 'redirect'));
- ee.on('uploadProgress', proxy.emit.bind(proxy, 'uploadProgress'));
- ee.on('downloadProgress', proxy.emit.bind(proxy, 'downloadProgress'));
-
- return proxy;
-}
-
-function normalizeArguments(url, opts) {
- if (!is.string(url) && !is.object(url)) {
- throw new TypeError(`Parameter \`url\` must be a string or object, not ${is(url)}`);
- } else if (is.string(url)) {
- url = url.replace(/^unix:/, 'http://$&');
-
- try {
- decodeURI(url);
- } catch (err) {
- throw new Error('Parameter `url` must contain valid UTF-8 character sequences');
- }
-
- url = urlParseLax(url);
- if (url.auth) {
- throw new Error('Basic authentication must be done with the `auth` option');
- }
- } else if (isURL.lenient(url)) {
- url = urlToOptions(url);
- }
-
- opts = Object.assign(
- {
- path: '',
- retries: 2,
- cache: false,
- decompress: true,
- useElectronNet: false,
- throwHttpErrors: true
- },
- url,
- {
- protocol: url.protocol || 'http:' // Override both null/undefined with default protocol
- },
- opts
- );
-
- const headers = lowercaseKeys(opts.headers);
- for (const key of Object.keys(headers)) {
- if (is.nullOrUndefined(headers[key])) {
- delete headers[key];
- }
- }
-
- opts.headers = Object.assign({
- 'user-agent': `${pkg.name}/${pkg.version} (https://github.com/sindresorhus/got)`
- }, headers);
-
- if (opts.decompress) {
- opts.headers['accept-encoding'] = 'gzip,deflate';
- }
-
- const query = opts.query;
-
- if (query) {
- if (!is.string(query)) {
- opts.query = querystring.stringify(query);
- }
-
- opts.path = `${opts.path.split('?')[0]}?${opts.query}`;
- delete opts.query;
- }
-
- if (opts.json && is.undefined(opts.headers.accept)) {
- opts.headers.accept = 'application/json';
- }
-
- const body = opts.body;
- if (is.nullOrUndefined(body)) {
- opts.method = (opts.method || 'GET').toUpperCase();
- } else {
- const headers = opts.headers;
- if (!is.nodeStream(body) && !is.string(body) && !is.buffer(body) && !(opts.form || opts.json)) {
- throw new TypeError('The `body` option must be a stream.Readable, string, Buffer or plain Object');
- }
-
- const canBodyBeStringified = is.plainObject(body) || is.array(body);
- if ((opts.form || opts.json) && !canBodyBeStringified) {
- throw new TypeError('The `body` option must be a plain Object or Array when the `form` or `json` option is used');
- }
-
- if (isFormData(body)) {
- // Special case for https://github.com/form-data/form-data
- headers['content-type'] = headers['content-type'] || `multipart/form-data; boundary=${body.getBoundary()}`;
- } else if (opts.form && canBodyBeStringified) {
- headers['content-type'] = headers['content-type'] || 'application/x-www-form-urlencoded';
- opts.body = querystring.stringify(body);
- } else if (opts.json && canBodyBeStringified) {
- headers['content-type'] = headers['content-type'] || 'application/json';
- opts.body = JSON.stringify(body);
- }
-
- if (is.undefined(headers['content-length']) && is.undefined(headers['transfer-encoding']) && !is.nodeStream(body)) {
- const length = is.string(opts.body) ? Buffer.byteLength(opts.body) : opts.body.length;
- headers['content-length'] = length;
- }
-
- // Convert buffer to stream to receive upload progress events
- // see https://github.com/sindresorhus/got/pull/322
- if (is.buffer(body)) {
- opts.body = intoStream(body);
- opts.body._buffer = body;
- }
-
- opts.method = (opts.method || 'POST').toUpperCase();
- }
-
- if (opts.hostname === 'unix') {
- const matches = /(.+?):(.+)/.exec(opts.path);
-
- if (matches) {
- opts.socketPath = matches[1];
- opts.path = matches[2];
- opts.host = null;
- }
- }
-
- if (!is.function(opts.retries)) {
- const retries = opts.retries;
-
- opts.retries = (iter, err) => {
- if (iter > retries || !isRetryAllowed(err)) {
- return 0;
- }
-
- const noise = Math.random() * 100;
-
- return ((1 << iter) * 1000) + noise;
- };
- }
-
- if (is.undefined(opts.followRedirect)) {
- opts.followRedirect = true;
- }
-
- if (opts.timeout) {
- if (is.number(opts.timeout)) {
- opts.gotTimeout = {request: opts.timeout};
- } else {
- opts.gotTimeout = opts.timeout;
- }
- delete opts.timeout;
- }
-
- return opts;
-}
-
-function got(url, opts) {
- try {
- const normalizedArgs = normalizeArguments(url, opts);
-
- if (normalizedArgs.stream) {
- return asStream(normalizedArgs);
- }
-
- return asPromise(normalizedArgs);
- } catch (err) {
- return Promise.reject(err);
- }
-}
-
-got.stream = (url, opts) => asStream(normalizeArguments(url, opts));
-
-const methods = [
- 'get',
- 'post',
- 'put',
- 'patch',
- 'head',
- 'delete'
-];
-
-for (const method of methods) {
- got[method] = (url, opts) => got(url, Object.assign({}, opts, {method}));
- got.stream[method] = (url, opts) => got.stream(url, Object.assign({}, opts, {method}));
-}
-
-Object.assign(got, errors);
-
-module.exports = got;
+++ /dev/null
-MIT License
-
-Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
-
-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.
+++ /dev/null
-{
- "name": "got",
- "version": "8.3.0",
- "description": "Simplified HTTP requests",
- "license": "MIT",
- "repository": "sindresorhus/got",
- "maintainers": [
- {
- "name": "Sindre Sorhus",
- "email": "sindresorhus@gmail.com",
- "url": "sindresorhus.com"
- },
- {
- "name": "Vsevolod Strukchinsky",
- "email": "floatdrop@gmail.com",
- "url": "github.com/floatdrop"
- },
- {
- "name": "Alexander Tesfamichael",
- "email": "alex.tesfamichael@gmail.com",
- "url": "alextes.me"
- }
- ],
- "engines": {
- "node": ">=4"
- },
- "scripts": {
- "test": "xo && nyc ava",
- "coveralls": "nyc report --reporter=text-lcov | coveralls"
- },
- "files": [
- "index.js",
- "errors.js"
- ],
- "keywords": [
- "http",
- "https",
- "get",
- "got",
- "url",
- "uri",
- "request",
- "util",
- "utility",
- "simple",
- "curl",
- "wget",
- "fetch",
- "net",
- "network",
- "electron"
- ],
- "dependencies": {
- "@sindresorhus/is": "^0.7.0",
- "cacheable-request": "^2.1.1",
- "decompress-response": "^3.3.0",
- "duplexer3": "^0.1.4",
- "get-stream": "^3.0.0",
- "into-stream": "^3.1.0",
- "is-retry-allowed": "^1.1.0",
- "isurl": "^1.0.0-alpha5",
- "lowercase-keys": "^1.0.0",
- "mimic-response": "^1.0.0",
- "p-cancelable": "^0.4.0",
- "p-timeout": "^2.0.1",
- "pify": "^3.0.0",
- "safe-buffer": "^5.1.1",
- "timed-out": "^4.0.1",
- "url-parse-lax": "^3.0.0",
- "url-to-options": "^1.0.1"
- },
- "devDependencies": {
- "ava": "^0.25.0",
- "coveralls": "^3.0.0",
- "form-data": "^2.1.1",
- "get-port": "^3.0.0",
- "nyc": "^11.0.2",
- "p-event": "^1.3.0",
- "pem": "^1.4.4",
- "proxyquire": "^1.8.0",
- "sinon": "^4.0.0",
- "slow-stream": "0.0.4",
- "tempfile": "^2.0.0",
- "tempy": "^0.2.1",
- "universal-url": "1.0.0-alpha",
- "xo": "^0.20.0"
- },
- "ava": {
- "concurrency": 4
- },
- "browser": {
- "decompress-response": false,
- "electron": false
- }
-}
+++ /dev/null
-<div align="center">
- <br>
- <br>
- <img width="360" src="https://rawgit.com/sindresorhus/got/master/media/logo.svg" alt="got">
- <br>
- <br>
- <br>
- <p align="center">Huge thanks to <a href="https://moxy.studio"><img src="https://sindresorhus.com/assets/thanks/moxy-logo.svg" width="150"></a> for sponsoring me!
- </p>
- <br>
- <br>
-</div>
-
-> Simplified HTTP requests
-
-[![Build Status](https://travis-ci.org/sindresorhus/got.svg?branch=master)](https://travis-ci.org/sindresorhus/got) [![Coverage Status](https://coveralls.io/repos/github/sindresorhus/got/badge.svg?branch=master)](https://coveralls.io/github/sindresorhus/got?branch=master) [![Downloads](https://img.shields.io/npm/dm/got.svg)](https://npmjs.com/got)
-
-A nicer interface to the built-in [`http`](http://nodejs.org/api/http.html) module.
-
-Created because [`request`](https://github.com/request/request) is bloated *(several megabytes!)*.
-
-
-## Highlights
-
-- [Promise & stream API](#api)
-- [Request cancelation](#aborting-the-request)
-- [RFC compliant caching](#cache-adapters)
-- [Follows redirects](#followredirect)
-- [Retries on network failure](#retries)
-- [Progress events](#onuploadprogress-progress)
-- [Handles gzip/deflate](#decompress)
-- [Timeout handling](#timeout)
-- [Errors with metadata](#errors)
-- [JSON mode](#json)
-- [WHATWG URL support](#url)
-- [Electron support](#useelectronnet)
-
-
-## Install
-
-```
-$ npm install got
-```
-
-<a href="https://www.patreon.com/sindresorhus">
- <img src="https://c5.patreon.com/external/logo/become_a_patron_button@2x.png" width="160">
-</a>
-
-
-## Usage
-
-```js
-const got = require('got');
-
-(async () => {
- try {
- const response = await got('sindresorhus.com');
- console.log(response.body);
- //=> '<!doctype html> ...'
- } catch (error) {
- console.log(error.response.body);
- //=> 'Internal server error ...'
- }
-})();
-```
-
-###### Streams
-
-```js
-const fs = require('fs');
-const got = require('got');
-
-got.stream('sindresorhus.com').pipe(fs.createWriteStream('index.html'));
-
-// For POST, PUT, and PATCH methods `got.stream` returns a `stream.Writable`
-fs.createReadStream('index.html').pipe(got.stream.post('sindresorhus.com'));
-```
-
-
-### API
-
-It's a `GET` request by default, but can be changed by using different methods or in the `options`.
-
-#### got(url, [options])
-
-Returns a Promise for a `response` object with a `body` property, a `url` property with the request URL or the final URL after redirects, and a `requestUrl` property with the original request URL.
-
-The response object will normally be a [Node.js HTTP response stream](https://nodejs.org/api/http.html#http_class_http_incomingmessage), however if returned from the cache it will be a [responselike object](https://github.com/lukechilds/responselike) which behaves in the same way.
-
-The response will also have a `fromCache` property set with a boolean value.
-
-##### url
-
-Type: `string` `Object`
-
-The URL to request as simple string, a [`http.request` options](https://nodejs.org/api/http.html#http_http_request_options_callback), or a [WHATWG `URL`](https://nodejs.org/api/url.html#url_class_url).
-
-Properties from `options` will override properties in the parsed `url`.
-
-If no protocol is specified, it will default to `https`.
-
-##### options
-
-Type: `Object`
-
-Any of the [`http.request`](http://nodejs.org/api/http.html#http_http_request_options_callback) options.
-
-###### stream
-
-Type: `boolean`<br>
-Default: `false`
-
-Returns a `Stream` instead of a `Promise`. This is equivalent to calling `got.stream(url, [options])`.
-
-###### body
-
-Type: `string` `Buffer` `stream.Readable`
-
-*This is mutually exclusive with stream mode.*
-
-Body that will be sent with a `POST` request.
-
-If present in `options` and `options.method` is not set, `options.method` will be set to `POST`.
-
-If `content-length` or `transfer-encoding` is not set in `options.headers` and `body` is a string or buffer, `content-length` will be set to the body length.
-
-###### encoding
-
-Type: `string` `null`<br>
-Default: `'utf8'`
-
-[Encoding](https://nodejs.org/api/buffer.html#buffer_buffers_and_character_encodings) to be used on `setEncoding` of the response data. If `null`, the body is returned as a [`Buffer`](https://nodejs.org/api/buffer.html) (binary data).
-
-###### form
-
-Type: `boolean`<br>
-Default: `false`
-
-*This is mutually exclusive with stream mode.*
-
-If set to `true` and `Content-Type` header is not set, it will be set to `application/x-www-form-urlencoded`.
-
-`body` must be a plain object or array and will be stringified.
-
-###### json
-
-Type: `boolean`<br>
-Default: `false`
-
-*This is mutually exclusive with stream mode.*
-
-If set to `true` and `Content-Type` header is not set, it will be set to `application/json`.
-
-Parse response body with `JSON.parse` and set `accept` header to `application/json`. If used in conjunction with the `form` option, the `body` will the stringified as querystring and the response parsed as JSON.
-
-`body` must be a plain object or array and will be stringified.
-
-###### query
-
-Type: `string` `Object`<br>
-
-Query string object that will be added to the request URL. This will override the query string in `url`.
-
-###### timeout
-
-Type: `number` `Object`
-
-Milliseconds to wait for the server to end the response before aborting request with `ETIMEDOUT` error.
-
-This also accepts an object with separate `connect`, `socket`, and `request` fields for connection, socket, and entire request timeouts.
-
-###### retries
-
-Type: `number` `Function`<br>
-Default: `2`
-
-Number of request retries when network errors happens. Delays between retries counts with function `1000 * Math.pow(2, retry) + Math.random() * 100`, where `retry` is attempt number (starts from 0).
-
-Option accepts `function` with `retry` and `error` arguments. Function must return delay in milliseconds (`0` return value cancels retry).
-
-**Note:** if `retries` is `number`, `ENOTFOUND` and `ENETUNREACH` error will not be retried (see full list in [`is-retry-allowed`](https://github.com/floatdrop/is-retry-allowed/blob/master/index.js#L12) module).
-
-###### followRedirect
-
-Type: `boolean`<br>
-Default: `true`
-
-Defines if redirect responses should be followed automatically.
-
-Note that if a `303` is sent by the server in response to any request type (`POST`, `DELETE`, etc.), got will automatically
-request the resource pointed to in the location header via `GET`. This is in accordance with [the spec](https://tools.ietf.org/html/rfc7231#section-6.4.4).
-
-###### decompress
-
-Type: `boolean`<br>
-Default: `true`
-
-Decompress the response automatically.
-
-If this is disabled, a compressed response is returned as a `Buffer`. This may be useful if you want to handle decompression yourself or stream the raw compressed data.
-
-###### cache
-
-Type: `Object`<br>
-Default: `false`
-
-[Cache adapter instance](#cache-adapters) for storing cached data.
-
-###### useElectronNet
-
-Type: `boolean`<br>
-Default: `false`
-
-When used in Electron, Got will use [`electron.net`](https://electronjs.org/docs/api/net/) instead of the Node.js `http` module. According to the Electron docs, it should be fully compatible, but it's not entirely. See [#315](https://github.com/sindresorhus/got/issues/315).
-
-###### throwHttpErrors
-
-Type: `boolean`<br>
-Default: `true`
-
-Determines if a `got.HTTPError` is thrown for error responses (non-2xx status codes).
-
-If this is disabled, requests that encounter an error status code will be resolved with the `response` instead of throwing. This may be useful if you are checking for resource availability and are expecting error responses.
-
-#### Streams
-
-#### got.stream(url, [options])
-
-`stream` method will return Duplex stream with additional events:
-
-##### .on('request', request)
-
-`request` event to get the request object of the request.
-
-**Tip**: You can use `request` event to abort request:
-
-```js
-got.stream('github.com')
- .on('request', req => setTimeout(() => req.abort(), 50));
-```
-
-##### .on('response', response)
-
-`response` event to get the response object of the final request.
-
-##### .on('redirect', response, nextOptions)
-
-`redirect` event to get the response object of a redirect. The second argument is options for the next request to the redirect location.
-
-##### .on('uploadProgress', progress)
-##### .on('downloadProgress', progress)
-
-Progress events for uploading (sending request) and downloading (receiving response). The `progress` argument is an object like:
-
-```js
-{
- percent: 0.1,
- transferred: 1024,
- total: 10240
-}
-```
-
-If it's not possible to retrieve the body size (can happen when streaming), `total` will be `null`.
-
-**Note**: Progress events can also be used with promises.
-
-```js
-(async () => {
- const response = await got('sindresorhus.com')
- .on('downloadProgress', progress => {
- // Report download progress
- })
- .on('uploadProgress', progress => {
- // Report upload progress
- });
-
- console.log(response);
-})();
-```
-
-##### .on('error', error, body, response)
-
-`error` event emitted in case of protocol error (like `ENOTFOUND` etc.) or status error (4xx or 5xx). The second argument is the body of the server response in case of status error. The third argument is response object.
-
-#### got.get(url, [options])
-#### got.post(url, [options])
-#### got.put(url, [options])
-#### got.patch(url, [options])
-#### got.head(url, [options])
-#### got.delete(url, [options])
-
-Sets `options.method` to the method name and makes a request.
-
-
-## Errors
-
-Each error contains (if available) `statusCode`, `statusMessage`, `host`, `hostname`, `method`, `path`, `protocol` and `url` properties to make debugging easier.
-
-In Promise mode, the `response` is attached to the error.
-
-#### got.CacheError
-
-When a cache method fails, for example if the database goes down, or there's a filesystem error.
-
-#### got.RequestError
-
-When a request fails. Contains a `code` property with error class code, like `ECONNREFUSED`.
-
-#### got.ReadError
-
-When reading from response stream fails.
-
-#### got.ParseError
-
-When `json` option is enabled, server response code is 2xx, and `JSON.parse` fails.
-
-#### got.HTTPError
-
-When server response code is not 2xx. Includes `statusCode`, `statusMessage`, and `redirectUrls` properties.
-
-#### got.MaxRedirectsError
-
-When server redirects you more than 10 times. Includes a `redirectUrls` property, which is an array of the URLs Got was redirected to before giving up.
-
-#### got.UnsupportedProtocolError
-
-When given an unsupported protocol.
-
-#### got.CancelError
-
-When the request is aborted with `.cancel()`.
-
-
-## Aborting the request
-
-The promise returned by Got has a [`.cancel()`](https://github.com/sindresorhus/p-cancelable) method which, when called, aborts the request.
-
-```js
-(async () => {
- const request = got(url, options);
-
- …
-
- // In another part of the code
- if (something) {
- request.cancel();
- }
-
- …
-
- try {
- await request;
- } catch (error) {
- if (request.isCanceled) { // Or `error instanceof got.CancelError`
- // Handle cancelation
- }
-
- // Handle other errors
- }
-})();
-```
-
-<a name="cache-adapters"></a>
-## Cache
-
-Got implements [RFC 7234](http://httpwg.org/specs/rfc7234.html) compliant HTTP caching which works out of the box in memory or is easily pluggable with a wide range of storage adapters. Fresh cache entries are served directly from cache and stale cache entries are revalidated with `If-None-Match`/`If-Modified-Since` headers. You can read more about the underlying cache behaviour in the `cacheable-request` [documentation](https://github.com/lukechilds/cacheable-request).
-
-You can use the JavaScript `Map` type as an in memory cache:
-
-```js
-const got = require('got');
-const map = new Map();
-
-(async () => {
- let response = await got('sindresorhus.com', {cache: map});
- console.log(response.fromCache);
- //=> false
-
- response = await got('sindresorhus.com', {cache: map});
- console.log(response.fromCache);
- //=> true
-})();
-```
-
-Got uses [Keyv](https://github.com/lukechilds/keyv) internally to support a wide range of storage adapters. For something more scalable you could use an [official Keyv storage adapter](https://github.com/lukechilds/keyv#official-storage-adapters):
-
-```
-$ npm install @keyv/redis
-```
-
-```js
-const got = require('got');
-const KeyvRedis = require('@keyv/redis');
-
-const redis = new KeyvRedis('redis://user:pass@localhost:6379');
-
-got('sindresorhus.com', {cache: redis});
-```
-
-Got supports anything that follows the Map API, so it's easy to write your own storage adapter or use a third-party solution.
-
-For example, the following are all valid storage adapters:
-
-```js
-const storageAdapter = new Map();
-// or
-const storageAdapter = require('./my-storage-adapter');
-// or
-const QuickLRU = require('quick-lru');
-const storageAdapter = new QuickLRU({maxSize: 1000});
-
-got('sindresorhus.com', {cache: storageAdapter});
-```
-
-View the [Keyv docs](https://github.com/lukechilds/keyv) for more information on how to use storage adapters.
-
-
-## Proxies
-
-You can use the [`tunnel`](https://github.com/koichik/node-tunnel) module with the `agent` option to work with proxies:
-
-```js
-const got = require('got');
-const tunnel = require('tunnel');
-
-got('sindresorhus.com', {
- agent: tunnel.httpOverHttp({
- proxy: {
- host: 'localhost'
- }
- })
-});
-```
-
-If you require different agents for different protocols, you can pass a map of agents to the `agent` option. This is necessary because a request to one protocol might redirect to another. In such a scenario, `got` will switch over to the right protocol agent for you.
-
-```js
-const got = require('got');
-const HttpAgent = require('agentkeepalive');
-const HttpsAgent = HttpAgent.HttpsAgent;
-
-got('sindresorhus.com', {
- agent: {
- http: new HttpAgent(),
- https: new HttpsAgent()
- }
-});
-```
-
-
-## Cookies
-
-You can use the [`cookie`](https://github.com/jshttp/cookie) module to include cookies in a request:
-
-```js
-const got = require('got');
-const cookie = require('cookie');
-
-got('google.com', {
- headers: {
- cookie: cookie.serialize('foo', 'bar')
- }
-});
-```
-
-
-## Form data
-
-You can use the [`form-data`](https://github.com/form-data/form-data) module to create POST request with form data:
-
-```js
-const fs = require('fs');
-const got = require('got');
-const FormData = require('form-data');
-const form = new FormData();
-
-form.append('my_file', fs.createReadStream('/foo/bar.jpg'));
-
-got.post('google.com', {
- body: form
-});
-```
-
-
-## OAuth
-
-You can use the [`oauth-1.0a`](https://github.com/ddo/oauth-1.0a) module to create a signed OAuth request:
-
-```js
-const got = require('got');
-const crypto = require('crypto');
-const OAuth = require('oauth-1.0a');
-
-const oauth = OAuth({
- consumer: {
- key: process.env.CONSUMER_KEY,
- secret: process.env.CONSUMER_SECRET
- },
- signature_method: 'HMAC-SHA1',
- hash_function: (baseString, key) => crypto.createHmac('sha1', key).update(baseString).digest('base64')
-});
-
-const token = {
- key: process.env.ACCESS_TOKEN,
- secret: process.env.ACCESS_TOKEN_SECRET
-};
-
-const url = 'https://api.twitter.com/1.1/statuses/home_timeline.json';
-
-got(url, {
- headers: oauth.toHeader(oauth.authorize({url, method: 'GET'}, token)),
- json: true
-});
-```
-
-
-## Unix Domain Sockets
-
-Requests can also be sent via [unix domain sockets](http://serverfault.com/questions/124517/whats-the-difference-between-unix-socket-and-tcp-ip-socket). Use the following URL scheme: `PROTOCOL://unix:SOCKET:PATH`.
-
-- `PROTOCOL` - `http` or `https` *(optional)*
-- `SOCKET` - absolute path to a unix domain socket, e.g. `/var/run/docker.sock`
-- `PATH` - request path, e.g. `/v2/keys`
-
-```js
-got('http://unix:/var/run/docker.sock:/containers/json');
-
-// or without protocol (http by default)
-got('unix:/var/run/docker.sock:/containers/json');
-```
-
-## AWS
-
-Requests to AWS services need to have their headers signed. This can be accomplished by using the [`aws4`](https://www.npmjs.com/package/aws4) package. This is an example for querying an ["Elasticsearch Service"](https://aws.amazon.com/elasticsearch-service/) host with a signed request.
-
-```js
-const url = require('url');
-const AWS = require('aws-sdk');
-const aws4 = require('aws4');
-const got = require('got');
-const config = require('./config');
-
-// Reads keys from the environment or `~/.aws/credentials`. Could be a plain object.
-const awsConfig = new AWS.Config({ region: config.region });
-
-function request(uri, options) {
- const awsOpts = {
- region: awsConfig.region,
- headers: {
- accept: 'application/json',
- 'content-type': 'application/json'
- },
- method: 'GET',
- json: true
- };
-
- // We need to parse the URL before passing it to `got` so `aws4` can sign the request
- const opts = Object.assign(url.parse(uri), awsOpts, options);
- aws4.sign(opts, awsConfig.credentials);
-
- return got(opts);
-}
-
-request(`https://${config.host}/production/users/1`);
-
-request(`https://${config.host}/production/`, {
- // All usual `got` options
-});
-```
-
-
-## Testing
-
-You can test your requests by using the [`nock`](https://github.com/node-nock/nock) module to mock an endpoint:
-
-```js
-const got = require('got');
-const nock = require('nock');
-
-nock('https://sindresorhus.com')
- .get('/')
- .reply(200, 'Hello world!');
-
-(async () => {
- const response = await got('sindresorhus.com');
- console.log(response.body);
- //=> 'Hello world!'
-})();
-```
-
-If you need real integration tests you can use [`create-test-server`](https://github.com/lukechilds/create-test-server):
-
-```js
-const got = require('got');
-const createTestServer = require('create-test-server');
-
-(async () => {
- const server = await createTestServer();
- server.get('/', 'Hello world!');
-
- const response = await got(server.url);
- console.log(response.body);
- //=> 'Hello world!'
-
- await server.close();
-})();
-```
-
-
-## Tips
-
-### User Agent
-
-It's a good idea to set the `'user-agent'` header so the provider can more easily see how their resource is used. By default, it's the URL to this repo.
-
-```js
-const got = require('got');
-const pkg = require('./package.json');
-
-got('sindresorhus.com', {
- headers: {
- 'user-agent': `my-module/${pkg.version} (https://github.com/username/my-module)`
- }
-});
-```
-
-### 304 Responses
-
-Bear in mind, if you send an `if-modified-since` header and receive a `304 Not Modified` response, the body will be empty. It's your responsibility to cache and retrieve the body contents.
-
-
-## Related
-
-- [gh-got](https://github.com/sindresorhus/gh-got) - Got convenience wrapper to interact with the GitHub API
-- [gl-got](https://github.com/singapore/gl-got) - Got convenience wrapper to interact with the GitLab API
-- [travis-got](https://github.com/samverschueren/travis-got) - Got convenience wrapper to interact with the Travis API
-- [graphql-got](https://github.com/kevva/graphql-got) - Got convenience wrapper to interact with GraphQL
-- [GotQL](https://github.com/khaosdoctor/gotql) - Got convenience wrapper to interact with GraphQL using JSON-parsed queries instead of strings
-
-
-## Created by
-
-[![Sindre Sorhus](https://github.com/sindresorhus.png?size=100)](https://sindresorhus.com) | [![Vsevolod Strukchinsky](https://github.com/floatdrop.png?size=100)](https://github.com/floatdrop) | [![Alexander Tesfamichael](https://github.com/AlexTes.png?size=100)](https://github.com/AlexTes) | [![Luke Childs](https://github.com/lukechilds.png?size=100)](https://github.com/lukechilds)
----|---|---|---
-[Sindre Sorhus](https://sindresorhus.com) | [Vsevolod Strukchinsky](https://github.com/floatdrop) | [Alexander Tesfamichael](https://alextes.me) | [Luke Childs](https://github.com/lukechilds)
-
-
-## License
-
-MIT
+++ /dev/null
-# This file is for unifying the coding style for different editors and IDEs
-# editorconfig.org
-
-# top-most EditorConfig file
-root = true
-
-# every file
-[*]
-charset = utf-8
-end_of_line = lf
-indent_size = 2
-indent_style = space
-insert_final_newline = true
-trim_trailing_whitespace = true
-
-# 4 space indentation
-[*.py]
-indent_style = space
-indent_size = 4
-
-# Tab indentation (no size specified)
-[Makefile]
-indent_style = tab
-
-[*.md]
-trim_trailing_whitespace = false
+++ /dev/null
-{
- "root": true,
- "extends": [
- "@xotic750/eslint-config-standard-x"
- ]
-}
+++ /dev/null
-sudo: false
-language: node_js
-branches:
- only:
- - master
- - /^greenkeeper/.*$/
-notifications:
- email: false
-node_js:
- - "9.6"
- - "9.5"
- - "9.4"
- - "9.3"
- - "9.2"
- - "9.1"
- - "9.0"
- - "8.9"
- - "8.8"
- - "8.7"
- - "8.6"
- - "8.5"
- - "8.4"
- - "8.3"
- - "8.2"
- - "8.1"
- - "8.0"
- - "7.10"
- - "7.9"
- - "7.8"
- - "7.7"
- - "7.6"
- - "7.5"
- - "7.4"
- - "7.3"
- - "7.2"
- - "7.1"
- - "7.0"
- - "6.11"
- - "6.10"
- - "6.9"
- - "6.8"
- - "6.7"
- - "6.6"
- - "6.5"
- - "6.4"
- - "6.3"
- - "6.2"
- - "6.1"
- - "6.0"
- - "5.12"
- - "5.11"
- - "5.10"
- - "5.9"
- - "5.8"
- - "5.7"
- - "5.6"
- - "5.5"
- - "5.4"
- - "5.3"
- - "5.2"
- - "5.1"
- - "5.0"
- - "4.8"
- - "4.7"
- - "4.6"
- - "4.5"
- - "4.4"
- - "4.3"
- - "4.2"
- - "4.1"
- - "4.0"
- - "iojs-v3.3"
- - "iojs-v3.2"
- - "iojs-v3.1"
- - "iojs-v3.0"
- - "iojs-v2.5"
- - "iojs-v2.4"
- - "iojs-v2.3"
- - "iojs-v2.2"
- - "iojs-v2.1"
- - "iojs-v2.0"
- - "iojs-v1.8"
- - "iojs-v1.7"
- - "iojs-v1.6"
- - "iojs-v1.5"
- - "iojs-v1.4"
- - "iojs-v1.3"
- - "iojs-v1.2"
- - "iojs-v1.1"
- - "iojs-v1.0"
- - "0.12"
- - "0.11"
- - "0.10"
- - "0.9"
- - "0.8"
- - "0.6"
- - "0.4"
-before_install:
- - 'if [ "${TRAVIS_NODE_VERSION}" = "0.6" ]; then npm install -g npm@1.3 ; elif [ "${TRAVIS_NODE_VERSION}" != "0.9" ]; then case "$(npm --version)" in 1.*) npm install -g npm@1.4.28 ;; 2.*) npm install -g npm@2 ; esac ; fi'
- - 'if [ "${TRAVIS_NODE_VERSION}" != "0.6" ] && [ "${TRAVIS_NODE_VERSION}" != "0.9" ]; then if [ "${TRAVIS_NODE_VERSION%${TRAVIS_NODE_VERSION#[0-9]}}" = "0" ] || [ "${TRAVIS_NODE_VERSION:0:4}" = "iojs" ]; then npm install -g npm@4.5; elif [[ "${TRAVIS_NODE_VERSION%${TRAVIS_NODE_VERSION#[0-9]}}" =~ ^[4-5]+$ ]]; then npm install -g npm@5.3; else npm install -g npm; fi; fi'
-install:
- - 'if [ "${TRAVIS_NODE_VERSION}" = "0.6" ]; then nvm install 0.8 && npm install -g npm@1.3 && npm install -g npm@1.4.28 && npm install -g npm@2 && npm install && nvm use --delete-prefix "${TRAVIS_NODE_VERSION}"; else npm install; fi;'
-script:
- - 'npm test'
-matrix:
- fast_finish: true
- allow_failures:
- - node_js: "0.11"
- - node_js: "0.9"
- - node_js: "0.6"
- - node_js: "0.4"
+++ /dev/null
-{
- "warnings": false,
- "parse": {},
- "compress": {
- "keep_fnames": true
- },
- "mangle": false,
- "output": {
- "ascii_only": true,
- "beautify": false,
- "comments": "some"
- },
- "sourceMap": {},
- "nameCache": null,
- "toplevel": false,
- "ie8": true
-}
+++ /dev/null
-https://opensource.org/licenses/MIT
-
-Copyright (c) 2015-present Graham Fairweather.
-
-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.
+++ /dev/null
-<a href="https://travis-ci.org/Xotic750/has-symbol-support-x"
- title="Travis status">
-<img
- src="https://travis-ci.org/Xotic750/has-symbol-support-x.svg?branch=master"
- alt="Travis status" height="18"/>
-</a>
-<a href="https://david-dm.org/Xotic750/has-symbol-support-x"
- title="Dependency status">
-<img src="https://david-dm.org/Xotic750/has-symbol-support-x.svg"
- alt="Dependency status" height="18"/>
-</a>
-<a href="https://david-dm.org/Xotic750/has-symbol-support-x#info=devDependencies"
- title="devDependency status">
-<img src="https://david-dm.org/Xotic750/has-symbol-support-x/dev-status.svg"
- alt="devDependency status" height="18"/>
-</a>
-<a href="https://badge.fury.io/js/has-symbol-support-x" title="npm version">
-<img src="https://badge.fury.io/js/has-symbol-support-x.svg"
- alt="npm version" height="18"/>
-</a>
-<a name="module_has-symbol-support-x"></a>
-
-## has-symbol-support-x
-Tests if ES6 Symbol is supported.
-
-**Version**: 1.4.2
-**Author**: Xotic750 <Xotic750@gmail.com>
-**License**: [MIT](<https://opensource.org/licenses/MIT>)
-**Copyright**: Xotic750
-<a name="exp_module_has-symbol-support-x--module.exports"></a>
-
-### `module.exports` : <code>boolean</code> ⏏
-Indicates if `Symbol`exists and creates the correct type.
-`true`, if it exists and creates the correct type, otherwise `false`.
-
-**Kind**: Exported member
+++ /dev/null
-<a href="https://travis-ci.org/Xotic750/@{PACKAGE-NAME}"
- title="Travis status">
-<img
- src="https://travis-ci.org/Xotic750/@{PACKAGE-NAME}.svg?branch=master"
- alt="Travis status" height="18"/>
-</a>
-<a href="https://david-dm.org/Xotic750/@{PACKAGE-NAME}"
- title="Dependency status">
-<img src="https://david-dm.org/Xotic750/@{PACKAGE-NAME}.svg"
- alt="Dependency status" height="18"/>
-</a>
-<a href="https://david-dm.org/Xotic750/@{PACKAGE-NAME}#info=devDependencies"
- title="devDependency status">
-<img src="https://david-dm.org/Xotic750/@{PACKAGE-NAME}/dev-status.svg"
- alt="devDependency status" height="18"/>
-</a>
-<a href="https://badge.fury.io/js/@{PACKAGE-NAME}" title="npm version">
-<img src="https://badge.fury.io/js/@{PACKAGE-NAME}.svg"
- alt="npm version" height="18"/>
-</a>
+++ /dev/null
-/**
- * @file Tests if ES6 Symbol is supported.
- * @version 1.4.2
- * @author Xotic750 <Xotic750@gmail.com>
- * @copyright Xotic750
- * @license {@link <https://opensource.org/licenses/MIT> MIT}
- * @module has-symbol-support-x
- */
-
-'use strict';
-
-/**
- * Indicates if `Symbol`exists and creates the correct type.
- * `true`, if it exists and creates the correct type, otherwise `false`.
- *
- * @type boolean
- */
-module.exports = typeof Symbol === 'function' && typeof Symbol('') === 'symbol';
+++ /dev/null
-(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.returnExports = f()}})(function(){var define,module,exports;return (function(){function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s}return e})()({1:[function(_dereq_,module,exports){
-/**
- * @file Tests if ES6 Symbol is supported.
- * @version 1.4.2
- * @author Xotic750 <Xotic750@gmail.com>
- * @copyright Xotic750
- * @license {@link <https://opensource.org/licenses/MIT> MIT}
- * @module has-symbol-support-x
- */
-
-'use strict';
-
-/**
- * Indicates if `Symbol`exists and creates the correct type.
- * `true`, if it exists and creates the correct type, otherwise `false`.
- *
- * @type boolean
- */
-module.exports = typeof Symbol === 'function' && typeof Symbol('') === 'symbol';
-
-},{}]},{},[1])(1)
-});
\ No newline at end of file
+++ /dev/null
-!function(f){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=f();else if("function"==typeof define&&define.amd)define([],f);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).returnExports=f()}}(function(){return function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a="function"==typeof require&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n||e)},l,l.exports,e,t,n,r)}return n[o].exports}for(var i="function"==typeof require&&require,o=0;o<r.length;o++)s(r[o]);return s}({1:[function(_dereq_,module,exports){
-/**
- * @file Tests if ES6 Symbol is supported.
- * @version 1.4.2
- * @author Xotic750 <Xotic750@gmail.com>
- * @copyright Xotic750
- * @license {@link <https://opensource.org/licenses/MIT> MIT}
- * @module has-symbol-support-x
- */
-"use strict";module.exports="function"==typeof Symbol&&"symbol"==typeof Symbol("")},{}]},{},[1])(1)});
\ No newline at end of file
+++ /dev/null
-{"version":3,"sources":["lib/has-symbol-support-x.js"],"names":["f","exports","module","define","amd","window","global","self","this","returnExports","e","t","n","r","s","o","u","a","require","i","Error","code","l","call","length","1","_dereq_","Symbol"],"mappings":"CAAA,SAAUA,GAAG,GAAoB,iBAAVC,SAAoC,oBAATC,OAAsBA,OAAOD,QAAQD,SAAS,GAAmB,mBAATG,QAAqBA,OAAOC,IAAKD,UAAUH,OAAO,EAA0B,oBAATK,OAAwBA,OAA+B,oBAATC,OAAwBA,OAA6B,oBAAPC,KAAsBA,KAAYC,MAAOC,cAAgBT,KAAlU,CAAyU,WAAqC,OAAmB,SAASU,EAAEC,EAAEC,EAAEC,GAAG,SAASC,EAAEC,EAAEC,GAAG,IAAIJ,EAAEG,GAAG,CAAC,IAAIJ,EAAEI,GAAG,CAAC,IAAIE,EAAkB,mBAATC,SAAqBA,QAAQ,IAAIF,GAAGC,EAAE,OAAOA,EAAEF,GAAE,GAAI,GAAGI,EAAE,OAAOA,EAAEJ,GAAE,GAAI,IAAIf,EAAE,IAAIoB,MAAM,uBAAuBL,EAAE,KAAK,MAAMf,EAAEqB,KAAK,mBAAmBrB,EAAE,IAAIsB,EAAEV,EAAEG,IAAId,YAAYU,EAAEI,GAAG,GAAGQ,KAAKD,EAAErB,QAAQ,SAASS,GAAG,IAAIE,EAAED,EAAEI,GAAG,GAAGL,GAAG,OAAOI,EAAEF,GAAIF,IAAIY,EAAEA,EAAErB,QAAQS,EAAEC,EAAEC,EAAEC,GAAG,OAAOD,EAAEG,GAAGd,QAAkD,IAA1C,IAAIkB,EAAkB,mBAATD,SAAqBA,QAAgBH,EAAE,EAAEA,EAAEF,EAAEW,OAAOT,IAAID,EAAED,EAAEE,IAAI,OAAOD,EAAlc,EAAkdW,GAAG,SAASC,QAAQxB,OAAOD;;;;;;;;;AAUl2B,aAQAC,OAAOD,QAA4B,mBAAX0B,QAA+C,iBAAfA,OAAO,cAEpD,GApB0W,CAoBtW"}
\ No newline at end of file
+++ /dev/null
-{
- "name": "has-symbol-support-x",
- "version": "1.4.2",
- "description": "Tests if ES6 Symbol is supported.",
- "homepage": "https://github.com/Xotic750/has-symbol-support-x",
- "author": {
- "name": "Graham Fairweather",
- "email": "xotic750@gmail.com"
- },
- "copyright": "Copyright (c) 2015-present",
- "keywords": [
- "ES6",
- "hasSymbolSupport",
- "module",
- "javascript",
- "nodejs",
- "browser"
- ],
- "main": "index.js",
- "engines": {
- "node": "*"
- },
- "license": "MIT",
- "repository": {
- "type": "git",
- "url": "https://github.com/Xotic750/has-symbol-support-x.git"
- },
- "bugs": {
- "url": "https://github.com/Xotic750/has-symbol-support-x/issues"
- },
- "dependencies": {},
- "devDependencies": {
- "@xotic750/eslint-config-standard-x": "^3.1.1",
- "ajv": "^6.1.1",
- "browserify": "^16.1.0",
- "browserify-derequire": "^0.9.4",
- "cross-env": "^5.1.3",
- "es5-shim": "^4.5.10",
- "es6-shim": "^0.35.3",
- "es7-shim": "^6.0.0",
- "eslint": "^4.18.1",
- "eslint-plugin-compat": "^2.2.0",
- "eslint-plugin-css-modules": "^2.7.5",
- "eslint-plugin-eslint-comments": "^2.0.2",
- "eslint-plugin-jsdoc": "^3.5.0",
- "eslint-plugin-json": "^1.2.0",
- "eslint-plugin-no-use-extend-native": "^0.3.12",
- "husky": "^0.13.4",
- "jasmine-node": "^1.14.5",
- "jsdoc-to-markdown": "^4.0.1",
- "json3": "^3.3.2",
- "make-jasmine-spec-runner-html": "^1.3.0",
- "ncp": "^2.0.0",
- "nodemon": "^1.15.1",
- "nsp": "^3.2.1",
- "parallelshell": "^3.0.2",
- "replace-x": "^1.5.0",
- "rimraf": "^2.6.2",
- "serve": "^6.4.11",
- "uglify-js": "^3.3.12"
- },
- "scripts": {
- "clean": "rimraf README.md lib/*",
- "clean:jasmine": "rimraf tests/index.html tests/run.js",
- "clean:all": "npm run clean:jasmine && npm run clean",
- "build": "npm run clean && npm run lint && npm run browserify && npm run uglify && npm run docs && npm test && npm run security",
- "build:jasmine": "npm run clean:jasmine && make-jasmine-spec-runner-html",
- "build:setver": "replace-x \" @version .*\" \" @version $(node -p -e \"require('./package.json').version\")\" index.js",
- "build:name": "replace-x \" @module .*\" \" @module $(node -p -e \"require('./package.json').name\")\" index.js",
- "build:description": "replace-x \" @file .*\" \" @file $(node -p -e \"require('./package.json').description\")\" index.js",
- "build:replace": "npm run build:setver && npm run build:name && npm run build:description",
- "production": "npm run clean:all && npm run build:jasmine && npm run build:replace && npm run build",
- "start": "parallelshell \"serve\" \"nodemon --watch index.js --exec 'npm run build'\"",
- "docs:name": "replace-x \"@{PACKAGE-NAME}\" \"$(node -p -e \"require('./package.json').name\")\" README.md",
- "docs:badges": "ncp badges.html README.md && npm run docs:name",
- "docs": "npm run docs:badges && jsdoc2md --name-format --example-lang js index.js >> README.md",
- "lint": "eslint *.js tests/spec/*.js",
- "lint-fix": "npm run lint -- --fix",
- "security": "nsp check",
- "test": "jasmine-node --matchall tests/spec/",
- "browserify": "browserify -p browserify-derequire -e index.js -o lib/has-symbol-support-x.js -u 'crypto' -s returnExports",
- "uglify": "uglifyjs lib/has-symbol-support-x.js -o lib/has-symbol-support-x.min.js --config-file .uglifyjsrc.json",
- "precommit": "npm run production",
- "prepush": "npm run production"
- }
-}
+++ /dev/null
-<!DOCTYPE HTML>
-<html>
-<head>
- <meta charset="utf-8" />
- <title>Jasmine Spec Runner: has-symbol-support-x</title>
-
- <link rel="icon" href="http://jasmine.github.io/images/jasmine.ico" sizes="16x16">
- <link rel="icon" href="http://jasmine.github.io//images/jasmine_32x32.ico" sizes="32x32">
-
- <link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/jasmine/1.3.1/jasmine.min.css">
- <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/es5-shim/4.5.10/es5-shim.min.js"></script>
- <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/es5-shim/4.5.10/es5-sham.min.js"></script>
- <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/json3/3.3.2/json3.min.js"></script>
- <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/es6-shim/0.35.3/es6-shim.js"></script>
- <script type="text/javascript" src="https://wzrd.in/standalone/es7-shim@latest"></script>
- <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jasmine/1.3.1/jasmine.min.js"></script>
- <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jasmine/1.3.1/jasmine-html.min.js"></script>
-
- <!-- include helper files here... -->
-
- <!-- include source files here... -->
- <script src="../lib/has-symbol-support-x.min.js"></script>
-
- <!-- include spec files here... -->
- <script src="spec/test.js"></script>
-
- <!-- run the tests -->
- <script src="./run.js"></script>
-
-</head>
-
-<body>
-</body>
-</html>
+++ /dev/null
-/* global window, jasmine */
-/* eslint strict: 0 */
-(function () {
- var jasmineEnv = jasmine.getEnv();
- jasmineEnv.updateInterval = 1000;
-
- var trivialReporter = new jasmine.TrivialReporter();
-
- jasmineEnv.addReporter(trivialReporter);
-
- jasmineEnv.specFilter = function (spec) {
- return trivialReporter.specFilter(spec);
- };
-
- var currentWindowOnload = window.onload;
- var execJasmine = function () {
- jasmineEnv.execute();
- };
- window.onload = function () {
- if (currentWindowOnload) {
- currentWindowOnload();
- }
- execJasmine();
- };
-}());
+++ /dev/null
-'use strict';
-
-var hasSymbolSupport;
-if (typeof module === 'object' && module.exports) {
- require('es5-shim');
- require('es5-shim/es5-sham');
- if (typeof JSON === 'undefined') {
- JSON = {};
- }
- require('json3').runInContext(null, JSON);
- require('es6-shim');
- var es7 = require('es7-shim');
- Object.keys(es7).forEach(function (key) {
- var obj = es7[key];
- if (typeof obj.shim === 'function') {
- obj.shim();
- }
- });
- hasSymbolSupport = require('../../index.js');
-} else {
- hasSymbolSupport = returnExports;
-}
-
-describe('Basic tests', function () {
- it('results should match', function () {
- var expected = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol';
- expect(hasSymbolSupport).toBe(expected);
- });
-});
+++ /dev/null
-# This file is for unifying the coding style for different editors and IDEs
-# editorconfig.org
-
-# top-most EditorConfig file
-root = true
-
-# every file
-[*]
-charset = utf-8
-end_of_line = lf
-indent_size = 2
-indent_style = space
-insert_final_newline = true
-trim_trailing_whitespace = true
-
-# 4 space indentation
-[*.py]
-indent_style = space
-indent_size = 4
-
-# Tab indentation (no size specified)
-[Makefile]
-indent_style = tab
-
-[*.md]
-trim_trailing_whitespace = false
+++ /dev/null
-{
- "root": true,
- "extends": [
- "@xotic750/eslint-config-standard-x"
- ]
-}
+++ /dev/null
-sudo: false
-language: node_js
-branches:
- only:
- - master
- - /^greenkeeper/.*$/
-notifications:
- email: false
-node_js:
- - "8.4"
- - "8.3"
- - "8.2"
- - "8.1"
- - "8.0"
- - "7.10"
- - "7.9"
- - "7.8"
- - "7.7"
- - "7.6"
- - "7.5"
- - "7.4"
- - "7.3"
- - "7.2"
- - "7.1"
- - "7.0"
- - "6.9"
- - "6.8"
- - "6.7"
- - "6.6"
- - "6.5"
- - "6.4"
- - "6.3"
- - "6.2"
- - "6.1"
- - "6.0"
- - "5.12"
- - "5.11"
- - "5.10"
- - "5.9"
- - "5.8"
- - "5.7"
- - "5.6"
- - "5.5"
- - "5.4"
- - "5.3"
- - "5.2"
- - "5.1"
- - "5.0"
- - "4.4"
- - "4.3"
- - "4.2"
- - "4.1"
- - "4.0"
- - "iojs-v3.3"
- - "iojs-v3.2"
- - "iojs-v3.1"
- - "iojs-v3.0"
- - "iojs-v2.5"
- - "iojs-v2.4"
- - "iojs-v2.3"
- - "iojs-v2.2"
- - "iojs-v2.1"
- - "iojs-v2.0"
- - "iojs-v1.8"
- - "iojs-v1.7"
- - "iojs-v1.6"
- - "iojs-v1.5"
- - "iojs-v1.4"
- - "iojs-v1.3"
- - "iojs-v1.2"
- - "iojs-v1.1"
- - "iojs-v1.0"
- - "0.12"
- - "0.11"
- - "0.10"
- - "0.9"
- - "0.8"
- - "0.6"
- - "0.4"
-before_install:
- - 'if [ "${TRAVIS_NODE_VERSION}" = "0.6" ]; then npm install -g npm@1.3 ; elif [ "${TRAVIS_NODE_VERSION}" != "0.9" ]; then case "$(npm --version)" in 1.*) npm install -g npm@1.4.28 ;; 2.*) npm install -g npm@2 ;; esac ; fi'
- - 'if [ "${TRAVIS_NODE_VERSION%${TRAVIS_NODE_VERSION#[0-9]}}" = "0" ] || [ "${TRAVIS_NODE_VERSION:0:4}" = "iojs" ]; then npm install -g npm@4.5 ; elif [ "${TRAVIS_NODE_VERSION}" != "0.6" ] && [ "${TRAVIS_NODE_VERSION}" != "0.9" ]; then npm install -g npm; fi'
-install:
- - 'if [ "${TRAVIS_NODE_VERSION}" = "0.6" ]; then nvm install 0.8 && npm install -g npm@1.3 && npm install -g npm@1.4.28 && npm install -g npm@2 && npm install && nvm use --delete-prefix "${TRAVIS_NODE_VERSION}"; else npm install; fi;'
-script:
- - 'npm test'
-matrix:
- fast_finish: true
- allow_failures:
- - node_js: "0.11"
- - node_js: "0.9"
- - node_js: "0.6"
- - node_js: "0.4"
+++ /dev/null
-{
- "warnings": false,
- "parse": {},
- "compress": {
- "keep_fnames": true
- },
- "mangle": false,
- "output": {
- "ascii_only": true,
- "beautify": false,
- "comments": "some"
- },
- "sourceMap": {},
- "nameCache": null,
- "toplevel": false,
- "ie8": true
-}
+++ /dev/null
-https://opensource.org/licenses/MIT
-
-Copyright (c) 2015-2017 Graham Fairweather.
-
-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.
+++ /dev/null
-<a href="https://travis-ci.org/Xotic750/has-to-string-tag-x"
- title="Travis status">
-<img
- src="https://travis-ci.org/Xotic750/has-to-string-tag-x.svg?branch=master"
- alt="Travis status" height="18"/>
-</a>
-<a href="https://david-dm.org/Xotic750/has-to-string-tag-x"
- title="Dependency status">
-<img src="https://david-dm.org/Xotic750/has-to-string-tag-x.svg"
- alt="Dependency status" height="18"/>
-</a>
-<a href="https://david-dm.org/Xotic750/has-to-string-tag-x#info=devDependencies"
- title="devDependency status">
-<img src="https://david-dm.org/Xotic750/has-to-string-tag-x/dev-status.svg"
- alt="devDependency status" height="18"/>
-</a>
-<a href="https://badge.fury.io/js/has-to-string-tag-x" title="npm version">
-<img src="https://badge.fury.io/js/has-to-string-tag-x.svg"
- alt="npm version" height="18"/>
-</a>
-<a name="module_has-to-string-tag-x"></a>
-
-## has-to-string-tag-x
-Tests if ES6 @@toStringTag is supported.
-
-**See**: [26.3.1 @@toStringTag](http://www.ecma-international.org/ecma-262/6.0/#sec-@@tostringtag)
-**Version**: 1.4.1
-**Author**: Xotic750 <Xotic750@gmail.com>
-**License**: [MIT](<https://opensource.org/licenses/MIT>)
-**Copyright**: Xotic750
-<a name="exp_module_has-to-string-tag-x--module.exports"></a>
-
-### `module.exports` : <code>boolean</code> ⏏
-Indicates if `Symbol.toStringTag`exists and is the correct type.
-`true`, if it exists and is the correct type, otherwise `false`.
-
-**Kind**: Exported member
+++ /dev/null
-<a href="https://travis-ci.org/Xotic750/@{PACKAGE-NAME}"
- title="Travis status">
-<img
- src="https://travis-ci.org/Xotic750/@{PACKAGE-NAME}.svg?branch=master"
- alt="Travis status" height="18"/>
-</a>
-<a href="https://david-dm.org/Xotic750/@{PACKAGE-NAME}"
- title="Dependency status">
-<img src="https://david-dm.org/Xotic750/@{PACKAGE-NAME}.svg"
- alt="Dependency status" height="18"/>
-</a>
-<a href="https://david-dm.org/Xotic750/@{PACKAGE-NAME}#info=devDependencies"
- title="devDependency status">
-<img src="https://david-dm.org/Xotic750/@{PACKAGE-NAME}/dev-status.svg"
- alt="devDependency status" height="18"/>
-</a>
-<a href="https://badge.fury.io/js/@{PACKAGE-NAME}" title="npm version">
-<img src="https://badge.fury.io/js/@{PACKAGE-NAME}.svg"
- alt="npm version" height="18"/>
-</a>
+++ /dev/null
-/**
- * @file Tests if ES6 @@toStringTag is supported.
- * @see {@link http://www.ecma-international.org/ecma-262/6.0/#sec-@@tostringtag|26.3.1 @@toStringTag}
- * @version 1.4.1
- * @author Xotic750 <Xotic750@gmail.com>
- * @copyright Xotic750
- * @license {@link <https://opensource.org/licenses/MIT> MIT}
- * @module has-to-string-tag-x
- */
-
-'use strict';
-
-/**
- * Indicates if `Symbol.toStringTag`exists and is the correct type.
- * `true`, if it exists and is the correct type, otherwise `false`.
- *
- * @type boolean
- */
-module.exports = require('has-symbol-support-x') && typeof Symbol.toStringTag === 'symbol';
+++ /dev/null
-(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.returnExports = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){
-/**
- * @file Tests if ES6 @@toStringTag is supported.
- * @see {@link http://www.ecma-international.org/ecma-262/6.0/#sec-@@tostringtag|26.3.1 @@toStringTag}
- * @version 1.4.1
- * @author Xotic750 <Xotic750@gmail.com>
- * @copyright Xotic750
- * @license {@link <https://opensource.org/licenses/MIT> MIT}
- * @module has-to-string-tag-x
- */
-
-'use strict';
-
-/**
- * Indicates if `Symbol.toStringTag`exists and is the correct type.
- * `true`, if it exists and is the correct type, otherwise `false`.
- *
- * @type boolean
- */
-module.exports = _dereq_('has-symbol-support-x') && typeof Symbol.toStringTag === 'symbol';
-
-},{"has-symbol-support-x":2}],2:[function(_dereq_,module,exports){
-/**
- * @file Tests if ES6 Symbol is supported.
- * @version 1.4.1
- * @author Xotic750 <Xotic750@gmail.com>
- * @copyright Xotic750
- * @license {@link <https://opensource.org/licenses/MIT> MIT}
- * @module has-symbol-support-x
- */
-
-'use strict';
-
-/**
- * Indicates if `Symbol`exists and creates the correct type.
- * `true`, if it exists and creates the correct type, otherwise `false`.
- *
- * @type boolean
- */
-module.exports = typeof Symbol === 'function' && typeof Symbol('') === 'symbol';
-
-},{}]},{},[1])(1)
-});
\ No newline at end of file
+++ /dev/null
-!function(f){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=f();else if("function"==typeof define&&define.amd)define([],f);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).returnExports=f()}}(function(){return function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a="function"==typeof require&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n||e)},l,l.exports,e,t,n,r)}return n[o].exports}for(var i="function"==typeof require&&require,o=0;o<r.length;o++)s(r[o]);return s}({1:[function(_dereq_,module,exports){/**
- * @file Tests if ES6 @@toStringTag is supported.
- * @see {@link http://www.ecma-international.org/ecma-262/6.0/#sec-@@tostringtag|26.3.1 @@toStringTag}
- * @version 1.4.1
- * @author Xotic750 <Xotic750@gmail.com>
- * @copyright Xotic750
- * @license {@link <https://opensource.org/licenses/MIT> MIT}
- * @module has-to-string-tag-x
- */
-"use strict";module.exports=_dereq_("has-symbol-support-x")&&"symbol"==typeof Symbol.toStringTag},{"has-symbol-support-x":2}],2:[function(_dereq_,module,exports){/**
- * @file Tests if ES6 Symbol is supported.
- * @version 1.4.1
- * @author Xotic750 <Xotic750@gmail.com>
- * @copyright Xotic750
- * @license {@link <https://opensource.org/licenses/MIT> MIT}
- * @module has-symbol-support-x
- */
-"use strict";module.exports="function"==typeof Symbol&&"symbol"==typeof Symbol("")},{}]},{},[1])(1)});
\ No newline at end of file
+++ /dev/null
-{"version":3,"sources":["lib/has-to-string-tag-x.js"],"names":["f","exports","module","define","amd","window","global","self","this","returnExports","e","t","n","r","s","o","u","a","require","i","Error","code","l","call","length","1","_dereq_","Symbol","toStringTag","has-symbol-support-x","2"],"mappings":"CAAA,SAAUA,GAAG,GAAoB,iBAAVC,SAAoC,oBAATC,OAAsBA,OAAOD,QAAQD,SAAS,GAAmB,mBAATG,QAAqBA,OAAOC,IAAKD,UAAUH,OAAO,EAA0B,oBAATK,OAAwBA,OAA+B,oBAATC,OAAwBA,OAA6B,oBAAPC,KAAsBA,KAAYC,MAAOC,cAAgBT,KAAlU,CAAyU,WAAqC,OAAO,SAAUU,EAAEC,EAAEC,EAAEC,GAAG,SAASC,EAAEC,EAAEC,GAAG,IAAIJ,EAAEG,GAAG,CAAC,IAAIJ,EAAEI,GAAG,CAAC,IAAIE,EAAkB,mBAATC,SAAqBA,QAAQ,IAAIF,GAAGC,EAAE,OAAOA,EAAEF,GAAE,GAAI,GAAGI,EAAE,OAAOA,EAAEJ,GAAE,GAAI,IAAIf,EAAE,IAAIoB,MAAM,uBAAuBL,EAAE,KAAK,MAAMf,EAAEqB,KAAK,mBAAmBrB,EAAE,IAAIsB,EAAEV,EAAEG,IAAId,YAAYU,EAAEI,GAAG,GAAGQ,KAAKD,EAAErB,QAAQ,SAASS,GAAG,IAAIE,EAAED,EAAEI,GAAG,GAAGL,GAAG,OAAOI,EAAEF,GAAIF,IAAIY,EAAEA,EAAErB,QAAQS,EAAEC,EAAEC,EAAEC,GAAG,OAAOD,EAAEG,GAAGd,QAAkD,IAAI,IAA1CkB,EAAkB,mBAATD,SAAqBA,QAAgBH,EAAE,EAAEA,EAAEF,EAAEW,OAAOT,IAAID,EAAED,EAAEE,IAAI,OAAOD,EAAvb,EAA4bW,GAAG,SAASC,QAAQxB,OAAOD;;;;;;;;;AAW50B,aAQAC,OAAOD,QAAUyB,QAAQ,yBAAyD,iBAAvBC,OAAOC,cAE/DC,uBAAuB,IAAIC,GAAG,SAASJ,QAAQxB,OAAOD;;;;;;;;AAUzD,aAQAC,OAAOD,QAA4B,mBAAX0B,QAA+C,iBAAfA,OAAO,cAEpD,IAAI"}
\ No newline at end of file
+++ /dev/null
-{
- "name": "has-to-string-tag-x",
- "version": "1.4.1",
- "description": "Tests if ES6 @@toStringTag is supported.",
- "homepage": "https://github.com/Xotic750/has-to-string-tag-x",
- "author": {
- "name": "Graham Fairweather",
- "email": "xotic750@gmail.com"
- },
- "copyright": "Copyright (c) 2015-2017",
- "keywords": [
- "ES6",
- "hasToStringTag",
- "module",
- "javascript",
- "nodejs",
- "browser"
- ],
- "main": "index.js",
- "engines": {
- "node": "*"
- },
- "license": "MIT",
- "repository": {
- "type": "git",
- "url": "https://github.com/Xotic750/has-to-string-tag-x.git"
- },
- "bugs": {
- "url": "https://github.com/Xotic750/has-to-string-tag-x/issues"
- },
- "dependencies": {
- "has-symbol-support-x": "^1.4.1"
- },
- "devDependencies": {
- "@xotic750/eslint-config-standard-x": "^2.2.1",
- "browserify": "^14.4.0",
- "browserify-derequire": "^0.9.4",
- "cross-env": "^5.0.1",
- "es5-shim": "^4.5.9",
- "es6-shim": "^0.35.3",
- "es7-shim": "^6.0.0",
- "eslint": "^4.2.0",
- "eslint-plugin-compat": "^1.0.4",
- "eslint-plugin-css-modules": "^2.7.2",
- "eslint-plugin-eslint-comments": "^1.0.2",
- "eslint-plugin-jsdoc": "^3.1.1",
- "eslint-plugin-json": "^1.2.0",
- "eslint-plugin-no-use-extend-native": "^0.3.12",
- "husky": "^0.13.4",
- "jasmine-node": "^1.14.5",
- "jsdoc-to-markdown": "^3.0.0",
- "json3": "^3.3.2",
- "make-jasmine-spec-runner-html": "^1.3.0",
- "ncp": "^2.0.0",
- "nodemon": "^1.11.0",
- "nsp": "^2.6.3",
- "parallelshell": "^3.0.1",
- "replace-x": "^1.5.0",
- "rimraf": "^2.6.1",
- "serve": "^6.0.2",
- "uglify-js": "^3.0.24"
- },
- "scripts": {
- "clean": "rimraf README.md lib/*",
- "clean:jasmine": "rimraf tests/index.html tests/run.js",
- "clean:all": "npm run clean:jasmine && npm run clean",
- "build": "npm run clean && npm run lint && npm run browserify && npm run uglify && npm run docs && npm test && npm run security",
- "build:jasmine": "npm run clean:jasmine && make-jasmine-spec-runner-html",
- "build:setver": "replace-x \" @version .*\" \" @version $(node -p -e \"require('./package.json').version\")\" index.js",
- "build:name": "replace-x \" @module .*\" \" @module $(node -p -e \"require('./package.json').name\")\" index.js",
- "build:description": "replace-x \" @file .*\" \" @file $(node -p -e \"require('./package.json').description\")\" index.js",
- "build:replace": "npm run build:setver && npm run build:name && npm run build:description",
- "production": "npm run clean:all && npm run build:jasmine && npm run build:replace && npm run build",
- "start": "parallelshell \"serve\" \"nodemon --watch index.js --exec 'npm run build'\"",
- "docs:name": "replace-x \"@{PACKAGE-NAME}\" \"$(node -p -e \"require('./package.json').name\")\" README.md",
- "docs:badges": "ncp badges.html README.md && npm run docs:name",
- "docs": "npm run docs:badges && jsdoc2md --name-format --example-lang js index.js >> README.md",
- "lint": "eslint *.js tests/spec/*.js",
- "lint-fix": "npm run lint -- --fix",
- "security": "nsp check",
- "test": "jasmine-node --matchall tests/spec/",
- "browserify": "browserify -p browserify-derequire -e index.js -o lib/has-to-string-tag-x.js -u 'crypto' -s returnExports",
- "uglify": "uglifyjs lib/has-to-string-tag-x.js -o lib/has-to-string-tag-x.min.js --config-file .uglifyjsrc.json",
- "precommit": "npm run production",
- "prepush": "npm run production"
- }
-}
+++ /dev/null
-# Can I cache this? [![Build Status](https://travis-ci.org/pornel/http-cache-semantics.svg?branch=master)](https://travis-ci.org/pornel/http-cache-semantics)
-
-`CachePolicy` tells when responses can be reused from a cache, taking into account [HTTP RFC 7234](http://httpwg.org/specs/rfc7234.html) rules for user agents and shared caches. It's aware of many tricky details such as the `Vary` header, proxy revalidation, and authenticated responses.
-
-## Usage
-
-Cacheability of an HTTP response depends on how it was requested, so both `request` and `response` are required to create the policy.
-
-```js
-const policy = new CachePolicy(request, response, options);
-
-if (!policy.storable()) {
- // throw the response away, it's not usable at all
- return;
-}
-
-// Cache the data AND the policy object in your cache
-// (this is pseudocode, roll your own cache (lru-cache package works))
-letsPretendThisIsSomeCache.set(request.url, {policy, response}, policy.timeToLive());
-```
-
-```js
-// And later, when you receive a new request:
-const {policy, response} = letsPretendThisIsSomeCache.get(newRequest.url);
-
-// It's not enough that it exists in the cache, it has to match the new request, too:
-if (policy && policy.satisfiesWithoutRevalidation(newRequest)) {
- // OK, the previous response can be used to respond to the `newRequest`.
- // Response headers have to be updated, e.g. to add Age and remove uncacheable headers.
- response.headers = policy.responseHeaders();
- return response;
-}
-```
-
-It may be surprising, but it's not enough for an HTTP response to be [fresh](#yo-fresh) to satisfy a request. It may need to match request headers specified in `Vary`. Even a matching fresh response may still not be usable if the new request restricted cacheability, etc.
-
-The key method is `satisfiesWithoutRevalidation(newRequest)`, which checks whether the `newRequest` is compatible with the original request and whether all caching conditions are met.
-
-### Constructor options
-
-Request and response must have a `headers` property with all header names in lower case. `url`, `status` and `method` are optional (defaults are any URL, status `200`, and `GET` method).
-
-```js
-const request = {
- url: '/',
- method: 'GET',
- headers: {
- accept: '*/*',
- },
-};
-
-const response = {
- status: 200,
- headers: {
- 'cache-control': 'public, max-age=7234',
- },
-};
-
-const options = {
- shared: true,
- cacheHeuristic: 0.1,
- immutableMinTimeToLive: 24*3600*1000, // 24h
- ignoreCargoCult: false,
-};
-```
-
-If `options.shared` is `true` (default), then the response is evaluated from a perspective of a shared cache (i.e. `private` is not cacheable and `s-maxage` is respected). If `options.shared` is `false`, then the response is evaluated from a perspective of a single-user cache (i.e. `private` is cacheable and `s-maxage` is ignored).
-
-`options.cacheHeuristic` is a fraction of response's age that is used as a fallback cache duration. The default is 0.1 (10%), e.g. if a file hasn't been modified for 100 days, it'll be cached for 100*0.1 = 10 days.
-
-`options.immutableMinTimeToLive` is a number of milliseconds to assume as the default time to cache responses with `Cache-Control: immutable`. Note that [per RFC](http://httpwg.org/http-extensions/immutable.html) these can become stale, so `max-age` still overrides the default.
-
-If `options.ignoreCargoCult` is true, common anti-cache directives will be completely ignored if the non-standard `pre-check` and `post-check` directives are present. These two useless directives are most commonly found in bad StackOverflow answers and PHP's "session limiter" defaults.
-
-### `storable()`
-
-Returns `true` if the response can be stored in a cache. If it's `false` then you MUST NOT store either the request or the response.
-
-### `satisfiesWithoutRevalidation(newRequest)`
-
-This is the most important method. Use this method to check whether the cached response is still fresh in the context of the new request.
-
-If it returns `true`, then the given `request` matches the original response this cache policy has been created with, and the response can be reused without contacting the server. Note that the old response can't be returned without being updated, see `responseHeaders()`.
-
-If it returns `false`, then the response may not be matching at all (e.g. it's for a different URL or method), or may require to be refreshed first (see `revalidationHeaders()`).
-
-### `responseHeaders()`
-
-Returns updated, filtered set of response headers to return to clients receiving the cached response. This function is necessary, because proxies MUST always remove hop-by-hop headers (such as `TE` and `Connection`) and update response's `Age` to avoid doubling cache time.
-
-```js
-cachedResponse.headers = cachePolicy.responseHeaders(cachedResponse);
-```
-
-### `timeToLive()`
-
-Returns approximate time in *milliseconds* until the response becomes stale (i.e. not fresh).
-
-After that time (when `timeToLive() <= 0`) the response might not be usable without revalidation. However, there are exceptions, e.g. a client can explicitly allow stale responses, so always check with `satisfiesWithoutRevalidation()`.
-
-### `toObject()`/`fromObject(json)`
-
-Chances are you'll want to store the `CachePolicy` object along with the cached response. `obj = policy.toObject()` gives a plain JSON-serializable object. `policy = CachePolicy.fromObject(obj)` creates an instance from it.
-
-### Refreshing stale cache (revalidation)
-
-When a cached response has expired, it can be made fresh again by making a request to the origin server. The server may respond with status 304 (Not Modified) without sending the response body again, saving bandwidth.
-
-The following methods help perform the update efficiently and correctly.
-
-#### `revalidationHeaders(newRequest)`
-
-Returns updated, filtered set of request headers to send to the origin server to check if the cached response can be reused. These headers allow the origin server to return status 304 indicating the response is still fresh. All headers unrelated to caching are passed through as-is.
-
-Use this method when updating cache from the origin server.
-
-```js
-updateRequest.headers = cachePolicy.revalidationHeaders(updateRequest);
-```
-
-#### `revalidatedPolicy(revalidationRequest, revalidationResponse)`
-
-Use this method to update the cache after receiving a new response from the origin server. It returns an object with two keys:
-
-* `policy` — A new `CachePolicy` with HTTP headers updated from `revalidationResponse`. You can always replace the old cached `CachePolicy` with the new one.
-* `modified` — Boolean indicating whether the response body has changed.
- * If `false`, then a valid 304 Not Modified response has been received, and you can reuse the old cached response body.
- * If `true`, you should use new response's body (if present), or make another request to the origin server without any conditional headers (i.e. don't use `revalidationHeaders()` this time) to get the new resource.
-
-```js
-// When serving requests from cache:
-const {oldPolicy, oldResponse} = letsPretendThisIsSomeCache.get(newRequest.url);
-
-if (!oldPolicy.satisfiesWithoutRevalidation(newRequest)) {
- // Change the request to ask the origin server if the cached response can be used
- newRequest.headers = oldPolicy.revalidationHeaders(newRequest);
-
- // Send request to the origin server. The server may respond with status 304
- const newResponse = await makeRequest(newResponse);
-
- // Create updated policy and combined response from the old and new data
- const {policy, modified} = oldPolicy.revalidatedPolicy(newRequest, newResponse);
- const response = modified ? newResponse : oldResponse;
-
- // Update the cache with the newer/fresher response
- letsPretendThisIsSomeCache.set(newRequest.url, {policy, response}, policy.timeToLive());
-
- // And proceed returning cached response as usual
- response.headers = policy.responseHeaders();
- return response;
-}
-```
-
-# Yo, FRESH
-
-![satisfiesWithoutRevalidation](fresh.jpg)
-
-## Used by
-
-* [ImageOptim API](https://imageoptim.com/api), [make-fetch-happen](https://github.com/zkat/make-fetch-happen), [cacheable-request](https://www.npmjs.com/package/cacheable-request), [npm/registry-fetch](https://github.com/npm/registry-fetch), [etc.](https://github.com/pornel/http-cache-semantics/network/dependents)
-
-## Implemented
-
-* `Cache-Control` response header with all the quirks.
-* `Expires` with check for bad clocks.
-* `Pragma` response header.
-* `Age` response header.
-* `Vary` response header.
-* Default cacheability of statuses and methods.
-* Requests for stale data.
-* Filtering of hop-by-hop headers.
-* Basic revalidation request
-
-## Unimplemented
-
-* Merging of range requests, If-Range (but correctly supports them as non-cacheable)
-* Revalidation of multiple representations
+++ /dev/null
-'use strict';
-// rfc7231 6.1
-
-function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-
-var statusCodeCacheableByDefault = [200, 203, 204, 206, 300, 301, 404, 405, 410, 414, 501];
-
-// This implementation does not understand partial responses (206)
-var understoodStatuses = [200, 203, 204, 300, 301, 302, 303, 307, 308, 404, 405, 410, 414, 501];
-
-var hopByHopHeaders = { 'connection': true, 'keep-alive': true, 'proxy-authenticate': true, 'proxy-authorization': true, 'te': true, 'trailer': true, 'transfer-encoding': true, 'upgrade': true };
-var excludedFromRevalidationUpdate = {
- // Since the old body is reused, it doesn't make sense to change properties of the body
- 'content-length': true, 'content-encoding': true, 'transfer-encoding': true,
- 'content-range': true
-};
-
-function parseCacheControl(header) {
- var cc = {};
- if (!header) return cc;
-
- // TODO: When there is more than one value present for a given directive (e.g., two Expires header fields, multiple Cache-Control: max-age directives),
- // the directive's value is considered invalid. Caches are encouraged to consider responses that have invalid freshness information to be stale
- var parts = header.trim().split(/\s*,\s*/); // TODO: lame parsing
- for (var _iterator = parts, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
- var _ref;
-
- if (_isArray) {
- if (_i >= _iterator.length) break;
- _ref = _iterator[_i++];
- } else {
- _i = _iterator.next();
- if (_i.done) break;
- _ref = _i.value;
- }
-
- var part = _ref;
-
- var _part$split = part.split(/\s*=\s*/, 2),
- k = _part$split[0],
- v = _part$split[1];
-
- cc[k] = v === undefined ? true : v.replace(/^"|"$/g, ''); // TODO: lame unquoting
- }
-
- return cc;
-}
-
-function formatCacheControl(cc) {
- var parts = [];
- for (var k in cc) {
- var v = cc[k];
- parts.push(v === true ? k : k + '=' + v);
- }
- if (!parts.length) {
- return undefined;
- }
- return parts.join(', ');
-}
-
-module.exports = function () {
- function CachePolicy(req, res) {
- var _ref2 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},
- shared = _ref2.shared,
- cacheHeuristic = _ref2.cacheHeuristic,
- immutableMinTimeToLive = _ref2.immutableMinTimeToLive,
- ignoreCargoCult = _ref2.ignoreCargoCult,
- _fromObject = _ref2._fromObject;
-
- _classCallCheck(this, CachePolicy);
-
- if (_fromObject) {
- this._fromObject(_fromObject);
- return;
- }
-
- if (!res || !res.headers) {
- throw Error("Response headers missing");
- }
- this._assertRequestHasHeaders(req);
-
- this._responseTime = this.now();
- this._isShared = shared !== false;
- this._cacheHeuristic = undefined !== cacheHeuristic ? cacheHeuristic : 0.1; // 10% matches IE
- this._immutableMinTtl = undefined !== immutableMinTimeToLive ? immutableMinTimeToLive : 24 * 3600 * 1000;
-
- this._status = 'status' in res ? res.status : 200;
- this._resHeaders = res.headers;
- this._rescc = parseCacheControl(res.headers['cache-control']);
- this._method = 'method' in req ? req.method : 'GET';
- this._url = req.url;
- this._host = req.headers.host;
- this._noAuthorization = !req.headers.authorization;
- this._reqHeaders = res.headers.vary ? req.headers : null; // Don't keep all request headers if they won't be used
- this._reqcc = parseCacheControl(req.headers['cache-control']);
-
- // Assume that if someone uses legacy, non-standard uncecessary options they don't understand caching,
- // so there's no point stricly adhering to the blindly copy&pasted directives.
- if (ignoreCargoCult && "pre-check" in this._rescc && "post-check" in this._rescc) {
- delete this._rescc['pre-check'];
- delete this._rescc['post-check'];
- delete this._rescc['no-cache'];
- delete this._rescc['no-store'];
- delete this._rescc['must-revalidate'];
- this._resHeaders = Object.assign({}, this._resHeaders, { 'cache-control': formatCacheControl(this._rescc) });
- delete this._resHeaders.expires;
- delete this._resHeaders.pragma;
- }
-
- // When the Cache-Control header field is not present in a request, caches MUST consider the no-cache request pragma-directive
- // as having the same effect as if "Cache-Control: no-cache" were present (see Section 5.2.1).
- if (!res.headers['cache-control'] && /no-cache/.test(res.headers.pragma)) {
- this._rescc['no-cache'] = true;
- }
- }
-
- CachePolicy.prototype.now = function now() {
- return Date.now();
- };
-
- CachePolicy.prototype.storable = function storable() {
- // The "no-store" request directive indicates that a cache MUST NOT store any part of either this request or any response to it.
- return !!(!this._reqcc['no-store'] && (
- // A cache MUST NOT store a response to any request, unless:
- // The request method is understood by the cache and defined as being cacheable, and
- 'GET' === this._method || 'HEAD' === this._method || 'POST' === this._method && this._hasExplicitExpiration()) &&
- // the response status code is understood by the cache, and
- understoodStatuses.indexOf(this._status) !== -1 &&
- // the "no-store" cache directive does not appear in request or response header fields, and
- !this._rescc['no-store'] && (
- // the "private" response directive does not appear in the response, if the cache is shared, and
- !this._isShared || !this._rescc.private) && (
- // the Authorization header field does not appear in the request, if the cache is shared,
- !this._isShared || this._noAuthorization || this._allowsStoringAuthenticated()) && (
- // the response either:
-
- // contains an Expires header field, or
- this._resHeaders.expires ||
- // contains a max-age response directive, or
- // contains a s-maxage response directive and the cache is shared, or
- // contains a public response directive.
- this._rescc.public || this._rescc['max-age'] || this._rescc['s-maxage'] ||
- // has a status code that is defined as cacheable by default
- statusCodeCacheableByDefault.indexOf(this._status) !== -1));
- };
-
- CachePolicy.prototype._hasExplicitExpiration = function _hasExplicitExpiration() {
- // 4.2.1 Calculating Freshness Lifetime
- return this._isShared && this._rescc['s-maxage'] || this._rescc['max-age'] || this._resHeaders.expires;
- };
-
- CachePolicy.prototype._assertRequestHasHeaders = function _assertRequestHasHeaders(req) {
- if (!req || !req.headers) {
- throw Error("Request headers missing");
- }
- };
-
- CachePolicy.prototype.satisfiesWithoutRevalidation = function satisfiesWithoutRevalidation(req) {
- this._assertRequestHasHeaders(req);
-
- // When presented with a request, a cache MUST NOT reuse a stored response, unless:
- // the presented request does not contain the no-cache pragma (Section 5.4), nor the no-cache cache directive,
- // unless the stored response is successfully validated (Section 4.3), and
- var requestCC = parseCacheControl(req.headers['cache-control']);
- if (requestCC['no-cache'] || /no-cache/.test(req.headers.pragma)) {
- return false;
- }
-
- if (requestCC['max-age'] && this.age() > requestCC['max-age']) {
- return false;
- }
-
- if (requestCC['min-fresh'] && this.timeToLive() < 1000 * requestCC['min-fresh']) {
- return false;
- }
-
- // the stored response is either:
- // fresh, or allowed to be served stale
- if (this.stale()) {
- var allowsStale = requestCC['max-stale'] && !this._rescc['must-revalidate'] && (true === requestCC['max-stale'] || requestCC['max-stale'] > this.age() - this.maxAge());
- if (!allowsStale) {
- return false;
- }
- }
-
- return this._requestMatches(req, false);
- };
-
- CachePolicy.prototype._requestMatches = function _requestMatches(req, allowHeadMethod) {
- // The presented effective request URI and that of the stored response match, and
- return (!this._url || this._url === req.url) && this._host === req.headers.host && (
- // the request method associated with the stored response allows it to be used for the presented request, and
- !req.method || this._method === req.method || allowHeadMethod && 'HEAD' === req.method) &&
- // selecting header fields nominated by the stored response (if any) match those presented, and
- this._varyMatches(req);
- };
-
- CachePolicy.prototype._allowsStoringAuthenticated = function _allowsStoringAuthenticated() {
- // following Cache-Control response directives (Section 5.2.2) have such an effect: must-revalidate, public, and s-maxage.
- return this._rescc['must-revalidate'] || this._rescc.public || this._rescc['s-maxage'];
- };
-
- CachePolicy.prototype._varyMatches = function _varyMatches(req) {
- if (!this._resHeaders.vary) {
- return true;
- }
-
- // A Vary header field-value of "*" always fails to match
- if (this._resHeaders.vary === '*') {
- return false;
- }
-
- var fields = this._resHeaders.vary.trim().toLowerCase().split(/\s*,\s*/);
- for (var _iterator2 = fields, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) {
- var _ref3;
-
- if (_isArray2) {
- if (_i2 >= _iterator2.length) break;
- _ref3 = _iterator2[_i2++];
- } else {
- _i2 = _iterator2.next();
- if (_i2.done) break;
- _ref3 = _i2.value;
- }
-
- var name = _ref3;
-
- if (req.headers[name] !== this._reqHeaders[name]) return false;
- }
- return true;
- };
-
- CachePolicy.prototype._copyWithoutHopByHopHeaders = function _copyWithoutHopByHopHeaders(inHeaders) {
- var headers = {};
- for (var name in inHeaders) {
- if (hopByHopHeaders[name]) continue;
- headers[name] = inHeaders[name];
- }
- // 9.1. Connection
- if (inHeaders.connection) {
- var tokens = inHeaders.connection.trim().split(/\s*,\s*/);
- for (var _iterator3 = tokens, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : _iterator3[Symbol.iterator]();;) {
- var _ref4;
-
- if (_isArray3) {
- if (_i3 >= _iterator3.length) break;
- _ref4 = _iterator3[_i3++];
- } else {
- _i3 = _iterator3.next();
- if (_i3.done) break;
- _ref4 = _i3.value;
- }
-
- var _name = _ref4;
-
- delete headers[_name];
- }
- }
- if (headers.warning) {
- var warnings = headers.warning.split(/,/).filter(function (warning) {
- return !/^\s*1[0-9][0-9]/.test(warning);
- });
- if (!warnings.length) {
- delete headers.warning;
- } else {
- headers.warning = warnings.join(',').trim();
- }
- }
- return headers;
- };
-
- CachePolicy.prototype.responseHeaders = function responseHeaders() {
- var headers = this._copyWithoutHopByHopHeaders(this._resHeaders);
- var age = this.age();
-
- // A cache SHOULD generate 113 warning if it heuristically chose a freshness
- // lifetime greater than 24 hours and the response's age is greater than 24 hours.
- if (age > 3600 * 24 && !this._hasExplicitExpiration() && this.maxAge() > 3600 * 24) {
- headers.warning = (headers.warning ? `${headers.warning}, ` : '') + '113 - "rfc7234 5.5.4"';
- }
- headers.age = `${Math.round(age)}`;
- return headers;
- };
-
- /**
- * Value of the Date response header or current time if Date was demed invalid
- * @return timestamp
- */
-
-
- CachePolicy.prototype.date = function date() {
- var dateValue = Date.parse(this._resHeaders.date);
- var maxClockDrift = 8 * 3600 * 1000;
- if (Number.isNaN(dateValue) || dateValue < this._responseTime - maxClockDrift || dateValue > this._responseTime + maxClockDrift) {
- return this._responseTime;
- }
- return dateValue;
- };
-
- /**
- * Value of the Age header, in seconds, updated for the current time.
- * May be fractional.
- *
- * @return Number
- */
-
-
- CachePolicy.prototype.age = function age() {
- var age = Math.max(0, (this._responseTime - this.date()) / 1000);
- if (this._resHeaders.age) {
- var ageValue = this._ageValue();
- if (ageValue > age) age = ageValue;
- }
-
- var residentTime = (this.now() - this._responseTime) / 1000;
- return age + residentTime;
- };
-
- CachePolicy.prototype._ageValue = function _ageValue() {
- var ageValue = parseInt(this._resHeaders.age);
- return isFinite(ageValue) ? ageValue : 0;
- };
-
- /**
- * Value of applicable max-age (or heuristic equivalent) in seconds. This counts since response's `Date`.
- *
- * For an up-to-date value, see `timeToLive()`.
- *
- * @return Number
- */
-
-
- CachePolicy.prototype.maxAge = function maxAge() {
- if (!this.storable() || this._rescc['no-cache']) {
- return 0;
- }
-
- // Shared responses with cookies are cacheable according to the RFC, but IMHO it'd be unwise to do so by default
- // so this implementation requires explicit opt-in via public header
- if (this._isShared && this._resHeaders['set-cookie'] && !this._rescc.public && !this._rescc.immutable) {
- return 0;
- }
-
- if (this._resHeaders.vary === '*') {
- return 0;
- }
-
- if (this._isShared) {
- if (this._rescc['proxy-revalidate']) {
- return 0;
- }
- // if a response includes the s-maxage directive, a shared cache recipient MUST ignore the Expires field.
- if (this._rescc['s-maxage']) {
- return parseInt(this._rescc['s-maxage'], 10);
- }
- }
-
- // If a response includes a Cache-Control field with the max-age directive, a recipient MUST ignore the Expires field.
- if (this._rescc['max-age']) {
- return parseInt(this._rescc['max-age'], 10);
- }
-
- var defaultMinTtl = this._rescc.immutable ? this._immutableMinTtl : 0;
-
- var dateValue = this.date();
- if (this._resHeaders.expires) {
- var expires = Date.parse(this._resHeaders.expires);
- // A cache recipient MUST interpret invalid date formats, especially the value "0", as representing a time in the past (i.e., "already expired").
- if (Number.isNaN(expires) || expires < dateValue) {
- return 0;
- }
- return Math.max(defaultMinTtl, (expires - dateValue) / 1000);
- }
-
- if (this._resHeaders['last-modified']) {
- var lastModified = Date.parse(this._resHeaders['last-modified']);
- if (isFinite(lastModified) && dateValue > lastModified) {
- return Math.max(defaultMinTtl, (dateValue - lastModified) / 1000 * this._cacheHeuristic);
- }
- }
-
- return defaultMinTtl;
- };
-
- CachePolicy.prototype.timeToLive = function timeToLive() {
- return Math.max(0, this.maxAge() - this.age()) * 1000;
- };
-
- CachePolicy.prototype.stale = function stale() {
- return this.maxAge() <= this.age();
- };
-
- CachePolicy.fromObject = function fromObject(obj) {
- return new this(undefined, undefined, { _fromObject: obj });
- };
-
- CachePolicy.prototype._fromObject = function _fromObject(obj) {
- if (this._responseTime) throw Error("Reinitialized");
- if (!obj || obj.v !== 1) throw Error("Invalid serialization");
-
- this._responseTime = obj.t;
- this._isShared = obj.sh;
- this._cacheHeuristic = obj.ch;
- this._immutableMinTtl = obj.imm !== undefined ? obj.imm : 24 * 3600 * 1000;
- this._status = obj.st;
- this._resHeaders = obj.resh;
- this._rescc = obj.rescc;
- this._method = obj.m;
- this._url = obj.u;
- this._host = obj.h;
- this._noAuthorization = obj.a;
- this._reqHeaders = obj.reqh;
- this._reqcc = obj.reqcc;
- };
-
- CachePolicy.prototype.toObject = function toObject() {
- return {
- v: 1,
- t: this._responseTime,
- sh: this._isShared,
- ch: this._cacheHeuristic,
- imm: this._immutableMinTtl,
- st: this._status,
- resh: this._resHeaders,
- rescc: this._rescc,
- m: this._method,
- u: this._url,
- h: this._host,
- a: this._noAuthorization,
- reqh: this._reqHeaders,
- reqcc: this._reqcc
- };
- };
-
- /**
- * Headers for sending to the origin server to revalidate stale response.
- * Allows server to return 304 to allow reuse of the previous response.
- *
- * Hop by hop headers are always stripped.
- * Revalidation headers may be added or removed, depending on request.
- */
-
-
- CachePolicy.prototype.revalidationHeaders = function revalidationHeaders(incomingReq) {
- this._assertRequestHasHeaders(incomingReq);
- var headers = this._copyWithoutHopByHopHeaders(incomingReq.headers);
-
- // This implementation does not understand range requests
- delete headers['if-range'];
-
- if (!this._requestMatches(incomingReq, true) || !this.storable()) {
- // revalidation allowed via HEAD
- // not for the same resource, or wasn't allowed to be cached anyway
- delete headers['if-none-match'];
- delete headers['if-modified-since'];
- return headers;
- }
-
- /* MUST send that entity-tag in any cache validation request (using If-Match or If-None-Match) if an entity-tag has been provided by the origin server. */
- if (this._resHeaders.etag) {
- headers['if-none-match'] = headers['if-none-match'] ? `${headers['if-none-match']}, ${this._resHeaders.etag}` : this._resHeaders.etag;
- }
-
- // Clients MAY issue simple (non-subrange) GET requests with either weak validators or strong validators. Clients MUST NOT use weak validators in other forms of request.
- var forbidsWeakValidators = headers['accept-ranges'] || headers['if-match'] || headers['if-unmodified-since'] || this._method && this._method != 'GET';
-
- /* SHOULD send the Last-Modified value in non-subrange cache validation requests (using If-Modified-Since) if only a Last-Modified value has been provided by the origin server.
- Note: This implementation does not understand partial responses (206) */
- if (forbidsWeakValidators) {
- delete headers['if-modified-since'];
-
- if (headers['if-none-match']) {
- var etags = headers['if-none-match'].split(/,/).filter(function (etag) {
- return !/^\s*W\//.test(etag);
- });
- if (!etags.length) {
- delete headers['if-none-match'];
- } else {
- headers['if-none-match'] = etags.join(',').trim();
- }
- }
- } else if (this._resHeaders['last-modified'] && !headers['if-modified-since']) {
- headers['if-modified-since'] = this._resHeaders['last-modified'];
- }
-
- return headers;
- };
-
- /**
- * Creates new CachePolicy with information combined from the previews response,
- * and the new revalidation response.
- *
- * Returns {policy, modified} where modified is a boolean indicating
- * whether the response body has been modified, and old cached body can't be used.
- *
- * @return {Object} {policy: CachePolicy, modified: Boolean}
- */
-
-
- CachePolicy.prototype.revalidatedPolicy = function revalidatedPolicy(request, response) {
- this._assertRequestHasHeaders(request);
- if (!response || !response.headers) {
- throw Error("Response headers missing");
- }
-
- // These aren't going to be supported exactly, since one CachePolicy object
- // doesn't know about all the other cached objects.
- var matches = false;
- if (response.status !== undefined && response.status != 304) {
- matches = false;
- } else if (response.headers.etag && !/^\s*W\//.test(response.headers.etag)) {
- // "All of the stored responses with the same strong validator are selected.
- // If none of the stored responses contain the same strong validator,
- // then the cache MUST NOT use the new response to update any stored responses."
- matches = this._resHeaders.etag && this._resHeaders.etag.replace(/^\s*W\//, '') === response.headers.etag;
- } else if (this._resHeaders.etag && response.headers.etag) {
- // "If the new response contains a weak validator and that validator corresponds
- // to one of the cache's stored responses,
- // then the most recent of those matching stored responses is selected for update."
- matches = this._resHeaders.etag.replace(/^\s*W\//, '') === response.headers.etag.replace(/^\s*W\//, '');
- } else if (this._resHeaders['last-modified']) {
- matches = this._resHeaders['last-modified'] === response.headers['last-modified'];
- } else {
- // If the new response does not include any form of validator (such as in the case where
- // a client generates an If-Modified-Since request from a source other than the Last-Modified
- // response header field), and there is only one stored response, and that stored response also
- // lacks a validator, then that stored response is selected for update.
- if (!this._resHeaders.etag && !this._resHeaders['last-modified'] && !response.headers.etag && !response.headers['last-modified']) {
- matches = true;
- }
- }
-
- if (!matches) {
- return {
- policy: new this.constructor(request, response),
- modified: true
- };
- }
-
- // use other header fields provided in the 304 (Not Modified) response to replace all instances
- // of the corresponding header fields in the stored response.
- var headers = {};
- for (var k in this._resHeaders) {
- headers[k] = k in response.headers && !excludedFromRevalidationUpdate[k] ? response.headers[k] : this._resHeaders[k];
- }
-
- var newResponse = Object.assign({}, response, {
- status: this._status,
- method: this._method,
- headers
- });
- return {
- policy: new this.constructor(request, newResponse),
- modified: false
- };
- };
-
- return CachePolicy;
-}();
\ No newline at end of file
+++ /dev/null
-{
- "name": "http-cache-semantics",
- "version": "3.8.1",
- "description": "Parses Cache-Control and other headers. Helps building correct HTTP caches and proxies",
- "repository": "https://github.com/pornel/http-cache-semantics.git",
- "main": "node4/index.js",
- "scripts": {
- "compile": "babel -d node4/ index.js; babel -d node4/test test",
- "prepublish": "npm run compile",
- "test": "npm run compile; mocha node4/test"
- },
- "files": [
- "node4/index.js"
- ],
- "author": "Kornel Lesiński <kornel@geekhood.net> (https://kornel.ski/)",
- "license": "BSD-2-Clause",
- "devDependencies": {
- "babel-cli": "^6.24.1",
- "babel-preset-env": "^1.6.1",
- "mocha": "^3.4.2"
- }
-}
+++ /dev/null
-The ISC License
-
-Copyright (c) Isaac Z. Schlueter
-
-Permission to use, copy, modify, and/or distribute this software for any
-purpose with or without fee is hereby granted, provided that the above
-copyright notice and this permission notice appear in all copies.
-
-THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
-REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
-FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
-INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
-LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
-OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
-PERFORMANCE OF THIS SOFTWARE.
-
+++ /dev/null
-Browser-friendly inheritance fully compatible with standard node.js
-[inherits](http://nodejs.org/api/util.html#util_util_inherits_constructor_superconstructor).
-
-This package exports standard `inherits` from node.js `util` module in
-node environment, but also provides alternative browser-friendly
-implementation through [browser
-field](https://gist.github.com/shtylman/4339901). Alternative
-implementation is a literal copy of standard one located in standalone
-module to avoid requiring of `util`. It also has a shim for old
-browsers with no `Object.create` support.
-
-While keeping you sure you are using standard `inherits`
-implementation in node.js environment, it allows bundlers such as
-[browserify](https://github.com/substack/node-browserify) to not
-include full `util` package to your client code if all you need is
-just `inherits` function. It worth, because browser shim for `util`
-package is large and `inherits` is often the single function you need
-from it.
-
-It's recommended to use this package instead of
-`require('util').inherits` for any code that has chances to be used
-not only in node.js but in browser too.
-
-## usage
-
-```js
-var inherits = require('inherits');
-// then use exactly as the standard one
-```
-
-## note on version ~1.0
-
-Version ~1.0 had completely different motivation and is not compatible
-neither with 2.0 nor with standard node.js `inherits`.
-
-If you are using version ~1.0 and planning to switch to ~2.0, be
-careful:
-
-* new version uses `super_` instead of `super` for referencing
- superclass
-* new version overwrites current prototype while old one preserves any
- existing fields on it
+++ /dev/null
-try {
- var util = require('util');
- if (typeof util.inherits !== 'function') throw '';
- module.exports = util.inherits;
-} catch (e) {
- module.exports = require('./inherits_browser.js');
-}
+++ /dev/null
-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
- }
-}
+++ /dev/null
-{
- "name": "inherits",
- "description": "Browser-friendly inheritance fully compatible with standard node.js inherits()",
- "version": "2.0.3",
- "keywords": [
- "inheritance",
- "class",
- "klass",
- "oop",
- "object-oriented",
- "inherits",
- "browser",
- "browserify"
- ],
- "main": "./inherits.js",
- "browser": "./inherits_browser.js",
- "repository": "git://github.com/isaacs/inherits",
- "license": "ISC",
- "scripts": {
- "test": "node test"
- },
- "devDependencies": {
- "tap": "^7.1.0"
- },
- "files": [
- "inherits.js",
- "inherits_browser.js"
- ]
-}
+++ /dev/null
-'use strict';
-const from = require('from2');
-const pIsPromise = require('p-is-promise');
-
-module.exports = x => {
- if (Array.isArray(x)) {
- x = x.slice();
- }
-
- let promise;
- let iterator;
-
- prepare(x);
-
- function prepare(value) {
- x = value;
- promise = pIsPromise(x) ? x : null;
- // we don't iterate on strings and buffers since slicing them is ~7x faster
- const shouldIterate = !promise && x[Symbol.iterator] && typeof x !== 'string' && !Buffer.isBuffer(x);
- iterator = shouldIterate ? x[Symbol.iterator]() : null;
- }
-
- return from(function reader(size, cb) {
- if (promise) {
- promise.then(prepare).then(() => reader.call(this, size, cb), cb);
- return;
- }
-
- if (iterator) {
- const obj = iterator.next();
- setImmediate(cb, null, obj.done ? null : obj.value);
- return;
- }
-
- if (x.length === 0) {
- setImmediate(cb, null, null);
- return;
- }
-
- const chunk = x.slice(0, size);
- x = x.slice(size);
-
- setImmediate(cb, null, chunk);
- });
-};
-
-module.exports.obj = x => {
- if (Array.isArray(x)) {
- x = x.slice();
- }
-
- let promise;
- let iterator;
-
- prepare(x);
-
- function prepare(value) {
- x = value;
- promise = pIsPromise(x) ? x : null;
- iterator = !promise && x[Symbol.iterator] ? x[Symbol.iterator]() : null;
- }
-
- return from.obj(function reader(size, cb) {
- if (promise) {
- promise.then(prepare).then(() => reader.call(this, size, cb), cb);
- return;
- }
-
- if (iterator) {
- const obj = iterator.next();
- setImmediate(cb, null, obj.done ? null : obj.value);
- return;
- }
-
- this.push(x);
-
- setImmediate(cb, null, null);
- });
-};
+++ /dev/null
-The MIT License (MIT)
-
-Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
-
-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.
+++ /dev/null
-{
- "name": "into-stream",
- "version": "3.1.0",
- "description": "Convert a buffer/string/array/object/iterable/promise into a stream",
- "license": "MIT",
- "repository": "sindresorhus/into-stream",
- "author": {
- "name": "Sindre Sorhus",
- "email": "sindresorhus@gmail.com",
- "url": "sindresorhus.com"
- },
- "engines": {
- "node": ">=4"
- },
- "scripts": {
- "test": "xo && ava"
- },
- "files": [
- "index.js"
- ],
- "keywords": [
- "stream",
- "buffer",
- "string",
- "object",
- "array",
- "iterable",
- "promise",
- "promises",
- "from",
- "into",
- "to",
- "transform",
- "convert",
- "readable",
- "pull",
- "gulpfriendly",
- "value",
- "str"
- ],
- "dependencies": {
- "from2": "^2.1.1",
- "p-is-promise": "^1.1.0"
- },
- "devDependencies": {
- "ava": "*",
- "get-stream": "^3.0.0",
- "xo": "*"
- }
-}
+++ /dev/null
-# into-stream [![Build Status](https://travis-ci.org/sindresorhus/into-stream.svg?branch=master)](https://travis-ci.org/sindresorhus/into-stream)
-
-> Convert a buffer/string/array/object/iterable/promise into a stream
-
-Correctly chunks up the input and handles backpressure.
-
-
-## Install
-
-```
-$ npm install --save into-stream
-```
-
-
-## Usage
-
-```js
-const intoStream = require('into-stream');
-
-intoStream('unicorn').pipe(process.stdout);
-//=> 'unicorn'
-```
-
-
-## API
-
-### intoStream(input)
-
-Type: `Buffer` `string` `Iterable<Buffer|string>` `Promise`<br>
-Returns: [Readable stream](https://nodejs.org/api/stream.html#stream_class_stream_readable)
-
-Adheres to the requested chunk size, except for `array` where each element will be a chunk.
-
-### intoStream.obj(input)
-
-Type: `Object`, `Iterable<Object>` `Promise`<br>
-Returns: [Readable object stream](https://nodejs.org/api/stream.html#stream_object_mode)
-
-
-## License
-
-MIT © [Sindre Sorhus](https://sindresorhus.com)
+++ /dev/null
-{
- "requireCurlyBraces": ["if", "else", "for", "while", "do", "try", "catch"],
-
- "requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch", "return", "try", "catch", "function"],
-
- "disallowSpaceAfterKeywords": [],
-
- "requireSpacesInAnonymousFunctionExpression": { "beforeOpeningRoundBrace": true, "beforeOpeningCurlyBrace": true },
- "requireSpacesInNamedFunctionExpression": { "beforeOpeningCurlyBrace": true },
- "disallowSpacesInNamedFunctionExpression": { "beforeOpeningRoundBrace": true },
- "requireSpacesInFunctionDeclaration": { "beforeOpeningCurlyBrace": true },
- "disallowSpacesInFunctionDeclaration": { "beforeOpeningRoundBrace": true },
-
- "disallowSpacesInsideParentheses": true,
-
- "disallowSpacesInsideArrayBrackets": true,
-
- "disallowQuotedKeysInObjects": "allButReserved",
-
- "disallowSpaceAfterObjectKeys": true,
-
- "requireCommaBeforeLineBreak": true,
-
- "disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~", "!"],
- "requireSpaceAfterPrefixUnaryOperators": [],
-
- "disallowSpaceBeforePostfixUnaryOperators": ["++", "--"],
- "requireSpaceBeforePostfixUnaryOperators": [],
-
- "disallowSpaceBeforeBinaryOperators": [],
- "requireSpaceBeforeBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="],
-
- "requireSpaceAfterBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="],
- "disallowSpaceAfterBinaryOperators": [],
-
- "disallowImplicitTypeConversion": ["binary", "string"],
-
- "disallowKeywords": ["with", "eval"],
-
- "validateLineBreaks": "LF",
-
- "requireKeywordsOnNewLine": [],
- "disallowKeywordsOnNewLine": ["else"],
-
- "requireLineFeedAtFileEnd": true,
-
- "disallowTrailingWhitespace": true,
-
- "excludeFiles": ["node_modules/**", "vendor/**"],
-
- "disallowMultipleLineStrings": true,
-
- "additionalRules": []
-}
-
+++ /dev/null
-.DS_Store
-.monitor
-.*.swp
-.nodemonignore
-releases
-*.log
-*.err
-fleet.json
-public/browserify
-bin/*.json
-.bin
-build
-compile
-.lock-wscript
-node_modules
+++ /dev/null
-{
- "launchers": {
- "node": {
- "command": "node ./test"
- }
- },
- "src_files": [
- "./**/*.js"
- ],
- "before_tests": "npm run build",
- "on_exit": "rm test/static/bundle.js",
- "test_page": "test/static/index.html",
- "launch_in_dev": ["node", "phantomjs"]
-}
+++ /dev/null
-language: node_js
-node_js:
- - "0.11"
- - "0.10"
- - "0.9"
- - "0.8"
- - "0.6"
- - "0.4"
-before_install:
- - '[ "${TRAVIS_NODE_VERSION}" == "0.6" ] || npm install -g npm@~1.4.6'
-matrix:
- fast_finish: true
- allow_failures:
- - node_js: "0.11"
- - node_js: "0.9"
- - node_js: "0.6"
- - node_js: "0.4"
-
+++ /dev/null
-Copyright (c) 2013 Colingo.
-
-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.
+++ /dev/null
-# is-object <sup>[![Version Badge][12]][11]</sup>
-
-[![build status][1]][2]
-[![dependency status][3]][4]
-[![dev dependency status][9]][10]
-[![License][license-image]][license-url]
-[![Downloads][downloads-image]][downloads-url]
-
-[![npm badge][13]][11]
-
-[![browser support][5]][6]
-
-Checks whether a value is an object
-
-Because `typeof null` is a troll.
-
-## Example
-
-```js
-var isObject = require('is-object');
-var assert = require('assert');
-
-assert.equal(isObject(null), false);
-assert.equal(isObject({}), true);
-```
-
-## Installation
-
-`npm install is-object`
-
-## Contributors
-
- - [Raynos][7]
- - [Jordan Harband][8]
-
-## MIT Licensed
-
- [1]: https://secure.travis-ci.org/ljharb/is-object.svg
- [2]: http://travis-ci.org/ljharb/is-object
- [3]: http://david-dm.org/ljharb/is-object/status.svg
- [4]: http://david-dm.org/ljharb/is-object
- [5]: http://ci.testling.com/ljharb/is-object.svg
- [6]: http://ci.testling.com/ljharb/is-object
- [7]: https://github.com/Raynos
- [8]: https://github.com/ljharb
- [9]: https://david-dm.org/ljharb/is-object/dev-status.svg
- [10]: https://david-dm.org/ljharb/is-object#info=devDependencies
- [11]: https://npmjs.org/package/is-object
- [12]: http://vb.teelaun.ch/ljharb/is-object.svg
- [13]: https://nodei.co/npm/is-object.png?downloads=true&stars=true
-[license-image]: http://img.shields.io/npm/l/is-object.svg
-[license-url]: LICENSE
-[downloads-image]: http://img.shields.io/npm/dm/is-object.svg
-[downloads-url]: http://npm-stat.com/charts.html?package=is-object
-
+++ /dev/null
-"use strict";
-
-module.exports = function isObject(x) {
- return typeof x === "object" && x !== null;
-};
+++ /dev/null
-{
- "name": "is-object",
- "version": "1.0.1",
- "description": "Checks whether a value is an object",
- "keywords": [],
- "author": "Raynos <raynos2@gmail.com>",
- "repository": "git://github.com/ljharb/is-object.git",
- "main": "index",
- "homepage": "https://github.com/ljharb/is-object",
- "contributors": [
- {
- "name": "Raynos"
- },
- {
- "name": "Jordan Harband",
- "url": "https://github.com/ljharb"
- }
- ],
- "bugs": {
- "url": "https://github.com/ljharb/is-object/issues",
- "email": "ljharb@gmail.com"
- },
- "dependencies": {},
- "devDependencies": {
- "tape": "~2.14.0",
- "covert": "~1.0.0",
- "jscs": "~1.6.0"
- },
- "license": "MIT",
- "licenses": [
- {
- "type": "MIT",
- "url": "http://github.com/ljharb/is-object/raw/master/LICENSE"
- }
- ],
- "scripts": {
- "test": "npm run lint && node test/index.js && npm run coverage-quiet",
- "coverage": "covert test/index.js",
- "coverage-quiet": "covert test/index.js --quiet",
- "lint": "jscs *.js */*.js"
- },
- "testling": {
- "files": "test/index.js",
- "browsers": [
- "ie/6..latest",
- "firefox/3..6",
- "firefox/16..latest",
- "firefox/nightly",
- "chrome/22..latest",
- "chrome/canary",
- "opera/10.0",
- "opera/11..latest",
- "opera/next",
- "safari/4..latest",
- "ipad/6.0..latest",
- "iphone/6.0..latest"
- ]
- }
-}
+++ /dev/null
-var test = require('tape');
-
-var isObject = require('../index');
-
-test('returns true for objects', function (assert) {
- assert.equal(isObject({}), true);
- assert.equal(isObject([]), true);
-
- assert.end();
-});
-
-test('returns false for null', function (assert) {
- assert.equal(isObject(null), false);
-
- assert.end();
-});
-
-test('returns false for primitives', function (assert) {
- assert.equal(isObject(42), false);
- assert.equal(isObject('foo'), false);
-
- assert.end();
-});
+++ /dev/null
-'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({}));
-};
+++ /dev/null
-The MIT License (MIT)
-
-Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
-
-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.
+++ /dev/null
-{
- "name": "is-plain-obj",
- "version": "1.1.0",
- "description": "Check if a value is a plain object",
- "license": "MIT",
- "repository": "sindresorhus/is-plain-obj",
- "author": {
- "name": "Sindre Sorhus",
- "email": "sindresorhus@gmail.com",
- "url": "sindresorhus.com"
- },
- "engines": {
- "node": ">=0.10.0"
- },
- "scripts": {
- "test": "node test.js"
- },
- "files": [
- "index.js"
- ],
- "keywords": [
- "obj",
- "object",
- "is",
- "check",
- "test",
- "type",
- "plain",
- "vanilla",
- "pure",
- "simple"
- ],
- "devDependencies": {
- "ava": "0.0.4"
- }
-}
+++ /dev/null
-# is-plain-obj [![Build Status](https://travis-ci.org/sindresorhus/is-plain-obj.svg?branch=master)](https://travis-ci.org/sindresorhus/is-plain-obj)
-
-> Check if a value is a plain object
-
-An object is plain if it's created by either `{}`, `new Object()` or `Object.create(null)`.
-
-
-## Install
-
-```
-$ npm install --save is-plain-obj
-```
-
-
-## Usage
-
-```js
-var isPlainObj = require('is-plain-obj');
-
-isPlainObj({foo: 'bar'});
-//=> true
-
-isPlainObj([1, 2, 3]);
-//=> false
-```
-
-
-## Related
-
-- [is-obj](https://github.com/sindresorhus/is-obj) - Check if a value is an object
-
-
-## License
-
-MIT © [Sindre Sorhus](http://sindresorhus.com)
+++ /dev/null
-'use strict';
-
-var WHITELIST = [
- 'ETIMEDOUT',
- 'ECONNRESET',
- 'EADDRINUSE',
- 'ESOCKETTIMEDOUT',
- 'ECONNREFUSED',
- 'EPIPE'
-];
-
-var BLACKLIST = [
- 'ENOTFOUND',
- 'ENETUNREACH',
-
- // SSL errors from https://github.com/nodejs/node/blob/ed3d8b13ee9a705d89f9e0397d9e96519e7e47ac/src/node_crypto.cc#L1950
- 'UNABLE_TO_GET_ISSUER_CERT',
- 'UNABLE_TO_GET_CRL',
- 'UNABLE_TO_DECRYPT_CERT_SIGNATURE',
- 'UNABLE_TO_DECRYPT_CRL_SIGNATURE',
- 'UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY',
- 'CERT_SIGNATURE_FAILURE',
- 'CRL_SIGNATURE_FAILURE',
- 'CERT_NOT_YET_VALID',
- 'CERT_HAS_EXPIRED',
- 'CRL_NOT_YET_VALID',
- 'CRL_HAS_EXPIRED',
- 'ERROR_IN_CERT_NOT_BEFORE_FIELD',
- 'ERROR_IN_CERT_NOT_AFTER_FIELD',
- 'ERROR_IN_CRL_LAST_UPDATE_FIELD',
- 'ERROR_IN_CRL_NEXT_UPDATE_FIELD',
- 'OUT_OF_MEM',
- 'DEPTH_ZERO_SELF_SIGNED_CERT',
- 'SELF_SIGNED_CERT_IN_CHAIN',
- 'UNABLE_TO_GET_ISSUER_CERT_LOCALLY',
- 'UNABLE_TO_VERIFY_LEAF_SIGNATURE',
- 'CERT_CHAIN_TOO_LONG',
- 'CERT_REVOKED',
- 'INVALID_CA',
- 'PATH_LENGTH_EXCEEDED',
- 'INVALID_PURPOSE',
- 'CERT_UNTRUSTED',
- 'CERT_REJECTED'
-];
-
-module.exports = function (err) {
- if (!err || !err.code) {
- return true;
- }
-
- if (WHITELIST.indexOf(err.code) !== -1) {
- return true;
- }
-
- if (BLACKLIST.indexOf(err.code) !== -1) {
- return false;
- }
-
- return true;
-};
+++ /dev/null
-The MIT License (MIT)
-
-Copyright (c) Vsevolod Strukchinsky <floatdrop@gmail.com> (github.com/floatdrop)
-
-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.
+++ /dev/null
-{
- "name": "is-retry-allowed",
- "version": "1.1.0",
- "description": "My prime module",
- "license": "MIT",
- "repository": "floatdrop/is-retry-allowed",
- "author": {
- "name": "Vsevolod Strukchinsky",
- "email": "floatdrop@gmail.com",
- "url": "github.com/floatdrop"
- },
- "engines": {
- "node": ">=0.10.0"
- },
- "scripts": {
- "test": "xo && ava"
- },
- "files": [
- "index.js"
- ],
- "keywords": [
- ""
- ],
- "dependencies": {},
- "devDependencies": {
- "ava": "^0.8.0",
- "xo": "^0.12.1"
- }
-}
+++ /dev/null
-# is-retry-allowed [![Build Status](https://travis-ci.org/floatdrop/is-retry-allowed.svg?branch=master)](https://travis-ci.org/floatdrop/is-retry-allowed)
-
-Is retry allowed for Error?
-
-
-## Install
-
-```
-$ npm install --save is-retry-allowed
-```
-
-
-## Usage
-
-```js
-const isRetryAllowed = require('is-retry-allowed');
-
-isRetryAllowed({code: 'ETIMEDOUT'});
-//=> true
-
-isRetryAllowed({code: 'ENOTFOUND'});
-//=> false
-
-isRetryAllowed({});
-//=> true
-```
-
-
-## API
-
-### isRetryAllowed(error)
-
-#### error
-
-Type: `object`
-
-Object with `code` property, which will be used to determine retry.
-
-
-## License
-
-MIT © [Vsevolod Strukchinsky](http://github.com/floatdrop)
+++ /dev/null
-node_modules
+++ /dev/null
-language: node_js
-node_js:
- - "0.8"
- - "0.10"
+++ /dev/null
-
-test:
- @node_modules/.bin/tape test.js
-
-.PHONY: test
-
+++ /dev/null
-
-# isarray
-
-`Array#isArray` for older browsers.
-
-[![build status](https://secure.travis-ci.org/juliangruber/isarray.svg)](http://travis-ci.org/juliangruber/isarray)
-[![downloads](https://img.shields.io/npm/dm/isarray.svg)](https://www.npmjs.org/package/isarray)
-
-[![browser support](https://ci.testling.com/juliangruber/isarray.png)
-](https://ci.testling.com/juliangruber/isarray)
-
-## Usage
-
-```js
-var isArray = require('isarray');
-
-console.log(isArray([])); // => true
-console.log(isArray({})); // => false
-```
-
-## Installation
-
-With [npm](http://npmjs.org) do
-
-```bash
-$ npm install isarray
-```
-
-Then bundle for the browser with
-[browserify](https://github.com/substack/browserify).
-
-With [component](http://component.io) do
-
-```bash
-$ component install juliangruber/isarray
-```
-
-## License
-
-(MIT)
-
-Copyright (c) 2013 Julian Gruber <julian@juliangruber.com>
-
-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.
+++ /dev/null
-{
- "name" : "isarray",
- "description" : "Array#isArray for older browsers",
- "version" : "0.0.1",
- "repository" : "juliangruber/isarray",
- "homepage": "https://github.com/juliangruber/isarray",
- "main" : "index.js",
- "scripts" : [
- "index.js"
- ],
- "dependencies" : {},
- "keywords": ["browser","isarray","array"],
- "author": {
- "name": "Julian Gruber",
- "email": "mail@juliangruber.com",
- "url": "http://juliangruber.com"
- },
- "license": "MIT"
-}
+++ /dev/null
-var toString = {}.toString;
-
-module.exports = Array.isArray || function (arr) {
- return toString.call(arr) == '[object Array]';
-};
+++ /dev/null
-{
- "name": "isarray",
- "description": "Array#isArray for older browsers",
- "version": "1.0.0",
- "repository": {
- "type": "git",
- "url": "git://github.com/juliangruber/isarray.git"
- },
- "homepage": "https://github.com/juliangruber/isarray",
- "main": "index.js",
- "dependencies": {},
- "devDependencies": {
- "tape": "~2.13.4"
- },
- "keywords": [
- "browser",
- "isarray",
- "array"
- ],
- "author": {
- "name": "Julian Gruber",
- "email": "mail@juliangruber.com",
- "url": "http://juliangruber.com"
- },
- "license": "MIT",
- "testling": {
- "files": "test.js",
- "browsers": [
- "ie/8..latest",
- "firefox/17..latest",
- "firefox/nightly",
- "chrome/22..latest",
- "chrome/canary",
- "opera/12..latest",
- "opera/next",
- "safari/5.1..latest",
- "ipad/6.0..latest",
- "iphone/6.0..latest",
- "android-browser/4.2..latest"
- ]
- },
- "scripts": {
- "test": "tape test.js"
- }
-}
+++ /dev/null
-var isArray = require('./');
-var test = require('tape');
-
-test('is array', function(t){
- t.ok(isArray([]));
- t.notOk(isArray({}));
- t.notOk(isArray(null));
- t.notOk(isArray(false));
-
- var obj = {};
- obj[0] = true;
- t.notOk(isArray(obj));
-
- var arr = [];
- arr.foo = 'bar';
- t.ok(isArray(arr));
-
- t.end();
-});
-
+++ /dev/null
-MIT License
-
-Copyright (c) 2017 Steven Vachon
-
-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.
+++ /dev/null
-# isurl [![NPM Version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url]
-
-> Checks whether a value is a WHATWG [`URL`](https://developer.mozilla.org/en/docs/Web/API/URL).
-
-
-Works cross-realm/iframe and despite @@toStringTag.
-
-
-## Installation
-
-[Node.js](http://nodejs.org/) `>= 4` is required. To install, type this at the command line:
-```shell
-npm install isurl
-```
-
-
-## Usage
-
-```js
-const isURL = require('isurl');
-
-isURL('http://domain/'); //-> false
-isURL(new URL('http://domain/')); //-> true
-```
-
-Optionally, acceptance can be extended to incomplete `URL` implementations that lack `searchParams` (which are common in many modern web browsers):
-```js
-const url = new URL('http://domain/?query');
-
-console.log(url.searchParams); //-> undefined
-
-isURL.lenient(url); //-> true
-```
-
-
-[npm-image]: https://img.shields.io/npm/v/isurl.svg
-[npm-url]: https://npmjs.org/package/isurl
-[travis-image]: https://img.shields.io/travis/stevenvachon/isurl.svg
-[travis-url]: https://travis-ci.org/stevenvachon/isurl
+++ /dev/null
-"use strict";
-const hasToStringTag = require("has-to-string-tag-x");
-const isObject = require("is-object");
-
-const toString = Object.prototype.toString;
-const urlClass = "[object URL]";
-
-const hash = "hash";
-const host = "host";
-const hostname = "hostname";
-const href = "href";
-const password = "password";
-const pathname = "pathname";
-const port = "port";
-const protocol = "protocol";
-const search = "search";
-const username = "username";
-
-
-
-const isURL = (url, supportIncomplete/*=false*/) =>
-{
- if (!isObject(url)) return false;
-
- // Native implementation in older browsers
- if (!hasToStringTag && toString.call(url) === urlClass) return true;
-
- if (!(href in url)) return false;
- if (!(protocol in url)) return false;
- if (!(username in url)) return false;
- if (!(password in url)) return false;
- if (!(hostname in url)) return false;
- if (!(port in url)) return false;
- if (!(host in url)) return false;
- if (!(pathname in url)) return false;
- if (!(search in url)) return false;
- if (!(hash in url)) return false;
-
- if (supportIncomplete !== true)
- {
- if (!isObject(url.searchParams)) return false;
-
- // TODO :: write a separate isURLSearchParams ?
- }
-
- return true;
-}
-
-
-
-isURL.lenient = url =>
-{
- return isURL(url, true);
-};
-
-
-
-module.exports = isURL;
+++ /dev/null
-{
- "name": "isurl",
- "description": "Checks whether a value is a WHATWG URL.",
- "version": "1.0.0",
- "license": "MIT",
- "author": "Steven Vachon <contact@svachon.com> (https://www.svachon.com/)",
- "repository": "stevenvachon/isurl",
- "dependencies": {
- "has-to-string-tag-x": "^1.2.0",
- "is-object": "^1.0.1"
- },
- "devDependencies": {
- "chai": "^4.0.2",
- "mocha": "^3.4.2",
- "semver": "^5.3.0",
- "universal-url": "^1.0.0"
- },
- "engines": {
- "node": ">= 4"
- },
- "scripts": {
- "test": "mocha test --check-leaks --bail"
- },
- "files": [
- "index.js"
- ],
- "keywords": [
- "uri",
- "url",
- "whatwg"
- ]
-}
+++ /dev/null
-node_modules
-node_modules/*
-npm_debug.log
+++ /dev/null
-language: node_js
-node_js:
- - '0.10'
+++ /dev/null
-Copyright (c) 2013 Dominic Tarr
-
-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.
+++ /dev/null
-# json-buffer
-
-JSON functions that can convert buffers!
-
-[![build status](https://secure.travis-ci.org/dominictarr/json-buffer.png)](http://travis-ci.org/dominictarr/json-buffer)
-
-[![testling badge](https://ci.testling.com/dominictarr/json-buffer.png)](https://ci.testling.com/dominictarr/json-buffer)
-
-JSON mangles buffers by converting to an array...
-which isn't helpful. json-buffers converts to base64 instead,
-and deconverts base64 to a buffer.
-
-``` js
-var JSONB = require('json-buffer')
-var Buffer = require('buffer').Buffer
-
-var str = JSONB.stringify(new Buffer('hello there!'))
-
-console.log(JSONB.parse(str)) //GET a BUFFER back
-```
-
-## License
-
-MIT
+++ /dev/null
-//TODO: handle reviver/dehydrate function like normal
-//and handle indentation, like normal.
-//if anyone needs this... please send pull request.
-
-exports.stringify = function stringify (o) {
- if('undefined' == typeof o) return o
-
- if(o && Buffer.isBuffer(o))
- return JSON.stringify(':base64:' + o.toString('base64'))
-
- if(o && o.toJSON)
- o = o.toJSON()
-
- if(o && 'object' === typeof o) {
- var s = ''
- var array = Array.isArray(o)
- s = array ? '[' : '{'
- var first = true
-
- for(var k in o) {
- var ignore = 'function' == typeof o[k] || (!array && 'undefined' === typeof o[k])
- if(Object.hasOwnProperty.call(o, k) && !ignore) {
- if(!first)
- s += ','
- first = false
- if (array) {
- if(o[k] == undefined)
- s += 'null'
- else
- s += stringify(o[k])
- } else if (o[k] !== void(0)) {
- s += stringify(k) + ':' + stringify(o[k])
- }
- }
- }
-
- s += array ? ']' : '}'
-
- return s
- } else if ('string' === typeof o) {
- return JSON.stringify(/^:/.test(o) ? ':' + o : o)
- } else if ('undefined' === typeof o) {
- return 'null';
- } else
- return JSON.stringify(o)
-}
-
-exports.parse = function (s) {
- return JSON.parse(s, function (key, value) {
- if('string' === typeof value) {
- if(/^:base64:/.test(value))
- return new Buffer(value.substring(8), 'base64')
- else
- return /^:/.test(value) ? value.substring(1) : value
- }
- return value
- })
-}
+++ /dev/null
-{
- "name": "json-buffer",
- "description": "JSON parse & stringify that supports binary via bops & base64",
- "version": "3.0.0",
- "homepage": "https://github.com/dominictarr/json-buffer",
- "repository": {
- "type": "git",
- "url": "git://github.com/dominictarr/json-buffer.git"
- },
- "devDependencies": {
- "tape": "^4.6.3"
- },
- "scripts": {
- "test": "set -e; for t in test/*.js; do node $t; done"
- },
- "author": "Dominic Tarr <dominic.tarr@gmail.com> (http://dominictarr.com)",
- "license": "MIT",
- "testling": {
- "files": "test/*.js",
- "browsers": [
- "ie/8..latest",
- "firefox/17..latest",
- "firefox/nightly",
- "chrome/22..latest",
- "chrome/canary",
- "opera/12..latest",
- "opera/next",
- "safari/5.1..latest",
- "ipad/6.0..latest",
- "iphone/6.0..latest",
- "android-browser/4.2..latest"
- ]
- }
-}
+++ /dev/null
-
-var test = require('tape')
-var _JSON = require('../')
-
-function clone (o) {
- return JSON.parse(JSON.stringify(o))
-}
-
-var examples = {
- simple: { foo: [], bar: {}, baz: new Buffer('some binary data') },
- just_buffer: new Buffer('JUST A BUFFER'),
- all_types: {
- string:'hello',
- number: 3145,
- null: null,
- object: {},
- array: [],
- boolean: true,
- boolean2: false
- },
- foo: new Buffer('foo'),
- foo2: new Buffer('foo2'),
- escape: {
- buffer: new Buffer('x'),
- string: _JSON.stringify(new Buffer('x'))
- },
- escape2: {
- buffer: new Buffer('x'),
- string: ':base64:'+ new Buffer('x').toString('base64')
- },
- undefined: {
- empty: undefined, test: true
- },
- undefined2: {
- first: 1, empty: undefined, test: true
- },
- undefinedArray: {
- array: [undefined, 1, 'two']
- },
- fn: {
- fn: function () {}
- },
- undefined: undefined
-}
-
-for(k in examples)
-(function (value, k) {
- test(k, function (t) {
- var s = _JSON.stringify(value)
- console.log('parse', s)
- if(JSON.stringify(value) !== undefined) {
- console.log(s)
- var _value = _JSON.parse(s)
- t.deepEqual(clone(_value), clone(value))
- }
- else
- t.equal(s, undefined)
- t.end()
- })
-})(examples[k], k)
-
-
-
+++ /dev/null
-MIT License
-
-Copyright (c) 2017 Luke Childs
-
-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.
+++ /dev/null
-<h1 align="center">
- <img width="250" src="https://rawgit.com/lukechilds/keyv/master/media/logo.svg" alt="keyv">
- <br>
- <br>
-</h1>
-
-> Simple key-value storage with support for multiple backends
-
-[![Build Status](https://travis-ci.org/lukechilds/keyv.svg?branch=master)](https://travis-ci.org/lukechilds/keyv)
-[![Coverage Status](https://coveralls.io/repos/github/lukechilds/keyv/badge.svg?branch=master)](https://coveralls.io/github/lukechilds/keyv?branch=master)
-[![npm](https://img.shields.io/npm/v/keyv.svg)](https://www.npmjs.com/package/keyv)
-
-Keyv provides a consistent interface for key-value storage across multiple backends via storage adapters. It supports TTL based expiry, making it suitable as a cache or a persistent key-value store.
-
-## Features
-
-There are a few existing modules similar to Keyv, however Keyv is different because it:
-
-- Isn't bloated
-- Has a simple Promise based API
-- Suitable as a TTL based cache or persistent key-value store
-- [Easily embeddable](#add-cache-support-to-your-module) inside another module
-- Works with any storage that implements the [`Map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map) API
-- Handles all JavaScript types (values can be `Buffer`/`null`/`undefined`)
-- Supports namespaces
-- Wide range of [**efficient, well tested**](#official-storage-adapters) storage adapters
-- Connection errors are passed through (db failures won't kill your app)
-- Supports the current active LTS version of Node.js or higher
-
-## Usage
-
-Install Keyv.
-
-```
-npm install --save keyv
-```
-
-By default everything is stored in memory, you can optionally also install a storage adapter.
-
-```
-npm install --save @keyv/redis
-npm install --save @keyv/mongo
-npm install --save @keyv/sqlite
-npm install --save @keyv/postgres
-npm install --save @keyv/mysql
-```
-
-Create a new Keyv instance, passing your connection string if applicable. Keyv will automatically load the correct storage adapter.
-
-```js
-const Keyv = require('keyv');
-
-// One of the following
-const keyv = new Keyv();
-const keyv = new Keyv('redis://user:pass@localhost:6379');
-const keyv = new Keyv('mongodb://user:pass@localhost:27017/dbname');
-const keyv = new Keyv('sqlite://path/to/database.sqlite');
-const keyv = new Keyv('postgresql://user:pass@localhost:5432/dbname');
-const keyv = new Keyv('mysql://user:pass@localhost:3306/dbname');
-
-// Handle DB connection errors
-keyv.on('error' err => console.log('Connection Error', err));
-
-await keyv.set('foo', 'expires in 1 second', 1000); // true
-await keyv.set('foo', 'never expires'); // true
-await keyv.get('foo'); // 'never expires'
-await keyv.delete('foo'); // true
-await keyv.clear(); // undefined
-```
-
-### Namespaces
-
-You can namespace your Keyv instance to avoid key collisions and allow you to clear only a certain namespace while using the same database.
-
-```js
-const users = new Keyv('redis://user:pass@localhost:6379', { namespace: 'users' });
-const cache = new Keyv('redis://user:pass@localhost:6379', { namespace: 'cache' });
-
-await users.set('foo', 'users'); // true
-await cache.set('foo', 'cache'); // true
-await users.get('foo'); // 'users'
-await cache.get('foo'); // 'cache'
-await users.clear(); // undefined
-await users.get('foo'); // undefined
-await cache.get('foo'); // 'cache'
-```
-
-## Official Storage Adapters
-
-The official storage adapters are covered by [over 150 integration tests](https://travis-ci.org/lukechilds/keyv/jobs/260418145) to guarantee consistent behaviour. They are lightweight, efficient wrappers over the DB clients making use of indexes and native TTLs where available.
-
-Database | Adapter | Native TTL | Status
----|---|---|---
-Redis | [@keyv/redis](https://github.com/lukechilds/keyv-redis) | Yes | [![Build Status](https://travis-ci.org/lukechilds/keyv-redis.svg?branch=master)](https://travis-ci.org/lukechilds/keyv-redis) [![Coverage Status](https://coveralls.io/repos/github/lukechilds/keyv-redis/badge.svg?branch=master)](https://coveralls.io/github/lukechilds/keyv-redis?branch=master)
-MongoDB | [@keyv/mongo](https://github.com/lukechilds/keyv-mongo) | Yes | [![Build Status](https://travis-ci.org/lukechilds/keyv-mongo.svg?branch=master)](https://travis-ci.org/lukechilds/keyv-mongo) [![Coverage Status](https://coveralls.io/repos/github/lukechilds/keyv-mongo/badge.svg?branch=master)](https://coveralls.io/github/lukechilds/keyv-mongo?branch=master)
-SQLite | [@keyv/sqlite](https://github.com/lukechilds/keyv-sqlite) | No | [![Build Status](https://travis-ci.org/lukechilds/keyv-sqlite.svg?branch=master)](https://travis-ci.org/lukechilds/keyv-sqlite) [![Coverage Status](https://coveralls.io/repos/github/lukechilds/keyv-sqlite/badge.svg?branch=master)](https://coveralls.io/github/lukechilds/keyv-sqlite?branch=master)
-PostgreSQL | [@keyv/postgres](https://github.com/lukechilds/keyv-postgres) | No | [![Build Status](https://travis-ci.org/lukechilds/keyv-postgres.svg?branch=master)](https://travis-ci.org/lukechildskeyv-postgreskeyv) [![Coverage Status](https://coveralls.io/repos/github/lukechilds/keyv-postgres/badge.svg?branch=master)](https://coveralls.io/github/lukechilds/keyv-postgres?branch=master)
-MySQL | [@keyv/mysql](https://github.com/lukechilds/keyv-mysql) | No | [![Build Status](https://travis-ci.org/lukechilds/keyv-mysql.svg?branch=master)](https://travis-ci.org/lukechilds/keyv-mysql) [![Coverage Status](https://coveralls.io/repos/github/lukechilds/keyv-mysql/badge.svg?branch=master)](https://coveralls.io/github/lukechilds/keyv-mysql?branch=master)
-
-## Third-party Storage Adapters
-
-You can also use third-party storage adapters or build your own. Keyv will wrap these storage adapters in TTL functionality and handle complex types internally.
-
-```js
-const Keyv = require('keyv');
-const myAdapter = require('./my-storage-adapter');
-
-const keyv = new Keyv({ store: myAdapter });
-```
-
-Any store that follows the [`Map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map) api will work.
-
-```js
-new Keyv({ store: new Map() });
-```
-
-For example, [`quick-lru`](https://github.com/sindresorhus/quick-lru) is a completely unrelated module that implements the Map API.
-
-```js
-const Keyv = require('keyv');
-const QuickLRU = require('quick-lru');
-
-const lru = new QuickLRU({ maxSize: 1000 });
-const keyv = new Keyv({ store: lru });
-```
-
-## Add Cache Support to your Module
-
-Keyv is designed to be easily embedded into other modules to add cache support. The recommended pattern is to expose a `cache` option in your modules options which is passed through to Keyv. Caching will work in memory by default and users have the option to also install a Keyv storage adapter and pass in a connection string, or any other storage that implements the `Map` API.
-
-You should also set a namespace for your module so you can safely call `.clear()` without clearing unrelated app data.
-
-Inside your module:
-
-```js
-class AwesomeModule {
- constructor(opts) {
- this.cache = new Keyv({
- uri: typeof opts.cache === 'string' && opts.cache,
- store: typeof opts.cache !== 'string' && opts.cache,
- namespace: 'awesome-module'
- });
- }
-}
-```
-
-Now it can be consumed like this:
-
-```js
-const AwesomeModule = require('awesome-module');
-
-// Caches stuff in memory by default
-const awesomeModule = new AwesomeModule();
-
-// After npm install --save keyv-redis
-const awesomeModule = new AwesomeModule({ cache: 'redis://localhost' });
-
-// Some third-party module that implements the Map API
-const awesomeModule = new AwesomeModule({ cache: some3rdPartyStore });
-```
-
-## API
-
-### new Keyv([uri], [options])
-
-Returns a new Keyv instance.
-
-The Keyv instance is also an `EventEmitter` that will emit an `'error'` event if the storage adapter connection fails.
-
-### uri
-
-Type: `String`<br>
-Default: `undefined`
-
-The connection string URI.
-
-Merged into the options object as options.uri.
-
-### options
-
-Type: `Object`
-
-The options object is also passed through to the storage adapter. Check your storage adapter docs for any extra options.
-
-#### options.namespace
-
-Type: `String`<br>
-Default: `'keyv'`
-
-Namespace for the current instance.
-
-#### options.ttl
-
-Type: `Number`<br>
-Default: `undefined`
-
-Default TTL. Can be overridden by specififying a TTL on `.set()`.
-
-#### options.store
-
-Type: `Storage adapter instance`<br>
-Default: `new Map()`
-
-The storage adapter instance to be used by Keyv.
-
-#### options.adapter
-
-Type: `String`<br>
-Default: `undefined`
-
-Specify an adapter to use. e.g `'redis'` or `'mongodb'`.
-
-### Instance
-
-Keys must always be strings. Values can be of any type.
-
-#### .set(key, value, [ttl])
-
-Set a value.
-
-By default keys are persistent. You can set an expiry TTL in milliseconds.
-
-Returns `true`.
-
-#### .get(key)
-
-Returns the value.
-
-#### .delete(key)
-
-Deletes an entry.
-
-Returns `true` if the key existed, `false` if not.
-
-#### .clear()
-
-Delete all entries in the current namespace.
-
-Returns `undefined`.
-
-## License
-
-MIT © Luke Childs
+++ /dev/null
-{
- "name": "keyv",
- "version": "3.0.0",
- "description": "Simple key-value storage with support for multiple backends",
- "main": "src/index.js",
- "scripts": {
- "test": "xo && nyc ava test/keyv.js",
- "test:full": "xo && nyc ava --serial",
- "coverage": "nyc report --reporter=text-lcov | coveralls"
- },
- "xo": {
- "extends": "xo-lukechilds"
- },
- "repository": {
- "type": "git",
- "url": "git+https://github.com/lukechilds/keyv.git"
- },
- "keywords": [
- "key",
- "value",
- "store",
- "cache",
- "ttl"
- ],
- "author": "Luke Childs <lukechilds123@gmail.com> (http://lukechilds.co.uk)",
- "license": "MIT",
- "bugs": {
- "url": "https://github.com/lukechilds/keyv/issues"
- },
- "homepage": "https://github.com/lukechilds/keyv",
- "dependencies": {
- "json-buffer": "3.0.0"
- },
- "devDependencies": {
- "ava": "^0.22.0",
- "coveralls": "^3.0.0",
- "eslint-config-xo-lukechilds": "^1.0.0",
- "@keyv/mongo": "*",
- "@keyv/mysql": "*",
- "@keyv/postgres": "*",
- "@keyv/redis": "*",
- "@keyv/sqlite": "*",
- "@keyv/test-suite": "*",
- "nyc": "^11.0.3",
- "this": "^1.0.2",
- "timekeeper": "^2.0.0",
- "xo": "^0.19.0"
- }
-}
+++ /dev/null
-'use strict';
-
-const EventEmitter = require('events');
-const JSONB = require('json-buffer');
-
-const loadStore = opts => {
- const adapters = {
- redis: '@keyv/redis',
- mongodb: '@keyv/mongo',
- mongo: '@keyv/mongo',
- sqlite: '@keyv/sqlite',
- postgresql: '@keyv/postgres',
- postgres: '@keyv/postgres',
- mysql: '@keyv/mysql'
- };
- if (opts.adapter || opts.uri) {
- const adapter = opts.adapter || /^[^:]*/.exec(opts.uri)[0];
- return new (require(adapters[adapter]))(opts);
- }
- return new Map();
-};
-
-class Keyv extends EventEmitter {
- constructor(uri, opts) {
- super();
- this.opts = Object.assign(
- { namespace: 'keyv' },
- (typeof uri === 'string') ? { uri } : uri,
- opts
- );
-
- if (!this.opts.store) {
- const adapterOpts = Object.assign({}, this.opts);
- this.opts.store = loadStore(adapterOpts);
- }
-
- if (typeof this.opts.store.on === 'function') {
- this.opts.store.on('error', err => this.emit('error', err));
- }
-
- this.opts.store.namespace = this.opts.namespace;
- }
-
- _getKeyPrefix(key) {
- return `${this.opts.namespace}:${key}`;
- }
-
- get(key) {
- key = this._getKeyPrefix(key);
- const store = this.opts.store;
- return Promise.resolve()
- .then(() => store.get(key))
- .then(data => {
- data = (typeof data === 'string') ? JSONB.parse(data) : data;
- if (data === undefined) {
- return undefined;
- }
- if (typeof data.expires === 'number' && Date.now() > data.expires) {
- this.delete(key);
- return undefined;
- }
- return data.value;
- });
- }
-
- set(key, value, ttl) {
- key = this._getKeyPrefix(key);
- if (typeof ttl === 'undefined') {
- ttl = this.opts.ttl;
- }
- if (ttl === 0) {
- ttl = undefined;
- }
- const store = this.opts.store;
-
- return Promise.resolve()
- .then(() => {
- const expires = (typeof ttl === 'number') ? (Date.now() + ttl) : null;
- value = { value, expires };
- return store.set(key, JSONB.stringify(value), ttl);
- })
- .then(() => true);
- }
-
- delete(key) {
- key = this._getKeyPrefix(key);
- const store = this.opts.store;
- return Promise.resolve()
- .then(() => store.delete(key));
- }
-
- clear() {
- const store = this.opts.store;
- return Promise.resolve()
- .then(() => store.clear());
- }
-}
-
-module.exports = Keyv;
+++ /dev/null
-'use strict';
-module.exports = function (obj) {
- var ret = {};
- var keys = Object.keys(Object(obj));
-
- for (var i = 0; i < keys.length; i++) {
- ret[keys[i].toLowerCase()] = obj[keys[i]];
- }
-
- return ret;
-};
+++ /dev/null
-{
- "name": "lowercase-keys",
- "version": "1.0.0",
- "description": "Lowercase the keys of an object",
- "license": "MIT",
- "repository": "sindresorhus/lowercase-keys",
- "author": {
- "name": "Sindre Sorhus",
- "email": "sindresorhus@gmail.com",
- "url": "sindresorhus.com"
- },
- "engines": {
- "node": ">=0.10.0"
- },
- "scripts": {
- "test": "node test.js"
- },
- "files": [
- "index.js"
- ],
- "keywords": [
- "object",
- "assign",
- "extend",
- "properties",
- "lowercase",
- "lower-case",
- "case",
- "keys",
- "key"
- ],
- "devDependencies": {
- "ava": "0.0.4"
- }
-}
+++ /dev/null
-# lowercase-keys [![Build Status](https://travis-ci.org/sindresorhus/lowercase-keys.svg?branch=master)](https://travis-ci.org/sindresorhus/lowercase-keys)
-
-> Lowercase the keys of an object
-
-
-## Install
-
-```
-$ npm install --save lowercase-keys
-```
-
-
-## Usage
-
-```js
-var lowercaseKeys = require('lowercase-keys');
-
-lowercaseKeys({FOO: true, bAr: false});
-//=> {foo: true, bar: false}
-```
-
-
-## API
-
-### lowercaseKeys(object)
-
-Lowercases the keys and returns a new object.
-
-
-
-## License
-
-MIT © [Sindre Sorhus](http://sindresorhus.com)
+++ /dev/null
-'use strict';
-
-// We define these manually to ensure they're always copied
-// even if they would move up the prototype chain
-// https://nodejs.org/api/http.html#http_class_http_incomingmessage
-const knownProps = [
- 'destroy',
- 'setTimeout',
- 'socket',
- 'headers',
- 'trailers',
- 'rawHeaders',
- 'statusCode',
- 'httpVersion',
- 'httpVersionMinor',
- 'httpVersionMajor',
- 'rawTrailers',
- 'statusMessage'
-];
-
-module.exports = (fromStream, toStream) => {
- const toProps = Object.keys(toStream);
- const fromProps = new Set(Object.keys(fromStream).concat(knownProps));
-
- for (const prop of fromProps) {
- // Don't overwrite existing properties
- if (toProps.indexOf(prop) !== -1) {
- continue;
- }
-
- toStream[prop] = typeof fromStream[prop] === 'function' ? fromStream[prop].bind(fromStream) : fromStream[prop];
- }
-};
+++ /dev/null
-MIT License
-
-Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
-
-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.
+++ /dev/null
-{
- "name": "mimic-response",
- "version": "1.0.0",
- "description": "Mimic a Node.js HTTP response stream",
- "license": "MIT",
- "repository": "sindresorhus/mimic-response",
- "author": {
- "name": "Sindre Sorhus",
- "email": "sindresorhus@gmail.com",
- "url": "sindresorhus.com"
- },
- "engines": {
- "node": ">=4"
- },
- "scripts": {
- "test": "xo && ava"
- },
- "files": [
- "index.js"
- ],
- "keywords": [
- "mimic",
- "response",
- "stream",
- "http",
- "https",
- "request",
- "get",
- "core"
- ],
- "devDependencies": {
- "ava": "*",
- "create-test-server": "^0.1.0",
- "pify": "^3.0.0",
- "xo": "*"
- }
-}
+++ /dev/null
-# mimic-response [![Build Status](https://travis-ci.org/sindresorhus/mimic-response.svg?branch=master)](https://travis-ci.org/sindresorhus/mimic-response)
-
-> Mimic a [Node.js HTTP response stream](https://nodejs.org/api/http.html#http_class_http_incomingmessage)
-
-
-## Install
-
-```
-$ npm install mimic-response
-```
-
-
-## Usage
-
-```js
-const stream = require('stream');
-const mimicResponse = require('mimic-response');
-
-const responseStream = getHttpResponseStream();
-const myStream = new stream.PassThrough();
-
-mimicResponse(responseStream, myStream);
-
-console.log(myStream.statusCode);
-//=> 200
-```
-
-
-## API
-
-### mimicResponse(from, to)
-
-#### from
-
-Type: `Stream`
-
-[Node.js HTTP response stream.](https://nodejs.org/api/http.html#http_class_http_incomingmessage)
-
-#### to
-
-Type: `Stream`
-
-Any stream.
-
-
-## Related
-
-- [mimic-fn](https://github.com/sindresorhus/mimic-fn) - Make a function mimic another one
-- [clone-response](https://github.com/lukechilds/clone-response) - Clone a Node.js response stream
-
-
-## License
-
-MIT © [Sindre Sorhus](https://sindresorhus.com)
+++ /dev/null
-'use strict';
-const url = require('url');
-const punycode = require('punycode');
-const queryString = require('query-string');
-const prependHttp = require('prepend-http');
-const sortKeys = require('sort-keys');
-
-const DEFAULT_PORTS = {
- 'http:': 80,
- 'https:': 443,
- 'ftp:': 21
-};
-
-// Protocols that always contain a `//`` bit
-const slashedProtocol = {
- http: true,
- https: true,
- ftp: true,
- gopher: true,
- file: true,
- 'http:': true,
- 'https:': true,
- 'ftp:': true,
- 'gopher:': true,
- 'file:': true
-};
-
-function testParameter(name, filters) {
- return filters.some(filter => filter instanceof RegExp ? filter.test(name) : filter === name);
-}
-
-module.exports = (str, opts) => {
- opts = Object.assign({
- normalizeProtocol: true,
- normalizeHttps: false,
- stripFragment: true,
- stripWWW: true,
- removeQueryParameters: [/^utm_\w+/i],
- removeTrailingSlash: true,
- removeDirectoryIndex: false,
- sortQueryParameters: true
- }, opts);
-
- if (typeof str !== 'string') {
- throw new TypeError('Expected a string');
- }
-
- const hasRelativeProtocol = str.startsWith('//');
-
- // Prepend protocol
- str = prependHttp(str.trim()).replace(/^\/\//, 'http://');
-
- const urlObj = url.parse(str);
-
- if (opts.normalizeHttps && urlObj.protocol === 'https:') {
- urlObj.protocol = 'http:';
- }
-
- if (!urlObj.hostname && !urlObj.pathname) {
- throw new Error('Invalid URL');
- }
-
- // Prevent these from being used by `url.format`
- delete urlObj.host;
- delete urlObj.query;
-
- // Remove fragment
- if (opts.stripFragment) {
- delete urlObj.hash;
- }
-
- // Remove default port
- const port = DEFAULT_PORTS[urlObj.protocol];
- if (Number(urlObj.port) === port) {
- delete urlObj.port;
- }
-
- // Remove duplicate slashes
- if (urlObj.pathname) {
- urlObj.pathname = urlObj.pathname.replace(/\/{2,}/g, '/');
- }
-
- // Decode URI octets
- if (urlObj.pathname) {
- urlObj.pathname = decodeURI(urlObj.pathname);
- }
-
- // Remove directory index
- if (opts.removeDirectoryIndex === true) {
- opts.removeDirectoryIndex = [/^index\.[a-z]+$/];
- }
-
- if (Array.isArray(opts.removeDirectoryIndex) && opts.removeDirectoryIndex.length > 0) {
- let pathComponents = urlObj.pathname.split('/');
- const lastComponent = pathComponents[pathComponents.length - 1];
-
- if (testParameter(lastComponent, opts.removeDirectoryIndex)) {
- pathComponents = pathComponents.slice(0, pathComponents.length - 1);
- urlObj.pathname = pathComponents.slice(1).join('/') + '/';
- }
- }
-
- // Resolve relative paths, but only for slashed protocols
- if (slashedProtocol[urlObj.protocol]) {
- const domain = urlObj.protocol + '//' + urlObj.hostname;
- const relative = url.resolve(domain, urlObj.pathname);
- urlObj.pathname = relative.replace(domain, '');
- }
-
- if (urlObj.hostname) {
- // IDN to Unicode
- urlObj.hostname = punycode.toUnicode(urlObj.hostname).toLowerCase();
-
- // Remove trailing dot
- urlObj.hostname = urlObj.hostname.replace(/\.$/, '');
-
- // Remove `www.`
- if (opts.stripWWW) {
- urlObj.hostname = urlObj.hostname.replace(/^www\./, '');
- }
- }
-
- // Remove URL with empty query string
- if (urlObj.search === '?') {
- delete urlObj.search;
- }
-
- const queryParameters = queryString.parse(urlObj.search);
-
- // Remove query unwanted parameters
- if (Array.isArray(opts.removeQueryParameters)) {
- for (const key in queryParameters) {
- if (testParameter(key, opts.removeQueryParameters)) {
- delete queryParameters[key];
- }
- }
- }
-
- // Sort query parameters
- if (opts.sortQueryParameters) {
- urlObj.search = queryString.stringify(sortKeys(queryParameters));
- }
-
- // Decode query parameters
- if (urlObj.search !== null) {
- urlObj.search = decodeURIComponent(urlObj.search);
- }
-
- // Take advantage of many of the Node `url` normalizations
- str = url.format(urlObj);
-
- // Remove ending `/`
- if (opts.removeTrailingSlash || urlObj.pathname === '/') {
- str = str.replace(/\/$/, '');
- }
-
- // Restore relative protocol, if applicable
- if (hasRelativeProtocol && !opts.normalizeProtocol) {
- str = str.replace(/^http:\/\//, '//');
- }
-
- return str;
-};
+++ /dev/null
-MIT License
-
-Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
-
-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.
+++ /dev/null
-{
- "name": "normalize-url",
- "version": "2.0.1",
- "description": "Normalize a URL",
- "license": "MIT",
- "repository": "sindresorhus/normalize-url",
- "author": {
- "name": "Sindre Sorhus",
- "email": "sindresorhus@gmail.com",
- "url": "sindresorhus.com"
- },
- "engines": {
- "node": ">=4"
- },
- "scripts": {
- "test": "xo && ava"
- },
- "files": [
- "index.js"
- ],
- "keywords": [
- "normalize",
- "url",
- "uri",
- "address",
- "string",
- "normalization",
- "normalisation",
- "query",
- "querystring",
- "unicode",
- "simplify",
- "strip",
- "trim",
- "canonical"
- ],
- "dependencies": {
- "prepend-http": "^2.0.0",
- "query-string": "^5.0.1",
- "sort-keys": "^2.0.0"
- },
- "devDependencies": {
- "ava": "*",
- "xo": "*"
- }
-}
+++ /dev/null
-# normalize-url [![Build Status](https://travis-ci.org/sindresorhus/normalize-url.svg?branch=master)](https://travis-ci.org/sindresorhus/normalize-url)
-
-> [Normalize](https://en.wikipedia.org/wiki/URL_normalization) a URL
-
-Useful when you need to display, store, deduplicate, sort, compare, etc, URLs.
-
-
-## Install
-
-```
-$ npm install normalize-url
-```
-
-
-## Usage
-
-```js
-const normalizeUrl = require('normalize-url');
-
-normalizeUrl('sindresorhus.com');
-//=> 'http://sindresorhus.com'
-
-normalizeUrl('HTTP://xn--xample-hva.com:80/?b=bar&a=foo');
-//=> 'http://êxample.com/?a=foo&b=bar'
-```
-
-
-## API
-
-### normalizeUrl(url, [options])
-
-#### url
-
-Type: `string`
-
-URL to normalize.
-
-#### options
-
-Type: `Object`
-
-##### normalizeProtocol
-
-Type: `boolean`<br>
-Default: `true`
-
-Prepend `http:` to the URL if it's protocol-relative.
-
-```js
-normalizeUrl('//sindresorhus.com:80/');
-//=> 'http://sindresorhus.com'
-
-normalizeUrl('//sindresorhus.com:80/', {normalizeProtocol: false});
-//=> '//sindresorhus.com'
-```
-
-##### normalizeHttps
-
-Type: `boolean`<br>
-Default: `false`
-
-Normalize `https:` URLs to `http:`.
-
-```js
-normalizeUrl('https://sindresorhus.com:80/');
-//=> 'https://sindresorhus.com'
-
-normalizeUrl('https://sindresorhus.com:80/', {normalizeHttps: true});
-//=> 'http://sindresorhus.com'
-```
-
-##### stripFragment
-
-Type: `boolean`<br>
-Default: `true`
-
-Remove the fragment at the end of the URL.
-
-```js
-normalizeUrl('sindresorhus.com/about.html#contact');
-//=> 'http://sindresorhus.com/about.html'
-
-normalizeUrl('sindresorhus.com/about.html#contact', {stripFragment: false});
-//=> 'http://sindresorhus.com/about.html#contact'
-```
-
-##### stripWWW
-
-Type: `boolean`<br>
-Default: `true`
-
-Remove `www.` from the URL.
-
-```js
-normalizeUrl('http://www.sindresorhus.com/about.html#contact');
-//=> 'http://sindresorhus.com/about.html#contact'
-
-normalizeUrl('http://www.sindresorhus.com/about.html#contact', {stripWWW: false});
-//=> 'http://www.sindresorhus.com/about.html#contact'
-```
-
-##### removeQueryParameters
-
-Type: `Array<RegExp|string>`<br>
-Default: `[/^utm_\w+/i]`
-
-Remove query parameters that matches any of the provided strings or regexes.
-
-```js
-normalizeUrl('www.sindresorhus.com?foo=bar&ref=test_ref', {
- removeQueryParameters: ['ref']
-});
-//=> 'http://sindresorhus.com/?foo=bar'
-```
-
-##### removeTrailingSlash
-
-Type: `boolean`<br>
-Default: `true`
-
-Remove trailing slash.
-
-**Note:** Trailing slash is always removed if the URL doesn't have a pathname.
-
-```js
-normalizeUrl('http://sindresorhus.com/redirect/');
-//=> 'http://sindresorhus.com/redirect'
-
-normalizeUrl('http://sindresorhus.com/redirect/', {removeTrailingSlash: false});
-//=> 'http://sindresorhus.com/redirect/'
-
-normalizeUrl('http://sindresorhus.com/', {removeTrailingSlash: false});
-//=> 'http://sindresorhus.com'
-```
-
-##### removeDirectoryIndex
-
-Type: `boolean` `Array<RegExp|string>`<br>
-Default: `false`
-
-Remove the default directory index file from path that matches any of the provided strings or regexes. When `true`, the regex `/^index\.[a-z]+$/` is used.
-
-```js
-normalizeUrl('www.sindresorhus.com/foo/default.php', {
- removeDirectoryIndex: [/^default\.[a-z]+$/]
-});
-//=> 'http://sindresorhus.com/foo'
-```
-
-##### sortQueryParameters
-
-Type: `boolean`<br>
-Default: `true`
-
-Sort the query parameters alphabetically by key.
-
-```js
-normalizeUrl('www.sindresorhus.com?b=two&a=one&c=three', {
- sortQueryParameters: false
-});
-//=> 'http://sindresorhus.com/?b=two&a=one&c=three'
-```
-
-
-## Related
-
-- [compare-urls](https://github.com/sindresorhus/compare-urls) - Compare URLs by first normalizing them
-
-
-## License
-
-MIT © [Sindre Sorhus](https://sindresorhus.com)
+++ /dev/null
-/*
-object-assign
-(c) Sindre Sorhus
-@license MIT
-*/
-
-'use strict';
-/* eslint-disable no-unused-vars */
-var getOwnPropertySymbols = Object.getOwnPropertySymbols;
-var hasOwnProperty = Object.prototype.hasOwnProperty;
-var propIsEnumerable = Object.prototype.propertyIsEnumerable;
-
-function toObject(val) {
- if (val === null || val === undefined) {
- throw new TypeError('Object.assign cannot be called with null or undefined');
- }
-
- return Object(val);
-}
-
-function shouldUseNative() {
- try {
- if (!Object.assign) {
- return false;
- }
-
- // Detect buggy property enumeration order in older V8 versions.
-
- // https://bugs.chromium.org/p/v8/issues/detail?id=4118
- var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
- test1[5] = 'de';
- if (Object.getOwnPropertyNames(test1)[0] === '5') {
- return false;
- }
-
- // https://bugs.chromium.org/p/v8/issues/detail?id=3056
- var test2 = {};
- for (var i = 0; i < 10; i++) {
- test2['_' + String.fromCharCode(i)] = i;
- }
- var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
- return test2[n];
- });
- if (order2.join('') !== '0123456789') {
- return false;
- }
-
- // https://bugs.chromium.org/p/v8/issues/detail?id=3056
- var test3 = {};
- 'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
- test3[letter] = letter;
- });
- if (Object.keys(Object.assign({}, test3)).join('') !==
- 'abcdefghijklmnopqrst') {
- return false;
- }
-
- return true;
- } catch (err) {
- // We don't expect any of the above to throw, but better to be safe.
- return false;
- }
-}
-
-module.exports = shouldUseNative() ? Object.assign : function (target, source) {
- var from;
- var to = toObject(target);
- var symbols;
-
- for (var s = 1; s < arguments.length; s++) {
- from = Object(arguments[s]);
-
- for (var key in from) {
- if (hasOwnProperty.call(from, key)) {
- to[key] = from[key];
- }
- }
-
- if (getOwnPropertySymbols) {
- symbols = getOwnPropertySymbols(from);
- for (var i = 0; i < symbols.length; i++) {
- if (propIsEnumerable.call(from, symbols[i])) {
- to[symbols[i]] = from[symbols[i]];
- }
- }
- }
- }
-
- return to;
-};
+++ /dev/null
-The MIT License (MIT)
-
-Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
-
-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.
+++ /dev/null
-{
- "name": "object-assign",
- "version": "4.1.1",
- "description": "ES2015 `Object.assign()` ponyfill",
- "license": "MIT",
- "repository": "sindresorhus/object-assign",
- "author": {
- "name": "Sindre Sorhus",
- "email": "sindresorhus@gmail.com",
- "url": "sindresorhus.com"
- },
- "engines": {
- "node": ">=0.10.0"
- },
- "scripts": {
- "test": "xo && ava",
- "bench": "matcha bench.js"
- },
- "files": [
- "index.js"
- ],
- "keywords": [
- "object",
- "assign",
- "extend",
- "properties",
- "es2015",
- "ecmascript",
- "harmony",
- "ponyfill",
- "prollyfill",
- "polyfill",
- "shim",
- "browser"
- ],
- "devDependencies": {
- "ava": "^0.16.0",
- "lodash": "^4.16.4",
- "matcha": "^0.7.0",
- "xo": "^0.16.0"
- }
-}
+++ /dev/null
-# object-assign [![Build Status](https://travis-ci.org/sindresorhus/object-assign.svg?branch=master)](https://travis-ci.org/sindresorhus/object-assign)
-
-> ES2015 [`Object.assign()`](http://www.2ality.com/2014/01/object-assign.html) [ponyfill](https://ponyfill.com)
-
-
-## Use the built-in
-
-Node.js 4 and up, as well as every evergreen browser (Chrome, Edge, Firefox, Opera, Safari),
-support `Object.assign()` :tada:. If you target only those environments, then by all
-means, use `Object.assign()` instead of this package.
-
-
-## Install
-
-```
-$ npm install --save object-assign
-```
-
-
-## Usage
-
-```js
-const objectAssign = require('object-assign');
-
-objectAssign({foo: 0}, {bar: 1});
-//=> {foo: 0, bar: 1}
-
-// multiple sources
-objectAssign({foo: 0}, {bar: 1}, {baz: 2});
-//=> {foo: 0, bar: 1, baz: 2}
-
-// overwrites equal keys
-objectAssign({foo: 0}, {foo: 1}, {foo: 2});
-//=> {foo: 2}
-
-// ignores null and undefined sources
-objectAssign({foo: 0}, null, {bar: 1}, undefined);
-//=> {foo: 0, bar: 1}
-```
-
-
-## API
-
-### objectAssign(target, [source, ...])
-
-Assigns enumerable own properties of `source` objects to the `target` object and returns the `target` object. Additional `source` objects will overwrite previous ones.
-
-
-## Resources
-
-- [ES2015 spec - Object.assign](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.assign)
-
-
-## Related
-
-- [deep-assign](https://github.com/sindresorhus/deep-assign) - Recursive `Object.assign()`
-
-
-## License
-
-MIT © [Sindre Sorhus](https://sindresorhus.com)
+++ /dev/null
-'use strict';
-
-class CancelError extends Error {
- constructor() {
- super('Promise was canceled');
- this.name = 'CancelError';
- }
-
- get isCanceled() {
- return true;
- }
-}
-
-class PCancelable {
- static fn(userFn) {
- return function () {
- const args = [].slice.apply(arguments);
- return new PCancelable((resolve, reject, onCancel) => {
- args.push(onCancel);
- userFn.apply(null, args).then(resolve, reject);
- });
- };
- }
-
- constructor(executor) {
- this._cancelHandlers = [];
- this._isPending = true;
- this._isCanceled = false;
-
- this._promise = new Promise((resolve, reject) => {
- this._reject = reject;
-
- return executor(
- value => {
- this._isPending = false;
- resolve(value);
- },
- error => {
- this._isPending = false;
- reject(error);
- },
- handler => {
- this._cancelHandlers.push(handler);
- }
- );
- });
- }
-
- then(onFulfilled, onRejected) {
- return this._promise.then(onFulfilled, onRejected);
- }
-
- catch(onRejected) {
- return this._promise.catch(onRejected);
- }
-
- finally(onFinally) {
- return this._promise.finally(onFinally);
- }
-
- cancel() {
- if (!this._isPending || this._isCanceled) {
- return;
- }
-
- if (this._cancelHandlers.length > 0) {
- try {
- for (const handler of this._cancelHandlers) {
- handler();
- }
- } catch (err) {
- this._reject(err);
- }
- }
-
- this._isCanceled = true;
- this._reject(new CancelError());
- }
-
- get isCanceled() {
- return this._isCanceled;
- }
-}
-
-Object.setPrototypeOf(PCancelable.prototype, Promise.prototype);
-
-module.exports = PCancelable;
-module.exports.CancelError = CancelError;
+++ /dev/null
-MIT License
-
-Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
-
-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.
+++ /dev/null
-{
- "name": "p-cancelable",
- "version": "0.4.1",
- "description": "Create a promise that can be canceled",
- "license": "MIT",
- "repository": "sindresorhus/p-cancelable",
- "author": {
- "name": "Sindre Sorhus",
- "email": "sindresorhus@gmail.com",
- "url": "sindresorhus.com"
- },
- "engines": {
- "node": ">=4"
- },
- "scripts": {
- "test": "xo && ava"
- },
- "files": [
- "index.js"
- ],
- "keywords": [
- "promise",
- "cancelable",
- "cancel",
- "canceled",
- "canceling",
- "cancellable",
- "cancellation",
- "abort",
- "abortable",
- "aborting",
- "cleanup",
- "task",
- "token",
- "async",
- "function",
- "await",
- "promises",
- "bluebird"
- ],
- "devDependencies": {
- "ava": "*",
- "delay": "^2.0.0",
- "promise.prototype.finally": "^3.1.0",
- "xo": "*"
- }
-}
+++ /dev/null
-# p-cancelable [![Build Status](https://travis-ci.org/sindresorhus/p-cancelable.svg?branch=master)](https://travis-ci.org/sindresorhus/p-cancelable)
-
-> Create a promise that can be canceled
-
-Useful for animation, loading resources, long-running async computations, async iteration, etc.
-
-
-## Install
-
-```
-$ npm install p-cancelable
-```
-
-
-## Usage
-
-```js
-const PCancelable = require('p-cancelable');
-
-const cancelablePromise = new PCancelable((resolve, reject, onCancel) => {
- const worker = new SomeLongRunningOperation();
-
- onCancel(() => {
- worker.close();
- });
-
- worker.on('finish', resolve);
- worker.on('error', reject);
-});
-
-cancelablePromise
- .then(value => {
- console.log('Operation finished successfully:', value);
- })
- .catch(error => {
- if (cancelablePromise.isCanceled) {
- // Handle the cancelation here
- console.log('Operation was canceled');
- return;
- }
-
- throw error;
- });
-
-// Cancel the operation after 10 seconds
-setTimeout(() => {
- cancelablePromise.cancel();
-}, 10000);
-```
-
-
-## API
-
-### new PCancelable(executor)
-
-Same as the [`Promise` constructor](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Promise), but with an appended `onCancel` parameter in `executor`.
-
-`PCancelable` is a subclass of `Promise`.
-
-#### onCanceled(fn)
-
-Type: `Function`
-
-Accepts a function that is called when the promise is canceled.
-
-You're not required to call this function. You can call this function multiple times to add multiple cancel handlers.
-
-### PCancelable#cancel()
-
-Type: `Function`
-
-Cancel the promise.
-
-The cancellation is synchronous. Calling it after the promise has settled or multiple times does nothing.
-
-### PCancelable#isCanceled
-
-Type: `boolean`
-
-Whether the promise is canceled.
-
-### PCancelable.CancelError
-
-Type: `Error`
-
-Rejection reason when `.cancel()` is called.
-
-It includes a `.isCanceled` property for convenience.
-
-### PCancelable.fn(fn)
-
-Convenience method to make your promise-returning or async function cancelable.
-
-The function you specify will have `onCancel` appended to its parameters.
-
-```js
-const fn = PCancelable.fn((input, onCancel) => {
- const job = new Job();
-
- onCancel(() => {
- job.cleanup();
- });
-
- return job.start(); //=> Promise
-});
-
-const promise = fn('input'); //=> PCancelable
-
-// …
-
-promise.cancel();
-```
-
-
-## FAQ
-
-### Cancelable vs. Cancellable
-
-[In American English, the verb cancel is usually inflected canceled and canceling—with one l.](http://grammarist.com/spelling/cancel/)<br>Both a [browser API](https://developer.mozilla.org/en-US/docs/Web/API/Event/cancelable) and the [Cancelable Promises proposal](https://github.com/tc39/proposal-cancelable-promises) use this spelling.
-
-### What about the official [Cancelable Promises proposal](https://github.com/tc39/proposal-cancelable-promises)?
-
-~~It's still an early draft and I don't really like its current direction. It complicates everything and will require deep changes in the ecosystem to adapt to it. And the way you have to use cancel tokens is verbose and convoluted. I much prefer the more pragmatic and less invasive approach in this module.~~ The proposal was withdrawn.
-
-
-## Related
-
-- [p-progress](https://github.com/sindresorhus/p-progress) - Create a promise that reports progress
-- [p-lazy](https://github.com/sindresorhus/p-lazy) - Create a lazy promise that defers execution until `.then()` or `.catch()` is called
-- [More…](https://github.com/sindresorhus/promise-fun)
-
-
-## License
-
-MIT © [Sindre Sorhus](https://sindresorhus.com)
+++ /dev/null
-'use strict';
-module.exports = (promise, onFinally) => {
- onFinally = onFinally || (() => {});
-
- return promise.then(
- val => new Promise(resolve => {
- resolve(onFinally());
- }).then(() => val),
- err => new Promise(resolve => {
- resolve(onFinally());
- }).then(() => {
- throw err;
- })
- );
-};
+++ /dev/null
-The MIT License (MIT)
-
-Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
-
-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.
+++ /dev/null
-{
- "name": "p-finally",
- "version": "1.0.0",
- "description": "`Promise#finally()` ponyfill - Invoked when the promise is settled regardless of outcome",
- "license": "MIT",
- "repository": "sindresorhus/p-finally",
- "author": {
- "name": "Sindre Sorhus",
- "email": "sindresorhus@gmail.com",
- "url": "sindresorhus.com"
- },
- "engines": {
- "node": ">=4"
- },
- "scripts": {
- "test": "xo && ava"
- },
- "files": [
- "index.js"
- ],
- "keywords": [
- "promise",
- "finally",
- "handler",
- "function",
- "async",
- "await",
- "promises",
- "settled",
- "ponyfill",
- "polyfill",
- "shim",
- "bluebird"
- ],
- "devDependencies": {
- "ava": "*",
- "xo": "*"
- },
- "xo": {
- "esnext": true
- }
-}
+++ /dev/null
-# p-finally [![Build Status](https://travis-ci.org/sindresorhus/p-finally.svg?branch=master)](https://travis-ci.org/sindresorhus/p-finally)
-
-> [`Promise#finally()`](https://github.com/tc39/proposal-promise-finally) [ponyfill](https://ponyfill.com) - Invoked when the promise is settled regardless of outcome
-
-Useful for cleanup.
-
-
-## Install
-
-```
-$ npm install --save p-finally
-```
-
-
-## Usage
-
-```js
-const pFinally = require('p-finally');
-
-const dir = createTempDir();
-
-pFinally(write(dir), () => cleanup(dir));
-```
-
-
-## API
-
-### pFinally(promise, [onFinally])
-
-Returns a `Promise`.
-
-#### onFinally
-
-Type: `Function`
-
-Note: Throwing or returning a rejected promise will reject `promise` with the rejection reason.
-
-
-## Related
-
-- [p-try](https://github.com/sindresorhus/p-try) - `Promise#try()` ponyfill - Starts a promise chain
-- [More…](https://github.com/sindresorhus/promise-fun)
-
-
-## License
-
-MIT © [Sindre Sorhus](https://sindresorhus.com)
+++ /dev/null
-'use strict';
-module.exports = x => (
- x instanceof Promise ||
- (
- x !== null &&
- typeof x === 'object' &&
- typeof x.then === 'function' &&
- typeof x.catch === 'function'
- )
-);
+++ /dev/null
-The MIT License (MIT)
-
-Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
-
-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.
+++ /dev/null
-{
- "name": "p-is-promise",
- "version": "1.1.0",
- "description": "Check if something is a promise",
- "license": "MIT",
- "repository": "sindresorhus/p-is-promise",
- "author": {
- "name": "Sindre Sorhus",
- "email": "sindresorhus@gmail.com",
- "url": "sindresorhus.com"
- },
- "engines": {
- "node": ">=4"
- },
- "scripts": {
- "test": "xo && ava"
- },
- "files": [
- "index.js"
- ],
- "keywords": [
- "promise",
- "is",
- "detect",
- "check",
- "kind",
- "type",
- "thenable",
- "es2015",
- "async",
- "await",
- "promises",
- "bluebird"
- ],
- "devDependencies": {
- "ava": "*",
- "bluebird": "^3.4.6",
- "xo": "*"
- },
- "xo": {
- "esnext": true
- }
-}
+++ /dev/null
-# p-is-promise [![Build Status](https://travis-ci.org/sindresorhus/p-is-promise.svg?branch=master)](https://travis-ci.org/sindresorhus/p-is-promise)
-
-> Check if something is a promise
-
-Why not [`is-promise`](https://github.com/then/is-promise)? That module [checks for a thenable](https://github.com/then/is-promise/issues/6), not an ES2015 promise. This one is stricter.
-
-You most likely don't need this. Just pass your value to `Promise.resolve()` and let it handle it.
-
-Can be useful if you need to create a fast path for a synchronous operation.
-
-
-## Install
-
-```
-$ npm install --save p-is-promise
-```
-
-
-## Usage
-
-```js
-const pIsPromise = require('p-is-promise');
-const Bluebird = require('bluebird');
-
-pIsPromise(Promise.resolve('🦄'));
-//=> true
-
-pIsPromise(Bluebird.resolve('🦄'));
-//=> true
-
-pIsPromise('🦄');
-//=> false
-```
-
-
-## Related
-
-- [More…](https://github.com/sindresorhus/promise-fun)
-
-
-## License
-
-MIT © [Sindre Sorhus](https://sindresorhus.com)
+++ /dev/null
-'use strict';
-const pFinally = require('p-finally');
-
-class TimeoutError extends Error {
- constructor(message) {
- super(message);
- this.name = 'TimeoutError';
- }
-}
-
-module.exports = (promise, ms, fallback) => new Promise((resolve, reject) => {
- if (typeof ms !== 'number' || ms < 0) {
- throw new TypeError('Expected `ms` to be a positive number');
- }
-
- const timer = setTimeout(() => {
- if (typeof fallback === 'function') {
- try {
- resolve(fallback());
- } catch (err) {
- reject(err);
- }
- return;
- }
-
- const message = typeof fallback === 'string' ? fallback : `Promise timed out after ${ms} milliseconds`;
- const err = fallback instanceof Error ? fallback : new TimeoutError(message);
-
- if (typeof promise.cancel === 'function') {
- promise.cancel();
- }
-
- reject(err);
- }, ms);
-
- pFinally(
- promise.then(resolve, reject),
- () => {
- clearTimeout(timer);
- }
- );
-});
-
-module.exports.TimeoutError = TimeoutError;
+++ /dev/null
-MIT License
-
-Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
-
-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.
+++ /dev/null
-{
- "name": "p-timeout",
- "version": "2.0.1",
- "description": "Timeout a promise after a specified amount of time",
- "license": "MIT",
- "repository": "sindresorhus/p-timeout",
- "author": {
- "name": "Sindre Sorhus",
- "email": "sindresorhus@gmail.com",
- "url": "sindresorhus.com"
- },
- "engines": {
- "node": ">=4"
- },
- "scripts": {
- "test": "xo && ava"
- },
- "files": [
- "index.js"
- ],
- "keywords": [
- "promise",
- "timeout",
- "error",
- "invalidate",
- "async",
- "await",
- "promises",
- "time",
- "out",
- "cancel",
- "bluebird"
- ],
- "dependencies": {
- "p-finally": "^1.0.0"
- },
- "devDependencies": {
- "ava": "*",
- "delay": "^2.0.0",
- "p-cancelable": "^0.3.0",
- "xo": "*"
- }
-}
+++ /dev/null
-# p-timeout [![Build Status](https://travis-ci.org/sindresorhus/p-timeout.svg?branch=master)](https://travis-ci.org/sindresorhus/p-timeout)
-
-> Timeout a promise after a specified amount of time
-
-
-## Install
-
-```
-$ npm install p-timeout
-```
-
-
-## Usage
-
-```js
-const delay = require('delay');
-const pTimeout = require('p-timeout');
-
-const delayedPromise = delay(200);
-
-pTimeout(delayedPromise, 50).then(() => 'foo');
-//=> [TimeoutError: Promise timed out after 50 milliseconds]
-```
-
-
-## API
-
-### pTimeout(input, ms, [message | fallback])
-
-Returns a decorated `input` that times out after `ms` time.
-
-If you pass in a cancelable promise, specifically a promise with a `.cancel()` method, that method will be called when the `pTimeout` promise times out.
-
-#### input
-
-Type: `Promise`
-
-Promise to decorate.
-
-#### ms
-
-Type: `number`
-
-Milliseconds before timing out.
-
-#### message
-
-Type: `string` `Error`<br>
-Default: `'Promise timed out after 50 milliseconds'`
-
-Specify a custom error message or error.
-
-If you do a custom error, it's recommended to sub-class `pTimeout.TimeoutError`.
-
-#### fallback
-
-Type: `Function`
-
-Do something other than rejecting with an error on timeout.
-
-You could for example retry:
-
-```js
-const delay = require('delay');
-const pTimeout = require('p-timeout');
-
-const delayedPromise = () => delay(200);
-
-pTimeout(delayedPromise(), 50, () => {
- return pTimeout(delayedPromise(), 300);
-});
-```
-
-### pTimeout.TimeoutError
-
-Exposed for instance checking and sub-classing.
-
-
-## Related
-
-- [delay](https://github.com/sindresorhus/delay) - Delay a promise a specified amount of time
-- [p-min-delay](https://github.com/sindresorhus/p-min-delay) - Delay a promise a minimum amount of time
-- [p-retry](https://github.com/sindresorhus/p-retry) - Retry a promise-returning function
-- [More…](https://github.com/sindresorhus/promise-fun)
-
-
-## License
-
-MIT © [Sindre Sorhus](https://sindresorhus.com)
+++ /dev/null
-'use strict';
-
-const processFn = (fn, opts) => function () {
- const P = opts.promiseModule;
- const args = new Array(arguments.length);
-
- for (let i = 0; i < arguments.length; i++) {
- args[i] = arguments[i];
- }
-
- return new P((resolve, reject) => {
- if (opts.errorFirst) {
- args.push(function (err, result) {
- if (opts.multiArgs) {
- const results = new Array(arguments.length - 1);
-
- for (let i = 1; i < arguments.length; i++) {
- results[i - 1] = arguments[i];
- }
-
- if (err) {
- results.unshift(err);
- reject(results);
- } else {
- resolve(results);
- }
- } else if (err) {
- reject(err);
- } else {
- resolve(result);
- }
- });
- } else {
- args.push(function (result) {
- if (opts.multiArgs) {
- const results = new Array(arguments.length - 1);
-
- for (let i = 0; i < arguments.length; i++) {
- results[i] = arguments[i];
- }
-
- resolve(results);
- } else {
- resolve(result);
- }
- });
- }
-
- fn.apply(this, args);
- });
-};
-
-module.exports = (obj, opts) => {
- opts = Object.assign({
- exclude: [/.+(Sync|Stream)$/],
- errorFirst: true,
- promiseModule: Promise
- }, opts);
-
- const filter = key => {
- const match = pattern => typeof pattern === 'string' ? key === pattern : pattern.test(key);
- return opts.include ? opts.include.some(match) : !opts.exclude.some(match);
- };
-
- let ret;
- if (typeof obj === 'function') {
- ret = function () {
- if (opts.excludeMain) {
- return obj.apply(this, arguments);
- }
-
- return processFn(obj, opts).apply(this, arguments);
- };
- } else {
- ret = Object.create(Object.getPrototypeOf(obj));
- }
-
- for (const key in obj) { // eslint-disable-line guard-for-in
- const x = obj[key];
- ret[key] = typeof x === 'function' && filter(key) ? processFn(x, opts) : x;
- }
-
- return ret;
-};
+++ /dev/null
-MIT License
-
-Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
-
-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.
+++ /dev/null
-{
- "name": "pify",
- "version": "3.0.0",
- "description": "Promisify a callback-style function",
- "license": "MIT",
- "repository": "sindresorhus/pify",
- "author": {
- "name": "Sindre Sorhus",
- "email": "sindresorhus@gmail.com",
- "url": "sindresorhus.com"
- },
- "engines": {
- "node": ">=4"
- },
- "scripts": {
- "test": "xo && ava && npm run optimization-test",
- "optimization-test": "node --allow-natives-syntax optimization-test.js"
- },
- "files": [
- "index.js"
- ],
- "keywords": [
- "promise",
- "promises",
- "promisify",
- "all",
- "denodify",
- "denodeify",
- "callback",
- "cb",
- "node",
- "then",
- "thenify",
- "convert",
- "transform",
- "wrap",
- "wrapper",
- "bind",
- "to",
- "async",
- "await",
- "es2015",
- "bluebird"
- ],
- "devDependencies": {
- "ava": "*",
- "pinkie-promise": "^2.0.0",
- "v8-natives": "^1.0.0",
- "xo": "*"
- }
-}
+++ /dev/null
-# pify [![Build Status](https://travis-ci.org/sindresorhus/pify.svg?branch=master)](https://travis-ci.org/sindresorhus/pify)
-
-> Promisify a callback-style function
-
-
-## Install
-
-```
-$ npm install --save pify
-```
-
-
-## Usage
-
-```js
-const fs = require('fs');
-const pify = require('pify');
-
-// Promisify a single function
-pify(fs.readFile)('package.json', 'utf8').then(data => {
- console.log(JSON.parse(data).name);
- //=> 'pify'
-});
-
-// Promisify all methods in a module
-pify(fs).readFile('package.json', 'utf8').then(data => {
- console.log(JSON.parse(data).name);
- //=> 'pify'
-});
-```
-
-
-## API
-
-### pify(input, [options])
-
-Returns a `Promise` wrapped version of the supplied function or module.
-
-#### input
-
-Type: `Function` `Object`
-
-Callback-style function or module whose methods you want to promisify.
-
-#### options
-
-##### multiArgs
-
-Type: `boolean`<br>
-Default: `false`
-
-By default, the promisified function will only return the second argument from the callback, which works fine for most APIs. This option can be useful for modules like `request` that return multiple arguments. Turning this on will make it return an array of all arguments from the callback, excluding the error argument, instead of just the second argument. This also applies to rejections, where it returns an array of all the callback arguments, including the error.
-
-```js
-const request = require('request');
-const pify = require('pify');
-
-pify(request, {multiArgs: true})('https://sindresorhus.com').then(result => {
- const [httpResponse, body] = result;
-});
-```
-
-##### include
-
-Type: `string[]` `RegExp[]`
-
-Methods in a module to promisify. Remaining methods will be left untouched.
-
-##### exclude
-
-Type: `string[]` `RegExp[]`<br>
-Default: `[/.+(Sync|Stream)$/]`
-
-Methods in a module **not** to promisify. Methods with names ending with `'Sync'` are excluded by default.
-
-##### excludeMain
-
-Type: `boolean`<br>
-Default: `false`
-
-If given module is a function itself, it will be promisified. Turn this option on if you want to promisify only methods of the module.
-
-```js
-const pify = require('pify');
-
-function fn() {
- return true;
-}
-
-fn.method = (data, callback) => {
- setImmediate(() => {
- callback(null, data);
- });
-};
-
-// Promisify methods but not `fn()`
-const promiseFn = pify(fn, {excludeMain: true});
-
-if (promiseFn()) {
- promiseFn.method('hi').then(data => {
- console.log(data);
- });
-}
-```
-
-##### errorFirst
-
-Type: `boolean`<br>
-Default: `true`
-
-Whether the callback has an error as the first argument. You'll want to set this to `false` if you're dealing with an API that doesn't have an error as the first argument, like `fs.exists()`, some browser APIs, Chrome Extension APIs, etc.
-
-##### promiseModule
-
-Type: `Function`
-
-Custom promise module to use instead of the native one.
-
-Check out [`pinkie-promise`](https://github.com/floatdrop/pinkie-promise) if you need a tiny promise polyfill.
-
-
-## Related
-
-- [p-event](https://github.com/sindresorhus/p-event) - Promisify an event by waiting for it to be emitted
-- [p-map](https://github.com/sindresorhus/p-map) - Map over promises concurrently
-- [More…](https://github.com/sindresorhus/promise-fun)
-
-
-## License
-
-MIT © [Sindre Sorhus](https://sindresorhus.com)
+++ /dev/null
-'use strict';
-module.exports = (url, opts) => {
- if (typeof url !== 'string') {
- throw new TypeError(`Expected \`url\` to be of type \`string\`, got \`${typeof url}\``);
- }
-
- url = url.trim();
- opts = Object.assign({https: false}, opts);
-
- if (/^\.*\/|^(?!localhost)\w+:/.test(url)) {
- return url;
- }
-
- return url.replace(/^(?!(?:\w+:)?\/\/)/, opts.https ? 'https://' : 'http://');
-};
+++ /dev/null
-MIT License
-
-Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
-
-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.
+++ /dev/null
-{
- "name": "prepend-http",
- "version": "2.0.0",
- "description": "Prepend `http://` to humanized URLs like todomvc.com and localhost",
- "license": "MIT",
- "repository": "sindresorhus/prepend-http",
- "author": {
- "name": "Sindre Sorhus",
- "email": "sindresorhus@gmail.com",
- "url": "sindresorhus.com"
- },
- "engines": {
- "node": ">=4"
- },
- "scripts": {
- "test": "xo && ava"
- },
- "files": [
- "index.js"
- ],
- "keywords": [
- "prepend",
- "protocol",
- "scheme",
- "url",
- "uri",
- "http",
- "https",
- "humanized"
- ],
- "devDependencies": {
- "ava": "*",
- "xo": "*"
- }
-}
+++ /dev/null
-# prepend-http [![Build Status](https://travis-ci.org/sindresorhus/prepend-http.svg?branch=master)](https://travis-ci.org/sindresorhus/prepend-http)
-
-> Prepend `http://` to humanized URLs like `todomvc.com` and `localhost`
-
-
-## Install
-
-```
-$ npm install prepend-http
-```
-
-
-## Usage
-
-```js
-const prependHttp = require('prepend-http');
-
-prependHttp('todomvc.com');
-//=> 'http://todomvc.com'
-
-prependHttp('localhost');
-//=> 'http://localhost'
-
-prependHttp('http://todomvc.com');
-//=> 'http://todomvc.com'
-
-prependHttp('todomvc.com', {https: true});
-//=> 'https://todomvc.com'
-```
-
-
-## API
-
-### prependHttp(url, [options])
-
-#### url
-
-Type: `string`
-
-URL to prepend `http://` on.
-
-#### options
-
-Type: `Object`
-
-##### https
-
-Type: `boolean`<br>
-Default: `false`
-
-Prepend `https://` instead of `http://`.
-
-
-## License
-
-MIT © [Sindre Sorhus](https://sindresorhus.com)
+++ /dev/null
-'use strict';
-
-if (!process.version ||
- process.version.indexOf('v0.') === 0 ||
- process.version.indexOf('v1.') === 0 && process.version.indexOf('v1.8.') !== 0) {
- module.exports = { nextTick: nextTick };
-} else {
- module.exports = process
-}
-
-function nextTick(fn, arg1, arg2, arg3) {
- if (typeof fn !== 'function') {
- throw new TypeError('"callback" argument must be a function');
- }
- var len = arguments.length;
- var args, i;
- switch (len) {
- case 0:
- case 1:
- return process.nextTick(fn);
- case 2:
- return process.nextTick(function afterTickOne() {
- fn.call(null, arg1);
- });
- case 3:
- return process.nextTick(function afterTickTwo() {
- fn.call(null, arg1, arg2);
- });
- case 4:
- return process.nextTick(function afterTickThree() {
- fn.call(null, arg1, arg2, arg3);
- });
- default:
- args = new Array(len - 1);
- i = 0;
- while (i < args.length) {
- args[i++] = arguments[i];
- }
- return process.nextTick(function afterTick() {
- fn.apply(null, args);
- });
- }
-}
-
+++ /dev/null
-# Copyright (c) 2015 Calvin Metcalf
-
-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.**
+++ /dev/null
-{
- "name": "process-nextick-args",
- "version": "2.0.0",
- "description": "process.nextTick but always with args",
- "main": "index.js",
- "files": [
- "index.js"
- ],
- "scripts": {
- "test": "node test.js"
- },
- "repository": {
- "type": "git",
- "url": "https://github.com/calvinmetcalf/process-nextick-args.git"
- },
- "author": "",
- "license": "MIT",
- "bugs": {
- "url": "https://github.com/calvinmetcalf/process-nextick-args/issues"
- },
- "homepage": "https://github.com/calvinmetcalf/process-nextick-args",
- "devDependencies": {
- "tap": "~0.2.6"
- }
-}
+++ /dev/null
-process-nextick-args
-=====
-
-[![Build Status](https://travis-ci.org/calvinmetcalf/process-nextick-args.svg?branch=master)](https://travis-ci.org/calvinmetcalf/process-nextick-args)
-
-```bash
-npm install --save process-nextick-args
-```
-
-Always be able to pass arguments to process.nextTick, no matter the platform
-
-```js
-var pna = require('process-nextick-args');
-
-pna.nextTick(function (a, b, c) {
- console.log(a, b, c);
-}, 'step', 3, 'profit');
-```
+++ /dev/null
-'use strict';
-var strictUriEncode = require('strict-uri-encode');
-var objectAssign = require('object-assign');
-var decodeComponent = require('decode-uri-component');
-
-function encoderForArrayFormat(opts) {
- switch (opts.arrayFormat) {
- case 'index':
- return function (key, value, index) {
- return value === null ? [
- encode(key, opts),
- '[',
- index,
- ']'
- ].join('') : [
- encode(key, opts),
- '[',
- encode(index, opts),
- ']=',
- encode(value, opts)
- ].join('');
- };
-
- case 'bracket':
- return function (key, value) {
- return value === null ? encode(key, opts) : [
- encode(key, opts),
- '[]=',
- encode(value, opts)
- ].join('');
- };
-
- default:
- return function (key, value) {
- return value === null ? encode(key, opts) : [
- encode(key, opts),
- '=',
- encode(value, opts)
- ].join('');
- };
- }
-}
-
-function parserForArrayFormat(opts) {
- var result;
-
- switch (opts.arrayFormat) {
- case 'index':
- return function (key, value, accumulator) {
- result = /\[(\d*)\]$/.exec(key);
-
- key = key.replace(/\[\d*\]$/, '');
-
- if (!result) {
- accumulator[key] = value;
- return;
- }
-
- if (accumulator[key] === undefined) {
- accumulator[key] = {};
- }
-
- accumulator[key][result[1]] = value;
- };
-
- case 'bracket':
- return function (key, value, accumulator) {
- result = /(\[\])$/.exec(key);
- key = key.replace(/\[\]$/, '');
-
- if (!result) {
- accumulator[key] = value;
- return;
- } else if (accumulator[key] === undefined) {
- accumulator[key] = [value];
- return;
- }
-
- accumulator[key] = [].concat(accumulator[key], value);
- };
-
- default:
- return function (key, value, accumulator) {
- if (accumulator[key] === undefined) {
- accumulator[key] = value;
- return;
- }
-
- accumulator[key] = [].concat(accumulator[key], value);
- };
- }
-}
-
-function encode(value, opts) {
- if (opts.encode) {
- return opts.strict ? strictUriEncode(value) : encodeURIComponent(value);
- }
-
- return value;
-}
-
-function keysSorter(input) {
- if (Array.isArray(input)) {
- return input.sort();
- } else if (typeof input === 'object') {
- return keysSorter(Object.keys(input)).sort(function (a, b) {
- return Number(a) - Number(b);
- }).map(function (key) {
- return input[key];
- });
- }
-
- return input;
-}
-
-function extract(str) {
- var queryStart = str.indexOf('?');
- if (queryStart === -1) {
- return '';
- }
- return str.slice(queryStart + 1);
-}
-
-function parse(str, opts) {
- opts = objectAssign({arrayFormat: 'none'}, opts);
-
- var formatter = parserForArrayFormat(opts);
-
- // Create an object with no prototype
- // https://github.com/sindresorhus/query-string/issues/47
- var ret = Object.create(null);
-
- if (typeof str !== 'string') {
- return ret;
- }
-
- str = str.trim().replace(/^[?#&]/, '');
-
- if (!str) {
- return ret;
- }
-
- str.split('&').forEach(function (param) {
- var parts = param.replace(/\+/g, ' ').split('=');
- // Firefox (pre 40) decodes `%3D` to `=`
- // https://github.com/sindresorhus/query-string/pull/37
- var key = parts.shift();
- var val = parts.length > 0 ? parts.join('=') : undefined;
-
- // missing `=` should be `null`:
- // http://w3.org/TR/2012/WD-url-20120524/#collect-url-parameters
- val = val === undefined ? null : decodeComponent(val);
-
- formatter(decodeComponent(key), val, ret);
- });
-
- return Object.keys(ret).sort().reduce(function (result, key) {
- var val = ret[key];
- if (Boolean(val) && typeof val === 'object' && !Array.isArray(val)) {
- // Sort object keys, not values
- result[key] = keysSorter(val);
- } else {
- result[key] = val;
- }
-
- return result;
- }, Object.create(null));
-}
-
-exports.extract = extract;
-exports.parse = parse;
-
-exports.stringify = function (obj, opts) {
- var defaults = {
- encode: true,
- strict: true,
- arrayFormat: 'none'
- };
-
- opts = objectAssign(defaults, opts);
-
- if (opts.sort === false) {
- opts.sort = function () {};
- }
-
- var formatter = encoderForArrayFormat(opts);
-
- return obj ? Object.keys(obj).sort(opts.sort).map(function (key) {
- var val = obj[key];
-
- if (val === undefined) {
- return '';
- }
-
- if (val === null) {
- return encode(key, opts);
- }
-
- if (Array.isArray(val)) {
- var result = [];
-
- val.slice().forEach(function (val2) {
- if (val2 === undefined) {
- return;
- }
-
- result.push(formatter(key, val2, result.length));
- });
-
- return result.join('&');
- }
-
- return encode(key, opts) + '=' + encode(val, opts);
- }).filter(function (x) {
- return x.length > 0;
- }).join('&') : '';
-};
-
-exports.parseUrl = function (str, opts) {
- return {
- url: str.split('?')[0] || '',
- query: parse(extract(str), opts)
- };
-};
+++ /dev/null
-MIT License
-
-Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
-
-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.
+++ /dev/null
-{
- "name": "query-string",
- "version": "5.1.1",
- "description": "Parse and stringify URL query strings",
- "license": "MIT",
- "repository": "sindresorhus/query-string",
- "author": {
- "name": "Sindre Sorhus",
- "email": "sindresorhus@gmail.com",
- "url": "sindresorhus.com"
- },
- "engines": {
- "node": ">=0.10.0"
- },
- "scripts": {
- "test": "xo && ava"
- },
- "files": [
- "index.js"
- ],
- "keywords": [
- "browser",
- "querystring",
- "query",
- "string",
- "qs",
- "param",
- "parameter",
- "url",
- "uri",
- "parse",
- "stringify",
- "encode",
- "decode"
- ],
- "dependencies": {
- "decode-uri-component": "^0.2.0",
- "object-assign": "^4.1.0",
- "strict-uri-encode": "^1.0.0"
- },
- "devDependencies": {
- "ava": "^0.17.0",
- "xo": "^0.16.0"
- }
-}
+++ /dev/null
-# query-string [![Build Status](https://travis-ci.org/sindresorhus/query-string.svg?branch=master)](https://travis-ci.org/sindresorhus/query-string)
-
-> Parse and stringify URL [query strings](https://en.wikipedia.org/wiki/Query_string)
-
----
-
-<p align="center"><b>🔥 Want to strengthen your core JavaScript skills and master ES6?</b><br>I would personally recommend this awesome <a href="https://ES6.io/friend/AWESOME">ES6 course</a> by Wes Bos.<br>Also check out his <a href="https://LearnNode.com/friend/AWESOME">Node.js</a>, <a href="https://ReactForBeginners.com/friend/AWESOME">React</a>, <a href="https://SublimeTextBook.com/friend/AWESOME">Sublime</a> courses.</p>
-
----
-
-
-## Install
-
-```
-$ npm install query-string
-```
-
-<a href="https://www.patreon.com/sindresorhus">
- <img src="https://c5.patreon.com/external/logo/become_a_patron_button@2x.png" width="160">
-</a>
-
-
-## Usage
-
-```js
-const queryString = require('query-string');
-
-console.log(location.search);
-//=> '?foo=bar'
-
-const parsed = queryString.parse(location.search);
-console.log(parsed);
-//=> {foo: 'bar'}
-
-console.log(location.hash);
-//=> '#token=bada55cafe'
-
-const parsedHash = queryString.parse(location.hash);
-console.log(parsedHash);
-//=> {token: 'bada55cafe'}
-
-parsed.foo = 'unicorn';
-parsed.ilike = 'pizza';
-
-const stringified = queryString.stringify(parsed);
-//=> 'foo=unicorn&ilike=pizza'
-
-location.search = stringified;
-// note that `location.search` automatically prepends a question mark
-console.log(location.search);
-//=> '?foo=unicorn&ilike=pizza'
-```
-
-
-## API
-
-### .parse(*string*, *[options]*)
-
-Parse a query string into an object. Leading `?` or `#` are ignored, so you can pass `location.search` or `location.hash` directly.
-
-The returned object is created with [`Object.create(null)`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/create) and thus does not have a `prototype`.
-
-URI components are decoded with [`decode-uri-component`](https://github.com/SamVerschueren/decode-uri-component).
-
-#### arrayFormat
-
-Type: `string`<br>
-Default: `'none'`
-
-Supports both `index` for an indexed array representation or `bracket` for a *bracketed* array representation.
-
-- `bracket`: stands for parsing correctly arrays with bracket representation on the query string, such as:
-
-```js
-queryString.parse('foo[]=1&foo[]=2&foo[]=3', {arrayFormat: 'bracket'});
-//=> foo: [1,2,3]
-```
-
-- `index`: stands for parsing taking the index into account, such as:
-
-```js
-queryString.parse('foo[0]=1&foo[1]=2&foo[3]=3', {arrayFormat: 'index'});
-//=> foo: [1,2,3]
-```
-
-- `none`: is the **default** option and removes any bracket representation, such as:
-
-```js
-queryString.parse('foo=1&foo=2&foo=3');
-//=> foo: [1,2,3]
-```
-
-### .stringify(*object*, *[options]*)
-
-Stringify an object into a query string, sorting the keys.
-
-#### strict
-
-Type: `boolean`<br>
-Default: `true`
-
-Strictly encode URI components with [strict-uri-encode](https://github.com/kevva/strict-uri-encode). It uses [encodeURIComponent](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/encodeURIComponent)
-if set to false. You probably [don't care](https://github.com/sindresorhus/query-string/issues/42) about this option.
-
-#### encode
-
-Type: `boolean`<br>
-Default: `true`
-
-[URL encode](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/encodeURIComponent) the keys and values.
-
-#### arrayFormat
-
-Type: `string`<br>
-Default: `'none'`
-
-Supports both `index` for an indexed array representation or `bracket` for a *bracketed* array representation.
-
-- `bracket`: stands for parsing correctly arrays with bracket representation on the query string, such as:
-
-```js
-queryString.stringify({foo: [1,2,3]}, {arrayFormat: 'bracket'});
-// => foo[]=1&foo[]=2&foo[]=3
-```
-
-- `index`: stands for parsing taking the index into account, such as:
-
-```js
-queryString.stringify({foo: [1,2,3]}, {arrayFormat: 'index'});
-// => foo[0]=1&foo[1]=2&foo[3]=3
-```
-
-- `none`: is the __default__ option and removes any bracket representation, such as:
-
-```js
-queryString.stringify({foo: [1,2,3]});
-// => foo=1&foo=2&foo=3
-```
-
-#### sort
-
-Type: `Function` `boolean`
-
-Supports both `Function` as a custom sorting function or `false` to disable sorting.
-
-```js
-const order = ['c', 'a', 'b'];
-queryString.stringify({ a: 1, b: 2, c: 3}, {
- sort: (m, n) => order.indexOf(m) >= order.indexOf(n)
-});
-// => 'c=3&a=1&b=2'
-```
-
-```js
-queryString.stringify({ b: 1, c: 2, a: 3}, {sort: false});
-// => 'c=3&a=1&b=2'
-```
-
-If omitted, keys are sorted using `Array#sort`, which means, converting them to strings and comparing strings in Unicode code point order.
-
-### .extract(*string*)
-
-Extract a query string from a URL that can be passed into `.parse()`.
-
-### .parseUrl(*string*, *[options]*)
-
-Extract the URL and the query string as an object.
-
-The `options` are the same as for `.parse()`.
-
-Returns an object with a `url` and `query` property.
-
-```js
-queryString.parseUrl('https://foo.bar?foo=bar');
-//=> {url: 'https://foo.bar', query: {foo: 'bar'}}
-```
-
-
-## Nesting
-
-This module intentionally doesn't support nesting as it's not spec'd and varies between implementations, which causes a lot of [edge cases](https://github.com/visionmedia/node-querystring/issues).
-
-You're much better off just converting the object to a JSON string:
-
-```js
-queryString.stringify({
- foo: 'bar',
- nested: JSON.stringify({
- unicorn: 'cake'
- })
-});
-//=> 'foo=bar&nested=%7B%22unicorn%22%3A%22cake%22%7D'
-```
-
-However, there is support for multiple instances of the same key:
-
-```js
-queryString.parse('likes=cake&name=bob&likes=icecream');
-//=> {likes: ['cake', 'icecream'], name: 'bob'}
-
-queryString.stringify({color: ['taupe', 'chartreuse'], id: '515'});
-//=> 'color=chartreuse&color=taupe&id=515'
-```
-
-
-## Falsy values
-
-Sometimes you want to unset a key, or maybe just make it present without assigning a value to it. Here is how falsy values are stringified:
-
-```js
-queryString.stringify({foo: false});
-//=> 'foo=false'
-
-queryString.stringify({foo: null});
-//=> 'foo'
-
-queryString.stringify({foo: undefined});
-//=> ''
-```
-
-
-## License
-
-MIT © [Sindre Sorhus](https://sindresorhus.com)
+++ /dev/null
-sudo: false
-language: node_js
-before_install:
- - npm install -g npm@2
- - test $NPM_LEGACY && npm install -g npm@latest-3 || npm install npm -g
-notifications:
- email: false
-matrix:
- fast_finish: true
- include:
- - node_js: '0.8'
- env:
- - TASK=test
- - NPM_LEGACY=true
- - node_js: '0.10'
- env:
- - TASK=test
- - NPM_LEGACY=true
- - node_js: '0.11'
- env:
- - TASK=test
- - NPM_LEGACY=true
- - node_js: '0.12'
- env:
- - TASK=test
- - NPM_LEGACY=true
- - node_js: 1
- env:
- - TASK=test
- - NPM_LEGACY=true
- - node_js: 2
- env:
- - TASK=test
- - NPM_LEGACY=true
- - node_js: 3
- env:
- - TASK=test
- - NPM_LEGACY=true
- - node_js: 4
- env: TASK=test
- - node_js: 5
- env: TASK=test
- - node_js: 6
- env: TASK=test
- - node_js: 7
- env: TASK=test
- - node_js: 8
- env: TASK=test
- - node_js: 9
- env: TASK=test
-script: "npm run $TASK"
-env:
- global:
- - secure: rE2Vvo7vnjabYNULNyLFxOyt98BoJexDqsiOnfiD6kLYYsiQGfr/sbZkPMOFm9qfQG7pjqx+zZWZjGSswhTt+626C0t/njXqug7Yps4c3dFblzGfreQHp7wNX5TFsvrxd6dAowVasMp61sJcRnB2w8cUzoe3RAYUDHyiHktwqMc=
- - secure: g9YINaKAdMatsJ28G9jCGbSaguXCyxSTy+pBO6Ch0Cf57ZLOTka3HqDj8p3nV28LUIHZ3ut5WO43CeYKwt4AUtLpBS3a0dndHdY6D83uY6b2qh5hXlrcbeQTq2cvw2y95F7hm4D1kwrgZ7ViqaKggRcEupAL69YbJnxeUDKWEdI=
+++ /dev/null
-# Developer's Certificate of Origin 1.1
-
-By making a contribution to this project, I certify that:
-
-* (a) The contribution was created in whole or in part by me and I
- have the right to submit it under the open source license
- indicated in the file; or
-
-* (b) The contribution is based upon previous work that, to the best
- of my knowledge, is covered under an appropriate open source
- license and I have the right under that license to submit that
- work with modifications, whether created in whole or in part
- by me, under the same open source license (unless I am
- permitted to submit under a different license), as indicated
- in the file; or
-
-* (c) The contribution was provided directly to me by some other
- person who certified (a), (b) or (c) and I have not modified
- it.
-
-* (d) I understand and agree that this project and the contribution
- are public and that a record of the contribution (including all
- personal information I submit with it, including my sign-off) is
- maintained indefinitely and may be redistributed consistent with
- this project or the open source license(s) involved.
-
-## Moderation Policy
-
-The [Node.js Moderation Policy] applies to this WG.
-
-## Code of Conduct
-
-The [Node.js Code of Conduct][] applies to this WG.
-
-[Node.js Code of Conduct]:
-https://github.com/nodejs/node/blob/master/CODE_OF_CONDUCT.md
-[Node.js Moderation Policy]:
-https://github.com/nodejs/TSC/blob/master/Moderation-Policy.md
+++ /dev/null
-### Streams Working Group
-
-The Node.js Streams is jointly governed by a Working Group
-(WG)
-that is responsible for high-level guidance of the project.
-
-The WG has final authority over this project including:
-
-* Technical direction
-* Project governance and process (including this policy)
-* Contribution policy
-* GitHub repository hosting
-* Conduct guidelines
-* Maintaining the list of additional Collaborators
-
-For the current list of WG members, see the project
-[README.md](./README.md#current-project-team-members).
-
-### Collaborators
-
-The readable-stream GitHub repository is
-maintained by the WG and additional Collaborators who are added by the
-WG on an ongoing basis.
-
-Individuals making significant and valuable contributions are made
-Collaborators and given commit-access to the project. These
-individuals are identified by the WG and their addition as
-Collaborators is discussed during the WG meeting.
-
-_Note:_ If you make a significant contribution and are not considered
-for commit-access log an issue or contact a WG member directly and it
-will be brought up in the next WG meeting.
-
-Modifications of the contents of the readable-stream repository are
-made on
-a collaborative basis. Anybody with a GitHub account may propose a
-modification via pull request and it will be considered by the project
-Collaborators. All pull requests must be reviewed and accepted by a
-Collaborator with sufficient expertise who is able to take full
-responsibility for the change. In the case of pull requests proposed
-by an existing Collaborator, an additional Collaborator is required
-for sign-off. Consensus should be sought if additional Collaborators
-participate and there is disagreement around a particular
-modification. See _Consensus Seeking Process_ below for further detail
-on the consensus model used for governance.
-
-Collaborators may opt to elevate significant or controversial
-modifications, or modifications that have not found consensus to the
-WG for discussion by assigning the ***WG-agenda*** tag to a pull
-request or issue. The WG should serve as the final arbiter where
-required.
-
-For the current list of Collaborators, see the project
-[README.md](./README.md#members).
-
-### WG Membership
-
-WG seats are not time-limited. There is no fixed size of the WG.
-However, the expected target is between 6 and 12, to ensure adequate
-coverage of important areas of expertise, balanced with the ability to
-make decisions efficiently.
-
-There is no specific set of requirements or qualifications for WG
-membership beyond these rules.
-
-The WG may add additional members to the WG by unanimous consensus.
-
-A WG member may be removed from the WG by voluntary resignation, or by
-unanimous consensus of all other WG members.
-
-Changes to WG membership should be posted in the agenda, and may be
-suggested as any other agenda item (see "WG Meetings" below).
-
-If an addition or removal is proposed during a meeting, and the full
-WG is not in attendance to participate, then the addition or removal
-is added to the agenda for the subsequent meeting. This is to ensure
-that all members are given the opportunity to participate in all
-membership decisions. If a WG member is unable to attend a meeting
-where a planned membership decision is being made, then their consent
-is assumed.
-
-No more than 1/3 of the WG members may be affiliated with the same
-employer. If removal or resignation of a WG member, or a change of
-employment by a WG member, creates a situation where more than 1/3 of
-the WG membership shares an employer, then the situation must be
-immediately remedied by the resignation or removal of one or more WG
-members affiliated with the over-represented employer(s).
-
-### WG Meetings
-
-The WG meets occasionally on a Google Hangout On Air. A designated moderator
-approved by the WG runs the meeting. Each meeting should be
-published to YouTube.
-
-Items are added to the WG agenda that are considered contentious or
-are modifications of governance, contribution policy, WG membership,
-or release process.
-
-The intention of the agenda is not to approve or review all patches;
-that should happen continuously on GitHub and be handled by the larger
-group of Collaborators.
-
-Any community member or contributor can ask that something be added to
-the next meeting's agenda by logging a GitHub Issue. Any Collaborator,
-WG member or the moderator can add the item to the agenda by adding
-the ***WG-agenda*** tag to the issue.
-
-Prior to each WG meeting the moderator will share the Agenda with
-members of the WG. WG members can add any items they like to the
-agenda at the beginning of each meeting. The moderator and the WG
-cannot veto or remove items.
-
-The WG may invite persons or representatives from certain projects to
-participate in a non-voting capacity.
-
-The moderator is responsible for summarizing the discussion of each
-agenda item and sends it as a pull request after the meeting.
-
-### Consensus Seeking Process
-
-The WG follows a
-[Consensus
-Seeking](http://en.wikipedia.org/wiki/Consensus-seeking_decision-making)
-decision-making model.
-
-When an agenda item has appeared to reach a consensus the moderator
-will ask "Does anyone object?" as a final call for dissent from the
-consensus.
-
-If an agenda item cannot reach a consensus a WG member can call for
-either a closing vote or a vote to table the issue to the next
-meeting. The call for a vote must be seconded by a majority of the WG
-or else the discussion will continue. Simple majority wins.
-
-Note that changes to WG membership require a majority consensus. See
-"WG Membership" above.
+++ /dev/null
-Node.js is licensed for use as follows:
-
-"""
-Copyright Node.js contributors. All rights reserved.
-
-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.
-"""
-
-This license applies to parts of Node.js originating from the
-https://github.com/joyent/node repository:
-
-"""
-Copyright Joyent, Inc. and other Node contributors. All rights reserved.
-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.
-"""
+++ /dev/null
-# readable-stream
-
-***Node-core v8.11.1 streams for userland*** [![Build Status](https://travis-ci.org/nodejs/readable-stream.svg?branch=master)](https://travis-ci.org/nodejs/readable-stream)
-
-
-[![NPM](https://nodei.co/npm/readable-stream.png?downloads=true&downloadRank=true)](https://nodei.co/npm/readable-stream/)
-[![NPM](https://nodei.co/npm-dl/readable-stream.png?&months=6&height=3)](https://nodei.co/npm/readable-stream/)
-
-
-[![Sauce Test Status](https://saucelabs.com/browser-matrix/readable-stream.svg)](https://saucelabs.com/u/readable-stream)
-
-```bash
-npm install --save readable-stream
-```
-
-***Node-core streams for userland***
-
-This package is a mirror of the Streams2 and Streams3 implementations in
-Node-core.
-
-Full documentation may be found on the [Node.js website](https://nodejs.org/dist/v8.11.1/docs/api/stream.html).
-
-If you want to guarantee a stable streams base, regardless of what version of
-Node you, or the users of your libraries are using, use **readable-stream** *only* and avoid the *"stream"* module in Node-core, for background see [this blogpost](http://r.va.gg/2014/06/why-i-dont-use-nodes-core-stream-module.html).
-
-As of version 2.0.0 **readable-stream** uses semantic versioning.
-
-# Streams Working Group
-
-`readable-stream` is maintained by the Streams Working Group, which
-oversees the development and maintenance of the Streams API within
-Node.js. The responsibilities of the Streams Working Group include:
-
-* Addressing stream issues on the Node.js issue tracker.
-* Authoring and editing stream documentation within the Node.js project.
-* Reviewing changes to stream subclasses within the Node.js project.
-* Redirecting changes to streams from the Node.js project to this
- project.
-* Assisting in the implementation of stream providers within Node.js.
-* Recommending versions of `readable-stream` to be included in Node.js.
-* Messaging about the future of streams to give the community advance
- notice of changes.
-
-<a name="members"></a>
-## Team Members
-
-* **Chris Dickinson** ([@chrisdickinson](https://github.com/chrisdickinson)) <christopher.s.dickinson@gmail.com>
- - Release GPG key: 9554F04D7259F04124DE6B476D5A82AC7E37093B
-* **Calvin Metcalf** ([@calvinmetcalf](https://github.com/calvinmetcalf)) <calvin.metcalf@gmail.com>
- - Release GPG key: F3EF5F62A87FC27A22E643F714CE4FF5015AA242
-* **Rod Vagg** ([@rvagg](https://github.com/rvagg)) <rod@vagg.org>
- - Release GPG key: DD8F2338BAE7501E3DD5AC78C273792F7D83545D
-* **Sam Newman** ([@sonewman](https://github.com/sonewman)) <newmansam@outlook.com>
-* **Mathias Buus** ([@mafintosh](https://github.com/mafintosh)) <mathiasbuus@gmail.com>
-* **Domenic Denicola** ([@domenic](https://github.com/domenic)) <d@domenic.me>
-* **Matteo Collina** ([@mcollina](https://github.com/mcollina)) <matteo.collina@gmail.com>
- - Release GPG key: 3ABC01543F22DD2239285CDD818674489FBC127E
-* **Irina Shestak** ([@lrlna](https://github.com/lrlna)) <shestak.irina@gmail.com>
+++ /dev/null
-# streams WG Meeting 2015-01-30
-
-## Links
-
-* **Google Hangouts Video**: http://www.youtube.com/watch?v=I9nDOSGfwZg
-* **GitHub Issue**: https://github.com/iojs/readable-stream/issues/106
-* **Original Minutes Google Doc**: https://docs.google.com/document/d/17aTgLnjMXIrfjgNaTUnHQO7m3xgzHR2VXBTmi03Qii4/
-
-## Agenda
-
-Extracted from https://github.com/iojs/readable-stream/labels/wg-agenda prior to meeting.
-
-* adopt a charter [#105](https://github.com/iojs/readable-stream/issues/105)
-* release and versioning strategy [#101](https://github.com/iojs/readable-stream/issues/101)
-* simpler stream creation [#102](https://github.com/iojs/readable-stream/issues/102)
-* proposal: deprecate implicit flowing of streams [#99](https://github.com/iojs/readable-stream/issues/99)
-
-## Minutes
-
-### adopt a charter
-
-* group: +1's all around
-
-### What versioning scheme should be adopted?
-* group: +1’s 3.0.0
-* domenic+group: pulling in patches from other sources where appropriate
-* mikeal: version independently, suggesting versions for io.js
-* mikeal+domenic: work with TC to notify in advance of changes
-simpler stream creation
-
-### streamline creation of streams
-* sam: streamline creation of streams
-* domenic: nice simple solution posted
- but, we lose the opportunity to change the model
- may not be backwards incompatible (double check keys)
-
- **action item:** domenic will check
-
-### remove implicit flowing of streams on(‘data’)
-* add isFlowing / isPaused
-* mikeal: worrying that we’re documenting polyfill methods – confuses users
-* domenic: more reflective API is probably good, with warning labels for users
-* new section for mad scientists (reflective stream access)
-* calvin: name the “third state”
-* mikeal: maybe borrow the name from whatwg?
-* domenic: we’re missing the “third state”
-* consensus: kind of difficult to name the third state
-* mikeal: figure out differences in states / compat
-* mathias: always flow on data – eliminates third state
- * explore what it breaks
-
-**action items:**
-* ask isaac for ability to list packages by what public io.js APIs they use (esp. Stream)
-* ask rod/build for infrastructure
-* **chris**: explore the “flow on data” approach
-* add isPaused/isFlowing
-* add new docs section
-* move isPaused to that section
-
-
+++ /dev/null
-module.exports = require('./lib/_stream_duplex.js');
+++ /dev/null
-module.exports = require('./readable').Duplex
+++ /dev/null
-// 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.
-
-// a duplex stream is just a stream that is both readable and writable.
-// Since JS doesn't have multiple prototypal inheritance, this class
-// prototypally inherits from Readable, and then parasitically from
-// Writable.
-
-'use strict';
-
-/*<replacement>*/
-
-var pna = require('process-nextick-args');
-/*</replacement>*/
-
-/*<replacement>*/
-var objectKeys = Object.keys || function (obj) {
- var keys = [];
- for (var key in obj) {
- keys.push(key);
- }return keys;
-};
-/*</replacement>*/
-
-module.exports = Duplex;
-
-/*<replacement>*/
-var util = require('core-util-is');
-util.inherits = require('inherits');
-/*</replacement>*/
-
-var Readable = require('./_stream_readable');
-var Writable = require('./_stream_writable');
-
-util.inherits(Duplex, Readable);
-
-{
- // avoid scope creep, the keys array can then be collected
- var keys = objectKeys(Writable.prototype);
- for (var v = 0; v < keys.length; v++) {
- var method = keys[v];
- if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method];
- }
-}
-
-function Duplex(options) {
- if (!(this instanceof Duplex)) return new Duplex(options);
-
- Readable.call(this, options);
- Writable.call(this, options);
-
- if (options && options.readable === false) this.readable = false;
-
- if (options && options.writable === false) this.writable = false;
-
- this.allowHalfOpen = true;
- if (options && options.allowHalfOpen === false) this.allowHalfOpen = false;
-
- this.once('end', onend);
-}
-
-Object.defineProperty(Duplex.prototype, 'writableHighWaterMark', {
- // making it explicit this property is not enumerable
- // because otherwise some prototype manipulation in
- // userland will fail
- enumerable: false,
- get: function () {
- return this._writableState.highWaterMark;
- }
-});
-
-// the no-half-open enforcer
-function onend() {
- // if we allow half-open state, or if the writable side ended,
- // then we're ok.
- if (this.allowHalfOpen || this._writableState.ended) return;
-
- // no more data can be written.
- // But allow more writes to happen in this tick.
- pna.nextTick(onEndNT, this);
-}
-
-function onEndNT(self) {
- self.end();
-}
-
-Object.defineProperty(Duplex.prototype, 'destroyed', {
- get: function () {
- if (this._readableState === undefined || this._writableState === undefined) {
- return false;
- }
- return this._readableState.destroyed && this._writableState.destroyed;
- },
- set: function (value) {
- // we ignore the value if the stream
- // has not been initialized yet
- if (this._readableState === undefined || this._writableState === undefined) {
- return;
- }
-
- // backward compatibility, the user is explicitly
- // managing destroyed
- this._readableState.destroyed = value;
- this._writableState.destroyed = value;
- }
-});
-
-Duplex.prototype._destroy = function (err, cb) {
- this.push(null);
- this.end();
-
- pna.nextTick(cb, err);
-};
\ No newline at end of file
+++ /dev/null
-// 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.
-
-// a passthrough stream.
-// basically just the most minimal sort of Transform stream.
-// Every written chunk gets output as-is.
-
-'use strict';
-
-module.exports = PassThrough;
-
-var Transform = require('./_stream_transform');
-
-/*<replacement>*/
-var util = require('core-util-is');
-util.inherits = require('inherits');
-/*</replacement>*/
-
-util.inherits(PassThrough, Transform);
-
-function PassThrough(options) {
- if (!(this instanceof PassThrough)) return new PassThrough(options);
-
- Transform.call(this, options);
-}
-
-PassThrough.prototype._transform = function (chunk, encoding, cb) {
- cb(null, chunk);
-};
\ No newline at end of file
+++ /dev/null
-// 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.
-
-'use strict';
-
-/*<replacement>*/
-
-var pna = require('process-nextick-args');
-/*</replacement>*/
-
-module.exports = Readable;
-
-/*<replacement>*/
-var isArray = require('isarray');
-/*</replacement>*/
-
-/*<replacement>*/
-var Duplex;
-/*</replacement>*/
-
-Readable.ReadableState = ReadableState;
-
-/*<replacement>*/
-var EE = require('events').EventEmitter;
-
-var EElistenerCount = function (emitter, type) {
- return emitter.listeners(type).length;
-};
-/*</replacement>*/
-
-/*<replacement>*/
-var Stream = require('./internal/streams/stream');
-/*</replacement>*/
-
-/*<replacement>*/
-
-var Buffer = require('safe-buffer').Buffer;
-var OurUint8Array = global.Uint8Array || function () {};
-function _uint8ArrayToBuffer(chunk) {
- return Buffer.from(chunk);
-}
-function _isUint8Array(obj) {
- return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;
-}
-
-/*</replacement>*/
-
-/*<replacement>*/
-var util = require('core-util-is');
-util.inherits = require('inherits');
-/*</replacement>*/
-
-/*<replacement>*/
-var debugUtil = require('util');
-var debug = void 0;
-if (debugUtil && debugUtil.debuglog) {
- debug = debugUtil.debuglog('stream');
-} else {
- debug = function () {};
-}
-/*</replacement>*/
-
-var BufferList = require('./internal/streams/BufferList');
-var destroyImpl = require('./internal/streams/destroy');
-var StringDecoder;
-
-util.inherits(Readable, Stream);
-
-var kProxyEvents = ['error', 'close', 'destroy', 'pause', 'resume'];
-
-function prependListener(emitter, event, fn) {
- // Sadly this is not cacheable as some libraries bundle their own
- // event emitter implementation with them.
- if (typeof emitter.prependListener === 'function') return emitter.prependListener(event, fn);
-
- // This is a hack to make sure that our error handler is attached before any
- // userland ones. NEVER DO THIS. This is here only because this code needs
- // to continue to work with older versions of Node.js that do not include
- // the prependListener() method. The goal is to eventually remove this hack.
- if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]];
-}
-
-function ReadableState(options, stream) {
- Duplex = Duplex || require('./_stream_duplex');
-
- options = options || {};
-
- // Duplex streams are both readable and writable, but share
- // the same options object.
- // However, some cases require setting options to different
- // values for the readable and the writable sides of the duplex stream.
- // These options can be provided separately as readableXXX and writableXXX.
- var isDuplex = stream instanceof Duplex;
-
- // object stream flag. Used to make read(n) ignore n and to
- // make all the buffer merging and length checks go away
- this.objectMode = !!options.objectMode;
-
- if (isDuplex) this.objectMode = this.objectMode || !!options.readableObjectMode;
-
- // the point at which it stops calling _read() to fill the buffer
- // Note: 0 is a valid value, means "don't call _read preemptively ever"
- var hwm = options.highWaterMark;
- var readableHwm = options.readableHighWaterMark;
- var defaultHwm = this.objectMode ? 16 : 16 * 1024;
-
- if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (readableHwm || readableHwm === 0)) this.highWaterMark = readableHwm;else this.highWaterMark = defaultHwm;
-
- // cast to ints.
- this.highWaterMark = Math.floor(this.highWaterMark);
-
- // A linked list is used to store data chunks instead of an array because the
- // linked list can remove elements from the beginning faster than
- // array.shift()
- this.buffer = new BufferList();
- this.length = 0;
- this.pipes = null;
- this.pipesCount = 0;
- this.flowing = null;
- this.ended = false;
- this.endEmitted = false;
- this.reading = false;
-
- // a flag to be able to tell if the event 'readable'/'data' is emitted
- // immediately, or on a later tick. We set this to true at first, because
- // any actions that shouldn't happen until "later" should generally also
- // not happen before the first read call.
- this.sync = true;
-
- // whenever we return null, then we set a flag to say
- // that we're awaiting a 'readable' event emission.
- this.needReadable = false;
- this.emittedReadable = false;
- this.readableListening = false;
- this.resumeScheduled = false;
-
- // has it been destroyed
- this.destroyed = false;
-
- // Crypto is kind of old and crusty. Historically, its default string
- // encoding is 'binary' so we have to make this configurable.
- // Everything else in the universe uses 'utf8', though.
- this.defaultEncoding = options.defaultEncoding || 'utf8';
-
- // the number of writers that are awaiting a drain event in .pipe()s
- this.awaitDrain = 0;
-
- // if true, a maybeReadMore has been scheduled
- this.readingMore = false;
-
- this.decoder = null;
- this.encoding = null;
- if (options.encoding) {
- if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder;
- this.decoder = new StringDecoder(options.encoding);
- this.encoding = options.encoding;
- }
-}
-
-function Readable(options) {
- Duplex = Duplex || require('./_stream_duplex');
-
- if (!(this instanceof Readable)) return new Readable(options);
-
- this._readableState = new ReadableState(options, this);
-
- // legacy
- this.readable = true;
-
- if (options) {
- if (typeof options.read === 'function') this._read = options.read;
-
- if (typeof options.destroy === 'function') this._destroy = options.destroy;
- }
-
- Stream.call(this);
-}
-
-Object.defineProperty(Readable.prototype, 'destroyed', {
- get: function () {
- if (this._readableState === undefined) {
- return false;
- }
- return this._readableState.destroyed;
- },
- set: function (value) {
- // we ignore the value if the stream
- // has not been initialized yet
- if (!this._readableState) {
- return;
- }
-
- // backward compatibility, the user is explicitly
- // managing destroyed
- this._readableState.destroyed = value;
- }
-});
-
-Readable.prototype.destroy = destroyImpl.destroy;
-Readable.prototype._undestroy = destroyImpl.undestroy;
-Readable.prototype._destroy = function (err, cb) {
- this.push(null);
- cb(err);
-};
-
-// Manually shove something into the read() buffer.
-// This returns true if the highWaterMark has not been hit yet,
-// similar to how Writable.write() returns true if you should
-// write() some more.
-Readable.prototype.push = function (chunk, encoding) {
- var state = this._readableState;
- var skipChunkCheck;
-
- if (!state.objectMode) {
- if (typeof chunk === 'string') {
- encoding = encoding || state.defaultEncoding;
- if (encoding !== state.encoding) {
- chunk = Buffer.from(chunk, encoding);
- encoding = '';
- }
- skipChunkCheck = true;
- }
- } else {
- skipChunkCheck = true;
- }
-
- return readableAddChunk(this, chunk, encoding, false, skipChunkCheck);
-};
-
-// Unshift should *always* be something directly out of read()
-Readable.prototype.unshift = function (chunk) {
- return readableAddChunk(this, chunk, null, true, false);
-};
-
-function readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) {
- var state = stream._readableState;
- if (chunk === null) {
- state.reading = false;
- onEofChunk(stream, state);
- } else {
- var er;
- if (!skipChunkCheck) er = chunkInvalid(state, chunk);
- if (er) {
- stream.emit('error', er);
- } else if (state.objectMode || chunk && chunk.length > 0) {
- if (typeof chunk !== 'string' && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer.prototype) {
- chunk = _uint8ArrayToBuffer(chunk);
- }
-
- if (addToFront) {
- if (state.endEmitted) stream.emit('error', new Error('stream.unshift() after end event'));else addChunk(stream, state, chunk, true);
- } else if (state.ended) {
- stream.emit('error', new Error('stream.push() after EOF'));
- } else {
- state.reading = false;
- if (state.decoder && !encoding) {
- chunk = state.decoder.write(chunk);
- if (state.objectMode || chunk.length !== 0) addChunk(stream, state, chunk, false);else maybeReadMore(stream, state);
- } else {
- addChunk(stream, state, chunk, false);
- }
- }
- } else if (!addToFront) {
- state.reading = false;
- }
- }
-
- return needMoreData(state);
-}
-
-function addChunk(stream, state, chunk, addToFront) {
- if (state.flowing && state.length === 0 && !state.sync) {
- stream.emit('data', chunk);
- stream.read(0);
- } else {
- // update the buffer info.
- state.length += state.objectMode ? 1 : chunk.length;
- if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk);
-
- if (state.needReadable) emitReadable(stream);
- }
- maybeReadMore(stream, state);
-}
-
-function chunkInvalid(state, chunk) {
- var er;
- if (!_isUint8Array(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {
- er = new TypeError('Invalid non-string/buffer chunk');
- }
- return er;
-}
-
-// if it's past the high water mark, we can push in some more.
-// Also, if we have no data yet, we can stand some
-// more bytes. This is to work around cases where hwm=0,
-// such as the repl. Also, if the push() triggered a
-// readable event, and the user called read(largeNumber) such that
-// needReadable was set, then we ought to push more, so that another
-// 'readable' event will be triggered.
-function needMoreData(state) {
- return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);
-}
-
-Readable.prototype.isPaused = function () {
- return this._readableState.flowing === false;
-};
-
-// backwards compatibility.
-Readable.prototype.setEncoding = function (enc) {
- if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder;
- this._readableState.decoder = new StringDecoder(enc);
- this._readableState.encoding = enc;
- return this;
-};
-
-// Don't raise the hwm > 8MB
-var MAX_HWM = 0x800000;
-function computeNewHighWaterMark(n) {
- if (n >= MAX_HWM) {
- n = MAX_HWM;
- } else {
- // Get the next highest power of 2 to prevent increasing hwm excessively in
- // tiny amounts
- n--;
- n |= n >>> 1;
- n |= n >>> 2;
- n |= n >>> 4;
- n |= n >>> 8;
- n |= n >>> 16;
- n++;
- }
- return n;
-}
-
-// This function is designed to be inlinable, so please take care when making
-// changes to the function body.
-function howMuchToRead(n, state) {
- if (n <= 0 || state.length === 0 && state.ended) return 0;
- if (state.objectMode) return 1;
- if (n !== n) {
- // Only flow one buffer at a time
- if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;
- }
- // If we're asking for more than the current hwm, then raise the hwm.
- if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);
- if (n <= state.length) return n;
- // Don't have enough
- if (!state.ended) {
- state.needReadable = true;
- return 0;
- }
- return state.length;
-}
-
-// you can override either this method, or the async _read(n) below.
-Readable.prototype.read = function (n) {
- debug('read', n);
- n = parseInt(n, 10);
- var state = this._readableState;
- var nOrig = n;
-
- if (n !== 0) state.emittedReadable = false;
-
- // if we're doing read(0) to trigger a readable event, but we
- // already have a bunch of data in the buffer, then just trigger
- // the 'readable' event and move on.
- if (n === 0 && state.needReadable && (state.length >= state.highWaterMark || state.ended)) {
- debug('read: emitReadable', state.length, state.ended);
- if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this);
- return null;
- }
-
- n = howMuchToRead(n, state);
-
- // if we've ended, and we're now clear, then finish it up.
- if (n === 0 && state.ended) {
- if (state.length === 0) endReadable(this);
- return null;
- }
-
- // All the actual chunk generation logic needs to be
- // *below* the call to _read. The reason is that in certain
- // synthetic stream cases, such as passthrough streams, _read
- // may be a completely synchronous operation which may change
- // the state of the read buffer, providing enough data when
- // before there was *not* enough.
- //
- // So, the steps are:
- // 1. Figure out what the state of things will be after we do
- // a read from the buffer.
- //
- // 2. If that resulting state will trigger a _read, then call _read.
- // Note that this may be asynchronous, or synchronous. Yes, it is
- // deeply ugly to write APIs this way, but that still doesn't mean
- // that the Readable class should behave improperly, as streams are
- // designed to be sync/async agnostic.
- // Take note if the _read call is sync or async (ie, if the read call
- // has returned yet), so that we know whether or not it's safe to emit
- // 'readable' etc.
- //
- // 3. Actually pull the requested chunks out of the buffer and return.
-
- // if we need a readable event, then we need to do some reading.
- var doRead = state.needReadable;
- debug('need readable', doRead);
-
- // if we currently have less than the highWaterMark, then also read some
- if (state.length === 0 || state.length - n < state.highWaterMark) {
- doRead = true;
- debug('length less than watermark', doRead);
- }
-
- // however, if we've ended, then there's no point, and if we're already
- // reading, then it's unnecessary.
- if (state.ended || state.reading) {
- doRead = false;
- debug('reading or ended', doRead);
- } else if (doRead) {
- debug('do read');
- state.reading = true;
- state.sync = true;
- // if the length is currently zero, then we *need* a readable event.
- if (state.length === 0) state.needReadable = true;
- // call internal read method
- this._read(state.highWaterMark);
- state.sync = false;
- // If _read pushed data synchronously, then `reading` will be false,
- // and we need to re-evaluate how much data we can return to the user.
- if (!state.reading) n = howMuchToRead(nOrig, state);
- }
-
- var ret;
- if (n > 0) ret = fromList(n, state);else ret = null;
-
- if (ret === null) {
- state.needReadable = true;
- n = 0;
- } else {
- state.length -= n;
- }
-
- if (state.length === 0) {
- // If we have nothing in the buffer, then we want to know
- // as soon as we *do* get something into the buffer.
- if (!state.ended) state.needReadable = true;
-
- // If we tried to read() past the EOF, then emit end on the next tick.
- if (nOrig !== n && state.ended) endReadable(this);
- }
-
- if (ret !== null) this.emit('data', ret);
-
- return ret;
-};
-
-function onEofChunk(stream, state) {
- if (state.ended) return;
- if (state.decoder) {
- var chunk = state.decoder.end();
- if (chunk && chunk.length) {
- state.buffer.push(chunk);
- state.length += state.objectMode ? 1 : chunk.length;
- }
- }
- state.ended = true;
-
- // emit 'readable' now to make sure it gets picked up.
- emitReadable(stream);
-}
-
-// Don't emit readable right away in sync mode, because this can trigger
-// another read() call => stack overflow. This way, it might trigger
-// a nextTick recursion warning, but that's not so bad.
-function emitReadable(stream) {
- var state = stream._readableState;
- state.needReadable = false;
- if (!state.emittedReadable) {
- debug('emitReadable', state.flowing);
- state.emittedReadable = true;
- if (state.sync) pna.nextTick(emitReadable_, stream);else emitReadable_(stream);
- }
-}
-
-function emitReadable_(stream) {
- debug('emit readable');
- stream.emit('readable');
- flow(stream);
-}
-
-// at this point, the user has presumably seen the 'readable' event,
-// and called read() to consume some data. that may have triggered
-// in turn another _read(n) call, in which case reading = true if
-// it's in progress.
-// However, if we're not ended, or reading, and the length < hwm,
-// then go ahead and try to read some more preemptively.
-function maybeReadMore(stream, state) {
- if (!state.readingMore) {
- state.readingMore = true;
- pna.nextTick(maybeReadMore_, stream, state);
- }
-}
-
-function maybeReadMore_(stream, state) {
- var len = state.length;
- while (!state.reading && !state.flowing && !state.ended && state.length < state.highWaterMark) {
- debug('maybeReadMore read 0');
- stream.read(0);
- if (len === state.length)
- // didn't get any data, stop spinning.
- break;else len = state.length;
- }
- state.readingMore = false;
-}
-
-// abstract method. to be overridden in specific implementation classes.
-// call cb(er, data) where data is <= n in length.
-// for virtual (non-string, non-buffer) streams, "length" is somewhat
-// arbitrary, and perhaps not very meaningful.
-Readable.prototype._read = function (n) {
- this.emit('error', new Error('_read() is not implemented'));
-};
-
-Readable.prototype.pipe = function (dest, pipeOpts) {
- var src = this;
- var state = this._readableState;
-
- switch (state.pipesCount) {
- case 0:
- state.pipes = dest;
- break;
- case 1:
- state.pipes = [state.pipes, dest];
- break;
- default:
- state.pipes.push(dest);
- break;
- }
- state.pipesCount += 1;
- debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts);
-
- var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr;
-
- var endFn = doEnd ? onend : unpipe;
- if (state.endEmitted) pna.nextTick(endFn);else src.once('end', endFn);
-
- dest.on('unpipe', onunpipe);
- function onunpipe(readable, unpipeInfo) {
- debug('onunpipe');
- if (readable === src) {
- if (unpipeInfo && unpipeInfo.hasUnpiped === false) {
- unpipeInfo.hasUnpiped = true;
- cleanup();
- }
- }
- }
-
- function onend() {
- debug('onend');
- dest.end();
- }
-
- // when the dest drains, it reduces the awaitDrain counter
- // on the source. This would be more elegant with a .once()
- // handler in flow(), but adding and removing repeatedly is
- // too slow.
- var ondrain = pipeOnDrain(src);
- dest.on('drain', ondrain);
-
- var cleanedUp = false;
- function cleanup() {
- debug('cleanup');
- // cleanup event handlers once the pipe is broken
- dest.removeListener('close', onclose);
- dest.removeListener('finish', onfinish);
- dest.removeListener('drain', ondrain);
- dest.removeListener('error', onerror);
- dest.removeListener('unpipe', onunpipe);
- src.removeListener('end', onend);
- src.removeListener('end', unpipe);
- src.removeListener('data', ondata);
-
- cleanedUp = true;
-
- // if the reader is waiting for a drain event from this
- // specific writer, then it would cause it to never start
- // flowing again.
- // So, if this is awaiting a drain, then we just call it now.
- // If we don't know, then assume that we are waiting for one.
- if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain();
- }
-
- // If the user pushes more data while we're writing to dest then we'll end up
- // in ondata again. However, we only want to increase awaitDrain once because
- // dest will only emit one 'drain' event for the multiple writes.
- // => Introduce a guard on increasing awaitDrain.
- var increasedAwaitDrain = false;
- src.on('data', ondata);
- function ondata(chunk) {
- debug('ondata');
- increasedAwaitDrain = false;
- var ret = dest.write(chunk);
- if (false === ret && !increasedAwaitDrain) {
- // If the user unpiped during `dest.write()`, it is possible
- // to get stuck in a permanently paused state if that write
- // also returned false.
- // => Check whether `dest` is still a piping destination.
- if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) {
- debug('false write response, pause', src._readableState.awaitDrain);
- src._readableState.awaitDrain++;
- increasedAwaitDrain = true;
- }
- src.pause();
- }
- }
-
- // if the dest has an error, then stop piping into it.
- // however, don't suppress the throwing behavior for this.
- function onerror(er) {
- debug('onerror', er);
- unpipe();
- dest.removeListener('error', onerror);
- if (EElistenerCount(dest, 'error') === 0) dest.emit('error', er);
- }
-
- // Make sure our error handler is attached before userland ones.
- prependListener(dest, 'error', onerror);
-
- // Both close and finish should trigger unpipe, but only once.
- function onclose() {
- dest.removeListener('finish', onfinish);
- unpipe();
- }
- dest.once('close', onclose);
- function onfinish() {
- debug('onfinish');
- dest.removeListener('close', onclose);
- unpipe();
- }
- dest.once('finish', onfinish);
-
- function unpipe() {
- debug('unpipe');
- src.unpipe(dest);
- }
-
- // tell the dest that it's being piped to
- dest.emit('pipe', src);
-
- // start the flow if it hasn't been started already.
- if (!state.flowing) {
- debug('pipe resume');
- src.resume();
- }
-
- return dest;
-};
-
-function pipeOnDrain(src) {
- return function () {
- var state = src._readableState;
- debug('pipeOnDrain', state.awaitDrain);
- if (state.awaitDrain) state.awaitDrain--;
- if (state.awaitDrain === 0 && EElistenerCount(src, 'data')) {
- state.flowing = true;
- flow(src);
- }
- };
-}
-
-Readable.prototype.unpipe = function (dest) {
- var state = this._readableState;
- var unpipeInfo = { hasUnpiped: false };
-
- // if we're not piping anywhere, then do nothing.
- if (state.pipesCount === 0) return this;
-
- // just one destination. most common case.
- if (state.pipesCount === 1) {
- // passed in one, but it's not the right one.
- if (dest && dest !== state.pipes) return this;
-
- if (!dest) dest = state.pipes;
-
- // got a match.
- state.pipes = null;
- state.pipesCount = 0;
- state.flowing = false;
- if (dest) dest.emit('unpipe', this, unpipeInfo);
- return this;
- }
-
- // slow case. multiple pipe destinations.
-
- if (!dest) {
- // remove all.
- var dests = state.pipes;
- var len = state.pipesCount;
- state.pipes = null;
- state.pipesCount = 0;
- state.flowing = false;
-
- for (var i = 0; i < len; i++) {
- dests[i].emit('unpipe', this, unpipeInfo);
- }return this;
- }
-
- // try to find the right one.
- var index = indexOf(state.pipes, dest);
- if (index === -1) return this;
-
- state.pipes.splice(index, 1);
- state.pipesCount -= 1;
- if (state.pipesCount === 1) state.pipes = state.pipes[0];
-
- dest.emit('unpipe', this, unpipeInfo);
-
- return this;
-};
-
-// set up data events if they are asked for
-// Ensure readable listeners eventually get something
-Readable.prototype.on = function (ev, fn) {
- var res = Stream.prototype.on.call(this, ev, fn);
-
- if (ev === 'data') {
- // Start flowing on next tick if stream isn't explicitly paused
- if (this._readableState.flowing !== false) this.resume();
- } else if (ev === 'readable') {
- var state = this._readableState;
- if (!state.endEmitted && !state.readableListening) {
- state.readableListening = state.needReadable = true;
- state.emittedReadable = false;
- if (!state.reading) {
- pna.nextTick(nReadingNextTick, this);
- } else if (state.length) {
- emitReadable(this);
- }
- }
- }
-
- return res;
-};
-Readable.prototype.addListener = Readable.prototype.on;
-
-function nReadingNextTick(self) {
- debug('readable nexttick read 0');
- self.read(0);
-}
-
-// pause() and resume() are remnants of the legacy readable stream API
-// If the user uses them, then switch into old mode.
-Readable.prototype.resume = function () {
- var state = this._readableState;
- if (!state.flowing) {
- debug('resume');
- state.flowing = true;
- resume(this, state);
- }
- return this;
-};
-
-function resume(stream, state) {
- if (!state.resumeScheduled) {
- state.resumeScheduled = true;
- pna.nextTick(resume_, stream, state);
- }
-}
-
-function resume_(stream, state) {
- if (!state.reading) {
- debug('resume read 0');
- stream.read(0);
- }
-
- state.resumeScheduled = false;
- state.awaitDrain = 0;
- stream.emit('resume');
- flow(stream);
- if (state.flowing && !state.reading) stream.read(0);
-}
-
-Readable.prototype.pause = function () {
- debug('call pause flowing=%j', this._readableState.flowing);
- if (false !== this._readableState.flowing) {
- debug('pause');
- this._readableState.flowing = false;
- this.emit('pause');
- }
- return this;
-};
-
-function flow(stream) {
- var state = stream._readableState;
- debug('flow', state.flowing);
- while (state.flowing && stream.read() !== null) {}
-}
-
-// wrap an old-style stream as the async data source.
-// This is *not* part of the readable stream interface.
-// It is an ugly unfortunate mess of history.
-Readable.prototype.wrap = function (stream) {
- var _this = this;
-
- var state = this._readableState;
- var paused = false;
-
- stream.on('end', function () {
- debug('wrapped end');
- if (state.decoder && !state.ended) {
- var chunk = state.decoder.end();
- if (chunk && chunk.length) _this.push(chunk);
- }
-
- _this.push(null);
- });
-
- stream.on('data', function (chunk) {
- debug('wrapped data');
- if (state.decoder) chunk = state.decoder.write(chunk);
-
- // don't skip over falsy values in objectMode
- if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return;
-
- var ret = _this.push(chunk);
- if (!ret) {
- paused = true;
- stream.pause();
- }
- });
-
- // proxy all the other methods.
- // important when wrapping filters and duplexes.
- for (var i in stream) {
- if (this[i] === undefined && typeof stream[i] === 'function') {
- this[i] = function (method) {
- return function () {
- return stream[method].apply(stream, arguments);
- };
- }(i);
- }
- }
-
- // proxy certain important events.
- for (var n = 0; n < kProxyEvents.length; n++) {
- stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n]));
- }
-
- // when we try to consume some more bytes, simply unpause the
- // underlying stream.
- this._read = function (n) {
- debug('wrapped _read', n);
- if (paused) {
- paused = false;
- stream.resume();
- }
- };
-
- return this;
-};
-
-Object.defineProperty(Readable.prototype, 'readableHighWaterMark', {
- // making it explicit this property is not enumerable
- // because otherwise some prototype manipulation in
- // userland will fail
- enumerable: false,
- get: function () {
- return this._readableState.highWaterMark;
- }
-});
-
-// exposed for testing purposes only.
-Readable._fromList = fromList;
-
-// Pluck off n bytes from an array of buffers.
-// Length is the combined lengths of all the buffers in the list.
-// This function is designed to be inlinable, so please take care when making
-// changes to the function body.
-function fromList(n, state) {
- // nothing buffered
- if (state.length === 0) return null;
-
- var ret;
- if (state.objectMode) ret = state.buffer.shift();else if (!n || n >= state.length) {
- // read it all, truncate the list
- if (state.decoder) ret = state.buffer.join('');else if (state.buffer.length === 1) ret = state.buffer.head.data;else ret = state.buffer.concat(state.length);
- state.buffer.clear();
- } else {
- // read part of list
- ret = fromListPartial(n, state.buffer, state.decoder);
- }
-
- return ret;
-}
-
-// Extracts only enough buffered data to satisfy the amount requested.
-// This function is designed to be inlinable, so please take care when making
-// changes to the function body.
-function fromListPartial(n, list, hasStrings) {
- var ret;
- if (n < list.head.data.length) {
- // slice is the same for buffers and strings
- ret = list.head.data.slice(0, n);
- list.head.data = list.head.data.slice(n);
- } else if (n === list.head.data.length) {
- // first chunk is a perfect match
- ret = list.shift();
- } else {
- // result spans more than one buffer
- ret = hasStrings ? copyFromBufferString(n, list) : copyFromBuffer(n, list);
- }
- return ret;
-}
-
-// Copies a specified amount of characters from the list of buffered data
-// chunks.
-// This function is designed to be inlinable, so please take care when making
-// changes to the function body.
-function copyFromBufferString(n, list) {
- var p = list.head;
- var c = 1;
- var ret = p.data;
- n -= ret.length;
- while (p = p.next) {
- var str = p.data;
- var nb = n > str.length ? str.length : n;
- if (nb === str.length) ret += str;else ret += str.slice(0, n);
- n -= nb;
- if (n === 0) {
- if (nb === str.length) {
- ++c;
- if (p.next) list.head = p.next;else list.head = list.tail = null;
- } else {
- list.head = p;
- p.data = str.slice(nb);
- }
- break;
- }
- ++c;
- }
- list.length -= c;
- return ret;
-}
-
-// Copies a specified amount of bytes from the list of buffered data chunks.
-// This function is designed to be inlinable, so please take care when making
-// changes to the function body.
-function copyFromBuffer(n, list) {
- var ret = Buffer.allocUnsafe(n);
- var p = list.head;
- var c = 1;
- p.data.copy(ret);
- n -= p.data.length;
- while (p = p.next) {
- var buf = p.data;
- var nb = n > buf.length ? buf.length : n;
- buf.copy(ret, ret.length - n, 0, nb);
- n -= nb;
- if (n === 0) {
- if (nb === buf.length) {
- ++c;
- if (p.next) list.head = p.next;else list.head = list.tail = null;
- } else {
- list.head = p;
- p.data = buf.slice(nb);
- }
- break;
- }
- ++c;
- }
- list.length -= c;
- return ret;
-}
-
-function endReadable(stream) {
- var state = stream._readableState;
-
- // If we get here before consuming all the bytes, then that is a
- // bug in node. Should never happen.
- if (state.length > 0) throw new Error('"endReadable()" called on non-empty stream');
-
- if (!state.endEmitted) {
- state.ended = true;
- pna.nextTick(endReadableNT, state, stream);
- }
-}
-
-function endReadableNT(state, stream) {
- // Check that we didn't get one last unshift.
- if (!state.endEmitted && state.length === 0) {
- state.endEmitted = true;
- stream.readable = false;
- stream.emit('end');
- }
-}
-
-function indexOf(xs, x) {
- for (var i = 0, l = xs.length; i < l; i++) {
- if (xs[i] === x) return i;
- }
- return -1;
-}
\ No newline at end of file
+++ /dev/null
-// 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.
-
-// a transform stream is a readable/writable stream where you do
-// something with the data. Sometimes it's called a "filter",
-// but that's not a great name for it, since that implies a thing where
-// some bits pass through, and others are simply ignored. (That would
-// be a valid example of a transform, of course.)
-//
-// While the output is causally related to the input, it's not a
-// necessarily symmetric or synchronous transformation. For example,
-// a zlib stream might take multiple plain-text writes(), and then
-// emit a single compressed chunk some time in the future.
-//
-// Here's how this works:
-//
-// The Transform stream has all the aspects of the readable and writable
-// stream classes. When you write(chunk), that calls _write(chunk,cb)
-// internally, and returns false if there's a lot of pending writes
-// buffered up. When you call read(), that calls _read(n) until
-// there's enough pending readable data buffered up.
-//
-// In a transform stream, the written data is placed in a buffer. When
-// _read(n) is called, it transforms the queued up data, calling the
-// buffered _write cb's as it consumes chunks. If consuming a single
-// written chunk would result in multiple output chunks, then the first
-// outputted bit calls the readcb, and subsequent chunks just go into
-// the read buffer, and will cause it to emit 'readable' if necessary.
-//
-// This way, back-pressure is actually determined by the reading side,
-// since _read has to be called to start processing a new chunk. However,
-// a pathological inflate type of transform can cause excessive buffering
-// here. For example, imagine a stream where every byte of input is
-// interpreted as an integer from 0-255, and then results in that many
-// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in
-// 1kb of data being output. In this case, you could write a very small
-// amount of input, and end up with a very large amount of output. In
-// such a pathological inflating mechanism, there'd be no way to tell
-// the system to stop doing the transform. A single 4MB write could
-// cause the system to run out of memory.
-//
-// However, even in such a pathological case, only a single written chunk
-// would be consumed, and then the rest would wait (un-transformed) until
-// the results of the previous transformed chunk were consumed.
-
-'use strict';
-
-module.exports = Transform;
-
-var Duplex = require('./_stream_duplex');
-
-/*<replacement>*/
-var util = require('core-util-is');
-util.inherits = require('inherits');
-/*</replacement>*/
-
-util.inherits(Transform, Duplex);
-
-function afterTransform(er, data) {
- var ts = this._transformState;
- ts.transforming = false;
-
- var cb = ts.writecb;
-
- if (!cb) {
- return this.emit('error', new Error('write callback called multiple times'));
- }
-
- ts.writechunk = null;
- ts.writecb = null;
-
- if (data != null) // single equals check for both `null` and `undefined`
- this.push(data);
-
- cb(er);
-
- var rs = this._readableState;
- rs.reading = false;
- if (rs.needReadable || rs.length < rs.highWaterMark) {
- this._read(rs.highWaterMark);
- }
-}
-
-function Transform(options) {
- if (!(this instanceof Transform)) return new Transform(options);
-
- Duplex.call(this, options);
-
- this._transformState = {
- afterTransform: afterTransform.bind(this),
- needTransform: false,
- transforming: false,
- writecb: null,
- writechunk: null,
- writeencoding: null
- };
-
- // start out asking for a readable event once data is transformed.
- this._readableState.needReadable = true;
-
- // we have implemented the _read method, and done the other things
- // that Readable wants before the first _read call, so unset the
- // sync guard flag.
- this._readableState.sync = false;
-
- if (options) {
- if (typeof options.transform === 'function') this._transform = options.transform;
-
- if (typeof options.flush === 'function') this._flush = options.flush;
- }
-
- // When the writable side finishes, then flush out anything remaining.
- this.on('prefinish', prefinish);
-}
-
-function prefinish() {
- var _this = this;
-
- if (typeof this._flush === 'function') {
- this._flush(function (er, data) {
- done(_this, er, data);
- });
- } else {
- done(this, null, null);
- }
-}
-
-Transform.prototype.push = function (chunk, encoding) {
- this._transformState.needTransform = false;
- return Duplex.prototype.push.call(this, chunk, encoding);
-};
-
-// This is the part where you do stuff!
-// override this function in implementation classes.
-// 'chunk' is an input chunk.
-//
-// Call `push(newChunk)` to pass along transformed output
-// to the readable side. You may call 'push' zero or more times.
-//
-// Call `cb(err)` when you are done with this chunk. If you pass
-// an error, then that'll put the hurt on the whole operation. If you
-// never call cb(), then you'll never get another chunk.
-Transform.prototype._transform = function (chunk, encoding, cb) {
- throw new Error('_transform() is not implemented');
-};
-
-Transform.prototype._write = function (chunk, encoding, cb) {
- var ts = this._transformState;
- ts.writecb = cb;
- ts.writechunk = chunk;
- ts.writeencoding = encoding;
- if (!ts.transforming) {
- var rs = this._readableState;
- if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark);
- }
-};
-
-// Doesn't matter what the args are here.
-// _transform does all the work.
-// That we got here means that the readable side wants more data.
-Transform.prototype._read = function (n) {
- var ts = this._transformState;
-
- if (ts.writechunk !== null && ts.writecb && !ts.transforming) {
- ts.transforming = true;
- this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform);
- } else {
- // mark that we need a transform, so that any data that comes in
- // will get processed, now that we've asked for it.
- ts.needTransform = true;
- }
-};
-
-Transform.prototype._destroy = function (err, cb) {
- var _this2 = this;
-
- Duplex.prototype._destroy.call(this, err, function (err2) {
- cb(err2);
- _this2.emit('close');
- });
-};
-
-function done(stream, er, data) {
- if (er) return stream.emit('error', er);
-
- if (data != null) // single equals check for both `null` and `undefined`
- stream.push(data);
-
- // if there's nothing in the write buffer, then that means
- // that nothing more will ever be provided
- if (stream._writableState.length) throw new Error('Calling transform done when ws.length != 0');
-
- if (stream._transformState.transforming) throw new Error('Calling transform done when still transforming');
-
- return stream.push(null);
-}
\ No newline at end of file
+++ /dev/null
-// 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.
-
-// A bit simpler than readable streams.
-// Implement an async ._write(chunk, encoding, cb), and it'll handle all
-// the drain event emission and buffering.
-
-'use strict';
-
-/*<replacement>*/
-
-var pna = require('process-nextick-args');
-/*</replacement>*/
-
-module.exports = Writable;
-
-/* <replacement> */
-function WriteReq(chunk, encoding, cb) {
- this.chunk = chunk;
- this.encoding = encoding;
- this.callback = cb;
- this.next = null;
-}
-
-// It seems a linked list but it is not
-// there will be only 2 of these for each stream
-function CorkedRequest(state) {
- var _this = this;
-
- this.next = null;
- this.entry = null;
- this.finish = function () {
- onCorkedFinish(_this, state);
- };
-}
-/* </replacement> */
-
-/*<replacement>*/
-var asyncWrite = !process.browser && ['v0.10', 'v0.9.'].indexOf(process.version.slice(0, 5)) > -1 ? setImmediate : pna.nextTick;
-/*</replacement>*/
-
-/*<replacement>*/
-var Duplex;
-/*</replacement>*/
-
-Writable.WritableState = WritableState;
-
-/*<replacement>*/
-var util = require('core-util-is');
-util.inherits = require('inherits');
-/*</replacement>*/
-
-/*<replacement>*/
-var internalUtil = {
- deprecate: require('util-deprecate')
-};
-/*</replacement>*/
-
-/*<replacement>*/
-var Stream = require('./internal/streams/stream');
-/*</replacement>*/
-
-/*<replacement>*/
-
-var Buffer = require('safe-buffer').Buffer;
-var OurUint8Array = global.Uint8Array || function () {};
-function _uint8ArrayToBuffer(chunk) {
- return Buffer.from(chunk);
-}
-function _isUint8Array(obj) {
- return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;
-}
-
-/*</replacement>*/
-
-var destroyImpl = require('./internal/streams/destroy');
-
-util.inherits(Writable, Stream);
-
-function nop() {}
-
-function WritableState(options, stream) {
- Duplex = Duplex || require('./_stream_duplex');
-
- options = options || {};
-
- // Duplex streams are both readable and writable, but share
- // the same options object.
- // However, some cases require setting options to different
- // values for the readable and the writable sides of the duplex stream.
- // These options can be provided separately as readableXXX and writableXXX.
- var isDuplex = stream instanceof Duplex;
-
- // object stream flag to indicate whether or not this stream
- // contains buffers or objects.
- this.objectMode = !!options.objectMode;
-
- if (isDuplex) this.objectMode = this.objectMode || !!options.writableObjectMode;
-
- // the point at which write() starts returning false
- // Note: 0 is a valid value, means that we always return false if
- // the entire buffer is not flushed immediately on write()
- var hwm = options.highWaterMark;
- var writableHwm = options.writableHighWaterMark;
- var defaultHwm = this.objectMode ? 16 : 16 * 1024;
-
- if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (writableHwm || writableHwm === 0)) this.highWaterMark = writableHwm;else this.highWaterMark = defaultHwm;
-
- // cast to ints.
- this.highWaterMark = Math.floor(this.highWaterMark);
-
- // if _final has been called
- this.finalCalled = false;
-
- // drain event flag.
- this.needDrain = false;
- // at the start of calling end()
- this.ending = false;
- // when end() has been called, and returned
- this.ended = false;
- // when 'finish' is emitted
- this.finished = false;
-
- // has it been destroyed
- this.destroyed = false;
-
- // should we decode strings into buffers before passing to _write?
- // this is here so that some node-core streams can optimize string
- // handling at a lower level.
- var noDecode = options.decodeStrings === false;
- this.decodeStrings = !noDecode;
-
- // Crypto is kind of old and crusty. Historically, its default string
- // encoding is 'binary' so we have to make this configurable.
- // Everything else in the universe uses 'utf8', though.
- this.defaultEncoding = options.defaultEncoding || 'utf8';
-
- // not an actual buffer we keep track of, but a measurement
- // of how much we're waiting to get pushed to some underlying
- // socket or file.
- this.length = 0;
-
- // a flag to see when we're in the middle of a write.
- this.writing = false;
-
- // when true all writes will be buffered until .uncork() call
- this.corked = 0;
-
- // a flag to be able to tell if the onwrite cb is called immediately,
- // or on a later tick. We set this to true at first, because any
- // actions that shouldn't happen until "later" should generally also
- // not happen before the first write call.
- this.sync = true;
-
- // a flag to know if we're processing previously buffered items, which
- // may call the _write() callback in the same tick, so that we don't
- // end up in an overlapped onwrite situation.
- this.bufferProcessing = false;
-
- // the callback that's passed to _write(chunk,cb)
- this.onwrite = function (er) {
- onwrite(stream, er);
- };
-
- // the callback that the user supplies to write(chunk,encoding,cb)
- this.writecb = null;
-
- // the amount that is being written when _write is called.
- this.writelen = 0;
-
- this.bufferedRequest = null;
- this.lastBufferedRequest = null;
-
- // number of pending user-supplied write callbacks
- // this must be 0 before 'finish' can be emitted
- this.pendingcb = 0;
-
- // emit prefinish if the only thing we're waiting for is _write cbs
- // This is relevant for synchronous Transform streams
- this.prefinished = false;
-
- // True if the error was already emitted and should not be thrown again
- this.errorEmitted = false;
-
- // count buffered requests
- this.bufferedRequestCount = 0;
-
- // allocate the first CorkedRequest, there is always
- // one allocated and free to use, and we maintain at most two
- this.corkedRequestsFree = new CorkedRequest(this);
-}
-
-WritableState.prototype.getBuffer = function getBuffer() {
- var current = this.bufferedRequest;
- var out = [];
- while (current) {
- out.push(current);
- current = current.next;
- }
- return out;
-};
-
-(function () {
- try {
- Object.defineProperty(WritableState.prototype, 'buffer', {
- get: internalUtil.deprecate(function () {
- return this.getBuffer();
- }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.', 'DEP0003')
- });
- } catch (_) {}
-})();
-
-// Test _writableState for inheritance to account for Duplex streams,
-// whose prototype chain only points to Readable.
-var realHasInstance;
-if (typeof Symbol === 'function' && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === 'function') {
- realHasInstance = Function.prototype[Symbol.hasInstance];
- Object.defineProperty(Writable, Symbol.hasInstance, {
- value: function (object) {
- if (realHasInstance.call(this, object)) return true;
- if (this !== Writable) return false;
-
- return object && object._writableState instanceof WritableState;
- }
- });
-} else {
- realHasInstance = function (object) {
- return object instanceof this;
- };
-}
-
-function Writable(options) {
- Duplex = Duplex || require('./_stream_duplex');
-
- // Writable ctor is applied to Duplexes, too.
- // `realHasInstance` is necessary because using plain `instanceof`
- // would return false, as no `_writableState` property is attached.
-
- // Trying to use the custom `instanceof` for Writable here will also break the
- // Node.js LazyTransform implementation, which has a non-trivial getter for
- // `_writableState` that would lead to infinite recursion.
- if (!realHasInstance.call(Writable, this) && !(this instanceof Duplex)) {
- return new Writable(options);
- }
-
- this._writableState = new WritableState(options, this);
-
- // legacy.
- this.writable = true;
-
- if (options) {
- if (typeof options.write === 'function') this._write = options.write;
-
- if (typeof options.writev === 'function') this._writev = options.writev;
-
- if (typeof options.destroy === 'function') this._destroy = options.destroy;
-
- if (typeof options.final === 'function') this._final = options.final;
- }
-
- Stream.call(this);
-}
-
-// Otherwise people can pipe Writable streams, which is just wrong.
-Writable.prototype.pipe = function () {
- this.emit('error', new Error('Cannot pipe, not readable'));
-};
-
-function writeAfterEnd(stream, cb) {
- var er = new Error('write after end');
- // TODO: defer error events consistently everywhere, not just the cb
- stream.emit('error', er);
- pna.nextTick(cb, er);
-}
-
-// Checks that a user-supplied chunk is valid, especially for the particular
-// mode the stream is in. Currently this means that `null` is never accepted
-// and undefined/non-string values are only allowed in object mode.
-function validChunk(stream, state, chunk, cb) {
- var valid = true;
- var er = false;
-
- if (chunk === null) {
- er = new TypeError('May not write null values to stream');
- } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {
- er = new TypeError('Invalid non-string/buffer chunk');
- }
- if (er) {
- stream.emit('error', er);
- pna.nextTick(cb, er);
- valid = false;
- }
- return valid;
-}
-
-Writable.prototype.write = function (chunk, encoding, cb) {
- var state = this._writableState;
- var ret = false;
- var isBuf = !state.objectMode && _isUint8Array(chunk);
-
- if (isBuf && !Buffer.isBuffer(chunk)) {
- chunk = _uint8ArrayToBuffer(chunk);
- }
-
- if (typeof encoding === 'function') {
- cb = encoding;
- encoding = null;
- }
-
- if (isBuf) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding;
-
- if (typeof cb !== 'function') cb = nop;
-
- if (state.ended) writeAfterEnd(this, cb);else if (isBuf || validChunk(this, state, chunk, cb)) {
- state.pendingcb++;
- ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb);
- }
-
- return ret;
-};
-
-Writable.prototype.cork = function () {
- var state = this._writableState;
-
- state.corked++;
-};
-
-Writable.prototype.uncork = function () {
- var state = this._writableState;
-
- if (state.corked) {
- state.corked--;
-
- if (!state.writing && !state.corked && !state.finished && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state);
- }
-};
-
-Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) {
- // node::ParseEncoding() requires lower case.
- if (typeof encoding === 'string') encoding = encoding.toLowerCase();
- if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new TypeError('Unknown encoding: ' + encoding);
- this._writableState.defaultEncoding = encoding;
- return this;
-};
-
-function decodeChunk(state, chunk, encoding) {
- if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') {
- chunk = Buffer.from(chunk, encoding);
- }
- return chunk;
-}
-
-Object.defineProperty(Writable.prototype, 'writableHighWaterMark', {
- // making it explicit this property is not enumerable
- // because otherwise some prototype manipulation in
- // userland will fail
- enumerable: false,
- get: function () {
- return this._writableState.highWaterMark;
- }
-});
-
-// if we're already writing something, then just put this
-// in the queue, and wait our turn. Otherwise, call _write
-// If we return false, then we need a drain event, so set that flag.
-function writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) {
- if (!isBuf) {
- var newChunk = decodeChunk(state, chunk, encoding);
- if (chunk !== newChunk) {
- isBuf = true;
- encoding = 'buffer';
- chunk = newChunk;
- }
- }
- var len = state.objectMode ? 1 : chunk.length;
-
- state.length += len;
-
- var ret = state.length < state.highWaterMark;
- // we must ensure that previous needDrain will not be reset to false.
- if (!ret) state.needDrain = true;
-
- if (state.writing || state.corked) {
- var last = state.lastBufferedRequest;
- state.lastBufferedRequest = {
- chunk: chunk,
- encoding: encoding,
- isBuf: isBuf,
- callback: cb,
- next: null
- };
- if (last) {
- last.next = state.lastBufferedRequest;
- } else {
- state.bufferedRequest = state.lastBufferedRequest;
- }
- state.bufferedRequestCount += 1;
- } else {
- doWrite(stream, state, false, len, chunk, encoding, cb);
- }
-
- return ret;
-}
-
-function doWrite(stream, state, writev, len, chunk, encoding, cb) {
- state.writelen = len;
- state.writecb = cb;
- state.writing = true;
- state.sync = true;
- if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite);
- state.sync = false;
-}
-
-function onwriteError(stream, state, sync, er, cb) {
- --state.pendingcb;
-
- if (sync) {
- // defer the callback if we are being called synchronously
- // to avoid piling up things on the stack
- pna.nextTick(cb, er);
- // this can emit finish, and it will always happen
- // after error
- pna.nextTick(finishMaybe, stream, state);
- stream._writableState.errorEmitted = true;
- stream.emit('error', er);
- } else {
- // the caller expect this to happen before if
- // it is async
- cb(er);
- stream._writableState.errorEmitted = true;
- stream.emit('error', er);
- // this can emit finish, but finish must
- // always follow error
- finishMaybe(stream, state);
- }
-}
-
-function onwriteStateUpdate(state) {
- state.writing = false;
- state.writecb = null;
- state.length -= state.writelen;
- state.writelen = 0;
-}
-
-function onwrite(stream, er) {
- var state = stream._writableState;
- var sync = state.sync;
- var cb = state.writecb;
-
- onwriteStateUpdate(state);
-
- if (er) onwriteError(stream, state, sync, er, cb);else {
- // Check if we're actually ready to finish, but don't emit yet
- var finished = needFinish(state);
-
- if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) {
- clearBuffer(stream, state);
- }
-
- if (sync) {
- /*<replacement>*/
- asyncWrite(afterWrite, stream, state, finished, cb);
- /*</replacement>*/
- } else {
- afterWrite(stream, state, finished, cb);
- }
- }
-}
-
-function afterWrite(stream, state, finished, cb) {
- if (!finished) onwriteDrain(stream, state);
- state.pendingcb--;
- cb();
- finishMaybe(stream, state);
-}
-
-// Must force callback to be called on nextTick, so that we don't
-// emit 'drain' before the write() consumer gets the 'false' return
-// value, and has a chance to attach a 'drain' listener.
-function onwriteDrain(stream, state) {
- if (state.length === 0 && state.needDrain) {
- state.needDrain = false;
- stream.emit('drain');
- }
-}
-
-// if there's something in the buffer waiting, then process it
-function clearBuffer(stream, state) {
- state.bufferProcessing = true;
- var entry = state.bufferedRequest;
-
- if (stream._writev && entry && entry.next) {
- // Fast case, write everything using _writev()
- var l = state.bufferedRequestCount;
- var buffer = new Array(l);
- var holder = state.corkedRequestsFree;
- holder.entry = entry;
-
- var count = 0;
- var allBuffers = true;
- while (entry) {
- buffer[count] = entry;
- if (!entry.isBuf) allBuffers = false;
- entry = entry.next;
- count += 1;
- }
- buffer.allBuffers = allBuffers;
-
- doWrite(stream, state, true, state.length, buffer, '', holder.finish);
-
- // doWrite is almost always async, defer these to save a bit of time
- // as the hot path ends with doWrite
- state.pendingcb++;
- state.lastBufferedRequest = null;
- if (holder.next) {
- state.corkedRequestsFree = holder.next;
- holder.next = null;
- } else {
- state.corkedRequestsFree = new CorkedRequest(state);
- }
- state.bufferedRequestCount = 0;
- } else {
- // Slow case, write chunks one-by-one
- while (entry) {
- var chunk = entry.chunk;
- var encoding = entry.encoding;
- var cb = entry.callback;
- var len = state.objectMode ? 1 : chunk.length;
-
- doWrite(stream, state, false, len, chunk, encoding, cb);
- entry = entry.next;
- state.bufferedRequestCount--;
- // if we didn't call the onwrite immediately, then
- // it means that we need to wait until it does.
- // also, that means that the chunk and cb are currently
- // being processed, so move the buffer counter past them.
- if (state.writing) {
- break;
- }
- }
-
- if (entry === null) state.lastBufferedRequest = null;
- }
-
- state.bufferedRequest = entry;
- state.bufferProcessing = false;
-}
-
-Writable.prototype._write = function (chunk, encoding, cb) {
- cb(new Error('_write() is not implemented'));
-};
-
-Writable.prototype._writev = null;
-
-Writable.prototype.end = function (chunk, encoding, cb) {
- var state = this._writableState;
-
- if (typeof chunk === 'function') {
- cb = chunk;
- chunk = null;
- encoding = null;
- } else if (typeof encoding === 'function') {
- cb = encoding;
- encoding = null;
- }
-
- if (chunk !== null && chunk !== undefined) this.write(chunk, encoding);
-
- // .end() fully uncorks
- if (state.corked) {
- state.corked = 1;
- this.uncork();
- }
-
- // ignore unnecessary end() calls.
- if (!state.ending && !state.finished) endWritable(this, state, cb);
-};
-
-function needFinish(state) {
- return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing;
-}
-function callFinal(stream, state) {
- stream._final(function (err) {
- state.pendingcb--;
- if (err) {
- stream.emit('error', err);
- }
- state.prefinished = true;
- stream.emit('prefinish');
- finishMaybe(stream, state);
- });
-}
-function prefinish(stream, state) {
- if (!state.prefinished && !state.finalCalled) {
- if (typeof stream._final === 'function') {
- state.pendingcb++;
- state.finalCalled = true;
- pna.nextTick(callFinal, stream, state);
- } else {
- state.prefinished = true;
- stream.emit('prefinish');
- }
- }
-}
-
-function finishMaybe(stream, state) {
- var need = needFinish(state);
- if (need) {
- prefinish(stream, state);
- if (state.pendingcb === 0) {
- state.finished = true;
- stream.emit('finish');
- }
- }
- return need;
-}
-
-function endWritable(stream, state, cb) {
- state.ending = true;
- finishMaybe(stream, state);
- if (cb) {
- if (state.finished) pna.nextTick(cb);else stream.once('finish', cb);
- }
- state.ended = true;
- stream.writable = false;
-}
-
-function onCorkedFinish(corkReq, state, err) {
- var entry = corkReq.entry;
- corkReq.entry = null;
- while (entry) {
- var cb = entry.callback;
- state.pendingcb--;
- cb(err);
- entry = entry.next;
- }
- if (state.corkedRequestsFree) {
- state.corkedRequestsFree.next = corkReq;
- } else {
- state.corkedRequestsFree = corkReq;
- }
-}
-
-Object.defineProperty(Writable.prototype, 'destroyed', {
- get: function () {
- if (this._writableState === undefined) {
- return false;
- }
- return this._writableState.destroyed;
- },
- set: function (value) {
- // we ignore the value if the stream
- // has not been initialized yet
- if (!this._writableState) {
- return;
- }
-
- // backward compatibility, the user is explicitly
- // managing destroyed
- this._writableState.destroyed = value;
- }
-});
-
-Writable.prototype.destroy = destroyImpl.destroy;
-Writable.prototype._undestroy = destroyImpl.undestroy;
-Writable.prototype._destroy = function (err, cb) {
- this.end();
- cb(err);
-};
\ No newline at end of file
+++ /dev/null
-'use strict';
-
-function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-
-var Buffer = require('safe-buffer').Buffer;
-var util = require('util');
-
-function copyBuffer(src, target, offset) {
- src.copy(target, offset);
-}
-
-module.exports = function () {
- function BufferList() {
- _classCallCheck(this, BufferList);
-
- this.head = null;
- this.tail = null;
- this.length = 0;
- }
-
- BufferList.prototype.push = function push(v) {
- var entry = { data: v, next: null };
- if (this.length > 0) this.tail.next = entry;else this.head = entry;
- this.tail = entry;
- ++this.length;
- };
-
- BufferList.prototype.unshift = function unshift(v) {
- var entry = { data: v, next: this.head };
- if (this.length === 0) this.tail = entry;
- this.head = entry;
- ++this.length;
- };
-
- BufferList.prototype.shift = function shift() {
- if (this.length === 0) return;
- var ret = this.head.data;
- if (this.length === 1) this.head = this.tail = null;else this.head = this.head.next;
- --this.length;
- return ret;
- };
-
- BufferList.prototype.clear = function clear() {
- this.head = this.tail = null;
- this.length = 0;
- };
-
- BufferList.prototype.join = function join(s) {
- if (this.length === 0) return '';
- var p = this.head;
- var ret = '' + p.data;
- while (p = p.next) {
- ret += s + p.data;
- }return ret;
- };
-
- BufferList.prototype.concat = function concat(n) {
- if (this.length === 0) return Buffer.alloc(0);
- if (this.length === 1) return this.head.data;
- var ret = Buffer.allocUnsafe(n >>> 0);
- var p = this.head;
- var i = 0;
- while (p) {
- copyBuffer(p.data, ret, i);
- i += p.data.length;
- p = p.next;
- }
- return ret;
- };
-
- return BufferList;
-}();
-
-if (util && util.inspect && util.inspect.custom) {
- module.exports.prototype[util.inspect.custom] = function () {
- var obj = util.inspect({ length: this.length });
- return this.constructor.name + ' ' + obj;
- };
-}
\ No newline at end of file
+++ /dev/null
-'use strict';
-
-/*<replacement>*/
-
-var pna = require('process-nextick-args');
-/*</replacement>*/
-
-// undocumented cb() API, needed for core, not for public API
-function destroy(err, cb) {
- var _this = this;
-
- var readableDestroyed = this._readableState && this._readableState.destroyed;
- var writableDestroyed = this._writableState && this._writableState.destroyed;
-
- if (readableDestroyed || writableDestroyed) {
- if (cb) {
- cb(err);
- } else if (err && (!this._writableState || !this._writableState.errorEmitted)) {
- pna.nextTick(emitErrorNT, this, err);
- }
- return this;
- }
-
- // we set destroyed to true before firing error callbacks in order
- // to make it re-entrance safe in case destroy() is called within callbacks
-
- if (this._readableState) {
- this._readableState.destroyed = true;
- }
-
- // if this is a duplex stream mark the writable part as destroyed as well
- if (this._writableState) {
- this._writableState.destroyed = true;
- }
-
- this._destroy(err || null, function (err) {
- if (!cb && err) {
- pna.nextTick(emitErrorNT, _this, err);
- if (_this._writableState) {
- _this._writableState.errorEmitted = true;
- }
- } else if (cb) {
- cb(err);
- }
- });
-
- return this;
-}
-
-function undestroy() {
- if (this._readableState) {
- this._readableState.destroyed = false;
- this._readableState.reading = false;
- this._readableState.ended = false;
- this._readableState.endEmitted = false;
- }
-
- if (this._writableState) {
- this._writableState.destroyed = false;
- this._writableState.ended = false;
- this._writableState.ending = false;
- this._writableState.finished = false;
- this._writableState.errorEmitted = false;
- }
-}
-
-function emitErrorNT(self, err) {
- self.emit('error', err);
-}
-
-module.exports = {
- destroy: destroy,
- undestroy: undestroy
-};
\ No newline at end of file
+++ /dev/null
-module.exports = require('events').EventEmitter;
+++ /dev/null
-module.exports = require('stream');
+++ /dev/null
-{
- "name": "readable-stream",
- "version": "2.3.6",
- "description": "Streams3, a user-land copy of the stream library from Node.js",
- "main": "readable.js",
- "dependencies": {
- "core-util-is": "~1.0.0",
- "inherits": "~2.0.3",
- "isarray": "~1.0.0",
- "process-nextick-args": "~2.0.0",
- "safe-buffer": "~5.1.1",
- "string_decoder": "~1.1.1",
- "util-deprecate": "~1.0.1"
- },
- "devDependencies": {
- "assert": "^1.4.0",
- "babel-polyfill": "^6.9.1",
- "buffer": "^4.9.0",
- "lolex": "^2.3.2",
- "nyc": "^6.4.0",
- "tap": "^0.7.0",
- "tape": "^4.8.0"
- },
- "scripts": {
- "test": "tap test/parallel/*.js test/ours/*.js && node test/verify-dependencies.js",
- "ci": "tap test/parallel/*.js test/ours/*.js --tap | tee test.tap && node test/verify-dependencies.js",
- "cover": "nyc npm test",
- "report": "nyc report --reporter=lcov"
- },
- "repository": {
- "type": "git",
- "url": "git://github.com/nodejs/readable-stream"
- },
- "keywords": [
- "readable",
- "stream",
- "pipe"
- ],
- "browser": {
- "util": false,
- "./readable.js": "./readable-browser.js",
- "./writable.js": "./writable-browser.js",
- "./duplex.js": "./duplex-browser.js",
- "./lib/internal/streams/stream.js": "./lib/internal/streams/stream-browser.js"
- },
- "nyc": {
- "include": [
- "lib/**.js"
- ]
- },
- "license": "MIT"
-}
+++ /dev/null
-module.exports = require('./readable').PassThrough
+++ /dev/null
-exports = module.exports = require('./lib/_stream_readable.js');
-exports.Stream = exports;
-exports.Readable = exports;
-exports.Writable = require('./lib/_stream_writable.js');
-exports.Duplex = require('./lib/_stream_duplex.js');
-exports.Transform = require('./lib/_stream_transform.js');
-exports.PassThrough = require('./lib/_stream_passthrough.js');
+++ /dev/null
-var Stream = require('stream');
-if (process.env.READABLE_STREAM === 'disable' && Stream) {
- module.exports = Stream;
- exports = module.exports = Stream.Readable;
- exports.Readable = Stream.Readable;
- exports.Writable = Stream.Writable;
- exports.Duplex = Stream.Duplex;
- exports.Transform = Stream.Transform;
- exports.PassThrough = Stream.PassThrough;
- exports.Stream = Stream;
-} else {
- exports = module.exports = require('./lib/_stream_readable.js');
- exports.Stream = Stream || exports;
- exports.Readable = exports;
- exports.Writable = require('./lib/_stream_writable.js');
- exports.Duplex = require('./lib/_stream_duplex.js');
- exports.Transform = require('./lib/_stream_transform.js');
- exports.PassThrough = require('./lib/_stream_passthrough.js');
-}
+++ /dev/null
-module.exports = require('./readable').Transform
+++ /dev/null
-module.exports = require('./lib/_stream_writable.js');
+++ /dev/null
-var Stream = require("stream")
-var Writable = require("./lib/_stream_writable.js")
-
-if (process.env.READABLE_STREAM === 'disable') {
- module.exports = Stream && Stream.Writable || Writable
-} else {
- module.exports = Writable
-}
+++ /dev/null
-Copyright (c) 2017 Luke Childs
-
-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.
+++ /dev/null
-# responselike
-
-> A response-like object for mocking a Node.js HTTP response stream
-
-[![Build Status](https://travis-ci.org/lukechilds/responselike.svg?branch=master)](https://travis-ci.org/lukechilds/responselike)
-[![Coverage Status](https://coveralls.io/repos/github/lukechilds/responselike/badge.svg?branch=master)](https://coveralls.io/github/lukechilds/responselike?branch=master)
-[![npm](https://img.shields.io/npm/dm/responselike.svg)](https://www.npmjs.com/package/responselike)
-[![npm](https://img.shields.io/npm/v/responselike.svg)](https://www.npmjs.com/package/responselike)
-
-Returns a streamable response object similar to a [Node.js HTTP response stream](https://nodejs.org/api/http.html#http_class_http_incomingmessage). Useful for formatting cached responses so they can be consumed by code expecting a real response.
-
-## Install
-
-```shell
-npm install --save responselike
-```
-
-Or if you're just using for testing you'll want:
-
-```shell
-npm install --save-dev responselike
-```
-
-## Usage
-
-```js
-const Response = require('responselike');
-
-const response = new Response(200, { foo: 'bar' }, Buffer.from('Hi!'), 'https://example.com');
-
-response.statusCode;
-// 200
-response.headers;
-// { foo: 'bar' }
-response.body;
-// <Buffer 48 69 21>
-response.url;
-// 'https://example.com'
-
-response.pipe(process.stdout);
-// Hi!
-```
-
-
-## API
-
-### new Response(statusCode, headers, body, url)
-
-Returns a streamable response object similar to a [Node.js HTTP response stream](https://nodejs.org/api/http.html#http_class_http_incomingmessage).
-
-#### statusCode
-
-Type: `number`
-
-HTTP response status code.
-
-#### headers
-
-Type: `object`
-
-HTTP headers object. Keys will be automatically lowercased.
-
-#### body
-
-Type: `buffer`
-
-A Buffer containing the response body. The Buffer contents will be streamable but is also exposed directly as `response.body`.
-
-#### url
-
-Type: `string`
-
-Request URL string.
-
-## License
-
-MIT © Luke Childs
+++ /dev/null
-{
- "name": "responselike",
- "version": "1.0.2",
- "description": "A response-like object for mocking a Node.js HTTP response stream",
- "main": "src/index.js",
- "scripts": {
- "test": "xo && nyc ava",
- "coverage": "nyc report --reporter=text-lcov | coveralls"
- },
- "xo": {
- "extends": "xo-lukechilds"
- },
- "keywords": [
- "http",
- "https",
- "response",
- "mock",
- "request",
- "responselike"
- ],
- "repository": {
- "type": "git",
- "url": "https://github.com/lukechilds/responselike.git"
- },
- "author": "lukechilds",
- "license": "MIT",
- "devDependencies": {
- "ava": "^0.22.0",
- "coveralls": "^2.13.1",
- "eslint-config-xo-lukechilds": "^1.0.0",
- "get-stream": "^3.0.0",
- "nyc": "^11.1.0",
- "xo": "^0.19.0"
- },
- "dependencies": {
- "lowercase-keys": "^1.0.0"
- }
-}
+++ /dev/null
-'use strict';
-
-const Readable = require('stream').Readable;
-const lowercaseKeys = require('lowercase-keys');
-
-class Response extends Readable {
- constructor(statusCode, headers, body, url) {
- if (typeof statusCode !== 'number') {
- throw new TypeError('Argument `statusCode` should be a number');
- }
- if (typeof headers !== 'object') {
- throw new TypeError('Argument `headers` should be an object');
- }
- if (!(body instanceof Buffer)) {
- throw new TypeError('Argument `body` should be a buffer');
- }
- if (typeof url !== 'string') {
- throw new TypeError('Argument `url` should be a string');
- }
-
- super();
- this.statusCode = statusCode;
- this.headers = lowercaseKeys(headers);
- this.body = body;
- this.url = url;
- }
-
- _read() {
- this.push(this.body);
- this.push(null);
- }
-}
-
-module.exports = Response;
+++ /dev/null
-language: node_js
-node_js:
- - 'node'
- - '5'
- - '4'
- - '0.12'
- - '0.10'
+++ /dev/null
-The MIT License (MIT)
-
-Copyright (c) Feross Aboukhadijeh
-
-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.
+++ /dev/null
-# safe-buffer [![travis][travis-image]][travis-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][downloads-url] [![javascript style guide][standard-image]][standard-url]
-
-[travis-image]: https://img.shields.io/travis/feross/safe-buffer/master.svg
-[travis-url]: https://travis-ci.org/feross/safe-buffer
-[npm-image]: https://img.shields.io/npm/v/safe-buffer.svg
-[npm-url]: https://npmjs.org/package/safe-buffer
-[downloads-image]: https://img.shields.io/npm/dm/safe-buffer.svg
-[downloads-url]: https://npmjs.org/package/safe-buffer
-[standard-image]: https://img.shields.io/badge/code_style-standard-brightgreen.svg
-[standard-url]: https://standardjs.com
-
-#### Safer Node.js Buffer API
-
-**Use the new Node.js Buffer APIs (`Buffer.from`, `Buffer.alloc`,
-`Buffer.allocUnsafe`, `Buffer.allocUnsafeSlow`) in all versions of Node.js.**
-
-**Uses the built-in implementation when available.**
-
-## install
-
-```
-npm install safe-buffer
-```
-
-## usage
-
-The goal of this package is to provide a safe replacement for the node.js `Buffer`.
-
-It's a drop-in replacement for `Buffer`. You can use it by adding one `require` line to
-the top of your node.js modules:
-
-```js
-var Buffer = require('safe-buffer').Buffer
-
-// Existing buffer code will continue to work without issues:
-
-new Buffer('hey', 'utf8')
-new Buffer([1, 2, 3], 'utf8')
-new Buffer(obj)
-new Buffer(16) // create an uninitialized buffer (potentially unsafe)
-
-// But you can use these new explicit APIs to make clear what you want:
-
-Buffer.from('hey', 'utf8') // convert from many types to a Buffer
-Buffer.alloc(16) // create a zero-filled buffer (safe)
-Buffer.allocUnsafe(16) // create an uninitialized buffer (potentially unsafe)
-```
-
-## api
-
-### Class Method: Buffer.from(array)
-<!-- YAML
-added: v3.0.0
--->
-
-* `array` {Array}
-
-Allocates a new `Buffer` using an `array` of octets.
-
-```js
-const buf = Buffer.from([0x62,0x75,0x66,0x66,0x65,0x72]);
- // creates a new Buffer containing ASCII bytes
- // ['b','u','f','f','e','r']
-```
-
-A `TypeError` will be thrown if `array` is not an `Array`.
-
-### Class Method: Buffer.from(arrayBuffer[, byteOffset[, length]])
-<!-- YAML
-added: v5.10.0
--->
-
-* `arrayBuffer` {ArrayBuffer} The `.buffer` property of a `TypedArray` or
- a `new ArrayBuffer()`
-* `byteOffset` {Number} Default: `0`
-* `length` {Number} Default: `arrayBuffer.length - byteOffset`
-
-When passed a reference to the `.buffer` property of a `TypedArray` instance,
-the newly created `Buffer` will share the same allocated memory as the
-TypedArray.
-
-```js
-const arr = new Uint16Array(2);
-arr[0] = 5000;
-arr[1] = 4000;
-
-const buf = Buffer.from(arr.buffer); // shares the memory with arr;
-
-console.log(buf);
- // Prints: <Buffer 88 13 a0 0f>
-
-// changing the TypedArray changes the Buffer also
-arr[1] = 6000;
-
-console.log(buf);
- // Prints: <Buffer 88 13 70 17>
-```
-
-The optional `byteOffset` and `length` arguments specify a memory range within
-the `arrayBuffer` that will be shared by the `Buffer`.
-
-```js
-const ab = new ArrayBuffer(10);
-const buf = Buffer.from(ab, 0, 2);
-console.log(buf.length);
- // Prints: 2
-```
-
-A `TypeError` will be thrown if `arrayBuffer` is not an `ArrayBuffer`.
-
-### Class Method: Buffer.from(buffer)
-<!-- YAML
-added: v3.0.0
--->
-
-* `buffer` {Buffer}
-
-Copies the passed `buffer` data onto a new `Buffer` instance.
-
-```js
-const buf1 = Buffer.from('buffer');
-const buf2 = Buffer.from(buf1);
-
-buf1[0] = 0x61;
-console.log(buf1.toString());
- // 'auffer'
-console.log(buf2.toString());
- // 'buffer' (copy is not changed)
-```
-
-A `TypeError` will be thrown if `buffer` is not a `Buffer`.
-
-### Class Method: Buffer.from(str[, encoding])
-<!-- YAML
-added: v5.10.0
--->
-
-* `str` {String} String to encode.
-* `encoding` {String} Encoding to use, Default: `'utf8'`
-
-Creates a new `Buffer` containing the given JavaScript string `str`. If
-provided, the `encoding` parameter identifies the character encoding.
-If not provided, `encoding` defaults to `'utf8'`.
-
-```js
-const buf1 = Buffer.from('this is a tést');
-console.log(buf1.toString());
- // prints: this is a tést
-console.log(buf1.toString('ascii'));
- // prints: this is a tC)st
-
-const buf2 = Buffer.from('7468697320697320612074c3a97374', 'hex');
-console.log(buf2.toString());
- // prints: this is a tést
-```
-
-A `TypeError` will be thrown if `str` is not a string.
-
-### Class Method: Buffer.alloc(size[, fill[, encoding]])
-<!-- YAML
-added: v5.10.0
--->
-
-* `size` {Number}
-* `fill` {Value} Default: `undefined`
-* `encoding` {String} Default: `utf8`
-
-Allocates a new `Buffer` of `size` bytes. If `fill` is `undefined`, the
-`Buffer` will be *zero-filled*.
-
-```js
-const buf = Buffer.alloc(5);
-console.log(buf);
- // <Buffer 00 00 00 00 00>
-```
-
-The `size` must be less than or equal to the value of
-`require('buffer').kMaxLength` (on 64-bit architectures, `kMaxLength` is
-`(2^31)-1`). Otherwise, a [`RangeError`][] is thrown. A zero-length Buffer will
-be created if a `size` less than or equal to 0 is specified.
-
-If `fill` is specified, the allocated `Buffer` will be initialized by calling
-`buf.fill(fill)`. See [`buf.fill()`][] for more information.
-
-```js
-const buf = Buffer.alloc(5, 'a');
-console.log(buf);
- // <Buffer 61 61 61 61 61>
-```
-
-If both `fill` and `encoding` are specified, the allocated `Buffer` will be
-initialized by calling `buf.fill(fill, encoding)`. For example:
-
-```js
-const buf = Buffer.alloc(11, 'aGVsbG8gd29ybGQ=', 'base64');
-console.log(buf);
- // <Buffer 68 65 6c 6c 6f 20 77 6f 72 6c 64>
-```
-
-Calling `Buffer.alloc(size)` can be significantly slower than the alternative
-`Buffer.allocUnsafe(size)` but ensures that the newly created `Buffer` instance
-contents will *never contain sensitive data*.
-
-A `TypeError` will be thrown if `size` is not a number.
-
-### Class Method: Buffer.allocUnsafe(size)
-<!-- YAML
-added: v5.10.0
--->
-
-* `size` {Number}
-
-Allocates a new *non-zero-filled* `Buffer` of `size` bytes. The `size` must
-be less than or equal to the value of `require('buffer').kMaxLength` (on 64-bit
-architectures, `kMaxLength` is `(2^31)-1`). Otherwise, a [`RangeError`][] is
-thrown. A zero-length Buffer will be created if a `size` less than or equal to
-0 is specified.
-
-The underlying memory for `Buffer` instances created in this way is *not
-initialized*. The contents of the newly created `Buffer` are unknown and
-*may contain sensitive data*. Use [`buf.fill(0)`][] to initialize such
-`Buffer` instances to zeroes.
-
-```js
-const buf = Buffer.allocUnsafe(5);
-console.log(buf);
- // <Buffer 78 e0 82 02 01>
- // (octets will be different, every time)
-buf.fill(0);
-console.log(buf);
- // <Buffer 00 00 00 00 00>
-```
-
-A `TypeError` will be thrown if `size` is not a number.
-
-Note that the `Buffer` module pre-allocates an internal `Buffer` instance of
-size `Buffer.poolSize` that is used as a pool for the fast allocation of new
-`Buffer` instances created using `Buffer.allocUnsafe(size)` (and the deprecated
-`new Buffer(size)` constructor) only when `size` is less than or equal to
-`Buffer.poolSize >> 1` (floor of `Buffer.poolSize` divided by two). The default
-value of `Buffer.poolSize` is `8192` but can be modified.
-
-Use of this pre-allocated internal memory pool is a key difference between
-calling `Buffer.alloc(size, fill)` vs. `Buffer.allocUnsafe(size).fill(fill)`.
-Specifically, `Buffer.alloc(size, fill)` will *never* use the internal Buffer
-pool, while `Buffer.allocUnsafe(size).fill(fill)` *will* use the internal
-Buffer pool if `size` is less than or equal to half `Buffer.poolSize`. The
-difference is subtle but can be important when an application requires the
-additional performance that `Buffer.allocUnsafe(size)` provides.
-
-### Class Method: Buffer.allocUnsafeSlow(size)
-<!-- YAML
-added: v5.10.0
--->
-
-* `size` {Number}
-
-Allocates a new *non-zero-filled* and non-pooled `Buffer` of `size` bytes. The
-`size` must be less than or equal to the value of
-`require('buffer').kMaxLength` (on 64-bit architectures, `kMaxLength` is
-`(2^31)-1`). Otherwise, a [`RangeError`][] is thrown. A zero-length Buffer will
-be created if a `size` less than or equal to 0 is specified.
-
-The underlying memory for `Buffer` instances created in this way is *not
-initialized*. The contents of the newly created `Buffer` are unknown and
-*may contain sensitive data*. Use [`buf.fill(0)`][] to initialize such
-`Buffer` instances to zeroes.
-
-When using `Buffer.allocUnsafe()` to allocate new `Buffer` instances,
-allocations under 4KB are, by default, sliced from a single pre-allocated
-`Buffer`. This allows applications to avoid the garbage collection overhead of
-creating many individually allocated Buffers. This approach improves both
-performance and memory usage by eliminating the need to track and cleanup as
-many `Persistent` objects.
-
-However, in the case where a developer may need to retain a small chunk of
-memory from a pool for an indeterminate amount of time, it may be appropriate
-to create an un-pooled Buffer instance using `Buffer.allocUnsafeSlow()` then
-copy out the relevant bits.
-
-```js
-// need to keep around a few small chunks of memory
-const store = [];
-
-socket.on('readable', () => {
- const data = socket.read();
- // allocate for retained data
- const sb = Buffer.allocUnsafeSlow(10);
- // copy the data into the new allocation
- data.copy(sb, 0, 0, 10);
- store.push(sb);
-});
-```
-
-Use of `Buffer.allocUnsafeSlow()` should be used only as a last resort *after*
-a developer has observed undue memory retention in their applications.
-
-A `TypeError` will be thrown if `size` is not a number.
-
-### All the Rest
-
-The rest of the `Buffer` API is exactly the same as in node.js.
-[See the docs](https://nodejs.org/api/buffer.html).
-
-
-## Related links
-
-- [Node.js issue: Buffer(number) is unsafe](https://github.com/nodejs/node/issues/4660)
-- [Node.js Enhancement Proposal: Buffer.from/Buffer.alloc/Buffer.zalloc/Buffer() soft-deprecate](https://github.com/nodejs/node-eps/pull/4)
-
-## Why is `Buffer` unsafe?
-
-Today, the node.js `Buffer` constructor is overloaded to handle many different argument
-types like `String`, `Array`, `Object`, `TypedArrayView` (`Uint8Array`, etc.),
-`ArrayBuffer`, and also `Number`.
-
-The API is optimized for convenience: you can throw any type at it, and it will try to do
-what you want.
-
-Because the Buffer constructor is so powerful, you often see code like this:
-
-```js
-// Convert UTF-8 strings to hex
-function toHex (str) {
- return new Buffer(str).toString('hex')
-}
-```
-
-***But what happens if `toHex` is called with a `Number` argument?***
-
-### Remote Memory Disclosure
-
-If an attacker can make your program call the `Buffer` constructor with a `Number`
-argument, then they can make it allocate uninitialized memory from the node.js process.
-This could potentially disclose TLS private keys, user data, or database passwords.
-
-When the `Buffer` constructor is passed a `Number` argument, it returns an
-**UNINITIALIZED** block of memory of the specified `size`. When you create a `Buffer` like
-this, you **MUST** overwrite the contents before returning it to the user.
-
-From the [node.js docs](https://nodejs.org/api/buffer.html#buffer_new_buffer_size):
-
-> `new Buffer(size)`
->
-> - `size` Number
->
-> The underlying memory for `Buffer` instances created in this way is not initialized.
-> **The contents of a newly created `Buffer` are unknown and could contain sensitive
-> data.** Use `buf.fill(0)` to initialize a Buffer to zeroes.
-
-(Emphasis our own.)
-
-Whenever the programmer intended to create an uninitialized `Buffer` you often see code
-like this:
-
-```js
-var buf = new Buffer(16)
-
-// Immediately overwrite the uninitialized buffer with data from another buffer
-for (var i = 0; i < buf.length; i++) {
- buf[i] = otherBuf[i]
-}
-```
-
-
-### Would this ever be a problem in real code?
-
-Yes. It's surprisingly common to forget to check the type of your variables in a
-dynamically-typed language like JavaScript.
-
-Usually the consequences of assuming the wrong type is that your program crashes with an
-uncaught exception. But the failure mode for forgetting to check the type of arguments to
-the `Buffer` constructor is more catastrophic.
-
-Here's an example of a vulnerable service that takes a JSON payload and converts it to
-hex:
-
-```js
-// Take a JSON payload {str: "some string"} and convert it to hex
-var server = http.createServer(function (req, res) {
- var data = ''
- req.setEncoding('utf8')
- req.on('data', function (chunk) {
- data += chunk
- })
- req.on('end', function () {
- var body = JSON.parse(data)
- res.end(new Buffer(body.str).toString('hex'))
- })
-})
-
-server.listen(8080)
-```
-
-In this example, an http client just has to send:
-
-```json
-{
- "str": 1000
-}
-```
-
-and it will get back 1,000 bytes of uninitialized memory from the server.
-
-This is a very serious bug. It's similar in severity to the
-[the Heartbleed bug](http://heartbleed.com/) that allowed disclosure of OpenSSL process
-memory by remote attackers.
-
-
-### Which real-world packages were vulnerable?
-
-#### [`bittorrent-dht`](https://www.npmjs.com/package/bittorrent-dht)
-
-[Mathias Buus](https://github.com/mafintosh) and I
-([Feross Aboukhadijeh](http://feross.org/)) found this issue in one of our own packages,
-[`bittorrent-dht`](https://www.npmjs.com/package/bittorrent-dht). The bug would allow
-anyone on the internet to send a series of messages to a user of `bittorrent-dht` and get
-them to reveal 20 bytes at a time of uninitialized memory from the node.js process.
-
-Here's
-[the commit](https://github.com/feross/bittorrent-dht/commit/6c7da04025d5633699800a99ec3fbadf70ad35b8)
-that fixed it. We released a new fixed version, created a
-[Node Security Project disclosure](https://nodesecurity.io/advisories/68), and deprecated all
-vulnerable versions on npm so users will get a warning to upgrade to a newer version.
-
-#### [`ws`](https://www.npmjs.com/package/ws)
-
-That got us wondering if there were other vulnerable packages. Sure enough, within a short
-period of time, we found the same issue in [`ws`](https://www.npmjs.com/package/ws), the
-most popular WebSocket implementation in node.js.
-
-If certain APIs were called with `Number` parameters instead of `String` or `Buffer` as
-expected, then uninitialized server memory would be disclosed to the remote peer.
-
-These were the vulnerable methods:
-
-```js
-socket.send(number)
-socket.ping(number)
-socket.pong(number)
-```
-
-Here's a vulnerable socket server with some echo functionality:
-
-```js
-server.on('connection', function (socket) {
- socket.on('message', function (message) {
- message = JSON.parse(message)
- if (message.type === 'echo') {
- socket.send(message.data) // send back the user's message
- }
- })
-})
-```
-
-`socket.send(number)` called on the server, will disclose server memory.
-
-Here's [the release](https://github.com/websockets/ws/releases/tag/1.0.1) where the issue
-was fixed, with a more detailed explanation. Props to
-[Arnout Kazemier](https://github.com/3rd-Eden) for the quick fix. Here's the
-[Node Security Project disclosure](https://nodesecurity.io/advisories/67).
-
-
-### What's the solution?
-
-It's important that node.js offers a fast way to get memory otherwise performance-critical
-applications would needlessly get a lot slower.
-
-But we need a better way to *signal our intent* as programmers. **When we want
-uninitialized memory, we should request it explicitly.**
-
-Sensitive functionality should not be packed into a developer-friendly API that loosely
-accepts many different types. This type of API encourages the lazy practice of passing
-variables in without checking the type very carefully.
-
-#### A new API: `Buffer.allocUnsafe(number)`
-
-The functionality of creating buffers with uninitialized memory should be part of another
-API. We propose `Buffer.allocUnsafe(number)`. This way, it's not part of an API that
-frequently gets user input of all sorts of different types passed into it.
-
-```js
-var buf = Buffer.allocUnsafe(16) // careful, uninitialized memory!
-
-// Immediately overwrite the uninitialized buffer with data from another buffer
-for (var i = 0; i < buf.length; i++) {
- buf[i] = otherBuf[i]
-}
-```
-
-
-### How do we fix node.js core?
-
-We sent [a PR to node.js core](https://github.com/nodejs/node/pull/4514) (merged as
-`semver-major`) which defends against one case:
-
-```js
-var str = 16
-new Buffer(str, 'utf8')
-```
-
-In this situation, it's implied that the programmer intended the first argument to be a
-string, since they passed an encoding as a second argument. Today, node.js will allocate
-uninitialized memory in the case of `new Buffer(number, encoding)`, which is probably not
-what the programmer intended.
-
-But this is only a partial solution, since if the programmer does `new Buffer(variable)`
-(without an `encoding` parameter) there's no way to know what they intended. If `variable`
-is sometimes a number, then uninitialized memory will sometimes be returned.
-
-### What's the real long-term fix?
-
-We could deprecate and remove `new Buffer(number)` and use `Buffer.allocUnsafe(number)` when
-we need uninitialized memory. But that would break 1000s of packages.
-
-~~We believe the best solution is to:~~
-
-~~1. Change `new Buffer(number)` to return safe, zeroed-out memory~~
-
-~~2. Create a new API for creating uninitialized Buffers. We propose: `Buffer.allocUnsafe(number)`~~
-
-#### Update
-
-We now support adding three new APIs:
-
-- `Buffer.from(value)` - convert from any type to a buffer
-- `Buffer.alloc(size)` - create a zero-filled buffer
-- `Buffer.allocUnsafe(size)` - create an uninitialized buffer with given size
-
-This solves the core problem that affected `ws` and `bittorrent-dht` which is
-`Buffer(variable)` getting tricked into taking a number argument.
-
-This way, existing code continues working and the impact on the npm ecosystem will be
-minimal. Over time, npm maintainers can migrate performance-critical code to use
-`Buffer.allocUnsafe(number)` instead of `new Buffer(number)`.
-
-
-### Conclusion
-
-We think there's a serious design issue with the `Buffer` API as it exists today. It
-promotes insecure software by putting high-risk functionality into a convenient API
-with friendly "developer ergonomics".
-
-This wasn't merely a theoretical exercise because we found the issue in some of the
-most popular npm packages.
-
-Fortunately, there's an easy fix that can be applied today. Use `safe-buffer` in place of
-`buffer`.
-
-```js
-var Buffer = require('safe-buffer').Buffer
-```
-
-Eventually, we hope that node.js core can switch to this new, safer behavior. We believe
-the impact on the ecosystem would be minimal since it's not a breaking change.
-Well-maintained, popular packages would be updated to use `Buffer.alloc` quickly, while
-older, insecure packages would magically become safe from this attack vector.
-
-
-## links
-
-- [Node.js PR: buffer: throw if both length and enc are passed](https://github.com/nodejs/node/pull/4514)
-- [Node Security Project disclosure for `ws`](https://nodesecurity.io/advisories/67)
-- [Node Security Project disclosure for`bittorrent-dht`](https://nodesecurity.io/advisories/68)
-
-
-## credit
-
-The original issues in `bittorrent-dht`
-([disclosure](https://nodesecurity.io/advisories/68)) and
-`ws` ([disclosure](https://nodesecurity.io/advisories/67)) were discovered by
-[Mathias Buus](https://github.com/mafintosh) and
-[Feross Aboukhadijeh](http://feross.org/).
-
-Thanks to [Adam Baldwin](https://github.com/evilpacket) for helping disclose these issues
-and for his work running the [Node Security Project](https://nodesecurity.io/).
-
-Thanks to [John Hiesey](https://github.com/jhiesey) for proofreading this README and
-auditing the code.
-
-
-## license
-
-MIT. Copyright (C) [Feross Aboukhadijeh](http://feross.org)
+++ /dev/null
-/* eslint-disable node/no-deprecated-api */
-var buffer = require('buffer')
-var Buffer = buffer.Buffer
-
-// alternative to using Object.keys for old browsers
-function copyProps (src, dst) {
- for (var key in src) {
- dst[key] = src[key]
- }
-}
-if (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) {
- module.exports = buffer
-} else {
- // Copy properties from require('buffer')
- copyProps(buffer, exports)
- exports.Buffer = SafeBuffer
-}
-
-function SafeBuffer (arg, encodingOrOffset, length) {
- return Buffer(arg, encodingOrOffset, length)
-}
-
-// Copy static methods from Buffer
-copyProps(Buffer, SafeBuffer)
-
-SafeBuffer.from = function (arg, encodingOrOffset, length) {
- if (typeof arg === 'number') {
- throw new TypeError('Argument must not be a number')
- }
- return Buffer(arg, encodingOrOffset, length)
-}
-
-SafeBuffer.alloc = function (size, fill, encoding) {
- if (typeof size !== 'number') {
- throw new TypeError('Argument must be a number')
- }
- var buf = Buffer(size)
- if (fill !== undefined) {
- if (typeof encoding === 'string') {
- buf.fill(fill, encoding)
- } else {
- buf.fill(fill)
- }
- } else {
- buf.fill(0)
- }
- return buf
-}
-
-SafeBuffer.allocUnsafe = function (size) {
- if (typeof size !== 'number') {
- throw new TypeError('Argument must be a number')
- }
- return Buffer(size)
-}
-
-SafeBuffer.allocUnsafeSlow = function (size) {
- if (typeof size !== 'number') {
- throw new TypeError('Argument must be a number')
- }
- return buffer.SlowBuffer(size)
-}
+++ /dev/null
-{
- "name": "safe-buffer",
- "description": "Safer Node.js Buffer API",
- "version": "5.1.1",
- "author": {
- "name": "Feross Aboukhadijeh",
- "email": "feross@feross.org",
- "url": "http://feross.org"
- },
- "bugs": {
- "url": "https://github.com/feross/safe-buffer/issues"
- },
- "devDependencies": {
- "standard": "*",
- "tape": "^4.0.0",
- "zuul": "^3.0.0"
- },
- "homepage": "https://github.com/feross/safe-buffer",
- "keywords": [
- "buffer",
- "buffer allocate",
- "node security",
- "safe",
- "safe-buffer",
- "security",
- "uninitialized"
- ],
- "license": "MIT",
- "main": "index.js",
- "repository": {
- "type": "git",
- "url": "git://github.com/feross/safe-buffer.git"
- },
- "scripts": {
- "test": "standard && tape test.js"
- }
-}
+++ /dev/null
-/* eslint-disable node/no-deprecated-api */
-
-var test = require('tape')
-var SafeBuffer = require('./').Buffer
-
-test('new SafeBuffer(value) works just like Buffer', function (t) {
- t.deepEqual(new SafeBuffer('hey'), new Buffer('hey'))
- t.deepEqual(new SafeBuffer('hey', 'utf8'), new Buffer('hey', 'utf8'))
- t.deepEqual(new SafeBuffer('686579', 'hex'), new Buffer('686579', 'hex'))
- t.deepEqual(new SafeBuffer([1, 2, 3]), new Buffer([1, 2, 3]))
- t.deepEqual(new SafeBuffer(new Uint8Array([1, 2, 3])), new Buffer(new Uint8Array([1, 2, 3])))
-
- t.equal(typeof SafeBuffer.isBuffer, 'function')
- t.equal(SafeBuffer.isBuffer(new SafeBuffer('hey')), true)
- t.equal(Buffer.isBuffer(new SafeBuffer('hey')), true)
- t.notOk(SafeBuffer.isBuffer({}))
-
- t.end()
-})
-
-test('SafeBuffer.from(value) converts to a Buffer', function (t) {
- t.deepEqual(SafeBuffer.from('hey'), new Buffer('hey'))
- t.deepEqual(SafeBuffer.from('hey', 'utf8'), new Buffer('hey', 'utf8'))
- t.deepEqual(SafeBuffer.from('686579', 'hex'), new Buffer('686579', 'hex'))
- t.deepEqual(SafeBuffer.from([1, 2, 3]), new Buffer([1, 2, 3]))
- t.deepEqual(SafeBuffer.from(new Uint8Array([1, 2, 3])), new Buffer(new Uint8Array([1, 2, 3])))
-
- t.end()
-})
-
-test('SafeBuffer.alloc(number) returns zeroed-out memory', function (t) {
- for (var i = 0; i < 10; i++) {
- var expected1 = new Buffer(1000)
- expected1.fill(0)
- t.deepEqual(SafeBuffer.alloc(1000), expected1)
-
- var expected2 = new Buffer(1000 * 1000)
- expected2.fill(0)
- t.deepEqual(SafeBuffer.alloc(1000 * 1000), expected2)
- }
- t.end()
-})
-
-test('SafeBuffer.allocUnsafe(number)', function (t) {
- var buf = SafeBuffer.allocUnsafe(100) // unitialized memory
- t.equal(buf.length, 100)
- t.equal(SafeBuffer.isBuffer(buf), true)
- t.equal(Buffer.isBuffer(buf), true)
- t.end()
-})
-
-test('SafeBuffer.from() throws with number types', function (t) {
- t.plan(5)
- t.throws(function () {
- SafeBuffer.from(0)
- })
- t.throws(function () {
- SafeBuffer.from(-1)
- })
- t.throws(function () {
- SafeBuffer.from(NaN)
- })
- t.throws(function () {
- SafeBuffer.from(Infinity)
- })
- t.throws(function () {
- SafeBuffer.from(99)
- })
-})
-
-test('SafeBuffer.allocUnsafe() throws with non-number types', function (t) {
- t.plan(4)
- t.throws(function () {
- SafeBuffer.allocUnsafe('hey')
- })
- t.throws(function () {
- SafeBuffer.allocUnsafe('hey', 'utf8')
- })
- t.throws(function () {
- SafeBuffer.allocUnsafe([1, 2, 3])
- })
- t.throws(function () {
- SafeBuffer.allocUnsafe({})
- })
-})
-
-test('SafeBuffer.alloc() throws with non-number types', function (t) {
- t.plan(4)
- t.throws(function () {
- SafeBuffer.alloc('hey')
- })
- t.throws(function () {
- SafeBuffer.alloc('hey', 'utf8')
- })
- t.throws(function () {
- SafeBuffer.alloc([1, 2, 3])
- })
- t.throws(function () {
- SafeBuffer.alloc({})
- })
-})
+++ /dev/null
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
-//# sourceMappingURL=example.js.map
\ No newline at end of file
+++ /dev/null
-{"version":3,"file":"example.js","sourceRoot":"","sources":["../example.ts"],"names":[],"mappings":""}
\ No newline at end of file
+++ /dev/null
-/// <reference types="node" />
-export declare const enum TypeName {
- null = "null",
- boolean = "boolean",
- undefined = "undefined",
- string = "string",
- number = "number",
- symbol = "symbol",
- Function = "Function",
- Array = "Array",
- Buffer = "Buffer",
- Object = "Object",
- RegExp = "RegExp",
- Date = "Date",
- Error = "Error",
- Map = "Map",
- Set = "Set",
- WeakMap = "WeakMap",
- WeakSet = "WeakSet",
- Int8Array = "Int8Array",
- Uint8Array = "Uint8Array",
- Uint8ClampedArray = "Uint8ClampedArray",
- Int16Array = "Int16Array",
- Uint16Array = "Uint16Array",
- Int32Array = "Int32Array",
- Uint32Array = "Uint32Array",
- Float32Array = "Float32Array",
- Float64Array = "Float64Array",
- ArrayBuffer = "ArrayBuffer",
- SharedArrayBuffer = "SharedArrayBuffer",
- DataView = "DataView",
- Promise = "Promise",
-}
-declare function is(value: any): TypeName;
-declare namespace is {
- const undefined: (value: any) => boolean;
- const string: (value: any) => boolean;
- const number: (value: any) => boolean;
- const function_: (value: any) => boolean;
- const null_: (value: any) => boolean;
- const class_: (value: any) => any;
- const boolean: (value: any) => boolean;
- const symbol: (value: any) => boolean;
- const array: (arg: any) => arg is any[];
- const buffer: (obj: any) => obj is Buffer;
- const nullOrUndefined: (value: any) => boolean;
- const object: (value: any) => boolean;
- const iterable: (value: any) => boolean;
- const generator: (value: any) => boolean;
- const nativePromise: (value: any) => boolean;
- const promise: (value: any) => boolean;
- const generatorFunction: (value: any) => boolean;
- const asyncFunction: (value: any) => boolean;
- const boundFunction: (value: any) => boolean;
- const regExp: (value: any) => boolean;
- const date: (value: any) => boolean;
- const error: (value: any) => boolean;
- const map: (value: any) => boolean;
- const set: (value: any) => boolean;
- const weakMap: (value: any) => boolean;
- const weakSet: (value: any) => boolean;
- const int8Array: (value: any) => boolean;
- const uint8Array: (value: any) => boolean;
- const uint8ClampedArray: (value: any) => boolean;
- const int16Array: (value: any) => boolean;
- const uint16Array: (value: any) => boolean;
- const int32Array: (value: any) => boolean;
- const uint32Array: (value: any) => boolean;
- const float32Array: (value: any) => boolean;
- const float64Array: (value: any) => boolean;
- const arrayBuffer: (value: any) => boolean;
- const sharedArrayBuffer: (value: any) => boolean;
- const dataView: (value: any) => boolean;
- const directInstanceOf: (instance: any, klass: any) => boolean;
- const truthy: (value: any) => boolean;
- const falsy: (value: any) => boolean;
- const nan: (value: any) => boolean;
- const primitive: (value: any) => boolean;
- const integer: (value: any) => boolean;
- const safeInteger: (value: any) => boolean;
- const plainObject: (value: any) => boolean;
- const typedArray: (value: any) => boolean;
- const arrayLike: (value: any) => boolean;
- const inRange: (value: number, range: number | number[]) => boolean;
- const domElement: (value: any) => boolean;
- const nodeStream: (value: any) => boolean;
- const infinite: (value: any) => boolean;
- const even: (rem: number) => boolean;
- const odd: (rem: number) => boolean;
- const empty: (value: any) => boolean;
- const emptyOrWhitespace: (value: any) => boolean;
- function any(...predicate: any[]): any;
- function all(...predicate: any[]): any;
-}
-export default is;
+++ /dev/null
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
-const util = require("util");
-const toString = Object.prototype.toString;
-const isOfType = (type) => (value) => typeof value === type; // tslint:disable-line:strict-type-predicates
-const getObjectType = (value) => {
- const objectName = toString.call(value).slice(8, -1);
- if (objectName) {
- return objectName;
- }
- return null;
-};
-const isObjectOfType = (typeName) => (value) => {
- return getObjectType(value) === typeName;
-};
-function is(value) {
- if (value === null) {
- return "null" /* null */;
- }
- if (value === true || value === false) {
- return "boolean" /* boolean */;
- }
- const type = typeof value;
- if (type === 'undefined') {
- return "undefined" /* undefined */;
- }
- if (type === 'string') {
- return "string" /* string */;
- }
- if (type === 'number') {
- return "number" /* number */;
- }
- if (type === 'symbol') {
- return "symbol" /* symbol */;
- }
- if (is.function_(value)) {
- return "Function" /* Function */;
- }
- if (Array.isArray(value)) {
- return "Array" /* Array */;
- }
- if (Buffer.isBuffer(value)) {
- return "Buffer" /* Buffer */;
- }
- const tagType = getObjectType(value);
- if (tagType) {
- return tagType;
- }
- if (value instanceof String || value instanceof Boolean || value instanceof Number) {
- throw new TypeError('Please don\'t use object wrappers for primitive types');
- }
- return "Object" /* Object */;
-}
-(function (is) {
- const isObject = (value) => typeof value === 'object';
- // tslint:disable:variable-name
- is.undefined = isOfType('undefined');
- is.string = isOfType('string');
- is.number = isOfType('number');
- is.function_ = isOfType('function');
- is.null_ = (value) => value === null;
- is.class_ = (value) => is.function_(value) && value.toString().startsWith('class ');
- is.boolean = (value) => value === true || value === false;
- // tslint:enable:variable-name
- is.symbol = isOfType('symbol');
- is.array = Array.isArray;
- is.buffer = Buffer.isBuffer;
- is.nullOrUndefined = (value) => is.null_(value) || is.undefined(value);
- is.object = (value) => !is.nullOrUndefined(value) && (is.function_(value) || isObject(value));
- is.iterable = (value) => !is.nullOrUndefined(value) && is.function_(value[Symbol.iterator]);
- is.generator = (value) => is.iterable(value) && is.function_(value.next) && is.function_(value.throw);
- is.nativePromise = isObjectOfType("Promise" /* Promise */);
- const hasPromiseAPI = (value) => !is.null_(value) &&
- isObject(value) &&
- is.function_(value.then) &&
- is.function_(value.catch);
- is.promise = (value) => is.nativePromise(value) || hasPromiseAPI(value);
- // TODO: Change to use `isObjectOfType` once Node.js 6 or higher is targeted
- const isFunctionOfType = (type) => (value) => is.function_(value) && is.function_(value.constructor) && value.constructor.name === type;
- is.generatorFunction = isFunctionOfType('GeneratorFunction');
- is.asyncFunction = isFunctionOfType('AsyncFunction');
- is.boundFunction = (value) => is.function_(value) && !value.hasOwnProperty('prototype');
- is.regExp = isObjectOfType("RegExp" /* RegExp */);
- is.date = isObjectOfType("Date" /* Date */);
- is.error = isObjectOfType("Error" /* Error */);
- is.map = isObjectOfType("Map" /* Map */);
- is.set = isObjectOfType("Set" /* Set */);
- is.weakMap = isObjectOfType("WeakMap" /* WeakMap */);
- is.weakSet = isObjectOfType("WeakSet" /* WeakSet */);
- is.int8Array = isObjectOfType("Int8Array" /* Int8Array */);
- is.uint8Array = isObjectOfType("Uint8Array" /* Uint8Array */);
- is.uint8ClampedArray = isObjectOfType("Uint8ClampedArray" /* Uint8ClampedArray */);
- is.int16Array = isObjectOfType("Int16Array" /* Int16Array */);
- is.uint16Array = isObjectOfType("Uint16Array" /* Uint16Array */);
- is.int32Array = isObjectOfType("Int32Array" /* Int32Array */);
- is.uint32Array = isObjectOfType("Uint32Array" /* Uint32Array */);
- is.float32Array = isObjectOfType("Float32Array" /* Float32Array */);
- is.float64Array = isObjectOfType("Float64Array" /* Float64Array */);
- is.arrayBuffer = isObjectOfType("ArrayBuffer" /* ArrayBuffer */);
- is.sharedArrayBuffer = isObjectOfType("SharedArrayBuffer" /* SharedArrayBuffer */);
- is.dataView = isObjectOfType("DataView" /* DataView */);
- // TODO: Remove `object` checks when targeting ES2015 or higher
- // See `Notes`: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/getPrototypeOf
- is.directInstanceOf = (instance, klass) => is.object(instance) && is.object(klass) && Object.getPrototypeOf(instance) === klass.prototype;
- is.truthy = (value) => Boolean(value);
- is.falsy = (value) => !value;
- is.nan = (value) => Number.isNaN(value);
- const primitiveTypes = new Set([
- 'undefined',
- 'string',
- 'number',
- 'boolean',
- 'symbol'
- ]);
- is.primitive = (value) => is.null_(value) || primitiveTypes.has(typeof value);
- is.integer = (value) => Number.isInteger(value);
- is.safeInteger = (value) => Number.isSafeInteger(value);
- is.plainObject = (value) => {
- // From: https://github.com/sindresorhus/is-plain-obj/blob/master/index.js
- let prototype;
- return getObjectType(value) === "Object" /* Object */ &&
- (prototype = Object.getPrototypeOf(value), prototype === null || // tslint:disable-line:ban-comma-operator
- prototype === Object.getPrototypeOf({}));
- };
- const typedArrayTypes = new Set([
- "Int8Array" /* Int8Array */,
- "Uint8Array" /* Uint8Array */,
- "Uint8ClampedArray" /* Uint8ClampedArray */,
- "Int16Array" /* Int16Array */,
- "Uint16Array" /* Uint16Array */,
- "Int32Array" /* Int32Array */,
- "Uint32Array" /* Uint32Array */,
- "Float32Array" /* Float32Array */,
- "Float64Array" /* Float64Array */
- ]);
- is.typedArray = (value) => {
- const objectType = getObjectType(value);
- if (objectType === null) {
- return false;
- }
- return typedArrayTypes.has(objectType);
- };
- const isValidLength = (value) => is.safeInteger(value) && value > -1;
- is.arrayLike = (value) => !is.nullOrUndefined(value) && !is.function_(value) && isValidLength(value.length);
- is.inRange = (value, range) => {
- if (is.number(range)) {
- return value >= Math.min(0, range) && value <= Math.max(range, 0);
- }
- if (is.array(range) && range.length === 2) {
- // TODO: Use spread operator here when targeting Node.js 6 or higher
- return value >= Math.min.apply(null, range) && value <= Math.max.apply(null, range);
- }
- throw new TypeError(`Invalid range: ${util.inspect(range)}`);
- };
- const NODE_TYPE_ELEMENT = 1;
- const DOM_PROPERTIES_TO_CHECK = [
- 'innerHTML',
- 'ownerDocument',
- 'style',
- 'attributes',
- 'nodeValue'
- ];
- is.domElement = (value) => is.object(value) && value.nodeType === NODE_TYPE_ELEMENT && is.string(value.nodeName) &&
- !is.plainObject(value) && DOM_PROPERTIES_TO_CHECK.every(property => property in value);
- is.nodeStream = (value) => !is.nullOrUndefined(value) && isObject(value) && is.function_(value.pipe);
- is.infinite = (value) => value === Infinity || value === -Infinity;
- const isAbsoluteMod2 = (value) => (rem) => is.integer(rem) && Math.abs(rem % 2) === value;
- is.even = isAbsoluteMod2(0);
- is.odd = isAbsoluteMod2(1);
- const isWhiteSpaceString = (value) => is.string(value) && /\S/.test(value) === false;
- const isEmptyStringOrArray = (value) => (is.string(value) || is.array(value)) && value.length === 0;
- const isEmptyObject = (value) => !is.map(value) && !is.set(value) && is.object(value) && Object.keys(value).length === 0;
- const isEmptyMapOrSet = (value) => (is.map(value) || is.set(value)) && value.size === 0;
- is.empty = (value) => is.falsy(value) || isEmptyStringOrArray(value) || isEmptyObject(value) || isEmptyMapOrSet(value);
- is.emptyOrWhitespace = (value) => is.empty(value) || isWhiteSpaceString(value);
- const predicateOnArray = (method, predicate, args) => {
- // `args` is the calling function's "arguments object".
- // We have to do it this way to keep node v4 support.
- // So here we convert it to an array and slice off the first item.
- const values = Array.prototype.slice.call(args, 1);
- if (is.function_(predicate) === false) {
- throw new TypeError(`Invalid predicate: ${util.inspect(predicate)}`);
- }
- if (values.length === 0) {
- throw new TypeError('Invalid number of values');
- }
- return method.call(values, predicate);
- };
- function any(predicate) {
- return predicateOnArray(Array.prototype.some, predicate, arguments);
- }
- is.any = any;
- function all(predicate) {
- return predicateOnArray(Array.prototype.every, predicate, arguments);
- }
- is.all = all;
- // tslint:enable:only-arrow-functions no-function-expression
-})(is || (is = {}));
-// Some few keywords are reserved, but we'll populate them for Node.js users
-// See https://github.com/Microsoft/TypeScript/issues/2536
-Object.defineProperties(is, {
- class: {
- value: is.class_
- },
- function: {
- value: is.function_
- },
- null: {
- value: is.null_
- }
-});
-exports.default = is;
-// For CommonJS default export support
-module.exports = is;
-module.exports.default = is;
+++ /dev/null
-{"version":3,"file":"index.js","sourceRoot":"","sources":["../source/index.ts"],"names":[],"mappings":";;AAAA,6BAA6B;AAE7B,MAAM,QAAQ,GAAG,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC;AAC3C,MAAM,aAAa,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAW,CAAC;AAClF,MAAM,QAAQ,GAAG,CAAC,IAAY,EAAE,EAAE,CAAC,CAAC,KAAU,EAAE,EAAE,CAAC,OAAO,KAAK,KAAK,IAAI,CAAC;AACzE,MAAM,cAAc,GAAG,CAAC,IAAY,EAAE,EAAE,CAAC,CAAC,KAAU,EAAE,EAAE,CAAC,aAAa,CAAC,KAAK,CAAC,KAAK,IAAI,CAAC;AAEvF,YAAY,KAAU;IACrB,EAAE,CAAC,CAAC,KAAK,KAAK,IAAI,CAAC,CAAC,CAAC;QACpB,MAAM,CAAC,MAAM,CAAC;IACf,CAAC;IAED,EAAE,CAAC,CAAC,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,KAAK,CAAC,CAAC,CAAC;QACvC,MAAM,CAAC,SAAS,CAAC;IAClB,CAAC;IAED,MAAM,IAAI,GAAG,OAAO,KAAK,CAAC;IAE1B,EAAE,CAAC,CAAC,IAAI,KAAK,WAAW,CAAC,CAAC,CAAC;QAC1B,MAAM,CAAC,WAAW,CAAC;IACpB,CAAC;IAED,EAAE,CAAC,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC;QACvB,MAAM,CAAC,QAAQ,CAAC;IACjB,CAAC;IAED,EAAE,CAAC,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC;QACvB,MAAM,CAAC,QAAQ,CAAC;IACjB,CAAC;IAED,EAAE,CAAC,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC;QACvB,MAAM,CAAC,QAAQ,CAAC;IACjB,CAAC;IAED,EAAE,CAAC,CAAC,EAAE,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QACzB,MAAM,CAAC,UAAU,CAAC;IACnB,CAAC;IAED,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QAC1B,MAAM,CAAC,OAAO,CAAC;IAChB,CAAC;IAED,EAAE,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QAC5B,MAAM,CAAC,QAAQ,CAAC;IACjB,CAAC;IAED,MAAM,OAAO,GAAG,aAAa,CAAC,KAAK,CAAC,CAAC;IACrC,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;QACb,MAAM,CAAC,OAAO,CAAC;IAChB,CAAC;IAED,EAAE,CAAC,CAAC,KAAK,YAAY,MAAM,IAAI,KAAK,YAAY,OAAO,IAAI,KAAK,YAAY,MAAM,CAAC,CAAC,CAAC;QACpF,MAAM,IAAI,SAAS,CAAC,uDAAuD,CAAC,CAAC;IAC9E,CAAC;IAED,MAAM,CAAC,QAAQ,CAAC;AACjB,CAAC;AAED,WAAU,EAAE;IACX,MAAM,QAAQ,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,OAAO,KAAK,KAAK,QAAQ,CAAC;IAG9C,YAAS,GAAG,QAAQ,CAAC,WAAW,CAAC,CAAC;IAClC,SAAM,GAAG,QAAQ,CAAC,QAAQ,CAAC,CAAC;IAC5B,SAAM,GAAG,QAAQ,CAAC,QAAQ,CAAC,CAAC;IAC5B,YAAS,GAAG,QAAQ,CAAC,UAAU,CAAC,CAAC;IACjC,QAAK,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,KAAK,KAAK,IAAI,CAAC;IAEvC,SAAM,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,GAAA,SAAS,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,QAAQ,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;IACnF,UAAO,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,KAAK,CAAC;IAG5D,SAAM,GAAG,QAAQ,CAAC,QAAQ,CAAC,CAAC;IAE5B,QAAK,GAAG,KAAK,CAAC,OAAO,CAAC;IACtB,SAAM,GAAG,MAAM,CAAC,QAAQ,CAAC;IAEzB,kBAAe,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,GAAA,KAAK,CAAC,KAAK,CAAC,IAAI,GAAA,SAAS,CAAC,KAAK,CAAC,CAAC;IACnE,SAAM,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,CAAC,GAAA,eAAe,CAAC,KAAK,CAAC,IAAI,CAAC,GAAA,SAAS,CAAC,KAAK,CAAC,IAAI,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;IAC1F,WAAQ,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,CAAC,GAAA,eAAe,CAAC,KAAK,CAAC,IAAI,GAAA,SAAS,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC;IACxF,YAAS,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,GAAA,QAAQ,CAAC,KAAK,CAAC,IAAI,GAAA,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,GAAA,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAE/F,gBAAa,GAAG,cAAc,CAAC,SAAS,CAAC,CAAC;IAEvD,MAAM,aAAa,GAAG,CAAC,KAAU,EAAE,EAAE,CACpC,CAAC,GAAA,KAAK,CAAC,KAAK,CAAC;QACb,QAAQ,CAAC,KAAK,CAAC;QACf,GAAA,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC;QACrB,GAAA,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAEX,UAAO,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,GAAA,aAAa,CAAC,KAAK,CAAC,IAAI,aAAa,CAAC,KAAK,CAAC,CAAC;IAGpF,MAAM,gBAAgB,GAAG,CAAC,IAAY,EAAE,EAAE,CAAC,CAAC,KAAU,EAAE,EAAE,CAAC,GAAA,SAAS,CAAC,KAAK,CAAC,IAAI,GAAA,SAAS,CAAC,KAAK,CAAC,WAAW,CAAC,IAAI,KAAK,CAAC,WAAW,CAAC,IAAI,KAAK,IAAI,CAAC;IAElI,oBAAiB,GAAG,gBAAgB,CAAC,mBAAmB,CAAC,CAAC;IAC1D,gBAAa,GAAG,gBAAgB,CAAC,eAAe,CAAC,CAAC;IAElD,SAAM,GAAG,cAAc,CAAC,QAAQ,CAAC,CAAC;IAClC,OAAI,GAAG,cAAc,CAAC,MAAM,CAAC,CAAC;IAC9B,QAAK,GAAG,cAAc,CAAC,OAAO,CAAC,CAAC;IAChC,MAAG,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;IAC5B,MAAG,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;IAC5B,UAAO,GAAG,cAAc,CAAC,SAAS,CAAC,CAAC;IACpC,UAAO,GAAG,cAAc,CAAC,SAAS,CAAC,CAAC;IAEpC,YAAS,GAAG,cAAc,CAAC,WAAW,CAAC,CAAC;IACxC,aAAU,GAAG,cAAc,CAAC,YAAY,CAAC,CAAC;IAC1C,oBAAiB,GAAG,cAAc,CAAC,mBAAmB,CAAC,CAAC;IACxD,aAAU,GAAG,cAAc,CAAC,YAAY,CAAC,CAAC;IAC1C,cAAW,GAAG,cAAc,CAAC,aAAa,CAAC,CAAC;IAC5C,aAAU,GAAG,cAAc,CAAC,YAAY,CAAC,CAAC;IAC1C,cAAW,GAAG,cAAc,CAAC,aAAa,CAAC,CAAC;IAC5C,eAAY,GAAG,cAAc,CAAC,cAAc,CAAC,CAAC;IAC9C,eAAY,GAAG,cAAc,CAAC,cAAc,CAAC,CAAC;IAE9C,cAAW,GAAG,cAAc,CAAC,aAAa,CAAC,CAAC;IAC5C,oBAAiB,GAAG,cAAc,CAAC,mBAAmB,CAAC,CAAC;IAExD,SAAM,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IACxC,QAAK,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC;IAE/B,MAAG,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAEvD,MAAM,cAAc,GAAG,IAAI,GAAG,CAAC;QAC9B,WAAW;QACX,QAAQ;QACR,QAAQ;QACR,SAAS;QACT,QAAQ;KACR,CAAC,CAAC;IAEU,YAAS,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,GAAA,KAAK,CAAC,KAAK,CAAC,IAAI,cAAc,CAAC,GAAG,CAAC,OAAO,KAAK,CAAC,CAAC;IAE7E,UAAO,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;IAClD,cAAW,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,MAAM,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IAE1D,cAAW,GAAG,CAAC,KAAU,EAAE,EAAE;QAEzC,IAAI,SAAS,CAAC;QAEd,MAAM,CAAC,aAAa,CAAC,KAAK,CAAC,KAAK,QAAQ;YACvC,CAAC,SAAS,GAAG,MAAM,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,SAAS,KAAK,IAAI;gBAC5D,SAAS,KAAK,MAAM,CAAC,cAAc,CAAC,EAAE,CAAC,CAAC,CAAC;IAC5C,CAAC,CAAC;IAEF,MAAM,eAAe,GAAG,IAAI,GAAG,CAAC;QAC/B,WAAW;QACX,YAAY;QACZ,mBAAmB;QACnB,YAAY;QACZ,aAAa;QACb,YAAY;QACZ,aAAa;QACb,cAAc;QACd,cAAc;KACd,CAAC,CAAC;IACU,aAAU,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,eAAe,CAAC,GAAG,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC;IAEpF,MAAM,aAAa,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,GAAA,WAAW,CAAC,KAAK,CAAC,IAAI,KAAK,GAAG,CAAC,CAAC,CAAC;IAC1D,YAAS,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,CAAC,GAAA,eAAe,CAAC,KAAK,CAAC,IAAI,CAAC,GAAA,SAAS,CAAC,KAAK,CAAC,IAAI,aAAa,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IAExG,UAAO,GAAG,CAAC,KAAa,EAAE,KAAwB,EAAE,EAAE;QAClE,EAAE,CAAC,CAAC,GAAA,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;YACnB,MAAM,CAAC,KAAK,IAAI,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,KAAe,CAAC,IAAI,KAAK,IAAI,IAAI,CAAC,GAAG,CAAC,KAAe,EAAE,CAAC,CAAC,CAAC;QACvF,CAAC;QAED,EAAE,CAAC,CAAC,GAAA,KAAK,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC;YAExC,MAAM,CAAC,KAAK,IAAI,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI,KAAK,IAAI,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;QACrF,CAAC;QAED,MAAM,IAAI,SAAS,CAAC,kBAAkB,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IAC9D,CAAC,CAAC;IAEF,MAAM,iBAAiB,GAAG,CAAC,CAAC;IAC5B,MAAM,uBAAuB,GAAG;QAC/B,WAAW;QACX,eAAe;QACf,OAAO;QACP,YAAY;QACZ,WAAW;KACX,CAAC;IAEW,aAAU,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,GAAA,MAAM,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,QAAQ,KAAK,iBAAiB,IAAI,GAAA,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC;QACxH,CAAC,GAAA,WAAW,CAAC,KAAK,CAAC,IAAI,uBAAuB,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC,QAAQ,IAAI,KAAK,CAAC,CAAC;IAExE,WAAQ,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,CAAC,QAAQ,CAAC;IAElF,MAAM,cAAc,GAAG,CAAC,KAAa,EAAE,EAAE,CAAC,CAAC,GAAW,EAAE,EAAE,CAAC,GAAA,OAAO,CAAC,GAAG,CAAC,IAAI,IAAI,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC,CAAC,KAAK,KAAK,CAAC;IAC1F,OAAI,GAAG,cAAc,CAAC,CAAC,CAAC,CAAC;IACzB,MAAG,GAAG,cAAc,CAAC,CAAC,CAAC,CAAC;IAErC,MAAM,kBAAkB,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,GAAA,MAAM,CAAC,KAAK,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,KAAK,CAAC;IACvF,MAAM,oBAAoB,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,CAAC,GAAA,MAAM,CAAC,KAAK,CAAC,IAAI,GAAA,KAAK,CAAC,KAAK,CAAC,CAAC,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,CAAC;IACnG,MAAM,aAAa,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,CAAC,GAAA,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,GAAA,GAAG,CAAC,KAAK,CAAC,IAAI,GAAA,MAAM,CAAC,KAAK,CAAC,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC;IACrH,MAAM,eAAe,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,CAAC,GAAA,GAAG,CAAC,KAAK,CAAC,IAAI,GAAA,GAAG,CAAC,KAAK,CAAC,CAAC,IAAI,KAAK,CAAC,IAAI,KAAK,CAAC,CAAC;IAE1E,QAAK,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,GAAA,KAAK,CAAC,KAAK,CAAC,IAAI,oBAAoB,CAAC,KAAK,CAAC,IAAI,aAAa,CAAC,KAAK,CAAC,IAAI,eAAe,CAAC,KAAK,CAAC,CAAC;IACtH,oBAAiB,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,GAAA,KAAK,CAAC,KAAK,CAAC,IAAI,kBAAkB,CAAC,KAAK,CAAC,CAAC;IAG3F,MAAM,gBAAgB,GAAG,CAAC,MAAmB,EAAE,SAAc,EAAE,IAAgB,EAAE,EAAE;QAIlF,MAAM,MAAM,GAAG,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;QAEnD,EAAE,CAAC,CAAC,GAAA,SAAS,CAAC,SAAS,CAAC,KAAK,KAAK,CAAC,CAAC,CAAC;YACpC,MAAM,IAAI,SAAS,CAAC,sBAAsB,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC;QACtE,CAAC;QAED,EAAE,CAAC,CAAC,MAAM,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC;YACzB,MAAM,IAAI,SAAS,CAAC,0BAA0B,CAAC,CAAC;QACjD,CAAC;QAED,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;IACvC,CAAC,CAAC;IAMF,aAAoB,SAAc;QACjC,MAAM,CAAC,gBAAgB,CAAC,KAAK,CAAC,SAAS,CAAC,IAAI,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC;IACrE,CAAC;IAFe,MAAG,MAElB,CAAA;IAGD,aAAoB,SAAc;QACjC,MAAM,CAAC,gBAAgB,CAAC,KAAK,CAAC,SAAS,CAAC,KAAK,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC;IACtE,CAAC;IAFe,MAAG,MAElB,CAAA;AAEF,CAAC,EA9KS,EAAE,KAAF,EAAE,QA8KX;AAID,MAAM,CAAC,gBAAgB,CAAC,EAAE,EAAE;IAC3B,KAAK,EAAE;QACN,KAAK,EAAE,EAAE,CAAC,MAAM;KAChB;IACD,QAAQ,EAAE;QACT,KAAK,EAAE,EAAE,CAAC,SAAS;KACnB;IACD,IAAI,EAAE;QACL,KAAK,EAAE,EAAE,CAAC,KAAK;KACf;CACD,CAAC,CAAC;AAEH,kBAAe,EAAE,CAAC;AAGlB,MAAM,CAAC,OAAO,GAAG,EAAE,CAAC;AACpB,MAAM,CAAC,OAAO,CAAC,OAAO,GAAG,EAAE,CAAC"}
\ No newline at end of file
+++ /dev/null
-/// <reference types="node" />
-declare function is(value: any): string;
-declare namespace is {
- const undefined: (value: any) => boolean;
- const string: (value: any) => boolean;
- const number: (value: any) => boolean;
- const function_: (value: any) => boolean;
- const null_: (value: any) => boolean;
- const class_: (value: any) => any;
- const boolean: (value: any) => boolean;
- const symbol: (value: any) => boolean;
- const array: (arg: any) => arg is any[];
- const buffer: (obj: any) => obj is Buffer;
- const nullOrUndefined: (value: any) => boolean;
- const object: (value: any) => boolean;
- const iterable: (value: any) => boolean;
- const generator: (value: any) => boolean;
- const nativePromise: (value: any) => boolean;
- const promise: (value: any) => boolean;
- const generatorFunction: (value: any) => boolean;
- const asyncFunction: (value: any) => boolean;
- const regExp: (value: any) => boolean;
- const date: (value: any) => boolean;
- const error: (value: any) => boolean;
- const map: (value: any) => boolean;
- const set: (value: any) => boolean;
- const weakMap: (value: any) => boolean;
- const weakSet: (value: any) => boolean;
- const int8Array: (value: any) => boolean;
- const uint8Array: (value: any) => boolean;
- const uint8ClampedArray: (value: any) => boolean;
- const int16Array: (value: any) => boolean;
- const uint16Array: (value: any) => boolean;
- const int32Array: (value: any) => boolean;
- const uint32Array: (value: any) => boolean;
- const float32Array: (value: any) => boolean;
- const float64Array: (value: any) => boolean;
- const arrayBuffer: (value: any) => boolean;
- const sharedArrayBuffer: (value: any) => boolean;
- const truthy: (value: any) => boolean;
- const falsy: (value: any) => boolean;
- const nan: (value: any) => boolean;
- const primitive: (value: any) => boolean;
- const integer: (value: any) => boolean;
- const safeInteger: (value: any) => boolean;
- const plainObject: (value: any) => boolean;
- const typedArray: (value: any) => boolean;
- const arrayLike: (value: any) => boolean;
- const inRange: (value: number, range: number | number[]) => boolean;
- const domElement: (value: any) => boolean;
- const infinite: (value: any) => boolean;
- const even: (rem: number) => boolean;
- const odd: (rem: number) => boolean;
- const empty: (value: any) => boolean;
- const emptyOrWhitespace: (value: any) => boolean;
- function any(...predicate: any[]): any;
- function all(...predicate: any[]): any;
-}
-export default is;
+++ /dev/null
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
-const util = require("util");
-const toString = Object.prototype.toString;
-const getObjectType = (value) => toString.call(value).slice(8, -1);
-const isOfType = (type) => (value) => typeof value === type;
-const isObjectOfType = (type) => (value) => getObjectType(value) === type;
-function is(value) {
- if (value === null) {
- return 'null';
- }
- if (value === true || value === false) {
- return 'boolean';
- }
- const type = typeof value;
- if (type === 'undefined') {
- return 'undefined';
- }
- if (type === 'string') {
- return 'string';
- }
- if (type === 'number') {
- return 'number';
- }
- if (type === 'symbol') {
- return 'symbol';
- }
- if (is.function_(value)) {
- return 'Function';
- }
- if (Array.isArray(value)) {
- return 'Array';
- }
- if (Buffer.isBuffer(value)) {
- return 'Buffer';
- }
- const tagType = getObjectType(value);
- if (tagType) {
- return tagType;
- }
- if (value instanceof String || value instanceof Boolean || value instanceof Number) {
- throw new TypeError('Please don\'t use object wrappers for primitive types');
- }
- return 'Object';
-}
-(function (is) {
- const isObject = (value) => typeof value === 'object';
- is.undefined = isOfType('undefined');
- is.string = isOfType('string');
- is.number = isOfType('number');
- is.function_ = isOfType('function');
- is.null_ = (value) => value === null;
- is.class_ = (value) => is.function_(value) && value.toString().startsWith('class ');
- is.boolean = (value) => value === true || value === false;
- is.symbol = isOfType('symbol');
- is.array = Array.isArray;
- is.buffer = Buffer.isBuffer;
- is.nullOrUndefined = (value) => is.null_(value) || is.undefined(value);
- is.object = (value) => !is.nullOrUndefined(value) && (is.function_(value) || isObject(value));
- is.iterable = (value) => !is.nullOrUndefined(value) && is.function_(value[Symbol.iterator]);
- is.generator = (value) => is.iterable(value) && is.function_(value.next) && is.function_(value.throw);
- is.nativePromise = isObjectOfType('Promise');
- const hasPromiseAPI = (value) => !is.null_(value) &&
- isObject(value) &&
- is.function_(value.then) &&
- is.function_(value.catch);
- is.promise = (value) => is.nativePromise(value) || hasPromiseAPI(value);
- const isFunctionOfType = (type) => (value) => is.function_(value) && is.function_(value.constructor) && value.constructor.name === type;
- is.generatorFunction = isFunctionOfType('GeneratorFunction');
- is.asyncFunction = isFunctionOfType('AsyncFunction');
- is.regExp = isObjectOfType('RegExp');
- is.date = isObjectOfType('Date');
- is.error = isObjectOfType('Error');
- is.map = isObjectOfType('Map');
- is.set = isObjectOfType('Set');
- is.weakMap = isObjectOfType('WeakMap');
- is.weakSet = isObjectOfType('WeakSet');
- is.int8Array = isObjectOfType('Int8Array');
- is.uint8Array = isObjectOfType('Uint8Array');
- is.uint8ClampedArray = isObjectOfType('Uint8ClampedArray');
- is.int16Array = isObjectOfType('Int16Array');
- is.uint16Array = isObjectOfType('Uint16Array');
- is.int32Array = isObjectOfType('Int32Array');
- is.uint32Array = isObjectOfType('Uint32Array');
- is.float32Array = isObjectOfType('Float32Array');
- is.float64Array = isObjectOfType('Float64Array');
- is.arrayBuffer = isObjectOfType('ArrayBuffer');
- is.sharedArrayBuffer = isObjectOfType('SharedArrayBuffer');
- is.truthy = (value) => Boolean(value);
- is.falsy = (value) => !value;
- is.nan = (value) => Number.isNaN(value);
- const primitiveTypes = new Set([
- 'undefined',
- 'string',
- 'number',
- 'boolean',
- 'symbol'
- ]);
- is.primitive = (value) => is.null_(value) || primitiveTypes.has(typeof value);
- is.integer = (value) => Number.isInteger(value);
- is.safeInteger = (value) => Number.isSafeInteger(value);
- is.plainObject = (value) => {
- let prototype;
- return getObjectType(value) === 'Object' &&
- (prototype = Object.getPrototypeOf(value), prototype === null ||
- prototype === Object.getPrototypeOf({}));
- };
- const typedArrayTypes = new Set([
- 'Int8Array',
- 'Uint8Array',
- 'Uint8ClampedArray',
- 'Int16Array',
- 'Uint16Array',
- 'Int32Array',
- 'Uint32Array',
- 'Float32Array',
- 'Float64Array'
- ]);
- is.typedArray = (value) => typedArrayTypes.has(getObjectType(value));
- const isValidLength = (value) => is.safeInteger(value) && value > -1;
- is.arrayLike = (value) => !is.nullOrUndefined(value) && !is.function_(value) && isValidLength(value.length);
- is.inRange = (value, range) => {
- if (is.number(range)) {
- return value >= Math.min(0, range) && value <= Math.max(range, 0);
- }
- if (is.array(range) && range.length === 2) {
- return value >= Math.min.apply(null, range) && value <= Math.max.apply(null, range);
- }
- throw new TypeError(`Invalid range: ${util.inspect(range)}`);
- };
- const NODE_TYPE_ELEMENT = 1;
- const DOM_PROPERTIES_TO_CHECK = [
- 'innerHTML',
- 'ownerDocument',
- 'style',
- 'attributes',
- 'nodeValue'
- ];
- is.domElement = (value) => is.object(value) && value.nodeType === NODE_TYPE_ELEMENT && is.string(value.nodeName) &&
- !is.plainObject(value) && DOM_PROPERTIES_TO_CHECK.every(property => property in value);
- is.infinite = (value) => value === Infinity || value === -Infinity;
- const isAbsoluteMod2 = (value) => (rem) => is.integer(rem) && Math.abs(rem % 2) === value;
- is.even = isAbsoluteMod2(0);
- is.odd = isAbsoluteMod2(1);
- const isWhiteSpaceString = (value) => is.string(value) && /\S/.test(value) === false;
- const isEmptyStringOrArray = (value) => (is.string(value) || is.array(value)) && value.length === 0;
- const isEmptyObject = (value) => !is.map(value) && !is.set(value) && is.object(value) && Object.keys(value).length === 0;
- const isEmptyMapOrSet = (value) => (is.map(value) || is.set(value)) && value.size === 0;
- is.empty = (value) => is.falsy(value) || isEmptyStringOrArray(value) || isEmptyObject(value) || isEmptyMapOrSet(value);
- is.emptyOrWhitespace = (value) => is.empty(value) || isWhiteSpaceString(value);
- const predicateOnArray = (method, predicate, args) => {
- const values = Array.prototype.slice.call(args, 1);
- if (is.function_(predicate) === false) {
- throw new TypeError(`Invalid predicate: ${util.inspect(predicate)}`);
- }
- if (values.length === 0) {
- throw new TypeError('Invalid number of values');
- }
- return method.call(values, predicate);
- };
- function any(predicate) {
- return predicateOnArray(Array.prototype.some, predicate, arguments);
- }
- is.any = any;
- function all(predicate) {
- return predicateOnArray(Array.prototype.every, predicate, arguments);
- }
- is.all = all;
-})(is || (is = {}));
-Object.defineProperties(is, {
- class: {
- value: is.class_
- },
- function: {
- value: is.function_
- },
- null: {
- value: is.null_
- }
-});
-exports.default = is;
-//# sourceMappingURL=index.js.map
\ No newline at end of file
+++ /dev/null
-{"version":3,"file":"index.js","sourceRoot":"","sources":["../../source/index.ts"],"names":[],"mappings":";;AAAA,6BAA6B;AAE7B,MAAM,QAAQ,GAAG,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC;AAC3C,MAAM,aAAa,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAW,CAAC;AAClF,MAAM,QAAQ,GAAG,CAAC,IAAY,EAAE,EAAE,CAAC,CAAC,KAAU,EAAE,EAAE,CAAC,OAAO,KAAK,KAAK,IAAI,CAAC;AACzE,MAAM,cAAc,GAAG,CAAC,IAAY,EAAE,EAAE,CAAC,CAAC,KAAU,EAAE,EAAE,CAAC,aAAa,CAAC,KAAK,CAAC,KAAK,IAAI,CAAC;AAEvF,YAAY,KAAU;IACrB,EAAE,CAAC,CAAC,KAAK,KAAK,IAAI,CAAC,CAAC,CAAC;QACpB,MAAM,CAAC,MAAM,CAAC;IACf,CAAC;IAED,EAAE,CAAC,CAAC,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,KAAK,CAAC,CAAC,CAAC;QACvC,MAAM,CAAC,SAAS,CAAC;IAClB,CAAC;IAED,MAAM,IAAI,GAAG,OAAO,KAAK,CAAC;IAE1B,EAAE,CAAC,CAAC,IAAI,KAAK,WAAW,CAAC,CAAC,CAAC;QAC1B,MAAM,CAAC,WAAW,CAAC;IACpB,CAAC;IAED,EAAE,CAAC,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC;QACvB,MAAM,CAAC,QAAQ,CAAC;IACjB,CAAC;IAED,EAAE,CAAC,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC;QACvB,MAAM,CAAC,QAAQ,CAAC;IACjB,CAAC;IAED,EAAE,CAAC,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC;QACvB,MAAM,CAAC,QAAQ,CAAC;IACjB,CAAC;IAED,EAAE,CAAC,CAAC,EAAE,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QACzB,MAAM,CAAC,UAAU,CAAC;IACnB,CAAC;IAED,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QAC1B,MAAM,CAAC,OAAO,CAAC;IAChB,CAAC;IAED,EAAE,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QAC5B,MAAM,CAAC,QAAQ,CAAC;IACjB,CAAC;IAED,MAAM,OAAO,GAAG,aAAa,CAAC,KAAK,CAAC,CAAC;IACrC,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;QACb,MAAM,CAAC,OAAO,CAAC;IAChB,CAAC;IAED,EAAE,CAAC,CAAC,KAAK,YAAY,MAAM,IAAI,KAAK,YAAY,OAAO,IAAI,KAAK,YAAY,MAAM,CAAC,CAAC,CAAC;QACpF,MAAM,IAAI,SAAS,CAAC,uDAAuD,CAAC,CAAC;IAC9E,CAAC;IAED,MAAM,CAAC,QAAQ,CAAC;AACjB,CAAC;AAED,WAAU,EAAE;IACX,MAAM,QAAQ,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,OAAO,KAAK,KAAK,QAAQ,CAAC;IAG9C,YAAS,GAAG,QAAQ,CAAC,WAAW,CAAC,CAAC;IAClC,SAAM,GAAG,QAAQ,CAAC,QAAQ,CAAC,CAAC;IAC5B,SAAM,GAAG,QAAQ,CAAC,QAAQ,CAAC,CAAC;IAC5B,YAAS,GAAG,QAAQ,CAAC,UAAU,CAAC,CAAC;IACjC,QAAK,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,KAAK,KAAK,IAAI,CAAC;IAEvC,SAAM,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,GAAA,SAAS,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,QAAQ,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;IACnF,UAAO,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,KAAK,CAAC;IAG5D,SAAM,GAAG,QAAQ,CAAC,QAAQ,CAAC,CAAC;IAE5B,QAAK,GAAG,KAAK,CAAC,OAAO,CAAC;IACtB,SAAM,GAAG,MAAM,CAAC,QAAQ,CAAC;IAEzB,kBAAe,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,GAAA,KAAK,CAAC,KAAK,CAAC,IAAI,GAAA,SAAS,CAAC,KAAK,CAAC,CAAC;IACnE,SAAM,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,CAAC,GAAA,eAAe,CAAC,KAAK,CAAC,IAAI,CAAC,GAAA,SAAS,CAAC,KAAK,CAAC,IAAI,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;IAC1F,WAAQ,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,CAAC,GAAA,eAAe,CAAC,KAAK,CAAC,IAAI,GAAA,SAAS,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC;IACxF,YAAS,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,GAAA,QAAQ,CAAC,KAAK,CAAC,IAAI,GAAA,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,GAAA,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAE/F,gBAAa,GAAG,cAAc,CAAC,SAAS,CAAC,CAAC;IAEvD,MAAM,aAAa,GAAG,CAAC,KAAU,EAAE,EAAE,CACpC,CAAC,GAAA,KAAK,CAAC,KAAK,CAAC;QACb,QAAQ,CAAC,KAAK,CAAC;QACf,GAAA,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC;QACrB,GAAA,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAEX,UAAO,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,GAAA,aAAa,CAAC,KAAK,CAAC,IAAI,aAAa,CAAC,KAAK,CAAC,CAAC;IAGpF,MAAM,gBAAgB,GAAG,CAAC,IAAY,EAAE,EAAE,CAAC,CAAC,KAAU,EAAE,EAAE,CAAC,GAAA,SAAS,CAAC,KAAK,CAAC,IAAI,GAAA,SAAS,CAAC,KAAK,CAAC,WAAW,CAAC,IAAI,KAAK,CAAC,WAAW,CAAC,IAAI,KAAK,IAAI,CAAC;IAElI,oBAAiB,GAAG,gBAAgB,CAAC,mBAAmB,CAAC,CAAC;IAC1D,gBAAa,GAAG,gBAAgB,CAAC,eAAe,CAAC,CAAC;IAElD,SAAM,GAAG,cAAc,CAAC,QAAQ,CAAC,CAAC;IAClC,OAAI,GAAG,cAAc,CAAC,MAAM,CAAC,CAAC;IAC9B,QAAK,GAAG,cAAc,CAAC,OAAO,CAAC,CAAC;IAChC,MAAG,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;IAC5B,MAAG,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;IAC5B,UAAO,GAAG,cAAc,CAAC,SAAS,CAAC,CAAC;IACpC,UAAO,GAAG,cAAc,CAAC,SAAS,CAAC,CAAC;IAEpC,YAAS,GAAG,cAAc,CAAC,WAAW,CAAC,CAAC;IACxC,aAAU,GAAG,cAAc,CAAC,YAAY,CAAC,CAAC;IAC1C,oBAAiB,GAAG,cAAc,CAAC,mBAAmB,CAAC,CAAC;IACxD,aAAU,GAAG,cAAc,CAAC,YAAY,CAAC,CAAC;IAC1C,cAAW,GAAG,cAAc,CAAC,aAAa,CAAC,CAAC;IAC5C,aAAU,GAAG,cAAc,CAAC,YAAY,CAAC,CAAC;IAC1C,cAAW,GAAG,cAAc,CAAC,aAAa,CAAC,CAAC;IAC5C,eAAY,GAAG,cAAc,CAAC,cAAc,CAAC,CAAC;IAC9C,eAAY,GAAG,cAAc,CAAC,cAAc,CAAC,CAAC;IAE9C,cAAW,GAAG,cAAc,CAAC,aAAa,CAAC,CAAC;IAC5C,oBAAiB,GAAG,cAAc,CAAC,mBAAmB,CAAC,CAAC;IAExD,SAAM,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IACxC,QAAK,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC;IAE/B,MAAG,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAEvD,MAAM,cAAc,GAAG,IAAI,GAAG,CAAC;QAC9B,WAAW;QACX,QAAQ;QACR,QAAQ;QACR,SAAS;QACT,QAAQ;KACR,CAAC,CAAC;IAEU,YAAS,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,GAAA,KAAK,CAAC,KAAK,CAAC,IAAI,cAAc,CAAC,GAAG,CAAC,OAAO,KAAK,CAAC,CAAC;IAE7E,UAAO,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;IAClD,cAAW,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,MAAM,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IAE1D,cAAW,GAAG,CAAC,KAAU,EAAE,EAAE;QAEzC,IAAI,SAAS,CAAC;QAEd,MAAM,CAAC,aAAa,CAAC,KAAK,CAAC,KAAK,QAAQ;YACvC,CAAC,SAAS,GAAG,MAAM,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,SAAS,KAAK,IAAI;gBAC5D,SAAS,KAAK,MAAM,CAAC,cAAc,CAAC,EAAE,CAAC,CAAC,CAAC;IAC5C,CAAC,CAAC;IAEF,MAAM,eAAe,GAAG,IAAI,GAAG,CAAC;QAC/B,WAAW;QACX,YAAY;QACZ,mBAAmB;QACnB,YAAY;QACZ,aAAa;QACb,YAAY;QACZ,aAAa;QACb,cAAc;QACd,cAAc;KACd,CAAC,CAAC;IACU,aAAU,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,eAAe,CAAC,GAAG,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC;IAEpF,MAAM,aAAa,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,GAAA,WAAW,CAAC,KAAK,CAAC,IAAI,KAAK,GAAG,CAAC,CAAC,CAAC;IAC1D,YAAS,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,CAAC,GAAA,eAAe,CAAC,KAAK,CAAC,IAAI,CAAC,GAAA,SAAS,CAAC,KAAK,CAAC,IAAI,aAAa,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IAExG,UAAO,GAAG,CAAC,KAAa,EAAE,KAAwB,EAAE,EAAE;QAClE,EAAE,CAAC,CAAC,GAAA,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;YACnB,MAAM,CAAC,KAAK,IAAI,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,KAAe,CAAC,IAAI,KAAK,IAAI,IAAI,CAAC,GAAG,CAAC,KAAe,EAAE,CAAC,CAAC,CAAC;QACvF,CAAC;QAED,EAAE,CAAC,CAAC,GAAA,KAAK,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC;YAExC,MAAM,CAAC,KAAK,IAAI,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI,KAAK,IAAI,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;QACrF,CAAC;QAED,MAAM,IAAI,SAAS,CAAC,kBAAkB,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IAC9D,CAAC,CAAC;IAEF,MAAM,iBAAiB,GAAG,CAAC,CAAC;IAC5B,MAAM,uBAAuB,GAAG;QAC/B,WAAW;QACX,eAAe;QACf,OAAO;QACP,YAAY;QACZ,WAAW;KACX,CAAC;IAEW,aAAU,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,GAAA,MAAM,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,QAAQ,KAAK,iBAAiB,IAAI,GAAA,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC;QACxH,CAAC,GAAA,WAAW,CAAC,KAAK,CAAC,IAAI,uBAAuB,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC,QAAQ,IAAI,KAAK,CAAC,CAAC;IAExE,WAAQ,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,CAAC,QAAQ,CAAC;IAElF,MAAM,cAAc,GAAG,CAAC,KAAa,EAAE,EAAE,CAAC,CAAC,GAAW,EAAE,EAAE,CAAC,GAAA,OAAO,CAAC,GAAG,CAAC,IAAI,IAAI,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC,CAAC,KAAK,KAAK,CAAC;IAC1F,OAAI,GAAG,cAAc,CAAC,CAAC,CAAC,CAAC;IACzB,MAAG,GAAG,cAAc,CAAC,CAAC,CAAC,CAAC;IAErC,MAAM,kBAAkB,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,GAAA,MAAM,CAAC,KAAK,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,KAAK,CAAC;IACvF,MAAM,oBAAoB,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,CAAC,GAAA,MAAM,CAAC,KAAK,CAAC,IAAI,GAAA,KAAK,CAAC,KAAK,CAAC,CAAC,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,CAAC;IACnG,MAAM,aAAa,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,CAAC,GAAA,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,GAAA,GAAG,CAAC,KAAK,CAAC,IAAI,GAAA,MAAM,CAAC,KAAK,CAAC,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC;IACrH,MAAM,eAAe,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,CAAC,GAAA,GAAG,CAAC,KAAK,CAAC,IAAI,GAAA,GAAG,CAAC,KAAK,CAAC,CAAC,IAAI,KAAK,CAAC,IAAI,KAAK,CAAC,CAAC;IAE1E,QAAK,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,GAAA,KAAK,CAAC,KAAK,CAAC,IAAI,oBAAoB,CAAC,KAAK,CAAC,IAAI,aAAa,CAAC,KAAK,CAAC,IAAI,eAAe,CAAC,KAAK,CAAC,CAAC;IACtH,oBAAiB,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,GAAA,KAAK,CAAC,KAAK,CAAC,IAAI,kBAAkB,CAAC,KAAK,CAAC,CAAC;IAG3F,MAAM,gBAAgB,GAAG,CAAC,MAAmB,EAAE,SAAc,EAAE,IAAgB,EAAE,EAAE;QAIlF,MAAM,MAAM,GAAG,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;QAEnD,EAAE,CAAC,CAAC,GAAA,SAAS,CAAC,SAAS,CAAC,KAAK,KAAK,CAAC,CAAC,CAAC;YACpC,MAAM,IAAI,SAAS,CAAC,sBAAsB,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC;QACtE,CAAC;QAED,EAAE,CAAC,CAAC,MAAM,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC;YACzB,MAAM,IAAI,SAAS,CAAC,0BAA0B,CAAC,CAAC;QACjD,CAAC;QAED,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;IACvC,CAAC,CAAC;IAMF,aAAoB,SAAc;QACjC,MAAM,CAAC,gBAAgB,CAAC,KAAK,CAAC,SAAS,CAAC,IAAI,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC;IACrE,CAAC;IAFe,MAAG,MAElB,CAAA;IAGD,aAAoB,SAAc;QACjC,MAAM,CAAC,gBAAgB,CAAC,KAAK,CAAC,SAAS,CAAC,KAAK,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC;IACtE,CAAC;IAFe,MAAG,MAElB,CAAA;AAEF,CAAC,EA9KS,EAAE,KAAF,EAAE,QA8KX;AAID,MAAM,CAAC,gBAAgB,CAAC,EAAE,EAAE;IAC3B,KAAK,EAAE;QACN,KAAK,EAAE,EAAE,CAAC,MAAM;KAChB;IACD,QAAQ,EAAE;QACT,KAAK,EAAE,EAAE,CAAC,SAAS;KACnB;IACD,IAAI,EAAE;QACL,KAAK,EAAE,EAAE,CAAC,KAAK;KACf;CACD,CAAC,CAAC;AAEH,kBAAe,EAAE,CAAC"}
\ No newline at end of file
+++ /dev/null
-"use strict";
-var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
- return new (P || (P = Promise))(function (resolve, reject) {
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
- function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
- step((generator = generator.apply(thisArg, _arguments || [])).next());
- });
-};
-Object.defineProperty(exports, "__esModule", { value: true });
-const util = require("util");
-const ava_1 = require("ava");
-const jsdom_1 = require("jsdom");
-const __1 = require("..");
-const isNode8orHigher = Number(process.versions.node.split('.')[0]) >= 8;
-class ErrorSubclassFixture extends Error {
-}
-const document = jsdom_1.jsdom();
-const createDomElement = (el) => document.createElement(el);
-const types = new Map([
- ['undefined', {
- is: __1.default.undefined,
- fixtures: [
- undefined
- ]
- }],
- ['null', {
- is: __1.default.null_,
- fixtures: [
- null
- ]
- }],
- ['string', {
- is: __1.default.string,
- fixtures: [
- '🦄',
- 'hello world',
- ''
- ]
- }],
- ['number', {
- is: __1.default.number,
- fixtures: [
- 6,
- 1.4,
- 0,
- -0,
- Infinity,
- -Infinity
- ]
- }],
- ['boolean', {
- is: __1.default.boolean,
- fixtures: [
- true, false
- ]
- }],
- ['symbol', {
- is: __1.default.symbol,
- fixtures: [
- Symbol('🦄')
- ]
- }],
- ['array', {
- is: __1.default.array,
- fixtures: [
- [1, 2],
- new Array(2)
- ]
- }],
- ['function', {
- is: __1.default.function_,
- fixtures: [
- function foo() { },
- function () { },
- () => { },
- function () {
- return __awaiter(this, void 0, void 0, function* () { });
- },
- function* () { }
- ]
- }],
- ['buffer', {
- is: __1.default.buffer,
- fixtures: [
- Buffer.from('🦄')
- ]
- }],
- ['object', {
- is: __1.default.object,
- fixtures: [
- { x: 1 },
- Object.create({ x: 1 })
- ]
- }],
- ['regExp', {
- is: __1.default.regExp,
- fixtures: [
- /\w/,
- new RegExp('\\w')
- ]
- }],
- ['date', {
- is: __1.default.date,
- fixtures: [
- new Date()
- ]
- }],
- ['error', {
- is: __1.default.error,
- fixtures: [
- new Error('🦄'),
- new ErrorSubclassFixture()
- ]
- }],
- ['nativePromise', {
- is: __1.default.nativePromise,
- fixtures: [
- Promise.resolve(),
- ]
- }],
- ['promise', {
- is: __1.default.promise,
- fixtures: [
- { then() { }, catch() { } }
- ]
- }],
- ['generator', {
- is: __1.default.generator,
- fixtures: [
- (function* () { yield 4; })()
- ]
- }],
- ['generatorFunction', {
- is: __1.default.generatorFunction,
- fixtures: [
- function* () { yield 4; }
- ]
- }],
- ['asyncFunction', {
- is: __1.default.asyncFunction,
- fixtures: [
- function () {
- return __awaiter(this, void 0, void 0, function* () { });
- },
- () => __awaiter(this, void 0, void 0, function* () { })
- ]
- }],
- ['map', {
- is: __1.default.map,
- fixtures: [
- new Map()
- ]
- }],
- ['set', {
- is: __1.default.set,
- fixtures: [
- new Set()
- ]
- }],
- ['weakSet', {
- is: __1.default.weakSet,
- fixtures: [
- new WeakSet()
- ]
- }],
- ['weakMap', {
- is: __1.default.weakMap,
- fixtures: [
- new WeakMap()
- ]
- }],
- ['int8Array', {
- is: __1.default.int8Array,
- fixtures: [
- new Int8Array(0)
- ]
- }],
- ['uint8Array', {
- is: __1.default.uint8Array,
- fixtures: [
- new Uint8Array(0)
- ]
- }],
- ['uint8ClampedArray', {
- is: __1.default.uint8ClampedArray,
- fixtures: [
- new Uint8ClampedArray(0)
- ]
- }],
- ['int16Array', {
- is: __1.default.int16Array,
- fixtures: [
- new Int16Array(0)
- ]
- }],
- ['uint16Array', {
- is: __1.default.uint16Array,
- fixtures: [
- new Uint16Array(0)
- ]
- }],
- ['int32Array', {
- is: __1.default.int32Array,
- fixtures: [
- new Int32Array(0)
- ]
- }],
- ['uint32Array', {
- is: __1.default.uint32Array,
- fixtures: [
- new Uint32Array(0)
- ]
- }],
- ['float32Array', {
- is: __1.default.float32Array,
- fixtures: [
- new Float32Array(0)
- ]
- }],
- ['float64Array', {
- is: __1.default.float64Array,
- fixtures: [
- new Float64Array(0)
- ]
- }],
- ['arrayBuffer', {
- is: __1.default.arrayBuffer,
- fixtures: [
- new ArrayBuffer(10)
- ]
- }],
- ['nan', {
- is: __1.default.nan,
- fixtures: [
- NaN,
- Number.NaN
- ]
- }],
- ['nullOrUndefined', {
- is: __1.default.nullOrUndefined,
- fixtures: [
- null,
- undefined
- ]
- }],
- ['plainObject', {
- is: __1.default.plainObject,
- fixtures: [
- { x: 1 },
- Object.create(null),
- new Object()
- ]
- }],
- ['integer', {
- is: __1.default.integer,
- fixtures: [
- 6
- ]
- }],
- ['safeInteger', {
- is: __1.default.safeInteger,
- fixtures: [
- Math.pow(2, 53) - 1,
- -Math.pow(2, 53) + 1
- ]
- }],
- ['domElement', {
- is: __1.default.domElement,
- fixtures: [
- 'div',
- 'input',
- 'span',
- 'img',
- 'canvas',
- 'script'
- ].map(createDomElement)
- }
- ], ['non-domElements', {
- is: value => !__1.default.domElement(value),
- fixtures: [
- document.createTextNode('data'),
- document.createProcessingInstruction('xml-stylesheet', 'href="mycss.css" type="text/css"'),
- document.createComment('This is a comment'),
- document,
- document.implementation.createDocumentType('svg:svg', '-//W3C//DTD SVG 1.1//EN', 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'),
- document.createDocumentFragment()
- ]
- }],
- ['infinite', {
- is: __1.default.infinite,
- fixtures: [
- Infinity,
- -Infinity
- ]
- }]
-]);
-const testType = (t, type, exclude) => {
- const testData = types.get(type);
- if (testData === undefined) {
- t.fail(`is.${type} not defined`);
- return;
- }
- const { is } = testData;
- for (const [key, { fixtures }] of types) {
- if (exclude && exclude.indexOf(key) !== -1) {
- continue;
- }
- const assert = key === type ? t.true.bind(t) : t.false.bind(t);
- for (const fixture of fixtures) {
- assert(is(fixture), `Value: ${util.inspect(fixture)}`);
- }
- }
-};
-ava_1.default('is', t => {
- t.is(__1.default(null), 'null');
- t.is(__1.default(undefined), 'undefined');
-});
-ava_1.default('is.undefined', t => {
- testType(t, 'undefined', ['nullOrUndefined']);
-});
-ava_1.default('is.null', t => {
- testType(t, 'null', ['nullOrUndefined']);
-});
-ava_1.default('is.string', t => {
- testType(t, 'string');
-});
-ava_1.default('is.number', t => {
- testType(t, 'number', ['nan', 'integer', 'safeInteger', 'infinite']);
-});
-ava_1.default('is.boolean', t => {
- testType(t, 'boolean');
-});
-ava_1.default('is.symbol', t => {
- testType(t, 'symbol');
-});
-ava_1.default('is.array', t => {
- testType(t, 'array');
-});
-ava_1.default('is.function', t => {
- testType(t, 'function', ['generatorFunction', 'asyncFunction']);
-});
-ava_1.default('is.buffer', t => {
- testType(t, 'buffer');
-});
-ava_1.default('is.object', t => {
- const testData = types.get('object');
- if (testData === undefined) {
- t.fail('is.object not defined');
- return;
- }
- for (const el of testData.fixtures) {
- t.true(__1.default.object(el));
- }
-});
-ava_1.default('is.regExp', t => {
- testType(t, 'regExp');
-});
-ava_1.default('is.date', t => {
- testType(t, 'date');
-});
-ava_1.default('is.error', t => {
- testType(t, 'error');
-});
-if (isNode8orHigher) {
- ava_1.default('is.nativePromise', t => {
- testType(t, 'nativePromise');
- });
- ava_1.default('is.promise', t => {
- testType(t, 'promise', ['nativePromise']);
- });
-}
-ava_1.default('is.generator', t => {
- testType(t, 'generator');
-});
-ava_1.default('is.generatorFunction', t => {
- testType(t, 'generatorFunction', ['function']);
-});
-ava_1.default('is.map', t => {
- testType(t, 'map');
-});
-ava_1.default('is.set', t => {
- testType(t, 'set');
-});
-ava_1.default('is.weakMap', t => {
- testType(t, 'weakMap');
-});
-ava_1.default('is.weakSet', t => {
- testType(t, 'weakSet');
-});
-ava_1.default('is.int8Array', t => {
- testType(t, 'int8Array');
-});
-ava_1.default('is.uint8Array', t => {
- testType(t, 'uint8Array', ['buffer']);
-});
-ava_1.default('is.uint8ClampedArray', t => {
- testType(t, 'uint8ClampedArray');
-});
-ava_1.default('is.int16Array', t => {
- testType(t, 'int16Array');
-});
-ava_1.default('is.uint16Array', t => {
- testType(t, 'uint16Array');
-});
-ava_1.default('is.int32Array', t => {
- testType(t, 'int32Array');
-});
-ava_1.default('is.uint32Array', t => {
- testType(t, 'uint32Array');
-});
-ava_1.default('is.float32Array', t => {
- testType(t, 'float32Array');
-});
-ava_1.default('is.float64Array', t => {
- testType(t, 'float64Array');
-});
-ava_1.default('is.arrayBuffer', t => {
- testType(t, 'arrayBuffer');
-});
-ava_1.default('is.dataView', t => {
- testType(t, 'arrayBuffer');
-});
-ava_1.default('is.truthy', t => {
- t.true(__1.default.truthy('unicorn'));
- t.true(__1.default.truthy('🦄'));
- t.true(__1.default.truthy(new Set()));
- t.true(__1.default.truthy(Symbol('🦄')));
- t.true(__1.default.truthy(true));
-});
-ava_1.default('is.falsy', t => {
- t.true(__1.default.falsy(false));
- t.true(__1.default.falsy(0));
- t.true(__1.default.falsy(''));
- t.true(__1.default.falsy(null));
- t.true(__1.default.falsy(undefined));
- t.true(__1.default.falsy(NaN));
-});
-ava_1.default('is.nan', t => {
- testType(t, 'nan');
-});
-ava_1.default('is.nullOrUndefined', t => {
- testType(t, 'nullOrUndefined', ['undefined', 'null']);
-});
-ava_1.default('is.primitive', t => {
- const primitives = [
- undefined,
- null,
- '🦄',
- 6,
- Infinity,
- -Infinity,
- true,
- false,
- Symbol('🦄')
- ];
- for (const el of primitives) {
- t.true(__1.default.primitive(el));
- }
-});
-ava_1.default('is.integer', t => {
- testType(t, 'integer', ['number', 'safeInteger']);
- t.false(__1.default.integer(1.4));
-});
-ava_1.default('is.safeInteger', t => {
- testType(t, 'safeInteger', ['number', 'integer']);
- t.false(__1.default.safeInteger(Math.pow(2, 53)));
- t.false(__1.default.safeInteger(-Math.pow(2, 53)));
-});
-ava_1.default('is.plainObject', t => {
- testType(t, 'plainObject', ['object', 'promise']);
-});
-ava_1.default('is.iterable', t => {
- t.true(__1.default.iterable(''));
- t.true(__1.default.iterable([]));
- t.true(__1.default.iterable(new Map()));
- t.false(__1.default.iterable(null));
- t.false(__1.default.iterable(undefined));
- t.false(__1.default.iterable(0));
- t.false(__1.default.iterable(NaN));
- t.false(__1.default.iterable(Infinity));
- t.false(__1.default.iterable({}));
-});
-ava_1.default('is.class', t => {
- class Foo {
- }
- const classDeclarations = [
- Foo,
- class Bar extends Foo {
- }
- ];
- for (const x of classDeclarations) {
- t.true(__1.default.class_(x));
- }
-});
-ava_1.default('is.typedArray', t => {
- const typedArrays = [
- new Int8Array(0),
- new Uint8Array(0),
- new Uint8ClampedArray(0),
- new Uint16Array(0),
- new Int32Array(0),
- new Uint32Array(0),
- new Float32Array(0),
- new Float64Array(0)
- ];
- for (const el of typedArrays) {
- t.true(__1.default.typedArray(el));
- }
- t.false(__1.default.typedArray(new ArrayBuffer(1)));
- t.false(__1.default.typedArray([]));
- t.false(__1.default.typedArray({}));
-});
-ava_1.default('is.arrayLike', t => {
- (() => {
- t.true(__1.default.arrayLike(arguments));
- })();
- t.true(__1.default.arrayLike([]));
- t.true(__1.default.arrayLike('unicorn'));
- t.false(__1.default.arrayLike({}));
- t.false(__1.default.arrayLike(() => { }));
- t.false(__1.default.arrayLike(new Map()));
-});
-ava_1.default('is.inRange', t => {
- const x = 3;
- t.true(__1.default.inRange(x, [0, 5]));
- t.true(__1.default.inRange(x, [5, 0]));
- t.true(__1.default.inRange(x, [-5, 5]));
- t.true(__1.default.inRange(x, [5, -5]));
- t.false(__1.default.inRange(x, [4, 8]));
- t.true(__1.default.inRange(-7, [-5, -10]));
- t.true(__1.default.inRange(-5, [-5, -10]));
- t.true(__1.default.inRange(-10, [-5, -10]));
- t.true(__1.default.inRange(x, 10));
- t.true(__1.default.inRange(0, 0));
- t.true(__1.default.inRange(-2, -3));
- t.false(__1.default.inRange(x, 2));
- t.false(__1.default.inRange(-3, -2));
- t.throws(() => {
- __1.default.inRange(0, []);
- });
- t.throws(() => {
- __1.default.inRange(0, [5]);
- });
- t.throws(() => {
- __1.default.inRange(0, [1, 2, 3]);
- });
-});
-ava_1.default('is.domElement', t => {
- testType(t, 'domElement');
- t.false(__1.default.domElement({ nodeType: 1, nodeName: 'div' }));
-});
-ava_1.default('is.infinite', t => {
- testType(t, 'infinite', ['number']);
-});
-ava_1.default('is.even', t => {
- for (const el of [-6, 2, 4]) {
- t.true(__1.default.even(el));
- }
- for (const el of [-3, 1, 5]) {
- t.false(__1.default.even(el));
- }
-});
-ava_1.default('is.odd', t => {
- for (const el of [-5, 7, 13]) {
- t.true(__1.default.odd(el));
- }
- for (const el of [-8, 8, 10]) {
- t.false(__1.default.odd(el));
- }
-});
-ava_1.default('is.empty', t => {
- t.true(__1.default.empty(null));
- t.true(__1.default.empty(undefined));
- t.true(__1.default.empty(false));
- t.false(__1.default.empty(true));
- t.true(__1.default.empty(''));
- t.false(__1.default.empty('🦄'));
- t.true(__1.default.empty([]));
- t.false(__1.default.empty(['🦄']));
- t.true(__1.default.empty({}));
- t.false(__1.default.empty({ unicorn: '🦄' }));
- const tempMap = new Map();
- t.true(__1.default.empty(tempMap));
- tempMap.set('unicorn', '🦄');
- t.false(__1.default.empty(tempMap));
- const tempSet = new Set();
- t.true(__1.default.empty(tempSet));
- tempSet.add(1);
- t.false(__1.default.empty(tempSet));
-});
-ava_1.default('is.emptyOrWhitespace', t => {
- t.true(__1.default.emptyOrWhitespace(''));
- t.true(__1.default.emptyOrWhitespace(' '));
- t.false(__1.default.emptyOrWhitespace('🦄'));
- t.false(__1.default.emptyOrWhitespace('unicorn'));
-});
-ava_1.default('is.any', t => {
- t.true(__1.default.any(__1.default.string, {}, true, '🦄'));
- t.true(__1.default.any(__1.default.object, false, {}, 'unicorns'));
- t.false(__1.default.any(__1.default.boolean, '🦄', [], 3));
- t.false(__1.default.any(__1.default.integer, true, 'lol', {}));
- t.throws(() => {
- __1.default.any(null, true);
- });
- t.throws(() => {
- __1.default.any(__1.default.string);
- });
-});
-ava_1.default('is.all', t => {
- t.true(__1.default.all(__1.default.object, {}, new Set(), new Map()));
- t.true(__1.default.all(__1.default.boolean, true, false));
- t.false(__1.default.all(__1.default.string, '🦄', []));
- t.false(__1.default.all(__1.default.set, new Map(), {}));
- t.throws(() => {
- __1.default.all(null, true);
- });
- t.throws(() => {
- __1.default.all(__1.default.string);
- });
-});
-//# sourceMappingURL=test.js.map
\ No newline at end of file
+++ /dev/null
-{"version":3,"file":"test.js","sourceRoot":"","sources":["../../../source/tests/test.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,6BAA6B;AAC7B,6BAA+C;AAC/C,iCAA4B;AAC5B,0BAAmB;AAEnB,MAAM,eAAe,GAAG,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;AAKzE,0BAA2B,SAAQ,KAAK;CAAG;AAE3C,MAAM,QAAQ,GAAG,aAAK,EAAE,CAAC;AACzB,MAAM,gBAAgB,GAAG,CAAC,EAAU,EAAE,EAAE,CAAC,QAAQ,CAAC,aAAa,CAAC,EAAE,CAAC,CAAC;AAOpE,MAAM,KAAK,GAAG,IAAI,GAAG,CAAe;IACnC,CAAC,WAAW,EAAE;YACb,EAAE,EAAE,WAAC,CAAC,SAAS;YACf,QAAQ,EAAE;gBACT,SAAS;aACT;SACD,CAAC;IACF,CAAC,MAAM,EAAE;YACR,EAAE,EAAE,WAAC,CAAC,KAAK;YACX,QAAQ,EAAE;gBACT,IAAI;aACJ;SACD,CAAC;IACF,CAAC,QAAQ,EAAE;YACV,EAAE,EAAE,WAAC,CAAC,MAAM;YACZ,QAAQ,EAAE;gBACT,IAAI;gBACJ,aAAa;gBACb,EAAE;aACF;SACD,CAAC;IACF,CAAC,QAAQ,EAAE;YACV,EAAE,EAAE,WAAC,CAAC,MAAM;YACZ,QAAQ,EAAE;gBACT,CAAC;gBACD,GAAG;gBACH,CAAC;gBACD,CAAC,CAAC;gBACF,QAAQ;gBACR,CAAC,QAAQ;aACT;SACD,CAAC;IACF,CAAC,SAAS,EAAE;YACX,EAAE,EAAE,WAAC,CAAC,OAAO;YACb,QAAQ,EAAE;gBACT,IAAI,EAAE,KAAK;aACX;SACD,CAAC;IACF,CAAC,QAAQ,EAAE;YACV,EAAE,EAAE,WAAC,CAAC,MAAM;YACZ,QAAQ,EAAE;gBACT,MAAM,CAAC,IAAI,CAAC;aACZ;SACD,CAAC;IACF,CAAC,OAAO,EAAE;YACT,EAAE,EAAE,WAAC,CAAC,KAAK;YACX,QAAQ,EAAE;gBACT,CAAC,CAAC,EAAE,CAAC,CAAC;gBACN,IAAI,KAAK,CAAC,CAAC,CAAC;aACZ;SACD,CAAC;IACF,CAAC,UAAU,EAAE;YACZ,EAAE,EAAE,WAAC,CAAC,SAAS;YACf,QAAQ,EAAE;gBAET,iBAAgB,CAAC;gBACjB,cAAY,CAAC;gBACb,GAAG,EAAE,GAAE,CAAC;gBACR;0EAAkB,CAAC;iBAAA;gBACnB,QAAS,CAAC,MAAS,CAAC;aAEpB;SACD,CAAC;IACF,CAAC,QAAQ,EAAE;YACV,EAAE,EAAE,WAAC,CAAC,MAAM;YACZ,QAAQ,EAAE;gBACT,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC;aACjB;SACD,CAAC;IACF,CAAC,QAAQ,EAAE;YACV,EAAE,EAAE,WAAC,CAAC,MAAM;YACZ,QAAQ,EAAE;gBACT,EAAC,CAAC,EAAE,CAAC,EAAC;gBACN,MAAM,CAAC,MAAM,CAAC,EAAC,CAAC,EAAE,CAAC,EAAC,CAAC;aACrB;SACD,CAAC;IACF,CAAC,QAAQ,EAAE;YACV,EAAE,EAAE,WAAC,CAAC,MAAM;YACZ,QAAQ,EAAE;gBACT,IAAI;gBACJ,IAAI,MAAM,CAAC,KAAK,CAAC;aACjB;SACD,CAAC;IACF,CAAC,MAAM,EAAE;YACR,EAAE,EAAE,WAAC,CAAC,IAAI;YACV,QAAQ,EAAE;gBACT,IAAI,IAAI,EAAE;aACV;SACD,CAAC;IACF,CAAC,OAAO,EAAE;YACT,EAAE,EAAE,WAAC,CAAC,KAAK;YACX,QAAQ,EAAE;gBACT,IAAI,KAAK,CAAC,IAAI,CAAC;gBACf,IAAI,oBAAoB,EAAE;aAC1B;SACD,CAAC;IACF,CAAC,eAAe,EAAE;YACjB,EAAE,EAAE,WAAC,CAAC,aAAa;YACnB,QAAQ,EAAE;gBACT,OAAO,CAAC,OAAO,EAAE;aAEjB;SACD,CAAC;IACF,CAAC,SAAS,EAAE;YACX,EAAE,EAAE,WAAC,CAAC,OAAO;YACb,QAAQ,EAAE;gBACT,EAAC,IAAI,KAAI,CAAC,EAAE,KAAK,KAAI,CAAC,EAAC;aACvB;SACD,CAAC;IACF,CAAC,WAAW,EAAE;YACb,EAAE,EAAE,WAAC,CAAC,SAAS;YACf,QAAQ,EAAE;gBACT,CAAC,QAAS,CAAC,MAAK,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE;aAC7B;SACD,CAAC;IACF,CAAC,mBAAmB,EAAE;YACrB,EAAE,EAAE,WAAC,CAAC,iBAAiB;YACvB,QAAQ,EAAE;gBACT,QAAS,CAAC,MAAK,MAAM,CAAC,CAAC,CAAC,CAAC;aACzB;SACD,CAAC;IACF,CAAC,eAAe,EAAE;YACjB,EAAE,EAAE,WAAC,CAAC,aAAa;YACnB,QAAQ,EAAE;gBACT;0EAAkB,CAAC;iBAAA;gBACnB,GAAS,EAAE,gDAAE,CAAC,CAAA;aACd;SACD,CAAC;IACF,CAAC,KAAK,EAAE;YACP,EAAE,EAAE,WAAC,CAAC,GAAG;YACT,QAAQ,EAAE;gBACT,IAAI,GAAG,EAAE;aACT;SACD,CAAC;IACF,CAAC,KAAK,EAAE;YACP,EAAE,EAAE,WAAC,CAAC,GAAG;YACT,QAAQ,EAAE;gBACT,IAAI,GAAG,EAAE;aACT;SACD,CAAC;IACF,CAAC,SAAS,EAAE;YACX,EAAE,EAAE,WAAC,CAAC,OAAO;YACb,QAAQ,EAAE;gBACT,IAAI,OAAO,EAAE;aACb;SACD,CAAC;IACF,CAAC,SAAS,EAAE;YACX,EAAE,EAAE,WAAC,CAAC,OAAO;YACb,QAAQ,EAAE;gBACT,IAAI,OAAO,EAAE;aACb;SACD,CAAC;IACF,CAAC,WAAW,EAAE;YACb,EAAE,EAAE,WAAC,CAAC,SAAS;YACf,QAAQ,EAAE;gBACT,IAAI,SAAS,CAAC,CAAC,CAAC;aAChB;SACD,CAAC;IACF,CAAC,YAAY,EAAE;YACd,EAAE,EAAE,WAAC,CAAC,UAAU;YAChB,QAAQ,EAAE;gBACT,IAAI,UAAU,CAAC,CAAC,CAAC;aACjB;SACD,CAAC;IACF,CAAC,mBAAmB,EAAE;YACrB,EAAE,EAAE,WAAC,CAAC,iBAAiB;YACvB,QAAQ,EAAE;gBACT,IAAI,iBAAiB,CAAC,CAAC,CAAC;aACxB;SACD,CAAC;IACF,CAAC,YAAY,EAAE;YACd,EAAE,EAAE,WAAC,CAAC,UAAU;YAChB,QAAQ,EAAE;gBACT,IAAI,UAAU,CAAC,CAAC,CAAC;aACjB;SACD,CAAC;IACF,CAAC,aAAa,EAAE;YACf,EAAE,EAAE,WAAC,CAAC,WAAW;YACjB,QAAQ,EAAE;gBACT,IAAI,WAAW,CAAC,CAAC,CAAC;aAClB;SACD,CAAC;IACF,CAAC,YAAY,EAAE;YACd,EAAE,EAAE,WAAC,CAAC,UAAU;YAChB,QAAQ,EAAE;gBACT,IAAI,UAAU,CAAC,CAAC,CAAC;aACjB;SACD,CAAC;IACF,CAAC,aAAa,EAAE;YACf,EAAE,EAAE,WAAC,CAAC,WAAW;YACjB,QAAQ,EAAE;gBACT,IAAI,WAAW,CAAC,CAAC,CAAC;aAClB;SACD,CAAC;IACF,CAAC,cAAc,EAAE;YAChB,EAAE,EAAE,WAAC,CAAC,YAAY;YAClB,QAAQ,EAAE;gBACT,IAAI,YAAY,CAAC,CAAC,CAAC;aACnB;SACD,CAAC;IACF,CAAC,cAAc,EAAE;YAChB,EAAE,EAAE,WAAC,CAAC,YAAY;YAClB,QAAQ,EAAE;gBACT,IAAI,YAAY,CAAC,CAAC,CAAC;aACnB;SACD,CAAC;IACF,CAAC,aAAa,EAAE;YACf,EAAE,EAAE,WAAC,CAAC,WAAW;YACjB,QAAQ,EAAE;gBACT,IAAI,WAAW,CAAC,EAAE,CAAC;aACnB;SACD,CAAC;IACF,CAAC,KAAK,EAAE;YACP,EAAE,EAAE,WAAC,CAAC,GAAG;YACT,QAAQ,EAAE;gBACT,GAAG;gBACH,MAAM,CAAC,GAAG;aACV;SACD,CAAC;IACF,CAAC,iBAAiB,EAAE;YACnB,EAAE,EAAE,WAAC,CAAC,eAAe;YACrB,QAAQ,EAAE;gBACT,IAAI;gBACJ,SAAS;aACT;SACD,CAAC;IACF,CAAC,aAAa,EAAE;YACf,EAAE,EAAE,WAAC,CAAC,WAAW;YACjB,QAAQ,EAAE;gBACT,EAAC,CAAC,EAAE,CAAC,EAAC;gBACN,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC;gBACnB,IAAI,MAAM,EAAE;aACZ;SACD,CAAC;IACF,CAAC,SAAS,EAAE;YACX,EAAE,EAAE,WAAC,CAAC,OAAO;YACb,QAAQ,EAAE;gBACT,CAAC;aACD;SACD,CAAC;IACF,CAAC,aAAa,EAAE;YACf,EAAE,EAAE,WAAC,CAAC,WAAW;YACjB,QAAQ,EAAE;gBACT,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC;gBACnB,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC;aACpB;SACD,CAAC;IACF,CAAC,YAAY,EAAE;YACd,EAAE,EAAE,WAAC,CAAC,UAAU;YAChB,QAAQ,EAAE;gBACT,KAAK;gBACL,OAAO;gBACP,MAAM;gBACN,KAAK;gBACL,QAAQ;gBACR,QAAQ;aACR,CAAC,GAAG,CAAC,gBAAgB,CAAC;SAAE;KACzB,EAAE,CAAC,iBAAiB,EAAE;YACtB,EAAE,EAAE,KAAK,CAAC,EAAE,CAAC,CAAC,WAAC,CAAC,UAAU,CAAC,KAAK,CAAC;YACjC,QAAQ,EAAE;gBACT,QAAQ,CAAC,cAAc,CAAC,MAAM,CAAC;gBAC/B,QAAQ,CAAC,2BAA2B,CAAC,gBAAgB,EAAE,kCAAkC,CAAC;gBAC1F,QAAQ,CAAC,aAAa,CAAC,mBAAmB,CAAC;gBAC3C,QAAQ;gBACR,QAAQ,CAAC,cAAc,CAAC,kBAAkB,CAAC,SAAS,EAAE,yBAAyB,EAAE,kDAAkD,CAAC;gBACpI,QAAQ,CAAC,sBAAsB,EAAE;aACjC;SACD,CAAC;IACF,CAAC,UAAU,EAAE;YACZ,EAAE,EAAG,WAAC,CAAC,QAAQ;YACf,QAAQ,EAAE;gBACT,QAAQ;gBACR,CAAC,QAAQ;aACT;SACD,CAAC;CACF,CAAC,CAAC;AAGH,MAAM,QAAQ,GAAG,CAAC,CAA6B,EAAE,IAAY,EAAE,OAAkB,EAAE,EAAE;IACpF,MAAM,QAAQ,GAAG,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IAEjC,EAAE,CAAC,CAAC,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC;QAC5B,CAAC,CAAC,IAAI,CAAC,MAAM,IAAI,cAAc,CAAC,CAAC;QAEjC,MAAM,CAAC;IACR,CAAC;IAED,MAAM,EAAC,EAAE,EAAC,GAAG,QAAQ,CAAC;IAEtB,GAAG,CAAC,CAAC,MAAM,CAAC,GAAG,EAAE,EAAC,QAAQ,EAAC,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC;QAGvC,EAAE,CAAC,CAAC,OAAO,IAAI,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;YAC5C,QAAQ,CAAC;QACV,CAAC;QAED,MAAM,MAAM,GAAG,GAAG,KAAK,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAE/D,GAAG,CAAC,CAAC,MAAM,OAAO,IAAI,QAAQ,CAAC,CAAC,CAAC;YAChC,MAAM,CAAC,EAAE,CAAC,OAAO,CAAC,EAAE,UAAU,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;QACxD,CAAC;IACF,CAAC;AACF,CAAC,CAAC;AAEF,aAAI,CAAC,IAAI,EAAE,CAAC,CAAC,EAAE;IACd,CAAC,CAAC,EAAE,CAAC,WAAC,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC,CAAC;IACtB,CAAC,CAAC,EAAE,CAAC,WAAC,CAAC,SAAS,CAAC,EAAE,WAAW,CAAC,CAAC;AAGjC,CAAC,CAAC,CAAC;AAEH,aAAI,CAAC,cAAc,EAAE,CAAC,CAAC,EAAE;IACxB,QAAQ,CAAC,CAAC,EAAE,WAAW,EAAE,CAAC,iBAAiB,CAAC,CAAC,CAAC;AAC/C,CAAC,CAAC,CAAC;AAEH,aAAI,CAAC,SAAS,EAAE,CAAC,CAAC,EAAE;IACnB,QAAQ,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,iBAAiB,CAAC,CAAC,CAAC;AAC1C,CAAC,CAAC,CAAC;AAEH,aAAI,CAAC,WAAW,EAAE,CAAC,CAAC,EAAE;IACrB,QAAQ,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAC;AACvB,CAAC,CAAC,CAAC;AAEH,aAAI,CAAC,WAAW,EAAE,CAAC,CAAC,EAAE;IACrB,QAAQ,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,KAAK,EAAE,SAAS,EAAE,aAAa,EAAE,UAAU,CAAC,CAAC,CAAC;AACtE,CAAC,CAAC,CAAC;AAEH,aAAI,CAAC,YAAY,EAAE,CAAC,CAAC,EAAE;IACtB,QAAQ,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC;AACxB,CAAC,CAAC,CAAC;AAEH,aAAI,CAAC,WAAW,EAAE,CAAC,CAAC,EAAE;IACrB,QAAQ,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAC;AACvB,CAAC,CAAC,CAAC;AAEH,aAAI,CAAC,UAAU,EAAE,CAAC,CAAC,EAAE;IACpB,QAAQ,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;AACtB,CAAC,CAAC,CAAC;AAEH,aAAI,CAAC,aAAa,EAAE,CAAC,CAAC,EAAE;IACvB,QAAQ,CAAC,CAAC,EAAE,UAAU,EAAE,CAAC,mBAAmB,EAAE,eAAe,CAAC,CAAC,CAAC;AACjE,CAAC,CAAC,CAAC;AAEH,aAAI,CAAC,WAAW,EAAE,CAAC,CAAC,EAAE;IACrB,QAAQ,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAC;AACvB,CAAC,CAAC,CAAC;AAEH,aAAI,CAAC,WAAW,EAAE,CAAC,CAAC,EAAE;IACrB,MAAM,QAAQ,GAAG,KAAK,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IAErC,EAAE,CAAC,CAAC,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC;QAC5B,CAAC,CAAC,IAAI,CAAC,uBAAuB,CAAC,CAAC;QAEhC,MAAM,CAAC;IACR,CAAC;IAED,GAAG,CAAC,CAAC,MAAM,EAAE,IAAI,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC;QACpC,CAAC,CAAC,IAAI,CAAC,WAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC;IACtB,CAAC;AACF,CAAC,CAAC,CAAC;AAEH,aAAI,CAAC,WAAW,EAAE,CAAC,CAAC,EAAE;IACrB,QAAQ,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAC;AACvB,CAAC,CAAC,CAAC;AAEH,aAAI,CAAC,SAAS,EAAE,CAAC,CAAC,EAAE;IACnB,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC;AACrB,CAAC,CAAC,CAAC;AAEH,aAAI,CAAC,UAAU,EAAE,CAAC,CAAC,EAAE;IACpB,QAAQ,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;AACtB,CAAC,CAAC,CAAC;AAEH,EAAE,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC;IACrB,aAAI,CAAC,kBAAkB,EAAE,CAAC,CAAC,EAAE;QAC5B,QAAQ,CAAC,CAAC,EAAE,eAAe,CAAC,CAAC;IAC9B,CAAC,CAAC,CAAC;IAEH,aAAI,CAAC,YAAY,EAAE,CAAC,CAAC,EAAE;QACtB,QAAQ,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,eAAe,CAAC,CAAC,CAAC;IAC3C,CAAC,CAAC,CAAC;AAKJ,CAAC;AAED,aAAI,CAAC,cAAc,EAAE,CAAC,CAAC,EAAE;IACxB,QAAQ,CAAC,CAAC,EAAE,WAAW,CAAC,CAAC;AAC1B,CAAC,CAAC,CAAC;AAEH,aAAI,CAAC,sBAAsB,EAAE,CAAC,CAAC,EAAE;IAChC,QAAQ,CAAC,CAAC,EAAE,mBAAmB,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC;AAChD,CAAC,CAAC,CAAC;AAEH,aAAI,CAAC,QAAQ,EAAE,CAAC,CAAC,EAAE;IAClB,QAAQ,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC;AACpB,CAAC,CAAC,CAAC;AAEH,aAAI,CAAC,QAAQ,EAAE,CAAC,CAAC,EAAE;IAClB,QAAQ,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC;AACpB,CAAC,CAAC,CAAC;AAEH,aAAI,CAAC,YAAY,EAAE,CAAC,CAAC,EAAE;IACtB,QAAQ,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC;AACxB,CAAC,CAAC,CAAC;AAEH,aAAI,CAAC,YAAY,EAAE,CAAC,CAAC,EAAE;IACtB,QAAQ,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC;AACxB,CAAC,CAAC,CAAC;AAEH,aAAI,CAAC,cAAc,EAAE,CAAC,CAAC,EAAE;IACxB,QAAQ,CAAC,CAAC,EAAE,WAAW,CAAC,CAAC;AAC1B,CAAC,CAAC,CAAC;AAEH,aAAI,CAAC,eAAe,EAAE,CAAC,CAAC,EAAE;IACzB,QAAQ,CAAC,CAAC,EAAE,YAAY,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;AACvC,CAAC,CAAC,CAAC;AAEH,aAAI,CAAC,sBAAsB,EAAE,CAAC,CAAC,EAAE;IAChC,QAAQ,CAAC,CAAC,EAAE,mBAAmB,CAAC,CAAC;AAClC,CAAC,CAAC,CAAC;AAEH,aAAI,CAAC,eAAe,EAAE,CAAC,CAAC,EAAE;IACzB,QAAQ,CAAC,CAAC,EAAE,YAAY,CAAC,CAAC;AAC3B,CAAC,CAAC,CAAC;AAEH,aAAI,CAAC,gBAAgB,EAAE,CAAC,CAAC,EAAE;IAC1B,QAAQ,CAAC,CAAC,EAAE,aAAa,CAAC,CAAC;AAC5B,CAAC,CAAC,CAAC;AAEH,aAAI,CAAC,eAAe,EAAE,CAAC,CAAC,EAAE;IACzB,QAAQ,CAAC,CAAC,EAAE,YAAY,CAAC,CAAC;AAC3B,CAAC,CAAC,CAAC;AAEH,aAAI,CAAC,gBAAgB,EAAE,CAAC,CAAC,EAAE;IAC1B,QAAQ,CAAC,CAAC,EAAE,aAAa,CAAC,CAAC;AAC5B,CAAC,CAAC,CAAC;AAEH,aAAI,CAAC,iBAAiB,EAAE,CAAC,CAAC,EAAE;IAC3B,QAAQ,CAAC,CAAC,EAAE,cAAc,CAAC,CAAC;AAC7B,CAAC,CAAC,CAAC;AAEH,aAAI,CAAC,iBAAiB,EAAE,CAAC,CAAC,EAAE;IAC3B,QAAQ,CAAC,CAAC,EAAE,cAAc,CAAC,CAAC;AAC7B,CAAC,CAAC,CAAC;AAEH,aAAI,CAAC,gBAAgB,EAAE,CAAC,CAAC,EAAE;IAC1B,QAAQ,CAAC,CAAC,EAAE,aAAa,CAAC,CAAC;AAC5B,CAAC,CAAC,CAAC;AAEH,aAAI,CAAC,aAAa,EAAE,CAAC,CAAC,EAAE;IACvB,QAAQ,CAAC,CAAC,EAAE,aAAa,CAAC,CAAC;AAC5B,CAAC,CAAC,CAAC;AAEH,aAAI,CAAC,WAAW,EAAE,CAAC,CAAC,EAAE;IACrB,CAAC,CAAC,IAAI,CAAC,WAAC,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC;IAC5B,CAAC,CAAC,IAAI,CAAC,WAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;IACvB,CAAC,CAAC,IAAI,CAAC,WAAC,CAAC,MAAM,CAAC,IAAI,GAAG,EAAE,CAAC,CAAC,CAAC;IAC5B,CAAC,CAAC,IAAI,CAAC,WAAC,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAC/B,CAAC,CAAC,IAAI,CAAC,WAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;AACxB,CAAC,CAAC,CAAC;AAEH,aAAI,CAAC,UAAU,EAAE,CAAC,CAAC,EAAE;IACpB,CAAC,CAAC,IAAI,CAAC,WAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC;IACvB,CAAC,CAAC,IAAI,CAAC,WAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IACnB,CAAC,CAAC,IAAI,CAAC,WAAC,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC;IACpB,CAAC,CAAC,IAAI,CAAC,WAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;IACtB,CAAC,CAAC,IAAI,CAAC,WAAC,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC;IAC3B,CAAC,CAAC,IAAI,CAAC,WAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC;AACtB,CAAC,CAAC,CAAC;AAEH,aAAI,CAAC,QAAQ,EAAE,CAAC,CAAC,EAAE;IAClB,QAAQ,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC;AACpB,CAAC,CAAC,CAAC;AAEH,aAAI,CAAC,oBAAoB,EAAE,CAAC,CAAC,EAAE;IAC9B,QAAQ,CAAC,CAAC,EAAE,iBAAiB,EAAE,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC,CAAC;AACvD,CAAC,CAAC,CAAC;AAEH,aAAI,CAAC,cAAc,EAAE,CAAC,CAAC,EAAE;IACxB,MAAM,UAAU,GAAG;QAClB,SAAS;QACT,IAAI;QACJ,IAAI;QACJ,CAAC;QACD,QAAQ;QACR,CAAC,QAAQ;QACT,IAAI;QACJ,KAAK;QACL,MAAM,CAAC,IAAI,CAAC;KACZ,CAAC;IAEF,GAAG,CAAC,CAAC,MAAM,EAAE,IAAI,UAAU,CAAC,CAAC,CAAC;QAC7B,CAAC,CAAC,IAAI,CAAC,WAAC,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC,CAAC;IACzB,CAAC;AACF,CAAC,CAAC,CAAC;AAEH,aAAI,CAAC,YAAY,EAAE,CAAC,CAAC,EAAE;IACtB,QAAQ,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,QAAQ,EAAE,aAAa,CAAC,CAAC,CAAC;IAClD,CAAC,CAAC,KAAK,CAAC,WAAC,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC;AACzB,CAAC,CAAC,CAAC;AAEH,aAAI,CAAC,gBAAgB,EAAE,CAAC,CAAC,EAAE;IAC1B,QAAQ,CAAC,CAAC,EAAE,aAAa,EAAE,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC,CAAC;IAClD,CAAC,CAAC,KAAK,CAAC,WAAC,CAAC,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC;IACxC,CAAC,CAAC,KAAK,CAAC,WAAC,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC;AAC1C,CAAC,CAAC,CAAC;AAEH,aAAI,CAAC,gBAAgB,EAAE,CAAC,CAAC,EAAE;IAC1B,QAAQ,CAAC,CAAC,EAAE,aAAa,EAAE,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC,CAAC;AACnD,CAAC,CAAC,CAAC;AAEH,aAAI,CAAC,aAAa,EAAE,CAAC,CAAC,EAAE;IACvB,CAAC,CAAC,IAAI,CAAC,WAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC;IACvB,CAAC,CAAC,IAAI,CAAC,WAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC;IACvB,CAAC,CAAC,IAAI,CAAC,WAAC,CAAC,QAAQ,CAAC,IAAI,GAAG,EAAE,CAAC,CAAC,CAAC;IAC9B,CAAC,CAAC,KAAK,CAAC,WAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC;IAC1B,CAAC,CAAC,KAAK,CAAC,WAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC;IAC/B,CAAC,CAAC,KAAK,CAAC,WAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC;IACvB,CAAC,CAAC,KAAK,CAAC,WAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC;IACzB,CAAC,CAAC,KAAK,CAAC,WAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC;IAC9B,CAAC,CAAC,KAAK,CAAC,WAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC;AACzB,CAAC,CAAC,CAAC;AAEH,aAAI,CAAC,UAAU,EAAE,CAAC,CAAC,EAAE;IACpB;KAAY;IACZ,MAAM,iBAAiB,GAAG;QACzB,GAAG;QACH,SAAU,SAAQ,GAAG;SAAG;KACxB,CAAC;IAEF,GAAG,CAAC,CAAC,MAAM,CAAC,IAAI,iBAAiB,CAAC,CAAC,CAAC;QACnC,CAAC,CAAC,IAAI,CAAC,WAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;IACrB,CAAC;AACF,CAAC,CAAC,CAAC;AAEH,aAAI,CAAC,eAAe,EAAE,CAAC,CAAC,EAAE;IAGzB,MAAM,WAAW,GAAG;QACnB,IAAI,SAAS,CAAC,CAAC,CAAC;QAChB,IAAI,UAAU,CAAC,CAAC,CAAC;QACjB,IAAI,iBAAiB,CAAC,CAAC,CAAC;QACxB,IAAI,WAAW,CAAC,CAAC,CAAC;QAClB,IAAI,UAAU,CAAC,CAAC,CAAC;QACjB,IAAI,WAAW,CAAC,CAAC,CAAC;QAClB,IAAI,YAAY,CAAC,CAAC,CAAC;QACnB,IAAI,YAAY,CAAC,CAAC,CAAC;KACnB,CAAC;IAEF,GAAG,CAAC,CAAC,MAAM,EAAE,IAAI,WAAW,CAAC,CAAC,CAAC;QAC9B,CAAC,CAAC,IAAI,CAAC,WAAC,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC,CAAC;IAC1B,CAAC;IAED,CAAC,CAAC,KAAK,CAAC,WAAC,CAAC,UAAU,CAAC,IAAI,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC1C,CAAC,CAAC,KAAK,CAAC,WAAC,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC,CAAC;IAC1B,CAAC,CAAC,KAAK,CAAC,WAAC,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC,CAAC;AAC3B,CAAC,CAAC,CAAC;AAEH,aAAI,CAAC,cAAc,EAAE,CAAC,CAAC,EAAE;IACxB,CAAC,GAAG,EAAE;QACL,CAAC,CAAC,IAAI,CAAC,WAAC,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,CAAC;IAChC,CAAC,CAAC,EAAE,CAAC;IACL,CAAC,CAAC,IAAI,CAAC,WAAC,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC,CAAC;IACxB,CAAC,CAAC,IAAI,CAAC,WAAC,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,CAAC;IAE/B,CAAC,CAAC,KAAK,CAAC,WAAC,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC,CAAC;IACzB,CAAC,CAAC,KAAK,CAAC,WAAC,CAAC,SAAS,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC,CAAC;IAC/B,CAAC,CAAC,KAAK,CAAC,WAAC,CAAC,SAAS,CAAC,IAAI,GAAG,EAAE,CAAC,CAAC,CAAC;AACjC,CAAC,CAAC,CAAC;AAEH,aAAI,CAAC,YAAY,EAAE,CAAC,CAAC,EAAE;IACtB,MAAM,CAAC,GAAG,CAAC,CAAC;IAEZ,CAAC,CAAC,IAAI,CAAC,WAAC,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;IAC7B,CAAC,CAAC,IAAI,CAAC,WAAC,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;IAC7B,CAAC,CAAC,IAAI,CAAC,WAAC,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;IAC9B,CAAC,CAAC,IAAI,CAAC,WAAC,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC9B,CAAC,CAAC,KAAK,CAAC,WAAC,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;IAC9B,CAAC,CAAC,IAAI,CAAC,WAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IACjC,CAAC,CAAC,IAAI,CAAC,WAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IACjC,CAAC,CAAC,IAAI,CAAC,WAAC,CAAC,OAAO,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IAElC,CAAC,CAAC,IAAI,CAAC,WAAC,CAAC,OAAO,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;IACzB,CAAC,CAAC,IAAI,CAAC,WAAC,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IACxB,CAAC,CAAC,IAAI,CAAC,WAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;IAC1B,CAAC,CAAC,KAAK,CAAC,WAAC,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IACzB,CAAC,CAAC,KAAK,CAAC,WAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;IAE3B,CAAC,CAAC,MAAM,CAAC,GAAG,EAAE;QACb,WAAC,CAAC,OAAO,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;IAClB,CAAC,CAAC,CAAC;IAEH,CAAC,CAAC,MAAM,CAAC,GAAG,EAAE;QACb,WAAC,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;IACnB,CAAC,CAAC,CAAC;IAEH,CAAC,CAAC,MAAM,CAAC,GAAG,EAAE;QACb,WAAC,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IACzB,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,aAAI,CAAC,eAAe,EAAE,CAAC,CAAC,EAAE;IACzB,QAAQ,CAAC,CAAC,EAAE,YAAY,CAAC,CAAC;IAC1B,CAAC,CAAC,KAAK,CAAC,WAAC,CAAC,UAAU,CAAC,EAAC,QAAQ,EAAE,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAC,CAAC,CAAC,CAAC;AACvD,CAAC,CAAC,CAAC;AAEH,aAAI,CAAC,aAAa,EAAE,CAAC,CAAC,EAAE;IACvB,QAAQ,CAAC,CAAC,EAAE,UAAU,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;AACrC,CAAC,CAAC,CAAC;AAEH,aAAI,CAAC,SAAS,EAAE,CAAC,CAAC,EAAE;IACnB,GAAG,CAAC,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;QAC7B,CAAC,CAAC,IAAI,CAAC,WAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC;IACpB,CAAC;IAED,GAAG,CAAC,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;QAC7B,CAAC,CAAC,KAAK,CAAC,WAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC;IACrB,CAAC;AACF,CAAC,CAAC,CAAC;AAEH,aAAI,CAAC,QAAQ,EAAE,CAAC,CAAC,EAAE;IAClB,GAAG,CAAC,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC;QAC9B,CAAC,CAAC,IAAI,CAAC,WAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC;IACnB,CAAC;IAED,GAAG,CAAC,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC;QAC9B,CAAC,CAAC,KAAK,CAAC,WAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC;IACpB,CAAC;AACF,CAAC,CAAC,CAAC;AAEH,aAAI,CAAC,UAAU,EAAE,CAAC,CAAC,EAAE;IACpB,CAAC,CAAC,IAAI,CAAC,WAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;IACtB,CAAC,CAAC,IAAI,CAAC,WAAC,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC;IAE3B,CAAC,CAAC,IAAI,CAAC,WAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC;IACvB,CAAC,CAAC,KAAK,CAAC,WAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;IAEvB,CAAC,CAAC,IAAI,CAAC,WAAC,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC;IACpB,CAAC,CAAC,KAAK,CAAC,WAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;IAEvB,CAAC,CAAC,IAAI,CAAC,WAAC,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC;IACpB,CAAC,CAAC,KAAK,CAAC,WAAC,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAEzB,CAAC,CAAC,IAAI,CAAC,WAAC,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC;IACpB,CAAC,CAAC,KAAK,CAAC,WAAC,CAAC,KAAK,CAAC,EAAC,OAAO,EAAE,IAAI,EAAC,CAAC,CAAC,CAAC;IAElC,MAAM,OAAO,GAAG,IAAI,GAAG,EAAE,CAAC;IAC1B,CAAC,CAAC,IAAI,CAAC,WAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;IAEzB,OAAO,CAAC,GAAG,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;IAC7B,CAAC,CAAC,KAAK,CAAC,WAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;IAE1B,MAAM,OAAO,GAAG,IAAI,GAAG,EAAE,CAAC;IAC1B,CAAC,CAAC,IAAI,CAAC,WAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;IAEzB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IACf,CAAC,CAAC,KAAK,CAAC,WAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;AAC3B,CAAC,CAAC,CAAC;AAEH,aAAI,CAAC,sBAAsB,EAAE,CAAC,CAAC,EAAE;IAChC,CAAC,CAAC,IAAI,CAAC,WAAC,CAAC,iBAAiB,CAAC,EAAE,CAAC,CAAC,CAAC;IAChC,CAAC,CAAC,IAAI,CAAC,WAAC,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC,CAAC;IAClC,CAAC,CAAC,KAAK,CAAC,WAAC,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC,CAAC;IACnC,CAAC,CAAC,KAAK,CAAC,WAAC,CAAC,iBAAiB,CAAC,SAAS,CAAC,CAAC,CAAC;AACzC,CAAC,CAAC,CAAC;AAEH,aAAI,CAAC,QAAQ,EAAE,CAAC,CAAC,EAAE;IAClB,CAAC,CAAC,IAAI,CAAC,WAAC,CAAC,GAAG,CAAC,WAAC,CAAC,MAAM,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC;IACxC,CAAC,CAAC,IAAI,CAAC,WAAC,CAAC,GAAG,CAAC,WAAC,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE,EAAE,UAAU,CAAC,CAAC,CAAC;IAC/C,CAAC,CAAC,KAAK,CAAC,WAAC,CAAC,GAAG,CAAC,WAAC,CAAC,OAAO,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC;IACvC,CAAC,CAAC,KAAK,CAAC,WAAC,CAAC,GAAG,CAAC,WAAC,CAAC,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,CAAC,CAAC;IAE3C,CAAC,CAAC,MAAM,CAAC,GAAG,EAAE;QACb,WAAC,CAAC,GAAG,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IACnB,CAAC,CAAC,CAAC;IAEH,CAAC,CAAC,MAAM,CAAC,GAAG,EAAE;QACb,WAAC,CAAC,GAAG,CAAC,WAAC,CAAC,MAAM,CAAC,CAAC;IACjB,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,aAAI,CAAC,QAAQ,EAAE,CAAC,CAAC,EAAE;IAClB,CAAC,CAAC,IAAI,CAAC,WAAC,CAAC,GAAG,CAAC,WAAC,CAAC,MAAM,EAAE,EAAE,EAAE,IAAI,GAAG,EAAE,EAAE,IAAI,GAAG,EAAE,CAAC,CAAC,CAAC;IAClD,CAAC,CAAC,IAAI,CAAC,WAAC,CAAC,GAAG,CAAC,WAAC,CAAC,OAAO,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC;IACtC,CAAC,CAAC,KAAK,CAAC,WAAC,CAAC,GAAG,CAAC,WAAC,CAAC,MAAM,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC;IACnC,CAAC,CAAC,KAAK,CAAC,WAAC,CAAC,GAAG,CAAC,WAAC,CAAC,GAAG,EAAE,IAAI,GAAG,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC;IAErC,CAAC,CAAC,MAAM,CAAC,GAAG,EAAE;QACb,WAAC,CAAC,GAAG,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IACnB,CAAC,CAAC,CAAC;IAEH,CAAC,CAAC,MAAM,CAAC,GAAG,EAAE;QACb,WAAC,CAAC,GAAG,CAAC,WAAC,CAAC,MAAM,CAAC,CAAC;IACjB,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC,CAAC"}
\ No newline at end of file
+++ /dev/null
-MIT License
-
-Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
-
-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.
+++ /dev/null
-{
- "name": "@sindresorhus/is",
- "version": "0.7.0",
- "description": "Type check values: `is.string('🦄') //=> true`",
- "license": "MIT",
- "repository": "sindresorhus/is",
- "author": {
- "name": "Sindre Sorhus",
- "email": "sindresorhus@gmail.com",
- "url": "sindresorhus.com"
- },
- "publishConfig": {
- "access": "public"
- },
- "main": "dist/index.js",
- "engines": {
- "node": ">=4"
- },
- "scripts": {
- "lint": "tslint --format stylish --project .",
- "build": "tsc",
- "test": "npm run lint && npm run build && ava dist/tests",
- "prepublish": "npm run build && del dist/tests"
- },
- "files": [
- "dist"
- ],
- "keywords": [
- "type",
- "types",
- "is",
- "check",
- "checking",
- "validate",
- "validation",
- "utility",
- "util",
- "typeof",
- "instanceof",
- "object",
- "assert",
- "assertion",
- "test",
- "kind",
- "primitive",
- "verify",
- "compare"
- ],
- "devDependencies": {
- "@types/jsdom": "^2.0.31",
- "@types/node": "^8.0.47",
- "@types/tempy": "^0.1.0",
- "ava": "*",
- "del-cli": "^1.1.0",
- "jsdom": "^9.12.0",
- "tempy": "^0.2.1",
- "tslint": "^5.8.0",
- "tslint-xo": "^0.3.0",
- "typescript": "^2.6.1"
- },
- "types": "dist/index.d.ts"
-}
+++ /dev/null
-# is [![Build Status](https://travis-ci.org/sindresorhus/is.svg?branch=master)](https://travis-ci.org/sindresorhus/is)
-
-> Type check values: `is.string('🦄') //=> true`
-
-<img src="header.gif" width="182" align="right">
-
-
-## Install
-
-```
-$ npm install @sindresorhus/is
-```
-
-
-## Usage
-
-```js
-const is = require('@sindresorhus/is');
-
-is('🦄');
-//=> 'string'
-
-is(new Map());
-//=> 'Map'
-
-is.number(6);
-//=> true
-```
-
-
-## API
-
-### is(value)
-
-Returns the type of `value`.
-
-Primitives are lowercase and object types are camelcase.
-
-Example:
-
-- `'undefined'`
-- `'null'`
-- `'string'`
-- `'symbol'`
-- `'Array'`
-- `'Function'`
-- `'Object'`
-
-Note: It will throw if you try to feed it object-wrapped primitives, as that's a bad practice. For example `new String('foo')`.
-
-### is.{method}
-
-All the below methods accept a value and returns a boolean for whether the value is of the desired type.
-
-#### Primitives
-
-##### .undefined(value)
-##### .null(value)
-##### .string(value)
-##### .number(value)
-##### .boolean(value)
-##### .symbol(value)
-
-#### Built-in types
-
-##### .array(value)
-##### .function(value)
-##### .buffer(value)
-##### .object(value)
-
-Keep in mind that [functions are objects too](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions).
-
-##### .regExp(value)
-##### .date(value)
-##### .error(value)
-##### .nativePromise(value)
-##### .promise(value)
-
-Returns `true` for any object with a `.then()` and `.catch()` method. Prefer this one over `.nativePromise()` as you usually want to allow userland promise implementations too.
-
-##### .generator(value)
-
-Returns `true` for any object that implements its own `.next()` and `.throw()` methods and has a function definition for `Symbol.iterator`.
-
-##### .generatorFunction(value)
-
-##### .asyncFunction(value)
-
-Returns `true` for any `async` function that can be called with the `await` operator.
-
-```js
-is.asyncFunction(async () => {});
-// => true
-
-is.asyncFunction(() => {});
-// => false
-```
-
-##### .boundFunction(value)
-
-Returns `true` for any `bound` function.
-
-```js
-is.boundFunction(() => {});
-// => true
-
-is.boundFunction(function () {}.bind(null));
-// => true
-
-is.boundFunction(function () {});
-// => false
-```
-
-##### .map(value)
-##### .set(value)
-##### .weakMap(value)
-##### .weakSet(value)
-
-#### Typed arrays
-
-##### .int8Array(value)
-##### .uint8Array(value)
-##### .uint8ClampedArray(value)
-##### .int16Array(value)
-##### .uint16Array(value)
-##### .int32Array(value)
-##### .uint32Array(value)
-##### .float32Array(value)
-##### .float64Array(value)
-
-#### Structured data
-
-##### .arrayBuffer(value)
-##### .sharedArrayBuffer(value)
-##### .dataView(value)
-
-#### Miscellaneous
-
-##### .directInstanceOf(value, class)
-
-Returns `true` if `value` is a direct instance of `class`.
-
-```js
-is.directInstanceOf(new Error(), Error);
-//=> true
-
-class UnicornError extends Error {};
-
-is.directInstanceOf(new UnicornError(), Error);
-//=> false
-```
-
-##### .truthy(value)
-
-Returns `true` for all values that evaluate to true in a boolean context:
-
-```js
-is.truthy('🦄');
-//=> true
-
-is.truthy(undefined);
-//=> false
-```
-
-##### .falsy(value)
-
-Returns `true` if `value` is one of: `false`, `0`, `''`, `null`, `undefined`, `NaN`.
-
-##### .nan(value)
-##### .nullOrUndefined(value)
-##### .primitive(value)
-
-JavaScript primitives are as follows: `null`, `undefined`, `string`, `number`, `boolean`, `symbol`.
-
-##### .integer(value)
-
-##### .safeInteger(value)
-
-Returns `true` if `value` is a [safe integer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isSafeInteger).
-
-##### .plainObject(value)
-
-An object is plain if it's created by either `{}`, `new Object()`, or `Object.create(null)`.
-
-##### .iterable(value)
-##### .class(value)
-
-Returns `true` for instances created by a ES2015 class.
-
-##### .typedArray(value)
-
-##### .arrayLike(value)
-
-A `value` is array-like if it is not a function and has a `value.length` that is a safe integer greater than or equal to 0.
-
-```js
-is.arrayLike(document.forms);
-//=> true
-
-function () {
- is.arrayLike(arguments);
- //=> true
-}
-```
-
-##### .inRange(value, range)
-
-Check if `value` (number) is in the given `range`. The range is an array of two values, lower bound and upper bound, in no specific order.
-
-```js
-is.inRange(3, [0, 5]);
-is.inRange(3, [5, 0]);
-is.inRange(0, [-2, 2]);
-```
-
-##### .inRange(value, upperBound)
-
-Check if `value` (number) is in the range of `0` to `upperBound`.
-
-```js
-is.inRange(3, 10);
-```
-
-##### .domElement(value)
-
-Returns `true` if `value` is a DOM Element.
-
-##### .nodeStream(value)
-
-Returns `true` if `value` is a Node.js [stream](https://nodejs.org/api/stream.html).
-
-```js
-const fs = require('fs');
-is.nodeStream(fs.createReadStream('unicorn.png'));
-//=> true
-```
-
-##### .infinite(value)
-
-Check if `value` is `Infinity` or `-Infinity`.
-
-##### .even(value)
-
-Returns `true` if `value` is an even integer.
-
-##### .odd(value)
-
-Returns `true` if `value` is an odd integer.
-
-##### .empty(value)
-
-Returns `true` if `value` is falsy or an empty string, array, object, map, or set.
-
-##### .emptyOrWhitespace(value)
-
-Returns `true` if `is.empty(value)` or a string that is all whitespace.
-
-
-##### .any(predicate, ...values)
-
-Returns `true` if **any** of the input `values` returns true in the `predicate`:
-
-```js
-is.any(is.string, {}, true, '🦄');
-//=> true
-
-is.any(is.boolean, 'unicorns', [], new Map());
-//=> false
-```
-
-##### .all(predicate, ...values)
-
-Returns `true` if **all** of the input `values` returns true in the `predicate`:
-
-```js
-is.all(is.object, {}, new Map(), new Set());
-//=> true
-
-is.all(is.string, '🦄', [], 'unicorns');
-//=> false
-```
-
-## FAQ
-
-### Why yet another type checking module?
-
-There are hundreds of type checking modules on npm, unfortunately, I couldn't find any that fit my needs:
-
-- Includes both type methods and ability to get the type
-- Types of primitives returned as lowercase and object types as camelcase
-- Covers all built-ins
-- Unsurprising behavior
-- Well-maintained
-- Comprehensive test suite
-
-For the ones I found, pick 3 of these.
-
-The most common mistakes I noticed in these modules was using `instanceof` for type checking, forgetting that functions are objects, and omitting `symbol` as a primitive.
-
-
-## Related
-
-- [is-stream](https://github.com/sindresorhus/is-stream) - Check if something is a Node.js stream
-- [is-observable](https://github.com/sindresorhus/is-observable) - Check if a value is an Observable
-- [file-type](https://github.com/sindresorhus/file-type) - Detect the file type of a Buffer/Uint8Array
-- [is-ip](https://github.com/sindresorhus/is-ip) - Check if a string is an IP address
-- [is-array-sorted](https://github.com/sindresorhus/is-array-sorted) - Check if an Array is sorted
-- [is-error-constructor](https://github.com/sindresorhus/is-error-constructor) - Check if a value is an error constructor
-- [is-empty-iterable](https://github.com/sindresorhus/is-empty-iterable) - Check if an Iterable is empty
-- [is-blob](https://github.com/sindresorhus/is-blob) - Check if a value is a Blob - File-like object of immutable, raw data
-- [has-emoji](https://github.com/sindresorhus/has-emoji) - Check whether a string has any emoji
-
-
-## Created by
-
-- [Sindre Sorhus](https://github.com/sindresorhus)
-- [Giora Guttsait](https://github.com/gioragutt)
-- [Brandon Smith](https://github.com/brandon93s)
-
-
-## License
-
-MIT
+++ /dev/null
-'use strict';
-const isPlainObj = require('is-plain-obj');
-
-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);
-};
+++ /dev/null
-MIT License
-
-Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
-
-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.
+++ /dev/null
-{
- "name": "sort-keys",
- "version": "2.0.0",
- "description": "Sort the keys of an object",
- "license": "MIT",
- "repository": "sindresorhus/sort-keys",
- "author": {
- "name": "Sindre Sorhus",
- "email": "sindresorhus@gmail.com",
- "url": "sindresorhus.com"
- },
- "engines": {
- "node": ">=4"
- },
- "scripts": {
- "test": "xo && ava"
- },
- "files": [
- "index.js"
- ],
- "keywords": [
- "sort",
- "object",
- "keys",
- "obj",
- "key",
- "stable",
- "deterministic",
- "deep",
- "recursive",
- "recursively"
- ],
- "dependencies": {
- "is-plain-obj": "^1.0.0"
- },
- "devDependencies": {
- "ava": "*",
- "xo": "*"
- }
-}
+++ /dev/null
-# sort-keys [![Build Status](https://travis-ci.org/sindresorhus/sort-keys.svg?branch=master)](https://travis-ci.org/sindresorhus/sort-keys)
-
-> Sort the keys of an object
-
-Useful to get a deterministically ordered object, as the order of keys can vary between engines.
-
-
-## Install
-
-```
-$ npm install --save sort-keys
-```
-
-
-## Usage
-
-```js
-const sortKeys = require('sort-keys');
-
-sortKeys({c: 0, a: 0, b: 0});
-//=> {a: 0, b: 0, c: 0}
-
-sortKeys({b: {b: 0, a: 0}, a: 0}, {deep: true});
-//=> {a: 0, b: {a: 0, b: 0}}
-
-sortKeys({c: 0, a: 0, b: 0}, {
- compare: (a, b) => -a.localeCompare(b)
-});
-//=> {c: 0, b: 0, a: 0}
-```
-
-
-## API
-
-### sortKeys(input, [options])
-
-Returns a new object with sorted keys.
-
-#### input
-
-Type: `Object`
-
-#### options
-
-##### deep
-
-Type: `boolean`
-
-Recursively sort keys.
-
-##### compare
-
-Type: `Function`
-
-[Compare function.](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort)
-
-
-## License
-
-MIT © [Sindre Sorhus](https://sindresorhus.com)
+++ /dev/null
-'use strict';
-module.exports = function (str) {
- return encodeURIComponent(str).replace(/[!'()*]/g, function (c) {
- return '%' + c.charCodeAt(0).toString(16).toUpperCase();
- });
-};
+++ /dev/null
-The MIT License (MIT)
-
-Copyright (c) Kevin Mårtensson <kevinmartensson@gmail.com> (github.com/kevva)
-
-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.
+++ /dev/null
-{
- "name": "strict-uri-encode",
- "version": "1.1.0",
- "description": "A stricter URI encode adhering to RFC 3986",
- "license": "MIT",
- "repository": "kevva/strict-uri-encode",
- "author": {
- "name": "Kevin Mårtensson",
- "email": "kevinmartensson@gmail.com",
- "url": "github.com/kevva"
- },
- "engines": {
- "node": ">=0.10.0"
- },
- "scripts": {
- "test": "node test.js"
- },
- "files": [
- "index.js"
- ],
- "keywords": [
- "component",
- "encode",
- "RFC3986",
- "uri"
- ],
- "devDependencies": {
- "ava": "^0.0.4"
- }
-}
+++ /dev/null
-# strict-uri-encode [![Build Status](https://travis-ci.org/kevva/strict-uri-encode.svg?branch=master)](https://travis-ci.org/kevva/strict-uri-encode)
-
-> A stricter URI encode adhering to [RFC 3986](http://tools.ietf.org/html/rfc3986)
-
-
-## Install
-
-```
-$ npm install --save strict-uri-encode
-```
-
-
-## Usage
-
-```js
-var strictUriEncode = require('strict-uri-encode');
-
-strictUriEncode('unicorn!foobar')
-//=> 'unicorn%21foobar'
-
-strictUriEncode('unicorn*foobar')
-//=> 'unicorn%2Afoobar'
-```
-
-
-## API
-
-### strictUriEncode(string)
-
-#### string
-
-*Required*
-Type: `string`, `number`
-
-String to URI encode.
-
-
-## License
-
-MIT © [Kevin Mårtensson](http://github.com/kevva)
+++ /dev/null
-sudo: false
-language: node_js
-before_install:
- - npm install -g npm@2
- - test $NPM_LEGACY && npm install -g npm@latest-3 || npm install npm -g
-notifications:
- email: false
-matrix:
- fast_finish: true
- include:
- - node_js: '0.8'
- env:
- - TASK=test
- - NPM_LEGACY=true
- - node_js: '0.10'
- env:
- - TASK=test
- - NPM_LEGACY=true
- - node_js: '0.11'
- env:
- - TASK=test
- - NPM_LEGACY=true
- - node_js: '0.12'
- env:
- - TASK=test
- - NPM_LEGACY=true
- - node_js: 1
- env:
- - TASK=test
- - NPM_LEGACY=true
- - node_js: 2
- env:
- - TASK=test
- - NPM_LEGACY=true
- - node_js: 3
- env:
- - TASK=test
- - NPM_LEGACY=true
- - node_js: 4
- env: TASK=test
- - node_js: 5
- env: TASK=test
- - node_js: 6
- env: TASK=test
- - node_js: 7
- env: TASK=test
- - node_js: 8
- env: TASK=test
- - node_js: 9
- env: TASK=test
+++ /dev/null
-Node.js is licensed for use as follows:
-
-"""
-Copyright Node.js contributors. All rights reserved.
-
-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.
-"""
-
-This license applies to parts of Node.js originating from the
-https://github.com/joyent/node repository:
-
-"""
-Copyright Joyent, Inc. and other Node contributors. All rights reserved.
-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.
-"""
-
+++ /dev/null
-# string_decoder
-
-***Node-core v8.9.4 string_decoder for userland***
-
-
-[![NPM](https://nodei.co/npm/string_decoder.png?downloads=true&downloadRank=true)](https://nodei.co/npm/string_decoder/)
-[![NPM](https://nodei.co/npm-dl/string_decoder.png?&months=6&height=3)](https://nodei.co/npm/string_decoder/)
-
-
-```bash
-npm install --save string_decoder
-```
-
-***Node-core string_decoder for userland***
-
-This package is a mirror of the string_decoder implementation in Node-core.
-
-Full documentation may be found on the [Node.js website](https://nodejs.org/dist/v8.9.4/docs/api/).
-
-As of version 1.0.0 **string_decoder** uses semantic versioning.
-
-## Previous versions
-
-Previous version numbers match the versions found in Node core, e.g. 0.10.24 matches Node 0.10.24, likewise 0.11.10 matches Node 0.11.10.
-
-## Update
-
-The *build/* directory contains a build script that will scrape the source from the [nodejs/node](https://github.com/nodejs/node) repo given a specific Node version.
-
-## Streams Working Group
-
-`string_decoder` is maintained by the Streams Working Group, which
-oversees the development and maintenance of the Streams API within
-Node.js. The responsibilities of the Streams Working Group include:
-
-* Addressing stream issues on the Node.js issue tracker.
-* Authoring and editing stream documentation within the Node.js project.
-* Reviewing changes to stream subclasses within the Node.js project.
-* Redirecting changes to streams from the Node.js project to this
- project.
-* Assisting in the implementation of stream providers within Node.js.
-* Recommending versions of `readable-stream` to be included in Node.js.
-* Messaging about the future of streams to give the community advance
- notice of changes.
-
-See [readable-stream](https://github.com/nodejs/readable-stream) for
-more details.
+++ /dev/null
-// 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.
-
-'use strict';
-
-/*<replacement>*/
-
-var Buffer = require('safe-buffer').Buffer;
-/*</replacement>*/
-
-var isEncoding = Buffer.isEncoding || function (encoding) {
- encoding = '' + encoding;
- switch (encoding && encoding.toLowerCase()) {
- case 'hex':case 'utf8':case 'utf-8':case 'ascii':case 'binary':case 'base64':case 'ucs2':case 'ucs-2':case 'utf16le':case 'utf-16le':case 'raw':
- return true;
- default:
- return false;
- }
-};
-
-function _normalizeEncoding(enc) {
- if (!enc) return 'utf8';
- var retried;
- while (true) {
- switch (enc) {
- case 'utf8':
- case 'utf-8':
- return 'utf8';
- case 'ucs2':
- case 'ucs-2':
- case 'utf16le':
- case 'utf-16le':
- return 'utf16le';
- case 'latin1':
- case 'binary':
- return 'latin1';
- case 'base64':
- case 'ascii':
- case 'hex':
- return enc;
- default:
- if (retried) return; // undefined
- enc = ('' + enc).toLowerCase();
- retried = true;
- }
- }
-};
-
-// Do not cache `Buffer.isEncoding` when checking encoding names as some
-// modules monkey-patch it to support additional encodings
-function normalizeEncoding(enc) {
- var nenc = _normalizeEncoding(enc);
- if (typeof nenc !== 'string' && (Buffer.isEncoding === isEncoding || !isEncoding(enc))) throw new Error('Unknown encoding: ' + enc);
- return nenc || enc;
-}
-
-// StringDecoder provides an interface for efficiently splitting a series of
-// buffers into a series of JS strings without breaking apart multi-byte
-// characters.
-exports.StringDecoder = StringDecoder;
-function StringDecoder(encoding) {
- this.encoding = normalizeEncoding(encoding);
- var nb;
- switch (this.encoding) {
- case 'utf16le':
- this.text = utf16Text;
- this.end = utf16End;
- nb = 4;
- break;
- case 'utf8':
- this.fillLast = utf8FillLast;
- nb = 4;
- break;
- case 'base64':
- this.text = base64Text;
- this.end = base64End;
- nb = 3;
- break;
- default:
- this.write = simpleWrite;
- this.end = simpleEnd;
- return;
- }
- this.lastNeed = 0;
- this.lastTotal = 0;
- this.lastChar = Buffer.allocUnsafe(nb);
-}
-
-StringDecoder.prototype.write = function (buf) {
- if (buf.length === 0) return '';
- var r;
- var i;
- if (this.lastNeed) {
- r = this.fillLast(buf);
- if (r === undefined) return '';
- i = this.lastNeed;
- this.lastNeed = 0;
- } else {
- i = 0;
- }
- if (i < buf.length) return r ? r + this.text(buf, i) : this.text(buf, i);
- return r || '';
-};
-
-StringDecoder.prototype.end = utf8End;
-
-// Returns only complete characters in a Buffer
-StringDecoder.prototype.text = utf8Text;
-
-// Attempts to complete a partial non-UTF-8 character using bytes from a Buffer
-StringDecoder.prototype.fillLast = function (buf) {
- if (this.lastNeed <= buf.length) {
- buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed);
- return this.lastChar.toString(this.encoding, 0, this.lastTotal);
- }
- buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, buf.length);
- this.lastNeed -= buf.length;
-};
-
-// Checks the type of a UTF-8 byte, whether it's ASCII, a leading byte, or a
-// continuation byte. If an invalid byte is detected, -2 is returned.
-function utf8CheckByte(byte) {
- if (byte <= 0x7F) return 0;else if (byte >> 5 === 0x06) return 2;else if (byte >> 4 === 0x0E) return 3;else if (byte >> 3 === 0x1E) return 4;
- return byte >> 6 === 0x02 ? -1 : -2;
-}
-
-// Checks at most 3 bytes at the end of a Buffer in order to detect an
-// incomplete multi-byte UTF-8 character. The total number of bytes (2, 3, or 4)
-// needed to complete the UTF-8 character (if applicable) are returned.
-function utf8CheckIncomplete(self, buf, i) {
- var j = buf.length - 1;
- if (j < i) return 0;
- var nb = utf8CheckByte(buf[j]);
- if (nb >= 0) {
- if (nb > 0) self.lastNeed = nb - 1;
- return nb;
- }
- if (--j < i || nb === -2) return 0;
- nb = utf8CheckByte(buf[j]);
- if (nb >= 0) {
- if (nb > 0) self.lastNeed = nb - 2;
- return nb;
- }
- if (--j < i || nb === -2) return 0;
- nb = utf8CheckByte(buf[j]);
- if (nb >= 0) {
- if (nb > 0) {
- if (nb === 2) nb = 0;else self.lastNeed = nb - 3;
- }
- return nb;
- }
- return 0;
-}
-
-// Validates as many continuation bytes for a multi-byte UTF-8 character as
-// needed or are available. If we see a non-continuation byte where we expect
-// one, we "replace" the validated continuation bytes we've seen so far with
-// a single UTF-8 replacement character ('\ufffd'), to match v8's UTF-8 decoding
-// behavior. The continuation byte check is included three times in the case
-// where all of the continuation bytes for a character exist in the same buffer.
-// It is also done this way as a slight performance increase instead of using a
-// loop.
-function utf8CheckExtraBytes(self, buf, p) {
- if ((buf[0] & 0xC0) !== 0x80) {
- self.lastNeed = 0;
- return '\ufffd';
- }
- if (self.lastNeed > 1 && buf.length > 1) {
- if ((buf[1] & 0xC0) !== 0x80) {
- self.lastNeed = 1;
- return '\ufffd';
- }
- if (self.lastNeed > 2 && buf.length > 2) {
- if ((buf[2] & 0xC0) !== 0x80) {
- self.lastNeed = 2;
- return '\ufffd';
- }
- }
- }
-}
-
-// Attempts to complete a multi-byte UTF-8 character using bytes from a Buffer.
-function utf8FillLast(buf) {
- var p = this.lastTotal - this.lastNeed;
- var r = utf8CheckExtraBytes(this, buf, p);
- if (r !== undefined) return r;
- if (this.lastNeed <= buf.length) {
- buf.copy(this.lastChar, p, 0, this.lastNeed);
- return this.lastChar.toString(this.encoding, 0, this.lastTotal);
- }
- buf.copy(this.lastChar, p, 0, buf.length);
- this.lastNeed -= buf.length;
-}
-
-// Returns all complete UTF-8 characters in a Buffer. If the Buffer ended on a
-// partial character, the character's bytes are buffered until the required
-// number of bytes are available.
-function utf8Text(buf, i) {
- var total = utf8CheckIncomplete(this, buf, i);
- if (!this.lastNeed) return buf.toString('utf8', i);
- this.lastTotal = total;
- var end = buf.length - (total - this.lastNeed);
- buf.copy(this.lastChar, 0, end);
- return buf.toString('utf8', i, end);
-}
-
-// For UTF-8, a replacement character is added when ending on a partial
-// character.
-function utf8End(buf) {
- var r = buf && buf.length ? this.write(buf) : '';
- if (this.lastNeed) return r + '\ufffd';
- return r;
-}
-
-// UTF-16LE typically needs two bytes per character, but even if we have an even
-// number of bytes available, we need to check if we end on a leading/high
-// surrogate. In that case, we need to wait for the next two bytes in order to
-// decode the last character properly.
-function utf16Text(buf, i) {
- if ((buf.length - i) % 2 === 0) {
- var r = buf.toString('utf16le', i);
- if (r) {
- var c = r.charCodeAt(r.length - 1);
- if (c >= 0xD800 && c <= 0xDBFF) {
- this.lastNeed = 2;
- this.lastTotal = 4;
- this.lastChar[0] = buf[buf.length - 2];
- this.lastChar[1] = buf[buf.length - 1];
- return r.slice(0, -1);
- }
- }
- return r;
- }
- this.lastNeed = 1;
- this.lastTotal = 2;
- this.lastChar[0] = buf[buf.length - 1];
- return buf.toString('utf16le', i, buf.length - 1);
-}
-
-// For UTF-16LE we do not explicitly append special replacement characters if we
-// end on a partial character, we simply let v8 handle that.
-function utf16End(buf) {
- var r = buf && buf.length ? this.write(buf) : '';
- if (this.lastNeed) {
- var end = this.lastTotal - this.lastNeed;
- return r + this.lastChar.toString('utf16le', 0, end);
- }
- return r;
-}
-
-function base64Text(buf, i) {
- var n = (buf.length - i) % 3;
- if (n === 0) return buf.toString('base64', i);
- this.lastNeed = 3 - n;
- this.lastTotal = 3;
- if (n === 1) {
- this.lastChar[0] = buf[buf.length - 1];
- } else {
- this.lastChar[0] = buf[buf.length - 2];
- this.lastChar[1] = buf[buf.length - 1];
- }
- return buf.toString('base64', i, buf.length - n);
-}
-
-function base64End(buf) {
- var r = buf && buf.length ? this.write(buf) : '';
- if (this.lastNeed) return r + this.lastChar.toString('base64', 0, 3 - this.lastNeed);
- return r;
-}
-
-// Pass bytes on through for single-byte encodings (e.g. ascii, latin1, hex)
-function simpleWrite(buf) {
- return buf.toString(this.encoding);
-}
-
-function simpleEnd(buf) {
- return buf && buf.length ? this.write(buf) : '';
-}
\ No newline at end of file
+++ /dev/null
-{
- "name": "string_decoder",
- "version": "1.1.1",
- "description": "The string_decoder module from Node core",
- "main": "lib/string_decoder.js",
- "dependencies": {
- "safe-buffer": "~5.1.0"
- },
- "devDependencies": {
- "babel-polyfill": "^6.23.0",
- "core-util-is": "^1.0.2",
- "inherits": "^2.0.3",
- "tap": "~0.4.8"
- },
- "scripts": {
- "test": "tap test/parallel/*.js && node test/verify-dependencies",
- "ci": "tap test/parallel/*.js test/ours/*.js --tap | tee test.tap && node test/verify-dependencies.js"
- },
- "repository": {
- "type": "git",
- "url": "git://github.com/nodejs/string_decoder.git"
- },
- "homepage": "https://github.com/nodejs/string_decoder",
- "keywords": [
- "string",
- "decoder",
- "browser",
- "browserify"
- ],
- "license": "MIT"
-}
+++ /dev/null
-'use strict';
-
-module.exports = function (req, time) {
- if (req.timeoutTimer) {
- return req;
- }
-
- var delays = isNaN(time) ? time : {socket: time, connect: time};
- var host = req._headers ? (' to ' + req._headers.host) : '';
-
- if (delays.connect !== undefined) {
- req.timeoutTimer = setTimeout(function timeoutHandler() {
- req.abort();
- var e = new Error('Connection timed out on request' + host);
- e.code = 'ETIMEDOUT';
- req.emit('error', e);
- }, delays.connect);
- }
-
- // Clear the connection timeout timer once a socket is assigned to the
- // request and is connected.
- req.on('socket', function assign(socket) {
- // Socket may come from Agent pool and may be already connected.
- if (!(socket.connecting || socket._connecting)) {
- connect();
- return;
- }
-
- socket.once('connect', connect);
- });
-
- function clear() {
- if (req.timeoutTimer) {
- clearTimeout(req.timeoutTimer);
- req.timeoutTimer = null;
- }
- }
-
- function connect() {
- clear();
-
- if (delays.socket !== undefined) {
- // Abort the request if there is no activity on the socket for more
- // than `delays.socket` milliseconds.
- req.setTimeout(delays.socket, function socketTimeoutHandler() {
- req.abort();
- var e = new Error('Socket timed out on request' + host);
- e.code = 'ESOCKETTIMEDOUT';
- req.emit('error', e);
- });
- }
- }
-
- return req.on('error', clear);
-};
+++ /dev/null
-The MIT License (MIT)
-
-Copyright (c) Vsevolod Strukchinsky <floatdrop@gmail.com>
-
-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.
+++ /dev/null
-{
- "name": "timed-out",
- "version": "4.0.1",
- "description": "Emit `ETIMEDOUT` or `ESOCKETTIMEDOUT` when ClientRequest is hanged",
- "license": "MIT",
- "repository": "floatdrop/timed-out",
- "author": {
- "name": "Vsevolod Strukchinsky",
- "email": "floatdrop@gmail.com"
- },
- "engines": {
- "node": ">=0.10.0"
- },
- "scripts": {
- "test": "xo && mocha"
- },
- "files": [
- "index.js"
- ],
- "keywords": [
- "http",
- "https",
- "get",
- "got",
- "url",
- "uri",
- "request",
- "util",
- "utility",
- "simple"
- ],
- "devDependencies": {
- "mocha": "*",
- "xo": "^0.16.0"
- }
-}
+++ /dev/null
-# timed-out [![Build Status](https://travis-ci.org/floatdrop/timed-out.svg?branch=master)](https://travis-ci.org/floatdrop/timed-out)
-
-> Timeout HTTP/HTTPS requests
-
-Emit Error object with `code` property equal `ETIMEDOUT` or `ESOCKETTIMEDOUT` when ClientRequest is hanged.
-
-## Usage
-
-```js
-var get = require('http').get;
-var timeout = require('timed-out');
-
-var req = get('http://www.google.ru');
-timeout(req, 2000); // Set 2 seconds limit
-```
-
-### API
-
-#### timedout(request, time)
-
-##### request
-
-*Required*
-Type: [`ClientRequest`](http://nodejs.org/api/http.html#http_class_http_clientrequest)
-
-The request to watch on.
-
-##### time
-
-*Required*
-Type: `number` or `object`
-
-Time in milliseconds to wait for `connect` event on socket and also time to wait on inactive socket.
-
-Or you can pass Object with following fields:
-
-- `connect` - time to wait for connection
-- `socket` - time to wait for activity on socket
-
-## License
-
-MIT © [Vsevolod Strukchinsky](floatdrop@gmail.com)
+++ /dev/null
-'use strict';
-const url = require('url');
-const prependHttp = require('prepend-http');
-
-module.exports = (input, options) => {
- if (typeof input !== 'string') {
- throw new TypeError(`Expected \`url\` to be of type \`string\`, got \`${typeof input}\` instead.`);
- }
-
- const finalUrl = prependHttp(input, Object.assign({https: true}, options));
- return url.parse(finalUrl);
-};
+++ /dev/null
-MIT License
-
-Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
-
-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.
+++ /dev/null
-{
- "name": "url-parse-lax",
- "version": "3.0.0",
- "description": "Lax url.parse() with support for protocol-less URLs & IPs",
- "license": "MIT",
- "repository": "sindresorhus/url-parse-lax",
- "author": {
- "name": "Sindre Sorhus",
- "email": "sindresorhus@gmail.com",
- "url": "sindresorhus.com"
- },
- "engines": {
- "node": ">=4"
- },
- "scripts": {
- "test": "xo && ava"
- },
- "files": [
- "index.js"
- ],
- "keywords": [
- "url",
- "uri",
- "parse",
- "parser",
- "loose",
- "lax",
- "protocol",
- "less",
- "protocol-less",
- "ip",
- "ipv4",
- "ipv6"
- ],
- "dependencies": {
- "prepend-http": "^2.0.0"
- },
- "devDependencies": {
- "ava": "*",
- "xo": "*"
- }
-}
+++ /dev/null
-# url-parse-lax [![Build Status](https://travis-ci.org/sindresorhus/url-parse-lax.svg?branch=master)](https://travis-ci.org/sindresorhus/url-parse-lax)
-
-> Lax [`url.parse()`](https://nodejs.org/docs/latest/api/url.html#url_url_parse_urlstr_parsequerystring_slashesdenotehost) with support for protocol-less URLs & IPs
-
-
-## Install
-
-```
-$ npm install url-parse-lax
-```
-
-
-## Usage
-
-```js
-const urlParseLax = require('url-parse-lax');
-
-urlParseLax('sindresorhus.com');
-/*
-{
- protocol: 'https:',
- slashes: true,
- auth: null,
- host: 'sindresorhus.com',
- port: null,
- hostname: 'sindresorhus.com',
- hash: null,
- search: null,
- query: null,
- pathname: '/',
- path: '/',
- href: 'https://sindresorhus.com/'
-}
-*/
-
-urlParseLax('[2001:db8::]:8000');
-/*
-{
- protocol: null,
- slashes: true,
- auth: null,
- host: '[2001:db8::]:8000',
- port: '8000',
- hostname: '2001:db8::',
- hash: null,
- search: null,
- query: null,
- pathname: '/',
- path: '/',
- href: 'http://[2001:db8::]:8000/'
-}
-*/
-```
-
-And with the built-in `url.parse()`:
-
-```js
-const url = require('url');
-
-url.parse('sindresorhus.com');
-/*
-{
- protocol: null,
- slashes: null,
- auth: null,
- host: null,
- port: null,
- hostname: null,
- hash: null,
- search: null,
- query: null,
- pathname: 'sindresorhus',
- path: 'sindresorhus',
- href: 'sindresorhus'
-}
-*/
-
-url.parse('[2001:db8::]:8000');
-/*
-{
- protocol: null,
- slashes: null,
- auth: null,
- host: null,
- port: null,
- hostname: null,
- hash: null,
- search: null,
- query: null,
- pathname: '[2001:db8::]:8000',
- path: '[2001:db8::]:8000',
- href: '[2001:db8::]:8000'
-}
-*/
-```
-
-
-## API
-
-### urlParseLax(url, [options])
-
-#### url
-
-Type: `string`
-
-URL to parse.
-
-#### options
-
-Type: `Object`
-
-##### https
-
-Type: `boolean`<br>
-Default: `true`
-
-Prepend `https://` instead of `http://` to protocol-less URLs.
-
-
-## Related
-
-- [url-format-lax](https://github.com/sindresorhus/url-format-lax) - Lax `url.format()` that formats a hostname and port into IPv6-compatible socket form of `hostname:port`
-
-
-## License
-
-MIT © [Sindre Sorhus](https://sindresorhus.com)
+++ /dev/null
-MIT License
-
-Copyright (c) 2017 Steven Vachon
-
-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.
+++ /dev/null
-# url-to-options [![NPM Version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url]
-
-Convert a WHATWG [URL](https://developer.mozilla.org/en/docs/Web/API/URL) to an `http.request`/`https.request` options object.
-
-
-## Installation
-
-[Node.js](http://nodejs.org/) `>= 4` is required. To install, type this at the command line:
-```shell
-npm install url-to-options
-```
-
-
-## Usage
-
-```js
-const urlToOptions = require('url-to-options');
-
-const url = new URL('http://user:pass@hostname:8080/');
-
-const opts = urlToOptions(url);
-//-> { auth:'user:pass', port:8080, … }
-```
-
-
-[npm-image]: https://img.shields.io/npm/v/url-to-options.svg
-[npm-url]: https://npmjs.org/package/url-to-options
-[travis-image]: https://img.shields.io/travis/stevenvachon/url-to-options.svg
-[travis-url]: https://travis-ci.org/stevenvachon/url-to-options
+++ /dev/null
-'use strict';
-
-
-
-// Copied from https://github.com/nodejs/node/blob/master/lib/internal/url.js
-
-function urlToOptions(url) {
- var options = {
- protocol: url.protocol,
- hostname: url.hostname,
- hash: url.hash,
- search: url.search,
- pathname: url.pathname,
- path: `${url.pathname}${url.search}`,
- href: url.href
- };
- if (url.port !== '') {
- options.port = Number(url.port);
- }
- if (url.username || url.password) {
- options.auth = `${url.username}:${url.password}`;
- }
- return options;
-}
-
-
-
-module.exports = urlToOptions;
+++ /dev/null
-{
- "name": "url-to-options",
- "description": "Convert a WHATWG URL to an http(s).request options object.",
- "version": "1.0.1",
- "license": "MIT",
- "author": "Steven Vachon <contact@svachon.com> (https://www.svachon.com/)",
- "repository": "stevenvachon/url-to-options",
- "devDependencies": {
- "universal-url": "^1.0.0-alpha"
- },
- "engines": {
- "node": ">= 4"
- },
- "scripts": {
- "test": "node test.js"
- },
- "files": ["index.js"],
- "keywords": [
- "http",
- "https",
- "url",
- "whatwg"
- ]
-}
+++ /dev/null
-
-1.0.2 / 2015-10-07
-==================
-
- * use try/catch when checking `localStorage` (#3, @kumavis)
-
-1.0.1 / 2014-11-25
-==================
-
- * browser: use `console.warn()` for deprecation calls
- * browser: more jsdocs
-
-1.0.0 / 2014-04-30
-==================
-
- * initial commit
+++ /dev/null
-(The MIT License)
-
-Copyright (c) 2014 Nathan Rajlich <nathan@tootallnate.net>
-
-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.
+++ /dev/null
-util-deprecate
-==============
-### The Node.js `util.deprecate()` function with browser support
-
-In Node.js, this module simply re-exports the `util.deprecate()` function.
-
-In the web browser (i.e. via browserify), a browser-specific implementation
-of the `util.deprecate()` function is used.
-
-
-## API
-
-A `deprecate()` function is the only thing exposed by this module.
-
-``` javascript
-// setup:
-exports.foo = deprecate(foo, 'foo() is deprecated, use bar() instead');
-
-
-// users see:
-foo();
-// foo() is deprecated, use bar() instead
-foo();
-foo();
-```
-
-
-## License
-
-(The MIT License)
-
-Copyright (c) 2014 Nathan Rajlich <nathan@tootallnate.net>
-
-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.
+++ /dev/null
-
-/**
- * Module exports.
- */
-
-module.exports = deprecate;
-
-/**
- * Mark that a method should not be used.
- * Returns a modified function which warns once by default.
- *
- * If `localStorage.noDeprecation = true` is set, then it is a no-op.
- *
- * If `localStorage.throwDeprecation = true` is set, then deprecated functions
- * will throw an Error when invoked.
- *
- * If `localStorage.traceDeprecation = true` is set, then deprecated functions
- * will invoke `console.trace()` instead of `console.error()`.
- *
- * @param {Function} fn - the function to deprecate
- * @param {String} msg - the string to print to the console when `fn` is invoked
- * @returns {Function} a new "deprecated" version of `fn`
- * @api public
- */
-
-function deprecate (fn, msg) {
- if (config('noDeprecation')) {
- return fn;
- }
-
- var warned = false;
- function deprecated() {
- if (!warned) {
- if (config('throwDeprecation')) {
- throw new Error(msg);
- } else if (config('traceDeprecation')) {
- console.trace(msg);
- } else {
- console.warn(msg);
- }
- warned = true;
- }
- return fn.apply(this, arguments);
- }
-
- return deprecated;
-}
-
-/**
- * Checks `localStorage` for boolean values for the given `name`.
- *
- * @param {String} name
- * @returns {Boolean}
- * @api private
- */
-
-function config (name) {
- // accessing global.localStorage can trigger a DOMException in sandboxed iframes
- try {
- if (!global.localStorage) return false;
- } catch (_) {
- return false;
- }
- var val = global.localStorage[name];
- if (null == val) return false;
- return String(val).toLowerCase() === 'true';
-}
+++ /dev/null
-
-/**
- * For Node.js, simply re-export the core `util.deprecate` function.
- */
-
-module.exports = require('util').deprecate;
+++ /dev/null
-{
- "name": "util-deprecate",
- "version": "1.0.2",
- "description": "The Node.js `util.deprecate()` function with browser support",
- "main": "node.js",
- "browser": "browser.js",
- "scripts": {
- "test": "echo \"Error: no test specified\" && exit 1"
- },
- "repository": {
- "type": "git",
- "url": "git://github.com/TooTallNate/util-deprecate.git"
- },
- "keywords": [
- "util",
- "deprecate",
- "browserify",
- "browser",
- "node"
- ],
- "author": "Nathan Rajlich <nathan@tootallnate.net> (http://n8.io/)",
- "license": "MIT",
- "bugs": {
- "url": "https://github.com/TooTallNate/util-deprecate/issues"
- },
- "homepage": "https://github.com/TooTallNate/util-deprecate"
-}
+++ /dev/null
-version: 2
-
-defaults: &defaults
- docker:
- - image: circleci/node:9-browsers
- environment:
- CHROME_BIN: /usr/bin/google-chrome
- working_directory: ~/vue-resource
-
-jobs:
- build:
- <<: *defaults
- steps:
- - run:
- name: Update Environment
- command: echo 'export PATH=$CIRCLE_WORKING_DIRECTORY/node_modules/.bin:$PATH' >> $BASH_ENV
- - checkout
- - restore_cache:
- key: yarn-{{ checksum "yarn.lock" }}
- - run:
- name: Install Dependencies
- command: yarn install --pure-lockfile --cache-folder ~/.yarn
- - save_cache:
- key: yarn-{{ checksum "yarn.lock" }}
- paths:
- - ~/.yarn
- - run:
- name: Run Tests
- command: |
- yarn test
- karma start test/karma.conf.js --single-run --browsers Chrome,Firefox
- - run:
- name: Build Release
- command: yarn run build
+++ /dev/null
-/node_modules
-/dist
-/test
+++ /dev/null
-module.exports = {
- "root":true,
- "env": {
- "es6": true,
- "browser": true,
- "commonjs": true,
- },
- "extends": [
- "eslint:recommended"
- ],
- "parserOptions": {
- "sourceType": "module"
- },
- "rules": {
- "brace-style": ["error", "1tbs", {"allowSingleLine": true}],
- "comma-style": "error",
- "comma-spacing": "error",
- "eqeqeq": ["off", "smart"],
- "indent": "off",
- "indent-legacy": ["error", 4, {"SwitchCase": 1}],
- "key-spacing": "error",
- "keyword-spacing": "error",
- "linebreak-style": ["error", "unix"],
- "no-multi-spaces": "error",
- "no-trailing-spaces": "error",
- "no-lone-blocks": "error",
- "no-extend-native": "error",
- "no-unused-vars": ["error", {"vars": "local", "args": "none"}],
- "no-empty": ["error", {"allowEmptyCatch": true}],
- "no-duplicate-imports": "error",
- "no-array-constructor": "error",
- "no-multiple-empty-lines": "error",
- "no-template-curly-in-string": "error",
- "no-console": "off",
- "object-curly-spacing": "error",
- "quotes": ["error", "single", {"avoidEscape": true}],
- "semi": ["error", "always"],
- "space-infix-ops": "error",
- "space-unary-ops": "error",
- "space-in-parens": "error",
- "space-before-blocks": "error",
- "template-curly-spacing": "error"
- }
-};
+++ /dev/null
-<!--
-Got a question?
-===============
-The issue list of this repo is exclusively for bug reports and feature requests. For questions, please use the following resources:
-
-- Read the docs: https://github.com/pagekit/vue-resource/tree/master/docs
-- Look for/ask questions on stack overflow: http://stackoverflow.com/search?q=vue-resource
-
-Thank you!
--->
-
-<!-- BUG REPORT TEMPLATE -->
-### Reproduction Link
-<!-- A minimal jsfiddle that can reproduce the bug. -->
-<!-- You could start with this template: https://jsfiddle.net/pjjr7e7m/ -->
-
-### Steps to reproduce
-<!-- Incl. which version is used on what browser and device. -->
-
-### What is Expected?
-
-### What is actually happening?
+++ /dev/null
-The MIT License (MIT)
-
-Copyright (c) 2015-2017 steffans
-
-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.
+++ /dev/null
-# vue-resource [![Build](https://img.shields.io/circleci/project/pagekit/vue-resource/develop.svg)](https://circleci.com/gh/pagekit/vue-resource) [![Downloads](https://img.shields.io/npm/dm/vue-resource.svg)](https://www.npmjs.com/package/vue-resource) [![jsdelivr](https://data.jsdelivr.com/v1/package/npm/vue-resource/badge?style=rounded)](https://www.jsdelivr.com/package/npm/vue-resource) [![Version](https://img.shields.io/npm/v/vue-resource.svg)](https://www.npmjs.com/package/vue-resource) [![License](https://img.shields.io/npm/l/vue-resource.svg)](https://www.npmjs.com/package/vue-resource)
-
-The plugin for [Vue.js](http://vuejs.org) provides services for making web requests and handle responses using a [XMLHttpRequest](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest) or JSONP.
-
-## Features
-
-- Supports the [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise) API and [URI Templates](https://medialize.github.io/URI.js/uri-template.html)
-- Supports [interceptors](docs/http.md#interceptors) for request and response
-- Supports latest Firefox, Chrome, Safari, Opera and IE9+
-- Supports Vue 1.0 & Vue 2.0
-- Compact size 14KB (5.3KB gzipped)
-
-## Installation
-You can install it via [yarn](https://yarnpkg.com/) or [NPM](http://npmjs.org/).
-```
-$ yarn add vue-resource
-$ npm install vue-resource
-```
-
-### CDN
-Available on [jsdelivr](https://cdn.jsdelivr.net/npm/vue-resource@1.5.0), [unpkg](https://unpkg.com/vue-resource@1.5.0) or [cdnjs](https://cdnjs.com/libraries/vue-resource).
-```html
-<script src="https://cdn.jsdelivr.net/npm/vue-resource@1.5.0"></script>
-```
-
-## Example
-```js
-{
- // GET /someUrl
- this.$http.get('/someUrl').then(response => {
-
- // get body data
- this.someData = response.body;
-
- }, response => {
- // error callback
- });
-}
-```
-
-## Documentation
-
-- [Configuration](docs/config.md)
-- [HTTP Requests/Response](docs/http.md)
-- [Creating Resources](docs/resource.md)
-- [Code Recipes](docs/recipes.md)
-- [API Reference](docs/api.md)
-
-## Changelog
-
-Details changes for each release are documented in the [release notes](https://github.com/pagekit/vue-resource/releases).
-
-## Contribution
-
-If you find a bug or want to contribute to the code or documentation, you can help by submitting an [issue](https://github.com/pagekit/vue-resource/issues) or a [pull request](https://github.com/pagekit/vue-resource/pulls).
-
-## License
-
-[MIT](http://opensource.org/licenses/MIT)
+++ /dev/null
-# NOTE!
-
-The `dist` folder contains the standalone build for vue-resource, however files here are only checked-in when a release happens. If you are on the `dev` branch, files here are **NOT** up to date. Only the `master` branch contains the built files for the latest stable version.
+++ /dev/null
-/*!
- * vue-resource v1.5.0
- * https://github.com/pagekit/vue-resource
- * Released under the MIT License.
- */
-
-'use strict';
-
-/**
- * Promises/A+ polyfill v1.1.4 (https://github.com/bramstein/promis)
- */
-
-var RESOLVED = 0;
-var REJECTED = 1;
-var PENDING = 2;
-
-function Promise$1(executor) {
-
- this.state = PENDING;
- this.value = undefined;
- this.deferred = [];
-
- var promise = this;
-
- try {
- executor(function (x) {
- promise.resolve(x);
- }, function (r) {
- promise.reject(r);
- });
- } catch (e) {
- promise.reject(e);
- }
-}
-
-Promise$1.reject = function (r) {
- return new Promise$1(function (resolve, reject) {
- reject(r);
- });
-};
-
-Promise$1.resolve = function (x) {
- return new Promise$1(function (resolve, reject) {
- resolve(x);
- });
-};
-
-Promise$1.all = function all(iterable) {
- return new Promise$1(function (resolve, reject) {
- var count = 0, result = [];
-
- if (iterable.length === 0) {
- resolve(result);
- }
-
- function resolver(i) {
- return function (x) {
- result[i] = x;
- count += 1;
-
- if (count === iterable.length) {
- resolve(result);
- }
- };
- }
-
- for (var i = 0; i < iterable.length; i += 1) {
- Promise$1.resolve(iterable[i]).then(resolver(i), reject);
- }
- });
-};
-
-Promise$1.race = function race(iterable) {
- return new Promise$1(function (resolve, reject) {
- for (var i = 0; i < iterable.length; i += 1) {
- Promise$1.resolve(iterable[i]).then(resolve, reject);
- }
- });
-};
-
-var p = Promise$1.prototype;
-
-p.resolve = function resolve(x) {
- var promise = this;
-
- if (promise.state === PENDING) {
- if (x === promise) {
- throw new TypeError('Promise settled with itself.');
- }
-
- var called = false;
-
- try {
- var then = x && x['then'];
-
- if (x !== null && typeof x === 'object' && typeof then === 'function') {
- then.call(x, function (x) {
- if (!called) {
- promise.resolve(x);
- }
- called = true;
-
- }, function (r) {
- if (!called) {
- promise.reject(r);
- }
- called = true;
- });
- return;
- }
- } catch (e) {
- if (!called) {
- promise.reject(e);
- }
- return;
- }
-
- promise.state = RESOLVED;
- promise.value = x;
- promise.notify();
- }
-};
-
-p.reject = function reject(reason) {
- var promise = this;
-
- if (promise.state === PENDING) {
- if (reason === promise) {
- throw new TypeError('Promise settled with itself.');
- }
-
- promise.state = REJECTED;
- promise.value = reason;
- promise.notify();
- }
-};
-
-p.notify = function notify() {
- var promise = this;
-
- nextTick(function () {
- if (promise.state !== PENDING) {
- while (promise.deferred.length) {
- var deferred = promise.deferred.shift(),
- onResolved = deferred[0],
- onRejected = deferred[1],
- resolve = deferred[2],
- reject = deferred[3];
-
- try {
- if (promise.state === RESOLVED) {
- if (typeof onResolved === 'function') {
- resolve(onResolved.call(undefined, promise.value));
- } else {
- resolve(promise.value);
- }
- } else if (promise.state === REJECTED) {
- if (typeof onRejected === 'function') {
- resolve(onRejected.call(undefined, promise.value));
- } else {
- reject(promise.value);
- }
- }
- } catch (e) {
- reject(e);
- }
- }
- }
- });
-};
-
-p.then = function then(onResolved, onRejected) {
- var promise = this;
-
- return new Promise$1(function (resolve, reject) {
- promise.deferred.push([onResolved, onRejected, resolve, reject]);
- promise.notify();
- });
-};
-
-p.catch = function (onRejected) {
- return this.then(undefined, onRejected);
-};
-
-/**
- * Promise adapter.
- */
-
-if (typeof Promise === 'undefined') {
- window.Promise = Promise$1;
-}
-
-function PromiseObj(executor, context) {
-
- if (executor instanceof Promise) {
- this.promise = executor;
- } else {
- this.promise = new Promise(executor.bind(context));
- }
-
- this.context = context;
-}
-
-PromiseObj.all = function (iterable, context) {
- return new PromiseObj(Promise.all(iterable), context);
-};
-
-PromiseObj.resolve = function (value, context) {
- return new PromiseObj(Promise.resolve(value), context);
-};
-
-PromiseObj.reject = function (reason, context) {
- return new PromiseObj(Promise.reject(reason), context);
-};
-
-PromiseObj.race = function (iterable, context) {
- return new PromiseObj(Promise.race(iterable), context);
-};
-
-var p$1 = PromiseObj.prototype;
-
-p$1.bind = function (context) {
- this.context = context;
- return this;
-};
-
-p$1.then = function (fulfilled, rejected) {
-
- if (fulfilled && fulfilled.bind && this.context) {
- fulfilled = fulfilled.bind(this.context);
- }
-
- if (rejected && rejected.bind && this.context) {
- rejected = rejected.bind(this.context);
- }
-
- return new PromiseObj(this.promise.then(fulfilled, rejected), this.context);
-};
-
-p$1.catch = function (rejected) {
-
- if (rejected && rejected.bind && this.context) {
- rejected = rejected.bind(this.context);
- }
-
- return new PromiseObj(this.promise.catch(rejected), this.context);
-};
-
-p$1.finally = function (callback) {
-
- return this.then(function (value) {
- callback.call(this);
- return value;
- }, function (reason) {
- callback.call(this);
- return Promise.reject(reason);
- }
- );
-};
-
-/**
- * Utility functions.
- */
-
-var ref = {};
-var hasOwnProperty = ref.hasOwnProperty;
-var ref$1 = [];
-var slice = ref$1.slice;
-var debug = false, ntick;
-
-var inBrowser = typeof window !== 'undefined';
-
-function Util (ref) {
- var config = ref.config;
- var nextTick = ref.nextTick;
-
- ntick = nextTick;
- debug = config.debug || !config.silent;
-}
-
-function warn(msg) {
- if (typeof console !== 'undefined' && debug) {
- console.warn('[VueResource warn]: ' + msg);
- }
-}
-
-function error(msg) {
- if (typeof console !== 'undefined') {
- console.error(msg);
- }
-}
-
-function nextTick(cb, ctx) {
- return ntick(cb, ctx);
-}
-
-function trim(str) {
- return str ? str.replace(/^\s*|\s*$/g, '') : '';
-}
-
-function trimEnd(str, chars) {
-
- if (str && chars === undefined) {
- return str.replace(/\s+$/, '');
- }
-
- if (!str || !chars) {
- return str;
- }
-
- return str.replace(new RegExp(("[" + chars + "]+$")), '');
-}
-
-function toLower(str) {
- return str ? str.toLowerCase() : '';
-}
-
-function toUpper(str) {
- return str ? str.toUpperCase() : '';
-}
-
-var isArray = Array.isArray;
-
-function isString(val) {
- return typeof val === 'string';
-}
-
-function isFunction(val) {
- return typeof val === 'function';
-}
-
-function isObject(obj) {
- return obj !== null && typeof obj === 'object';
-}
-
-function isPlainObject(obj) {
- return isObject(obj) && Object.getPrototypeOf(obj) == Object.prototype;
-}
-
-function isBlob(obj) {
- return typeof Blob !== 'undefined' && obj instanceof Blob;
-}
-
-function isFormData(obj) {
- return typeof FormData !== 'undefined' && obj instanceof FormData;
-}
-
-function when(value, fulfilled, rejected) {
-
- var promise = PromiseObj.resolve(value);
-
- if (arguments.length < 2) {
- return promise;
- }
-
- return promise.then(fulfilled, rejected);
-}
-
-function options(fn, obj, opts) {
-
- opts = opts || {};
-
- if (isFunction(opts)) {
- opts = opts.call(obj);
- }
-
- return merge(fn.bind({$vm: obj, $options: opts}), fn, {$options: opts});
-}
-
-function each(obj, iterator) {
-
- var i, key;
-
- if (isArray(obj)) {
- for (i = 0; i < obj.length; i++) {
- iterator.call(obj[i], obj[i], i);
- }
- } else if (isObject(obj)) {
- for (key in obj) {
- if (hasOwnProperty.call(obj, key)) {
- iterator.call(obj[key], obj[key], key);
- }
- }
- }
-
- return obj;
-}
-
-var assign = Object.assign || _assign;
-
-function merge(target) {
-
- var args = slice.call(arguments, 1);
-
- args.forEach(function (source) {
- _merge(target, source, true);
- });
-
- return target;
-}
-
-function defaults(target) {
-
- var args = slice.call(arguments, 1);
-
- args.forEach(function (source) {
-
- for (var key in source) {
- if (target[key] === undefined) {
- target[key] = source[key];
- }
- }
-
- });
-
- return target;
-}
-
-function _assign(target) {
-
- var args = slice.call(arguments, 1);
-
- args.forEach(function (source) {
- _merge(target, source);
- });
-
- return target;
-}
-
-function _merge(target, source, deep) {
- for (var key in source) {
- if (deep && (isPlainObject(source[key]) || isArray(source[key]))) {
- if (isPlainObject(source[key]) && !isPlainObject(target[key])) {
- target[key] = {};
- }
- if (isArray(source[key]) && !isArray(target[key])) {
- target[key] = [];
- }
- _merge(target[key], source[key], deep);
- } else if (source[key] !== undefined) {
- target[key] = source[key];
- }
- }
-}
-
-/**
- * Root Prefix Transform.
- */
-
-function root (options$$1, next) {
-
- var url = next(options$$1);
-
- if (isString(options$$1.root) && !/^(https?:)?\//.test(url)) {
- url = trimEnd(options$$1.root, '/') + '/' + url;
- }
-
- return url;
-}
-
-/**
- * Query Parameter Transform.
- */
-
-function query (options$$1, next) {
-
- var urlParams = Object.keys(Url.options.params), query = {}, url = next(options$$1);
-
- each(options$$1.params, function (value, key) {
- if (urlParams.indexOf(key) === -1) {
- query[key] = value;
- }
- });
-
- query = Url.params(query);
-
- if (query) {
- url += (url.indexOf('?') == -1 ? '?' : '&') + query;
- }
-
- return url;
-}
-
-/**
- * URL Template v2.0.6 (https://github.com/bramstein/url-template)
- */
-
-function expand(url, params, variables) {
-
- var tmpl = parse(url), expanded = tmpl.expand(params);
-
- if (variables) {
- variables.push.apply(variables, tmpl.vars);
- }
-
- return expanded;
-}
-
-function parse(template) {
-
- var operators = ['+', '#', '.', '/', ';', '?', '&'], variables = [];
-
- return {
- vars: variables,
- expand: function expand(context) {
- return template.replace(/\{([^{}]+)\}|([^{}]+)/g, function (_, expression, literal) {
- if (expression) {
-
- var operator = null, values = [];
-
- if (operators.indexOf(expression.charAt(0)) !== -1) {
- operator = expression.charAt(0);
- expression = expression.substr(1);
- }
-
- expression.split(/,/g).forEach(function (variable) {
- var tmp = /([^:*]*)(?::(\d+)|(\*))?/.exec(variable);
- values.push.apply(values, getValues(context, operator, tmp[1], tmp[2] || tmp[3]));
- variables.push(tmp[1]);
- });
-
- if (operator && operator !== '+') {
-
- var separator = ',';
-
- if (operator === '?') {
- separator = '&';
- } else if (operator !== '#') {
- separator = operator;
- }
-
- return (values.length !== 0 ? operator : '') + values.join(separator);
- } else {
- return values.join(',');
- }
-
- } else {
- return encodeReserved(literal);
- }
- });
- }
- };
-}
-
-function getValues(context, operator, key, modifier) {
-
- var value = context[key], result = [];
-
- if (isDefined(value) && value !== '') {
- if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {
- value = value.toString();
-
- if (modifier && modifier !== '*') {
- value = value.substring(0, parseInt(modifier, 10));
- }
-
- result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : null));
- } else {
- if (modifier === '*') {
- if (Array.isArray(value)) {
- value.filter(isDefined).forEach(function (value) {
- result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : null));
- });
- } else {
- Object.keys(value).forEach(function (k) {
- if (isDefined(value[k])) {
- result.push(encodeValue(operator, value[k], k));
- }
- });
- }
- } else {
- var tmp = [];
-
- if (Array.isArray(value)) {
- value.filter(isDefined).forEach(function (value) {
- tmp.push(encodeValue(operator, value));
- });
- } else {
- Object.keys(value).forEach(function (k) {
- if (isDefined(value[k])) {
- tmp.push(encodeURIComponent(k));
- tmp.push(encodeValue(operator, value[k].toString()));
- }
- });
- }
-
- if (isKeyOperator(operator)) {
- result.push(encodeURIComponent(key) + '=' + tmp.join(','));
- } else if (tmp.length !== 0) {
- result.push(tmp.join(','));
- }
- }
- }
- } else {
- if (operator === ';') {
- result.push(encodeURIComponent(key));
- } else if (value === '' && (operator === '&' || operator === '?')) {
- result.push(encodeURIComponent(key) + '=');
- } else if (value === '') {
- result.push('');
- }
- }
-
- return result;
-}
-
-function isDefined(value) {
- return value !== undefined && value !== null;
-}
-
-function isKeyOperator(operator) {
- return operator === ';' || operator === '&' || operator === '?';
-}
-
-function encodeValue(operator, value, key) {
-
- value = (operator === '+' || operator === '#') ? encodeReserved(value) : encodeURIComponent(value);
-
- if (key) {
- return encodeURIComponent(key) + '=' + value;
- } else {
- return value;
- }
-}
-
-function encodeReserved(str) {
- return str.split(/(%[0-9A-Fa-f]{2})/g).map(function (part) {
- if (!/%[0-9A-Fa-f]/.test(part)) {
- part = encodeURI(part);
- }
- return part;
- }).join('');
-}
-
-/**
- * URL Template (RFC 6570) Transform.
- */
-
-function template (options) {
-
- var variables = [], url = expand(options.url, options.params, variables);
-
- variables.forEach(function (key) {
- delete options.params[key];
- });
-
- return url;
-}
-
-/**
- * Service for URL templating.
- */
-
-function Url(url, params) {
-
- var self = this || {}, options$$1 = url, transform;
-
- if (isString(url)) {
- options$$1 = {url: url, params: params};
- }
-
- options$$1 = merge({}, Url.options, self.$options, options$$1);
-
- Url.transforms.forEach(function (handler) {
-
- if (isString(handler)) {
- handler = Url.transform[handler];
- }
-
- if (isFunction(handler)) {
- transform = factory(handler, transform, self.$vm);
- }
-
- });
-
- return transform(options$$1);
-}
-
-/**
- * Url options.
- */
-
-Url.options = {
- url: '',
- root: null,
- params: {}
-};
-
-/**
- * Url transforms.
- */
-
-Url.transform = {template: template, query: query, root: root};
-Url.transforms = ['template', 'query', 'root'];
-
-/**
- * Encodes a Url parameter string.
- *
- * @param {Object} obj
- */
-
-Url.params = function (obj) {
-
- var params = [], escape = encodeURIComponent;
-
- params.add = function (key, value) {
-
- if (isFunction(value)) {
- value = value();
- }
-
- if (value === null) {
- value = '';
- }
-
- this.push(escape(key) + '=' + escape(value));
- };
-
- serialize(params, obj);
-
- return params.join('&').replace(/%20/g, '+');
-};
-
-/**
- * Parse a URL and return its components.
- *
- * @param {String} url
- */
-
-Url.parse = function (url) {
-
- var el = document.createElement('a');
-
- if (document.documentMode) {
- el.href = url;
- url = el.href;
- }
-
- el.href = url;
-
- return {
- href: el.href,
- protocol: el.protocol ? el.protocol.replace(/:$/, '') : '',
- port: el.port,
- host: el.host,
- hostname: el.hostname,
- pathname: el.pathname.charAt(0) === '/' ? el.pathname : '/' + el.pathname,
- search: el.search ? el.search.replace(/^\?/, '') : '',
- hash: el.hash ? el.hash.replace(/^#/, '') : ''
- };
-};
-
-function factory(handler, next, vm) {
- return function (options$$1) {
- return handler.call(vm, options$$1, next);
- };
-}
-
-function serialize(params, obj, scope) {
-
- var array = isArray(obj), plain = isPlainObject(obj), hash;
-
- each(obj, function (value, key) {
-
- hash = isObject(value) || isArray(value);
-
- if (scope) {
- key = scope + '[' + (plain || hash ? key : '') + ']';
- }
-
- if (!scope && array) {
- params.add(value.name, value.value);
- } else if (hash) {
- serialize(params, value, key);
- } else {
- params.add(key, value);
- }
- });
-}
-
-/**
- * XDomain client (Internet Explorer).
- */
-
-function xdrClient (request) {
- return new PromiseObj(function (resolve) {
-
- var xdr = new XDomainRequest(), handler = function (ref) {
- var type = ref.type;
-
-
- var status = 0;
-
- if (type === 'load') {
- status = 200;
- } else if (type === 'error') {
- status = 500;
- }
-
- resolve(request.respondWith(xdr.responseText, {status: status}));
- };
-
- request.abort = function () { return xdr.abort(); };
-
- xdr.open(request.method, request.getUrl());
-
- if (request.timeout) {
- xdr.timeout = request.timeout;
- }
-
- xdr.onload = handler;
- xdr.onabort = handler;
- xdr.onerror = handler;
- xdr.ontimeout = handler;
- xdr.onprogress = function () {};
- xdr.send(request.getBody());
- });
-}
-
-/**
- * CORS Interceptor.
- */
-
-var SUPPORTS_CORS = inBrowser && 'withCredentials' in new XMLHttpRequest();
-
-function cors (request) {
-
- if (inBrowser) {
-
- var orgUrl = Url.parse(location.href);
- var reqUrl = Url.parse(request.getUrl());
-
- if (reqUrl.protocol !== orgUrl.protocol || reqUrl.host !== orgUrl.host) {
-
- request.crossOrigin = true;
- request.emulateHTTP = false;
-
- if (!SUPPORTS_CORS) {
- request.client = xdrClient;
- }
- }
- }
-
-}
-
-/**
- * Form data Interceptor.
- */
-
-function form (request) {
-
- if (isFormData(request.body)) {
- request.headers.delete('Content-Type');
- } else if (isObject(request.body) && request.emulateJSON) {
- request.body = Url.params(request.body);
- request.headers.set('Content-Type', 'application/x-www-form-urlencoded');
- }
-
-}
-
-/**
- * JSON Interceptor.
- */
-
-function json (request) {
-
- var type = request.headers.get('Content-Type') || '';
-
- if (isObject(request.body) && type.indexOf('application/json') === 0) {
- request.body = JSON.stringify(request.body);
- }
-
- return function (response) {
-
- return response.bodyText ? when(response.text(), function (text) {
-
- var type = response.headers.get('Content-Type') || '';
-
- if (type.indexOf('application/json') === 0 || isJson(text)) {
-
- try {
- response.body = JSON.parse(text);
- } catch (e) {
- response.body = null;
- }
-
- } else {
- response.body = text;
- }
-
- return response;
-
- }) : response;
-
- };
-}
-
-function isJson(str) {
-
- var start = str.match(/^\s*(\[|\{)/);
- var end = {'[': /]\s*$/, '{': /}\s*$/};
-
- return start && end[start[1]].test(str);
-}
-
-/**
- * JSONP client (Browser).
- */
-
-function jsonpClient (request) {
- return new PromiseObj(function (resolve) {
-
- var name = request.jsonp || 'callback', callback = request.jsonpCallback || '_jsonp' + Math.random().toString(36).substr(2), body = null, handler, script;
-
- handler = function (ref) {
- var type = ref.type;
-
-
- var status = 0;
-
- if (type === 'load' && body !== null) {
- status = 200;
- } else if (type === 'error') {
- status = 500;
- }
-
- if (status && window[callback]) {
- delete window[callback];
- document.body.removeChild(script);
- }
-
- resolve(request.respondWith(body, {status: status}));
- };
-
- window[callback] = function (result) {
- body = JSON.stringify(result);
- };
-
- request.abort = function () {
- handler({type: 'abort'});
- };
-
- request.params[name] = callback;
-
- if (request.timeout) {
- setTimeout(request.abort, request.timeout);
- }
-
- script = document.createElement('script');
- script.src = request.getUrl();
- script.type = 'text/javascript';
- script.async = true;
- script.onload = handler;
- script.onerror = handler;
-
- document.body.appendChild(script);
- });
-}
-
-/**
- * JSONP Interceptor.
- */
-
-function jsonp (request) {
-
- if (request.method == 'JSONP') {
- request.client = jsonpClient;
- }
-
-}
-
-/**
- * Before Interceptor.
- */
-
-function before (request) {
-
- if (isFunction(request.before)) {
- request.before.call(this, request);
- }
-
-}
-
-/**
- * HTTP method override Interceptor.
- */
-
-function method (request) {
-
- if (request.emulateHTTP && /^(PUT|PATCH|DELETE)$/i.test(request.method)) {
- request.headers.set('X-HTTP-Method-Override', request.method);
- request.method = 'POST';
- }
-
-}
-
-/**
- * Header Interceptor.
- */
-
-function header (request) {
-
- var headers = assign({}, Http.headers.common,
- !request.crossOrigin ? Http.headers.custom : {},
- Http.headers[toLower(request.method)]
- );
-
- each(headers, function (value, name) {
- if (!request.headers.has(name)) {
- request.headers.set(name, value);
- }
- });
-
-}
-
-/**
- * XMLHttp client (Browser).
- */
-
-function xhrClient (request) {
- return new PromiseObj(function (resolve) {
-
- var xhr = new XMLHttpRequest(), handler = function (event) {
-
- var response = request.respondWith(
- 'response' in xhr ? xhr.response : xhr.responseText, {
- status: xhr.status === 1223 ? 204 : xhr.status, // IE9 status bug
- statusText: xhr.status === 1223 ? 'No Content' : trim(xhr.statusText)
- });
-
- each(trim(xhr.getAllResponseHeaders()).split('\n'), function (row) {
- response.headers.append(row.slice(0, row.indexOf(':')), row.slice(row.indexOf(':') + 1));
- });
-
- resolve(response);
- };
-
- request.abort = function () { return xhr.abort(); };
-
- xhr.open(request.method, request.getUrl(), true);
-
- if (request.timeout) {
- xhr.timeout = request.timeout;
- }
-
- if (request.responseType && 'responseType' in xhr) {
- xhr.responseType = request.responseType;
- }
-
- if (request.withCredentials || request.credentials) {
- xhr.withCredentials = true;
- }
-
- if (!request.crossOrigin) {
- request.headers.set('X-Requested-With', 'XMLHttpRequest');
- }
-
- // deprecated use downloadProgress
- if (isFunction(request.progress) && request.method === 'GET') {
- xhr.addEventListener('progress', request.progress);
- }
-
- if (isFunction(request.downloadProgress)) {
- xhr.addEventListener('progress', request.downloadProgress);
- }
-
- // deprecated use uploadProgress
- if (isFunction(request.progress) && /^(POST|PUT)$/i.test(request.method)) {
- xhr.upload.addEventListener('progress', request.progress);
- }
-
- if (isFunction(request.uploadProgress) && xhr.upload) {
- xhr.upload.addEventListener('progress', request.uploadProgress);
- }
-
- request.headers.forEach(function (value, name) {
- xhr.setRequestHeader(name, value);
- });
-
- xhr.onload = handler;
- xhr.onabort = handler;
- xhr.onerror = handler;
- xhr.ontimeout = handler;
- xhr.send(request.getBody());
- });
-}
-
-/**
- * Http client (Node).
- */
-
-function nodeClient (request) {
-
- var client = require('got');
-
- return new PromiseObj(function (resolve) {
-
- var url = request.getUrl();
- var body = request.getBody();
- var method = request.method;
- var headers = {}, handler;
-
- request.headers.forEach(function (value, name) {
- headers[name] = value;
- });
-
- client(url, {body: body, method: method, headers: headers}).then(handler = function (resp) {
-
- var response = request.respondWith(resp.body, {
- status: resp.statusCode,
- statusText: trim(resp.statusMessage)
- });
-
- each(resp.headers, function (value, name) {
- response.headers.set(name, value);
- });
-
- resolve(response);
-
- }, function (error$$1) { return handler(error$$1.response); });
- });
-}
-
-/**
- * Base client.
- */
-
-function Client (context) {
-
- var reqHandlers = [sendRequest], resHandlers = [];
-
- if (!isObject(context)) {
- context = null;
- }
-
- function Client(request) {
- while (reqHandlers.length) {
-
- var handler = reqHandlers.pop();
-
- if (isFunction(handler)) {
-
- var response = (void 0), next = (void 0);
-
- response = handler.call(context, request, function (val) { return next = val; }) || next;
-
- if (isObject(response)) {
- return new PromiseObj(function (resolve, reject) {
-
- resHandlers.forEach(function (handler) {
- response = when(response, function (response) {
- return handler.call(context, response) || response;
- }, reject);
- });
-
- when(response, resolve, reject);
-
- }, context);
- }
-
- if (isFunction(response)) {
- resHandlers.unshift(response);
- }
-
- } else {
- warn(("Invalid interceptor of type " + (typeof handler) + ", must be a function"));
- }
- }
- }
-
- Client.use = function (handler) {
- reqHandlers.push(handler);
- };
-
- return Client;
-}
-
-function sendRequest(request) {
-
- var client = request.client || (inBrowser ? xhrClient : nodeClient);
-
- return client(request);
-}
-
-/**
- * HTTP Headers.
- */
-
-var Headers = function Headers(headers) {
- var this$1 = this;
-
-
- this.map = {};
-
- each(headers, function (value, name) { return this$1.append(name, value); });
-};
-
-Headers.prototype.has = function has (name) {
- return getName(this.map, name) !== null;
-};
-
-Headers.prototype.get = function get (name) {
-
- var list = this.map[getName(this.map, name)];
-
- return list ? list.join() : null;
-};
-
-Headers.prototype.getAll = function getAll (name) {
- return this.map[getName(this.map, name)] || [];
-};
-
-Headers.prototype.set = function set (name, value) {
- this.map[normalizeName(getName(this.map, name) || name)] = [trim(value)];
-};
-
-Headers.prototype.append = function append (name, value) {
-
- var list = this.map[getName(this.map, name)];
-
- if (list) {
- list.push(trim(value));
- } else {
- this.set(name, value);
- }
-};
-
-Headers.prototype.delete = function delete$1 (name) {
- delete this.map[getName(this.map, name)];
-};
-
-Headers.prototype.deleteAll = function deleteAll () {
- this.map = {};
-};
-
-Headers.prototype.forEach = function forEach (callback, thisArg) {
- var this$1 = this;
-
- each(this.map, function (list, name) {
- each(list, function (value) { return callback.call(thisArg, value, name, this$1); });
- });
-};
-
-function getName(map, name) {
- return Object.keys(map).reduce(function (prev, curr) {
- return toLower(name) === toLower(curr) ? curr : prev;
- }, null);
-}
-
-function normalizeName(name) {
-
- if (/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(name)) {
- throw new TypeError('Invalid character in header field name');
- }
-
- return trim(name);
-}
-
-/**
- * HTTP Response.
- */
-
-var Response = function Response(body, ref) {
- var url = ref.url;
- var headers = ref.headers;
- var status = ref.status;
- var statusText = ref.statusText;
-
-
- this.url = url;
- this.ok = status >= 200 && status < 300;
- this.status = status || 0;
- this.statusText = statusText || '';
- this.headers = new Headers(headers);
- this.body = body;
-
- if (isString(body)) {
-
- this.bodyText = body;
-
- } else if (isBlob(body)) {
-
- this.bodyBlob = body;
-
- if (isBlobText(body)) {
- this.bodyText = blobText(body);
- }
- }
-};
-
-Response.prototype.blob = function blob () {
- return when(this.bodyBlob);
-};
-
-Response.prototype.text = function text () {
- return when(this.bodyText);
-};
-
-Response.prototype.json = function json () {
- return when(this.text(), function (text) { return JSON.parse(text); });
-};
-
-Object.defineProperty(Response.prototype, 'data', {
-
- get: function get() {
- return this.body;
- },
-
- set: function set(body) {
- this.body = body;
- }
-
-});
-
-function blobText(body) {
- return new PromiseObj(function (resolve) {
-
- var reader = new FileReader();
-
- reader.readAsText(body);
- reader.onload = function () {
- resolve(reader.result);
- };
-
- });
-}
-
-function isBlobText(body) {
- return body.type.indexOf('text') === 0 || body.type.indexOf('json') !== -1;
-}
-
-/**
- * HTTP Request.
- */
-
-var Request = function Request(options$$1) {
-
- this.body = null;
- this.params = {};
-
- assign(this, options$$1, {
- method: toUpper(options$$1.method || 'GET')
- });
-
- if (!(this.headers instanceof Headers)) {
- this.headers = new Headers(this.headers);
- }
-};
-
-Request.prototype.getUrl = function getUrl () {
- return Url(this);
-};
-
-Request.prototype.getBody = function getBody () {
- return this.body;
-};
-
-Request.prototype.respondWith = function respondWith (body, options$$1) {
- return new Response(body, assign(options$$1 || {}, {url: this.getUrl()}));
-};
-
-/**
- * Service for sending network requests.
- */
-
-var COMMON_HEADERS = {'Accept': 'application/json, text/plain, */*'};
-var JSON_CONTENT_TYPE = {'Content-Type': 'application/json;charset=utf-8'};
-
-function Http(options$$1) {
-
- var self = this || {}, client = Client(self.$vm);
-
- defaults(options$$1 || {}, self.$options, Http.options);
-
- Http.interceptors.forEach(function (handler) {
-
- if (isString(handler)) {
- handler = Http.interceptor[handler];
- }
-
- if (isFunction(handler)) {
- client.use(handler);
- }
-
- });
-
- return client(new Request(options$$1)).then(function (response) {
-
- return response.ok ? response : PromiseObj.reject(response);
-
- }, function (response) {
-
- if (response instanceof Error) {
- error(response);
- }
-
- return PromiseObj.reject(response);
- });
-}
-
-Http.options = {};
-
-Http.headers = {
- put: JSON_CONTENT_TYPE,
- post: JSON_CONTENT_TYPE,
- patch: JSON_CONTENT_TYPE,
- delete: JSON_CONTENT_TYPE,
- common: COMMON_HEADERS,
- custom: {}
-};
-
-Http.interceptor = {before: before, method: method, jsonp: jsonp, json: json, form: form, header: header, cors: cors};
-Http.interceptors = ['before', 'method', 'jsonp', 'json', 'form', 'header', 'cors'];
-
-['get', 'delete', 'head', 'jsonp'].forEach(function (method$$1) {
-
- Http[method$$1] = function (url, options$$1) {
- return this(assign(options$$1 || {}, {url: url, method: method$$1}));
- };
-
-});
-
-['post', 'put', 'patch'].forEach(function (method$$1) {
-
- Http[method$$1] = function (url, body, options$$1) {
- return this(assign(options$$1 || {}, {url: url, method: method$$1, body: body}));
- };
-
-});
-
-/**
- * Service for interacting with RESTful services.
- */
-
-function Resource(url, params, actions, options$$1) {
-
- var self = this || {}, resource = {};
-
- actions = assign({},
- Resource.actions,
- actions
- );
-
- each(actions, function (action, name) {
-
- action = merge({url: url, params: assign({}, params)}, options$$1, action);
-
- resource[name] = function () {
- return (self.$http || Http)(opts(action, arguments));
- };
- });
-
- return resource;
-}
-
-function opts(action, args) {
-
- var options$$1 = assign({}, action), params = {}, body;
-
- switch (args.length) {
-
- case 2:
-
- params = args[0];
- body = args[1];
-
- break;
-
- case 1:
-
- if (/^(POST|PUT|PATCH)$/i.test(options$$1.method)) {
- body = args[0];
- } else {
- params = args[0];
- }
-
- break;
-
- case 0:
-
- break;
-
- default:
-
- throw 'Expected up to 2 arguments [params, body], got ' + args.length + ' arguments';
- }
-
- options$$1.body = body;
- options$$1.params = assign({}, options$$1.params, params);
-
- return options$$1;
-}
-
-Resource.actions = {
-
- get: {method: 'GET'},
- save: {method: 'POST'},
- query: {method: 'GET'},
- update: {method: 'PUT'},
- remove: {method: 'DELETE'},
- delete: {method: 'DELETE'}
-
-};
-
-/**
- * Install plugin.
- */
-
-function plugin(Vue) {
-
- if (plugin.installed) {
- return;
- }
-
- Util(Vue);
-
- Vue.url = Url;
- Vue.http = Http;
- Vue.resource = Resource;
- Vue.Promise = PromiseObj;
-
- Object.defineProperties(Vue.prototype, {
-
- $url: {
- get: function get() {
- return options(Vue.url, this, this.$options.url);
- }
- },
-
- $http: {
- get: function get() {
- return options(Vue.http, this, this.$options.http);
- }
- },
-
- $resource: {
- get: function get() {
- return Vue.resource.bind(this);
- }
- },
-
- $promise: {
- get: function get() {
- var this$1 = this;
-
- return function (executor) { return new Vue.Promise(executor, this$1); };
- }
- }
-
- });
-}
-
-if (typeof window !== 'undefined' && window.Vue) {
- window.Vue.use(plugin);
-}
-
-module.exports = plugin;
+++ /dev/null
-/*!
- * vue-resource v1.5.0
- * https://github.com/pagekit/vue-resource
- * Released under the MIT License.
- */
-
-/**
- * Promises/A+ polyfill v1.1.4 (https://github.com/bramstein/promis)
- */
-
-var RESOLVED = 0;
-var REJECTED = 1;
-var PENDING = 2;
-
-function Promise$1(executor) {
-
- this.state = PENDING;
- this.value = undefined;
- this.deferred = [];
-
- var promise = this;
-
- try {
- executor(function (x) {
- promise.resolve(x);
- }, function (r) {
- promise.reject(r);
- });
- } catch (e) {
- promise.reject(e);
- }
-}
-
-Promise$1.reject = function (r) {
- return new Promise$1(function (resolve, reject) {
- reject(r);
- });
-};
-
-Promise$1.resolve = function (x) {
- return new Promise$1(function (resolve, reject) {
- resolve(x);
- });
-};
-
-Promise$1.all = function all(iterable) {
- return new Promise$1(function (resolve, reject) {
- var count = 0, result = [];
-
- if (iterable.length === 0) {
- resolve(result);
- }
-
- function resolver(i) {
- return function (x) {
- result[i] = x;
- count += 1;
-
- if (count === iterable.length) {
- resolve(result);
- }
- };
- }
-
- for (var i = 0; i < iterable.length; i += 1) {
- Promise$1.resolve(iterable[i]).then(resolver(i), reject);
- }
- });
-};
-
-Promise$1.race = function race(iterable) {
- return new Promise$1(function (resolve, reject) {
- for (var i = 0; i < iterable.length; i += 1) {
- Promise$1.resolve(iterable[i]).then(resolve, reject);
- }
- });
-};
-
-var p = Promise$1.prototype;
-
-p.resolve = function resolve(x) {
- var promise = this;
-
- if (promise.state === PENDING) {
- if (x === promise) {
- throw new TypeError('Promise settled with itself.');
- }
-
- var called = false;
-
- try {
- var then = x && x['then'];
-
- if (x !== null && typeof x === 'object' && typeof then === 'function') {
- then.call(x, function (x) {
- if (!called) {
- promise.resolve(x);
- }
- called = true;
-
- }, function (r) {
- if (!called) {
- promise.reject(r);
- }
- called = true;
- });
- return;
- }
- } catch (e) {
- if (!called) {
- promise.reject(e);
- }
- return;
- }
-
- promise.state = RESOLVED;
- promise.value = x;
- promise.notify();
- }
-};
-
-p.reject = function reject(reason) {
- var promise = this;
-
- if (promise.state === PENDING) {
- if (reason === promise) {
- throw new TypeError('Promise settled with itself.');
- }
-
- promise.state = REJECTED;
- promise.value = reason;
- promise.notify();
- }
-};
-
-p.notify = function notify() {
- var promise = this;
-
- nextTick(function () {
- if (promise.state !== PENDING) {
- while (promise.deferred.length) {
- var deferred = promise.deferred.shift(),
- onResolved = deferred[0],
- onRejected = deferred[1],
- resolve = deferred[2],
- reject = deferred[3];
-
- try {
- if (promise.state === RESOLVED) {
- if (typeof onResolved === 'function') {
- resolve(onResolved.call(undefined, promise.value));
- } else {
- resolve(promise.value);
- }
- } else if (promise.state === REJECTED) {
- if (typeof onRejected === 'function') {
- resolve(onRejected.call(undefined, promise.value));
- } else {
- reject(promise.value);
- }
- }
- } catch (e) {
- reject(e);
- }
- }
- }
- });
-};
-
-p.then = function then(onResolved, onRejected) {
- var promise = this;
-
- return new Promise$1(function (resolve, reject) {
- promise.deferred.push([onResolved, onRejected, resolve, reject]);
- promise.notify();
- });
-};
-
-p.catch = function (onRejected) {
- return this.then(undefined, onRejected);
-};
-
-/**
- * Promise adapter.
- */
-
-if (typeof Promise === 'undefined') {
- window.Promise = Promise$1;
-}
-
-function PromiseObj(executor, context) {
-
- if (executor instanceof Promise) {
- this.promise = executor;
- } else {
- this.promise = new Promise(executor.bind(context));
- }
-
- this.context = context;
-}
-
-PromiseObj.all = function (iterable, context) {
- return new PromiseObj(Promise.all(iterable), context);
-};
-
-PromiseObj.resolve = function (value, context) {
- return new PromiseObj(Promise.resolve(value), context);
-};
-
-PromiseObj.reject = function (reason, context) {
- return new PromiseObj(Promise.reject(reason), context);
-};
-
-PromiseObj.race = function (iterable, context) {
- return new PromiseObj(Promise.race(iterable), context);
-};
-
-var p$1 = PromiseObj.prototype;
-
-p$1.bind = function (context) {
- this.context = context;
- return this;
-};
-
-p$1.then = function (fulfilled, rejected) {
-
- if (fulfilled && fulfilled.bind && this.context) {
- fulfilled = fulfilled.bind(this.context);
- }
-
- if (rejected && rejected.bind && this.context) {
- rejected = rejected.bind(this.context);
- }
-
- return new PromiseObj(this.promise.then(fulfilled, rejected), this.context);
-};
-
-p$1.catch = function (rejected) {
-
- if (rejected && rejected.bind && this.context) {
- rejected = rejected.bind(this.context);
- }
-
- return new PromiseObj(this.promise.catch(rejected), this.context);
-};
-
-p$1.finally = function (callback) {
-
- return this.then(function (value) {
- callback.call(this);
- return value;
- }, function (reason) {
- callback.call(this);
- return Promise.reject(reason);
- }
- );
-};
-
-/**
- * Utility functions.
- */
-
-var ref = {};
-var hasOwnProperty = ref.hasOwnProperty;
-var ref$1 = [];
-var slice = ref$1.slice;
-var debug = false, ntick;
-
-var inBrowser = typeof window !== 'undefined';
-
-function Util (ref) {
- var config = ref.config;
- var nextTick = ref.nextTick;
-
- ntick = nextTick;
- debug = config.debug || !config.silent;
-}
-
-function warn(msg) {
- if (typeof console !== 'undefined' && debug) {
- console.warn('[VueResource warn]: ' + msg);
- }
-}
-
-function error(msg) {
- if (typeof console !== 'undefined') {
- console.error(msg);
- }
-}
-
-function nextTick(cb, ctx) {
- return ntick(cb, ctx);
-}
-
-function trim(str) {
- return str ? str.replace(/^\s*|\s*$/g, '') : '';
-}
-
-function trimEnd(str, chars) {
-
- if (str && chars === undefined) {
- return str.replace(/\s+$/, '');
- }
-
- if (!str || !chars) {
- return str;
- }
-
- return str.replace(new RegExp(("[" + chars + "]+$")), '');
-}
-
-function toLower(str) {
- return str ? str.toLowerCase() : '';
-}
-
-function toUpper(str) {
- return str ? str.toUpperCase() : '';
-}
-
-var isArray = Array.isArray;
-
-function isString(val) {
- return typeof val === 'string';
-}
-
-function isFunction(val) {
- return typeof val === 'function';
-}
-
-function isObject(obj) {
- return obj !== null && typeof obj === 'object';
-}
-
-function isPlainObject(obj) {
- return isObject(obj) && Object.getPrototypeOf(obj) == Object.prototype;
-}
-
-function isBlob(obj) {
- return typeof Blob !== 'undefined' && obj instanceof Blob;
-}
-
-function isFormData(obj) {
- return typeof FormData !== 'undefined' && obj instanceof FormData;
-}
-
-function when(value, fulfilled, rejected) {
-
- var promise = PromiseObj.resolve(value);
-
- if (arguments.length < 2) {
- return promise;
- }
-
- return promise.then(fulfilled, rejected);
-}
-
-function options(fn, obj, opts) {
-
- opts = opts || {};
-
- if (isFunction(opts)) {
- opts = opts.call(obj);
- }
-
- return merge(fn.bind({$vm: obj, $options: opts}), fn, {$options: opts});
-}
-
-function each(obj, iterator) {
-
- var i, key;
-
- if (isArray(obj)) {
- for (i = 0; i < obj.length; i++) {
- iterator.call(obj[i], obj[i], i);
- }
- } else if (isObject(obj)) {
- for (key in obj) {
- if (hasOwnProperty.call(obj, key)) {
- iterator.call(obj[key], obj[key], key);
- }
- }
- }
-
- return obj;
-}
-
-var assign = Object.assign || _assign;
-
-function merge(target) {
-
- var args = slice.call(arguments, 1);
-
- args.forEach(function (source) {
- _merge(target, source, true);
- });
-
- return target;
-}
-
-function defaults(target) {
-
- var args = slice.call(arguments, 1);
-
- args.forEach(function (source) {
-
- for (var key in source) {
- if (target[key] === undefined) {
- target[key] = source[key];
- }
- }
-
- });
-
- return target;
-}
-
-function _assign(target) {
-
- var args = slice.call(arguments, 1);
-
- args.forEach(function (source) {
- _merge(target, source);
- });
-
- return target;
-}
-
-function _merge(target, source, deep) {
- for (var key in source) {
- if (deep && (isPlainObject(source[key]) || isArray(source[key]))) {
- if (isPlainObject(source[key]) && !isPlainObject(target[key])) {
- target[key] = {};
- }
- if (isArray(source[key]) && !isArray(target[key])) {
- target[key] = [];
- }
- _merge(target[key], source[key], deep);
- } else if (source[key] !== undefined) {
- target[key] = source[key];
- }
- }
-}
-
-/**
- * Root Prefix Transform.
- */
-
-function root (options$$1, next) {
-
- var url = next(options$$1);
-
- if (isString(options$$1.root) && !/^(https?:)?\//.test(url)) {
- url = trimEnd(options$$1.root, '/') + '/' + url;
- }
-
- return url;
-}
-
-/**
- * Query Parameter Transform.
- */
-
-function query (options$$1, next) {
-
- var urlParams = Object.keys(Url.options.params), query = {}, url = next(options$$1);
-
- each(options$$1.params, function (value, key) {
- if (urlParams.indexOf(key) === -1) {
- query[key] = value;
- }
- });
-
- query = Url.params(query);
-
- if (query) {
- url += (url.indexOf('?') == -1 ? '?' : '&') + query;
- }
-
- return url;
-}
-
-/**
- * URL Template v2.0.6 (https://github.com/bramstein/url-template)
- */
-
-function expand(url, params, variables) {
-
- var tmpl = parse(url), expanded = tmpl.expand(params);
-
- if (variables) {
- variables.push.apply(variables, tmpl.vars);
- }
-
- return expanded;
-}
-
-function parse(template) {
-
- var operators = ['+', '#', '.', '/', ';', '?', '&'], variables = [];
-
- return {
- vars: variables,
- expand: function expand(context) {
- return template.replace(/\{([^{}]+)\}|([^{}]+)/g, function (_, expression, literal) {
- if (expression) {
-
- var operator = null, values = [];
-
- if (operators.indexOf(expression.charAt(0)) !== -1) {
- operator = expression.charAt(0);
- expression = expression.substr(1);
- }
-
- expression.split(/,/g).forEach(function (variable) {
- var tmp = /([^:*]*)(?::(\d+)|(\*))?/.exec(variable);
- values.push.apply(values, getValues(context, operator, tmp[1], tmp[2] || tmp[3]));
- variables.push(tmp[1]);
- });
-
- if (operator && operator !== '+') {
-
- var separator = ',';
-
- if (operator === '?') {
- separator = '&';
- } else if (operator !== '#') {
- separator = operator;
- }
-
- return (values.length !== 0 ? operator : '') + values.join(separator);
- } else {
- return values.join(',');
- }
-
- } else {
- return encodeReserved(literal);
- }
- });
- }
- };
-}
-
-function getValues(context, operator, key, modifier) {
-
- var value = context[key], result = [];
-
- if (isDefined(value) && value !== '') {
- if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {
- value = value.toString();
-
- if (modifier && modifier !== '*') {
- value = value.substring(0, parseInt(modifier, 10));
- }
-
- result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : null));
- } else {
- if (modifier === '*') {
- if (Array.isArray(value)) {
- value.filter(isDefined).forEach(function (value) {
- result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : null));
- });
- } else {
- Object.keys(value).forEach(function (k) {
- if (isDefined(value[k])) {
- result.push(encodeValue(operator, value[k], k));
- }
- });
- }
- } else {
- var tmp = [];
-
- if (Array.isArray(value)) {
- value.filter(isDefined).forEach(function (value) {
- tmp.push(encodeValue(operator, value));
- });
- } else {
- Object.keys(value).forEach(function (k) {
- if (isDefined(value[k])) {
- tmp.push(encodeURIComponent(k));
- tmp.push(encodeValue(operator, value[k].toString()));
- }
- });
- }
-
- if (isKeyOperator(operator)) {
- result.push(encodeURIComponent(key) + '=' + tmp.join(','));
- } else if (tmp.length !== 0) {
- result.push(tmp.join(','));
- }
- }
- }
- } else {
- if (operator === ';') {
- result.push(encodeURIComponent(key));
- } else if (value === '' && (operator === '&' || operator === '?')) {
- result.push(encodeURIComponent(key) + '=');
- } else if (value === '') {
- result.push('');
- }
- }
-
- return result;
-}
-
-function isDefined(value) {
- return value !== undefined && value !== null;
-}
-
-function isKeyOperator(operator) {
- return operator === ';' || operator === '&' || operator === '?';
-}
-
-function encodeValue(operator, value, key) {
-
- value = (operator === '+' || operator === '#') ? encodeReserved(value) : encodeURIComponent(value);
-
- if (key) {
- return encodeURIComponent(key) + '=' + value;
- } else {
- return value;
- }
-}
-
-function encodeReserved(str) {
- return str.split(/(%[0-9A-Fa-f]{2})/g).map(function (part) {
- if (!/%[0-9A-Fa-f]/.test(part)) {
- part = encodeURI(part);
- }
- return part;
- }).join('');
-}
-
-/**
- * URL Template (RFC 6570) Transform.
- */
-
-function template (options) {
-
- var variables = [], url = expand(options.url, options.params, variables);
-
- variables.forEach(function (key) {
- delete options.params[key];
- });
-
- return url;
-}
-
-/**
- * Service for URL templating.
- */
-
-function Url(url, params) {
-
- var self = this || {}, options$$1 = url, transform;
-
- if (isString(url)) {
- options$$1 = {url: url, params: params};
- }
-
- options$$1 = merge({}, Url.options, self.$options, options$$1);
-
- Url.transforms.forEach(function (handler) {
-
- if (isString(handler)) {
- handler = Url.transform[handler];
- }
-
- if (isFunction(handler)) {
- transform = factory(handler, transform, self.$vm);
- }
-
- });
-
- return transform(options$$1);
-}
-
-/**
- * Url options.
- */
-
-Url.options = {
- url: '',
- root: null,
- params: {}
-};
-
-/**
- * Url transforms.
- */
-
-Url.transform = {template: template, query: query, root: root};
-Url.transforms = ['template', 'query', 'root'];
-
-/**
- * Encodes a Url parameter string.
- *
- * @param {Object} obj
- */
-
-Url.params = function (obj) {
-
- var params = [], escape = encodeURIComponent;
-
- params.add = function (key, value) {
-
- if (isFunction(value)) {
- value = value();
- }
-
- if (value === null) {
- value = '';
- }
-
- this.push(escape(key) + '=' + escape(value));
- };
-
- serialize(params, obj);
-
- return params.join('&').replace(/%20/g, '+');
-};
-
-/**
- * Parse a URL and return its components.
- *
- * @param {String} url
- */
-
-Url.parse = function (url) {
-
- var el = document.createElement('a');
-
- if (document.documentMode) {
- el.href = url;
- url = el.href;
- }
-
- el.href = url;
-
- return {
- href: el.href,
- protocol: el.protocol ? el.protocol.replace(/:$/, '') : '',
- port: el.port,
- host: el.host,
- hostname: el.hostname,
- pathname: el.pathname.charAt(0) === '/' ? el.pathname : '/' + el.pathname,
- search: el.search ? el.search.replace(/^\?/, '') : '',
- hash: el.hash ? el.hash.replace(/^#/, '') : ''
- };
-};
-
-function factory(handler, next, vm) {
- return function (options$$1) {
- return handler.call(vm, options$$1, next);
- };
-}
-
-function serialize(params, obj, scope) {
-
- var array = isArray(obj), plain = isPlainObject(obj), hash;
-
- each(obj, function (value, key) {
-
- hash = isObject(value) || isArray(value);
-
- if (scope) {
- key = scope + '[' + (plain || hash ? key : '') + ']';
- }
-
- if (!scope && array) {
- params.add(value.name, value.value);
- } else if (hash) {
- serialize(params, value, key);
- } else {
- params.add(key, value);
- }
- });
-}
-
-/**
- * XDomain client (Internet Explorer).
- */
-
-function xdrClient (request) {
- return new PromiseObj(function (resolve) {
-
- var xdr = new XDomainRequest(), handler = function (ref) {
- var type = ref.type;
-
-
- var status = 0;
-
- if (type === 'load') {
- status = 200;
- } else if (type === 'error') {
- status = 500;
- }
-
- resolve(request.respondWith(xdr.responseText, {status: status}));
- };
-
- request.abort = function () { return xdr.abort(); };
-
- xdr.open(request.method, request.getUrl());
-
- if (request.timeout) {
- xdr.timeout = request.timeout;
- }
-
- xdr.onload = handler;
- xdr.onabort = handler;
- xdr.onerror = handler;
- xdr.ontimeout = handler;
- xdr.onprogress = function () {};
- xdr.send(request.getBody());
- });
-}
-
-/**
- * CORS Interceptor.
- */
-
-var SUPPORTS_CORS = inBrowser && 'withCredentials' in new XMLHttpRequest();
-
-function cors (request) {
-
- if (inBrowser) {
-
- var orgUrl = Url.parse(location.href);
- var reqUrl = Url.parse(request.getUrl());
-
- if (reqUrl.protocol !== orgUrl.protocol || reqUrl.host !== orgUrl.host) {
-
- request.crossOrigin = true;
- request.emulateHTTP = false;
-
- if (!SUPPORTS_CORS) {
- request.client = xdrClient;
- }
- }
- }
-
-}
-
-/**
- * Form data Interceptor.
- */
-
-function form (request) {
-
- if (isFormData(request.body)) {
- request.headers.delete('Content-Type');
- } else if (isObject(request.body) && request.emulateJSON) {
- request.body = Url.params(request.body);
- request.headers.set('Content-Type', 'application/x-www-form-urlencoded');
- }
-
-}
-
-/**
- * JSON Interceptor.
- */
-
-function json (request) {
-
- var type = request.headers.get('Content-Type') || '';
-
- if (isObject(request.body) && type.indexOf('application/json') === 0) {
- request.body = JSON.stringify(request.body);
- }
-
- return function (response) {
-
- return response.bodyText ? when(response.text(), function (text) {
-
- var type = response.headers.get('Content-Type') || '';
-
- if (type.indexOf('application/json') === 0 || isJson(text)) {
-
- try {
- response.body = JSON.parse(text);
- } catch (e) {
- response.body = null;
- }
-
- } else {
- response.body = text;
- }
-
- return response;
-
- }) : response;
-
- };
-}
-
-function isJson(str) {
-
- var start = str.match(/^\s*(\[|\{)/);
- var end = {'[': /]\s*$/, '{': /}\s*$/};
-
- return start && end[start[1]].test(str);
-}
-
-/**
- * JSONP client (Browser).
- */
-
-function jsonpClient (request) {
- return new PromiseObj(function (resolve) {
-
- var name = request.jsonp || 'callback', callback = request.jsonpCallback || '_jsonp' + Math.random().toString(36).substr(2), body = null, handler, script;
-
- handler = function (ref) {
- var type = ref.type;
-
-
- var status = 0;
-
- if (type === 'load' && body !== null) {
- status = 200;
- } else if (type === 'error') {
- status = 500;
- }
-
- if (status && window[callback]) {
- delete window[callback];
- document.body.removeChild(script);
- }
-
- resolve(request.respondWith(body, {status: status}));
- };
-
- window[callback] = function (result) {
- body = JSON.stringify(result);
- };
-
- request.abort = function () {
- handler({type: 'abort'});
- };
-
- request.params[name] = callback;
-
- if (request.timeout) {
- setTimeout(request.abort, request.timeout);
- }
-
- script = document.createElement('script');
- script.src = request.getUrl();
- script.type = 'text/javascript';
- script.async = true;
- script.onload = handler;
- script.onerror = handler;
-
- document.body.appendChild(script);
- });
-}
-
-/**
- * JSONP Interceptor.
- */
-
-function jsonp (request) {
-
- if (request.method == 'JSONP') {
- request.client = jsonpClient;
- }
-
-}
-
-/**
- * Before Interceptor.
- */
-
-function before (request) {
-
- if (isFunction(request.before)) {
- request.before.call(this, request);
- }
-
-}
-
-/**
- * HTTP method override Interceptor.
- */
-
-function method (request) {
-
- if (request.emulateHTTP && /^(PUT|PATCH|DELETE)$/i.test(request.method)) {
- request.headers.set('X-HTTP-Method-Override', request.method);
- request.method = 'POST';
- }
-
-}
-
-/**
- * Header Interceptor.
- */
-
-function header (request) {
-
- var headers = assign({}, Http.headers.common,
- !request.crossOrigin ? Http.headers.custom : {},
- Http.headers[toLower(request.method)]
- );
-
- each(headers, function (value, name) {
- if (!request.headers.has(name)) {
- request.headers.set(name, value);
- }
- });
-
-}
-
-/**
- * XMLHttp client (Browser).
- */
-
-function xhrClient (request) {
- return new PromiseObj(function (resolve) {
-
- var xhr = new XMLHttpRequest(), handler = function (event) {
-
- var response = request.respondWith(
- 'response' in xhr ? xhr.response : xhr.responseText, {
- status: xhr.status === 1223 ? 204 : xhr.status, // IE9 status bug
- statusText: xhr.status === 1223 ? 'No Content' : trim(xhr.statusText)
- });
-
- each(trim(xhr.getAllResponseHeaders()).split('\n'), function (row) {
- response.headers.append(row.slice(0, row.indexOf(':')), row.slice(row.indexOf(':') + 1));
- });
-
- resolve(response);
- };
-
- request.abort = function () { return xhr.abort(); };
-
- xhr.open(request.method, request.getUrl(), true);
-
- if (request.timeout) {
- xhr.timeout = request.timeout;
- }
-
- if (request.responseType && 'responseType' in xhr) {
- xhr.responseType = request.responseType;
- }
-
- if (request.withCredentials || request.credentials) {
- xhr.withCredentials = true;
- }
-
- if (!request.crossOrigin) {
- request.headers.set('X-Requested-With', 'XMLHttpRequest');
- }
-
- // deprecated use downloadProgress
- if (isFunction(request.progress) && request.method === 'GET') {
- xhr.addEventListener('progress', request.progress);
- }
-
- if (isFunction(request.downloadProgress)) {
- xhr.addEventListener('progress', request.downloadProgress);
- }
-
- // deprecated use uploadProgress
- if (isFunction(request.progress) && /^(POST|PUT)$/i.test(request.method)) {
- xhr.upload.addEventListener('progress', request.progress);
- }
-
- if (isFunction(request.uploadProgress) && xhr.upload) {
- xhr.upload.addEventListener('progress', request.uploadProgress);
- }
-
- request.headers.forEach(function (value, name) {
- xhr.setRequestHeader(name, value);
- });
-
- xhr.onload = handler;
- xhr.onabort = handler;
- xhr.onerror = handler;
- xhr.ontimeout = handler;
- xhr.send(request.getBody());
- });
-}
-
-/**
- * Http client (Node).
- */
-
-function nodeClient (request) {
-
- var client = require('got');
-
- return new PromiseObj(function (resolve) {
-
- var url = request.getUrl();
- var body = request.getBody();
- var method = request.method;
- var headers = {}, handler;
-
- request.headers.forEach(function (value, name) {
- headers[name] = value;
- });
-
- client(url, {body: body, method: method, headers: headers}).then(handler = function (resp) {
-
- var response = request.respondWith(resp.body, {
- status: resp.statusCode,
- statusText: trim(resp.statusMessage)
- });
-
- each(resp.headers, function (value, name) {
- response.headers.set(name, value);
- });
-
- resolve(response);
-
- }, function (error$$1) { return handler(error$$1.response); });
- });
-}
-
-/**
- * Base client.
- */
-
-function Client (context) {
-
- var reqHandlers = [sendRequest], resHandlers = [];
-
- if (!isObject(context)) {
- context = null;
- }
-
- function Client(request) {
- while (reqHandlers.length) {
-
- var handler = reqHandlers.pop();
-
- if (isFunction(handler)) {
-
- var response = (void 0), next = (void 0);
-
- response = handler.call(context, request, function (val) { return next = val; }) || next;
-
- if (isObject(response)) {
- return new PromiseObj(function (resolve, reject) {
-
- resHandlers.forEach(function (handler) {
- response = when(response, function (response) {
- return handler.call(context, response) || response;
- }, reject);
- });
-
- when(response, resolve, reject);
-
- }, context);
- }
-
- if (isFunction(response)) {
- resHandlers.unshift(response);
- }
-
- } else {
- warn(("Invalid interceptor of type " + (typeof handler) + ", must be a function"));
- }
- }
- }
-
- Client.use = function (handler) {
- reqHandlers.push(handler);
- };
-
- return Client;
-}
-
-function sendRequest(request) {
-
- var client = request.client || (inBrowser ? xhrClient : nodeClient);
-
- return client(request);
-}
-
-/**
- * HTTP Headers.
- */
-
-var Headers = function Headers(headers) {
- var this$1 = this;
-
-
- this.map = {};
-
- each(headers, function (value, name) { return this$1.append(name, value); });
-};
-
-Headers.prototype.has = function has (name) {
- return getName(this.map, name) !== null;
-};
-
-Headers.prototype.get = function get (name) {
-
- var list = this.map[getName(this.map, name)];
-
- return list ? list.join() : null;
-};
-
-Headers.prototype.getAll = function getAll (name) {
- return this.map[getName(this.map, name)] || [];
-};
-
-Headers.prototype.set = function set (name, value) {
- this.map[normalizeName(getName(this.map, name) || name)] = [trim(value)];
-};
-
-Headers.prototype.append = function append (name, value) {
-
- var list = this.map[getName(this.map, name)];
-
- if (list) {
- list.push(trim(value));
- } else {
- this.set(name, value);
- }
-};
-
-Headers.prototype.delete = function delete$1 (name) {
- delete this.map[getName(this.map, name)];
-};
-
-Headers.prototype.deleteAll = function deleteAll () {
- this.map = {};
-};
-
-Headers.prototype.forEach = function forEach (callback, thisArg) {
- var this$1 = this;
-
- each(this.map, function (list, name) {
- each(list, function (value) { return callback.call(thisArg, value, name, this$1); });
- });
-};
-
-function getName(map, name) {
- return Object.keys(map).reduce(function (prev, curr) {
- return toLower(name) === toLower(curr) ? curr : prev;
- }, null);
-}
-
-function normalizeName(name) {
-
- if (/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(name)) {
- throw new TypeError('Invalid character in header field name');
- }
-
- return trim(name);
-}
-
-/**
- * HTTP Response.
- */
-
-var Response = function Response(body, ref) {
- var url = ref.url;
- var headers = ref.headers;
- var status = ref.status;
- var statusText = ref.statusText;
-
-
- this.url = url;
- this.ok = status >= 200 && status < 300;
- this.status = status || 0;
- this.statusText = statusText || '';
- this.headers = new Headers(headers);
- this.body = body;
-
- if (isString(body)) {
-
- this.bodyText = body;
-
- } else if (isBlob(body)) {
-
- this.bodyBlob = body;
-
- if (isBlobText(body)) {
- this.bodyText = blobText(body);
- }
- }
-};
-
-Response.prototype.blob = function blob () {
- return when(this.bodyBlob);
-};
-
-Response.prototype.text = function text () {
- return when(this.bodyText);
-};
-
-Response.prototype.json = function json () {
- return when(this.text(), function (text) { return JSON.parse(text); });
-};
-
-Object.defineProperty(Response.prototype, 'data', {
-
- get: function get() {
- return this.body;
- },
-
- set: function set(body) {
- this.body = body;
- }
-
-});
-
-function blobText(body) {
- return new PromiseObj(function (resolve) {
-
- var reader = new FileReader();
-
- reader.readAsText(body);
- reader.onload = function () {
- resolve(reader.result);
- };
-
- });
-}
-
-function isBlobText(body) {
- return body.type.indexOf('text') === 0 || body.type.indexOf('json') !== -1;
-}
-
-/**
- * HTTP Request.
- */
-
-var Request = function Request(options$$1) {
-
- this.body = null;
- this.params = {};
-
- assign(this, options$$1, {
- method: toUpper(options$$1.method || 'GET')
- });
-
- if (!(this.headers instanceof Headers)) {
- this.headers = new Headers(this.headers);
- }
-};
-
-Request.prototype.getUrl = function getUrl () {
- return Url(this);
-};
-
-Request.prototype.getBody = function getBody () {
- return this.body;
-};
-
-Request.prototype.respondWith = function respondWith (body, options$$1) {
- return new Response(body, assign(options$$1 || {}, {url: this.getUrl()}));
-};
-
-/**
- * Service for sending network requests.
- */
-
-var COMMON_HEADERS = {'Accept': 'application/json, text/plain, */*'};
-var JSON_CONTENT_TYPE = {'Content-Type': 'application/json;charset=utf-8'};
-
-function Http(options$$1) {
-
- var self = this || {}, client = Client(self.$vm);
-
- defaults(options$$1 || {}, self.$options, Http.options);
-
- Http.interceptors.forEach(function (handler) {
-
- if (isString(handler)) {
- handler = Http.interceptor[handler];
- }
-
- if (isFunction(handler)) {
- client.use(handler);
- }
-
- });
-
- return client(new Request(options$$1)).then(function (response) {
-
- return response.ok ? response : PromiseObj.reject(response);
-
- }, function (response) {
-
- if (response instanceof Error) {
- error(response);
- }
-
- return PromiseObj.reject(response);
- });
-}
-
-Http.options = {};
-
-Http.headers = {
- put: JSON_CONTENT_TYPE,
- post: JSON_CONTENT_TYPE,
- patch: JSON_CONTENT_TYPE,
- delete: JSON_CONTENT_TYPE,
- common: COMMON_HEADERS,
- custom: {}
-};
-
-Http.interceptor = {before: before, method: method, jsonp: jsonp, json: json, form: form, header: header, cors: cors};
-Http.interceptors = ['before', 'method', 'jsonp', 'json', 'form', 'header', 'cors'];
-
-['get', 'delete', 'head', 'jsonp'].forEach(function (method$$1) {
-
- Http[method$$1] = function (url, options$$1) {
- return this(assign(options$$1 || {}, {url: url, method: method$$1}));
- };
-
-});
-
-['post', 'put', 'patch'].forEach(function (method$$1) {
-
- Http[method$$1] = function (url, body, options$$1) {
- return this(assign(options$$1 || {}, {url: url, method: method$$1, body: body}));
- };
-
-});
-
-/**
- * Service for interacting with RESTful services.
- */
-
-function Resource(url, params, actions, options$$1) {
-
- var self = this || {}, resource = {};
-
- actions = assign({},
- Resource.actions,
- actions
- );
-
- each(actions, function (action, name) {
-
- action = merge({url: url, params: assign({}, params)}, options$$1, action);
-
- resource[name] = function () {
- return (self.$http || Http)(opts(action, arguments));
- };
- });
-
- return resource;
-}
-
-function opts(action, args) {
-
- var options$$1 = assign({}, action), params = {}, body;
-
- switch (args.length) {
-
- case 2:
-
- params = args[0];
- body = args[1];
-
- break;
-
- case 1:
-
- if (/^(POST|PUT|PATCH)$/i.test(options$$1.method)) {
- body = args[0];
- } else {
- params = args[0];
- }
-
- break;
-
- case 0:
-
- break;
-
- default:
-
- throw 'Expected up to 2 arguments [params, body], got ' + args.length + ' arguments';
- }
-
- options$$1.body = body;
- options$$1.params = assign({}, options$$1.params, params);
-
- return options$$1;
-}
-
-Resource.actions = {
-
- get: {method: 'GET'},
- save: {method: 'POST'},
- query: {method: 'GET'},
- update: {method: 'PUT'},
- remove: {method: 'DELETE'},
- delete: {method: 'DELETE'}
-
-};
-
-/**
- * Install plugin.
- */
-
-function plugin(Vue) {
-
- if (plugin.installed) {
- return;
- }
-
- Util(Vue);
-
- Vue.url = Url;
- Vue.http = Http;
- Vue.resource = Resource;
- Vue.Promise = PromiseObj;
-
- Object.defineProperties(Vue.prototype, {
-
- $url: {
- get: function get() {
- return options(Vue.url, this, this.$options.url);
- }
- },
-
- $http: {
- get: function get() {
- return options(Vue.http, this, this.$options.http);
- }
- },
-
- $resource: {
- get: function get() {
- return Vue.resource.bind(this);
- }
- },
-
- $promise: {
- get: function get() {
- var this$1 = this;
-
- return function (executor) { return new Vue.Promise(executor, this$1); };
- }
- }
-
- });
-}
-
-if (typeof window !== 'undefined' && window.Vue) {
- window.Vue.use(plugin);
-}
-
-export default plugin;
-export { Url, Http, Resource };
+++ /dev/null
-/*!
- * vue-resource v1.5.0
- * https://github.com/pagekit/vue-resource
- * Released under the MIT License.
- */
-
-(function (global, factory) {
- typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
- typeof define === 'function' && define.amd ? define(factory) :
- (global.VueResource = factory());
-}(this, (function () { 'use strict';
-
-/**
- * Promises/A+ polyfill v1.1.4 (https://github.com/bramstein/promis)
- */
-
-var RESOLVED = 0;
-var REJECTED = 1;
-var PENDING = 2;
-
-function Promise$1(executor) {
-
- this.state = PENDING;
- this.value = undefined;
- this.deferred = [];
-
- var promise = this;
-
- try {
- executor(function (x) {
- promise.resolve(x);
- }, function (r) {
- promise.reject(r);
- });
- } catch (e) {
- promise.reject(e);
- }
-}
-
-Promise$1.reject = function (r) {
- return new Promise$1(function (resolve, reject) {
- reject(r);
- });
-};
-
-Promise$1.resolve = function (x) {
- return new Promise$1(function (resolve, reject) {
- resolve(x);
- });
-};
-
-Promise$1.all = function all(iterable) {
- return new Promise$1(function (resolve, reject) {
- var count = 0, result = [];
-
- if (iterable.length === 0) {
- resolve(result);
- }
-
- function resolver(i) {
- return function (x) {
- result[i] = x;
- count += 1;
-
- if (count === iterable.length) {
- resolve(result);
- }
- };
- }
-
- for (var i = 0; i < iterable.length; i += 1) {
- Promise$1.resolve(iterable[i]).then(resolver(i), reject);
- }
- });
-};
-
-Promise$1.race = function race(iterable) {
- return new Promise$1(function (resolve, reject) {
- for (var i = 0; i < iterable.length; i += 1) {
- Promise$1.resolve(iterable[i]).then(resolve, reject);
- }
- });
-};
-
-var p = Promise$1.prototype;
-
-p.resolve = function resolve(x) {
- var promise = this;
-
- if (promise.state === PENDING) {
- if (x === promise) {
- throw new TypeError('Promise settled with itself.');
- }
-
- var called = false;
-
- try {
- var then = x && x['then'];
-
- if (x !== null && typeof x === 'object' && typeof then === 'function') {
- then.call(x, function (x) {
- if (!called) {
- promise.resolve(x);
- }
- called = true;
-
- }, function (r) {
- if (!called) {
- promise.reject(r);
- }
- called = true;
- });
- return;
- }
- } catch (e) {
- if (!called) {
- promise.reject(e);
- }
- return;
- }
-
- promise.state = RESOLVED;
- promise.value = x;
- promise.notify();
- }
-};
-
-p.reject = function reject(reason) {
- var promise = this;
-
- if (promise.state === PENDING) {
- if (reason === promise) {
- throw new TypeError('Promise settled with itself.');
- }
-
- promise.state = REJECTED;
- promise.value = reason;
- promise.notify();
- }
-};
-
-p.notify = function notify() {
- var promise = this;
-
- nextTick(function () {
- if (promise.state !== PENDING) {
- while (promise.deferred.length) {
- var deferred = promise.deferred.shift(),
- onResolved = deferred[0],
- onRejected = deferred[1],
- resolve = deferred[2],
- reject = deferred[3];
-
- try {
- if (promise.state === RESOLVED) {
- if (typeof onResolved === 'function') {
- resolve(onResolved.call(undefined, promise.value));
- } else {
- resolve(promise.value);
- }
- } else if (promise.state === REJECTED) {
- if (typeof onRejected === 'function') {
- resolve(onRejected.call(undefined, promise.value));
- } else {
- reject(promise.value);
- }
- }
- } catch (e) {
- reject(e);
- }
- }
- }
- });
-};
-
-p.then = function then(onResolved, onRejected) {
- var promise = this;
-
- return new Promise$1(function (resolve, reject) {
- promise.deferred.push([onResolved, onRejected, resolve, reject]);
- promise.notify();
- });
-};
-
-p.catch = function (onRejected) {
- return this.then(undefined, onRejected);
-};
-
-/**
- * Promise adapter.
- */
-
-if (typeof Promise === 'undefined') {
- window.Promise = Promise$1;
-}
-
-function PromiseObj(executor, context) {
-
- if (executor instanceof Promise) {
- this.promise = executor;
- } else {
- this.promise = new Promise(executor.bind(context));
- }
-
- this.context = context;
-}
-
-PromiseObj.all = function (iterable, context) {
- return new PromiseObj(Promise.all(iterable), context);
-};
-
-PromiseObj.resolve = function (value, context) {
- return new PromiseObj(Promise.resolve(value), context);
-};
-
-PromiseObj.reject = function (reason, context) {
- return new PromiseObj(Promise.reject(reason), context);
-};
-
-PromiseObj.race = function (iterable, context) {
- return new PromiseObj(Promise.race(iterable), context);
-};
-
-var p$1 = PromiseObj.prototype;
-
-p$1.bind = function (context) {
- this.context = context;
- return this;
-};
-
-p$1.then = function (fulfilled, rejected) {
-
- if (fulfilled && fulfilled.bind && this.context) {
- fulfilled = fulfilled.bind(this.context);
- }
-
- if (rejected && rejected.bind && this.context) {
- rejected = rejected.bind(this.context);
- }
-
- return new PromiseObj(this.promise.then(fulfilled, rejected), this.context);
-};
-
-p$1.catch = function (rejected) {
-
- if (rejected && rejected.bind && this.context) {
- rejected = rejected.bind(this.context);
- }
-
- return new PromiseObj(this.promise.catch(rejected), this.context);
-};
-
-p$1.finally = function (callback) {
-
- return this.then(function (value) {
- callback.call(this);
- return value;
- }, function (reason) {
- callback.call(this);
- return Promise.reject(reason);
- }
- );
-};
-
-/**
- * Utility functions.
- */
-
-var ref = {};
-var hasOwnProperty = ref.hasOwnProperty;
-var ref$1 = [];
-var slice = ref$1.slice;
-var debug = false, ntick;
-
-var inBrowser = typeof window !== 'undefined';
-
-function Util (ref) {
- var config = ref.config;
- var nextTick = ref.nextTick;
-
- ntick = nextTick;
- debug = config.debug || !config.silent;
-}
-
-function warn(msg) {
- if (typeof console !== 'undefined' && debug) {
- console.warn('[VueResource warn]: ' + msg);
- }
-}
-
-function error(msg) {
- if (typeof console !== 'undefined') {
- console.error(msg);
- }
-}
-
-function nextTick(cb, ctx) {
- return ntick(cb, ctx);
-}
-
-function trim(str) {
- return str ? str.replace(/^\s*|\s*$/g, '') : '';
-}
-
-function trimEnd(str, chars) {
-
- if (str && chars === undefined) {
- return str.replace(/\s+$/, '');
- }
-
- if (!str || !chars) {
- return str;
- }
-
- return str.replace(new RegExp(("[" + chars + "]+$")), '');
-}
-
-function toLower(str) {
- return str ? str.toLowerCase() : '';
-}
-
-function toUpper(str) {
- return str ? str.toUpperCase() : '';
-}
-
-var isArray = Array.isArray;
-
-function isString(val) {
- return typeof val === 'string';
-}
-
-function isFunction(val) {
- return typeof val === 'function';
-}
-
-function isObject(obj) {
- return obj !== null && typeof obj === 'object';
-}
-
-function isPlainObject(obj) {
- return isObject(obj) && Object.getPrototypeOf(obj) == Object.prototype;
-}
-
-function isBlob(obj) {
- return typeof Blob !== 'undefined' && obj instanceof Blob;
-}
-
-function isFormData(obj) {
- return typeof FormData !== 'undefined' && obj instanceof FormData;
-}
-
-function when(value, fulfilled, rejected) {
-
- var promise = PromiseObj.resolve(value);
-
- if (arguments.length < 2) {
- return promise;
- }
-
- return promise.then(fulfilled, rejected);
-}
-
-function options(fn, obj, opts) {
-
- opts = opts || {};
-
- if (isFunction(opts)) {
- opts = opts.call(obj);
- }
-
- return merge(fn.bind({$vm: obj, $options: opts}), fn, {$options: opts});
-}
-
-function each(obj, iterator) {
-
- var i, key;
-
- if (isArray(obj)) {
- for (i = 0; i < obj.length; i++) {
- iterator.call(obj[i], obj[i], i);
- }
- } else if (isObject(obj)) {
- for (key in obj) {
- if (hasOwnProperty.call(obj, key)) {
- iterator.call(obj[key], obj[key], key);
- }
- }
- }
-
- return obj;
-}
-
-var assign = Object.assign || _assign;
-
-function merge(target) {
-
- var args = slice.call(arguments, 1);
-
- args.forEach(function (source) {
- _merge(target, source, true);
- });
-
- return target;
-}
-
-function defaults(target) {
-
- var args = slice.call(arguments, 1);
-
- args.forEach(function (source) {
-
- for (var key in source) {
- if (target[key] === undefined) {
- target[key] = source[key];
- }
- }
-
- });
-
- return target;
-}
-
-function _assign(target) {
-
- var args = slice.call(arguments, 1);
-
- args.forEach(function (source) {
- _merge(target, source);
- });
-
- return target;
-}
-
-function _merge(target, source, deep) {
- for (var key in source) {
- if (deep && (isPlainObject(source[key]) || isArray(source[key]))) {
- if (isPlainObject(source[key]) && !isPlainObject(target[key])) {
- target[key] = {};
- }
- if (isArray(source[key]) && !isArray(target[key])) {
- target[key] = [];
- }
- _merge(target[key], source[key], deep);
- } else if (source[key] !== undefined) {
- target[key] = source[key];
- }
- }
-}
-
-/**
- * Root Prefix Transform.
- */
-
-function root (options$$1, next) {
-
- var url = next(options$$1);
-
- if (isString(options$$1.root) && !/^(https?:)?\//.test(url)) {
- url = trimEnd(options$$1.root, '/') + '/' + url;
- }
-
- return url;
-}
-
-/**
- * Query Parameter Transform.
- */
-
-function query (options$$1, next) {
-
- var urlParams = Object.keys(Url.options.params), query = {}, url = next(options$$1);
-
- each(options$$1.params, function (value, key) {
- if (urlParams.indexOf(key) === -1) {
- query[key] = value;
- }
- });
-
- query = Url.params(query);
-
- if (query) {
- url += (url.indexOf('?') == -1 ? '?' : '&') + query;
- }
-
- return url;
-}
-
-/**
- * URL Template v2.0.6 (https://github.com/bramstein/url-template)
- */
-
-function expand(url, params, variables) {
-
- var tmpl = parse(url), expanded = tmpl.expand(params);
-
- if (variables) {
- variables.push.apply(variables, tmpl.vars);
- }
-
- return expanded;
-}
-
-function parse(template) {
-
- var operators = ['+', '#', '.', '/', ';', '?', '&'], variables = [];
-
- return {
- vars: variables,
- expand: function expand(context) {
- return template.replace(/\{([^{}]+)\}|([^{}]+)/g, function (_, expression, literal) {
- if (expression) {
-
- var operator = null, values = [];
-
- if (operators.indexOf(expression.charAt(0)) !== -1) {
- operator = expression.charAt(0);
- expression = expression.substr(1);
- }
-
- expression.split(/,/g).forEach(function (variable) {
- var tmp = /([^:*]*)(?::(\d+)|(\*))?/.exec(variable);
- values.push.apply(values, getValues(context, operator, tmp[1], tmp[2] || tmp[3]));
- variables.push(tmp[1]);
- });
-
- if (operator && operator !== '+') {
-
- var separator = ',';
-
- if (operator === '?') {
- separator = '&';
- } else if (operator !== '#') {
- separator = operator;
- }
-
- return (values.length !== 0 ? operator : '') + values.join(separator);
- } else {
- return values.join(',');
- }
-
- } else {
- return encodeReserved(literal);
- }
- });
- }
- };
-}
-
-function getValues(context, operator, key, modifier) {
-
- var value = context[key], result = [];
-
- if (isDefined(value) && value !== '') {
- if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {
- value = value.toString();
-
- if (modifier && modifier !== '*') {
- value = value.substring(0, parseInt(modifier, 10));
- }
-
- result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : null));
- } else {
- if (modifier === '*') {
- if (Array.isArray(value)) {
- value.filter(isDefined).forEach(function (value) {
- result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : null));
- });
- } else {
- Object.keys(value).forEach(function (k) {
- if (isDefined(value[k])) {
- result.push(encodeValue(operator, value[k], k));
- }
- });
- }
- } else {
- var tmp = [];
-
- if (Array.isArray(value)) {
- value.filter(isDefined).forEach(function (value) {
- tmp.push(encodeValue(operator, value));
- });
- } else {
- Object.keys(value).forEach(function (k) {
- if (isDefined(value[k])) {
- tmp.push(encodeURIComponent(k));
- tmp.push(encodeValue(operator, value[k].toString()));
- }
- });
- }
-
- if (isKeyOperator(operator)) {
- result.push(encodeURIComponent(key) + '=' + tmp.join(','));
- } else if (tmp.length !== 0) {
- result.push(tmp.join(','));
- }
- }
- }
- } else {
- if (operator === ';') {
- result.push(encodeURIComponent(key));
- } else if (value === '' && (operator === '&' || operator === '?')) {
- result.push(encodeURIComponent(key) + '=');
- } else if (value === '') {
- result.push('');
- }
- }
-
- return result;
-}
-
-function isDefined(value) {
- return value !== undefined && value !== null;
-}
-
-function isKeyOperator(operator) {
- return operator === ';' || operator === '&' || operator === '?';
-}
-
-function encodeValue(operator, value, key) {
-
- value = (operator === '+' || operator === '#') ? encodeReserved(value) : encodeURIComponent(value);
-
- if (key) {
- return encodeURIComponent(key) + '=' + value;
- } else {
- return value;
- }
-}
-
-function encodeReserved(str) {
- return str.split(/(%[0-9A-Fa-f]{2})/g).map(function (part) {
- if (!/%[0-9A-Fa-f]/.test(part)) {
- part = encodeURI(part);
- }
- return part;
- }).join('');
-}
-
-/**
- * URL Template (RFC 6570) Transform.
- */
-
-function template (options) {
-
- var variables = [], url = expand(options.url, options.params, variables);
-
- variables.forEach(function (key) {
- delete options.params[key];
- });
-
- return url;
-}
-
-/**
- * Service for URL templating.
- */
-
-function Url(url, params) {
-
- var self = this || {}, options$$1 = url, transform;
-
- if (isString(url)) {
- options$$1 = {url: url, params: params};
- }
-
- options$$1 = merge({}, Url.options, self.$options, options$$1);
-
- Url.transforms.forEach(function (handler) {
-
- if (isString(handler)) {
- handler = Url.transform[handler];
- }
-
- if (isFunction(handler)) {
- transform = factory(handler, transform, self.$vm);
- }
-
- });
-
- return transform(options$$1);
-}
-
-/**
- * Url options.
- */
-
-Url.options = {
- url: '',
- root: null,
- params: {}
-};
-
-/**
- * Url transforms.
- */
-
-Url.transform = {template: template, query: query, root: root};
-Url.transforms = ['template', 'query', 'root'];
-
-/**
- * Encodes a Url parameter string.
- *
- * @param {Object} obj
- */
-
-Url.params = function (obj) {
-
- var params = [], escape = encodeURIComponent;
-
- params.add = function (key, value) {
-
- if (isFunction(value)) {
- value = value();
- }
-
- if (value === null) {
- value = '';
- }
-
- this.push(escape(key) + '=' + escape(value));
- };
-
- serialize(params, obj);
-
- return params.join('&').replace(/%20/g, '+');
-};
-
-/**
- * Parse a URL and return its components.
- *
- * @param {String} url
- */
-
-Url.parse = function (url) {
-
- var el = document.createElement('a');
-
- if (document.documentMode) {
- el.href = url;
- url = el.href;
- }
-
- el.href = url;
-
- return {
- href: el.href,
- protocol: el.protocol ? el.protocol.replace(/:$/, '') : '',
- port: el.port,
- host: el.host,
- hostname: el.hostname,
- pathname: el.pathname.charAt(0) === '/' ? el.pathname : '/' + el.pathname,
- search: el.search ? el.search.replace(/^\?/, '') : '',
- hash: el.hash ? el.hash.replace(/^#/, '') : ''
- };
-};
-
-function factory(handler, next, vm) {
- return function (options$$1) {
- return handler.call(vm, options$$1, next);
- };
-}
-
-function serialize(params, obj, scope) {
-
- var array = isArray(obj), plain = isPlainObject(obj), hash;
-
- each(obj, function (value, key) {
-
- hash = isObject(value) || isArray(value);
-
- if (scope) {
- key = scope + '[' + (plain || hash ? key : '') + ']';
- }
-
- if (!scope && array) {
- params.add(value.name, value.value);
- } else if (hash) {
- serialize(params, value, key);
- } else {
- params.add(key, value);
- }
- });
-}
-
-/**
- * XDomain client (Internet Explorer).
- */
-
-function xdrClient (request) {
- return new PromiseObj(function (resolve) {
-
- var xdr = new XDomainRequest(), handler = function (ref) {
- var type = ref.type;
-
-
- var status = 0;
-
- if (type === 'load') {
- status = 200;
- } else if (type === 'error') {
- status = 500;
- }
-
- resolve(request.respondWith(xdr.responseText, {status: status}));
- };
-
- request.abort = function () { return xdr.abort(); };
-
- xdr.open(request.method, request.getUrl());
-
- if (request.timeout) {
- xdr.timeout = request.timeout;
- }
-
- xdr.onload = handler;
- xdr.onabort = handler;
- xdr.onerror = handler;
- xdr.ontimeout = handler;
- xdr.onprogress = function () {};
- xdr.send(request.getBody());
- });
-}
-
-/**
- * CORS Interceptor.
- */
-
-var SUPPORTS_CORS = inBrowser && 'withCredentials' in new XMLHttpRequest();
-
-function cors (request) {
-
- if (inBrowser) {
-
- var orgUrl = Url.parse(location.href);
- var reqUrl = Url.parse(request.getUrl());
-
- if (reqUrl.protocol !== orgUrl.protocol || reqUrl.host !== orgUrl.host) {
-
- request.crossOrigin = true;
- request.emulateHTTP = false;
-
- if (!SUPPORTS_CORS) {
- request.client = xdrClient;
- }
- }
- }
-
-}
-
-/**
- * Form data Interceptor.
- */
-
-function form (request) {
-
- if (isFormData(request.body)) {
- request.headers.delete('Content-Type');
- } else if (isObject(request.body) && request.emulateJSON) {
- request.body = Url.params(request.body);
- request.headers.set('Content-Type', 'application/x-www-form-urlencoded');
- }
-
-}
-
-/**
- * JSON Interceptor.
- */
-
-function json (request) {
-
- var type = request.headers.get('Content-Type') || '';
-
- if (isObject(request.body) && type.indexOf('application/json') === 0) {
- request.body = JSON.stringify(request.body);
- }
-
- return function (response) {
-
- return response.bodyText ? when(response.text(), function (text) {
-
- var type = response.headers.get('Content-Type') || '';
-
- if (type.indexOf('application/json') === 0 || isJson(text)) {
-
- try {
- response.body = JSON.parse(text);
- } catch (e) {
- response.body = null;
- }
-
- } else {
- response.body = text;
- }
-
- return response;
-
- }) : response;
-
- };
-}
-
-function isJson(str) {
-
- var start = str.match(/^\s*(\[|\{)/);
- var end = {'[': /]\s*$/, '{': /}\s*$/};
-
- return start && end[start[1]].test(str);
-}
-
-/**
- * JSONP client (Browser).
- */
-
-function jsonpClient (request) {
- return new PromiseObj(function (resolve) {
-
- var name = request.jsonp || 'callback', callback = request.jsonpCallback || '_jsonp' + Math.random().toString(36).substr(2), body = null, handler, script;
-
- handler = function (ref) {
- var type = ref.type;
-
-
- var status = 0;
-
- if (type === 'load' && body !== null) {
- status = 200;
- } else if (type === 'error') {
- status = 500;
- }
-
- if (status && window[callback]) {
- delete window[callback];
- document.body.removeChild(script);
- }
-
- resolve(request.respondWith(body, {status: status}));
- };
-
- window[callback] = function (result) {
- body = JSON.stringify(result);
- };
-
- request.abort = function () {
- handler({type: 'abort'});
- };
-
- request.params[name] = callback;
-
- if (request.timeout) {
- setTimeout(request.abort, request.timeout);
- }
-
- script = document.createElement('script');
- script.src = request.getUrl();
- script.type = 'text/javascript';
- script.async = true;
- script.onload = handler;
- script.onerror = handler;
-
- document.body.appendChild(script);
- });
-}
-
-/**
- * JSONP Interceptor.
- */
-
-function jsonp (request) {
-
- if (request.method == 'JSONP') {
- request.client = jsonpClient;
- }
-
-}
-
-/**
- * Before Interceptor.
- */
-
-function before (request) {
-
- if (isFunction(request.before)) {
- request.before.call(this, request);
- }
-
-}
-
-/**
- * HTTP method override Interceptor.
- */
-
-function method (request) {
-
- if (request.emulateHTTP && /^(PUT|PATCH|DELETE)$/i.test(request.method)) {
- request.headers.set('X-HTTP-Method-Override', request.method);
- request.method = 'POST';
- }
-
-}
-
-/**
- * Header Interceptor.
- */
-
-function header (request) {
-
- var headers = assign({}, Http.headers.common,
- !request.crossOrigin ? Http.headers.custom : {},
- Http.headers[toLower(request.method)]
- );
-
- each(headers, function (value, name) {
- if (!request.headers.has(name)) {
- request.headers.set(name, value);
- }
- });
-
-}
-
-/**
- * XMLHttp client (Browser).
- */
-
-function xhrClient (request) {
- return new PromiseObj(function (resolve) {
-
- var xhr = new XMLHttpRequest(), handler = function (event) {
-
- var response = request.respondWith(
- 'response' in xhr ? xhr.response : xhr.responseText, {
- status: xhr.status === 1223 ? 204 : xhr.status, // IE9 status bug
- statusText: xhr.status === 1223 ? 'No Content' : trim(xhr.statusText)
- });
-
- each(trim(xhr.getAllResponseHeaders()).split('\n'), function (row) {
- response.headers.append(row.slice(0, row.indexOf(':')), row.slice(row.indexOf(':') + 1));
- });
-
- resolve(response);
- };
-
- request.abort = function () { return xhr.abort(); };
-
- xhr.open(request.method, request.getUrl(), true);
-
- if (request.timeout) {
- xhr.timeout = request.timeout;
- }
-
- if (request.responseType && 'responseType' in xhr) {
- xhr.responseType = request.responseType;
- }
-
- if (request.withCredentials || request.credentials) {
- xhr.withCredentials = true;
- }
-
- if (!request.crossOrigin) {
- request.headers.set('X-Requested-With', 'XMLHttpRequest');
- }
-
- // deprecated use downloadProgress
- if (isFunction(request.progress) && request.method === 'GET') {
- xhr.addEventListener('progress', request.progress);
- }
-
- if (isFunction(request.downloadProgress)) {
- xhr.addEventListener('progress', request.downloadProgress);
- }
-
- // deprecated use uploadProgress
- if (isFunction(request.progress) && /^(POST|PUT)$/i.test(request.method)) {
- xhr.upload.addEventListener('progress', request.progress);
- }
-
- if (isFunction(request.uploadProgress) && xhr.upload) {
- xhr.upload.addEventListener('progress', request.uploadProgress);
- }
-
- request.headers.forEach(function (value, name) {
- xhr.setRequestHeader(name, value);
- });
-
- xhr.onload = handler;
- xhr.onabort = handler;
- xhr.onerror = handler;
- xhr.ontimeout = handler;
- xhr.send(request.getBody());
- });
-}
-
-/**
- * Http client (Node).
- */
-
-function nodeClient (request) {
-
- var client = require('got');
-
- return new PromiseObj(function (resolve) {
-
- var url = request.getUrl();
- var body = request.getBody();
- var method = request.method;
- var headers = {}, handler;
-
- request.headers.forEach(function (value, name) {
- headers[name] = value;
- });
-
- client(url, {body: body, method: method, headers: headers}).then(handler = function (resp) {
-
- var response = request.respondWith(resp.body, {
- status: resp.statusCode,
- statusText: trim(resp.statusMessage)
- });
-
- each(resp.headers, function (value, name) {
- response.headers.set(name, value);
- });
-
- resolve(response);
-
- }, function (error$$1) { return handler(error$$1.response); });
- });
-}
-
-/**
- * Base client.
- */
-
-function Client (context) {
-
- var reqHandlers = [sendRequest], resHandlers = [];
-
- if (!isObject(context)) {
- context = null;
- }
-
- function Client(request) {
- while (reqHandlers.length) {
-
- var handler = reqHandlers.pop();
-
- if (isFunction(handler)) {
-
- var response = (void 0), next = (void 0);
-
- response = handler.call(context, request, function (val) { return next = val; }) || next;
-
- if (isObject(response)) {
- return new PromiseObj(function (resolve, reject) {
-
- resHandlers.forEach(function (handler) {
- response = when(response, function (response) {
- return handler.call(context, response) || response;
- }, reject);
- });
-
- when(response, resolve, reject);
-
- }, context);
- }
-
- if (isFunction(response)) {
- resHandlers.unshift(response);
- }
-
- } else {
- warn(("Invalid interceptor of type " + (typeof handler) + ", must be a function"));
- }
- }
- }
-
- Client.use = function (handler) {
- reqHandlers.push(handler);
- };
-
- return Client;
-}
-
-function sendRequest(request) {
-
- var client = request.client || (inBrowser ? xhrClient : nodeClient);
-
- return client(request);
-}
-
-/**
- * HTTP Headers.
- */
-
-var Headers = function Headers(headers) {
- var this$1 = this;
-
-
- this.map = {};
-
- each(headers, function (value, name) { return this$1.append(name, value); });
-};
-
-Headers.prototype.has = function has (name) {
- return getName(this.map, name) !== null;
-};
-
-Headers.prototype.get = function get (name) {
-
- var list = this.map[getName(this.map, name)];
-
- return list ? list.join() : null;
-};
-
-Headers.prototype.getAll = function getAll (name) {
- return this.map[getName(this.map, name)] || [];
-};
-
-Headers.prototype.set = function set (name, value) {
- this.map[normalizeName(getName(this.map, name) || name)] = [trim(value)];
-};
-
-Headers.prototype.append = function append (name, value) {
-
- var list = this.map[getName(this.map, name)];
-
- if (list) {
- list.push(trim(value));
- } else {
- this.set(name, value);
- }
-};
-
-Headers.prototype.delete = function delete$1 (name) {
- delete this.map[getName(this.map, name)];
-};
-
-Headers.prototype.deleteAll = function deleteAll () {
- this.map = {};
-};
-
-Headers.prototype.forEach = function forEach (callback, thisArg) {
- var this$1 = this;
-
- each(this.map, function (list, name) {
- each(list, function (value) { return callback.call(thisArg, value, name, this$1); });
- });
-};
-
-function getName(map, name) {
- return Object.keys(map).reduce(function (prev, curr) {
- return toLower(name) === toLower(curr) ? curr : prev;
- }, null);
-}
-
-function normalizeName(name) {
-
- if (/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(name)) {
- throw new TypeError('Invalid character in header field name');
- }
-
- return trim(name);
-}
-
-/**
- * HTTP Response.
- */
-
-var Response = function Response(body, ref) {
- var url = ref.url;
- var headers = ref.headers;
- var status = ref.status;
- var statusText = ref.statusText;
-
-
- this.url = url;
- this.ok = status >= 200 && status < 300;
- this.status = status || 0;
- this.statusText = statusText || '';
- this.headers = new Headers(headers);
- this.body = body;
-
- if (isString(body)) {
-
- this.bodyText = body;
-
- } else if (isBlob(body)) {
-
- this.bodyBlob = body;
-
- if (isBlobText(body)) {
- this.bodyText = blobText(body);
- }
- }
-};
-
-Response.prototype.blob = function blob () {
- return when(this.bodyBlob);
-};
-
-Response.prototype.text = function text () {
- return when(this.bodyText);
-};
-
-Response.prototype.json = function json () {
- return when(this.text(), function (text) { return JSON.parse(text); });
-};
-
-Object.defineProperty(Response.prototype, 'data', {
-
- get: function get() {
- return this.body;
- },
-
- set: function set(body) {
- this.body = body;
- }
-
-});
-
-function blobText(body) {
- return new PromiseObj(function (resolve) {
-
- var reader = new FileReader();
-
- reader.readAsText(body);
- reader.onload = function () {
- resolve(reader.result);
- };
-
- });
-}
-
-function isBlobText(body) {
- return body.type.indexOf('text') === 0 || body.type.indexOf('json') !== -1;
-}
-
-/**
- * HTTP Request.
- */
-
-var Request = function Request(options$$1) {
-
- this.body = null;
- this.params = {};
-
- assign(this, options$$1, {
- method: toUpper(options$$1.method || 'GET')
- });
-
- if (!(this.headers instanceof Headers)) {
- this.headers = new Headers(this.headers);
- }
-};
-
-Request.prototype.getUrl = function getUrl () {
- return Url(this);
-};
-
-Request.prototype.getBody = function getBody () {
- return this.body;
-};
-
-Request.prototype.respondWith = function respondWith (body, options$$1) {
- return new Response(body, assign(options$$1 || {}, {url: this.getUrl()}));
-};
-
-/**
- * Service for sending network requests.
- */
-
-var COMMON_HEADERS = {'Accept': 'application/json, text/plain, */*'};
-var JSON_CONTENT_TYPE = {'Content-Type': 'application/json;charset=utf-8'};
-
-function Http(options$$1) {
-
- var self = this || {}, client = Client(self.$vm);
-
- defaults(options$$1 || {}, self.$options, Http.options);
-
- Http.interceptors.forEach(function (handler) {
-
- if (isString(handler)) {
- handler = Http.interceptor[handler];
- }
-
- if (isFunction(handler)) {
- client.use(handler);
- }
-
- });
-
- return client(new Request(options$$1)).then(function (response) {
-
- return response.ok ? response : PromiseObj.reject(response);
-
- }, function (response) {
-
- if (response instanceof Error) {
- error(response);
- }
-
- return PromiseObj.reject(response);
- });
-}
-
-Http.options = {};
-
-Http.headers = {
- put: JSON_CONTENT_TYPE,
- post: JSON_CONTENT_TYPE,
- patch: JSON_CONTENT_TYPE,
- delete: JSON_CONTENT_TYPE,
- common: COMMON_HEADERS,
- custom: {}
-};
-
-Http.interceptor = {before: before, method: method, jsonp: jsonp, json: json, form: form, header: header, cors: cors};
-Http.interceptors = ['before', 'method', 'jsonp', 'json', 'form', 'header', 'cors'];
-
-['get', 'delete', 'head', 'jsonp'].forEach(function (method$$1) {
-
- Http[method$$1] = function (url, options$$1) {
- return this(assign(options$$1 || {}, {url: url, method: method$$1}));
- };
-
-});
-
-['post', 'put', 'patch'].forEach(function (method$$1) {
-
- Http[method$$1] = function (url, body, options$$1) {
- return this(assign(options$$1 || {}, {url: url, method: method$$1, body: body}));
- };
-
-});
-
-/**
- * Service for interacting with RESTful services.
- */
-
-function Resource(url, params, actions, options$$1) {
-
- var self = this || {}, resource = {};
-
- actions = assign({},
- Resource.actions,
- actions
- );
-
- each(actions, function (action, name) {
-
- action = merge({url: url, params: assign({}, params)}, options$$1, action);
-
- resource[name] = function () {
- return (self.$http || Http)(opts(action, arguments));
- };
- });
-
- return resource;
-}
-
-function opts(action, args) {
-
- var options$$1 = assign({}, action), params = {}, body;
-
- switch (args.length) {
-
- case 2:
-
- params = args[0];
- body = args[1];
-
- break;
-
- case 1:
-
- if (/^(POST|PUT|PATCH)$/i.test(options$$1.method)) {
- body = args[0];
- } else {
- params = args[0];
- }
-
- break;
-
- case 0:
-
- break;
-
- default:
-
- throw 'Expected up to 2 arguments [params, body], got ' + args.length + ' arguments';
- }
-
- options$$1.body = body;
- options$$1.params = assign({}, options$$1.params, params);
-
- return options$$1;
-}
-
-Resource.actions = {
-
- get: {method: 'GET'},
- save: {method: 'POST'},
- query: {method: 'GET'},
- update: {method: 'PUT'},
- remove: {method: 'DELETE'},
- delete: {method: 'DELETE'}
-
-};
-
-/**
- * Install plugin.
- */
-
-function plugin(Vue) {
-
- if (plugin.installed) {
- return;
- }
-
- Util(Vue);
-
- Vue.url = Url;
- Vue.http = Http;
- Vue.resource = Resource;
- Vue.Promise = PromiseObj;
-
- Object.defineProperties(Vue.prototype, {
-
- $url: {
- get: function get() {
- return options(Vue.url, this, this.$options.url);
- }
- },
-
- $http: {
- get: function get() {
- return options(Vue.http, this, this.$options.http);
- }
- },
-
- $resource: {
- get: function get() {
- return Vue.resource.bind(this);
- }
- },
-
- $promise: {
- get: function get() {
- var this$1 = this;
-
- return function (executor) { return new Vue.Promise(executor, this$1); };
- }
- }
-
- });
-}
-
-if (typeof window !== 'undefined' && window.Vue) {
- window.Vue.use(plugin);
-}
-
-return plugin;
-
-})));
+++ /dev/null
-/*!
- * vue-resource v1.5.0
- * https://github.com/pagekit/vue-resource
- * Released under the MIT License.
- */
-
-!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.VueResource=e()}(this,function(){"use strict";var t=2;function e(e){this.state=t,this.value=void 0,this.deferred=[];var n=this;try{e(function(t){n.resolve(t)},function(t){n.reject(t)})}catch(t){n.reject(t)}}e.reject=function(t){return new e(function(e,n){n(t)})},e.resolve=function(t){return new e(function(e,n){e(t)})},e.all=function(t){return new e(function(n,o){var r=0,i=[];function s(e){return function(o){i[e]=o,(r+=1)===t.length&&n(i)}}0===t.length&&n(i);for(var u=0;u<t.length;u+=1)e.resolve(t[u]).then(s(u),o)})},e.race=function(t){return new e(function(n,o){for(var r=0;r<t.length;r+=1)e.resolve(t[r]).then(n,o)})};var n=e.prototype;function o(t,e){t instanceof Promise?this.promise=t:this.promise=new Promise(t.bind(e)),this.context=e}n.resolve=function(e){var n=this;if(n.state===t){if(e===n)throw new TypeError("Promise settled with itself.");var o=!1;try{var r=e&&e.then;if(null!==e&&"object"==typeof e&&"function"==typeof r)return void r.call(e,function(t){o||n.resolve(t),o=!0},function(t){o||n.reject(t),o=!0})}catch(t){return void(o||n.reject(t))}n.state=0,n.value=e,n.notify()}},n.reject=function(e){var n=this;if(n.state===t){if(e===n)throw new TypeError("Promise settled with itself.");n.state=1,n.value=e,n.notify()}},n.notify=function(){var e,n=this;i(function(){if(n.state!==t)for(;n.deferred.length;){var e=n.deferred.shift(),o=e[0],r=e[1],i=e[2],s=e[3];try{0===n.state?i("function"==typeof o?o.call(void 0,n.value):n.value):1===n.state&&("function"==typeof r?i(r.call(void 0,n.value)):s(n.value))}catch(t){s(t)}}},e)},n.then=function(t,n){var o=this;return new e(function(e,r){o.deferred.push([t,n,e,r]),o.notify()})},n.catch=function(t){return this.then(void 0,t)},"undefined"==typeof Promise&&(window.Promise=e),o.all=function(t,e){return new o(Promise.all(t),e)},o.resolve=function(t,e){return new o(Promise.resolve(t),e)},o.reject=function(t,e){return new o(Promise.reject(t),e)},o.race=function(t,e){return new o(Promise.race(t),e)};var r=o.prototype;r.bind=function(t){return this.context=t,this},r.then=function(t,e){return t&&t.bind&&this.context&&(t=t.bind(this.context)),e&&e.bind&&this.context&&(e=e.bind(this.context)),new o(this.promise.then(t,e),this.context)},r.catch=function(t){return t&&t.bind&&this.context&&(t=t.bind(this.context)),new o(this.promise.catch(t),this.context)},r.finally=function(t){return this.then(function(e){return t.call(this),e},function(e){return t.call(this),Promise.reject(e)})};var i,s={}.hasOwnProperty,u=[].slice,a=!1,c="undefined"!=typeof window;function f(t){return t?t.replace(/^\s*|\s*$/g,""):""}function p(t){return t?t.toLowerCase():""}var h=Array.isArray;function d(t){return"string"==typeof t}function l(t){return"function"==typeof t}function m(t){return null!==t&&"object"==typeof t}function y(t){return m(t)&&Object.getPrototypeOf(t)==Object.prototype}function v(t,e,n){var r=o.resolve(t);return arguments.length<2?r:r.then(e,n)}function b(t,e,n){return l(n=n||{})&&(n=n.call(e)),T(t.bind({$vm:e,$options:n}),t,{$options:n})}function g(t,e){var n,o;if(h(t))for(n=0;n<t.length;n++)e.call(t[n],t[n],n);else if(m(t))for(o in t)s.call(t,o)&&e.call(t[o],t[o],o);return t}var w=Object.assign||function(t){return u.call(arguments,1).forEach(function(e){x(t,e)}),t};function T(t){return u.call(arguments,1).forEach(function(e){x(t,e,!0)}),t}function x(t,e,n){for(var o in e)n&&(y(e[o])||h(e[o]))?(y(e[o])&&!y(t[o])&&(t[o]={}),h(e[o])&&!h(t[o])&&(t[o]=[]),x(t[o],e[o],n)):void 0!==e[o]&&(t[o]=e[o])}function j(t,e,n){var o,r,i,s=(o=t,r=["+","#",".","/",";","?","&"],{vars:i=[],expand:function(t){return o.replace(/\{([^{}]+)\}|([^{}]+)/g,function(e,n,o){if(n){var s=null,u=[];if(-1!==r.indexOf(n.charAt(0))&&(s=n.charAt(0),n=n.substr(1)),n.split(/,/g).forEach(function(e){var n=/([^:*]*)(?::(\d+)|(\*))?/.exec(e);u.push.apply(u,function(t,e,n,o){var r=t[n],i=[];if(E(r)&&""!==r)if("string"==typeof r||"number"==typeof r||"boolean"==typeof r)r=r.toString(),o&&"*"!==o&&(r=r.substring(0,parseInt(o,10))),i.push(O(e,r,P(e)?n:null));else if("*"===o)Array.isArray(r)?r.filter(E).forEach(function(t){i.push(O(e,t,P(e)?n:null))}):Object.keys(r).forEach(function(t){E(r[t])&&i.push(O(e,r[t],t))});else{var s=[];Array.isArray(r)?r.filter(E).forEach(function(t){s.push(O(e,t))}):Object.keys(r).forEach(function(t){E(r[t])&&(s.push(encodeURIComponent(t)),s.push(O(e,r[t].toString())))}),P(e)?i.push(encodeURIComponent(n)+"="+s.join(",")):0!==s.length&&i.push(s.join(","))}else";"===e?i.push(encodeURIComponent(n)):""!==r||"&"!==e&&"?"!==e?""===r&&i.push(""):i.push(encodeURIComponent(n)+"=");return i}(t,s,n[1],n[2]||n[3])),i.push(n[1])}),s&&"+"!==s){var a=",";return"?"===s?a="&":"#"!==s&&(a=s),(0!==u.length?s:"")+u.join(a)}return u.join(",")}return C(o)})}}),u=s.expand(e);return n&&n.push.apply(n,s.vars),u}function E(t){return null!=t}function P(t){return";"===t||"&"===t||"?"===t}function O(t,e,n){return e="+"===t||"#"===t?C(e):encodeURIComponent(e),n?encodeURIComponent(n)+"="+e:e}function C(t){return t.split(/(%[0-9A-Fa-f]{2})/g).map(function(t){return/%[0-9A-Fa-f]/.test(t)||(t=encodeURI(t)),t}).join("")}function $(t,e){var n,o=this||{},r=t;return d(t)&&(r={url:t,params:e}),r=T({},$.options,o.$options,r),$.transforms.forEach(function(t){var e,r,i;d(t)&&(t=$.transform[t]),l(t)&&(e=t,r=n,i=o.$vm,n=function(t){return e.call(i,t,r)})}),n(r)}function U(t){return new o(function(e){var n=new XDomainRequest,o=function(o){var r=o.type,i=0;"load"===r?i=200:"error"===r&&(i=500),e(t.respondWith(n.responseText,{status:i}))};t.abort=function(){return n.abort()},n.open(t.method,t.getUrl()),t.timeout&&(n.timeout=t.timeout),n.onload=o,n.onabort=o,n.onerror=o,n.ontimeout=o,n.onprogress=function(){},n.send(t.getBody())})}$.options={url:"",root:null,params:{}},$.transform={template:function(t){var e=[],n=j(t.url,t.params,e);return e.forEach(function(e){delete t.params[e]}),n},query:function(t,e){var n=Object.keys($.options.params),o={},r=e(t);return g(t.params,function(t,e){-1===n.indexOf(e)&&(o[e]=t)}),(o=$.params(o))&&(r+=(-1==r.indexOf("?")?"?":"&")+o),r},root:function(t,e){var n,o,r=e(t);return d(t.root)&&!/^(https?:)?\//.test(r)&&(n=t.root,o="/",r=(n&&void 0===o?n.replace(/\s+$/,""):n&&o?n.replace(new RegExp("["+o+"]+$"),""):n)+"/"+r),r}},$.transforms=["template","query","root"],$.params=function(t){var e=[],n=encodeURIComponent;return e.add=function(t,e){l(e)&&(e=e()),null===e&&(e=""),this.push(n(t)+"="+n(e))},function t(e,n,o){var r,i=h(n),s=y(n);g(n,function(n,u){r=m(n)||h(n),o&&(u=o+"["+(s||r?u:"")+"]"),!o&&i?e.add(n.name,n.value):r?t(e,n,u):e.add(u,n)})}(e,t),e.join("&").replace(/%20/g,"+")},$.parse=function(t){var e=document.createElement("a");return document.documentMode&&(e.href=t,t=e.href),e.href=t,{href:e.href,protocol:e.protocol?e.protocol.replace(/:$/,""):"",port:e.port,host:e.host,hostname:e.hostname,pathname:"/"===e.pathname.charAt(0)?e.pathname:"/"+e.pathname,search:e.search?e.search.replace(/^\?/,""):"",hash:e.hash?e.hash.replace(/^#/,""):""}};var R=c&&"withCredentials"in new XMLHttpRequest;function A(t){return new o(function(e){var n,o,r=t.jsonp||"callback",i=t.jsonpCallback||"_jsonp"+Math.random().toString(36).substr(2),s=null;n=function(n){var r=n.type,u=0;"load"===r&&null!==s?u=200:"error"===r&&(u=500),u&&window[i]&&(delete window[i],document.body.removeChild(o)),e(t.respondWith(s,{status:u}))},window[i]=function(t){s=JSON.stringify(t)},t.abort=function(){n({type:"abort"})},t.params[r]=i,t.timeout&&setTimeout(t.abort,t.timeout),(o=document.createElement("script")).src=t.getUrl(),o.type="text/javascript",o.async=!0,o.onload=n,o.onerror=n,document.body.appendChild(o)})}function S(t){return new o(function(e){var n=new XMLHttpRequest,o=function(o){var r=t.respondWith("response"in n?n.response:n.responseText,{status:1223===n.status?204:n.status,statusText:1223===n.status?"No Content":f(n.statusText)});g(f(n.getAllResponseHeaders()).split("\n"),function(t){r.headers.append(t.slice(0,t.indexOf(":")),t.slice(t.indexOf(":")+1))}),e(r)};t.abort=function(){return n.abort()},n.open(t.method,t.getUrl(),!0),t.timeout&&(n.timeout=t.timeout),t.responseType&&"responseType"in n&&(n.responseType=t.responseType),(t.withCredentials||t.credentials)&&(n.withCredentials=!0),t.crossOrigin||t.headers.set("X-Requested-With","XMLHttpRequest"),l(t.progress)&&"GET"===t.method&&n.addEventListener("progress",t.progress),l(t.downloadProgress)&&n.addEventListener("progress",t.downloadProgress),l(t.progress)&&/^(POST|PUT)$/i.test(t.method)&&n.upload.addEventListener("progress",t.progress),l(t.uploadProgress)&&n.upload&&n.upload.addEventListener("progress",t.uploadProgress),t.headers.forEach(function(t,e){n.setRequestHeader(e,t)}),n.onload=o,n.onabort=o,n.onerror=o,n.ontimeout=o,n.send(t.getBody())})}function k(t){var e=require("got");return new o(function(n){var o,r=t.getUrl(),i=t.getBody(),s=t.method,u={};t.headers.forEach(function(t,e){u[e]=t}),e(r,{body:i,method:s,headers:u}).then(o=function(e){var o=t.respondWith(e.body,{status:e.statusCode,statusText:f(e.statusMessage)});g(e.headers,function(t,e){o.headers.set(e,t)}),n(o)},function(t){return o(t.response)})})}function I(t){return(t.client||(c?S:k))(t)}var L=function(t){var e=this;this.map={},g(t,function(t,n){return e.append(n,t)})};function q(t,e){return Object.keys(t).reduce(function(t,n){return p(e)===p(n)?n:t},null)}L.prototype.has=function(t){return null!==q(this.map,t)},L.prototype.get=function(t){var e=this.map[q(this.map,t)];return e?e.join():null},L.prototype.getAll=function(t){return this.map[q(this.map,t)]||[]},L.prototype.set=function(t,e){this.map[function(t){if(/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(t))throw new TypeError("Invalid character in header field name");return f(t)}(q(this.map,t)||t)]=[f(e)]},L.prototype.append=function(t,e){var n=this.map[q(this.map,t)];n?n.push(f(e)):this.set(t,e)},L.prototype.delete=function(t){delete this.map[q(this.map,t)]},L.prototype.deleteAll=function(){this.map={}},L.prototype.forEach=function(t,e){var n=this;g(this.map,function(o,r){g(o,function(o){return t.call(e,o,r,n)})})};var H=function(t,e){var n,r,i,s=e.url,u=e.headers,a=e.status,c=e.statusText;this.url=s,this.ok=a>=200&&a<300,this.status=a||0,this.statusText=c||"",this.headers=new L(u),this.body=t,d(t)?this.bodyText=t:(i=t,"undefined"!=typeof Blob&&i instanceof Blob&&(this.bodyBlob=t,(0===(r=t).type.indexOf("text")||-1!==r.type.indexOf("json"))&&(this.bodyText=(n=t,new o(function(t){var e=new FileReader;e.readAsText(n),e.onload=function(){t(e.result)}})))))};H.prototype.blob=function(){return v(this.bodyBlob)},H.prototype.text=function(){return v(this.bodyText)},H.prototype.json=function(){return v(this.text(),function(t){return JSON.parse(t)})},Object.defineProperty(H.prototype,"data",{get:function(){return this.body},set:function(t){this.body=t}});var B=function(t){var e;this.body=null,this.params={},w(this,t,{method:(e=t.method||"GET",e?e.toUpperCase():"")}),this.headers instanceof L||(this.headers=new L(this.headers))};B.prototype.getUrl=function(){return $(this)},B.prototype.getBody=function(){return this.body},B.prototype.respondWith=function(t,e){return new H(t,w(e||{},{url:this.getUrl()}))};var M={"Content-Type":"application/json;charset=utf-8"};function N(t){var e=this||{},n=function(t){var e=[I],n=[];function r(r){for(;e.length;){var i=e.pop();if(l(i)){var s=void 0,u=void 0;if(m(s=i.call(t,r,function(t){return u=t})||u))return new o(function(e,o){n.forEach(function(e){s=v(s,function(n){return e.call(t,n)||n},o)}),v(s,e,o)},t);l(s)&&n.unshift(s)}else c="Invalid interceptor of type "+typeof i+", must be a function","undefined"!=typeof console&&a&&console.warn("[VueResource warn]: "+c)}var c}return m(t)||(t=null),r.use=function(t){e.push(t)},r}(e.$vm);return function(t){u.call(arguments,1).forEach(function(e){for(var n in e)void 0===t[n]&&(t[n]=e[n])})}(t||{},e.$options,N.options),N.interceptors.forEach(function(t){d(t)&&(t=N.interceptor[t]),l(t)&&n.use(t)}),n(new B(t)).then(function(t){return t.ok?t:o.reject(t)},function(t){var e;return t instanceof Error&&(e=t,"undefined"!=typeof console&&console.error(e)),o.reject(t)})}function D(t,e,n,o){var r=this||{},i={};return g(n=w({},D.actions,n),function(n,s){n=T({url:t,params:w({},e)},o,n),i[s]=function(){return(r.$http||N)(function(t,e){var n,o=w({},t),r={};switch(e.length){case 2:r=e[0],n=e[1];break;case 1:/^(POST|PUT|PATCH)$/i.test(o.method)?n=e[0]:r=e[0];break;case 0:break;default:throw"Expected up to 2 arguments [params, body], got "+e.length+" arguments"}return o.body=n,o.params=w({},o.params,r),o}(n,arguments))}}),i}function J(t){var e,n,r;J.installed||(n=(e=t).config,r=e.nextTick,i=r,a=n.debug||!n.silent,t.url=$,t.http=N,t.resource=D,t.Promise=o,Object.defineProperties(t.prototype,{$url:{get:function(){return b(t.url,this,this.$options.url)}},$http:{get:function(){return b(t.http,this,this.$options.http)}},$resource:{get:function(){return t.resource.bind(this)}},$promise:{get:function(){var e=this;return function(n){return new t.Promise(n,e)}}}}))}return N.options={},N.headers={put:M,post:M,patch:M,delete:M,common:{Accept:"application/json, text/plain, */*"},custom:{}},N.interceptor={before:function(t){l(t.before)&&t.before.call(this,t)},method:function(t){t.emulateHTTP&&/^(PUT|PATCH|DELETE)$/i.test(t.method)&&(t.headers.set("X-HTTP-Method-Override",t.method),t.method="POST")},jsonp:function(t){"JSONP"==t.method&&(t.client=A)},json:function(t){var e=t.headers.get("Content-Type")||"";return m(t.body)&&0===e.indexOf("application/json")&&(t.body=JSON.stringify(t.body)),function(t){return t.bodyText?v(t.text(),function(e){var n,o;if(0===(t.headers.get("Content-Type")||"").indexOf("application/json")||(o=(n=e).match(/^\s*(\[|\{)/))&&{"[":/]\s*$/,"{":/}\s*$/}[o[1]].test(n))try{t.body=JSON.parse(e)}catch(e){t.body=null}else t.body=e;return t}):t}},form:function(t){var e;e=t.body,"undefined"!=typeof FormData&&e instanceof FormData?t.headers.delete("Content-Type"):m(t.body)&&t.emulateJSON&&(t.body=$.params(t.body),t.headers.set("Content-Type","application/x-www-form-urlencoded"))},header:function(t){g(w({},N.headers.common,t.crossOrigin?{}:N.headers.custom,N.headers[p(t.method)]),function(e,n){t.headers.has(n)||t.headers.set(n,e)})},cors:function(t){if(c){var e=$.parse(location.href),n=$.parse(t.getUrl());n.protocol===e.protocol&&n.host===e.host||(t.crossOrigin=!0,t.emulateHTTP=!1,R||(t.client=U))}}},N.interceptors=["before","method","jsonp","json","form","header","cors"],["get","delete","head","jsonp"].forEach(function(t){N[t]=function(e,n){return this(w(n||{},{url:e,method:t}))}}),["post","put","patch"].forEach(function(t){N[t]=function(e,n,o){return this(w(o||{},{url:e,method:t,body:n}))}}),D.actions={get:{method:"GET"},save:{method:"POST"},query:{method:"GET"},update:{method:"PUT"},remove:{method:"DELETE"},delete:{method:"DELETE"}},"undefined"!=typeof window&&window.Vue&&window.Vue.use(J),J});
\ No newline at end of file
+++ /dev/null
-{
- "name": "vue-resource",
- "version": "1.5.0",
- "main": "dist/vue-resource.common.js",
- "module": "dist/vue-resource.esm.js",
- "unpkg": "dist/vue-resource.min.js",
- "jsdelivr": "dist/vue-resource.min.js",
- "typings": "types/index.d.ts",
- "description": "The HTTP client for Vue.js",
- "homepage": "https://github.com/pagekit/vue-resource#readme",
- "license": "MIT",
- "keywords": [
- "vue",
- "xhr",
- "http",
- "ajax"
- ],
- "bugs": {
- "url": "https://github.com/pagekit/vue-resource/issues"
- },
- "repository": {
- "type": "git",
- "url": "git+https://github.com/pagekit/vue-resource.git"
- },
- "scripts": {
- "test": "jest --env=node",
- "karma": "karma start test/karma.conf.js --single-run",
- "build": "node build/build.js",
- "release": "node build/release.js",
- "webpack": "webpack --config test/webpack.config.js"
- },
- "browser": {
- "got": false
- },
- "dependencies": {
- "got": "^8.0.3"
- },
- "devDependencies": {
- "buble": "^0.19.1",
- "buble-loader": "^0.4.1",
- "eslint": "^4.17.0",
- "generate-release": "^0.14.0",
- "jasmine": "^3.0.0",
- "jasmine-core": "^3.1.0",
- "jest": "^22.2.2",
- "karma": "^2.0.0",
- "karma-chrome-launcher": "^2.2.0",
- "karma-firefox-launcher": "^1.1.0",
- "karma-jasmine": "^1.1.1",
- "karma-safari-launcher": "^1.0.0",
- "karma-webpack": "^2.0.9",
- "replace-in-file": "^3.1.1",
- "rollup": "^0.56.2",
- "rollup-plugin-buble": "^0.19.1",
- "uglify-js": "^3.3.10",
- "vue": "^2.5.13",
- "webpack": "^3.11.0"
- }
-}
+++ /dev/null
-/**
- * Base client.
- */
-
-import Promise from '../../promise';
-import xhrClient from './xhr';
-import nodeClient from './node';
-import {warn, when, isObject, isFunction, inBrowser} from '../../util';
-
-export default function (context) {
-
- const reqHandlers = [sendRequest], resHandlers = [];
-
- if (!isObject(context)) {
- context = null;
- }
-
- function Client(request) {
- while (reqHandlers.length) {
-
- const handler = reqHandlers.pop();
-
- if (isFunction(handler)) {
-
- let response, next;
-
- response = handler.call(context, request, val => next = val) || next;
-
- if (isObject(response)) {
- return new Promise((resolve, reject) => {
-
- resHandlers.forEach(handler => {
- response = when(response, response => {
- return handler.call(context, response) || response;
- }, reject);
- });
-
- when(response, resolve, reject);
-
- }, context);
- }
-
- if (isFunction(response)) {
- resHandlers.unshift(response);
- }
-
- } else {
- warn(`Invalid interceptor of type ${typeof handler}, must be a function`);
- }
- }
- }
-
- Client.use = handler => {
- reqHandlers.push(handler);
- };
-
- return Client;
-}
-
-function sendRequest(request) {
-
- const client = request.client || (inBrowser ? xhrClient : nodeClient);
-
- return client(request);
-}
+++ /dev/null
-/**
- * JSONP client (Browser).
- */
-
-import Promise from '../../promise';
-
-export default function (request) {
- return new Promise(resolve => {
-
- var name = request.jsonp || 'callback', callback = request.jsonpCallback || '_jsonp' + Math.random().toString(36).substr(2), body = null, handler, script;
-
- handler = ({type}) => {
-
- var status = 0;
-
- if (type === 'load' && body !== null) {
- status = 200;
- } else if (type === 'error') {
- status = 500;
- }
-
- if (status && window[callback]) {
- delete window[callback];
- document.body.removeChild(script);
- }
-
- resolve(request.respondWith(body, {status}));
- };
-
- window[callback] = result => {
- body = JSON.stringify(result);
- };
-
- request.abort = () => {
- handler({type: 'abort'});
- };
-
- request.params[name] = callback;
-
- if (request.timeout) {
- setTimeout(request.abort, request.timeout);
- }
-
- script = document.createElement('script');
- script.src = request.getUrl();
- script.type = 'text/javascript';
- script.async = true;
- script.onload = handler;
- script.onerror = handler;
-
- document.body.appendChild(script);
- });
-}
+++ /dev/null
-/**
- * Http client (Node).
- */
-
-import Promise from '../../promise';
-import {each, trim} from '../../util';
-
-export default function (request) {
-
- const client = require('got');
-
- return new Promise(resolve => {
-
- var url = request.getUrl();
- var body = request.getBody();
- var method = request.method;
- var headers = {}, handler;
-
- request.headers.forEach((value, name) => {
- headers[name] = value;
- });
-
- client(url, {body, method, headers}).then(handler = (resp) => {
-
- var response = request.respondWith(resp.body, {
- status: resp.statusCode,
- statusText: trim(resp.statusMessage)
- });
-
- each(resp.headers, (value, name) => {
- response.headers.set(name, value);
- });
-
- resolve(response);
-
- }, error => handler(error.response));
- });
-}
+++ /dev/null
-/**
- * XDomain client (Internet Explorer).
- */
-
-import Promise from '../../promise';
-
-export default function (request) {
- return new Promise(resolve => {
-
- var xdr = new XDomainRequest(), handler = ({type}) => {
-
- var status = 0;
-
- if (type === 'load') {
- status = 200;
- } else if (type === 'error') {
- status = 500;
- }
-
- resolve(request.respondWith(xdr.responseText, {status}));
- };
-
- request.abort = () => xdr.abort();
-
- xdr.open(request.method, request.getUrl());
-
- if (request.timeout) {
- xdr.timeout = request.timeout;
- }
-
- xdr.onload = handler;
- xdr.onabort = handler;
- xdr.onerror = handler;
- xdr.ontimeout = handler;
- xdr.onprogress = () => {};
- xdr.send(request.getBody());
- });
-}
+++ /dev/null
-/**
- * XMLHttp client (Browser).
- */
-
-import Promise from '../../promise';
-import {each, trim, isFunction} from '../../util';
-
-export default function (request) {
- return new Promise(resolve => {
-
- var xhr = new XMLHttpRequest(), handler = (event) => {
-
- var response = request.respondWith(
- 'response' in xhr ? xhr.response : xhr.responseText, {
- status: xhr.status === 1223 ? 204 : xhr.status, // IE9 status bug
- statusText: xhr.status === 1223 ? 'No Content' : trim(xhr.statusText)
- });
-
- each(trim(xhr.getAllResponseHeaders()).split('\n'), row => {
- response.headers.append(row.slice(0, row.indexOf(':')), row.slice(row.indexOf(':') + 1));
- });
-
- resolve(response);
- };
-
- request.abort = () => xhr.abort();
-
- xhr.open(request.method, request.getUrl(), true);
-
- if (request.timeout) {
- xhr.timeout = request.timeout;
- }
-
- if (request.responseType && 'responseType' in xhr) {
- xhr.responseType = request.responseType;
- }
-
- if (request.withCredentials || request.credentials) {
- xhr.withCredentials = true;
- }
-
- if (!request.crossOrigin) {
- request.headers.set('X-Requested-With', 'XMLHttpRequest');
- }
-
- // deprecated use downloadProgress
- if (isFunction(request.progress) && request.method === 'GET') {
- xhr.addEventListener('progress', request.progress);
- }
-
- if (isFunction(request.downloadProgress)) {
- xhr.addEventListener('progress', request.downloadProgress);
- }
-
- // deprecated use uploadProgress
- if (isFunction(request.progress) && /^(POST|PUT)$/i.test(request.method)) {
- xhr.upload.addEventListener('progress', request.progress);
- }
-
- if (isFunction(request.uploadProgress) && xhr.upload) {
- xhr.upload.addEventListener('progress', request.uploadProgress);
- }
-
- request.headers.forEach((value, name) => {
- xhr.setRequestHeader(name, value);
- });
-
- xhr.onload = handler;
- xhr.onabort = handler;
- xhr.onerror = handler;
- xhr.ontimeout = handler;
- xhr.send(request.getBody());
- });
-}
+++ /dev/null
-/**
- * HTTP Headers.
- */
-
-import {each, trim, toLower} from '../util';
-
-export default class Headers {
-
- constructor(headers) {
-
- this.map = {};
-
- each(headers, (value, name) => this.append(name, value));
- }
-
- has(name) {
- return getName(this.map, name) !== null;
- }
-
- get(name) {
-
- var list = this.map[getName(this.map, name)];
-
- return list ? list.join() : null;
- }
-
- getAll(name) {
- return this.map[getName(this.map, name)] || [];
- }
-
- set(name, value) {
- this.map[normalizeName(getName(this.map, name) || name)] = [trim(value)];
- }
-
- append(name, value) {
-
- var list = this.map[getName(this.map, name)];
-
- if (list) {
- list.push(trim(value));
- } else {
- this.set(name, value);
- }
- }
-
- delete(name) {
- delete this.map[getName(this.map, name)];
- }
-
- deleteAll() {
- this.map = {};
- }
-
- forEach(callback, thisArg) {
- each(this.map, (list, name) => {
- each(list, value => callback.call(thisArg, value, name, this));
- });
- }
-
-}
-
-function getName(map, name) {
- return Object.keys(map).reduce((prev, curr) => {
- return toLower(name) === toLower(curr) ? curr : prev;
- }, null);
-}
-
-function normalizeName(name) {
-
- if (/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(name)) {
- throw new TypeError('Invalid character in header field name');
- }
-
- return trim(name);
-}
+++ /dev/null
-/**
- * Service for sending network requests.
- */
-
-const COMMON_HEADERS = {'Accept': 'application/json, text/plain, */*'};
-const JSON_CONTENT_TYPE = {'Content-Type': 'application/json;charset=utf-8'};
-
-import cors from './interceptor/cors';
-import form from './interceptor/form';
-import json from './interceptor/json';
-import jsonp from './interceptor/jsonp';
-import before from './interceptor/before';
-import method from './interceptor/method';
-import header from './interceptor/header';
-import Client from './client/index';
-import Request from './request';
-import Promise from '../promise';
-import {assign, defaults, error, isString, isFunction} from '../util';
-
-export default function Http(options) {
-
- var self = this || {}, client = Client(self.$vm);
-
- defaults(options || {}, self.$options, Http.options);
-
- Http.interceptors.forEach(handler => {
-
- if (isString(handler)) {
- handler = Http.interceptor[handler];
- }
-
- if (isFunction(handler)) {
- client.use(handler);
- }
-
- });
-
- return client(new Request(options)).then(response => {
-
- return response.ok ? response : Promise.reject(response);
-
- }, response => {
-
- if (response instanceof Error) {
- error(response);
- }
-
- return Promise.reject(response);
- });
-}
-
-Http.options = {};
-
-Http.headers = {
- put: JSON_CONTENT_TYPE,
- post: JSON_CONTENT_TYPE,
- patch: JSON_CONTENT_TYPE,
- delete: JSON_CONTENT_TYPE,
- common: COMMON_HEADERS,
- custom: {}
-};
-
-Http.interceptor = {before, method, jsonp, json, form, header, cors};
-Http.interceptors = ['before', 'method', 'jsonp', 'json', 'form', 'header', 'cors'];
-
-['get', 'delete', 'head', 'jsonp'].forEach(method => {
-
- Http[method] = function (url, options) {
- return this(assign(options || {}, {url, method}));
- };
-
-});
-
-['post', 'put', 'patch'].forEach(method => {
-
- Http[method] = function (url, body, options) {
- return this(assign(options || {}, {url, method, body}));
- };
-
-});
+++ /dev/null
-/**
- * Before Interceptor.
- */
-
-import {isFunction} from '../../util';
-
-export default function (request) {
-
- if (isFunction(request.before)) {
- request.before.call(this, request);
- }
-
-}
+++ /dev/null
-/**
- * CORS Interceptor.
- */
-
-import Url from '../../url/index';
-import xdrClient from '../client/xdr';
-import {inBrowser} from '../../util';
-
-const SUPPORTS_CORS = inBrowser && 'withCredentials' in new XMLHttpRequest();
-
-export default function (request) {
-
- if (inBrowser) {
-
- const orgUrl = Url.parse(location.href);
- const reqUrl = Url.parse(request.getUrl());
-
- if (reqUrl.protocol !== orgUrl.protocol || reqUrl.host !== orgUrl.host) {
-
- request.crossOrigin = true;
- request.emulateHTTP = false;
-
- if (!SUPPORTS_CORS) {
- request.client = xdrClient;
- }
- }
- }
-
-}
+++ /dev/null
-/**
- * Form data Interceptor.
- */
-
-import Url from '../../url/index';
-import {isObject, isFormData} from '../../util';
-
-export default function (request) {
-
- if (isFormData(request.body)) {
- request.headers.delete('Content-Type');
- } else if (isObject(request.body) && request.emulateJSON) {
- request.body = Url.params(request.body);
- request.headers.set('Content-Type', 'application/x-www-form-urlencoded');
- }
-
-}
+++ /dev/null
-/**
- * Header Interceptor.
- */
-
-import Http from '../index';
-import {assign, each, toLower} from '../../util';
-
-export default function (request) {
-
- const headers = assign({}, Http.headers.common,
- !request.crossOrigin ? Http.headers.custom : {},
- Http.headers[toLower(request.method)]
- );
-
- each(headers, (value, name) => {
- if (!request.headers.has(name)) {
- request.headers.set(name, value);
- }
- });
-
-}
+++ /dev/null
-/**
- * JSON Interceptor.
- */
-
-import {when, isObject} from '../../util';
-
-export default function (request) {
-
- const type = request.headers.get('Content-Type') || '';
-
- if (isObject(request.body) && type.indexOf('application/json') === 0) {
- request.body = JSON.stringify(request.body);
- }
-
- return response => {
-
- return response.bodyText ? when(response.text(), text => {
-
- const type = response.headers.get('Content-Type') || '';
-
- if (type.indexOf('application/json') === 0 || isJson(text)) {
-
- try {
- response.body = JSON.parse(text);
- } catch (e) {
- response.body = null;
- }
-
- } else {
- response.body = text;
- }
-
- return response;
-
- }) : response;
-
- };
-}
-
-function isJson(str) {
-
- const start = str.match(/^\s*(\[|\{)/);
- const end = {'[': /]\s*$/, '{': /}\s*$/};
-
- return start && end[start[1]].test(str);
-}
+++ /dev/null
-/**
- * JSONP Interceptor.
- */
-
-import jsonpClient from '../client/jsonp';
-
-export default function (request) {
-
- if (request.method == 'JSONP') {
- request.client = jsonpClient;
- }
-
-}
+++ /dev/null
-/**
- * HTTP method override Interceptor.
- */
-
-export default function (request) {
-
- if (request.emulateHTTP && /^(PUT|PATCH|DELETE)$/i.test(request.method)) {
- request.headers.set('X-HTTP-Method-Override', request.method);
- request.method = 'POST';
- }
-
-}
+++ /dev/null
-/**
- * HTTP Request.
- */
-
-import Url from '../url/index';
-import Headers from './headers';
-import Response from './response';
-import {assign, toUpper} from '../util';
-
-export default class Request {
-
- constructor(options) {
-
- this.body = null;
- this.params = {};
-
- assign(this, options, {
- method: toUpper(options.method || 'GET')
- });
-
- if (!(this.headers instanceof Headers)) {
- this.headers = new Headers(this.headers);
- }
- }
-
- getUrl() {
- return Url(this);
- }
-
- getBody() {
- return this.body;
- }
-
- respondWith(body, options) {
- return new Response(body, assign(options || {}, {url: this.getUrl()}));
- }
-
-}
+++ /dev/null
-/**
- * HTTP Response.
- */
-
-import Headers from './headers';
-import Promise from '../promise';
-import {when, isBlob, isString} from '../util';
-
-export default class Response {
-
- constructor(body, {url, headers, status, statusText}) {
-
- this.url = url;
- this.ok = status >= 200 && status < 300;
- this.status = status || 0;
- this.statusText = statusText || '';
- this.headers = new Headers(headers);
- this.body = body;
-
- if (isString(body)) {
-
- this.bodyText = body;
-
- } else if (isBlob(body)) {
-
- this.bodyBlob = body;
-
- if (isBlobText(body)) {
- this.bodyText = blobText(body);
- }
- }
- }
-
- blob() {
- return when(this.bodyBlob);
- }
-
- text() {
- return when(this.bodyText);
- }
-
- json() {
- return when(this.text(), text => JSON.parse(text));
- }
-
-}
-
-Object.defineProperty(Response.prototype, 'data', {
-
- get() {
- return this.body;
- },
-
- set(body) {
- this.body = body;
- }
-
-});
-
-function blobText(body) {
- return new Promise((resolve) => {
-
- var reader = new FileReader();
-
- reader.readAsText(body);
- reader.onload = () => {
- resolve(reader.result);
- };
-
- });
-}
-
-function isBlobText(body) {
- return body.type.indexOf('text') === 0 || body.type.indexOf('json') !== -1;
-}
+++ /dev/null
-/**
- * Install plugin.
- */
-
-import Url from './url/index';
-import Http from './http/index';
-import Promise from './promise';
-import Resource from './resource';
-import Util, {options} from './util';
-
-function plugin(Vue) {
-
- if (plugin.installed) {
- return;
- }
-
- Util(Vue);
-
- Vue.url = Url;
- Vue.http = Http;
- Vue.resource = Resource;
- Vue.Promise = Promise;
-
- Object.defineProperties(Vue.prototype, {
-
- $url: {
- get() {
- return options(Vue.url, this, this.$options.url);
- }
- },
-
- $http: {
- get() {
- return options(Vue.http, this, this.$options.http);
- }
- },
-
- $resource: {
- get() {
- return Vue.resource.bind(this);
- }
- },
-
- $promise: {
- get() {
- return (executor) => new Vue.Promise(executor, this);
- }
- }
-
- });
-}
-
-if (typeof window !== 'undefined' && window.Vue) {
- window.Vue.use(plugin);
-}
-
-export default plugin;
+++ /dev/null
-/**
- * Promises/A+ polyfill v1.1.4 (https://github.com/bramstein/promis)
- */
-
-const RESOLVED = 0;
-const REJECTED = 1;
-const PENDING = 2;
-
-import {nextTick} from '../util';
-
-export default function Promise(executor) {
-
- this.state = PENDING;
- this.value = undefined;
- this.deferred = [];
-
- var promise = this;
-
- try {
- executor(function (x) {
- promise.resolve(x);
- }, function (r) {
- promise.reject(r);
- });
- } catch (e) {
- promise.reject(e);
- }
-}
-
-Promise.reject = function (r) {
- return new Promise(function (resolve, reject) {
- reject(r);
- });
-};
-
-Promise.resolve = function (x) {
- return new Promise(function (resolve, reject) {
- resolve(x);
- });
-};
-
-Promise.all = function all(iterable) {
- return new Promise(function (resolve, reject) {
- var count = 0, result = [];
-
- if (iterable.length === 0) {
- resolve(result);
- }
-
- function resolver(i) {
- return function (x) {
- result[i] = x;
- count += 1;
-
- if (count === iterable.length) {
- resolve(result);
- }
- };
- }
-
- for (var i = 0; i < iterable.length; i += 1) {
- Promise.resolve(iterable[i]).then(resolver(i), reject);
- }
- });
-};
-
-Promise.race = function race(iterable) {
- return new Promise(function (resolve, reject) {
- for (var i = 0; i < iterable.length; i += 1) {
- Promise.resolve(iterable[i]).then(resolve, reject);
- }
- });
-};
-
-var p = Promise.prototype;
-
-p.resolve = function resolve(x) {
- var promise = this;
-
- if (promise.state === PENDING) {
- if (x === promise) {
- throw new TypeError('Promise settled with itself.');
- }
-
- var called = false;
-
- try {
- var then = x && x['then'];
-
- if (x !== null && typeof x === 'object' && typeof then === 'function') {
- then.call(x, function (x) {
- if (!called) {
- promise.resolve(x);
- }
- called = true;
-
- }, function (r) {
- if (!called) {
- promise.reject(r);
- }
- called = true;
- });
- return;
- }
- } catch (e) {
- if (!called) {
- promise.reject(e);
- }
- return;
- }
-
- promise.state = RESOLVED;
- promise.value = x;
- promise.notify();
- }
-};
-
-p.reject = function reject(reason) {
- var promise = this;
-
- if (promise.state === PENDING) {
- if (reason === promise) {
- throw new TypeError('Promise settled with itself.');
- }
-
- promise.state = REJECTED;
- promise.value = reason;
- promise.notify();
- }
-};
-
-p.notify = function notify() {
- var promise = this;
-
- nextTick(function () {
- if (promise.state !== PENDING) {
- while (promise.deferred.length) {
- var deferred = promise.deferred.shift(),
- onResolved = deferred[0],
- onRejected = deferred[1],
- resolve = deferred[2],
- reject = deferred[3];
-
- try {
- if (promise.state === RESOLVED) {
- if (typeof onResolved === 'function') {
- resolve(onResolved.call(undefined, promise.value));
- } else {
- resolve(promise.value);
- }
- } else if (promise.state === REJECTED) {
- if (typeof onRejected === 'function') {
- resolve(onRejected.call(undefined, promise.value));
- } else {
- reject(promise.value);
- }
- }
- } catch (e) {
- reject(e);
- }
- }
- }
- });
-};
-
-p.then = function then(onResolved, onRejected) {
- var promise = this;
-
- return new Promise(function (resolve, reject) {
- promise.deferred.push([onResolved, onRejected, resolve, reject]);
- promise.notify();
- });
-};
-
-p.catch = function (onRejected) {
- return this.then(undefined, onRejected);
-};
+++ /dev/null
-/**
- * URL Template v2.0.6 (https://github.com/bramstein/url-template)
- */
-
-export function expand(url, params, variables) {
-
- var tmpl = parse(url), expanded = tmpl.expand(params);
-
- if (variables) {
- variables.push.apply(variables, tmpl.vars);
- }
-
- return expanded;
-}
-
-export function parse(template) {
-
- var operators = ['+', '#', '.', '/', ';', '?', '&'], variables = [];
-
- return {
- vars: variables,
- expand(context) {
- return template.replace(/\{([^{}]+)\}|([^{}]+)/g, (_, expression, literal) => {
- if (expression) {
-
- var operator = null, values = [];
-
- if (operators.indexOf(expression.charAt(0)) !== -1) {
- operator = expression.charAt(0);
- expression = expression.substr(1);
- }
-
- expression.split(/,/g).forEach((variable) => {
- var tmp = /([^:*]*)(?::(\d+)|(\*))?/.exec(variable);
- values.push.apply(values, getValues(context, operator, tmp[1], tmp[2] || tmp[3]));
- variables.push(tmp[1]);
- });
-
- if (operator && operator !== '+') {
-
- var separator = ',';
-
- if (operator === '?') {
- separator = '&';
- } else if (operator !== '#') {
- separator = operator;
- }
-
- return (values.length !== 0 ? operator : '') + values.join(separator);
- } else {
- return values.join(',');
- }
-
- } else {
- return encodeReserved(literal);
- }
- });
- }
- };
-}
-
-function getValues(context, operator, key, modifier) {
-
- var value = context[key], result = [];
-
- if (isDefined(value) && value !== '') {
- if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {
- value = value.toString();
-
- if (modifier && modifier !== '*') {
- value = value.substring(0, parseInt(modifier, 10));
- }
-
- result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : null));
- } else {
- if (modifier === '*') {
- if (Array.isArray(value)) {
- value.filter(isDefined).forEach((value) => {
- result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : null));
- });
- } else {
- Object.keys(value).forEach((k) => {
- if (isDefined(value[k])) {
- result.push(encodeValue(operator, value[k], k));
- }
- });
- }
- } else {
- var tmp = [];
-
- if (Array.isArray(value)) {
- value.filter(isDefined).forEach((value) => {
- tmp.push(encodeValue(operator, value));
- });
- } else {
- Object.keys(value).forEach((k) => {
- if (isDefined(value[k])) {
- tmp.push(encodeURIComponent(k));
- tmp.push(encodeValue(operator, value[k].toString()));
- }
- });
- }
-
- if (isKeyOperator(operator)) {
- result.push(encodeURIComponent(key) + '=' + tmp.join(','));
- } else if (tmp.length !== 0) {
- result.push(tmp.join(','));
- }
- }
- }
- } else {
- if (operator === ';') {
- result.push(encodeURIComponent(key));
- } else if (value === '' && (operator === '&' || operator === '?')) {
- result.push(encodeURIComponent(key) + '=');
- } else if (value === '') {
- result.push('');
- }
- }
-
- return result;
-}
-
-function isDefined(value) {
- return value !== undefined && value !== null;
-}
-
-function isKeyOperator(operator) {
- return operator === ';' || operator === '&' || operator === '?';
-}
-
-function encodeValue(operator, value, key) {
-
- value = (operator === '+' || operator === '#') ? encodeReserved(value) : encodeURIComponent(value);
-
- if (key) {
- return encodeURIComponent(key) + '=' + value;
- } else {
- return value;
- }
-}
-
-function encodeReserved(str) {
- return str.split(/(%[0-9A-Fa-f]{2})/g).map((part) => {
- if (!/%[0-9A-Fa-f]/.test(part)) {
- part = encodeURI(part);
- }
- return part;
- }).join('');
-}
+++ /dev/null
-/**
- * Promise adapter.
- */
-
-import PromiseLib from './lib/promise';
-
-if (typeof Promise === 'undefined') {
- window.Promise = PromiseLib;
-}
-
-export default function PromiseObj(executor, context) {
-
- if (executor instanceof Promise) {
- this.promise = executor;
- } else {
- this.promise = new Promise(executor.bind(context));
- }
-
- this.context = context;
-}
-
-PromiseObj.all = function (iterable, context) {
- return new PromiseObj(Promise.all(iterable), context);
-};
-
-PromiseObj.resolve = function (value, context) {
- return new PromiseObj(Promise.resolve(value), context);
-};
-
-PromiseObj.reject = function (reason, context) {
- return new PromiseObj(Promise.reject(reason), context);
-};
-
-PromiseObj.race = function (iterable, context) {
- return new PromiseObj(Promise.race(iterable), context);
-};
-
-var p = PromiseObj.prototype;
-
-p.bind = function (context) {
- this.context = context;
- return this;
-};
-
-p.then = function (fulfilled, rejected) {
-
- if (fulfilled && fulfilled.bind && this.context) {
- fulfilled = fulfilled.bind(this.context);
- }
-
- if (rejected && rejected.bind && this.context) {
- rejected = rejected.bind(this.context);
- }
-
- return new PromiseObj(this.promise.then(fulfilled, rejected), this.context);
-};
-
-p.catch = function (rejected) {
-
- if (rejected && rejected.bind && this.context) {
- rejected = rejected.bind(this.context);
- }
-
- return new PromiseObj(this.promise.catch(rejected), this.context);
-};
-
-p.finally = function (callback) {
-
- return this.then(function (value) {
- callback.call(this);
- return value;
- }, function (reason) {
- callback.call(this);
- return Promise.reject(reason);
- }
- );
-};
+++ /dev/null
-/**
- * Service for interacting with RESTful services.
- */
-
-import Http from './http/index';
-import {assign, each, merge} from './util';
-
-export default function Resource(url, params, actions, options) {
-
- var self = this || {}, resource = {};
-
- actions = assign({},
- Resource.actions,
- actions
- );
-
- each(actions, (action, name) => {
-
- action = merge({url, params: assign({}, params)}, options, action);
-
- resource[name] = function () {
- return (self.$http || Http)(opts(action, arguments));
- };
- });
-
- return resource;
-}
-
-function opts(action, args) {
-
- var options = assign({}, action), params = {}, body;
-
- switch (args.length) {
-
- case 2:
-
- params = args[0];
- body = args[1];
-
- break;
-
- case 1:
-
- if (/^(POST|PUT|PATCH)$/i.test(options.method)) {
- body = args[0];
- } else {
- params = args[0];
- }
-
- break;
-
- case 0:
-
- break;
-
- default:
-
- throw 'Expected up to 2 arguments [params, body], got ' + args.length + ' arguments';
- }
-
- options.body = body;
- options.params = assign({}, options.params, params);
-
- return options;
-}
-
-Resource.actions = {
-
- get: {method: 'GET'},
- save: {method: 'POST'},
- query: {method: 'GET'},
- update: {method: 'PUT'},
- remove: {method: 'DELETE'},
- delete: {method: 'DELETE'}
-
-};
+++ /dev/null
-/**
- * Service for URL templating.
- */
-
-import root from './root';
-import query from './query';
-import template from './template';
-import {each, merge, isArray, isFunction, isObject, isPlainObject, isString} from '../util';
-
-export default function Url(url, params) {
-
- var self = this || {}, options = url, transform;
-
- if (isString(url)) {
- options = {url, params};
- }
-
- options = merge({}, Url.options, self.$options, options);
-
- Url.transforms.forEach(handler => {
-
- if (isString(handler)) {
- handler = Url.transform[handler];
- }
-
- if (isFunction(handler)) {
- transform = factory(handler, transform, self.$vm);
- }
-
- });
-
- return transform(options);
-}
-
-/**
- * Url options.
- */
-
-Url.options = {
- url: '',
- root: null,
- params: {}
-};
-
-/**
- * Url transforms.
- */
-
-Url.transform = {template, query, root};
-Url.transforms = ['template', 'query', 'root'];
-
-/**
- * Encodes a Url parameter string.
- *
- * @param {Object} obj
- */
-
-Url.params = function (obj) {
-
- var params = [], escape = encodeURIComponent;
-
- params.add = function (key, value) {
-
- if (isFunction(value)) {
- value = value();
- }
-
- if (value === null) {
- value = '';
- }
-
- this.push(escape(key) + '=' + escape(value));
- };
-
- serialize(params, obj);
-
- return params.join('&').replace(/%20/g, '+');
-};
-
-/**
- * Parse a URL and return its components.
- *
- * @param {String} url
- */
-
-Url.parse = function (url) {
-
- var el = document.createElement('a');
-
- if (document.documentMode) {
- el.href = url;
- url = el.href;
- }
-
- el.href = url;
-
- return {
- href: el.href,
- protocol: el.protocol ? el.protocol.replace(/:$/, '') : '',
- port: el.port,
- host: el.host,
- hostname: el.hostname,
- pathname: el.pathname.charAt(0) === '/' ? el.pathname : '/' + el.pathname,
- search: el.search ? el.search.replace(/^\?/, '') : '',
- hash: el.hash ? el.hash.replace(/^#/, '') : ''
- };
-};
-
-function factory(handler, next, vm) {
- return options => {
- return handler.call(vm, options, next);
- };
-}
-
-function serialize(params, obj, scope) {
-
- var array = isArray(obj), plain = isPlainObject(obj), hash;
-
- each(obj, (value, key) => {
-
- hash = isObject(value) || isArray(value);
-
- if (scope) {
- key = scope + '[' + (plain || hash ? key : '') + ']';
- }
-
- if (!scope && array) {
- params.add(value.name, value.value);
- } else if (hash) {
- serialize(params, value, key);
- } else {
- params.add(key, value);
- }
- });
-}
+++ /dev/null
-/**
- * Query Parameter Transform.
- */
-
-import Url from './index';
-import {each} from '../util';
-
-export default function (options, next) {
-
- var urlParams = Object.keys(Url.options.params), query = {}, url = next(options);
-
- each(options.params, (value, key) => {
- if (urlParams.indexOf(key) === -1) {
- query[key] = value;
- }
- });
-
- query = Url.params(query);
-
- if (query) {
- url += (url.indexOf('?') == -1 ? '?' : '&') + query;
- }
-
- return url;
-}
+++ /dev/null
-/**
- * Root Prefix Transform.
- */
-
-import {isString, trimEnd} from '../util';
-
-export default function (options, next) {
-
- var url = next(options);
-
- if (isString(options.root) && !/^(https?:)?\//.test(url)) {
- url = trimEnd(options.root, '/') + '/' + url;
- }
-
- return url;
-}
+++ /dev/null
-/**
- * URL Template (RFC 6570) Transform.
- */
-
-import {expand} from '../lib/url-template';
-
-export default function (options) {
-
- var variables = [], url = expand(options.url, options.params, variables);
-
- variables.forEach((key) => {
- delete options.params[key];
- });
-
- return url;
-}
+++ /dev/null
-/**
- * Utility functions.
- */
-
-import Promise from './promise';
-
-var {hasOwnProperty} = {}, {slice} = [], debug = false, ntick;
-
-export const inBrowser = typeof window !== 'undefined';
-
-export default function ({config, nextTick}) {
- ntick = nextTick;
- debug = config.debug || !config.silent;
-}
-
-export function warn(msg) {
- if (typeof console !== 'undefined' && debug) {
- console.warn('[VueResource warn]: ' + msg);
- }
-}
-
-export function error(msg) {
- if (typeof console !== 'undefined') {
- console.error(msg);
- }
-}
-
-export function nextTick(cb, ctx) {
- return ntick(cb, ctx);
-}
-
-export function trim(str) {
- return str ? str.replace(/^\s*|\s*$/g, '') : '';
-}
-
-export function trimEnd(str, chars) {
-
- if (str && chars === undefined) {
- return str.replace(/\s+$/, '');
- }
-
- if (!str || !chars) {
- return str;
- }
-
- return str.replace(new RegExp(`[${chars}]+$`), '');
-}
-
-export function toLower(str) {
- return str ? str.toLowerCase() : '';
-}
-
-export function toUpper(str) {
- return str ? str.toUpperCase() : '';
-}
-
-export const isArray = Array.isArray;
-
-export function isString(val) {
- return typeof val === 'string';
-}
-
-export function isBoolean(val) {
- return val === true || val === false;
-}
-
-export function isFunction(val) {
- return typeof val === 'function';
-}
-
-export function isObject(obj) {
- return obj !== null && typeof obj === 'object';
-}
-
-export function isPlainObject(obj) {
- return isObject(obj) && Object.getPrototypeOf(obj) == Object.prototype;
-}
-
-export function isBlob(obj) {
- return typeof Blob !== 'undefined' && obj instanceof Blob;
-}
-
-export function isFormData(obj) {
- return typeof FormData !== 'undefined' && obj instanceof FormData;
-}
-
-export function when(value, fulfilled, rejected) {
-
- var promise = Promise.resolve(value);
-
- if (arguments.length < 2) {
- return promise;
- }
-
- return promise.then(fulfilled, rejected);
-}
-
-export function options(fn, obj, opts) {
-
- opts = opts || {};
-
- if (isFunction(opts)) {
- opts = opts.call(obj);
- }
-
- return merge(fn.bind({$vm: obj, $options: opts}), fn, {$options: opts});
-}
-
-export function each(obj, iterator) {
-
- var i, key;
-
- if (isArray(obj)) {
- for (i = 0; i < obj.length; i++) {
- iterator.call(obj[i], obj[i], i);
- }
- } else if (isObject(obj)) {
- for (key in obj) {
- if (hasOwnProperty.call(obj, key)) {
- iterator.call(obj[key], obj[key], key);
- }
- }
- }
-
- return obj;
-}
-
-export const assign = Object.assign || _assign;
-
-export function merge(target) {
-
- var args = slice.call(arguments, 1);
-
- args.forEach(source => {
- _merge(target, source, true);
- });
-
- return target;
-}
-
-export function defaults(target) {
-
- var args = slice.call(arguments, 1);
-
- args.forEach(source => {
-
- for (var key in source) {
- if (target[key] === undefined) {
- target[key] = source[key];
- }
- }
-
- });
-
- return target;
-}
-
-function _assign(target) {
-
- var args = slice.call(arguments, 1);
-
- args.forEach(source => {
- _merge(target, source);
- });
-
- return target;
-}
-
-function _merge(target, source, deep) {
- for (var key in source) {
- if (deep && (isPlainObject(source[key]) || isArray(source[key]))) {
- if (isPlainObject(source[key]) && !isPlainObject(target[key])) {
- target[key] = {};
- }
- if (isArray(source[key]) && !isArray(target[key])) {
- target[key] = [];
- }
- _merge(target[key], source[key], deep);
- } else if (source[key] !== undefined) {
- target[key] = source[key];
- }
- }
-}
+++ /dev/null
-invalid
\ No newline at end of file
+++ /dev/null
-text
\ No newline at end of file
+++ /dev/null
-{"foo": "bar"}
\ No newline at end of file
+++ /dev/null
-import Vue from 'vue';
-
-describe('Vue.http', function () {
-
- it('get("data/text.txt")', done => {
-
- Vue.http.get('data/text.txt').then(res => {
-
- expect(res.ok).toBe(true);
- expect(res.status).toBe(200);
- expect(res.body).toBe('text');
- expect(res.data).toBe(res.body);
- expect(res.headers.get('Content-Type')).toBe('text/plain');
-
- done();
- });
-
- });
-
- it('get("data/valid.json")', done => {
-
- Vue.http.get('data/valid.json').then(res => {
-
- expect(res.ok).toBe(true);
- expect(res.status).toBe(200);
- expect(typeof res.body).toBe('object');
- expect(res.body.foo).toBe('bar');
-
- done();
- });
-
- });
-
- it('get("data/invalid.json")', done => {
-
- Vue.http.get('data/invalid.json').then(res => {
-
- expect(res.ok).toBe(true);
- expect(res.status).toBe(200);
- expect(res.body).toBeNull();
-
- done();
- });
-
- });
-
- it('get("github.com/avatar")', done => {
-
- Vue.http.get('https://avatars1.githubusercontent.com/u/6128107', {responseType: 'blob'}).then(res => {
-
- expect(res.ok).toBe(true);
- expect(res.status).toBe(200);
- expect(res.body instanceof Blob).toBe(true);
- expect(res.body.type).toBe('image/png');
-
- done();
- });
-
- });
-
- it('get("cors-api.appspot.com")', done => {
-
- Vue.http.get('http://server.cors-api.appspot.com/server?id=1&enable=true').then(res => {
-
- expect(res.ok).toBe(true);
- expect(res.status).toBe(200);
- expect(typeof res.body).toBe('object');
- expect(res.body.shift().requestType).toBe('cors');
-
- if (res.headers.get('Content-Type')) {
- expect(res.headers.get('Content-Type')).toBe('application/json');
- }
-
- done();
- });
-
- });
-
- it('jsonp("jsfiddle.net/jsonp")', done => {
-
- Vue.http.jsonp('http://jsfiddle.net/echo/jsonp/', {params: {foo: 'bar'}}).then(res => {
-
- expect(res.ok).toBe(true);
- expect(res.status).toBe(200);
- expect(typeof res.body).toBe('object');
- expect(res.body.foo).toBe('bar');
-
- done();
- });
-
- });
-
-});
-
-describe('this.$http', function () {
-
- it('get("data/valid.json")', done => {
-
- var vm = new Vue({
-
- created() {
-
- this.$http.get('data/valid.json').then(res => {
-
- expect(this).toBe(vm);
- expect(res.ok).toBe(true);
- expect(res.status).toBe(200);
- expect(typeof res.body).toBe('object');
- expect(res.body.foo).toBe('bar');
-
- done();
-
- });
-
- }
-
- });
-
- });
-
- it('get("data/valid.json") with timeout', done => {
-
- var vm = new Vue({
-
- created() {
-
- var random = Math.random().toString(36).substr(2);
-
- this.$http.get(`data/valid.json?${random}`, {timeout: 1}).then(res => {
-
- fail('Callback has been called');
-
- }, res => {
-
- expect(res.ok).toBe(false);
- expect(res.status).toBe(0);
-
- done();
-
- });
-
- }
-
- });
-
- });
-
- it('get("data/valid.json") with abort()', done => {
-
- var vm = new Vue({
-
- created() {
-
- var random = Math.random().toString(36).substr(2);
-
- this.$http.get(`data/valid.json?${random}`, {
-
- before(req) {
- setTimeout(() => {
-
- expect(typeof req.abort).toBe('function');
-
- req.abort();
-
- }, 0);
- }
-
- }).then(res => {
- fail('Callback has been called');
- }, res => {
- done();
- });
- }
-
- });
-
- });
-
- it('get("data/notfound.json") using catch()', done => {
-
- var vm = new Vue({
-
- created() {
-
- this.$http.get('data/notfound.json').catch(res => {
-
- expect(this).toBe(vm);
- expect(res.ok).toBe(false);
- expect(res.status).toBe(404);
-
- done();
- });
-
- }
-
- });
-
- });
-
-});
\ No newline at end of file
+++ /dev/null
-var Vue = require('vue');
-var VueResource = require('../dist/vue-resource.common.js');
-
-Vue.use(VueResource);
-
-describe('Vue.http', function () {
-
- it('post("jsfiddle.net/html")', () => {
-
- return Vue.http.post('http://jsfiddle.net/echo/html/', {html: 'text'}, {emulateJSON: true}).then(res => {
-
- expect(res.ok).toBe(true);
- expect(res.status).toBe(200);
- expect(typeof res.body).toBe('string');
- expect(res.body).toBe('text');
-
- });
-
- });
-
- it('post("jsfiddle.net/json")', () => {
-
- return Vue.http.post('http://jsfiddle.net/echo/json/', {json: JSON.stringify({foo: 'bar'})}, {emulateJSON: true}).then(res => {
-
- expect(res.ok).toBe(true);
- expect(res.status).toBe(200);
- expect(typeof res.body).toBe('object');
- expect(res.body.foo).toBe('bar');
-
- });
-
- });
-
-});
+++ /dev/null
-<!DOCTYPE html>
-<html>
-<head>
- <meta charset="utf-8">
- <title>Vue Resource - Jasmine</title>
-
- <link rel="shortcut icon" type="image/png" href="../node_modules/jasmine-core/images/jasmine_favicon.png">
- <link rel="stylesheet" href="../node_modules/jasmine-core/lib/jasmine-core/jasmine.css">
-
- <script src="../node_modules/jasmine-core/lib/jasmine-core/jasmine.js"></script>
- <script src="../node_modules/jasmine-core/lib/jasmine-core/jasmine-html.js"></script>
- <script src="../node_modules/jasmine-core/lib/jasmine-core/boot.js"></script>
- <script src="specs.js"></script>
-
-</head>
-<body>
-</body>
-</html>
+++ /dev/null
-import Vue from 'vue';
-import VueResource from '../src/index';
-
-Vue.use(VueResource);
-
-require('./url');
-require('./http');
-require('./resource');
-require('./promise');
+++ /dev/null
-module.exports = config => {
-
- config.set({
-
- basePath: __dirname,
-
- frameworks: ['jasmine'],
-
- browsers: ['Chrome', 'Safari', 'Firefox'],
-
- files: [
- 'index.js',
- {pattern: 'data/*', included: false},
- ],
-
- preprocessors: {
- 'index.js': ['webpack']
- },
-
- proxies: {
- '/data/': '/base/data/'
- },
-
- });
-
-};
+++ /dev/null
-import Promise from '../src/promise';
-
-describe('Vue.promise ' + (window.Promise !== undefined ? '(native)' : '(polyfill)'), function () {
-
- it('then fulfill', function (done) {
-
- Promise.resolve(1).then(function (value) {
- expect(value).toBe(1);
- done();
- });
-
- });
-
- it('then reject', function (done) {
-
- Promise.reject(1).then(undefined, function (value) {
- expect(value).toBe(1);
- done();
- });
-
- });
-
- it('catch', function (done) {
-
- Promise.reject(1).catch(function (value) {
- expect(value).toBe(1);
- done();
- });
-
- });
-
- it('finally fulfill', function (done) {
-
- Promise.resolve(1).finally(function (arg) {
- expect(arg).toBe(undefined);
- }).then(function (arg) {
- expect(arg).toBe(1);
- done();
- });
-
- });
-
- it('finally reject', function (done) {
-
- Promise.reject(1).finally(function (arg) {
- expect(arg).toBe(undefined);
- }).catch(function (arg) {
- expect(arg).toBe(1);
- done();
- });
-
- });
-
- it('all', function (done) {
-
- Promise.all([
-
- Promise.resolve(1),
- Promise.resolve(2)
-
- ]).then(function (values) {
- expect(values[0]).toBe(1);
- expect(values[1]).toBe(2);
- done();
- });
-
- });
-
- it('duplicate', function (done) {
-
- Promise.all([
-
- Promise.resolve(1).then(function (value) {
- expect(value).toBe(1);
- }),
-
- Promise.resolve(2).then(function (value) {
- expect(value).toBe(2);
- })
-
- ]).then(done);
-
- });
-
- it('context', function (done) {
-
- var context = {foo: 'bar'};
-
- Promise.resolve().bind(context).then(function () {
- expect(this).toBe(context);
- done();
- });
-
- });
-
- it('context chain fulfill', function (done) {
-
- var context = {foo: 'bar'};
-
- Promise.resolve().bind(context).catch(undefined).finally(function () {
- expect(this).toBe(context);
- }).then(function () {
- expect(this).toBe(context);
- done();
- });
-
- });
-
- it('context chain reject', function (done) {
-
- var context = {foo: 'bar'};
-
- Promise.reject().bind(context).catch(function () {
- expect(this).toBe(context);
- return Promise.reject();
- }).finally(function () {
- expect(this).toBe(context);
- }).catch(function () {
- expect(this).toBe(context);
- done();
- });
-
- });
-
-});
+++ /dev/null
-import Vue from 'vue';
-
-describe('this.$resource', function () {
-
- it('get({file: "valid.json"})', (done) => {
-
- var vm = new Vue({
-
- created() {
-
- var resource = this.$resource('data{/file}');
-
- resource.get({file: 'valid.json'}).then((res) => {
-
- expect(res.ok).toBe(true);
- expect(res.status).toBe(200);
- expect(res.data.foo).toBe('bar');
-
- done();
- });
-
- }
-
- });
-
- });
-
- it('save({file: "valid.json"}, {foo: "bar"})', (done) => {
-
- var vm = new Vue({
-
- created() {
-
- var resource = this.$resource('data{/file}');
-
- resource.save({file: 'valid.json'}, {foo: 'bar'}).then((res) => {
-
- expect(res.ok).toBe(true);
- expect(res.status).toBe(200);
- expect(res.data.foo).toBe('bar');
-
- done();
- });
-
- }
-
- });
-
- });
-
-});
+++ /dev/null
-/******/ (function(modules) { // webpackBootstrap
-/******/ // The module cache
-/******/ var installedModules = {};
-/******/
-/******/ // The require function
-/******/ function __webpack_require__(moduleId) {
-/******/
-/******/ // Check if module is in cache
-/******/ if(installedModules[moduleId]) {
-/******/ return installedModules[moduleId].exports;
-/******/ }
-/******/ // Create a new module (and put it into the cache)
-/******/ var module = installedModules[moduleId] = {
-/******/ i: moduleId,
-/******/ l: false,
-/******/ exports: {}
-/******/ };
-/******/
-/******/ // Execute the module function
-/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
-/******/
-/******/ // Flag the module as loaded
-/******/ module.l = true;
-/******/
-/******/ // Return the exports of the module
-/******/ return module.exports;
-/******/ }
-/******/
-/******/
-/******/ // expose the modules object (__webpack_modules__)
-/******/ __webpack_require__.m = modules;
-/******/
-/******/ // expose the module cache
-/******/ __webpack_require__.c = installedModules;
-/******/
-/******/ // define getter function for harmony exports
-/******/ __webpack_require__.d = function(exports, name, getter) {
-/******/ if(!__webpack_require__.o(exports, name)) {
-/******/ Object.defineProperty(exports, name, {
-/******/ configurable: false,
-/******/ enumerable: true,
-/******/ get: getter
-/******/ });
-/******/ }
-/******/ };
-/******/
-/******/ // getDefaultExport function for compatibility with non-harmony modules
-/******/ __webpack_require__.n = function(module) {
-/******/ var getter = module && module.__esModule ?
-/******/ function getDefault() { return module['default']; } :
-/******/ function getModuleExports() { return module; };
-/******/ __webpack_require__.d(getter, 'a', getter);
-/******/ return getter;
-/******/ };
-/******/
-/******/ // Object.prototype.hasOwnProperty.call
-/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
-/******/
-/******/ // __webpack_public_path__
-/******/ __webpack_require__.p = "";
-/******/
-/******/ // Load entry module and return exports
-/******/ return __webpack_require__(__webpack_require__.s = 5);
-/******/ })
-/************************************************************************/
-/******/ ([
-/* 0 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return inBrowser; });
-/* harmony export (immutable) */ __webpack_exports__["u"] = warn;
-/* harmony export (immutable) */ __webpack_exports__["e"] = error;
-/* harmony export (immutable) */ __webpack_exports__["o"] = nextTick;
-/* harmony export (immutable) */ __webpack_exports__["s"] = trim;
-/* harmony export (immutable) */ __webpack_exports__["t"] = trimEnd;
-/* harmony export (immutable) */ __webpack_exports__["q"] = toLower;
-/* harmony export (immutable) */ __webpack_exports__["r"] = toUpper;
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return isArray; });
-/* harmony export (immutable) */ __webpack_exports__["m"] = isString;
-/* unused harmony export isBoolean */
-/* harmony export (immutable) */ __webpack_exports__["j"] = isFunction;
-/* harmony export (immutable) */ __webpack_exports__["k"] = isObject;
-/* harmony export (immutable) */ __webpack_exports__["l"] = isPlainObject;
-/* harmony export (immutable) */ __webpack_exports__["h"] = isBlob;
-/* harmony export (immutable) */ __webpack_exports__["i"] = isFormData;
-/* harmony export (immutable) */ __webpack_exports__["v"] = when;
-/* harmony export (immutable) */ __webpack_exports__["p"] = options;
-/* harmony export (immutable) */ __webpack_exports__["d"] = each;
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return assign; });
-/* harmony export (immutable) */ __webpack_exports__["n"] = merge;
-/* harmony export (immutable) */ __webpack_exports__["c"] = defaults;
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__promise__ = __webpack_require__(1);
-/**
- * Utility functions.
- */
-
-
-
-var ref = {};
-var hasOwnProperty = ref.hasOwnProperty;
-;
-var ref$1 = [];
-var slice = ref$1.slice;
-var debug = false, ntick;
-
-var inBrowser = typeof window !== 'undefined';
-
-/* harmony default export */ __webpack_exports__["b"] = (function (ref) {
- var config = ref.config;
- var nextTick = ref.nextTick;
-
- ntick = nextTick;
- debug = config.debug || !config.silent;
-});
-
-function warn(msg) {
- if (typeof console !== 'undefined' && debug) {
- console.warn('[VueResource warn]: ' + msg);
- }
-}
-
-function error(msg) {
- if (typeof console !== 'undefined') {
- console.error(msg);
- }
-}
-
-function nextTick(cb, ctx) {
- return ntick(cb, ctx);
-}
-
-function trim(str) {
- return str ? str.replace(/^\s*|\s*$/g, '') : '';
-}
-
-function trimEnd(str, chars) {
-
- if (str && chars === undefined) {
- return str.replace(/\s+$/, '');
- }
-
- if (!str || !chars) {
- return str;
- }
-
- return str.replace(new RegExp(("[" + chars + "]+$")), '');
-}
-
-function toLower(str) {
- return str ? str.toLowerCase() : '';
-}
-
-function toUpper(str) {
- return str ? str.toUpperCase() : '';
-}
-
-var isArray = Array.isArray;
-
-function isString(val) {
- return typeof val === 'string';
-}
-
-function isBoolean(val) {
- return val === true || val === false;
-}
-
-function isFunction(val) {
- return typeof val === 'function';
-}
-
-function isObject(obj) {
- return obj !== null && typeof obj === 'object';
-}
-
-function isPlainObject(obj) {
- return isObject(obj) && Object.getPrototypeOf(obj) == Object.prototype;
-}
-
-function isBlob(obj) {
- return typeof Blob !== 'undefined' && obj instanceof Blob;
-}
-
-function isFormData(obj) {
- return typeof FormData !== 'undefined' && obj instanceof FormData;
-}
-
-function when(value, fulfilled, rejected) {
-
- var promise = __WEBPACK_IMPORTED_MODULE_0__promise__["a" /* default */].resolve(value);
-
- if (arguments.length < 2) {
- return promise;
- }
-
- return promise.then(fulfilled, rejected);
-}
-
-function options(fn, obj, opts) {
-
- opts = opts || {};
-
- if (isFunction(opts)) {
- opts = opts.call(obj);
- }
-
- return merge(fn.bind({$vm: obj, $options: opts}), fn, {$options: opts});
-}
-
-function each(obj, iterator) {
-
- var i, key;
-
- if (isArray(obj)) {
- for (i = 0; i < obj.length; i++) {
- iterator.call(obj[i], obj[i], i);
- }
- } else if (isObject(obj)) {
- for (key in obj) {
- if (hasOwnProperty.call(obj, key)) {
- iterator.call(obj[key], obj[key], key);
- }
- }
- }
-
- return obj;
-}
-
-var assign = Object.assign || _assign;
-
-function merge(target) {
-
- var args = slice.call(arguments, 1);
-
- args.forEach(function (source) {
- _merge(target, source, true);
- });
-
- return target;
-}
-
-function defaults(target) {
-
- var args = slice.call(arguments, 1);
-
- args.forEach(function (source) {
-
- for (var key in source) {
- if (target[key] === undefined) {
- target[key] = source[key];
- }
- }
-
- });
-
- return target;
-}
-
-function _assign(target) {
-
- var args = slice.call(arguments, 1);
-
- args.forEach(function (source) {
- _merge(target, source);
- });
-
- return target;
-}
-
-function _merge(target, source, deep) {
- for (var key in source) {
- if (deep && (isPlainObject(source[key]) || isArray(source[key]))) {
- if (isPlainObject(source[key]) && !isPlainObject(target[key])) {
- target[key] = {};
- }
- if (isArray(source[key]) && !isArray(target[key])) {
- target[key] = [];
- }
- _merge(target[key], source[key], deep);
- } else if (source[key] !== undefined) {
- target[key] = source[key];
- }
- }
-}
-
-
-/***/ }),
-/* 1 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-
-// EXTERNAL MODULE: ./src/util.js
-var util = __webpack_require__(0);
-
-// CONCATENATED MODULE: ./src/lib/promise.js
-/**
- * Promises/A+ polyfill v1.1.4 (https://github.com/bramstein/promis)
- */
-
-var RESOLVED = 0;
-var REJECTED = 1;
-var PENDING = 2;
-
-
-
-function promise_Promise(executor) {
-
- this.state = PENDING;
- this.value = undefined;
- this.deferred = [];
-
- var promise = this;
-
- try {
- executor(function (x) {
- promise.resolve(x);
- }, function (r) {
- promise.reject(r);
- });
- } catch (e) {
- promise.reject(e);
- }
-}
-
-promise_Promise.reject = function (r) {
- return new promise_Promise(function (resolve, reject) {
- reject(r);
- });
-};
-
-promise_Promise.resolve = function (x) {
- return new promise_Promise(function (resolve, reject) {
- resolve(x);
- });
-};
-
-promise_Promise.all = function all(iterable) {
- return new promise_Promise(function (resolve, reject) {
- var count = 0, result = [];
-
- if (iterable.length === 0) {
- resolve(result);
- }
-
- function resolver(i) {
- return function (x) {
- result[i] = x;
- count += 1;
-
- if (count === iterable.length) {
- resolve(result);
- }
- };
- }
-
- for (var i = 0; i < iterable.length; i += 1) {
- promise_Promise.resolve(iterable[i]).then(resolver(i), reject);
- }
- });
-};
-
-promise_Promise.race = function race(iterable) {
- return new promise_Promise(function (resolve, reject) {
- for (var i = 0; i < iterable.length; i += 1) {
- promise_Promise.resolve(iterable[i]).then(resolve, reject);
- }
- });
-};
-
-var p = promise_Promise.prototype;
-
-p.resolve = function resolve(x) {
- var promise = this;
-
- if (promise.state === PENDING) {
- if (x === promise) {
- throw new TypeError('Promise settled with itself.');
- }
-
- var called = false;
-
- try {
- var then = x && x['then'];
-
- if (x !== null && typeof x === 'object' && typeof then === 'function') {
- then.call(x, function (x) {
- if (!called) {
- promise.resolve(x);
- }
- called = true;
-
- }, function (r) {
- if (!called) {
- promise.reject(r);
- }
- called = true;
- });
- return;
- }
- } catch (e) {
- if (!called) {
- promise.reject(e);
- }
- return;
- }
-
- promise.state = RESOLVED;
- promise.value = x;
- promise.notify();
- }
-};
-
-p.reject = function reject(reason) {
- var promise = this;
-
- if (promise.state === PENDING) {
- if (reason === promise) {
- throw new TypeError('Promise settled with itself.');
- }
-
- promise.state = REJECTED;
- promise.value = reason;
- promise.notify();
- }
-};
-
-p.notify = function notify() {
- var promise = this;
-
- Object(util["o" /* nextTick */])(function () {
- if (promise.state !== PENDING) {
- while (promise.deferred.length) {
- var deferred = promise.deferred.shift(),
- onResolved = deferred[0],
- onRejected = deferred[1],
- resolve = deferred[2],
- reject = deferred[3];
-
- try {
- if (promise.state === RESOLVED) {
- if (typeof onResolved === 'function') {
- resolve(onResolved.call(undefined, promise.value));
- } else {
- resolve(promise.value);
- }
- } else if (promise.state === REJECTED) {
- if (typeof onRejected === 'function') {
- resolve(onRejected.call(undefined, promise.value));
- } else {
- reject(promise.value);
- }
- }
- } catch (e) {
- reject(e);
- }
- }
- }
- });
-};
-
-p.then = function then(onResolved, onRejected) {
- var promise = this;
-
- return new promise_Promise(function (resolve, reject) {
- promise.deferred.push([onResolved, onRejected, resolve, reject]);
- promise.notify();
- });
-};
-
-p.catch = function (onRejected) {
- return this.then(undefined, onRejected);
-};
-
-// CONCATENATED MODULE: ./src/promise.js
-/* harmony export (immutable) */ __webpack_exports__["a"] = PromiseObj;
-/**
- * Promise adapter.
- */
-
-
-
-if (typeof Promise === 'undefined') {
- window.Promise = promise_Promise;
-}
-
-function PromiseObj(executor, context) {
-
- if (executor instanceof Promise) {
- this.promise = executor;
- } else {
- this.promise = new Promise(executor.bind(context));
- }
-
- this.context = context;
-}
-
-PromiseObj.all = function (iterable, context) {
- return new PromiseObj(Promise.all(iterable), context);
-};
-
-PromiseObj.resolve = function (value, context) {
- return new PromiseObj(Promise.resolve(value), context);
-};
-
-PromiseObj.reject = function (reason, context) {
- return new PromiseObj(Promise.reject(reason), context);
-};
-
-PromiseObj.race = function (iterable, context) {
- return new PromiseObj(Promise.race(iterable), context);
-};
-
-var promise_p = PromiseObj.prototype;
-
-promise_p.bind = function (context) {
- this.context = context;
- return this;
-};
-
-promise_p.then = function (fulfilled, rejected) {
-
- if (fulfilled && fulfilled.bind && this.context) {
- fulfilled = fulfilled.bind(this.context);
- }
-
- if (rejected && rejected.bind && this.context) {
- rejected = rejected.bind(this.context);
- }
-
- return new PromiseObj(this.promise.then(fulfilled, rejected), this.context);
-};
-
-promise_p.catch = function (rejected) {
-
- if (rejected && rejected.bind && this.context) {
- rejected = rejected.bind(this.context);
- }
-
- return new PromiseObj(this.promise.catch(rejected), this.context);
-};
-
-promise_p.finally = function (callback) {
-
- return this.then(function (value) {
- callback.call(this);
- return value;
- }, function (reason) {
- callback.call(this);
- return Promise.reject(reason);
- }
- );
-};
-
-
-/***/ }),
-/* 2 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-/* WEBPACK VAR INJECTION */(function(process, global, setImmediate) {/*!
- * Vue.js v2.5.13
- * (c) 2014-2017 Evan You
- * Released under the MIT License.
- */
-/* */
-
-var emptyObject = Object.freeze({});
-
-// these helpers produces better vm code in JS engines due to their
-// explicitness and function inlining
-function isUndef (v) {
- return v === undefined || v === null
-}
-
-function isDef (v) {
- return v !== undefined && v !== null
-}
-
-function isTrue (v) {
- return v === true
-}
-
-function isFalse (v) {
- return v === false
-}
-
-/**
- * Check if value is primitive
- */
-function isPrimitive (value) {
- return (
- typeof value === 'string' ||
- typeof value === 'number' ||
- // $flow-disable-line
- typeof value === 'symbol' ||
- typeof value === 'boolean'
- )
-}
-
-/**
- * Quick object check - this is primarily used to tell
- * Objects from primitive values when we know the value
- * is a JSON-compliant type.
- */
-function isObject (obj) {
- return obj !== null && typeof obj === 'object'
-}
-
-/**
- * Get the raw type string of a value e.g. [object Object]
- */
-var _toString = Object.prototype.toString;
-
-function toRawType (value) {
- return _toString.call(value).slice(8, -1)
-}
-
-/**
- * Strict object type check. Only returns true
- * for plain JavaScript objects.
- */
-function isPlainObject (obj) {
- return _toString.call(obj) === '[object Object]'
-}
-
-function isRegExp (v) {
- return _toString.call(v) === '[object RegExp]'
-}
-
-/**
- * Check if val is a valid array index.
- */
-function isValidArrayIndex (val) {
- var n = parseFloat(String(val));
- return n >= 0 && Math.floor(n) === n && isFinite(val)
-}
-
-/**
- * Convert a value to a string that is actually rendered.
- */
-function toString (val) {
- return val == null
- ? ''
- : typeof val === 'object'
- ? JSON.stringify(val, null, 2)
- : String(val)
-}
-
-/**
- * Convert a input value to a number for persistence.
- * If the conversion fails, return original string.
- */
-function toNumber (val) {
- var n = parseFloat(val);
- return isNaN(n) ? val : n
-}
-
-/**
- * Make a map and return a function for checking if a key
- * is in that map.
- */
-function makeMap (
- str,
- expectsLowerCase
-) {
- var map = Object.create(null);
- var list = str.split(',');
- for (var i = 0; i < list.length; i++) {
- map[list[i]] = true;
- }
- return expectsLowerCase
- ? function (val) { return map[val.toLowerCase()]; }
- : function (val) { return map[val]; }
-}
-
-/**
- * Check if a tag is a built-in tag.
- */
-var isBuiltInTag = makeMap('slot,component', true);
-
-/**
- * Check if a attribute is a reserved attribute.
- */
-var isReservedAttribute = makeMap('key,ref,slot,slot-scope,is');
-
-/**
- * Remove an item from an array
- */
-function remove (arr, item) {
- if (arr.length) {
- var index = arr.indexOf(item);
- if (index > -1) {
- return arr.splice(index, 1)
- }
- }
-}
-
-/**
- * Check whether the object has the property.
- */
-var hasOwnProperty = Object.prototype.hasOwnProperty;
-function hasOwn (obj, key) {
- return hasOwnProperty.call(obj, key)
-}
-
-/**
- * Create a cached version of a pure function.
- */
-function cached (fn) {
- var cache = Object.create(null);
- return (function cachedFn (str) {
- var hit = cache[str];
- return hit || (cache[str] = fn(str))
- })
-}
-
-/**
- * Camelize a hyphen-delimited string.
- */
-var camelizeRE = /-(\w)/g;
-var camelize = cached(function (str) {
- return str.replace(camelizeRE, function (_, c) { return c ? c.toUpperCase() : ''; })
-});
-
-/**
- * Capitalize a string.
- */
-var capitalize = cached(function (str) {
- return str.charAt(0).toUpperCase() + str.slice(1)
-});
-
-/**
- * Hyphenate a camelCase string.
- */
-var hyphenateRE = /\B([A-Z])/g;
-var hyphenate = cached(function (str) {
- return str.replace(hyphenateRE, '-$1').toLowerCase()
-});
-
-/**
- * Simple bind, faster than native
- */
-function bind (fn, ctx) {
- function boundFn (a) {
- var l = arguments.length;
- return l
- ? l > 1
- ? fn.apply(ctx, arguments)
- : fn.call(ctx, a)
- : fn.call(ctx)
- }
- // record original fn length
- boundFn._length = fn.length;
- return boundFn
-}
-
-/**
- * Convert an Array-like object to a real Array.
- */
-function toArray (list, start) {
- start = start || 0;
- var i = list.length - start;
- var ret = new Array(i);
- while (i--) {
- ret[i] = list[i + start];
- }
- return ret
-}
-
-/**
- * Mix properties into target object.
- */
-function extend (to, _from) {
- for (var key in _from) {
- to[key] = _from[key];
- }
- return to
-}
-
-/**
- * Merge an Array of Objects into a single Object.
- */
-function toObject (arr) {
- var res = {};
- for (var i = 0; i < arr.length; i++) {
- if (arr[i]) {
- extend(res, arr[i]);
- }
- }
- return res
-}
-
-/**
- * Perform no operation.
- * Stubbing args to make Flow happy without leaving useless transpiled code
- * with ...rest (https://flow.org/blog/2017/05/07/Strict-Function-Call-Arity/)
- */
-function noop (a, b, c) {}
-
-/**
- * Always return false.
- */
-var no = function (a, b, c) { return false; };
-
-/**
- * Return same value
- */
-var identity = function (_) { return _; };
-
-/**
- * Generate a static keys string from compiler modules.
- */
-
-
-/**
- * Check if two values are loosely equal - that is,
- * if they are plain objects, do they have the same shape?
- */
-function looseEqual (a, b) {
- if (a === b) { return true }
- var isObjectA = isObject(a);
- var isObjectB = isObject(b);
- if (isObjectA && isObjectB) {
- try {
- var isArrayA = Array.isArray(a);
- var isArrayB = Array.isArray(b);
- if (isArrayA && isArrayB) {
- return a.length === b.length && a.every(function (e, i) {
- return looseEqual(e, b[i])
- })
- } else if (!isArrayA && !isArrayB) {
- var keysA = Object.keys(a);
- var keysB = Object.keys(b);
- return keysA.length === keysB.length && keysA.every(function (key) {
- return looseEqual(a[key], b[key])
- })
- } else {
- /* istanbul ignore next */
- return false
- }
- } catch (e) {
- /* istanbul ignore next */
- return false
- }
- } else if (!isObjectA && !isObjectB) {
- return String(a) === String(b)
- } else {
- return false
- }
-}
-
-function looseIndexOf (arr, val) {
- for (var i = 0; i < arr.length; i++) {
- if (looseEqual(arr[i], val)) { return i }
- }
- return -1
-}
-
-/**
- * Ensure a function is called only once.
- */
-function once (fn) {
- var called = false;
- return function () {
- if (!called) {
- called = true;
- fn.apply(this, arguments);
- }
- }
-}
-
-var SSR_ATTR = 'data-server-rendered';
-
-var ASSET_TYPES = [
- 'component',
- 'directive',
- 'filter'
-];
-
-var LIFECYCLE_HOOKS = [
- 'beforeCreate',
- 'created',
- 'beforeMount',
- 'mounted',
- 'beforeUpdate',
- 'updated',
- 'beforeDestroy',
- 'destroyed',
- 'activated',
- 'deactivated',
- 'errorCaptured'
-];
-
-/* */
-
-var config = ({
- /**
- * Option merge strategies (used in core/util/options)
- */
- // $flow-disable-line
- optionMergeStrategies: Object.create(null),
-
- /**
- * Whether to suppress warnings.
- */
- silent: false,
-
- /**
- * Show production mode tip message on boot?
- */
- productionTip: process.env.NODE_ENV !== 'production',
-
- /**
- * Whether to enable devtools
- */
- devtools: process.env.NODE_ENV !== 'production',
-
- /**
- * Whether to record perf
- */
- performance: false,
-
- /**
- * Error handler for watcher errors
- */
- errorHandler: null,
-
- /**
- * Warn handler for watcher warns
- */
- warnHandler: null,
-
- /**
- * Ignore certain custom elements
- */
- ignoredElements: [],
-
- /**
- * Custom user key aliases for v-on
- */
- // $flow-disable-line
- keyCodes: Object.create(null),
-
- /**
- * Check if a tag is reserved so that it cannot be registered as a
- * component. This is platform-dependent and may be overwritten.
- */
- isReservedTag: no,
-
- /**
- * Check if an attribute is reserved so that it cannot be used as a component
- * prop. This is platform-dependent and may be overwritten.
- */
- isReservedAttr: no,
-
- /**
- * Check if a tag is an unknown element.
- * Platform-dependent.
- */
- isUnknownElement: no,
-
- /**
- * Get the namespace of an element
- */
- getTagNamespace: noop,
-
- /**
- * Parse the real tag name for the specific platform.
- */
- parsePlatformTagName: identity,
-
- /**
- * Check if an attribute must be bound using property, e.g. value
- * Platform-dependent.
- */
- mustUseProp: no,
-
- /**
- * Exposed for legacy reasons
- */
- _lifecycleHooks: LIFECYCLE_HOOKS
-});
-
-/* */
-
-/**
- * Check if a string starts with $ or _
- */
-function isReserved (str) {
- var c = (str + '').charCodeAt(0);
- return c === 0x24 || c === 0x5F
-}
-
-/**
- * Define a property.
- */
-function def (obj, key, val, enumerable) {
- Object.defineProperty(obj, key, {
- value: val,
- enumerable: !!enumerable,
- writable: true,
- configurable: true
- });
-}
-
-/**
- * Parse simple path.
- */
-var bailRE = /[^\w.$]/;
-function parsePath (path) {
- if (bailRE.test(path)) {
- return
- }
- var segments = path.split('.');
- return function (obj) {
- for (var i = 0; i < segments.length; i++) {
- if (!obj) { return }
- obj = obj[segments[i]];
- }
- return obj
- }
-}
-
-/* */
-
-
-// can we use __proto__?
-var hasProto = '__proto__' in {};
-
-// Browser environment sniffing
-var inBrowser = typeof window !== 'undefined';
-var inWeex = typeof WXEnvironment !== 'undefined' && !!WXEnvironment.platform;
-var weexPlatform = inWeex && WXEnvironment.platform.toLowerCase();
-var UA = inBrowser && window.navigator.userAgent.toLowerCase();
-var isIE = UA && /msie|trident/.test(UA);
-var isIE9 = UA && UA.indexOf('msie 9.0') > 0;
-var isEdge = UA && UA.indexOf('edge/') > 0;
-var isAndroid = (UA && UA.indexOf('android') > 0) || (weexPlatform === 'android');
-var isIOS = (UA && /iphone|ipad|ipod|ios/.test(UA)) || (weexPlatform === 'ios');
-var isChrome = UA && /chrome\/\d+/.test(UA) && !isEdge;
-
-// Firefox has a "watch" function on Object.prototype...
-var nativeWatch = ({}).watch;
-
-var supportsPassive = false;
-if (inBrowser) {
- try {
- var opts = {};
- Object.defineProperty(opts, 'passive', ({
- get: function get () {
- /* istanbul ignore next */
- supportsPassive = true;
- }
- })); // https://github.com/facebook/flow/issues/285
- window.addEventListener('test-passive', null, opts);
- } catch (e) {}
-}
-
-// this needs to be lazy-evaled because vue may be required before
-// vue-server-renderer can set VUE_ENV
-var _isServer;
-var isServerRendering = function () {
- if (_isServer === undefined) {
- /* istanbul ignore if */
- if (!inBrowser && typeof global !== 'undefined') {
- // detect presence of vue-server-renderer and avoid
- // Webpack shimming the process
- _isServer = global['process'].env.VUE_ENV === 'server';
- } else {
- _isServer = false;
- }
- }
- return _isServer
-};
-
-// detect devtools
-var devtools = inBrowser && window.__VUE_DEVTOOLS_GLOBAL_HOOK__;
-
-/* istanbul ignore next */
-function isNative (Ctor) {
- return typeof Ctor === 'function' && /native code/.test(Ctor.toString())
-}
-
-var hasSymbol =
- typeof Symbol !== 'undefined' && isNative(Symbol) &&
- typeof Reflect !== 'undefined' && isNative(Reflect.ownKeys);
-
-var _Set;
-/* istanbul ignore if */ // $flow-disable-line
-if (typeof Set !== 'undefined' && isNative(Set)) {
- // use native Set when available.
- _Set = Set;
-} else {
- // a non-standard Set polyfill that only works with primitive keys.
- _Set = (function () {
- function Set () {
- this.set = Object.create(null);
- }
- Set.prototype.has = function has (key) {
- return this.set[key] === true
- };
- Set.prototype.add = function add (key) {
- this.set[key] = true;
- };
- Set.prototype.clear = function clear () {
- this.set = Object.create(null);
- };
-
- return Set;
- }());
-}
-
-/* */
-
-var warn = noop;
-var tip = noop;
-var generateComponentTrace = (noop); // work around flow check
-var formatComponentName = (noop);
-
-if (process.env.NODE_ENV !== 'production') {
- var hasConsole = typeof console !== 'undefined';
- var classifyRE = /(?:^|[-_])(\w)/g;
- var classify = function (str) { return str
- .replace(classifyRE, function (c) { return c.toUpperCase(); })
- .replace(/[-_]/g, ''); };
-
- warn = function (msg, vm) {
- var trace = vm ? generateComponentTrace(vm) : '';
-
- if (config.warnHandler) {
- config.warnHandler.call(null, msg, vm, trace);
- } else if (hasConsole && (!config.silent)) {
- console.error(("[Vue warn]: " + msg + trace));
- }
- };
-
- tip = function (msg, vm) {
- if (hasConsole && (!config.silent)) {
- console.warn("[Vue tip]: " + msg + (
- vm ? generateComponentTrace(vm) : ''
- ));
- }
- };
-
- formatComponentName = function (vm, includeFile) {
- if (vm.$root === vm) {
- return '<Root>'
- }
- var options = typeof vm === 'function' && vm.cid != null
- ? vm.options
- : vm._isVue
- ? vm.$options || vm.constructor.options
- : vm || {};
- var name = options.name || options._componentTag;
- var file = options.__file;
- if (!name && file) {
- var match = file.match(/([^/\\]+)\.vue$/);
- name = match && match[1];
- }
-
- return (
- (name ? ("<" + (classify(name)) + ">") : "<Anonymous>") +
- (file && includeFile !== false ? (" at " + file) : '')
- )
- };
-
- var repeat = function (str, n) {
- var res = '';
- while (n) {
- if (n % 2 === 1) { res += str; }
- if (n > 1) { str += str; }
- n >>= 1;
- }
- return res
- };
-
- generateComponentTrace = function (vm) {
- if (vm._isVue && vm.$parent) {
- var tree = [];
- var currentRecursiveSequence = 0;
- while (vm) {
- if (tree.length > 0) {
- var last = tree[tree.length - 1];
- if (last.constructor === vm.constructor) {
- currentRecursiveSequence++;
- vm = vm.$parent;
- continue
- } else if (currentRecursiveSequence > 0) {
- tree[tree.length - 1] = [last, currentRecursiveSequence];
- currentRecursiveSequence = 0;
- }
- }
- tree.push(vm);
- vm = vm.$parent;
- }
- return '\n\nfound in\n\n' + tree
- .map(function (vm, i) { return ("" + (i === 0 ? '---> ' : repeat(' ', 5 + i * 2)) + (Array.isArray(vm)
- ? ((formatComponentName(vm[0])) + "... (" + (vm[1]) + " recursive calls)")
- : formatComponentName(vm))); })
- .join('\n')
- } else {
- return ("\n\n(found in " + (formatComponentName(vm)) + ")")
- }
- };
-}
-
-/* */
-
-
-var uid$1 = 0;
-
-/**
- * A dep is an observable that can have multiple
- * directives subscribing to it.
- */
-var Dep = function Dep () {
- this.id = uid$1++;
- this.subs = [];
-};
-
-Dep.prototype.addSub = function addSub (sub) {
- this.subs.push(sub);
-};
-
-Dep.prototype.removeSub = function removeSub (sub) {
- remove(this.subs, sub);
-};
-
-Dep.prototype.depend = function depend () {
- if (Dep.target) {
- Dep.target.addDep(this);
- }
-};
-
-Dep.prototype.notify = function notify () {
- // stabilize the subscriber list first
- var subs = this.subs.slice();
- for (var i = 0, l = subs.length; i < l; i++) {
- subs[i].update();
- }
-};
-
-// the current target watcher being evaluated.
-// this is globally unique because there could be only one
-// watcher being evaluated at any time.
-Dep.target = null;
-var targetStack = [];
-
-function pushTarget (_target) {
- if (Dep.target) { targetStack.push(Dep.target); }
- Dep.target = _target;
-}
-
-function popTarget () {
- Dep.target = targetStack.pop();
-}
-
-/* */
-
-var VNode = function VNode (
- tag,
- data,
- children,
- text,
- elm,
- context,
- componentOptions,
- asyncFactory
-) {
- this.tag = tag;
- this.data = data;
- this.children = children;
- this.text = text;
- this.elm = elm;
- this.ns = undefined;
- this.context = context;
- this.fnContext = undefined;
- this.fnOptions = undefined;
- this.fnScopeId = undefined;
- this.key = data && data.key;
- this.componentOptions = componentOptions;
- this.componentInstance = undefined;
- this.parent = undefined;
- this.raw = false;
- this.isStatic = false;
- this.isRootInsert = true;
- this.isComment = false;
- this.isCloned = false;
- this.isOnce = false;
- this.asyncFactory = asyncFactory;
- this.asyncMeta = undefined;
- this.isAsyncPlaceholder = false;
-};
-
-var prototypeAccessors = { child: { configurable: true } };
-
-// DEPRECATED: alias for componentInstance for backwards compat.
-/* istanbul ignore next */
-prototypeAccessors.child.get = function () {
- return this.componentInstance
-};
-
-Object.defineProperties( VNode.prototype, prototypeAccessors );
-
-var createEmptyVNode = function (text) {
- if ( text === void 0 ) text = '';
-
- var node = new VNode();
- node.text = text;
- node.isComment = true;
- return node
-};
-
-function createTextVNode (val) {
- return new VNode(undefined, undefined, undefined, String(val))
-}
-
-// optimized shallow clone
-// used for static nodes and slot nodes because they may be reused across
-// multiple renders, cloning them avoids errors when DOM manipulations rely
-// on their elm reference.
-function cloneVNode (vnode, deep) {
- var componentOptions = vnode.componentOptions;
- var cloned = new VNode(
- vnode.tag,
- vnode.data,
- vnode.children,
- vnode.text,
- vnode.elm,
- vnode.context,
- componentOptions,
- vnode.asyncFactory
- );
- cloned.ns = vnode.ns;
- cloned.isStatic = vnode.isStatic;
- cloned.key = vnode.key;
- cloned.isComment = vnode.isComment;
- cloned.fnContext = vnode.fnContext;
- cloned.fnOptions = vnode.fnOptions;
- cloned.fnScopeId = vnode.fnScopeId;
- cloned.isCloned = true;
- if (deep) {
- if (vnode.children) {
- cloned.children = cloneVNodes(vnode.children, true);
- }
- if (componentOptions && componentOptions.children) {
- componentOptions.children = cloneVNodes(componentOptions.children, true);
- }
- }
- return cloned
-}
-
-function cloneVNodes (vnodes, deep) {
- var len = vnodes.length;
- var res = new Array(len);
- for (var i = 0; i < len; i++) {
- res[i] = cloneVNode(vnodes[i], deep);
- }
- return res
-}
-
-/*
- * not type checking this file because flow doesn't play well with
- * dynamically accessing methods on Array prototype
- */
-
-var arrayProto = Array.prototype;
-var arrayMethods = Object.create(arrayProto);[
- 'push',
- 'pop',
- 'shift',
- 'unshift',
- 'splice',
- 'sort',
- 'reverse'
-].forEach(function (method) {
- // cache original method
- var original = arrayProto[method];
- def(arrayMethods, method, function mutator () {
- var args = [], len = arguments.length;
- while ( len-- ) args[ len ] = arguments[ len ];
-
- var result = original.apply(this, args);
- var ob = this.__ob__;
- var inserted;
- switch (method) {
- case 'push':
- case 'unshift':
- inserted = args;
- break
- case 'splice':
- inserted = args.slice(2);
- break
- }
- if (inserted) { ob.observeArray(inserted); }
- // notify change
- ob.dep.notify();
- return result
- });
-});
-
-/* */
-
-var arrayKeys = Object.getOwnPropertyNames(arrayMethods);
-
-/**
- * By default, when a reactive property is set, the new value is
- * also converted to become reactive. However when passing down props,
- * we don't want to force conversion because the value may be a nested value
- * under a frozen data structure. Converting it would defeat the optimization.
- */
-var observerState = {
- shouldConvert: true
-};
-
-/**
- * Observer class that are attached to each observed
- * object. Once attached, the observer converts target
- * object's property keys into getter/setters that
- * collect dependencies and dispatches updates.
- */
-var Observer = function Observer (value) {
- this.value = value;
- this.dep = new Dep();
- this.vmCount = 0;
- def(value, '__ob__', this);
- if (Array.isArray(value)) {
- var augment = hasProto
- ? protoAugment
- : copyAugment;
- augment(value, arrayMethods, arrayKeys);
- this.observeArray(value);
- } else {
- this.walk(value);
- }
-};
-
-/**
- * Walk through each property and convert them into
- * getter/setters. This method should only be called when
- * value type is Object.
- */
-Observer.prototype.walk = function walk (obj) {
- var keys = Object.keys(obj);
- for (var i = 0; i < keys.length; i++) {
- defineReactive(obj, keys[i], obj[keys[i]]);
- }
-};
-
-/**
- * Observe a list of Array items.
- */
-Observer.prototype.observeArray = function observeArray (items) {
- for (var i = 0, l = items.length; i < l; i++) {
- observe(items[i]);
- }
-};
-
-// helpers
-
-/**
- * Augment an target Object or Array by intercepting
- * the prototype chain using __proto__
- */
-function protoAugment (target, src, keys) {
- /* eslint-disable no-proto */
- target.__proto__ = src;
- /* eslint-enable no-proto */
-}
-
-/**
- * Augment an target Object or Array by defining
- * hidden properties.
- */
-/* istanbul ignore next */
-function copyAugment (target, src, keys) {
- for (var i = 0, l = keys.length; i < l; i++) {
- var key = keys[i];
- def(target, key, src[key]);
- }
-}
-
-/**
- * Attempt to create an observer instance for a value,
- * returns the new observer if successfully observed,
- * or the existing observer if the value already has one.
- */
-function observe (value, asRootData) {
- if (!isObject(value) || value instanceof VNode) {
- return
- }
- var ob;
- if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {
- ob = value.__ob__;
- } else if (
- observerState.shouldConvert &&
- !isServerRendering() &&
- (Array.isArray(value) || isPlainObject(value)) &&
- Object.isExtensible(value) &&
- !value._isVue
- ) {
- ob = new Observer(value);
- }
- if (asRootData && ob) {
- ob.vmCount++;
- }
- return ob
-}
-
-/**
- * Define a reactive property on an Object.
- */
-function defineReactive (
- obj,
- key,
- val,
- customSetter,
- shallow
-) {
- var dep = new Dep();
-
- var property = Object.getOwnPropertyDescriptor(obj, key);
- if (property && property.configurable === false) {
- return
- }
-
- // cater for pre-defined getter/setters
- var getter = property && property.get;
- var setter = property && property.set;
-
- var childOb = !shallow && observe(val);
- Object.defineProperty(obj, key, {
- enumerable: true,
- configurable: true,
- get: function reactiveGetter () {
- var value = getter ? getter.call(obj) : val;
- if (Dep.target) {
- dep.depend();
- if (childOb) {
- childOb.dep.depend();
- if (Array.isArray(value)) {
- dependArray(value);
- }
- }
- }
- return value
- },
- set: function reactiveSetter (newVal) {
- var value = getter ? getter.call(obj) : val;
- /* eslint-disable no-self-compare */
- if (newVal === value || (newVal !== newVal && value !== value)) {
- return
- }
- /* eslint-enable no-self-compare */
- if (process.env.NODE_ENV !== 'production' && customSetter) {
- customSetter();
- }
- if (setter) {
- setter.call(obj, newVal);
- } else {
- val = newVal;
- }
- childOb = !shallow && observe(newVal);
- dep.notify();
- }
- });
-}
-
-/**
- * Set a property on an object. Adds the new property and
- * triggers change notification if the property doesn't
- * already exist.
- */
-function set (target, key, val) {
- if (Array.isArray(target) && isValidArrayIndex(key)) {
- target.length = Math.max(target.length, key);
- target.splice(key, 1, val);
- return val
- }
- if (key in target && !(key in Object.prototype)) {
- target[key] = val;
- return val
- }
- var ob = (target).__ob__;
- if (target._isVue || (ob && ob.vmCount)) {
- process.env.NODE_ENV !== 'production' && warn(
- 'Avoid adding reactive properties to a Vue instance or its root $data ' +
- 'at runtime - declare it upfront in the data option.'
- );
- return val
- }
- if (!ob) {
- target[key] = val;
- return val
- }
- defineReactive(ob.value, key, val);
- ob.dep.notify();
- return val
-}
-
-/**
- * Delete a property and trigger change if necessary.
- */
-function del (target, key) {
- if (Array.isArray(target) && isValidArrayIndex(key)) {
- target.splice(key, 1);
- return
- }
- var ob = (target).__ob__;
- if (target._isVue || (ob && ob.vmCount)) {
- process.env.NODE_ENV !== 'production' && warn(
- 'Avoid deleting properties on a Vue instance or its root $data ' +
- '- just set it to null.'
- );
- return
- }
- if (!hasOwn(target, key)) {
- return
- }
- delete target[key];
- if (!ob) {
- return
- }
- ob.dep.notify();
-}
-
-/**
- * Collect dependencies on array elements when the array is touched, since
- * we cannot intercept array element access like property getters.
- */
-function dependArray (value) {
- for (var e = (void 0), i = 0, l = value.length; i < l; i++) {
- e = value[i];
- e && e.__ob__ && e.__ob__.dep.depend();
- if (Array.isArray(e)) {
- dependArray(e);
- }
- }
-}
-
-/* */
-
-/**
- * Option overwriting strategies are functions that handle
- * how to merge a parent option value and a child option
- * value into the final value.
- */
-var strats = config.optionMergeStrategies;
-
-/**
- * Options with restrictions
- */
-if (process.env.NODE_ENV !== 'production') {
- strats.el = strats.propsData = function (parent, child, vm, key) {
- if (!vm) {
- warn(
- "option \"" + key + "\" can only be used during instance " +
- 'creation with the `new` keyword.'
- );
- }
- return defaultStrat(parent, child)
- };
-}
-
-/**
- * Helper that recursively merges two data objects together.
- */
-function mergeData (to, from) {
- if (!from) { return to }
- var key, toVal, fromVal;
- var keys = Object.keys(from);
- for (var i = 0; i < keys.length; i++) {
- key = keys[i];
- toVal = to[key];
- fromVal = from[key];
- if (!hasOwn(to, key)) {
- set(to, key, fromVal);
- } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {
- mergeData(toVal, fromVal);
- }
- }
- return to
-}
-
-/**
- * Data
- */
-function mergeDataOrFn (
- parentVal,
- childVal,
- vm
-) {
- if (!vm) {
- // in a Vue.extend merge, both should be functions
- if (!childVal) {
- return parentVal
- }
- if (!parentVal) {
- return childVal
- }
- // when parentVal & childVal are both present,
- // we need to return a function that returns the
- // merged result of both functions... no need to
- // check if parentVal is a function here because
- // it has to be a function to pass previous merges.
- return function mergedDataFn () {
- return mergeData(
- typeof childVal === 'function' ? childVal.call(this, this) : childVal,
- typeof parentVal === 'function' ? parentVal.call(this, this) : parentVal
- )
- }
- } else {
- return function mergedInstanceDataFn () {
- // instance merge
- var instanceData = typeof childVal === 'function'
- ? childVal.call(vm, vm)
- : childVal;
- var defaultData = typeof parentVal === 'function'
- ? parentVal.call(vm, vm)
- : parentVal;
- if (instanceData) {
- return mergeData(instanceData, defaultData)
- } else {
- return defaultData
- }
- }
- }
-}
-
-strats.data = function (
- parentVal,
- childVal,
- vm
-) {
- if (!vm) {
- if (childVal && typeof childVal !== 'function') {
- process.env.NODE_ENV !== 'production' && warn(
- 'The "data" option should be a function ' +
- 'that returns a per-instance value in component ' +
- 'definitions.',
- vm
- );
-
- return parentVal
- }
- return mergeDataOrFn(parentVal, childVal)
- }
-
- return mergeDataOrFn(parentVal, childVal, vm)
-};
-
-/**
- * Hooks and props are merged as arrays.
- */
-function mergeHook (
- parentVal,
- childVal
-) {
- return childVal
- ? parentVal
- ? parentVal.concat(childVal)
- : Array.isArray(childVal)
- ? childVal
- : [childVal]
- : parentVal
-}
-
-LIFECYCLE_HOOKS.forEach(function (hook) {
- strats[hook] = mergeHook;
-});
-
-/**
- * Assets
- *
- * When a vm is present (instance creation), we need to do
- * a three-way merge between constructor options, instance
- * options and parent options.
- */
-function mergeAssets (
- parentVal,
- childVal,
- vm,
- key
-) {
- var res = Object.create(parentVal || null);
- if (childVal) {
- process.env.NODE_ENV !== 'production' && assertObjectType(key, childVal, vm);
- return extend(res, childVal)
- } else {
- return res
- }
-}
-
-ASSET_TYPES.forEach(function (type) {
- strats[type + 's'] = mergeAssets;
-});
-
-/**
- * Watchers.
- *
- * Watchers hashes should not overwrite one
- * another, so we merge them as arrays.
- */
-strats.watch = function (
- parentVal,
- childVal,
- vm,
- key
-) {
- // work around Firefox's Object.prototype.watch...
- if (parentVal === nativeWatch) { parentVal = undefined; }
- if (childVal === nativeWatch) { childVal = undefined; }
- /* istanbul ignore if */
- if (!childVal) { return Object.create(parentVal || null) }
- if (process.env.NODE_ENV !== 'production') {
- assertObjectType(key, childVal, vm);
- }
- if (!parentVal) { return childVal }
- var ret = {};
- extend(ret, parentVal);
- for (var key$1 in childVal) {
- var parent = ret[key$1];
- var child = childVal[key$1];
- if (parent && !Array.isArray(parent)) {
- parent = [parent];
- }
- ret[key$1] = parent
- ? parent.concat(child)
- : Array.isArray(child) ? child : [child];
- }
- return ret
-};
-
-/**
- * Other object hashes.
- */
-strats.props =
-strats.methods =
-strats.inject =
-strats.computed = function (
- parentVal,
- childVal,
- vm,
- key
-) {
- if (childVal && process.env.NODE_ENV !== 'production') {
- assertObjectType(key, childVal, vm);
- }
- if (!parentVal) { return childVal }
- var ret = Object.create(null);
- extend(ret, parentVal);
- if (childVal) { extend(ret, childVal); }
- return ret
-};
-strats.provide = mergeDataOrFn;
-
-/**
- * Default strategy.
- */
-var defaultStrat = function (parentVal, childVal) {
- return childVal === undefined
- ? parentVal
- : childVal
-};
-
-/**
- * Validate component names
- */
-function checkComponents (options) {
- for (var key in options.components) {
- validateComponentName(key);
- }
-}
-
-function validateComponentName (name) {
- if (!/^[a-zA-Z][\w-]*$/.test(name)) {
- warn(
- 'Invalid component name: "' + name + '". Component names ' +
- 'can only contain alphanumeric characters and the hyphen, ' +
- 'and must start with a letter.'
- );
- }
- if (isBuiltInTag(name) || config.isReservedTag(name)) {
- warn(
- 'Do not use built-in or reserved HTML elements as component ' +
- 'id: ' + name
- );
- }
-}
-
-/**
- * Ensure all props option syntax are normalized into the
- * Object-based format.
- */
-function normalizeProps (options, vm) {
- var props = options.props;
- if (!props) { return }
- var res = {};
- var i, val, name;
- if (Array.isArray(props)) {
- i = props.length;
- while (i--) {
- val = props[i];
- if (typeof val === 'string') {
- name = camelize(val);
- res[name] = { type: null };
- } else if (process.env.NODE_ENV !== 'production') {
- warn('props must be strings when using array syntax.');
- }
- }
- } else if (isPlainObject(props)) {
- for (var key in props) {
- val = props[key];
- name = camelize(key);
- res[name] = isPlainObject(val)
- ? val
- : { type: val };
- }
- } else if (process.env.NODE_ENV !== 'production') {
- warn(
- "Invalid value for option \"props\": expected an Array or an Object, " +
- "but got " + (toRawType(props)) + ".",
- vm
- );
- }
- options.props = res;
-}
-
-/**
- * Normalize all injections into Object-based format
- */
-function normalizeInject (options, vm) {
- var inject = options.inject;
- if (!inject) { return }
- var normalized = options.inject = {};
- if (Array.isArray(inject)) {
- for (var i = 0; i < inject.length; i++) {
- normalized[inject[i]] = { from: inject[i] };
- }
- } else if (isPlainObject(inject)) {
- for (var key in inject) {
- var val = inject[key];
- normalized[key] = isPlainObject(val)
- ? extend({ from: key }, val)
- : { from: val };
- }
- } else if (process.env.NODE_ENV !== 'production') {
- warn(
- "Invalid value for option \"inject\": expected an Array or an Object, " +
- "but got " + (toRawType(inject)) + ".",
- vm
- );
- }
-}
-
-/**
- * Normalize raw function directives into object format.
- */
-function normalizeDirectives (options) {
- var dirs = options.directives;
- if (dirs) {
- for (var key in dirs) {
- var def = dirs[key];
- if (typeof def === 'function') {
- dirs[key] = { bind: def, update: def };
- }
- }
- }
-}
-
-function assertObjectType (name, value, vm) {
- if (!isPlainObject(value)) {
- warn(
- "Invalid value for option \"" + name + "\": expected an Object, " +
- "but got " + (toRawType(value)) + ".",
- vm
- );
- }
-}
-
-/**
- * Merge two option objects into a new one.
- * Core utility used in both instantiation and inheritance.
- */
-function mergeOptions (
- parent,
- child,
- vm
-) {
- if (process.env.NODE_ENV !== 'production') {
- checkComponents(child);
- }
-
- if (typeof child === 'function') {
- child = child.options;
- }
-
- normalizeProps(child, vm);
- normalizeInject(child, vm);
- normalizeDirectives(child);
- var extendsFrom = child.extends;
- if (extendsFrom) {
- parent = mergeOptions(parent, extendsFrom, vm);
- }
- if (child.mixins) {
- for (var i = 0, l = child.mixins.length; i < l; i++) {
- parent = mergeOptions(parent, child.mixins[i], vm);
- }
- }
- var options = {};
- var key;
- for (key in parent) {
- mergeField(key);
- }
- for (key in child) {
- if (!hasOwn(parent, key)) {
- mergeField(key);
- }
- }
- function mergeField (key) {
- var strat = strats[key] || defaultStrat;
- options[key] = strat(parent[key], child[key], vm, key);
- }
- return options
-}
-
-/**
- * Resolve an asset.
- * This function is used because child instances need access
- * to assets defined in its ancestor chain.
- */
-function resolveAsset (
- options,
- type,
- id,
- warnMissing
-) {
- /* istanbul ignore if */
- if (typeof id !== 'string') {
- return
- }
- var assets = options[type];
- // check local registration variations first
- if (hasOwn(assets, id)) { return assets[id] }
- var camelizedId = camelize(id);
- if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }
- var PascalCaseId = capitalize(camelizedId);
- if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }
- // fallback to prototype chain
- var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];
- if (process.env.NODE_ENV !== 'production' && warnMissing && !res) {
- warn(
- 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,
- options
- );
- }
- return res
-}
-
-/* */
-
-function validateProp (
- key,
- propOptions,
- propsData,
- vm
-) {
- var prop = propOptions[key];
- var absent = !hasOwn(propsData, key);
- var value = propsData[key];
- // handle boolean props
- if (isType(Boolean, prop.type)) {
- if (absent && !hasOwn(prop, 'default')) {
- value = false;
- } else if (!isType(String, prop.type) && (value === '' || value === hyphenate(key))) {
- value = true;
- }
- }
- // check default value
- if (value === undefined) {
- value = getPropDefaultValue(vm, prop, key);
- // since the default value is a fresh copy,
- // make sure to observe it.
- var prevShouldConvert = observerState.shouldConvert;
- observerState.shouldConvert = true;
- observe(value);
- observerState.shouldConvert = prevShouldConvert;
- }
- if (
- process.env.NODE_ENV !== 'production' &&
- // skip validation for weex recycle-list child component props
- !(false && isObject(value) && ('@binding' in value))
- ) {
- assertProp(prop, key, value, vm, absent);
- }
- return value
-}
-
-/**
- * Get the default value of a prop.
- */
-function getPropDefaultValue (vm, prop, key) {
- // no default, return undefined
- if (!hasOwn(prop, 'default')) {
- return undefined
- }
- var def = prop.default;
- // warn against non-factory defaults for Object & Array
- if (process.env.NODE_ENV !== 'production' && isObject(def)) {
- warn(
- 'Invalid default value for prop "' + key + '": ' +
- 'Props with type Object/Array must use a factory function ' +
- 'to return the default value.',
- vm
- );
- }
- // the raw prop value was also undefined from previous render,
- // return previous default value to avoid unnecessary watcher trigger
- if (vm && vm.$options.propsData &&
- vm.$options.propsData[key] === undefined &&
- vm._props[key] !== undefined
- ) {
- return vm._props[key]
- }
- // call factory function for non-Function types
- // a value is Function if its prototype is function even across different execution context
- return typeof def === 'function' && getType(prop.type) !== 'Function'
- ? def.call(vm)
- : def
-}
-
-/**
- * Assert whether a prop is valid.
- */
-function assertProp (
- prop,
- name,
- value,
- vm,
- absent
-) {
- if (prop.required && absent) {
- warn(
- 'Missing required prop: "' + name + '"',
- vm
- );
- return
- }
- if (value == null && !prop.required) {
- return
- }
- var type = prop.type;
- var valid = !type || type === true;
- var expectedTypes = [];
- if (type) {
- if (!Array.isArray(type)) {
- type = [type];
- }
- for (var i = 0; i < type.length && !valid; i++) {
- var assertedType = assertType(value, type[i]);
- expectedTypes.push(assertedType.expectedType || '');
- valid = assertedType.valid;
- }
- }
- if (!valid) {
- warn(
- "Invalid prop: type check failed for prop \"" + name + "\"." +
- " Expected " + (expectedTypes.map(capitalize).join(', ')) +
- ", got " + (toRawType(value)) + ".",
- vm
- );
- return
- }
- var validator = prop.validator;
- if (validator) {
- if (!validator(value)) {
- warn(
- 'Invalid prop: custom validator check failed for prop "' + name + '".',
- vm
- );
- }
- }
-}
-
-var simpleCheckRE = /^(String|Number|Boolean|Function|Symbol)$/;
-
-function assertType (value, type) {
- var valid;
- var expectedType = getType(type);
- if (simpleCheckRE.test(expectedType)) {
- var t = typeof value;
- valid = t === expectedType.toLowerCase();
- // for primitive wrapper objects
- if (!valid && t === 'object') {
- valid = value instanceof type;
- }
- } else if (expectedType === 'Object') {
- valid = isPlainObject(value);
- } else if (expectedType === 'Array') {
- valid = Array.isArray(value);
- } else {
- valid = value instanceof type;
- }
- return {
- valid: valid,
- expectedType: expectedType
- }
-}
-
-/**
- * Use function string name to check built-in types,
- * because a simple equality check will fail when running
- * across different vms / iframes.
- */
-function getType (fn) {
- var match = fn && fn.toString().match(/^\s*function (\w+)/);
- return match ? match[1] : ''
-}
-
-function isType (type, fn) {
- if (!Array.isArray(fn)) {
- return getType(fn) === getType(type)
- }
- for (var i = 0, len = fn.length; i < len; i++) {
- if (getType(fn[i]) === getType(type)) {
- return true
- }
- }
- /* istanbul ignore next */
- return false
-}
-
-/* */
-
-function handleError (err, vm, info) {
- if (vm) {
- var cur = vm;
- while ((cur = cur.$parent)) {
- var hooks = cur.$options.errorCaptured;
- if (hooks) {
- for (var i = 0; i < hooks.length; i++) {
- try {
- var capture = hooks[i].call(cur, err, vm, info) === false;
- if (capture) { return }
- } catch (e) {
- globalHandleError(e, cur, 'errorCaptured hook');
- }
- }
- }
- }
- }
- globalHandleError(err, vm, info);
-}
-
-function globalHandleError (err, vm, info) {
- if (config.errorHandler) {
- try {
- return config.errorHandler.call(null, err, vm, info)
- } catch (e) {
- logError(e, null, 'config.errorHandler');
- }
- }
- logError(err, vm, info);
-}
-
-function logError (err, vm, info) {
- if (process.env.NODE_ENV !== 'production') {
- warn(("Error in " + info + ": \"" + (err.toString()) + "\""), vm);
- }
- /* istanbul ignore else */
- if ((inBrowser || inWeex) && typeof console !== 'undefined') {
- console.error(err);
- } else {
- throw err
- }
-}
-
-/* */
-/* globals MessageChannel */
-
-var callbacks = [];
-var pending = false;
-
-function flushCallbacks () {
- pending = false;
- var copies = callbacks.slice(0);
- callbacks.length = 0;
- for (var i = 0; i < copies.length; i++) {
- copies[i]();
- }
-}
-
-// Here we have async deferring wrappers using both micro and macro tasks.
-// In < 2.4 we used micro tasks everywhere, but there are some scenarios where
-// micro tasks have too high a priority and fires in between supposedly
-// sequential events (e.g. #4521, #6690) or even between bubbling of the same
-// event (#6566). However, using macro tasks everywhere also has subtle problems
-// when state is changed right before repaint (e.g. #6813, out-in transitions).
-// Here we use micro task by default, but expose a way to force macro task when
-// needed (e.g. in event handlers attached by v-on).
-var microTimerFunc;
-var macroTimerFunc;
-var useMacroTask = false;
-
-// Determine (macro) Task defer implementation.
-// Technically setImmediate should be the ideal choice, but it's only available
-// in IE. The only polyfill that consistently queues the callback after all DOM
-// events triggered in the same loop is by using MessageChannel.
-/* istanbul ignore if */
-if (typeof setImmediate !== 'undefined' && isNative(setImmediate)) {
- macroTimerFunc = function () {
- setImmediate(flushCallbacks);
- };
-} else if (typeof MessageChannel !== 'undefined' && (
- isNative(MessageChannel) ||
- // PhantomJS
- MessageChannel.toString() === '[object MessageChannelConstructor]'
-)) {
- var channel = new MessageChannel();
- var port = channel.port2;
- channel.port1.onmessage = flushCallbacks;
- macroTimerFunc = function () {
- port.postMessage(1);
- };
-} else {
- /* istanbul ignore next */
- macroTimerFunc = function () {
- setTimeout(flushCallbacks, 0);
- };
-}
-
-// Determine MicroTask defer implementation.
-/* istanbul ignore next, $flow-disable-line */
-if (typeof Promise !== 'undefined' && isNative(Promise)) {
- var p = Promise.resolve();
- microTimerFunc = function () {
- p.then(flushCallbacks);
- // in problematic UIWebViews, Promise.then doesn't completely break, but
- // it can get stuck in a weird state where callbacks are pushed into the
- // microtask queue but the queue isn't being flushed, until the browser
- // needs to do some other work, e.g. handle a timer. Therefore we can
- // "force" the microtask queue to be flushed by adding an empty timer.
- if (isIOS) { setTimeout(noop); }
- };
-} else {
- // fallback to macro
- microTimerFunc = macroTimerFunc;
-}
-
-/**
- * Wrap a function so that if any code inside triggers state change,
- * the changes are queued using a Task instead of a MicroTask.
- */
-function withMacroTask (fn) {
- return fn._withTask || (fn._withTask = function () {
- useMacroTask = true;
- var res = fn.apply(null, arguments);
- useMacroTask = false;
- return res
- })
-}
-
-function nextTick (cb, ctx) {
- var _resolve;
- callbacks.push(function () {
- if (cb) {
- try {
- cb.call(ctx);
- } catch (e) {
- handleError(e, ctx, 'nextTick');
- }
- } else if (_resolve) {
- _resolve(ctx);
- }
- });
- if (!pending) {
- pending = true;
- if (useMacroTask) {
- macroTimerFunc();
- } else {
- microTimerFunc();
- }
- }
- // $flow-disable-line
- if (!cb && typeof Promise !== 'undefined') {
- return new Promise(function (resolve) {
- _resolve = resolve;
- })
- }
-}
-
-/* */
-
-/* not type checking this file because flow doesn't play well with Proxy */
-
-var initProxy;
-
-if (process.env.NODE_ENV !== 'production') {
- var allowedGlobals = makeMap(
- 'Infinity,undefined,NaN,isFinite,isNaN,' +
- 'parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,' +
- 'Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,' +
- 'require' // for Webpack/Browserify
- );
-
- var warnNonPresent = function (target, key) {
- warn(
- "Property or method \"" + key + "\" is not defined on the instance but " +
- 'referenced during render. Make sure that this property is reactive, ' +
- 'either in the data option, or for class-based components, by ' +
- 'initializing the property. ' +
- 'See: https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.',
- target
- );
- };
-
- var hasProxy =
- typeof Proxy !== 'undefined' &&
- Proxy.toString().match(/native code/);
-
- if (hasProxy) {
- var isBuiltInModifier = makeMap('stop,prevent,self,ctrl,shift,alt,meta,exact');
- config.keyCodes = new Proxy(config.keyCodes, {
- set: function set (target, key, value) {
- if (isBuiltInModifier(key)) {
- warn(("Avoid overwriting built-in modifier in config.keyCodes: ." + key));
- return false
- } else {
- target[key] = value;
- return true
- }
- }
- });
- }
-
- var hasHandler = {
- has: function has (target, key) {
- var has = key in target;
- var isAllowed = allowedGlobals(key) || key.charAt(0) === '_';
- if (!has && !isAllowed) {
- warnNonPresent(target, key);
- }
- return has || !isAllowed
- }
- };
-
- var getHandler = {
- get: function get (target, key) {
- if (typeof key === 'string' && !(key in target)) {
- warnNonPresent(target, key);
- }
- return target[key]
- }
- };
-
- initProxy = function initProxy (vm) {
- if (hasProxy) {
- // determine which proxy handler to use
- var options = vm.$options;
- var handlers = options.render && options.render._withStripped
- ? getHandler
- : hasHandler;
- vm._renderProxy = new Proxy(vm, handlers);
- } else {
- vm._renderProxy = vm;
- }
- };
-}
-
-/* */
-
-var seenObjects = new _Set();
-
-/**
- * Recursively traverse an object to evoke all converted
- * getters, so that every nested property inside the object
- * is collected as a "deep" dependency.
- */
-function traverse (val) {
- _traverse(val, seenObjects);
- seenObjects.clear();
-}
-
-function _traverse (val, seen) {
- var i, keys;
- var isA = Array.isArray(val);
- if ((!isA && !isObject(val)) || Object.isFrozen(val)) {
- return
- }
- if (val.__ob__) {
- var depId = val.__ob__.dep.id;
- if (seen.has(depId)) {
- return
- }
- seen.add(depId);
- }
- if (isA) {
- i = val.length;
- while (i--) { _traverse(val[i], seen); }
- } else {
- keys = Object.keys(val);
- i = keys.length;
- while (i--) { _traverse(val[keys[i]], seen); }
- }
-}
-
-var mark;
-var measure;
-
-if (process.env.NODE_ENV !== 'production') {
- var perf = inBrowser && window.performance;
- /* istanbul ignore if */
- if (
- perf &&
- perf.mark &&
- perf.measure &&
- perf.clearMarks &&
- perf.clearMeasures
- ) {
- mark = function (tag) { return perf.mark(tag); };
- measure = function (name, startTag, endTag) {
- perf.measure(name, startTag, endTag);
- perf.clearMarks(startTag);
- perf.clearMarks(endTag);
- perf.clearMeasures(name);
- };
- }
-}
-
-/* */
-
-var normalizeEvent = cached(function (name) {
- var passive = name.charAt(0) === '&';
- name = passive ? name.slice(1) : name;
- var once$$1 = name.charAt(0) === '~'; // Prefixed last, checked first
- name = once$$1 ? name.slice(1) : name;
- var capture = name.charAt(0) === '!';
- name = capture ? name.slice(1) : name;
- return {
- name: name,
- once: once$$1,
- capture: capture,
- passive: passive
- }
-});
-
-function createFnInvoker (fns) {
- function invoker () {
- var arguments$1 = arguments;
-
- var fns = invoker.fns;
- if (Array.isArray(fns)) {
- var cloned = fns.slice();
- for (var i = 0; i < cloned.length; i++) {
- cloned[i].apply(null, arguments$1);
- }
- } else {
- // return handler return value for single handlers
- return fns.apply(null, arguments)
- }
- }
- invoker.fns = fns;
- return invoker
-}
-
-function updateListeners (
- on,
- oldOn,
- add,
- remove$$1,
- vm
-) {
- var name, def, cur, old, event;
- for (name in on) {
- def = cur = on[name];
- old = oldOn[name];
- event = normalizeEvent(name);
- /* istanbul ignore if */
- if (isUndef(cur)) {
- process.env.NODE_ENV !== 'production' && warn(
- "Invalid handler for event \"" + (event.name) + "\": got " + String(cur),
- vm
- );
- } else if (isUndef(old)) {
- if (isUndef(cur.fns)) {
- cur = on[name] = createFnInvoker(cur);
- }
- add(event.name, cur, event.once, event.capture, event.passive, event.params);
- } else if (cur !== old) {
- old.fns = cur;
- on[name] = old;
- }
- }
- for (name in oldOn) {
- if (isUndef(on[name])) {
- event = normalizeEvent(name);
- remove$$1(event.name, oldOn[name], event.capture);
- }
- }
-}
-
-/* */
-
-function mergeVNodeHook (def, hookKey, hook) {
- if (def instanceof VNode) {
- def = def.data.hook || (def.data.hook = {});
- }
- var invoker;
- var oldHook = def[hookKey];
-
- function wrappedHook () {
- hook.apply(this, arguments);
- // important: remove merged hook to ensure it's called only once
- // and prevent memory leak
- remove(invoker.fns, wrappedHook);
- }
-
- if (isUndef(oldHook)) {
- // no existing hook
- invoker = createFnInvoker([wrappedHook]);
- } else {
- /* istanbul ignore if */
- if (isDef(oldHook.fns) && isTrue(oldHook.merged)) {
- // already a merged invoker
- invoker = oldHook;
- invoker.fns.push(wrappedHook);
- } else {
- // existing plain hook
- invoker = createFnInvoker([oldHook, wrappedHook]);
- }
- }
-
- invoker.merged = true;
- def[hookKey] = invoker;
-}
-
-/* */
-
-function extractPropsFromVNodeData (
- data,
- Ctor,
- tag
-) {
- // we are only extracting raw values here.
- // validation and default values are handled in the child
- // component itself.
- var propOptions = Ctor.options.props;
- if (isUndef(propOptions)) {
- return
- }
- var res = {};
- var attrs = data.attrs;
- var props = data.props;
- if (isDef(attrs) || isDef(props)) {
- for (var key in propOptions) {
- var altKey = hyphenate(key);
- if (process.env.NODE_ENV !== 'production') {
- var keyInLowerCase = key.toLowerCase();
- if (
- key !== keyInLowerCase &&
- attrs && hasOwn(attrs, keyInLowerCase)
- ) {
- tip(
- "Prop \"" + keyInLowerCase + "\" is passed to component " +
- (formatComponentName(tag || Ctor)) + ", but the declared prop name is" +
- " \"" + key + "\". " +
- "Note that HTML attributes are case-insensitive and camelCased " +
- "props need to use their kebab-case equivalents when using in-DOM " +
- "templates. You should probably use \"" + altKey + "\" instead of \"" + key + "\"."
- );
- }
- }
- checkProp(res, props, key, altKey, true) ||
- checkProp(res, attrs, key, altKey, false);
- }
- }
- return res
-}
-
-function checkProp (
- res,
- hash,
- key,
- altKey,
- preserve
-) {
- if (isDef(hash)) {
- if (hasOwn(hash, key)) {
- res[key] = hash[key];
- if (!preserve) {
- delete hash[key];
- }
- return true
- } else if (hasOwn(hash, altKey)) {
- res[key] = hash[altKey];
- if (!preserve) {
- delete hash[altKey];
- }
- return true
- }
- }
- return false
-}
-
-/* */
-
-// The template compiler attempts to minimize the need for normalization by
-// statically analyzing the template at compile time.
-//
-// For plain HTML markup, normalization can be completely skipped because the
-// generated render function is guaranteed to return Array<VNode>. There are
-// two cases where extra normalization is needed:
-
-// 1. When the children contains components - because a functional component
-// may return an Array instead of a single root. In this case, just a simple
-// normalization is needed - if any child is an Array, we flatten the whole
-// thing with Array.prototype.concat. It is guaranteed to be only 1-level deep
-// because functional components already normalize their own children.
-function simpleNormalizeChildren (children) {
- for (var i = 0; i < children.length; i++) {
- if (Array.isArray(children[i])) {
- return Array.prototype.concat.apply([], children)
- }
- }
- return children
-}
-
-// 2. When the children contains constructs that always generated nested Arrays,
-// e.g. <template>, <slot>, v-for, or when the children is provided by user
-// with hand-written render functions / JSX. In such cases a full normalization
-// is needed to cater to all possible types of children values.
-function normalizeChildren (children) {
- return isPrimitive(children)
- ? [createTextVNode(children)]
- : Array.isArray(children)
- ? normalizeArrayChildren(children)
- : undefined
-}
-
-function isTextNode (node) {
- return isDef(node) && isDef(node.text) && isFalse(node.isComment)
-}
-
-function normalizeArrayChildren (children, nestedIndex) {
- var res = [];
- var i, c, lastIndex, last;
- for (i = 0; i < children.length; i++) {
- c = children[i];
- if (isUndef(c) || typeof c === 'boolean') { continue }
- lastIndex = res.length - 1;
- last = res[lastIndex];
- // nested
- if (Array.isArray(c)) {
- if (c.length > 0) {
- c = normalizeArrayChildren(c, ((nestedIndex || '') + "_" + i));
- // merge adjacent text nodes
- if (isTextNode(c[0]) && isTextNode(last)) {
- res[lastIndex] = createTextVNode(last.text + (c[0]).text);
- c.shift();
- }
- res.push.apply(res, c);
- }
- } else if (isPrimitive(c)) {
- if (isTextNode(last)) {
- // merge adjacent text nodes
- // this is necessary for SSR hydration because text nodes are
- // essentially merged when rendered to HTML strings
- res[lastIndex] = createTextVNode(last.text + c);
- } else if (c !== '') {
- // convert primitive to vnode
- res.push(createTextVNode(c));
- }
- } else {
- if (isTextNode(c) && isTextNode(last)) {
- // merge adjacent text nodes
- res[lastIndex] = createTextVNode(last.text + c.text);
- } else {
- // default key for nested array children (likely generated by v-for)
- if (isTrue(children._isVList) &&
- isDef(c.tag) &&
- isUndef(c.key) &&
- isDef(nestedIndex)) {
- c.key = "__vlist" + nestedIndex + "_" + i + "__";
- }
- res.push(c);
- }
- }
- }
- return res
-}
-
-/* */
-
-function ensureCtor (comp, base) {
- if (
- comp.__esModule ||
- (hasSymbol && comp[Symbol.toStringTag] === 'Module')
- ) {
- comp = comp.default;
- }
- return isObject(comp)
- ? base.extend(comp)
- : comp
-}
-
-function createAsyncPlaceholder (
- factory,
- data,
- context,
- children,
- tag
-) {
- var node = createEmptyVNode();
- node.asyncFactory = factory;
- node.asyncMeta = { data: data, context: context, children: children, tag: tag };
- return node
-}
-
-function resolveAsyncComponent (
- factory,
- baseCtor,
- context
-) {
- if (isTrue(factory.error) && isDef(factory.errorComp)) {
- return factory.errorComp
- }
-
- if (isDef(factory.resolved)) {
- return factory.resolved
- }
-
- if (isTrue(factory.loading) && isDef(factory.loadingComp)) {
- return factory.loadingComp
- }
-
- if (isDef(factory.contexts)) {
- // already pending
- factory.contexts.push(context);
- } else {
- var contexts = factory.contexts = [context];
- var sync = true;
-
- var forceRender = function () {
- for (var i = 0, l = contexts.length; i < l; i++) {
- contexts[i].$forceUpdate();
- }
- };
-
- var resolve = once(function (res) {
- // cache resolved
- factory.resolved = ensureCtor(res, baseCtor);
- // invoke callbacks only if this is not a synchronous resolve
- // (async resolves are shimmed as synchronous during SSR)
- if (!sync) {
- forceRender();
- }
- });
-
- var reject = once(function (reason) {
- process.env.NODE_ENV !== 'production' && warn(
- "Failed to resolve async component: " + (String(factory)) +
- (reason ? ("\nReason: " + reason) : '')
- );
- if (isDef(factory.errorComp)) {
- factory.error = true;
- forceRender();
- }
- });
-
- var res = factory(resolve, reject);
-
- if (isObject(res)) {
- if (typeof res.then === 'function') {
- // () => Promise
- if (isUndef(factory.resolved)) {
- res.then(resolve, reject);
- }
- } else if (isDef(res.component) && typeof res.component.then === 'function') {
- res.component.then(resolve, reject);
-
- if (isDef(res.error)) {
- factory.errorComp = ensureCtor(res.error, baseCtor);
- }
-
- if (isDef(res.loading)) {
- factory.loadingComp = ensureCtor(res.loading, baseCtor);
- if (res.delay === 0) {
- factory.loading = true;
- } else {
- setTimeout(function () {
- if (isUndef(factory.resolved) && isUndef(factory.error)) {
- factory.loading = true;
- forceRender();
- }
- }, res.delay || 200);
- }
- }
-
- if (isDef(res.timeout)) {
- setTimeout(function () {
- if (isUndef(factory.resolved)) {
- reject(
- process.env.NODE_ENV !== 'production'
- ? ("timeout (" + (res.timeout) + "ms)")
- : null
- );
- }
- }, res.timeout);
- }
- }
- }
-
- sync = false;
- // return in case resolved synchronously
- return factory.loading
- ? factory.loadingComp
- : factory.resolved
- }
-}
-
-/* */
-
-function isAsyncPlaceholder (node) {
- return node.isComment && node.asyncFactory
-}
-
-/* */
-
-function getFirstComponentChild (children) {
- if (Array.isArray(children)) {
- for (var i = 0; i < children.length; i++) {
- var c = children[i];
- if (isDef(c) && (isDef(c.componentOptions) || isAsyncPlaceholder(c))) {
- return c
- }
- }
- }
-}
-
-/* */
-
-/* */
-
-function initEvents (vm) {
- vm._events = Object.create(null);
- vm._hasHookEvent = false;
- // init parent attached events
- var listeners = vm.$options._parentListeners;
- if (listeners) {
- updateComponentListeners(vm, listeners);
- }
-}
-
-var target;
-
-function add (event, fn, once) {
- if (once) {
- target.$once(event, fn);
- } else {
- target.$on(event, fn);
- }
-}
-
-function remove$1 (event, fn) {
- target.$off(event, fn);
-}
-
-function updateComponentListeners (
- vm,
- listeners,
- oldListeners
-) {
- target = vm;
- updateListeners(listeners, oldListeners || {}, add, remove$1, vm);
- target = undefined;
-}
-
-function eventsMixin (Vue) {
- var hookRE = /^hook:/;
- Vue.prototype.$on = function (event, fn) {
- var this$1 = this;
-
- var vm = this;
- if (Array.isArray(event)) {
- for (var i = 0, l = event.length; i < l; i++) {
- this$1.$on(event[i], fn);
- }
- } else {
- (vm._events[event] || (vm._events[event] = [])).push(fn);
- // optimize hook:event cost by using a boolean flag marked at registration
- // instead of a hash lookup
- if (hookRE.test(event)) {
- vm._hasHookEvent = true;
- }
- }
- return vm
- };
-
- Vue.prototype.$once = function (event, fn) {
- var vm = this;
- function on () {
- vm.$off(event, on);
- fn.apply(vm, arguments);
- }
- on.fn = fn;
- vm.$on(event, on);
- return vm
- };
-
- Vue.prototype.$off = function (event, fn) {
- var this$1 = this;
-
- var vm = this;
- // all
- if (!arguments.length) {
- vm._events = Object.create(null);
- return vm
- }
- // array of events
- if (Array.isArray(event)) {
- for (var i = 0, l = event.length; i < l; i++) {
- this$1.$off(event[i], fn);
- }
- return vm
- }
- // specific event
- var cbs = vm._events[event];
- if (!cbs) {
- return vm
- }
- if (!fn) {
- vm._events[event] = null;
- return vm
- }
- if (fn) {
- // specific handler
- var cb;
- var i$1 = cbs.length;
- while (i$1--) {
- cb = cbs[i$1];
- if (cb === fn || cb.fn === fn) {
- cbs.splice(i$1, 1);
- break
- }
- }
- }
- return vm
- };
-
- Vue.prototype.$emit = function (event) {
- var vm = this;
- if (process.env.NODE_ENV !== 'production') {
- var lowerCaseEvent = event.toLowerCase();
- if (lowerCaseEvent !== event && vm._events[lowerCaseEvent]) {
- tip(
- "Event \"" + lowerCaseEvent + "\" is emitted in component " +
- (formatComponentName(vm)) + " but the handler is registered for \"" + event + "\". " +
- "Note that HTML attributes are case-insensitive and you cannot use " +
- "v-on to listen to camelCase events when using in-DOM templates. " +
- "You should probably use \"" + (hyphenate(event)) + "\" instead of \"" + event + "\"."
- );
- }
- }
- var cbs = vm._events[event];
- if (cbs) {
- cbs = cbs.length > 1 ? toArray(cbs) : cbs;
- var args = toArray(arguments, 1);
- for (var i = 0, l = cbs.length; i < l; i++) {
- try {
- cbs[i].apply(vm, args);
- } catch (e) {
- handleError(e, vm, ("event handler for \"" + event + "\""));
- }
- }
- }
- return vm
- };
-}
-
-/* */
-
-
-
-/**
- * Runtime helper for resolving raw children VNodes into a slot object.
- */
-function resolveSlots (
- children,
- context
-) {
- var slots = {};
- if (!children) {
- return slots
- }
- for (var i = 0, l = children.length; i < l; i++) {
- var child = children[i];
- var data = child.data;
- // remove slot attribute if the node is resolved as a Vue slot node
- if (data && data.attrs && data.attrs.slot) {
- delete data.attrs.slot;
- }
- // named slots should only be respected if the vnode was rendered in the
- // same context.
- if ((child.context === context || child.fnContext === context) &&
- data && data.slot != null
- ) {
- var name = data.slot;
- var slot = (slots[name] || (slots[name] = []));
- if (child.tag === 'template') {
- slot.push.apply(slot, child.children || []);
- } else {
- slot.push(child);
- }
- } else {
- (slots.default || (slots.default = [])).push(child);
- }
- }
- // ignore slots that contains only whitespace
- for (var name$1 in slots) {
- if (slots[name$1].every(isWhitespace)) {
- delete slots[name$1];
- }
- }
- return slots
-}
-
-function isWhitespace (node) {
- return (node.isComment && !node.asyncFactory) || node.text === ' '
-}
-
-function resolveScopedSlots (
- fns, // see flow/vnode
- res
-) {
- res = res || {};
- for (var i = 0; i < fns.length; i++) {
- if (Array.isArray(fns[i])) {
- resolveScopedSlots(fns[i], res);
- } else {
- res[fns[i].key] = fns[i].fn;
- }
- }
- return res
-}
-
-/* */
-
-var activeInstance = null;
-var isUpdatingChildComponent = false;
-
-function initLifecycle (vm) {
- var options = vm.$options;
-
- // locate first non-abstract parent
- var parent = options.parent;
- if (parent && !options.abstract) {
- while (parent.$options.abstract && parent.$parent) {
- parent = parent.$parent;
- }
- parent.$children.push(vm);
- }
-
- vm.$parent = parent;
- vm.$root = parent ? parent.$root : vm;
-
- vm.$children = [];
- vm.$refs = {};
-
- vm._watcher = null;
- vm._inactive = null;
- vm._directInactive = false;
- vm._isMounted = false;
- vm._isDestroyed = false;
- vm._isBeingDestroyed = false;
-}
-
-function lifecycleMixin (Vue) {
- Vue.prototype._update = function (vnode, hydrating) {
- var vm = this;
- if (vm._isMounted) {
- callHook(vm, 'beforeUpdate');
- }
- var prevEl = vm.$el;
- var prevVnode = vm._vnode;
- var prevActiveInstance = activeInstance;
- activeInstance = vm;
- vm._vnode = vnode;
- // Vue.prototype.__patch__ is injected in entry points
- // based on the rendering backend used.
- if (!prevVnode) {
- // initial render
- vm.$el = vm.__patch__(
- vm.$el, vnode, hydrating, false /* removeOnly */,
- vm.$options._parentElm,
- vm.$options._refElm
- );
- // no need for the ref nodes after initial patch
- // this prevents keeping a detached DOM tree in memory (#5851)
- vm.$options._parentElm = vm.$options._refElm = null;
- } else {
- // updates
- vm.$el = vm.__patch__(prevVnode, vnode);
- }
- activeInstance = prevActiveInstance;
- // update __vue__ reference
- if (prevEl) {
- prevEl.__vue__ = null;
- }
- if (vm.$el) {
- vm.$el.__vue__ = vm;
- }
- // if parent is an HOC, update its $el as well
- if (vm.$vnode && vm.$parent && vm.$vnode === vm.$parent._vnode) {
- vm.$parent.$el = vm.$el;
- }
- // updated hook is called by the scheduler to ensure that children are
- // updated in a parent's updated hook.
- };
-
- Vue.prototype.$forceUpdate = function () {
- var vm = this;
- if (vm._watcher) {
- vm._watcher.update();
- }
- };
-
- Vue.prototype.$destroy = function () {
- var vm = this;
- if (vm._isBeingDestroyed) {
- return
- }
- callHook(vm, 'beforeDestroy');
- vm._isBeingDestroyed = true;
- // remove self from parent
- var parent = vm.$parent;
- if (parent && !parent._isBeingDestroyed && !vm.$options.abstract) {
- remove(parent.$children, vm);
- }
- // teardown watchers
- if (vm._watcher) {
- vm._watcher.teardown();
- }
- var i = vm._watchers.length;
- while (i--) {
- vm._watchers[i].teardown();
- }
- // remove reference from data ob
- // frozen object may not have observer.
- if (vm._data.__ob__) {
- vm._data.__ob__.vmCount--;
- }
- // call the last hook...
- vm._isDestroyed = true;
- // invoke destroy hooks on current rendered tree
- vm.__patch__(vm._vnode, null);
- // fire destroyed hook
- callHook(vm, 'destroyed');
- // turn off all instance listeners.
- vm.$off();
- // remove __vue__ reference
- if (vm.$el) {
- vm.$el.__vue__ = null;
- }
- // release circular reference (#6759)
- if (vm.$vnode) {
- vm.$vnode.parent = null;
- }
- };
-}
-
-function mountComponent (
- vm,
- el,
- hydrating
-) {
- vm.$el = el;
- if (!vm.$options.render) {
- vm.$options.render = createEmptyVNode;
- if (process.env.NODE_ENV !== 'production') {
- /* istanbul ignore if */
- if ((vm.$options.template && vm.$options.template.charAt(0) !== '#') ||
- vm.$options.el || el) {
- warn(
- 'You are using the runtime-only build of Vue where the template ' +
- 'compiler is not available. Either pre-compile the templates into ' +
- 'render functions, or use the compiler-included build.',
- vm
- );
- } else {
- warn(
- 'Failed to mount component: template or render function not defined.',
- vm
- );
- }
- }
- }
- callHook(vm, 'beforeMount');
-
- var updateComponent;
- /* istanbul ignore if */
- if (process.env.NODE_ENV !== 'production' && config.performance && mark) {
- updateComponent = function () {
- var name = vm._name;
- var id = vm._uid;
- var startTag = "vue-perf-start:" + id;
- var endTag = "vue-perf-end:" + id;
-
- mark(startTag);
- var vnode = vm._render();
- mark(endTag);
- measure(("vue " + name + " render"), startTag, endTag);
-
- mark(startTag);
- vm._update(vnode, hydrating);
- mark(endTag);
- measure(("vue " + name + " patch"), startTag, endTag);
- };
- } else {
- updateComponent = function () {
- vm._update(vm._render(), hydrating);
- };
- }
-
- // we set this to vm._watcher inside the watcher's constructor
- // since the watcher's initial patch may call $forceUpdate (e.g. inside child
- // component's mounted hook), which relies on vm._watcher being already defined
- new Watcher(vm, updateComponent, noop, null, true /* isRenderWatcher */);
- hydrating = false;
-
- // manually mounted instance, call mounted on self
- // mounted is called for render-created child components in its inserted hook
- if (vm.$vnode == null) {
- vm._isMounted = true;
- callHook(vm, 'mounted');
- }
- return vm
-}
-
-function updateChildComponent (
- vm,
- propsData,
- listeners,
- parentVnode,
- renderChildren
-) {
- if (process.env.NODE_ENV !== 'production') {
- isUpdatingChildComponent = true;
- }
-
- // determine whether component has slot children
- // we need to do this before overwriting $options._renderChildren
- var hasChildren = !!(
- renderChildren || // has new static slots
- vm.$options._renderChildren || // has old static slots
- parentVnode.data.scopedSlots || // has new scoped slots
- vm.$scopedSlots !== emptyObject // has old scoped slots
- );
-
- vm.$options._parentVnode = parentVnode;
- vm.$vnode = parentVnode; // update vm's placeholder node without re-render
-
- if (vm._vnode) { // update child tree's parent
- vm._vnode.parent = parentVnode;
- }
- vm.$options._renderChildren = renderChildren;
-
- // update $attrs and $listeners hash
- // these are also reactive so they may trigger child update if the child
- // used them during render
- vm.$attrs = (parentVnode.data && parentVnode.data.attrs) || emptyObject;
- vm.$listeners = listeners || emptyObject;
-
- // update props
- if (propsData && vm.$options.props) {
- observerState.shouldConvert = false;
- var props = vm._props;
- var propKeys = vm.$options._propKeys || [];
- for (var i = 0; i < propKeys.length; i++) {
- var key = propKeys[i];
- props[key] = validateProp(key, vm.$options.props, propsData, vm);
- }
- observerState.shouldConvert = true;
- // keep a copy of raw propsData
- vm.$options.propsData = propsData;
- }
-
- // update listeners
- if (listeners) {
- var oldListeners = vm.$options._parentListeners;
- vm.$options._parentListeners = listeners;
- updateComponentListeners(vm, listeners, oldListeners);
- }
- // resolve slots + force update if has children
- if (hasChildren) {
- vm.$slots = resolveSlots(renderChildren, parentVnode.context);
- vm.$forceUpdate();
- }
-
- if (process.env.NODE_ENV !== 'production') {
- isUpdatingChildComponent = false;
- }
-}
-
-function isInInactiveTree (vm) {
- while (vm && (vm = vm.$parent)) {
- if (vm._inactive) { return true }
- }
- return false
-}
-
-function activateChildComponent (vm, direct) {
- if (direct) {
- vm._directInactive = false;
- if (isInInactiveTree(vm)) {
- return
- }
- } else if (vm._directInactive) {
- return
- }
- if (vm._inactive || vm._inactive === null) {
- vm._inactive = false;
- for (var i = 0; i < vm.$children.length; i++) {
- activateChildComponent(vm.$children[i]);
- }
- callHook(vm, 'activated');
- }
-}
-
-function deactivateChildComponent (vm, direct) {
- if (direct) {
- vm._directInactive = true;
- if (isInInactiveTree(vm)) {
- return
- }
- }
- if (!vm._inactive) {
- vm._inactive = true;
- for (var i = 0; i < vm.$children.length; i++) {
- deactivateChildComponent(vm.$children[i]);
- }
- callHook(vm, 'deactivated');
- }
-}
-
-function callHook (vm, hook) {
- var handlers = vm.$options[hook];
- if (handlers) {
- for (var i = 0, j = handlers.length; i < j; i++) {
- try {
- handlers[i].call(vm);
- } catch (e) {
- handleError(e, vm, (hook + " hook"));
- }
- }
- }
- if (vm._hasHookEvent) {
- vm.$emit('hook:' + hook);
- }
-}
-
-/* */
-
-
-var MAX_UPDATE_COUNT = 100;
-
-var queue = [];
-var activatedChildren = [];
-var has = {};
-var circular = {};
-var waiting = false;
-var flushing = false;
-var index = 0;
-
-/**
- * Reset the scheduler's state.
- */
-function resetSchedulerState () {
- index = queue.length = activatedChildren.length = 0;
- has = {};
- if (process.env.NODE_ENV !== 'production') {
- circular = {};
- }
- waiting = flushing = false;
-}
-
-/**
- * Flush both queues and run the watchers.
- */
-function flushSchedulerQueue () {
- flushing = true;
- var watcher, id;
-
- // Sort queue before flush.
- // This ensures that:
- // 1. Components are updated from parent to child. (because parent is always
- // created before the child)
- // 2. A component's user watchers are run before its render watcher (because
- // user watchers are created before the render watcher)
- // 3. If a component is destroyed during a parent component's watcher run,
- // its watchers can be skipped.
- queue.sort(function (a, b) { return a.id - b.id; });
-
- // do not cache length because more watchers might be pushed
- // as we run existing watchers
- for (index = 0; index < queue.length; index++) {
- watcher = queue[index];
- id = watcher.id;
- has[id] = null;
- watcher.run();
- // in dev build, check and stop circular updates.
- if (process.env.NODE_ENV !== 'production' && has[id] != null) {
- circular[id] = (circular[id] || 0) + 1;
- if (circular[id] > MAX_UPDATE_COUNT) {
- warn(
- 'You may have an infinite update loop ' + (
- watcher.user
- ? ("in watcher with expression \"" + (watcher.expression) + "\"")
- : "in a component render function."
- ),
- watcher.vm
- );
- break
- }
- }
- }
-
- // keep copies of post queues before resetting state
- var activatedQueue = activatedChildren.slice();
- var updatedQueue = queue.slice();
-
- resetSchedulerState();
-
- // call component updated and activated hooks
- callActivatedHooks(activatedQueue);
- callUpdatedHooks(updatedQueue);
-
- // devtool hook
- /* istanbul ignore if */
- if (devtools && config.devtools) {
- devtools.emit('flush');
- }
-}
-
-function callUpdatedHooks (queue) {
- var i = queue.length;
- while (i--) {
- var watcher = queue[i];
- var vm = watcher.vm;
- if (vm._watcher === watcher && vm._isMounted) {
- callHook(vm, 'updated');
- }
- }
-}
-
-/**
- * Queue a kept-alive component that was activated during patch.
- * The queue will be processed after the entire tree has been patched.
- */
-function queueActivatedComponent (vm) {
- // setting _inactive to false here so that a render function can
- // rely on checking whether it's in an inactive tree (e.g. router-view)
- vm._inactive = false;
- activatedChildren.push(vm);
-}
-
-function callActivatedHooks (queue) {
- for (var i = 0; i < queue.length; i++) {
- queue[i]._inactive = true;
- activateChildComponent(queue[i], true /* true */);
- }
-}
-
-/**
- * Push a watcher into the watcher queue.
- * Jobs with duplicate IDs will be skipped unless it's
- * pushed when the queue is being flushed.
- */
-function queueWatcher (watcher) {
- var id = watcher.id;
- if (has[id] == null) {
- has[id] = true;
- if (!flushing) {
- queue.push(watcher);
- } else {
- // if already flushing, splice the watcher based on its id
- // if already past its id, it will be run next immediately.
- var i = queue.length - 1;
- while (i > index && queue[i].id > watcher.id) {
- i--;
- }
- queue.splice(i + 1, 0, watcher);
- }
- // queue the flush
- if (!waiting) {
- waiting = true;
- nextTick(flushSchedulerQueue);
- }
- }
-}
-
-/* */
-
-var uid$2 = 0;
-
-/**
- * A watcher parses an expression, collects dependencies,
- * and fires callback when the expression value changes.
- * This is used for both the $watch() api and directives.
- */
-var Watcher = function Watcher (
- vm,
- expOrFn,
- cb,
- options,
- isRenderWatcher
-) {
- this.vm = vm;
- if (isRenderWatcher) {
- vm._watcher = this;
- }
- vm._watchers.push(this);
- // options
- if (options) {
- this.deep = !!options.deep;
- this.user = !!options.user;
- this.lazy = !!options.lazy;
- this.sync = !!options.sync;
- } else {
- this.deep = this.user = this.lazy = this.sync = false;
- }
- this.cb = cb;
- this.id = ++uid$2; // uid for batching
- this.active = true;
- this.dirty = this.lazy; // for lazy watchers
- this.deps = [];
- this.newDeps = [];
- this.depIds = new _Set();
- this.newDepIds = new _Set();
- this.expression = process.env.NODE_ENV !== 'production'
- ? expOrFn.toString()
- : '';
- // parse expression for getter
- if (typeof expOrFn === 'function') {
- this.getter = expOrFn;
- } else {
- this.getter = parsePath(expOrFn);
- if (!this.getter) {
- this.getter = function () {};
- process.env.NODE_ENV !== 'production' && warn(
- "Failed watching path: \"" + expOrFn + "\" " +
- 'Watcher only accepts simple dot-delimited paths. ' +
- 'For full control, use a function instead.',
- vm
- );
- }
- }
- this.value = this.lazy
- ? undefined
- : this.get();
-};
-
-/**
- * Evaluate the getter, and re-collect dependencies.
- */
-Watcher.prototype.get = function get () {
- pushTarget(this);
- var value;
- var vm = this.vm;
- try {
- value = this.getter.call(vm, vm);
- } catch (e) {
- if (this.user) {
- handleError(e, vm, ("getter for watcher \"" + (this.expression) + "\""));
- } else {
- throw e
- }
- } finally {
- // "touch" every property so they are all tracked as
- // dependencies for deep watching
- if (this.deep) {
- traverse(value);
- }
- popTarget();
- this.cleanupDeps();
- }
- return value
-};
-
-/**
- * Add a dependency to this directive.
- */
-Watcher.prototype.addDep = function addDep (dep) {
- var id = dep.id;
- if (!this.newDepIds.has(id)) {
- this.newDepIds.add(id);
- this.newDeps.push(dep);
- if (!this.depIds.has(id)) {
- dep.addSub(this);
- }
- }
-};
-
-/**
- * Clean up for dependency collection.
- */
-Watcher.prototype.cleanupDeps = function cleanupDeps () {
- var this$1 = this;
-
- var i = this.deps.length;
- while (i--) {
- var dep = this$1.deps[i];
- if (!this$1.newDepIds.has(dep.id)) {
- dep.removeSub(this$1);
- }
- }
- var tmp = this.depIds;
- this.depIds = this.newDepIds;
- this.newDepIds = tmp;
- this.newDepIds.clear();
- tmp = this.deps;
- this.deps = this.newDeps;
- this.newDeps = tmp;
- this.newDeps.length = 0;
-};
-
-/**
- * Subscriber interface.
- * Will be called when a dependency changes.
- */
-Watcher.prototype.update = function update () {
- /* istanbul ignore else */
- if (this.lazy) {
- this.dirty = true;
- } else if (this.sync) {
- this.run();
- } else {
- queueWatcher(this);
- }
-};
-
-/**
- * Scheduler job interface.
- * Will be called by the scheduler.
- */
-Watcher.prototype.run = function run () {
- if (this.active) {
- var value = this.get();
- if (
- value !== this.value ||
- // Deep watchers and watchers on Object/Arrays should fire even
- // when the value is the same, because the value may
- // have mutated.
- isObject(value) ||
- this.deep
- ) {
- // set new value
- var oldValue = this.value;
- this.value = value;
- if (this.user) {
- try {
- this.cb.call(this.vm, value, oldValue);
- } catch (e) {
- handleError(e, this.vm, ("callback for watcher \"" + (this.expression) + "\""));
- }
- } else {
- this.cb.call(this.vm, value, oldValue);
- }
- }
- }
-};
-
-/**
- * Evaluate the value of the watcher.
- * This only gets called for lazy watchers.
- */
-Watcher.prototype.evaluate = function evaluate () {
- this.value = this.get();
- this.dirty = false;
-};
-
-/**
- * Depend on all deps collected by this watcher.
- */
-Watcher.prototype.depend = function depend () {
- var this$1 = this;
-
- var i = this.deps.length;
- while (i--) {
- this$1.deps[i].depend();
- }
-};
-
-/**
- * Remove self from all dependencies' subscriber list.
- */
-Watcher.prototype.teardown = function teardown () {
- var this$1 = this;
-
- if (this.active) {
- // remove self from vm's watcher list
- // this is a somewhat expensive operation so we skip it
- // if the vm is being destroyed.
- if (!this.vm._isBeingDestroyed) {
- remove(this.vm._watchers, this);
- }
- var i = this.deps.length;
- while (i--) {
- this$1.deps[i].removeSub(this$1);
- }
- this.active = false;
- }
-};
-
-/* */
-
-var sharedPropertyDefinition = {
- enumerable: true,
- configurable: true,
- get: noop,
- set: noop
-};
-
-function proxy (target, sourceKey, key) {
- sharedPropertyDefinition.get = function proxyGetter () {
- return this[sourceKey][key]
- };
- sharedPropertyDefinition.set = function proxySetter (val) {
- this[sourceKey][key] = val;
- };
- Object.defineProperty(target, key, sharedPropertyDefinition);
-}
-
-function initState (vm) {
- vm._watchers = [];
- var opts = vm.$options;
- if (opts.props) { initProps(vm, opts.props); }
- if (opts.methods) { initMethods(vm, opts.methods); }
- if (opts.data) {
- initData(vm);
- } else {
- observe(vm._data = {}, true /* asRootData */);
- }
- if (opts.computed) { initComputed(vm, opts.computed); }
- if (opts.watch && opts.watch !== nativeWatch) {
- initWatch(vm, opts.watch);
- }
-}
-
-function initProps (vm, propsOptions) {
- var propsData = vm.$options.propsData || {};
- var props = vm._props = {};
- // cache prop keys so that future props updates can iterate using Array
- // instead of dynamic object key enumeration.
- var keys = vm.$options._propKeys = [];
- var isRoot = !vm.$parent;
- // root instance props should be converted
- observerState.shouldConvert = isRoot;
- var loop = function ( key ) {
- keys.push(key);
- var value = validateProp(key, propsOptions, propsData, vm);
- /* istanbul ignore else */
- if (process.env.NODE_ENV !== 'production') {
- var hyphenatedKey = hyphenate(key);
- if (isReservedAttribute(hyphenatedKey) ||
- config.isReservedAttr(hyphenatedKey)) {
- warn(
- ("\"" + hyphenatedKey + "\" is a reserved attribute and cannot be used as component prop."),
- vm
- );
- }
- defineReactive(props, key, value, function () {
- if (vm.$parent && !isUpdatingChildComponent) {
- warn(
- "Avoid mutating a prop directly since the value will be " +
- "overwritten whenever the parent component re-renders. " +
- "Instead, use a data or computed property based on the prop's " +
- "value. Prop being mutated: \"" + key + "\"",
- vm
- );
- }
- });
- } else {
- defineReactive(props, key, value);
- }
- // static props are already proxied on the component's prototype
- // during Vue.extend(). We only need to proxy props defined at
- // instantiation here.
- if (!(key in vm)) {
- proxy(vm, "_props", key);
- }
- };
-
- for (var key in propsOptions) loop( key );
- observerState.shouldConvert = true;
-}
-
-function initData (vm) {
- var data = vm.$options.data;
- data = vm._data = typeof data === 'function'
- ? getData(data, vm)
- : data || {};
- if (!isPlainObject(data)) {
- data = {};
- process.env.NODE_ENV !== 'production' && warn(
- 'data functions should return an object:\n' +
- 'https://vuejs.org/v2/guide/components.html#data-Must-Be-a-Function',
- vm
- );
- }
- // proxy data on instance
- var keys = Object.keys(data);
- var props = vm.$options.props;
- var methods = vm.$options.methods;
- var i = keys.length;
- while (i--) {
- var key = keys[i];
- if (process.env.NODE_ENV !== 'production') {
- if (methods && hasOwn(methods, key)) {
- warn(
- ("Method \"" + key + "\" has already been defined as a data property."),
- vm
- );
- }
- }
- if (props && hasOwn(props, key)) {
- process.env.NODE_ENV !== 'production' && warn(
- "The data property \"" + key + "\" is already declared as a prop. " +
- "Use prop default value instead.",
- vm
- );
- } else if (!isReserved(key)) {
- proxy(vm, "_data", key);
- }
- }
- // observe data
- observe(data, true /* asRootData */);
-}
-
-function getData (data, vm) {
- try {
- return data.call(vm, vm)
- } catch (e) {
- handleError(e, vm, "data()");
- return {}
- }
-}
-
-var computedWatcherOptions = { lazy: true };
-
-function initComputed (vm, computed) {
- // $flow-disable-line
- var watchers = vm._computedWatchers = Object.create(null);
- // computed properties are just getters during SSR
- var isSSR = isServerRendering();
-
- for (var key in computed) {
- var userDef = computed[key];
- var getter = typeof userDef === 'function' ? userDef : userDef.get;
- if (process.env.NODE_ENV !== 'production' && getter == null) {
- warn(
- ("Getter is missing for computed property \"" + key + "\"."),
- vm
- );
- }
-
- if (!isSSR) {
- // create internal watcher for the computed property.
- watchers[key] = new Watcher(
- vm,
- getter || noop,
- noop,
- computedWatcherOptions
- );
- }
-
- // component-defined computed properties are already defined on the
- // component prototype. We only need to define computed properties defined
- // at instantiation here.
- if (!(key in vm)) {
- defineComputed(vm, key, userDef);
- } else if (process.env.NODE_ENV !== 'production') {
- if (key in vm.$data) {
- warn(("The computed property \"" + key + "\" is already defined in data."), vm);
- } else if (vm.$options.props && key in vm.$options.props) {
- warn(("The computed property \"" + key + "\" is already defined as a prop."), vm);
- }
- }
- }
-}
-
-function defineComputed (
- target,
- key,
- userDef
-) {
- var shouldCache = !isServerRendering();
- if (typeof userDef === 'function') {
- sharedPropertyDefinition.get = shouldCache
- ? createComputedGetter(key)
- : userDef;
- sharedPropertyDefinition.set = noop;
- } else {
- sharedPropertyDefinition.get = userDef.get
- ? shouldCache && userDef.cache !== false
- ? createComputedGetter(key)
- : userDef.get
- : noop;
- sharedPropertyDefinition.set = userDef.set
- ? userDef.set
- : noop;
- }
- if (process.env.NODE_ENV !== 'production' &&
- sharedPropertyDefinition.set === noop) {
- sharedPropertyDefinition.set = function () {
- warn(
- ("Computed property \"" + key + "\" was assigned to but it has no setter."),
- this
- );
- };
- }
- Object.defineProperty(target, key, sharedPropertyDefinition);
-}
-
-function createComputedGetter (key) {
- return function computedGetter () {
- var watcher = this._computedWatchers && this._computedWatchers[key];
- if (watcher) {
- if (watcher.dirty) {
- watcher.evaluate();
- }
- if (Dep.target) {
- watcher.depend();
- }
- return watcher.value
- }
- }
-}
-
-function initMethods (vm, methods) {
- var props = vm.$options.props;
- for (var key in methods) {
- if (process.env.NODE_ENV !== 'production') {
- if (methods[key] == null) {
- warn(
- "Method \"" + key + "\" has an undefined value in the component definition. " +
- "Did you reference the function correctly?",
- vm
- );
- }
- if (props && hasOwn(props, key)) {
- warn(
- ("Method \"" + key + "\" has already been defined as a prop."),
- vm
- );
- }
- if ((key in vm) && isReserved(key)) {
- warn(
- "Method \"" + key + "\" conflicts with an existing Vue instance method. " +
- "Avoid defining component methods that start with _ or $."
- );
- }
- }
- vm[key] = methods[key] == null ? noop : bind(methods[key], vm);
- }
-}
-
-function initWatch (vm, watch) {
- for (var key in watch) {
- var handler = watch[key];
- if (Array.isArray(handler)) {
- for (var i = 0; i < handler.length; i++) {
- createWatcher(vm, key, handler[i]);
- }
- } else {
- createWatcher(vm, key, handler);
- }
- }
-}
-
-function createWatcher (
- vm,
- keyOrFn,
- handler,
- options
-) {
- if (isPlainObject(handler)) {
- options = handler;
- handler = handler.handler;
- }
- if (typeof handler === 'string') {
- handler = vm[handler];
- }
- return vm.$watch(keyOrFn, handler, options)
-}
-
-function stateMixin (Vue) {
- // flow somehow has problems with directly declared definition object
- // when using Object.defineProperty, so we have to procedurally build up
- // the object here.
- var dataDef = {};
- dataDef.get = function () { return this._data };
- var propsDef = {};
- propsDef.get = function () { return this._props };
- if (process.env.NODE_ENV !== 'production') {
- dataDef.set = function (newData) {
- warn(
- 'Avoid replacing instance root $data. ' +
- 'Use nested data properties instead.',
- this
- );
- };
- propsDef.set = function () {
- warn("$props is readonly.", this);
- };
- }
- Object.defineProperty(Vue.prototype, '$data', dataDef);
- Object.defineProperty(Vue.prototype, '$props', propsDef);
-
- Vue.prototype.$set = set;
- Vue.prototype.$delete = del;
-
- Vue.prototype.$watch = function (
- expOrFn,
- cb,
- options
- ) {
- var vm = this;
- if (isPlainObject(cb)) {
- return createWatcher(vm, expOrFn, cb, options)
- }
- options = options || {};
- options.user = true;
- var watcher = new Watcher(vm, expOrFn, cb, options);
- if (options.immediate) {
- cb.call(vm, watcher.value);
- }
- return function unwatchFn () {
- watcher.teardown();
- }
- };
-}
-
-/* */
-
-function initProvide (vm) {
- var provide = vm.$options.provide;
- if (provide) {
- vm._provided = typeof provide === 'function'
- ? provide.call(vm)
- : provide;
- }
-}
-
-function initInjections (vm) {
- var result = resolveInject(vm.$options.inject, vm);
- if (result) {
- observerState.shouldConvert = false;
- Object.keys(result).forEach(function (key) {
- /* istanbul ignore else */
- if (process.env.NODE_ENV !== 'production') {
- defineReactive(vm, key, result[key], function () {
- warn(
- "Avoid mutating an injected value directly since the changes will be " +
- "overwritten whenever the provided component re-renders. " +
- "injection being mutated: \"" + key + "\"",
- vm
- );
- });
- } else {
- defineReactive(vm, key, result[key]);
- }
- });
- observerState.shouldConvert = true;
- }
-}
-
-function resolveInject (inject, vm) {
- if (inject) {
- // inject is :any because flow is not smart enough to figure out cached
- var result = Object.create(null);
- var keys = hasSymbol
- ? Reflect.ownKeys(inject).filter(function (key) {
- /* istanbul ignore next */
- return Object.getOwnPropertyDescriptor(inject, key).enumerable
- })
- : Object.keys(inject);
-
- for (var i = 0; i < keys.length; i++) {
- var key = keys[i];
- var provideKey = inject[key].from;
- var source = vm;
- while (source) {
- if (source._provided && provideKey in source._provided) {
- result[key] = source._provided[provideKey];
- break
- }
- source = source.$parent;
- }
- if (!source) {
- if ('default' in inject[key]) {
- var provideDefault = inject[key].default;
- result[key] = typeof provideDefault === 'function'
- ? provideDefault.call(vm)
- : provideDefault;
- } else if (process.env.NODE_ENV !== 'production') {
- warn(("Injection \"" + key + "\" not found"), vm);
- }
- }
- }
- return result
- }
-}
-
-/* */
-
-/**
- * Runtime helper for rendering v-for lists.
- */
-function renderList (
- val,
- render
-) {
- var ret, i, l, keys, key;
- if (Array.isArray(val) || typeof val === 'string') {
- ret = new Array(val.length);
- for (i = 0, l = val.length; i < l; i++) {
- ret[i] = render(val[i], i);
- }
- } else if (typeof val === 'number') {
- ret = new Array(val);
- for (i = 0; i < val; i++) {
- ret[i] = render(i + 1, i);
- }
- } else if (isObject(val)) {
- keys = Object.keys(val);
- ret = new Array(keys.length);
- for (i = 0, l = keys.length; i < l; i++) {
- key = keys[i];
- ret[i] = render(val[key], key, i);
- }
- }
- if (isDef(ret)) {
- (ret)._isVList = true;
- }
- return ret
-}
-
-/* */
-
-/**
- * Runtime helper for rendering <slot>
- */
-function renderSlot (
- name,
- fallback,
- props,
- bindObject
-) {
- var scopedSlotFn = this.$scopedSlots[name];
- var nodes;
- if (scopedSlotFn) { // scoped slot
- props = props || {};
- if (bindObject) {
- if (process.env.NODE_ENV !== 'production' && !isObject(bindObject)) {
- warn(
- 'slot v-bind without argument expects an Object',
- this
- );
- }
- props = extend(extend({}, bindObject), props);
- }
- nodes = scopedSlotFn(props) || fallback;
- } else {
- var slotNodes = this.$slots[name];
- // warn duplicate slot usage
- if (slotNodes) {
- if (process.env.NODE_ENV !== 'production' && slotNodes._rendered) {
- warn(
- "Duplicate presence of slot \"" + name + "\" found in the same render tree " +
- "- this will likely cause render errors.",
- this
- );
- }
- slotNodes._rendered = true;
- }
- nodes = slotNodes || fallback;
- }
-
- var target = props && props.slot;
- if (target) {
- return this.$createElement('template', { slot: target }, nodes)
- } else {
- return nodes
- }
-}
-
-/* */
-
-/**
- * Runtime helper for resolving filters
- */
-function resolveFilter (id) {
- return resolveAsset(this.$options, 'filters', id, true) || identity
-}
-
-/* */
-
-/**
- * Runtime helper for checking keyCodes from config.
- * exposed as Vue.prototype._k
- * passing in eventKeyName as last argument separately for backwards compat
- */
-function checkKeyCodes (
- eventKeyCode,
- key,
- builtInAlias,
- eventKeyName
-) {
- var keyCodes = config.keyCodes[key] || builtInAlias;
- if (keyCodes) {
- if (Array.isArray(keyCodes)) {
- return keyCodes.indexOf(eventKeyCode) === -1
- } else {
- return keyCodes !== eventKeyCode
- }
- } else if (eventKeyName) {
- return hyphenate(eventKeyName) !== key
- }
-}
-
-/* */
-
-/**
- * Runtime helper for merging v-bind="object" into a VNode's data.
- */
-function bindObjectProps (
- data,
- tag,
- value,
- asProp,
- isSync
-) {
- if (value) {
- if (!isObject(value)) {
- process.env.NODE_ENV !== 'production' && warn(
- 'v-bind without argument expects an Object or Array value',
- this
- );
- } else {
- if (Array.isArray(value)) {
- value = toObject(value);
- }
- var hash;
- var loop = function ( key ) {
- if (
- key === 'class' ||
- key === 'style' ||
- isReservedAttribute(key)
- ) {
- hash = data;
- } else {
- var type = data.attrs && data.attrs.type;
- hash = asProp || config.mustUseProp(tag, type, key)
- ? data.domProps || (data.domProps = {})
- : data.attrs || (data.attrs = {});
- }
- if (!(key in hash)) {
- hash[key] = value[key];
-
- if (isSync) {
- var on = data.on || (data.on = {});
- on[("update:" + key)] = function ($event) {
- value[key] = $event;
- };
- }
- }
- };
-
- for (var key in value) loop( key );
- }
- }
- return data
-}
-
-/* */
-
-/**
- * Runtime helper for rendering static trees.
- */
-function renderStatic (
- index,
- isInFor
-) {
- var cached = this._staticTrees || (this._staticTrees = []);
- var tree = cached[index];
- // if has already-rendered static tree and not inside v-for,
- // we can reuse the same tree by doing a shallow clone.
- if (tree && !isInFor) {
- return Array.isArray(tree)
- ? cloneVNodes(tree)
- : cloneVNode(tree)
- }
- // otherwise, render a fresh tree.
- tree = cached[index] = this.$options.staticRenderFns[index].call(
- this._renderProxy,
- null,
- this // for render fns generated for functional component templates
- );
- markStatic(tree, ("__static__" + index), false);
- return tree
-}
-
-/**
- * Runtime helper for v-once.
- * Effectively it means marking the node as static with a unique key.
- */
-function markOnce (
- tree,
- index,
- key
-) {
- markStatic(tree, ("__once__" + index + (key ? ("_" + key) : "")), true);
- return tree
-}
-
-function markStatic (
- tree,
- key,
- isOnce
-) {
- if (Array.isArray(tree)) {
- for (var i = 0; i < tree.length; i++) {
- if (tree[i] && typeof tree[i] !== 'string') {
- markStaticNode(tree[i], (key + "_" + i), isOnce);
- }
- }
- } else {
- markStaticNode(tree, key, isOnce);
- }
-}
-
-function markStaticNode (node, key, isOnce) {
- node.isStatic = true;
- node.key = key;
- node.isOnce = isOnce;
-}
-
-/* */
-
-function bindObjectListeners (data, value) {
- if (value) {
- if (!isPlainObject(value)) {
- process.env.NODE_ENV !== 'production' && warn(
- 'v-on without argument expects an Object value',
- this
- );
- } else {
- var on = data.on = data.on ? extend({}, data.on) : {};
- for (var key in value) {
- var existing = on[key];
- var ours = value[key];
- on[key] = existing ? [].concat(existing, ours) : ours;
- }
- }
- }
- return data
-}
-
-/* */
-
-function installRenderHelpers (target) {
- target._o = markOnce;
- target._n = toNumber;
- target._s = toString;
- target._l = renderList;
- target._t = renderSlot;
- target._q = looseEqual;
- target._i = looseIndexOf;
- target._m = renderStatic;
- target._f = resolveFilter;
- target._k = checkKeyCodes;
- target._b = bindObjectProps;
- target._v = createTextVNode;
- target._e = createEmptyVNode;
- target._u = resolveScopedSlots;
- target._g = bindObjectListeners;
-}
-
-/* */
-
-function FunctionalRenderContext (
- data,
- props,
- children,
- parent,
- Ctor
-) {
- var options = Ctor.options;
- this.data = data;
- this.props = props;
- this.children = children;
- this.parent = parent;
- this.listeners = data.on || emptyObject;
- this.injections = resolveInject(options.inject, parent);
- this.slots = function () { return resolveSlots(children, parent); };
-
- // ensure the createElement function in functional components
- // gets a unique context - this is necessary for correct named slot check
- var contextVm = Object.create(parent);
- var isCompiled = isTrue(options._compiled);
- var needNormalization = !isCompiled;
-
- // support for compiled functional template
- if (isCompiled) {
- // exposing $options for renderStatic()
- this.$options = options;
- // pre-resolve slots for renderSlot()
- this.$slots = this.slots();
- this.$scopedSlots = data.scopedSlots || emptyObject;
- }
-
- if (options._scopeId) {
- this._c = function (a, b, c, d) {
- var vnode = createElement(contextVm, a, b, c, d, needNormalization);
- if (vnode) {
- vnode.fnScopeId = options._scopeId;
- vnode.fnContext = parent;
- }
- return vnode
- };
- } else {
- this._c = function (a, b, c, d) { return createElement(contextVm, a, b, c, d, needNormalization); };
- }
-}
-
-installRenderHelpers(FunctionalRenderContext.prototype);
-
-function createFunctionalComponent (
- Ctor,
- propsData,
- data,
- contextVm,
- children
-) {
- var options = Ctor.options;
- var props = {};
- var propOptions = options.props;
- if (isDef(propOptions)) {
- for (var key in propOptions) {
- props[key] = validateProp(key, propOptions, propsData || emptyObject);
- }
- } else {
- if (isDef(data.attrs)) { mergeProps(props, data.attrs); }
- if (isDef(data.props)) { mergeProps(props, data.props); }
- }
-
- var renderContext = new FunctionalRenderContext(
- data,
- props,
- children,
- contextVm,
- Ctor
- );
-
- var vnode = options.render.call(null, renderContext._c, renderContext);
-
- if (vnode instanceof VNode) {
- vnode.fnContext = contextVm;
- vnode.fnOptions = options;
- if (data.slot) {
- (vnode.data || (vnode.data = {})).slot = data.slot;
- }
- }
-
- return vnode
-}
-
-function mergeProps (to, from) {
- for (var key in from) {
- to[camelize(key)] = from[key];
- }
-}
-
-/* */
-
-
-
-
-// Register the component hook to weex native render engine.
-// The hook will be triggered by native, not javascript.
-
-
-// Updates the state of the component to weex native render engine.
-
-/* */
-
-// https://github.com/Hanks10100/weex-native-directive/tree/master/component
-
-// listening on native callback
-
-/* */
-
-/* */
-
-// hooks to be invoked on component VNodes during patch
-var componentVNodeHooks = {
- init: function init (
- vnode,
- hydrating,
- parentElm,
- refElm
- ) {
- if (!vnode.componentInstance || vnode.componentInstance._isDestroyed) {
- var child = vnode.componentInstance = createComponentInstanceForVnode(
- vnode,
- activeInstance,
- parentElm,
- refElm
- );
- child.$mount(hydrating ? vnode.elm : undefined, hydrating);
- } else if (vnode.data.keepAlive) {
- // kept-alive components, treat as a patch
- var mountedNode = vnode; // work around flow
- componentVNodeHooks.prepatch(mountedNode, mountedNode);
- }
- },
-
- prepatch: function prepatch (oldVnode, vnode) {
- var options = vnode.componentOptions;
- var child = vnode.componentInstance = oldVnode.componentInstance;
- updateChildComponent(
- child,
- options.propsData, // updated props
- options.listeners, // updated listeners
- vnode, // new parent vnode
- options.children // new children
- );
- },
-
- insert: function insert (vnode) {
- var context = vnode.context;
- var componentInstance = vnode.componentInstance;
- if (!componentInstance._isMounted) {
- componentInstance._isMounted = true;
- callHook(componentInstance, 'mounted');
- }
- if (vnode.data.keepAlive) {
- if (context._isMounted) {
- // vue-router#1212
- // During updates, a kept-alive component's child components may
- // change, so directly walking the tree here may call activated hooks
- // on incorrect children. Instead we push them into a queue which will
- // be processed after the whole patch process ended.
- queueActivatedComponent(componentInstance);
- } else {
- activateChildComponent(componentInstance, true /* direct */);
- }
- }
- },
-
- destroy: function destroy (vnode) {
- var componentInstance = vnode.componentInstance;
- if (!componentInstance._isDestroyed) {
- if (!vnode.data.keepAlive) {
- componentInstance.$destroy();
- } else {
- deactivateChildComponent(componentInstance, true /* direct */);
- }
- }
- }
-};
-
-var hooksToMerge = Object.keys(componentVNodeHooks);
-
-function createComponent (
- Ctor,
- data,
- context,
- children,
- tag
-) {
- if (isUndef(Ctor)) {
- return
- }
-
- var baseCtor = context.$options._base;
-
- // plain options object: turn it into a constructor
- if (isObject(Ctor)) {
- Ctor = baseCtor.extend(Ctor);
- }
-
- // if at this stage it's not a constructor or an async component factory,
- // reject.
- if (typeof Ctor !== 'function') {
- if (process.env.NODE_ENV !== 'production') {
- warn(("Invalid Component definition: " + (String(Ctor))), context);
- }
- return
- }
-
- // async component
- var asyncFactory;
- if (isUndef(Ctor.cid)) {
- asyncFactory = Ctor;
- Ctor = resolveAsyncComponent(asyncFactory, baseCtor, context);
- if (Ctor === undefined) {
- // return a placeholder node for async component, which is rendered
- // as a comment node but preserves all the raw information for the node.
- // the information will be used for async server-rendering and hydration.
- return createAsyncPlaceholder(
- asyncFactory,
- data,
- context,
- children,
- tag
- )
- }
- }
-
- data = data || {};
-
- // resolve constructor options in case global mixins are applied after
- // component constructor creation
- resolveConstructorOptions(Ctor);
-
- // transform component v-model data into props & events
- if (isDef(data.model)) {
- transformModel(Ctor.options, data);
- }
-
- // extract props
- var propsData = extractPropsFromVNodeData(data, Ctor, tag);
-
- // functional component
- if (isTrue(Ctor.options.functional)) {
- return createFunctionalComponent(Ctor, propsData, data, context, children)
- }
-
- // extract listeners, since these needs to be treated as
- // child component listeners instead of DOM listeners
- var listeners = data.on;
- // replace with listeners with .native modifier
- // so it gets processed during parent component patch.
- data.on = data.nativeOn;
-
- if (isTrue(Ctor.options.abstract)) {
- // abstract components do not keep anything
- // other than props & listeners & slot
-
- // work around flow
- var slot = data.slot;
- data = {};
- if (slot) {
- data.slot = slot;
- }
- }
-
- // merge component management hooks onto the placeholder node
- mergeHooks(data);
-
- // return a placeholder vnode
- var name = Ctor.options.name || tag;
- var vnode = new VNode(
- ("vue-component-" + (Ctor.cid) + (name ? ("-" + name) : '')),
- data, undefined, undefined, undefined, context,
- { Ctor: Ctor, propsData: propsData, listeners: listeners, tag: tag, children: children },
- asyncFactory
- );
-
- // Weex specific: invoke recycle-list optimized @render function for
- // extracting cell-slot template.
- // https://github.com/Hanks10100/weex-native-directive/tree/master/component
- /* istanbul ignore if */
- return vnode
-}
-
-function createComponentInstanceForVnode (
- vnode, // we know it's MountedComponentVNode but flow doesn't
- parent, // activeInstance in lifecycle state
- parentElm,
- refElm
-) {
- var options = {
- _isComponent: true,
- parent: parent,
- _parentVnode: vnode,
- _parentElm: parentElm || null,
- _refElm: refElm || null
- };
- // check inline-template render functions
- var inlineTemplate = vnode.data.inlineTemplate;
- if (isDef(inlineTemplate)) {
- options.render = inlineTemplate.render;
- options.staticRenderFns = inlineTemplate.staticRenderFns;
- }
- return new vnode.componentOptions.Ctor(options)
-}
-
-function mergeHooks (data) {
- if (!data.hook) {
- data.hook = {};
- }
- for (var i = 0; i < hooksToMerge.length; i++) {
- var key = hooksToMerge[i];
- var fromParent = data.hook[key];
- var ours = componentVNodeHooks[key];
- data.hook[key] = fromParent ? mergeHook$1(ours, fromParent) : ours;
- }
-}
-
-function mergeHook$1 (one, two) {
- return function (a, b, c, d) {
- one(a, b, c, d);
- two(a, b, c, d);
- }
-}
-
-// transform component v-model info (value and callback) into
-// prop and event handler respectively.
-function transformModel (options, data) {
- var prop = (options.model && options.model.prop) || 'value';
- var event = (options.model && options.model.event) || 'input';(data.props || (data.props = {}))[prop] = data.model.value;
- var on = data.on || (data.on = {});
- if (isDef(on[event])) {
- on[event] = [data.model.callback].concat(on[event]);
- } else {
- on[event] = data.model.callback;
- }
-}
-
-/* */
-
-var SIMPLE_NORMALIZE = 1;
-var ALWAYS_NORMALIZE = 2;
-
-// wrapper function for providing a more flexible interface
-// without getting yelled at by flow
-function createElement (
- context,
- tag,
- data,
- children,
- normalizationType,
- alwaysNormalize
-) {
- if (Array.isArray(data) || isPrimitive(data)) {
- normalizationType = children;
- children = data;
- data = undefined;
- }
- if (isTrue(alwaysNormalize)) {
- normalizationType = ALWAYS_NORMALIZE;
- }
- return _createElement(context, tag, data, children, normalizationType)
-}
-
-function _createElement (
- context,
- tag,
- data,
- children,
- normalizationType
-) {
- if (isDef(data) && isDef((data).__ob__)) {
- process.env.NODE_ENV !== 'production' && warn(
- "Avoid using observed data object as vnode data: " + (JSON.stringify(data)) + "\n" +
- 'Always create fresh vnode data objects in each render!',
- context
- );
- return createEmptyVNode()
- }
- // object syntax in v-bind
- if (isDef(data) && isDef(data.is)) {
- tag = data.is;
- }
- if (!tag) {
- // in case of component :is set to falsy value
- return createEmptyVNode()
- }
- // warn against non-primitive key
- if (process.env.NODE_ENV !== 'production' &&
- isDef(data) && isDef(data.key) && !isPrimitive(data.key)
- ) {
- {
- warn(
- 'Avoid using non-primitive value as key, ' +
- 'use string/number value instead.',
- context
- );
- }
- }
- // support single function children as default scoped slot
- if (Array.isArray(children) &&
- typeof children[0] === 'function'
- ) {
- data = data || {};
- data.scopedSlots = { default: children[0] };
- children.length = 0;
- }
- if (normalizationType === ALWAYS_NORMALIZE) {
- children = normalizeChildren(children);
- } else if (normalizationType === SIMPLE_NORMALIZE) {
- children = simpleNormalizeChildren(children);
- }
- var vnode, ns;
- if (typeof tag === 'string') {
- var Ctor;
- ns = (context.$vnode && context.$vnode.ns) || config.getTagNamespace(tag);
- if (config.isReservedTag(tag)) {
- // platform built-in elements
- vnode = new VNode(
- config.parsePlatformTagName(tag), data, children,
- undefined, undefined, context
- );
- } else if (isDef(Ctor = resolveAsset(context.$options, 'components', tag))) {
- // component
- vnode = createComponent(Ctor, data, context, children, tag);
- } else {
- // unknown or unlisted namespaced elements
- // check at runtime because it may get assigned a namespace when its
- // parent normalizes children
- vnode = new VNode(
- tag, data, children,
- undefined, undefined, context
- );
- }
- } else {
- // direct component options / constructor
- vnode = createComponent(tag, data, context, children);
- }
- if (isDef(vnode)) {
- if (ns) { applyNS(vnode, ns); }
- return vnode
- } else {
- return createEmptyVNode()
- }
-}
-
-function applyNS (vnode, ns, force) {
- vnode.ns = ns;
- if (vnode.tag === 'foreignObject') {
- // use default namespace inside foreignObject
- ns = undefined;
- force = true;
- }
- if (isDef(vnode.children)) {
- for (var i = 0, l = vnode.children.length; i < l; i++) {
- var child = vnode.children[i];
- if (isDef(child.tag) && (isUndef(child.ns) || isTrue(force))) {
- applyNS(child, ns, force);
- }
- }
- }
-}
-
-/* */
-
-function initRender (vm) {
- vm._vnode = null; // the root of the child tree
- vm._staticTrees = null; // v-once cached trees
- var options = vm.$options;
- var parentVnode = vm.$vnode = options._parentVnode; // the placeholder node in parent tree
- var renderContext = parentVnode && parentVnode.context;
- vm.$slots = resolveSlots(options._renderChildren, renderContext);
- vm.$scopedSlots = emptyObject;
- // bind the createElement fn to this instance
- // so that we get proper render context inside it.
- // args order: tag, data, children, normalizationType, alwaysNormalize
- // internal version is used by render functions compiled from templates
- vm._c = function (a, b, c, d) { return createElement(vm, a, b, c, d, false); };
- // normalization is always applied for the public version, used in
- // user-written render functions.
- vm.$createElement = function (a, b, c, d) { return createElement(vm, a, b, c, d, true); };
-
- // $attrs & $listeners are exposed for easier HOC creation.
- // they need to be reactive so that HOCs using them are always updated
- var parentData = parentVnode && parentVnode.data;
-
- /* istanbul ignore else */
- if (process.env.NODE_ENV !== 'production') {
- defineReactive(vm, '$attrs', parentData && parentData.attrs || emptyObject, function () {
- !isUpdatingChildComponent && warn("$attrs is readonly.", vm);
- }, true);
- defineReactive(vm, '$listeners', options._parentListeners || emptyObject, function () {
- !isUpdatingChildComponent && warn("$listeners is readonly.", vm);
- }, true);
- } else {
- defineReactive(vm, '$attrs', parentData && parentData.attrs || emptyObject, null, true);
- defineReactive(vm, '$listeners', options._parentListeners || emptyObject, null, true);
- }
-}
-
-function renderMixin (Vue) {
- // install runtime convenience helpers
- installRenderHelpers(Vue.prototype);
-
- Vue.prototype.$nextTick = function (fn) {
- return nextTick(fn, this)
- };
-
- Vue.prototype._render = function () {
- var vm = this;
- var ref = vm.$options;
- var render = ref.render;
- var _parentVnode = ref._parentVnode;
-
- if (vm._isMounted) {
- // if the parent didn't update, the slot nodes will be the ones from
- // last render. They need to be cloned to ensure "freshness" for this render.
- for (var key in vm.$slots) {
- var slot = vm.$slots[key];
- // _rendered is a flag added by renderSlot, but may not be present
- // if the slot is passed from manually written render functions
- if (slot._rendered || (slot[0] && slot[0].elm)) {
- vm.$slots[key] = cloneVNodes(slot, true /* deep */);
- }
- }
- }
-
- vm.$scopedSlots = (_parentVnode && _parentVnode.data.scopedSlots) || emptyObject;
-
- // set parent vnode. this allows render functions to have access
- // to the data on the placeholder node.
- vm.$vnode = _parentVnode;
- // render self
- var vnode;
- try {
- vnode = render.call(vm._renderProxy, vm.$createElement);
- } catch (e) {
- handleError(e, vm, "render");
- // return error render result,
- // or previous vnode to prevent render error causing blank component
- /* istanbul ignore else */
- if (process.env.NODE_ENV !== 'production') {
- if (vm.$options.renderError) {
- try {
- vnode = vm.$options.renderError.call(vm._renderProxy, vm.$createElement, e);
- } catch (e) {
- handleError(e, vm, "renderError");
- vnode = vm._vnode;
- }
- } else {
- vnode = vm._vnode;
- }
- } else {
- vnode = vm._vnode;
- }
- }
- // return empty vnode in case the render function errored out
- if (!(vnode instanceof VNode)) {
- if (process.env.NODE_ENV !== 'production' && Array.isArray(vnode)) {
- warn(
- 'Multiple root nodes returned from render function. Render function ' +
- 'should return a single root node.',
- vm
- );
- }
- vnode = createEmptyVNode();
- }
- // set parent
- vnode.parent = _parentVnode;
- return vnode
- };
-}
-
-/* */
-
-var uid = 0;
-
-function initMixin (Vue) {
- Vue.prototype._init = function (options) {
- var vm = this;
- // a uid
- vm._uid = uid++;
-
- var startTag, endTag;
- /* istanbul ignore if */
- if (process.env.NODE_ENV !== 'production' && config.performance && mark) {
- startTag = "vue-perf-start:" + (vm._uid);
- endTag = "vue-perf-end:" + (vm._uid);
- mark(startTag);
- }
-
- // a flag to avoid this being observed
- vm._isVue = true;
- // merge options
- if (options && options._isComponent) {
- // optimize internal component instantiation
- // since dynamic options merging is pretty slow, and none of the
- // internal component options needs special treatment.
- initInternalComponent(vm, options);
- } else {
- vm.$options = mergeOptions(
- resolveConstructorOptions(vm.constructor),
- options || {},
- vm
- );
- }
- /* istanbul ignore else */
- if (process.env.NODE_ENV !== 'production') {
- initProxy(vm);
- } else {
- vm._renderProxy = vm;
- }
- // expose real self
- vm._self = vm;
- initLifecycle(vm);
- initEvents(vm);
- initRender(vm);
- callHook(vm, 'beforeCreate');
- initInjections(vm); // resolve injections before data/props
- initState(vm);
- initProvide(vm); // resolve provide after data/props
- callHook(vm, 'created');
-
- /* istanbul ignore if */
- if (process.env.NODE_ENV !== 'production' && config.performance && mark) {
- vm._name = formatComponentName(vm, false);
- mark(endTag);
- measure(("vue " + (vm._name) + " init"), startTag, endTag);
- }
-
- if (vm.$options.el) {
- vm.$mount(vm.$options.el);
- }
- };
-}
-
-function initInternalComponent (vm, options) {
- var opts = vm.$options = Object.create(vm.constructor.options);
- // doing this because it's faster than dynamic enumeration.
- var parentVnode = options._parentVnode;
- opts.parent = options.parent;
- opts._parentVnode = parentVnode;
- opts._parentElm = options._parentElm;
- opts._refElm = options._refElm;
-
- var vnodeComponentOptions = parentVnode.componentOptions;
- opts.propsData = vnodeComponentOptions.propsData;
- opts._parentListeners = vnodeComponentOptions.listeners;
- opts._renderChildren = vnodeComponentOptions.children;
- opts._componentTag = vnodeComponentOptions.tag;
-
- if (options.render) {
- opts.render = options.render;
- opts.staticRenderFns = options.staticRenderFns;
- }
-}
-
-function resolveConstructorOptions (Ctor) {
- var options = Ctor.options;
- if (Ctor.super) {
- var superOptions = resolveConstructorOptions(Ctor.super);
- var cachedSuperOptions = Ctor.superOptions;
- if (superOptions !== cachedSuperOptions) {
- // super option changed,
- // need to resolve new options.
- Ctor.superOptions = superOptions;
- // check if there are any late-modified/attached options (#4976)
- var modifiedOptions = resolveModifiedOptions(Ctor);
- // update base extend options
- if (modifiedOptions) {
- extend(Ctor.extendOptions, modifiedOptions);
- }
- options = Ctor.options = mergeOptions(superOptions, Ctor.extendOptions);
- if (options.name) {
- options.components[options.name] = Ctor;
- }
- }
- }
- return options
-}
-
-function resolveModifiedOptions (Ctor) {
- var modified;
- var latest = Ctor.options;
- var extended = Ctor.extendOptions;
- var sealed = Ctor.sealedOptions;
- for (var key in latest) {
- if (latest[key] !== sealed[key]) {
- if (!modified) { modified = {}; }
- modified[key] = dedupe(latest[key], extended[key], sealed[key]);
- }
- }
- return modified
-}
-
-function dedupe (latest, extended, sealed) {
- // compare latest and sealed to ensure lifecycle hooks won't be duplicated
- // between merges
- if (Array.isArray(latest)) {
- var res = [];
- sealed = Array.isArray(sealed) ? sealed : [sealed];
- extended = Array.isArray(extended) ? extended : [extended];
- for (var i = 0; i < latest.length; i++) {
- // push original options and not sealed options to exclude duplicated options
- if (extended.indexOf(latest[i]) >= 0 || sealed.indexOf(latest[i]) < 0) {
- res.push(latest[i]);
- }
- }
- return res
- } else {
- return latest
- }
-}
-
-function Vue$3 (options) {
- if (process.env.NODE_ENV !== 'production' &&
- !(this instanceof Vue$3)
- ) {
- warn('Vue is a constructor and should be called with the `new` keyword');
- }
- this._init(options);
-}
-
-initMixin(Vue$3);
-stateMixin(Vue$3);
-eventsMixin(Vue$3);
-lifecycleMixin(Vue$3);
-renderMixin(Vue$3);
-
-/* */
-
-function initUse (Vue) {
- Vue.use = function (plugin) {
- var installedPlugins = (this._installedPlugins || (this._installedPlugins = []));
- if (installedPlugins.indexOf(plugin) > -1) {
- return this
- }
-
- // additional parameters
- var args = toArray(arguments, 1);
- args.unshift(this);
- if (typeof plugin.install === 'function') {
- plugin.install.apply(plugin, args);
- } else if (typeof plugin === 'function') {
- plugin.apply(null, args);
- }
- installedPlugins.push(plugin);
- return this
- };
-}
-
-/* */
-
-function initMixin$1 (Vue) {
- Vue.mixin = function (mixin) {
- this.options = mergeOptions(this.options, mixin);
- return this
- };
-}
-
-/* */
-
-function initExtend (Vue) {
- /**
- * Each instance constructor, including Vue, has a unique
- * cid. This enables us to create wrapped "child
- * constructors" for prototypal inheritance and cache them.
- */
- Vue.cid = 0;
- var cid = 1;
-
- /**
- * Class inheritance
- */
- Vue.extend = function (extendOptions) {
- extendOptions = extendOptions || {};
- var Super = this;
- var SuperId = Super.cid;
- var cachedCtors = extendOptions._Ctor || (extendOptions._Ctor = {});
- if (cachedCtors[SuperId]) {
- return cachedCtors[SuperId]
- }
-
- var name = extendOptions.name || Super.options.name;
- if (process.env.NODE_ENV !== 'production' && name) {
- validateComponentName(name);
- }
-
- var Sub = function VueComponent (options) {
- this._init(options);
- };
- Sub.prototype = Object.create(Super.prototype);
- Sub.prototype.constructor = Sub;
- Sub.cid = cid++;
- Sub.options = mergeOptions(
- Super.options,
- extendOptions
- );
- Sub['super'] = Super;
-
- // For props and computed properties, we define the proxy getters on
- // the Vue instances at extension time, on the extended prototype. This
- // avoids Object.defineProperty calls for each instance created.
- if (Sub.options.props) {
- initProps$1(Sub);
- }
- if (Sub.options.computed) {
- initComputed$1(Sub);
- }
-
- // allow further extension/mixin/plugin usage
- Sub.extend = Super.extend;
- Sub.mixin = Super.mixin;
- Sub.use = Super.use;
-
- // create asset registers, so extended classes
- // can have their private assets too.
- ASSET_TYPES.forEach(function (type) {
- Sub[type] = Super[type];
- });
- // enable recursive self-lookup
- if (name) {
- Sub.options.components[name] = Sub;
- }
-
- // keep a reference to the super options at extension time.
- // later at instantiation we can check if Super's options have
- // been updated.
- Sub.superOptions = Super.options;
- Sub.extendOptions = extendOptions;
- Sub.sealedOptions = extend({}, Sub.options);
-
- // cache constructor
- cachedCtors[SuperId] = Sub;
- return Sub
- };
-}
-
-function initProps$1 (Comp) {
- var props = Comp.options.props;
- for (var key in props) {
- proxy(Comp.prototype, "_props", key);
- }
-}
-
-function initComputed$1 (Comp) {
- var computed = Comp.options.computed;
- for (var key in computed) {
- defineComputed(Comp.prototype, key, computed[key]);
- }
-}
-
-/* */
-
-function initAssetRegisters (Vue) {
- /**
- * Create asset registration methods.
- */
- ASSET_TYPES.forEach(function (type) {
- Vue[type] = function (
- id,
- definition
- ) {
- if (!definition) {
- return this.options[type + 's'][id]
- } else {
- /* istanbul ignore if */
- if (process.env.NODE_ENV !== 'production' && type === 'component') {
- validateComponentName(id);
- }
- if (type === 'component' && isPlainObject(definition)) {
- definition.name = definition.name || id;
- definition = this.options._base.extend(definition);
- }
- if (type === 'directive' && typeof definition === 'function') {
- definition = { bind: definition, update: definition };
- }
- this.options[type + 's'][id] = definition;
- return definition
- }
- };
- });
-}
-
-/* */
-
-function getComponentName (opts) {
- return opts && (opts.Ctor.options.name || opts.tag)
-}
-
-function matches (pattern, name) {
- if (Array.isArray(pattern)) {
- return pattern.indexOf(name) > -1
- } else if (typeof pattern === 'string') {
- return pattern.split(',').indexOf(name) > -1
- } else if (isRegExp(pattern)) {
- return pattern.test(name)
- }
- /* istanbul ignore next */
- return false
-}
-
-function pruneCache (keepAliveInstance, filter) {
- var cache = keepAliveInstance.cache;
- var keys = keepAliveInstance.keys;
- var _vnode = keepAliveInstance._vnode;
- for (var key in cache) {
- var cachedNode = cache[key];
- if (cachedNode) {
- var name = getComponentName(cachedNode.componentOptions);
- if (name && !filter(name)) {
- pruneCacheEntry(cache, key, keys, _vnode);
- }
- }
- }
-}
-
-function pruneCacheEntry (
- cache,
- key,
- keys,
- current
-) {
- var cached$$1 = cache[key];
- if (cached$$1 && (!current || cached$$1.tag !== current.tag)) {
- cached$$1.componentInstance.$destroy();
- }
- cache[key] = null;
- remove(keys, key);
-}
-
-var patternTypes = [String, RegExp, Array];
-
-var KeepAlive = {
- name: 'keep-alive',
- abstract: true,
-
- props: {
- include: patternTypes,
- exclude: patternTypes,
- max: [String, Number]
- },
-
- created: function created () {
- this.cache = Object.create(null);
- this.keys = [];
- },
-
- destroyed: function destroyed () {
- var this$1 = this;
-
- for (var key in this$1.cache) {
- pruneCacheEntry(this$1.cache, key, this$1.keys);
- }
- },
-
- watch: {
- include: function include (val) {
- pruneCache(this, function (name) { return matches(val, name); });
- },
- exclude: function exclude (val) {
- pruneCache(this, function (name) { return !matches(val, name); });
- }
- },
-
- render: function render () {
- var slot = this.$slots.default;
- var vnode = getFirstComponentChild(slot);
- var componentOptions = vnode && vnode.componentOptions;
- if (componentOptions) {
- // check pattern
- var name = getComponentName(componentOptions);
- var ref = this;
- var include = ref.include;
- var exclude = ref.exclude;
- if (
- // not included
- (include && (!name || !matches(include, name))) ||
- // excluded
- (exclude && name && matches(exclude, name))
- ) {
- return vnode
- }
-
- var ref$1 = this;
- var cache = ref$1.cache;
- var keys = ref$1.keys;
- var key = vnode.key == null
- // same constructor may get registered as different local components
- // so cid alone is not enough (#3269)
- ? componentOptions.Ctor.cid + (componentOptions.tag ? ("::" + (componentOptions.tag)) : '')
- : vnode.key;
- if (cache[key]) {
- vnode.componentInstance = cache[key].componentInstance;
- // make current key freshest
- remove(keys, key);
- keys.push(key);
- } else {
- cache[key] = vnode;
- keys.push(key);
- // prune oldest entry
- if (this.max && keys.length > parseInt(this.max)) {
- pruneCacheEntry(cache, keys[0], keys, this._vnode);
- }
- }
-
- vnode.data.keepAlive = true;
- }
- return vnode || (slot && slot[0])
- }
-};
-
-var builtInComponents = {
- KeepAlive: KeepAlive
-};
-
-/* */
-
-function initGlobalAPI (Vue) {
- // config
- var configDef = {};
- configDef.get = function () { return config; };
- if (process.env.NODE_ENV !== 'production') {
- configDef.set = function () {
- warn(
- 'Do not replace the Vue.config object, set individual fields instead.'
- );
- };
- }
- Object.defineProperty(Vue, 'config', configDef);
-
- // exposed util methods.
- // NOTE: these are not considered part of the public API - avoid relying on
- // them unless you are aware of the risk.
- Vue.util = {
- warn: warn,
- extend: extend,
- mergeOptions: mergeOptions,
- defineReactive: defineReactive
- };
-
- Vue.set = set;
- Vue.delete = del;
- Vue.nextTick = nextTick;
-
- Vue.options = Object.create(null);
- ASSET_TYPES.forEach(function (type) {
- Vue.options[type + 's'] = Object.create(null);
- });
-
- // this is used to identify the "base" constructor to extend all plain-object
- // components with in Weex's multi-instance scenarios.
- Vue.options._base = Vue;
-
- extend(Vue.options.components, builtInComponents);
-
- initUse(Vue);
- initMixin$1(Vue);
- initExtend(Vue);
- initAssetRegisters(Vue);
-}
-
-initGlobalAPI(Vue$3);
-
-Object.defineProperty(Vue$3.prototype, '$isServer', {
- get: isServerRendering
-});
-
-Object.defineProperty(Vue$3.prototype, '$ssrContext', {
- get: function get () {
- /* istanbul ignore next */
- return this.$vnode && this.$vnode.ssrContext
- }
-});
-
-Vue$3.version = '2.5.13';
-
-/* */
-
-// these are reserved for web because they are directly compiled away
-// during template compilation
-var isReservedAttr = makeMap('style,class');
-
-// attributes that should be using props for binding
-var acceptValue = makeMap('input,textarea,option,select,progress');
-var mustUseProp = function (tag, type, attr) {
- return (
- (attr === 'value' && acceptValue(tag)) && type !== 'button' ||
- (attr === 'selected' && tag === 'option') ||
- (attr === 'checked' && tag === 'input') ||
- (attr === 'muted' && tag === 'video')
- )
-};
-
-var isEnumeratedAttr = makeMap('contenteditable,draggable,spellcheck');
-
-var isBooleanAttr = makeMap(
- 'allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,' +
- 'default,defaultchecked,defaultmuted,defaultselected,defer,disabled,' +
- 'enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,' +
- 'muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,' +
- 'required,reversed,scoped,seamless,selected,sortable,translate,' +
- 'truespeed,typemustmatch,visible'
-);
-
-var xlinkNS = 'http://www.w3.org/1999/xlink';
-
-var isXlink = function (name) {
- return name.charAt(5) === ':' && name.slice(0, 5) === 'xlink'
-};
-
-var getXlinkProp = function (name) {
- return isXlink(name) ? name.slice(6, name.length) : ''
-};
-
-var isFalsyAttrValue = function (val) {
- return val == null || val === false
-};
-
-/* */
-
-function genClassForVnode (vnode) {
- var data = vnode.data;
- var parentNode = vnode;
- var childNode = vnode;
- while (isDef(childNode.componentInstance)) {
- childNode = childNode.componentInstance._vnode;
- if (childNode && childNode.data) {
- data = mergeClassData(childNode.data, data);
- }
- }
- while (isDef(parentNode = parentNode.parent)) {
- if (parentNode && parentNode.data) {
- data = mergeClassData(data, parentNode.data);
- }
- }
- return renderClass(data.staticClass, data.class)
-}
-
-function mergeClassData (child, parent) {
- return {
- staticClass: concat(child.staticClass, parent.staticClass),
- class: isDef(child.class)
- ? [child.class, parent.class]
- : parent.class
- }
-}
-
-function renderClass (
- staticClass,
- dynamicClass
-) {
- if (isDef(staticClass) || isDef(dynamicClass)) {
- return concat(staticClass, stringifyClass(dynamicClass))
- }
- /* istanbul ignore next */
- return ''
-}
-
-function concat (a, b) {
- return a ? b ? (a + ' ' + b) : a : (b || '')
-}
-
-function stringifyClass (value) {
- if (Array.isArray(value)) {
- return stringifyArray(value)
- }
- if (isObject(value)) {
- return stringifyObject(value)
- }
- if (typeof value === 'string') {
- return value
- }
- /* istanbul ignore next */
- return ''
-}
-
-function stringifyArray (value) {
- var res = '';
- var stringified;
- for (var i = 0, l = value.length; i < l; i++) {
- if (isDef(stringified = stringifyClass(value[i])) && stringified !== '') {
- if (res) { res += ' '; }
- res += stringified;
- }
- }
- return res
-}
-
-function stringifyObject (value) {
- var res = '';
- for (var key in value) {
- if (value[key]) {
- if (res) { res += ' '; }
- res += key;
- }
- }
- return res
-}
-
-/* */
-
-var namespaceMap = {
- svg: 'http://www.w3.org/2000/svg',
- math: 'http://www.w3.org/1998/Math/MathML'
-};
-
-var isHTMLTag = makeMap(
- 'html,body,base,head,link,meta,style,title,' +
- 'address,article,aside,footer,header,h1,h2,h3,h4,h5,h6,hgroup,nav,section,' +
- 'div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,' +
- 'a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,rtc,ruby,' +
- 's,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,' +
- 'embed,object,param,source,canvas,script,noscript,del,ins,' +
- 'caption,col,colgroup,table,thead,tbody,td,th,tr,' +
- 'button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,' +
- 'output,progress,select,textarea,' +
- 'details,dialog,menu,menuitem,summary,' +
- 'content,element,shadow,template,blockquote,iframe,tfoot'
-);
-
-// this map is intentionally selective, only covering SVG elements that may
-// contain child elements.
-var isSVG = makeMap(
- 'svg,animate,circle,clippath,cursor,defs,desc,ellipse,filter,font-face,' +
- 'foreignObject,g,glyph,image,line,marker,mask,missing-glyph,path,pattern,' +
- 'polygon,polyline,rect,switch,symbol,text,textpath,tspan,use,view',
- true
-);
-
-
-
-var isReservedTag = function (tag) {
- return isHTMLTag(tag) || isSVG(tag)
-};
-
-function getTagNamespace (tag) {
- if (isSVG(tag)) {
- return 'svg'
- }
- // basic support for MathML
- // note it doesn't support other MathML elements being component roots
- if (tag === 'math') {
- return 'math'
- }
-}
-
-var unknownElementCache = Object.create(null);
-function isUnknownElement (tag) {
- /* istanbul ignore if */
- if (!inBrowser) {
- return true
- }
- if (isReservedTag(tag)) {
- return false
- }
- tag = tag.toLowerCase();
- /* istanbul ignore if */
- if (unknownElementCache[tag] != null) {
- return unknownElementCache[tag]
- }
- var el = document.createElement(tag);
- if (tag.indexOf('-') > -1) {
- // http://stackoverflow.com/a/28210364/1070244
- return (unknownElementCache[tag] = (
- el.constructor === window.HTMLUnknownElement ||
- el.constructor === window.HTMLElement
- ))
- } else {
- return (unknownElementCache[tag] = /HTMLUnknownElement/.test(el.toString()))
- }
-}
-
-var isTextInputType = makeMap('text,number,password,search,email,tel,url');
-
-/* */
-
-/**
- * Query an element selector if it's not an element already.
- */
-function query (el) {
- if (typeof el === 'string') {
- var selected = document.querySelector(el);
- if (!selected) {
- process.env.NODE_ENV !== 'production' && warn(
- 'Cannot find element: ' + el
- );
- return document.createElement('div')
- }
- return selected
- } else {
- return el
- }
-}
-
-/* */
-
-function createElement$1 (tagName, vnode) {
- var elm = document.createElement(tagName);
- if (tagName !== 'select') {
- return elm
- }
- // false or null will remove the attribute but undefined will not
- if (vnode.data && vnode.data.attrs && vnode.data.attrs.multiple !== undefined) {
- elm.setAttribute('multiple', 'multiple');
- }
- return elm
-}
-
-function createElementNS (namespace, tagName) {
- return document.createElementNS(namespaceMap[namespace], tagName)
-}
-
-function createTextNode (text) {
- return document.createTextNode(text)
-}
-
-function createComment (text) {
- return document.createComment(text)
-}
-
-function insertBefore (parentNode, newNode, referenceNode) {
- parentNode.insertBefore(newNode, referenceNode);
-}
-
-function removeChild (node, child) {
- node.removeChild(child);
-}
-
-function appendChild (node, child) {
- node.appendChild(child);
-}
-
-function parentNode (node) {
- return node.parentNode
-}
-
-function nextSibling (node) {
- return node.nextSibling
-}
-
-function tagName (node) {
- return node.tagName
-}
-
-function setTextContent (node, text) {
- node.textContent = text;
-}
-
-function setAttribute (node, key, val) {
- node.setAttribute(key, val);
-}
-
-
-var nodeOps = Object.freeze({
- createElement: createElement$1,
- createElementNS: createElementNS,
- createTextNode: createTextNode,
- createComment: createComment,
- insertBefore: insertBefore,
- removeChild: removeChild,
- appendChild: appendChild,
- parentNode: parentNode,
- nextSibling: nextSibling,
- tagName: tagName,
- setTextContent: setTextContent,
- setAttribute: setAttribute
-});
-
-/* */
-
-var ref = {
- create: function create (_, vnode) {
- registerRef(vnode);
- },
- update: function update (oldVnode, vnode) {
- if (oldVnode.data.ref !== vnode.data.ref) {
- registerRef(oldVnode, true);
- registerRef(vnode);
- }
- },
- destroy: function destroy (vnode) {
- registerRef(vnode, true);
- }
-};
-
-function registerRef (vnode, isRemoval) {
- var key = vnode.data.ref;
- if (!key) { return }
-
- var vm = vnode.context;
- var ref = vnode.componentInstance || vnode.elm;
- var refs = vm.$refs;
- if (isRemoval) {
- if (Array.isArray(refs[key])) {
- remove(refs[key], ref);
- } else if (refs[key] === ref) {
- refs[key] = undefined;
- }
- } else {
- if (vnode.data.refInFor) {
- if (!Array.isArray(refs[key])) {
- refs[key] = [ref];
- } else if (refs[key].indexOf(ref) < 0) {
- // $flow-disable-line
- refs[key].push(ref);
- }
- } else {
- refs[key] = ref;
- }
- }
-}
-
-/**
- * Virtual DOM patching algorithm based on Snabbdom by
- * Simon Friis Vindum (@paldepind)
- * Licensed under the MIT License
- * https://github.com/paldepind/snabbdom/blob/master/LICENSE
- *
- * modified by Evan You (@yyx990803)
- *
- * Not type-checking this because this file is perf-critical and the cost
- * of making flow understand it is not worth it.
- */
-
-var emptyNode = new VNode('', {}, []);
-
-var hooks = ['create', 'activate', 'update', 'remove', 'destroy'];
-
-function sameVnode (a, b) {
- return (
- a.key === b.key && (
- (
- a.tag === b.tag &&
- a.isComment === b.isComment &&
- isDef(a.data) === isDef(b.data) &&
- sameInputType(a, b)
- ) || (
- isTrue(a.isAsyncPlaceholder) &&
- a.asyncFactory === b.asyncFactory &&
- isUndef(b.asyncFactory.error)
- )
- )
- )
-}
-
-function sameInputType (a, b) {
- if (a.tag !== 'input') { return true }
- var i;
- var typeA = isDef(i = a.data) && isDef(i = i.attrs) && i.type;
- var typeB = isDef(i = b.data) && isDef(i = i.attrs) && i.type;
- return typeA === typeB || isTextInputType(typeA) && isTextInputType(typeB)
-}
-
-function createKeyToOldIdx (children, beginIdx, endIdx) {
- var i, key;
- var map = {};
- for (i = beginIdx; i <= endIdx; ++i) {
- key = children[i].key;
- if (isDef(key)) { map[key] = i; }
- }
- return map
-}
-
-function createPatchFunction (backend) {
- var i, j;
- var cbs = {};
-
- var modules = backend.modules;
- var nodeOps = backend.nodeOps;
-
- for (i = 0; i < hooks.length; ++i) {
- cbs[hooks[i]] = [];
- for (j = 0; j < modules.length; ++j) {
- if (isDef(modules[j][hooks[i]])) {
- cbs[hooks[i]].push(modules[j][hooks[i]]);
- }
- }
- }
-
- function emptyNodeAt (elm) {
- return new VNode(nodeOps.tagName(elm).toLowerCase(), {}, [], undefined, elm)
- }
-
- function createRmCb (childElm, listeners) {
- function remove () {
- if (--remove.listeners === 0) {
- removeNode(childElm);
- }
- }
- remove.listeners = listeners;
- return remove
- }
-
- function removeNode (el) {
- var parent = nodeOps.parentNode(el);
- // element may have already been removed due to v-html / v-text
- if (isDef(parent)) {
- nodeOps.removeChild(parent, el);
- }
- }
-
- function isUnknownElement$$1 (vnode, inVPre) {
- return (
- !inVPre &&
- !vnode.ns &&
- !(
- config.ignoredElements.length &&
- config.ignoredElements.some(function (ignore) {
- return isRegExp(ignore)
- ? ignore.test(vnode.tag)
- : ignore === vnode.tag
- })
- ) &&
- config.isUnknownElement(vnode.tag)
- )
- }
-
- var creatingElmInVPre = 0;
- function createElm (vnode, insertedVnodeQueue, parentElm, refElm, nested) {
- vnode.isRootInsert = !nested; // for transition enter check
- if (createComponent(vnode, insertedVnodeQueue, parentElm, refElm)) {
- return
- }
-
- var data = vnode.data;
- var children = vnode.children;
- var tag = vnode.tag;
- if (isDef(tag)) {
- if (process.env.NODE_ENV !== 'production') {
- if (data && data.pre) {
- creatingElmInVPre++;
- }
- if (isUnknownElement$$1(vnode, creatingElmInVPre)) {
- warn(
- 'Unknown custom element: <' + tag + '> - did you ' +
- 'register the component correctly? For recursive components, ' +
- 'make sure to provide the "name" option.',
- vnode.context
- );
- }
- }
- vnode.elm = vnode.ns
- ? nodeOps.createElementNS(vnode.ns, tag)
- : nodeOps.createElement(tag, vnode);
- setScope(vnode);
-
- /* istanbul ignore if */
- {
- createChildren(vnode, children, insertedVnodeQueue);
- if (isDef(data)) {
- invokeCreateHooks(vnode, insertedVnodeQueue);
- }
- insert(parentElm, vnode.elm, refElm);
- }
-
- if (process.env.NODE_ENV !== 'production' && data && data.pre) {
- creatingElmInVPre--;
- }
- } else if (isTrue(vnode.isComment)) {
- vnode.elm = nodeOps.createComment(vnode.text);
- insert(parentElm, vnode.elm, refElm);
- } else {
- vnode.elm = nodeOps.createTextNode(vnode.text);
- insert(parentElm, vnode.elm, refElm);
- }
- }
-
- function createComponent (vnode, insertedVnodeQueue, parentElm, refElm) {
- var i = vnode.data;
- if (isDef(i)) {
- var isReactivated = isDef(vnode.componentInstance) && i.keepAlive;
- if (isDef(i = i.hook) && isDef(i = i.init)) {
- i(vnode, false /* hydrating */, parentElm, refElm);
- }
- // after calling the init hook, if the vnode is a child component
- // it should've created a child instance and mounted it. the child
- // component also has set the placeholder vnode's elm.
- // in that case we can just return the element and be done.
- if (isDef(vnode.componentInstance)) {
- initComponent(vnode, insertedVnodeQueue);
- if (isTrue(isReactivated)) {
- reactivateComponent(vnode, insertedVnodeQueue, parentElm, refElm);
- }
- return true
- }
- }
- }
-
- function initComponent (vnode, insertedVnodeQueue) {
- if (isDef(vnode.data.pendingInsert)) {
- insertedVnodeQueue.push.apply(insertedVnodeQueue, vnode.data.pendingInsert);
- vnode.data.pendingInsert = null;
- }
- vnode.elm = vnode.componentInstance.$el;
- if (isPatchable(vnode)) {
- invokeCreateHooks(vnode, insertedVnodeQueue);
- setScope(vnode);
- } else {
- // empty component root.
- // skip all element-related modules except for ref (#3455)
- registerRef(vnode);
- // make sure to invoke the insert hook
- insertedVnodeQueue.push(vnode);
- }
- }
-
- function reactivateComponent (vnode, insertedVnodeQueue, parentElm, refElm) {
- var i;
- // hack for #4339: a reactivated component with inner transition
- // does not trigger because the inner node's created hooks are not called
- // again. It's not ideal to involve module-specific logic in here but
- // there doesn't seem to be a better way to do it.
- var innerNode = vnode;
- while (innerNode.componentInstance) {
- innerNode = innerNode.componentInstance._vnode;
- if (isDef(i = innerNode.data) && isDef(i = i.transition)) {
- for (i = 0; i < cbs.activate.length; ++i) {
- cbs.activate[i](emptyNode, innerNode);
- }
- insertedVnodeQueue.push(innerNode);
- break
- }
- }
- // unlike a newly created component,
- // a reactivated keep-alive component doesn't insert itself
- insert(parentElm, vnode.elm, refElm);
- }
-
- function insert (parent, elm, ref$$1) {
- if (isDef(parent)) {
- if (isDef(ref$$1)) {
- if (ref$$1.parentNode === parent) {
- nodeOps.insertBefore(parent, elm, ref$$1);
- }
- } else {
- nodeOps.appendChild(parent, elm);
- }
- }
- }
-
- function createChildren (vnode, children, insertedVnodeQueue) {
- if (Array.isArray(children)) {
- if (process.env.NODE_ENV !== 'production') {
- checkDuplicateKeys(children);
- }
- for (var i = 0; i < children.length; ++i) {
- createElm(children[i], insertedVnodeQueue, vnode.elm, null, true);
- }
- } else if (isPrimitive(vnode.text)) {
- nodeOps.appendChild(vnode.elm, nodeOps.createTextNode(String(vnode.text)));
- }
- }
-
- function isPatchable (vnode) {
- while (vnode.componentInstance) {
- vnode = vnode.componentInstance._vnode;
- }
- return isDef(vnode.tag)
- }
-
- function invokeCreateHooks (vnode, insertedVnodeQueue) {
- for (var i$1 = 0; i$1 < cbs.create.length; ++i$1) {
- cbs.create[i$1](emptyNode, vnode);
- }
- i = vnode.data.hook; // Reuse variable
- if (isDef(i)) {
- if (isDef(i.create)) { i.create(emptyNode, vnode); }
- if (isDef(i.insert)) { insertedVnodeQueue.push(vnode); }
- }
- }
-
- // set scope id attribute for scoped CSS.
- // this is implemented as a special case to avoid the overhead
- // of going through the normal attribute patching process.
- function setScope (vnode) {
- var i;
- if (isDef(i = vnode.fnScopeId)) {
- nodeOps.setAttribute(vnode.elm, i, '');
- } else {
- var ancestor = vnode;
- while (ancestor) {
- if (isDef(i = ancestor.context) && isDef(i = i.$options._scopeId)) {
- nodeOps.setAttribute(vnode.elm, i, '');
- }
- ancestor = ancestor.parent;
- }
- }
- // for slot content they should also get the scopeId from the host instance.
- if (isDef(i = activeInstance) &&
- i !== vnode.context &&
- i !== vnode.fnContext &&
- isDef(i = i.$options._scopeId)
- ) {
- nodeOps.setAttribute(vnode.elm, i, '');
- }
- }
-
- function addVnodes (parentElm, refElm, vnodes, startIdx, endIdx, insertedVnodeQueue) {
- for (; startIdx <= endIdx; ++startIdx) {
- createElm(vnodes[startIdx], insertedVnodeQueue, parentElm, refElm);
- }
- }
-
- function invokeDestroyHook (vnode) {
- var i, j;
- var data = vnode.data;
- if (isDef(data)) {
- if (isDef(i = data.hook) && isDef(i = i.destroy)) { i(vnode); }
- for (i = 0; i < cbs.destroy.length; ++i) { cbs.destroy[i](vnode); }
- }
- if (isDef(i = vnode.children)) {
- for (j = 0; j < vnode.children.length; ++j) {
- invokeDestroyHook(vnode.children[j]);
- }
- }
- }
-
- function removeVnodes (parentElm, vnodes, startIdx, endIdx) {
- for (; startIdx <= endIdx; ++startIdx) {
- var ch = vnodes[startIdx];
- if (isDef(ch)) {
- if (isDef(ch.tag)) {
- removeAndInvokeRemoveHook(ch);
- invokeDestroyHook(ch);
- } else { // Text node
- removeNode(ch.elm);
- }
- }
- }
- }
-
- function removeAndInvokeRemoveHook (vnode, rm) {
- if (isDef(rm) || isDef(vnode.data)) {
- var i;
- var listeners = cbs.remove.length + 1;
- if (isDef(rm)) {
- // we have a recursively passed down rm callback
- // increase the listeners count
- rm.listeners += listeners;
- } else {
- // directly removing
- rm = createRmCb(vnode.elm, listeners);
- }
- // recursively invoke hooks on child component root node
- if (isDef(i = vnode.componentInstance) && isDef(i = i._vnode) && isDef(i.data)) {
- removeAndInvokeRemoveHook(i, rm);
- }
- for (i = 0; i < cbs.remove.length; ++i) {
- cbs.remove[i](vnode, rm);
- }
- if (isDef(i = vnode.data.hook) && isDef(i = i.remove)) {
- i(vnode, rm);
- } else {
- rm();
- }
- } else {
- removeNode(vnode.elm);
- }
- }
-
- function updateChildren (parentElm, oldCh, newCh, insertedVnodeQueue, removeOnly) {
- var oldStartIdx = 0;
- var newStartIdx = 0;
- var oldEndIdx = oldCh.length - 1;
- var oldStartVnode = oldCh[0];
- var oldEndVnode = oldCh[oldEndIdx];
- var newEndIdx = newCh.length - 1;
- var newStartVnode = newCh[0];
- var newEndVnode = newCh[newEndIdx];
- var oldKeyToIdx, idxInOld, vnodeToMove, refElm;
-
- // removeOnly is a special flag used only by <transition-group>
- // to ensure removed elements stay in correct relative positions
- // during leaving transitions
- var canMove = !removeOnly;
-
- if (process.env.NODE_ENV !== 'production') {
- checkDuplicateKeys(newCh);
- }
-
- while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {
- if (isUndef(oldStartVnode)) {
- oldStartVnode = oldCh[++oldStartIdx]; // Vnode has been moved left
- } else if (isUndef(oldEndVnode)) {
- oldEndVnode = oldCh[--oldEndIdx];
- } else if (sameVnode(oldStartVnode, newStartVnode)) {
- patchVnode(oldStartVnode, newStartVnode, insertedVnodeQueue);
- oldStartVnode = oldCh[++oldStartIdx];
- newStartVnode = newCh[++newStartIdx];
- } else if (sameVnode(oldEndVnode, newEndVnode)) {
- patchVnode(oldEndVnode, newEndVnode, insertedVnodeQueue);
- oldEndVnode = oldCh[--oldEndIdx];
- newEndVnode = newCh[--newEndIdx];
- } else if (sameVnode(oldStartVnode, newEndVnode)) { // Vnode moved right
- patchVnode(oldStartVnode, newEndVnode, insertedVnodeQueue);
- canMove && nodeOps.insertBefore(parentElm, oldStartVnode.elm, nodeOps.nextSibling(oldEndVnode.elm));
- oldStartVnode = oldCh[++oldStartIdx];
- newEndVnode = newCh[--newEndIdx];
- } else if (sameVnode(oldEndVnode, newStartVnode)) { // Vnode moved left
- patchVnode(oldEndVnode, newStartVnode, insertedVnodeQueue);
- canMove && nodeOps.insertBefore(parentElm, oldEndVnode.elm, oldStartVnode.elm);
- oldEndVnode = oldCh[--oldEndIdx];
- newStartVnode = newCh[++newStartIdx];
- } else {
- if (isUndef(oldKeyToIdx)) { oldKeyToIdx = createKeyToOldIdx(oldCh, oldStartIdx, oldEndIdx); }
- idxInOld = isDef(newStartVnode.key)
- ? oldKeyToIdx[newStartVnode.key]
- : findIdxInOld(newStartVnode, oldCh, oldStartIdx, oldEndIdx);
- if (isUndef(idxInOld)) { // New element
- createElm(newStartVnode, insertedVnodeQueue, parentElm, oldStartVnode.elm);
- } else {
- vnodeToMove = oldCh[idxInOld];
- if (sameVnode(vnodeToMove, newStartVnode)) {
- patchVnode(vnodeToMove, newStartVnode, insertedVnodeQueue);
- oldCh[idxInOld] = undefined;
- canMove && nodeOps.insertBefore(parentElm, vnodeToMove.elm, oldStartVnode.elm);
- } else {
- // same key but different element. treat as new element
- createElm(newStartVnode, insertedVnodeQueue, parentElm, oldStartVnode.elm);
- }
- }
- newStartVnode = newCh[++newStartIdx];
- }
- }
- if (oldStartIdx > oldEndIdx) {
- refElm = isUndef(newCh[newEndIdx + 1]) ? null : newCh[newEndIdx + 1].elm;
- addVnodes(parentElm, refElm, newCh, newStartIdx, newEndIdx, insertedVnodeQueue);
- } else if (newStartIdx > newEndIdx) {
- removeVnodes(parentElm, oldCh, oldStartIdx, oldEndIdx);
- }
- }
-
- function checkDuplicateKeys (children) {
- var seenKeys = {};
- for (var i = 0; i < children.length; i++) {
- var vnode = children[i];
- var key = vnode.key;
- if (isDef(key)) {
- if (seenKeys[key]) {
- warn(
- ("Duplicate keys detected: '" + key + "'. This may cause an update error."),
- vnode.context
- );
- } else {
- seenKeys[key] = true;
- }
- }
- }
- }
-
- function findIdxInOld (node, oldCh, start, end) {
- for (var i = start; i < end; i++) {
- var c = oldCh[i];
- if (isDef(c) && sameVnode(node, c)) { return i }
- }
- }
-
- function patchVnode (oldVnode, vnode, insertedVnodeQueue, removeOnly) {
- if (oldVnode === vnode) {
- return
- }
-
- var elm = vnode.elm = oldVnode.elm;
-
- if (isTrue(oldVnode.isAsyncPlaceholder)) {
- if (isDef(vnode.asyncFactory.resolved)) {
- hydrate(oldVnode.elm, vnode, insertedVnodeQueue);
- } else {
- vnode.isAsyncPlaceholder = true;
- }
- return
- }
-
- // reuse element for static trees.
- // note we only do this if the vnode is cloned -
- // if the new node is not cloned it means the render functions have been
- // reset by the hot-reload-api and we need to do a proper re-render.
- if (isTrue(vnode.isStatic) &&
- isTrue(oldVnode.isStatic) &&
- vnode.key === oldVnode.key &&
- (isTrue(vnode.isCloned) || isTrue(vnode.isOnce))
- ) {
- vnode.componentInstance = oldVnode.componentInstance;
- return
- }
-
- var i;
- var data = vnode.data;
- if (isDef(data) && isDef(i = data.hook) && isDef(i = i.prepatch)) {
- i(oldVnode, vnode);
- }
-
- var oldCh = oldVnode.children;
- var ch = vnode.children;
- if (isDef(data) && isPatchable(vnode)) {
- for (i = 0; i < cbs.update.length; ++i) { cbs.update[i](oldVnode, vnode); }
- if (isDef(i = data.hook) && isDef(i = i.update)) { i(oldVnode, vnode); }
- }
- if (isUndef(vnode.text)) {
- if (isDef(oldCh) && isDef(ch)) {
- if (oldCh !== ch) { updateChildren(elm, oldCh, ch, insertedVnodeQueue, removeOnly); }
- } else if (isDef(ch)) {
- if (isDef(oldVnode.text)) { nodeOps.setTextContent(elm, ''); }
- addVnodes(elm, null, ch, 0, ch.length - 1, insertedVnodeQueue);
- } else if (isDef(oldCh)) {
- removeVnodes(elm, oldCh, 0, oldCh.length - 1);
- } else if (isDef(oldVnode.text)) {
- nodeOps.setTextContent(elm, '');
- }
- } else if (oldVnode.text !== vnode.text) {
- nodeOps.setTextContent(elm, vnode.text);
- }
- if (isDef(data)) {
- if (isDef(i = data.hook) && isDef(i = i.postpatch)) { i(oldVnode, vnode); }
- }
- }
-
- function invokeInsertHook (vnode, queue, initial) {
- // delay insert hooks for component root nodes, invoke them after the
- // element is really inserted
- if (isTrue(initial) && isDef(vnode.parent)) {
- vnode.parent.data.pendingInsert = queue;
- } else {
- for (var i = 0; i < queue.length; ++i) {
- queue[i].data.hook.insert(queue[i]);
- }
- }
- }
-
- var hydrationBailed = false;
- // list of modules that can skip create hook during hydration because they
- // are already rendered on the client or has no need for initialization
- // Note: style is excluded because it relies on initial clone for future
- // deep updates (#7063).
- var isRenderedModule = makeMap('attrs,class,staticClass,staticStyle,key');
-
- // Note: this is a browser-only function so we can assume elms are DOM nodes.
- function hydrate (elm, vnode, insertedVnodeQueue, inVPre) {
- var i;
- var tag = vnode.tag;
- var data = vnode.data;
- var children = vnode.children;
- inVPre = inVPre || (data && data.pre);
- vnode.elm = elm;
-
- if (isTrue(vnode.isComment) && isDef(vnode.asyncFactory)) {
- vnode.isAsyncPlaceholder = true;
- return true
- }
- // assert node match
- if (process.env.NODE_ENV !== 'production') {
- if (!assertNodeMatch(elm, vnode, inVPre)) {
- return false
- }
- }
- if (isDef(data)) {
- if (isDef(i = data.hook) && isDef(i = i.init)) { i(vnode, true /* hydrating */); }
- if (isDef(i = vnode.componentInstance)) {
- // child component. it should have hydrated its own tree.
- initComponent(vnode, insertedVnodeQueue);
- return true
- }
- }
- if (isDef(tag)) {
- if (isDef(children)) {
- // empty element, allow client to pick up and populate children
- if (!elm.hasChildNodes()) {
- createChildren(vnode, children, insertedVnodeQueue);
- } else {
- // v-html and domProps: innerHTML
- if (isDef(i = data) && isDef(i = i.domProps) && isDef(i = i.innerHTML)) {
- if (i !== elm.innerHTML) {
- /* istanbul ignore if */
- if (process.env.NODE_ENV !== 'production' &&
- typeof console !== 'undefined' &&
- !hydrationBailed
- ) {
- hydrationBailed = true;
- console.warn('Parent: ', elm);
- console.warn('server innerHTML: ', i);
- console.warn('client innerHTML: ', elm.innerHTML);
- }
- return false
- }
- } else {
- // iterate and compare children lists
- var childrenMatch = true;
- var childNode = elm.firstChild;
- for (var i$1 = 0; i$1 < children.length; i$1++) {
- if (!childNode || !hydrate(childNode, children[i$1], insertedVnodeQueue, inVPre)) {
- childrenMatch = false;
- break
- }
- childNode = childNode.nextSibling;
- }
- // if childNode is not null, it means the actual childNodes list is
- // longer than the virtual children list.
- if (!childrenMatch || childNode) {
- /* istanbul ignore if */
- if (process.env.NODE_ENV !== 'production' &&
- typeof console !== 'undefined' &&
- !hydrationBailed
- ) {
- hydrationBailed = true;
- console.warn('Parent: ', elm);
- console.warn('Mismatching childNodes vs. VNodes: ', elm.childNodes, children);
- }
- return false
- }
- }
- }
- }
- if (isDef(data)) {
- var fullInvoke = false;
- for (var key in data) {
- if (!isRenderedModule(key)) {
- fullInvoke = true;
- invokeCreateHooks(vnode, insertedVnodeQueue);
- break
- }
- }
- if (!fullInvoke && data['class']) {
- // ensure collecting deps for deep class bindings for future updates
- traverse(data['class']);
- }
- }
- } else if (elm.data !== vnode.text) {
- elm.data = vnode.text;
- }
- return true
- }
-
- function assertNodeMatch (node, vnode, inVPre) {
- if (isDef(vnode.tag)) {
- return vnode.tag.indexOf('vue-component') === 0 || (
- !isUnknownElement$$1(vnode, inVPre) &&
- vnode.tag.toLowerCase() === (node.tagName && node.tagName.toLowerCase())
- )
- } else {
- return node.nodeType === (vnode.isComment ? 8 : 3)
- }
- }
-
- return function patch (oldVnode, vnode, hydrating, removeOnly, parentElm, refElm) {
- if (isUndef(vnode)) {
- if (isDef(oldVnode)) { invokeDestroyHook(oldVnode); }
- return
- }
-
- var isInitialPatch = false;
- var insertedVnodeQueue = [];
-
- if (isUndef(oldVnode)) {
- // empty mount (likely as component), create new root element
- isInitialPatch = true;
- createElm(vnode, insertedVnodeQueue, parentElm, refElm);
- } else {
- var isRealElement = isDef(oldVnode.nodeType);
- if (!isRealElement && sameVnode(oldVnode, vnode)) {
- // patch existing root node
- patchVnode(oldVnode, vnode, insertedVnodeQueue, removeOnly);
- } else {
- if (isRealElement) {
- // mounting to a real element
- // check if this is server-rendered content and if we can perform
- // a successful hydration.
- if (oldVnode.nodeType === 1 && oldVnode.hasAttribute(SSR_ATTR)) {
- oldVnode.removeAttribute(SSR_ATTR);
- hydrating = true;
- }
- if (isTrue(hydrating)) {
- if (hydrate(oldVnode, vnode, insertedVnodeQueue)) {
- invokeInsertHook(vnode, insertedVnodeQueue, true);
- return oldVnode
- } else if (process.env.NODE_ENV !== 'production') {
- warn(
- 'The client-side rendered virtual DOM tree is not matching ' +
- 'server-rendered content. This is likely caused by incorrect ' +
- 'HTML markup, for example nesting block-level elements inside ' +
- '<p>, or missing <tbody>. Bailing hydration and performing ' +
- 'full client-side render.'
- );
- }
- }
- // either not server-rendered, or hydration failed.
- // create an empty node and replace it
- oldVnode = emptyNodeAt(oldVnode);
- }
-
- // replacing existing element
- var oldElm = oldVnode.elm;
- var parentElm$1 = nodeOps.parentNode(oldElm);
-
- // create new node
- createElm(
- vnode,
- insertedVnodeQueue,
- // extremely rare edge case: do not insert if old element is in a
- // leaving transition. Only happens when combining transition +
- // keep-alive + HOCs. (#4590)
- oldElm._leaveCb ? null : parentElm$1,
- nodeOps.nextSibling(oldElm)
- );
-
- // update parent placeholder node element, recursively
- if (isDef(vnode.parent)) {
- var ancestor = vnode.parent;
- var patchable = isPatchable(vnode);
- while (ancestor) {
- for (var i = 0; i < cbs.destroy.length; ++i) {
- cbs.destroy[i](ancestor);
- }
- ancestor.elm = vnode.elm;
- if (patchable) {
- for (var i$1 = 0; i$1 < cbs.create.length; ++i$1) {
- cbs.create[i$1](emptyNode, ancestor);
- }
- // #6513
- // invoke insert hooks that may have been merged by create hooks.
- // e.g. for directives that uses the "inserted" hook.
- var insert = ancestor.data.hook.insert;
- if (insert.merged) {
- // start at index 1 to avoid re-invoking component mounted hook
- for (var i$2 = 1; i$2 < insert.fns.length; i$2++) {
- insert.fns[i$2]();
- }
- }
- } else {
- registerRef(ancestor);
- }
- ancestor = ancestor.parent;
- }
- }
-
- // destroy old node
- if (isDef(parentElm$1)) {
- removeVnodes(parentElm$1, [oldVnode], 0, 0);
- } else if (isDef(oldVnode.tag)) {
- invokeDestroyHook(oldVnode);
- }
- }
- }
-
- invokeInsertHook(vnode, insertedVnodeQueue, isInitialPatch);
- return vnode.elm
- }
-}
-
-/* */
-
-var directives = {
- create: updateDirectives,
- update: updateDirectives,
- destroy: function unbindDirectives (vnode) {
- updateDirectives(vnode, emptyNode);
- }
-};
-
-function updateDirectives (oldVnode, vnode) {
- if (oldVnode.data.directives || vnode.data.directives) {
- _update(oldVnode, vnode);
- }
-}
-
-function _update (oldVnode, vnode) {
- var isCreate = oldVnode === emptyNode;
- var isDestroy = vnode === emptyNode;
- var oldDirs = normalizeDirectives$1(oldVnode.data.directives, oldVnode.context);
- var newDirs = normalizeDirectives$1(vnode.data.directives, vnode.context);
-
- var dirsWithInsert = [];
- var dirsWithPostpatch = [];
-
- var key, oldDir, dir;
- for (key in newDirs) {
- oldDir = oldDirs[key];
- dir = newDirs[key];
- if (!oldDir) {
- // new directive, bind
- callHook$1(dir, 'bind', vnode, oldVnode);
- if (dir.def && dir.def.inserted) {
- dirsWithInsert.push(dir);
- }
- } else {
- // existing directive, update
- dir.oldValue = oldDir.value;
- callHook$1(dir, 'update', vnode, oldVnode);
- if (dir.def && dir.def.componentUpdated) {
- dirsWithPostpatch.push(dir);
- }
- }
- }
-
- if (dirsWithInsert.length) {
- var callInsert = function () {
- for (var i = 0; i < dirsWithInsert.length; i++) {
- callHook$1(dirsWithInsert[i], 'inserted', vnode, oldVnode);
- }
- };
- if (isCreate) {
- mergeVNodeHook(vnode, 'insert', callInsert);
- } else {
- callInsert();
- }
- }
-
- if (dirsWithPostpatch.length) {
- mergeVNodeHook(vnode, 'postpatch', function () {
- for (var i = 0; i < dirsWithPostpatch.length; i++) {
- callHook$1(dirsWithPostpatch[i], 'componentUpdated', vnode, oldVnode);
- }
- });
- }
-
- if (!isCreate) {
- for (key in oldDirs) {
- if (!newDirs[key]) {
- // no longer present, unbind
- callHook$1(oldDirs[key], 'unbind', oldVnode, oldVnode, isDestroy);
- }
- }
- }
-}
-
-var emptyModifiers = Object.create(null);
-
-function normalizeDirectives$1 (
- dirs,
- vm
-) {
- var res = Object.create(null);
- if (!dirs) {
- // $flow-disable-line
- return res
- }
- var i, dir;
- for (i = 0; i < dirs.length; i++) {
- dir = dirs[i];
- if (!dir.modifiers) {
- // $flow-disable-line
- dir.modifiers = emptyModifiers;
- }
- res[getRawDirName(dir)] = dir;
- dir.def = resolveAsset(vm.$options, 'directives', dir.name, true);
- }
- // $flow-disable-line
- return res
-}
-
-function getRawDirName (dir) {
- return dir.rawName || ((dir.name) + "." + (Object.keys(dir.modifiers || {}).join('.')))
-}
-
-function callHook$1 (dir, hook, vnode, oldVnode, isDestroy) {
- var fn = dir.def && dir.def[hook];
- if (fn) {
- try {
- fn(vnode.elm, dir, vnode, oldVnode, isDestroy);
- } catch (e) {
- handleError(e, vnode.context, ("directive " + (dir.name) + " " + hook + " hook"));
- }
- }
-}
-
-var baseModules = [
- ref,
- directives
-];
-
-/* */
-
-function updateAttrs (oldVnode, vnode) {
- var opts = vnode.componentOptions;
- if (isDef(opts) && opts.Ctor.options.inheritAttrs === false) {
- return
- }
- if (isUndef(oldVnode.data.attrs) && isUndef(vnode.data.attrs)) {
- return
- }
- var key, cur, old;
- var elm = vnode.elm;
- var oldAttrs = oldVnode.data.attrs || {};
- var attrs = vnode.data.attrs || {};
- // clone observed objects, as the user probably wants to mutate it
- if (isDef(attrs.__ob__)) {
- attrs = vnode.data.attrs = extend({}, attrs);
- }
-
- for (key in attrs) {
- cur = attrs[key];
- old = oldAttrs[key];
- if (old !== cur) {
- setAttr(elm, key, cur);
- }
- }
- // #4391: in IE9, setting type can reset value for input[type=radio]
- // #6666: IE/Edge forces progress value down to 1 before setting a max
- /* istanbul ignore if */
- if ((isIE || isEdge) && attrs.value !== oldAttrs.value) {
- setAttr(elm, 'value', attrs.value);
- }
- for (key in oldAttrs) {
- if (isUndef(attrs[key])) {
- if (isXlink(key)) {
- elm.removeAttributeNS(xlinkNS, getXlinkProp(key));
- } else if (!isEnumeratedAttr(key)) {
- elm.removeAttribute(key);
- }
- }
- }
-}
-
-function setAttr (el, key, value) {
- if (isBooleanAttr(key)) {
- // set attribute for blank value
- // e.g. <option disabled>Select one</option>
- if (isFalsyAttrValue(value)) {
- el.removeAttribute(key);
- } else {
- // technically allowfullscreen is a boolean attribute for <iframe>,
- // but Flash expects a value of "true" when used on <embed> tag
- value = key === 'allowfullscreen' && el.tagName === 'EMBED'
- ? 'true'
- : key;
- el.setAttribute(key, value);
- }
- } else if (isEnumeratedAttr(key)) {
- el.setAttribute(key, isFalsyAttrValue(value) || value === 'false' ? 'false' : 'true');
- } else if (isXlink(key)) {
- if (isFalsyAttrValue(value)) {
- el.removeAttributeNS(xlinkNS, getXlinkProp(key));
- } else {
- el.setAttributeNS(xlinkNS, key, value);
- }
- } else {
- if (isFalsyAttrValue(value)) {
- el.removeAttribute(key);
- } else {
- // #7138: IE10 & 11 fires input event when setting placeholder on
- // <textarea>... block the first input event and remove the blocker
- // immediately.
- /* istanbul ignore if */
- if (
- isIE && !isIE9 &&
- el.tagName === 'TEXTAREA' &&
- key === 'placeholder' && !el.__ieph
- ) {
- var blocker = function (e) {
- e.stopImmediatePropagation();
- el.removeEventListener('input', blocker);
- };
- el.addEventListener('input', blocker);
- // $flow-disable-line
- el.__ieph = true; /* IE placeholder patched */
- }
- el.setAttribute(key, value);
- }
- }
-}
-
-var attrs = {
- create: updateAttrs,
- update: updateAttrs
-};
-
-/* */
-
-function updateClass (oldVnode, vnode) {
- var el = vnode.elm;
- var data = vnode.data;
- var oldData = oldVnode.data;
- if (
- isUndef(data.staticClass) &&
- isUndef(data.class) && (
- isUndef(oldData) || (
- isUndef(oldData.staticClass) &&
- isUndef(oldData.class)
- )
- )
- ) {
- return
- }
-
- var cls = genClassForVnode(vnode);
-
- // handle transition classes
- var transitionClass = el._transitionClasses;
- if (isDef(transitionClass)) {
- cls = concat(cls, stringifyClass(transitionClass));
- }
-
- // set the class
- if (cls !== el._prevClass) {
- el.setAttribute('class', cls);
- el._prevClass = cls;
- }
-}
-
-var klass = {
- create: updateClass,
- update: updateClass
-};
-
-/* */
-
-/* */
-
-
-
-
-
-
-
-
-
-// add a raw attr (use this in preTransforms)
-
-
-
-
-
-
-
-
-// note: this only removes the attr from the Array (attrsList) so that it
-// doesn't get processed by processAttrs.
-// By default it does NOT remove it from the map (attrsMap) because the map is
-// needed during codegen.
-
-/* */
-
-/**
- * Cross-platform code generation for component v-model
- */
-
-
-/**
- * Cross-platform codegen helper for generating v-model value assignment code.
- */
-
-/* */
-
-// in some cases, the event used has to be determined at runtime
-// so we used some reserved tokens during compile.
-var RANGE_TOKEN = '__r';
-var CHECKBOX_RADIO_TOKEN = '__c';
-
-/* */
-
-// normalize v-model event tokens that can only be determined at runtime.
-// it's important to place the event as the first in the array because
-// the whole point is ensuring the v-model callback gets called before
-// user-attached handlers.
-function normalizeEvents (on) {
- /* istanbul ignore if */
- if (isDef(on[RANGE_TOKEN])) {
- // IE input[type=range] only supports `change` event
- var event = isIE ? 'change' : 'input';
- on[event] = [].concat(on[RANGE_TOKEN], on[event] || []);
- delete on[RANGE_TOKEN];
- }
- // This was originally intended to fix #4521 but no longer necessary
- // after 2.5. Keeping it for backwards compat with generated code from < 2.4
- /* istanbul ignore if */
- if (isDef(on[CHECKBOX_RADIO_TOKEN])) {
- on.change = [].concat(on[CHECKBOX_RADIO_TOKEN], on.change || []);
- delete on[CHECKBOX_RADIO_TOKEN];
- }
-}
-
-var target$1;
-
-function createOnceHandler (handler, event, capture) {
- var _target = target$1; // save current target element in closure
- return function onceHandler () {
- var res = handler.apply(null, arguments);
- if (res !== null) {
- remove$2(event, onceHandler, capture, _target);
- }
- }
-}
-
-function add$1 (
- event,
- handler,
- once$$1,
- capture,
- passive
-) {
- handler = withMacroTask(handler);
- if (once$$1) { handler = createOnceHandler(handler, event, capture); }
- target$1.addEventListener(
- event,
- handler,
- supportsPassive
- ? { capture: capture, passive: passive }
- : capture
- );
-}
-
-function remove$2 (
- event,
- handler,
- capture,
- _target
-) {
- (_target || target$1).removeEventListener(
- event,
- handler._withTask || handler,
- capture
- );
-}
-
-function updateDOMListeners (oldVnode, vnode) {
- if (isUndef(oldVnode.data.on) && isUndef(vnode.data.on)) {
- return
- }
- var on = vnode.data.on || {};
- var oldOn = oldVnode.data.on || {};
- target$1 = vnode.elm;
- normalizeEvents(on);
- updateListeners(on, oldOn, add$1, remove$2, vnode.context);
- target$1 = undefined;
-}
-
-var events = {
- create: updateDOMListeners,
- update: updateDOMListeners
-};
-
-/* */
-
-function updateDOMProps (oldVnode, vnode) {
- if (isUndef(oldVnode.data.domProps) && isUndef(vnode.data.domProps)) {
- return
- }
- var key, cur;
- var elm = vnode.elm;
- var oldProps = oldVnode.data.domProps || {};
- var props = vnode.data.domProps || {};
- // clone observed objects, as the user probably wants to mutate it
- if (isDef(props.__ob__)) {
- props = vnode.data.domProps = extend({}, props);
- }
-
- for (key in oldProps) {
- if (isUndef(props[key])) {
- elm[key] = '';
- }
- }
- for (key in props) {
- cur = props[key];
- // ignore children if the node has textContent or innerHTML,
- // as these will throw away existing DOM nodes and cause removal errors
- // on subsequent patches (#3360)
- if (key === 'textContent' || key === 'innerHTML') {
- if (vnode.children) { vnode.children.length = 0; }
- if (cur === oldProps[key]) { continue }
- // #6601 work around Chrome version <= 55 bug where single textNode
- // replaced by innerHTML/textContent retains its parentNode property
- if (elm.childNodes.length === 1) {
- elm.removeChild(elm.childNodes[0]);
- }
- }
-
- if (key === 'value') {
- // store value as _value as well since
- // non-string values will be stringified
- elm._value = cur;
- // avoid resetting cursor position when value is the same
- var strCur = isUndef(cur) ? '' : String(cur);
- if (shouldUpdateValue(elm, strCur)) {
- elm.value = strCur;
- }
- } else {
- elm[key] = cur;
- }
- }
-}
-
-// check platforms/web/util/attrs.js acceptValue
-
-
-function shouldUpdateValue (elm, checkVal) {
- return (!elm.composing && (
- elm.tagName === 'OPTION' ||
- isNotInFocusAndDirty(elm, checkVal) ||
- isDirtyWithModifiers(elm, checkVal)
- ))
-}
-
-function isNotInFocusAndDirty (elm, checkVal) {
- // return true when textbox (.number and .trim) loses focus and its value is
- // not equal to the updated value
- var notInFocus = true;
- // #6157
- // work around IE bug when accessing document.activeElement in an iframe
- try { notInFocus = document.activeElement !== elm; } catch (e) {}
- return notInFocus && elm.value !== checkVal
-}
-
-function isDirtyWithModifiers (elm, newVal) {
- var value = elm.value;
- var modifiers = elm._vModifiers; // injected by v-model runtime
- if (isDef(modifiers)) {
- if (modifiers.lazy) {
- // inputs with lazy should only be updated when not in focus
- return false
- }
- if (modifiers.number) {
- return toNumber(value) !== toNumber(newVal)
- }
- if (modifiers.trim) {
- return value.trim() !== newVal.trim()
- }
- }
- return value !== newVal
-}
-
-var domProps = {
- create: updateDOMProps,
- update: updateDOMProps
-};
-
-/* */
-
-var parseStyleText = cached(function (cssText) {
- var res = {};
- var listDelimiter = /;(?![^(]*\))/g;
- var propertyDelimiter = /:(.+)/;
- cssText.split(listDelimiter).forEach(function (item) {
- if (item) {
- var tmp = item.split(propertyDelimiter);
- tmp.length > 1 && (res[tmp[0].trim()] = tmp[1].trim());
- }
- });
- return res
-});
-
-// merge static and dynamic style data on the same vnode
-function normalizeStyleData (data) {
- var style = normalizeStyleBinding(data.style);
- // static style is pre-processed into an object during compilation
- // and is always a fresh object, so it's safe to merge into it
- return data.staticStyle
- ? extend(data.staticStyle, style)
- : style
-}
-
-// normalize possible array / string values into Object
-function normalizeStyleBinding (bindingStyle) {
- if (Array.isArray(bindingStyle)) {
- return toObject(bindingStyle)
- }
- if (typeof bindingStyle === 'string') {
- return parseStyleText(bindingStyle)
- }
- return bindingStyle
-}
-
-/**
- * parent component style should be after child's
- * so that parent component's style could override it
- */
-function getStyle (vnode, checkChild) {
- var res = {};
- var styleData;
-
- if (checkChild) {
- var childNode = vnode;
- while (childNode.componentInstance) {
- childNode = childNode.componentInstance._vnode;
- if (
- childNode && childNode.data &&
- (styleData = normalizeStyleData(childNode.data))
- ) {
- extend(res, styleData);
- }
- }
- }
-
- if ((styleData = normalizeStyleData(vnode.data))) {
- extend(res, styleData);
- }
-
- var parentNode = vnode;
- while ((parentNode = parentNode.parent)) {
- if (parentNode.data && (styleData = normalizeStyleData(parentNode.data))) {
- extend(res, styleData);
- }
- }
- return res
-}
-
-/* */
-
-var cssVarRE = /^--/;
-var importantRE = /\s*!important$/;
-var setProp = function (el, name, val) {
- /* istanbul ignore if */
- if (cssVarRE.test(name)) {
- el.style.setProperty(name, val);
- } else if (importantRE.test(val)) {
- el.style.setProperty(name, val.replace(importantRE, ''), 'important');
- } else {
- var normalizedName = normalize(name);
- if (Array.isArray(val)) {
- // Support values array created by autoprefixer, e.g.
- // {display: ["-webkit-box", "-ms-flexbox", "flex"]}
- // Set them one by one, and the browser will only set those it can recognize
- for (var i = 0, len = val.length; i < len; i++) {
- el.style[normalizedName] = val[i];
- }
- } else {
- el.style[normalizedName] = val;
- }
- }
-};
-
-var vendorNames = ['Webkit', 'Moz', 'ms'];
-
-var emptyStyle;
-var normalize = cached(function (prop) {
- emptyStyle = emptyStyle || document.createElement('div').style;
- prop = camelize(prop);
- if (prop !== 'filter' && (prop in emptyStyle)) {
- return prop
- }
- var capName = prop.charAt(0).toUpperCase() + prop.slice(1);
- for (var i = 0; i < vendorNames.length; i++) {
- var name = vendorNames[i] + capName;
- if (name in emptyStyle) {
- return name
- }
- }
-});
-
-function updateStyle (oldVnode, vnode) {
- var data = vnode.data;
- var oldData = oldVnode.data;
-
- if (isUndef(data.staticStyle) && isUndef(data.style) &&
- isUndef(oldData.staticStyle) && isUndef(oldData.style)
- ) {
- return
- }
-
- var cur, name;
- var el = vnode.elm;
- var oldStaticStyle = oldData.staticStyle;
- var oldStyleBinding = oldData.normalizedStyle || oldData.style || {};
-
- // if static style exists, stylebinding already merged into it when doing normalizeStyleData
- var oldStyle = oldStaticStyle || oldStyleBinding;
-
- var style = normalizeStyleBinding(vnode.data.style) || {};
-
- // store normalized style under a different key for next diff
- // make sure to clone it if it's reactive, since the user likely wants
- // to mutate it.
- vnode.data.normalizedStyle = isDef(style.__ob__)
- ? extend({}, style)
- : style;
-
- var newStyle = getStyle(vnode, true);
-
- for (name in oldStyle) {
- if (isUndef(newStyle[name])) {
- setProp(el, name, '');
- }
- }
- for (name in newStyle) {
- cur = newStyle[name];
- if (cur !== oldStyle[name]) {
- // ie9 setting to null has no effect, must use empty string
- setProp(el, name, cur == null ? '' : cur);
- }
- }
-}
-
-var style = {
- create: updateStyle,
- update: updateStyle
-};
-
-/* */
-
-/**
- * Add class with compatibility for SVG since classList is not supported on
- * SVG elements in IE
- */
-function addClass (el, cls) {
- /* istanbul ignore if */
- if (!cls || !(cls = cls.trim())) {
- return
- }
-
- /* istanbul ignore else */
- if (el.classList) {
- if (cls.indexOf(' ') > -1) {
- cls.split(/\s+/).forEach(function (c) { return el.classList.add(c); });
- } else {
- el.classList.add(cls);
- }
- } else {
- var cur = " " + (el.getAttribute('class') || '') + " ";
- if (cur.indexOf(' ' + cls + ' ') < 0) {
- el.setAttribute('class', (cur + cls).trim());
- }
- }
-}
-
-/**
- * Remove class with compatibility for SVG since classList is not supported on
- * SVG elements in IE
- */
-function removeClass (el, cls) {
- /* istanbul ignore if */
- if (!cls || !(cls = cls.trim())) {
- return
- }
-
- /* istanbul ignore else */
- if (el.classList) {
- if (cls.indexOf(' ') > -1) {
- cls.split(/\s+/).forEach(function (c) { return el.classList.remove(c); });
- } else {
- el.classList.remove(cls);
- }
- if (!el.classList.length) {
- el.removeAttribute('class');
- }
- } else {
- var cur = " " + (el.getAttribute('class') || '') + " ";
- var tar = ' ' + cls + ' ';
- while (cur.indexOf(tar) >= 0) {
- cur = cur.replace(tar, ' ');
- }
- cur = cur.trim();
- if (cur) {
- el.setAttribute('class', cur);
- } else {
- el.removeAttribute('class');
- }
- }
-}
-
-/* */
-
-function resolveTransition (def) {
- if (!def) {
- return
- }
- /* istanbul ignore else */
- if (typeof def === 'object') {
- var res = {};
- if (def.css !== false) {
- extend(res, autoCssTransition(def.name || 'v'));
- }
- extend(res, def);
- return res
- } else if (typeof def === 'string') {
- return autoCssTransition(def)
- }
-}
-
-var autoCssTransition = cached(function (name) {
- return {
- enterClass: (name + "-enter"),
- enterToClass: (name + "-enter-to"),
- enterActiveClass: (name + "-enter-active"),
- leaveClass: (name + "-leave"),
- leaveToClass: (name + "-leave-to"),
- leaveActiveClass: (name + "-leave-active")
- }
-});
-
-var hasTransition = inBrowser && !isIE9;
-var TRANSITION = 'transition';
-var ANIMATION = 'animation';
-
-// Transition property/event sniffing
-var transitionProp = 'transition';
-var transitionEndEvent = 'transitionend';
-var animationProp = 'animation';
-var animationEndEvent = 'animationend';
-if (hasTransition) {
- /* istanbul ignore if */
- if (window.ontransitionend === undefined &&
- window.onwebkittransitionend !== undefined
- ) {
- transitionProp = 'WebkitTransition';
- transitionEndEvent = 'webkitTransitionEnd';
- }
- if (window.onanimationend === undefined &&
- window.onwebkitanimationend !== undefined
- ) {
- animationProp = 'WebkitAnimation';
- animationEndEvent = 'webkitAnimationEnd';
- }
-}
-
-// binding to window is necessary to make hot reload work in IE in strict mode
-var raf = inBrowser
- ? window.requestAnimationFrame
- ? window.requestAnimationFrame.bind(window)
- : setTimeout
- : /* istanbul ignore next */ function (fn) { return fn(); };
-
-function nextFrame (fn) {
- raf(function () {
- raf(fn);
- });
-}
-
-function addTransitionClass (el, cls) {
- var transitionClasses = el._transitionClasses || (el._transitionClasses = []);
- if (transitionClasses.indexOf(cls) < 0) {
- transitionClasses.push(cls);
- addClass(el, cls);
- }
-}
-
-function removeTransitionClass (el, cls) {
- if (el._transitionClasses) {
- remove(el._transitionClasses, cls);
- }
- removeClass(el, cls);
-}
-
-function whenTransitionEnds (
- el,
- expectedType,
- cb
-) {
- var ref = getTransitionInfo(el, expectedType);
- var type = ref.type;
- var timeout = ref.timeout;
- var propCount = ref.propCount;
- if (!type) { return cb() }
- var event = type === TRANSITION ? transitionEndEvent : animationEndEvent;
- var ended = 0;
- var end = function () {
- el.removeEventListener(event, onEnd);
- cb();
- };
- var onEnd = function (e) {
- if (e.target === el) {
- if (++ended >= propCount) {
- end();
- }
- }
- };
- setTimeout(function () {
- if (ended < propCount) {
- end();
- }
- }, timeout + 1);
- el.addEventListener(event, onEnd);
-}
-
-var transformRE = /\b(transform|all)(,|$)/;
-
-function getTransitionInfo (el, expectedType) {
- var styles = window.getComputedStyle(el);
- var transitionDelays = styles[transitionProp + 'Delay'].split(', ');
- var transitionDurations = styles[transitionProp + 'Duration'].split(', ');
- var transitionTimeout = getTimeout(transitionDelays, transitionDurations);
- var animationDelays = styles[animationProp + 'Delay'].split(', ');
- var animationDurations = styles[animationProp + 'Duration'].split(', ');
- var animationTimeout = getTimeout(animationDelays, animationDurations);
-
- var type;
- var timeout = 0;
- var propCount = 0;
- /* istanbul ignore if */
- if (expectedType === TRANSITION) {
- if (transitionTimeout > 0) {
- type = TRANSITION;
- timeout = transitionTimeout;
- propCount = transitionDurations.length;
- }
- } else if (expectedType === ANIMATION) {
- if (animationTimeout > 0) {
- type = ANIMATION;
- timeout = animationTimeout;
- propCount = animationDurations.length;
- }
- } else {
- timeout = Math.max(transitionTimeout, animationTimeout);
- type = timeout > 0
- ? transitionTimeout > animationTimeout
- ? TRANSITION
- : ANIMATION
- : null;
- propCount = type
- ? type === TRANSITION
- ? transitionDurations.length
- : animationDurations.length
- : 0;
- }
- var hasTransform =
- type === TRANSITION &&
- transformRE.test(styles[transitionProp + 'Property']);
- return {
- type: type,
- timeout: timeout,
- propCount: propCount,
- hasTransform: hasTransform
- }
-}
-
-function getTimeout (delays, durations) {
- /* istanbul ignore next */
- while (delays.length < durations.length) {
- delays = delays.concat(delays);
- }
-
- return Math.max.apply(null, durations.map(function (d, i) {
- return toMs(d) + toMs(delays[i])
- }))
-}
-
-function toMs (s) {
- return Number(s.slice(0, -1)) * 1000
-}
-
-/* */
-
-function enter (vnode, toggleDisplay) {
- var el = vnode.elm;
-
- // call leave callback now
- if (isDef(el._leaveCb)) {
- el._leaveCb.cancelled = true;
- el._leaveCb();
- }
-
- var data = resolveTransition(vnode.data.transition);
- if (isUndef(data)) {
- return
- }
-
- /* istanbul ignore if */
- if (isDef(el._enterCb) || el.nodeType !== 1) {
- return
- }
-
- var css = data.css;
- var type = data.type;
- var enterClass = data.enterClass;
- var enterToClass = data.enterToClass;
- var enterActiveClass = data.enterActiveClass;
- var appearClass = data.appearClass;
- var appearToClass = data.appearToClass;
- var appearActiveClass = data.appearActiveClass;
- var beforeEnter = data.beforeEnter;
- var enter = data.enter;
- var afterEnter = data.afterEnter;
- var enterCancelled = data.enterCancelled;
- var beforeAppear = data.beforeAppear;
- var appear = data.appear;
- var afterAppear = data.afterAppear;
- var appearCancelled = data.appearCancelled;
- var duration = data.duration;
-
- // activeInstance will always be the <transition> component managing this
- // transition. One edge case to check is when the <transition> is placed
- // as the root node of a child component. In that case we need to check
- // <transition>'s parent for appear check.
- var context = activeInstance;
- var transitionNode = activeInstance.$vnode;
- while (transitionNode && transitionNode.parent) {
- transitionNode = transitionNode.parent;
- context = transitionNode.context;
- }
-
- var isAppear = !context._isMounted || !vnode.isRootInsert;
-
- if (isAppear && !appear && appear !== '') {
- return
- }
-
- var startClass = isAppear && appearClass
- ? appearClass
- : enterClass;
- var activeClass = isAppear && appearActiveClass
- ? appearActiveClass
- : enterActiveClass;
- var toClass = isAppear && appearToClass
- ? appearToClass
- : enterToClass;
-
- var beforeEnterHook = isAppear
- ? (beforeAppear || beforeEnter)
- : beforeEnter;
- var enterHook = isAppear
- ? (typeof appear === 'function' ? appear : enter)
- : enter;
- var afterEnterHook = isAppear
- ? (afterAppear || afterEnter)
- : afterEnter;
- var enterCancelledHook = isAppear
- ? (appearCancelled || enterCancelled)
- : enterCancelled;
-
- var explicitEnterDuration = toNumber(
- isObject(duration)
- ? duration.enter
- : duration
- );
-
- if (process.env.NODE_ENV !== 'production' && explicitEnterDuration != null) {
- checkDuration(explicitEnterDuration, 'enter', vnode);
- }
-
- var expectsCSS = css !== false && !isIE9;
- var userWantsControl = getHookArgumentsLength(enterHook);
-
- var cb = el._enterCb = once(function () {
- if (expectsCSS) {
- removeTransitionClass(el, toClass);
- removeTransitionClass(el, activeClass);
- }
- if (cb.cancelled) {
- if (expectsCSS) {
- removeTransitionClass(el, startClass);
- }
- enterCancelledHook && enterCancelledHook(el);
- } else {
- afterEnterHook && afterEnterHook(el);
- }
- el._enterCb = null;
- });
-
- if (!vnode.data.show) {
- // remove pending leave element on enter by injecting an insert hook
- mergeVNodeHook(vnode, 'insert', function () {
- var parent = el.parentNode;
- var pendingNode = parent && parent._pending && parent._pending[vnode.key];
- if (pendingNode &&
- pendingNode.tag === vnode.tag &&
- pendingNode.elm._leaveCb
- ) {
- pendingNode.elm._leaveCb();
- }
- enterHook && enterHook(el, cb);
- });
- }
-
- // start enter transition
- beforeEnterHook && beforeEnterHook(el);
- if (expectsCSS) {
- addTransitionClass(el, startClass);
- addTransitionClass(el, activeClass);
- nextFrame(function () {
- addTransitionClass(el, toClass);
- removeTransitionClass(el, startClass);
- if (!cb.cancelled && !userWantsControl) {
- if (isValidDuration(explicitEnterDuration)) {
- setTimeout(cb, explicitEnterDuration);
- } else {
- whenTransitionEnds(el, type, cb);
- }
- }
- });
- }
-
- if (vnode.data.show) {
- toggleDisplay && toggleDisplay();
- enterHook && enterHook(el, cb);
- }
-
- if (!expectsCSS && !userWantsControl) {
- cb();
- }
-}
-
-function leave (vnode, rm) {
- var el = vnode.elm;
-
- // call enter callback now
- if (isDef(el._enterCb)) {
- el._enterCb.cancelled = true;
- el._enterCb();
- }
-
- var data = resolveTransition(vnode.data.transition);
- if (isUndef(data) || el.nodeType !== 1) {
- return rm()
- }
-
- /* istanbul ignore if */
- if (isDef(el._leaveCb)) {
- return
- }
-
- var css = data.css;
- var type = data.type;
- var leaveClass = data.leaveClass;
- var leaveToClass = data.leaveToClass;
- var leaveActiveClass = data.leaveActiveClass;
- var beforeLeave = data.beforeLeave;
- var leave = data.leave;
- var afterLeave = data.afterLeave;
- var leaveCancelled = data.leaveCancelled;
- var delayLeave = data.delayLeave;
- var duration = data.duration;
-
- var expectsCSS = css !== false && !isIE9;
- var userWantsControl = getHookArgumentsLength(leave);
-
- var explicitLeaveDuration = toNumber(
- isObject(duration)
- ? duration.leave
- : duration
- );
-
- if (process.env.NODE_ENV !== 'production' && isDef(explicitLeaveDuration)) {
- checkDuration(explicitLeaveDuration, 'leave', vnode);
- }
-
- var cb = el._leaveCb = once(function () {
- if (el.parentNode && el.parentNode._pending) {
- el.parentNode._pending[vnode.key] = null;
- }
- if (expectsCSS) {
- removeTransitionClass(el, leaveToClass);
- removeTransitionClass(el, leaveActiveClass);
- }
- if (cb.cancelled) {
- if (expectsCSS) {
- removeTransitionClass(el, leaveClass);
- }
- leaveCancelled && leaveCancelled(el);
- } else {
- rm();
- afterLeave && afterLeave(el);
- }
- el._leaveCb = null;
- });
-
- if (delayLeave) {
- delayLeave(performLeave);
- } else {
- performLeave();
- }
-
- function performLeave () {
- // the delayed leave may have already been cancelled
- if (cb.cancelled) {
- return
- }
- // record leaving element
- if (!vnode.data.show) {
- (el.parentNode._pending || (el.parentNode._pending = {}))[(vnode.key)] = vnode;
- }
- beforeLeave && beforeLeave(el);
- if (expectsCSS) {
- addTransitionClass(el, leaveClass);
- addTransitionClass(el, leaveActiveClass);
- nextFrame(function () {
- addTransitionClass(el, leaveToClass);
- removeTransitionClass(el, leaveClass);
- if (!cb.cancelled && !userWantsControl) {
- if (isValidDuration(explicitLeaveDuration)) {
- setTimeout(cb, explicitLeaveDuration);
- } else {
- whenTransitionEnds(el, type, cb);
- }
- }
- });
- }
- leave && leave(el, cb);
- if (!expectsCSS && !userWantsControl) {
- cb();
- }
- }
-}
-
-// only used in dev mode
-function checkDuration (val, name, vnode) {
- if (typeof val !== 'number') {
- warn(
- "<transition> explicit " + name + " duration is not a valid number - " +
- "got " + (JSON.stringify(val)) + ".",
- vnode.context
- );
- } else if (isNaN(val)) {
- warn(
- "<transition> explicit " + name + " duration is NaN - " +
- 'the duration expression might be incorrect.',
- vnode.context
- );
- }
-}
-
-function isValidDuration (val) {
- return typeof val === 'number' && !isNaN(val)
-}
-
-/**
- * Normalize a transition hook's argument length. The hook may be:
- * - a merged hook (invoker) with the original in .fns
- * - a wrapped component method (check ._length)
- * - a plain function (.length)
- */
-function getHookArgumentsLength (fn) {
- if (isUndef(fn)) {
- return false
- }
- var invokerFns = fn.fns;
- if (isDef(invokerFns)) {
- // invoker
- return getHookArgumentsLength(
- Array.isArray(invokerFns)
- ? invokerFns[0]
- : invokerFns
- )
- } else {
- return (fn._length || fn.length) > 1
- }
-}
-
-function _enter (_, vnode) {
- if (vnode.data.show !== true) {
- enter(vnode);
- }
-}
-
-var transition = inBrowser ? {
- create: _enter,
- activate: _enter,
- remove: function remove$$1 (vnode, rm) {
- /* istanbul ignore else */
- if (vnode.data.show !== true) {
- leave(vnode, rm);
- } else {
- rm();
- }
- }
-} : {};
-
-var platformModules = [
- attrs,
- klass,
- events,
- domProps,
- style,
- transition
-];
-
-/* */
-
-// the directive module should be applied last, after all
-// built-in modules have been applied.
-var modules = platformModules.concat(baseModules);
-
-var patch = createPatchFunction({ nodeOps: nodeOps, modules: modules });
-
-/**
- * Not type checking this file because flow doesn't like attaching
- * properties to Elements.
- */
-
-/* istanbul ignore if */
-if (isIE9) {
- // http://www.matts411.com/post/internet-explorer-9-oninput/
- document.addEventListener('selectionchange', function () {
- var el = document.activeElement;
- if (el && el.vmodel) {
- trigger(el, 'input');
- }
- });
-}
-
-var directive = {
- inserted: function inserted (el, binding, vnode, oldVnode) {
- if (vnode.tag === 'select') {
- // #6903
- if (oldVnode.elm && !oldVnode.elm._vOptions) {
- mergeVNodeHook(vnode, 'postpatch', function () {
- directive.componentUpdated(el, binding, vnode);
- });
- } else {
- setSelected(el, binding, vnode.context);
- }
- el._vOptions = [].map.call(el.options, getValue);
- } else if (vnode.tag === 'textarea' || isTextInputType(el.type)) {
- el._vModifiers = binding.modifiers;
- if (!binding.modifiers.lazy) {
- // Safari < 10.2 & UIWebView doesn't fire compositionend when
- // switching focus before confirming composition choice
- // this also fixes the issue where some browsers e.g. iOS Chrome
- // fires "change" instead of "input" on autocomplete.
- el.addEventListener('change', onCompositionEnd);
- if (!isAndroid) {
- el.addEventListener('compositionstart', onCompositionStart);
- el.addEventListener('compositionend', onCompositionEnd);
- }
- /* istanbul ignore if */
- if (isIE9) {
- el.vmodel = true;
- }
- }
- }
- },
-
- componentUpdated: function componentUpdated (el, binding, vnode) {
- if (vnode.tag === 'select') {
- setSelected(el, binding, vnode.context);
- // in case the options rendered by v-for have changed,
- // it's possible that the value is out-of-sync with the rendered options.
- // detect such cases and filter out values that no longer has a matching
- // option in the DOM.
- var prevOptions = el._vOptions;
- var curOptions = el._vOptions = [].map.call(el.options, getValue);
- if (curOptions.some(function (o, i) { return !looseEqual(o, prevOptions[i]); })) {
- // trigger change event if
- // no matching option found for at least one value
- var needReset = el.multiple
- ? binding.value.some(function (v) { return hasNoMatchingOption(v, curOptions); })
- : binding.value !== binding.oldValue && hasNoMatchingOption(binding.value, curOptions);
- if (needReset) {
- trigger(el, 'change');
- }
- }
- }
- }
-};
-
-function setSelected (el, binding, vm) {
- actuallySetSelected(el, binding, vm);
- /* istanbul ignore if */
- if (isIE || isEdge) {
- setTimeout(function () {
- actuallySetSelected(el, binding, vm);
- }, 0);
- }
-}
-
-function actuallySetSelected (el, binding, vm) {
- var value = binding.value;
- var isMultiple = el.multiple;
- if (isMultiple && !Array.isArray(value)) {
- process.env.NODE_ENV !== 'production' && warn(
- "<select multiple v-model=\"" + (binding.expression) + "\"> " +
- "expects an Array value for its binding, but got " + (Object.prototype.toString.call(value).slice(8, -1)),
- vm
- );
- return
- }
- var selected, option;
- for (var i = 0, l = el.options.length; i < l; i++) {
- option = el.options[i];
- if (isMultiple) {
- selected = looseIndexOf(value, getValue(option)) > -1;
- if (option.selected !== selected) {
- option.selected = selected;
- }
- } else {
- if (looseEqual(getValue(option), value)) {
- if (el.selectedIndex !== i) {
- el.selectedIndex = i;
- }
- return
- }
- }
- }
- if (!isMultiple) {
- el.selectedIndex = -1;
- }
-}
-
-function hasNoMatchingOption (value, options) {
- return options.every(function (o) { return !looseEqual(o, value); })
-}
-
-function getValue (option) {
- return '_value' in option
- ? option._value
- : option.value
-}
-
-function onCompositionStart (e) {
- e.target.composing = true;
-}
-
-function onCompositionEnd (e) {
- // prevent triggering an input event for no reason
- if (!e.target.composing) { return }
- e.target.composing = false;
- trigger(e.target, 'input');
-}
-
-function trigger (el, type) {
- var e = document.createEvent('HTMLEvents');
- e.initEvent(type, true, true);
- el.dispatchEvent(e);
-}
-
-/* */
-
-// recursively search for possible transition defined inside the component root
-function locateNode (vnode) {
- return vnode.componentInstance && (!vnode.data || !vnode.data.transition)
- ? locateNode(vnode.componentInstance._vnode)
- : vnode
-}
-
-var show = {
- bind: function bind (el, ref, vnode) {
- var value = ref.value;
-
- vnode = locateNode(vnode);
- var transition$$1 = vnode.data && vnode.data.transition;
- var originalDisplay = el.__vOriginalDisplay =
- el.style.display === 'none' ? '' : el.style.display;
- if (value && transition$$1) {
- vnode.data.show = true;
- enter(vnode, function () {
- el.style.display = originalDisplay;
- });
- } else {
- el.style.display = value ? originalDisplay : 'none';
- }
- },
-
- update: function update (el, ref, vnode) {
- var value = ref.value;
- var oldValue = ref.oldValue;
-
- /* istanbul ignore if */
- if (value === oldValue) { return }
- vnode = locateNode(vnode);
- var transition$$1 = vnode.data && vnode.data.transition;
- if (transition$$1) {
- vnode.data.show = true;
- if (value) {
- enter(vnode, function () {
- el.style.display = el.__vOriginalDisplay;
- });
- } else {
- leave(vnode, function () {
- el.style.display = 'none';
- });
- }
- } else {
- el.style.display = value ? el.__vOriginalDisplay : 'none';
- }
- },
-
- unbind: function unbind (
- el,
- binding,
- vnode,
- oldVnode,
- isDestroy
- ) {
- if (!isDestroy) {
- el.style.display = el.__vOriginalDisplay;
- }
- }
-};
-
-var platformDirectives = {
- model: directive,
- show: show
-};
-
-/* */
-
-// Provides transition support for a single element/component.
-// supports transition mode (out-in / in-out)
-
-var transitionProps = {
- name: String,
- appear: Boolean,
- css: Boolean,
- mode: String,
- type: String,
- enterClass: String,
- leaveClass: String,
- enterToClass: String,
- leaveToClass: String,
- enterActiveClass: String,
- leaveActiveClass: String,
- appearClass: String,
- appearActiveClass: String,
- appearToClass: String,
- duration: [Number, String, Object]
-};
-
-// in case the child is also an abstract component, e.g. <keep-alive>
-// we want to recursively retrieve the real component to be rendered
-function getRealChild (vnode) {
- var compOptions = vnode && vnode.componentOptions;
- if (compOptions && compOptions.Ctor.options.abstract) {
- return getRealChild(getFirstComponentChild(compOptions.children))
- } else {
- return vnode
- }
-}
-
-function extractTransitionData (comp) {
- var data = {};
- var options = comp.$options;
- // props
- for (var key in options.propsData) {
- data[key] = comp[key];
- }
- // events.
- // extract listeners and pass them directly to the transition methods
- var listeners = options._parentListeners;
- for (var key$1 in listeners) {
- data[camelize(key$1)] = listeners[key$1];
- }
- return data
-}
-
-function placeholder (h, rawChild) {
- if (/\d-keep-alive$/.test(rawChild.tag)) {
- return h('keep-alive', {
- props: rawChild.componentOptions.propsData
- })
- }
-}
-
-function hasParentTransition (vnode) {
- while ((vnode = vnode.parent)) {
- if (vnode.data.transition) {
- return true
- }
- }
-}
-
-function isSameChild (child, oldChild) {
- return oldChild.key === child.key && oldChild.tag === child.tag
-}
-
-var Transition = {
- name: 'transition',
- props: transitionProps,
- abstract: true,
-
- render: function render (h) {
- var this$1 = this;
-
- var children = this.$slots.default;
- if (!children) {
- return
- }
-
- // filter out text nodes (possible whitespaces)
- children = children.filter(function (c) { return c.tag || isAsyncPlaceholder(c); });
- /* istanbul ignore if */
- if (!children.length) {
- return
- }
-
- // warn multiple elements
- if (process.env.NODE_ENV !== 'production' && children.length > 1) {
- warn(
- '<transition> can only be used on a single element. Use ' +
- '<transition-group> for lists.',
- this.$parent
- );
- }
-
- var mode = this.mode;
-
- // warn invalid mode
- if (process.env.NODE_ENV !== 'production' &&
- mode && mode !== 'in-out' && mode !== 'out-in'
- ) {
- warn(
- 'invalid <transition> mode: ' + mode,
- this.$parent
- );
- }
-
- var rawChild = children[0];
-
- // if this is a component root node and the component's
- // parent container node also has transition, skip.
- if (hasParentTransition(this.$vnode)) {
- return rawChild
- }
-
- // apply transition data to child
- // use getRealChild() to ignore abstract components e.g. keep-alive
- var child = getRealChild(rawChild);
- /* istanbul ignore if */
- if (!child) {
- return rawChild
- }
-
- if (this._leaving) {
- return placeholder(h, rawChild)
- }
-
- // ensure a key that is unique to the vnode type and to this transition
- // component instance. This key will be used to remove pending leaving nodes
- // during entering.
- var id = "__transition-" + (this._uid) + "-";
- child.key = child.key == null
- ? child.isComment
- ? id + 'comment'
- : id + child.tag
- : isPrimitive(child.key)
- ? (String(child.key).indexOf(id) === 0 ? child.key : id + child.key)
- : child.key;
-
- var data = (child.data || (child.data = {})).transition = extractTransitionData(this);
- var oldRawChild = this._vnode;
- var oldChild = getRealChild(oldRawChild);
-
- // mark v-show
- // so that the transition module can hand over the control to the directive
- if (child.data.directives && child.data.directives.some(function (d) { return d.name === 'show'; })) {
- child.data.show = true;
- }
-
- if (
- oldChild &&
- oldChild.data &&
- !isSameChild(child, oldChild) &&
- !isAsyncPlaceholder(oldChild) &&
- // #6687 component root is a comment node
- !(oldChild.componentInstance && oldChild.componentInstance._vnode.isComment)
- ) {
- // replace old child transition data with fresh one
- // important for dynamic transitions!
- var oldData = oldChild.data.transition = extend({}, data);
- // handle transition mode
- if (mode === 'out-in') {
- // return placeholder node and queue update when leave finishes
- this._leaving = true;
- mergeVNodeHook(oldData, 'afterLeave', function () {
- this$1._leaving = false;
- this$1.$forceUpdate();
- });
- return placeholder(h, rawChild)
- } else if (mode === 'in-out') {
- if (isAsyncPlaceholder(child)) {
- return oldRawChild
- }
- var delayedLeave;
- var performLeave = function () { delayedLeave(); };
- mergeVNodeHook(data, 'afterEnter', performLeave);
- mergeVNodeHook(data, 'enterCancelled', performLeave);
- mergeVNodeHook(oldData, 'delayLeave', function (leave) { delayedLeave = leave; });
- }
- }
-
- return rawChild
- }
-};
-
-/* */
-
-// Provides transition support for list items.
-// supports move transitions using the FLIP technique.
-
-// Because the vdom's children update algorithm is "unstable" - i.e.
-// it doesn't guarantee the relative positioning of removed elements,
-// we force transition-group to update its children into two passes:
-// in the first pass, we remove all nodes that need to be removed,
-// triggering their leaving transition; in the second pass, we insert/move
-// into the final desired state. This way in the second pass removed
-// nodes will remain where they should be.
-
-var props = extend({
- tag: String,
- moveClass: String
-}, transitionProps);
-
-delete props.mode;
-
-var TransitionGroup = {
- props: props,
-
- render: function render (h) {
- var tag = this.tag || this.$vnode.data.tag || 'span';
- var map = Object.create(null);
- var prevChildren = this.prevChildren = this.children;
- var rawChildren = this.$slots.default || [];
- var children = this.children = [];
- var transitionData = extractTransitionData(this);
-
- for (var i = 0; i < rawChildren.length; i++) {
- var c = rawChildren[i];
- if (c.tag) {
- if (c.key != null && String(c.key).indexOf('__vlist') !== 0) {
- children.push(c);
- map[c.key] = c
- ;(c.data || (c.data = {})).transition = transitionData;
- } else if (process.env.NODE_ENV !== 'production') {
- var opts = c.componentOptions;
- var name = opts ? (opts.Ctor.options.name || opts.tag || '') : c.tag;
- warn(("<transition-group> children must be keyed: <" + name + ">"));
- }
- }
- }
-
- if (prevChildren) {
- var kept = [];
- var removed = [];
- for (var i$1 = 0; i$1 < prevChildren.length; i$1++) {
- var c$1 = prevChildren[i$1];
- c$1.data.transition = transitionData;
- c$1.data.pos = c$1.elm.getBoundingClientRect();
- if (map[c$1.key]) {
- kept.push(c$1);
- } else {
- removed.push(c$1);
- }
- }
- this.kept = h(tag, null, kept);
- this.removed = removed;
- }
-
- return h(tag, null, children)
- },
-
- beforeUpdate: function beforeUpdate () {
- // force removing pass
- this.__patch__(
- this._vnode,
- this.kept,
- false, // hydrating
- true // removeOnly (!important avoids unnecessary moves)
- );
- this._vnode = this.kept;
- },
-
- updated: function updated () {
- var children = this.prevChildren;
- var moveClass = this.moveClass || ((this.name || 'v') + '-move');
- if (!children.length || !this.hasMove(children[0].elm, moveClass)) {
- return
- }
-
- // we divide the work into three loops to avoid mixing DOM reads and writes
- // in each iteration - which helps prevent layout thrashing.
- children.forEach(callPendingCbs);
- children.forEach(recordPosition);
- children.forEach(applyTranslation);
-
- // force reflow to put everything in position
- // assign to this to avoid being removed in tree-shaking
- // $flow-disable-line
- this._reflow = document.body.offsetHeight;
-
- children.forEach(function (c) {
- if (c.data.moved) {
- var el = c.elm;
- var s = el.style;
- addTransitionClass(el, moveClass);
- s.transform = s.WebkitTransform = s.transitionDuration = '';
- el.addEventListener(transitionEndEvent, el._moveCb = function cb (e) {
- if (!e || /transform$/.test(e.propertyName)) {
- el.removeEventListener(transitionEndEvent, cb);
- el._moveCb = null;
- removeTransitionClass(el, moveClass);
- }
- });
- }
- });
- },
-
- methods: {
- hasMove: function hasMove (el, moveClass) {
- /* istanbul ignore if */
- if (!hasTransition) {
- return false
- }
- /* istanbul ignore if */
- if (this._hasMove) {
- return this._hasMove
- }
- // Detect whether an element with the move class applied has
- // CSS transitions. Since the element may be inside an entering
- // transition at this very moment, we make a clone of it and remove
- // all other transition classes applied to ensure only the move class
- // is applied.
- var clone = el.cloneNode();
- if (el._transitionClasses) {
- el._transitionClasses.forEach(function (cls) { removeClass(clone, cls); });
- }
- addClass(clone, moveClass);
- clone.style.display = 'none';
- this.$el.appendChild(clone);
- var info = getTransitionInfo(clone);
- this.$el.removeChild(clone);
- return (this._hasMove = info.hasTransform)
- }
- }
-};
-
-function callPendingCbs (c) {
- /* istanbul ignore if */
- if (c.elm._moveCb) {
- c.elm._moveCb();
- }
- /* istanbul ignore if */
- if (c.elm._enterCb) {
- c.elm._enterCb();
- }
-}
-
-function recordPosition (c) {
- c.data.newPos = c.elm.getBoundingClientRect();
-}
-
-function applyTranslation (c) {
- var oldPos = c.data.pos;
- var newPos = c.data.newPos;
- var dx = oldPos.left - newPos.left;
- var dy = oldPos.top - newPos.top;
- if (dx || dy) {
- c.data.moved = true;
- var s = c.elm.style;
- s.transform = s.WebkitTransform = "translate(" + dx + "px," + dy + "px)";
- s.transitionDuration = '0s';
- }
-}
-
-var platformComponents = {
- Transition: Transition,
- TransitionGroup: TransitionGroup
-};
-
-/* */
-
-// install platform specific utils
-Vue$3.config.mustUseProp = mustUseProp;
-Vue$3.config.isReservedTag = isReservedTag;
-Vue$3.config.isReservedAttr = isReservedAttr;
-Vue$3.config.getTagNamespace = getTagNamespace;
-Vue$3.config.isUnknownElement = isUnknownElement;
-
-// install platform runtime directives & components
-extend(Vue$3.options.directives, platformDirectives);
-extend(Vue$3.options.components, platformComponents);
-
-// install platform patch function
-Vue$3.prototype.__patch__ = inBrowser ? patch : noop;
-
-// public mount method
-Vue$3.prototype.$mount = function (
- el,
- hydrating
-) {
- el = el && inBrowser ? query(el) : undefined;
- return mountComponent(this, el, hydrating)
-};
-
-// devtools global hook
-/* istanbul ignore next */
-Vue$3.nextTick(function () {
- if (config.devtools) {
- if (devtools) {
- devtools.emit('init', Vue$3);
- } else if (process.env.NODE_ENV !== 'production' && isChrome) {
- console[console.info ? 'info' : 'log'](
- 'Download the Vue Devtools extension for a better development experience:\n' +
- 'https://github.com/vuejs/vue-devtools'
- );
- }
- }
- if (process.env.NODE_ENV !== 'production' &&
- config.productionTip !== false &&
- inBrowser && typeof console !== 'undefined'
- ) {
- console[console.info ? 'info' : 'log'](
- "You are running Vue in development mode.\n" +
- "Make sure to turn on production mode when deploying for production.\n" +
- "See more tips at https://vuejs.org/guide/deployment.html"
- );
- }
-}, 0);
-
-/* */
-
-/* harmony default export */ __webpack_exports__["a"] = (Vue$3);
-
-/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(4), __webpack_require__(3), __webpack_require__(6).setImmediate))
-
-/***/ }),
-/* 3 */
-/***/ (function(module, exports) {
-
-var g;\r
-\r
-// This works in non-strict mode\r
-g = (function() {\r
- return this;\r
-})();\r
-\r
-try {\r
- // This works if eval is allowed (see CSP)\r
- g = g || Function("return this")() || (1,eval)("this");\r
-} catch(e) {\r
- // This works if the window reference is available\r
- if(typeof window === "object")\r
- g = window;\r
-}\r
-\r
-// g can still be undefined, but nothing to do about it...\r
-// We return undefined, instead of nothing here, so it's\r
-// easier to handle this case. if(!global) { ...}\r
-\r
-module.exports = g;\r
-
-
-/***/ }),
-/* 4 */
-/***/ (function(module, exports) {
-
-// shim for using process in browser
-var process = module.exports = {};
-
-// cached from whatever global is present so that test runners that stub it
-// don't break things. But we need to wrap it in a try catch in case it is
-// wrapped in strict mode code which doesn't define any globals. It's inside a
-// function because try/catches deoptimize in certain engines.
-
-var cachedSetTimeout;
-var cachedClearTimeout;
-
-function defaultSetTimout() {
- throw new Error('setTimeout has not been defined');
-}
-function defaultClearTimeout () {
- throw new Error('clearTimeout has not been defined');
-}
-(function () {
- try {
- if (typeof setTimeout === 'function') {
- cachedSetTimeout = setTimeout;
- } else {
- cachedSetTimeout = defaultSetTimout;
- }
- } catch (e) {
- cachedSetTimeout = defaultSetTimout;
- }
- try {
- if (typeof clearTimeout === 'function') {
- cachedClearTimeout = clearTimeout;
- } else {
- cachedClearTimeout = defaultClearTimeout;
- }
- } catch (e) {
- cachedClearTimeout = defaultClearTimeout;
- }
-} ())
-function runTimeout(fun) {
- if (cachedSetTimeout === setTimeout) {
- //normal enviroments in sane situations
- return setTimeout(fun, 0);
- }
- // if setTimeout wasn't available but was latter defined
- if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
- cachedSetTimeout = setTimeout;
- return setTimeout(fun, 0);
- }
- try {
- // when when somebody has screwed with setTimeout but no I.E. maddness
- return cachedSetTimeout(fun, 0);
- } catch(e){
- try {
- // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
- return cachedSetTimeout.call(null, fun, 0);
- } catch(e){
- // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
- return cachedSetTimeout.call(this, fun, 0);
- }
- }
-
-
-}
-function runClearTimeout(marker) {
- if (cachedClearTimeout === clearTimeout) {
- //normal enviroments in sane situations
- return clearTimeout(marker);
- }
- // if clearTimeout wasn't available but was latter defined
- if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
- cachedClearTimeout = clearTimeout;
- return clearTimeout(marker);
- }
- try {
- // when when somebody has screwed with setTimeout but no I.E. maddness
- return cachedClearTimeout(marker);
- } catch (e){
- try {
- // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
- return cachedClearTimeout.call(null, marker);
- } catch (e){
- // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
- // Some versions of I.E. have different rules for clearTimeout vs setTimeout
- return cachedClearTimeout.call(this, marker);
- }
- }
-
-
-
-}
-var queue = [];
-var draining = false;
-var currentQueue;
-var queueIndex = -1;
-
-function cleanUpNextTick() {
- if (!draining || !currentQueue) {
- return;
- }
- draining = false;
- if (currentQueue.length) {
- queue = currentQueue.concat(queue);
- } else {
- queueIndex = -1;
- }
- if (queue.length) {
- drainQueue();
- }
-}
-
-function drainQueue() {
- if (draining) {
- return;
- }
- var timeout = runTimeout(cleanUpNextTick);
- draining = true;
-
- var len = queue.length;
- while(len) {
- currentQueue = queue;
- queue = [];
- while (++queueIndex < len) {
- if (currentQueue) {
- currentQueue[queueIndex].run();
- }
- }
- queueIndex = -1;
- len = queue.length;
- }
- currentQueue = null;
- draining = false;
- runClearTimeout(timeout);
-}
-
-process.nextTick = function (fun) {
- var args = new Array(arguments.length - 1);
- if (arguments.length > 1) {
- for (var i = 1; i < arguments.length; i++) {
- args[i - 1] = arguments[i];
- }
- }
- queue.push(new Item(fun, args));
- if (queue.length === 1 && !draining) {
- runTimeout(drainQueue);
- }
-};
-
-// v8 likes predictible objects
-function Item(fun, array) {
- this.fun = fun;
- this.array = array;
-}
-Item.prototype.run = function () {
- this.fun.apply(null, this.array);
-};
-process.title = 'browser';
-process.browser = true;
-process.env = {};
-process.argv = [];
-process.version = ''; // empty string to avoid regexp issues
-process.versions = {};
-
-function noop() {}
-
-process.on = noop;
-process.addListener = noop;
-process.once = noop;
-process.off = noop;
-process.removeListener = noop;
-process.removeAllListeners = noop;
-process.emit = noop;
-process.prependListener = noop;
-process.prependOnceListener = noop;
-
-process.listeners = function (name) { return [] }
-
-process.binding = function (name) {
- throw new Error('process.binding is not supported');
-};
-
-process.cwd = function () { return '/' };
-process.chdir = function (dir) {
- throw new Error('process.chdir is not supported');
-};
-process.umask = function() { return 0; };
-
-
-/***/ }),
-/* 5 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
-
-// EXTERNAL MODULE: ./node_modules/vue/dist/vue.runtime.esm.js
-var vue_runtime_esm = __webpack_require__(2);
-
-// EXTERNAL MODULE: ./src/util.js
-var util = __webpack_require__(0);
-
-// CONCATENATED MODULE: ./src/url/root.js
-/**
- * Root Prefix Transform.
- */
-
-
-
-/* harmony default export */ var root = (function (options, next) {
-
- var url = next(options);
-
- if (Object(util["m" /* isString */])(options.root) && !/^(https?:)?\//.test(url)) {
- url = Object(util["t" /* trimEnd */])(options.root, '/') + '/' + url;
- }
-
- return url;
-});
-
-// CONCATENATED MODULE: ./src/url/query.js
-/**
- * Query Parameter Transform.
- */
-
-
-
-
-/* harmony default export */ var url_query = (function (options, next) {
-
- var urlParams = Object.keys(Url.options.params), query = {}, url = next(options);
-
- Object(util["d" /* each */])(options.params, function (value, key) {
- if (urlParams.indexOf(key) === -1) {
- query[key] = value;
- }
- });
-
- query = Url.params(query);
-
- if (query) {
- url += (url.indexOf('?') == -1 ? '?' : '&') + query;
- }
-
- return url;
-});
-
-// CONCATENATED MODULE: ./src/lib/url-template.js
-/**
- * URL Template v2.0.6 (https://github.com/bramstein/url-template)
- */
-
-function expand(url, params, variables) {
-
- var tmpl = parse(url), expanded = tmpl.expand(params);
-
- if (variables) {
- variables.push.apply(variables, tmpl.vars);
- }
-
- return expanded;
-}
-
-function parse(template) {
-
- var operators = ['+', '#', '.', '/', ';', '?', '&'], variables = [];
-
- return {
- vars: variables,
- expand: function expand(context) {
- return template.replace(/\{([^{}]+)\}|([^{}]+)/g, function (_, expression, literal) {
- if (expression) {
-
- var operator = null, values = [];
-
- if (operators.indexOf(expression.charAt(0)) !== -1) {
- operator = expression.charAt(0);
- expression = expression.substr(1);
- }
-
- expression.split(/,/g).forEach(function (variable) {
- var tmp = /([^:*]*)(?::(\d+)|(\*))?/.exec(variable);
- values.push.apply(values, getValues(context, operator, tmp[1], tmp[2] || tmp[3]));
- variables.push(tmp[1]);
- });
-
- if (operator && operator !== '+') {
-
- var separator = ',';
-
- if (operator === '?') {
- separator = '&';
- } else if (operator !== '#') {
- separator = operator;
- }
-
- return (values.length !== 0 ? operator : '') + values.join(separator);
- } else {
- return values.join(',');
- }
-
- } else {
- return encodeReserved(literal);
- }
- });
- }
- };
-}
-
-function getValues(context, operator, key, modifier) {
-
- var value = context[key], result = [];
-
- if (isDefined(value) && value !== '') {
- if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {
- value = value.toString();
-
- if (modifier && modifier !== '*') {
- value = value.substring(0, parseInt(modifier, 10));
- }
-
- result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : null));
- } else {
- if (modifier === '*') {
- if (Array.isArray(value)) {
- value.filter(isDefined).forEach(function (value) {
- result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : null));
- });
- } else {
- Object.keys(value).forEach(function (k) {
- if (isDefined(value[k])) {
- result.push(encodeValue(operator, value[k], k));
- }
- });
- }
- } else {
- var tmp = [];
-
- if (Array.isArray(value)) {
- value.filter(isDefined).forEach(function (value) {
- tmp.push(encodeValue(operator, value));
- });
- } else {
- Object.keys(value).forEach(function (k) {
- if (isDefined(value[k])) {
- tmp.push(encodeURIComponent(k));
- tmp.push(encodeValue(operator, value[k].toString()));
- }
- });
- }
-
- if (isKeyOperator(operator)) {
- result.push(encodeURIComponent(key) + '=' + tmp.join(','));
- } else if (tmp.length !== 0) {
- result.push(tmp.join(','));
- }
- }
- }
- } else {
- if (operator === ';') {
- result.push(encodeURIComponent(key));
- } else if (value === '' && (operator === '&' || operator === '?')) {
- result.push(encodeURIComponent(key) + '=');
- } else if (value === '') {
- result.push('');
- }
- }
-
- return result;
-}
-
-function isDefined(value) {
- return value !== undefined && value !== null;
-}
-
-function isKeyOperator(operator) {
- return operator === ';' || operator === '&' || operator === '?';
-}
-
-function encodeValue(operator, value, key) {
-
- value = (operator === '+' || operator === '#') ? encodeReserved(value) : encodeURIComponent(value);
-
- if (key) {
- return encodeURIComponent(key) + '=' + value;
- } else {
- return value;
- }
-}
-
-function encodeReserved(str) {
- return str.split(/(%[0-9A-Fa-f]{2})/g).map(function (part) {
- if (!/%[0-9A-Fa-f]/.test(part)) {
- part = encodeURI(part);
- }
- return part;
- }).join('');
-}
-
-// CONCATENATED MODULE: ./src/url/template.js
-/**
- * URL Template (RFC 6570) Transform.
- */
-
-
-
-/* harmony default export */ var template = (function (options) {
-
- var variables = [], url = expand(options.url, options.params, variables);
-
- variables.forEach(function (key) {
- delete options.params[key];
- });
-
- return url;
-});
-
-// CONCATENATED MODULE: ./src/url/index.js
-/**
- * Service for URL templating.
- */
-
-
-
-
-
-
-function Url(url, params) {
-
- var self = this || {}, options = url, transform;
-
- if (Object(util["m" /* isString */])(url)) {
- options = {url: url, params: params};
- }
-
- options = Object(util["n" /* merge */])({}, Url.options, self.$options, options);
-
- Url.transforms.forEach(function (handler) {
-
- if (Object(util["m" /* isString */])(handler)) {
- handler = Url.transform[handler];
- }
-
- if (Object(util["j" /* isFunction */])(handler)) {
- transform = factory(handler, transform, self.$vm);
- }
-
- });
-
- return transform(options);
-}
-
-/**
- * Url options.
- */
-
-Url.options = {
- url: '',
- root: null,
- params: {}
-};
-
-/**
- * Url transforms.
- */
-
-Url.transform = {template: template, query: url_query, root: root};
-Url.transforms = ['template', 'query', 'root'];
-
-/**
- * Encodes a Url parameter string.
- *
- * @param {Object} obj
- */
-
-Url.params = function (obj) {
-
- var params = [], escape = encodeURIComponent;
-
- params.add = function (key, value) {
-
- if (Object(util["j" /* isFunction */])(value)) {
- value = value();
- }
-
- if (value === null) {
- value = '';
- }
-
- this.push(escape(key) + '=' + escape(value));
- };
-
- serialize(params, obj);
-
- return params.join('&').replace(/%20/g, '+');
-};
-
-/**
- * Parse a URL and return its components.
- *
- * @param {String} url
- */
-
-Url.parse = function (url) {
-
- var el = document.createElement('a');
-
- if (document.documentMode) {
- el.href = url;
- url = el.href;
- }
-
- el.href = url;
-
- return {
- href: el.href,
- protocol: el.protocol ? el.protocol.replace(/:$/, '') : '',
- port: el.port,
- host: el.host,
- hostname: el.hostname,
- pathname: el.pathname.charAt(0) === '/' ? el.pathname : '/' + el.pathname,
- search: el.search ? el.search.replace(/^\?/, '') : '',
- hash: el.hash ? el.hash.replace(/^#/, '') : ''
- };
-};
-
-function factory(handler, next, vm) {
- return function (options) {
- return handler.call(vm, options, next);
- };
-}
-
-function serialize(params, obj, scope) {
-
- var array = Object(util["g" /* isArray */])(obj), plain = Object(util["l" /* isPlainObject */])(obj), hash;
-
- Object(util["d" /* each */])(obj, function (value, key) {
-
- hash = Object(util["k" /* isObject */])(value) || Object(util["g" /* isArray */])(value);
-
- if (scope) {
- key = scope + '[' + (plain || hash ? key : '') + ']';
- }
-
- if (!scope && array) {
- params.add(value.name, value.value);
- } else if (hash) {
- serialize(params, value, key);
- } else {
- params.add(key, value);
- }
- });
-}
-
-// EXTERNAL MODULE: ./src/promise.js + 1 modules
-var promise = __webpack_require__(1);
-
-// CONCATENATED MODULE: ./src/http/client/xdr.js
-/**
- * XDomain client (Internet Explorer).
- */
-
-
-
-/* harmony default export */ var xdr = (function (request) {
- return new promise["a" /* default */](function (resolve) {
-
- var xdr = new XDomainRequest(), handler = function (ref) {
- var type = ref.type;
-
-
- var status = 0;
-
- if (type === 'load') {
- status = 200;
- } else if (type === 'error') {
- status = 500;
- }
-
- resolve(request.respondWith(xdr.responseText, {status: status}));
- };
-
- request.abort = function () { return xdr.abort(); };
-
- xdr.open(request.method, request.getUrl());
-
- if (request.timeout) {
- xdr.timeout = request.timeout;
- }
-
- xdr.onload = handler;
- xdr.onabort = handler;
- xdr.onerror = handler;
- xdr.ontimeout = handler;
- xdr.onprogress = function () {};
- xdr.send(request.getBody());
- });
-});
-
-// CONCATENATED MODULE: ./src/http/interceptor/cors.js
-/**
- * CORS Interceptor.
- */
-
-
-
-
-
-var SUPPORTS_CORS = util["f" /* inBrowser */] && 'withCredentials' in new XMLHttpRequest();
-
-/* harmony default export */ var cors = (function (request) {
-
- if (util["f" /* inBrowser */]) {
-
- var orgUrl = Url.parse(location.href);
- var reqUrl = Url.parse(request.getUrl());
-
- if (reqUrl.protocol !== orgUrl.protocol || reqUrl.host !== orgUrl.host) {
-
- request.crossOrigin = true;
- request.emulateHTTP = false;
-
- if (!SUPPORTS_CORS) {
- request.client = xdr;
- }
- }
- }
-
-});
-
-// CONCATENATED MODULE: ./src/http/interceptor/form.js
-/**
- * Form data Interceptor.
- */
-
-
-
-
-/* harmony default export */ var interceptor_form = (function (request) {
-
- if (Object(util["i" /* isFormData */])(request.body)) {
- request.headers.delete('Content-Type');
- } else if (Object(util["k" /* isObject */])(request.body) && request.emulateJSON) {
- request.body = Url.params(request.body);
- request.headers.set('Content-Type', 'application/x-www-form-urlencoded');
- }
-
-});
-
-// CONCATENATED MODULE: ./src/http/interceptor/json.js
-/**
- * JSON Interceptor.
- */
-
-
-
-/* harmony default export */ var interceptor_json = (function (request) {
-
- var type = request.headers.get('Content-Type') || '';
-
- if (Object(util["k" /* isObject */])(request.body) && type.indexOf('application/json') === 0) {
- request.body = JSON.stringify(request.body);
- }
-
- return function (response) {
-
- return response.bodyText ? Object(util["v" /* when */])(response.text(), function (text) {
-
- var type = response.headers.get('Content-Type') || '';
-
- if (type.indexOf('application/json') === 0 || isJson(text)) {
-
- try {
- response.body = JSON.parse(text);
- } catch (e) {
- response.body = null;
- }
-
- } else {
- response.body = text;
- }
-
- return response;
-
- }) : response;
-
- };
-});
-
-function isJson(str) {
-
- var start = str.match(/^\s*(\[|\{)/);
- var end = {'[': /]\s*$/, '{': /}\s*$/};
-
- return start && end[start[1]].test(str);
-}
-
-// CONCATENATED MODULE: ./src/http/client/jsonp.js
-/**
- * JSONP client (Browser).
- */
-
-
-
-/* harmony default export */ var jsonp = (function (request) {
- return new promise["a" /* default */](function (resolve) {
-
- var name = request.jsonp || 'callback', callback = request.jsonpCallback || '_jsonp' + Math.random().toString(36).substr(2), body = null, handler, script;
-
- handler = function (ref) {
- var type = ref.type;
-
-
- var status = 0;
-
- if (type === 'load' && body !== null) {
- status = 200;
- } else if (type === 'error') {
- status = 500;
- }
-
- if (status && window[callback]) {
- delete window[callback];
- document.body.removeChild(script);
- }
-
- resolve(request.respondWith(body, {status: status}));
- };
-
- window[callback] = function (result) {
- body = JSON.stringify(result);
- };
-
- request.abort = function () {
- handler({type: 'abort'});
- };
-
- request.params[name] = callback;
-
- if (request.timeout) {
- setTimeout(request.abort, request.timeout);
- }
-
- script = document.createElement('script');
- script.src = request.getUrl();
- script.type = 'text/javascript';
- script.async = true;
- script.onload = handler;
- script.onerror = handler;
-
- document.body.appendChild(script);
- });
-});
-
-// CONCATENATED MODULE: ./src/http/interceptor/jsonp.js
-/**
- * JSONP Interceptor.
- */
-
-
-
-/* harmony default export */ var interceptor_jsonp = (function (request) {
-
- if (request.method == 'JSONP') {
- request.client = jsonp;
- }
-
-});
-
-// CONCATENATED MODULE: ./src/http/interceptor/before.js
-/**
- * Before Interceptor.
- */
-
-
-
-/* harmony default export */ var before = (function (request) {
-
- if (Object(util["j" /* isFunction */])(request.before)) {
- request.before.call(this, request);
- }
-
-});
-
-// CONCATENATED MODULE: ./src/http/interceptor/method.js
-/**
- * HTTP method override Interceptor.
- */
-
-/* harmony default export */ var interceptor_method = (function (request) {
-
- if (request.emulateHTTP && /^(PUT|PATCH|DELETE)$/i.test(request.method)) {
- request.headers.set('X-HTTP-Method-Override', request.method);
- request.method = 'POST';
- }
-
-});
-
-// CONCATENATED MODULE: ./src/http/interceptor/header.js
-/**
- * Header Interceptor.
- */
-
-
-
-
-/* harmony default export */ var header = (function (request) {
-
- var headers = Object(util["a" /* assign */])({}, Http.headers.common,
- !request.crossOrigin ? Http.headers.custom : {},
- Http.headers[Object(util["q" /* toLower */])(request.method)]
- );
-
- Object(util["d" /* each */])(headers, function (value, name) {
- if (!request.headers.has(name)) {
- request.headers.set(name, value);
- }
- });
-
-});
-
-// CONCATENATED MODULE: ./src/http/client/xhr.js
-/**
- * XMLHttp client (Browser).
- */
-
-
-
-
-/* harmony default export */ var client_xhr = (function (request) {
- return new promise["a" /* default */](function (resolve) {
-
- var xhr = new XMLHttpRequest(), handler = function (event) {
-
- var response = request.respondWith(
- 'response' in xhr ? xhr.response : xhr.responseText, {
- status: xhr.status === 1223 ? 204 : xhr.status, // IE9 status bug
- statusText: xhr.status === 1223 ? 'No Content' : Object(util["s" /* trim */])(xhr.statusText)
- });
-
- Object(util["d" /* each */])(Object(util["s" /* trim */])(xhr.getAllResponseHeaders()).split('\n'), function (row) {
- response.headers.append(row.slice(0, row.indexOf(':')), row.slice(row.indexOf(':') + 1));
- });
-
- resolve(response);
- };
-
- request.abort = function () { return xhr.abort(); };
-
- xhr.open(request.method, request.getUrl(), true);
-
- if (request.timeout) {
- xhr.timeout = request.timeout;
- }
-
- if (request.responseType && 'responseType' in xhr) {
- xhr.responseType = request.responseType;
- }
-
- if (request.withCredentials || request.credentials) {
- xhr.withCredentials = true;
- }
-
- if (!request.crossOrigin) {
- request.headers.set('X-Requested-With', 'XMLHttpRequest');
- }
-
- // deprecated use downloadProgress
- if (Object(util["j" /* isFunction */])(request.progress) && request.method === 'GET') {
- xhr.addEventListener('progress', request.progress);
- }
-
- if (Object(util["j" /* isFunction */])(request.downloadProgress)) {
- xhr.addEventListener('progress', request.downloadProgress);
- }
-
- // deprecated use uploadProgress
- if (Object(util["j" /* isFunction */])(request.progress) && /^(POST|PUT)$/i.test(request.method)) {
- xhr.upload.addEventListener('progress', request.progress);
- }
-
- if (Object(util["j" /* isFunction */])(request.uploadProgress) && xhr.upload) {
- xhr.upload.addEventListener('progress', request.uploadProgress);
- }
-
- request.headers.forEach(function (value, name) {
- xhr.setRequestHeader(name, value);
- });
-
- xhr.onload = handler;
- xhr.onabort = handler;
- xhr.onerror = handler;
- xhr.ontimeout = handler;
- xhr.send(request.getBody());
- });
-});
-
-// CONCATENATED MODULE: ./src/http/client/node.js
-/**
- * Http client (Node).
- */
-
-
-
-
-/* harmony default export */ var node = (function (request) {
-
- var client = __webpack_require__(8);
-
- return new promise["a" /* default */](function (resolve) {
-
- var url = request.getUrl();
- var body = request.getBody();
- var method = request.method;
- var headers = {}, handler;
-
- request.headers.forEach(function (value, name) {
- headers[name] = value;
- });
-
- client(url, {body: body, method: method, headers: headers}).then(handler = function (resp) {
-
- var response = request.respondWith(resp.body, {
- status: resp.statusCode,
- statusText: Object(util["s" /* trim */])(resp.statusMessage)
- });
-
- Object(util["d" /* each */])(resp.headers, function (value, name) {
- response.headers.set(name, value);
- });
-
- resolve(response);
-
- }, function (error) { return handler(error.response); });
- });
-});
-
-// CONCATENATED MODULE: ./src/http/client/index.js
-/**
- * Base client.
- */
-
-
-
-
-
-
-/* harmony default export */ var http_client = (function (context) {
-
- var reqHandlers = [sendRequest], resHandlers = [];
-
- if (!Object(util["k" /* isObject */])(context)) {
- context = null;
- }
-
- function Client(request) {
- while (reqHandlers.length) {
-
- var handler = reqHandlers.pop();
-
- if (Object(util["j" /* isFunction */])(handler)) {
-
- var response = (void 0), next = (void 0);
-
- response = handler.call(context, request, function (val) { return next = val; }) || next;
-
- if (Object(util["k" /* isObject */])(response)) {
- return new promise["a" /* default */](function (resolve, reject) {
-
- resHandlers.forEach(function (handler) {
- response = Object(util["v" /* when */])(response, function (response) {
- return handler.call(context, response) || response;
- }, reject);
- });
-
- Object(util["v" /* when */])(response, resolve, reject);
-
- }, context);
- }
-
- if (Object(util["j" /* isFunction */])(response)) {
- resHandlers.unshift(response);
- }
-
- } else {
- Object(util["u" /* warn */])(("Invalid interceptor of type " + (typeof handler) + ", must be a function"));
- }
- }
- }
-
- Client.use = function (handler) {
- reqHandlers.push(handler);
- };
-
- return Client;
-});
-
-function sendRequest(request) {
-
- var client = request.client || (util["f" /* inBrowser */] ? client_xhr : node);
-
- return client(request);
-}
-
-// CONCATENATED MODULE: ./src/http/headers.js
-/**
- * HTTP Headers.
- */
-
-
-
-var headers_Headers = function Headers(headers) {
- var this$1 = this;
-
-
- this.map = {};
-
- Object(util["d" /* each */])(headers, function (value, name) { return this$1.append(name, value); });
-};
-
-headers_Headers.prototype.has = function has (name) {
- return getName(this.map, name) !== null;
-};
-
-headers_Headers.prototype.get = function get (name) {
-
- var list = this.map[getName(this.map, name)];
-
- return list ? list.join() : null;
-};
-
-headers_Headers.prototype.getAll = function getAll (name) {
- return this.map[getName(this.map, name)] || [];
-};
-
-headers_Headers.prototype.set = function set (name, value) {
- this.map[normalizeName(getName(this.map, name) || name)] = [Object(util["s" /* trim */])(value)];
-};
-
-headers_Headers.prototype.append = function append (name, value) {
-
- var list = this.map[getName(this.map, name)];
-
- if (list) {
- list.push(Object(util["s" /* trim */])(value));
- } else {
- this.set(name, value);
- }
-};
-
-headers_Headers.prototype.delete = function delete$1 (name) {
- delete this.map[getName(this.map, name)];
-};
-
-headers_Headers.prototype.deleteAll = function deleteAll () {
- this.map = {};
-};
-
-headers_Headers.prototype.forEach = function forEach (callback, thisArg) {
- var this$1 = this;
-
- Object(util["d" /* each */])(this.map, function (list, name) {
- Object(util["d" /* each */])(list, function (value) { return callback.call(thisArg, value, name, this$1); });
- });
-};
-
-/* harmony default export */ var http_headers = (headers_Headers);
-
-function getName(map, name) {
- return Object.keys(map).reduce(function (prev, curr) {
- return Object(util["q" /* toLower */])(name) === Object(util["q" /* toLower */])(curr) ? curr : prev;
- }, null);
-}
-
-function normalizeName(name) {
-
- if (/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(name)) {
- throw new TypeError('Invalid character in header field name');
- }
-
- return Object(util["s" /* trim */])(name);
-}
-
-// CONCATENATED MODULE: ./src/http/response.js
-/**
- * HTTP Response.
- */
-
-
-
-
-
-var response_Response = function Response(body, ref) {
- var url = ref.url;
- var headers = ref.headers;
- var status = ref.status;
- var statusText = ref.statusText;
-
-
- this.url = url;
- this.ok = status >= 200 && status < 300;
- this.status = status || 0;
- this.statusText = statusText || '';
- this.headers = new http_headers(headers);
- this.body = body;
-
- if (Object(util["m" /* isString */])(body)) {
-
- this.bodyText = body;
-
- } else if (Object(util["h" /* isBlob */])(body)) {
-
- this.bodyBlob = body;
-
- if (isBlobText(body)) {
- this.bodyText = blobText(body);
- }
- }
-};
-
-response_Response.prototype.blob = function blob () {
- return Object(util["v" /* when */])(this.bodyBlob);
-};
-
-response_Response.prototype.text = function text () {
- return Object(util["v" /* when */])(this.bodyText);
-};
-
-response_Response.prototype.json = function json () {
- return Object(util["v" /* when */])(this.text(), function (text) { return JSON.parse(text); });
-};
-
-/* harmony default export */ var http_response = (response_Response);
-
-Object.defineProperty(response_Response.prototype, 'data', {
-
- get: function get() {
- return this.body;
- },
-
- set: function set(body) {
- this.body = body;
- }
-
-});
-
-function blobText(body) {
- return new promise["a" /* default */](function (resolve) {
-
- var reader = new FileReader();
-
- reader.readAsText(body);
- reader.onload = function () {
- resolve(reader.result);
- };
-
- });
-}
-
-function isBlobText(body) {
- return body.type.indexOf('text') === 0 || body.type.indexOf('json') !== -1;
-}
-
-// CONCATENATED MODULE: ./src/http/request.js
-/**
- * HTTP Request.
- */
-
-
-
-
-
-
-var request_Request = function Request(options) {
-
- this.body = null;
- this.params = {};
-
- Object(util["a" /* assign */])(this, options, {
- method: Object(util["r" /* toUpper */])(options.method || 'GET')
- });
-
- if (!(this.headers instanceof http_headers)) {
- this.headers = new http_headers(this.headers);
- }
-};
-
-request_Request.prototype.getUrl = function getUrl () {
- return Url(this);
-};
-
-request_Request.prototype.getBody = function getBody () {
- return this.body;
-};
-
-request_Request.prototype.respondWith = function respondWith (body, options) {
- return new http_response(body, Object(util["a" /* assign */])(options || {}, {url: this.getUrl()}));
-};
-
-/* harmony default export */ var http_request = (request_Request);
-
-// CONCATENATED MODULE: ./src/http/index.js
-/**
- * Service for sending network requests.
- */
-
-var COMMON_HEADERS = {'Accept': 'application/json, text/plain, */*'};
-var JSON_CONTENT_TYPE = {'Content-Type': 'application/json;charset=utf-8'};
-
-
-
-
-
-
-
-
-
-
-
-
-
-function Http(options) {
-
- var self = this || {}, client = http_client(self.$vm);
-
- Object(util["c" /* defaults */])(options || {}, self.$options, Http.options);
-
- Http.interceptors.forEach(function (handler) {
-
- if (Object(util["m" /* isString */])(handler)) {
- handler = Http.interceptor[handler];
- }
-
- if (Object(util["j" /* isFunction */])(handler)) {
- client.use(handler);
- }
-
- });
-
- return client(new http_request(options)).then(function (response) {
-
- return response.ok ? response : promise["a" /* default */].reject(response);
-
- }, function (response) {
-
- if (response instanceof Error) {
- Object(util["e" /* error */])(response);
- }
-
- return promise["a" /* default */].reject(response);
- });
-}
-
-Http.options = {};
-
-Http.headers = {
- put: JSON_CONTENT_TYPE,
- post: JSON_CONTENT_TYPE,
- patch: JSON_CONTENT_TYPE,
- delete: JSON_CONTENT_TYPE,
- common: COMMON_HEADERS,
- custom: {}
-};
-
-Http.interceptor = {before: before, method: interceptor_method, jsonp: interceptor_jsonp, json: interceptor_json, form: interceptor_form, header: header, cors: cors};
-Http.interceptors = ['before', 'method', 'jsonp', 'json', 'form', 'header', 'cors'];
-
-['get', 'delete', 'head', 'jsonp'].forEach(function (method) {
-
- Http[method] = function (url, options) {
- return this(Object(util["a" /* assign */])(options || {}, {url: url, method: method}));
- };
-
-});
-
-['post', 'put', 'patch'].forEach(function (method) {
-
- Http[method] = function (url, body, options) {
- return this(Object(util["a" /* assign */])(options || {}, {url: url, method: method, body: body}));
- };
-
-});
-
-// CONCATENATED MODULE: ./src/resource.js
-/**
- * Service for interacting with RESTful services.
- */
-
-
-
-
-function Resource(url, params, actions, options) {
-
- var self = this || {}, resource = {};
-
- actions = Object(util["a" /* assign */])({},
- Resource.actions,
- actions
- );
-
- Object(util["d" /* each */])(actions, function (action, name) {
-
- action = Object(util["n" /* merge */])({url: url, params: Object(util["a" /* assign */])({}, params)}, options, action);
-
- resource[name] = function () {
- return (self.$http || Http)(opts(action, arguments));
- };
- });
-
- return resource;
-}
-
-function opts(action, args) {
-
- var options = Object(util["a" /* assign */])({}, action), params = {}, body;
-
- switch (args.length) {
-
- case 2:
-
- params = args[0];
- body = args[1];
-
- break;
-
- case 1:
-
- if (/^(POST|PUT|PATCH)$/i.test(options.method)) {
- body = args[0];
- } else {
- params = args[0];
- }
-
- break;
-
- case 0:
-
- break;
-
- default:
-
- throw 'Expected up to 2 arguments [params, body], got ' + args.length + ' arguments';
- }
-
- options.body = body;
- options.params = Object(util["a" /* assign */])({}, options.params, params);
-
- return options;
-}
-
-Resource.actions = {
-
- get: {method: 'GET'},
- save: {method: 'POST'},
- query: {method: 'GET'},
- update: {method: 'PUT'},
- remove: {method: 'DELETE'},
- delete: {method: 'DELETE'}
-
-};
-
-// CONCATENATED MODULE: ./src/index.js
-/**
- * Install plugin.
- */
-
-
-
-
-
-
-
-function src_plugin(Vue) {
-
- if (src_plugin.installed) {
- return;
- }
-
- Object(util["b" /* default */])(Vue);
-
- Vue.url = Url;
- Vue.http = Http;
- Vue.resource = Resource;
- Vue.Promise = promise["a" /* default */];
-
- Object.defineProperties(Vue.prototype, {
-
- $url: {
- get: function get() {
- return Object(util["p" /* options */])(Vue.url, this, this.$options.url);
- }
- },
-
- $http: {
- get: function get() {
- return Object(util["p" /* options */])(Vue.http, this, this.$options.http);
- }
- },
-
- $resource: {
- get: function get() {
- return Vue.resource.bind(this);
- }
- },
-
- $promise: {
- get: function get() {
- var this$1 = this;
-
- return function (executor) { return new Vue.Promise(executor, this$1); };
- }
- }
-
- });
-}
-
-if (typeof window !== 'undefined' && window.Vue) {
- window.Vue.use(src_plugin);
-}
-
-/* harmony default export */ var src = (src_plugin);
-
-// CONCATENATED MODULE: ./test/index.js
-
-
-
-vue_runtime_esm["a" /* default */].use(src);
-
-__webpack_require__(9);
-__webpack_require__(10);
-__webpack_require__(11);
-__webpack_require__(12);
-
-
-/***/ }),
-/* 6 */
-/***/ (function(module, exports, __webpack_require__) {
-
-/* WEBPACK VAR INJECTION */(function(global) {var apply = Function.prototype.apply;
-
-// DOM APIs, for completeness
-
-exports.setTimeout = function() {
- return new Timeout(apply.call(setTimeout, window, arguments), clearTimeout);
-};
-exports.setInterval = function() {
- return new Timeout(apply.call(setInterval, window, arguments), clearInterval);
-};
-exports.clearTimeout =
-exports.clearInterval = function(timeout) {
- if (timeout) {
- timeout.close();
- }
-};
-
-function Timeout(id, clearFn) {
- this._id = id;
- this._clearFn = clearFn;
-}
-Timeout.prototype.unref = Timeout.prototype.ref = function() {};
-Timeout.prototype.close = function() {
- this._clearFn.call(window, this._id);
-};
-
-// Does not start the time, just sets up the members needed.
-exports.enroll = function(item, msecs) {
- clearTimeout(item._idleTimeoutId);
- item._idleTimeout = msecs;
-};
-
-exports.unenroll = function(item) {
- clearTimeout(item._idleTimeoutId);
- item._idleTimeout = -1;
-};
-
-exports._unrefActive = exports.active = function(item) {
- clearTimeout(item._idleTimeoutId);
-
- var msecs = item._idleTimeout;
- if (msecs >= 0) {
- item._idleTimeoutId = setTimeout(function onTimeout() {
- if (item._onTimeout)
- item._onTimeout();
- }, msecs);
- }
-};
-
-// setimmediate attaches itself to the global object
-__webpack_require__(7);
-// On some exotic environments, it's not clear which object `setimmeidate` was
-// able to install onto. Search each possibility in the same order as the
-// `setimmediate` library.
-exports.setImmediate = (typeof self !== "undefined" && self.setImmediate) ||
- (typeof global !== "undefined" && global.setImmediate) ||
- (this && this.setImmediate);
-exports.clearImmediate = (typeof self !== "undefined" && self.clearImmediate) ||
- (typeof global !== "undefined" && global.clearImmediate) ||
- (this && this.clearImmediate);
-
-/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3)))
-
-/***/ }),
-/* 7 */
-/***/ (function(module, exports, __webpack_require__) {
-
-/* WEBPACK VAR INJECTION */(function(global, process) {(function (global, undefined) {
- "use strict";
-
- if (global.setImmediate) {
- return;
- }
-
- var nextHandle = 1; // Spec says greater than zero
- var tasksByHandle = {};
- var currentlyRunningATask = false;
- var doc = global.document;
- var registerImmediate;
-
- function setImmediate(callback) {
- // Callback can either be a function or a string
- if (typeof callback !== "function") {
- callback = new Function("" + callback);
- }
- // Copy function arguments
- var args = new Array(arguments.length - 1);
- for (var i = 0; i < args.length; i++) {
- args[i] = arguments[i + 1];
- }
- // Store and register the task
- var task = { callback: callback, args: args };
- tasksByHandle[nextHandle] = task;
- registerImmediate(nextHandle);
- return nextHandle++;
- }
-
- function clearImmediate(handle) {
- delete tasksByHandle[handle];
- }
-
- function run(task) {
- var callback = task.callback;
- var args = task.args;
- switch (args.length) {
- case 0:
- callback();
- break;
- case 1:
- callback(args[0]);
- break;
- case 2:
- callback(args[0], args[1]);
- break;
- case 3:
- callback(args[0], args[1], args[2]);
- break;
- default:
- callback.apply(undefined, args);
- break;
- }
- }
-
- function runIfPresent(handle) {
- // From the spec: "Wait until any invocations of this algorithm started before this one have completed."
- // So if we're currently running a task, we'll need to delay this invocation.
- if (currentlyRunningATask) {
- // Delay by doing a setTimeout. setImmediate was tried instead, but in Firefox 7 it generated a
- // "too much recursion" error.
- setTimeout(runIfPresent, 0, handle);
- } else {
- var task = tasksByHandle[handle];
- if (task) {
- currentlyRunningATask = true;
- try {
- run(task);
- } finally {
- clearImmediate(handle);
- currentlyRunningATask = false;
- }
- }
- }
- }
-
- function installNextTickImplementation() {
- registerImmediate = function(handle) {
- process.nextTick(function () { runIfPresent(handle); });
- };
- }
-
- function canUsePostMessage() {
- // The test against `importScripts` prevents this implementation from being installed inside a web worker,
- // where `global.postMessage` means something completely different and can't be used for this purpose.
- if (global.postMessage && !global.importScripts) {
- var postMessageIsAsynchronous = true;
- var oldOnMessage = global.onmessage;
- global.onmessage = function() {
- postMessageIsAsynchronous = false;
- };
- global.postMessage("", "*");
- global.onmessage = oldOnMessage;
- return postMessageIsAsynchronous;
- }
- }
-
- function installPostMessageImplementation() {
- // Installs an event handler on `global` for the `message` event: see
- // * https://developer.mozilla.org/en/DOM/window.postMessage
- // * http://www.whatwg.org/specs/web-apps/current-work/multipage/comms.html#crossDocumentMessages
-
- var messagePrefix = "setImmediate$" + Math.random() + "$";
- var onGlobalMessage = function(event) {
- if (event.source === global &&
- typeof event.data === "string" &&
- event.data.indexOf(messagePrefix) === 0) {
- runIfPresent(+event.data.slice(messagePrefix.length));
- }
- };
-
- if (global.addEventListener) {
- global.addEventListener("message", onGlobalMessage, false);
- } else {
- global.attachEvent("onmessage", onGlobalMessage);
- }
-
- registerImmediate = function(handle) {
- global.postMessage(messagePrefix + handle, "*");
- };
- }
-
- function installMessageChannelImplementation() {
- var channel = new MessageChannel();
- channel.port1.onmessage = function(event) {
- var handle = event.data;
- runIfPresent(handle);
- };
-
- registerImmediate = function(handle) {
- channel.port2.postMessage(handle);
- };
- }
-
- function installReadyStateChangeImplementation() {
- var html = doc.documentElement;
- registerImmediate = function(handle) {
- // Create a <script> element; its readystatechange event will be fired asynchronously once it is inserted
- // into the document. Do so, thus queuing up the task. Remember to clean up once it's been called.
- var script = doc.createElement("script");
- script.onreadystatechange = function () {
- runIfPresent(handle);
- script.onreadystatechange = null;
- html.removeChild(script);
- script = null;
- };
- html.appendChild(script);
- };
- }
-
- function installSetTimeoutImplementation() {
- registerImmediate = function(handle) {
- setTimeout(runIfPresent, 0, handle);
- };
- }
-
- // If supported, we should attach to the prototype of global, since that is where setTimeout et al. live.
- var attachTo = Object.getPrototypeOf && Object.getPrototypeOf(global);
- attachTo = attachTo && attachTo.setTimeout ? attachTo : global;
-
- // Don't get fooled by e.g. browserify environments.
- if ({}.toString.call(global.process) === "[object process]") {
- // For Node.js before 0.9
- installNextTickImplementation();
-
- } else if (canUsePostMessage()) {
- // For non-IE10 modern browsers
- installPostMessageImplementation();
-
- } else if (global.MessageChannel) {
- // For web workers, where supported
- installMessageChannelImplementation();
-
- } else if (doc && "onreadystatechange" in doc.createElement("script")) {
- // For IE 6–8
- installReadyStateChangeImplementation();
-
- } else {
- // For older browsers
- installSetTimeoutImplementation();
- }
-
- attachTo.setImmediate = setImmediate;
- attachTo.clearImmediate = clearImmediate;
-}(typeof self === "undefined" ? typeof global === "undefined" ? this : global : self));
-
-/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3), __webpack_require__(4)))
-
-/***/ }),
-/* 8 */
-/***/ (function(module, exports) {
-
-/* (ignored) */
-
-/***/ }),
-/* 9 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_vue__ = __webpack_require__(2);
-
-
-describe('Vue.url', function () {
-
- it('data{/id}', function () {
-
- expect(__WEBPACK_IMPORTED_MODULE_0_vue__["a" /* default */].url('data{/id}')).toBe('data');
- expect(__WEBPACK_IMPORTED_MODULE_0_vue__["a" /* default */].url('data{/id}', {id: 1})).toBe('data/1');
-
- });
-
- it('data{/array}', function () {
-
- expect(__WEBPACK_IMPORTED_MODULE_0_vue__["a" /* default */].url('data{?array}')).toBe('data');
- expect(__WEBPACK_IMPORTED_MODULE_0_vue__["a" /* default */].url('data{?array}', {array: [1,2,3]})).toBe('data?array=1,2,3');
-
- });
-
- it('{+path}data', function () {
-
- expect(__WEBPACK_IMPORTED_MODULE_0_vue__["a" /* default */].url('{+path}data')).toBe('data');
- expect(__WEBPACK_IMPORTED_MODULE_0_vue__["a" /* default */].url('{+path}data', {path: 'path1/path2/'})).toBe('path1/path2/data');
-
- });
-
- it('{+base}data', function () {
-
- __WEBPACK_IMPORTED_MODULE_0_vue__["a" /* default */].url.options.params.base = 'base/path/';
- expect(__WEBPACK_IMPORTED_MODULE_0_vue__["a" /* default */].url('{+base}data')).toBe('base/path/data');
-
- });
-
-});
-
-
-/***/ }),
-/* 10 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_vue__ = __webpack_require__(2);
-
-
-describe('Vue.http', function () {
-
- it('get("data/text.txt")', function (done) {
-
- __WEBPACK_IMPORTED_MODULE_0_vue__["a" /* default */].http.get('data/text.txt').then(function (res) {
-
- expect(res.ok).toBe(true);
- expect(res.status).toBe(200);
- expect(res.body).toBe('text');
- expect(res.data).toBe(res.body);
- expect(res.headers.get('Content-Type')).toBe('text/plain');
-
- done();
- });
-
- });
-
- it('get("data/valid.json")', function (done) {
-
- __WEBPACK_IMPORTED_MODULE_0_vue__["a" /* default */].http.get('data/valid.json').then(function (res) {
-
- expect(res.ok).toBe(true);
- expect(res.status).toBe(200);
- expect(typeof res.body).toBe('object');
- expect(res.body.foo).toBe('bar');
-
- done();
- });
-
- });
-
- it('get("data/invalid.json")', function (done) {
-
- __WEBPACK_IMPORTED_MODULE_0_vue__["a" /* default */].http.get('data/invalid.json').then(function (res) {
-
- expect(res.ok).toBe(true);
- expect(res.status).toBe(200);
- expect(res.body).toBeNull();
-
- done();
- });
-
- });
-
- it('get("github.com/avatar")', function (done) {
-
- __WEBPACK_IMPORTED_MODULE_0_vue__["a" /* default */].http.get('https://avatars1.githubusercontent.com/u/6128107', {responseType: 'blob'}).then(function (res) {
-
- expect(res.ok).toBe(true);
- expect(res.status).toBe(200);
- expect(res.body instanceof Blob).toBe(true);
- expect(res.body.type).toBe('image/png');
-
- done();
- });
-
- });
-
- it('get("cors-api.appspot.com")', function (done) {
-
- __WEBPACK_IMPORTED_MODULE_0_vue__["a" /* default */].http.get('http://server.cors-api.appspot.com/server?id=1&enable=true').then(function (res) {
-
- expect(res.ok).toBe(true);
- expect(res.status).toBe(200);
- expect(typeof res.body).toBe('object');
- expect(res.body.shift().requestType).toBe('cors');
-
- if (res.headers.get('Content-Type')) {
- expect(res.headers.get('Content-Type')).toBe('application/json');
- }
-
- done();
- });
-
- });
-
- it('jsonp("jsfiddle.net/jsonp")', function (done) {
-
- __WEBPACK_IMPORTED_MODULE_0_vue__["a" /* default */].http.jsonp('http://jsfiddle.net/echo/jsonp/', {params: {foo: 'bar'}}).then(function (res) {
-
- expect(res.ok).toBe(true);
- expect(res.status).toBe(200);
- expect(typeof res.body).toBe('object');
- expect(res.body.foo).toBe('bar');
-
- done();
- });
-
- });
-
-});
-
-describe('this.$http', function () {
-
- it('get("data/valid.json")', function (done) {
-
- var vm = new __WEBPACK_IMPORTED_MODULE_0_vue__["a" /* default */]({
-
- created: function created() {
- var this$1 = this;
-
-
- this.$http.get('data/valid.json').then(function (res) {
-
- expect(this$1).toBe(vm);
- expect(res.ok).toBe(true);
- expect(res.status).toBe(200);
- expect(typeof res.body).toBe('object');
- expect(res.body.foo).toBe('bar');
-
- done();
-
- });
-
- }
-
- });
-
- });
-
- it('get("data/valid.json") with timeout', function (done) {
-
- var vm = new __WEBPACK_IMPORTED_MODULE_0_vue__["a" /* default */]({
-
- created: function created() {
-
- var random = Math.random().toString(36).substr(2);
-
- this.$http.get(("data/valid.json?" + random), {timeout: 1}).then(function (res) {
-
- fail('Callback has been called');
-
- }, function (res) {
-
- expect(res.ok).toBe(false);
- expect(res.status).toBe(0);
-
- done();
-
- });
-
- }
-
- });
-
- });
-
- it('get("data/valid.json") with abort()', function (done) {
-
- var vm = new __WEBPACK_IMPORTED_MODULE_0_vue__["a" /* default */]({
-
- created: function created() {
-
- var random = Math.random().toString(36).substr(2);
-
- this.$http.get(("data/valid.json?" + random), {
-
- before: function before(req) {
- setTimeout(function () {
-
- expect(typeof req.abort).toBe('function');
-
- req.abort();
-
- }, 0);
- }
-
- }).then(function (res) {
- fail('Callback has been called');
- }, function (res) {
- done();
- });
- }
-
- });
-
- });
-
- it('get("data/notfound.json") using catch()', function (done) {
-
- var vm = new __WEBPACK_IMPORTED_MODULE_0_vue__["a" /* default */]({
-
- created: function created() {
- var this$1 = this;
-
-
- this.$http.get('data/notfound.json').catch(function (res) {
-
- expect(this$1).toBe(vm);
- expect(res.ok).toBe(false);
- expect(res.status).toBe(404);
-
- done();
- });
-
- }
-
- });
-
- });
-
-});
-
-/***/ }),
-/* 11 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_vue__ = __webpack_require__(2);
-
-
-describe('this.$resource', function () {
-
- it('get({file: "valid.json"})', function (done) {
-
- var vm = new __WEBPACK_IMPORTED_MODULE_0_vue__["a" /* default */]({
-
- created: function created() {
-
- var resource = this.$resource('data{/file}');
-
- resource.get({file: 'valid.json'}).then(function (res) {
-
- expect(res.ok).toBe(true);
- expect(res.status).toBe(200);
- expect(res.data.foo).toBe('bar');
-
- done();
- });
-
- }
-
- });
-
- });
-
- it('save({file: "valid.json"}, {foo: "bar"})', function (done) {
-
- var vm = new __WEBPACK_IMPORTED_MODULE_0_vue__["a" /* default */]({
-
- created: function created() {
-
- var resource = this.$resource('data{/file}');
-
- resource.save({file: 'valid.json'}, {foo: 'bar'}).then(function (res) {
-
- expect(res.ok).toBe(true);
- expect(res.status).toBe(200);
- expect(res.data.foo).toBe('bar');
-
- done();
- });
-
- }
-
- });
-
- });
-
-});
-
-
-/***/ }),
-/* 12 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__src_promise__ = __webpack_require__(1);
-
-
-describe('Vue.promise ' + (window.Promise !== undefined ? '(native)' : '(polyfill)'), function () {
-
- it('then fulfill', function (done) {
-
- __WEBPACK_IMPORTED_MODULE_0__src_promise__["a" /* default */].resolve(1).then(function (value) {
- expect(value).toBe(1);
- done();
- });
-
- });
-
- it('then reject', function (done) {
-
- __WEBPACK_IMPORTED_MODULE_0__src_promise__["a" /* default */].reject(1).then(undefined, function (value) {
- expect(value).toBe(1);
- done();
- });
-
- });
-
- it('catch', function (done) {
-
- __WEBPACK_IMPORTED_MODULE_0__src_promise__["a" /* default */].reject(1).catch(function (value) {
- expect(value).toBe(1);
- done();
- });
-
- });
-
- it('finally fulfill', function (done) {
-
- __WEBPACK_IMPORTED_MODULE_0__src_promise__["a" /* default */].resolve(1).finally(function (arg) {
- expect(arg).toBe(undefined);
- }).then(function (arg) {
- expect(arg).toBe(1);
- done();
- });
-
- });
-
- it('finally reject', function (done) {
-
- __WEBPACK_IMPORTED_MODULE_0__src_promise__["a" /* default */].reject(1).finally(function (arg) {
- expect(arg).toBe(undefined);
- }).catch(function (arg) {
- expect(arg).toBe(1);
- done();
- });
-
- });
-
- it('all', function (done) {
-
- __WEBPACK_IMPORTED_MODULE_0__src_promise__["a" /* default */].all([
-
- __WEBPACK_IMPORTED_MODULE_0__src_promise__["a" /* default */].resolve(1),
- __WEBPACK_IMPORTED_MODULE_0__src_promise__["a" /* default */].resolve(2)
-
- ]).then(function (values) {
- expect(values[0]).toBe(1);
- expect(values[1]).toBe(2);
- done();
- });
-
- });
-
- it('duplicate', function (done) {
-
- __WEBPACK_IMPORTED_MODULE_0__src_promise__["a" /* default */].all([
-
- __WEBPACK_IMPORTED_MODULE_0__src_promise__["a" /* default */].resolve(1).then(function (value) {
- expect(value).toBe(1);
- }),
-
- __WEBPACK_IMPORTED_MODULE_0__src_promise__["a" /* default */].resolve(2).then(function (value) {
- expect(value).toBe(2);
- })
-
- ]).then(done);
-
- });
-
- it('context', function (done) {
-
- var context = {foo: 'bar'};
-
- __WEBPACK_IMPORTED_MODULE_0__src_promise__["a" /* default */].resolve().bind(context).then(function () {
- expect(this).toBe(context);
- done();
- });
-
- });
-
- it('context chain fulfill', function (done) {
-
- var context = {foo: 'bar'};
-
- __WEBPACK_IMPORTED_MODULE_0__src_promise__["a" /* default */].resolve().bind(context).catch(undefined).finally(function () {
- expect(this).toBe(context);
- }).then(function () {
- expect(this).toBe(context);
- done();
- });
-
- });
-
- it('context chain reject', function (done) {
-
- var context = {foo: 'bar'};
-
- __WEBPACK_IMPORTED_MODULE_0__src_promise__["a" /* default */].reject().bind(context).catch(function () {
- expect(this).toBe(context);
- return __WEBPACK_IMPORTED_MODULE_0__src_promise__["a" /* default */].reject();
- }).finally(function () {
- expect(this).toBe(context);
- }).catch(function () {
- expect(this).toBe(context);
- done();
- });
-
- });
-
-});
-
-
-/***/ })
-/******/ ]);
\ No newline at end of file
+++ /dev/null
-import Vue from 'vue';
-
-describe('Vue.url', function () {
-
- it('data{/id}', function () {
-
- expect(Vue.url('data{/id}')).toBe('data');
- expect(Vue.url('data{/id}', {id: 1})).toBe('data/1');
-
- });
-
- it('data{/array}', function () {
-
- expect(Vue.url('data{?array}')).toBe('data');
- expect(Vue.url('data{?array}', {array: [1,2,3]})).toBe('data?array=1,2,3');
-
- });
-
- it('{+path}data', function () {
-
- expect(Vue.url('{+path}data')).toBe('data');
- expect(Vue.url('{+path}data', {path: 'path1/path2/'})).toBe('path1/path2/data');
-
- });
-
- it('{+base}data', function () {
-
- Vue.url.options.params.base = 'base/path/';
- expect(Vue.url('{+base}data')).toBe('base/path/data');
-
- });
-
-});
+++ /dev/null
-var webpack = require('webpack');
-
-module.exports = {
- entry: __dirname + '/index.js',
- output: {
- path: __dirname + '/',
- filename: 'specs.js'
- },
- module: {
- loaders: [
- {test: /\.js$/, loader: 'buble-loader', exclude: /node_modules/}
- ]
- },
- plugins: [
- new webpack.optimize.ModuleConcatenationPlugin()
- ]
-};
+++ /dev/null
-import _Vue = require('vue');
-
-// augment typings of Vue.js
-import './vue';
-
-export interface HttpHeaders {
- put?: { [key: string]: string };
- post?: { [key: string]: string };
- patch?: { [key: string]: string };
- delete?: { [key: string]: string };
- common?: { [key: string]: string };
- custom?: { [key: string]: string };
- [key: string]: any;
-}
-
-export interface HttpResponse {
- data: any;
- ok: boolean;
- status: number;
- statusText: string;
- headers: Function;
- text():string;
- json():any;
- blob():Blob;
-}
-
-export interface HttpOptions {
- url?: string;
- method?: string;
- body?: any;
- params?: any;
- headers?: any;
- before?(request: any): any;
- progress?(event: any): any;
- credentials?:boolean;
- emulateHTTP?: boolean;
- emulateJSON?: boolean;
-}
-
-export interface $http {
- (url: string, data?: any, options?: HttpOptions): PromiseLike<HttpResponse>;
- (url: string, options?: HttpOptions): PromiseLike<HttpResponse>;
-}
-
-export interface HttpInterceptor {
- request?(request: HttpOptions): HttpOptions;
- response?(response: HttpResponse): HttpResponse;
-}
-
-export interface Http {
- options: HttpOptions & { root: string };
- headers: HttpHeaders;
- interceptors: (HttpInterceptor | (() => HttpInterceptor))[];
- get: $http;
- post: $http;
- put: $http;
- patch: $http;
- delete: $http;
- jsonp: $http;
-}
-
-export interface ResourceActions {
- get: { method: string };
- save: { method: string };
- query: { method: string };
- update: { method: string };
- remove: { method: string };
- delete: { method: string };
-}
-
-export interface ResourceMethod {
- (params: any, data?: any, success?: Function, error?: Function): PromiseLike<HttpResponse>;
- (params: any, success?: Function, error?: Function): PromiseLike<HttpResponse>;
- (success?: Function, error?: Function): PromiseLike<HttpResponse>;
-}
-
-export interface ResourceMethods {
- get: ResourceMethod;
- save: ResourceMethod;
- query: ResourceMethod;
- update: ResourceMethod;
- remove: ResourceMethod;
- delete: ResourceMethod;
-}
-
-export interface $resource {
- (url: string, params?: any, actions?: any, options?: HttpOptions): ResourceMethods;
-}
-
-export interface Resource extends $resource {
- actions: ResourceActions;
-}
-
-export declare function install(vue: typeof _Vue): void;
+++ /dev/null
-/**
- * Extends interfaces in Vue.js
- */
-
-import Vue from "vue";
-import { HttpHeaders, HttpOptions, HttpResponse, $http, $resource } from "./index";
-
-declare module "vue/types/options" {
- interface ComponentOptions<V extends Vue> {
- http?: (HttpOptions & { headers?: HttpHeaders } & { [key: string]: any })
- }
-}
-
-declare module "vue/types/vue" {
- interface Vue {
- $http: {
- (options: HttpOptions): PromiseLike<HttpResponse>;
- get: $http;
- post: $http;
- put: $http;
- patch: $http;
- delete: $http;
- jsonp: $http;
- };
- $resource: $resource;
- }
-}
+++ /dev/null
-# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
-# yarn lockfile v1
-
-
-"@babel/code-frame@^7.0.0-beta.35":
- version "7.0.0-beta.40"
- resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.0.0-beta.40.tgz#37e2b0cf7c56026b4b21d3927cadf81adec32ac6"
- dependencies:
- "@babel/highlight" "7.0.0-beta.40"
-
-"@babel/highlight@7.0.0-beta.40":
- version "7.0.0-beta.40"
- resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.0.0-beta.40.tgz#b43d67d76bf46e1d10d227f68cddcd263786b255"
- dependencies:
- chalk "^2.0.0"
- esutils "^2.0.2"
- js-tokens "^3.0.0"
-
-"@sindresorhus/is@^0.7.0":
- version "0.7.0"
- resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-0.7.0.tgz#9a06f4f137ee84d7df0460c1fdb1135ffa6c50fd"
-
-JSONStream@^1.0.3:
- version "1.3.2"
- resolved "https://registry.yarnpkg.com/JSONStream/-/JSONStream-1.3.2.tgz#c102371b6ec3a7cf3b847ca00c20bb0fce4c6dea"
- dependencies:
- jsonparse "^1.2.0"
- through ">=2.2.7 <3"
-
-abab@^1.0.4:
- version "1.0.4"
- resolved "https://registry.yarnpkg.com/abab/-/abab-1.0.4.tgz#5faad9c2c07f60dd76770f71cf025b62a63cfd4e"
-
-abbrev@1:
- version "1.1.1"
- resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8"
-
-accepts@~1.3.4:
- version "1.3.5"
- resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.5.tgz#eb777df6011723a3b14e8a72c0805c8e86746bd2"
- dependencies:
- mime-types "~2.1.18"
- negotiator "0.6.1"
-
-acorn-dynamic-import@^2.0.0:
- version "2.0.2"
- resolved "https://registry.yarnpkg.com/acorn-dynamic-import/-/acorn-dynamic-import-2.0.2.tgz#c752bd210bef679501b6c6cb7fc84f8f47158cc4"
- dependencies:
- acorn "^4.0.3"
-
-acorn-dynamic-import@^3.0.0:
- version "3.0.0"
- resolved "https://registry.yarnpkg.com/acorn-dynamic-import/-/acorn-dynamic-import-3.0.0.tgz#901ceee4c7faaef7e07ad2a47e890675da50a278"
- dependencies:
- acorn "^5.0.0"
-
-acorn-globals@^4.1.0:
- version "4.1.0"
- resolved "https://registry.yarnpkg.com/acorn-globals/-/acorn-globals-4.1.0.tgz#ab716025dbe17c54d3ef81d32ece2b2d99fe2538"
- dependencies:
- acorn "^5.0.0"
-
-acorn-jsx@^3.0.0, acorn-jsx@^3.0.1:
- version "3.0.1"
- resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-3.0.1.tgz#afdf9488fb1ecefc8348f6fb22f464e32a58b36b"
- dependencies:
- acorn "^3.0.4"
-
-acorn-jsx@^4.1.1:
- version "4.1.1"
- resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-4.1.1.tgz#e8e41e48ea2fe0c896740610ab6a4ffd8add225e"
- dependencies:
- acorn "^5.0.3"
-
-acorn-node@^1.2.0:
- version "1.3.0"
- resolved "https://registry.yarnpkg.com/acorn-node/-/acorn-node-1.3.0.tgz#5f86d73346743810ef1269b901dbcbded020861b"
- dependencies:
- acorn "^5.4.1"
- xtend "^4.0.1"
-
-acorn-object-spread@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/acorn-object-spread/-/acorn-object-spread-1.0.0.tgz#48ead0f4a8eb16995a17a0db9ffc6acaada4ba68"
- dependencies:
- acorn "^3.1.0"
-
-acorn@^3.0.4, acorn@^3.1.0, acorn@^3.3.0:
- version "3.3.0"
- resolved "https://registry.yarnpkg.com/acorn/-/acorn-3.3.0.tgz#45e37fb39e8da3f25baee3ff5369e2bb5f22017a"
-
-acorn@^4.0.3:
- version "4.0.13"
- resolved "https://registry.yarnpkg.com/acorn/-/acorn-4.0.13.tgz#105495ae5361d697bd195c825192e1ad7f253787"
-
-acorn@^5.0.0, acorn@^5.0.3, acorn@^5.2.1, acorn@^5.3.0, acorn@^5.4.0, acorn@^5.4.1:
- version "5.5.0"
- resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.5.0.tgz#1abb587fbf051f94e3de20e6b26ef910b1828298"
-
-addressparser@1.0.1:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/addressparser/-/addressparser-1.0.1.tgz#47afbe1a2a9262191db6838e4fd1d39b40821746"
-
-after@0.8.2:
- version "0.8.2"
- resolved "https://registry.yarnpkg.com/after/-/after-0.8.2.tgz#fedb394f9f0e02aa9768e702bda23b505fae7e1f"
-
-agent-base@2:
- version "2.1.1"
- resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-2.1.1.tgz#d6de10d5af6132d5bd692427d46fc538539094c7"
- dependencies:
- extend "~3.0.0"
- semver "~5.0.1"
-
-ajv-keywords@^2.1.0:
- version "2.1.1"
- resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-2.1.1.tgz#617997fc5f60576894c435f940d819e135b80762"
-
-ajv-keywords@^3.1.0:
- version "3.1.0"
- resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.1.0.tgz#ac2b27939c543e95d2c06e7f7f5c27be4aa543be"
-
-ajv@^4.9.1:
- version "4.11.8"
- resolved "https://registry.yarnpkg.com/ajv/-/ajv-4.11.8.tgz#82ffb02b29e662ae53bdc20af15947706739c536"
- dependencies:
- co "^4.6.0"
- json-stable-stringify "^1.0.1"
-
-ajv@^5.1.0, ajv@^5.2.3, ajv@^5.3.0:
- version "5.5.2"
- resolved "https://registry.yarnpkg.com/ajv/-/ajv-5.5.2.tgz#73b5eeca3fab653e3d3f9422b341ad42205dc965"
- dependencies:
- co "^4.6.0"
- fast-deep-equal "^1.0.0"
- fast-json-stable-stringify "^2.0.0"
- json-schema-traverse "^0.3.0"
-
-ajv@^6.1.0:
- version "6.2.0"
- resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.2.0.tgz#afac295bbaa0152449e522742e4547c1ae9328d2"
- dependencies:
- fast-deep-equal "^1.0.0"
- fast-json-stable-stringify "^2.0.0"
- json-schema-traverse "^0.3.0"
-
-align-text@^0.1.1, align-text@^0.1.3:
- version "0.1.4"
- resolved "https://registry.yarnpkg.com/align-text/-/align-text-0.1.4.tgz#0cd90a561093f35d0a99256c22b7069433fad117"
- dependencies:
- kind-of "^3.0.2"
- longest "^1.0.1"
- repeat-string "^1.5.2"
-
-amdefine@>=0.0.4:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5"
-
-amqplib@^0.5.2:
- version "0.5.2"
- resolved "https://registry.yarnpkg.com/amqplib/-/amqplib-0.5.2.tgz#d2d7313c7ffaa4d10bcf1e6252de4591b6cc7b63"
- dependencies:
- bitsyntax "~0.0.4"
- bluebird "^3.4.6"
- buffer-more-ints "0.0.2"
- readable-stream "1.x >=1.1.9"
- safe-buffer "^5.0.1"
-
-ansi-escapes@^1.1.0:
- version "1.4.0"
- resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-1.4.0.tgz#d3a8a83b319aa67793662b13e761c7911422306e"
-
-ansi-escapes@^3.0.0:
- version "3.0.0"
- resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-3.0.0.tgz#ec3e8b4e9f8064fc02c3ac9b65f1c275bda8ef92"
-
-ansi-regex@^2.0.0:
- version "2.1.1"
- resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df"
-
-ansi-regex@^3.0.0:
- version "3.0.0"
- resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998"
-
-ansi-styles@^2.2.1:
- version "2.2.1"
- resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe"
-
-ansi-styles@^3.2.0, ansi-styles@^3.2.1:
- version "3.2.1"
- resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d"
- dependencies:
- color-convert "^1.9.0"
-
-anymatch@^1.3.0:
- version "1.3.2"
- resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-1.3.2.tgz#553dcb8f91e3c889845dfdba34c77721b90b9d7a"
- dependencies:
- micromatch "^2.1.5"
- normalize-path "^2.0.0"
-
-anymatch@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-2.0.0.tgz#bcb24b4f37934d9aa7ac17b4adaf89e7c76ef2eb"
- dependencies:
- micromatch "^3.1.4"
- normalize-path "^2.1.1"
-
-append-transform@^0.4.0:
- version "0.4.0"
- resolved "https://registry.yarnpkg.com/append-transform/-/append-transform-0.4.0.tgz#d76ebf8ca94d276e247a36bad44a4b74ab611991"
- dependencies:
- default-require-extensions "^1.0.0"
-
-aproba@^1.0.3, aproba@^1.1.1:
- version "1.2.0"
- resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a"
-
-are-we-there-yet@~1.1.2:
- version "1.1.4"
- resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.4.tgz#bb5dca382bb94f05e15194373d16fd3ba1ca110d"
- dependencies:
- delegates "^1.0.0"
- readable-stream "^2.0.6"
-
-argparse@^1.0.7:
- version "1.0.10"
- resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911"
- dependencies:
- sprintf-js "~1.0.2"
-
-arr-diff@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-2.0.0.tgz#8f3b827f955a8bd669697e4a4256ac3ceae356cf"
- dependencies:
- arr-flatten "^1.0.1"
-
-arr-diff@^4.0.0:
- version "4.0.0"
- resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-4.0.0.tgz#d6461074febfec71e7e15235761a329a5dc7c520"
-
-arr-flatten@^1.0.1, arr-flatten@^1.1.0:
- version "1.1.0"
- resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.1.0.tgz#36048bbff4e7b47e136644316c99669ea5ae91f1"
-
-arr-union@^3.1.0:
- version "3.1.0"
- resolved "https://registry.yarnpkg.com/arr-union/-/arr-union-3.1.0.tgz#e39b09aea9def866a8f206e288af63919bae39c4"
-
-array-equal@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/array-equal/-/array-equal-1.0.0.tgz#8c2a5ef2472fd9ea742b04c77a75093ba2757c93"
-
-array-filter@~0.0.0:
- version "0.0.1"
- resolved "https://registry.yarnpkg.com/array-filter/-/array-filter-0.0.1.tgz#7da8cf2e26628ed732803581fd21f67cacd2eeec"
-
-array-map@~0.0.0:
- version "0.0.0"
- resolved "https://registry.yarnpkg.com/array-map/-/array-map-0.0.0.tgz#88a2bab73d1cf7bcd5c1b118a003f66f665fa662"
-
-array-reduce@~0.0.0:
- version "0.0.0"
- resolved "https://registry.yarnpkg.com/array-reduce/-/array-reduce-0.0.0.tgz#173899d3ffd1c7d9383e4479525dbe278cab5f2b"
-
-array-slice@^0.2.3:
- version "0.2.3"
- resolved "https://registry.yarnpkg.com/array-slice/-/array-slice-0.2.3.tgz#dd3cfb80ed7973a75117cdac69b0b99ec86186f5"
-
-array-union@^1.0.1:
- version "1.0.2"
- resolved "https://registry.yarnpkg.com/array-union/-/array-union-1.0.2.tgz#9a34410e4f4e3da23dea375be5be70f24778ec39"
- dependencies:
- array-uniq "^1.0.1"
-
-array-uniq@^1.0.1:
- version "1.0.3"
- resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6"
-
-array-unique@^0.2.1:
- version "0.2.1"
- resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.2.1.tgz#a1d97ccafcbc2625cc70fadceb36a50c58b01a53"
-
-array-unique@^0.3.2:
- version "0.3.2"
- resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428"
-
-arraybuffer.slice@~0.0.7:
- version "0.0.7"
- resolved "https://registry.yarnpkg.com/arraybuffer.slice/-/arraybuffer.slice-0.0.7.tgz#3bbc4275dd584cc1b10809b89d4e8b63a69e7675"
-
-arrify@^1.0.0, arrify@^1.0.1:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d"
-
-asn1.js@^4.0.0:
- version "4.10.1"
- resolved "https://registry.yarnpkg.com/asn1.js/-/asn1.js-4.10.1.tgz#b9c2bf5805f1e64aadeed6df3a2bfafb5a73f5a0"
- dependencies:
- bn.js "^4.0.0"
- inherits "^2.0.1"
- minimalistic-assert "^1.0.0"
-
-asn1@~0.2.3:
- version "0.2.3"
- resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.3.tgz#dac8787713c9966849fc8180777ebe9c1ddf3b86"
-
-assert-plus@1.0.0, assert-plus@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525"
-
-assert-plus@^0.2.0:
- version "0.2.0"
- resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-0.2.0.tgz#d74e1b87e7affc0db8aadb7021f3fe48101ab234"
-
-assert@^1.1.1, assert@^1.4.0:
- version "1.4.1"
- resolved "https://registry.yarnpkg.com/assert/-/assert-1.4.1.tgz#99912d591836b5a6f5b345c0f07eefc08fc65d91"
- dependencies:
- util "0.10.3"
-
-assign-symbols@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367"
-
-ast-types@0.x.x:
- version "0.11.2"
- resolved "https://registry.yarnpkg.com/ast-types/-/ast-types-0.11.2.tgz#cc4e1d15a36b39979a1986fe1e91321cbfae7783"
-
-astral-regex@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-1.0.0.tgz#6c8c3fb827dd43ee3918f27b82782ab7658a6fd9"
-
-astw@^2.0.0:
- version "2.2.0"
- resolved "https://registry.yarnpkg.com/astw/-/astw-2.2.0.tgz#7bd41784d32493987aeb239b6b4e1c57a873b917"
- dependencies:
- acorn "^4.0.3"
-
-async-each@^1.0.0:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.1.tgz#19d386a1d9edc6e7c1c85d388aedbcc56d33602d"
-
-async-limiter@~1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/async-limiter/-/async-limiter-1.0.0.tgz#78faed8c3d074ab81f22b4e985d79e8738f720f8"
-
-async@^1.4.0:
- version "1.5.2"
- resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a"
-
-async@^2.0.0, async@^2.1.2, async@^2.1.4:
- version "2.6.0"
- resolved "https://registry.yarnpkg.com/async/-/async-2.6.0.tgz#61a29abb6fcc026fea77e56d1c6ec53a795951f4"
- dependencies:
- lodash "^4.14.0"
-
-async@~2.1.2:
- version "2.1.5"
- resolved "https://registry.yarnpkg.com/async/-/async-2.1.5.tgz#e587c68580994ac67fc56ff86d3ac56bdbe810bc"
- dependencies:
- lodash "^4.14.0"
-
-asynckit@^0.4.0:
- version "0.4.0"
- resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79"
-
-atob@^2.0.0:
- version "2.0.3"
- resolved "https://registry.yarnpkg.com/atob/-/atob-2.0.3.tgz#19c7a760473774468f20b2d2d03372ad7d4cbf5d"
-
-aws-sign2@~0.6.0:
- version "0.6.0"
- resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.6.0.tgz#14342dd38dbcc94d0e5b87d763cd63612c0e794f"
-
-aws-sign2@~0.7.0:
- version "0.7.0"
- resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8"
-
-aws4@^1.2.1, aws4@^1.6.0:
- version "1.6.0"
- resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.6.0.tgz#83ef5ca860b2b32e4a0deedee8c771b9db57471e"
-
-axios@^0.15.3:
- version "0.15.3"
- resolved "https://registry.yarnpkg.com/axios/-/axios-0.15.3.tgz#2c9d638b2e191a08ea1d6cc988eadd6ba5bdc053"
- dependencies:
- follow-redirects "1.0.0"
-
-babel-code-frame@^6.22.0, babel-code-frame@^6.26.0:
- version "6.26.0"
- resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.26.0.tgz#63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b"
- dependencies:
- chalk "^1.1.3"
- esutils "^2.0.2"
- js-tokens "^3.0.2"
-
-babel-core@^6.0.0, babel-core@^6.26.0:
- version "6.26.0"
- resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-6.26.0.tgz#af32f78b31a6fcef119c87b0fd8d9753f03a0bb8"
- dependencies:
- babel-code-frame "^6.26.0"
- babel-generator "^6.26.0"
- babel-helpers "^6.24.1"
- babel-messages "^6.23.0"
- babel-register "^6.26.0"
- babel-runtime "^6.26.0"
- babel-template "^6.26.0"
- babel-traverse "^6.26.0"
- babel-types "^6.26.0"
- babylon "^6.18.0"
- convert-source-map "^1.5.0"
- debug "^2.6.8"
- json5 "^0.5.1"
- lodash "^4.17.4"
- minimatch "^3.0.4"
- path-is-absolute "^1.0.1"
- private "^0.1.7"
- slash "^1.0.0"
- source-map "^0.5.6"
-
-babel-generator@^6.18.0, babel-generator@^6.26.0:
- version "6.26.1"
- resolved "https://registry.yarnpkg.com/babel-generator/-/babel-generator-6.26.1.tgz#1844408d3b8f0d35a404ea7ac180f087a601bd90"
- dependencies:
- babel-messages "^6.23.0"
- babel-runtime "^6.26.0"
- babel-types "^6.26.0"
- detect-indent "^4.0.0"
- jsesc "^1.3.0"
- lodash "^4.17.4"
- source-map "^0.5.7"
- trim-right "^1.0.1"
-
-babel-helpers@^6.24.1:
- version "6.24.1"
- resolved "https://registry.yarnpkg.com/babel-helpers/-/babel-helpers-6.24.1.tgz#3471de9caec388e5c850e597e58a26ddf37602b2"
- dependencies:
- babel-runtime "^6.22.0"
- babel-template "^6.24.1"
-
-babel-jest@^22.4.1:
- version "22.4.1"
- resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-22.4.1.tgz#ff53ebca45957347f27ff4666a31499fbb4c4ddd"
- dependencies:
- babel-plugin-istanbul "^4.1.5"
- babel-preset-jest "^22.4.1"
-
-babel-messages@^6.23.0:
- version "6.23.0"
- resolved "https://registry.yarnpkg.com/babel-messages/-/babel-messages-6.23.0.tgz#f3cdf4703858035b2a2951c6ec5edf6c62f2630e"
- dependencies:
- babel-runtime "^6.22.0"
-
-babel-plugin-istanbul@^4.1.5:
- version "4.1.5"
- resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-4.1.5.tgz#6760cdd977f411d3e175bb064f2bc327d99b2b6e"
- dependencies:
- find-up "^2.1.0"
- istanbul-lib-instrument "^1.7.5"
- test-exclude "^4.1.1"
-
-babel-plugin-jest-hoist@^22.4.1:
- version "22.4.1"
- resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-22.4.1.tgz#d712fe5da8b6965f3191dacddbefdbdf4fb66d63"
-
-babel-plugin-syntax-object-rest-spread@^6.13.0:
- version "6.13.0"
- resolved "https://registry.yarnpkg.com/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.13.0.tgz#fd6536f2bce13836ffa3a5458c4903a597bb3bf5"
-
-babel-preset-jest@^22.4.1:
- version "22.4.1"
- resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-22.4.1.tgz#efa2e5f5334242a9457a068452d7d09735db172a"
- dependencies:
- babel-plugin-jest-hoist "^22.4.1"
- babel-plugin-syntax-object-rest-spread "^6.13.0"
-
-babel-register@^6.26.0:
- version "6.26.0"
- resolved "https://registry.yarnpkg.com/babel-register/-/babel-register-6.26.0.tgz#6ed021173e2fcb486d7acb45c6009a856f647071"
- dependencies:
- babel-core "^6.26.0"
- babel-runtime "^6.26.0"
- core-js "^2.5.0"
- home-or-tmp "^2.0.0"
- lodash "^4.17.4"
- mkdirp "^0.5.1"
- source-map-support "^0.4.15"
-
-babel-runtime@^6.0.0, babel-runtime@^6.22.0, babel-runtime@^6.26.0:
- version "6.26.0"
- resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.26.0.tgz#965c7058668e82b55d7bfe04ff2337bc8b5647fe"
- dependencies:
- core-js "^2.4.0"
- regenerator-runtime "^0.11.0"
-
-babel-template@^6.16.0, babel-template@^6.24.1, babel-template@^6.26.0:
- version "6.26.0"
- resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-6.26.0.tgz#de03e2d16396b069f46dd9fff8521fb1a0e35e02"
- dependencies:
- babel-runtime "^6.26.0"
- babel-traverse "^6.26.0"
- babel-types "^6.26.0"
- babylon "^6.18.0"
- lodash "^4.17.4"
-
-babel-traverse@^6.18.0, babel-traverse@^6.26.0:
- version "6.26.0"
- resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.26.0.tgz#46a9cbd7edcc62c8e5c064e2d2d8d0f4035766ee"
- dependencies:
- babel-code-frame "^6.26.0"
- babel-messages "^6.23.0"
- babel-runtime "^6.26.0"
- babel-types "^6.26.0"
- babylon "^6.18.0"
- debug "^2.6.8"
- globals "^9.18.0"
- invariant "^2.2.2"
- lodash "^4.17.4"
-
-babel-types@^6.18.0, babel-types@^6.26.0:
- version "6.26.0"
- resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.26.0.tgz#a3b073f94ab49eb6fa55cd65227a334380632497"
- dependencies:
- babel-runtime "^6.26.0"
- esutils "^2.0.2"
- lodash "^4.17.4"
- to-fast-properties "^1.0.3"
-
-babylon@^6.18.0:
- version "6.18.0"
- resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.18.0.tgz#af2f3b88fa6f5c1e4c634d1a0f8eac4f55b395e3"
-
-backo2@1.0.2:
- version "1.0.2"
- resolved "https://registry.yarnpkg.com/backo2/-/backo2-1.0.2.tgz#31ab1ac8b129363463e35b3ebb69f4dfcfba7947"
-
-balanced-match@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767"
-
-base64-arraybuffer@0.1.5:
- version "0.1.5"
- resolved "https://registry.yarnpkg.com/base64-arraybuffer/-/base64-arraybuffer-0.1.5.tgz#73926771923b5a19747ad666aa5cd4bf9c6e9ce8"
-
-base64-js@^1.0.2:
- version "1.2.3"
- resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.2.3.tgz#fb13668233d9614cf5fb4bce95a9ba4096cdf801"
-
-base64id@1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/base64id/-/base64id-1.0.0.tgz#47688cb99bb6804f0e06d3e763b1c32e57d8e6b6"
-
-base@^0.11.1:
- version "0.11.2"
- resolved "https://registry.yarnpkg.com/base/-/base-0.11.2.tgz#7bde5ced145b6d551a90db87f83c558b4eb48a8f"
- dependencies:
- cache-base "^1.0.1"
- class-utils "^0.3.5"
- component-emitter "^1.2.1"
- define-property "^1.0.0"
- isobject "^3.0.1"
- mixin-deep "^1.2.0"
- pascalcase "^0.1.1"
-
-bcrypt-pbkdf@^1.0.0:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz#63bc5dcb61331b92bc05fd528953c33462a06f8d"
- dependencies:
- tweetnacl "^0.14.3"
-
-better-assert@~1.0.0:
- version "1.0.2"
- resolved "https://registry.yarnpkg.com/better-assert/-/better-assert-1.0.2.tgz#40866b9e1b9e0b55b481894311e68faffaebc522"
- dependencies:
- callsite "1.0.0"
-
-big.js@^3.1.3:
- version "3.2.0"
- resolved "https://registry.yarnpkg.com/big.js/-/big.js-3.2.0.tgz#a5fc298b81b9e0dca2e458824784b65c52ba588e"
-
-binary-extensions@^1.0.0:
- version "1.11.0"
- resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.11.0.tgz#46aa1751fb6a2f93ee5e689bb1087d4b14c6c205"
-
-bitsyntax@~0.0.4:
- version "0.0.4"
- resolved "https://registry.yarnpkg.com/bitsyntax/-/bitsyntax-0.0.4.tgz#eb10cc6f82b8c490e3e85698f07e83d46e0cba82"
- dependencies:
- buffer-more-ints "0.0.2"
-
-bl@~1.1.2:
- version "1.1.2"
- resolved "https://registry.yarnpkg.com/bl/-/bl-1.1.2.tgz#fdca871a99713aa00d19e3bbba41c44787a65398"
- dependencies:
- readable-stream "~2.0.5"
-
-blob@0.0.4:
- version "0.0.4"
- resolved "https://registry.yarnpkg.com/blob/-/blob-0.0.4.tgz#bcf13052ca54463f30f9fc7e95b9a47630a94921"
-
-block-stream@*:
- version "0.0.9"
- resolved "https://registry.yarnpkg.com/block-stream/-/block-stream-0.0.9.tgz#13ebfe778a03205cfe03751481ebb4b3300c126a"
- dependencies:
- inherits "~2.0.0"
-
-bluebird@^3.3.0, bluebird@^3.4.6, bluebird@^3.5.0, bluebird@^3.5.1:
- version "3.5.1"
- resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.5.1.tgz#d9551f9de98f1fcda1e683d17ee91a0602ee2eb9"
-
-bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.1.1, bn.js@^4.4.0:
- version "4.11.8"
- resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.8.tgz#2cde09eb5ee341f484746bb0309b3253b1b1442f"
-
-body-parser@^1.16.1:
- version "1.18.2"
- resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.18.2.tgz#87678a19d84b47d859b83199bd59bce222b10454"
- dependencies:
- bytes "3.0.0"
- content-type "~1.0.4"
- debug "2.6.9"
- depd "~1.1.1"
- http-errors "~1.6.2"
- iconv-lite "0.4.19"
- on-finished "~2.3.0"
- qs "6.5.1"
- raw-body "2.3.2"
- type-is "~1.6.15"
-
-boom@2.x.x:
- version "2.10.1"
- resolved "https://registry.yarnpkg.com/boom/-/boom-2.10.1.tgz#39c8918ceff5799f83f9492a848f625add0c766f"
- dependencies:
- hoek "2.x.x"
-
-boom@4.x.x:
- version "4.3.1"
- resolved "https://registry.yarnpkg.com/boom/-/boom-4.3.1.tgz#4f8a3005cb4a7e3889f749030fd25b96e01d2e31"
- dependencies:
- hoek "4.x.x"
-
-boom@5.x.x:
- version "5.2.0"
- resolved "https://registry.yarnpkg.com/boom/-/boom-5.2.0.tgz#5dd9da6ee3a5f302077436290cb717d3f4a54e02"
- dependencies:
- hoek "4.x.x"
-
-brace-expansion@^1.1.7:
- version "1.1.11"
- resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd"
- dependencies:
- balanced-match "^1.0.0"
- concat-map "0.0.1"
-
-braces@^0.1.2:
- version "0.1.5"
- resolved "https://registry.yarnpkg.com/braces/-/braces-0.1.5.tgz#c085711085291d8b75fdd74eab0f8597280711e6"
- dependencies:
- expand-range "^0.1.0"
-
-braces@^1.8.2:
- version "1.8.5"
- resolved "https://registry.yarnpkg.com/braces/-/braces-1.8.5.tgz#ba77962e12dff969d6b76711e914b737857bf6a7"
- dependencies:
- expand-range "^1.8.1"
- preserve "^0.2.0"
- repeat-element "^1.1.2"
-
-braces@^2.3.0, braces@^2.3.1:
- version "2.3.1"
- resolved "https://registry.yarnpkg.com/braces/-/braces-2.3.1.tgz#7086c913b4e5a08dbe37ac0ee6a2500c4ba691bb"
- dependencies:
- arr-flatten "^1.1.0"
- array-unique "^0.3.2"
- define-property "^1.0.0"
- extend-shallow "^2.0.1"
- fill-range "^4.0.0"
- isobject "^3.0.1"
- kind-of "^6.0.2"
- repeat-element "^1.1.2"
- snapdragon "^0.8.1"
- snapdragon-node "^2.0.1"
- split-string "^3.0.2"
- to-regex "^3.0.1"
-
-brorand@^1.0.1:
- version "1.1.0"
- resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f"
-
-browser-pack@^6.0.1:
- version "6.0.4"
- resolved "https://registry.yarnpkg.com/browser-pack/-/browser-pack-6.0.4.tgz#9a73beb3b48f9e36868be007b64400102c04a99f"
- dependencies:
- JSONStream "^1.0.3"
- combine-source-map "~0.8.0"
- defined "^1.0.0"
- safe-buffer "^5.1.1"
- through2 "^2.0.0"
- umd "^3.0.0"
-
-browser-process-hrtime@^0.1.2:
- version "0.1.2"
- resolved "https://registry.yarnpkg.com/browser-process-hrtime/-/browser-process-hrtime-0.1.2.tgz#425d68a58d3447f02a04aa894187fce8af8b7b8e"
-
-browser-resolve@^1.11.0, browser-resolve@^1.11.2, browser-resolve@^1.7.0:
- version "1.11.2"
- resolved "https://registry.yarnpkg.com/browser-resolve/-/browser-resolve-1.11.2.tgz#8ff09b0a2c421718a1051c260b32e48f442938ce"
- dependencies:
- resolve "1.1.7"
-
-browserify-aes@^1.0.0, browserify-aes@^1.0.4:
- version "1.1.1"
- resolved "https://registry.yarnpkg.com/browserify-aes/-/browserify-aes-1.1.1.tgz#38b7ab55edb806ff2dcda1a7f1620773a477c49f"
- dependencies:
- buffer-xor "^1.0.3"
- cipher-base "^1.0.0"
- create-hash "^1.1.0"
- evp_bytestokey "^1.0.3"
- inherits "^2.0.1"
- safe-buffer "^5.0.1"
-
-browserify-cipher@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/browserify-cipher/-/browserify-cipher-1.0.0.tgz#9988244874bf5ed4e28da95666dcd66ac8fc363a"
- dependencies:
- browserify-aes "^1.0.4"
- browserify-des "^1.0.0"
- evp_bytestokey "^1.0.0"
-
-browserify-des@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/browserify-des/-/browserify-des-1.0.0.tgz#daa277717470922ed2fe18594118a175439721dd"
- dependencies:
- cipher-base "^1.0.1"
- des.js "^1.0.0"
- inherits "^2.0.1"
-
-browserify-rsa@^4.0.0:
- version "4.0.1"
- resolved "https://registry.yarnpkg.com/browserify-rsa/-/browserify-rsa-4.0.1.tgz#21e0abfaf6f2029cf2fafb133567a701d4135524"
- dependencies:
- bn.js "^4.1.0"
- randombytes "^2.0.1"
-
-browserify-sign@^4.0.0:
- version "4.0.4"
- resolved "https://registry.yarnpkg.com/browserify-sign/-/browserify-sign-4.0.4.tgz#aa4eb68e5d7b658baa6bf6a57e630cbd7a93d298"
- dependencies:
- bn.js "^4.1.1"
- browserify-rsa "^4.0.0"
- create-hash "^1.1.0"
- create-hmac "^1.1.2"
- elliptic "^6.0.0"
- inherits "^2.0.1"
- parse-asn1 "^5.0.0"
-
-browserify-zlib@^0.2.0, browserify-zlib@~0.2.0:
- version "0.2.0"
- resolved "https://registry.yarnpkg.com/browserify-zlib/-/browserify-zlib-0.2.0.tgz#2869459d9aa3be245fe8fe2ca1f46e2e7f54d73f"
- dependencies:
- pako "~1.0.5"
-
-browserify@^14.5.0:
- version "14.5.0"
- resolved "https://registry.yarnpkg.com/browserify/-/browserify-14.5.0.tgz#0bbbce521acd6e4d1d54d8e9365008efb85a9cc5"
- dependencies:
- JSONStream "^1.0.3"
- assert "^1.4.0"
- browser-pack "^6.0.1"
- browser-resolve "^1.11.0"
- browserify-zlib "~0.2.0"
- buffer "^5.0.2"
- cached-path-relative "^1.0.0"
- concat-stream "~1.5.1"
- console-browserify "^1.1.0"
- constants-browserify "~1.0.0"
- crypto-browserify "^3.0.0"
- defined "^1.0.0"
- deps-sort "^2.0.0"
- domain-browser "~1.1.0"
- duplexer2 "~0.1.2"
- events "~1.1.0"
- glob "^7.1.0"
- has "^1.0.0"
- htmlescape "^1.1.0"
- https-browserify "^1.0.0"
- inherits "~2.0.1"
- insert-module-globals "^7.0.0"
- labeled-stream-splicer "^2.0.0"
- module-deps "^4.0.8"
- os-browserify "~0.3.0"
- parents "^1.0.1"
- path-browserify "~0.0.0"
- process "~0.11.0"
- punycode "^1.3.2"
- querystring-es3 "~0.2.0"
- read-only-stream "^2.0.0"
- readable-stream "^2.0.2"
- resolve "^1.1.4"
- shasum "^1.0.0"
- shell-quote "^1.6.1"
- stream-browserify "^2.0.0"
- stream-http "^2.0.0"
- string_decoder "~1.0.0"
- subarg "^1.0.0"
- syntax-error "^1.1.1"
- through2 "^2.0.0"
- timers-browserify "^1.0.1"
- tty-browserify "~0.0.0"
- url "~0.11.0"
- util "~0.10.1"
- vm-browserify "~0.0.1"
- xtend "^4.0.0"
-
-bser@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/bser/-/bser-2.0.0.tgz#9ac78d3ed5d915804fd87acb158bc797147a1719"
- dependencies:
- node-int64 "^0.4.0"
-
-buble-loader@^0.4.1:
- version "0.4.1"
- resolved "https://registry.yarnpkg.com/buble-loader/-/buble-loader-0.4.1.tgz#45a4fe43ccc500835e99ae38ef17df4390ca66b9"
- dependencies:
- buble "^0.15.0"
- loader-utils "^0.2.15"
- webpack "*"
-
-buble@^0.15.0:
- version "0.15.2"
- resolved "https://registry.yarnpkg.com/buble/-/buble-0.15.2.tgz#547fc47483f8e5e8176d82aa5ebccb183b02d613"
- dependencies:
- acorn "^3.3.0"
- acorn-jsx "^3.0.1"
- acorn-object-spread "^1.0.0"
- chalk "^1.1.3"
- magic-string "^0.14.0"
- minimist "^1.2.0"
- os-homedir "^1.0.1"
-
-buble@^0.19.1, buble@^0.19.2:
- version "0.19.3"
- resolved "https://registry.yarnpkg.com/buble/-/buble-0.19.3.tgz#01e9412062cff1da6f20342b6ecd72e7bf699d02"
- dependencies:
- acorn "^5.4.1"
- acorn-dynamic-import "^3.0.0"
- acorn-jsx "^4.1.1"
- chalk "^2.3.1"
- magic-string "^0.22.4"
- minimist "^1.2.0"
- os-homedir "^1.0.1"
- vlq "^1.0.0"
-
-buffer-more-ints@0.0.2:
- version "0.0.2"
- resolved "https://registry.yarnpkg.com/buffer-more-ints/-/buffer-more-ints-0.0.2.tgz#26b3885d10fa13db7fc01aae3aab870199e0124c"
-
-buffer-xor@^1.0.3:
- version "1.0.3"
- resolved "https://registry.yarnpkg.com/buffer-xor/-/buffer-xor-1.0.3.tgz#26e61ed1422fb70dd42e6e36729ed51d855fe8d9"
-
-buffer@^4.3.0:
- version "4.9.1"
- resolved "https://registry.yarnpkg.com/buffer/-/buffer-4.9.1.tgz#6d1bb601b07a4efced97094132093027c95bc298"
- dependencies:
- base64-js "^1.0.2"
- ieee754 "^1.1.4"
- isarray "^1.0.0"
-
-buffer@^5.0.2:
- version "5.1.0"
- resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.1.0.tgz#c913e43678c7cb7c8bd16afbcddb6c5505e8f9fe"
- dependencies:
- base64-js "^1.0.2"
- ieee754 "^1.1.4"
-
-buildmail@4.0.1:
- version "4.0.1"
- resolved "https://registry.yarnpkg.com/buildmail/-/buildmail-4.0.1.tgz#877f7738b78729871c9a105e3b837d2be11a7a72"
- dependencies:
- addressparser "1.0.1"
- libbase64 "0.1.0"
- libmime "3.0.0"
- libqp "1.1.0"
- nodemailer-fetch "1.6.0"
- nodemailer-shared "1.1.0"
- punycode "1.4.1"
-
-builtin-modules@^1.0.0:
- version "1.1.1"
- resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f"
-
-builtin-status-codes@^3.0.0:
- version "3.0.0"
- resolved "https://registry.yarnpkg.com/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz#85982878e21b98e1c66425e03d0174788f569ee8"
-
-bytes@3.0.0:
- version "3.0.0"
- resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.0.0.tgz#d32815404d689699f85a4ea4fa8755dd13a96048"
-
-cacache@^10.0.1:
- version "10.0.4"
- resolved "https://registry.yarnpkg.com/cacache/-/cacache-10.0.4.tgz#6452367999eff9d4188aefd9a14e9d7c6a263460"
- dependencies:
- bluebird "^3.5.1"
- chownr "^1.0.1"
- glob "^7.1.2"
- graceful-fs "^4.1.11"
- lru-cache "^4.1.1"
- mississippi "^2.0.0"
- mkdirp "^0.5.1"
- move-concurrently "^1.0.1"
- promise-inflight "^1.0.1"
- rimraf "^2.6.2"
- ssri "^5.2.4"
- unique-filename "^1.1.0"
- y18n "^4.0.0"
-
-cache-base@^1.0.1:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/cache-base/-/cache-base-1.0.1.tgz#0a7f46416831c8b662ee36fe4e7c59d76f666ab2"
- dependencies:
- collection-visit "^1.0.0"
- component-emitter "^1.2.1"
- get-value "^2.0.6"
- has-value "^1.0.0"
- isobject "^3.0.1"
- set-value "^2.0.0"
- to-object-path "^0.3.0"
- union-value "^1.0.0"
- unset-value "^1.0.0"
-
-cacheable-request@^2.1.1:
- version "2.1.4"
- resolved "https://registry.yarnpkg.com/cacheable-request/-/cacheable-request-2.1.4.tgz#0d808801b6342ad33c91df9d0b44dc09b91e5c3d"
- dependencies:
- clone-response "1.0.2"
- get-stream "3.0.0"
- http-cache-semantics "3.8.1"
- keyv "3.0.0"
- lowercase-keys "1.0.0"
- normalize-url "2.0.1"
- responselike "1.0.2"
-
-cached-path-relative@^1.0.0:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/cached-path-relative/-/cached-path-relative-1.0.1.tgz#d09c4b52800aa4c078e2dd81a869aac90d2e54e7"
-
-caller-path@^0.1.0:
- version "0.1.0"
- resolved "https://registry.yarnpkg.com/caller-path/-/caller-path-0.1.0.tgz#94085ef63581ecd3daa92444a8fe94e82577751f"
- dependencies:
- callsites "^0.2.0"
-
-callsite@1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/callsite/-/callsite-1.0.0.tgz#280398e5d664bd74038b6f0905153e6e8af1bc20"
-
-callsites@^0.2.0:
- version "0.2.0"
- resolved "https://registry.yarnpkg.com/callsites/-/callsites-0.2.0.tgz#afab96262910a7f33c19a5775825c69f34e350ca"
-
-callsites@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/callsites/-/callsites-2.0.0.tgz#06eb84f00eea413da86affefacbffb36093b3c50"
-
-camelcase@^1.0.2:
- version "1.2.1"
- resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-1.2.1.tgz#9bb5304d2e0b56698b2c758b08a3eaa9daa58a39"
-
-camelcase@^4.1.0:
- version "4.1.0"
- resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-4.1.0.tgz#d545635be1e33c542649c69173e5de6acfae34dd"
-
-caseless@~0.11.0:
- version "0.11.0"
- resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.11.0.tgz#715b96ea9841593cc33067923f5ec60ebda4f7d7"
-
-caseless@~0.12.0:
- version "0.12.0"
- resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc"
-
-center-align@^0.1.1:
- version "0.1.3"
- resolved "https://registry.yarnpkg.com/center-align/-/center-align-0.1.3.tgz#aa0d32629b6ee972200411cbd4461c907bc2b7ad"
- dependencies:
- align-text "^0.1.3"
- lazy-cache "^1.0.3"
-
-chalk@^1.1.1, chalk@^1.1.3:
- version "1.1.3"
- resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98"
- dependencies:
- ansi-styles "^2.2.1"
- escape-string-regexp "^1.0.2"
- has-ansi "^2.0.0"
- strip-ansi "^3.0.0"
- supports-color "^2.0.0"
-
-chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0, chalk@^2.3.0, chalk@^2.3.1:
- version "2.3.2"
- resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.3.2.tgz#250dc96b07491bfd601e648d66ddf5f60c7a5c65"
- dependencies:
- ansi-styles "^3.2.1"
- escape-string-regexp "^1.0.5"
- supports-color "^5.3.0"
-
-chardet@^0.4.0:
- version "0.4.2"
- resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.4.2.tgz#b5473b33dc97c424e5d98dc87d55d4d8a29c8bf2"
-
-chokidar@^1.4.1:
- version "1.7.0"
- resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-1.7.0.tgz#798e689778151c8076b4b360e5edd28cda2bb468"
- dependencies:
- anymatch "^1.3.0"
- async-each "^1.0.0"
- glob-parent "^2.0.0"
- inherits "^2.0.1"
- is-binary-path "^1.0.0"
- is-glob "^2.0.0"
- path-is-absolute "^1.0.0"
- readdirp "^2.0.0"
- optionalDependencies:
- fsevents "^1.0.0"
-
-chokidar@^2.0.2:
- version "2.0.2"
- resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-2.0.2.tgz#4dc65139eeb2714977735b6a35d06e97b494dfd7"
- dependencies:
- anymatch "^2.0.0"
- async-each "^1.0.0"
- braces "^2.3.0"
- glob-parent "^3.1.0"
- inherits "^2.0.1"
- is-binary-path "^1.0.0"
- is-glob "^4.0.0"
- normalize-path "^2.1.1"
- path-is-absolute "^1.0.0"
- readdirp "^2.0.0"
- upath "^1.0.0"
- optionalDependencies:
- fsevents "^1.0.0"
-
-chownr@^1.0.1:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.0.1.tgz#e2a75042a9551908bebd25b8523d5f9769d79181"
-
-chrome-trace-event@^0.1.1:
- version "0.1.2"
- resolved "https://registry.yarnpkg.com/chrome-trace-event/-/chrome-trace-event-0.1.2.tgz#90f36885d5345a50621332f0717b595883d5d982"
-
-ci-info@^1.0.0:
- version "1.1.2"
- resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-1.1.2.tgz#03561259db48d0474c8bdc90f5b47b068b6bbfb4"
-
-cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3:
- version "1.0.4"
- resolved "https://registry.yarnpkg.com/cipher-base/-/cipher-base-1.0.4.tgz#8760e4ecc272f4c363532f926d874aae2c1397de"
- dependencies:
- inherits "^2.0.1"
- safe-buffer "^5.0.1"
-
-circular-json@^0.3.1:
- version "0.3.3"
- resolved "https://registry.yarnpkg.com/circular-json/-/circular-json-0.3.3.tgz#815c99ea84f6809529d2f45791bdf82711352d66"
-
-circular-json@^0.5.1:
- version "0.5.1"
- resolved "https://registry.yarnpkg.com/circular-json/-/circular-json-0.5.1.tgz#b8942a09e535863dc21b04417a91971e1d9cd91f"
-
-class-utils@^0.3.5:
- version "0.3.6"
- resolved "https://registry.yarnpkg.com/class-utils/-/class-utils-0.3.6.tgz#f93369ae8b9a7ce02fd41faad0ca83033190c463"
- dependencies:
- arr-union "^3.1.0"
- define-property "^0.2.5"
- isobject "^3.0.0"
- static-extend "^0.1.1"
-
-cli-cursor@^2.1.0:
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-2.1.0.tgz#b35dac376479facc3e94747d41d0d0f5238ffcb5"
- dependencies:
- restore-cursor "^2.0.0"
-
-cli-width@^2.0.0:
- version "2.2.0"
- resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.2.0.tgz#ff19ede8a9a5e579324147b0c11f0fbcbabed639"
-
-cliui@^2.1.0:
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/cliui/-/cliui-2.1.0.tgz#4b475760ff80264c762c3a1719032e91c7fea0d1"
- dependencies:
- center-align "^0.1.1"
- right-align "^0.1.1"
- wordwrap "0.0.2"
-
-cliui@^3.2.0:
- version "3.2.0"
- resolved "https://registry.yarnpkg.com/cliui/-/cliui-3.2.0.tgz#120601537a916d29940f934da3b48d585a39213d"
- dependencies:
- string-width "^1.0.1"
- strip-ansi "^3.0.1"
- wrap-ansi "^2.0.0"
-
-cliui@^4.0.0:
- version "4.0.0"
- resolved "https://registry.yarnpkg.com/cliui/-/cliui-4.0.0.tgz#743d4650e05f36d1ed2575b59638d87322bfbbcc"
- dependencies:
- string-width "^2.1.1"
- strip-ansi "^4.0.0"
- wrap-ansi "^2.0.0"
-
-clone-response@1.0.2:
- version "1.0.2"
- resolved "https://registry.yarnpkg.com/clone-response/-/clone-response-1.0.2.tgz#d1dc973920314df67fbeb94223b4ee350239e96b"
- dependencies:
- mimic-response "^1.0.0"
-
-co@^4.6.0:
- version "4.6.0"
- resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184"
-
-co@~3.0.6:
- version "3.0.6"
- resolved "https://registry.yarnpkg.com/co/-/co-3.0.6.tgz#1445f226c5eb956138e68c9ac30167ea7d2e6bda"
-
-code-point-at@^1.0.0:
- version "1.1.0"
- resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77"
-
-collection-visit@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/collection-visit/-/collection-visit-1.0.0.tgz#4bc0373c164bc3291b4d368c829cf1a80a59dca0"
- dependencies:
- map-visit "^1.0.0"
- object-visit "^1.0.0"
-
-color-convert@^1.9.0:
- version "1.9.1"
- resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.1.tgz#c1261107aeb2f294ebffec9ed9ecad529a6097ed"
- dependencies:
- color-name "^1.1.1"
-
-color-name@^1.1.1:
- version "1.1.3"
- resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25"
-
-colors@^1.1.0:
- version "1.1.2"
- resolved "https://registry.yarnpkg.com/colors/-/colors-1.1.2.tgz#168a4701756b6a7f51a12ce0c97bfa28c084ed63"
-
-combine-lists@^1.0.0:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/combine-lists/-/combine-lists-1.0.1.tgz#458c07e09e0d900fc28b70a3fec2dacd1d2cb7f6"
- dependencies:
- lodash "^4.5.0"
-
-combine-source-map@~0.7.1:
- version "0.7.2"
- resolved "https://registry.yarnpkg.com/combine-source-map/-/combine-source-map-0.7.2.tgz#0870312856b307a87cc4ac486f3a9a62aeccc09e"
- dependencies:
- convert-source-map "~1.1.0"
- inline-source-map "~0.6.0"
- lodash.memoize "~3.0.3"
- source-map "~0.5.3"
-
-combine-source-map@~0.8.0:
- version "0.8.0"
- resolved "https://registry.yarnpkg.com/combine-source-map/-/combine-source-map-0.8.0.tgz#a58d0df042c186fcf822a8e8015f5450d2d79a8b"
- dependencies:
- convert-source-map "~1.1.0"
- inline-source-map "~0.6.0"
- lodash.memoize "~3.0.3"
- source-map "~0.5.3"
-
-combined-stream@1.0.6, combined-stream@^1.0.5, combined-stream@~1.0.5:
- version "1.0.6"
- resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.6.tgz#723e7df6e801ac5613113a7e445a9b69cb632818"
- dependencies:
- delayed-stream "~1.0.0"
-
-commander@^2.9.0, commander@~2.14.1:
- version "2.14.1"
- resolved "https://registry.yarnpkg.com/commander/-/commander-2.14.1.tgz#2235123e37af8ca3c65df45b026dbd357b01b9aa"
-
-commander@~2.13.0:
- version "2.13.0"
- resolved "https://registry.yarnpkg.com/commander/-/commander-2.13.0.tgz#6964bca67685df7c1f1430c584f07d7597885b9c"
-
-commondir@^1.0.1:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b"
-
-component-bind@1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/component-bind/-/component-bind-1.0.0.tgz#00c608ab7dcd93897c0009651b1d3a8e1e73bbd1"
-
-component-emitter@1.2.1, component-emitter@^1.2.1:
- version "1.2.1"
- resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.2.1.tgz#137918d6d78283f7df7a6b7c5a63e140e69425e6"
-
-component-inherit@0.0.3:
- version "0.0.3"
- resolved "https://registry.yarnpkg.com/component-inherit/-/component-inherit-0.0.3.tgz#645fc4adf58b72b649d5cae65135619db26ff143"
-
-concat-map@0.0.1:
- version "0.0.1"
- resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"
-
-concat-stream@^1.5.0, concat-stream@^1.6.0:
- version "1.6.1"
- resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.1.tgz#261b8f518301f1d834e36342b9fea095d2620a26"
- dependencies:
- inherits "^2.0.3"
- readable-stream "^2.2.2"
- typedarray "^0.0.6"
-
-concat-stream@~1.5.0, concat-stream@~1.5.1:
- version "1.5.2"
- resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.5.2.tgz#708978624d856af41a5a741defdd261da752c266"
- dependencies:
- inherits "~2.0.1"
- readable-stream "~2.0.0"
- typedarray "~0.0.5"
-
-connect@^3.6.0:
- version "3.6.6"
- resolved "https://registry.yarnpkg.com/connect/-/connect-3.6.6.tgz#09eff6c55af7236e137135a72574858b6786f524"
- dependencies:
- debug "2.6.9"
- finalhandler "1.1.0"
- parseurl "~1.3.2"
- utils-merge "1.0.1"
-
-console-browserify@^1.1.0:
- version "1.1.0"
- resolved "https://registry.yarnpkg.com/console-browserify/-/console-browserify-1.1.0.tgz#f0241c45730a9fc6323b206dbf38edc741d0bb10"
- dependencies:
- date-now "^0.1.4"
-
-console-control-strings@^1.0.0, console-control-strings@~1.1.0:
- version "1.1.0"
- resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e"
-
-constants-browserify@^1.0.0, constants-browserify@~1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/constants-browserify/-/constants-browserify-1.0.0.tgz#c20b96d8c617748aaf1c16021760cd27fcb8cb75"
-
-content-type-parser@^1.0.2:
- version "1.0.2"
- resolved "https://registry.yarnpkg.com/content-type-parser/-/content-type-parser-1.0.2.tgz#caabe80623e63638b2502fd4c7f12ff4ce2352e7"
-
-content-type@~1.0.4:
- version "1.0.4"
- resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.4.tgz#e138cc75e040c727b1966fe5e5f8c9aee256fe3b"
-
-convert-source-map@^1.4.0, convert-source-map@^1.5.0:
- version "1.5.1"
- resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.5.1.tgz#b8278097b9bc229365de5c62cf5fcaed8b5599e5"
-
-convert-source-map@~1.1.0:
- version "1.1.3"
- resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.1.3.tgz#4829c877e9fe49b3161f3bf3673888e204699860"
-
-cookie@0.3.1:
- version "0.3.1"
- resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.3.1.tgz#e7e0a1f9ef43b4c8ba925c5c5a96e806d16873bb"
-
-copy-concurrently@^1.0.0:
- version "1.0.5"
- resolved "https://registry.yarnpkg.com/copy-concurrently/-/copy-concurrently-1.0.5.tgz#92297398cae34937fcafd6ec8139c18051f0b5e0"
- dependencies:
- aproba "^1.1.1"
- fs-write-stream-atomic "^1.0.8"
- iferr "^0.1.5"
- mkdirp "^0.5.1"
- rimraf "^2.5.4"
- run-queue "^1.0.0"
-
-copy-descriptor@^0.1.0:
- version "0.1.1"
- resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d"
-
-core-js@^2.2.0, core-js@^2.4.0, core-js@^2.5.0:
- version "2.5.3"
- resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.5.3.tgz#8acc38345824f16d8365b7c9b4259168e8ed603e"
-
-core-util-is@1.0.2, core-util-is@~1.0.0:
- version "1.0.2"
- resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7"
-
-create-ecdh@^4.0.0:
- version "4.0.0"
- resolved "https://registry.yarnpkg.com/create-ecdh/-/create-ecdh-4.0.0.tgz#888c723596cdf7612f6498233eebd7a35301737d"
- dependencies:
- bn.js "^4.1.0"
- elliptic "^6.0.0"
-
-create-hash@^1.1.0, create-hash@^1.1.2:
- version "1.1.3"
- resolved "https://registry.yarnpkg.com/create-hash/-/create-hash-1.1.3.tgz#606042ac8b9262750f483caddab0f5819172d8fd"
- dependencies:
- cipher-base "^1.0.1"
- inherits "^2.0.1"
- ripemd160 "^2.0.0"
- sha.js "^2.4.0"
-
-create-hmac@^1.1.0, create-hmac@^1.1.2, create-hmac@^1.1.4:
- version "1.1.6"
- resolved "https://registry.yarnpkg.com/create-hmac/-/create-hmac-1.1.6.tgz#acb9e221a4e17bdb076e90657c42b93e3726cf06"
- dependencies:
- cipher-base "^1.0.3"
- create-hash "^1.1.0"
- inherits "^2.0.1"
- ripemd160 "^2.0.0"
- safe-buffer "^5.0.1"
- sha.js "^2.4.8"
-
-cross-spawn@^5.0.1, cross-spawn@^5.1.0:
- version "5.1.0"
- resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449"
- dependencies:
- lru-cache "^4.0.1"
- shebang-command "^1.2.0"
- which "^1.2.9"
-
-cryptiles@2.x.x:
- version "2.0.5"
- resolved "https://registry.yarnpkg.com/cryptiles/-/cryptiles-2.0.5.tgz#3bdfecdc608147c1c67202fa291e7dca59eaa3b8"
- dependencies:
- boom "2.x.x"
-
-cryptiles@3.x.x:
- version "3.1.2"
- resolved "https://registry.yarnpkg.com/cryptiles/-/cryptiles-3.1.2.tgz#a89fbb220f5ce25ec56e8c4aa8a4fd7b5b0d29fe"
- dependencies:
- boom "5.x.x"
-
-crypto-browserify@^3.0.0, crypto-browserify@^3.11.0:
- version "3.12.0"
- resolved "https://registry.yarnpkg.com/crypto-browserify/-/crypto-browserify-3.12.0.tgz#396cf9f3137f03e4b8e532c58f698254e00f80ec"
- dependencies:
- browserify-cipher "^1.0.0"
- browserify-sign "^4.0.0"
- create-ecdh "^4.0.0"
- create-hash "^1.1.0"
- create-hmac "^1.1.0"
- diffie-hellman "^5.0.0"
- inherits "^2.0.1"
- pbkdf2 "^3.0.3"
- public-encrypt "^4.0.0"
- randombytes "^2.0.0"
- randomfill "^1.0.3"
-
-cssom@0.3.x, "cssom@>= 0.3.2 < 0.4.0":
- version "0.3.2"
- resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.3.2.tgz#b8036170c79f07a90ff2f16e22284027a243848b"
-
-"cssstyle@>= 0.2.37 < 0.3.0":
- version "0.2.37"
- resolved "https://registry.yarnpkg.com/cssstyle/-/cssstyle-0.2.37.tgz#541097234cb2513c83ceed3acddc27ff27987d54"
- dependencies:
- cssom "0.3.x"
-
-custom-event@~1.0.0:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/custom-event/-/custom-event-1.0.1.tgz#5d02a46850adf1b4a317946a3928fccb5bfd0425"
-
-cyclist@~0.2.2:
- version "0.2.2"
- resolved "https://registry.yarnpkg.com/cyclist/-/cyclist-0.2.2.tgz#1b33792e11e914a2fd6d6ed6447464444e5fa640"
-
-d@1:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/d/-/d-1.0.0.tgz#754bb5bfe55451da69a58b94d45f4c5b0462d58f"
- dependencies:
- es5-ext "^0.10.9"
-
-dashdash@^1.12.0:
- version "1.14.1"
- resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0"
- dependencies:
- assert-plus "^1.0.0"
-
-data-uri-to-buffer@1:
- version "1.2.0"
- resolved "https://registry.yarnpkg.com/data-uri-to-buffer/-/data-uri-to-buffer-1.2.0.tgz#77163ea9c20d8641b4707e8f18abdf9a78f34835"
-
-date-format@^1.2.0:
- version "1.2.0"
- resolved "https://registry.yarnpkg.com/date-format/-/date-format-1.2.0.tgz#615e828e233dd1ab9bb9ae0950e0ceccfa6ecad8"
-
-date-now@^0.1.4:
- version "0.1.4"
- resolved "https://registry.yarnpkg.com/date-now/-/date-now-0.1.4.tgz#eaf439fd4d4848ad74e5cc7dbef200672b9e345b"
-
-debug@2, debug@2.6.9, debug@^2.2.0, debug@^2.3.3, debug@^2.6.8, debug@~2.6.4, debug@~2.6.6:
- version "2.6.9"
- resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f"
- dependencies:
- ms "2.0.0"
-
-debug@^3.1.0, debug@~3.1.0:
- version "3.1.0"
- resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261"
- dependencies:
- ms "2.0.0"
-
-debug@~2.2.0:
- version "2.2.0"
- resolved "https://registry.yarnpkg.com/debug/-/debug-2.2.0.tgz#f87057e995b1a1f6ae6a4960664137bc56f039da"
- dependencies:
- ms "0.7.1"
-
-decamelize@^1.0.0, decamelize@^1.1.1:
- version "1.2.0"
- resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290"
-
-decode-uri-component@^0.2.0:
- version "0.2.0"
- resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545"
-
-decompress-response@^3.3.0:
- version "3.3.0"
- resolved "https://registry.yarnpkg.com/decompress-response/-/decompress-response-3.3.0.tgz#80a4dd323748384bfa248083622aedec982adff3"
- dependencies:
- mimic-response "^1.0.0"
-
-deep-extend@~0.4.0:
- version "0.4.2"
- resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.4.2.tgz#48b699c27e334bf89f10892be432f6e4c7d34a7f"
-
-deep-is@~0.1.3:
- version "0.1.3"
- resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34"
-
-default-require-extensions@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/default-require-extensions/-/default-require-extensions-1.0.0.tgz#f37ea15d3e13ffd9b437d33e1a75b5fb97874cb8"
- dependencies:
- strip-bom "^2.0.0"
-
-define-properties@^1.1.2:
- version "1.1.2"
- resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.2.tgz#83a73f2fea569898fb737193c8f873caf6d45c94"
- dependencies:
- foreach "^2.0.5"
- object-keys "^1.0.8"
-
-define-property@^0.2.5:
- version "0.2.5"
- resolved "https://registry.yarnpkg.com/define-property/-/define-property-0.2.5.tgz#c35b1ef918ec3c990f9a5bc57be04aacec5c8116"
- dependencies:
- is-descriptor "^0.1.0"
-
-define-property@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/define-property/-/define-property-1.0.0.tgz#769ebaaf3f4a63aad3af9e8d304c9bbe79bfb0e6"
- dependencies:
- is-descriptor "^1.0.0"
-
-define-property@^2.0.2:
- version "2.0.2"
- resolved "https://registry.yarnpkg.com/define-property/-/define-property-2.0.2.tgz#d459689e8d654ba77e02a817f8710d702cb16e9d"
- dependencies:
- is-descriptor "^1.0.2"
- isobject "^3.0.1"
-
-defined@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/defined/-/defined-1.0.0.tgz#c98d9bcef75674188e110969151199e39b1fa693"
-
-degenerator@~1.0.2:
- version "1.0.4"
- resolved "https://registry.yarnpkg.com/degenerator/-/degenerator-1.0.4.tgz#fcf490a37ece266464d9cc431ab98c5819ced095"
- dependencies:
- ast-types "0.x.x"
- escodegen "1.x.x"
- esprima "3.x.x"
-
-del@^2.0.2:
- version "2.2.2"
- resolved "https://registry.yarnpkg.com/del/-/del-2.2.2.tgz#c12c981d067846c84bcaf862cff930d907ffd1a8"
- dependencies:
- globby "^5.0.0"
- is-path-cwd "^1.0.0"
- is-path-in-cwd "^1.0.0"
- object-assign "^4.0.1"
- pify "^2.0.0"
- pinkie-promise "^2.0.0"
- rimraf "^2.2.8"
-
-delayed-stream@~1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619"
-
-delegates@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a"
-
-depd@1.1.1:
- version "1.1.1"
- resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.1.tgz#5783b4e1c459f06fa5ca27f991f3d06e7a310359"
-
-depd@~1.1.1:
- version "1.1.2"
- resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9"
-
-deps-sort@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/deps-sort/-/deps-sort-2.0.0.tgz#091724902e84658260eb910748cccd1af6e21fb5"
- dependencies:
- JSONStream "^1.0.3"
- shasum "^1.0.0"
- subarg "^1.0.0"
- through2 "^2.0.0"
-
-des.js@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/des.js/-/des.js-1.0.0.tgz#c074d2e2aa6a8a9a07dbd61f9a15c2cd83ec8ecc"
- dependencies:
- inherits "^2.0.1"
- minimalistic-assert "^1.0.0"
-
-detect-indent@^4.0.0:
- version "4.0.0"
- resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-4.0.0.tgz#f76d064352cdf43a1cb6ce619c4ee3a9475de208"
- dependencies:
- repeating "^2.0.0"
-
-detect-libc@^1.0.2:
- version "1.0.3"
- resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b"
-
-detect-newline@^2.1.0:
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-2.1.0.tgz#f41f1c10be4b00e87b5f13da680759f2c5bfd3e2"
-
-detective@^4.0.0:
- version "4.7.1"
- resolved "https://registry.yarnpkg.com/detective/-/detective-4.7.1.tgz#0eca7314338442febb6d65da54c10bb1c82b246e"
- dependencies:
- acorn "^5.2.1"
- defined "^1.0.0"
-
-di@^0.0.1:
- version "0.0.1"
- resolved "https://registry.yarnpkg.com/di/-/di-0.0.1.tgz#806649326ceaa7caa3306d75d985ea2748ba913c"
-
-diff@^3.2.0:
- version "3.4.0"
- resolved "https://registry.yarnpkg.com/diff/-/diff-3.4.0.tgz#b1d85507daf3964828de54b37d0d73ba67dda56c"
-
-diffie-hellman@^5.0.0:
- version "5.0.2"
- resolved "https://registry.yarnpkg.com/diffie-hellman/-/diffie-hellman-5.0.2.tgz#b5835739270cfe26acf632099fded2a07f209e5e"
- dependencies:
- bn.js "^4.1.0"
- miller-rabin "^4.0.0"
- randombytes "^2.0.0"
-
-doctrine@^2.1.0:
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-2.1.0.tgz#5cd01fc101621b42c4cd7f5d1a66243716d3f39d"
- dependencies:
- esutils "^2.0.2"
-
-dom-serialize@^2.2.0:
- version "2.2.1"
- resolved "https://registry.yarnpkg.com/dom-serialize/-/dom-serialize-2.2.1.tgz#562ae8999f44be5ea3076f5419dcd59eb43ac95b"
- dependencies:
- custom-event "~1.0.0"
- ent "~2.2.0"
- extend "^3.0.0"
- void-elements "^2.0.0"
-
-domain-browser@^1.1.1:
- version "1.2.0"
- resolved "https://registry.yarnpkg.com/domain-browser/-/domain-browser-1.2.0.tgz#3d31f50191a6749dd1375a7f522e823d42e54eda"
-
-domain-browser@~1.1.0:
- version "1.1.7"
- resolved "https://registry.yarnpkg.com/domain-browser/-/domain-browser-1.1.7.tgz#867aa4b093faa05f1de08c06f4d7b21fdf8698bc"
-
-domexception@^1.0.0:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/domexception/-/domexception-1.0.1.tgz#937442644ca6a31261ef36e3ec677fe805582c90"
- dependencies:
- webidl-conversions "^4.0.2"
-
-double-ended-queue@^2.1.0-0:
- version "2.1.0-0"
- resolved "https://registry.yarnpkg.com/double-ended-queue/-/double-ended-queue-2.1.0-0.tgz#103d3527fd31528f40188130c841efdd78264e5c"
-
-duplexer2@^0.1.2, duplexer2@~0.1.0, duplexer2@~0.1.2:
- version "0.1.4"
- resolved "https://registry.yarnpkg.com/duplexer2/-/duplexer2-0.1.4.tgz#8b12dab878c0d69e3e7891051662a32fc6bddcc1"
- dependencies:
- readable-stream "^2.0.2"
-
-duplexer3@^0.1.4:
- version "0.1.4"
- resolved "https://registry.yarnpkg.com/duplexer3/-/duplexer3-0.1.4.tgz#ee01dd1cac0ed3cbc7fdbea37dc0a8f1ce002ce2"
-
-duplexify@^3.4.2, duplexify@^3.5.3:
- version "3.5.4"
- resolved "https://registry.yarnpkg.com/duplexify/-/duplexify-3.5.4.tgz#4bb46c1796eabebeec4ca9a2e66b808cb7a3d8b4"
- dependencies:
- end-of-stream "^1.0.0"
- inherits "^2.0.1"
- readable-stream "^2.0.0"
- stream-shift "^1.0.0"
-
-ecc-jsbn@~0.1.1:
- version "0.1.1"
- resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz#0fc73a9ed5f0d53c38193398523ef7e543777505"
- dependencies:
- jsbn "~0.1.0"
-
-ee-first@1.1.1:
- version "1.1.1"
- resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d"
-
-elliptic@^6.0.0:
- version "6.4.0"
- resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.4.0.tgz#cac9af8762c85836187003c8dfe193e5e2eae5df"
- dependencies:
- bn.js "^4.4.0"
- brorand "^1.0.1"
- hash.js "^1.0.0"
- hmac-drbg "^1.0.0"
- inherits "^2.0.1"
- minimalistic-assert "^1.0.0"
- minimalistic-crypto-utils "^1.0.0"
-
-emojis-list@^2.0.0:
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-2.1.0.tgz#4daa4d9db00f9819880c79fa457ae5b09a1fd389"
-
-encodeurl@~1.0.1:
- version "1.0.2"
- resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59"
-
-end-of-stream@^1.0.0, end-of-stream@^1.1.0:
- version "1.4.1"
- resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.1.tgz#ed29634d19baba463b6ce6b80a37213eab71ec43"
- dependencies:
- once "^1.4.0"
-
-engine.io-client@~3.1.0:
- version "3.1.5"
- resolved "https://registry.yarnpkg.com/engine.io-client/-/engine.io-client-3.1.5.tgz#85de17666560327ef1817978f6e3f8101ded2c47"
- dependencies:
- component-emitter "1.2.1"
- component-inherit "0.0.3"
- debug "~3.1.0"
- engine.io-parser "~2.1.1"
- has-cors "1.1.0"
- indexof "0.0.1"
- parseqs "0.0.5"
- parseuri "0.0.5"
- ws "~3.3.1"
- xmlhttprequest-ssl "~1.5.4"
- yeast "0.1.2"
-
-engine.io-parser@~2.1.0, engine.io-parser@~2.1.1:
- version "2.1.2"
- resolved "https://registry.yarnpkg.com/engine.io-parser/-/engine.io-parser-2.1.2.tgz#4c0f4cff79aaeecbbdcfdea66a823c6085409196"
- dependencies:
- after "0.8.2"
- arraybuffer.slice "~0.0.7"
- base64-arraybuffer "0.1.5"
- blob "0.0.4"
- has-binary2 "~1.0.2"
-
-engine.io@~3.1.0:
- version "3.1.5"
- resolved "https://registry.yarnpkg.com/engine.io/-/engine.io-3.1.5.tgz#0e7ef9d690eb0b35597f1d4ad02a26ca2dba3845"
- dependencies:
- accepts "~1.3.4"
- base64id "1.0.0"
- cookie "0.3.1"
- debug "~3.1.0"
- engine.io-parser "~2.1.0"
- ws "~3.3.1"
- optionalDependencies:
- uws "~9.14.0"
-
-enhanced-resolve@^3.4.0:
- version "3.4.1"
- resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-3.4.1.tgz#0421e339fd71419b3da13d129b3979040230476e"
- dependencies:
- graceful-fs "^4.1.2"
- memory-fs "^0.4.0"
- object-assign "^4.0.1"
- tapable "^0.2.7"
-
-enhanced-resolve@^4.0.0:
- version "4.0.0"
- resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-4.0.0.tgz#e34a6eaa790f62fccd71d93959f56b2b432db10a"
- dependencies:
- graceful-fs "^4.1.2"
- memory-fs "^0.4.0"
- tapable "^1.0.0"
-
-ent@~2.2.0:
- version "2.2.0"
- resolved "https://registry.yarnpkg.com/ent/-/ent-2.2.0.tgz#e964219325a21d05f44466a2f686ed6ce5f5dd1d"
-
-errno@^0.1.3, errno@~0.1.7:
- version "0.1.7"
- resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.7.tgz#4684d71779ad39af177e3f007996f7c67c852618"
- dependencies:
- prr "~1.0.1"
-
-error-ex@^1.2.0:
- version "1.3.1"
- resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.1.tgz#f855a86ce61adc4e8621c3cda21e7a7612c3a8dc"
- dependencies:
- is-arrayish "^0.2.1"
-
-es-abstract@^1.5.1:
- version "1.10.0"
- resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.10.0.tgz#1ecb36c197842a00d8ee4c2dfd8646bb97d60864"
- dependencies:
- es-to-primitive "^1.1.1"
- function-bind "^1.1.1"
- has "^1.0.1"
- is-callable "^1.1.3"
- is-regex "^1.0.4"
-
-es-to-primitive@^1.1.1:
- version "1.1.1"
- resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.1.1.tgz#45355248a88979034b6792e19bb81f2b7975dd0d"
- dependencies:
- is-callable "^1.1.1"
- is-date-object "^1.0.1"
- is-symbol "^1.0.1"
-
-es5-ext@^0.10.14, es5-ext@^0.10.35, es5-ext@^0.10.9, es5-ext@~0.10.14:
- version "0.10.39"
- resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.39.tgz#fca21b67559277ca4ac1a1ed7048b107b6f76d87"
- dependencies:
- es6-iterator "~2.0.3"
- es6-symbol "~3.1.1"
-
-es6-iterator@^2.0.1, es6-iterator@~2.0.1, es6-iterator@~2.0.3:
- version "2.0.3"
- resolved "https://registry.yarnpkg.com/es6-iterator/-/es6-iterator-2.0.3.tgz#a7de889141a05a94b0854403b2d0a0fbfa98f3b7"
- dependencies:
- d "1"
- es5-ext "^0.10.35"
- es6-symbol "^3.1.1"
-
-es6-map@^0.1.3:
- version "0.1.5"
- resolved "https://registry.yarnpkg.com/es6-map/-/es6-map-0.1.5.tgz#9136e0503dcc06a301690f0bb14ff4e364e949f0"
- dependencies:
- d "1"
- es5-ext "~0.10.14"
- es6-iterator "~2.0.1"
- es6-set "~0.1.5"
- es6-symbol "~3.1.1"
- event-emitter "~0.3.5"
-
-es6-set@~0.1.5:
- version "0.1.5"
- resolved "https://registry.yarnpkg.com/es6-set/-/es6-set-0.1.5.tgz#d2b3ec5d4d800ced818db538d28974db0a73ccb1"
- dependencies:
- d "1"
- es5-ext "~0.10.14"
- es6-iterator "~2.0.1"
- es6-symbol "3.1.1"
- event-emitter "~0.3.5"
-
-es6-symbol@3.1.1, es6-symbol@^3.1.1, es6-symbol@~3.1.1:
- version "3.1.1"
- resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.1.tgz#bf00ef4fdab6ba1b46ecb7b629b4c7ed5715cc77"
- dependencies:
- d "1"
- es5-ext "~0.10.14"
-
-es6-weak-map@^2.0.1:
- version "2.0.2"
- resolved "https://registry.yarnpkg.com/es6-weak-map/-/es6-weak-map-2.0.2.tgz#5e3ab32251ffd1538a1f8e5ffa1357772f92d96f"
- dependencies:
- d "1"
- es5-ext "^0.10.14"
- es6-iterator "^2.0.1"
- es6-symbol "^3.1.1"
-
-escape-html@~1.0.3:
- version "1.0.3"
- resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988"
-
-escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5:
- version "1.0.5"
- resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4"
-
-escodegen@1.x.x, escodegen@^1.9.0:
- version "1.9.1"
- resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.9.1.tgz#dbae17ef96c8e4bedb1356f4504fa4cc2f7cb7e2"
- dependencies:
- esprima "^3.1.3"
- estraverse "^4.2.0"
- esutils "^2.0.2"
- optionator "^0.8.1"
- optionalDependencies:
- source-map "~0.6.1"
-
-escope@^3.6.0:
- version "3.6.0"
- resolved "https://registry.yarnpkg.com/escope/-/escope-3.6.0.tgz#e01975e812781a163a6dadfdd80398dc64c889c3"
- dependencies:
- es6-map "^0.1.3"
- es6-weak-map "^2.0.1"
- esrecurse "^4.1.0"
- estraverse "^4.1.1"
-
-eslint-scope@^3.7.1:
- version "3.7.1"
- resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-3.7.1.tgz#3d63c3edfda02e06e01a452ad88caacc7cdcb6e8"
- dependencies:
- esrecurse "^4.1.0"
- estraverse "^4.1.1"
-
-eslint-visitor-keys@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz#3f3180fb2e291017716acb4c9d6d5b5c34a6a81d"
-
-eslint@^4.17.0:
- version "4.18.2"
- resolved "https://registry.yarnpkg.com/eslint/-/eslint-4.18.2.tgz#0f81267ad1012e7d2051e186a9004cc2267b8d45"
- dependencies:
- ajv "^5.3.0"
- babel-code-frame "^6.22.0"
- chalk "^2.1.0"
- concat-stream "^1.6.0"
- cross-spawn "^5.1.0"
- debug "^3.1.0"
- doctrine "^2.1.0"
- eslint-scope "^3.7.1"
- eslint-visitor-keys "^1.0.0"
- espree "^3.5.2"
- esquery "^1.0.0"
- esutils "^2.0.2"
- file-entry-cache "^2.0.0"
- functional-red-black-tree "^1.0.1"
- glob "^7.1.2"
- globals "^11.0.1"
- ignore "^3.3.3"
- imurmurhash "^0.1.4"
- inquirer "^3.0.6"
- is-resolvable "^1.0.0"
- js-yaml "^3.9.1"
- json-stable-stringify-without-jsonify "^1.0.1"
- levn "^0.3.0"
- lodash "^4.17.4"
- minimatch "^3.0.2"
- mkdirp "^0.5.1"
- natural-compare "^1.4.0"
- optionator "^0.8.2"
- path-is-inside "^1.0.2"
- pluralize "^7.0.0"
- progress "^2.0.0"
- require-uncached "^1.0.3"
- semver "^5.3.0"
- strip-ansi "^4.0.0"
- strip-json-comments "~2.0.1"
- table "4.0.2"
- text-table "~0.2.0"
-
-espree@^3.5.2:
- version "3.5.3"
- resolved "https://registry.yarnpkg.com/espree/-/espree-3.5.3.tgz#931e0af64e7fbbed26b050a29daad1fc64799fa6"
- dependencies:
- acorn "^5.4.0"
- acorn-jsx "^3.0.0"
-
-esprima@3.x.x, esprima@^3.1.3:
- version "3.1.3"
- resolved "https://registry.yarnpkg.com/esprima/-/esprima-3.1.3.tgz#fdca51cee6133895e3c88d535ce49dbff62a4633"
-
-esprima@^4.0.0:
- version "4.0.0"
- resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.0.tgz#4499eddcd1110e0b218bacf2fa7f7f59f55ca804"
-
-esquery@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.0.0.tgz#cfba8b57d7fba93f17298a8a006a04cda13d80fa"
- dependencies:
- estraverse "^4.0.0"
-
-esrecurse@^4.1.0:
- version "4.2.1"
- resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.2.1.tgz#007a3b9fdbc2b3bb87e4879ea19c92fdbd3942cf"
- dependencies:
- estraverse "^4.1.0"
-
-estraverse@^4.0.0, estraverse@^4.1.0, estraverse@^4.1.1, estraverse@^4.2.0:
- version "4.2.0"
- resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.2.0.tgz#0dee3fed31fcd469618ce7342099fc1afa0bdb13"
-
-estree-walker@^0.3.0:
- version "0.3.1"
- resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-0.3.1.tgz#e6b1a51cf7292524e7237c312e5fe6660c1ce1aa"
-
-esutils@^2.0.2:
- version "2.0.2"
- resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b"
-
-event-emitter@~0.3.5:
- version "0.3.5"
- resolved "https://registry.yarnpkg.com/event-emitter/-/event-emitter-0.3.5.tgz#df8c69eef1647923c7157b9ce83840610b02cc39"
- dependencies:
- d "1"
- es5-ext "~0.10.14"
-
-eventemitter3@1.x.x:
- version "1.2.0"
- resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-1.2.0.tgz#1c86991d816ad1e504750e73874224ecf3bec508"
-
-events@^1.0.0, events@~1.1.0:
- version "1.1.1"
- resolved "https://registry.yarnpkg.com/events/-/events-1.1.1.tgz#9ebdb7635ad099c70dcc4c2a1f5004288e8bd924"
-
-evp_bytestokey@^1.0.0, evp_bytestokey@^1.0.3:
- version "1.0.3"
- resolved "https://registry.yarnpkg.com/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz#7fcbdb198dc71959432efe13842684e0525acb02"
- dependencies:
- md5.js "^1.3.4"
- safe-buffer "^5.1.1"
-
-exec-sh@^0.2.0:
- version "0.2.1"
- resolved "https://registry.yarnpkg.com/exec-sh/-/exec-sh-0.2.1.tgz#163b98a6e89e6b65b47c2a28d215bc1f63989c38"
- dependencies:
- merge "^1.1.3"
-
-execa@^0.7.0:
- version "0.7.0"
- resolved "https://registry.yarnpkg.com/execa/-/execa-0.7.0.tgz#944becd34cc41ee32a63a9faf27ad5a65fc59777"
- dependencies:
- cross-spawn "^5.0.1"
- get-stream "^3.0.0"
- is-stream "^1.1.0"
- npm-run-path "^2.0.0"
- p-finally "^1.0.0"
- signal-exit "^3.0.0"
- strip-eof "^1.0.0"
-
-exists-sync@0.0.4:
- version "0.0.4"
- resolved "https://registry.yarnpkg.com/exists-sync/-/exists-sync-0.0.4.tgz#9744c2c428cc03b01060db454d4b12f0ef3c8879"
-
-exit@^0.1.2:
- version "0.1.2"
- resolved "https://registry.yarnpkg.com/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c"
-
-expand-braces@^0.1.1:
- version "0.1.2"
- resolved "https://registry.yarnpkg.com/expand-braces/-/expand-braces-0.1.2.tgz#488b1d1d2451cb3d3a6b192cfc030f44c5855fea"
- dependencies:
- array-slice "^0.2.3"
- array-unique "^0.2.1"
- braces "^0.1.2"
-
-expand-brackets@^0.1.4:
- version "0.1.5"
- resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-0.1.5.tgz#df07284e342a807cd733ac5af72411e581d1177b"
- dependencies:
- is-posix-bracket "^0.1.0"
-
-expand-brackets@^2.1.4:
- version "2.1.4"
- resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-2.1.4.tgz#b77735e315ce30f6b6eff0f83b04151a22449622"
- dependencies:
- debug "^2.3.3"
- define-property "^0.2.5"
- extend-shallow "^2.0.1"
- posix-character-classes "^0.1.0"
- regex-not "^1.0.0"
- snapdragon "^0.8.1"
- to-regex "^3.0.1"
-
-expand-range@^0.1.0:
- version "0.1.1"
- resolved "https://registry.yarnpkg.com/expand-range/-/expand-range-0.1.1.tgz#4cb8eda0993ca56fa4f41fc42f3cbb4ccadff044"
- dependencies:
- is-number "^0.1.1"
- repeat-string "^0.2.2"
-
-expand-range@^1.8.1:
- version "1.8.2"
- resolved "https://registry.yarnpkg.com/expand-range/-/expand-range-1.8.2.tgz#a299effd335fe2721ebae8e257ec79644fc85337"
- dependencies:
- fill-range "^2.1.0"
-
-expect@^22.4.0:
- version "22.4.0"
- resolved "https://registry.yarnpkg.com/expect/-/expect-22.4.0.tgz#371edf1ae15b83b5bf5ec34b42f1584660a36c16"
- dependencies:
- ansi-styles "^3.2.0"
- jest-diff "^22.4.0"
- jest-get-type "^22.1.0"
- jest-matcher-utils "^22.4.0"
- jest-message-util "^22.4.0"
- jest-regex-util "^22.1.0"
-
-extend-shallow@^2.0.1:
- version "2.0.1"
- resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-2.0.1.tgz#51af7d614ad9a9f610ea1bafbb989d6b1c56890f"
- dependencies:
- is-extendable "^0.1.0"
-
-extend-shallow@^3.0.0, extend-shallow@^3.0.2:
- version "3.0.2"
- resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-3.0.2.tgz#26a71aaf073b39fb2127172746131c2704028db8"
- dependencies:
- assign-symbols "^1.0.0"
- is-extendable "^1.0.1"
-
-extend@3, extend@^3.0.0, extend@~3.0.0, extend@~3.0.1:
- version "3.0.1"
- resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.1.tgz#a755ea7bc1adfcc5a31ce7e762dbaadc5e636444"
-
-external-editor@^2.0.4:
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-2.1.0.tgz#3d026a21b7f95b5726387d4200ac160d372c3b48"
- dependencies:
- chardet "^0.4.0"
- iconv-lite "^0.4.17"
- tmp "^0.0.33"
-
-extglob@^0.3.1:
- version "0.3.2"
- resolved "https://registry.yarnpkg.com/extglob/-/extglob-0.3.2.tgz#2e18ff3d2f49ab2765cec9023f011daa8d8349a1"
- dependencies:
- is-extglob "^1.0.0"
-
-extglob@^2.0.4:
- version "2.0.4"
- resolved "https://registry.yarnpkg.com/extglob/-/extglob-2.0.4.tgz#ad00fe4dc612a9232e8718711dc5cb5ab0285543"
- dependencies:
- array-unique "^0.3.2"
- define-property "^1.0.0"
- expand-brackets "^2.1.4"
- extend-shallow "^2.0.1"
- fragment-cache "^0.2.1"
- regex-not "^1.0.0"
- snapdragon "^0.8.1"
- to-regex "^3.0.1"
-
-extsprintf@1.3.0:
- version "1.3.0"
- resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05"
-
-extsprintf@^1.2.0:
- version "1.4.0"
- resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f"
-
-fast-deep-equal@^1.0.0:
- version "1.1.0"
- resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz#c053477817c86b51daa853c81e059b733d023614"
-
-fast-json-stable-stringify@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz#d5142c0caee6b1189f87d3a76111064f86c8bbf2"
-
-fast-levenshtein@~2.0.4:
- version "2.0.6"
- resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917"
-
-fb-watchman@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/fb-watchman/-/fb-watchman-2.0.0.tgz#54e9abf7dfa2f26cd9b1636c588c1afc05de5d58"
- dependencies:
- bser "^2.0.0"
-
-figures@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/figures/-/figures-2.0.0.tgz#3ab1a2d2a62c8bfb431a0c94cb797a2fce27c962"
- dependencies:
- escape-string-regexp "^1.0.5"
-
-file-entry-cache@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-2.0.0.tgz#c392990c3e684783d838b8c84a45d8a048458361"
- dependencies:
- flat-cache "^1.2.1"
- object-assign "^4.0.1"
-
-file-uri-to-path@1:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz#553a7b8446ff6f684359c445f1e37a05dacc33dd"
-
-filename-regex@^2.0.0:
- version "2.0.1"
- resolved "https://registry.yarnpkg.com/filename-regex/-/filename-regex-2.0.1.tgz#c1c4b9bee3e09725ddb106b75c1e301fe2f18b26"
-
-fileset@^2.0.2:
- version "2.0.3"
- resolved "https://registry.yarnpkg.com/fileset/-/fileset-2.0.3.tgz#8e7548a96d3cc2327ee5e674168723a333bba2a0"
- dependencies:
- glob "^7.0.3"
- minimatch "^3.0.3"
-
-fill-range@^2.1.0:
- version "2.2.3"
- resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-2.2.3.tgz#50b77dfd7e469bc7492470963699fe7a8485a723"
- dependencies:
- is-number "^2.1.0"
- isobject "^2.0.0"
- randomatic "^1.1.3"
- repeat-element "^1.1.2"
- repeat-string "^1.5.2"
-
-fill-range@^4.0.0:
- version "4.0.0"
- resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-4.0.0.tgz#d544811d428f98eb06a63dc402d2403c328c38f7"
- dependencies:
- extend-shallow "^2.0.1"
- is-number "^3.0.0"
- repeat-string "^1.6.1"
- to-regex-range "^2.1.0"
-
-finalhandler@1.1.0:
- version "1.1.0"
- resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.1.0.tgz#ce0b6855b45853e791b2fcc680046d88253dd7f5"
- dependencies:
- debug "2.6.9"
- encodeurl "~1.0.1"
- escape-html "~1.0.3"
- on-finished "~2.3.0"
- parseurl "~1.3.2"
- statuses "~1.3.1"
- unpipe "~1.0.0"
-
-find-cache-dir@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-1.0.0.tgz#9288e3e9e3cc3748717d39eade17cf71fc30ee6f"
- dependencies:
- commondir "^1.0.1"
- make-dir "^1.0.0"
- pkg-dir "^2.0.0"
-
-find-up@^1.0.0:
- version "1.1.2"
- resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f"
- dependencies:
- path-exists "^2.0.0"
- pinkie-promise "^2.0.0"
-
-find-up@^2.0.0, find-up@^2.1.0:
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7"
- dependencies:
- locate-path "^2.0.0"
-
-flat-cache@^1.2.1:
- version "1.3.0"
- resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-1.3.0.tgz#d3030b32b38154f4e3b7e9c709f490f7ef97c481"
- dependencies:
- circular-json "^0.3.1"
- del "^2.0.2"
- graceful-fs "^4.1.2"
- write "^0.2.1"
-
-flush-write-stream@^1.0.0:
- version "1.0.2"
- resolved "https://registry.yarnpkg.com/flush-write-stream/-/flush-write-stream-1.0.2.tgz#c81b90d8746766f1a609a46809946c45dd8ae417"
- dependencies:
- inherits "^2.0.1"
- readable-stream "^2.0.4"
-
-follow-redirects@1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.0.0.tgz#8e34298cbd2e176f254effec75a1c78cc849fd37"
- dependencies:
- debug "^2.2.0"
-
-for-in@^1.0.1, for-in@^1.0.2:
- version "1.0.2"
- resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80"
-
-for-own@^0.1.4:
- version "0.1.5"
- resolved "https://registry.yarnpkg.com/for-own/-/for-own-0.1.5.tgz#5265c681a4f294dabbf17c9509b6763aa84510ce"
- dependencies:
- for-in "^1.0.1"
-
-foreach@^2.0.5:
- version "2.0.5"
- resolved "https://registry.yarnpkg.com/foreach/-/foreach-2.0.5.tgz#0bee005018aeb260d0a3af3ae658dd0136ec1b99"
-
-forever-agent@~0.6.1:
- version "0.6.1"
- resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91"
-
-form-data@~2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.0.0.tgz#6f0aebadcc5da16c13e1ecc11137d85f9b883b25"
- dependencies:
- asynckit "^0.4.0"
- combined-stream "^1.0.5"
- mime-types "^2.1.11"
-
-form-data@~2.1.1:
- version "2.1.4"
- resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.1.4.tgz#33c183acf193276ecaa98143a69e94bfee1750d1"
- dependencies:
- asynckit "^0.4.0"
- combined-stream "^1.0.5"
- mime-types "^2.1.12"
-
-form-data@~2.3.1:
- version "2.3.2"
- resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.2.tgz#4970498be604c20c005d4f5c23aecd21d6b49099"
- dependencies:
- asynckit "^0.4.0"
- combined-stream "1.0.6"
- mime-types "^2.1.12"
-
-fragment-cache@^0.2.1:
- version "0.2.1"
- resolved "https://registry.yarnpkg.com/fragment-cache/-/fragment-cache-0.2.1.tgz#4290fad27f13e89be7f33799c6bc5a0abfff0d19"
- dependencies:
- map-cache "^0.2.2"
-
-from2@^2.1.0, from2@^2.1.1:
- version "2.3.0"
- resolved "https://registry.yarnpkg.com/from2/-/from2-2.3.0.tgz#8bfb5502bde4a4d36cfdeea007fcca21d7e382af"
- dependencies:
- inherits "^2.0.1"
- readable-stream "^2.0.0"
-
-fs-access@^1.0.0:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/fs-access/-/fs-access-1.0.1.tgz#d6a87f262271cefebec30c553407fb995da8777a"
- dependencies:
- null-check "^1.0.0"
-
-fs-write-stream-atomic@^1.0.8:
- version "1.0.10"
- resolved "https://registry.yarnpkg.com/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.10.tgz#b47df53493ef911df75731e70a9ded0189db40c9"
- dependencies:
- graceful-fs "^4.1.2"
- iferr "^0.1.5"
- imurmurhash "^0.1.4"
- readable-stream "1 || 2"
-
-fs.realpath@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f"
-
-fsevents@^1.0.0, fsevents@^1.1.1:
- version "1.1.3"
- resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.1.3.tgz#11f82318f5fe7bb2cd22965a108e9306208216d8"
- dependencies:
- nan "^2.3.0"
- node-pre-gyp "^0.6.39"
-
-fstream-ignore@^1.0.5:
- version "1.0.5"
- resolved "https://registry.yarnpkg.com/fstream-ignore/-/fstream-ignore-1.0.5.tgz#9c31dae34767018fe1d249b24dada67d092da105"
- dependencies:
- fstream "^1.0.0"
- inherits "2"
- minimatch "^3.0.0"
-
-fstream@^1.0.0, fstream@^1.0.10, fstream@^1.0.2:
- version "1.0.11"
- resolved "https://registry.yarnpkg.com/fstream/-/fstream-1.0.11.tgz#5c1fb1f117477114f0632a0eb4b71b3cb0fd3171"
- dependencies:
- graceful-fs "^4.1.2"
- inherits "~2.0.0"
- mkdirp ">=0.5 0"
- rimraf "2"
-
-ftp@~0.3.10:
- version "0.3.10"
- resolved "https://registry.yarnpkg.com/ftp/-/ftp-0.3.10.tgz#9197d861ad8142f3e63d5a83bfe4c59f7330885d"
- dependencies:
- readable-stream "1.1.x"
- xregexp "2.0.0"
-
-function-bind@^1.0.2, function-bind@^1.1.1:
- version "1.1.1"
- resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d"
-
-functional-red-black-tree@^1.0.1:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327"
-
-gauge@~2.7.3:
- version "2.7.4"
- resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.7.4.tgz#2c03405c7538c39d7eb37b317022e325fb018bf7"
- dependencies:
- aproba "^1.0.3"
- console-control-strings "^1.0.0"
- has-unicode "^2.0.0"
- object-assign "^4.1.0"
- signal-exit "^3.0.0"
- string-width "^1.0.1"
- strip-ansi "^3.0.1"
- wide-align "^1.1.0"
-
-generate-function@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/generate-function/-/generate-function-2.0.0.tgz#6858fe7c0969b7d4e9093337647ac79f60dfbe74"
-
-generate-object-property@^1.1.0:
- version "1.2.0"
- resolved "https://registry.yarnpkg.com/generate-object-property/-/generate-object-property-1.2.0.tgz#9c0e1c40308ce804f4783618b937fa88f99d50d0"
- dependencies:
- is-property "^1.0.0"
-
-generate-release@^0.14.0:
- version "0.14.0"
- resolved "https://registry.yarnpkg.com/generate-release/-/generate-release-0.14.0.tgz#22b2089b0ff4e0498d2c33fee94d2377199b996d"
- dependencies:
- bluebird "^3.5.0"
- exists-sync "0.0.4"
- glob "^7.1.2"
- iniparser "^1.0.5"
- inquirer "^3.3.0"
- minimist "^1.2.0"
- observatory "^1.0.0"
- rmdir "^1.2.0"
- temp "^0.8.3"
- xtend "^4.0.1"
-
-get-caller-file@^1.0.1:
- version "1.0.2"
- resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.2.tgz#f702e63127e7e231c160a80c1554acb70d5047e5"
-
-get-stream@3.0.0, get-stream@^3.0.0:
- version "3.0.0"
- resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14"
-
-get-uri@2:
- version "2.0.1"
- resolved "https://registry.yarnpkg.com/get-uri/-/get-uri-2.0.1.tgz#dbdcacacd8c608a38316869368117697a1631c59"
- dependencies:
- data-uri-to-buffer "1"
- debug "2"
- extend "3"
- file-uri-to-path "1"
- ftp "~0.3.10"
- readable-stream "2"
-
-get-value@^2.0.3, get-value@^2.0.6:
- version "2.0.6"
- resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28"
-
-getpass@^0.1.1:
- version "0.1.7"
- resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa"
- dependencies:
- assert-plus "^1.0.0"
-
-glob-base@^0.3.0:
- version "0.3.0"
- resolved "https://registry.yarnpkg.com/glob-base/-/glob-base-0.3.0.tgz#dbb164f6221b1c0b1ccf82aea328b497df0ea3c4"
- dependencies:
- glob-parent "^2.0.0"
- is-glob "^2.0.0"
-
-glob-parent@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-2.0.0.tgz#81383d72db054fcccf5336daa902f182f6edbb28"
- dependencies:
- is-glob "^2.0.0"
-
-glob-parent@^3.1.0:
- version "3.1.0"
- resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-3.1.0.tgz#9e6af6299d8d3bd2bd40430832bd113df906c5ae"
- dependencies:
- is-glob "^3.1.0"
- path-dirname "^1.0.0"
-
-glob@^7.0.3, glob@^7.0.5, glob@^7.0.6, glob@^7.1.0, glob@^7.1.1, glob@^7.1.2:
- version "7.1.2"
- resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15"
- dependencies:
- fs.realpath "^1.0.0"
- inflight "^1.0.4"
- inherits "2"
- minimatch "^3.0.4"
- once "^1.3.0"
- path-is-absolute "^1.0.0"
-
-globals@^11.0.1:
- version "11.3.0"
- resolved "https://registry.yarnpkg.com/globals/-/globals-11.3.0.tgz#e04fdb7b9796d8adac9c8f64c14837b2313378b0"
-
-globals@^9.18.0:
- version "9.18.0"
- resolved "https://registry.yarnpkg.com/globals/-/globals-9.18.0.tgz#aa3896b3e69b487f17e31ed2143d69a8e30c2d8a"
-
-globby@^5.0.0:
- version "5.0.0"
- resolved "https://registry.yarnpkg.com/globby/-/globby-5.0.0.tgz#ebd84667ca0dbb330b99bcfc68eac2bc54370e0d"
- dependencies:
- array-union "^1.0.1"
- arrify "^1.0.0"
- glob "^7.0.3"
- object-assign "^4.0.1"
- pify "^2.0.0"
- pinkie-promise "^2.0.0"
-
-got@^8.0.3:
- version "8.2.0"
- resolved "https://registry.yarnpkg.com/got/-/got-8.2.0.tgz#0d11a071d05046348a2f5c0a5fa047fb687fdfc6"
- dependencies:
- "@sindresorhus/is" "^0.7.0"
- cacheable-request "^2.1.1"
- decompress-response "^3.3.0"
- duplexer3 "^0.1.4"
- get-stream "^3.0.0"
- into-stream "^3.1.0"
- is-retry-allowed "^1.1.0"
- isurl "^1.0.0-alpha5"
- lowercase-keys "^1.0.0"
- mimic-response "^1.0.0"
- p-cancelable "^0.3.0"
- p-timeout "^2.0.1"
- pify "^3.0.0"
- safe-buffer "^5.1.1"
- timed-out "^4.0.1"
- url-parse-lax "^3.0.0"
- url-to-options "^1.0.1"
-
-graceful-fs@^4.1.11, graceful-fs@^4.1.2:
- version "4.1.11"
- resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658"
-
-growly@^1.3.0:
- version "1.3.0"
- resolved "https://registry.yarnpkg.com/growly/-/growly-1.3.0.tgz#f10748cbe76af964b7c96c93c6bcc28af120c081"
-
-handlebars@^4.0.3:
- version "4.0.11"
- resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.0.11.tgz#630a35dfe0294bc281edae6ffc5d329fc7982dcc"
- dependencies:
- async "^1.4.0"
- optimist "^0.6.1"
- source-map "^0.4.4"
- optionalDependencies:
- uglify-js "^2.6"
-
-har-schema@^1.0.5:
- version "1.0.5"
- resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-1.0.5.tgz#d263135f43307c02c602afc8fe95970c0151369e"
-
-har-schema@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92"
-
-har-validator@~2.0.6:
- version "2.0.6"
- resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-2.0.6.tgz#cdcbc08188265ad119b6a5a7c8ab70eecfb5d27d"
- dependencies:
- chalk "^1.1.1"
- commander "^2.9.0"
- is-my-json-valid "^2.12.4"
- pinkie-promise "^2.0.0"
-
-har-validator@~4.2.1:
- version "4.2.1"
- resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-4.2.1.tgz#33481d0f1bbff600dd203d75812a6a5fba002e2a"
- dependencies:
- ajv "^4.9.1"
- har-schema "^1.0.5"
-
-har-validator@~5.0.3:
- version "5.0.3"
- resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.0.3.tgz#ba402c266194f15956ef15e0fcf242993f6a7dfd"
- dependencies:
- ajv "^5.1.0"
- har-schema "^2.0.0"
-
-has-ansi@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91"
- dependencies:
- ansi-regex "^2.0.0"
-
-has-binary2@~1.0.2:
- version "1.0.2"
- resolved "https://registry.yarnpkg.com/has-binary2/-/has-binary2-1.0.2.tgz#e83dba49f0b9be4d026d27365350d9f03f54be98"
- dependencies:
- isarray "2.0.1"
-
-has-cors@1.1.0:
- version "1.1.0"
- resolved "https://registry.yarnpkg.com/has-cors/-/has-cors-1.1.0.tgz#5e474793f7ea9843d1bb99c23eef49ff126fff39"
-
-has-flag@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-1.0.0.tgz#9d9e793165ce017a00f00418c43f942a7b1d11fa"
-
-has-flag@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-2.0.0.tgz#e8207af1cc7b30d446cc70b734b5e8be18f88d51"
-
-has-flag@^3.0.0:
- version "3.0.0"
- resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd"
-
-has-symbol-support-x@^1.4.1:
- version "1.4.2"
- resolved "https://registry.yarnpkg.com/has-symbol-support-x/-/has-symbol-support-x-1.4.2.tgz#1409f98bc00247da45da67cee0a36f282ff26455"
-
-has-to-string-tag-x@^1.2.0:
- version "1.4.1"
- resolved "https://registry.yarnpkg.com/has-to-string-tag-x/-/has-to-string-tag-x-1.4.1.tgz#a045ab383d7b4b2012a00148ab0aa5f290044d4d"
- dependencies:
- has-symbol-support-x "^1.4.1"
-
-has-unicode@^2.0.0:
- version "2.0.1"
- resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9"
-
-has-value@^0.3.1:
- version "0.3.1"
- resolved "https://registry.yarnpkg.com/has-value/-/has-value-0.3.1.tgz#7b1f58bada62ca827ec0a2078025654845995e1f"
- dependencies:
- get-value "^2.0.3"
- has-values "^0.1.4"
- isobject "^2.0.0"
-
-has-value@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/has-value/-/has-value-1.0.0.tgz#18b281da585b1c5c51def24c930ed29a0be6b177"
- dependencies:
- get-value "^2.0.6"
- has-values "^1.0.0"
- isobject "^3.0.0"
-
-has-values@^0.1.4:
- version "0.1.4"
- resolved "https://registry.yarnpkg.com/has-values/-/has-values-0.1.4.tgz#6d61de95d91dfca9b9a02089ad384bff8f62b771"
-
-has-values@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/has-values/-/has-values-1.0.0.tgz#95b0b63fec2146619a6fe57fe75628d5a39efe4f"
- dependencies:
- is-number "^3.0.0"
- kind-of "^4.0.0"
-
-has@^1.0.0, has@^1.0.1:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/has/-/has-1.0.1.tgz#8461733f538b0837c9361e39a9ab9e9704dc2f28"
- dependencies:
- function-bind "^1.0.2"
-
-hash-base@^2.0.0:
- version "2.0.2"
- resolved "https://registry.yarnpkg.com/hash-base/-/hash-base-2.0.2.tgz#66ea1d856db4e8a5470cadf6fce23ae5244ef2e1"
- dependencies:
- inherits "^2.0.1"
-
-hash-base@^3.0.0:
- version "3.0.4"
- resolved "https://registry.yarnpkg.com/hash-base/-/hash-base-3.0.4.tgz#5fc8686847ecd73499403319a6b0a3f3f6ae4918"
- dependencies:
- inherits "^2.0.1"
- safe-buffer "^5.0.1"
-
-hash.js@^1.0.0, hash.js@^1.0.3:
- version "1.1.3"
- resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.3.tgz#340dedbe6290187151c1ea1d777a3448935df846"
- dependencies:
- inherits "^2.0.3"
- minimalistic-assert "^1.0.0"
-
-hawk@3.1.3, hawk@~3.1.3:
- version "3.1.3"
- resolved "https://registry.yarnpkg.com/hawk/-/hawk-3.1.3.tgz#078444bd7c1640b0fe540d2c9b73d59678e8e1c4"
- dependencies:
- boom "2.x.x"
- cryptiles "2.x.x"
- hoek "2.x.x"
- sntp "1.x.x"
-
-hawk@~6.0.2:
- version "6.0.2"
- resolved "https://registry.yarnpkg.com/hawk/-/hawk-6.0.2.tgz#af4d914eb065f9b5ce4d9d11c1cb2126eecc3038"
- dependencies:
- boom "4.x.x"
- cryptiles "3.x.x"
- hoek "4.x.x"
- sntp "2.x.x"
-
-hipchat-notifier@^1.1.0:
- version "1.1.0"
- resolved "https://registry.yarnpkg.com/hipchat-notifier/-/hipchat-notifier-1.1.0.tgz#b6d249755437c191082367799d3ba9a0f23b231e"
- dependencies:
- lodash "^4.0.0"
- request "^2.0.0"
-
-hmac-drbg@^1.0.0:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1"
- dependencies:
- hash.js "^1.0.3"
- minimalistic-assert "^1.0.0"
- minimalistic-crypto-utils "^1.0.1"
-
-hoek@2.x.x:
- version "2.16.3"
- resolved "https://registry.yarnpkg.com/hoek/-/hoek-2.16.3.tgz#20bb7403d3cea398e91dc4710a8ff1b8274a25ed"
-
-hoek@4.x.x:
- version "4.2.1"
- resolved "https://registry.yarnpkg.com/hoek/-/hoek-4.2.1.tgz#9634502aa12c445dd5a7c5734b572bb8738aacbb"
-
-home-or-tmp@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/home-or-tmp/-/home-or-tmp-2.0.0.tgz#e36c3f2d2cae7d746a857e38d18d5f32a7882db8"
- dependencies:
- os-homedir "^1.0.0"
- os-tmpdir "^1.0.1"
-
-hosted-git-info@^2.1.4:
- version "2.5.0"
- resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.5.0.tgz#6d60e34b3abbc8313062c3b798ef8d901a07af3c"
-
-html-encoding-sniffer@^1.0.2:
- version "1.0.2"
- resolved "https://registry.yarnpkg.com/html-encoding-sniffer/-/html-encoding-sniffer-1.0.2.tgz#e70d84b94da53aa375e11fe3a351be6642ca46f8"
- dependencies:
- whatwg-encoding "^1.0.1"
-
-htmlescape@^1.1.0:
- version "1.1.1"
- resolved "https://registry.yarnpkg.com/htmlescape/-/htmlescape-1.1.1.tgz#3a03edc2214bca3b66424a3e7959349509cb0351"
-
-http-cache-semantics@3.8.1:
- version "3.8.1"
- resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-3.8.1.tgz#39b0e16add9b605bf0a9ef3d9daaf4843b4cacd2"
-
-http-errors@1.6.2, http-errors@~1.6.2:
- version "1.6.2"
- resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.6.2.tgz#0a002cc85707192a7e7946ceedc11155f60ec736"
- dependencies:
- depd "1.1.1"
- inherits "2.0.3"
- setprototypeof "1.0.3"
- statuses ">= 1.3.1 < 2"
-
-http-proxy-agent@1:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-1.0.0.tgz#cc1ce38e453bf984a0f7702d2dd59c73d081284a"
- dependencies:
- agent-base "2"
- debug "2"
- extend "3"
-
-http-proxy@^1.13.0:
- version "1.16.2"
- resolved "https://registry.yarnpkg.com/http-proxy/-/http-proxy-1.16.2.tgz#06dff292952bf64dbe8471fa9df73066d4f37742"
- dependencies:
- eventemitter3 "1.x.x"
- requires-port "1.x.x"
-
-http-signature@~1.1.0:
- version "1.1.1"
- resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.1.1.tgz#df72e267066cd0ac67fb76adf8e134a8fbcf91bf"
- dependencies:
- assert-plus "^0.2.0"
- jsprim "^1.2.2"
- sshpk "^1.7.0"
-
-http-signature@~1.2.0:
- version "1.2.0"
- resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1"
- dependencies:
- assert-plus "^1.0.0"
- jsprim "^1.2.2"
- sshpk "^1.7.0"
-
-httpntlm@1.6.1:
- version "1.6.1"
- resolved "https://registry.yarnpkg.com/httpntlm/-/httpntlm-1.6.1.tgz#ad01527143a2e8773cfae6a96f58656bb52a34b2"
- dependencies:
- httpreq ">=0.4.22"
- underscore "~1.7.0"
-
-httpreq@>=0.4.22:
- version "0.4.24"
- resolved "https://registry.yarnpkg.com/httpreq/-/httpreq-0.4.24.tgz#4335ffd82cd969668a39465c929ac61d6393627f"
-
-https-browserify@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-1.0.0.tgz#ec06c10e0a34c0f2faf199f7fd7fc78fffd03c73"
-
-https-proxy-agent@1:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-1.0.0.tgz#35f7da6c48ce4ddbfa264891ac593ee5ff8671e6"
- dependencies:
- agent-base "2"
- debug "2"
- extend "3"
-
-iconv-lite@0.4.15:
- version "0.4.15"
- resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.15.tgz#fe265a218ac6a57cfe854927e9d04c19825eddeb"
-
-iconv-lite@0.4.19, iconv-lite@^0.4.17:
- version "0.4.19"
- resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.19.tgz#f7468f60135f5e5dad3399c0a81be9a1603a082b"
-
-ieee754@^1.1.4:
- version "1.1.8"
- resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.8.tgz#be33d40ac10ef1926701f6f08a2d86fbfd1ad3e4"
-
-iferr@^0.1.5:
- version "0.1.5"
- resolved "https://registry.yarnpkg.com/iferr/-/iferr-0.1.5.tgz#c60eed69e6d8fdb6b3104a1fcbca1c192dc5b501"
-
-ignore@^3.3.3:
- version "3.3.7"
- resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.3.7.tgz#612289bfb3c220e186a58118618d5be8c1bab021"
-
-import-local@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/import-local/-/import-local-1.0.0.tgz#5e4ffdc03f4fe6c009c6729beb29631c2f8227bc"
- dependencies:
- pkg-dir "^2.0.0"
- resolve-cwd "^2.0.0"
-
-imurmurhash@^0.1.4:
- version "0.1.4"
- resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea"
-
-indexof@0.0.1:
- version "0.0.1"
- resolved "https://registry.yarnpkg.com/indexof/-/indexof-0.0.1.tgz#82dc336d232b9062179d05ab3293a66059fd435d"
-
-inflection@~1.10.0:
- version "1.10.0"
- resolved "https://registry.yarnpkg.com/inflection/-/inflection-1.10.0.tgz#5bffcb1197ad3e81050f8e17e21668087ee9eb2f"
-
-inflection@~1.3.0:
- version "1.3.8"
- resolved "https://registry.yarnpkg.com/inflection/-/inflection-1.3.8.tgz#cbd160da9f75b14c3cc63578d4f396784bf3014e"
-
-inflight@^1.0.4:
- version "1.0.6"
- resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9"
- dependencies:
- once "^1.3.0"
- wrappy "1"
-
-inherits@2, inherits@2.0.3, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.0, inherits@~2.0.1, inherits@~2.0.3:
- version "2.0.3"
- resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de"
-
-inherits@2.0.1:
- version "2.0.1"
- resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.1.tgz#b17d08d326b4423e568eff719f91b0b1cbdf69f1"
-
-ini@~1.3.0:
- version "1.3.5"
- resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927"
-
-iniparser@^1.0.5:
- version "1.0.5"
- resolved "https://registry.yarnpkg.com/iniparser/-/iniparser-1.0.5.tgz#836d6befe6dfbfcee0bccf1cf9f2acc7027f783d"
-
-inline-source-map@~0.6.0:
- version "0.6.2"
- resolved "https://registry.yarnpkg.com/inline-source-map/-/inline-source-map-0.6.2.tgz#f9393471c18a79d1724f863fa38b586370ade2a5"
- dependencies:
- source-map "~0.5.3"
-
-inquirer@^3.0.6, inquirer@^3.3.0:
- version "3.3.0"
- resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-3.3.0.tgz#9dd2f2ad765dcab1ff0443b491442a20ba227dc9"
- dependencies:
- ansi-escapes "^3.0.0"
- chalk "^2.0.0"
- cli-cursor "^2.1.0"
- cli-width "^2.0.0"
- external-editor "^2.0.4"
- figures "^2.0.0"
- lodash "^4.3.0"
- mute-stream "0.0.7"
- run-async "^2.2.0"
- rx-lite "^4.0.8"
- rx-lite-aggregates "^4.0.8"
- string-width "^2.1.0"
- strip-ansi "^4.0.0"
- through "^2.3.6"
-
-insert-module-globals@^7.0.0:
- version "7.0.2"
- resolved "https://registry.yarnpkg.com/insert-module-globals/-/insert-module-globals-7.0.2.tgz#012c56baa7d3307a8b417d4ec5270cf9741c18f4"
- dependencies:
- JSONStream "^1.0.3"
- combine-source-map "~0.7.1"
- concat-stream "~1.5.1"
- is-buffer "^1.1.0"
- lexical-scope "^1.2.0"
- process "~0.11.0"
- through2 "^2.0.0"
- xtend "^4.0.0"
-
-interpret@^1.0.0:
- version "1.1.0"
- resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.1.0.tgz#7ed1b1410c6a0e0f78cf95d3b8440c63f78b8614"
-
-into-stream@^3.1.0:
- version "3.1.0"
- resolved "https://registry.yarnpkg.com/into-stream/-/into-stream-3.1.0.tgz#96fb0a936c12babd6ff1752a17d05616abd094c6"
- dependencies:
- from2 "^2.1.1"
- p-is-promise "^1.1.0"
-
-invariant@^2.2.2:
- version "2.2.3"
- resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.3.tgz#1a827dfde7dcbd7c323f0ca826be8fa7c5e9d688"
- dependencies:
- loose-envify "^1.0.0"
-
-invert-kv@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-1.0.0.tgz#104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6"
-
-ip@1.0.1:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/ip/-/ip-1.0.1.tgz#c7e356cdea225ae71b36d70f2e71a92ba4e42590"
-
-ip@^1.1.2, ip@^1.1.4:
- version "1.1.5"
- resolved "https://registry.yarnpkg.com/ip/-/ip-1.1.5.tgz#bdded70114290828c0a039e72ef25f5aaec4354a"
-
-is-accessor-descriptor@^0.1.6:
- version "0.1.6"
- resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz#a9e12cb3ae8d876727eeef3843f8a0897b5c98d6"
- dependencies:
- kind-of "^3.0.2"
-
-is-accessor-descriptor@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz#169c2f6d3df1f992618072365c9b0ea1f6878656"
- dependencies:
- kind-of "^6.0.0"
-
-is-arrayish@^0.2.1:
- version "0.2.1"
- resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d"
-
-is-binary-path@^1.0.0:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-1.0.1.tgz#75f16642b480f187a711c814161fd3a4a7655898"
- dependencies:
- binary-extensions "^1.0.0"
-
-is-buffer@^1.1.0, is-buffer@^1.1.5:
- version "1.1.6"
- resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be"
-
-is-builtin-module@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/is-builtin-module/-/is-builtin-module-1.0.0.tgz#540572d34f7ac3119f8f76c30cbc1b1e037affbe"
- dependencies:
- builtin-modules "^1.0.0"
-
-is-callable@^1.1.1, is-callable@^1.1.3:
- version "1.1.3"
- resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.3.tgz#86eb75392805ddc33af71c92a0eedf74ee7604b2"
-
-is-ci@^1.0.10:
- version "1.1.0"
- resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-1.1.0.tgz#247e4162e7860cebbdaf30b774d6b0ac7dcfe7a5"
- dependencies:
- ci-info "^1.0.0"
-
-is-data-descriptor@^0.1.4:
- version "0.1.4"
- resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz#0b5ee648388e2c860282e793f1856fec3f301b56"
- dependencies:
- kind-of "^3.0.2"
-
-is-data-descriptor@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz#d84876321d0e7add03990406abbbbd36ba9268c7"
- dependencies:
- kind-of "^6.0.0"
-
-is-date-object@^1.0.1:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.1.tgz#9aa20eb6aeebbff77fbd33e74ca01b33581d3a16"
-
-is-descriptor@^0.1.0:
- version "0.1.6"
- resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-0.1.6.tgz#366d8240dde487ca51823b1ab9f07a10a78251ca"
- dependencies:
- is-accessor-descriptor "^0.1.6"
- is-data-descriptor "^0.1.4"
- kind-of "^5.0.0"
-
-is-descriptor@^1.0.0, is-descriptor@^1.0.2:
- version "1.0.2"
- resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-1.0.2.tgz#3b159746a66604b04f8c81524ba365c5f14d86ec"
- dependencies:
- is-accessor-descriptor "^1.0.0"
- is-data-descriptor "^1.0.0"
- kind-of "^6.0.2"
-
-is-dotfile@^1.0.0:
- version "1.0.3"
- resolved "https://registry.yarnpkg.com/is-dotfile/-/is-dotfile-1.0.3.tgz#a6a2f32ffd2dfb04f5ca25ecd0f6b83cf798a1e1"
-
-is-equal-shallow@^0.1.3:
- version "0.1.3"
- resolved "https://registry.yarnpkg.com/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz#2238098fc221de0bcfa5d9eac4c45d638aa1c534"
- dependencies:
- is-primitive "^2.0.0"
-
-is-extendable@^0.1.0, is-extendable@^0.1.1:
- version "0.1.1"
- resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89"
-
-is-extendable@^1.0.1:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-1.0.1.tgz#a7470f9e426733d81bd81e1155264e3a3507cab4"
- dependencies:
- is-plain-object "^2.0.4"
-
-is-extglob@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-1.0.0.tgz#ac468177c4943405a092fc8f29760c6ffc6206c0"
-
-is-extglob@^2.1.0, is-extglob@^2.1.1:
- version "2.1.1"
- resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2"
-
-is-finite@^1.0.0:
- version "1.0.2"
- resolved "https://registry.yarnpkg.com/is-finite/-/is-finite-1.0.2.tgz#cc6677695602be550ef11e8b4aa6305342b6d0aa"
- dependencies:
- number-is-nan "^1.0.0"
-
-is-fullwidth-code-point@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb"
- dependencies:
- number-is-nan "^1.0.0"
-
-is-fullwidth-code-point@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f"
-
-is-generator-fn@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/is-generator-fn/-/is-generator-fn-1.0.0.tgz#969d49e1bb3329f6bb7f09089be26578b2ddd46a"
-
-is-glob@^2.0.0, is-glob@^2.0.1:
- version "2.0.1"
- resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-2.0.1.tgz#d096f926a3ded5600f3fdfd91198cb0888c2d863"
- dependencies:
- is-extglob "^1.0.0"
-
-is-glob@^3.1.0:
- version "3.1.0"
- resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-3.1.0.tgz#7ba5ae24217804ac70707b96922567486cc3e84a"
- dependencies:
- is-extglob "^2.1.0"
-
-is-glob@^4.0.0:
- version "4.0.0"
- resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.0.tgz#9521c76845cc2610a85203ddf080a958c2ffabc0"
- dependencies:
- is-extglob "^2.1.1"
-
-is-my-ip-valid@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/is-my-ip-valid/-/is-my-ip-valid-1.0.0.tgz#7b351b8e8edd4d3995d4d066680e664d94696824"
-
-is-my-json-valid@^2.12.4:
- version "2.17.2"
- resolved "https://registry.yarnpkg.com/is-my-json-valid/-/is-my-json-valid-2.17.2.tgz#6b2103a288e94ef3de5cf15d29dd85fc4b78d65c"
- dependencies:
- generate-function "^2.0.0"
- generate-object-property "^1.1.0"
- is-my-ip-valid "^1.0.0"
- jsonpointer "^4.0.0"
- xtend "^4.0.0"
-
-is-number@^0.1.1:
- version "0.1.1"
- resolved "https://registry.yarnpkg.com/is-number/-/is-number-0.1.1.tgz#69a7af116963d47206ec9bd9b48a14216f1e3806"
-
-is-number@^2.1.0:
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/is-number/-/is-number-2.1.0.tgz#01fcbbb393463a548f2f466cce16dece49db908f"
- dependencies:
- kind-of "^3.0.2"
-
-is-number@^3.0.0:
- version "3.0.0"
- resolved "https://registry.yarnpkg.com/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195"
- dependencies:
- kind-of "^3.0.2"
-
-is-number@^4.0.0:
- version "4.0.0"
- resolved "https://registry.yarnpkg.com/is-number/-/is-number-4.0.0.tgz#0026e37f5454d73e356dfe6564699867c6a7f0ff"
-
-is-object@^1.0.1:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/is-object/-/is-object-1.0.1.tgz#8952688c5ec2ffd6b03ecc85e769e02903083470"
-
-is-odd@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/is-odd/-/is-odd-2.0.0.tgz#7646624671fd7ea558ccd9a2795182f2958f1b24"
- dependencies:
- is-number "^4.0.0"
-
-is-path-cwd@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/is-path-cwd/-/is-path-cwd-1.0.0.tgz#d225ec23132e89edd38fda767472e62e65f1106d"
-
-is-path-in-cwd@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/is-path-in-cwd/-/is-path-in-cwd-1.0.0.tgz#6477582b8214d602346094567003be8a9eac04dc"
- dependencies:
- is-path-inside "^1.0.0"
-
-is-path-inside@^1.0.0:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-1.0.1.tgz#8ef5b7de50437a3fdca6b4e865ef7aa55cb48036"
- dependencies:
- path-is-inside "^1.0.1"
-
-is-plain-obj@^1.0.0:
- version "1.1.0"
- resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-1.1.0.tgz#71a50c8429dfca773c92a390a4a03b39fcd51d3e"
-
-is-plain-object@^2.0.1, is-plain-object@^2.0.3, is-plain-object@^2.0.4:
- version "2.0.4"
- resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677"
- dependencies:
- isobject "^3.0.1"
-
-is-posix-bracket@^0.1.0:
- version "0.1.1"
- resolved "https://registry.yarnpkg.com/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz#3334dc79774368e92f016e6fbc0a88f5cd6e6bc4"
-
-is-primitive@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/is-primitive/-/is-primitive-2.0.0.tgz#207bab91638499c07b2adf240a41a87210034575"
-
-is-promise@^2.1.0:
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-2.1.0.tgz#79a2a9ece7f096e80f36d2b2f3bc16c1ff4bf3fa"
-
-is-property@^1.0.0:
- version "1.0.2"
- resolved "https://registry.yarnpkg.com/is-property/-/is-property-1.0.2.tgz#57fe1c4e48474edd65b09911f26b1cd4095dda84"
-
-is-regex@^1.0.4:
- version "1.0.4"
- resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.0.4.tgz#5517489b547091b0930e095654ced25ee97e9491"
- dependencies:
- has "^1.0.1"
-
-is-resolvable@^1.0.0:
- version "1.1.0"
- resolved "https://registry.yarnpkg.com/is-resolvable/-/is-resolvable-1.1.0.tgz#fb18f87ce1feb925169c9a407c19318a3206ed88"
-
-is-retry-allowed@^1.1.0:
- version "1.1.0"
- resolved "https://registry.yarnpkg.com/is-retry-allowed/-/is-retry-allowed-1.1.0.tgz#11a060568b67339444033d0125a61a20d564fb34"
-
-is-stream@^1.1.0:
- version "1.1.0"
- resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44"
-
-is-symbol@^1.0.1:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.1.tgz#3cc59f00025194b6ab2e38dbae6689256b660572"
-
-is-typedarray@~1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a"
-
-is-utf8@^0.2.0:
- version "0.2.1"
- resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72"
-
-is-windows@^1.0.2:
- version "1.0.2"
- resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d"
-
-is@~0.2.6:
- version "0.2.7"
- resolved "https://registry.yarnpkg.com/is/-/is-0.2.7.tgz#3b34a2c48f359972f35042849193ae7264b63562"
-
-isarray@0.0.1, isarray@~0.0.1:
- version "0.0.1"
- resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf"
-
-isarray@1.0.0, isarray@^1.0.0, isarray@~1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11"
-
-isarray@2.0.1:
- version "2.0.1"
- resolved "https://registry.yarnpkg.com/isarray/-/isarray-2.0.1.tgz#a37d94ed9cda2d59865c9f76fe596ee1f338741e"
-
-isbinaryfile@^3.0.0:
- version "3.0.2"
- resolved "https://registry.yarnpkg.com/isbinaryfile/-/isbinaryfile-3.0.2.tgz#4a3e974ec0cba9004d3fc6cde7209ea69368a621"
-
-isexe@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10"
-
-isobject@^2.0.0:
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89"
- dependencies:
- isarray "1.0.0"
-
-isobject@^3.0.0, isobject@^3.0.1:
- version "3.0.1"
- resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df"
-
-isstream@~0.1.2:
- version "0.1.2"
- resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a"
-
-istanbul-api@^1.1.14:
- version "1.2.2"
- resolved "https://registry.yarnpkg.com/istanbul-api/-/istanbul-api-1.2.2.tgz#e17cd519dd5ec4141197f246fdf380b75487f3b1"
- dependencies:
- async "^2.1.4"
- fileset "^2.0.2"
- istanbul-lib-coverage "^1.1.2"
- istanbul-lib-hook "^1.1.0"
- istanbul-lib-instrument "^1.9.2"
- istanbul-lib-report "^1.1.3"
- istanbul-lib-source-maps "^1.2.3"
- istanbul-reports "^1.1.4"
- js-yaml "^3.7.0"
- mkdirp "^0.5.1"
- once "^1.4.0"
-
-istanbul-lib-coverage@^1.1.1, istanbul-lib-coverage@^1.1.2:
- version "1.1.2"
- resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-1.1.2.tgz#4113c8ff6b7a40a1ef7350b01016331f63afde14"
-
-istanbul-lib-hook@^1.1.0:
- version "1.1.0"
- resolved "https://registry.yarnpkg.com/istanbul-lib-hook/-/istanbul-lib-hook-1.1.0.tgz#8538d970372cb3716d53e55523dd54b557a8d89b"
- dependencies:
- append-transform "^0.4.0"
-
-istanbul-lib-instrument@^1.7.5, istanbul-lib-instrument@^1.8.0, istanbul-lib-instrument@^1.9.2:
- version "1.9.2"
- resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-1.9.2.tgz#84905bf47f7e0b401d6b840da7bad67086b4aab6"
- dependencies:
- babel-generator "^6.18.0"
- babel-template "^6.16.0"
- babel-traverse "^6.18.0"
- babel-types "^6.18.0"
- babylon "^6.18.0"
- istanbul-lib-coverage "^1.1.2"
- semver "^5.3.0"
-
-istanbul-lib-report@^1.1.3:
- version "1.1.3"
- resolved "https://registry.yarnpkg.com/istanbul-lib-report/-/istanbul-lib-report-1.1.3.tgz#2df12188c0fa77990c0d2176d2d0ba3394188259"
- dependencies:
- istanbul-lib-coverage "^1.1.2"
- mkdirp "^0.5.1"
- path-parse "^1.0.5"
- supports-color "^3.1.2"
-
-istanbul-lib-source-maps@^1.2.1, istanbul-lib-source-maps@^1.2.3:
- version "1.2.3"
- resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-1.2.3.tgz#20fb54b14e14b3fb6edb6aca3571fd2143db44e6"
- dependencies:
- debug "^3.1.0"
- istanbul-lib-coverage "^1.1.2"
- mkdirp "^0.5.1"
- rimraf "^2.6.1"
- source-map "^0.5.3"
-
-istanbul-reports@^1.1.4:
- version "1.1.4"
- resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-1.1.4.tgz#5ccba5e22b7b5a5d91d5e0a830f89be334bf97bd"
- dependencies:
- handlebars "^4.0.3"
-
-isurl@^1.0.0-alpha5:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/isurl/-/isurl-1.0.0.tgz#b27f4f49f3cdaa3ea44a0a5b7f3462e6edc39d67"
- dependencies:
- has-to-string-tag-x "^1.2.0"
- is-object "^1.0.1"
-
-jasmine-core@^3.1.0, jasmine-core@~3.1.0:
- version "3.1.0"
- resolved "https://registry.yarnpkg.com/jasmine-core/-/jasmine-core-3.1.0.tgz#a4785e135d5df65024dfc9224953df585bd2766c"
-
-jasmine@^3.0.0:
- version "3.1.0"
- resolved "https://registry.yarnpkg.com/jasmine/-/jasmine-3.1.0.tgz#2bd59fd7ec6ec0e8acb64e09f45a68ed2ad1952a"
- dependencies:
- glob "^7.0.6"
- jasmine-core "~3.1.0"
-
-jest-changed-files@^22.2.0:
- version "22.2.0"
- resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-22.2.0.tgz#517610c4a8ca0925bdc88b0ca53bd678aa8d019e"
- dependencies:
- throat "^4.0.0"
-
-jest-cli@^22.4.2:
- version "22.4.2"
- resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-22.4.2.tgz#e6546dc651e13d164481aa3e76e53ac4f4edab06"
- dependencies:
- ansi-escapes "^3.0.0"
- chalk "^2.0.1"
- exit "^0.1.2"
- glob "^7.1.2"
- graceful-fs "^4.1.11"
- import-local "^1.0.0"
- is-ci "^1.0.10"
- istanbul-api "^1.1.14"
- istanbul-lib-coverage "^1.1.1"
- istanbul-lib-instrument "^1.8.0"
- istanbul-lib-source-maps "^1.2.1"
- jest-changed-files "^22.2.0"
- jest-config "^22.4.2"
- jest-environment-jsdom "^22.4.1"
- jest-get-type "^22.1.0"
- jest-haste-map "^22.4.2"
- jest-message-util "^22.4.0"
- jest-regex-util "^22.1.0"
- jest-resolve-dependencies "^22.1.0"
- jest-runner "^22.4.2"
- jest-runtime "^22.4.2"
- jest-snapshot "^22.4.0"
- jest-util "^22.4.1"
- jest-validate "^22.4.2"
- jest-worker "^22.2.2"
- micromatch "^2.3.11"
- node-notifier "^5.2.1"
- realpath-native "^1.0.0"
- rimraf "^2.5.4"
- slash "^1.0.0"
- string-length "^2.0.0"
- strip-ansi "^4.0.0"
- which "^1.2.12"
- yargs "^10.0.3"
-
-jest-config@^22.4.2:
- version "22.4.2"
- resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-22.4.2.tgz#580ba5819bf81a5e48f4fd470e8b81834f45c855"
- dependencies:
- chalk "^2.0.1"
- glob "^7.1.1"
- jest-environment-jsdom "^22.4.1"
- jest-environment-node "^22.4.1"
- jest-get-type "^22.1.0"
- jest-jasmine2 "^22.4.2"
- jest-regex-util "^22.1.0"
- jest-resolve "^22.4.2"
- jest-util "^22.4.1"
- jest-validate "^22.4.2"
- pretty-format "^22.4.0"
-
-jest-diff@^22.4.0:
- version "22.4.0"
- resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-22.4.0.tgz#384c2b78519ca44ca126382df53f134289232525"
- dependencies:
- chalk "^2.0.1"
- diff "^3.2.0"
- jest-get-type "^22.1.0"
- pretty-format "^22.4.0"
-
-jest-docblock@^22.4.0:
- version "22.4.0"
- resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-22.4.0.tgz#dbf1877e2550070cfc4d9b07a55775a0483159b8"
- dependencies:
- detect-newline "^2.1.0"
-
-jest-environment-jsdom@^22.4.1:
- version "22.4.1"
- resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-22.4.1.tgz#754f408872441740100d3917e5ec40c74de6447f"
- dependencies:
- jest-mock "^22.2.0"
- jest-util "^22.4.1"
- jsdom "^11.5.1"
-
-jest-environment-node@^22.4.1:
- version "22.4.1"
- resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-22.4.1.tgz#418850eb654596b8d6e36c2021cbedbc23df8e16"
- dependencies:
- jest-mock "^22.2.0"
- jest-util "^22.4.1"
-
-jest-get-type@^22.1.0:
- version "22.1.0"
- resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-22.1.0.tgz#4e90af298ed6181edc85d2da500dbd2753e0d5a9"
-
-jest-haste-map@^22.4.2:
- version "22.4.2"
- resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-22.4.2.tgz#a90178e66146d4378bb076345a949071f3b015b4"
- dependencies:
- fb-watchman "^2.0.0"
- graceful-fs "^4.1.11"
- jest-docblock "^22.4.0"
- jest-serializer "^22.4.0"
- jest-worker "^22.2.2"
- micromatch "^2.3.11"
- sane "^2.0.0"
-
-jest-jasmine2@^22.4.2:
- version "22.4.2"
- resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-22.4.2.tgz#dfd3d259579ed6f52510d8f1ab692808f0d40691"
- dependencies:
- chalk "^2.0.1"
- co "^4.6.0"
- expect "^22.4.0"
- graceful-fs "^4.1.11"
- is-generator-fn "^1.0.0"
- jest-diff "^22.4.0"
- jest-matcher-utils "^22.4.0"
- jest-message-util "^22.4.0"
- jest-snapshot "^22.4.0"
- jest-util "^22.4.1"
- source-map-support "^0.5.0"
-
-jest-leak-detector@^22.4.0:
- version "22.4.0"
- resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-22.4.0.tgz#64da77f05b001c96d2062226e079f89989c4aa2f"
- dependencies:
- pretty-format "^22.4.0"
-
-jest-matcher-utils@^22.4.0:
- version "22.4.0"
- resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-22.4.0.tgz#d55f5faf2270462736bdf7c7485ee931c9d4b6a1"
- dependencies:
- chalk "^2.0.1"
- jest-get-type "^22.1.0"
- pretty-format "^22.4.0"
-
-jest-message-util@^22.4.0:
- version "22.4.0"
- resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-22.4.0.tgz#e3d861df16d2fee60cb2bc8feac2188a42579642"
- dependencies:
- "@babel/code-frame" "^7.0.0-beta.35"
- chalk "^2.0.1"
- micromatch "^2.3.11"
- slash "^1.0.0"
- stack-utils "^1.0.1"
-
-jest-mock@^22.2.0:
- version "22.2.0"
- resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-22.2.0.tgz#444b3f9488a7473adae09bc8a77294afded397a7"
-
-jest-regex-util@^22.1.0:
- version "22.1.0"
- resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-22.1.0.tgz#5daf2fe270074b6da63e5d85f1c9acc866768f53"
-
-jest-resolve-dependencies@^22.1.0:
- version "22.1.0"
- resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-22.1.0.tgz#340e4139fb13315cd43abc054e6c06136be51e31"
- dependencies:
- jest-regex-util "^22.1.0"
-
-jest-resolve@^22.4.2:
- version "22.4.2"
- resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-22.4.2.tgz#25d88aa4147462c9c1c6a1ba16250d3794c24d00"
- dependencies:
- browser-resolve "^1.11.2"
- chalk "^2.0.1"
-
-jest-runner@^22.4.2:
- version "22.4.2"
- resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-22.4.2.tgz#19390ea9d99f768973e16f95a1efa351c0017e87"
- dependencies:
- exit "^0.1.2"
- jest-config "^22.4.2"
- jest-docblock "^22.4.0"
- jest-haste-map "^22.4.2"
- jest-jasmine2 "^22.4.2"
- jest-leak-detector "^22.4.0"
- jest-message-util "^22.4.0"
- jest-runtime "^22.4.2"
- jest-util "^22.4.1"
- jest-worker "^22.2.2"
- throat "^4.0.0"
-
-jest-runtime@^22.4.2:
- version "22.4.2"
- resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-22.4.2.tgz#0de0444f65ce15ee4f2e0055133fc7c17b9168f3"
- dependencies:
- babel-core "^6.0.0"
- babel-jest "^22.4.1"
- babel-plugin-istanbul "^4.1.5"
- chalk "^2.0.1"
- convert-source-map "^1.4.0"
- exit "^0.1.2"
- graceful-fs "^4.1.11"
- jest-config "^22.4.2"
- jest-haste-map "^22.4.2"
- jest-regex-util "^22.1.0"
- jest-resolve "^22.4.2"
- jest-util "^22.4.1"
- jest-validate "^22.4.2"
- json-stable-stringify "^1.0.1"
- micromatch "^2.3.11"
- realpath-native "^1.0.0"
- slash "^1.0.0"
- strip-bom "3.0.0"
- write-file-atomic "^2.1.0"
- yargs "^10.0.3"
-
-jest-serializer@^22.4.0:
- version "22.4.0"
- resolved "https://registry.yarnpkg.com/jest-serializer/-/jest-serializer-22.4.0.tgz#b5d145b98c4b0d2c20ab686609adbb81fe23b566"
-
-jest-snapshot@^22.4.0:
- version "22.4.0"
- resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-22.4.0.tgz#03d3ce63f8fa7352388afc6a3c8b5ccc3a180ed7"
- dependencies:
- chalk "^2.0.1"
- jest-diff "^22.4.0"
- jest-matcher-utils "^22.4.0"
- mkdirp "^0.5.1"
- natural-compare "^1.4.0"
- pretty-format "^22.4.0"
-
-jest-util@^22.4.1:
- version "22.4.1"
- resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-22.4.1.tgz#dd17c3bdb067f8e90591563ec0c42bf847dc249f"
- dependencies:
- callsites "^2.0.0"
- chalk "^2.0.1"
- graceful-fs "^4.1.11"
- is-ci "^1.0.10"
- jest-message-util "^22.4.0"
- mkdirp "^0.5.1"
- source-map "^0.6.0"
-
-jest-validate@^22.4.2:
- version "22.4.2"
- resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-22.4.2.tgz#e789a4e056173bf97fe797a2df2d52105c57d4f4"
- dependencies:
- chalk "^2.0.1"
- jest-config "^22.4.2"
- jest-get-type "^22.1.0"
- leven "^2.1.0"
- pretty-format "^22.4.0"
-
-jest-worker@^22.2.2:
- version "22.2.2"
- resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-22.2.2.tgz#c1f5dc39976884b81f68ec50cb8532b2cbab3390"
- dependencies:
- merge-stream "^1.0.1"
-
-jest@^22.2.2:
- version "22.4.2"
- resolved "https://registry.yarnpkg.com/jest/-/jest-22.4.2.tgz#34012834a49bf1bdd3bc783850ab44e4499afc20"
- dependencies:
- import-local "^1.0.0"
- jest-cli "^22.4.2"
-
-js-tokens@^3.0.0, js-tokens@^3.0.2:
- version "3.0.2"
- resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b"
-
-js-yaml@^3.7.0, js-yaml@^3.9.1:
- version "3.10.0"
- resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.10.0.tgz#2e78441646bd4682e963f22b6e92823c309c62dc"
- dependencies:
- argparse "^1.0.7"
- esprima "^4.0.0"
-
-jsbn@~0.1.0:
- version "0.1.1"
- resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513"
-
-jsdom@^11.5.1:
- version "11.6.2"
- resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-11.6.2.tgz#25d1ef332d48adf77fc5221fe2619967923f16bb"
- dependencies:
- abab "^1.0.4"
- acorn "^5.3.0"
- acorn-globals "^4.1.0"
- array-equal "^1.0.0"
- browser-process-hrtime "^0.1.2"
- content-type-parser "^1.0.2"
- cssom ">= 0.3.2 < 0.4.0"
- cssstyle ">= 0.2.37 < 0.3.0"
- domexception "^1.0.0"
- escodegen "^1.9.0"
- html-encoding-sniffer "^1.0.2"
- left-pad "^1.2.0"
- nwmatcher "^1.4.3"
- parse5 "4.0.0"
- pn "^1.1.0"
- request "^2.83.0"
- request-promise-native "^1.0.5"
- sax "^1.2.4"
- symbol-tree "^3.2.2"
- tough-cookie "^2.3.3"
- w3c-hr-time "^1.0.1"
- webidl-conversions "^4.0.2"
- whatwg-encoding "^1.0.3"
- whatwg-url "^6.4.0"
- ws "^4.0.0"
- xml-name-validator "^3.0.0"
-
-jsesc@^1.3.0:
- version "1.3.0"
- resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-1.3.0.tgz#46c3fec8c1892b12b0833db9bc7622176dbab34b"
-
-json-buffer@3.0.0:
- version "3.0.0"
- resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.0.tgz#5b1f397afc75d677bde8bcfc0e47e1f9a3d9a898"
-
-json-loader@^0.5.4:
- version "0.5.7"
- resolved "https://registry.yarnpkg.com/json-loader/-/json-loader-0.5.7.tgz#dca14a70235ff82f0ac9a3abeb60d337a365185d"
-
-json-schema-traverse@^0.3.0:
- version "0.3.1"
- resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz#349a6d44c53a51de89b40805c5d5e59b417d3340"
-
-json-schema@0.2.3:
- version "0.2.3"
- resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13"
-
-json-stable-stringify-without-jsonify@^1.0.1:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651"
-
-json-stable-stringify@^1.0.1:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz#9a759d39c5f2ff503fd5300646ed445f88c4f9af"
- dependencies:
- jsonify "~0.0.0"
-
-json-stable-stringify@~0.0.0:
- version "0.0.1"
- resolved "https://registry.yarnpkg.com/json-stable-stringify/-/json-stable-stringify-0.0.1.tgz#611c23e814db375527df851193db59dd2af27f45"
- dependencies:
- jsonify "~0.0.0"
-
-json-stringify-safe@5.0.x, json-stringify-safe@~5.0.1:
- version "5.0.1"
- resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb"
-
-json5@^0.5.0, json5@^0.5.1:
- version "0.5.1"
- resolved "https://registry.yarnpkg.com/json5/-/json5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821"
-
-jsonify@~0.0.0:
- version "0.0.0"
- resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73"
-
-jsonparse@^1.2.0:
- version "1.3.1"
- resolved "https://registry.yarnpkg.com/jsonparse/-/jsonparse-1.3.1.tgz#3f4dae4a91fac315f71062f8521cc239f1366280"
-
-jsonpointer@^4.0.0:
- version "4.0.1"
- resolved "https://registry.yarnpkg.com/jsonpointer/-/jsonpointer-4.0.1.tgz#4fd92cb34e0e9db3c89c8622ecf51f9b978c6cb9"
-
-jsprim@^1.2.2:
- version "1.4.1"
- resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.1.tgz#313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2"
- dependencies:
- assert-plus "1.0.0"
- extsprintf "1.3.0"
- json-schema "0.2.3"
- verror "1.10.0"
-
-karma-chrome-launcher@^2.2.0:
- version "2.2.0"
- resolved "https://registry.yarnpkg.com/karma-chrome-launcher/-/karma-chrome-launcher-2.2.0.tgz#cf1b9d07136cc18fe239327d24654c3dbc368acf"
- dependencies:
- fs-access "^1.0.0"
- which "^1.2.1"
-
-karma-firefox-launcher@^1.1.0:
- version "1.1.0"
- resolved "https://registry.yarnpkg.com/karma-firefox-launcher/-/karma-firefox-launcher-1.1.0.tgz#2c47030452f04531eb7d13d4fc7669630bb93339"
-
-karma-jasmine@^1.1.1:
- version "1.1.1"
- resolved "https://registry.yarnpkg.com/karma-jasmine/-/karma-jasmine-1.1.1.tgz#6fe840e75a11600c9d91e84b33c458e1c46a3529"
-
-karma-safari-launcher@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/karma-safari-launcher/-/karma-safari-launcher-1.0.0.tgz#96982a2cc47d066aae71c553babb28319115a2ce"
-
-karma-webpack@^2.0.9:
- version "2.0.13"
- resolved "https://registry.yarnpkg.com/karma-webpack/-/karma-webpack-2.0.13.tgz#cf56e3056c15b7747a0bb2140fc9a6be41dd9f02"
- dependencies:
- async "^2.0.0"
- babel-runtime "^6.0.0"
- loader-utils "^1.0.0"
- lodash "^4.0.0"
- source-map "^0.5.6"
- webpack-dev-middleware "^1.12.0"
-
-karma@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/karma/-/karma-2.0.0.tgz#a02698dd7f0f05ff5eb66ab8f65582490b512e58"
- dependencies:
- bluebird "^3.3.0"
- body-parser "^1.16.1"
- browserify "^14.5.0"
- chokidar "^1.4.1"
- colors "^1.1.0"
- combine-lists "^1.0.0"
- connect "^3.6.0"
- core-js "^2.2.0"
- di "^0.0.1"
- dom-serialize "^2.2.0"
- expand-braces "^0.1.1"
- glob "^7.1.1"
- graceful-fs "^4.1.2"
- http-proxy "^1.13.0"
- isbinaryfile "^3.0.0"
- lodash "^4.17.4"
- log4js "^2.3.9"
- mime "^1.3.4"
- minimatch "^3.0.2"
- optimist "^0.6.1"
- qjobs "^1.1.4"
- range-parser "^1.2.0"
- rimraf "^2.6.0"
- safe-buffer "^5.0.1"
- socket.io "2.0.4"
- source-map "^0.6.1"
- tmp "0.0.33"
- useragent "^2.1.12"
-
-keyv@3.0.0:
- version "3.0.0"
- resolved "https://registry.yarnpkg.com/keyv/-/keyv-3.0.0.tgz#44923ba39e68b12a7cec7df6c3268c031f2ef373"
- dependencies:
- json-buffer "3.0.0"
-
-kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.2.0:
- version "3.2.2"
- resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64"
- dependencies:
- is-buffer "^1.1.5"
-
-kind-of@^4.0.0:
- version "4.0.0"
- resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-4.0.0.tgz#20813df3d712928b207378691a45066fae72dd57"
- dependencies:
- is-buffer "^1.1.5"
-
-kind-of@^5.0.0:
- version "5.1.0"
- resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-5.1.0.tgz#729c91e2d857b7a419a1f9aa65685c4c33f5845d"
-
-kind-of@^6.0.0, kind-of@^6.0.2:
- version "6.0.2"
- resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.2.tgz#01146b36a6218e64e58f3a8d66de5d7fc6f6d051"
-
-labeled-stream-splicer@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/labeled-stream-splicer/-/labeled-stream-splicer-2.0.0.tgz#a52e1d138024c00b86b1c0c91f677918b8ae0a59"
- dependencies:
- inherits "^2.0.1"
- isarray "~0.0.1"
- stream-splicer "^2.0.0"
-
-lazy-cache@^1.0.3:
- version "1.0.4"
- resolved "https://registry.yarnpkg.com/lazy-cache/-/lazy-cache-1.0.4.tgz#a1d78fc3a50474cb80845d3b3b6e1da49a446e8e"
-
-lazy-cache@^2.0.2:
- version "2.0.2"
- resolved "https://registry.yarnpkg.com/lazy-cache/-/lazy-cache-2.0.2.tgz#b9190a4f913354694840859f8a8f7084d8822264"
- dependencies:
- set-getter "^0.1.0"
-
-lcid@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/lcid/-/lcid-1.0.0.tgz#308accafa0bc483a3867b4b6f2b9506251d1b835"
- dependencies:
- invert-kv "^1.0.0"
-
-left-pad@^1.2.0:
- version "1.2.0"
- resolved "https://registry.yarnpkg.com/left-pad/-/left-pad-1.2.0.tgz#d30a73c6b8201d8f7d8e7956ba9616087a68e0ee"
-
-leven@^2.1.0:
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/leven/-/leven-2.1.0.tgz#c2e7a9f772094dee9d34202ae8acce4687875580"
-
-levn@^0.3.0, levn@~0.3.0:
- version "0.3.0"
- resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee"
- dependencies:
- prelude-ls "~1.1.2"
- type-check "~0.3.2"
-
-lexical-scope@^1.2.0:
- version "1.2.0"
- resolved "https://registry.yarnpkg.com/lexical-scope/-/lexical-scope-1.2.0.tgz#fcea5edc704a4b3a8796cdca419c3a0afaf22df4"
- dependencies:
- astw "^2.0.0"
-
-libbase64@0.1.0:
- version "0.1.0"
- resolved "https://registry.yarnpkg.com/libbase64/-/libbase64-0.1.0.tgz#62351a839563ac5ff5bd26f12f60e9830bb751e6"
-
-libmime@3.0.0:
- version "3.0.0"
- resolved "https://registry.yarnpkg.com/libmime/-/libmime-3.0.0.tgz#51a1a9e7448ecbd32cda54421675bb21bc093da6"
- dependencies:
- iconv-lite "0.4.15"
- libbase64 "0.1.0"
- libqp "1.1.0"
-
-libqp@1.1.0:
- version "1.1.0"
- resolved "https://registry.yarnpkg.com/libqp/-/libqp-1.1.0.tgz#f5e6e06ad74b794fb5b5b66988bf728ef1dedbe8"
-
-load-json-file@^1.0.0:
- version "1.1.0"
- resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-1.1.0.tgz#956905708d58b4bab4c2261b04f59f31c99374c0"
- dependencies:
- graceful-fs "^4.1.2"
- parse-json "^2.2.0"
- pify "^2.0.0"
- pinkie-promise "^2.0.0"
- strip-bom "^2.0.0"
-
-load-json-file@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-2.0.0.tgz#7947e42149af80d696cbf797bcaabcfe1fe29ca8"
- dependencies:
- graceful-fs "^4.1.2"
- parse-json "^2.2.0"
- pify "^2.0.0"
- strip-bom "^3.0.0"
-
-loader-runner@^2.3.0:
- version "2.3.0"
- resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-2.3.0.tgz#f482aea82d543e07921700d5a46ef26fdac6b8a2"
-
-loader-utils@^0.2.15:
- version "0.2.17"
- resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-0.2.17.tgz#f86e6374d43205a6e6c60e9196f17c0299bfb348"
- dependencies:
- big.js "^3.1.3"
- emojis-list "^2.0.0"
- json5 "^0.5.0"
- object-assign "^4.0.1"
-
-loader-utils@^1.0.0, loader-utils@^1.1.0:
- version "1.1.0"
- resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-1.1.0.tgz#c98aef488bcceda2ffb5e2de646d6a754429f5cd"
- dependencies:
- big.js "^3.1.3"
- emojis-list "^2.0.0"
- json5 "^0.5.0"
-
-locate-path@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e"
- dependencies:
- p-locate "^2.0.0"
- path-exists "^3.0.0"
-
-lodash.memoize@~3.0.3:
- version "3.0.4"
- resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-3.0.4.tgz#2dcbd2c287cbc0a55cc42328bd0c736150d53e3f"
-
-lodash.sortby@^4.7.0:
- version "4.7.0"
- resolved "https://registry.yarnpkg.com/lodash.sortby/-/lodash.sortby-4.7.0.tgz#edd14c824e2cc9c1e0b0a1b42bb5210516a42438"
-
-lodash@^3.10.1:
- version "3.10.1"
- resolved "https://registry.yarnpkg.com/lodash/-/lodash-3.10.1.tgz#5bf45e8e49ba4189e17d482789dfd15bd140b7b6"
-
-lodash@^4.0.0, lodash@^4.13.1, lodash@^4.14.0, lodash@^4.15.0, lodash@^4.17.4, lodash@^4.3.0, lodash@^4.5.0:
- version "4.17.5"
- resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.5.tgz#99a92d65c0272debe8c96b6057bc8fbfa3bed511"
-
-log4js@^2.3.9:
- version "2.5.3"
- resolved "https://registry.yarnpkg.com/log4js/-/log4js-2.5.3.tgz#38bb7bde5e9c1c181bd75e8bc128c5cd0409caf1"
- dependencies:
- circular-json "^0.5.1"
- date-format "^1.2.0"
- debug "^3.1.0"
- semver "^5.3.0"
- streamroller "^0.7.0"
- optionalDependencies:
- amqplib "^0.5.2"
- axios "^0.15.3"
- hipchat-notifier "^1.1.0"
- loggly "^1.1.0"
- mailgun-js "^0.7.0"
- nodemailer "^2.5.0"
- redis "^2.7.1"
- slack-node "~0.2.0"
-
-loggly@^1.1.0:
- version "1.1.1"
- resolved "https://registry.yarnpkg.com/loggly/-/loggly-1.1.1.tgz#0a0fc1d3fa3a5ec44fdc7b897beba2a4695cebee"
- dependencies:
- json-stringify-safe "5.0.x"
- request "2.75.x"
- timespan "2.3.x"
-
-longest@^1.0.1:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/longest/-/longest-1.0.1.tgz#30a0b2da38f73770e8294a0d22e6625ed77d0097"
-
-loose-envify@^1.0.0:
- version "1.3.1"
- resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.3.1.tgz#d1a8ad33fa9ce0e713d65fdd0ac8b748d478c848"
- dependencies:
- js-tokens "^3.0.0"
-
-lowercase-keys@1.0.0, lowercase-keys@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-1.0.0.tgz#4e3366b39e7f5457e35f1324bdf6f88d0bfc7306"
-
-lru-cache@4.1.x, lru-cache@^4.0.1, lru-cache@^4.1.1:
- version "4.1.1"
- resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.1.tgz#622e32e82488b49279114a4f9ecf45e7cd6bba55"
- dependencies:
- pseudomap "^1.0.2"
- yallist "^2.1.2"
-
-lru-cache@~2.6.5:
- version "2.6.5"
- resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-2.6.5.tgz#e56d6354148ede8d7707b58d143220fd08df0fd5"
-
-magic-string@^0.14.0:
- version "0.14.0"
- resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.14.0.tgz#57224aef1701caeed273b17a39a956e72b172462"
- dependencies:
- vlq "^0.2.1"
-
-magic-string@^0.22.4:
- version "0.22.4"
- resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.22.4.tgz#31039b4e40366395618c1d6cf8193c53917475ff"
- dependencies:
- vlq "^0.2.1"
-
-mailcomposer@4.0.1:
- version "4.0.1"
- resolved "https://registry.yarnpkg.com/mailcomposer/-/mailcomposer-4.0.1.tgz#0e1c44b2a07cf740ee17dc149ba009f19cadfeb4"
- dependencies:
- buildmail "4.0.1"
- libmime "3.0.0"
-
-mailgun-js@^0.7.0:
- version "0.7.15"
- resolved "https://registry.yarnpkg.com/mailgun-js/-/mailgun-js-0.7.15.tgz#ee366a20dac64c3c15c03d6c1b3e0ed795252abb"
- dependencies:
- async "~2.1.2"
- debug "~2.2.0"
- form-data "~2.1.1"
- inflection "~1.10.0"
- is-stream "^1.1.0"
- path-proxy "~1.0.0"
- proxy-agent "~2.0.0"
- q "~1.4.0"
- tsscmp "~1.0.0"
-
-make-dir@^1.0.0:
- version "1.2.0"
- resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-1.2.0.tgz#6d6a49eead4aae296c53bbf3a1a008bd6c89469b"
- dependencies:
- pify "^3.0.0"
-
-makeerror@1.0.x:
- version "1.0.11"
- resolved "https://registry.yarnpkg.com/makeerror/-/makeerror-1.0.11.tgz#e01a5c9109f2af79660e4e8b9587790184f5a96c"
- dependencies:
- tmpl "1.0.x"
-
-map-cache@^0.2.2:
- version "0.2.2"
- resolved "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf"
-
-map-visit@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/map-visit/-/map-visit-1.0.0.tgz#ecdca8f13144e660f1b5bd41f12f3479d98dfb8f"
- dependencies:
- object-visit "^1.0.0"
-
-md5.js@^1.3.4:
- version "1.3.4"
- resolved "https://registry.yarnpkg.com/md5.js/-/md5.js-1.3.4.tgz#e9bdbde94a20a5ac18b04340fc5764d5b09d901d"
- dependencies:
- hash-base "^3.0.0"
- inherits "^2.0.1"
-
-media-typer@0.3.0:
- version "0.3.0"
- resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748"
-
-mem@^1.1.0:
- version "1.1.0"
- resolved "https://registry.yarnpkg.com/mem/-/mem-1.1.0.tgz#5edd52b485ca1d900fe64895505399a0dfa45f76"
- dependencies:
- mimic-fn "^1.0.0"
-
-memory-fs@^0.4.0, memory-fs@~0.4.1:
- version "0.4.1"
- resolved "https://registry.yarnpkg.com/memory-fs/-/memory-fs-0.4.1.tgz#3a9a20b8462523e447cfbc7e8bb80ed667bfc552"
- dependencies:
- errno "^0.1.3"
- readable-stream "^2.0.1"
-
-merge-stream@^1.0.1:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-1.0.1.tgz#4041202d508a342ba00174008df0c251b8c135e1"
- dependencies:
- readable-stream "^2.0.1"
-
-merge@^1.1.3:
- version "1.2.0"
- resolved "https://registry.yarnpkg.com/merge/-/merge-1.2.0.tgz#7531e39d4949c281a66b8c5a6e0265e8b05894da"
-
-micromatch@^2.1.5, micromatch@^2.3.11:
- version "2.3.11"
- resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-2.3.11.tgz#86677c97d1720b363431d04d0d15293bd38c1565"
- dependencies:
- arr-diff "^2.0.0"
- array-unique "^0.2.1"
- braces "^1.8.2"
- expand-brackets "^0.1.4"
- extglob "^0.3.1"
- filename-regex "^2.0.0"
- is-extglob "^1.0.0"
- is-glob "^2.0.1"
- kind-of "^3.0.2"
- normalize-path "^2.0.1"
- object.omit "^2.0.0"
- parse-glob "^3.0.4"
- regex-cache "^0.4.2"
-
-micromatch@^3.1.4, micromatch@^3.1.8:
- version "3.1.9"
- resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.9.tgz#15dc93175ae39e52e93087847096effc73efcf89"
- dependencies:
- arr-diff "^4.0.0"
- array-unique "^0.3.2"
- braces "^2.3.1"
- define-property "^2.0.2"
- extend-shallow "^3.0.2"
- extglob "^2.0.4"
- fragment-cache "^0.2.1"
- kind-of "^6.0.2"
- nanomatch "^1.2.9"
- object.pick "^1.3.0"
- regex-not "^1.0.0"
- snapdragon "^0.8.1"
- to-regex "^3.0.1"
-
-miller-rabin@^4.0.0:
- version "4.0.1"
- resolved "https://registry.yarnpkg.com/miller-rabin/-/miller-rabin-4.0.1.tgz#f080351c865b0dc562a8462966daa53543c78a4d"
- dependencies:
- bn.js "^4.0.0"
- brorand "^1.0.1"
-
-mime-db@~1.33.0:
- version "1.33.0"
- resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.33.0.tgz#a3492050a5cb9b63450541e39d9788d2272783db"
-
-mime-types@^2.1.11, mime-types@^2.1.12, mime-types@~2.1.17, mime-types@~2.1.18, mime-types@~2.1.7:
- version "2.1.18"
- resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.18.tgz#6f323f60a83d11146f831ff11fd66e2fe5503bb8"
- dependencies:
- mime-db "~1.33.0"
-
-mime@^1.3.4, mime@^1.5.0:
- version "1.6.0"
- resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1"
-
-mimic-fn@^1.0.0:
- version "1.2.0"
- resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.2.0.tgz#820c86a39334640e99516928bd03fca88057d022"
-
-mimic-response@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-1.0.0.tgz#df3d3652a73fded6b9b0b24146e6fd052353458e"
-
-minimalistic-assert@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.0.tgz#702be2dda6b37f4836bcb3f5db56641b64a1d3d3"
-
-minimalistic-crypto-utils@^1.0.0, minimalistic-crypto-utils@^1.0.1:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a"
-
-minimatch@^3.0.0, minimatch@^3.0.2, minimatch@^3.0.3, minimatch@^3.0.4:
- version "3.0.4"
- resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083"
- dependencies:
- brace-expansion "^1.1.7"
-
-minimist@0.0.8:
- version "0.0.8"
- resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d"
-
-minimist@^1.1.0, minimist@^1.1.1, minimist@^1.2.0:
- version "1.2.0"
- resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284"
-
-minimist@~0.0.1:
- version "0.0.10"
- resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.10.tgz#de3f98543dbf96082be48ad1a0c7cda836301dcf"
-
-mississippi@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/mississippi/-/mississippi-2.0.0.tgz#3442a508fafc28500486feea99409676e4ee5a6f"
- dependencies:
- concat-stream "^1.5.0"
- duplexify "^3.4.2"
- end-of-stream "^1.1.0"
- flush-write-stream "^1.0.0"
- from2 "^2.1.0"
- parallel-transform "^1.1.0"
- pump "^2.0.1"
- pumpify "^1.3.3"
- stream-each "^1.1.0"
- through2 "^2.0.0"
-
-mixin-deep@^1.2.0:
- version "1.3.1"
- resolved "https://registry.yarnpkg.com/mixin-deep/-/mixin-deep-1.3.1.tgz#a49e7268dce1a0d9698e45326c5626df3543d0fe"
- dependencies:
- for-in "^1.0.2"
- is-extendable "^1.0.1"
-
-"mkdirp@>=0.5 0", mkdirp@^0.5.1, mkdirp@~0.5.0:
- version "0.5.1"
- resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903"
- dependencies:
- minimist "0.0.8"
-
-module-deps@^4.0.8:
- version "4.1.1"
- resolved "https://registry.yarnpkg.com/module-deps/-/module-deps-4.1.1.tgz#23215833f1da13fd606ccb8087b44852dcb821fd"
- dependencies:
- JSONStream "^1.0.3"
- browser-resolve "^1.7.0"
- cached-path-relative "^1.0.0"
- concat-stream "~1.5.0"
- defined "^1.0.0"
- detective "^4.0.0"
- duplexer2 "^0.1.2"
- inherits "^2.0.1"
- parents "^1.0.0"
- readable-stream "^2.0.2"
- resolve "^1.1.3"
- stream-combiner2 "^1.1.1"
- subarg "^1.0.0"
- through2 "^2.0.0"
- xtend "^4.0.0"
-
-move-concurrently@^1.0.1:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/move-concurrently/-/move-concurrently-1.0.1.tgz#be2c005fda32e0b29af1f05d7c4b33214c701f92"
- dependencies:
- aproba "^1.1.1"
- copy-concurrently "^1.0.0"
- fs-write-stream-atomic "^1.0.8"
- mkdirp "^0.5.1"
- rimraf "^2.5.4"
- run-queue "^1.0.3"
-
-ms@0.7.1:
- version "0.7.1"
- resolved "https://registry.yarnpkg.com/ms/-/ms-0.7.1.tgz#9cd13c03adbff25b65effde7ce864ee952017098"
-
-ms@2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8"
-
-mute-stream@0.0.7:
- version "0.0.7"
- resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab"
-
-nan@^2.3.0:
- version "2.9.2"
- resolved "https://registry.yarnpkg.com/nan/-/nan-2.9.2.tgz#f564d75f5f8f36a6d9456cca7a6c4fe488ab7866"
-
-nanomatch@^1.2.9:
- version "1.2.9"
- resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.9.tgz#879f7150cb2dab7a471259066c104eee6e0fa7c2"
- dependencies:
- arr-diff "^4.0.0"
- array-unique "^0.3.2"
- define-property "^2.0.2"
- extend-shallow "^3.0.2"
- fragment-cache "^0.2.1"
- is-odd "^2.0.0"
- is-windows "^1.0.2"
- kind-of "^6.0.2"
- object.pick "^1.3.0"
- regex-not "^1.0.0"
- snapdragon "^0.8.1"
- to-regex "^3.0.1"
-
-natural-compare@^1.4.0:
- version "1.4.0"
- resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7"
-
-negotiator@0.6.1:
- version "0.6.1"
- resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.1.tgz#2b327184e8992101177b28563fb5e7102acd0ca9"
-
-neo-async@^2.5.0:
- version "2.5.0"
- resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.5.0.tgz#76b1c823130cca26acfbaccc8fbaf0a2fa33b18f"
-
-netmask@~1.0.4:
- version "1.0.6"
- resolved "https://registry.yarnpkg.com/netmask/-/netmask-1.0.6.tgz#20297e89d86f6f6400f250d9f4f6b4c1945fcd35"
-
-node-int64@^0.4.0:
- version "0.4.0"
- resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b"
-
-node-libs-browser@^2.0.0:
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/node-libs-browser/-/node-libs-browser-2.1.0.tgz#5f94263d404f6e44767d726901fff05478d600df"
- dependencies:
- assert "^1.1.1"
- browserify-zlib "^0.2.0"
- buffer "^4.3.0"
- console-browserify "^1.1.0"
- constants-browserify "^1.0.0"
- crypto-browserify "^3.11.0"
- domain-browser "^1.1.1"
- events "^1.0.0"
- https-browserify "^1.0.0"
- os-browserify "^0.3.0"
- path-browserify "0.0.0"
- process "^0.11.10"
- punycode "^1.2.4"
- querystring-es3 "^0.2.0"
- readable-stream "^2.3.3"
- stream-browserify "^2.0.1"
- stream-http "^2.7.2"
- string_decoder "^1.0.0"
- timers-browserify "^2.0.4"
- tty-browserify "0.0.0"
- url "^0.11.0"
- util "^0.10.3"
- vm-browserify "0.0.4"
-
-node-notifier@^5.2.1:
- version "5.2.1"
- resolved "https://registry.yarnpkg.com/node-notifier/-/node-notifier-5.2.1.tgz#fa313dd08f5517db0e2502e5758d664ac69f9dea"
- dependencies:
- growly "^1.3.0"
- semver "^5.4.1"
- shellwords "^0.1.1"
- which "^1.3.0"
-
-node-pre-gyp@^0.6.39:
- version "0.6.39"
- resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.6.39.tgz#c00e96860b23c0e1420ac7befc5044e1d78d8649"
- dependencies:
- detect-libc "^1.0.2"
- hawk "3.1.3"
- mkdirp "^0.5.1"
- nopt "^4.0.1"
- npmlog "^4.0.2"
- rc "^1.1.7"
- request "2.81.0"
- rimraf "^2.6.1"
- semver "^5.3.0"
- tar "^2.2.1"
- tar-pack "^3.4.0"
-
-node-uuid@~1.4.7:
- version "1.4.8"
- resolved "https://registry.yarnpkg.com/node-uuid/-/node-uuid-1.4.8.tgz#b040eb0923968afabf8d32fb1f17f1167fdab907"
-
-node.extend@1.0.8:
- version "1.0.8"
- resolved "https://registry.yarnpkg.com/node.extend/-/node.extend-1.0.8.tgz#bab04379f7383f4587990c9df07b6a7f65db772b"
- dependencies:
- is "~0.2.6"
- object-keys "~0.4.0"
-
-node.flow@1.2.3:
- version "1.2.3"
- resolved "https://registry.yarnpkg.com/node.flow/-/node.flow-1.2.3.tgz#e1c44a82aeca8d78b458a77fb3dc642f2eba2649"
- dependencies:
- node.extend "1.0.8"
-
-nodemailer-direct-transport@3.3.2:
- version "3.3.2"
- resolved "https://registry.yarnpkg.com/nodemailer-direct-transport/-/nodemailer-direct-transport-3.3.2.tgz#e96fafb90358560947e569017d97e60738a50a86"
- dependencies:
- nodemailer-shared "1.1.0"
- smtp-connection "2.12.0"
-
-nodemailer-fetch@1.6.0:
- version "1.6.0"
- resolved "https://registry.yarnpkg.com/nodemailer-fetch/-/nodemailer-fetch-1.6.0.tgz#79c4908a1c0f5f375b73fe888da9828f6dc963a4"
-
-nodemailer-shared@1.1.0:
- version "1.1.0"
- resolved "https://registry.yarnpkg.com/nodemailer-shared/-/nodemailer-shared-1.1.0.tgz#cf5994e2fd268d00f5cf0fa767a08169edb07ec0"
- dependencies:
- nodemailer-fetch "1.6.0"
-
-nodemailer-smtp-pool@2.8.2:
- version "2.8.2"
- resolved "https://registry.yarnpkg.com/nodemailer-smtp-pool/-/nodemailer-smtp-pool-2.8.2.tgz#2eb94d6cf85780b1b4725ce853b9cbd5e8da8c72"
- dependencies:
- nodemailer-shared "1.1.0"
- nodemailer-wellknown "0.1.10"
- smtp-connection "2.12.0"
-
-nodemailer-smtp-transport@2.7.2:
- version "2.7.2"
- resolved "https://registry.yarnpkg.com/nodemailer-smtp-transport/-/nodemailer-smtp-transport-2.7.2.tgz#03d71c76314f14ac7dbc7bf033a6a6d16d67fb77"
- dependencies:
- nodemailer-shared "1.1.0"
- nodemailer-wellknown "0.1.10"
- smtp-connection "2.12.0"
-
-nodemailer-wellknown@0.1.10:
- version "0.1.10"
- resolved "https://registry.yarnpkg.com/nodemailer-wellknown/-/nodemailer-wellknown-0.1.10.tgz#586db8101db30cb4438eb546737a41aad0cf13d5"
-
-nodemailer@^2.5.0:
- version "2.7.2"
- resolved "https://registry.yarnpkg.com/nodemailer/-/nodemailer-2.7.2.tgz#f242e649aeeae39b6c7ed740ef7b061c404d30f9"
- dependencies:
- libmime "3.0.0"
- mailcomposer "4.0.1"
- nodemailer-direct-transport "3.3.2"
- nodemailer-shared "1.1.0"
- nodemailer-smtp-pool "2.8.2"
- nodemailer-smtp-transport "2.7.2"
- socks "1.1.9"
-
-nopt@^4.0.1:
- version "4.0.1"
- resolved "https://registry.yarnpkg.com/nopt/-/nopt-4.0.1.tgz#d0d4685afd5415193c8c7505602d0d17cd64474d"
- dependencies:
- abbrev "1"
- osenv "^0.1.4"
-
-normalize-package-data@^2.3.2:
- version "2.4.0"
- resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.4.0.tgz#12f95a307d58352075a04907b84ac8be98ac012f"
- dependencies:
- hosted-git-info "^2.1.4"
- is-builtin-module "^1.0.0"
- semver "2 || 3 || 4 || 5"
- validate-npm-package-license "^3.0.1"
-
-normalize-path@^2.0.0, normalize-path@^2.0.1, normalize-path@^2.1.1:
- version "2.1.1"
- resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9"
- dependencies:
- remove-trailing-separator "^1.0.1"
-
-normalize-url@2.0.1:
- version "2.0.1"
- resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-2.0.1.tgz#835a9da1551fa26f70e92329069a23aa6574d7e6"
- dependencies:
- prepend-http "^2.0.0"
- query-string "^5.0.1"
- sort-keys "^2.0.0"
-
-npm-run-path@^2.0.0:
- version "2.0.2"
- resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-2.0.2.tgz#35a9232dfa35d7067b4cb2ddf2357b1871536c5f"
- dependencies:
- path-key "^2.0.0"
-
-npmlog@^4.0.2:
- version "4.1.2"
- resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b"
- dependencies:
- are-we-there-yet "~1.1.2"
- console-control-strings "~1.1.0"
- gauge "~2.7.3"
- set-blocking "~2.0.0"
-
-null-check@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/null-check/-/null-check-1.0.0.tgz#977dffd7176012b9ec30d2a39db5cf72a0439edd"
-
-number-is-nan@^1.0.0:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d"
-
-nwmatcher@^1.4.3:
- version "1.4.3"
- resolved "https://registry.yarnpkg.com/nwmatcher/-/nwmatcher-1.4.3.tgz#64348e3b3d80f035b40ac11563d278f8b72db89c"
-
-oauth-sign@~0.8.1, oauth-sign@~0.8.2:
- version "0.8.2"
- resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.8.2.tgz#46a6ab7f0aead8deae9ec0565780b7d4efeb9d43"
-
-object-assign@^4.0.1, object-assign@^4.1.0:
- version "4.1.1"
- resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863"
-
-object-component@0.0.3:
- version "0.0.3"
- resolved "https://registry.yarnpkg.com/object-component/-/object-component-0.0.3.tgz#f0c69aa50efc95b866c186f400a33769cb2f1291"
-
-object-copy@^0.1.0:
- version "0.1.0"
- resolved "https://registry.yarnpkg.com/object-copy/-/object-copy-0.1.0.tgz#7e7d858b781bd7c991a41ba975ed3812754e998c"
- dependencies:
- copy-descriptor "^0.1.0"
- define-property "^0.2.5"
- kind-of "^3.0.3"
-
-object-keys@^1.0.8:
- version "1.0.11"
- resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.0.11.tgz#c54601778ad560f1142ce0e01bcca8b56d13426d"
-
-object-keys@~0.4.0:
- version "0.4.0"
- resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-0.4.0.tgz#28a6aae7428dd2c3a92f3d95f21335dd204e0336"
-
-object-visit@^1.0.0:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/object-visit/-/object-visit-1.0.1.tgz#f79c4493af0c5377b59fe39d395e41042dd045bb"
- dependencies:
- isobject "^3.0.0"
-
-object.getownpropertydescriptors@^2.0.3:
- version "2.0.3"
- resolved "https://registry.yarnpkg.com/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.0.3.tgz#8758c846f5b407adab0f236e0986f14b051caa16"
- dependencies:
- define-properties "^1.1.2"
- es-abstract "^1.5.1"
-
-object.omit@^2.0.0:
- version "2.0.1"
- resolved "https://registry.yarnpkg.com/object.omit/-/object.omit-2.0.1.tgz#1a9c744829f39dbb858c76ca3579ae2a54ebd1fa"
- dependencies:
- for-own "^0.1.4"
- is-extendable "^0.1.1"
-
-object.pick@^1.3.0:
- version "1.3.0"
- resolved "https://registry.yarnpkg.com/object.pick/-/object.pick-1.3.0.tgz#87a10ac4c1694bd2e1cbf53591a66141fb5dd747"
- dependencies:
- isobject "^3.0.1"
-
-observatory@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/observatory/-/observatory-1.0.0.tgz#2baa606e8299e6866914ec9c8a4db6a41136e59b"
- dependencies:
- ansi-escapes "^1.1.0"
- chalk "^1.1.1"
- lodash "^3.10.1"
-
-on-finished@~2.3.0:
- version "2.3.0"
- resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947"
- dependencies:
- ee-first "1.1.1"
-
-once@^1.3.0, once@^1.3.1, once@^1.3.3, once@^1.4.0:
- version "1.4.0"
- resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1"
- dependencies:
- wrappy "1"
-
-onetime@^2.0.0:
- version "2.0.1"
- resolved "https://registry.yarnpkg.com/onetime/-/onetime-2.0.1.tgz#067428230fd67443b2794b22bba528b6867962d4"
- dependencies:
- mimic-fn "^1.0.0"
-
-optimist@^0.6.1:
- version "0.6.1"
- resolved "https://registry.yarnpkg.com/optimist/-/optimist-0.6.1.tgz#da3ea74686fa21a19a111c326e90eb15a0196686"
- dependencies:
- minimist "~0.0.1"
- wordwrap "~0.0.2"
-
-optionator@^0.8.1, optionator@^0.8.2:
- version "0.8.2"
- resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.2.tgz#364c5e409d3f4d6301d6c0b4c05bba50180aeb64"
- dependencies:
- deep-is "~0.1.3"
- fast-levenshtein "~2.0.4"
- levn "~0.3.0"
- prelude-ls "~1.1.2"
- type-check "~0.3.2"
- wordwrap "~1.0.0"
-
-os-browserify@^0.3.0, os-browserify@~0.3.0:
- version "0.3.0"
- resolved "https://registry.yarnpkg.com/os-browserify/-/os-browserify-0.3.0.tgz#854373c7f5c2315914fc9bfc6bd8238fdda1ec27"
-
-os-homedir@^1.0.0, os-homedir@^1.0.1:
- version "1.0.2"
- resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3"
-
-os-locale@^2.0.0:
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-2.1.0.tgz#42bc2900a6b5b8bd17376c8e882b65afccf24bf2"
- dependencies:
- execa "^0.7.0"
- lcid "^1.0.0"
- mem "^1.1.0"
-
-os-tmpdir@^1.0.0, os-tmpdir@^1.0.1, os-tmpdir@~1.0.2:
- version "1.0.2"
- resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274"
-
-osenv@^0.1.4:
- version "0.1.5"
- resolved "https://registry.yarnpkg.com/osenv/-/osenv-0.1.5.tgz#85cdfafaeb28e8677f416e287592b5f3f49ea410"
- dependencies:
- os-homedir "^1.0.0"
- os-tmpdir "^1.0.0"
-
-p-cancelable@^0.3.0:
- version "0.3.0"
- resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-0.3.0.tgz#b9e123800bcebb7ac13a479be195b507b98d30fa"
-
-p-finally@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae"
-
-p-is-promise@^1.1.0:
- version "1.1.0"
- resolved "https://registry.yarnpkg.com/p-is-promise/-/p-is-promise-1.1.0.tgz#9c9456989e9f6588017b0434d56097675c3da05e"
-
-p-limit@^1.1.0:
- version "1.2.0"
- resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.2.0.tgz#0e92b6bedcb59f022c13d0f1949dc82d15909f1c"
- dependencies:
- p-try "^1.0.0"
-
-p-locate@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43"
- dependencies:
- p-limit "^1.1.0"
-
-p-timeout@^2.0.1:
- version "2.0.1"
- resolved "https://registry.yarnpkg.com/p-timeout/-/p-timeout-2.0.1.tgz#d8dd1979595d2dc0139e1fe46b8b646cb3cdf038"
- dependencies:
- p-finally "^1.0.0"
-
-p-try@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3"
-
-pac-proxy-agent@1:
- version "1.1.0"
- resolved "https://registry.yarnpkg.com/pac-proxy-agent/-/pac-proxy-agent-1.1.0.tgz#34a385dfdf61d2f0ecace08858c745d3e791fd4d"
- dependencies:
- agent-base "2"
- debug "2"
- extend "3"
- get-uri "2"
- http-proxy-agent "1"
- https-proxy-agent "1"
- pac-resolver "~2.0.0"
- raw-body "2"
- socks-proxy-agent "2"
-
-pac-resolver@~2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/pac-resolver/-/pac-resolver-2.0.0.tgz#99b88d2f193fbdeefc1c9a529c1f3260ab5277cd"
- dependencies:
- co "~3.0.6"
- degenerator "~1.0.2"
- ip "1.0.1"
- netmask "~1.0.4"
- thunkify "~2.1.1"
-
-pako@~1.0.5:
- version "1.0.6"
- resolved "https://registry.yarnpkg.com/pako/-/pako-1.0.6.tgz#0101211baa70c4bca4a0f63f2206e97b7dfaf258"
-
-parallel-transform@^1.1.0:
- version "1.1.0"
- resolved "https://registry.yarnpkg.com/parallel-transform/-/parallel-transform-1.1.0.tgz#d410f065b05da23081fcd10f28854c29bda33b06"
- dependencies:
- cyclist "~0.2.2"
- inherits "^2.0.3"
- readable-stream "^2.1.5"
-
-parents@^1.0.0, parents@^1.0.1:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/parents/-/parents-1.0.1.tgz#fedd4d2bf193a77745fe71e371d73c3307d9c751"
- dependencies:
- path-platform "~0.11.15"
-
-parse-asn1@^5.0.0:
- version "5.1.0"
- resolved "https://registry.yarnpkg.com/parse-asn1/-/parse-asn1-5.1.0.tgz#37c4f9b7ed3ab65c74817b5f2480937fbf97c712"
- dependencies:
- asn1.js "^4.0.0"
- browserify-aes "^1.0.0"
- create-hash "^1.1.0"
- evp_bytestokey "^1.0.0"
- pbkdf2 "^3.0.3"
-
-parse-glob@^3.0.4:
- version "3.0.4"
- resolved "https://registry.yarnpkg.com/parse-glob/-/parse-glob-3.0.4.tgz#b2c376cfb11f35513badd173ef0bb6e3a388391c"
- dependencies:
- glob-base "^0.3.0"
- is-dotfile "^1.0.0"
- is-extglob "^1.0.0"
- is-glob "^2.0.0"
-
-parse-json@^2.2.0:
- version "2.2.0"
- resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9"
- dependencies:
- error-ex "^1.2.0"
-
-parse5@4.0.0:
- version "4.0.0"
- resolved "https://registry.yarnpkg.com/parse5/-/parse5-4.0.0.tgz#6d78656e3da8d78b4ec0b906f7c08ef1dfe3f608"
-
-parseqs@0.0.5:
- version "0.0.5"
- resolved "https://registry.yarnpkg.com/parseqs/-/parseqs-0.0.5.tgz#d5208a3738e46766e291ba2ea173684921a8b89d"
- dependencies:
- better-assert "~1.0.0"
-
-parseuri@0.0.5:
- version "0.0.5"
- resolved "https://registry.yarnpkg.com/parseuri/-/parseuri-0.0.5.tgz#80204a50d4dbb779bfdc6ebe2778d90e4bce320a"
- dependencies:
- better-assert "~1.0.0"
-
-parseurl@~1.3.2:
- version "1.3.2"
- resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.2.tgz#fc289d4ed8993119460c156253262cdc8de65bf3"
-
-pascalcase@^0.1.1:
- version "0.1.1"
- resolved "https://registry.yarnpkg.com/pascalcase/-/pascalcase-0.1.1.tgz#b363e55e8006ca6fe21784d2db22bd15d7917f14"
-
-path-browserify@0.0.0, path-browserify@~0.0.0:
- version "0.0.0"
- resolved "https://registry.yarnpkg.com/path-browserify/-/path-browserify-0.0.0.tgz#a0b870729aae214005b7d5032ec2cbbb0fb4451a"
-
-path-dirname@^1.0.0:
- version "1.0.2"
- resolved "https://registry.yarnpkg.com/path-dirname/-/path-dirname-1.0.2.tgz#cc33d24d525e099a5388c0336c6e32b9160609e0"
-
-path-exists@^2.0.0:
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-2.1.0.tgz#0feb6c64f0fc518d9a754dd5efb62c7022761f4b"
- dependencies:
- pinkie-promise "^2.0.0"
-
-path-exists@^3.0.0:
- version "3.0.0"
- resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515"
-
-path-is-absolute@^1.0.0, path-is-absolute@^1.0.1:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f"
-
-path-is-inside@^1.0.1, path-is-inside@^1.0.2:
- version "1.0.2"
- resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53"
-
-path-key@^2.0.0:
- version "2.0.1"
- resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40"
-
-path-parse@^1.0.5:
- version "1.0.5"
- resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.5.tgz#3c1adf871ea9cd6c9431b6ea2bd74a0ff055c4c1"
-
-path-platform@~0.11.15:
- version "0.11.15"
- resolved "https://registry.yarnpkg.com/path-platform/-/path-platform-0.11.15.tgz#e864217f74c36850f0852b78dc7bf7d4a5721bf2"
-
-path-proxy@~1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/path-proxy/-/path-proxy-1.0.0.tgz#18e8a36859fc9d2f1a53b48dee138543c020de5e"
- dependencies:
- inflection "~1.3.0"
-
-path-type@^1.0.0:
- version "1.1.0"
- resolved "https://registry.yarnpkg.com/path-type/-/path-type-1.1.0.tgz#59c44f7ee491da704da415da5a4070ba4f8fe441"
- dependencies:
- graceful-fs "^4.1.2"
- pify "^2.0.0"
- pinkie-promise "^2.0.0"
-
-path-type@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/path-type/-/path-type-2.0.0.tgz#f012ccb8415b7096fc2daa1054c3d72389594c73"
- dependencies:
- pify "^2.0.0"
-
-pbkdf2@^3.0.3:
- version "3.0.14"
- resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.0.14.tgz#a35e13c64799b06ce15320f459c230e68e73bade"
- dependencies:
- create-hash "^1.1.2"
- create-hmac "^1.1.4"
- ripemd160 "^2.0.1"
- safe-buffer "^5.0.1"
- sha.js "^2.4.8"
-
-performance-now@^0.2.0:
- version "0.2.0"
- resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-0.2.0.tgz#33ef30c5c77d4ea21c5a53869d91b56d8f2555e5"
-
-performance-now@^2.1.0:
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b"
-
-pify@^2.0.0:
- version "2.3.0"
- resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c"
-
-pify@^3.0.0:
- version "3.0.0"
- resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176"
-
-pinkie-promise@^2.0.0:
- version "2.0.1"
- resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa"
- dependencies:
- pinkie "^2.0.0"
-
-pinkie@^2.0.0:
- version "2.0.4"
- resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870"
-
-pkg-dir@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-2.0.0.tgz#f6d5d1109e19d63edf428e0bd57e12777615334b"
- dependencies:
- find-up "^2.1.0"
-
-pluralize@^7.0.0:
- version "7.0.0"
- resolved "https://registry.yarnpkg.com/pluralize/-/pluralize-7.0.0.tgz#298b89df8b93b0221dbf421ad2b1b1ea23fc6777"
-
-pn@^1.1.0:
- version "1.1.0"
- resolved "https://registry.yarnpkg.com/pn/-/pn-1.1.0.tgz#e2f4cef0e219f463c179ab37463e4e1ecdccbafb"
-
-posix-character-classes@^0.1.0:
- version "0.1.1"
- resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab"
-
-prelude-ls@~1.1.2:
- version "1.1.2"
- resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54"
-
-prepend-http@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-2.0.0.tgz#e92434bfa5ea8c19f41cdfd401d741a3c819d897"
-
-preserve@^0.2.0:
- version "0.2.0"
- resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b"
-
-pretty-format@^22.4.0:
- version "22.4.0"
- resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-22.4.0.tgz#237b1f7e1c50ed03bc65c03ccc29d7c8bb7beb94"
- dependencies:
- ansi-regex "^3.0.0"
- ansi-styles "^3.2.0"
-
-private@^0.1.7:
- version "0.1.8"
- resolved "https://registry.yarnpkg.com/private/-/private-0.1.8.tgz#2381edb3689f7a53d653190060fcf822d2f368ff"
-
-process-nextick-args@~1.0.6:
- version "1.0.7"
- resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-1.0.7.tgz#150e20b756590ad3f91093f25a4f2ad8bff30ba3"
-
-process-nextick-args@~2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.0.tgz#a37d732f4271b4ab1ad070d35508e8290788ffaa"
-
-process@^0.11.10, process@~0.11.0:
- version "0.11.10"
- resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182"
-
-progress@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.0.tgz#8a1be366bf8fc23db2bd23f10c6fe920b4389d1f"
-
-promise-inflight@^1.0.1:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/promise-inflight/-/promise-inflight-1.0.1.tgz#98472870bf228132fcbdd868129bad12c3c029e3"
-
-proxy-agent@~2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/proxy-agent/-/proxy-agent-2.0.0.tgz#57eb5347aa805d74ec681cb25649dba39c933499"
- dependencies:
- agent-base "2"
- debug "2"
- extend "3"
- http-proxy-agent "1"
- https-proxy-agent "1"
- lru-cache "~2.6.5"
- pac-proxy-agent "1"
- socks-proxy-agent "2"
-
-prr@~1.0.1:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/prr/-/prr-1.0.1.tgz#d3fc114ba06995a45ec6893f484ceb1d78f5f476"
-
-pseudomap@^1.0.2:
- version "1.0.2"
- resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3"
-
-public-encrypt@^4.0.0:
- version "4.0.0"
- resolved "https://registry.yarnpkg.com/public-encrypt/-/public-encrypt-4.0.0.tgz#39f699f3a46560dd5ebacbca693caf7c65c18cc6"
- dependencies:
- bn.js "^4.1.0"
- browserify-rsa "^4.0.0"
- create-hash "^1.1.0"
- parse-asn1 "^5.0.0"
- randombytes "^2.0.1"
-
-pump@^2.0.0, pump@^2.0.1:
- version "2.0.1"
- resolved "https://registry.yarnpkg.com/pump/-/pump-2.0.1.tgz#12399add6e4cf7526d973cbc8b5ce2e2908b3909"
- dependencies:
- end-of-stream "^1.1.0"
- once "^1.3.1"
-
-pumpify@^1.3.3:
- version "1.4.0"
- resolved "https://registry.yarnpkg.com/pumpify/-/pumpify-1.4.0.tgz#80b7c5df7e24153d03f0e7ac8a05a5d068bd07fb"
- dependencies:
- duplexify "^3.5.3"
- inherits "^2.0.3"
- pump "^2.0.0"
-
-punycode@1.3.2:
- version "1.3.2"
- resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.3.2.tgz#9653a036fb7c1ee42342f2325cceefea3926c48d"
-
-punycode@1.4.1, punycode@^1.2.4, punycode@^1.3.2, punycode@^1.4.1:
- version "1.4.1"
- resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e"
-
-punycode@^2.1.0:
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.0.tgz#5f863edc89b96db09074bad7947bf09056ca4e7d"
-
-q@~1.4.0:
- version "1.4.1"
- resolved "https://registry.yarnpkg.com/q/-/q-1.4.1.tgz#55705bcd93c5f3673530c2c2cbc0c2b3addc286e"
-
-qjobs@^1.1.4:
- version "1.2.0"
- resolved "https://registry.yarnpkg.com/qjobs/-/qjobs-1.2.0.tgz#c45e9c61800bd087ef88d7e256423bdd49e5d071"
-
-qs@6.5.1, qs@~6.5.1:
- version "6.5.1"
- resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.1.tgz#349cdf6eef89ec45c12d7d5eb3fc0c870343a6d8"
-
-qs@~6.2.0:
- version "6.2.3"
- resolved "https://registry.yarnpkg.com/qs/-/qs-6.2.3.tgz#1cfcb25c10a9b2b483053ff39f5dfc9233908cfe"
-
-qs@~6.4.0:
- version "6.4.0"
- resolved "https://registry.yarnpkg.com/qs/-/qs-6.4.0.tgz#13e26d28ad6b0ffaa91312cd3bf708ed351e7233"
-
-query-string@^5.0.1:
- version "5.1.0"
- resolved "https://registry.yarnpkg.com/query-string/-/query-string-5.1.0.tgz#9583b15fd1307f899e973ed418886426a9976469"
- dependencies:
- decode-uri-component "^0.2.0"
- object-assign "^4.1.0"
- strict-uri-encode "^1.0.0"
-
-querystring-es3@^0.2.0, querystring-es3@~0.2.0:
- version "0.2.1"
- resolved "https://registry.yarnpkg.com/querystring-es3/-/querystring-es3-0.2.1.tgz#9ec61f79049875707d69414596fd907a4d711e73"
-
-querystring@0.2.0:
- version "0.2.0"
- resolved "https://registry.yarnpkg.com/querystring/-/querystring-0.2.0.tgz#b209849203bb25df820da756e747005878521620"
-
-randomatic@^1.1.3:
- version "1.1.7"
- resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-1.1.7.tgz#c7abe9cc8b87c0baa876b19fde83fd464797e38c"
- dependencies:
- is-number "^3.0.0"
- kind-of "^4.0.0"
-
-randombytes@^2.0.0, randombytes@^2.0.1, randombytes@^2.0.5:
- version "2.0.6"
- resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.0.6.tgz#d302c522948588848a8d300c932b44c24231da80"
- dependencies:
- safe-buffer "^5.1.0"
-
-randomfill@^1.0.3:
- version "1.0.4"
- resolved "https://registry.yarnpkg.com/randomfill/-/randomfill-1.0.4.tgz#c92196fc86ab42be983f1bf31778224931d61458"
- dependencies:
- randombytes "^2.0.5"
- safe-buffer "^5.1.0"
-
-range-parser@^1.0.3, range-parser@^1.2.0:
- version "1.2.0"
- resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.0.tgz#f49be6b487894ddc40dcc94a322f611092e00d5e"
-
-raw-body@2, raw-body@2.3.2:
- version "2.3.2"
- resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.3.2.tgz#bcd60c77d3eb93cde0050295c3f379389bc88f89"
- dependencies:
- bytes "3.0.0"
- http-errors "1.6.2"
- iconv-lite "0.4.19"
- unpipe "1.0.0"
-
-rc@^1.1.7:
- version "1.2.5"
- resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.5.tgz#275cd687f6e3b36cc756baa26dfee80a790301fd"
- dependencies:
- deep-extend "~0.4.0"
- ini "~1.3.0"
- minimist "^1.2.0"
- strip-json-comments "~2.0.1"
-
-read-only-stream@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/read-only-stream/-/read-only-stream-2.0.0.tgz#2724fd6a8113d73764ac288d4386270c1dbf17f0"
- dependencies:
- readable-stream "^2.0.2"
-
-read-pkg-up@^1.0.1:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-1.0.1.tgz#9d63c13276c065918d57f002a57f40a1b643fb02"
- dependencies:
- find-up "^1.0.0"
- read-pkg "^1.0.0"
-
-read-pkg-up@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-2.0.0.tgz#6b72a8048984e0c41e79510fd5e9fa99b3b549be"
- dependencies:
- find-up "^2.0.0"
- read-pkg "^2.0.0"
-
-read-pkg@^1.0.0:
- version "1.1.0"
- resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-1.1.0.tgz#f5ffaa5ecd29cb31c0474bca7d756b6bb29e3f28"
- dependencies:
- load-json-file "^1.0.0"
- normalize-package-data "^2.3.2"
- path-type "^1.0.0"
-
-read-pkg@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-2.0.0.tgz#8ef1c0623c6a6db0dc6713c4bfac46332b2368f8"
- dependencies:
- load-json-file "^2.0.0"
- normalize-package-data "^2.3.2"
- path-type "^2.0.0"
-
-"readable-stream@1 || 2", readable-stream@2, readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.4, readable-stream@^2.0.6, readable-stream@^2.1.4, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.3.0, readable-stream@^2.3.3:
- version "2.3.4"
- resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.4.tgz#c946c3f47fa7d8eabc0b6150f4a12f69a4574071"
- dependencies:
- core-util-is "~1.0.0"
- inherits "~2.0.3"
- isarray "~1.0.0"
- process-nextick-args "~2.0.0"
- safe-buffer "~5.1.1"
- string_decoder "~1.0.3"
- util-deprecate "~1.0.1"
-
-readable-stream@1.1.x, "readable-stream@1.x >=1.1.9":
- version "1.1.14"
- resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.1.14.tgz#7cf4c54ef648e3813084c636dd2079e166c081d9"
- dependencies:
- core-util-is "~1.0.0"
- inherits "~2.0.1"
- isarray "0.0.1"
- string_decoder "~0.10.x"
-
-readable-stream@~2.0.0, readable-stream@~2.0.5:
- version "2.0.6"
- resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.0.6.tgz#8f90341e68a53ccc928788dacfcd11b36eb9b78e"
- dependencies:
- core-util-is "~1.0.0"
- inherits "~2.0.1"
- isarray "~1.0.0"
- process-nextick-args "~1.0.6"
- string_decoder "~0.10.x"
- util-deprecate "~1.0.1"
-
-readdirp@^2.0.0:
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-2.1.0.tgz#4ed0ad060df3073300c48440373f72d1cc642d78"
- dependencies:
- graceful-fs "^4.1.2"
- minimatch "^3.0.2"
- readable-stream "^2.0.2"
- set-immediate-shim "^1.0.1"
-
-realpath-native@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/realpath-native/-/realpath-native-1.0.0.tgz#7885721a83b43bd5327609f0ddecb2482305fdf0"
- dependencies:
- util.promisify "^1.0.0"
-
-redis-commands@^1.2.0:
- version "1.3.5"
- resolved "https://registry.yarnpkg.com/redis-commands/-/redis-commands-1.3.5.tgz#4495889414f1e886261180b1442e7295602d83a2"
-
-redis-parser@^2.6.0:
- version "2.6.0"
- resolved "https://registry.yarnpkg.com/redis-parser/-/redis-parser-2.6.0.tgz#52ed09dacac108f1a631c07e9b69941e7a19504b"
-
-redis@^2.7.1:
- version "2.8.0"
- resolved "https://registry.yarnpkg.com/redis/-/redis-2.8.0.tgz#202288e3f58c49f6079d97af7a10e1303ae14b02"
- dependencies:
- double-ended-queue "^2.1.0-0"
- redis-commands "^1.2.0"
- redis-parser "^2.6.0"
-
-regenerator-runtime@^0.11.0:
- version "0.11.1"
- resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz#be05ad7f9bf7d22e056f9726cee5017fbf19e2e9"
-
-regex-cache@^0.4.2:
- version "0.4.4"
- resolved "https://registry.yarnpkg.com/regex-cache/-/regex-cache-0.4.4.tgz#75bdc58a2a1496cec48a12835bc54c8d562336dd"
- dependencies:
- is-equal-shallow "^0.1.3"
-
-regex-not@^1.0.0, regex-not@^1.0.2:
- version "1.0.2"
- resolved "https://registry.yarnpkg.com/regex-not/-/regex-not-1.0.2.tgz#1f4ece27e00b0b65e0247a6810e6a85d83a5752c"
- dependencies:
- extend-shallow "^3.0.2"
- safe-regex "^1.1.0"
-
-remove-trailing-separator@^1.0.1:
- version "1.1.0"
- resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef"
-
-repeat-element@^1.1.2:
- version "1.1.2"
- resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.2.tgz#ef089a178d1483baae4d93eb98b4f9e4e11d990a"
-
-repeat-string@^0.2.2:
- version "0.2.2"
- resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-0.2.2.tgz#c7a8d3236068362059a7e4651fc6884e8b1fb4ae"
-
-repeat-string@^1.5.2, repeat-string@^1.6.1:
- version "1.6.1"
- resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637"
-
-repeating@^2.0.0:
- version "2.0.1"
- resolved "https://registry.yarnpkg.com/repeating/-/repeating-2.0.1.tgz#5214c53a926d3552707527fbab415dbc08d06dda"
- dependencies:
- is-finite "^1.0.0"
-
-replace-in-file@^3.1.1:
- version "3.1.1"
- resolved "https://registry.yarnpkg.com/replace-in-file/-/replace-in-file-3.1.1.tgz#84052a6948771e8833a0738a0eb905feb0c9c7f4"
- dependencies:
- chalk "^2.3.0"
- glob "^7.1.2"
- yargs "^11.0.0"
-
-request-promise-core@1.1.1:
- version "1.1.1"
- resolved "https://registry.yarnpkg.com/request-promise-core/-/request-promise-core-1.1.1.tgz#3eee00b2c5aa83239cfb04c5700da36f81cd08b6"
- dependencies:
- lodash "^4.13.1"
-
-request-promise-native@^1.0.5:
- version "1.0.5"
- resolved "https://registry.yarnpkg.com/request-promise-native/-/request-promise-native-1.0.5.tgz#5281770f68e0c9719e5163fd3fab482215f4fda5"
- dependencies:
- request-promise-core "1.1.1"
- stealthy-require "^1.1.0"
- tough-cookie ">=2.3.3"
-
-request@2.75.x:
- version "2.75.0"
- resolved "https://registry.yarnpkg.com/request/-/request-2.75.0.tgz#d2b8268a286da13eaa5d01adf5d18cc90f657d93"
- dependencies:
- aws-sign2 "~0.6.0"
- aws4 "^1.2.1"
- bl "~1.1.2"
- caseless "~0.11.0"
- combined-stream "~1.0.5"
- extend "~3.0.0"
- forever-agent "~0.6.1"
- form-data "~2.0.0"
- har-validator "~2.0.6"
- hawk "~3.1.3"
- http-signature "~1.1.0"
- is-typedarray "~1.0.0"
- isstream "~0.1.2"
- json-stringify-safe "~5.0.1"
- mime-types "~2.1.7"
- node-uuid "~1.4.7"
- oauth-sign "~0.8.1"
- qs "~6.2.0"
- stringstream "~0.0.4"
- tough-cookie "~2.3.0"
- tunnel-agent "~0.4.1"
-
-request@2.81.0:
- version "2.81.0"
- resolved "https://registry.yarnpkg.com/request/-/request-2.81.0.tgz#c6928946a0e06c5f8d6f8a9333469ffda46298a0"
- dependencies:
- aws-sign2 "~0.6.0"
- aws4 "^1.2.1"
- caseless "~0.12.0"
- combined-stream "~1.0.5"
- extend "~3.0.0"
- forever-agent "~0.6.1"
- form-data "~2.1.1"
- har-validator "~4.2.1"
- hawk "~3.1.3"
- http-signature "~1.1.0"
- is-typedarray "~1.0.0"
- isstream "~0.1.2"
- json-stringify-safe "~5.0.1"
- mime-types "~2.1.7"
- oauth-sign "~0.8.1"
- performance-now "^0.2.0"
- qs "~6.4.0"
- safe-buffer "^5.0.1"
- stringstream "~0.0.4"
- tough-cookie "~2.3.0"
- tunnel-agent "^0.6.0"
- uuid "^3.0.0"
-
-request@^2.0.0, request@^2.74.0, request@^2.83.0:
- version "2.83.0"
- resolved "https://registry.yarnpkg.com/request/-/request-2.83.0.tgz#ca0b65da02ed62935887808e6f510381034e3356"
- dependencies:
- aws-sign2 "~0.7.0"
- aws4 "^1.6.0"
- caseless "~0.12.0"
- combined-stream "~1.0.5"
- extend "~3.0.1"
- forever-agent "~0.6.1"
- form-data "~2.3.1"
- har-validator "~5.0.3"
- hawk "~6.0.2"
- http-signature "~1.2.0"
- is-typedarray "~1.0.0"
- isstream "~0.1.2"
- json-stringify-safe "~5.0.1"
- mime-types "~2.1.17"
- oauth-sign "~0.8.2"
- performance-now "^2.1.0"
- qs "~6.5.1"
- safe-buffer "^5.1.1"
- stringstream "~0.0.5"
- tough-cookie "~2.3.3"
- tunnel-agent "^0.6.0"
- uuid "^3.1.0"
-
-requestretry@^1.2.2:
- version "1.13.0"
- resolved "https://registry.yarnpkg.com/requestretry/-/requestretry-1.13.0.tgz#213ec1006eeb750e8b8ce54176283d15a8d55d94"
- dependencies:
- extend "^3.0.0"
- lodash "^4.15.0"
- request "^2.74.0"
- when "^3.7.7"
-
-require-directory@^2.1.1:
- version "2.1.1"
- resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42"
-
-require-main-filename@^1.0.1:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1"
-
-require-uncached@^1.0.3:
- version "1.0.3"
- resolved "https://registry.yarnpkg.com/require-uncached/-/require-uncached-1.0.3.tgz#4e0d56d6c9662fd31e43011c4b95aa49955421d3"
- dependencies:
- caller-path "^0.1.0"
- resolve-from "^1.0.0"
-
-requires-port@1.x.x:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff"
-
-resolve-cwd@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/resolve-cwd/-/resolve-cwd-2.0.0.tgz#00a9f7387556e27038eae232caa372a6a59b665a"
- dependencies:
- resolve-from "^3.0.0"
-
-resolve-from@^1.0.0:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-1.0.1.tgz#26cbfe935d1aeeeabb29bc3fe5aeb01e93d44226"
-
-resolve-from@^3.0.0:
- version "3.0.0"
- resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-3.0.0.tgz#b22c7af7d9d6881bc8b6e653335eebcb0a188748"
-
-resolve-url@^0.2.1:
- version "0.2.1"
- resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a"
-
-resolve@1.1.7:
- version "1.1.7"
- resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b"
-
-resolve@^1.1.3, resolve@^1.1.4:
- version "1.5.0"
- resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.5.0.tgz#1f09acce796c9a762579f31b2c1cc4c3cddf9f36"
- dependencies:
- path-parse "^1.0.5"
-
-responselike@1.0.2:
- version "1.0.2"
- resolved "https://registry.yarnpkg.com/responselike/-/responselike-1.0.2.tgz#918720ef3b631c5642be068f15ade5a46f4ba1e7"
- dependencies:
- lowercase-keys "^1.0.0"
-
-restore-cursor@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-2.0.0.tgz#9f7ee287f82fd326d4fd162923d62129eee0dfaf"
- dependencies:
- onetime "^2.0.0"
- signal-exit "^3.0.2"
-
-ret@~0.1.10:
- version "0.1.15"
- resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc"
-
-right-align@^0.1.1:
- version "0.1.3"
- resolved "https://registry.yarnpkg.com/right-align/-/right-align-0.1.3.tgz#61339b722fe6a3515689210d24e14c96148613ef"
- dependencies:
- align-text "^0.1.1"
-
-rimraf@2, rimraf@^2.2.8, rimraf@^2.5.1, rimraf@^2.5.4, rimraf@^2.6.0, rimraf@^2.6.1, rimraf@^2.6.2:
- version "2.6.2"
- resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.2.tgz#2ed8150d24a16ea8651e6d6ef0f47c4158ce7a36"
- dependencies:
- glob "^7.0.5"
-
-rimraf@~2.2.6:
- version "2.2.8"
- resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.2.8.tgz#e439be2aaee327321952730f99a8929e4fc50582"
-
-ripemd160@^2.0.0, ripemd160@^2.0.1:
- version "2.0.1"
- resolved "https://registry.yarnpkg.com/ripemd160/-/ripemd160-2.0.1.tgz#0f4584295c53a3628af7e6d79aca21ce57d1c6e7"
- dependencies:
- hash-base "^2.0.0"
- inherits "^2.0.1"
-
-rmdir@^1.2.0:
- version "1.2.0"
- resolved "https://registry.yarnpkg.com/rmdir/-/rmdir-1.2.0.tgz#4fe0357cb06168c258e73e968093dc4e8a0f3253"
- dependencies:
- node.flow "1.2.3"
-
-rollup-plugin-buble@^0.19.1:
- version "0.19.2"
- resolved "https://registry.yarnpkg.com/rollup-plugin-buble/-/rollup-plugin-buble-0.19.2.tgz#c0590c7d3d475b5ed59f129764ec93710cc6e8dd"
- dependencies:
- buble "^0.19.2"
- rollup-pluginutils "^2.0.1"
-
-rollup-pluginutils@^2.0.1:
- version "2.0.1"
- resolved "https://registry.yarnpkg.com/rollup-pluginutils/-/rollup-pluginutils-2.0.1.tgz#7ec95b3573f6543a46a6461bd9a7c544525d0fc0"
- dependencies:
- estree-walker "^0.3.0"
- micromatch "^2.3.11"
-
-rollup@^0.56.2:
- version "0.56.3"
- resolved "https://registry.yarnpkg.com/rollup/-/rollup-0.56.3.tgz#7900695531afa1badd3235f285cc4aa0d49ce254"
-
-run-async@^2.2.0:
- version "2.3.0"
- resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.3.0.tgz#0371ab4ae0bdd720d4166d7dfda64ff7a445a6c0"
- dependencies:
- is-promise "^2.1.0"
-
-run-queue@^1.0.0, run-queue@^1.0.3:
- version "1.0.3"
- resolved "https://registry.yarnpkg.com/run-queue/-/run-queue-1.0.3.tgz#e848396f057d223f24386924618e25694161ec47"
- dependencies:
- aproba "^1.1.1"
-
-rx-lite-aggregates@^4.0.8:
- version "4.0.8"
- resolved "https://registry.yarnpkg.com/rx-lite-aggregates/-/rx-lite-aggregates-4.0.8.tgz#753b87a89a11c95467c4ac1626c4efc4e05c67be"
- dependencies:
- rx-lite "*"
-
-rx-lite@*, rx-lite@^4.0.8:
- version "4.0.8"
- resolved "https://registry.yarnpkg.com/rx-lite/-/rx-lite-4.0.8.tgz#0b1e11af8bc44836f04a6407e92da42467b79444"
-
-safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@~5.1.0, safe-buffer@~5.1.1:
- version "5.1.1"
- resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.1.tgz#893312af69b2123def71f57889001671eeb2c853"
-
-safe-regex@^1.1.0:
- version "1.1.0"
- resolved "https://registry.yarnpkg.com/safe-regex/-/safe-regex-1.1.0.tgz#40a3669f3b077d1e943d44629e157dd48023bf2e"
- dependencies:
- ret "~0.1.10"
-
-sane@^2.0.0:
- version "2.4.1"
- resolved "https://registry.yarnpkg.com/sane/-/sane-2.4.1.tgz#29f991208cf28636720efdc584293e7fd66663a5"
- dependencies:
- anymatch "^1.3.0"
- exec-sh "^0.2.0"
- fb-watchman "^2.0.0"
- minimatch "^3.0.2"
- minimist "^1.1.1"
- walker "~1.0.5"
- watch "~0.18.0"
- optionalDependencies:
- fsevents "^1.1.1"
-
-sax@^1.2.4:
- version "1.2.4"
- resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9"
-
-schema-utils@^0.4.2:
- version "0.4.5"
- resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-0.4.5.tgz#21836f0608aac17b78f9e3e24daff14a5ca13a3e"
- dependencies:
- ajv "^6.1.0"
- ajv-keywords "^3.1.0"
-
-"semver@2 || 3 || 4 || 5", semver@^5.3.0, semver@^5.4.1:
- version "5.5.0"
- resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.0.tgz#dc4bbc7a6ca9d916dee5d43516f0092b58f7b8ab"
-
-semver@~5.0.1:
- version "5.0.3"
- resolved "https://registry.yarnpkg.com/semver/-/semver-5.0.3.tgz#77466de589cd5d3c95f138aa78bc569a3cb5d27a"
-
-serialize-javascript@^1.4.0:
- version "1.4.0"
- resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-1.4.0.tgz#7c958514db6ac2443a8abc062dc9f7886a7f6005"
-
-set-blocking@^2.0.0, set-blocking@~2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7"
-
-set-getter@^0.1.0:
- version "0.1.0"
- resolved "https://registry.yarnpkg.com/set-getter/-/set-getter-0.1.0.tgz#d769c182c9d5a51f409145f2fba82e5e86e80376"
- dependencies:
- to-object-path "^0.3.0"
-
-set-immediate-shim@^1.0.1:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz#4b2b1b27eb808a9f8dcc481a58e5e56f599f3f61"
-
-set-value@^0.4.3:
- version "0.4.3"
- resolved "https://registry.yarnpkg.com/set-value/-/set-value-0.4.3.tgz#7db08f9d3d22dc7f78e53af3c3bf4666ecdfccf1"
- dependencies:
- extend-shallow "^2.0.1"
- is-extendable "^0.1.1"
- is-plain-object "^2.0.1"
- to-object-path "^0.3.0"
-
-set-value@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/set-value/-/set-value-2.0.0.tgz#71ae4a88f0feefbbf52d1ea604f3fb315ebb6274"
- dependencies:
- extend-shallow "^2.0.1"
- is-extendable "^0.1.1"
- is-plain-object "^2.0.3"
- split-string "^3.0.1"
-
-setimmediate@^1.0.4:
- version "1.0.5"
- resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285"
-
-setprototypeof@1.0.3:
- version "1.0.3"
- resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.0.3.tgz#66567e37043eeb4f04d91bd658c0cbefb55b8e04"
-
-sha.js@^2.4.0, sha.js@^2.4.8, sha.js@~2.4.4:
- version "2.4.10"
- resolved "https://registry.yarnpkg.com/sha.js/-/sha.js-2.4.10.tgz#b1fde5cd7d11a5626638a07c604ab909cfa31f9b"
- dependencies:
- inherits "^2.0.1"
- safe-buffer "^5.0.1"
-
-shasum@^1.0.0:
- version "1.0.2"
- resolved "https://registry.yarnpkg.com/shasum/-/shasum-1.0.2.tgz#e7012310d8f417f4deb5712150e5678b87ae565f"
- dependencies:
- json-stable-stringify "~0.0.0"
- sha.js "~2.4.4"
-
-shebang-command@^1.2.0:
- version "1.2.0"
- resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea"
- dependencies:
- shebang-regex "^1.0.0"
-
-shebang-regex@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3"
-
-shell-quote@^1.6.1:
- version "1.6.1"
- resolved "https://registry.yarnpkg.com/shell-quote/-/shell-quote-1.6.1.tgz#f4781949cce402697127430ea3b3c5476f481767"
- dependencies:
- array-filter "~0.0.0"
- array-map "~0.0.0"
- array-reduce "~0.0.0"
- jsonify "~0.0.0"
-
-shellwords@^0.1.1:
- version "0.1.1"
- resolved "https://registry.yarnpkg.com/shellwords/-/shellwords-0.1.1.tgz#d6b9181c1a48d397324c84871efbcfc73fc0654b"
-
-signal-exit@^3.0.0, signal-exit@^3.0.2:
- version "3.0.2"
- resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d"
-
-slack-node@~0.2.0:
- version "0.2.0"
- resolved "https://registry.yarnpkg.com/slack-node/-/slack-node-0.2.0.tgz#de4b8dddaa8b793f61dbd2938104fdabf37dfa30"
- dependencies:
- requestretry "^1.2.2"
-
-slash@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55"
-
-slice-ansi@1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-1.0.0.tgz#044f1a49d8842ff307aad6b505ed178bd950134d"
- dependencies:
- is-fullwidth-code-point "^2.0.0"
-
-smart-buffer@^1.0.13, smart-buffer@^1.0.4:
- version "1.1.15"
- resolved "https://registry.yarnpkg.com/smart-buffer/-/smart-buffer-1.1.15.tgz#7f114b5b65fab3e2a35aa775bb12f0d1c649bf16"
-
-smtp-connection@2.12.0:
- version "2.12.0"
- resolved "https://registry.yarnpkg.com/smtp-connection/-/smtp-connection-2.12.0.tgz#d76ef9127cb23c2259edb1e8349c2e8d5e2d74c1"
- dependencies:
- httpntlm "1.6.1"
- nodemailer-shared "1.1.0"
-
-snapdragon-node@^2.0.1:
- version "2.1.1"
- resolved "https://registry.yarnpkg.com/snapdragon-node/-/snapdragon-node-2.1.1.tgz#6c175f86ff14bdb0724563e8f3c1b021a286853b"
- dependencies:
- define-property "^1.0.0"
- isobject "^3.0.0"
- snapdragon-util "^3.0.1"
-
-snapdragon-util@^3.0.1:
- version "3.0.1"
- resolved "https://registry.yarnpkg.com/snapdragon-util/-/snapdragon-util-3.0.1.tgz#f956479486f2acd79700693f6f7b805e45ab56e2"
- dependencies:
- kind-of "^3.2.0"
-
-snapdragon@^0.8.1:
- version "0.8.1"
- resolved "https://registry.yarnpkg.com/snapdragon/-/snapdragon-0.8.1.tgz#e12b5487faded3e3dea0ac91e9400bf75b401370"
- dependencies:
- base "^0.11.1"
- debug "^2.2.0"
- define-property "^0.2.5"
- extend-shallow "^2.0.1"
- map-cache "^0.2.2"
- source-map "^0.5.6"
- source-map-resolve "^0.5.0"
- use "^2.0.0"
-
-sntp@1.x.x:
- version "1.0.9"
- resolved "https://registry.yarnpkg.com/sntp/-/sntp-1.0.9.tgz#6541184cc90aeea6c6e7b35e2659082443c66198"
- dependencies:
- hoek "2.x.x"
-
-sntp@2.x.x:
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/sntp/-/sntp-2.1.0.tgz#2c6cec14fedc2222739caf9b5c3d85d1cc5a2cc8"
- dependencies:
- hoek "4.x.x"
-
-socket.io-adapter@~1.1.0:
- version "1.1.1"
- resolved "https://registry.yarnpkg.com/socket.io-adapter/-/socket.io-adapter-1.1.1.tgz#2a805e8a14d6372124dd9159ad4502f8cb07f06b"
-
-socket.io-client@2.0.4:
- version "2.0.4"
- resolved "https://registry.yarnpkg.com/socket.io-client/-/socket.io-client-2.0.4.tgz#0918a552406dc5e540b380dcd97afc4a64332f8e"
- dependencies:
- backo2 "1.0.2"
- base64-arraybuffer "0.1.5"
- component-bind "1.0.0"
- component-emitter "1.2.1"
- debug "~2.6.4"
- engine.io-client "~3.1.0"
- has-cors "1.1.0"
- indexof "0.0.1"
- object-component "0.0.3"
- parseqs "0.0.5"
- parseuri "0.0.5"
- socket.io-parser "~3.1.1"
- to-array "0.1.4"
-
-socket.io-parser@~3.1.1:
- version "3.1.3"
- resolved "https://registry.yarnpkg.com/socket.io-parser/-/socket.io-parser-3.1.3.tgz#ed2da5ee79f10955036e3da413bfd7f1e4d86c8e"
- dependencies:
- component-emitter "1.2.1"
- debug "~3.1.0"
- has-binary2 "~1.0.2"
- isarray "2.0.1"
-
-socket.io@2.0.4:
- version "2.0.4"
- resolved "https://registry.yarnpkg.com/socket.io/-/socket.io-2.0.4.tgz#c1a4590ceff87ecf13c72652f046f716b29e6014"
- dependencies:
- debug "~2.6.6"
- engine.io "~3.1.0"
- socket.io-adapter "~1.1.0"
- socket.io-client "2.0.4"
- socket.io-parser "~3.1.1"
-
-socks-proxy-agent@2:
- version "2.1.1"
- resolved "https://registry.yarnpkg.com/socks-proxy-agent/-/socks-proxy-agent-2.1.1.tgz#86ebb07193258637870e13b7bd99f26c663df3d3"
- dependencies:
- agent-base "2"
- extend "3"
- socks "~1.1.5"
-
-socks@1.1.9:
- version "1.1.9"
- resolved "https://registry.yarnpkg.com/socks/-/socks-1.1.9.tgz#628d7e4d04912435445ac0b6e459376cb3e6d691"
- dependencies:
- ip "^1.1.2"
- smart-buffer "^1.0.4"
-
-socks@~1.1.5:
- version "1.1.10"
- resolved "https://registry.yarnpkg.com/socks/-/socks-1.1.10.tgz#5b8b7fc7c8f341c53ed056e929b7bf4de8ba7b5a"
- dependencies:
- ip "^1.1.4"
- smart-buffer "^1.0.13"
-
-sort-keys@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/sort-keys/-/sort-keys-2.0.0.tgz#658535584861ec97d730d6cf41822e1f56684128"
- dependencies:
- is-plain-obj "^1.0.0"
-
-source-list-map@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/source-list-map/-/source-list-map-2.0.0.tgz#aaa47403f7b245a92fbc97ea08f250d6087ed085"
-
-source-map-resolve@^0.5.0:
- version "0.5.1"
- resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.1.tgz#7ad0f593f2281598e854df80f19aae4b92d7a11a"
- dependencies:
- atob "^2.0.0"
- decode-uri-component "^0.2.0"
- resolve-url "^0.2.1"
- source-map-url "^0.4.0"
- urix "^0.1.0"
-
-source-map-support@^0.4.15:
- version "0.4.18"
- resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.4.18.tgz#0286a6de8be42641338594e97ccea75f0a2c585f"
- dependencies:
- source-map "^0.5.6"
-
-source-map-support@^0.5.0:
- version "0.5.3"
- resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.3.tgz#2b3d5fff298cfa4d1afd7d4352d569e9a0158e76"
- dependencies:
- source-map "^0.6.0"
-
-source-map-url@^0.4.0:
- version "0.4.0"
- resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.4.0.tgz#3e935d7ddd73631b97659956d55128e87b5084a3"
-
-source-map@^0.4.4:
- version "0.4.4"
- resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.4.4.tgz#eba4f5da9c0dc999de68032d8b4f76173652036b"
- dependencies:
- amdefine ">=0.0.4"
-
-source-map@^0.5.3, source-map@^0.5.6, source-map@^0.5.7, source-map@~0.5.1, source-map@~0.5.3:
- version "0.5.7"
- resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc"
-
-source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.1:
- version "0.6.1"
- resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263"
-
-spdx-correct@^3.0.0:
- version "3.0.0"
- resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.0.0.tgz#05a5b4d7153a195bc92c3c425b69f3b2a9524c82"
- dependencies:
- spdx-expression-parse "^3.0.0"
- spdx-license-ids "^3.0.0"
-
-spdx-exceptions@^2.1.0:
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/spdx-exceptions/-/spdx-exceptions-2.1.0.tgz#2c7ae61056c714a5b9b9b2b2af7d311ef5c78fe9"
-
-spdx-expression-parse@^3.0.0:
- version "3.0.0"
- resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz#99e119b7a5da00e05491c9fa338b7904823b41d0"
- dependencies:
- spdx-exceptions "^2.1.0"
- spdx-license-ids "^3.0.0"
-
-spdx-license-ids@^3.0.0:
- version "3.0.0"
- resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.0.tgz#7a7cd28470cc6d3a1cfe6d66886f6bc430d3ac87"
-
-split-string@^3.0.1, split-string@^3.0.2:
- version "3.1.0"
- resolved "https://registry.yarnpkg.com/split-string/-/split-string-3.1.0.tgz#7cb09dda3a86585705c64b39a6466038682e8fe2"
- dependencies:
- extend-shallow "^3.0.0"
-
-sprintf-js@~1.0.2:
- version "1.0.3"
- resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c"
-
-sshpk@^1.7.0:
- version "1.13.1"
- resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.13.1.tgz#512df6da6287144316dc4c18fe1cf1d940739be3"
- dependencies:
- asn1 "~0.2.3"
- assert-plus "^1.0.0"
- dashdash "^1.12.0"
- getpass "^0.1.1"
- optionalDependencies:
- bcrypt-pbkdf "^1.0.0"
- ecc-jsbn "~0.1.1"
- jsbn "~0.1.0"
- tweetnacl "~0.14.0"
-
-ssri@^5.2.4:
- version "5.2.4"
- resolved "https://registry.yarnpkg.com/ssri/-/ssri-5.2.4.tgz#9985e14041e65fc397af96542be35724ac11da52"
- dependencies:
- safe-buffer "^5.1.1"
-
-stack-utils@^1.0.1:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/stack-utils/-/stack-utils-1.0.1.tgz#d4f33ab54e8e38778b0ca5cfd3b3afb12db68620"
-
-static-extend@^0.1.1:
- version "0.1.2"
- resolved "https://registry.yarnpkg.com/static-extend/-/static-extend-0.1.2.tgz#60809c39cbff55337226fd5e0b520f341f1fb5c6"
- dependencies:
- define-property "^0.2.5"
- object-copy "^0.1.0"
-
-"statuses@>= 1.3.1 < 2":
- version "1.4.0"
- resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.4.0.tgz#bb73d446da2796106efcc1b601a253d6c46bd087"
-
-statuses@~1.3.1:
- version "1.3.1"
- resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.3.1.tgz#faf51b9eb74aaef3b3acf4ad5f61abf24cb7b93e"
-
-stealthy-require@^1.1.0:
- version "1.1.1"
- resolved "https://registry.yarnpkg.com/stealthy-require/-/stealthy-require-1.1.1.tgz#35b09875b4ff49f26a777e509b3090a3226bf24b"
-
-stream-browserify@^2.0.0, stream-browserify@^2.0.1:
- version "2.0.1"
- resolved "https://registry.yarnpkg.com/stream-browserify/-/stream-browserify-2.0.1.tgz#66266ee5f9bdb9940a4e4514cafb43bb71e5c9db"
- dependencies:
- inherits "~2.0.1"
- readable-stream "^2.0.2"
-
-stream-combiner2@^1.1.1:
- version "1.1.1"
- resolved "https://registry.yarnpkg.com/stream-combiner2/-/stream-combiner2-1.1.1.tgz#fb4d8a1420ea362764e21ad4780397bebcb41cbe"
- dependencies:
- duplexer2 "~0.1.0"
- readable-stream "^2.0.2"
-
-stream-each@^1.1.0:
- version "1.2.2"
- resolved "https://registry.yarnpkg.com/stream-each/-/stream-each-1.2.2.tgz#8e8c463f91da8991778765873fe4d960d8f616bd"
- dependencies:
- end-of-stream "^1.1.0"
- stream-shift "^1.0.0"
-
-stream-http@^2.0.0, stream-http@^2.7.2:
- version "2.8.0"
- resolved "https://registry.yarnpkg.com/stream-http/-/stream-http-2.8.0.tgz#fd86546dac9b1c91aff8fc5d287b98fafb41bc10"
- dependencies:
- builtin-status-codes "^3.0.0"
- inherits "^2.0.1"
- readable-stream "^2.3.3"
- to-arraybuffer "^1.0.0"
- xtend "^4.0.0"
-
-stream-shift@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/stream-shift/-/stream-shift-1.0.0.tgz#d5c752825e5367e786f78e18e445ea223a155952"
-
-stream-splicer@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/stream-splicer/-/stream-splicer-2.0.0.tgz#1b63be438a133e4b671cc1935197600175910d83"
- dependencies:
- inherits "^2.0.1"
- readable-stream "^2.0.2"
-
-streamroller@^0.7.0:
- version "0.7.0"
- resolved "https://registry.yarnpkg.com/streamroller/-/streamroller-0.7.0.tgz#a1d1b7cf83d39afb0d63049a5acbf93493bdf64b"
- dependencies:
- date-format "^1.2.0"
- debug "^3.1.0"
- mkdirp "^0.5.1"
- readable-stream "^2.3.0"
-
-strict-uri-encode@^1.0.0:
- version "1.1.0"
- resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz#279b225df1d582b1f54e65addd4352e18faa0713"
-
-string-length@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/string-length/-/string-length-2.0.0.tgz#d40dbb686a3ace960c1cffca562bf2c45f8363ed"
- dependencies:
- astral-regex "^1.0.0"
- strip-ansi "^4.0.0"
-
-string-width@^1.0.1, string-width@^1.0.2:
- version "1.0.2"
- resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3"
- dependencies:
- code-point-at "^1.0.0"
- is-fullwidth-code-point "^1.0.0"
- strip-ansi "^3.0.0"
-
-string-width@^2.0.0, string-width@^2.1.0, string-width@^2.1.1:
- version "2.1.1"
- resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e"
- dependencies:
- is-fullwidth-code-point "^2.0.0"
- strip-ansi "^4.0.0"
-
-string_decoder@^1.0.0, string_decoder@~1.0.0, string_decoder@~1.0.3:
- version "1.0.3"
- resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.0.3.tgz#0fc67d7c141825de94282dd536bec6b9bce860ab"
- dependencies:
- safe-buffer "~5.1.0"
-
-string_decoder@~0.10.x:
- version "0.10.31"
- resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94"
-
-stringstream@~0.0.4, stringstream@~0.0.5:
- version "0.0.5"
- resolved "https://registry.yarnpkg.com/stringstream/-/stringstream-0.0.5.tgz#4e484cd4de5a0bbbee18e46307710a8a81621878"
-
-strip-ansi@^3.0.0, strip-ansi@^3.0.1:
- version "3.0.1"
- resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf"
- dependencies:
- ansi-regex "^2.0.0"
-
-strip-ansi@^4.0.0:
- version "4.0.0"
- resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f"
- dependencies:
- ansi-regex "^3.0.0"
-
-strip-bom@3.0.0, strip-bom@^3.0.0:
- version "3.0.0"
- resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3"
-
-strip-bom@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-2.0.0.tgz#6219a85616520491f35788bdbf1447a99c7e6b0e"
- dependencies:
- is-utf8 "^0.2.0"
-
-strip-eof@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf"
-
-strip-json-comments@~2.0.1:
- version "2.0.1"
- resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a"
-
-subarg@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/subarg/-/subarg-1.0.0.tgz#f62cf17581e996b48fc965699f54c06ae268b8d2"
- dependencies:
- minimist "^1.1.0"
-
-supports-color@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7"
-
-supports-color@^3.1.2:
- version "3.2.3"
- resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-3.2.3.tgz#65ac0504b3954171d8a64946b2ae3cbb8a5f54f6"
- dependencies:
- has-flag "^1.0.0"
-
-supports-color@^4.2.1:
- version "4.5.0"
- resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-4.5.0.tgz#be7a0de484dec5c5cddf8b3d59125044912f635b"
- dependencies:
- has-flag "^2.0.0"
-
-supports-color@^5.3.0:
- version "5.3.0"
- resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.3.0.tgz#5b24ac15db80fa927cf5227a4a33fd3c4c7676c0"
- dependencies:
- has-flag "^3.0.0"
-
-symbol-tree@^3.2.2:
- version "3.2.2"
- resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.2.tgz#ae27db38f660a7ae2e1c3b7d1bc290819b8519e6"
-
-syntax-error@^1.1.1:
- version "1.4.0"
- resolved "https://registry.yarnpkg.com/syntax-error/-/syntax-error-1.4.0.tgz#2d9d4ff5c064acb711594a3e3b95054ad51d907c"
- dependencies:
- acorn-node "^1.2.0"
-
-table@4.0.2:
- version "4.0.2"
- resolved "https://registry.yarnpkg.com/table/-/table-4.0.2.tgz#a33447375391e766ad34d3486e6e2aedc84d2e36"
- dependencies:
- ajv "^5.2.3"
- ajv-keywords "^2.1.0"
- chalk "^2.1.0"
- lodash "^4.17.4"
- slice-ansi "1.0.0"
- string-width "^2.1.1"
-
-tapable@^0.2.7:
- version "0.2.8"
- resolved "https://registry.yarnpkg.com/tapable/-/tapable-0.2.8.tgz#99372a5c999bf2df160afc0d74bed4f47948cd22"
-
-tapable@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/tapable/-/tapable-1.0.0.tgz#cbb639d9002eed9c6b5975eb20598d7936f1f9f2"
-
-tar-pack@^3.4.0:
- version "3.4.1"
- resolved "https://registry.yarnpkg.com/tar-pack/-/tar-pack-3.4.1.tgz#e1dbc03a9b9d3ba07e896ad027317eb679a10a1f"
- dependencies:
- debug "^2.2.0"
- fstream "^1.0.10"
- fstream-ignore "^1.0.5"
- once "^1.3.3"
- readable-stream "^2.1.4"
- rimraf "^2.5.1"
- tar "^2.2.1"
- uid-number "^0.0.6"
-
-tar@^2.2.1:
- version "2.2.1"
- resolved "https://registry.yarnpkg.com/tar/-/tar-2.2.1.tgz#8e4d2a256c0e2185c6b18ad694aec968b83cb1d1"
- dependencies:
- block-stream "*"
- fstream "^1.0.2"
- inherits "2"
-
-temp@^0.8.3:
- version "0.8.3"
- resolved "https://registry.yarnpkg.com/temp/-/temp-0.8.3.tgz#e0c6bc4d26b903124410e4fed81103014dfc1f59"
- dependencies:
- os-tmpdir "^1.0.0"
- rimraf "~2.2.6"
-
-test-exclude@^4.1.1:
- version "4.2.0"
- resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-4.2.0.tgz#07e3613609a362c74516a717515e13322ab45b3c"
- dependencies:
- arrify "^1.0.1"
- micromatch "^2.3.11"
- object-assign "^4.1.0"
- read-pkg-up "^1.0.1"
- require-main-filename "^1.0.1"
-
-text-table@~0.2.0:
- version "0.2.0"
- resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4"
-
-throat@^4.0.0:
- version "4.1.0"
- resolved "https://registry.yarnpkg.com/throat/-/throat-4.1.0.tgz#89037cbc92c56ab18926e6ba4cbb200e15672a6a"
-
-through2@^2.0.0:
- version "2.0.3"
- resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.3.tgz#0004569b37c7c74ba39c43f3ced78d1ad94140be"
- dependencies:
- readable-stream "^2.1.5"
- xtend "~4.0.1"
-
-"through@>=2.2.7 <3", through@^2.3.6:
- version "2.3.8"
- resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5"
-
-thunkify@~2.1.1:
- version "2.1.2"
- resolved "https://registry.yarnpkg.com/thunkify/-/thunkify-2.1.2.tgz#faa0e9d230c51acc95ca13a361ac05ca7e04553d"
-
-time-stamp@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/time-stamp/-/time-stamp-2.0.0.tgz#95c6a44530e15ba8d6f4a3ecb8c3a3fac46da357"
-
-timed-out@^4.0.1:
- version "4.0.1"
- resolved "https://registry.yarnpkg.com/timed-out/-/timed-out-4.0.1.tgz#f32eacac5a175bea25d7fab565ab3ed8741ef56f"
-
-timers-browserify@^1.0.1:
- version "1.4.2"
- resolved "https://registry.yarnpkg.com/timers-browserify/-/timers-browserify-1.4.2.tgz#c9c58b575be8407375cb5e2462dacee74359f41d"
- dependencies:
- process "~0.11.0"
-
-timers-browserify@^2.0.4:
- version "2.0.6"
- resolved "https://registry.yarnpkg.com/timers-browserify/-/timers-browserify-2.0.6.tgz#241e76927d9ca05f4d959819022f5b3664b64bae"
- dependencies:
- setimmediate "^1.0.4"
-
-timespan@2.3.x:
- version "2.3.0"
- resolved "https://registry.yarnpkg.com/timespan/-/timespan-2.3.0.tgz#4902ce040bd13d845c8f59b27e9d59bad6f39929"
-
-tmp@0.0.33, tmp@0.0.x, tmp@^0.0.33:
- version "0.0.33"
- resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9"
- dependencies:
- os-tmpdir "~1.0.2"
-
-tmpl@1.0.x:
- version "1.0.4"
- resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.4.tgz#23640dd7b42d00433911140820e5cf440e521dd1"
-
-to-array@0.1.4:
- version "0.1.4"
- resolved "https://registry.yarnpkg.com/to-array/-/to-array-0.1.4.tgz#17e6c11f73dd4f3d74cda7a4ff3238e9ad9bf890"
-
-to-arraybuffer@^1.0.0:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz#7d229b1fcc637e466ca081180836a7aabff83f43"
-
-to-fast-properties@^1.0.3:
- version "1.0.3"
- resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-1.0.3.tgz#b83571fa4d8c25b82e231b06e3a3055de4ca1a47"
-
-to-object-path@^0.3.0:
- version "0.3.0"
- resolved "https://registry.yarnpkg.com/to-object-path/-/to-object-path-0.3.0.tgz#297588b7b0e7e0ac08e04e672f85c1f4999e17af"
- dependencies:
- kind-of "^3.0.2"
-
-to-regex-range@^2.1.0:
- version "2.1.1"
- resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-2.1.1.tgz#7c80c17b9dfebe599e27367e0d4dd5590141db38"
- dependencies:
- is-number "^3.0.0"
- repeat-string "^1.6.1"
-
-to-regex@^3.0.1:
- version "3.0.2"
- resolved "https://registry.yarnpkg.com/to-regex/-/to-regex-3.0.2.tgz#13cfdd9b336552f30b51f33a8ae1b42a7a7599ce"
- dependencies:
- define-property "^2.0.2"
- extend-shallow "^3.0.2"
- regex-not "^1.0.2"
- safe-regex "^1.1.0"
-
-tough-cookie@>=2.3.3, tough-cookie@^2.3.3, tough-cookie@~2.3.0, tough-cookie@~2.3.3:
- version "2.3.4"
- resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.3.4.tgz#ec60cee38ac675063ffc97a5c18970578ee83655"
- dependencies:
- punycode "^1.4.1"
-
-tr46@^1.0.0:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/tr46/-/tr46-1.0.1.tgz#a8b13fd6bfd2489519674ccde55ba3693b706d09"
- dependencies:
- punycode "^2.1.0"
-
-trim-right@^1.0.1:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/trim-right/-/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003"
-
-tsscmp@~1.0.0:
- version "1.0.5"
- resolved "https://registry.yarnpkg.com/tsscmp/-/tsscmp-1.0.5.tgz#7dc4a33af71581ab4337da91d85ca5427ebd9a97"
-
-tty-browserify@0.0.0:
- version "0.0.0"
- resolved "https://registry.yarnpkg.com/tty-browserify/-/tty-browserify-0.0.0.tgz#a157ba402da24e9bf957f9aa69d524eed42901a6"
-
-tty-browserify@~0.0.0:
- version "0.0.1"
- resolved "https://registry.yarnpkg.com/tty-browserify/-/tty-browserify-0.0.1.tgz#3f05251ee17904dfd0677546670db9651682b811"
-
-tunnel-agent@^0.6.0:
- version "0.6.0"
- resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd"
- dependencies:
- safe-buffer "^5.0.1"
-
-tunnel-agent@~0.4.1:
- version "0.4.3"
- resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.4.3.tgz#6373db76909fe570e08d73583365ed828a74eeeb"
-
-tweetnacl@^0.14.3, tweetnacl@~0.14.0:
- version "0.14.5"
- resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64"
-
-type-check@~0.3.2:
- version "0.3.2"
- resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72"
- dependencies:
- prelude-ls "~1.1.2"
-
-type-is@~1.6.15:
- version "1.6.16"
- resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.16.tgz#f89ce341541c672b25ee7ae3c73dee3b2be50194"
- dependencies:
- media-typer "0.3.0"
- mime-types "~2.1.18"
-
-typedarray@^0.0.6, typedarray@~0.0.5:
- version "0.0.6"
- resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"
-
-uglify-es@^3.3.4:
- version "3.3.9"
- resolved "https://registry.yarnpkg.com/uglify-es/-/uglify-es-3.3.9.tgz#0c1c4f0700bed8dbc124cdb304d2592ca203e677"
- dependencies:
- commander "~2.13.0"
- source-map "~0.6.1"
-
-uglify-js@^2.6, uglify-js@^2.8.29:
- version "2.8.29"
- resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.8.29.tgz#29c5733148057bb4e1f75df35b7a9cb72e6a59dd"
- dependencies:
- source-map "~0.5.1"
- yargs "~3.10.0"
- optionalDependencies:
- uglify-to-browserify "~1.0.0"
-
-uglify-js@^3.3.10:
- version "3.3.12"
- resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.3.12.tgz#efd87c16a1f4c674a8a5ede571001ef634dcc883"
- dependencies:
- commander "~2.14.1"
- source-map "~0.6.1"
-
-uglify-to-browserify@~1.0.0:
- version "1.0.2"
- resolved "https://registry.yarnpkg.com/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz#6e0924d6bda6b5afe349e39a6d632850a0f882b7"
-
-uglifyjs-webpack-plugin@^0.4.6:
- version "0.4.6"
- resolved "https://registry.yarnpkg.com/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-0.4.6.tgz#b951f4abb6bd617e66f63eb891498e391763e309"
- dependencies:
- source-map "^0.5.6"
- uglify-js "^2.8.29"
- webpack-sources "^1.0.1"
-
-uglifyjs-webpack-plugin@^1.1.1:
- version "1.2.2"
- resolved "https://registry.yarnpkg.com/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-1.2.2.tgz#e7516d4367afdb715c3847841eb46f94c45ca2b9"
- dependencies:
- cacache "^10.0.1"
- find-cache-dir "^1.0.0"
- schema-utils "^0.4.2"
- serialize-javascript "^1.4.0"
- source-map "^0.6.1"
- uglify-es "^3.3.4"
- webpack-sources "^1.1.0"
- worker-farm "^1.5.2"
-
-uid-number@^0.0.6:
- version "0.0.6"
- resolved "https://registry.yarnpkg.com/uid-number/-/uid-number-0.0.6.tgz#0ea10e8035e8eb5b8e4449f06da1c730663baa81"
-
-ultron@~1.1.0:
- version "1.1.1"
- resolved "https://registry.yarnpkg.com/ultron/-/ultron-1.1.1.tgz#9fe1536a10a664a65266a1e3ccf85fd36302bc9c"
-
-umd@^3.0.0:
- version "3.0.1"
- resolved "https://registry.yarnpkg.com/umd/-/umd-3.0.1.tgz#8ae556e11011f63c2596708a8837259f01b3d60e"
-
-underscore@~1.7.0:
- version "1.7.0"
- resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.7.0.tgz#6bbaf0877500d36be34ecaa584e0db9fef035209"
-
-union-value@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/union-value/-/union-value-1.0.0.tgz#5c71c34cb5bad5dcebe3ea0cd08207ba5aa1aea4"
- dependencies:
- arr-union "^3.1.0"
- get-value "^2.0.6"
- is-extendable "^0.1.1"
- set-value "^0.4.3"
-
-unique-filename@^1.1.0:
- version "1.1.0"
- resolved "https://registry.yarnpkg.com/unique-filename/-/unique-filename-1.1.0.tgz#d05f2fe4032560871f30e93cbe735eea201514f3"
- dependencies:
- unique-slug "^2.0.0"
-
-unique-slug@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/unique-slug/-/unique-slug-2.0.0.tgz#db6676e7c7cc0629878ff196097c78855ae9f4ab"
- dependencies:
- imurmurhash "^0.1.4"
-
-unpipe@1.0.0, unpipe@~1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec"
-
-unset-value@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/unset-value/-/unset-value-1.0.0.tgz#8376873f7d2335179ffb1e6fc3a8ed0dfc8ab559"
- dependencies:
- has-value "^0.3.1"
- isobject "^3.0.0"
-
-upath@^1.0.0:
- version "1.0.4"
- resolved "https://registry.yarnpkg.com/upath/-/upath-1.0.4.tgz#ee2321ba0a786c50973db043a50b7bcba822361d"
-
-urix@^0.1.0:
- version "0.1.0"
- resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72"
-
-url-parse-lax@^3.0.0:
- version "3.0.0"
- resolved "https://registry.yarnpkg.com/url-parse-lax/-/url-parse-lax-3.0.0.tgz#16b5cafc07dbe3676c1b1999177823d6503acb0c"
- dependencies:
- prepend-http "^2.0.0"
-
-url-to-options@^1.0.1:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/url-to-options/-/url-to-options-1.0.1.tgz#1505a03a289a48cbd7a434efbaeec5055f5633a9"
-
-url@^0.11.0, url@~0.11.0:
- version "0.11.0"
- resolved "https://registry.yarnpkg.com/url/-/url-0.11.0.tgz#3838e97cfc60521eb73c525a8e55bfdd9e2e28f1"
- dependencies:
- punycode "1.3.2"
- querystring "0.2.0"
-
-use@^2.0.0:
- version "2.0.2"
- resolved "https://registry.yarnpkg.com/use/-/use-2.0.2.tgz#ae28a0d72f93bf22422a18a2e379993112dec8e8"
- dependencies:
- define-property "^0.2.5"
- isobject "^3.0.0"
- lazy-cache "^2.0.2"
-
-useragent@^2.1.12:
- version "2.3.0"
- resolved "https://registry.yarnpkg.com/useragent/-/useragent-2.3.0.tgz#217f943ad540cb2128658ab23fc960f6a88c9972"
- dependencies:
- lru-cache "4.1.x"
- tmp "0.0.x"
-
-util-deprecate@~1.0.1:
- version "1.0.2"
- resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf"
-
-util.promisify@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/util.promisify/-/util.promisify-1.0.0.tgz#440f7165a459c9a16dc145eb8e72f35687097030"
- dependencies:
- define-properties "^1.1.2"
- object.getownpropertydescriptors "^2.0.3"
-
-util@0.10.3, util@^0.10.3, util@~0.10.1:
- version "0.10.3"
- resolved "https://registry.yarnpkg.com/util/-/util-0.10.3.tgz#7afb1afe50805246489e3db7fe0ed379336ac0f9"
- dependencies:
- inherits "2.0.1"
-
-utils-merge@1.0.1:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713"
-
-uuid@^3.0.0, uuid@^3.1.0:
- version "3.2.1"
- resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.2.1.tgz#12c528bb9d58d0b9265d9a2f6f0fe8be17ff1f14"
-
-uws@~9.14.0:
- version "9.14.0"
- resolved "https://registry.yarnpkg.com/uws/-/uws-9.14.0.tgz#fac8386befc33a7a3705cbd58dc47b430ca4dd95"
-
-validate-npm-package-license@^3.0.1:
- version "3.0.3"
- resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.3.tgz#81643bcbef1bdfecd4623793dc4648948ba98338"
- dependencies:
- spdx-correct "^3.0.0"
- spdx-expression-parse "^3.0.0"
-
-verror@1.10.0:
- version "1.10.0"
- resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400"
- dependencies:
- assert-plus "^1.0.0"
- core-util-is "1.0.2"
- extsprintf "^1.2.0"
-
-vlq@^0.2.1:
- version "0.2.3"
- resolved "https://registry.yarnpkg.com/vlq/-/vlq-0.2.3.tgz#8f3e4328cf63b1540c0d67e1b2778386f8975b26"
-
-vlq@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/vlq/-/vlq-1.0.0.tgz#8101be90843422954c2b13eb27f2f3122bdcc806"
-
-vm-browserify@0.0.4, vm-browserify@~0.0.1:
- version "0.0.4"
- resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-0.0.4.tgz#5d7ea45bbef9e4a6ff65f95438e0a87c357d5a73"
- dependencies:
- indexof "0.0.1"
-
-void-elements@^2.0.0:
- version "2.0.1"
- resolved "https://registry.yarnpkg.com/void-elements/-/void-elements-2.0.1.tgz#c066afb582bb1cb4128d60ea92392e94d5e9dbec"
-
-vue@^2.5.13:
- version "2.5.13"
- resolved "https://registry.yarnpkg.com/vue/-/vue-2.5.13.tgz#95bd31e20efcf7a7f39239c9aa6787ce8cf578e1"
-
-w3c-hr-time@^1.0.1:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/w3c-hr-time/-/w3c-hr-time-1.0.1.tgz#82ac2bff63d950ea9e3189a58a65625fedf19045"
- dependencies:
- browser-process-hrtime "^0.1.2"
-
-walker@~1.0.5:
- version "1.0.7"
- resolved "https://registry.yarnpkg.com/walker/-/walker-1.0.7.tgz#2f7f9b8fd10d677262b18a884e28d19618e028fb"
- dependencies:
- makeerror "1.0.x"
-
-watch@~0.18.0:
- version "0.18.0"
- resolved "https://registry.yarnpkg.com/watch/-/watch-0.18.0.tgz#28095476c6df7c90c963138990c0a5423eb4b986"
- dependencies:
- exec-sh "^0.2.0"
- minimist "^1.2.0"
-
-watchpack@^1.4.0:
- version "1.5.0"
- resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-1.5.0.tgz#231e783af830a22f8966f65c4c4bacc814072eed"
- dependencies:
- chokidar "^2.0.2"
- graceful-fs "^4.1.2"
- neo-async "^2.5.0"
-
-webidl-conversions@^4.0.1, webidl-conversions@^4.0.2:
- version "4.0.2"
- resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.2.tgz#a855980b1f0b6b359ba1d5d9fb39ae941faa63ad"
-
-webpack-dev-middleware@^1.12.0:
- version "1.12.2"
- resolved "https://registry.yarnpkg.com/webpack-dev-middleware/-/webpack-dev-middleware-1.12.2.tgz#f8fc1120ce3b4fc5680ceecb43d777966b21105e"
- dependencies:
- memory-fs "~0.4.1"
- mime "^1.5.0"
- path-is-absolute "^1.0.0"
- range-parser "^1.0.3"
- time-stamp "^2.0.0"
-
-webpack-sources@^1.0.1, webpack-sources@^1.1.0:
- version "1.1.0"
- resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-1.1.0.tgz#a101ebae59d6507354d71d8013950a3a8b7a5a54"
- dependencies:
- source-list-map "^2.0.0"
- source-map "~0.6.1"
-
-webpack@*:
- version "4.0.1"
- resolved "https://registry.yarnpkg.com/webpack/-/webpack-4.0.1.tgz#768d708beeca4c5f77f6c2d38a240fb6ff50ba5d"
- dependencies:
- acorn "^5.0.0"
- acorn-dynamic-import "^3.0.0"
- ajv "^6.1.0"
- ajv-keywords "^3.1.0"
- chrome-trace-event "^0.1.1"
- enhanced-resolve "^4.0.0"
- eslint-scope "^3.7.1"
- loader-runner "^2.3.0"
- loader-utils "^1.1.0"
- memory-fs "~0.4.1"
- micromatch "^3.1.8"
- mkdirp "~0.5.0"
- neo-async "^2.5.0"
- node-libs-browser "^2.0.0"
- schema-utils "^0.4.2"
- tapable "^1.0.0"
- uglifyjs-webpack-plugin "^1.1.1"
- watchpack "^1.4.0"
- webpack-sources "^1.0.1"
-
-webpack@^3.11.0:
- version "3.11.0"
- resolved "https://registry.yarnpkg.com/webpack/-/webpack-3.11.0.tgz#77da451b1d7b4b117adaf41a1a93b5742f24d894"
- dependencies:
- acorn "^5.0.0"
- acorn-dynamic-import "^2.0.0"
- ajv "^6.1.0"
- ajv-keywords "^3.1.0"
- async "^2.1.2"
- enhanced-resolve "^3.4.0"
- escope "^3.6.0"
- interpret "^1.0.0"
- json-loader "^0.5.4"
- json5 "^0.5.1"
- loader-runner "^2.3.0"
- loader-utils "^1.1.0"
- memory-fs "~0.4.1"
- mkdirp "~0.5.0"
- node-libs-browser "^2.0.0"
- source-map "^0.5.3"
- supports-color "^4.2.1"
- tapable "^0.2.7"
- uglifyjs-webpack-plugin "^0.4.6"
- watchpack "^1.4.0"
- webpack-sources "^1.0.1"
- yargs "^8.0.2"
-
-whatwg-encoding@^1.0.1, whatwg-encoding@^1.0.3:
- version "1.0.3"
- resolved "https://registry.yarnpkg.com/whatwg-encoding/-/whatwg-encoding-1.0.3.tgz#57c235bc8657e914d24e1a397d3c82daee0a6ba3"
- dependencies:
- iconv-lite "0.4.19"
-
-whatwg-url@^6.4.0:
- version "6.4.0"
- resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-6.4.0.tgz#08fdf2b9e872783a7a1f6216260a1d66cc722e08"
- dependencies:
- lodash.sortby "^4.7.0"
- tr46 "^1.0.0"
- webidl-conversions "^4.0.1"
-
-when@^3.7.7:
- version "3.7.8"
- resolved "https://registry.yarnpkg.com/when/-/when-3.7.8.tgz#c7130b6a7ea04693e842cdc9e7a1f2aa39a39f82"
-
-which-module@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a"
-
-which@^1.2.1, which@^1.2.12, which@^1.2.9, which@^1.3.0:
- version "1.3.0"
- resolved "https://registry.yarnpkg.com/which/-/which-1.3.0.tgz#ff04bdfc010ee547d780bec38e1ac1c2777d253a"
- dependencies:
- isexe "^2.0.0"
-
-wide-align@^1.1.0:
- version "1.1.2"
- resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.2.tgz#571e0f1b0604636ebc0dfc21b0339bbe31341710"
- dependencies:
- string-width "^1.0.2"
-
-window-size@0.1.0:
- version "0.1.0"
- resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.0.tgz#5438cd2ea93b202efa3a19fe8887aee7c94f9c9d"
-
-wordwrap@0.0.2:
- version "0.0.2"
- resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.2.tgz#b79669bb42ecb409f83d583cad52ca17eaa1643f"
-
-wordwrap@~0.0.2:
- version "0.0.3"
- resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107"
-
-wordwrap@~1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb"
-
-worker-farm@^1.5.2:
- version "1.5.4"
- resolved "https://registry.yarnpkg.com/worker-farm/-/worker-farm-1.5.4.tgz#4debbe46b40edefcc717ebde74a90b1ae1e909a1"
- dependencies:
- errno "~0.1.7"
- xtend "~4.0.1"
-
-wrap-ansi@^2.0.0:
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85"
- dependencies:
- string-width "^1.0.1"
- strip-ansi "^3.0.1"
-
-wrappy@1:
- version "1.0.2"
- resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"
-
-write-file-atomic@^2.1.0:
- version "2.3.0"
- resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-2.3.0.tgz#1ff61575c2e2a4e8e510d6fa4e243cce183999ab"
- dependencies:
- graceful-fs "^4.1.11"
- imurmurhash "^0.1.4"
- signal-exit "^3.0.2"
-
-write@^0.2.1:
- version "0.2.1"
- resolved "https://registry.yarnpkg.com/write/-/write-0.2.1.tgz#5fc03828e264cea3fe91455476f7a3c566cb0757"
- dependencies:
- mkdirp "^0.5.1"
-
-ws@^4.0.0:
- version "4.1.0"
- resolved "https://registry.yarnpkg.com/ws/-/ws-4.1.0.tgz#a979b5d7d4da68bf54efe0408967c324869a7289"
- dependencies:
- async-limiter "~1.0.0"
- safe-buffer "~5.1.0"
-
-ws@~3.3.1:
- version "3.3.3"
- resolved "https://registry.yarnpkg.com/ws/-/ws-3.3.3.tgz#f1cf84fe2d5e901ebce94efaece785f187a228f2"
- dependencies:
- async-limiter "~1.0.0"
- safe-buffer "~5.1.0"
- ultron "~1.1.0"
-
-xml-name-validator@^3.0.0:
- version "3.0.0"
- resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-3.0.0.tgz#6ae73e06de4d8c6e47f9fb181f78d648ad457c6a"
-
-xmlhttprequest-ssl@~1.5.4:
- version "1.5.5"
- resolved "https://registry.yarnpkg.com/xmlhttprequest-ssl/-/xmlhttprequest-ssl-1.5.5.tgz#c2876b06168aadc40e57d97e81191ac8f4398b3e"
-
-xregexp@2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/xregexp/-/xregexp-2.0.0.tgz#52a63e56ca0b84a7f3a5f3d61872f126ad7a5943"
-
-xtend@^4.0.0, xtend@^4.0.1, xtend@~4.0.1:
- version "4.0.1"
- resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af"
-
-y18n@^3.2.1:
- version "3.2.1"
- resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.1.tgz#6d15fba884c08679c0d77e88e7759e811e07fa41"
-
-y18n@^4.0.0:
- version "4.0.0"
- resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.0.tgz#95ef94f85ecc81d007c264e190a120f0a3c8566b"
-
-yallist@^2.1.2:
- version "2.1.2"
- resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52"
-
-yargs-parser@^7.0.0:
- version "7.0.0"
- resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-7.0.0.tgz#8d0ac42f16ea55debd332caf4c4038b3e3f5dfd9"
- dependencies:
- camelcase "^4.1.0"
-
-yargs-parser@^8.1.0:
- version "8.1.0"
- resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-8.1.0.tgz#f1376a33b6629a5d063782944da732631e966950"
- dependencies:
- camelcase "^4.1.0"
-
-yargs-parser@^9.0.2:
- version "9.0.2"
- resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-9.0.2.tgz#9ccf6a43460fe4ed40a9bb68f48d43b8a68cc077"
- dependencies:
- camelcase "^4.1.0"
-
-yargs@^10.0.3:
- version "10.1.2"
- resolved "https://registry.yarnpkg.com/yargs/-/yargs-10.1.2.tgz#454d074c2b16a51a43e2fb7807e4f9de69ccb5c5"
- dependencies:
- cliui "^4.0.0"
- decamelize "^1.1.1"
- find-up "^2.1.0"
- get-caller-file "^1.0.1"
- os-locale "^2.0.0"
- require-directory "^2.1.1"
- require-main-filename "^1.0.1"
- set-blocking "^2.0.0"
- string-width "^2.0.0"
- which-module "^2.0.0"
- y18n "^3.2.1"
- yargs-parser "^8.1.0"
-
-yargs@^11.0.0:
- version "11.0.0"
- resolved "https://registry.yarnpkg.com/yargs/-/yargs-11.0.0.tgz#c052931006c5eee74610e5fc0354bedfd08a201b"
- dependencies:
- cliui "^4.0.0"
- decamelize "^1.1.1"
- find-up "^2.1.0"
- get-caller-file "^1.0.1"
- os-locale "^2.0.0"
- require-directory "^2.1.1"
- require-main-filename "^1.0.1"
- set-blocking "^2.0.0"
- string-width "^2.0.0"
- which-module "^2.0.0"
- y18n "^3.2.1"
- yargs-parser "^9.0.2"
-
-yargs@^8.0.2:
- version "8.0.2"
- resolved "https://registry.yarnpkg.com/yargs/-/yargs-8.0.2.tgz#6299a9055b1cefc969ff7e79c1d918dceb22c360"
- dependencies:
- camelcase "^4.1.0"
- cliui "^3.2.0"
- decamelize "^1.1.1"
- get-caller-file "^1.0.1"
- os-locale "^2.0.0"
- read-pkg-up "^2.0.0"
- require-directory "^2.1.1"
- require-main-filename "^1.0.1"
- set-blocking "^2.0.0"
- string-width "^2.0.0"
- which-module "^2.0.0"
- y18n "^3.2.1"
- yargs-parser "^7.0.0"
-
-yargs@~3.10.0:
- version "3.10.0"
- resolved "https://registry.yarnpkg.com/yargs/-/yargs-3.10.0.tgz#f7ee7bd857dd7c1d2d38c0e74efbd681d1431fd1"
- dependencies:
- camelcase "^1.0.2"
- cliui "^2.1.0"
- decamelize "^1.0.0"
- window-size "0.1.0"
-
-yeast@0.1.2:
- version "0.1.2"
- resolved "https://registry.yarnpkg.com/yeast/-/yeast-0.1.2.tgz#008e06d8094320c372dbc2f8ed76a0ca6c8ac419"
+++ /dev/null
-/vendor/
-/logs/*
-!/logs/README.md
+++ /dev/null
-# How to Contribute
-
-## Pull Requests
-
-1. Fork the Slim Skeleton repository
-2. Create a new branch for each feature or improvement
-3. Send a pull request from each feature branch to the **3.x** branch
-
-It is very important to separate new features or improvements into separate feature branches, and to send a
-pull request for each branch. This allows us to review and pull in new features or improvements individually.
-
-## Style Guide
-
-All pull requests must adhere to the [PSR-2 standard](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md).
+++ /dev/null
-# Slim Framework 3 Skeleton Application
-
-Use this skeleton application to quickly setup and start working on a new Slim Framework 3 application. This application uses the latest Slim 3 with the PHP-View template renderer. It also uses the Monolog logger.
-
-This skeleton application was built for Composer. This makes setting up a new Slim Framework application quick and easy.
-
-## Install the Application
-
-Run this command from the directory in which you want to install your new Slim Framework application.
-
- php composer.phar create-project slim/slim-skeleton [my-app-name]
-
-Replace `[my-app-name]` with the desired directory name for your new application. You'll want to:
-
-* Point your virtual host document root to your new application's `public/` directory.
-* Ensure `logs/` is web writeable.
-
-To run the application in development, you can run these commands
-
- cd [my-app-name]
- php composer.phar start
-
-Run this command in the application directory to run the test suite
-
- php composer.phar test
-
-That's it! Now go build something cool.
+++ /dev/null
-{
- "name": "slim/slim-skeleton",
- "description": "A Slim Framework skeleton application for rapid development",
- "keywords": ["microframework", "rest", "router", "psr7"],
- "homepage": "http://github.com/slimphp/Slim-Skeleton",
- "license": "MIT",
- "authors": [
- {
- "name": "Josh Lockhart",
- "email": "info@joshlockhart.com",
- "homepage": "http://www.joshlockhart.com/"
- }
- ],
- "require": {
- "php": ">=5.5.0",
- "slim/slim": "^3.1",
- "slim/php-view": "^2.0",
- "monolog/monolog": "^1.17"
- },
- "require-dev": {
- "phpunit/phpunit": ">=4.8 < 6.0"
- },
- "autoload-dev": {
- "psr-4": {
- "Tests\\": "tests/"
- }
- },
- "config": {
- "process-timeout" : 0
- },
- "scripts": {
- "start": "php -S localhost:8080 -t public",
- "test": "phpunit"
- }
-
-}
+++ /dev/null
-version: '2'
-
-volumes:
- logs:
- driver: local
-
-services:
- slim:
- image: php:7-alpine
- working_dir: /var/www
- command: php -S 0.0.0.0:8080 -t public
- environment:
- docker: "true"
- ports:
- - 8080:8080
- volumes:
- - .:/var/www
- - logs:/var/www/logs
+++ /dev/null
-Your Slim Framework application's log files will be written to this directory.
+++ /dev/null
-<phpunit bootstrap="vendor/autoload.php">
- <testsuites>
- <testsuite name="SlimSkeleton">
- <directory>tests</directory>
- </testsuite>
- </testsuites>
-</phpunit>
\ No newline at end of file
+++ /dev/null
-<IfModule mod_rewrite.c>
- RewriteEngine On
-
- # Some hosts may require you to use the `RewriteBase` directive.
- # Determine the RewriteBase automatically and set it as environment variable.
- # If you are using Apache aliases to do mass virtual hosting or installed the
- # project in a subdirectory, the base path will be prepended to allow proper
- # resolution of the index.php file and to redirect to the correct URI. It will
- # work in environments without path prefix as well, providing a safe, one-size
- # fits all solution. But as you do not need it in this case, you can comment
- # the following 2 lines to eliminate the overhead.
- RewriteCond %{REQUEST_URI}::$1 ^(/.+)/(.*)::\2$
- RewriteRule ^(.*) - [E=BASE:%1]
-
- # If the above doesn't work you might need to set the `RewriteBase` directive manually, it should be the
- # absolute physical path to the directory that contains this htaccess file.
- # RewriteBase /
-
- RewriteCond %{REQUEST_FILENAME} !-f
- RewriteRule ^ index.php [QSA,L]
-</IfModule>
+++ /dev/null
-<?php
-if (PHP_SAPI == 'cli-server') {
- // To help the built-in PHP dev server, check if the request was actually for
- // something which should probably be served as a static file
- $url = parse_url($_SERVER['REQUEST_URI']);
- $file = __DIR__ . $url['path'];
- if (is_file($file)) {
- return false;
- }
-}
-
-require __DIR__ . '/../vendor/autoload.php';
-
-session_start();
-
-// Instantiate the app
-$settings = require __DIR__ . '/../src/settings.php';
-$app = new \Slim\App($settings);
-
-// Set up dependencies
-require __DIR__ . '/../src/dependencies.php';
-
-// Register middleware
-require __DIR__ . '/../src/middleware.php';
-
-// Register routes
-require __DIR__ . '/../src/routes.php';
-
-// Run app
-$app->run();
+++ /dev/null
-<?php
-// DIC configuration
-
-$container = $app->getContainer();
-
-// view renderer
-$container['renderer'] = function ($c) {
- $settings = $c->get('settings')['renderer'];
- return new Slim\Views\PhpRenderer($settings['template_path']);
-};
-
-// monolog
-$container['logger'] = function ($c) {
- $settings = $c->get('settings')['logger'];
- $logger = new Monolog\Logger($settings['name']);
- $logger->pushProcessor(new Monolog\Processor\UidProcessor());
- $logger->pushHandler(new Monolog\Handler\StreamHandler($settings['path'], $settings['level']));
- return $logger;
-};
+++ /dev/null
-<?php
-// Application middleware
-
-// e.g: $app->add(new \Slim\Csrf\Guard);
+++ /dev/null
-<?php
-
-use Slim\Http\Request;
-use Slim\Http\Response;
-
-// Routes
-
-$app->get('/[{name}]', function (Request $request, Response $response, array $args) {
- // Sample log message
- $this->logger->info("Slim-Skeleton '/' route");
-
- // Render index view
- return $this->renderer->render($response, 'index.phtml', $args);
-});
+++ /dev/null
-<?php
-return [
- 'settings' => [
- 'displayErrorDetails' => true, // set to false in production
- 'addContentLengthHeader' => false, // Allow the web server to send the content-length header
-
- // Renderer settings
- 'renderer' => [
- 'template_path' => __DIR__ . '/../templates/',
- ],
-
- // Monolog settings
- 'logger' => [
- 'name' => 'slim-app',
- 'path' => isset($_ENV['docker']) ? 'php://stdout' : __DIR__ . '/../logs/app.log',
- 'level' => \Monolog\Logger::DEBUG,
- ],
- ],
-];
+++ /dev/null
-<!DOCTYPE html>
-<html>
- <head>
- <meta charset="utf-8"/>
- <title>Slim 3</title>
- <link href='//fonts.googleapis.com/css?family=Lato:300' rel='stylesheet' type='text/css'>
- <style>
- body {
- margin: 50px 0 0 0;
- padding: 0;
- width: 100%;
- font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
- text-align: center;
- color: #aaa;
- font-size: 18px;
- }
-
- h1 {
- color: #719e40;
- letter-spacing: -3px;
- font-family: 'Lato', sans-serif;
- font-size: 100px;
- font-weight: 200;
- margin-bottom: 0;
- }
- </style>
- </head>
- <body>
- <h1>Slim</h1>
- <div>a microframework for PHP</div>
-
- <?php if (isset($name)) : ?>
- <h2>Hello <?= htmlspecialchars($name); ?>!</h2>
- <?php else: ?>
- <p>Try <a href="http://www.slimframework.com">SlimFramework</a></p>
- <?php endif; ?>
- </body>
-</html>
+++ /dev/null
-<?php
-
-namespace Tests\Functional;
-
-use Slim\App;
-use Slim\Http\Request;
-use Slim\Http\Response;
-use Slim\Http\Environment;
-
-/**
- * This is an example class that shows how you could set up a method that
- * runs the application. Note that it doesn't cover all use-cases and is
- * tuned to the specifics of this skeleton app, so if your needs are
- * different, you'll need to change it.
- */
-class BaseTestCase extends \PHPUnit_Framework_TestCase
-{
- /**
- * Use middleware when running application?
- *
- * @var bool
- */
- protected $withMiddleware = true;
-
- /**
- * Process the application given a request method and URI
- *
- * @param string $requestMethod the request method (e.g. GET, POST, etc.)
- * @param string $requestUri the request URI
- * @param array|object|null $requestData the request data
- * @return \Slim\Http\Response
- */
- public function runApp($requestMethod, $requestUri, $requestData = null)
- {
- // Create a mock environment for testing with
- $environment = Environment::mock(
- [
- 'REQUEST_METHOD' => $requestMethod,
- 'REQUEST_URI' => $requestUri
- ]
- );
-
- // Set up a request object based on the environment
- $request = Request::createFromEnvironment($environment);
-
- // Add request data, if it exists
- if (isset($requestData)) {
- $request = $request->withParsedBody($requestData);
- }
-
- // Set up a response object
- $response = new Response();
-
- // Use the application settings
- $settings = require __DIR__ . '/../../src/settings.php';
-
- // Instantiate the application
- $app = new App($settings);
-
- // Set up dependencies
- require __DIR__ . '/../../src/dependencies.php';
-
- // Register middleware
- if ($this->withMiddleware) {
- require __DIR__ . '/../../src/middleware.php';
- }
-
- // Register routes
- require __DIR__ . '/../../src/routes.php';
-
- // Process the application
- $response = $app->process($request, $response);
-
- // Return the response
- return $response;
- }
-}
+++ /dev/null
-<?php
-
-namespace Tests\Functional;
-
-class HomepageTest extends BaseTestCase
-{
- /**
- * Test that the index route returns a rendered response containing the text 'SlimFramework' but not a greeting
- */
- public function testGetHomepageWithoutName()
- {
- $response = $this->runApp('GET', '/');
-
- $this->assertEquals(200, $response->getStatusCode());
- $this->assertContains('SlimFramework', (string)$response->getBody());
- $this->assertNotContains('Hello', (string)$response->getBody());
- }
-
- /**
- * Test that the index route with optional name argument returns a rendered greeting
- */
- public function testGetHomepageWithGreeting()
- {
- $response = $this->runApp('GET', '/name');
-
- $this->assertEquals(200, $response->getStatusCode());
- $this->assertContains('Hello name!', (string)$response->getBody());
- }
-
- /**
- * Test that the index route won't accept a post request
- */
- public function testPostHomepageNotAllowed()
- {
- $response = $this->runApp('POST', '/', ['test']);
-
- $this->assertEquals(405, $response->getStatusCode());
- $this->assertContains('Method not allowed', (string)$response->getBody());
- }
-}
\ No newline at end of file