diff options
Diffstat (limited to 'deps/node/deps/npm/node_modules/gentle-fs')
19 files changed, 0 insertions, 1296 deletions
diff --git a/deps/node/deps/npm/node_modules/gentle-fs/CHANGELOG.md b/deps/node/deps/npm/node_modules/gentle-fs/CHANGELOG.md deleted file mode 100644 index e9bb23d9..00000000 --- a/deps/node/deps/npm/node_modules/gentle-fs/CHANGELOG.md +++ /dev/null @@ -1,63 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. - -<a name="2.0.1"></a> -## [2.0.1](https://github.com/npm/gentle-fs/compare/v2.0.0...v2.0.1) (2017-11-28) - - -### Bug Fixes - -* **pkglock:** regenerate lock to fix version issues ([a41cbd0](https://github.com/npm/gentle-fs/commit/a41cbd0)) -* **rm:** make sure logic for vacuuming matches original npm ([673e82c](https://github.com/npm/gentle-fs/commit/673e82c)) - - - -<a name="2.0.0"></a> -# [2.0.0](https://github.com/npm/gentle-fs/compare/v1.0.2...v2.0.0) (2017-10-07) - - -### Features - -* **api:** switch to callbacks for now. ([236e886](https://github.com/npm/gentle-fs/commit/236e886)) - - -### BREAKING CHANGES - -* **api:** switches from Promises to callbacks for async control flow. - - - -<a name="1.0.2"></a> -## [1.0.2](https://github.com/npm/gentle-fs/compare/v1.0.1...v1.0.2) (2017-10-07) - - -### Bug Fixes - -* **link:** properly resolve linkIfExists promise ([f06acf2](https://github.com/npm/gentle-fs/commit/f06acf2)) - - - -<a name="1.0.1"></a> -## [1.0.1](https://github.com/npm/gentle-fs/compare/v1.0.0...v1.0.1) (2017-09-25) - - -### Bug Fixes - -* **files:** include required lib files in tarball ([e0be6a8](https://github.com/npm/gentle-fs/commit/e0be6a8)) - - - -<a name="1.0.0"></a> -# 1.0.0 (2017-09-15) - - -### Bug Fixes - -* **docs:** Flesh out API descriptions. ([b056a34](https://github.com/npm/gentle-fs/commit/b056a34)) -* **docs:** update usage examples ([5517ff5](https://github.com/npm/gentle-fs/commit/5517ff5)) - - -### BREAKING CHANGES - -* **docs:** api docs added diff --git a/deps/node/deps/npm/node_modules/gentle-fs/LICENSE b/deps/node/deps/npm/node_modules/gentle-fs/LICENSE deleted file mode 100644 index 0b6c2287..00000000 --- a/deps/node/deps/npm/node_modules/gentle-fs/LICENSE +++ /dev/null @@ -1,235 +0,0 @@ -The npm application -Copyright (c) npm, Inc. and Contributors -Licensed on the terms of The Artistic License 2.0 - -Node package dependencies of the npm application -Copyright (c) their respective copyright owners -Licensed on their respective license terms - -The npm public registry at https://registry.npmjs.org -and the npm website at https://www.npmjs.com -Operated by npm, Inc. -Use governed by terms published on https://www.npmjs.com - -"Node.js" -Trademark Joyent, Inc., https://joyent.com -Neither npm nor npm, Inc. are affiliated with Joyent, Inc. - -The Node.js application -Project of Node Foundation, https://nodejs.org - -The npm Logo -Copyright (c) Mathias Pettersson and Brian Hammond - -"Gubblebum Blocky" typeface -Copyright (c) Tjarda Koster, https://jelloween.deviantart.com -Used with permission - - --------- - - -The Artistic License 2.0 - -Copyright (c) 2000-2006, The Perl Foundation. - -Everyone is permitted to copy and distribute verbatim copies -of this license document, but changing it is not allowed. - -Preamble - -This license establishes the terms under which a given free software -Package may be copied, modified, distributed, and/or redistributed. -The intent is that the Copyright Holder maintains some artistic -control over the development of that Package while still keeping the -Package available as open source and free software. - -You are always permitted to make arrangements wholly outside of this -license directly with the Copyright Holder of a given Package. If the -terms of this license do not permit the full use that you propose to -make of the Package, you should contact the Copyright Holder and seek -a different licensing arrangement. - -Definitions - - "Copyright Holder" means the individual(s) or organization(s) - named in the copyright notice for the entire Package. - - "Contributor" means any party that has contributed code or other - material to the Package, in accordance with the Copyright Holder's - procedures. - - "You" and "your" means any person who would like to copy, - distribute, or modify the Package. - - "Package" means the collection of files distributed by the - Copyright Holder, and derivatives of that collection and/or of - those files. A given Package may consist of either the Standard - Version, or a Modified Version. - - "Distribute" means providing a copy of the Package or making it - accessible to anyone else, or in the case of a company or - organization, to others outside of your company or organization. - - "Distributor Fee" means any fee that you charge for Distributing - this Package or providing support for this Package to another - party. It does not mean licensing fees. - - "Standard Version" refers to the Package if it has not been - modified, or has been modified only in ways explicitly requested - by the Copyright Holder. - - "Modified Version" means the Package, if it has been changed, and - such changes were not explicitly requested by the Copyright - Holder. - - "Original License" means this Artistic License as Distributed with - the Standard Version of the Package, in its current version or as - it may be modified by The Perl Foundation in the future. - - "Source" form means the source code, documentation source, and - configuration files for the Package. - - "Compiled" form means the compiled bytecode, object code, binary, - or any other form resulting from mechanical transformation or - translation of the Source form. - - -Permission for Use and Modification Without Distribution - -(1) You are permitted to use the Standard Version and create and use -Modified Versions for any purpose without restriction, provided that -you do not Distribute the Modified Version. - - -Permissions for Redistribution of the Standard Version - -(2) You may Distribute verbatim copies of the Source form of the -Standard Version of this Package in any medium without restriction, -either gratis or for a Distributor Fee, provided that you duplicate -all of the original copyright notices and associated disclaimers. At -your discretion, such verbatim copies may or may not include a -Compiled form of the Package. - -(3) You may apply any bug fixes, portability changes, and other -modifications made available from the Copyright Holder. The resulting -Package will still be considered the Standard Version, and as such -will be subject to the Original License. - - -Distribution of Modified Versions of the Package as Source - -(4) You may Distribute your Modified Version as Source (either gratis -or for a Distributor Fee, and with or without a Compiled form of the -Modified Version) provided that you clearly document how it differs -from the Standard Version, including, but not limited to, documenting -any non-standard features, executables, or modules, and provided that -you do at least ONE of the following: - - (a) make the Modified Version available to the Copyright Holder - of the Standard Version, under the Original License, so that the - Copyright Holder may include your modifications in the Standard - Version. - - (b) ensure that installation of your Modified Version does not - prevent the user installing or running the Standard Version. In - addition, the Modified Version must bear a name that is different - from the name of the Standard Version. - - (c) allow anyone who receives a copy of the Modified Version to - make the Source form of the Modified Version available to others - under - - (i) the Original License or - - (ii) a license that permits the licensee to freely copy, - modify and redistribute the Modified Version using the same - licensing terms that apply to the copy that the licensee - received, and requires that the Source form of the Modified - Version, and of any works derived from it, be made freely - available in that license fees are prohibited but Distributor - Fees are allowed. - - -Distribution of Compiled Forms of the Standard Version -or Modified Versions without the Source - -(5) You may Distribute Compiled forms of the Standard Version without -the Source, provided that you include complete instructions on how to -get the Source of the Standard Version. Such instructions must be -valid at the time of your distribution. If these instructions, at any -time while you are carrying out such distribution, become invalid, you -must provide new instructions on demand or cease further distribution. -If you provide valid instructions or cease distribution within thirty -days after you become aware that the instructions are invalid, then -you do not forfeit any of your rights under this license. - -(6) You may Distribute a Modified Version in Compiled form without -the Source, provided that you comply with Section 4 with respect to -the Source of the Modified Version. - - -Aggregating or Linking the Package - -(7) You may aggregate the Package (either the Standard Version or -Modified Version) with other packages and Distribute the resulting -aggregation provided that you do not charge a licensing fee for the -Package. Distributor Fees are permitted, and licensing fees for other -components in the aggregation are permitted. The terms of this license -apply to the use and Distribution of the Standard or Modified Versions -as included in the aggregation. - -(8) You are permitted to link Modified and Standard Versions with -other works, to embed the Package in a larger work of your own, or to -build stand-alone binary or bytecode versions of applications that -include the Package, and Distribute the result without restriction, -provided the result does not expose a direct interface to the Package. - - -Items That are Not Considered Part of a Modified Version - -(9) Works (including, but not limited to, modules and scripts) that -merely extend or make use of the Package, do not, by themselves, cause -the Package to be a Modified Version. In addition, such works are not -considered parts of the Package itself, and are not subject to the -terms of this license. - - -General Provisions - -(10) Any use, modification, and distribution of the Standard or -Modified Versions is governed by this Artistic License. By using, -modifying or distributing the Package, you accept this license. Do not -use, modify, or distribute the Package, if you do not accept this -license. - -(11) If your Modified Version has been derived from a Modified -Version made by someone other than you, you are nevertheless required -to ensure that your Modified Version complies with the requirements of -this license. - -(12) This license does not grant you the right to use any trademark, -service mark, tradename, or logo of the Copyright Holder. - -(13) This license includes the non-exclusive, worldwide, -free-of-charge patent license to make, have made, use, offer to sell, -sell, import and otherwise transfer the Package with respect to any -patent claims licensable by the Copyright Holder that are necessarily -infringed by the Package. If you institute patent litigation -(including a cross-claim or counterclaim) against any party alleging -that the Package constitutes direct or contributory patent -infringement, then this Artistic License to you shall terminate on the -date that such litigation is filed. - -(14) Disclaimer of Warranty: -THE PACKAGE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS "AS -IS' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES. THE IMPLIED -WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR -NON-INFRINGEMENT ARE DISCLAIMED TO THE EXTENT PERMITTED BY YOUR LOCAL -LAW. UNLESS REQUIRED BY LAW, NO COPYRIGHT HOLDER OR CONTRIBUTOR WILL -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL -DAMAGES ARISING IN ANY WAY OUT OF THE USE OF THE PACKAGE, EVEN IF -ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - --------- diff --git a/deps/node/deps/npm/node_modules/gentle-fs/README.md b/deps/node/deps/npm/node_modules/gentle-fs/README.md deleted file mode 100644 index 54af51cf..00000000 --- a/deps/node/deps/npm/node_modules/gentle-fs/README.md +++ /dev/null @@ -1,74 +0,0 @@ -# gentle-fs [![npm version](https://img.shields.io/npm/v/gentle-fs.svg)](https://npm.im/gentle-fs) [![license](https://img.shields.io/npm/l/gentle-fs.svg)](https://npm.im/gentle-fs) [![Travis](https://img.shields.io/travis/npm/gentle-fs.svg)](https://travis-ci.org/npm/gentle-fs) [![AppVeyor](https://ci.appveyor.com/api/projects/status/github/npm/gentle-fs?svg=true)](https://ci.appveyor.com/project/npm/gentle-fs) [![Coverage Status](https://coveralls.io/repos/github/npm/gentle-fs/badge.svg?branch=latest)](https://coveralls.io/github/npm/gentle-fs?branch=latest) - -[`gentle-fs`](https://github.com/npm/gentle-fs) is a standalone library for -"gently" remove or link directories. - -## Install - -`$ npm install gentle-fs` - -## Table of Contents - -* [Example](#example) -* [Features](#features) -* [Contributing](#contributing) -* [API](#api) - * [`rm`](#rm) - * [`link`](#link) - * [`linkIfExists`](#linkIfExists) - -### Example - -```javascript -// todo -``` - -### Features - -* Performs filesystem operations "gently". Please see details in the API specs below -for a more precise definition of "gently". - -### Contributing - -The npm team enthusiastically welcomes contributions and project participation! -There's a bunch of things you can do if you want to contribute! The [Contributor -Guide](CONTRIBUTING.md) has all the information you need for everything from -reporting bugs to contributing entire new features. Please don't hesitate to -jump in if you'd like to, or even ask us questions if something isn't clear. - -### API - -#### <a name="rm"></a> `> rm(target, opts, cb)` - -Will delete all directories between `target` and `opts.base`, as long as they are empty. -That is, if `target` is `/a/b/c/d/e` and `base` is `/a/b`, but `/a/b/c` has other files -besides the `d` directory inside of it, `/a/b/c` will remain. - -##### Example - -```javascript -rm(target, opts, cb) -``` - -#### <a name="link"></a> `> link(from, to, opts, cb)` - -If `from` is a real directory, and `from` is not the same directory as `to`, will -symlink `from` to `to`, while also gently [`rm`](#rm)ing the `to` directory, -and then call the callback. Otherwise, will call callback with an `Error`. - -##### Example - -```javascript -link(from, to, opts, cb) -``` - -#### <a name="linkIfExists"></a> `> linkIfExists(from, to, opts, cb)` - -Performs the same operation as [`link`](#link), except does nothing when `from` is the -same as `to`, and calls the callback. - -##### Example - -```javascript -linkIfExists(from, to, opts, cb) -``` diff --git a/deps/node/deps/npm/node_modules/gentle-fs/index.js b/deps/node/deps/npm/node_modules/gentle-fs/index.js deleted file mode 100644 index 2828fdb2..00000000 --- a/deps/node/deps/npm/node_modules/gentle-fs/index.js +++ /dev/null @@ -1,10 +0,0 @@ -'use strict' - -const rm = require('./lib/rm.js') -const link = require('./lib/link.js') - -exports = module.exports = { - rm: rm, - link: link.link, - linkIfExists: link.linkIfExists -} diff --git a/deps/node/deps/npm/node_modules/gentle-fs/lib/link.js b/deps/node/deps/npm/node_modules/gentle-fs/lib/link.js deleted file mode 100644 index 246d8014..00000000 --- a/deps/node/deps/npm/node_modules/gentle-fs/lib/link.js +++ /dev/null @@ -1,66 +0,0 @@ -'use strict' - -const path = require('path') -const fs = require('graceful-fs') -const chain = require('slide').chain -const mkdir = require('mkdirp') -const rm = require('./rm.js') - -exports = module.exports = { - link: link, - linkIfExists: linkIfExists -} - -function linkIfExists (from, to, opts, cb) { - fs.stat(from, function (er) { - if (er) return cb() - fs.readlink(to, function (er, fromOnDisk) { - // if the link already exists and matches what we would do, - // we don't need to do anything - if (!er) { - var toDir = path.dirname(to) - var absoluteFrom = path.resolve(toDir, from) - var absoluteFromOnDisk = path.resolve(toDir, fromOnDisk) - if (absoluteFrom === absoluteFromOnDisk) return cb() - } - link(from, to, opts, cb) - }) - }) -} - -function resolveIfSymlink (maybeSymlinkPath, cb) { - fs.lstat(maybeSymlinkPath, function (err, stat) { - if (err) return cb.apply(this, arguments) - if (!stat.isSymbolicLink()) return cb(null, maybeSymlinkPath) - fs.readlink(maybeSymlinkPath, cb) - }) -} - -function ensureFromIsNotSource (from, to, cb) { - resolveIfSymlink(from, function (err, fromDestination) { - if (err) return cb.apply(this, arguments) - if (path.resolve(path.dirname(from), fromDestination) === path.resolve(to)) { - return cb(new Error('Link target resolves to the same directory as link source: ' + to)) - } - cb.apply(this, arguments) - }) -} - -function link (from, to, opts, cb) { - to = path.resolve(to) - opts.base = path.dirname(to) - var absTarget = path.resolve(opts.base, from) - var relativeTarget = path.relative(opts.base, absTarget) - var target = opts.absolute ? absTarget : relativeTarget - - chain( - [ - [ensureFromIsNotSource, absTarget, to], - [fs, 'stat', absTarget], - [rm, to, opts], - [mkdir, path.dirname(to)], - [fs, 'symlink', target, to, 'junction'] - ], - cb - ) -} diff --git a/deps/node/deps/npm/node_modules/gentle-fs/lib/rm.js b/deps/node/deps/npm/node_modules/gentle-fs/lib/rm.js deleted file mode 100644 index 00760c66..00000000 --- a/deps/node/deps/npm/node_modules/gentle-fs/lib/rm.js +++ /dev/null @@ -1,256 +0,0 @@ -'use strict' - -const path = require('path') -const validate = require('aproba') -const fs = require('graceful-fs') -const isInside = require('path-is-inside') -const vacuum = require('fs-vacuum') -const chain = require('slide').chain -const asyncMap = require('slide').asyncMap -const readCmdShim = require('read-cmd-shim') -const iferr = require('iferr') - -exports = module.exports = rm - -function rm (target, opts, cb) { - var targetPath = path.normalize(path.resolve(opts.prefix, target)) - if (opts.prefixes.indexOf(targetPath) !== -1) { - return cb(new Error('May not delete: ' + targetPath)) - } - var options = {} - if (opts.force) { options.purge = true } - if (opts.base) options.base = path.normalize(path.resolve(opts.prefix, opts.base)) - - if (!opts.gently) { - options.purge = true - return vacuum(targetPath, options, cb) - } - - var parent = options.base = options.base || path.normalize(opts.prefix) - - // Do all the async work we'll need to do in order to tell if this is a - // safe operation - chain([ - [isEverInside, parent, opts.prefixes, opts.log], - [readLinkOrShim, targetPath], - [isEverInside, targetPath, opts.prefixes, opts.log], - [isEverInside, targetPath, [parent], opts.log] - ], function (er, results) { - if (er) { - if (er.code === 'ENOENT') return cb() - return cb(er) - } - var parentInfo = { - path: parent, - managed: results[0] - } - var targetInfo = { - path: targetPath, - symlink: results[1], - managed: results[2], - inParent: results[3] - } - - isSafeToRm(parentInfo, targetInfo, opts.name, opts.log, iferr(cb, thenRemove)) - - function thenRemove (toRemove, removeBase) { - if (!toRemove) return cb() - if (removeBase) options.base = removeBase - return vacuum(toRemove, options, cb) - } - }) -} - -exports._isSafeToRm = isSafeToRm -function isSafeToRm (parent, target, pkgName, log, cb) { - log.silly('gentlyRm', 'parent.path =', parent.path) - log.silly('gentlyRm', 'parent.managed =', - parent.managed && parent.managed.target + ' is in ' + parent.managed.path) - log.silly('gentlyRm', 'target.path = ', target.path) - log.silly('gentlyRm', 'target.symlink =', target.symlink) - log.silly('gentlyRm', 'target.managed =', - target.managed && target.managed.target + ' is in ' + target.managed.path) - log.silly('gentlyRm', 'target.inParent = ', target.inParent) - - // The parent directory or something it symlinks to must eventually be in - // a folder that we maintain. - if (!parent.managed) { - log.info('gentlyRm', parent.path, - 'is not contained in any directory ' + pkgName + ' is known to control or ' + - 'any place they link to') - return cb(clobberFail(target.path, 'containing path ' + parent.path + - " isn't under " + pkgName + "'s control")) - } - - // The target or something it symlinks to must eventually be in the parent - // or something the parent symlinks to - if (target.inParent) { - var actualTarget = target.inParent.target - var targetsParent = target.inParent.path - // if the target.path was what we found in some version of parent, remove - // using that parent as the base - if (target.path === actualTarget) { - return cb(null, target.path, targetsParent) - } else { - // If something the target.path links to was what was found, just - // remove target.path in the location it was found. - return cb(null, target.path, path.dirname(target.path)) - } - } - - // If the target is in a managed directory and is in a symlink, but was - // not in our parent that usually means someone else installed a bin file - // with the same name as one of our bin files. - if (target.managed && target.symlink) { - log.warn('rm', 'not removing', target.path, - "as it wasn't installed by", parent.path) - return cb() - } - - if (target.symlink) { - return cb(clobberFail(target.path, target.symlink + - ' symlink target is not controlled by ' + pkgName + ' ' + parent.path)) - } else { - return cb(clobberFail(target.path, 'is outside ' + parent.path + - ' and not a link')) - } -} - -function clobberFail (target, msg) { - validate('SS', arguments) - var er = new Error('Refusing to delete ' + target + ': ' + msg) - er.code = 'EEXIST' - er.path = target - return er -} - -function isENOENT (err) { - return err && err.code === 'ENOENT' -} - -function notENOENT (err) { - return !isENOENT(err) -} - -function skipENOENT (cb) { - return function (err, value) { - if (isENOENT(err)) { - return cb(null, false) - } else { - return cb(err, value) - } - } -} - -function errorsToValues (fn) { - return function () { - var args = Array.prototype.slice.call(arguments) - var cb = args.pop() - args.push(function (err, value) { - if (err) { - return cb(null, err) - } else { - return cb(null, value) - } - }) - fn.apply(null, args) - } -} - -function isNotError (value) { - return !(value instanceof Error) -} - -exports._isEverInside = isEverInside -// return the first of path, where target (or anything it symlinks to) -// isInside the path (or anything it symlinks to) -function isEverInside (target, paths, log, cb) { - validate('SAOF', arguments) - asyncMap(paths, errorsToValues(readAllLinks), iferr(cb, function (resolvedPaths) { - var errorFree = resolvedPaths.filter(isNotError) - if (errorFree.length === 0) { - var badErrors = resolvedPaths.filter(notENOENT) - if (badErrors.length === 0) { - return cb(null, false) - } else { - return cb(badErrors[0]) - } - } - readAllLinks(target, iferr(skipENOENT(cb), function (targets) { - cb(null, areAnyInsideAny(targets, errorFree, log)) - })) - })) -} - -exports._areAnyInsideAny = areAnyInsideAny -// Return the first path found that any target is inside -function areAnyInsideAny (targets, paths, log) { - validate('AAO', arguments) - var toCheck = [] - paths.forEach(function (path) { - targets.forEach(function (target) { - toCheck.push([target, path]) - }) - }) - for (var ii = 0; ii < toCheck.length; ++ii) { - var target = toCheck[ii][0] - var path = toCheck[ii][1] - var inside = isInside(target, path) - if (!inside) log.silly('isEverInside', target, 'is not inside', path) - if (inside && path) return inside && path && {target: target, path: path} - } - return false -} - -exports._readAllLinks = readAllLinks -// resolves chains of symlinks of unlimited depth, returning a list of paths -// it's seen in the process when it hits either a symlink cycle or a -// non-symlink -function readAllLinks (path, cb) { - validate('SF', arguments) - var seen = {} - _readAllLinks(path) - - function _readAllLinks (path) { - if (seen[path]) return cb(null, Object.keys(seen)) - seen[path] = true - resolveSymlink(path, iferr(cb, _readAllLinks)) - } -} - -exports._resolveSymlink = resolveSymlink -var resolvedPaths = {} -function resolveSymlink (symlink, cb) { - validate('SF', arguments) - var cached = resolvedPaths[symlink] - if (cached) return cb(null, cached) - - readLinkOrShim(symlink, iferr(cb, function (symlinkTarget) { - if (symlinkTarget) { - resolvedPaths[symlink] = path.resolve(path.dirname(symlink), symlinkTarget) - } else { - resolvedPaths[symlink] = symlink - } - return cb(null, resolvedPaths[symlink]) - })) -} - -exports._readLinkOrShim = readLinkOrShim -function readLinkOrShim (path, cb) { - validate('SF', arguments) - fs.lstat(path, iferr(cb, function (stat) { - if (stat.isSymbolicLink()) { - fs.readlink(path, cb) - } else { - readCmdShim(path, function (er, source) { - if (!er) return cb(null, source) - // lstat wouldn't return an error on these, so we don't either. - if (er.code === 'ENOTASHIM' || er.code === 'EISDIR') { - return cb(null, null) - } else { - return cb(er) - } - }) - } - })) -} diff --git a/deps/node/deps/npm/node_modules/gentle-fs/node_modules/aproba/LICENSE b/deps/node/deps/npm/node_modules/gentle-fs/node_modules/aproba/LICENSE deleted file mode 100644 index 2a4982dc..00000000 --- a/deps/node/deps/npm/node_modules/gentle-fs/node_modules/aproba/LICENSE +++ /dev/null @@ -1,13 +0,0 @@ -Copyright (c) 2015, Rebecca Turner <me@re-becca.org> - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/deps/node/deps/npm/node_modules/gentle-fs/node_modules/aproba/README.md b/deps/node/deps/npm/node_modules/gentle-fs/node_modules/aproba/README.md deleted file mode 100644 index e9479920..00000000 --- a/deps/node/deps/npm/node_modules/gentle-fs/node_modules/aproba/README.md +++ /dev/null @@ -1,93 +0,0 @@ -aproba -====== - -A ridiculously light-weight function argument validator - -``` -var validate = require("aproba") - -function myfunc(a, b, c) { - // `a` must be a string, `b` a number, `c` a function - validate('SNF', arguments) // [a,b,c] is also valid -} - -myfunc('test', 23, function () {}) // ok -myfunc(123, 23, function () {}) // type error -myfunc('test', 23) // missing arg error -myfunc('test', 23, function () {}, true) // too many args error - -``` - -Valid types are: - -| type | description -| :--: | :---------- -| * | matches any type -| A | `Array.isArray` OR an `arguments` object -| S | typeof == string -| N | typeof == number -| F | typeof == function -| O | typeof == object and not type A and not type E -| B | typeof == boolean -| E | `instanceof Error` OR `null` **(special: see below)** -| Z | == `null` - -Validation failures throw one of three exception types, distinguished by a -`code` property of `EMISSINGARG`, `EINVALIDTYPE` or `ETOOMANYARGS`. - -If you pass in an invalid type then it will throw with a code of -`EUNKNOWNTYPE`. - -If an **error** argument is found and is not null then the remaining -arguments are optional. That is, if you say `ESO` then that's like using a -non-magical `E` in: `E|ESO|ZSO`. - -### But I have optional arguments?! - -You can provide more than one signature by separating them with pipes `|`. -If any signature matches the arguments then they'll be considered valid. - -So for example, say you wanted to write a signature for -`fs.createWriteStream`. The docs for it describe it thusly: - -``` -fs.createWriteStream(path[, options]) -``` - -This would be a signature of `SO|S`. That is, a string and and object, or -just a string. - -Now, if you read the full `fs` docs, you'll see that actually path can ALSO -be a buffer. And options can be a string, that is: -``` -path <String> | <Buffer> -options <String> | <Object> -``` - -To reproduce this you have to fully enumerate all of the possible -combinations and that implies a signature of `SO|SS|OO|OS|S|O`. The -awkwardness is a feature: It reminds you of the complexity you're adding to -your API when you do this sort of thing. - - -### Browser support - -This has no dependencies and should work in browsers, though you'll have -noisier stack traces. - -### Why this exists - -I wanted a very simple argument validator. It needed to do two things: - -1. Be more concise and easier to use than assertions - -2. Not encourage an infinite bikeshed of DSLs - -This is why types are specified by a single character and there's no such -thing as an optional argument. - -This is not intended to validate user data. This is specifically about -asserting the interface of your functions. - -If you need greater validation, I encourage you to write them by hand or -look elsewhere. diff --git a/deps/node/deps/npm/node_modules/gentle-fs/node_modules/aproba/index.js b/deps/node/deps/npm/node_modules/gentle-fs/node_modules/aproba/index.js deleted file mode 100644 index 6f3f797c..00000000 --- a/deps/node/deps/npm/node_modules/gentle-fs/node_modules/aproba/index.js +++ /dev/null @@ -1,105 +0,0 @@ -'use strict' - -function isArguments (thingy) { - return thingy != null && typeof thingy === 'object' && thingy.hasOwnProperty('callee') -} - -var types = { - '*': {label: 'any', check: function () { return true }}, - A: {label: 'array', check: function (thingy) { return Array.isArray(thingy) || isArguments(thingy) }}, - S: {label: 'string', check: function (thingy) { return typeof thingy === 'string' }}, - N: {label: 'number', check: function (thingy) { return typeof thingy === 'number' }}, - F: {label: 'function', check: function (thingy) { return typeof thingy === 'function' }}, - O: {label: 'object', check: function (thingy) { return typeof thingy === 'object' && thingy != null && !types.A.check(thingy) && !types.E.check(thingy) }}, - B: {label: 'boolean', check: function (thingy) { return typeof thingy === 'boolean' }}, - E: {label: 'error', check: function (thingy) { return thingy instanceof Error }}, - Z: {label: 'null', check: function (thingy) { return thingy == null }} -} - -function addSchema (schema, arity) { - var group = arity[schema.length] = arity[schema.length] || [] - if (group.indexOf(schema) === -1) group.push(schema) -} - -var validate = module.exports = function (rawSchemas, args) { - if (arguments.length !== 2) throw wrongNumberOfArgs(['SA'], arguments.length) - if (!rawSchemas) throw missingRequiredArg(0, 'rawSchemas') - if (!args) throw missingRequiredArg(1, 'args') - if (!types.S.check(rawSchemas)) throw invalidType(0, ['string'], rawSchemas) - if (!types.A.check(args)) throw invalidType(1, ['array'], args) - var schemas = rawSchemas.split('|') - var arity = {} - - schemas.forEach(function (schema) { - for (var ii = 0; ii < schema.length; ++ii) { - var type = schema[ii] - if (!types[type]) throw unknownType(ii, type) - } - if (/E.*E/.test(schema)) throw moreThanOneError(schema) - addSchema(schema, arity) - if (/E/.test(schema)) { - addSchema(schema.replace(/E.*$/, 'E'), arity) - addSchema(schema.replace(/E/, 'Z'), arity) - if (schema.length === 1) addSchema('', arity) - } - }) - var matching = arity[args.length] - if (!matching) { - throw wrongNumberOfArgs(Object.keys(arity), args.length) - } - for (var ii = 0; ii < args.length; ++ii) { - var newMatching = matching.filter(function (schema) { - var type = schema[ii] - var typeCheck = types[type].check - return typeCheck(args[ii]) - }) - if (!newMatching.length) { - var labels = matching.map(function (schema) { - return types[schema[ii]].label - }).filter(function (schema) { return schema != null }) - throw invalidType(ii, labels, args[ii]) - } - matching = newMatching - } -} - -function missingRequiredArg (num) { - return newException('EMISSINGARG', 'Missing required argument #' + (num + 1)) -} - -function unknownType (num, type) { - return newException('EUNKNOWNTYPE', 'Unknown type ' + type + ' in argument #' + (num + 1)) -} - -function invalidType (num, expectedTypes, value) { - var valueType - Object.keys(types).forEach(function (typeCode) { - if (types[typeCode].check(value)) valueType = types[typeCode].label - }) - return newException('EINVALIDTYPE', 'Argument #' + (num + 1) + ': Expected ' + - englishList(expectedTypes) + ' but got ' + valueType) -} - -function englishList (list) { - return list.join(', ').replace(/, ([^,]+)$/, ' or $1') -} - -function wrongNumberOfArgs (expected, got) { - var english = englishList(expected) - var args = expected.every(function (ex) { return ex.length === 1 }) - ? 'argument' - : 'arguments' - return newException('EWRONGARGCOUNT', 'Expected ' + english + ' ' + args + ' but got ' + got) -} - -function moreThanOneError (schema) { - return newException('ETOOMANYERRORTYPES', - 'Only one error type per argument signature is allowed, more than one found in "' + schema + '"') -} - -function newException (code, msg) { - var e = new Error(msg) - e.code = code - if (Error.captureStackTrace) Error.captureStackTrace(e, validate) - return e -} diff --git a/deps/node/deps/npm/node_modules/gentle-fs/node_modules/aproba/package.json b/deps/node/deps/npm/node_modules/gentle-fs/node_modules/aproba/package.json deleted file mode 100644 index 34b51a0d..00000000 --- a/deps/node/deps/npm/node_modules/gentle-fs/node_modules/aproba/package.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "_from": "aproba@^1.1.2", - "_id": "aproba@1.2.0", - "_inBundle": false, - "_integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==", - "_location": "/gentle-fs/aproba", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "aproba@^1.1.2", - "name": "aproba", - "escapedName": "aproba", - "rawSpec": "^1.1.2", - "saveSpec": null, - "fetchSpec": "^1.1.2" - }, - "_requiredBy": [ - "/gentle-fs" - ], - "_resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", - "_shasum": "6802e6264efd18c790a1b0d517f0f2627bf2c94a", - "_spec": "aproba@^1.1.2", - "_where": "/Users/aeschright/code/cli/node_modules/gentle-fs", - "author": { - "name": "Rebecca Turner", - "email": "me@re-becca.org" - }, - "bugs": { - "url": "https://github.com/iarna/aproba/issues" - }, - "bundleDependencies": false, - "dependencies": {}, - "deprecated": false, - "description": "A ridiculously light-weight argument validator (now browser friendly)", - "devDependencies": { - "standard": "^10.0.3", - "tap": "^10.0.2" - }, - "directories": { - "test": "test" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/iarna/aproba", - "keywords": [ - "argument", - "validate" - ], - "license": "ISC", - "main": "index.js", - "name": "aproba", - "repository": { - "type": "git", - "url": "git+https://github.com/iarna/aproba.git" - }, - "scripts": { - "test": "standard && tap -j3 test/*.js" - }, - "version": "1.2.0" -} diff --git a/deps/node/deps/npm/node_modules/gentle-fs/node_modules/iferr/.npmignore b/deps/node/deps/npm/node_modules/gentle-fs/node_modules/iferr/.npmignore deleted file mode 100644 index 3c3629e6..00000000 --- a/deps/node/deps/npm/node_modules/gentle-fs/node_modules/iferr/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules diff --git a/deps/node/deps/npm/node_modules/gentle-fs/node_modules/iferr/LICENSE b/deps/node/deps/npm/node_modules/gentle-fs/node_modules/iferr/LICENSE deleted file mode 100644 index 19d5f4bc..00000000 --- a/deps/node/deps/npm/node_modules/gentle-fs/node_modules/iferr/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 Nadav Ivgi - -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.
\ No newline at end of file diff --git a/deps/node/deps/npm/node_modules/gentle-fs/node_modules/iferr/README.md b/deps/node/deps/npm/node_modules/gentle-fs/node_modules/iferr/README.md deleted file mode 100644 index 0940763f..00000000 --- a/deps/node/deps/npm/node_modules/gentle-fs/node_modules/iferr/README.md +++ /dev/null @@ -1,40 +0,0 @@ -# iferr - -Higher-order functions for easier error handling. - -`if (err) return cb(err);` be gone! - -## Install -```bash -npm install iferr -``` - -## Use - -### JavaScript example -```js -var iferr = require('iferr'); - -function get_friends_count(id, cb) { - User.load_user(id, iferr(cb, function(user) { - user.load_friends(iferr(cb, function(friends) { - cb(null, friends.length); - })); - })); -} -``` - -### CoffeeScript example -```coffee -iferr = require 'iferr' - -get_friends_count = (id, cb) -> - User.load_user id, iferr cb, (user) -> - user.load_friends iferr cb, (friends) -> - cb null, friends.length -``` - -(TODO: document tiferr, throwerr and printerr) - -## License -MIT diff --git a/deps/node/deps/npm/node_modules/gentle-fs/node_modules/iferr/index.coffee b/deps/node/deps/npm/node_modules/gentle-fs/node_modules/iferr/index.coffee deleted file mode 100644 index da6d0071..00000000 --- a/deps/node/deps/npm/node_modules/gentle-fs/node_modules/iferr/index.coffee +++ /dev/null @@ -1,24 +0,0 @@ -# Delegates to `succ` on sucecss or to `fail` on error -# ex: Thing.load 123, iferr cb, (thing) -> ... -iferr = (fail, succ) -> (err, a...) -> - if err? then fail err - else succ? a... - -# Like iferr, but also catches errors thrown from `succ` and passes to `fail` -tiferr = (fail, succ) -> iferr fail, (a...) -> - try succ a... - catch err then fail err - -# Delegate to the success function on success, or throw the error otherwise -# ex: Thing.load 123, throwerr (thing) -> ... -throwerr = iferr.bind null, (err) -> throw err - -# Prints errors when one is passed, or does nothing otherwise -# ex: thing.save printerr -printerr = iferr (err) -> console.error err.stack or err - -module.exports = exports = iferr -exports.iferr = iferr -exports.tiferr = tiferr -exports.throwerr = throwerr -exports.printerr = printerr diff --git a/deps/node/deps/npm/node_modules/gentle-fs/node_modules/iferr/index.js b/deps/node/deps/npm/node_modules/gentle-fs/node_modules/iferr/index.js deleted file mode 100644 index 78fce3d2..00000000 --- a/deps/node/deps/npm/node_modules/gentle-fs/node_modules/iferr/index.js +++ /dev/null @@ -1,49 +0,0 @@ -// Generated by CoffeeScript 1.7.1 -(function() { - var exports, iferr, printerr, throwerr, tiferr, - __slice = [].slice; - - iferr = function(fail, succ) { - return function() { - var a, err; - err = arguments[0], a = 2 <= arguments.length ? __slice.call(arguments, 1) : []; - if (err != null) { - return fail(err); - } else { - return typeof succ === "function" ? succ.apply(null, a) : void 0; - } - }; - }; - - tiferr = function(fail, succ) { - return iferr(fail, function() { - var a, err; - a = 1 <= arguments.length ? __slice.call(arguments, 0) : []; - try { - return succ.apply(null, a); - } catch (_error) { - err = _error; - return fail(err); - } - }); - }; - - throwerr = iferr.bind(null, function(err) { - throw err; - }); - - printerr = iferr(function(err) { - return console.error(err.stack || err); - }); - - module.exports = exports = iferr; - - exports.iferr = iferr; - - exports.tiferr = tiferr; - - exports.throwerr = throwerr; - - exports.printerr = printerr; - -}).call(this); diff --git a/deps/node/deps/npm/node_modules/gentle-fs/node_modules/iferr/package.json b/deps/node/deps/npm/node_modules/gentle-fs/node_modules/iferr/package.json deleted file mode 100644 index fcddb232..00000000 --- a/deps/node/deps/npm/node_modules/gentle-fs/node_modules/iferr/package.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "_from": "iferr@^0.1.5", - "_id": "iferr@0.1.5", - "_inBundle": false, - "_integrity": "sha1-xg7taebY/bazEEofy8ocGS3FtQE=", - "_location": "/gentle-fs/iferr", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "iferr@^0.1.5", - "name": "iferr", - "escapedName": "iferr", - "rawSpec": "^0.1.5", - "saveSpec": null, - "fetchSpec": "^0.1.5" - }, - "_requiredBy": [ - "/gentle-fs" - ], - "_resolved": "https://registry.npmjs.org/iferr/-/iferr-0.1.5.tgz", - "_shasum": "c60eed69e6d8fdb6b3104a1fcbca1c192dc5b501", - "_spec": "iferr@^0.1.5", - "_where": "/Users/rebecca/code/npm/node_modules/gentle-fs", - "author": { - "name": "Nadav Ivgi" - }, - "bugs": { - "url": "https://github.com/shesek/iferr/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "Higher-order functions for easier error handling", - "devDependencies": { - "coffee-script": "^1.7.1", - "mocha": "^1.18.2" - }, - "homepage": "https://github.com/shesek/iferr", - "keywords": [ - "error", - "errors" - ], - "license": "MIT", - "main": "index.js", - "name": "iferr", - "repository": { - "type": "git", - "url": "git+https://github.com/shesek/iferr.git" - }, - "scripts": { - "prepublish": "coffee -c index.coffee", - "test": "mocha" - }, - "version": "0.1.5" -} diff --git a/deps/node/deps/npm/node_modules/gentle-fs/node_modules/iferr/test/index.coffee b/deps/node/deps/npm/node_modules/gentle-fs/node_modules/iferr/test/index.coffee deleted file mode 100644 index be0bc56f..00000000 --- a/deps/node/deps/npm/node_modules/gentle-fs/node_modules/iferr/test/index.coffee +++ /dev/null @@ -1,42 +0,0 @@ -{ iferr, tiferr, throwerr } = require '../index.coffee' -{ equal: eq, throws } = require 'assert' - -invoke_fail = (cb) -> cb new Error 'callback error' -invoke_succ = (cb) -> cb null -throw_error = -> throw new Error 'thrown' - -describe 'iferr', -> - it 'calls the error callback on errors', (done) -> - invoke_fail iferr( - (err) -> - eq err.message, 'callback error' - do done - -> - done new Error 'shouldn\'t call the success callback' - ) - - it 'calls the success callback on success', (done) -> - invoke_succ iferr( - -> done new Error 'shouldn\'t call the error callback' - done - ) - -describe 'tiferr', -> - it 'catches errors in the success callback', (done) -> - invoke_succ tiferr( - (err) -> - eq err.message, 'thrown' - do done - throw_error - ) - -describe 'throwerr', -> - it 'throws errors passed to the callback', (done)-> - try invoke_fail throwerr -> - done 'shouldn\'t call the success callback' - catch err - eq err.message, 'callback error' - do done - - it 'delegates to the success callback otherwise', (done) -> - invoke_succ throwerr done diff --git a/deps/node/deps/npm/node_modules/gentle-fs/node_modules/iferr/test/mocha.opts b/deps/node/deps/npm/node_modules/gentle-fs/node_modules/iferr/test/mocha.opts deleted file mode 100644 index 019defcf..00000000 --- a/deps/node/deps/npm/node_modules/gentle-fs/node_modules/iferr/test/mocha.opts +++ /dev/null @@ -1,2 +0,0 @@ ---compilers coffee:coffee-script/register ---reporter spec diff --git a/deps/node/deps/npm/node_modules/gentle-fs/package.json b/deps/node/deps/npm/node_modules/gentle-fs/package.json deleted file mode 100644 index 55bc6bd4..00000000 --- a/deps/node/deps/npm/node_modules/gentle-fs/package.json +++ /dev/null @@ -1,85 +0,0 @@ -{ - "_args": [ - [ - "gentle-fs@2.0.1", - "/Users/rebecca/code/npm" - ] - ], - "_from": "gentle-fs@2.0.1", - "_id": "gentle-fs@2.0.1", - "_inBundle": false, - "_integrity": "sha512-cEng5+3fuARewXktTEGbwsktcldA+YsnUEaXZwcK/3pjSE1X9ObnTs+/8rYf8s+RnIcQm2D5x3rwpN7Zom8Bew==", - "_location": "/gentle-fs", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "gentle-fs@2.0.1", - "name": "gentle-fs", - "escapedName": "gentle-fs", - "rawSpec": "2.0.1", - "saveSpec": null, - "fetchSpec": "2.0.1" - }, - "_requiredBy": [ - "/", - "/bin-links" - ], - "_resolved": "https://registry.npmjs.org/gentle-fs/-/gentle-fs-2.0.1.tgz", - "_spec": "2.0.1", - "_where": "/Users/rebecca/code/npm", - "author": { - "name": "Mike Sherov" - }, - "bugs": { - "url": "https://github.com/npm/gentle-fs/issues" - }, - "dependencies": { - "aproba": "^1.1.2", - "fs-vacuum": "^1.2.10", - "graceful-fs": "^4.1.11", - "iferr": "^0.1.5", - "mkdirp": "^0.5.1", - "path-is-inside": "^1.0.2", - "read-cmd-shim": "^1.0.1", - "slide": "^1.1.6" - }, - "description": "Gentle Filesystem operations", - "devDependencies": { - "dezalgo": "^1.0.3", - "nyc": "^11.1.0", - "require-inject": "^1.4.2", - "standard": "^10.0.3", - "standard-version": "^4.2.0", - "tap": "^10.7.2", - "weallbehave": "^1.2.0", - "weallcontribute": "^1.0.8" - }, - "files": [ - "index.js", - "lib" - ], - "homepage": "https://github.com/npm/gentle-fs#readme", - "keywords": [ - "npm", - "gentle", - "fs" - ], - "license": "Artistic-2.0", - "main": "index.js", - "name": "gentle-fs", - "repository": { - "type": "git", - "url": "git://github.com/npm/gentle-fs.git" - }, - "scripts": { - "postrelease": "npm publish && git push --follow-tags", - "prerelease": "npm t", - "pretest": "standard", - "release": "standard-version -s", - "test": "tap -J --nyc-arg=--all --coverage test/*.js test/**/*.js", - "update-coc": "weallbehave -o . && git add CODE_OF_CONDUCT.md && git commit -m 'docs(coc): updated CODE_OF_CONDUCT.md'", - "update-contrib": "weallcontribute -o . && git add CONTRIBUTING.md && git commit -m 'docs(contributing): updated CONTRIBUTING.md'" - }, - "version": "2.0.1" -} |