diff options
author | Rebecca Turner <me@re-becca.org> | 2015-07-24 11:11:43 +0300 |
---|---|---|
committer | Rebecca Turner <me@re-becca.org> | 2015-07-24 12:39:53 +0300 |
commit | c6a84503aecafe5d3d7b38fa1c0fb005198f2746 (patch) | |
tree | 2dd4a972be502925a65fa96d9aedd32336d4e709 /node_modules/form-data | |
parent | a04925bba15d3991469400865932b10c66177822 (diff) |
form-data@1.0.0-rc2
Diffstat (limited to 'node_modules/form-data')
-rw-r--r-- | node_modules/form-data/lib/browser.js | 1 | ||||
-rw-r--r-- | node_modules/form-data/lib/form_data.js | 2 | ||||
-rw-r--r-- | node_modules/form-data/node_modules/mime-types/HISTORY.md | 135 | ||||
-rw-r--r-- | node_modules/form-data/node_modules/mime-types/LICENSE | 23 | ||||
-rw-r--r-- | node_modules/form-data/node_modules/mime-types/README.md | 103 | ||||
-rw-r--r-- | node_modules/form-data/node_modules/mime-types/index.js | 188 | ||||
-rw-r--r-- | node_modules/form-data/node_modules/mime-types/package.json | 107 | ||||
-rw-r--r-- | node_modules/form-data/package.json | 26 |
8 files changed, 12 insertions, 573 deletions
diff --git a/node_modules/form-data/lib/browser.js b/node_modules/form-data/lib/browser.js new file mode 100644 index 000000000..1e7717d56 --- /dev/null +++ b/node_modules/form-data/lib/browser.js @@ -0,0 +1 @@ +module.exports = FormData;
\ No newline at end of file diff --git a/node_modules/form-data/lib/form_data.js b/node_modules/form-data/lib/form_data.js index b960dce9d..89505f6eb 100644 --- a/node_modules/form-data/lib/form_data.js +++ b/node_modules/form-data/lib/form_data.js @@ -180,7 +180,7 @@ FormData.prototype._multiPartFooter = function(field, value, options) { }; FormData.prototype._lastBoundary = function() { - return '--' + this.getBoundary() + '--'; + return '--' + this.getBoundary() + '--' + FormData.LINE_BREAK; }; FormData.prototype.getHeaders = function(userHeaders) { diff --git a/node_modules/form-data/node_modules/mime-types/HISTORY.md b/node_modules/form-data/node_modules/mime-types/HISTORY.md deleted file mode 100644 index 54689f911..000000000 --- a/node_modules/form-data/node_modules/mime-types/HISTORY.md +++ /dev/null @@ -1,135 +0,0 @@ -2.1.1 / 2015-06-08 -================== - - * perf: fix deopt during mapping - -2.1.0 / 2015-06-07 -================== - - * Fix incorrectly treating extension-less file name as extension - - i.e. `'path/to/json'` will no longer return `application/json` - * Fix `.charset(type)` to accept parameters - * Fix `.charset(type)` to match case-insensitive - * Improve generation of extension to MIME mapping - * Refactor internals for readability and no argument reassignment - * Prefer `application/*` MIME types from the same source - * Prefer any type over `application/octet-stream` - * deps: mime-db@~1.13.0 - - Add nginx as a source - - Add new mime types - -2.0.14 / 2015-06-06 -=================== - - * deps: mime-db@~1.12.0 - - Add new mime types - -2.0.13 / 2015-05-31 -=================== - - * deps: mime-db@~1.11.0 - - Add new mime types - -2.0.12 / 2015-05-19 -=================== - - * deps: mime-db@~1.10.0 - - Add new mime types - -2.0.11 / 2015-05-05 -=================== - - * deps: mime-db@~1.9.1 - - Add new mime types - -2.0.10 / 2015-03-13 -=================== - - * deps: mime-db@~1.8.0 - - Add new mime types - -2.0.9 / 2015-02-09 -================== - - * deps: mime-db@~1.7.0 - - Add new mime types - - Community extensions ownership transferred from `node-mime` - -2.0.8 / 2015-01-29 -================== - - * deps: mime-db@~1.6.0 - - Add new mime types - -2.0.7 / 2014-12-30 -================== - - * deps: mime-db@~1.5.0 - - Add new mime types - - Fix various invalid MIME type entries - -2.0.6 / 2014-12-30 -================== - - * deps: mime-db@~1.4.0 - - Add new mime types - - Fix various invalid MIME type entries - - Remove example template MIME types - -2.0.5 / 2014-12-29 -================== - - * deps: mime-db@~1.3.1 - - Fix missing extensions - -2.0.4 / 2014-12-10 -================== - - * deps: mime-db@~1.3.0 - - Add new mime types - -2.0.3 / 2014-11-09 -================== - - * deps: mime-db@~1.2.0 - - Add new mime types - -2.0.2 / 2014-09-28 -================== - - * deps: mime-db@~1.1.0 - - Add new mime types - - Add additional compressible - - Update charsets - -2.0.1 / 2014-09-07 -================== - - * Support Node.js 0.6 - -2.0.0 / 2014-09-02 -================== - - * Use `mime-db` - * Remove `.define()` - -1.0.2 / 2014-08-04 -================== - - * Set charset=utf-8 for `text/javascript` - -1.0.1 / 2014-06-24 -================== - - * Add `text/jsx` type - -1.0.0 / 2014-05-12 -================== - - * Return `false` for unknown types - * Set charset=utf-8 for `application/json` - -0.1.0 / 2014-05-02 -================== - - * Initial release diff --git a/node_modules/form-data/node_modules/mime-types/LICENSE b/node_modules/form-data/node_modules/mime-types/LICENSE deleted file mode 100644 index 06166077b..000000000 --- a/node_modules/form-data/node_modules/mime-types/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -(The MIT License) - -Copyright (c) 2014 Jonathan Ong <me@jongleberry.com> -Copyright (c) 2015 Douglas Christopher Wilson <doug@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. diff --git a/node_modules/form-data/node_modules/mime-types/README.md b/node_modules/form-data/node_modules/mime-types/README.md deleted file mode 100644 index e26295d04..000000000 --- a/node_modules/form-data/node_modules/mime-types/README.md +++ /dev/null @@ -1,103 +0,0 @@ -# mime-types - -[![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] - -The ultimate javascript content-type utility. - -Similar to [node-mime](https://github.com/broofa/node-mime), except: - -- __No fallbacks.__ Instead of naively returning the first available type, `mime-types` simply returns `false`, - so do `var type = mime.lookup('unrecognized') || 'application/octet-stream'`. -- No `new Mime()` business, so you could do `var lookup = require('mime-types').lookup`. -- Additional mime types are added such as jade and stylus via [mime-db](https://github.com/jshttp/mime-db) -- No `.define()` functionality - -Otherwise, the API is compatible. - -## Install - -```sh -$ npm install mime-types -``` - -## Adding Types - -All mime types are based on [mime-db](https://github.com/jshttp/mime-db), -so open a PR there if you'd like to add mime types. - -## API - -```js -var mime = require('mime-types') -``` - -All functions return `false` if input is invalid or not found. - -### mime.lookup(path) - -Lookup the content-type associated with a file. - -```js -mime.lookup('json') // 'application/json' -mime.lookup('.md') // 'text/x-markdown' -mime.lookup('file.html') // 'text/html' -mime.lookup('folder/file.js') // 'application/javascript' -mime.lookup('folder/.htaccess') // false - -mime.lookup('cats') // false -``` - -### mime.contentType(type) - -Create a full content-type header given a content-type or extension. - -```js -mime.contentType('markdown') // 'text/x-markdown; charset=utf-8' -mime.contentType('file.json') // 'application/json; charset=utf-8' - -// from a full path -mime.contentType(path.extname('/path/to/file.json')) // 'application/json; charset=utf-8' -``` - -### mime.extension(type) - -Get the default extension for a content-type. - -```js -mime.extension('application/octet-stream') // 'bin' -``` - -### mime.charset(type) - -Lookup the implied default charset of a content-type. - -```js -mime.charset('text/x-markdown') // 'UTF-8' -``` - -### var type = mime.types[extension] - -A map of content-types by extension. - -### [extensions...] = mime.extensions[type] - -A map of extensions by content-type. - -## License - -[MIT](LICENSE) - -[npm-image]: https://img.shields.io/npm/v/mime-types.svg -[npm-url]: https://npmjs.org/package/mime-types -[node-version-image]: https://img.shields.io/node/v/mime-types.svg -[node-version-url]: http://nodejs.org/download/ -[travis-image]: https://img.shields.io/travis/jshttp/mime-types/master.svg -[travis-url]: https://travis-ci.org/jshttp/mime-types -[coveralls-image]: https://img.shields.io/coveralls/jshttp/mime-types/master.svg -[coveralls-url]: https://coveralls.io/r/jshttp/mime-types -[downloads-image]: https://img.shields.io/npm/dm/mime-types.svg -[downloads-url]: https://npmjs.org/package/mime-types diff --git a/node_modules/form-data/node_modules/mime-types/index.js b/node_modules/form-data/node_modules/mime-types/index.js deleted file mode 100644 index 9edf72b75..000000000 --- a/node_modules/form-data/node_modules/mime-types/index.js +++ /dev/null @@ -1,188 +0,0 @@ -/*! - * mime-types - * Copyright(c) 2014 Jonathan Ong - * Copyright(c) 2015 Douglas Christopher Wilson - * MIT Licensed - */ - -'use strict' - -/** - * Module dependencies. - * @private - */ - -var db = require('mime-db') -var extname = require('path').extname - -/** - * Module variables. - * @private - */ - -var extractTypeRegExp = /^\s*([^;\s]*)(?:;|\s|$)/ -var textTypeRegExp = /^text\//i - -/** - * Module exports. - * @public - */ - -exports.charset = charset -exports.charsets = { lookup: charset } -exports.contentType = contentType -exports.extension = extension -exports.extensions = Object.create(null) -exports.lookup = lookup -exports.types = Object.create(null) - -// Populate the extensions/types maps -populateMaps(exports.extensions, exports.types) - -/** - * Get the default charset for a MIME type. - * - * @param {string} type - * @return {boolean|string} - */ - -function charset(type) { - if (!type || typeof type !== 'string') { - return false - } - - // TODO: use media-typer - var match = extractTypeRegExp.exec(type) - var mime = match && db[match[1].toLowerCase()] - - if (mime && mime.charset) { - return mime.charset - } - - // default text/* to utf-8 - if (match && textTypeRegExp.test(match[1])) { - return 'UTF-8' - } - - return false -} - -/** - * Create a full Content-Type header given a MIME type or extension. - * - * @param {string} str - * @return {boolean|string} - */ - -function contentType(str) { - // TODO: should this even be in this module? - if (!str || typeof str !== 'string') { - return false - } - - var mime = str.indexOf('/') === -1 - ? exports.lookup(str) - : str - - if (!mime) { - return false - } - - // TODO: use content-type or other module - if (mime.indexOf('charset') === -1) { - var charset = exports.charset(mime) - if (charset) mime += '; charset=' + charset.toLowerCase() - } - - return mime -} - -/** - * Get the default extension for a MIME type. - * - * @param {string} type - * @return {boolean|string} - */ - -function extension(type) { - if (!type || typeof type !== 'string') { - return false - } - - // TODO: use media-typer - var match = extractTypeRegExp.exec(type) - - // get extensions - var exts = match && exports.extensions[match[1].toLowerCase()] - - if (!exts || !exts.length) { - return false - } - - return exts[0] -} - -/** - * Lookup the MIME type for a file path/extension. - * - * @param {string} path - * @return {boolean|string} - */ - -function lookup(path) { - if (!path || typeof path !== 'string') { - return false - } - - // get the extension ("ext" or ".ext" or full path) - var extension = extname('x.' + path) - .toLowerCase() - .substr(1) - - if (!extension) { - return false - } - - return exports.types[extension] || false -} - -/** - * Populate the extensions and types maps. - * @private - */ - -function populateMaps(extensions, types) { - // source preference (least -> most) - var preference = ['nginx', 'apache', undefined, 'iana'] - - Object.keys(db).forEach(function forEachMimeType(type) { - var mime = db[type] - var exts = mime.extensions - - if (!exts || !exts.length) { - return - } - - // mime -> extensions - extensions[type] = exts - - // extension -> mime - for (var i = 0; i < exts.length; i++) { - var extension = exts[i] - - if (types[extension]) { - var from = preference.indexOf(db[types[extension]].source) - var to = preference.indexOf(mime.source) - - if (types[extension] !== 'application/octet-stream' - && from > to || (from === to && types[extension].substr(0, 12) === 'application/')) { - // skip the remapping - return - } - } - - // set the extension -> mime - types[extension] = type - } - }) -} diff --git a/node_modules/form-data/node_modules/mime-types/package.json b/node_modules/form-data/node_modules/mime-types/package.json deleted file mode 100644 index 06ec8d0c7..000000000 --- a/node_modules/form-data/node_modules/mime-types/package.json +++ /dev/null @@ -1,107 +0,0 @@ -{ - "_args": [ - [ - "mime-types@^2.1.1", - "/Users/rebecca/code/npm/node_modules/form-data" - ] - ], - "_from": "mime-types@>=2.1.1 <3.0.0", - "_id": "mime-types@2.1.1", - "_inCache": true, - "_location": "/form-data/mime-types", - "_npmUser": { - "email": "doug@somethingdoug.com", - "name": "dougwilson" - }, - "_npmVersion": "1.4.28", - "_phantomChildren": {}, - "_requested": { - "name": "mime-types", - "raw": "mime-types@^2.1.1", - "rawSpec": "^2.1.1", - "scope": null, - "spec": ">=2.1.1 <3.0.0", - "type": "range" - }, - "_requiredBy": [ - "/form-data" - ], - "_resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.1.tgz", - "_shasum": "c7b692796d5166f4826d10b4675c8a916657d04e", - "_shrinkwrap": null, - "_spec": "mime-types@^2.1.1", - "_where": "/Users/rebecca/code/npm/node_modules/form-data", - "bugs": { - "url": "https://github.com/jshttp/mime-types/issues" - }, - "contributors": [ - { - "name": "Douglas Christopher Wilson", - "email": "doug@somethingdoug.com" - }, - { - "name": "Jeremiah Senkpiel", - "email": "fishrock123@rocketmail.com", - "url": "https://searchbeam.jit.su" - }, - { - "name": "Jonathan Ong", - "email": "me@jongleberry.com", - "url": "http://jongleberry.com" - } - ], - "dependencies": { - "mime-db": "~1.13.0" - }, - "description": "The ultimate javascript content-type utility.", - "devDependencies": { - "istanbul": "0.3.14", - "mocha": "~1.21.5" - }, - "directories": {}, - "dist": { - "shasum": "c7b692796d5166f4826d10b4675c8a916657d04e", - "tarball": "http://registry.npmjs.org/mime-types/-/mime-types-2.1.1.tgz" - }, - "engines": { - "node": ">= 0.6" - }, - "files": [ - "HISTORY.md", - "LICENSE", - "index.js" - ], - "gitHead": "c067c0b0d8a2e7df82c356dc295852688be1245c", - "homepage": "https://github.com/jshttp/mime-types", - "keywords": [ - "mime", - "types" - ], - "license": "MIT", - "maintainers": [ - { - "name": "jongleberry", - "email": "jonathanrichardong@gmail.com" - }, - { - "name": "fishrock123", - "email": "fishrock123@rocketmail.com" - }, - { - "name": "dougwilson", - "email": "doug@somethingdoug.com" - } - ], - "name": "mime-types", - "optionalDependencies": {}, - "repository": { - "type": "git", - "url": "https://github.com/jshttp/mime-types" - }, - "scripts": { - "test": "mocha --reporter spec test/test.js", - "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot test/test.js", - "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter dot test/test.js" - }, - "version": "2.1.1" -} diff --git a/node_modules/form-data/package.json b/node_modules/form-data/package.json index aae8065da..553351bf6 100644 --- a/node_modules/form-data/package.json +++ b/node_modules/form-data/package.json @@ -6,7 +6,7 @@ ] ], "_from": "form-data@>=1.0.0-rc1 <1.1.0", - "_id": "form-data@1.0.0-rc1", + "_id": "form-data@1.0.0-rc2", "_inCache": true, "_location": "/form-data", "_nodeVersion": "0.12.4", @@ -15,9 +15,7 @@ "name": "alexindigo" }, "_npmVersion": "2.10.1", - "_phantomChildren": { - "mime-db": "1.13.0" - }, + "_phantomChildren": {}, "_requested": { "name": "form-data", "raw": "form-data@~1.0.0-rc1", @@ -29,8 +27,8 @@ "_requiredBy": [ "/request" ], - "_resolved": "https://registry.npmjs.org/form-data/-/form-data-1.0.0-rc1.tgz", - "_shasum": "de5d87ff28439596f4f5500bff58d1244d54793a", + "_resolved": "https://registry.npmjs.org/form-data/-/form-data-1.0.0-rc2.tgz", + "_shasum": "5bc9c9b3dd3dec1977b0abf58790192081d95235", "_shrinkwrap": null, "_spec": "form-data@~1.0.0-rc1", "_where": "/Users/rebecca/code/npm/node_modules/request", @@ -39,6 +37,7 @@ "name": "Felix Geisendörfer", "url": "http://debuggable.com/" }, + "browser": "./lib/browser", "bugs": { "url": "https://github.com/felixge/node-form-data/issues" }, @@ -56,20 +55,15 @@ }, "directories": {}, "dist": { - "shasum": "de5d87ff28439596f4f5500bff58d1244d54793a", - "tarball": "http://registry.npmjs.org/form-data/-/form-data-1.0.0-rc1.tgz" + "shasum": "5bc9c9b3dd3dec1977b0abf58790192081d95235", + "tarball": "http://registry.npmjs.org/form-data/-/form-data-1.0.0-rc2.tgz" }, "engines": { "node": ">= 0.10" }, - "gitHead": "e6650a4c078fd09c130ed712848d71d8609c6518", + "gitHead": "9f29fefe9633f3adae72d6416fd6822c060ff6b6", "homepage": "https://github.com/felixge/node-form-data#readme", - "licenses": [ - { - "type": "MIT", - "url": "https://raw.github.com/felixge/node-form-data/master/License" - } - ], + "license": "MIT", "main": "./lib/form_data", "maintainers": [ { @@ -102,5 +96,5 @@ "scripts": { "test": "node test/run.js" }, - "version": "1.0.0-rc1" + "version": "1.0.0-rc2" } |