You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by fi...@apache.org on 2017/03/09 20:39:46 UTC
[43/50] [abbrv] cordova-lib git commit: CB-12021 : adding
cordova-browser node_modules
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/f8b44831/cordova-lib/spec-cordova/fixtures/platforms/cordova-browser/node_modules/chalk/license
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-cordova/fixtures/platforms/cordova-browser/node_modules/chalk/license b/cordova-lib/spec-cordova/fixtures/platforms/cordova-browser/node_modules/chalk/license
new file mode 100644
index 0000000..654d0bf
--- /dev/null
+++ b/cordova-lib/spec-cordova/fixtures/platforms/cordova-browser/node_modules/chalk/license
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Sindre Sorhus <si...@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.
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/f8b44831/cordova-lib/spec-cordova/fixtures/platforms/cordova-browser/node_modules/chalk/package.json
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-cordova/fixtures/platforms/cordova-browser/node_modules/chalk/package.json b/cordova-lib/spec-cordova/fixtures/platforms/cordova-browser/node_modules/chalk/package.json
new file mode 100644
index 0000000..6056177
--- /dev/null
+++ b/cordova-lib/spec-cordova/fixtures/platforms/cordova-browser/node_modules/chalk/package.json
@@ -0,0 +1,140 @@
+{
+ "_args": [
+ [
+ {
+ "raw": "chalk@^1.1.1",
+ "scope": null,
+ "escapedName": "chalk",
+ "name": "chalk",
+ "rawSpec": "^1.1.1",
+ "spec": ">=1.1.1 <2.0.0",
+ "type": "range"
+ },
+ "/Users/auso/cordova/cordova-lib/cordova-lib/spec-cordova/fixtures/platforms/cordova-browser/node_modules/cordova-serve"
+ ]
+ ],
+ "_from": "chalk@>=1.1.1 <2.0.0",
+ "_id": "chalk@1.1.3",
+ "_inCache": true,
+ "_location": "/chalk",
+ "_nodeVersion": "0.10.32",
+ "_npmOperationalInternal": {
+ "host": "packages-12-west.internal.npmjs.com",
+ "tmp": "tmp/chalk-1.1.3.tgz_1459210604109_0.3892582862172276"
+ },
+ "_npmUser": {
+ "name": "qix",
+ "email": "i.am.qix@gmail.com"
+ },
+ "_npmVersion": "2.14.2",
+ "_phantomChildren": {},
+ "_requested": {
+ "raw": "chalk@^1.1.1",
+ "scope": null,
+ "escapedName": "chalk",
+ "name": "chalk",
+ "rawSpec": "^1.1.1",
+ "spec": ">=1.1.1 <2.0.0",
+ "type": "range"
+ },
+ "_requiredBy": [
+ "/cordova-serve"
+ ],
+ "_resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
+ "_shasum": "a8115c55e4a702fe4d150abd3872822a7e09fc98",
+ "_shrinkwrap": null,
+ "_spec": "chalk@^1.1.1",
+ "_where": "/Users/auso/cordova/cordova-lib/cordova-lib/spec-cordova/fixtures/platforms/cordova-browser/node_modules/cordova-serve",
+ "bugs": {
+ "url": "https://github.com/chalk/chalk/issues"
+ },
+ "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"
+ },
+ "description": "Terminal string styling done right. Much color.",
+ "devDependencies": {
+ "coveralls": "^2.11.2",
+ "matcha": "^0.6.0",
+ "mocha": "*",
+ "nyc": "^3.0.0",
+ "require-uncached": "^1.0.2",
+ "resolve-from": "^1.0.0",
+ "semver": "^4.3.3",
+ "xo": "*"
+ },
+ "directories": {},
+ "dist": {
+ "shasum": "a8115c55e4a702fe4d150abd3872822a7e09fc98",
+ "tarball": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "files": [
+ "index.js"
+ ],
+ "gitHead": "0d8d8c204eb87a4038219131ad4d8369c9f59d24",
+ "homepage": "https://github.com/chalk/chalk#readme",
+ "keywords": [
+ "color",
+ "colour",
+ "colors",
+ "terminal",
+ "console",
+ "cli",
+ "string",
+ "str",
+ "ansi",
+ "style",
+ "styles",
+ "tty",
+ "formatting",
+ "rgb",
+ "256",
+ "shell",
+ "xterm",
+ "log",
+ "logging",
+ "command-line",
+ "text"
+ ],
+ "license": "MIT",
+ "maintainers": [
+ {
+ "name": "qix",
+ "email": "i.am.qix@gmail.com"
+ },
+ {
+ "name": "sindresorhus",
+ "email": "sindresorhus@gmail.com"
+ },
+ {
+ "name": "unicorn",
+ "email": "sindresorhus+unicorn@gmail.com"
+ }
+ ],
+ "name": "chalk",
+ "optionalDependencies": {},
+ "readme": "ERROR: No README data found!",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/chalk/chalk.git"
+ },
+ "scripts": {
+ "bench": "matcha benchmark.js",
+ "coverage": "nyc npm test && nyc report",
+ "coveralls": "nyc npm test && nyc report --reporter=text-lcov | coveralls",
+ "test": "xo && mocha"
+ },
+ "version": "1.1.3",
+ "xo": {
+ "envs": [
+ "node",
+ "mocha"
+ ]
+ }
+}
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/f8b44831/cordova-lib/spec-cordova/fixtures/platforms/cordova-browser/node_modules/chalk/readme.md
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-cordova/fixtures/platforms/cordova-browser/node_modules/chalk/readme.md b/cordova-lib/spec-cordova/fixtures/platforms/cordova-browser/node_modules/chalk/readme.md
new file mode 100644
index 0000000..5cf111e
--- /dev/null
+++ b/cordova-lib/spec-cordova/fixtures/platforms/cordova-browser/node_modules/chalk/readme.md
@@ -0,0 +1,213 @@
+<h1 align="center">
+ <br>
+ <br>
+ <img width="360" src="https://cdn.rawgit.com/chalk/chalk/19935d6484811c5e468817f846b7b3d417d7bf4a/logo.svg" alt="chalk">
+ <br>
+ <br>
+ <br>
+</h1>
+
+> Terminal string styling done right
+
+[](https://travis-ci.org/chalk/chalk)
+[](https://coveralls.io/r/chalk/chalk?branch=master)
+[](https://www.youtube.com/watch?v=9auOCbH5Ns4)
+
+
+[colors.js](https://github.com/Marak/colors.js) used to be the most popular string styling module, but it has serious deficiencies like extending `String.prototype` which causes all kinds of [problems](https://github.com/yeoman/yo/issues/68). Although there are other ones, they either do too much or not enough.
+
+**Chalk is a clean and focused alternative.**
+
+
+
+
+## Why
+
+- Highly performant
+- Doesn't extend `String.prototype`
+- Expressive API
+- Ability to nest styles
+- Clean and focused
+- Auto-detects color support
+- Actively maintained
+- [Used by ~4500 modules](https://www.npmjs.com/browse/depended/chalk) as of July 15, 2015
+
+
+## Install
+
+```
+$ npm install --save chalk
+```
+
+
+## Usage
+
+Chalk comes with an easy to use composable API where you just chain and nest the styles you want.
+
+```js
+var chalk = require('chalk');
+
+// style a string
+chalk.blue('Hello world!');
+
+// combine styled and normal strings
+chalk.blue('Hello') + 'World' + chalk.red('!');
+
+// compose multiple styles using the chainable API
+chalk.blue.bgRed.bold('Hello world!');
+
+// pass in multiple arguments
+chalk.blue('Hello', 'World!', 'Foo', 'bar', 'biz', 'baz');
+
+// nest styles
+chalk.red('Hello', chalk.underline.bgBlue('world') + '!');
+
+// nest styles of the same type even (color, underline, background)
+chalk.green(
+ 'I am a green line ' +
+ chalk.blue.underline.bold('with a blue substring') +
+ ' that becomes green again!'
+);
+```
+
+Easily define your own themes.
+
+```js
+var chalk = require('chalk');
+var error = chalk.bold.red;
+console.log(error('Error!'));
+```
+
+Take advantage of console.log [string substitution](http://nodejs.org/docs/latest/api/console.html#console_console_log_data).
+
+```js
+var name = 'Sindre';
+console.log(chalk.green('Hello %s'), name);
+//=> Hello Sindre
+```
+
+
+## API
+
+### chalk.`<style>[.<style>...](string, [string...])`
+
+Example: `chalk.red.bold.underline('Hello', 'world');`
+
+Chain [styles](#styles) and call the last one as a method with a string argument. Order doesn't matter, and later styles take precedent in case of a conflict. This simply means that `Chalk.red.yellow.green` is equivalent to `Chalk.green`.
+
+Multiple arguments will be separated by space.
+
+### chalk.enabled
+
+Color support is automatically detected, but you can override it by setting the `enabled` property. You should however only do this in your own code as it applies globally to all chalk consumers.
+
+If you need to change this in a reusable module create a new instance:
+
+```js
+var ctx = new chalk.constructor({enabled: false});
+```
+
+### chalk.supportsColor
+
+Detect whether the terminal [supports color](https://github.com/chalk/supports-color). Used internally and handled for you, but exposed for convenience.
+
+Can be overridden by the user with the flags `--color` and `--no-color`. For situations where using `--color` is not possible, add an environment variable `FORCE_COLOR` with any value to force color. Trumps `--no-color`.
+
+### chalk.styles
+
+Exposes the styles as [ANSI escape codes](https://github.com/chalk/ansi-styles).
+
+Generally not useful, but you might need just the `.open` or `.close` escape code if you're mixing externally styled strings with your own.
+
+```js
+var chalk = require('chalk');
+
+console.log(chalk.styles.red);
+//=> {open: '\u001b[31m', close: '\u001b[39m'}
+
+console.log(chalk.styles.red.open + 'Hello' + chalk.styles.red.close);
+```
+
+### chalk.hasColor(string)
+
+Check whether a string [has color](https://github.com/chalk/has-ansi).
+
+### chalk.stripColor(string)
+
+[Strip color](https://github.com/chalk/strip-ansi) from a string.
+
+Can be useful in combination with `.supportsColor` to strip color on externally styled text when it's not supported.
+
+Example:
+
+```js
+var chalk = require('chalk');
+var styledString = getText();
+
+if (!chalk.supportsColor) {
+ styledString = chalk.stripColor(styledString);
+}
+```
+
+
+## Styles
+
+### Modifiers
+
+- `reset`
+- `bold`
+- `dim`
+- `italic` *(not widely supported)*
+- `underline`
+- `inverse`
+- `hidden`
+- `strikethrough` *(not widely supported)*
+
+### Colors
+
+- `black`
+- `red`
+- `green`
+- `yellow`
+- `blue` *(on Windows the bright version is used as normal blue is illegible)*
+- `magenta`
+- `cyan`
+- `white`
+- `gray`
+
+### Background colors
+
+- `bgBlack`
+- `bgRed`
+- `bgGreen`
+- `bgYellow`
+- `bgBlue`
+- `bgMagenta`
+- `bgCyan`
+- `bgWhite`
+
+
+## 256-colors
+
+Chalk does not support anything other than the base eight colors, which guarantees it will work on all terminals and systems. Some terminals, specifically `xterm` compliant ones, will support the full range of 8-bit colors. For this the lower level [ansi-256-colors](https://github.com/jbnicolai/ansi-256-colors) package can be used.
+
+
+## Windows
+
+If you're on Windows, do yourself a favor and use [`cmder`](http://bliker.github.io/cmder/) instead of `cmd.exe`.
+
+
+## Related
+
+- [chalk-cli](https://github.com/chalk/chalk-cli) - CLI for this module
+- [ansi-styles](https://github.com/chalk/ansi-styles/) - ANSI escape codes for styling strings in the terminal
+- [supports-color](https://github.com/chalk/supports-color/) - Detect whether a terminal supports color
+- [strip-ansi](https://github.com/chalk/strip-ansi) - Strip ANSI escape codes
+- [has-ansi](https://github.com/chalk/has-ansi) - Check if a string has ANSI escape codes
+- [ansi-regex](https://github.com/chalk/ansi-regex) - Regular expression for matching ANSI escape codes
+- [wrap-ansi](https://github.com/chalk/wrap-ansi) - Wordwrap a string with ANSI escape codes
+
+
+## License
+
+MIT � [Sindre Sorhus](http://sindresorhus.com)
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/f8b44831/cordova-lib/spec-cordova/fixtures/platforms/cordova-browser/node_modules/compressible/HISTORY.md
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-cordova/fixtures/platforms/cordova-browser/node_modules/compressible/HISTORY.md b/cordova-lib/spec-cordova/fixtures/platforms/cordova-browser/node_modules/compressible/HISTORY.md
new file mode 100644
index 0000000..6896784
--- /dev/null
+++ b/cordova-lib/spec-cordova/fixtures/platforms/cordova-browser/node_modules/compressible/HISTORY.md
@@ -0,0 +1,62 @@
+2.0.9 / 2016-10-31
+==================
+
+ * Fix regex fallback to not override `compressible: false` in db
+ * deps: mime-db@'>= 1.24.0 < 2'
+
+2.0.8 / 2016-05-12
+==================
+
+ * deps: mime-db@'>= 1.23.0 < 2'
+
+2.0.7 / 2016-01-18
+==================
+
+ * deps: mime-db@'>= 1.21.0 < 2'
+
+2.0.6 / 2015-09-29
+==================
+
+ * deps: mime-db@'>= 1.19.0 < 2'
+
+2.0.5 / 2015-07-30
+==================
+
+ * deps: mime-db@'>= 1.16.0 < 2'
+
+2.0.4 / 2015-07-01
+==================
+
+ * deps: mime-db@'>= 1.14.0 < 2'
+ * perf: enable strict mode
+
+2.0.3 / 2015-06-08
+==================
+
+ * Fix regex fallback to work if type exists, but is undefined
+ * perf: hoist regex declaration
+ * perf: use regex to extract mime
+ * deps: mime-db@'>= 1.13.0 < 2'
+
+2.0.2 / 2015-01-31
+==================
+
+ * deps: mime-db@'>= 1.1.2 < 2'
+
+2.0.1 / 2014-09-28
+==================
+
+ * deps: mime-db@1.x
+ - Add new mime types
+ - Add additional compressible
+ - Update charsets
+
+
+2.0.0 / 2014-09-02
+==================
+
+ * use mime-db
+ * remove .get()
+ * specifications are now private
+ * regex is now private
+ * stricter regex
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/f8b44831/cordova-lib/spec-cordova/fixtures/platforms/cordova-browser/node_modules/compressible/LICENSE
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-cordova/fixtures/platforms/cordova-browser/node_modules/compressible/LICENSE b/cordova-lib/spec-cordova/fixtures/platforms/cordova-browser/node_modules/compressible/LICENSE
new file mode 100644
index 0000000..ce00b3f
--- /dev/null
+++ b/cordova-lib/spec-cordova/fixtures/platforms/cordova-browser/node_modules/compressible/LICENSE
@@ -0,0 +1,24 @@
+(The MIT License)
+
+Copyright (c) 2013 Jonathan Ong <me...@jongleberry.com>
+Copyright (c) 2014 Jeremiah Senkpiel <fi...@rocketmail.com>
+Copyright (c) 2015 Douglas Christopher Wilson <do...@somethingdoug.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.
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/f8b44831/cordova-lib/spec-cordova/fixtures/platforms/cordova-browser/node_modules/compressible/README.md
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-cordova/fixtures/platforms/cordova-browser/node_modules/compressible/README.md b/cordova-lib/spec-cordova/fixtures/platforms/cordova-browser/node_modules/compressible/README.md
new file mode 100644
index 0000000..6d8699d
--- /dev/null
+++ b/cordova-lib/spec-cordova/fixtures/platforms/cordova-browser/node_modules/compressible/README.md
@@ -0,0 +1,58 @@
+# compressible
+
+[![NPM Version][npm-image]][npm-url]
+[![NPM Downloads][downloads-image]][downloads-url]
+[![Node.js Version][node-version-image]][node-version-url]
+[![Build Status][travis-image]][travis-url]
+[![Test Coverage][coveralls-image]][coveralls-url]
+
+Compressible `Content-Type` / `mime` checking.
+
+## Installation
+
+```bash
+$ npm install compressible
+```
+
+## API
+
+```js
+var compressible = require('compressible')
+```
+
+### compressible(type)
+
+Checks if the given `Content-Type` is compressible. The `type` argument is expected
+to be a value MIME type or `Content-Type` string, though no validation is performed.
+
+The MIME is looked up in the [`mime-db`](https://www.npmjs.com/package/mime-db) and
+if there is compressible information in the database entry, that is returned. Otherwise,
+this module will fallback to `true` for the following types:
+
+ * `text/*`
+ * `*/*+json`
+ * `*/*+text`
+ * `*/*+xml`
+
+If this module is not sure if a type is specifically compressible or specifically
+uncompressible, `undefined` is returned.
+
+```js
+compressible('text/html') // => true
+compressible('image/png') // => false
+```
+
+## License
+
+[MIT](LICENSE)
+
+[npm-image]: https://img.shields.io/npm/v/compressible.svg
+[npm-url]: https://npmjs.org/package/compressible
+[node-version-image]: https://img.shields.io/node/v/compressible.svg
+[node-version-url]: https://nodejs.org/en/download/
+[travis-image]: https://img.shields.io/travis/jshttp/compressible/master.svg
+[travis-url]: https://travis-ci.org/jshttp/compressible
+[coveralls-image]: https://img.shields.io/coveralls/jshttp/compressible/master.svg
+[coveralls-url]: https://coveralls.io/r/jshttp/compressible?branch=master
+[downloads-image]: https://img.shields.io/npm/dm/compressible.svg
+[downloads-url]: https://npmjs.org/package/compressible
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/f8b44831/cordova-lib/spec-cordova/fixtures/platforms/cordova-browser/node_modules/compressible/index.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-cordova/fixtures/platforms/cordova-browser/node_modules/compressible/index.js b/cordova-lib/spec-cordova/fixtures/platforms/cordova-browser/node_modules/compressible/index.js
new file mode 100644
index 0000000..bf14ad7
--- /dev/null
+++ b/cordova-lib/spec-cordova/fixtures/platforms/cordova-browser/node_modules/compressible/index.js
@@ -0,0 +1,58 @@
+/*!
+ * compressible
+ * Copyright(c) 2013 Jonathan Ong
+ * Copyright(c) 2014 Jeremiah Senkpiel
+ * Copyright(c) 2015 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+'use strict'
+
+/**
+ * Module dependencies.
+ * @private
+ */
+
+var db = require('mime-db')
+
+/**
+ * Module variables.
+ * @private
+ */
+
+var compressibleTypeRegExp = /^text\/|\+json$|\+text$|\+xml$/i
+var extractTypeRegExp = /^\s*([^;\s]*)(?:;|\s|$)/
+
+/**
+ * Module exports.
+ * @public
+ */
+
+module.exports = compressible
+
+/**
+ * Checks if a type is compressible.
+ *
+ * @param {string} type
+ * @return {Boolean} compressible
+ * @public
+ */
+
+function compressible (type) {
+ if (!type || typeof type !== 'string') {
+ return false
+ }
+
+ // strip parameters
+ var match = extractTypeRegExp.exec(type)
+ var mime = match && match[1].toLowerCase()
+ var data = db[mime]
+
+ // return database information
+ if (data && data.compressible !== undefined) {
+ return data.compressible
+ }
+
+ // fallback to regexp or unknown
+ return compressibleTypeRegExp.test(mime) || undefined
+}
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/f8b44831/cordova-lib/spec-cordova/fixtures/platforms/cordova-browser/node_modules/compressible/package.json
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-cordova/fixtures/platforms/cordova-browser/node_modules/compressible/package.json b/cordova-lib/spec-cordova/fixtures/platforms/cordova-browser/node_modules/compressible/package.json
new file mode 100644
index 0000000..404f4d1
--- /dev/null
+++ b/cordova-lib/spec-cordova/fixtures/platforms/cordova-browser/node_modules/compressible/package.json
@@ -0,0 +1,145 @@
+{
+ "_args": [
+ [
+ {
+ "raw": "compressible@~2.0.8",
+ "scope": null,
+ "escapedName": "compressible",
+ "name": "compressible",
+ "rawSpec": "~2.0.8",
+ "spec": ">=2.0.8 <2.1.0",
+ "type": "range"
+ },
+ "/Users/auso/cordova/cordova-lib/cordova-lib/spec-cordova/fixtures/platforms/cordova-browser/node_modules/compression"
+ ]
+ ],
+ "_from": "compressible@>=2.0.8 <2.1.0",
+ "_id": "compressible@2.0.9",
+ "_inCache": true,
+ "_location": "/compressible",
+ "_npmOperationalInternal": {
+ "host": "packages-18-east.internal.npmjs.com",
+ "tmp": "tmp/compressible-2.0.9.tgz_1477956262136_0.9366124230436981"
+ },
+ "_npmUser": {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "_npmVersion": "1.4.28",
+ "_phantomChildren": {},
+ "_requested": {
+ "raw": "compressible@~2.0.8",
+ "scope": null,
+ "escapedName": "compressible",
+ "name": "compressible",
+ "rawSpec": "~2.0.8",
+ "spec": ">=2.0.8 <2.1.0",
+ "type": "range"
+ },
+ "_requiredBy": [
+ "/compression"
+ ],
+ "_resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.9.tgz",
+ "_shasum": "6daab4e2b599c2770dd9e21e7a891b1c5a755425",
+ "_shrinkwrap": null,
+ "_spec": "compressible@~2.0.8",
+ "_where": "/Users/auso/cordova/cordova-lib/cordova-lib/spec-cordova/fixtures/platforms/cordova-browser/node_modules/compression",
+ "bugs": {
+ "url": "https://github.com/jshttp/compressible/issues"
+ },
+ "contributors": [
+ {
+ "name": "Douglas Christopher Wilson",
+ "email": "doug@somethingdoug.com"
+ },
+ {
+ "name": "Jonathan Ong",
+ "email": "me@jongleberry.com",
+ "url": "http://jongleberry.com"
+ },
+ {
+ "name": "Jeremiah Senkpiel",
+ "email": "fishrock123@rocketmail.com",
+ "url": "https://searchbeam.jit.su"
+ }
+ ],
+ "dependencies": {
+ "mime-db": ">= 1.24.0 < 2"
+ },
+ "description": "Compressible Content-Type / mime checking",
+ "devDependencies": {
+ "eslint": "3.9.1",
+ "eslint-config-standard": "6.2.1",
+ "eslint-plugin-promise": "3.3.0",
+ "eslint-plugin-standard": "2.0.1",
+ "istanbul": "0.4.5",
+ "mocha": "~1.21.5"
+ },
+ "directories": {},
+ "dist": {
+ "shasum": "6daab4e2b599c2770dd9e21e7a891b1c5a755425",
+ "tarball": "https://registry.npmjs.org/compressible/-/compressible-2.0.9.tgz"
+ },
+ "engines": {
+ "node": ">= 0.6"
+ },
+ "files": [
+ "HISTORY.md",
+ "LICENSE",
+ "README.md",
+ "index.js"
+ ],
+ "gitHead": "9e750e00d459f01b9a16df504f87ad829bf2a518",
+ "homepage": "https://github.com/jshttp/compressible",
+ "keywords": [
+ "compress",
+ "gzip",
+ "mime",
+ "content-type"
+ ],
+ "license": "MIT",
+ "maintainers": [
+ {
+ "name": "defunctzombie",
+ "email": "shtylman@gmail.com"
+ },
+ {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ {
+ "name": "federomero",
+ "email": "federomero@gmail.com"
+ },
+ {
+ "name": "fishrock123",
+ "email": "fishrock123@rocketmail.com"
+ },
+ {
+ "name": "jongleberry",
+ "email": "jonathanrichardong@gmail.com"
+ },
+ {
+ "name": "mscdex",
+ "email": "mscdex@mscdex.net"
+ },
+ {
+ "name": "tjholowaychuk",
+ "email": "tj@vision-media.ca"
+ }
+ ],
+ "name": "compressible",
+ "optionalDependencies": {},
+ "readme": "ERROR: No README data found!",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/jshttp/compressible.git"
+ },
+ "scripts": {
+ "lint": "eslint .",
+ "test": "mocha --reporter spec --bail --check-leaks test/",
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks",
+ "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter dot --check-leaks"
+ },
+ "version": "2.0.9"
+}
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/f8b44831/cordova-lib/spec-cordova/fixtures/platforms/cordova-browser/node_modules/compression/HISTORY.md
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-cordova/fixtures/platforms/cordova-browser/node_modules/compression/HISTORY.md b/cordova-lib/spec-cordova/fixtures/platforms/cordova-browser/node_modules/compression/HISTORY.md
new file mode 100644
index 0000000..663f0de
--- /dev/null
+++ b/cordova-lib/spec-cordova/fixtures/platforms/cordova-browser/node_modules/compression/HISTORY.md
@@ -0,0 +1,251 @@
+1.6.2 / 2016-05-12
+==================
+
+ * deps: accepts@~1.3.3
+ - deps: mime-types@~2.1.11
+ - deps: negotiator@0.6.1
+ * deps: bytes@2.3.0
+ - Drop partial bytes on all parsed units
+ - Fix parsing byte string that looks like hex
+ - perf: hoist regular expressions
+ * deps: compressible@~2.0.8
+ - deps: mime-db@'>= 1.23.0 < 2'
+
+1.6.1 / 2016-01-19
+==================
+
+ * deps: bytes@2.2.0
+ * deps: compressible@~2.0.7
+ - deps: mime-db@'>= 1.21.0 < 2'
+ * deps: accepts@~1.3.1
+ - deps: mime-types@~2.1.9
+
+1.6.0 / 2015-09-29
+==================
+
+ * Skip compression when response has `Cache-Control: no-transform`
+ * deps: accepts@~1.3.0
+ - deps: mime-types@~2.1.7
+ - deps: negotiator@0.6.0
+ * deps: compressible@~2.0.6
+ - deps: mime-db@'>= 1.19.0 < 2'
+ * deps: on-headers@~1.0.1
+ - perf: enable strict mode
+ * deps: vary@~1.1.0
+ - Only accept valid field names in the `field` argument
+
+1.5.2 / 2015-07-30
+==================
+
+ * deps: accepts@~1.2.12
+ - deps: mime-types@~2.1.4
+ * deps: compressible@~2.0.5
+ - deps: mime-db@'>= 1.16.0 < 2'
+ * deps: vary@~1.0.1
+ - Fix setting empty header from empty `field`
+ - perf: enable strict mode
+ - perf: remove argument reassignments
+
+1.5.1 / 2015-07-05
+==================
+
+ * deps: accepts@~1.2.10
+ - deps: mime-types@~2.1.2
+ * deps: compressible@~2.0.4
+ - deps: mime-db@'>= 1.14.0 < 2'
+ - perf: enable strict mode
+
+1.5.0 / 2015-06-09
+==================
+
+ * Fix return value from `.end` and `.write` after end
+ * Improve detection of zero-length body without `Content-Length`
+ * deps: accepts@~1.2.9
+ - deps: mime-types@~2.1.1
+ - perf: avoid argument reassignment & argument slice
+ - perf: avoid negotiator recursive construction
+ - perf: enable strict mode
+ - perf: remove unnecessary bitwise operator
+ * deps: bytes@2.1.0
+ - Slight optimizations
+ - Units no longer case sensitive when parsing
+ * deps: compressible@~2.0.3
+ - Fix regex fallback to work if type exists, but is undefined
+ - deps: mime-db@'>= 1.13.0 < 2'
+ - perf: hoist regex declaration
+ - perf: use regex to extract mime
+ * perf: enable strict mode
+ * perf: remove flush reassignment
+ * perf: simplify threshold detection
+
+1.4.4 / 2015-05-11
+==================
+
+ * deps: accepts@~1.2.7
+ - deps: mime-types@~2.0.11
+ - deps: negotiator@0.5.3
+ * deps: debug@~2.2.0
+ - deps: ms@0.7.1
+
+1.4.3 / 2015-03-14
+==================
+
+ * deps: accepts@~1.2.5
+ - deps: mime-types@~2.0.10
+ * deps: debug@~2.1.3
+ - Fix high intensity foreground color for bold
+ - deps: ms@0.7.0
+
+1.4.2 / 2015-03-11
+==================
+
+ * Fix error when code calls `res.end(str, encoding)`
+ - Specific to Node.js 0.8
+ * deps: debug@~2.1.2
+ - deps: ms@0.7.0
+
+1.4.1 / 2015-02-15
+==================
+
+ * deps: accepts@~1.2.4
+ - deps: mime-types@~2.0.9
+ - deps: negotiator@0.5.1
+
+1.4.0 / 2015-02-01
+==================
+
+ * Prefer `gzip` over `deflate` on the server
+ - Not all clients agree on what "deflate" coding means
+
+1.3.1 / 2015-01-31
+==================
+
+ * deps: accepts@~1.2.3
+ - deps: mime-types@~2.0.8
+ * deps: compressible@~2.0.2
+ - deps: mime-db@'>= 1.1.2 < 2'
+
+1.3.0 / 2014-12-30
+==================
+
+ * Export the default `filter` function for wrapping
+ * deps: accepts@~1.2.2
+ - deps: mime-types@~2.0.7
+ - deps: negotiator@0.5.0
+ * deps: debug@~2.1.1
+
+1.2.2 / 2014-12-10
+==================
+
+ * Fix `.end` to only proxy to `.end`
+ - Fixes an issue with Node.js 0.11.14
+ * deps: accepts@~1.1.4
+ - deps: mime-types@~2.0.4
+
+1.2.1 / 2014-11-23
+==================
+
+ * deps: accepts@~1.1.3
+ - deps: mime-types@~2.0.3
+
+1.2.0 / 2014-10-16
+==================
+
+ * deps: debug@~2.1.0
+ - Implement `DEBUG_FD` env variable support
+
+1.1.2 / 2014-10-15
+==================
+
+ * deps: accepts@~1.1.2
+ - Fix error when media type has invalid parameter
+ - deps: negotiator@0.4.9
+
+1.1.1 / 2014-10-12
+==================
+
+ * deps: accepts@~1.1.1
+ - deps: mime-types@~2.0.2
+ - deps: negotiator@0.4.8
+ * deps: compressible@~2.0.1
+ - deps: mime-db@1.x
+
+1.1.0 / 2014-09-07
+==================
+
+ * deps: accepts@~1.1.0
+ * deps: compressible@~2.0.0
+ * deps: debug@~2.0.0
+
+1.0.11 / 2014-08-10
+===================
+
+ * deps: on-headers@~1.0.0
+ * deps: vary@~1.0.0
+
+1.0.10 / 2014-08-05
+===================
+
+ * deps: compressible@~1.1.1
+ - Fix upper-case Content-Type characters prevent compression
+
+1.0.9 / 2014-07-20
+==================
+
+ * Add `debug` messages
+ * deps: accepts@~1.0.7
+ - deps: negotiator@0.4.7
+
+1.0.8 / 2014-06-20
+==================
+
+ * deps: accepts@~1.0.5
+ - use `mime-types`
+
+1.0.7 / 2014-06-11
+==================
+
+ * use vary module for better `Vary` behavior
+ * deps: accepts@1.0.3
+ * deps: compressible@1.1.0
+
+1.0.6 / 2014-06-03
+==================
+
+ * fix regression when negotiation fails
+
+1.0.5 / 2014-06-03
+==================
+
+ * fix listeners for delayed stream creation
+ - fixes regression for certain `stream.pipe(res)` situations
+
+1.0.4 / 2014-06-03
+==================
+
+ * fix adding `Vary` when value stored as array
+ * fix back-pressure behavior
+ * fix length check for `res.end`
+
+1.0.3 / 2014-05-29
+==================
+
+ * use `accepts` for negotiation
+ * use `on-headers` to handle header checking
+ * deps: bytes@1.0.0
+
+1.0.2 / 2014-04-29
+==================
+
+ * only version compatible with node.js 0.8
+ * support headers given to `res.writeHead`
+ * deps: bytes@0.3.0
+ * deps: negotiator@0.4.3
+
+1.0.1 / 2014-03-08
+==================
+
+ * bump negotiator
+ * use compressible
+ * use .headersSent (drops 0.8 support)
+ * handle identity;q=0 case
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/f8b44831/cordova-lib/spec-cordova/fixtures/platforms/cordova-browser/node_modules/compression/LICENSE
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-cordova/fixtures/platforms/cordova-browser/node_modules/compression/LICENSE b/cordova-lib/spec-cordova/fixtures/platforms/cordova-browser/node_modules/compression/LICENSE
new file mode 100644
index 0000000..386b7b6
--- /dev/null
+++ b/cordova-lib/spec-cordova/fixtures/platforms/cordova-browser/node_modules/compression/LICENSE
@@ -0,0 +1,23 @@
+(The MIT License)
+
+Copyright (c) 2014 Jonathan Ong <me...@jongleberry.com>
+Copyright (c) 2014-2015 Douglas Christopher Wilson <do...@somethingdoug.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.
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/f8b44831/cordova-lib/spec-cordova/fixtures/platforms/cordova-browser/node_modules/compression/README.md
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-cordova/fixtures/platforms/cordova-browser/node_modules/compression/README.md b/cordova-lib/spec-cordova/fixtures/platforms/cordova-browser/node_modules/compression/README.md
new file mode 100644
index 0000000..a5d599d
--- /dev/null
+++ b/cordova-lib/spec-cordova/fixtures/platforms/cordova-browser/node_modules/compression/README.md
@@ -0,0 +1,233 @@
+# compression
+
+[![NPM Version][npm-image]][npm-url]
+[![NPM Downloads][downloads-image]][downloads-url]
+[![Build Status][travis-image]][travis-url]
+[![Test Coverage][coveralls-image]][coveralls-url]
+[![Gratipay][gratipay-image]][gratipay-url]
+
+Node.js compression middleware.
+
+The following compression codings are supported:
+
+ - deflate
+ - gzip
+
+## Install
+
+```bash
+$ npm install compression
+```
+
+## API
+
+```js
+var compression = require('compression')
+```
+
+### compression([options])
+
+Returns the compression middleware using the given `options`. The middleware
+will attempt to compress response bodies for all request that traverse through
+the middleware, based on the given `options`.
+
+This middleware will never compress responses that include a `Cache-Control`
+header with the [`no-transform` directive](https://tools.ietf.org/html/rfc7234#section-5.2.2.4),
+as compressing will transform the body.
+
+#### Options
+
+`compression()` accepts these properties in the options object. In addition to
+those listed below, [zlib](http://nodejs.org/api/zlib.html) options may be
+passed in to the options object.
+
+##### chunkSize
+
+The default value is `zlib.Z_DEFAULT_CHUNK`, or `16384`.
+
+See [Node.js documentation](http://nodejs.org/api/zlib.html#zlib_memory_usage_tuning)
+regarding the usage.
+
+##### filter
+
+A function to decide if the response should be considered for compression.
+This function is called as `filter(req, res)` and is expected to return
+`true` to consider the response for compression, or `false` to not compress
+the response.
+
+The default filter function uses the [compressible](https://www.npmjs.com/package/compressible)
+module to determine if `res.getHeader('Content-Type')` is compressible.
+
+##### level
+
+The level of zlib compression to apply to responses. A higher level will result
+in better compression, but will take longer to complete. A lower level will
+result in less compression, but will be much faster.
+
+This is an integer in the range of `0` (no compression) to `9` (maximum
+compression). The special value `-1` can be used to mean the "default
+compression level", which is a default compromise between speed and
+compression (currently equivalent to level 6).
+
+ - `-1` Default compression level (also `zlib.Z_DEFAULT_COMPRESSION`).
+ - `0` No compression (also `zlib.Z_NO_COMPRESSION`).
+ - `1` Fastest compression (also `zlib.Z_BEST_SPEED`).
+ - `2`
+ - `3`
+ - `4`
+ - `5`
+ - `6` (currently what `zlib.Z_DEFAULT_COMPRESSION` points to).
+ - `7`
+ - `8`
+ - `9` Best compression (also `zlib.Z_BEST_COMPRESSION`).
+
+The default value is `zlib.Z_DEFAULT_COMPRESSION`, or `-1`.
+
+**Note** in the list above, `zlib` is from `zlib = require('zlib')`.
+
+##### memLevel
+
+This specifies how much memory should be allocated for the internal compression
+state and is an integer in the range of `1` (minimum level) and `9` (maximum
+level).
+
+The default value is `zlib.Z_DEFAULT_MEMLEVEL`, or `8`.
+
+See [Node.js documentation](http://nodejs.org/api/zlib.html#zlib_memory_usage_tuning)
+regarding the usage.
+
+##### strategy
+
+This is used to tune the compression algorithm. This value only affects the
+compression ratio, not the correctness of the compressed output, even if it
+is not set appropriately.
+
+ - `zlib.Z_DEFAULT_STRATEGY` Use for normal data.
+ - `zlib.Z_FILTERED` Use for data produced by a filter (or predictor).
+ Filtered data consists mostly of small values with a somewhat random
+ distribution. In this case, the compression algorithm is tuned to
+ compress them better. The effect is to force more Huffman coding and less
+ string matching; it is somewhat intermediate between `zlib.Z_DEFAULT_STRATEGY`
+ and `zlib.Z_HUFFMAN_ONLY`.
+ - `zlib.Z_FIXED` Use to prevent the use of dynamic Huffman codes, allowing
+ for a simpler decoder for special applications.
+ - `zlib.Z_HUFFMAN_ONLY` Use to force Huffman encoding only (no string match).
+ - `zlib.Z_RLE` Use to limit match distances to one (run-length encoding).
+ This is designed to be almost as fast as `zlib.Z_HUFFMAN_ONLY`, but give
+ better compression for PNG image data.
+
+**Note** in the list above, `zlib` is from `zlib = require('zlib')`.
+
+##### threshold
+
+The byte threshold for the response body size before compression is considered
+for the response, defaults to `1kb`. This is a number of bytes, any string
+accepted by the [bytes](https://www.npmjs.com/package/bytes) module, or `false`.
+
+**Note** this is only an advisory setting; if the response size cannot be determined
+at the time the response headers are written, then it is assumed the response is
+_over_ the threshold. To guarantee the response size can be determined, be sure
+set a `Content-Length` response header.
+
+##### windowBits
+
+The default value is `zlib.Z_DEFAULT_WINDOWBITS`, or `15`.
+
+See [Node.js documentation](http://nodejs.org/api/zlib.html#zlib_memory_usage_tuning)
+regarding the usage.
+
+#### .filter
+
+The default `filter` function. This is used to construct a custom filter
+function that is an extension of the default function.
+
+```js
+app.use(compression({filter: shouldCompress}))
+
+function shouldCompress(req, res) {
+ if (req.headers['x-no-compression']) {
+ // don't compress responses with this request header
+ return false
+ }
+
+ // fallback to standard filter function
+ return compression.filter(req, res)
+}
+```
+
+### res.flush
+
+This module adds a `res.flush()` method to force the partially-compressed
+response to be flushed to the client.
+
+## Examples
+
+### express/connect
+
+When using this module with express or connect, simply `app.use` the module as
+high as you like. Requests that pass through the middleware will be compressed.
+
+```js
+var compression = require('compression')
+var express = require('express')
+
+var app = express()
+
+// compress all requests
+app.use(compression())
+
+// add all routes
+```
+
+### Server-Sent Events
+
+Because of the nature of compression this module does not work out of the box
+with server-sent events. To compress content, a window of the output needs to
+be buffered up in order to get good compression. Typically when using server-sent
+events, there are certain block of data that need to reach the client.
+
+You can achieve this by calling `res.flush()` when you need the data written to
+actually make it to the client.
+
+```js
+var compression = require('compression')
+var express = require('express')
+
+var app = express()
+
+// compress responses
+app.use(compression())
+
+// server-sent event stream
+app.get('/events', function (req, res) {
+ res.setHeader('Content-Type', 'text/event-stream')
+ res.setHeader('Cache-Control', 'no-cache')
+
+ // send a ping approx every 2 seconds
+ var timer = setInterval(function () {
+ res.write('data: ping\n\n')
+
+ // !!! this is the important part
+ res.flush()
+ }, 2000)
+
+ res.on('close', function () {
+ clearInterval(timer)
+ })
+})
+```
+
+## License
+
+[MIT](LICENSE)
+
+[npm-image]: https://img.shields.io/npm/v/compression.svg
+[npm-url]: https://npmjs.org/package/compression
+[travis-image]: https://img.shields.io/travis/expressjs/compression/master.svg
+[travis-url]: https://travis-ci.org/expressjs/compression
+[coveralls-image]: https://img.shields.io/coveralls/expressjs/compression/master.svg
+[coveralls-url]: https://coveralls.io/r/expressjs/compression?branch=master
+[downloads-image]: https://img.shields.io/npm/dm/compression.svg
+[downloads-url]: https://npmjs.org/package/compression
+[gratipay-image]: https://img.shields.io/gratipay/dougwilson.svg
+[gratipay-url]: https://www.gratipay.com/dougwilson/
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/f8b44831/cordova-lib/spec-cordova/fixtures/platforms/cordova-browser/node_modules/compression/index.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-cordova/fixtures/platforms/cordova-browser/node_modules/compression/index.js b/cordova-lib/spec-cordova/fixtures/platforms/cordova-browser/node_modules/compression/index.js
new file mode 100644
index 0000000..c0e801e
--- /dev/null
+++ b/cordova-lib/spec-cordova/fixtures/platforms/cordova-browser/node_modules/compression/index.js
@@ -0,0 +1,276 @@
+/*!
+ * compression
+ * Copyright(c) 2010 Sencha Inc.
+ * Copyright(c) 2011 TJ Holowaychuk
+ * Copyright(c) 2014 Jonathan Ong
+ * Copyright(c) 2014-2015 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+'use strict'
+
+/**
+ * Module dependencies.
+ * @private
+ */
+
+var accepts = require('accepts')
+var bytes = require('bytes')
+var compressible = require('compressible')
+var debug = require('debug')('compression')
+var onHeaders = require('on-headers')
+var vary = require('vary')
+var zlib = require('zlib')
+
+/**
+ * Module exports.
+ */
+
+module.exports = compression
+module.exports.filter = shouldCompress
+
+/**
+ * Module variables.
+ * @private
+ */
+
+var cacheControlNoTransformRegExp = /(?:^|,)\s*?no-transform\s*?(?:,|$)/
+
+/**
+ * Compress response data with gzip / deflate.
+ *
+ * @param {Object} [options]
+ * @return {Function} middleware
+ * @public
+ */
+
+function compression (options) {
+ var opts = options || {}
+
+ // options
+ var filter = opts.filter || shouldCompress
+ var threshold = bytes.parse(opts.threshold)
+
+ if (threshold == null) {
+ threshold = 1024
+ }
+
+ return function compression (req, res, next) {
+ var ended = false
+ var length
+ var listeners = []
+ var stream
+
+ var _end = res.end
+ var _on = res.on
+ var _write = res.write
+
+ // flush
+ res.flush = function flush () {
+ if (stream) {
+ stream.flush()
+ }
+ }
+
+ // proxy
+
+ res.write = function write (chunk, encoding) {
+ if (ended) {
+ return false
+ }
+
+ if (!this._header) {
+ this._implicitHeader()
+ }
+
+ return stream
+ ? stream.write(new Buffer(chunk, encoding))
+ : _write.call(this, chunk, encoding)
+ }
+
+ res.end = function end (chunk, encoding) {
+ if (ended) {
+ return false
+ }
+
+ if (!this._header) {
+ // estimate the length
+ if (!this.getHeader('Content-Length')) {
+ length = chunkLength(chunk, encoding)
+ }
+
+ this._implicitHeader()
+ }
+
+ if (!stream) {
+ return _end.call(this, chunk, encoding)
+ }
+
+ // mark ended
+ ended = true
+
+ // write Buffer for Node.js 0.8
+ return chunk
+ ? stream.end(new Buffer(chunk, encoding))
+ : stream.end()
+ }
+
+ res.on = function on (type, listener) {
+ if (!listeners || type !== 'drain') {
+ return _on.call(this, type, listener)
+ }
+
+ if (stream) {
+ return stream.on(type, listener)
+ }
+
+ // buffer listeners for future stream
+ listeners.push([type, listener])
+
+ return this
+ }
+
+ function nocompress (msg) {
+ debug('no compression: %s', msg)
+ addListeners(res, _on, listeners)
+ listeners = null
+ }
+
+ onHeaders(res, function onResponseHeaders () {
+ // determine if request is filtered
+ if (!filter(req, res)) {
+ nocompress('filtered')
+ return
+ }
+
+ // determine if the entity should be transformed
+ if (!shouldTransform(req, res)) {
+ nocompress('no transform')
+ return
+ }
+
+ // vary
+ vary(res, 'Accept-Encoding')
+
+ // content-length below threshold
+ if (Number(res.getHeader('Content-Length')) < threshold || length < threshold) {
+ nocompress('size below threshold')
+ return
+ }
+
+ var encoding = res.getHeader('Content-Encoding') || 'identity'
+
+ // already encoded
+ if (encoding !== 'identity') {
+ nocompress('already encoded')
+ return
+ }
+
+ // head
+ if (req.method === 'HEAD') {
+ nocompress('HEAD request')
+ return
+ }
+
+ // compression method
+ var accept = accepts(req)
+ var method = accept.encoding(['gzip', 'deflate', 'identity'])
+
+ // we really don't prefer deflate
+ if (method === 'deflate' && accept.encoding(['gzip'])) {
+ method = accept.encoding(['gzip', 'identity'])
+ }
+
+ // negotiation failed
+ if (!method || method === 'identity') {
+ nocompress('not acceptable')
+ return
+ }
+
+ // compression stream
+ debug('%s compression', method)
+ stream = method === 'gzip'
+ ? zlib.createGzip(opts)
+ : zlib.createDeflate(opts)
+
+ // add buffered listeners to stream
+ addListeners(stream, stream.on, listeners)
+
+ // header fields
+ res.setHeader('Content-Encoding', method)
+ res.removeHeader('Content-Length')
+
+ // compression
+ stream.on('data', function onStreamData (chunk) {
+ if (_write.call(res, chunk) === false) {
+ stream.pause()
+ }
+ })
+
+ stream.on('end', function onStreamEnd () {
+ _end.call(res)
+ })
+
+ _on.call(res, 'drain', function onResponseDrain () {
+ stream.resume()
+ })
+ })
+
+ next()
+ }
+}
+
+/**
+ * Add bufferred listeners to stream
+ * @private
+ */
+
+function addListeners (stream, on, listeners) {
+ for (var i = 0; i < listeners.length; i++) {
+ on.apply(stream, listeners[i])
+ }
+}
+
+/**
+ * Get the length of a given chunk
+ */
+
+function chunkLength (chunk, encoding) {
+ if (!chunk) {
+ return 0
+ }
+
+ return !Buffer.isBuffer(chunk)
+ ? Buffer.byteLength(chunk, encoding)
+ : chunk.length
+}
+
+/**
+ * Default filter function.
+ * @private
+ */
+
+function shouldCompress (req, res) {
+ var type = res.getHeader('Content-Type')
+
+ if (type === undefined || !compressible(type)) {
+ debug('%s not compressible', type)
+ return false
+ }
+
+ return true
+}
+
+/**
+ * Determine if the entity should be transformed.
+ * @private
+ */
+
+function shouldTransform (req, res) {
+ var cacheControl = res.getHeader('Cache-Control')
+
+ // Don't compress for Cache-Control: no-transform
+ // https://tools.ietf.org/html/rfc7234#section-5.2.2.4
+ return !cacheControl ||
+ !cacheControlNoTransformRegExp.test(cacheControl)
+}
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/f8b44831/cordova-lib/spec-cordova/fixtures/platforms/cordova-browser/node_modules/compression/package.json
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-cordova/fixtures/platforms/cordova-browser/node_modules/compression/package.json b/cordova-lib/spec-cordova/fixtures/platforms/cordova-browser/node_modules/compression/package.json
new file mode 100644
index 0000000..1b339ba
--- /dev/null
+++ b/cordova-lib/spec-cordova/fixtures/platforms/cordova-browser/node_modules/compression/package.json
@@ -0,0 +1,116 @@
+{
+ "_args": [
+ [
+ {
+ "raw": "compression@^1.6.0",
+ "scope": null,
+ "escapedName": "compression",
+ "name": "compression",
+ "rawSpec": "^1.6.0",
+ "spec": ">=1.6.0 <2.0.0",
+ "type": "range"
+ },
+ "/Users/auso/cordova/cordova-lib/cordova-lib/spec-cordova/fixtures/platforms/cordova-browser/node_modules/cordova-serve"
+ ]
+ ],
+ "_from": "compression@>=1.6.0 <2.0.0",
+ "_id": "compression@1.6.2",
+ "_inCache": true,
+ "_location": "/compression",
+ "_nodeVersion": "4.4.3",
+ "_npmOperationalInternal": {
+ "host": "packages-12-west.internal.npmjs.com",
+ "tmp": "tmp/compression-1.6.2.tgz_1463095977791_0.03453603922389448"
+ },
+ "_npmUser": {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "_npmVersion": "2.15.1",
+ "_phantomChildren": {},
+ "_requested": {
+ "raw": "compression@^1.6.0",
+ "scope": null,
+ "escapedName": "compression",
+ "name": "compression",
+ "rawSpec": "^1.6.0",
+ "spec": ">=1.6.0 <2.0.0",
+ "type": "range"
+ },
+ "_requiredBy": [
+ "/cordova-serve"
+ ],
+ "_resolved": "https://registry.npmjs.org/compression/-/compression-1.6.2.tgz",
+ "_shasum": "cceb121ecc9d09c52d7ad0c3350ea93ddd402bc3",
+ "_shrinkwrap": null,
+ "_spec": "compression@^1.6.0",
+ "_where": "/Users/auso/cordova/cordova-lib/cordova-lib/spec-cordova/fixtures/platforms/cordova-browser/node_modules/cordova-serve",
+ "bugs": {
+ "url": "https://github.com/expressjs/compression/issues"
+ },
+ "contributors": [
+ {
+ "name": "Douglas Christopher Wilson",
+ "email": "doug@somethingdoug.com"
+ },
+ {
+ "name": "Jonathan Ong",
+ "email": "me@jongleberry.com",
+ "url": "http://jongleberry.com"
+ }
+ ],
+ "dependencies": {
+ "accepts": "~1.3.3",
+ "bytes": "2.3.0",
+ "compressible": "~2.0.8",
+ "debug": "~2.2.0",
+ "on-headers": "~1.0.1",
+ "vary": "~1.1.0"
+ },
+ "description": "Node.js compression middleware",
+ "devDependencies": {
+ "eslint": "2.9.0",
+ "eslint-config-standard": "5.3.1",
+ "eslint-plugin-promise": "1.1.0",
+ "eslint-plugin-standard": "1.3.2",
+ "istanbul": "0.4.3",
+ "mocha": "2.4.5",
+ "supertest": "1.1.0"
+ },
+ "directories": {},
+ "dist": {
+ "shasum": "cceb121ecc9d09c52d7ad0c3350ea93ddd402bc3",
+ "tarball": "https://registry.npmjs.org/compression/-/compression-1.6.2.tgz"
+ },
+ "engines": {
+ "node": ">= 0.8.0"
+ },
+ "files": [
+ "LICENSE",
+ "HISTORY.md",
+ "index.js"
+ ],
+ "gitHead": "b9c63ced82b9f719cd5d9fd250c8432b00752d89",
+ "homepage": "https://github.com/expressjs/compression#readme",
+ "license": "MIT",
+ "maintainers": [
+ {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ }
+ ],
+ "name": "compression",
+ "optionalDependencies": {},
+ "readme": "ERROR: No README data found!",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/expressjs/compression.git"
+ },
+ "scripts": {
+ "lint": "eslint **/*.js",
+ "test": "mocha --check-leaks --reporter spec --bail",
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --check-leaks --reporter dot",
+ "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --check-leaks --reporter spec"
+ },
+ "version": "1.6.2"
+}
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/f8b44831/cordova-lib/spec-cordova/fixtures/platforms/cordova-browser/node_modules/content-disposition/HISTORY.md
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-cordova/fixtures/platforms/cordova-browser/node_modules/content-disposition/HISTORY.md b/cordova-lib/spec-cordova/fixtures/platforms/cordova-browser/node_modules/content-disposition/HISTORY.md
new file mode 100644
index 0000000..53849b6
--- /dev/null
+++ b/cordova-lib/spec-cordova/fixtures/platforms/cordova-browser/node_modules/content-disposition/HISTORY.md
@@ -0,0 +1,50 @@
+0.5.2 / 2016-12-08
+==================
+
+ * Fix `parse` to accept any linear whitespace character
+
+0.5.1 / 2016-01-17
+==================
+
+ * perf: enable strict mode
+
+0.5.0 / 2014-10-11
+==================
+
+ * Add `parse` function
+
+0.4.0 / 2014-09-21
+==================
+
+ * Expand non-Unicode `filename` to the full ISO-8859-1 charset
+
+0.3.0 / 2014-09-20
+==================
+
+ * Add `fallback` option
+ * Add `type` option
+
+0.2.0 / 2014-09-19
+==================
+
+ * Reduce ambiguity of file names with hex escape in buggy browsers
+
+0.1.2 / 2014-09-19
+==================
+
+ * Fix periodic invalid Unicode filename header
+
+0.1.1 / 2014-09-19
+==================
+
+ * Fix invalid characters appearing in `filename*` parameter
+
+0.1.0 / 2014-09-18
+==================
+
+ * Make the `filename` argument optional
+
+0.0.0 / 2014-09-18
+==================
+
+ * Initial release
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/f8b44831/cordova-lib/spec-cordova/fixtures/platforms/cordova-browser/node_modules/content-disposition/LICENSE
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-cordova/fixtures/platforms/cordova-browser/node_modules/content-disposition/LICENSE b/cordova-lib/spec-cordova/fixtures/platforms/cordova-browser/node_modules/content-disposition/LICENSE
new file mode 100644
index 0000000..b7dce6c
--- /dev/null
+++ b/cordova-lib/spec-cordova/fixtures/platforms/cordova-browser/node_modules/content-disposition/LICENSE
@@ -0,0 +1,22 @@
+(The MIT License)
+
+Copyright (c) 2014 Douglas Christopher Wilson
+
+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.
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/f8b44831/cordova-lib/spec-cordova/fixtures/platforms/cordova-browser/node_modules/content-disposition/README.md
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-cordova/fixtures/platforms/cordova-browser/node_modules/content-disposition/README.md b/cordova-lib/spec-cordova/fixtures/platforms/cordova-browser/node_modules/content-disposition/README.md
new file mode 100644
index 0000000..992d19a
--- /dev/null
+++ b/cordova-lib/spec-cordova/fixtures/platforms/cordova-browser/node_modules/content-disposition/README.md
@@ -0,0 +1,141 @@
+# content-disposition
+
+[![NPM Version][npm-image]][npm-url]
+[![NPM Downloads][downloads-image]][downloads-url]
+[![Node.js Version][node-version-image]][node-version-url]
+[![Build Status][travis-image]][travis-url]
+[![Test Coverage][coveralls-image]][coveralls-url]
+
+Create and parse HTTP `Content-Disposition` header
+
+## Installation
+
+```sh
+$ npm install content-disposition
+```
+
+## API
+
+```js
+var contentDisposition = require('content-disposition')
+```
+
+### contentDisposition(filename, options)
+
+Create an attachment `Content-Disposition` header value using the given file name,
+if supplied. The `filename` is optional and if no file name is desired, but you
+want to specify `options`, set `filename` to `undefined`.
+
+```js
+res.setHeader('Content-Disposition', contentDisposition('\u222b maths.pdf'))
+```
+
+**note** HTTP headers are of the ISO-8859-1 character set. If you are writing this
+header through a means different from `setHeader` in Node.js, you'll want to specify
+the `'binary'` encoding in Node.js.
+
+#### Options
+
+`contentDisposition` accepts these properties in the options object.
+
+##### fallback
+
+If the `filename` option is outside ISO-8859-1, then the file name is actually
+stored in a supplemental field for clients that support Unicode file names and
+a ISO-8859-1 version of the file name is automatically generated.
+
+This specifies the ISO-8859-1 file name to override the automatic generation or
+disables the generation all together, defaults to `true`.
+
+ - A string will specify the ISO-8859-1 file name to use in place of automatic
+ generation.
+ - `false` will disable including a ISO-8859-1 file name and only include the
+ Unicode version (unless the file name is already ISO-8859-1).
+ - `true` will enable automatic generation if the file name is outside ISO-8859-1.
+
+If the `filename` option is ISO-8859-1 and this option is specified and has a
+different value, then the `filename` option is encoded in the extended field
+and this set as the fallback field, even though they are both ISO-8859-1.
+
+##### type
+
+Specifies the disposition type, defaults to `"attachment"`. This can also be
+`"inline"`, or any other value (all values except inline are treated like
+`attachment`, but can convey additional information if both parties agree to
+it). The type is normalized to lower-case.
+
+### contentDisposition.parse(string)
+
+```js
+var disposition = contentDisposition.parse('attachment; filename="EURO rates.txt"; filename*=UTF-8\'\'%e2%82%ac%20rates.txt');
+```
+
+Parse a `Content-Disposition` header string. This automatically handles extended
+("Unicode") parameters by decoding them and providing them under the standard
+parameter name. This will return an object with the following properties (examples
+are shown for the string `'attachment; filename="EURO rates.txt"; filename*=UTF-8\'\'%e2%82%ac%20rates.txt'`):
+
+ - `type`: The disposition type (always lower case). Example: `'attachment'`
+
+ - `parameters`: An object of the parameters in the disposition (name of parameter
+ always lower case and extended versions replace non-extended versions). Example:
+ `{filename: "\u20ac rates.txt"}`
+
+## Examples
+
+### Send a file for download
+
+```js
+var contentDisposition = require('content-disposition')
+var destroy = require('destroy')
+var http = require('http')
+var onFinished = require('on-finished')
+
+var filePath = '/path/to/public/plans.pdf'
+
+http.createServer(function onRequest(req, res) {
+ // set headers
+ res.setHeader('Content-Type', 'application/pdf')
+ res.setHeader('Content-Disposition', contentDisposition(filePath))
+
+ // send file
+ var stream = fs.createReadStream(filePath)
+ stream.pipe(res)
+ onFinished(res, function (err) {
+ destroy(stream)
+ })
+})
+```
+
+## Testing
+
+```sh
+$ npm test
+```
+
+## References
+
+- [RFC 2616: Hypertext Transfer Protocol -- HTTP/1.1][rfc-2616]
+- [RFC 5987: Character Set and Language Encoding for Hypertext Transfer Protocol (HTTP) Header Field Parameters][rfc-5987]
+- [RFC 6266: Use of the Content-Disposition Header Field in the Hypertext Transfer Protocol (HTTP)][rfc-6266]
+- [Test Cases for HTTP Content-Disposition header field (RFC 6266) and the Encodings defined in RFCs 2047, 2231 and 5987][tc-2231]
+
+[rfc-2616]: https://tools.ietf.org/html/rfc2616
+[rfc-5987]: https://tools.ietf.org/html/rfc5987
+[rfc-6266]: https://tools.ietf.org/html/rfc6266
+[tc-2231]: http://greenbytes.de/tech/tc2231/
+
+## License
+
+[MIT](LICENSE)
+
+[npm-image]: https://img.shields.io/npm/v/content-disposition.svg?style=flat
+[npm-url]: https://npmjs.org/package/content-disposition
+[node-version-image]: https://img.shields.io/node/v/content-disposition.svg?style=flat
+[node-version-url]: https://nodejs.org/en/download
+[travis-image]: https://img.shields.io/travis/jshttp/content-disposition.svg?style=flat
+[travis-url]: https://travis-ci.org/jshttp/content-disposition
+[coveralls-image]: https://img.shields.io/coveralls/jshttp/content-disposition.svg?style=flat
+[coveralls-url]: https://coveralls.io/r/jshttp/content-disposition?branch=master
+[downloads-image]: https://img.shields.io/npm/dm/content-disposition.svg?style=flat
+[downloads-url]: https://npmjs.org/package/content-disposition
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/f8b44831/cordova-lib/spec-cordova/fixtures/platforms/cordova-browser/node_modules/content-disposition/index.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-cordova/fixtures/platforms/cordova-browser/node_modules/content-disposition/index.js b/cordova-lib/spec-cordova/fixtures/platforms/cordova-browser/node_modules/content-disposition/index.js
new file mode 100644
index 0000000..88a0d0a
--- /dev/null
+++ b/cordova-lib/spec-cordova/fixtures/platforms/cordova-browser/node_modules/content-disposition/index.js
@@ -0,0 +1,445 @@
+/*!
+ * content-disposition
+ * Copyright(c) 2014 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+'use strict'
+
+/**
+ * Module exports.
+ */
+
+module.exports = contentDisposition
+module.exports.parse = parse
+
+/**
+ * Module dependencies.
+ */
+
+var basename = require('path').basename
+
+/**
+ * RegExp to match non attr-char, *after* encodeURIComponent (i.e. not including "%")
+ */
+
+var ENCODE_URL_ATTR_CHAR_REGEXP = /[\x00-\x20"'()*,/:;<=>?@[\\\]{}\x7f]/g // eslint-disable-line no-control-regex
+
+/**
+ * RegExp to match percent encoding escape.
+ */
+
+var HEX_ESCAPE_REGEXP = /%[0-9A-Fa-f]{2}/
+var HEX_ESCAPE_REPLACE_REGEXP = /%([0-9A-Fa-f]{2})/g
+
+/**
+ * RegExp to match non-latin1 characters.
+ */
+
+var NON_LATIN1_REGEXP = /[^\x20-\x7e\xa0-\xff]/g
+
+/**
+ * RegExp to match quoted-pair in RFC 2616
+ *
+ * quoted-pair = "\" CHAR
+ * CHAR = <any US-ASCII character (octets 0 - 127)>
+ */
+
+var QESC_REGEXP = /\\([\u0000-\u007f])/g
+
+/**
+ * RegExp to match chars that must be quoted-pair in RFC 2616
+ */
+
+var QUOTE_REGEXP = /([\\"])/g
+
+/**
+ * RegExp for various RFC 2616 grammar
+ *
+ * parameter = token "=" ( token | quoted-string )
+ * token = 1*<any CHAR except CTLs or separators>
+ * separators = "(" | ")" | "<" | ">" | "@"
+ * | "," | ";" | ":" | "\" | <">
+ * | "/" | "[" | "]" | "?" | "="
+ * | "{" | "}" | SP | HT
+ * quoted-string = ( <"> *(qdtext | quoted-pair ) <"> )
+ * qdtext = <any TEXT except <">>
+ * quoted-pair = "\" CHAR
+ * CHAR = <any US-ASCII character (octets 0 - 127)>
+ * TEXT = <any OCTET except CTLs, but including LWS>
+ * LWS = [CRLF] 1*( SP | HT )
+ * CRLF = CR LF
+ * CR = <US-ASCII CR, carriage return (13)>
+ * LF = <US-ASCII LF, linefeed (10)>
+ * SP = <US-ASCII SP, space (32)>
+ * HT = <US-ASCII HT, horizontal-tab (9)>
+ * CTL = <any US-ASCII control character (octets 0 - 31) and DEL (127)>
+ * OCTET = <any 8-bit sequence of data>
+ */
+
+var PARAM_REGEXP = /;[\x09\x20]*([!#$%&'*+.0-9A-Z^_`a-z|~-]+)[\x09\x20]*=[\x09\x20]*("(?:[\x20!\x23-\x5b\x5d-\x7e\x80-\xff]|\\[\x20-\x7e])*"|[!#$%&'*+.0-9A-Z^_`a-z|~-]+)[\x09\x20]*/g // eslint-disable-line no-control-regex
+var TEXT_REGEXP = /^[\x20-\x7e\x80-\xff]+$/
+var TOKEN_REGEXP = /^[!#$%&'*+.0-9A-Z^_`a-z|~-]+$/
+
+/**
+ * RegExp for various RFC 5987 grammar
+ *
+ * ext-value = charset "'" [ language ] "'" value-chars
+ * charset = "UTF-8" / "ISO-8859-1" / mime-charset
+ * mime-charset = 1*mime-charsetc
+ * mime-charsetc = ALPHA / DIGIT
+ * / "!" / "#" / "$" / "%" / "&"
+ * / "+" / "-" / "^" / "_" / "`"
+ * / "{" / "}" / "~"
+ * language = ( 2*3ALPHA [ extlang ] )
+ * / 4ALPHA
+ * / 5*8ALPHA
+ * extlang = *3( "-" 3ALPHA )
+ * value-chars = *( pct-encoded / attr-char )
+ * pct-encoded = "%" HEXDIG HEXDIG
+ * attr-char = ALPHA / DIGIT
+ * / "!" / "#" / "$" / "&" / "+" / "-" / "."
+ * / "^" / "_" / "`" / "|" / "~"
+ */
+
+var EXT_VALUE_REGEXP = /^([A-Za-z0-9!#$%&+\-^_`{}~]+)'(?:[A-Za-z]{2,3}(?:-[A-Za-z]{3}){0,3}|[A-Za-z]{4,8}|)'((?:%[0-9A-Fa-f]{2}|[A-Za-z0-9!#$&+.^_`|~-])+)$/
+
+/**
+ * RegExp for various RFC 6266 grammar
+ *
+ * disposition-type = "inline" | "attachment" | disp-ext-type
+ * disp-ext-type = token
+ * disposition-parm = filename-parm | disp-ext-parm
+ * filename-parm = "filename" "=" value
+ * | "filename*" "=" ext-value
+ * disp-ext-parm = token "=" value
+ * | ext-token "=" ext-value
+ * ext-token = <the characters in token, followed by "*">
+ */
+
+var DISPOSITION_TYPE_REGEXP = /^([!#$%&'*+.0-9A-Z^_`a-z|~-]+)[\x09\x20]*(?:$|;)/ // eslint-disable-line no-control-regex
+
+/**
+ * Create an attachment Content-Disposition header.
+ *
+ * @param {string} [filename]
+ * @param {object} [options]
+ * @param {string} [options.type=attachment]
+ * @param {string|boolean} [options.fallback=true]
+ * @return {string}
+ * @api public
+ */
+
+function contentDisposition (filename, options) {
+ var opts = options || {}
+
+ // get type
+ var type = opts.type || 'attachment'
+
+ // get parameters
+ var params = createparams(filename, opts.fallback)
+
+ // format into string
+ return format(new ContentDisposition(type, params))
+}
+
+/**
+ * Create parameters object from filename and fallback.
+ *
+ * @param {string} [filename]
+ * @param {string|boolean} [fallback=true]
+ * @return {object}
+ * @api private
+ */
+
+function createparams (filename, fallback) {
+ if (filename === undefined) {
+ return
+ }
+
+ var params = {}
+
+ if (typeof filename !== 'string') {
+ throw new TypeError('filename must be a string')
+ }
+
+ // fallback defaults to true
+ if (fallback === undefined) {
+ fallback = true
+ }
+
+ if (typeof fallback !== 'string' && typeof fallback !== 'boolean') {
+ throw new TypeError('fallback must be a string or boolean')
+ }
+
+ if (typeof fallback === 'string' && NON_LATIN1_REGEXP.test(fallback)) {
+ throw new TypeError('fallback must be ISO-8859-1 string')
+ }
+
+ // restrict to file base name
+ var name = basename(filename)
+
+ // determine if name is suitable for quoted string
+ var isQuotedString = TEXT_REGEXP.test(name)
+
+ // generate fallback name
+ var fallbackName = typeof fallback !== 'string'
+ ? fallback && getlatin1(name)
+ : basename(fallback)
+ var hasFallback = typeof fallbackName === 'string' && fallbackName !== name
+
+ // set extended filename parameter
+ if (hasFallback || !isQuotedString || HEX_ESCAPE_REGEXP.test(name)) {
+ params['filename*'] = name
+ }
+
+ // set filename parameter
+ if (isQuotedString || hasFallback) {
+ params.filename = hasFallback
+ ? fallbackName
+ : name
+ }
+
+ return params
+}
+
+/**
+ * Format object to Content-Disposition header.
+ *
+ * @param {object} obj
+ * @param {string} obj.type
+ * @param {object} [obj.parameters]
+ * @return {string}
+ * @api private
+ */
+
+function format (obj) {
+ var parameters = obj.parameters
+ var type = obj.type
+
+ if (!type || typeof type !== 'string' || !TOKEN_REGEXP.test(type)) {
+ throw new TypeError('invalid type')
+ }
+
+ // start with normalized type
+ var string = String(type).toLowerCase()
+
+ // append parameters
+ if (parameters && typeof parameters === 'object') {
+ var param
+ var params = Object.keys(parameters).sort()
+
+ for (var i = 0; i < params.length; i++) {
+ param = params[i]
+
+ var val = param.substr(-1) === '*'
+ ? ustring(parameters[param])
+ : qstring(parameters[param])
+
+ string += '; ' + param + '=' + val
+ }
+ }
+
+ return string
+}
+
+/**
+ * Decode a RFC 6987 field value (gracefully).
+ *
+ * @param {string} str
+ * @return {string}
+ * @api private
+ */
+
+function decodefield (str) {
+ var match = EXT_VALUE_REGEXP.exec(str)
+
+ if (!match) {
+ throw new TypeError('invalid extended field value')
+ }
+
+ var charset = match[1].toLowerCase()
+ var encoded = match[2]
+ var value
+
+ // to binary string
+ var binary = encoded.replace(HEX_ESCAPE_REPLACE_REGEXP, pdecode)
+
+ switch (charset) {
+ case 'iso-8859-1':
+ value = getlatin1(binary)
+ break
+ case 'utf-8':
+ value = new Buffer(binary, 'binary').toString('utf8')
+ break
+ default:
+ throw new TypeError('unsupported charset in extended field')
+ }
+
+ return value
+}
+
+/**
+ * Get ISO-8859-1 version of string.
+ *
+ * @param {string} val
+ * @return {string}
+ * @api private
+ */
+
+function getlatin1 (val) {
+ // simple Unicode -> ISO-8859-1 transformation
+ return String(val).replace(NON_LATIN1_REGEXP, '?')
+}
+
+/**
+ * Parse Content-Disposition header string.
+ *
+ * @param {string} string
+ * @return {object}
+ * @api private
+ */
+
+function parse (string) {
+ if (!string || typeof string !== 'string') {
+ throw new TypeError('argument string is required')
+ }
+
+ var match = DISPOSITION_TYPE_REGEXP.exec(string)
+
+ if (!match) {
+ throw new TypeError('invalid type format')
+ }
+
+ // normalize type
+ var index = match[0].length
+ var type = match[1].toLowerCase()
+
+ var key
+ var names = []
+ var params = {}
+ var value
+
+ // calculate index to start at
+ index = PARAM_REGEXP.lastIndex = match[0].substr(-1) === ';'
+ ? index - 1
+ : index
+
+ // match parameters
+ while ((match = PARAM_REGEXP.exec(string))) {
+ if (match.index !== index) {
+ throw new TypeError('invalid parameter format')
+ }
+
+ index += match[0].length
+ key = match[1].toLowerCase()
+ value = match[2]
+
+ if (names.indexOf(key) !== -1) {
+ throw new TypeError('invalid duplicate parameter')
+ }
+
+ names.push(key)
+
+ if (key.indexOf('*') + 1 === key.length) {
+ // decode extended value
+ key = key.slice(0, -1)
+ value = decodefield(value)
+
+ // overwrite existing value
+ params[key] = value
+ continue
+ }
+
+ if (typeof params[key] === 'string') {
+ continue
+ }
+
+ if (value[0] === '"') {
+ // remove quotes and escapes
+ value = value
+ .substr(1, value.length - 2)
+ .replace(QESC_REGEXP, '$1')
+ }
+
+ params[key] = value
+ }
+
+ if (index !== -1 && index !== string.length) {
+ throw new TypeError('invalid parameter format')
+ }
+
+ return new ContentDisposition(type, params)
+}
+
+/**
+ * Percent decode a single character.
+ *
+ * @param {string} str
+ * @param {string} hex
+ * @return {string}
+ * @api private
+ */
+
+function pdecode (str, hex) {
+ return String.fromCharCode(parseInt(hex, 16))
+}
+
+/**
+ * Percent encode a single character.
+ *
+ * @param {string} char
+ * @return {string}
+ * @api private
+ */
+
+function pencode (char) {
+ var hex = String(char)
+ .charCodeAt(0)
+ .toString(16)
+ .toUpperCase()
+ return hex.length === 1
+ ? '%0' + hex
+ : '%' + hex
+}
+
+/**
+ * Quote a string for HTTP.
+ *
+ * @param {string} val
+ * @return {string}
+ * @api private
+ */
+
+function qstring (val) {
+ var str = String(val)
+
+ return '"' + str.replace(QUOTE_REGEXP, '\\$1') + '"'
+}
+
+/**
+ * Encode a Unicode string for HTTP (RFC 5987).
+ *
+ * @param {string} val
+ * @return {string}
+ * @api private
+ */
+
+function ustring (val) {
+ var str = String(val)
+
+ // percent encode as UTF-8
+ var encoded = encodeURIComponent(str)
+ .replace(ENCODE_URL_ATTR_CHAR_REGEXP, pencode)
+
+ return 'UTF-8\'\'' + encoded
+}
+
+/**
+ * Class for parsed Content-Disposition header for v8 optimization
+ */
+
+function ContentDisposition (type, parameters) {
+ this.type = type
+ this.parameters = parameters
+}
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/f8b44831/cordova-lib/spec-cordova/fixtures/platforms/cordova-browser/node_modules/content-disposition/package.json
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-cordova/fixtures/platforms/cordova-browser/node_modules/content-disposition/package.json b/cordova-lib/spec-cordova/fixtures/platforms/cordova-browser/node_modules/content-disposition/package.json
new file mode 100644
index 0000000..51dc2d9
--- /dev/null
+++ b/cordova-lib/spec-cordova/fixtures/platforms/cordova-browser/node_modules/content-disposition/package.json
@@ -0,0 +1,110 @@
+{
+ "_args": [
+ [
+ {
+ "raw": "content-disposition@0.5.2",
+ "scope": null,
+ "escapedName": "content-disposition",
+ "name": "content-disposition",
+ "rawSpec": "0.5.2",
+ "spec": "0.5.2",
+ "type": "version"
+ },
+ "/Users/auso/cordova/cordova-lib/cordova-lib/spec-cordova/fixtures/platforms/cordova-browser/node_modules/express"
+ ]
+ ],
+ "_from": "content-disposition@0.5.2",
+ "_id": "content-disposition@0.5.2",
+ "_inCache": true,
+ "_location": "/content-disposition",
+ "_nodeVersion": "4.6.0",
+ "_npmOperationalInternal": {
+ "host": "packages-18-east.internal.npmjs.com",
+ "tmp": "tmp/content-disposition-0.5.2.tgz_1481246224565_0.35659545403905213"
+ },
+ "_npmUser": {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "_npmVersion": "2.15.9",
+ "_phantomChildren": {},
+ "_requested": {
+ "raw": "content-disposition@0.5.2",
+ "scope": null,
+ "escapedName": "content-disposition",
+ "name": "content-disposition",
+ "rawSpec": "0.5.2",
+ "spec": "0.5.2",
+ "type": "version"
+ },
+ "_requiredBy": [
+ "/express"
+ ],
+ "_resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz",
+ "_shasum": "0cf68bb9ddf5f2be7961c3a85178cb85dba78cb4",
+ "_shrinkwrap": null,
+ "_spec": "content-disposition@0.5.2",
+ "_where": "/Users/auso/cordova/cordova-lib/cordova-lib/spec-cordova/fixtures/platforms/cordova-browser/node_modules/express",
+ "bugs": {
+ "url": "https://github.com/jshttp/content-disposition/issues"
+ },
+ "contributors": [
+ {
+ "name": "Douglas Christopher Wilson",
+ "email": "doug@somethingdoug.com"
+ }
+ ],
+ "dependencies": {},
+ "description": "Create and parse Content-Disposition header",
+ "devDependencies": {
+ "eslint": "3.11.1",
+ "eslint-config-standard": "6.2.1",
+ "eslint-plugin-promise": "3.3.0",
+ "eslint-plugin-standard": "2.0.1",
+ "istanbul": "0.4.5",
+ "mocha": "1.21.5"
+ },
+ "directories": {},
+ "dist": {
+ "shasum": "0cf68bb9ddf5f2be7961c3a85178cb85dba78cb4",
+ "tarball": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz"
+ },
+ "engines": {
+ "node": ">= 0.6"
+ },
+ "files": [
+ "LICENSE",
+ "HISTORY.md",
+ "README.md",
+ "index.js"
+ ],
+ "gitHead": "2a08417377cf55678c9f870b305f3c6c088920f3",
+ "homepage": "https://github.com/jshttp/content-disposition#readme",
+ "keywords": [
+ "content-disposition",
+ "http",
+ "rfc6266",
+ "res"
+ ],
+ "license": "MIT",
+ "maintainers": [
+ {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ }
+ ],
+ "name": "content-disposition",
+ "optionalDependencies": {},
+ "readme": "ERROR: No README data found!",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/jshttp/content-disposition.git"
+ },
+ "scripts": {
+ "lint": "eslint .",
+ "test": "mocha --reporter spec --bail --check-leaks test/",
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/",
+ "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/"
+ },
+ "version": "0.5.2"
+}
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/f8b44831/cordova-lib/spec-cordova/fixtures/platforms/cordova-browser/node_modules/content-type/HISTORY.md
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-cordova/fixtures/platforms/cordova-browser/node_modules/content-type/HISTORY.md b/cordova-lib/spec-cordova/fixtures/platforms/cordova-browser/node_modules/content-type/HISTORY.md
new file mode 100644
index 0000000..01652ff
--- /dev/null
+++ b/cordova-lib/spec-cordova/fixtures/platforms/cordova-browser/node_modules/content-type/HISTORY.md
@@ -0,0 +1,14 @@
+1.0.2 / 2016-05-09
+==================
+
+ * perf: enable strict mode
+
+1.0.1 / 2015-02-13
+==================
+
+ * Improve missing `Content-Type` header error message
+
+1.0.0 / 2015-02-01
+==================
+
+ * Initial implementation, derived from `media-typer@0.3.0`
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/f8b44831/cordova-lib/spec-cordova/fixtures/platforms/cordova-browser/node_modules/content-type/LICENSE
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-cordova/fixtures/platforms/cordova-browser/node_modules/content-type/LICENSE b/cordova-lib/spec-cordova/fixtures/platforms/cordova-browser/node_modules/content-type/LICENSE
new file mode 100644
index 0000000..34b1a2d
--- /dev/null
+++ b/cordova-lib/spec-cordova/fixtures/platforms/cordova-browser/node_modules/content-type/LICENSE
@@ -0,0 +1,22 @@
+(The MIT License)
+
+Copyright (c) 2015 Douglas Christopher Wilson
+
+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.
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/f8b44831/cordova-lib/spec-cordova/fixtures/platforms/cordova-browser/node_modules/content-type/README.md
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-cordova/fixtures/platforms/cordova-browser/node_modules/content-type/README.md b/cordova-lib/spec-cordova/fixtures/platforms/cordova-browser/node_modules/content-type/README.md
new file mode 100644
index 0000000..3ed6741
--- /dev/null
+++ b/cordova-lib/spec-cordova/fixtures/platforms/cordova-browser/node_modules/content-type/README.md
@@ -0,0 +1,92 @@
+# content-type
+
+[![NPM Version][npm-image]][npm-url]
+[![NPM Downloads][downloads-image]][downloads-url]
+[![Node.js Version][node-version-image]][node-version-url]
+[![Build Status][travis-image]][travis-url]
+[![Test Coverage][coveralls-image]][coveralls-url]
+
+Create and parse HTTP Content-Type header according to RFC 7231
+
+## Installation
+
+```sh
+$ npm install content-type
+```
+
+## API
+
+```js
+var contentType = require('content-type')
+```
+
+### contentType.parse(string)
+
+```js
+var obj = contentType.parse('image/svg+xml; charset=utf-8')
+```
+
+Parse a content type string. This will return an object with the following
+properties (examples are shown for the string `'image/svg+xml; charset=utf-8'`):
+
+ - `type`: The media type (the type and subtype, always lower case).
+ Example: `'image/svg+xml'`
+
+ - `parameters`: An object of the parameters in the media type (name of parameter
+ always lower case). Example: `{charset: 'utf-8'}`
+
+Throws a `TypeError` if the string is missing or invalid.
+
+### contentType.parse(req)
+
+```js
+var obj = contentType.parse(req)
+```
+
+Parse the `content-type` header from the given `req`. Short-cut for
+`contentType.parse(req.headers['content-type'])`.
+
+Throws a `TypeError` if the `Content-Type` header is missing or invalid.
+
+### contentType.parse(res)
+
+```js
+var obj = contentType.parse(res)
+```
+
+Parse the `content-type` header set on the given `res`. Short-cut for
+`contentType.parse(res.getHeader('content-type'))`.
+
+Throws a `TypeError` if the `Content-Type` header is missing or invalid.
+
+### contentType.format(obj)
+
+```js
+var str = contentType.format({type: 'image/svg+xml'})
+```
+
+Format an object into a content type string. This will return a string of the
+content type for the given object with the following properties (examples are
+shown that produce the string `'image/svg+xml; charset=utf-8'`):
+
+ - `type`: The media type (will be lower-cased). Example: `'image/svg+xml'`
+
+ - `parameters`: An object of the parameters in the media type (name of the
+ parameter will be lower-cased). Example: `{charset: 'utf-8'}`
+
+Throws a `TypeError` if the object contains an invalid type or parameter names.
+
+## License
+
+[MIT](LICENSE)
+
+[npm-image]: https://img.shields.io/npm/v/content-type.svg
+[npm-url]: https://npmjs.org/package/content-type
+[node-version-image]: https://img.shields.io/node/v/content-type.svg
+[node-version-url]: http://nodejs.org/download/
+[travis-image]: https://img.shields.io/travis/jshttp/content-type/master.svg
+[travis-url]: https://travis-ci.org/jshttp/content-type
+[coveralls-image]: https://img.shields.io/coveralls/jshttp/content-type/master.svg
+[coveralls-url]: https://coveralls.io/r/jshttp/content-type
+[downloads-image]: https://img.shields.io/npm/dm/content-type.svg
+[downloads-url]: https://npmjs.org/package/content-type
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/f8b44831/cordova-lib/spec-cordova/fixtures/platforms/cordova-browser/node_modules/content-type/index.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-cordova/fixtures/platforms/cordova-browser/node_modules/content-type/index.js b/cordova-lib/spec-cordova/fixtures/platforms/cordova-browser/node_modules/content-type/index.js
new file mode 100644
index 0000000..61ba6b5
--- /dev/null
+++ b/cordova-lib/spec-cordova/fixtures/platforms/cordova-browser/node_modules/content-type/index.js
@@ -0,0 +1,216 @@
+/*!
+ * content-type
+ * Copyright(c) 2015 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+'use strict'
+
+/**
+ * RegExp to match *( ";" parameter ) in RFC 7231 sec 3.1.1.1
+ *
+ * parameter = token "=" ( token / quoted-string )
+ * token = 1*tchar
+ * tchar = "!" / "#" / "$" / "%" / "&" / "'" / "*"
+ * / "+" / "-" / "." / "^" / "_" / "`" / "|" / "~"
+ * / DIGIT / ALPHA
+ * ; any VCHAR, except delimiters
+ * quoted-string = DQUOTE *( qdtext / quoted-pair ) DQUOTE
+ * qdtext = HTAB / SP / %x21 / %x23-5B / %x5D-7E / obs-text
+ * obs-text = %x80-FF
+ * quoted-pair = "\" ( HTAB / SP / VCHAR / obs-text )
+ */
+var paramRegExp = /; *([!#$%&'\*\+\-\.\^_`\|~0-9A-Za-z]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'\*\+\-\.\^_`\|~0-9A-Za-z]+) */g
+var textRegExp = /^[\u000b\u0020-\u007e\u0080-\u00ff]+$/
+var tokenRegExp = /^[!#$%&'\*\+\-\.\^_`\|~0-9A-Za-z]+$/
+
+/**
+ * RegExp to match quoted-pair in RFC 7230 sec 3.2.6
+ *
+ * quoted-pair = "\" ( HTAB / SP / VCHAR / obs-text )
+ * obs-text = %x80-FF
+ */
+var qescRegExp = /\\([\u000b\u0020-\u00ff])/g
+
+/**
+ * RegExp to match chars that must be quoted-pair in RFC 7230 sec 3.2.6
+ */
+var quoteRegExp = /([\\"])/g
+
+/**
+ * RegExp to match type in RFC 6838
+ *
+ * media-type = type "/" subtype
+ * type = token
+ * subtype = token
+ */
+var typeRegExp = /^[!#$%&'\*\+\-\.\^_`\|~0-9A-Za-z]+\/[!#$%&'\*\+\-\.\^_`\|~0-9A-Za-z]+$/
+
+/**
+ * Module exports.
+ * @public
+ */
+
+exports.format = format
+exports.parse = parse
+
+/**
+ * Format object to media type.
+ *
+ * @param {object} obj
+ * @return {string}
+ * @public
+ */
+
+function format(obj) {
+ if (!obj || typeof obj !== 'object') {
+ throw new TypeError('argument obj is required')
+ }
+
+ var parameters = obj.parameters
+ var type = obj.type
+
+ if (!type || !typeRegExp.test(type)) {
+ throw new TypeError('invalid type')
+ }
+
+ var string = type
+
+ // append parameters
+ if (parameters && typeof parameters === 'object') {
+ var param
+ var params = Object.keys(parameters).sort()
+
+ for (var i = 0; i < params.length; i++) {
+ param = params[i]
+
+ if (!tokenRegExp.test(param)) {
+ throw new TypeError('invalid parameter name')
+ }
+
+ string += '; ' + param + '=' + qstring(parameters[param])
+ }
+ }
+
+ return string
+}
+
+/**
+ * Parse media type to object.
+ *
+ * @param {string|object} string
+ * @return {Object}
+ * @public
+ */
+
+function parse(string) {
+ if (!string) {
+ throw new TypeError('argument string is required')
+ }
+
+ if (typeof string === 'object') {
+ // support req/res-like objects as argument
+ string = getcontenttype(string)
+
+ if (typeof string !== 'string') {
+ throw new TypeError('content-type header is missing from object');
+ }
+ }
+
+ if (typeof string !== 'string') {
+ throw new TypeError('argument string is required to be a string')
+ }
+
+ var index = string.indexOf(';')
+ var type = index !== -1
+ ? string.substr(0, index).trim()
+ : string.trim()
+
+ if (!typeRegExp.test(type)) {
+ throw new TypeError('invalid media type')
+ }
+
+ var key
+ var match
+ var obj = new ContentType(type.toLowerCase())
+ var value
+
+ paramRegExp.lastIndex = index
+
+ while (match = paramRegExp.exec(string)) {
+ if (match.index !== index) {
+ throw new TypeError('invalid parameter format')
+ }
+
+ index += match[0].length
+ key = match[1].toLowerCase()
+ value = match[2]
+
+ if (value[0] === '"') {
+ // remove quotes and escapes
+ value = value
+ .substr(1, value.length - 2)
+ .replace(qescRegExp, '$1')
+ }
+
+ obj.parameters[key] = value
+ }
+
+ if (index !== -1 && index !== string.length) {
+ throw new TypeError('invalid parameter format')
+ }
+
+ return obj
+}
+
+/**
+ * Get content-type from req/res objects.
+ *
+ * @param {object}
+ * @return {Object}
+ * @private
+ */
+
+function getcontenttype(obj) {
+ if (typeof obj.getHeader === 'function') {
+ // res-like
+ return obj.getHeader('content-type')
+ }
+
+ if (typeof obj.headers === 'object') {
+ // req-like
+ return obj.headers && obj.headers['content-type']
+ }
+}
+
+/**
+ * Quote a string if necessary.
+ *
+ * @param {string} val
+ * @return {string}
+ * @private
+ */
+
+function qstring(val) {
+ var str = String(val)
+
+ // no need to quote tokens
+ if (tokenRegExp.test(str)) {
+ return str
+ }
+
+ if (str.length > 0 && !textRegExp.test(str)) {
+ throw new TypeError('invalid parameter value')
+ }
+
+ return '"' + str.replace(quoteRegExp, '\\$1') + '"'
+}
+
+/**
+ * Class to represent a content type.
+ * @private
+ */
+function ContentType(type) {
+ this.parameters = Object.create(null)
+ this.type = type
+}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org