aboutsummaryrefslogtreecommitdiff
path: root/node_modules/globby
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2016-10-10 03:43:44 +0200
committerFlorian Dold <florian.dold@gmail.com>2016-10-10 03:43:44 +0200
commitabd94a7f5a50f43c797a11b53549ae48fff667c3 (patch)
treeab8ed457f65cdd72e13e0571d2975729428f1551 /node_modules/globby
parenta0247c6a3fd6a09a41a7e35a3441324c4dcb58be (diff)
downloadwallet-core-abd94a7f5a50f43c797a11b53549ae48fff667c3.tar.xz
add node_modules to address #4364
Diffstat (limited to 'node_modules/globby')
-rw-r--r--node_modules/globby/index.js65
-rw-r--r--node_modules/globby/license21
-rw-r--r--node_modules/globby/package.json145
-rw-r--r--node_modules/globby/readme.md82
4 files changed, 313 insertions, 0 deletions
diff --git a/node_modules/globby/index.js b/node_modules/globby/index.js
new file mode 100644
index 000000000..39da9f64d
--- /dev/null
+++ b/node_modules/globby/index.js
@@ -0,0 +1,65 @@
+'use strict';
+var Promise = require('pinkie-promise');
+var arrayUnion = require('array-union');
+var objectAssign = require('object-assign');
+var glob = require('glob');
+var arrify = require('arrify');
+var pify = require('pify');
+
+var globP = pify(glob, Promise).bind(glob);
+
+function isNegative(pattern) {
+ return pattern[0] === '!';
+}
+
+function generateGlobTasks(patterns, opts) {
+ var globTasks = [];
+
+ patterns = arrify(patterns);
+ opts = objectAssign({
+ cache: Object.create(null),
+ statCache: Object.create(null),
+ realpathCache: Object.create(null),
+ symlinks: Object.create(null),
+ ignore: []
+ }, opts);
+
+ patterns.forEach(function (pattern, i) {
+ if (isNegative(pattern)) {
+ return;
+ }
+
+ var ignore = patterns.slice(i).filter(isNegative).map(function (pattern) {
+ return pattern.slice(1);
+ });
+
+ globTasks.push({
+ pattern: pattern,
+ opts: objectAssign({}, opts, {
+ ignore: opts.ignore.concat(ignore)
+ })
+ });
+ });
+
+ return globTasks;
+}
+
+module.exports = function (patterns, opts) {
+ var globTasks = generateGlobTasks(patterns, opts);
+
+ return Promise.all(globTasks.map(function (task) {
+ return globP(task.pattern, task.opts);
+ })).then(function (paths) {
+ return arrayUnion.apply(null, paths);
+ });
+};
+
+module.exports.sync = function (patterns, opts) {
+ var globTasks = generateGlobTasks(patterns, opts);
+
+ return globTasks.reduce(function (matches, task) {
+ return arrayUnion(matches, glob.sync(task.pattern, task.opts));
+ }, []);
+};
+
+module.exports.generateGlobTasks = generateGlobTasks;
diff --git a/node_modules/globby/license b/node_modules/globby/license
new file mode 100644
index 000000000..654d0bfe9
--- /dev/null
+++ b/node_modules/globby/license
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/node_modules/globby/package.json b/node_modules/globby/package.json
new file mode 100644
index 000000000..f14830748
--- /dev/null
+++ b/node_modules/globby/package.json
@@ -0,0 +1,145 @@
+{
+ "_args": [
+ [
+ {
+ "raw": "globby@^5.0.0",
+ "scope": null,
+ "escapedName": "globby",
+ "name": "globby",
+ "rawSpec": "^5.0.0",
+ "spec": ">=5.0.0 <6.0.0",
+ "type": "range"
+ },
+ "/home/dold/repos/taler/wallet-webex/node_modules/del"
+ ]
+ ],
+ "_from": "globby@>=5.0.0 <6.0.0",
+ "_id": "globby@5.0.0",
+ "_inCache": true,
+ "_location": "/globby",
+ "_nodeVersion": "5.11.0",
+ "_npmOperationalInternal": {
+ "host": "packages-12-west.internal.npmjs.com",
+ "tmp": "tmp/globby-5.0.0.tgz_1465626598422_0.48254713881760836"
+ },
+ "_npmUser": {
+ "name": "ult_combo",
+ "email": "ult_combo@hotmail.com"
+ },
+ "_npmVersion": "3.7.5",
+ "_phantomChildren": {},
+ "_requested": {
+ "raw": "globby@^5.0.0",
+ "scope": null,
+ "escapedName": "globby",
+ "name": "globby",
+ "rawSpec": "^5.0.0",
+ "spec": ">=5.0.0 <6.0.0",
+ "type": "range"
+ },
+ "_requiredBy": [
+ "/del"
+ ],
+ "_resolved": "https://registry.npmjs.org/globby/-/globby-5.0.0.tgz",
+ "_shasum": "ebd84667ca0dbb330b99bcfc68eac2bc54370e0d",
+ "_shrinkwrap": null,
+ "_spec": "globby@^5.0.0",
+ "_where": "/home/dold/repos/taler/wallet-webex/node_modules/del",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "bugs": {
+ "url": "https://github.com/sindresorhus/globby/issues"
+ },
+ "dependencies": {
+ "array-union": "^1.0.1",
+ "arrify": "^1.0.0",
+ "glob": "^7.0.3",
+ "object-assign": "^4.0.1",
+ "pify": "^2.0.0",
+ "pinkie-promise": "^2.0.0"
+ },
+ "description": "Extends `glob` with support for multiple patterns and exposes a Promise API",
+ "devDependencies": {
+ "ava": "*",
+ "glob-stream": "github:wearefractal/glob-stream#master",
+ "globby": "github:sindresorhus/globby#master",
+ "matcha": "^0.7.0",
+ "rimraf": "^2.2.8",
+ "xo": "*"
+ },
+ "directories": {},
+ "dist": {
+ "shasum": "ebd84667ca0dbb330b99bcfc68eac2bc54370e0d",
+ "tarball": "https://registry.npmjs.org/globby/-/globby-5.0.0.tgz"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "files": [
+ "index.js"
+ ],
+ "gitHead": "2cb6d1f112407b3eca42ac87c810e7715189e708",
+ "homepage": "https://github.com/sindresorhus/globby#readme",
+ "keywords": [
+ "all",
+ "array",
+ "directories",
+ "dirs",
+ "expand",
+ "files",
+ "filesystem",
+ "filter",
+ "find",
+ "fnmatch",
+ "folders",
+ "fs",
+ "glob",
+ "globbing",
+ "globs",
+ "gulpfriendly",
+ "match",
+ "matcher",
+ "minimatch",
+ "multi",
+ "multiple",
+ "paths",
+ "pattern",
+ "patterns",
+ "traverse",
+ "util",
+ "utility",
+ "wildcard",
+ "wildcards",
+ "promise"
+ ],
+ "license": "MIT",
+ "maintainers": [
+ {
+ "name": "schnittstabil",
+ "email": "michael@schnittstabil.de"
+ },
+ {
+ "name": "sindresorhus",
+ "email": "sindresorhus@gmail.com"
+ },
+ {
+ "name": "ult_combo",
+ "email": "ultcombo@gmail.com"
+ }
+ ],
+ "name": "globby",
+ "optionalDependencies": {},
+ "readme": "ERROR: No README data found!",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/sindresorhus/globby.git"
+ },
+ "scripts": {
+ "bench": "npm update globby glob-stream && matcha bench.js",
+ "test": "xo && ava"
+ },
+ "version": "5.0.0"
+}
diff --git a/node_modules/globby/readme.md b/node_modules/globby/readme.md
new file mode 100644
index 000000000..aad991d02
--- /dev/null
+++ b/node_modules/globby/readme.md
@@ -0,0 +1,82 @@
+# globby [![Build Status](https://travis-ci.org/sindresorhus/globby.svg?branch=master)](https://travis-ci.org/sindresorhus/globby)
+
+> Extends [glob](https://github.com/isaacs/node-glob) with support for multiple patterns and exposes a Promise API
+
+
+## Install
+
+```
+$ npm install --save globby
+```
+
+
+## Usage
+
+```
+├── unicorn
+├── cake
+└── rainbow
+```
+
+```js
+const globby = require('globby');
+
+globby(['*', '!cake']).then(paths => {
+ console.log(paths);
+ //=> ['unicorn', 'rainbow']
+});
+```
+
+
+## API
+
+### globby(patterns, [options])
+
+Returns a Promise for an array of matching paths.
+
+### globby.sync(patterns, [options])
+
+Returns an array of matching paths.
+
+### globby.generateGlobTasks(patterns, [options])
+
+Returns an array of objects in the format `{ pattern: string, opts: Object }`, which can be passed as arguments to [`node-glob`](https://github.com/isaacs/node-glob). This is useful for other globbing-related packages.
+
+Note that you should avoid running the same tasks multiple times as they contain a file system cache. Instead, create a new tasks list to ensure that file system changes are taken in consideration.
+
+#### patterns
+
+Type: `string`, `Array`
+
+See supported `minimatch` [patterns](https://github.com/isaacs/minimatch#usage).
+
+#### options
+
+Type: `Object`
+
+See the `node-glob` [options](https://github.com/isaacs/node-glob#options).
+
+
+## Globbing patterns
+
+Just a quick overview.
+
+- `*` matches any number of characters, but not `/`
+- `?` matches a single character, but not `/`
+- `**` matches any number of characters, including `/`, as long as it's the only thing in a path part
+- `{}` allows for a comma-separated list of "or" expressions
+- `!` at the beginning of a pattern will negate the match
+
+[Various patterns and expected matches.](https://github.com/sindresorhus/multimatch/blob/master/test.js)
+
+
+## Related
+
+- [multimatch](https://github.com/sindresorhus/multimatch) - Match against a list instead of the filesystem
+- [glob-stream](https://github.com/wearefractal/glob-stream) - Streaming alternative
+- [matcher](https://github.com/sindresorhus/matcher) - Simple wildcard matching
+
+
+## License
+
+MIT © [Sindre Sorhus](https://sindresorhus.com)