aboutsummaryrefslogtreecommitdiff
path: root/node_modules/globule
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/globule
parenta0247c6a3fd6a09a41a7e35a3441324c4dcb58be (diff)
downloadwallet-core-abd94a7f5a50f43c797a11b53549ae48fff667c3.tar.xz
add node_modules to address #4364
Diffstat (limited to 'node_modules/globule')
-rw-r--r--node_modules/globule/.jshintrc15
-rw-r--r--node_modules/globule/.npmignore1
-rw-r--r--node_modules/globule/.travis.yml6
-rw-r--r--node_modules/globule/Gruntfile.js48
-rw-r--r--node_modules/globule/LICENSE-MIT22
-rw-r--r--node_modules/globule/README.md117
-rw-r--r--node_modules/globule/lib/globule.js172
-rw-r--r--node_modules/globule/node_modules/glob/.npmignore2
-rw-r--r--node_modules/globule/node_modules/glob/.travis.yml3
-rw-r--r--node_modules/globule/node_modules/glob/LICENSE27
-rw-r--r--node_modules/globule/node_modules/glob/README.md233
-rw-r--r--node_modules/globule/node_modules/glob/examples/g.js9
-rw-r--r--node_modules/globule/node_modules/glob/examples/usr-local.js9
-rw-r--r--node_modules/globule/node_modules/glob/glob.js643
-rw-r--r--node_modules/globule/node_modules/glob/package.json90
-rw-r--r--node_modules/globule/node_modules/glob/test/00-setup.js176
-rw-r--r--node_modules/globule/node_modules/glob/test/bash-comparison.js63
-rw-r--r--node_modules/globule/node_modules/glob/test/bash-results.json348
-rw-r--r--node_modules/globule/node_modules/glob/test/cwd-test.js55
-rw-r--r--node_modules/globule/node_modules/glob/test/mark.js74
-rw-r--r--node_modules/globule/node_modules/glob/test/nocase-nomagic.js113
-rw-r--r--node_modules/globule/node_modules/glob/test/pause-resume.js73
-rw-r--r--node_modules/globule/node_modules/glob/test/root-nomount.js39
-rw-r--r--node_modules/globule/node_modules/glob/test/root.js46
-rw-r--r--node_modules/globule/node_modules/glob/test/zz-cleanup.js11
-rw-r--r--node_modules/globule/node_modules/graceful-fs/.npmignore1
-rw-r--r--node_modules/globule/node_modules/graceful-fs/LICENSE27
-rw-r--r--node_modules/globule/node_modules/graceful-fs/README.md33
-rw-r--r--node_modules/globule/node_modules/graceful-fs/graceful-fs.js442
-rw-r--r--node_modules/globule/node_modules/graceful-fs/package.json101
-rw-r--r--node_modules/globule/node_modules/graceful-fs/test/open.js46
-rw-r--r--node_modules/globule/node_modules/graceful-fs/test/ulimit.js158
-rw-r--r--node_modules/globule/node_modules/inherits/LICENSE16
-rw-r--r--node_modules/globule/node_modules/inherits/README.md51
-rw-r--r--node_modules/globule/node_modules/inherits/inherits.js29
-rw-r--r--node_modules/globule/node_modules/inherits/package.json84
-rw-r--r--node_modules/globule/node_modules/minimatch/.npmignore1
-rw-r--r--node_modules/globule/node_modules/minimatch/LICENSE23
-rw-r--r--node_modules/globule/node_modules/minimatch/README.md218
-rw-r--r--node_modules/globule/node_modules/minimatch/minimatch.js1055
-rw-r--r--node_modules/globule/node_modules/minimatch/package.json92
-rw-r--r--node_modules/globule/node_modules/minimatch/test/basic.js399
-rw-r--r--node_modules/globule/node_modules/minimatch/test/brace-expand.js33
-rw-r--r--node_modules/globule/node_modules/minimatch/test/caching.js14
-rw-r--r--node_modules/globule/node_modules/minimatch/test/defaults.js274
-rw-r--r--node_modules/globule/node_modules/minimatch/test/extglob-ending-with-state-char.js8
-rw-r--r--node_modules/globule/package.json109
-rw-r--r--node_modules/globule/test/fixtures/expand/README.md0
-rw-r--r--node_modules/globule/test/fixtures/expand/css/baz.css0
-rw-r--r--node_modules/globule/test/fixtures/expand/css/qux.css0
-rw-r--r--node_modules/globule/test/fixtures/expand/deep/deep.txt0
-rw-r--r--node_modules/globule/test/fixtures/expand/deep/deeper/deeper.txt0
-rw-r--r--node_modules/globule/test/fixtures/expand/deep/deeper/deepest/deepest.txt0
-rw-r--r--node_modules/globule/test/fixtures/expand/js/bar.js0
-rw-r--r--node_modules/globule/test/fixtures/expand/js/foo.js0
-rw-r--r--node_modules/globule/test/globule_test.js486
56 files changed, 6095 insertions, 0 deletions
diff --git a/node_modules/globule/.jshintrc b/node_modules/globule/.jshintrc
new file mode 100644
index 000000000..2c40c4443
--- /dev/null
+++ b/node_modules/globule/.jshintrc
@@ -0,0 +1,15 @@
+{
+ "curly": true,
+ "eqeqeq": true,
+ "immed": true,
+ "latedef": true,
+ "newcap": true,
+ "noarg": true,
+ "sub": true,
+ "undef": true,
+ "unused": true,
+ "boss": true,
+ "eqnull": true,
+ "node": true,
+ "es5": true
+}
diff --git a/node_modules/globule/.npmignore b/node_modules/globule/.npmignore
new file mode 100644
index 000000000..2ccbe4656
--- /dev/null
+++ b/node_modules/globule/.npmignore
@@ -0,0 +1 @@
+/node_modules/
diff --git a/node_modules/globule/.travis.yml b/node_modules/globule/.travis.yml
new file mode 100644
index 000000000..cbace30bb
--- /dev/null
+++ b/node_modules/globule/.travis.yml
@@ -0,0 +1,6 @@
+language: node_js
+node_js:
+ - "0.8"
+ - "0.10"
+before_script:
+ - npm install -g grunt-cli
diff --git a/node_modules/globule/Gruntfile.js b/node_modules/globule/Gruntfile.js
new file mode 100644
index 000000000..c3f7d7466
--- /dev/null
+++ b/node_modules/globule/Gruntfile.js
@@ -0,0 +1,48 @@
+'use strict';
+
+module.exports = function(grunt) {
+
+ // Project configuration.
+ grunt.initConfig({
+ nodeunit: {
+ files: ['test/**/*_test.js'],
+ },
+ jshint: {
+ options: {
+ jshintrc: '.jshintrc'
+ },
+ gruntfile: {
+ src: 'Gruntfile.js'
+ },
+ lib: {
+ src: ['lib/**/*.js']
+ },
+ test: {
+ src: ['test/*.js']
+ },
+ },
+ watch: {
+ gruntfile: {
+ files: '<%= jshint.gruntfile.src %>',
+ tasks: ['jshint:gruntfile']
+ },
+ lib: {
+ files: '<%= jshint.lib.src %>',
+ tasks: ['jshint:lib', 'nodeunit']
+ },
+ test: {
+ files: '<%= jshint.test.src %>',
+ tasks: ['jshint:test', 'nodeunit']
+ },
+ },
+ });
+
+ // These plugins provide necessary tasks.
+ grunt.loadNpmTasks('grunt-contrib-nodeunit');
+ grunt.loadNpmTasks('grunt-contrib-jshint');
+ grunt.loadNpmTasks('grunt-contrib-watch');
+
+ // Default task.
+ grunt.registerTask('default', ['jshint', 'nodeunit']);
+
+};
diff --git a/node_modules/globule/LICENSE-MIT b/node_modules/globule/LICENSE-MIT
new file mode 100644
index 000000000..bb2aad6dc
--- /dev/null
+++ b/node_modules/globule/LICENSE-MIT
@@ -0,0 +1,22 @@
+Copyright (c) 2013 "Cowboy" Ben Alman
+
+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/globule/README.md b/node_modules/globule/README.md
new file mode 100644
index 000000000..656b1ed9b
--- /dev/null
+++ b/node_modules/globule/README.md
@@ -0,0 +1,117 @@
+# globule [![Build Status](https://secure.travis-ci.org/cowboy/node-globule.png?branch=master)](http://travis-ci.org/cowboy/node-globule)
+
+An easy-to-use wildcard globbing library.
+
+## Getting Started
+Install the module with: `npm install globule`
+
+```javascript
+var globule = require('globule');
+var filepaths = globule.find('**/*.js');
+```
+
+## Documentation
+
+### globule.find
+Returns a unique array of all file or directory paths that match the given globbing pattern(s). This method accepts either comma separated globbing patterns or an array of globbing patterns. Paths matching patterns that begin with `!` will be excluded from the returned array. Patterns are processed in order, so inclusion and exclusion order is significant.
+
+```js
+globule.find(patterns [, options])
+```
+
+The `options` object supports all [glob][] library options, along with a few extras. These are the most commonly used:
+
+* `filter` Either a valid [fs.Stats method name](http://nodejs.org/docs/latest/api/fs.html#fs_class_fs_stats) or a function that will be passed the matched `src` filepath and `options` object as arguments. This function should return a `Boolean` value.
+* `nonull` Retain globbing patterns in result set even if they fail to match files.
+* `matchBase` Patterns without slashes will match just the basename part. Eg. this makes `*.js` work like `**/*.js`.
+* `srcBase` Patterns will be matched relative to the specified path instead of the current working directory. This is a synonym for `cwd`.
+* `prefixBase` Any specified `srcBase` will be prefixed to all returned filepaths.
+
+[glob]: https://github.com/isaacs/node-glob
+
+### globule.match
+Match one or more globbing patterns against one or more file paths. Returns a uniqued array of all file paths that match any of the specified globbing patterns. Both the `patterns` and `filepaths` arguments can be a single string or array of strings. Paths matching patterns that begin with `!` will be excluded from the returned array. Patterns are processed in order, so inclusion and exclusion order is significant.
+
+```js
+grunt.file.match(patterns, filepaths [, options])
+```
+
+### globule.isMatch
+This method contains the same signature and logic as the `globule.match` method, but returns `true` if any files were matched, otherwise `false`.
+
+```js
+grunt.file.isMatch(patterns, filepaths [, options])
+```
+
+### globule.mapping
+Given a set of source file paths, returns an array of src-dest file mapping objects. Both src and dest paths may be renamed, depending on the options specified.
+
+```js
+globule.mapping(filepaths [, options])
+```
+
+In addition to the options the `globule.find` method supports, the options object also supports these properties:
+
+* `srcBase` The directory from which patterns are matched. Any string specified as `srcBase` is effectively stripped from the beginning of all matched paths.
+* `destBase` The specified path is prefixed to all `dest` filepaths.
+* `ext` Remove anything after (and including) the first `.` in the destination path, then append this value.
+* `extDot` Change the behavior of `ext`, `"first"` and `"last"` will remove anything after the first or last `.` in the destination filename, respectively. Defaults to `"first"`.
+* `flatten` Remove the path component from all matched src files. The src file path is still joined to the specified destBase.
+* `rename` If specified, this function will be responsible for returning the final `dest` filepath. By default, it flattens paths (if specified), changes extensions (if specified) and joins the matched path to the `destBase`.
+
+### globule.findMapping
+This method is a convenience wrapper around the `globule.find` and `globule.mapping` methods.
+
+```js
+globule.findMapping(patterns [, options])
+```
+
+
+## Examples
+
+Given the files `foo/a.js` and `foo/b.js`:
+
+### srcBase and destBase
+
+```js
+globule.find("foo/*.js")
+// ["foo/a.js", "foo/b.js"]
+
+globule.find("*.js", {srcBase: "foo"})
+// ["a.js", "b.js"]
+
+globule.find("*.js", {srcBase: "foo", prefixBase: true})
+// ["foo/a.js", "foo/b.js"]
+```
+
+```js
+globule.findMapping("foo/*.js")
+// [{src: "foo/a.js", dest: "foo/a.js"}, {src: "foo/b.js", dest: "foo/b.js"}]
+
+globule.findMapping("foo/*.js", {destBase: "bar"})
+// [{src: "foo/a.js", dest: "bar/foo/a.js"}, {src: "foo/b.js", dest: "bar/foo/b.js"}]
+
+globule.findMapping("*.js", {srcBase: "foo", destBase: "bar"})
+// [{src: "foo/a.js", dest: "bar/a.js"}, {src: "foo/b.js", dest: "bar/b.js"}]
+```
+
+```js
+globule.mapping(["foo/a.js", "foo/b.js"])
+// [{src: "foo/a.js", dest: "foo/a.js"}, {src: "foo/b.js", dest: "foo/b.js"}]
+
+globule.mapping(["foo/a.js", "foo/b.js"], {destBase: "bar"})
+// [{src: "foo/a.js", dest: "bar/foo/a.js"}, {src: "foo/b.js", dest: "bar/foo/b.js"}]
+
+globule.mapping(["a.js", "b.js"], {srcBase: "foo", destBase: "bar"})
+// [{src: "foo/a.js", dest: "bar/a.js"}, {src: "foo/b.js", dest: "bar/b.js"}]
+```
+
+## Contributing
+In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using [Grunt](http://gruntjs.com/).
+
+## Release History
+_(Nothing yet)_
+
+## License
+Copyright (c) 2013 "Cowboy" Ben Alman
+Licensed under the MIT license.
diff --git a/node_modules/globule/lib/globule.js b/node_modules/globule/lib/globule.js
new file mode 100644
index 000000000..01017b92d
--- /dev/null
+++ b/node_modules/globule/lib/globule.js
@@ -0,0 +1,172 @@
+/*
+ * globule
+ * https://github.com/cowboy/node-globule
+ *
+ * Copyright (c) 2013 "Cowboy" Ben Alman
+ * Licensed under the MIT license.
+ */
+
+'use strict';
+
+var fs = require('fs');
+var path = require('path');
+
+var _ = require('lodash');
+var glob = require('glob');
+var minimatch = require('minimatch');
+
+// The module.
+var globule = exports;
+
+// Process specified wildcard glob patterns or filenames against a
+// callback, excluding and uniquing files in the result set.
+function processPatterns(patterns, fn) {
+ return _.flatten(patterns).reduce(function(result, pattern) {
+ if (pattern.indexOf('!') === 0) {
+ // If the first character is ! all matches via this pattern should be
+ // removed from the result set.
+ pattern = pattern.slice(1);
+ return _.difference(result, fn(pattern));
+ } else {
+ // Otherwise, add all matching filepaths to the result set.
+ return _.union(result, fn(pattern));
+ }
+ }, []);
+}
+
+// Match a filepath or filepaths against one or more wildcard patterns. Returns
+// all matching filepaths. This behaves just like minimatch.match, but supports
+// any number of patterns.
+globule.match = function(patterns, filepaths, options) {
+ // Return empty set if either patterns or filepaths was omitted.
+ if (patterns == null || filepaths == null) { return []; }
+ // Normalize patterns and filepaths to arrays.
+ if (!_.isArray(patterns)) { patterns = [patterns]; }
+ if (!_.isArray(filepaths)) { filepaths = [filepaths]; }
+ // Return empty set if there are no patterns or filepaths.
+ if (patterns.length === 0 || filepaths.length === 0) { return []; }
+ // Return all matching filepaths.
+ return processPatterns(patterns, function(pattern) {
+ return minimatch.match(filepaths, pattern, options || {});
+ });
+};
+
+// Match a filepath or filepaths against one or more wildcard patterns. Returns
+// true if any of the patterns match.
+globule.isMatch = function() {
+ return globule.match.apply(null, arguments).length > 0;
+};
+
+// Return an array of all file paths that match the given wildcard patterns.
+globule.find = function() {
+ var args = _.toArray(arguments);
+ // If the last argument is an options object, remove it from args.
+ var options = _.isPlainObject(args[args.length - 1]) ? args.pop() : {};
+ // Use the first argument if it's an Array, otherwise use all arguments.
+ var patterns = _.isArray(args[0]) ? args[0] : args;
+ // Return empty set if there are no patterns or filepaths.
+ if (patterns.length === 0) { return []; }
+ var srcBase = options.srcBase || options.cwd;
+ // Create glob-specific options object.
+ var globOptions = _.extend({}, options);
+ if (srcBase) {
+ globOptions.cwd = srcBase;
+ }
+ // Get all matching filepaths.
+ var matches = processPatterns(patterns, function(pattern) {
+ return glob.sync(pattern, globOptions);
+ });
+ // If srcBase and prefixBase were specified, prefix srcBase to matched paths.
+ if (srcBase && options.prefixBase) {
+ matches = matches.map(function(filepath) {
+ return path.join(srcBase, filepath);
+ });
+ }
+ // Filter result set?
+ if (options.filter) {
+ matches = matches.filter(function(filepath) {
+ // If srcBase was specified but prefixBase was NOT, prefix srcBase
+ // temporarily, for filtering.
+ if (srcBase && !options.prefixBase) {
+ filepath = path.join(srcBase, filepath);
+ }
+ try {
+ if (_.isFunction(options.filter)) {
+ return options.filter(filepath, options);
+ } else {
+ // If the file is of the right type and exists, this should work.
+ return fs.statSync(filepath)[options.filter]();
+ }
+ } catch(err) {
+ // Otherwise, it's probably not the right type.
+ return false;
+ }
+ });
+ }
+ return matches;
+};
+
+var pathSeparatorRe = /[\/\\]/g;
+var extDotRe = {
+ first: /(\.[^\/]*)?$/,
+ last: /(\.[^\/\.]*)?$/,
+};
+function rename(dest, options) {
+ // Flatten path?
+ if (options.flatten) {
+ dest = path.basename(dest);
+ }
+ // Change the extension?
+ if (options.ext) {
+ dest = dest.replace(extDotRe[options.extDot], options.ext);
+ }
+ // Join dest and destBase?
+ if (options.destBase) {
+ dest = path.join(options.destBase, dest);
+ }
+ return dest;
+}
+
+// Build a mapping of src-dest filepaths from the given set of filepaths.
+globule.mapping = function(filepaths, options) {
+ // Return empty set if filepaths was omitted.
+ if (filepaths == null) { return []; }
+ options = _.defaults({}, options, {
+ extDot: 'first',
+ rename: rename,
+ });
+ var files = [];
+ var fileByDest = {};
+ // Find all files matching pattern, using passed-in options.
+ filepaths.forEach(function(src) {
+ // Generate destination filename.
+ var dest = options.rename(src, options);
+ // Prepend srcBase to all src paths.
+ if (options.srcBase) {
+ src = path.join(options.srcBase, src);
+ }
+ // Normalize filepaths to be unix-style.
+ dest = dest.replace(pathSeparatorRe, '/');
+ src = src.replace(pathSeparatorRe, '/');
+ // Map correct src path to dest path.
+ if (fileByDest[dest]) {
+ // If dest already exists, push this src onto that dest's src array.
+ fileByDest[dest].src.push(src);
+ } else {
+ // Otherwise create a new src-dest file mapping object.
+ files.push({
+ src: [src],
+ dest: dest,
+ });
+ // And store a reference for later use.
+ fileByDest[dest] = files[files.length - 1];
+ }
+ });
+ return files;
+};
+
+// Return a mapping of src-dest filepaths from files matching the given
+// wildcard patterns.
+globule.findMapping = function(patterns, options) {
+ return globule.mapping(globule.find(patterns, options), options);
+};
diff --git a/node_modules/globule/node_modules/glob/.npmignore b/node_modules/globule/node_modules/glob/.npmignore
new file mode 100644
index 000000000..2af4b71c9
--- /dev/null
+++ b/node_modules/globule/node_modules/glob/.npmignore
@@ -0,0 +1,2 @@
+.*.swp
+test/a/
diff --git a/node_modules/globule/node_modules/glob/.travis.yml b/node_modules/globule/node_modules/glob/.travis.yml
new file mode 100644
index 000000000..baa0031d5
--- /dev/null
+++ b/node_modules/globule/node_modules/glob/.travis.yml
@@ -0,0 +1,3 @@
+language: node_js
+node_js:
+ - 0.8
diff --git a/node_modules/globule/node_modules/glob/LICENSE b/node_modules/globule/node_modules/glob/LICENSE
new file mode 100644
index 000000000..0c44ae716
--- /dev/null
+++ b/node_modules/globule/node_modules/glob/LICENSE
@@ -0,0 +1,27 @@
+Copyright (c) Isaac Z. Schlueter ("Author")
+All rights reserved.
+
+The BSD License
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS
+BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/node_modules/globule/node_modules/glob/README.md b/node_modules/globule/node_modules/glob/README.md
new file mode 100644
index 000000000..6e27df620
--- /dev/null
+++ b/node_modules/globule/node_modules/glob/README.md
@@ -0,0 +1,233 @@
+# Glob
+
+This is a glob implementation in JavaScript. It uses the `minimatch`
+library to do its matching.
+
+## Attention: node-glob users!
+
+The API has changed dramatically between 2.x and 3.x. This library is
+now 100% JavaScript, and the integer flags have been replaced with an
+options object.
+
+Also, there's an event emitter class, proper tests, and all the other
+things you've come to expect from node modules.
+
+And best of all, no compilation!
+
+## Usage
+
+```javascript
+var glob = require("glob")
+
+// options is optional
+glob("**/*.js", options, function (er, files) {
+ // files is an array of filenames.
+ // If the `nonull` option is set, and nothing
+ // was found, then files is ["**/*.js"]
+ // er is an error object or null.
+})
+```
+
+## Features
+
+Please see the [minimatch
+documentation](https://github.com/isaacs/minimatch) for more details.
+
+Supports these glob features:
+
+* Brace Expansion
+* Extended glob matching
+* "Globstar" `**` matching
+
+See:
+
+* `man sh`
+* `man bash`
+* `man 3 fnmatch`
+* `man 5 gitignore`
+* [minimatch documentation](https://github.com/isaacs/minimatch)
+
+## glob(pattern, [options], cb)
+
+* `pattern` {String} Pattern to be matched
+* `options` {Object}
+* `cb` {Function}
+ * `err` {Error | null}
+ * `matches` {Array<String>} filenames found matching the pattern
+
+Perform an asynchronous glob search.
+
+## glob.sync(pattern, [options]
+
+* `pattern` {String} Pattern to be matched
+* `options` {Object}
+* return: {Array<String>} filenames found matching the pattern
+
+Perform a synchronous glob search.
+
+## Class: glob.Glob
+
+Create a Glob object by instanting the `glob.Glob` class.
+
+```javascript
+var Glob = require("glob").Glob
+var mg = new Glob(pattern, options, cb)
+```
+
+It's an EventEmitter, and starts walking the filesystem to find matches
+immediately.
+
+### new glob.Glob(pattern, [options], [cb])
+
+* `pattern` {String} pattern to search for
+* `options` {Object}
+* `cb` {Function} Called when an error occurs, or matches are found
+ * `err` {Error | null}
+ * `matches` {Array<String>} filenames found matching the pattern
+
+Note that if the `sync` flag is set in the options, then matches will
+be immediately available on the `g.found` member.
+
+### Properties
+
+* `minimatch` The minimatch object that the glob uses.
+* `options` The options object passed in.
+* `error` The error encountered. When an error is encountered, the
+ glob object is in an undefined state, and should be discarded.
+* `aborted` Boolean which is set to true when calling `abort()`. There
+ is no way at this time to continue a glob search after aborting, but
+ you can re-use the statCache to avoid having to duplicate syscalls.
+
+### Events
+
+* `end` When the matching is finished, this is emitted with all the
+ matches found. If the `nonull` option is set, and no match was found,
+ then the `matches` list contains the original pattern. The matches
+ are sorted, unless the `nosort` flag is set.
+* `match` Every time a match is found, this is emitted with the matched.
+* `error` Emitted when an unexpected error is encountered, or whenever
+ any fs error occurs if `options.strict` is set.
+* `abort` When `abort()` is called, this event is raised.
+
+### Methods
+
+* `abort` Stop the search.
+
+### Options
+
+All the options that can be passed to Minimatch can also be passed to
+Glob to change pattern matching behavior. Also, some have been added,
+or have glob-specific ramifications.
+
+All options are false by default, unless otherwise noted.
+
+All options are added to the glob object, as well.
+
+* `cwd` The current working directory in which to search. Defaults
+ to `process.cwd()`.
+* `root` The place where patterns starting with `/` will be mounted
+ onto. Defaults to `path.resolve(options.cwd, "/")` (`/` on Unix
+ systems, and `C:\` or some such on Windows.)
+* `nomount` By default, a pattern starting with a forward-slash will be
+ "mounted" onto the root setting, so that a valid filesystem path is
+ returned. Set this flag to disable that behavior.
+* `mark` Add a `/` character to directory matches. Note that this
+ requires additional stat calls.
+* `nosort` Don't sort the results.
+* `stat` Set to true to stat *all* results. This reduces performance
+ somewhat, and is completely unnecessary, unless `readdir` is presumed
+ to be an untrustworthy indicator of file existence. It will cause
+ ELOOP to be triggered one level sooner in the case of cyclical
+ symbolic links.
+* `silent` When an unusual error is encountered
+ when attempting to read a directory, a warning will be printed to
+ stderr. Set the `silent` option to true to suppress these warnings.
+* `strict` When an unusual error is encountered
+ when attempting to read a directory, the process will just continue on
+ in search of other matches. Set the `strict` option to raise an error
+ in these cases.
+* `statCache` A cache of results of filesystem information, to prevent
+ unnecessary stat calls. While it should not normally be necessary to
+ set this, you may pass the statCache from one glob() call to the
+ options object of another, if you know that the filesystem will not
+ change between calls. (See "Race Conditions" below.)
+* `sync` Perform a synchronous glob search.
+* `nounique` In some cases, brace-expanded patterns can result in the
+ same file showing up multiple times in the result set. By default,
+ this implementation prevents duplicates in the result set.
+ Set this flag to disable that behavior.
+* `nonull` Set to never return an empty set, instead returning a set
+ containing the pattern itself. This is the default in glob(3).
+* `nocase` Perform a case-insensitive match. Note that case-insensitive
+ filesystems will sometimes result in glob returning results that are
+ case-insensitively matched anyway, since readdir and stat will not
+ raise an error.
+* `debug` Set to enable debug logging in minimatch and glob.
+* `globDebug` Set to enable debug logging in glob, but not minimatch.
+
+## Comparisons to other fnmatch/glob implementations
+
+While strict compliance with the existing standards is a worthwhile
+goal, some discrepancies exist between node-glob and other
+implementations, and are intentional.
+
+If the pattern starts with a `!` character, then it is negated. Set the
+`nonegate` flag to suppress this behavior, and treat leading `!`
+characters normally. This is perhaps relevant if you wish to start the
+pattern with a negative extglob pattern like `!(a|B)`. Multiple `!`
+characters at the start of a pattern will negate the pattern multiple
+times.
+
+If a pattern starts with `#`, then it is treated as a comment, and
+will not match anything. Use `\#` to match a literal `#` at the
+start of a line, or set the `nocomment` flag to suppress this behavior.
+
+The double-star character `**` is supported by default, unless the
+`noglobstar` flag is set. This is supported in the manner of bsdglob
+and bash 4.1, where `**` only has special significance if it is the only
+thing in a path part. That is, `a/**/b` will match `a/x/y/b`, but
+`a/**b` will not. **Note that this is different from the way that `**` is
+handled by ruby's `Dir` class.**
+
+If an escaped pattern has no matches, and the `nonull` flag is set,
+then glob returns the pattern as-provided, rather than
+interpreting the character escapes. For example,
+`glob.match([], "\\*a\\?")` will return `"\\*a\\?"` rather than
+`"*a?"`. This is akin to setting the `nullglob` option in bash, except
+that it does not resolve escaped pattern characters.
+
+If brace expansion is not disabled, then it is performed before any
+other interpretation of the glob pattern. Thus, a pattern like
+`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded
+**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are
+checked for validity. Since those two are valid, matching proceeds.
+
+## Windows
+
+**Please only use forward-slashes in glob expressions.**
+
+Though windows uses either `/` or `\` as its path separator, only `/`
+characters are used by this glob implementation. You must use
+forward-slashes **only** in glob expressions. Back-slashes will always
+be interpreted as escape characters, not path separators.
+
+Results from absolute patterns such as `/foo/*` are mounted onto the
+root setting using `path.join`. On windows, this will by default result
+in `/foo/*` matching `C:\foo\bar.txt`.
+
+## Race Conditions
+
+Glob searching, by its very nature, is susceptible to race conditions,
+since it relies on directory walking and such.
+
+As a result, it is possible that a file that exists when glob looks for
+it may have been deleted or modified by the time it returns the result.
+
+As part of its internal implementation, this program caches all stat
+and readdir calls that it makes, in order to cut down on system
+overhead. However, this also makes it even more susceptible to races,
+especially if the statCache object is reused between glob calls.
+
+Users are thus advised not to use a glob result as a
+guarantee of filesystem state in the face of rapid changes.
+For the vast majority of operations, this is never a problem.
diff --git a/node_modules/globule/node_modules/glob/examples/g.js b/node_modules/globule/node_modules/glob/examples/g.js
new file mode 100644
index 000000000..be122df00
--- /dev/null
+++ b/node_modules/globule/node_modules/glob/examples/g.js
@@ -0,0 +1,9 @@
+var Glob = require("../").Glob
+
+var pattern = "test/a/**/[cg]/../[cg]"
+console.log(pattern)
+
+var mg = new Glob(pattern, {mark: true, sync:true}, function (er, matches) {
+ console.log("matches", matches)
+})
+console.log("after")
diff --git a/node_modules/globule/node_modules/glob/examples/usr-local.js b/node_modules/globule/node_modules/glob/examples/usr-local.js
new file mode 100644
index 000000000..327a425e4
--- /dev/null
+++ b/node_modules/globule/node_modules/glob/examples/usr-local.js
@@ -0,0 +1,9 @@
+var Glob = require("../").Glob
+
+var pattern = "{./*/*,/*,/usr/local/*}"
+console.log(pattern)
+
+var mg = new Glob(pattern, {mark: true}, function (er, matches) {
+ console.log("matches", matches)
+})
+console.log("after")
diff --git a/node_modules/globule/node_modules/glob/glob.js b/node_modules/globule/node_modules/glob/glob.js
new file mode 100644
index 000000000..891c88360
--- /dev/null
+++ b/node_modules/globule/node_modules/glob/glob.js
@@ -0,0 +1,643 @@
+// Approach:
+//
+// 1. Get the minimatch set
+// 2. For each pattern in the set, PROCESS(pattern)
+// 3. Store matches per-set, then uniq them
+//
+// PROCESS(pattern)
+// Get the first [n] items from pattern that are all strings
+// Join these together. This is PREFIX.
+// If there is no more remaining, then stat(PREFIX) and
+// add to matches if it succeeds. END.
+// readdir(PREFIX) as ENTRIES
+// If fails, END
+// If pattern[n] is GLOBSTAR
+// // handle the case where the globstar match is empty
+// // by pruning it out, and testing the resulting pattern
+// PROCESS(pattern[0..n] + pattern[n+1 .. $])
+// // handle other cases.
+// for ENTRY in ENTRIES (not dotfiles)
+// // attach globstar + tail onto the entry
+// PROCESS(pattern[0..n] + ENTRY + pattern[n .. $])
+//
+// else // not globstar
+// for ENTRY in ENTRIES (not dotfiles, unless pattern[n] is dot)
+// Test ENTRY against pattern[n]
+// If fails, continue
+// If passes, PROCESS(pattern[0..n] + item + pattern[n+1 .. $])
+//
+// Caveat:
+// Cache all stats and readdirs results to minimize syscall. Since all
+// we ever care about is existence and directory-ness, we can just keep
+// `true` for files, and [children,...] for directories, or `false` for
+// things that don't exist.
+
+
+
+module.exports = glob
+
+var fs = require("graceful-fs")
+, minimatch = require("minimatch")
+, Minimatch = minimatch.Minimatch
+, inherits = require("inherits")
+, EE = require("events").EventEmitter
+, path = require("path")
+, isDir = {}
+, assert = require("assert").ok
+
+function glob (pattern, options, cb) {
+ if (typeof options === "function") cb = options, options = {}
+ if (!options) options = {}
+
+ if (typeof options === "number") {
+ deprecated()
+ return
+ }
+
+ var g = new Glob(pattern, options, cb)
+ return g.sync ? g.found : g
+}
+
+glob.fnmatch = deprecated
+
+function deprecated () {
+ throw new Error("glob's interface has changed. Please see the docs.")
+}
+
+glob.sync = globSync
+function globSync (pattern, options) {
+ if (typeof options === "number") {
+ deprecated()
+ return
+ }
+
+ options = options || {}
+ options.sync = true
+ return glob(pattern, options)
+}
+
+
+glob.Glob = Glob
+inherits(Glob, EE)
+function Glob (pattern, options, cb) {
+ if (!(this instanceof Glob)) {
+ return new Glob(pattern, options, cb)
+ }
+
+ if (typeof cb === "function") {
+ this.on("error", cb)
+ this.on("end", function (matches) {
+ cb(null, matches)
+ })
+ }
+
+ options = options || {}
+
+ this.EOF = {}
+ this._emitQueue = []
+
+ this.maxDepth = options.maxDepth || 1000
+ this.maxLength = options.maxLength || Infinity
+ this.statCache = options.statCache || {}
+
+ this.changedCwd = false
+ var cwd = process.cwd()
+ if (!options.hasOwnProperty("cwd")) this.cwd = cwd
+ else {
+ this.cwd = options.cwd
+ this.changedCwd = path.resolve(options.cwd) !== cwd
+ }
+
+ this.root = options.root || path.resolve(this.cwd, "/")
+ this.root = path.resolve(this.root)
+ if (process.platform === "win32")
+ this.root = this.root.replace(/\\/g, "/")
+
+ this.nomount = !!options.nomount
+
+ if (!pattern) {
+ throw new Error("must provide pattern")
+ }
+
+ // base-matching: just use globstar for that.
+ if (options.matchBase && -1 === pattern.indexOf("/")) {
+ if (options.noglobstar) {
+ throw new Error("base matching requires globstar")
+ }
+ pattern = "**/" + pattern
+ }
+
+ this.strict = options.strict !== false
+ this.dot = !!options.dot
+ this.mark = !!options.mark
+ this.sync = !!options.sync
+ this.nounique = !!options.nounique
+ this.nonull = !!options.nonull
+ this.nosort = !!options.nosort
+ this.nocase = !!options.nocase
+ this.stat = !!options.stat
+
+ this.debug = !!options.debug || !!options.globDebug
+ if (this.debug)
+ this.log = console.error
+
+ this.silent = !!options.silent
+
+ var mm = this.minimatch = new Minimatch(pattern, options)
+ this.options = mm.options
+ pattern = this.pattern = mm.pattern
+
+ this.error = null
+ this.aborted = false
+
+ EE.call(this)
+
+ // process each pattern in the minimatch set
+ var n = this.minimatch.set.length
+
+ // The matches are stored as {<filename>: true,...} so that
+ // duplicates are automagically pruned.
+ // Later, we do an Object.keys() on these.
+ // Keep them as a list so we can fill in when nonull is set.
+ this.matches = new Array(n)
+
+ this.minimatch.set.forEach(iterator.bind(this))
+ function iterator (pattern, i, set) {
+ this._process(pattern, 0, i, function (er) {
+ if (er) this.emit("error", er)
+ if (-- n <= 0) this._finish()
+ })
+ }
+}
+
+Glob.prototype.log = function () {}
+
+Glob.prototype._finish = function () {
+ assert(this instanceof Glob)
+
+ var nou = this.nounique
+ , all = nou ? [] : {}
+
+ for (var i = 0, l = this.matches.length; i < l; i ++) {
+ var matches = this.matches[i]
+ this.log("matches[%d] =", i, matches)
+ // do like the shell, and spit out the literal glob
+ if (!matches) {
+ if (this.nonull) {
+ var literal = this.minimatch.globSet[i]
+ if (nou) all.push(literal)
+ else all[literal] = true
+ }
+ } else {
+ // had matches
+ var m = Object.keys(matches)
+ if (nou) all.push.apply(all, m)
+ else m.forEach(function (m) {
+ all[m] = true
+ })
+ }
+ }
+
+ if (!nou) all = Object.keys(all)
+
+ if (!this.nosort) {
+ all = all.sort(this.nocase ? alphasorti : alphasort)
+ }
+
+ if (this.mark) {
+ // at *some* point we statted all of these
+ all = all.map(function (m) {
+ var sc = this.statCache[m]
+ if (!sc)
+ return m
+ var isDir = (Array.isArray(sc) || sc === 2)
+ if (isDir && m.slice(-1) !== "/") {
+ return m + "/"
+ }
+ if (!isDir && m.slice(-1) === "/") {
+ return m.replace(/\/+$/, "")
+ }
+ return m
+ }, this)
+ }
+
+ this.log("emitting end", all)
+
+ this.EOF = this.found = all
+ this.emitMatch(this.EOF)
+}
+
+function alphasorti (a, b) {
+ a = a.toLowerCase()
+ b = b.toLowerCase()
+ return alphasort(a, b)
+}
+
+function alphasort (a, b) {
+ return a > b ? 1 : a < b ? -1 : 0
+}
+
+Glob.prototype.abort = function () {
+ this.aborted = true
+ this.emit("abort")
+}
+
+Glob.prototype.pause = function () {
+ if (this.paused) return
+ if (this.sync)
+ this.emit("error", new Error("Can't pause/resume sync glob"))
+ this.paused = true
+ this.emit("pause")
+}
+
+Glob.prototype.resume = function () {
+ if (!this.paused) return
+ if (this.sync)
+ this.emit("error", new Error("Can't pause/resume sync glob"))
+ this.paused = false
+ this.emit("resume")
+ this._processEmitQueue()
+ //process.nextTick(this.emit.bind(this, "resume"))
+}
+
+Glob.prototype.emitMatch = function (m) {
+ this._emitQueue.push(m)
+ this._processEmitQueue()
+}
+
+Glob.prototype._processEmitQueue = function (m) {
+ while (!this._processingEmitQueue &&
+ !this.paused) {
+ this._processingEmitQueue = true
+ var m = this._emitQueue.shift()
+ if (!m) {
+ this._processingEmitQueue = false
+ break
+ }
+
+ this.log('emit!', m === this.EOF ? "end" : "match")
+
+ this.emit(m === this.EOF ? "end" : "match", m)
+ this._processingEmitQueue = false
+ }
+}
+
+Glob.prototype._process = function (pattern, depth, index, cb_) {
+ assert(this instanceof Glob)
+
+ var cb = function cb (er, res) {
+ assert(this instanceof Glob)
+ if (this.paused) {
+ if (!this._processQueue) {
+ this._processQueue = []
+ this.once("resume", function () {
+ var q = this._processQueue
+ this._processQueue = null
+ q.forEach(function (cb) { cb() })
+ })
+ }
+ this._processQueue.push(cb_.bind(this, er, res))
+ } else {
+ cb_.call(this, er, res)
+ }
+ }.bind(this)
+
+ if (this.aborted) return cb()
+
+ if (depth > this.maxDepth) return cb()
+
+ // Get the first [n] parts of pattern that are all strings.
+ var n = 0
+ while (typeof pattern[n] === "string") {
+ n ++
+ }
+ // now n is the index of the first one that is *not* a string.
+
+ // see if there's anything else
+ var prefix
+ switch (n) {
+ // if not, then this is rather simple
+ case pattern.length:
+ prefix = pattern.join("/")
+ this._stat(prefix, function (exists, isDir) {
+ // either it's there, or it isn't.
+ // nothing more to do, either way.
+ if (exists) {
+ if (prefix && isAbsolute(prefix) && !this.nomount) {
+ if (prefix.charAt(0) === "/") {
+ prefix = path.join(this.root, prefix)
+ } else {
+ prefix = path.resolve(this.root, prefix)
+ }
+ }
+
+ if (process.platform === "win32")
+ prefix = prefix.replace(/\\/g, "/")
+
+ this.matches[index] = this.matches[index] || {}
+ this.matches[index][prefix] = true
+ this.emitMatch(prefix)
+ }
+ return cb()
+ })
+ return
+
+ case 0:
+ // pattern *starts* with some non-trivial item.
+ // going to readdir(cwd), but not include the prefix in matches.
+ prefix = null
+ break
+
+ default:
+ // pattern has some string bits in the front.
+ // whatever it starts with, whether that's "absolute" like /foo/bar,
+ // or "relative" like "../baz"
+ prefix = pattern.slice(0, n)
+ prefix = prefix.join("/")
+ break
+ }
+
+ // get the list of entries.
+ var read
+ if (prefix === null) read = "."
+ else if (isAbsolute(prefix) || isAbsolute(pattern.join("/"))) {
+ if (!prefix || !isAbsolute(prefix)) {
+ prefix = path.join("/", prefix)
+ }
+ read = prefix = path.resolve(prefix)
+
+ // if (process.platform === "win32")
+ // read = prefix = prefix.replace(/^[a-zA-Z]:|\\/g, "/")
+
+ this.log('absolute: ', prefix, this.root, pattern, read)
+ } else {
+ read = prefix
+ }
+
+ this.log('readdir(%j)', read, this.cwd, this.root)
+
+ return this._readdir(read, function (er, entries) {
+ if (er) {
+ // not a directory!
+ // this means that, whatever else comes after this, it can never match
+ return cb()
+ }
+
+ // globstar is special
+ if (pattern[n] === minimatch.GLOBSTAR) {
+ // test without the globstar, and with every child both below
+ // and replacing the globstar.
+ var s = [ pattern.slice(0, n).concat(pattern.slice(n + 1)) ]
+ entries.forEach(function (e) {
+ if (e.charAt(0) === "." && !this.dot) return
+ // instead of the globstar
+ s.push(pattern.slice(0, n).concat(e).concat(pattern.slice(n + 1)))
+ // below the globstar
+ s.push(pattern.slice(0, n).concat(e).concat(pattern.slice(n)))
+ }, this)
+
+ // now asyncForEach over this
+ var l = s.length
+ , errState = null
+ s.forEach(function (gsPattern) {
+ this._process(gsPattern, depth + 1, index, function (er) {
+ if (errState) return
+ if (er) return cb(errState = er)
+ if (--l <= 0) return cb()
+ })
+ }, this)
+
+ return
+ }
+
+ // not a globstar
+ // It will only match dot entries if it starts with a dot, or if
+ // dot is set. Stuff like @(.foo|.bar) isn't allowed.
+ var pn = pattern[n]
+ if (typeof pn === "string") {
+ var found = entries.indexOf(pn) !== -1
+ entries = found ? entries[pn] : []
+ } else {
+ var rawGlob = pattern[n]._glob
+ , dotOk = this.dot || rawGlob.charAt(0) === "."
+
+ entries = entries.filter(function (e) {
+ return (e.charAt(0) !== "." || dotOk) &&
+ (typeof pattern[n] === "string" && e === pattern[n] ||
+ e.match(pattern[n]))
+ })
+ }
+
+ // If n === pattern.length - 1, then there's no need for the extra stat
+ // *unless* the user has specified "mark" or "stat" explicitly.
+ // We know that they exist, since the readdir returned them.
+ if (n === pattern.length - 1 &&
+ !this.mark &&
+ !this.stat) {
+ entries.forEach(function (e) {
+ if (prefix) {
+ if (prefix !== "/") e = prefix + "/" + e
+ else e = prefix + e
+ }
+ if (e.charAt(0) === "/" && !this.nomount) {
+ e = path.join(this.root, e)
+ }
+
+ if (process.platform === "win32")
+ e = e.replace(/\\/g, "/")
+
+ this.matches[index] = this.matches[index] || {}
+ this.matches[index][e] = true
+ this.emitMatch(e)
+ }, this)
+ return cb.call(this)
+ }
+
+
+ // now test all the remaining entries as stand-ins for that part
+ // of the pattern.
+ var l = entries.length
+ , errState = null
+ if (l === 0) return cb() // no matches possible
+ entries.forEach(function (e) {
+ var p = pattern.slice(0, n).concat(e).concat(pattern.slice(n + 1))
+ this._process(p, depth + 1, index, function (er) {
+ if (errState) return
+ if (er) return cb(errState = er)
+ if (--l === 0) return cb.call(this)
+ })
+ }, this)
+ })
+
+}
+
+Glob.prototype._stat = function (f, cb) {
+ assert(this instanceof Glob)
+ var abs = f
+ if (f.charAt(0) === "/") {
+ abs = path.join(this.root, f)
+ } else if (this.changedCwd) {
+ abs = path.resolve(this.cwd, f)
+ }
+ this.log('stat', [this.cwd, f, '=', abs])
+ if (f.length > this.maxLength) {
+ var er = new Error("Path name too long")
+ er.code = "ENAMETOOLONG"
+ er.path = f
+ return this._afterStat(f, abs, cb, er)
+ }
+
+ if (this.statCache.hasOwnProperty(f)) {
+ var exists = this.statCache[f]
+ , isDir = exists && (Array.isArray(exists) || exists === 2)
+ if (this.sync) return cb.call(this, !!exists, isDir)
+ return process.nextTick(cb.bind(this, !!exists, isDir))
+ }
+
+ if (this.sync) {
+ var er, stat
+ try {
+ stat = fs.statSync(abs)
+ } catch (e) {
+ er = e
+ }
+ this._afterStat(f, abs, cb, er, stat)
+ } else {
+ fs.stat(abs, this._afterStat.bind(this, f, abs, cb))
+ }
+}
+
+Glob.prototype._afterStat = function (f, abs, cb, er, stat) {
+ var exists
+ assert(this instanceof Glob)
+
+ if (abs.slice(-1) === "/" && stat && !stat.isDirectory()) {
+ this.log("should be ENOTDIR, fake it")
+
+ er = new Error("ENOTDIR, not a directory '" + abs + "'")
+ er.path = abs
+ er.code = "ENOTDIR"
+ stat = null
+ }
+
+ if (er || !stat) {
+ exists = false
+ } else {
+ exists = stat.isDirectory() ? 2 : 1
+ }
+ this.statCache[f] = this.statCache[f] || exists
+ cb.call(this, !!exists, exists === 2)
+}
+
+Glob.prototype._readdir = function (f, cb) {
+ assert(this instanceof Glob)
+ var abs = f
+ if (f.charAt(0) === "/") {
+ abs = path.join(this.root, f)
+ } else if (isAbsolute(f)) {
+ abs = f
+ } else if (this.changedCwd) {
+ abs = path.resolve(this.cwd, f)
+ }
+
+ this.log('readdir', [this.cwd, f, abs])
+ if (f.length > this.maxLength) {
+ var er = new Error("Path name too long")
+ er.code = "ENAMETOOLONG"
+ er.path = f
+ return this._afterReaddir(f, abs, cb, er)
+ }
+
+ if (this.statCache.hasOwnProperty(f)) {
+ var c = this.statCache[f]
+ if (Array.isArray(c)) {
+ if (this.sync) return cb.call(this, null, c)
+ return process.nextTick(cb.bind(this, null, c))
+ }
+
+ if (!c || c === 1) {
+ // either ENOENT or ENOTDIR
+ var code = c ? "ENOTDIR" : "ENOENT"
+ , er = new Error((c ? "Not a directory" : "Not found") + ": " + f)
+ er.path = f
+ er.code = code
+ this.log(f, er)
+ if (this.sync) return cb.call(this, er)
+ return process.nextTick(cb.bind(this, er))
+ }
+
+ // at this point, c === 2, meaning it's a dir, but we haven't
+ // had to read it yet, or c === true, meaning it's *something*
+ // but we don't have any idea what. Need to read it, either way.
+ }
+
+ if (this.sync) {
+ var er, entries
+ try {
+ entries = fs.readdirSync(abs)
+ } catch (e) {
+ er = e
+ }
+ return this._afterReaddir(f, abs, cb, er, entries)
+ }
+
+ fs.readdir(abs, this._afterReaddir.bind(this, f, abs, cb))
+}
+
+Glob.prototype._afterReaddir = function (f, abs, cb, er, entries) {
+ assert(this instanceof Glob)
+ if (entries && !er) {
+ this.statCache[f] = entries
+ // if we haven't asked to stat everything for suresies, then just
+ // assume that everything in there exists, so we can avoid
+ // having to stat it a second time. This also gets us one step
+ // further into ELOOP territory.
+ if (!this.mark && !this.stat) {
+ entries.forEach(function (e) {
+ if (f === "/") e = f + e
+ else e = f + "/" + e
+ this.statCache[e] = true
+ }, this)
+ }
+
+ return cb.call(this, er, entries)
+ }
+
+ // now handle errors, and cache the information
+ if (er) switch (er.code) {
+ case "ENOTDIR": // totally normal. means it *does* exist.
+ this.statCache[f] = 1
+ return cb.call(this, er)
+ case "ENOENT": // not terribly unusual
+ case "ELOOP":
+ case "ENAMETOOLONG":
+ case "UNKNOWN":
+ this.statCache[f] = false
+ return cb.call(this, er)
+ default: // some unusual error. Treat as failure.
+ this.statCache[f] = false
+ if (this.strict) this.emit("error", er)
+ if (!this.silent) console.error("glob error", er)
+ return cb.call(this, er)
+ }
+}
+
+var isAbsolute = process.platform === "win32" ? absWin : absUnix
+
+function absWin (p) {
+ if (absUnix(p)) return true
+ // pull off the device/UNC bit from a windows path.
+ // from node's lib/path.js
+ var splitDeviceRe =
+ /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/
+ , result = splitDeviceRe.exec(p)
+ , device = result[1] || ''
+ , isUnc = device && device.charAt(1) !== ':'
+ , isAbsolute = !!result[2] || isUnc // UNC paths are always absolute
+
+ return isAbsolute
+}
+
+function absUnix (p) {
+ return p.charAt(0) === "/" || p === ""
+}
diff --git a/node_modules/globule/node_modules/glob/package.json b/node_modules/globule/node_modules/glob/package.json
new file mode 100644
index 000000000..47381fba9
--- /dev/null
+++ b/node_modules/globule/node_modules/glob/package.json
@@ -0,0 +1,90 @@
+{
+ "_args": [
+ [
+ {
+ "raw": "glob@~3.1.21",
+ "scope": null,
+ "escapedName": "glob",
+ "name": "glob",
+ "rawSpec": "~3.1.21",
+ "spec": ">=3.1.21 <3.2.0",
+ "type": "range"
+ },
+ "/home/dold/repos/taler/wallet-webex/node_modules/globule"
+ ]
+ ],
+ "_from": "glob@>=3.1.21 <3.2.0",
+ "_id": "glob@3.1.21",
+ "_inCache": true,
+ "_location": "/globule/glob",
+ "_npmUser": {
+ "name": "isaacs",
+ "email": "i@izs.me"
+ },
+ "_npmVersion": "1.2.12",
+ "_phantomChildren": {},
+ "_requested": {
+ "raw": "glob@~3.1.21",
+ "scope": null,
+ "escapedName": "glob",
+ "name": "glob",
+ "rawSpec": "~3.1.21",
+ "spec": ">=3.1.21 <3.2.0",
+ "type": "range"
+ },
+ "_requiredBy": [
+ "/globule"
+ ],
+ "_resolved": "https://registry.npmjs.org/glob/-/glob-3.1.21.tgz",
+ "_shasum": "d29e0a055dea5138f4d07ed40e8982e83c2066cd",
+ "_shrinkwrap": null,
+ "_spec": "glob@~3.1.21",
+ "_where": "/home/dold/repos/taler/wallet-webex/node_modules/globule",
+ "author": {
+ "name": "Isaac Z. Schlueter",
+ "email": "i@izs.me",
+ "url": "http://blog.izs.me/"
+ },
+ "bugs": {
+ "url": "https://github.com/isaacs/node-glob/issues"
+ },
+ "dependencies": {
+ "graceful-fs": "~1.2.0",
+ "inherits": "1",
+ "minimatch": "~0.2.11"
+ },
+ "description": "a little globber",
+ "devDependencies": {
+ "mkdirp": "0",
+ "rimraf": "1",
+ "tap": "~0.4.0"
+ },
+ "directories": {},
+ "dist": {
+ "shasum": "d29e0a055dea5138f4d07ed40e8982e83c2066cd",
+ "tarball": "https://registry.npmjs.org/glob/-/glob-3.1.21.tgz"
+ },
+ "engines": {
+ "node": "*"
+ },
+ "homepage": "https://github.com/isaacs/node-glob#readme",
+ "license": "BSD",
+ "main": "glob.js",
+ "maintainers": [
+ {
+ "name": "isaacs",
+ "email": "i@izs.me"
+ }
+ ],
+ "name": "glob",
+ "optionalDependencies": {},
+ "readme": "ERROR: No README data found!",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/isaacs/node-glob.git"
+ },
+ "scripts": {
+ "test": "tap test/*.js"
+ },
+ "version": "3.1.21"
+}
diff --git a/node_modules/globule/node_modules/glob/test/00-setup.js b/node_modules/globule/node_modules/glob/test/00-setup.js
new file mode 100644
index 000000000..245afafda
--- /dev/null
+++ b/node_modules/globule/node_modules/glob/test/00-setup.js
@@ -0,0 +1,176 @@
+// just a little pre-run script to set up the fixtures.
+// zz-finish cleans it up
+
+var mkdirp = require("mkdirp")
+var path = require("path")
+var i = 0
+var tap = require("tap")
+var fs = require("fs")
+var rimraf = require("rimraf")
+
+var files =
+[ "a/.abcdef/x/y/z/a"
+, "a/abcdef/g/h"
+, "a/abcfed/g/h"
+, "a/b/c/d"
+, "a/bc/e/f"
+, "a/c/d/c/b"
+, "a/cb/e/f"
+]
+
+var symlinkTo = path.resolve(__dirname, "a/symlink/a/b/c")
+var symlinkFrom = "../.."
+
+files = files.map(function (f) {
+ return path.resolve(__dirname, f)
+})
+
+tap.test("remove fixtures", function (t) {
+ rimraf(path.resolve(__dirname, "a"), function (er) {
+ t.ifError(er, "remove fixtures")
+ t.end()
+ })
+})
+
+files.forEach(function (f) {
+ tap.test(f, function (t) {
+ var d = path.dirname(f)
+ mkdirp(d, 0755, function (er) {
+ if (er) {
+ t.fail(er)
+ return t.bailout()
+ }
+ fs.writeFile(f, "i like tests", function (er) {
+ t.ifError(er, "make file")
+ t.end()
+ })
+ })
+ })
+})
+
+if (process.platform !== "win32") {
+ tap.test("symlinky", function (t) {
+ var d = path.dirname(symlinkTo)
+ console.error("mkdirp", d)
+ mkdirp(d, 0755, function (er) {
+ t.ifError(er)
+ fs.symlink(symlinkFrom, symlinkTo, "dir", function (er) {
+ t.ifError(er, "make symlink")
+ t.end()
+ })
+ })
+ })
+}
+
+;["foo","bar","baz","asdf","quux","qwer","rewq"].forEach(function (w) {
+ w = "/tmp/glob-test/" + w
+ tap.test("create " + w, function (t) {
+ mkdirp(w, function (er) {
+ if (er)
+ throw er
+ t.pass(w)
+ t.end()
+ })
+ })
+})
+
+
+// generate the bash pattern test-fixtures if possible
+if (process.platform === "win32" || !process.env.TEST_REGEN) {
+ console.error("Windows, or TEST_REGEN unset. Using cached fixtures.")
+ return
+}
+
+var spawn = require("child_process").spawn;
+var globs =
+ // put more patterns here.
+ // anything that would be directly in / should be in /tmp/glob-test
+ ["test/a/*/+(c|g)/./d"
+ ,"test/a/**/[cg]/../[cg]"
+ ,"test/a/{b,c,d,e,f}/**/g"
+ ,"test/a/b/**"
+ ,"test/**/g"
+ ,"test/a/abc{fed,def}/g/h"
+ ,"test/a/abc{fed/g,def}/**/"
+ ,"test/a/abc{fed/g,def}/**///**/"
+ ,"test/**/a/**/"
+ ,"test/+(a|b|c)/a{/,bc*}/**"
+ ,"test/*/*/*/f"
+ ,"test/**/f"
+ ,"test/a/symlink/a/b/c/a/b/c/a/b/c//a/b/c////a/b/c/**/b/c/**"
+ ,"{./*/*,/tmp/glob-test/*}"
+ ,"{/tmp/glob-test/*,*}" // evil owl face! how you taunt me!
+ ,"test/a/!(symlink)/**"
+ ]
+var bashOutput = {}
+var fs = require("fs")
+
+globs.forEach(function (pattern) {
+ tap.test("generate fixture " + pattern, function (t) {
+ var cmd = "shopt -s globstar && " +
+ "shopt -s extglob && " +
+ "shopt -s nullglob && " +
+ // "shopt >&2; " +
+ "eval \'for i in " + pattern + "; do echo $i; done\'"
+ var cp = spawn("bash", ["-c", cmd], { cwd: path.dirname(__dirname) })
+ var out = []
+ cp.stdout.on("data", function (c) {
+ out.push(c)
+ })
+ cp.stderr.pipe(process.stderr)
+ cp.on("close", function (code) {
+ out = flatten(out)
+ if (!out)
+ out = []
+ else
+ out = cleanResults(out.split(/\r*\n/))
+
+ bashOutput[pattern] = out
+ t.notOk(code, "bash test should finish nicely")
+ t.end()
+ })
+ })
+})
+
+tap.test("save fixtures", function (t) {
+ var fname = path.resolve(__dirname, "bash-results.json")
+ var data = JSON.stringify(bashOutput, null, 2) + "\n"
+ fs.writeFile(fname, data, function (er) {
+ t.ifError(er)
+ t.end()
+ })
+})
+
+function cleanResults (m) {
+ // normalize discrepancies in ordering, duplication,
+ // and ending slashes.
+ return m.map(function (m) {
+ return m.replace(/\/+/g, "/").replace(/\/$/, "")
+ }).sort(alphasort).reduce(function (set, f) {
+ if (f !== set[set.length - 1]) set.push(f)
+ return set
+ }, []).sort(alphasort).map(function (f) {
+ // de-windows
+ return (process.platform !== 'win32') ? f
+ : f.replace(/^[a-zA-Z]:\\\\/, '/').replace(/\\/g, '/')
+ })
+}
+
+function flatten (chunks) {
+ var s = 0
+ chunks.forEach(function (c) { s += c.length })
+ var out = new Buffer(s)
+ s = 0
+ chunks.forEach(function (c) {
+ c.copy(out, s)
+ s += c.length
+ })
+
+ return out.toString().trim()
+}
+
+function alphasort (a, b) {
+ a = a.toLowerCase()
+ b = b.toLowerCase()
+ return a > b ? 1 : a < b ? -1 : 0
+}
diff --git a/node_modules/globule/node_modules/glob/test/bash-comparison.js b/node_modules/globule/node_modules/glob/test/bash-comparison.js
new file mode 100644
index 000000000..239ed1a9c
--- /dev/null
+++ b/node_modules/globule/node_modules/glob/test/bash-comparison.js
@@ -0,0 +1,63 @@
+// basic test
+// show that it does the same thing by default as the shell.
+var tap = require("tap")
+, child_process = require("child_process")
+, bashResults = require("./bash-results.json")
+, globs = Object.keys(bashResults)
+, glob = require("../")
+, path = require("path")
+
+// run from the root of the project
+// this is usually where you're at anyway, but be sure.
+process.chdir(path.resolve(__dirname, ".."))
+
+function alphasort (a, b) {
+ a = a.toLowerCase()
+ b = b.toLowerCase()
+ return a > b ? 1 : a < b ? -1 : 0
+}
+
+globs.forEach(function (pattern) {
+ var expect = bashResults[pattern]
+ // anything regarding the symlink thing will fail on windows, so just skip it
+ if (process.platform === "win32" &&
+ expect.some(function (m) {
+ return /\/symlink\//.test(m)
+ }))
+ return
+
+ tap.test(pattern, function (t) {
+ glob(pattern, function (er, matches) {
+ if (er)
+ throw er
+
+ // sort and unmark, just to match the shell results
+ matches = cleanResults(matches)
+
+ t.deepEqual(matches, expect, pattern)
+ t.end()
+ })
+ })
+
+ tap.test(pattern + " sync", function (t) {
+ var matches = cleanResults(glob.sync(pattern))
+
+ t.deepEqual(matches, expect, "should match shell")
+ t.end()
+ })
+})
+
+function cleanResults (m) {
+ // normalize discrepancies in ordering, duplication,
+ // and ending slashes.
+ return m.map(function (m) {
+ return m.replace(/\/+/g, "/").replace(/\/$/, "")
+ }).sort(alphasort).reduce(function (set, f) {
+ if (f !== set[set.length - 1]) set.push(f)
+ return set
+ }, []).sort(alphasort).map(function (f) {
+ // de-windows
+ return (process.platform !== 'win32') ? f
+ : f.replace(/^[a-zA-Z]:[\/\\]+/, '/').replace(/[\\\/]+/g, '/')
+ })
+}
diff --git a/node_modules/globule/node_modules/glob/test/bash-results.json b/node_modules/globule/node_modules/glob/test/bash-results.json
new file mode 100644
index 000000000..c227449b6
--- /dev/null
+++ b/node_modules/globule/node_modules/glob/test/bash-results.json
@@ -0,0 +1,348 @@
+{
+ "test/a/*/+(c|g)/./d": [
+ "test/a/b/c/./d"
+ ],
+ "test/a/**/[cg]/../[cg]": [
+ "test/a/abcdef/g/../g",
+ "test/a/abcfed/g/../g",
+ "test/a/b/c/../c",
+ "test/a/c/../c",
+ "test/a/c/d/c/../c",
+ "test/a/symlink/a/b/c/../c",
+ "test/a/symlink/a/b/c/a/b/c/../c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/../c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/../c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/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{b,c,d,e,f}/**/g": [],
+ "test/a/b/**": [
+ "test/a/b",
+ "test/a/b/c",
+ "test/a/b/c/d"
+ ],
+ "test/**/g": [
+ "test/a/abcdef/g",
+ "test/a/abcfed/g"
+ ],
+ "test/a/abc{fed,def}/g/h": [
+ "test/a/abcdef/g/h",
+ "test/a/abcfed/g/h"
+ ],
+ "test/a/abc{fed/g,def}/**/": [
+ "test/a/abcdef",
+ "test/a/abcdef/g",
+ "test/a/abcfed/g"
+ ],
+ "test/a/abc{fed/g,def}/**///**/": [
+ "test/a/abcdef",
+ "test/a/abcdef/g",
+ "test/a/abcfed/g"
+ ],
+ "test/**/a/**/": [
+ "test/a",
+ "test/a/abcdef",
+ "test/a/abcdef/g",
+ "test/a/abcfed",
+ "test/a/abcfed/g",
+ "test/a/b",
+ "test/a/b/c",
+ "test/a/bc",
+ "test/a/bc/e",
+ "test/a/c",
+ "test/a/c/d",
+ "test/a/c/d/c",
+ "test/a/cb",
+ "test/a/cb/e",
+ "test/a/symlink",
+ "test/a/symlink/a",
+ "test/a/symlink/a/b",
+ "test/a/symlink/a/b/c",
+ "test/a/symlink/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink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/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b"
+ ],
+ "test/+(a|b|c)/a{/,bc*}/**": [
+ "test/a/abcdef",
+ "test/a/abcdef/g",
+ "test/a/abcdef/g/h",
+ "test/a/abcfed",
+ "test/a/abcfed/g",
+ "test/a/abcfed/g/h"
+ ],
+ "test/*/*/*/f": [
+ "test/a/bc/e/f",
+ "test/a/cb/e/f"
+ ],
+ "test/**/f": [
+ "test/a/bc/e/f",
+ "test/a/cb/e/f"
+ ],
+ "test/a/symlink/a/b/c/a/b/c/a/b/c//a/b/c////a/b/c/**/b/c/**": [
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a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/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c"
+ ],
+ "{./*/*,/tmp/glob-test/*}": [
+ "./examples/g.js",
+ "./examples/usr-local.js",
+ "./node_modules/graceful-fs",
+ "./node_modules/inherits",
+ "./node_modules/minimatch",
+ "./node_modules/mkdirp",
+ "./node_modules/rimraf",
+ "./node_modules/tap",
+ "./test/00-setup.js",
+ "./test/a",
+ "./test/bash-comparison.js",
+ "./test/bash-results.json",
+ "./test/cwd-test.js",
+ "./test/mark.js",
+ "./test/nocase-nomagic.js",
+ "./test/pause-resume.js",
+ "./test/root-nomount.js",
+ "./test/root.js",
+ "./test/zz-cleanup.js",
+ "/tmp/glob-test/asdf",
+ "/tmp/glob-test/bar",
+ "/tmp/glob-test/baz",
+ "/tmp/glob-test/foo",
+ "/tmp/glob-test/quux",
+ "/tmp/glob-test/qwer",
+ "/tmp/glob-test/rewq"
+ ],
+ "{/tmp/glob-test/*,*}": [
+ "/tmp/glob-test/asdf",
+ "/tmp/glob-test/bar",
+ "/tmp/glob-test/baz",
+ "/tmp/glob-test/foo",
+ "/tmp/glob-test/quux",
+ "/tmp/glob-test/qwer",
+ "/tmp/glob-test/rewq",
+ "examples",
+ "glob.js",
+ "LICENSE",
+ "node_modules",
+ "package.json",
+ "README.md",
+ "test"
+ ],
+ "test/a/!(symlink)/**": [
+ "test/a/abcdef",
+ "test/a/abcdef/g",
+ "test/a/abcdef/g/h",
+ "test/a/abcfed",
+ "test/a/abcfed/g",
+ "test/a/abcfed/g/h",
+ "test/a/b",
+ "test/a/b/c",
+ "test/a/b/c/d",
+ "test/a/bc",
+ "test/a/bc/e",
+ "test/a/bc/e/f",
+ "test/a/c",
+ "test/a/c/d",
+ "test/a/c/d/c",
+ "test/a/c/d/c/b",
+ "test/a/cb",
+ "test/a/cb/e",
+ "test/a/cb/e/f"
+ ]
+}
diff --git a/node_modules/globule/node_modules/glob/test/cwd-test.js b/node_modules/globule/node_modules/glob/test/cwd-test.js
new file mode 100644
index 000000000..352c27efa
--- /dev/null
+++ b/node_modules/globule/node_modules/glob/test/cwd-test.js
@@ -0,0 +1,55 @@
+var tap = require("tap")
+
+var origCwd = process.cwd()
+process.chdir(__dirname)
+
+tap.test("changing cwd and searching for **/d", function (t) {
+ var glob = require('../')
+ var path = require('path')
+ t.test('.', function (t) {
+ glob('**/d', function (er, matches) {
+ t.ifError(er)
+ t.like(matches, [ 'a/b/c/d', 'a/c/d' ])
+ t.end()
+ })
+ })
+
+ t.test('a', function (t) {
+ glob('**/d', {cwd:path.resolve('a')}, function (er, matches) {
+ t.ifError(er)
+ t.like(matches, [ 'b/c/d', 'c/d' ])
+ t.end()
+ })
+ })
+
+ t.test('a/b', function (t) {
+ glob('**/d', {cwd:path.resolve('a/b')}, function (er, matches) {
+ t.ifError(er)
+ t.like(matches, [ 'c/d' ])
+ t.end()
+ })
+ })
+
+ t.test('a/b/', function (t) {
+ glob('**/d', {cwd:path.resolve('a/b/')}, function (er, matches) {
+ t.ifError(er)
+ t.like(matches, [ 'c/d' ])
+ t.end()
+ })
+ })
+
+ t.test('.', function (t) {
+ glob('**/d', {cwd: process.cwd()}, function (er, matches) {
+ t.ifError(er)
+ t.like(matches, [ 'a/b/c/d', 'a/c/d' ])
+ t.end()
+ })
+ })
+
+ t.test('cd -', function (t) {
+ process.chdir(origCwd)
+ t.end()
+ })
+
+ t.end()
+})
diff --git a/node_modules/globule/node_modules/glob/test/mark.js b/node_modules/globule/node_modules/glob/test/mark.js
new file mode 100644
index 000000000..ed68a335c
--- /dev/null
+++ b/node_modules/globule/node_modules/glob/test/mark.js
@@ -0,0 +1,74 @@
+var test = require("tap").test
+var glob = require('../')
+process.chdir(__dirname)
+
+test("mark, no / on pattern", function (t) {
+ glob("a/*", {mark: true}, function (er, results) {
+ if (er)
+ throw er
+ var expect = [ 'a/abcdef/',
+ 'a/abcfed/',
+ 'a/b/',
+ 'a/bc/',
+ 'a/c/',
+ 'a/cb/' ]
+
+ if (process.platform !== "win32")
+ expect.push('a/symlink/')
+
+ t.same(results, expect)
+ t.end()
+ })
+})
+
+test("mark=false, no / on pattern", function (t) {
+ glob("a/*", function (er, results) {
+ if (er)
+ throw er
+ var expect = [ 'a/abcdef',
+ 'a/abcfed',
+ 'a/b',
+ 'a/bc',
+ 'a/c',
+ 'a/cb' ]
+
+ if (process.platform !== "win32")
+ expect.push('a/symlink')
+ t.same(results, expect)
+ t.end()
+ })
+})
+
+test("mark=true, / on pattern", function (t) {
+ glob("a/*/", {mark: true}, function (er, results) {
+ if (er)
+ throw er
+ var expect = [ 'a/abcdef/',
+ 'a/abcfed/',
+ 'a/b/',
+ 'a/bc/',
+ 'a/c/',
+ 'a/cb/' ]
+ if (process.platform !== "win32")
+ expect.push('a/symlink/')
+ t.same(results, expect)
+ t.end()
+ })
+})
+
+test("mark=false, / on pattern", function (t) {
+ glob("a/*/", function (er, results) {
+ if (er)
+ throw er
+ var expect = [ 'a/abcdef/',
+ 'a/abcfed/',
+ 'a/b/',
+ 'a/bc/',
+ 'a/c/',
+ 'a/cb/' ]
+ if (process.platform !== "win32")
+ expect.push('a/symlink/')
+ t.same(results, expect)
+ t.end()
+ })
+})
diff --git a/node_modules/globule/node_modules/glob/test/nocase-nomagic.js b/node_modules/globule/node_modules/glob/test/nocase-nomagic.js
new file mode 100644
index 000000000..d86297098
--- /dev/null
+++ b/node_modules/globule/node_modules/glob/test/nocase-nomagic.js
@@ -0,0 +1,113 @@
+var fs = require('graceful-fs');
+var test = require('tap').test;
+var glob = require('../');
+
+test('mock fs', function(t) {
+ var stat = fs.stat
+ var statSync = fs.statSync
+ var readdir = fs.readdir
+ var readdirSync = fs.readdirSync
+
+ function fakeStat(path) {
+ var ret
+ switch (path.toLowerCase()) {
+ case '/tmp': case '/tmp/':
+ ret = { isDirectory: function() { return true } }
+ break
+ case '/tmp/a':
+ ret = { isDirectory: function() { return false } }
+ break
+ }
+ return ret
+ }
+
+ fs.stat = function(path, cb) {
+ var f = fakeStat(path);
+ if (f) {
+ process.nextTick(function() {
+ cb(null, f)
+ })
+ } else {
+ stat.call(fs, path, cb)
+ }
+ }
+
+ fs.statSync = function(path) {
+ return fakeStat(path) || statSync.call(fs, path)
+ }
+
+ function fakeReaddir(path) {
+ var ret
+ switch (path.toLowerCase()) {
+ case '/tmp': case '/tmp/':
+ ret = [ 'a', 'A' ]
+ break
+ case '/':
+ ret = ['tmp', 'tMp', 'tMP', 'TMP']
+ }
+ return ret
+ }
+
+ fs.readdir = function(path, cb) {
+ var f = fakeReaddir(path)
+ if (f)
+ process.nextTick(function() {
+ cb(null, f)
+ })
+ else
+ readdir.call(fs, path, cb)
+ }
+
+ fs.readdirSync = function(path) {
+ return fakeReaddir(path) || readdirSync.call(fs, path)
+ }
+
+ t.pass('mocked')
+ t.end()
+})
+
+test('nocase, nomagic', function(t) {
+ var n = 2
+ var want = [ '/TMP/A',
+ '/TMP/a',
+ '/tMP/A',
+ '/tMP/a',
+ '/tMp/A',
+ '/tMp/a',
+ '/tmp/A',
+ '/tmp/a' ]
+ glob('/tmp/a', { nocase: true }, function(er, res) {
+ if (er)
+ throw er
+ t.same(res.sort(), want)
+ if (--n === 0) t.end()
+ })
+ glob('/tmp/A', { nocase: true }, function(er, res) {
+ if (er)
+ throw er
+ t.same(res.sort(), want)
+ if (--n === 0) t.end()
+ })
+})
+
+test('nocase, with some magic', function(t) {
+ t.plan(2)
+ var want = [ '/TMP/A',
+ '/TMP/a',
+ '/tMP/A',
+ '/tMP/a',
+ '/tMp/A',
+ '/tMp/a',
+ '/tmp/A',
+ '/tmp/a' ]
+ glob('/tmp/*', { nocase: true }, function(er, res) {
+ if (er)
+ throw er
+ t.same(res.sort(), want)
+ })
+ glob('/tmp/*', { nocase: true }, function(er, res) {
+ if (er)
+ throw er
+ t.same(res.sort(), want)
+ })
+})
diff --git a/node_modules/globule/node_modules/glob/test/pause-resume.js b/node_modules/globule/node_modules/glob/test/pause-resume.js
new file mode 100644
index 000000000..e1ffbab1c
--- /dev/null
+++ b/node_modules/globule/node_modules/glob/test/pause-resume.js
@@ -0,0 +1,73 @@
+// show that no match events happen while paused.
+var tap = require("tap")
+, child_process = require("child_process")
+// just some gnarly pattern with lots of matches
+, pattern = "test/a/!(symlink)/**"
+, bashResults = require("./bash-results.json")
+, patterns = Object.keys(bashResults)
+, glob = require("../")
+, Glob = glob.Glob
+, path = require("path")
+
+// run from the root of the project
+// this is usually where you're at anyway, but be sure.
+process.chdir(path.resolve(__dirname, ".."))
+
+function alphasort (a, b) {
+ a = a.toLowerCase()
+ b = b.toLowerCase()
+ return a > b ? 1 : a < b ? -1 : 0
+}
+
+function cleanResults (m) {
+ // normalize discrepancies in ordering, duplication,
+ // and ending slashes.
+ return m.map(function (m) {
+ return m.replace(/\/+/g, "/").replace(/\/$/, "")
+ }).sort(alphasort).reduce(function (set, f) {
+ if (f !== set[set.length - 1]) set.push(f)
+ return set
+ }, []).sort(alphasort).map(function (f) {
+ // de-windows
+ return (process.platform !== 'win32') ? f
+ : f.replace(/^[a-zA-Z]:\\\\/, '/').replace(/\\/g, '/')
+ })
+}
+
+var globResults = []
+tap.test("use a Glob object, and pause/resume it", function (t) {
+ var g = new Glob(pattern)
+ , paused = false
+ , res = []
+ , expect = bashResults[pattern]
+
+ g.on("pause", function () {
+ console.error("pause")
+ })
+
+ g.on("resume", function () {
+ console.error("resume")
+ })
+
+ g.on("match", function (m) {
+ t.notOk(g.paused, "must not be paused")
+ globResults.push(m)
+ g.pause()
+ t.ok(g.paused, "must be paused")
+ setTimeout(g.resume.bind(g), 10)
+ })
+
+ g.on("end", function (matches) {
+ t.pass("reached glob end")
+ globResults = cleanResults(globResults)
+ matches = cleanResults(matches)
+ t.deepEqual(matches, globResults,
+ "end event matches should be the same as match events")
+
+ t.deepEqual(matches, expect,
+ "glob matches should be the same as bash results")
+
+ t.end()
+ })
+})
+
diff --git a/node_modules/globule/node_modules/glob/test/root-nomount.js b/node_modules/globule/node_modules/glob/test/root-nomount.js
new file mode 100644
index 000000000..3ac5979b0
--- /dev/null
+++ b/node_modules/globule/node_modules/glob/test/root-nomount.js
@@ -0,0 +1,39 @@
+var tap = require("tap")
+
+var origCwd = process.cwd()
+process.chdir(__dirname)
+
+tap.test("changing root and searching for /b*/**", function (t) {
+ var glob = require('../')
+ var path = require('path')
+ t.test('.', function (t) {
+ glob('/b*/**', { globDebug: true, root: '.', nomount: true }, function (er, matches) {
+ t.ifError(er)
+ t.like(matches, [])
+ t.end()
+ })
+ })
+
+ t.test('a', function (t) {
+ glob('/b*/**', { globDebug: true, root: path.resolve('a'), nomount: true }, function (er, matches) {
+ t.ifError(er)
+ t.like(matches, [ '/b', '/b/c', '/b/c/d', '/bc', '/bc/e', '/bc/e/f' ])
+ t.end()
+ })
+ })
+
+ t.test('root=a, cwd=a/b', function (t) {
+ glob('/b*/**', { globDebug: true, root: 'a', cwd: path.resolve('a/b'), nomount: true }, function (er, matches) {
+ t.ifError(er)
+ t.like(matches, [ '/b', '/b/c', '/b/c/d', '/bc', '/bc/e', '/bc/e/f' ])
+ t.end()
+ })
+ })
+
+ t.test('cd -', function (t) {
+ process.chdir(origCwd)
+ t.end()
+ })
+
+ t.end()
+})
diff --git a/node_modules/globule/node_modules/glob/test/root.js b/node_modules/globule/node_modules/glob/test/root.js
new file mode 100644
index 000000000..95c23f99c
--- /dev/null
+++ b/node_modules/globule/node_modules/glob/test/root.js
@@ -0,0 +1,46 @@
+var t = require("tap")
+
+var origCwd = process.cwd()
+process.chdir(__dirname)
+
+var glob = require('../')
+var path = require('path')
+
+t.test('.', function (t) {
+ glob('/b*/**', { globDebug: true, root: '.' }, function (er, matches) {
+ t.ifError(er)
+ t.like(matches, [])
+ t.end()
+ })
+})
+
+
+t.test('a', function (t) {
+ console.error("root=" + path.resolve('a'))
+ glob('/b*/**', { globDebug: true, root: path.resolve('a') }, function (er, matches) {
+ t.ifError(er)
+ var wanted = [
+ '/b', '/b/c', '/b/c/d', '/bc', '/bc/e', '/bc/e/f'
+ ].map(function (m) {
+ return path.join(path.resolve('a'), m).replace(/\\/g, '/')
+ })
+
+ t.like(matches, wanted)
+ t.end()
+ })
+})
+
+t.test('root=a, cwd=a/b', function (t) {
+ glob('/b*/**', { globDebug: true, root: 'a', cwd: path.resolve('a/b') }, function (er, matches) {
+ t.ifError(er)
+ t.like(matches, [ '/b', '/b/c', '/b/c/d', '/bc', '/bc/e', '/bc/e/f' ].map(function (m) {
+ return path.join(path.resolve('a'), m).replace(/\\/g, '/')
+ }))
+ t.end()
+ })
+})
+
+t.test('cd -', function (t) {
+ process.chdir(origCwd)
+ t.end()
+})
diff --git a/node_modules/globule/node_modules/glob/test/zz-cleanup.js b/node_modules/globule/node_modules/glob/test/zz-cleanup.js
new file mode 100644
index 000000000..e085f0fa7
--- /dev/null
+++ b/node_modules/globule/node_modules/glob/test/zz-cleanup.js
@@ -0,0 +1,11 @@
+// remove the fixtures
+var tap = require("tap")
+, rimraf = require("rimraf")
+, path = require("path")
+
+tap.test("cleanup fixtures", function (t) {
+ rimraf(path.resolve(__dirname, "a"), function (er) {
+ t.ifError(er, "removed")
+ t.end()
+ })
+})
diff --git a/node_modules/globule/node_modules/graceful-fs/.npmignore b/node_modules/globule/node_modules/graceful-fs/.npmignore
new file mode 100644
index 000000000..c2658d7d1
--- /dev/null
+++ b/node_modules/globule/node_modules/graceful-fs/.npmignore
@@ -0,0 +1 @@
+node_modules/
diff --git a/node_modules/globule/node_modules/graceful-fs/LICENSE b/node_modules/globule/node_modules/graceful-fs/LICENSE
new file mode 100644
index 000000000..0c44ae716
--- /dev/null
+++ b/node_modules/globule/node_modules/graceful-fs/LICENSE
@@ -0,0 +1,27 @@
+Copyright (c) Isaac Z. Schlueter ("Author")
+All rights reserved.
+
+The BSD License
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS
+BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/node_modules/globule/node_modules/graceful-fs/README.md b/node_modules/globule/node_modules/graceful-fs/README.md
new file mode 100644
index 000000000..01af3d6b6
--- /dev/null
+++ b/node_modules/globule/node_modules/graceful-fs/README.md
@@ -0,0 +1,33 @@
+# graceful-fs
+
+graceful-fs functions as a drop-in replacement for the fs module,
+making various improvements.
+
+The improvements are meant to normalize behavior across different
+platforms and environments, and to make filesystem access more
+resilient to errors.
+
+## Improvements over fs module
+
+graceful-fs:
+
+* keeps track of how many file descriptors are open, and by default
+ limits this to 1024. Any further requests to open a file are put in a
+ queue until new slots become available. If 1024 turns out to be too
+ much, it decreases the limit further.
+* fixes `lchmod` for Node versions prior to 0.6.2.
+* implements `fs.lutimes` if possible. Otherwise it becomes a noop.
+* ignores `EINVAL` and `EPERM` errors in `chown`, `fchown` or
+ `lchown` if the user isn't root.
+* makes `lchmod` and `lchown` become noops, if not available.
+* retries reading a file if `read` results in EAGAIN error.
+
+On Windows, it retries renaming a file for up to one second if `EACCESS`
+or `EPERM` error occurs, likely because antivirus software has locked
+the directory.
+
+## Configuration
+
+The maximum number of open file descriptors that graceful-fs manages may
+be adjusted by setting `fs.MAX_OPEN` to a different number. The default
+is 1024.
diff --git a/node_modules/globule/node_modules/graceful-fs/graceful-fs.js b/node_modules/globule/node_modules/graceful-fs/graceful-fs.js
new file mode 100644
index 000000000..ca9115243
--- /dev/null
+++ b/node_modules/globule/node_modules/graceful-fs/graceful-fs.js
@@ -0,0 +1,442 @@
+// this keeps a queue of opened file descriptors, and will make
+// fs operations wait until some have closed before trying to open more.
+
+var fs = exports = module.exports = {}
+fs._originalFs = require("fs")
+
+Object.getOwnPropertyNames(fs._originalFs).forEach(function(prop) {
+ var desc = Object.getOwnPropertyDescriptor(fs._originalFs, prop)
+ Object.defineProperty(fs, prop, desc)
+})
+
+var queue = []
+ , constants = require("constants")
+
+fs._curOpen = 0
+
+fs.MIN_MAX_OPEN = 64
+fs.MAX_OPEN = 1024
+
+// prevent EMFILE errors
+function OpenReq (path, flags, mode, cb) {
+ this.path = path
+ this.flags = flags
+ this.mode = mode
+ this.cb = cb
+}
+
+function noop () {}
+
+fs.open = gracefulOpen
+
+function gracefulOpen (path, flags, mode, cb) {
+ if (typeof mode === "function") cb = mode, mode = null
+ if (typeof cb !== "function") cb = noop
+
+ if (fs._curOpen >= fs.MAX_OPEN) {
+ queue.push(new OpenReq(path, flags, mode, cb))
+ setTimeout(flush)
+ return
+ }
+ open(path, flags, mode, function (er, fd) {
+ if (er && er.code === "EMFILE" && fs._curOpen > fs.MIN_MAX_OPEN) {
+ // that was too many. reduce max, get back in queue.
+ // this should only happen once in a great while, and only
+ // if the ulimit -n is set lower than 1024.
+ fs.MAX_OPEN = fs._curOpen - 1
+ return fs.open(path, flags, mode, cb)
+ }
+ cb(er, fd)
+ })
+}
+
+function open (path, flags, mode, cb) {
+ cb = cb || noop
+ fs._curOpen ++
+ fs._originalFs.open.call(fs, path, flags, mode, function (er, fd) {
+ if (er) onclose()
+ cb(er, fd)
+ })
+}
+
+fs.openSync = function (path, flags, mode) {
+ var ret
+ ret = fs._originalFs.openSync.call(fs, path, flags, mode)
+ fs._curOpen ++
+ return ret
+}
+
+function onclose () {
+ fs._curOpen --
+ flush()
+}
+
+function flush () {
+ while (fs._curOpen < fs.MAX_OPEN) {
+ var req = queue.shift()
+ if (!req) return
+ switch (req.constructor.name) {
+ case 'OpenReq':
+ open(req.path, req.flags || "r", req.mode || 0777, req.cb)
+ break
+ case 'ReaddirReq':
+ readdir(req.path, req.cb)
+ break
+ case 'ReadFileReq':
+ readFile(req.path, req.options, req.cb)
+ break
+ case 'WriteFileReq':
+ writeFile(req.path, req.data, req.options, req.cb)
+ break
+ default:
+ throw new Error('Unknown req type: ' + req.constructor.name)
+ }
+ }
+}
+
+fs.close = function (fd, cb) {
+ cb = cb || noop
+ fs._originalFs.close.call(fs, fd, function (er) {
+ onclose()
+ cb(er)
+ })
+}
+
+fs.closeSync = function (fd) {
+ try {
+ return fs._originalFs.closeSync.call(fs, fd)
+ } finally {
+ onclose()
+ }
+}
+
+
+// readdir takes a fd as well.
+// however, the sync version closes it right away, so
+// there's no need to wrap.
+// It would be nice to catch when it throws an EMFILE,
+// but that's relatively rare anyway.
+
+fs.readdir = gracefulReaddir
+
+function gracefulReaddir (path, cb) {
+ if (fs._curOpen >= fs.MAX_OPEN) {
+ queue.push(new ReaddirReq(path, cb))
+ setTimeout(flush)
+ return
+ }
+
+ readdir(path, function (er, files) {
+ if (er && er.code === "EMFILE" && fs._curOpen > fs.MIN_MAX_OPEN) {
+ fs.MAX_OPEN = fs._curOpen - 1
+ return fs.readdir(path, cb)
+ }
+ cb(er, files)
+ })
+}
+
+function readdir (path, cb) {
+ cb = cb || noop
+ fs._curOpen ++
+ fs._originalFs.readdir.call(fs, path, function (er, files) {
+ onclose()
+ cb(er, files)
+ })
+}
+
+function ReaddirReq (path, cb) {
+ this.path = path
+ this.cb = cb
+}
+
+
+fs.readFile = gracefulReadFile
+
+function gracefulReadFile(path, options, cb) {
+ if (typeof options === "function") cb = options, options = null
+ if (typeof cb !== "function") cb = noop
+
+ if (fs._curOpen >= fs.MAX_OPEN) {
+ queue.push(new ReadFileReq(path, options, cb))
+ setTimeout(flush)
+ return
+ }
+
+ readFile(path, options, function (er, data) {
+ if (er && er.code === "EMFILE" && fs._curOpen > fs.MIN_MAX_OPEN) {
+ fs.MAX_OPEN = fs._curOpen - 1
+ return fs.readFile(path, options, cb)
+ }
+ cb(er, data)
+ })
+}
+
+function readFile (path, options, cb) {
+ cb = cb || noop
+ fs._curOpen ++
+ fs._originalFs.readFile.call(fs, path, options, function (er, data) {
+ onclose()
+ cb(er, data)
+ })
+}
+
+function ReadFileReq (path, options, cb) {
+ this.path = path
+ this.options = options
+ this.cb = cb
+}
+
+
+
+
+fs.writeFile = gracefulWriteFile
+
+function gracefulWriteFile(path, data, options, cb) {
+ if (typeof options === "function") cb = options, options = null
+ if (typeof cb !== "function") cb = noop
+
+ if (fs._curOpen >= fs.MAX_OPEN) {
+ queue.push(new WriteFileReq(path, data, options, cb))
+ setTimeout(flush)
+ return
+ }
+
+ writeFile(path, data, options, function (er) {
+ if (er && er.code === "EMFILE" && fs._curOpen > fs.MIN_MAX_OPEN) {
+ fs.MAX_OPEN = fs._curOpen - 1
+ return fs.writeFile(path, data, options, cb)
+ }
+ cb(er)
+ })
+}
+
+function writeFile (path, data, options, cb) {
+ cb = cb || noop
+ fs._curOpen ++
+ fs._originalFs.writeFile.call(fs, path, data, options, function (er) {
+ onclose()
+ cb(er)
+ })
+}
+
+function WriteFileReq (path, data, options, cb) {
+ this.path = path
+ this.data = data
+ this.options = options
+ this.cb = cb
+}
+
+
+// (re-)implement some things that are known busted or missing.
+
+var constants = require("constants")
+
+// lchmod, broken prior to 0.6.2
+// back-port the fix here.
+if (constants.hasOwnProperty('O_SYMLINK') &&
+ process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) {
+ fs.lchmod = function (path, mode, callback) {
+ callback = callback || noop
+ fs.open( path
+ , constants.O_WRONLY | constants.O_SYMLINK
+ , mode
+ , function (err, fd) {
+ if (err) {
+ callback(err)
+ return
+ }
+ // prefer to return the chmod error, if one occurs,
+ // but still try to close, and report closing errors if they occur.
+ fs.fchmod(fd, mode, function (err) {
+ fs.close(fd, function(err2) {
+ callback(err || err2)
+ })
+ })
+ })
+ }
+
+ fs.lchmodSync = function (path, mode) {
+ var fd = fs.openSync(path, constants.O_WRONLY | constants.O_SYMLINK, mode)
+
+ // prefer to return the chmod error, if one occurs,
+ // but still try to close, and report closing errors if they occur.
+ var err, err2
+ try {
+ var ret = fs.fchmodSync(fd, mode)
+ } catch (er) {
+ err = er
+ }
+ try {
+ fs.closeSync(fd)
+ } catch (er) {
+ err2 = er
+ }
+ if (err || err2) throw (err || err2)
+ return ret
+ }
+}
+
+
+// lutimes implementation, or no-op
+if (!fs.lutimes) {
+ if (constants.hasOwnProperty("O_SYMLINK")) {
+ fs.lutimes = function (path, at, mt, cb) {
+ fs.open(path, constants.O_SYMLINK, function (er, fd) {
+ cb = cb || noop
+ if (er) return cb(er)
+ fs.futimes(fd, at, mt, function (er) {
+ fs.close(fd, function (er2) {
+ return cb(er || er2)
+ })
+ })
+ })
+ }
+
+ fs.lutimesSync = function (path, at, mt) {
+ var fd = fs.openSync(path, constants.O_SYMLINK)
+ , err
+ , err2
+ , ret
+
+ try {
+ var ret = fs.futimesSync(fd, at, mt)
+ } catch (er) {
+ err = er
+ }
+ try {
+ fs.closeSync(fd)
+ } catch (er) {
+ err2 = er
+ }
+ if (err || err2) throw (err || err2)
+ return ret
+ }
+
+ } else if (fs.utimensat && constants.hasOwnProperty("AT_SYMLINK_NOFOLLOW")) {
+ // maybe utimensat will be bound soonish?
+ fs.lutimes = function (path, at, mt, cb) {
+ fs.utimensat(path, at, mt, constants.AT_SYMLINK_NOFOLLOW, cb)
+ }
+
+ fs.lutimesSync = function (path, at, mt) {
+ return fs.utimensatSync(path, at, mt, constants.AT_SYMLINK_NOFOLLOW)
+ }
+
+ } else {
+ fs.lutimes = function (_a, _b, _c, cb) { process.nextTick(cb) }
+ fs.lutimesSync = function () {}
+ }
+}
+
+
+// https://github.com/isaacs/node-graceful-fs/issues/4
+// Chown should not fail on einval or eperm if non-root.
+
+fs.chown = chownFix(fs.chown)
+fs.fchown = chownFix(fs.fchown)
+fs.lchown = chownFix(fs.lchown)
+
+fs.chownSync = chownFixSync(fs.chownSync)
+fs.fchownSync = chownFixSync(fs.fchownSync)
+fs.lchownSync = chownFixSync(fs.lchownSync)
+
+function chownFix (orig) {
+ if (!orig) return orig
+ return function (target, uid, gid, cb) {
+ return orig.call(fs, target, uid, gid, function (er, res) {
+ if (chownErOk(er)) er = null
+ cb(er, res)
+ })
+ }
+}
+
+function chownFixSync (orig) {
+ if (!orig) return orig
+ return function (target, uid, gid) {
+ try {
+ return orig.call(fs, target, uid, gid)
+ } catch (er) {
+ if (!chownErOk(er)) throw er
+ }
+ }
+}
+
+function chownErOk (er) {
+ // if there's no getuid, or if getuid() is something other than 0,
+ // and the error is EINVAL or EPERM, then just ignore it.
+ // This specific case is a silent failure in cp, install, tar,
+ // and most other unix tools that manage permissions.
+ // When running as root, or if other types of errors are encountered,
+ // then it's strict.
+ if (!er || (!process.getuid || process.getuid() !== 0)
+ && (er.code === "EINVAL" || er.code === "EPERM")) return true
+}
+
+
+// if lchmod/lchown do not exist, then make them no-ops
+if (!fs.lchmod) {
+ fs.lchmod = function (path, mode, cb) {
+ process.nextTick(cb)
+ }
+ fs.lchmodSync = function () {}
+}
+if (!fs.lchown) {
+ fs.lchown = function (path, uid, gid, cb) {
+ process.nextTick(cb)
+ }
+ fs.lchownSync = function () {}
+}
+
+
+
+// on Windows, A/V software can lock the directory, causing this
+// to fail with an EACCES or EPERM if the directory contains newly
+// created files. Try again on failure, for up to 1 second.
+if (process.platform === "win32") {
+ var rename_ = fs.rename
+ fs.rename = function rename (from, to, cb) {
+ var start = Date.now()
+ rename_(from, to, function CB (er) {
+ if (er
+ && (er.code === "EACCES" || er.code === "EPERM")
+ && Date.now() - start < 1000) {
+ return rename_(from, to, CB)
+ }
+ cb(er)
+ })
+ }
+}
+
+
+// if read() returns EAGAIN, then just try it again.
+var read = fs.read
+fs.read = function (fd, buffer, offset, length, position, callback_) {
+ var callback
+ if (callback_ && typeof callback_ === 'function') {
+ var eagCounter = 0
+ callback = function (er, _, __) {
+ if (er && er.code === 'EAGAIN' && eagCounter < 10) {
+ eagCounter ++
+ return read.call(fs, fd, buffer, offset, length, position, callback)
+ }
+ callback_.apply(this, arguments)
+ }
+ }
+ return read.call(fs, fd, buffer, offset, length, position, callback)
+}
+
+var readSync = fs.readSync
+fs.readSync = function (fd, buffer, offset, length, position) {
+ var eagCounter = 0
+ while (true) {
+ try {
+ return readSync.call(fs, fd, buffer, offset, length, position)
+ } catch (er) {
+ if (er.code === 'EAGAIN' && eagCounter < 10) {
+ eagCounter ++
+ continue
+ }
+ throw er
+ }
+ }
+}
diff --git a/node_modules/globule/node_modules/graceful-fs/package.json b/node_modules/globule/node_modules/graceful-fs/package.json
new file mode 100644
index 000000000..ed6e57bc2
--- /dev/null
+++ b/node_modules/globule/node_modules/graceful-fs/package.json
@@ -0,0 +1,101 @@
+{
+ "_args": [
+ [
+ {
+ "raw": "graceful-fs@~1.2.0",
+ "scope": null,
+ "escapedName": "graceful-fs",
+ "name": "graceful-fs",
+ "rawSpec": "~1.2.0",
+ "spec": ">=1.2.0 <1.3.0",
+ "type": "range"
+ },
+ "/home/dold/repos/taler/wallet-webex/node_modules/globule/node_modules/glob"
+ ]
+ ],
+ "_from": "graceful-fs@>=1.2.0 <1.3.0",
+ "_id": "graceful-fs@1.2.3",
+ "_inCache": true,
+ "_location": "/globule/graceful-fs",
+ "_npmUser": {
+ "name": "isaacs",
+ "email": "i@izs.me"
+ },
+ "_npmVersion": "1.3.2",
+ "_phantomChildren": {},
+ "_requested": {
+ "raw": "graceful-fs@~1.2.0",
+ "scope": null,
+ "escapedName": "graceful-fs",
+ "name": "graceful-fs",
+ "rawSpec": "~1.2.0",
+ "spec": ">=1.2.0 <1.3.0",
+ "type": "range"
+ },
+ "_requiredBy": [
+ "/globule/glob"
+ ],
+ "_resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-1.2.3.tgz",
+ "_shasum": "15a4806a57547cb2d2dbf27f42e89a8c3451b364",
+ "_shrinkwrap": null,
+ "_spec": "graceful-fs@~1.2.0",
+ "_where": "/home/dold/repos/taler/wallet-webex/node_modules/globule/node_modules/glob",
+ "author": {
+ "name": "Isaac Z. Schlueter",
+ "email": "i@izs.me",
+ "url": "http://blog.izs.me"
+ },
+ "bugs": {
+ "url": "https://github.com/isaacs/node-graceful-fs/issues"
+ },
+ "dependencies": {},
+ "deprecated": "graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.",
+ "description": "A drop-in replacement for fs, making various improvements.",
+ "devDependencies": {},
+ "directories": {
+ "test": "test"
+ },
+ "dist": {
+ "shasum": "15a4806a57547cb2d2dbf27f42e89a8c3451b364",
+ "tarball": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-1.2.3.tgz"
+ },
+ "engines": {
+ "node": ">=0.4.0"
+ },
+ "homepage": "https://github.com/isaacs/node-graceful-fs#readme",
+ "keywords": [
+ "fs",
+ "module",
+ "reading",
+ "retry",
+ "retries",
+ "queue",
+ "error",
+ "errors",
+ "handling",
+ "EMFILE",
+ "EAGAIN",
+ "EINVAL",
+ "EPERM",
+ "EACCESS"
+ ],
+ "license": "BSD",
+ "main": "graceful-fs.js",
+ "maintainers": [
+ {
+ "name": "isaacs",
+ "email": "i@izs.me"
+ }
+ ],
+ "name": "graceful-fs",
+ "optionalDependencies": {},
+ "readme": "ERROR: No README data found!",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/isaacs/node-graceful-fs.git"
+ },
+ "scripts": {
+ "test": "tap test/*.js"
+ },
+ "version": "1.2.3"
+}
diff --git a/node_modules/globule/node_modules/graceful-fs/test/open.js b/node_modules/globule/node_modules/graceful-fs/test/open.js
new file mode 100644
index 000000000..930d53257
--- /dev/null
+++ b/node_modules/globule/node_modules/graceful-fs/test/open.js
@@ -0,0 +1,46 @@
+var test = require('tap').test
+var fs = require('../graceful-fs.js')
+
+test('graceful fs is not fs', function (t) {
+ t.notEqual(fs, require('fs'))
+ t.end()
+})
+
+test('open an existing file works', function (t) {
+ var start = fs._curOpen
+ var fd = fs.openSync(__filename, 'r')
+ t.equal(fs._curOpen, start + 1)
+ fs.closeSync(fd)
+ t.equal(fs._curOpen, start)
+ fs.open(__filename, 'r', function (er, fd) {
+ if (er) throw er
+ t.equal(fs._curOpen, start + 1)
+ fs.close(fd, function (er) {
+ if (er) throw er
+ t.equal(fs._curOpen, start)
+ t.end()
+ })
+ })
+})
+
+test('open a non-existing file throws', function (t) {
+ var start = fs._curOpen
+ var er
+ try {
+ var fd = fs.openSync('this file does not exist', 'r')
+ } catch (x) {
+ er = x
+ }
+ t.ok(er, 'should throw')
+ t.notOk(fd, 'should not get an fd')
+ t.equal(er.code, 'ENOENT')
+ t.equal(fs._curOpen, start)
+
+ fs.open('neither does this file', 'r', function (er, fd) {
+ t.ok(er, 'should throw')
+ t.notOk(fd, 'should not get an fd')
+ t.equal(er.code, 'ENOENT')
+ t.equal(fs._curOpen, start)
+ t.end()
+ })
+})
diff --git a/node_modules/globule/node_modules/graceful-fs/test/ulimit.js b/node_modules/globule/node_modules/graceful-fs/test/ulimit.js
new file mode 100644
index 000000000..8d0882d0c
--- /dev/null
+++ b/node_modules/globule/node_modules/graceful-fs/test/ulimit.js
@@ -0,0 +1,158 @@
+var test = require('tap').test
+
+// simulated ulimit
+// this is like graceful-fs, but in reverse
+var fs_ = require('fs')
+var fs = require('../graceful-fs.js')
+var files = fs.readdirSync(__dirname)
+
+// Ok, no more actual file reading!
+
+var fds = 0
+var nextFd = 60
+var limit = 8
+fs_.open = function (path, flags, mode, cb) {
+ process.nextTick(function() {
+ ++fds
+ if (fds >= limit) {
+ --fds
+ var er = new Error('EMFILE Curses!')
+ er.code = 'EMFILE'
+ er.path = path
+ return cb(er)
+ } else {
+ cb(null, nextFd++)
+ }
+ })
+}
+
+fs_.openSync = function (path, flags, mode) {
+ if (fds >= limit) {
+ var er = new Error('EMFILE Curses!')
+ er.code = 'EMFILE'
+ er.path = path
+ throw er
+ } else {
+ ++fds
+ return nextFd++
+ }
+}
+
+fs_.close = function (fd, cb) {
+ process.nextTick(function () {
+ --fds
+ cb()
+ })
+}
+
+fs_.closeSync = function (fd) {
+ --fds
+}
+
+fs_.readdir = function (path, cb) {
+ process.nextTick(function() {
+ if (fds >= limit) {
+ var er = new Error('EMFILE Curses!')
+ er.code = 'EMFILE'
+ er.path = path
+ return cb(er)
+ } else {
+ ++fds
+ process.nextTick(function () {
+ --fds
+ cb(null, [__filename, "some-other-file.js"])
+ })
+ }
+ })
+}
+
+fs_.readdirSync = function (path) {
+ if (fds >= limit) {
+ var er = new Error('EMFILE Curses!')
+ er.code = 'EMFILE'
+ er.path = path
+ throw er
+ } else {
+ return [__filename, "some-other-file.js"]
+ }
+}
+
+
+test('open emfile autoreduce', function (t) {
+ fs.MIN_MAX_OPEN = 4
+ t.equal(fs.MAX_OPEN, 1024)
+
+ var max = 12
+ for (var i = 0; i < max; i++) {
+ fs.open(__filename, 'r', next(i))
+ }
+
+ var phase = 0
+
+ var expect =
+ [ [ 0, 60, null, 1024, 4, 12, 1 ],
+ [ 1, 61, null, 1024, 4, 12, 2 ],
+ [ 2, 62, null, 1024, 4, 12, 3 ],
+ [ 3, 63, null, 1024, 4, 12, 4 ],
+ [ 4, 64, null, 1024, 4, 12, 5 ],
+ [ 5, 65, null, 1024, 4, 12, 6 ],
+ [ 6, 66, null, 1024, 4, 12, 7 ],
+ [ 7, 67, null, 6, 4, 5, 1 ],
+ [ 8, 68, null, 6, 4, 5, 2 ],
+ [ 9, 69, null, 6, 4, 5, 3 ],
+ [ 10, 70, null, 6, 4, 5, 4 ],
+ [ 11, 71, null, 6, 4, 5, 5 ] ]
+
+ var actual = []
+
+ function next (i) { return function (er, fd) {
+ if (er)
+ throw er
+ actual.push([i, fd, er, fs.MAX_OPEN, fs.MIN_MAX_OPEN, fs._curOpen, fds])
+
+ if (i === max - 1) {
+ t.same(actual, expect)
+ t.ok(fs.MAX_OPEN < limit)
+ t.end()
+ }
+
+ fs.close(fd)
+ } }
+})
+
+test('readdir emfile autoreduce', function (t) {
+ fs.MAX_OPEN = 1024
+ var max = 12
+ for (var i = 0; i < max; i ++) {
+ fs.readdir(__dirname, next(i))
+ }
+
+ var expect =
+ [ [0,[__filename,"some-other-file.js"],null,7,4,7,7],
+ [1,[__filename,"some-other-file.js"],null,7,4,7,6],
+ [2,[__filename,"some-other-file.js"],null,7,4,7,5],
+ [3,[__filename,"some-other-file.js"],null,7,4,7,4],
+ [4,[__filename,"some-other-file.js"],null,7,4,7,3],
+ [5,[__filename,"some-other-file.js"],null,7,4,6,2],
+ [6,[__filename,"some-other-file.js"],null,7,4,5,1],
+ [7,[__filename,"some-other-file.js"],null,7,4,4,0],
+ [8,[__filename,"some-other-file.js"],null,7,4,3,3],
+ [9,[__filename,"some-other-file.js"],null,7,4,2,2],
+ [10,[__filename,"some-other-file.js"],null,7,4,1,1],
+ [11,[__filename,"some-other-file.js"],null,7,4,0,0] ]
+
+ var actual = []
+
+ function next (i) { return function (er, files) {
+ if (er)
+ throw er
+ var line = [i, files, er, fs.MAX_OPEN, fs.MIN_MAX_OPEN, fs._curOpen, fds ]
+ actual.push(line)
+
+ if (i === max - 1) {
+ t.ok(fs.MAX_OPEN < limit)
+ t.same(actual, expect)
+ t.end()
+ }
+ } }
+})
diff --git a/node_modules/globule/node_modules/inherits/LICENSE b/node_modules/globule/node_modules/inherits/LICENSE
new file mode 100644
index 000000000..dea3013d6
--- /dev/null
+++ b/node_modules/globule/node_modules/inherits/LICENSE
@@ -0,0 +1,16 @@
+The ISC License
+
+Copyright (c) Isaac Z. Schlueter
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
+REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
+FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
+INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
+OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+PERFORMANCE OF THIS SOFTWARE.
+
diff --git a/node_modules/globule/node_modules/inherits/README.md b/node_modules/globule/node_modules/inherits/README.md
new file mode 100644
index 000000000..b2beaed93
--- /dev/null
+++ b/node_modules/globule/node_modules/inherits/README.md
@@ -0,0 +1,51 @@
+A dead simple way to do inheritance in JS.
+
+ var inherits = require("inherits")
+
+ function Animal () {
+ this.alive = true
+ }
+ Animal.prototype.say = function (what) {
+ console.log(what)
+ }
+
+ inherits(Dog, Animal)
+ function Dog () {
+ Dog.super.apply(this)
+ }
+ Dog.prototype.sniff = function () {
+ this.say("sniff sniff")
+ }
+ Dog.prototype.bark = function () {
+ this.say("woof woof")
+ }
+
+ inherits(Chihuahua, Dog)
+ function Chihuahua () {
+ Chihuahua.super.apply(this)
+ }
+ Chihuahua.prototype.bark = function () {
+ this.say("yip yip")
+ }
+
+ // also works
+ function Cat () {
+ Cat.super.apply(this)
+ }
+ Cat.prototype.hiss = function () {
+ this.say("CHSKKSS!!")
+ }
+ inherits(Cat, Animal, {
+ meow: function () { this.say("miao miao") }
+ })
+ Cat.prototype.purr = function () {
+ this.say("purr purr")
+ }
+
+
+ var c = new Chihuahua
+ assert(c instanceof Chihuahua)
+ assert(c instanceof Dog)
+ assert(c instanceof Animal)
+
+The actual function is laughably small. 10-lines small.
diff --git a/node_modules/globule/node_modules/inherits/inherits.js b/node_modules/globule/node_modules/inherits/inherits.js
new file mode 100644
index 000000000..061b39620
--- /dev/null
+++ b/node_modules/globule/node_modules/inherits/inherits.js
@@ -0,0 +1,29 @@
+module.exports = inherits
+
+function inherits (c, p, proto) {
+ proto = proto || {}
+ var e = {}
+ ;[c.prototype, proto].forEach(function (s) {
+ Object.getOwnPropertyNames(s).forEach(function (k) {
+ e[k] = Object.getOwnPropertyDescriptor(s, k)
+ })
+ })
+ c.prototype = Object.create(p.prototype, e)
+ c.super = p
+}
+
+//function Child () {
+// Child.super.call(this)
+// console.error([this
+// ,this.constructor
+// ,this.constructor === Child
+// ,this.constructor.super === Parent
+// ,Object.getPrototypeOf(this) === Child.prototype
+// ,Object.getPrototypeOf(Object.getPrototypeOf(this))
+// === Parent.prototype
+// ,this instanceof Child
+// ,this instanceof Parent])
+//}
+//function Parent () {}
+//inherits(Child, Parent)
+//new Child
diff --git a/node_modules/globule/node_modules/inherits/package.json b/node_modules/globule/node_modules/inherits/package.json
new file mode 100644
index 000000000..5d25dc0e5
--- /dev/null
+++ b/node_modules/globule/node_modules/inherits/package.json
@@ -0,0 +1,84 @@
+{
+ "_args": [
+ [
+ {
+ "raw": "inherits@1",
+ "scope": null,
+ "escapedName": "inherits",
+ "name": "inherits",
+ "rawSpec": "1",
+ "spec": ">=1.0.0 <2.0.0",
+ "type": "range"
+ },
+ "/home/dold/repos/taler/wallet-webex/node_modules/globule/node_modules/glob"
+ ]
+ ],
+ "_from": "inherits@>=1.0.0 <2.0.0",
+ "_id": "inherits@1.0.2",
+ "_inCache": true,
+ "_location": "/globule/inherits",
+ "_nodeVersion": "2.2.1",
+ "_npmUser": {
+ "name": "isaacs",
+ "email": "isaacs@npmjs.com"
+ },
+ "_npmVersion": "3.2.2",
+ "_phantomChildren": {},
+ "_requested": {
+ "raw": "inherits@1",
+ "scope": null,
+ "escapedName": "inherits",
+ "name": "inherits",
+ "rawSpec": "1",
+ "spec": ">=1.0.0 <2.0.0",
+ "type": "range"
+ },
+ "_requiredBy": [
+ "/globule/glob"
+ ],
+ "_resolved": "https://registry.npmjs.org/inherits/-/inherits-1.0.2.tgz",
+ "_shasum": "ca4309dadee6b54cc0b8d247e8d7c7a0975bdc9b",
+ "_shrinkwrap": null,
+ "_spec": "inherits@1",
+ "_where": "/home/dold/repos/taler/wallet-webex/node_modules/globule/node_modules/glob",
+ "author": {
+ "name": "Isaac Z. Schlueter",
+ "email": "i@izs.me",
+ "url": "http://blog.izs.me/"
+ },
+ "bugs": {
+ "url": "https://github.com/isaacs/inherits/issues"
+ },
+ "dependencies": {},
+ "description": "A tiny simple way to do classic inheritance in js",
+ "devDependencies": {},
+ "directories": {},
+ "dist": {
+ "shasum": "ca4309dadee6b54cc0b8d247e8d7c7a0975bdc9b",
+ "tarball": "https://registry.npmjs.org/inherits/-/inherits-1.0.2.tgz"
+ },
+ "homepage": "https://github.com/isaacs/inherits#readme",
+ "keywords": [
+ "inheritance",
+ "class",
+ "klass",
+ "oop",
+ "object-oriented"
+ ],
+ "main": "./inherits.js",
+ "maintainers": [
+ {
+ "name": "isaacs",
+ "email": "i@izs.me"
+ }
+ ],
+ "name": "inherits",
+ "optionalDependencies": {},
+ "readme": "ERROR: No README data found!",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/isaacs/inherits.git"
+ },
+ "scripts": {},
+ "version": "1.0.2"
+}
diff --git a/node_modules/globule/node_modules/minimatch/.npmignore b/node_modules/globule/node_modules/minimatch/.npmignore
new file mode 100644
index 000000000..3c3629e64
--- /dev/null
+++ b/node_modules/globule/node_modules/minimatch/.npmignore
@@ -0,0 +1 @@
+node_modules
diff --git a/node_modules/globule/node_modules/minimatch/LICENSE b/node_modules/globule/node_modules/minimatch/LICENSE
new file mode 100644
index 000000000..05a401094
--- /dev/null
+++ b/node_modules/globule/node_modules/minimatch/LICENSE
@@ -0,0 +1,23 @@
+Copyright 2009, 2010, 2011 Isaac Z. Schlueter.
+All rights reserved.
+
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation
+files (the "Software"), to deal in the Software without
+restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following
+conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/globule/node_modules/minimatch/README.md b/node_modules/globule/node_modules/minimatch/README.md
new file mode 100644
index 000000000..978268e27
--- /dev/null
+++ b/node_modules/globule/node_modules/minimatch/README.md
@@ -0,0 +1,218 @@
+# minimatch
+
+A minimal matching utility.
+
+[![Build Status](https://secure.travis-ci.org/isaacs/minimatch.png)](http://travis-ci.org/isaacs/minimatch)
+
+
+This is the matching library used internally by npm.
+
+Eventually, it will replace the C binding in node-glob.
+
+It works by converting glob expressions into JavaScript `RegExp`
+objects.
+
+## Usage
+
+```javascript
+var minimatch = require("minimatch")
+
+minimatch("bar.foo", "*.foo") // true!
+minimatch("bar.foo", "*.bar") // false!
+minimatch("bar.foo", "*.+(bar|foo)", { debug: true }) // true, and noisy!
+```
+
+## Features
+
+Supports these glob features:
+
+* Brace Expansion
+* Extended glob matching
+* "Globstar" `**` matching
+
+See:
+
+* `man sh`
+* `man bash`
+* `man 3 fnmatch`
+* `man 5 gitignore`
+
+## Minimatch Class
+
+Create a minimatch object by instanting the `minimatch.Minimatch` class.
+
+```javascript
+var Minimatch = require("minimatch").Minimatch
+var mm = new Minimatch(pattern, options)
+```
+
+### Properties
+
+* `pattern` The original pattern the minimatch object represents.
+* `options` The options supplied to the constructor.
+* `set` A 2-dimensional array of regexp or string expressions.
+ Each row in the
+ array corresponds to a brace-expanded pattern. Each item in the row
+ corresponds to a single path-part. For example, the pattern
+ `{a,b/c}/d` would expand to a set of patterns like:
+
+ [ [ a, d ]
+ , [ b, c, d ] ]
+
+ If a portion of the pattern doesn't have any "magic" in it
+ (that is, it's something like `"foo"` rather than `fo*o?`), then it
+ will be left as a string rather than converted to a regular
+ expression.
+
+* `regexp` Created by the `makeRe` method. A single regular expression
+ expressing the entire pattern. This is useful in cases where you wish
+ to use the pattern somewhat like `fnmatch(3)` with `FNM_PATH` enabled.
+* `negate` True if the pattern is negated.
+* `comment` True if the pattern is a comment.
+* `empty` True if the pattern is `""`.
+
+### Methods
+
+* `makeRe` Generate the `regexp` member if necessary, and return it.
+ Will return `false` if the pattern is invalid.
+* `match(fname)` Return true if the filename matches the pattern, or
+ false otherwise.
+* `matchOne(fileArray, patternArray, partial)` Take a `/`-split
+ filename, and match it against a single row in the `regExpSet`. This
+ method is mainly for internal use, but is exposed so that it can be
+ used by a glob-walker that needs to avoid excessive filesystem calls.
+
+All other methods are internal, and will be called as necessary.
+
+## Functions
+
+The top-level exported function has a `cache` property, which is an LRU
+cache set to store 100 items. So, calling these methods repeatedly
+with the same pattern and options will use the same Minimatch object,
+saving the cost of parsing it multiple times.
+
+### minimatch(path, pattern, options)
+
+Main export. Tests a path against the pattern using the options.
+
+```javascript
+var isJS = minimatch(file, "*.js", { matchBase: true })
+```
+
+### minimatch.filter(pattern, options)
+
+Returns a function that tests its
+supplied argument, suitable for use with `Array.filter`. Example:
+
+```javascript
+var javascripts = fileList.filter(minimatch.filter("*.js", {matchBase: true}))
+```
+
+### minimatch.match(list, pattern, options)
+
+Match against the list of
+files, in the style of fnmatch or glob. If nothing is matched, and
+options.nonull is set, then return a list containing the pattern itself.
+
+```javascript
+var javascripts = minimatch.match(fileList, "*.js", {matchBase: true}))
+```
+
+### minimatch.makeRe(pattern, options)
+
+Make a regular expression object from the pattern.
+
+## Options
+
+All options are `false` by default.
+
+### debug
+
+Dump a ton of stuff to stderr.
+
+### nobrace
+
+Do not expand `{a,b}` and `{1..3}` brace sets.
+
+### noglobstar
+
+Disable `**` matching against multiple folder names.
+
+### dot
+
+Allow patterns to match filenames starting with a period, even if
+the pattern does not explicitly have a period in that spot.
+
+Note that by default, `a/**/b` will **not** match `a/.d/b`, unless `dot`
+is set.
+
+### noext
+
+Disable "extglob" style patterns like `+(a|b)`.
+
+### nocase
+
+Perform a case-insensitive match.
+
+### nonull
+
+When a match is not found by `minimatch.match`, return a list containing
+the pattern itself. When set, an empty list is returned if there are
+no matches.
+
+### matchBase
+
+If set, then patterns without slashes will be matched
+against the basename of the path if it contains slashes. For example,
+`a?b` would match the path `/xyz/123/acb`, but not `/xyz/acb/123`.
+
+### nocomment
+
+Suppress the behavior of treating `#` at the start of a pattern as a
+comment.
+
+### nonegate
+
+Suppress the behavior of treating a leading `!` character as negation.
+
+### flipNegate
+
+Returns from negate expressions the same as if they were not negated.
+(Ie, true on a hit, false on a miss.)
+
+
+## Comparisons to other fnmatch/glob implementations
+
+While strict compliance with the existing standards is a worthwhile
+goal, some discrepancies exist between minimatch and other
+implementations, and are intentional.
+
+If the pattern starts with a `!` character, then it is negated. Set the
+`nonegate` flag to suppress this behavior, and treat leading `!`
+characters normally. This is perhaps relevant if you wish to start the
+pattern with a negative extglob pattern like `!(a|B)`. Multiple `!`
+characters at the start of a pattern will negate the pattern multiple
+times.
+
+If a pattern starts with `#`, then it is treated as a comment, and
+will not match anything. Use `\#` to match a literal `#` at the
+start of a line, or set the `nocomment` flag to suppress this behavior.
+
+The double-star character `**` is supported by default, unless the
+`noglobstar` flag is set. This is supported in the manner of bsdglob
+and bash 4.1, where `**` only has special significance if it is the only
+thing in a path part. That is, `a/**/b` will match `a/x/y/b`, but
+`a/**b` will not.
+
+If an escaped pattern has no matches, and the `nonull` flag is set,
+then minimatch.match returns the pattern as-provided, rather than
+interpreting the character escapes. For example,
+`minimatch.match([], "\\*a\\?")` will return `"\\*a\\?"` rather than
+`"*a?"`. This is akin to setting the `nullglob` option in bash, except
+that it does not resolve escaped pattern characters.
+
+If brace expansion is not disabled, then it is performed before any
+other interpretation of the glob pattern. Thus, a pattern like
+`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded
+**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are
+checked for validity. Since those two are valid, matching proceeds.
diff --git a/node_modules/globule/node_modules/minimatch/minimatch.js b/node_modules/globule/node_modules/minimatch/minimatch.js
new file mode 100644
index 000000000..c633f89fa
--- /dev/null
+++ b/node_modules/globule/node_modules/minimatch/minimatch.js
@@ -0,0 +1,1055 @@
+;(function (require, exports, module, platform) {
+
+if (module) module.exports = minimatch
+else exports.minimatch = minimatch
+
+if (!require) {
+ require = function (id) {
+ switch (id) {
+ case "sigmund": return function sigmund (obj) {
+ return JSON.stringify(obj)
+ }
+ case "path": return { basename: function (f) {
+ f = f.split(/[\/\\]/)
+ var e = f.pop()
+ if (!e) e = f.pop()
+ return e
+ }}
+ case "lru-cache": return function LRUCache () {
+ // not quite an LRU, but still space-limited.
+ var cache = {}
+ var cnt = 0
+ this.set = function (k, v) {
+ cnt ++
+ if (cnt >= 100) cache = {}
+ cache[k] = v
+ }
+ this.get = function (k) { return cache[k] }
+ }
+ }
+ }
+}
+
+minimatch.Minimatch = Minimatch
+
+var LRU = require("lru-cache")
+ , cache = minimatch.cache = new LRU({max: 100})
+ , GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {}
+ , sigmund = require("sigmund")
+
+var path = require("path")
+ // any single thing other than /
+ // don't need to escape / when using new RegExp()
+ , qmark = "[^/]"
+
+ // * => any number of characters
+ , star = qmark + "*?"
+
+ // ** when dots are allowed. Anything goes, except .. and .
+ // not (^ or / followed by one or two dots followed by $ or /),
+ // followed by anything, any number of times.
+ , twoStarDot = "(?:(?!(?:\\\/|^)(?:\\.{1,2})($|\\\/)).)*?"
+
+ // not a ^ or / followed by a dot,
+ // followed by anything, any number of times.
+ , twoStarNoDot = "(?:(?!(?:\\\/|^)\\.).)*?"
+
+ // characters that need to be escaped in RegExp.
+ , reSpecials = charSet("().*{}+?[]^$\\!")
+
+// "abc" -> { a:true, b:true, c:true }
+function charSet (s) {
+ return s.split("").reduce(function (set, c) {
+ set[c] = true
+ return set
+ }, {})
+}
+
+// normalizes slashes.
+var slashSplit = /\/+/
+
+minimatch.filter = filter
+function filter (pattern, options) {
+ options = options || {}
+ return function (p, i, list) {
+ return minimatch(p, pattern, options)
+ }
+}
+
+function ext (a, b) {
+ a = a || {}
+ b = b || {}
+ var t = {}
+ Object.keys(b).forEach(function (k) {
+ t[k] = b[k]
+ })
+ Object.keys(a).forEach(function (k) {
+ t[k] = a[k]
+ })
+ return t
+}
+
+minimatch.defaults = function (def) {
+ if (!def || !Object.keys(def).length) return minimatch
+
+ var orig = minimatch
+
+ var m = function minimatch (p, pattern, options) {
+ return orig.minimatch(p, pattern, ext(def, options))
+ }
+
+ m.Minimatch = function Minimatch (pattern, options) {
+ return new orig.Minimatch(pattern, ext(def, options))
+ }
+
+ return m
+}
+
+Minimatch.defaults = function (def) {
+ if (!def || !Object.keys(def).length) return Minimatch
+ return minimatch.defaults(def).Minimatch
+}
+
+
+function minimatch (p, pattern, options) {
+ if (typeof pattern !== "string") {
+ throw new TypeError("glob pattern string required")
+ }
+
+ if (!options) options = {}
+
+ // shortcut: comments match nothing.
+ if (!options.nocomment && pattern.charAt(0) === "#") {
+ return false
+ }
+
+ // "" only matches ""
+ if (pattern.trim() === "") return p === ""
+
+ return new Minimatch(pattern, options).match(p)
+}
+
+function Minimatch (pattern, options) {
+ if (!(this instanceof Minimatch)) {
+ return new Minimatch(pattern, options, cache)
+ }
+
+ if (typeof pattern !== "string") {
+ throw new TypeError("glob pattern string required")
+ }
+
+ if (!options) options = {}
+ pattern = pattern.trim()
+
+ // windows: need to use /, not \
+ // On other platforms, \ is a valid (albeit bad) filename char.
+ if (platform === "win32") {
+ pattern = pattern.split("\\").join("/")
+ }
+
+ // lru storage.
+ // these things aren't particularly big, but walking down the string
+ // and turning it into a regexp can get pretty costly.
+ var cacheKey = pattern + "\n" + sigmund(options)
+ var cached = minimatch.cache.get(cacheKey)
+ if (cached) return cached
+ minimatch.cache.set(cacheKey, this)
+
+ this.options = options
+ this.set = []
+ this.pattern = pattern
+ this.regexp = null
+ this.negate = false
+ this.comment = false
+ this.empty = false
+
+ // make the set of regexps etc.
+ this.make()
+}
+
+Minimatch.prototype.debug = function() {}
+
+Minimatch.prototype.make = make
+function make () {
+ // don't do it more than once.
+ if (this._made) return
+
+ var pattern = this.pattern
+ var options = this.options
+
+ // empty patterns and comments match nothing.
+ if (!options.nocomment && pattern.charAt(0) === "#") {
+ this.comment = true
+ return
+ }
+ if (!pattern) {
+ this.empty = true
+ return
+ }
+
+ // step 1: figure out negation, etc.
+ this.parseNegate()
+
+ // step 2: expand braces
+ var set = this.globSet = this.braceExpand()
+
+ if (options.debug) this.debug = console.error
+
+ this.debug(this.pattern, set)
+
+ // step 3: now we have a set, so turn each one into a series of path-portion
+ // matching patterns.
+ // These will be regexps, except in the case of "**", which is
+ // set to the GLOBSTAR object for globstar behavior,
+ // and will not contain any / characters
+ set = this.globParts = set.map(function (s) {
+ return s.split(slashSplit)
+ })
+
+ this.debug(this.pattern, set)
+
+ // glob --> regexps
+ set = set.map(function (s, si, set) {
+ return s.map(this.parse, this)
+ }, this)
+
+ this.debug(this.pattern, set)
+
+ // filter out everything that didn't compile properly.
+ set = set.filter(function (s) {
+ return -1 === s.indexOf(false)
+ })
+
+ this.debug(this.pattern, set)
+
+ this.set = set
+}
+
+Minimatch.prototype.parseNegate = parseNegate
+function parseNegate () {
+ var pattern = this.pattern
+ , negate = false
+ , options = this.options
+ , negateOffset = 0
+
+ if (options.nonegate) return
+
+ for ( var i = 0, l = pattern.length
+ ; i < l && pattern.charAt(i) === "!"
+ ; i ++) {
+ negate = !negate
+ negateOffset ++
+ }
+
+ if (negateOffset) this.pattern = pattern.substr(negateOffset)
+ this.negate = negate
+}
+
+// Brace expansion:
+// a{b,c}d -> abd acd
+// a{b,}c -> abc ac
+// a{0..3}d -> a0d a1d a2d a3d
+// a{b,c{d,e}f}g -> abg acdfg acefg
+// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg
+//
+// Invalid sets are not expanded.
+// a{2..}b -> a{2..}b
+// a{b}c -> a{b}c
+minimatch.braceExpand = function (pattern, options) {
+ return new Minimatch(pattern, options).braceExpand()
+}
+
+Minimatch.prototype.braceExpand = braceExpand
+function braceExpand (pattern, options) {
+ options = options || this.options
+ pattern = typeof pattern === "undefined"
+ ? this.pattern : pattern
+
+ if (typeof pattern === "undefined") {
+ throw new Error("undefined pattern")
+ }
+
+ if (options.nobrace ||
+ !pattern.match(/\{.*\}/)) {
+ // shortcut. no need to expand.
+ return [pattern]
+ }
+
+ var escaping = false
+
+ // examples and comments refer to this crazy pattern:
+ // a{b,c{d,e},{f,g}h}x{y,z}
+ // expected:
+ // abxy
+ // abxz
+ // acdxy
+ // acdxz
+ // acexy
+ // acexz
+ // afhxy
+ // afhxz
+ // aghxy
+ // aghxz
+
+ // everything before the first \{ is just a prefix.
+ // So, we pluck that off, and work with the rest,
+ // and then prepend it to everything we find.
+ if (pattern.charAt(0) !== "{") {
+ this.debug(pattern)
+ var prefix = null
+ for (var i = 0, l = pattern.length; i < l; i ++) {
+ var c = pattern.charAt(i)
+ this.debug(i, c)
+ if (c === "\\") {
+ escaping = !escaping
+ } else if (c === "{" && !escaping) {
+ prefix = pattern.substr(0, i)
+ break
+ }
+ }
+
+ // actually no sets, all { were escaped.
+ if (prefix === null) {
+ this.debug("no sets")
+ return [pattern]
+ }
+
+ var tail = braceExpand.call(this, pattern.substr(i), options)
+ return tail.map(function (t) {
+ return prefix + t
+ })
+ }
+
+ // now we have something like:
+ // {b,c{d,e},{f,g}h}x{y,z}
+ // walk through the set, expanding each part, until
+ // the set ends. then, we'll expand the suffix.
+ // If the set only has a single member, then'll put the {} back
+
+ // first, handle numeric sets, since they're easier
+ var numset = pattern.match(/^\{(-?[0-9]+)\.\.(-?[0-9]+)\}/)
+ if (numset) {
+ this.debug("numset", numset[1], numset[2])
+ var suf = braceExpand.call(this, pattern.substr(numset[0].length), options)
+ , start = +numset[1]
+ , end = +numset[2]
+ , inc = start > end ? -1 : 1
+ , set = []
+ for (var i = start; i != (end + inc); i += inc) {
+ // append all the suffixes
+ for (var ii = 0, ll = suf.length; ii < ll; ii ++) {
+ set.push(i + suf[ii])
+ }
+ }
+ return set
+ }
+
+ // ok, walk through the set
+ // We hope, somewhat optimistically, that there
+ // will be a } at the end.
+ // If the closing brace isn't found, then the pattern is
+ // interpreted as braceExpand("\\" + pattern) so that
+ // the leading \{ will be interpreted literally.
+ var i = 1 // skip the \{
+ , depth = 1
+ , set = []
+ , member = ""
+ , sawEnd = false
+ , escaping = false
+
+ function addMember () {
+ set.push(member)
+ member = ""
+ }
+
+ this.debug("Entering for")
+ FOR: for (i = 1, l = pattern.length; i < l; i ++) {
+ var c = pattern.charAt(i)
+ this.debug("", i, c)
+
+ if (escaping) {
+ escaping = false
+ member += "\\" + c
+ } else {
+ switch (c) {
+ case "\\":
+ escaping = true
+ continue
+
+ case "{":
+ depth ++
+ member += "{"
+ continue
+
+ case "}":
+ depth --
+ // if this closes the actual set, then we're done
+ if (depth === 0) {
+ addMember()
+ // pluck off the close-brace
+ i ++
+ break FOR
+ } else {
+ member += c
+ continue
+ }
+
+ case ",":
+ if (depth === 1) {
+ addMember()
+ } else {
+ member += c
+ }
+ continue
+
+ default:
+ member += c
+ continue
+ } // switch
+ } // else
+ } // for
+
+ // now we've either finished the set, and the suffix is
+ // pattern.substr(i), or we have *not* closed the set,
+ // and need to escape the leading brace
+ if (depth !== 0) {
+ this.debug("didn't close", pattern)
+ return braceExpand.call(this, "\\" + pattern, options)
+ }
+
+ // x{y,z} -> ["xy", "xz"]
+ this.debug("set", set)
+ this.debug("suffix", pattern.substr(i))
+ var suf = braceExpand.call(this, pattern.substr(i), options)
+ // ["b", "c{d,e}","{f,g}h"] ->
+ // [["b"], ["cd", "ce"], ["fh", "gh"]]
+ var addBraces = set.length === 1
+ this.debug("set pre-expanded", set)
+ set = set.map(function (p) {
+ return braceExpand.call(this, p, options)
+ }, this)
+ this.debug("set expanded", set)
+
+
+ // [["b"], ["cd", "ce"], ["fh", "gh"]] ->
+ // ["b", "cd", "ce", "fh", "gh"]
+ set = set.reduce(function (l, r) {
+ return l.concat(r)
+ })
+
+ if (addBraces) {
+ set = set.map(function (s) {
+ return "{" + s + "}"
+ })
+ }
+
+ // now attach the suffixes.
+ var ret = []
+ for (var i = 0, l = set.length; i < l; i ++) {
+ for (var ii = 0, ll = suf.length; ii < ll; ii ++) {
+ ret.push(set[i] + suf[ii])
+ }
+ }
+ return ret
+}
+
+// parse a component of the expanded set.
+// At this point, no pattern may contain "/" in it
+// so we're going to return a 2d array, where each entry is the full
+// pattern, split on '/', and then turned into a regular expression.
+// A regexp is made at the end which joins each array with an
+// escaped /, and another full one which joins each regexp with |.
+//
+// Following the lead of Bash 4.1, note that "**" only has special meaning
+// when it is the *only* thing in a path portion. Otherwise, any series
+// of * is equivalent to a single *. Globstar behavior is enabled by
+// default, and can be disabled by setting options.noglobstar.
+Minimatch.prototype.parse = parse
+var SUBPARSE = {}
+function parse (pattern, isSub) {
+ var options = this.options
+
+ // shortcuts
+ if (!options.noglobstar && pattern === "**") return GLOBSTAR
+ if (pattern === "") return ""
+
+ var re = ""
+ , hasMagic = !!options.nocase
+ , escaping = false
+ // ? => one single character
+ , patternListStack = []
+ , plType
+ , stateChar
+ , inClass = false
+ , reClassStart = -1
+ , classStart = -1
+ // . and .. never match anything that doesn't start with .,
+ // even when options.dot is set.
+ , patternStart = pattern.charAt(0) === "." ? "" // anything
+ // not (start or / followed by . or .. followed by / or end)
+ : options.dot ? "(?!(?:^|\\\/)\\.{1,2}(?:$|\\\/))"
+ : "(?!\\.)"
+ , self = this
+
+ function clearStateChar () {
+ if (stateChar) {
+ // we had some state-tracking character
+ // that wasn't consumed by this pass.
+ switch (stateChar) {
+ case "*":
+ re += star
+ hasMagic = true
+ break
+ case "?":
+ re += qmark
+ hasMagic = true
+ break
+ default:
+ re += "\\"+stateChar
+ break
+ }
+ self.debug('clearStateChar %j %j', stateChar, re)
+ stateChar = false
+ }
+ }
+
+ for ( var i = 0, len = pattern.length, c
+ ; (i < len) && (c = pattern.charAt(i))
+ ; i ++ ) {
+
+ this.debug("%s\t%s %s %j", pattern, i, re, c)
+
+ // skip over any that are escaped.
+ if (escaping && reSpecials[c]) {
+ re += "\\" + c
+ escaping = false
+ continue
+ }
+
+ SWITCH: switch (c) {
+ case "/":
+ // completely not allowed, even escaped.
+ // Should already be path-split by now.
+ return false
+
+ case "\\":
+ clearStateChar()
+ escaping = true
+ continue
+
+ // the various stateChar values
+ // for the "extglob" stuff.
+ case "?":
+ case "*":
+ case "+":
+ case "@":
+ case "!":
+ this.debug("%s\t%s %s %j <-- stateChar", pattern, i, re, c)
+
+ // all of those are literals inside a class, except that
+ // the glob [!a] means [^a] in regexp
+ if (inClass) {
+ this.debug(' in class')
+ if (c === "!" && i === classStart + 1) c = "^"
+ re += c
+ continue
+ }
+
+ // if we already have a stateChar, then it means
+ // that there was something like ** or +? in there.
+ // Handle the stateChar, then proceed with this one.
+ self.debug('call clearStateChar %j', stateChar)
+ clearStateChar()
+ stateChar = c
+ // if extglob is disabled, then +(asdf|foo) isn't a thing.
+ // just clear the statechar *now*, rather than even diving into
+ // the patternList stuff.
+ if (options.noext) clearStateChar()
+ continue
+
+ case "(":
+ if (inClass) {
+ re += "("
+ continue
+ }
+
+ if (!stateChar) {
+ re += "\\("
+ continue
+ }
+
+ plType = stateChar
+ patternListStack.push({ type: plType
+ , start: i - 1
+ , reStart: re.length })
+ // negation is (?:(?!js)[^/]*)
+ re += stateChar === "!" ? "(?:(?!" : "(?:"
+ this.debug('plType %j %j', stateChar, re)
+ stateChar = false
+ continue
+
+ case ")":
+ if (inClass || !patternListStack.length) {
+ re += "\\)"
+ continue
+ }
+
+ clearStateChar()
+ hasMagic = true
+ re += ")"
+ plType = patternListStack.pop().type
+ // negation is (?:(?!js)[^/]*)
+ // The others are (?:<pattern>)<type>
+ switch (plType) {
+ case "!":
+ re += "[^/]*?)"
+ break
+ case "?":
+ case "+":
+ case "*": re += plType
+ case "@": break // the default anyway
+ }
+ continue
+
+ case "|":
+ if (inClass || !patternListStack.length || escaping) {
+ re += "\\|"
+ escaping = false
+ continue
+ }
+
+ clearStateChar()
+ re += "|"
+ continue
+
+ // these are mostly the same in regexp and glob
+ case "[":
+ // swallow any state-tracking char before the [
+ clearStateChar()
+
+ if (inClass) {
+ re += "\\" + c
+ continue
+ }
+
+ inClass = true
+ classStart = i
+ reClassStart = re.length
+ re += c
+ continue
+
+ case "]":
+ // a right bracket shall lose its special
+ // meaning and represent itself in
+ // a bracket expression if it occurs
+ // first in the list. -- POSIX.2 2.8.3.2
+ if (i === classStart + 1 || !inClass) {
+ re += "\\" + c
+ escaping = false
+ continue
+ }
+
+ // finish up the class.
+ hasMagic = true
+ inClass = false
+ re += c
+ continue
+
+ default:
+ // swallow any state char that wasn't consumed
+ clearStateChar()
+
+ if (escaping) {
+ // no need
+ escaping = false
+ } else if (reSpecials[c]
+ && !(c === "^" && inClass)) {
+ re += "\\"
+ }
+
+ re += c
+
+ } // switch
+ } // for
+
+
+ // handle the case where we left a class open.
+ // "[abc" is valid, equivalent to "\[abc"
+ if (inClass) {
+ // split where the last [ was, and escape it
+ // this is a huge pita. We now have to re-walk
+ // the contents of the would-be class to re-translate
+ // any characters that were passed through as-is
+ var cs = pattern.substr(classStart + 1)
+ , sp = this.parse(cs, SUBPARSE)
+ re = re.substr(0, reClassStart) + "\\[" + sp[0]
+ hasMagic = hasMagic || sp[1]
+ }
+
+ // handle the case where we had a +( thing at the *end*
+ // of the pattern.
+ // each pattern list stack adds 3 chars, and we need to go through
+ // and escape any | chars that were passed through as-is for the regexp.
+ // Go through and escape them, taking care not to double-escape any
+ // | chars that were already escaped.
+ var pl
+ while (pl = patternListStack.pop()) {
+ var tail = re.slice(pl.reStart + 3)
+ // maybe some even number of \, then maybe 1 \, followed by a |
+ tail = tail.replace(/((?:\\{2})*)(\\?)\|/g, function (_, $1, $2) {
+ if (!$2) {
+ // the | isn't already escaped, so escape it.
+ $2 = "\\"
+ }
+
+ // need to escape all those slashes *again*, without escaping the
+ // one that we need for escaping the | character. As it works out,
+ // escaping an even number of slashes can be done by simply repeating
+ // it exactly after itself. That's why this trick works.
+ //
+ // I am sorry that you have to see this.
+ return $1 + $1 + $2 + "|"
+ })
+
+ this.debug("tail=%j\n %s", tail, tail)
+ var t = pl.type === "*" ? star
+ : pl.type === "?" ? qmark
+ : "\\" + pl.type
+
+ hasMagic = true
+ re = re.slice(0, pl.reStart)
+ + t + "\\("
+ + tail
+ }
+
+ // handle trailing things that only matter at the very end.
+ clearStateChar()
+ if (escaping) {
+ // trailing \\
+ re += "\\\\"
+ }
+
+ // only need to apply the nodot start if the re starts with
+ // something that could conceivably capture a dot
+ var addPatternStart = false
+ switch (re.charAt(0)) {
+ case ".":
+ case "[":
+ case "(": addPatternStart = true
+ }
+
+ // if the re is not "" at this point, then we need to make sure
+ // it doesn't match against an empty path part.
+ // Otherwise a/* will match a/, which it should not.
+ if (re !== "" && hasMagic) re = "(?=.)" + re
+
+ if (addPatternStart) re = patternStart + re
+
+ // parsing just a piece of a larger pattern.
+ if (isSub === SUBPARSE) {
+ return [ re, hasMagic ]
+ }
+
+ // skip the regexp for non-magical patterns
+ // unescape anything in it, though, so that it'll be
+ // an exact match against a file etc.
+ if (!hasMagic) {
+ return globUnescape(pattern)
+ }
+
+ var flags = options.nocase ? "i" : ""
+ , regExp = new RegExp("^" + re + "$", flags)
+
+ regExp._glob = pattern
+ regExp._src = re
+
+ return regExp
+}
+
+minimatch.makeRe = function (pattern, options) {
+ return new Minimatch(pattern, options || {}).makeRe()
+}
+
+Minimatch.prototype.makeRe = makeRe
+function makeRe () {
+ if (this.regexp || this.regexp === false) return this.regexp
+
+ // at this point, this.set is a 2d array of partial
+ // pattern strings, or "**".
+ //
+ // It's better to use .match(). This function shouldn't
+ // be used, really, but it's pretty convenient sometimes,
+ // when you just want to work with a regex.
+ var set = this.set
+
+ if (!set.length) return this.regexp = false
+ var options = this.options
+
+ var twoStar = options.noglobstar ? star
+ : options.dot ? twoStarDot
+ : twoStarNoDot
+ , flags = options.nocase ? "i" : ""
+
+ var re = set.map(function (pattern) {
+ return pattern.map(function (p) {
+ return (p === GLOBSTAR) ? twoStar
+ : (typeof p === "string") ? regExpEscape(p)
+ : p._src
+ }).join("\\\/")
+ }).join("|")
+
+ // must match entire pattern
+ // ending in a * or ** will make it less strict.
+ re = "^(?:" + re + ")$"
+
+ // can match anything, as long as it's not this.
+ if (this.negate) re = "^(?!" + re + ").*$"
+
+ try {
+ return this.regexp = new RegExp(re, flags)
+ } catch (ex) {
+ return this.regexp = false
+ }
+}
+
+minimatch.match = function (list, pattern, options) {
+ var mm = new Minimatch(pattern, options)
+ list = list.filter(function (f) {
+ return mm.match(f)
+ })
+ if (options.nonull && !list.length) {
+ list.push(pattern)
+ }
+ return list
+}
+
+Minimatch.prototype.match = match
+function match (f, partial) {
+ this.debug("match", f, this.pattern)
+ // short-circuit in the case of busted things.
+ // comments, etc.
+ if (this.comment) return false
+ if (this.empty) return f === ""
+
+ if (f === "/" && partial) return true
+
+ var options = this.options
+
+ // windows: need to use /, not \
+ // On other platforms, \ is a valid (albeit bad) filename char.
+ if (platform === "win32") {
+ f = f.split("\\").join("/")
+ }
+
+ // treat the test path as a set of pathparts.
+ f = f.split(slashSplit)
+ this.debug(this.pattern, "split", f)
+
+ // just ONE of the pattern sets in this.set needs to match
+ // in order for it to be valid. If negating, then just one
+ // match means that we have failed.
+ // Either way, return on the first hit.
+
+ var set = this.set
+ this.debug(this.pattern, "set", set)
+
+ var splitFile = path.basename(f.join("/")).split("/")
+
+ for (var i = 0, l = set.length; i < l; i ++) {
+ var pattern = set[i], file = f
+ if (options.matchBase && pattern.length === 1) {
+ file = splitFile
+ }
+ var hit = this.matchOne(file, pattern, partial)
+ if (hit) {
+ if (options.flipNegate) return true
+ return !this.negate
+ }
+ }
+
+ // didn't get any hits. this is success if it's a negative
+ // pattern, failure otherwise.
+ if (options.flipNegate) return false
+ return this.negate
+}
+
+// set partial to true to test if, for example,
+// "/a/b" matches the start of "/*/b/*/d"
+// Partial means, if you run out of file before you run
+// out of pattern, then that's fine, as long as all
+// the parts match.
+Minimatch.prototype.matchOne = function (file, pattern, partial) {
+ var options = this.options
+
+ this.debug("matchOne",
+ { "this": this
+ , file: file
+ , pattern: pattern })
+
+ this.debug("matchOne", file.length, pattern.length)
+
+ for ( var fi = 0
+ , pi = 0
+ , fl = file.length
+ , pl = pattern.length
+ ; (fi < fl) && (pi < pl)
+ ; fi ++, pi ++ ) {
+
+ this.debug("matchOne loop")
+ var p = pattern[pi]
+ , f = file[fi]
+
+ this.debug(pattern, p, f)
+
+ // should be impossible.
+ // some invalid regexp stuff in the set.
+ if (p === false) return false
+
+ if (p === GLOBSTAR) {
+ this.debug('GLOBSTAR', [pattern, p, f])
+
+ // "**"
+ // a/**/b/**/c would match the following:
+ // a/b/x/y/z/c
+ // a/x/y/z/b/c
+ // a/b/x/b/x/c
+ // a/b/c
+ // To do this, take the rest of the pattern after
+ // the **, and see if it would match the file remainder.
+ // If so, return success.
+ // If not, the ** "swallows" a segment, and try again.
+ // This is recursively awful.
+ //
+ // a/**/b/**/c matching a/b/x/y/z/c
+ // - a matches a
+ // - doublestar
+ // - matchOne(b/x/y/z/c, b/**/c)
+ // - b matches b
+ // - doublestar
+ // - matchOne(x/y/z/c, c) -> no
+ // - matchOne(y/z/c, c) -> no
+ // - matchOne(z/c, c) -> no
+ // - matchOne(c, c) yes, hit
+ var fr = fi
+ , pr = pi + 1
+ if (pr === pl) {
+ this.debug('** at the end')
+ // a ** at the end will just swallow the rest.
+ // We have found a match.
+ // however, it will not swallow /.x, unless
+ // options.dot is set.
+ // . and .. are *never* matched by **, for explosively
+ // exponential reasons.
+ for ( ; fi < fl; fi ++) {
+ if (file[fi] === "." || file[fi] === ".." ||
+ (!options.dot && file[fi].charAt(0) === ".")) return false
+ }
+ return true
+ }
+
+ // ok, let's see if we can swallow whatever we can.
+ WHILE: while (fr < fl) {
+ var swallowee = file[fr]
+
+ this.debug('\nglobstar while',
+ file, fr, pattern, pr, swallowee)
+
+ // XXX remove this slice. Just pass the start index.
+ if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) {
+ this.debug('globstar found match!', fr, fl, swallowee)
+ // found a match.
+ return true
+ } else {
+ // can't swallow "." or ".." ever.
+ // can only swallow ".foo" when explicitly asked.
+ if (swallowee === "." || swallowee === ".." ||
+ (!options.dot && swallowee.charAt(0) === ".")) {
+ this.debug("dot detected!", file, fr, pattern, pr)
+ break WHILE
+ }
+
+ // ** swallows a segment, and continue.
+ this.debug('globstar swallow a segment, and continue')
+ fr ++
+ }
+ }
+ // no match was found.
+ // However, in partial mode, we can't say this is necessarily over.
+ // If there's more *pattern* left, then
+ if (partial) {
+ // ran out of file
+ this.debug("\n>>> no match, partial?", file, fr, pattern, pr)
+ if (fr === fl) return true
+ }
+ return false
+ }
+
+ // something other than **
+ // non-magic patterns just have to match exactly
+ // patterns with magic have been turned into regexps.
+ var hit
+ if (typeof p === "string") {
+ if (options.nocase) {
+ hit = f.toLowerCase() === p.toLowerCase()
+ } else {
+ hit = f === p
+ }
+ this.debug("string match", p, f, hit)
+ } else {
+ hit = f.match(p)
+ this.debug("pattern match", p, f, hit)
+ }
+
+ if (!hit) return false
+ }
+
+ // Note: ending in / means that we'll get a final ""
+ // at the end of the pattern. This can only match a
+ // corresponding "" at the end of the file.
+ // If the file ends in /, then it can only match a
+ // a pattern that ends in /, unless the pattern just
+ // doesn't have any more for it. But, a/b/ should *not*
+ // match "a/b/*", even though "" matches against the
+ // [^/]*? pattern, except in partial mode, where it might
+ // simply not be reached yet.
+ // However, a/b/ should still satisfy a/*
+
+ // now either we fell off the end of the pattern, or we're done.
+ if (fi === fl && pi === pl) {
+ // ran out of pattern and filename at the same time.
+ // an exact hit!
+ return true
+ } else if (fi === fl) {
+ // ran out of file, but still had pattern left.
+ // this is ok if we're doing the match as part of
+ // a glob fs traversal.
+ return partial
+ } else if (pi === pl) {
+ // ran out of pattern, still have file left.
+ // this is only acceptable if we're on the very last
+ // empty segment of a file with a trailing slash.
+ // a/* should match a/b/
+ var emptyFileEnd = (fi === fl - 1) && (file[fi] === "")
+ return emptyFileEnd
+ }
+
+ // should be unreachable.
+ throw new Error("wtf?")
+}
+
+
+// replace stuff like \* with *
+function globUnescape (s) {
+ return s.replace(/\\(.)/g, "$1")
+}
+
+
+function regExpEscape (s) {
+ return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&")
+}
+
+})( typeof require === "function" ? require : null,
+ this,
+ typeof module === "object" ? module : null,
+ typeof process === "object" ? process.platform : "win32"
+ )
diff --git a/node_modules/globule/node_modules/minimatch/package.json b/node_modules/globule/node_modules/minimatch/package.json
new file mode 100644
index 000000000..6f600ed32
--- /dev/null
+++ b/node_modules/globule/node_modules/minimatch/package.json
@@ -0,0 +1,92 @@
+{
+ "_args": [
+ [
+ {
+ "raw": "minimatch@~0.2.11",
+ "scope": null,
+ "escapedName": "minimatch",
+ "name": "minimatch",
+ "rawSpec": "~0.2.11",
+ "spec": ">=0.2.11 <0.3.0",
+ "type": "range"
+ },
+ "/home/dold/repos/taler/wallet-webex/node_modules/globule"
+ ]
+ ],
+ "_from": "minimatch@>=0.2.11 <0.3.0",
+ "_id": "minimatch@0.2.14",
+ "_inCache": true,
+ "_location": "/globule/minimatch",
+ "_npmUser": {
+ "name": "isaacs",
+ "email": "i@izs.me"
+ },
+ "_npmVersion": "1.3.17",
+ "_phantomChildren": {},
+ "_requested": {
+ "raw": "minimatch@~0.2.11",
+ "scope": null,
+ "escapedName": "minimatch",
+ "name": "minimatch",
+ "rawSpec": "~0.2.11",
+ "spec": ">=0.2.11 <0.3.0",
+ "type": "range"
+ },
+ "_requiredBy": [
+ "/globule",
+ "/globule/glob"
+ ],
+ "_resolved": "https://registry.npmjs.org/minimatch/-/minimatch-0.2.14.tgz",
+ "_shasum": "c74e780574f63c6f9a090e90efbe6ef53a6a756a",
+ "_shrinkwrap": null,
+ "_spec": "minimatch@~0.2.11",
+ "_where": "/home/dold/repos/taler/wallet-webex/node_modules/globule",
+ "author": {
+ "name": "Isaac Z. Schlueter",
+ "email": "i@izs.me",
+ "url": "http://blog.izs.me"
+ },
+ "bugs": {
+ "url": "https://github.com/isaacs/minimatch/issues"
+ },
+ "dependencies": {
+ "lru-cache": "2",
+ "sigmund": "~1.0.0"
+ },
+ "deprecated": "Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue",
+ "description": "a glob matcher in javascript",
+ "devDependencies": {
+ "tap": ""
+ },
+ "directories": {},
+ "dist": {
+ "shasum": "c74e780574f63c6f9a090e90efbe6ef53a6a756a",
+ "tarball": "https://registry.npmjs.org/minimatch/-/minimatch-0.2.14.tgz"
+ },
+ "engines": {
+ "node": "*"
+ },
+ "homepage": "https://github.com/isaacs/minimatch",
+ "license": {
+ "type": "MIT",
+ "url": "http://github.com/isaacs/minimatch/raw/master/LICENSE"
+ },
+ "main": "minimatch.js",
+ "maintainers": [
+ {
+ "name": "isaacs",
+ "email": "i@izs.me"
+ }
+ ],
+ "name": "minimatch",
+ "optionalDependencies": {},
+ "readme": "ERROR: No README data found!",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/isaacs/minimatch.git"
+ },
+ "scripts": {
+ "test": "tap test/*.js"
+ },
+ "version": "0.2.14"
+}
diff --git a/node_modules/globule/node_modules/minimatch/test/basic.js b/node_modules/globule/node_modules/minimatch/test/basic.js
new file mode 100644
index 000000000..ae7ac73c7
--- /dev/null
+++ b/node_modules/globule/node_modules/minimatch/test/basic.js
@@ -0,0 +1,399 @@
+// http://www.bashcookbook.com/bashinfo/source/bash-1.14.7/tests/glob-test
+//
+// TODO: Some of these tests do very bad things with backslashes, and will
+// most likely fail badly on windows. They should probably be skipped.
+
+var tap = require("tap")
+ , globalBefore = Object.keys(global)
+ , mm = require("../")
+ , files = [ "a", "b", "c", "d", "abc"
+ , "abd", "abe", "bb", "bcd"
+ , "ca", "cb", "dd", "de"
+ , "bdir/", "bdir/cfile"]
+ , next = files.concat([ "a-b", "aXb"
+ , ".x", ".y" ])
+
+
+var patterns =
+ [ "http://www.bashcookbook.com/bashinfo/source/bash-1.14.7/tests/glob-test"
+ , ["a*", ["a", "abc", "abd", "abe"]]
+ , ["X*", ["X*"], {nonull: true}]
+
+ // allow null glob expansion
+ , ["X*", []]
+
+ // isaacs: Slightly different than bash/sh/ksh
+ // \\* is not un-escaped to literal "*" in a failed match,
+ // but it does make it get treated as a literal star
+ , ["\\*", ["\\*"], {nonull: true}]
+ , ["\\**", ["\\**"], {nonull: true}]
+ , ["\\*\\*", ["\\*\\*"], {nonull: true}]
+
+ , ["b*/", ["bdir/"]]
+ , ["c*", ["c", "ca", "cb"]]
+ , ["**", files]
+
+ , ["\\.\\./*/", ["\\.\\./*/"], {nonull: true}]
+ , ["s/\\..*//", ["s/\\..*//"], {nonull: true}]
+
+ , "legendary larry crashes bashes"
+ , ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\\1/"
+ , ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\\1/"], {nonull: true}]
+ , ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\1/"
+ , ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\1/"], {nonull: true}]
+
+ , "character classes"
+ , ["[a-c]b*", ["abc", "abd", "abe", "bb", "cb"]]
+ , ["[a-y]*[^c]", ["abd", "abe", "bb", "bcd",
+ "bdir/", "ca", "cb", "dd", "de"]]
+ , ["a*[^c]", ["abd", "abe"]]
+ , function () { files.push("a-b", "aXb") }
+ , ["a[X-]b", ["a-b", "aXb"]]
+ , function () { files.push(".x", ".y") }
+ , ["[^a-c]*", ["d", "dd", "de"]]
+ , function () { files.push("a*b/", "a*b/ooo") }
+ , ["a\\*b/*", ["a*b/ooo"]]
+ , ["a\\*?/*", ["a*b/ooo"]]
+ , ["*\\\\!*", [], {null: true}, ["echo !7"]]
+ , ["*\\!*", ["echo !7"], null, ["echo !7"]]
+ , ["*.\\*", ["r.*"], null, ["r.*"]]
+ , ["a[b]c", ["abc"]]
+ , ["a[\\b]c", ["abc"]]
+ , ["a?c", ["abc"]]
+ , ["a\\*c", [], {null: true}, ["abc"]]
+ , ["", [""], { null: true }, [""]]
+
+ , "http://www.opensource.apple.com/source/bash/bash-23/" +
+ "bash/tests/glob-test"
+ , function () { files.push("man/", "man/man1/", "man/man1/bash.1") }
+ , ["*/man*/bash.*", ["man/man1/bash.1"]]
+ , ["man/man1/bash.1", ["man/man1/bash.1"]]
+ , ["a***c", ["abc"], null, ["abc"]]
+ , ["a*****?c", ["abc"], null, ["abc"]]
+ , ["?*****??", ["abc"], null, ["abc"]]
+ , ["*****??", ["abc"], null, ["abc"]]
+ , ["?*****?c", ["abc"], null, ["abc"]]
+ , ["?***?****c", ["abc"], null, ["abc"]]
+ , ["?***?****?", ["abc"], null, ["abc"]]
+ , ["?***?****", ["abc"], null, ["abc"]]
+ , ["*******c", ["abc"], null, ["abc"]]
+ , ["*******?", ["abc"], null, ["abc"]]
+ , ["a*cd**?**??k", ["abcdecdhjk"], null, ["abcdecdhjk"]]
+ , ["a**?**cd**?**??k", ["abcdecdhjk"], null, ["abcdecdhjk"]]
+ , ["a**?**cd**?**??k***", ["abcdecdhjk"], null, ["abcdecdhjk"]]
+ , ["a**?**cd**?**??***k", ["abcdecdhjk"], null, ["abcdecdhjk"]]
+ , ["a**?**cd**?**??***k**", ["abcdecdhjk"], null, ["abcdecdhjk"]]
+ , ["a****c**?**??*****", ["abcdecdhjk"], null, ["abcdecdhjk"]]
+ , ["[-abc]", ["-"], null, ["-"]]
+ , ["[abc-]", ["-"], null, ["-"]]
+ , ["\\", ["\\"], null, ["\\"]]
+ , ["[\\\\]", ["\\"], null, ["\\"]]
+ , ["[[]", ["["], null, ["["]]
+ , ["[", ["["], null, ["["]]
+ , ["[*", ["[abc"], null, ["[abc"]]
+ , "a right bracket shall lose its special meaning and\n" +
+ "represent itself in a bracket expression if it occurs\n" +
+ "first in the list. -- POSIX.2 2.8.3.2"
+ , ["[]]", ["]"], null, ["]"]]
+ , ["[]-]", ["]"], null, ["]"]]
+ , ["[a-\z]", ["p"], null, ["p"]]
+ , ["??**********?****?", [], { null: true }, ["abc"]]
+ , ["??**********?****c", [], { null: true }, ["abc"]]
+ , ["?************c****?****", [], { null: true }, ["abc"]]
+ , ["*c*?**", [], { null: true }, ["abc"]]
+ , ["a*****c*?**", [], { null: true }, ["abc"]]
+ , ["a********???*******", [], { null: true }, ["abc"]]
+ , ["[]", [], { null: true }, ["a"]]
+ , ["[abc", [], { null: true }, ["["]]
+
+ , "nocase tests"
+ , ["XYZ", ["xYz"], { nocase: true, null: true }
+ , ["xYz", "ABC", "IjK"]]
+ , ["ab*", ["ABC"], { nocase: true, null: true }
+ , ["xYz", "ABC", "IjK"]]
+ , ["[ia]?[ck]", ["ABC", "IjK"], { nocase: true, null: true }
+ , ["xYz", "ABC", "IjK"]]
+
+ // [ pattern, [matches], MM opts, files, TAP opts]
+ , "onestar/twostar"
+ , ["{/*,*}", [], {null: true}, ["/asdf/asdf/asdf"]]
+ , ["{/?,*}", ["/a", "bb"], {null: true}
+ , ["/a", "/b/b", "/a/b/c", "bb"]]
+
+ , "dots should not match unless requested"
+ , ["**", ["a/b"], {}, ["a/b", "a/.d", ".a/.d"]]
+
+ // .. and . can only match patterns starting with .,
+ // even when options.dot is set.
+ , function () {
+ files = ["a/./b", "a/../b", "a/c/b", "a/.d/b"]
+ }
+ , ["a/*/b", ["a/c/b", "a/.d/b"], {dot: true}]
+ , ["a/.*/b", ["a/./b", "a/../b", "a/.d/b"], {dot: true}]
+ , ["a/*/b", ["a/c/b"], {dot:false}]
+ , ["a/.*/b", ["a/./b", "a/../b", "a/.d/b"], {dot: false}]
+
+
+ // this also tests that changing the options needs
+ // to change the cache key, even if the pattern is
+ // the same!
+ , ["**", ["a/b","a/.d",".a/.d"], { dot: true }
+ , [ ".a/.d", "a/.d", "a/b"]]
+
+ , "paren sets cannot contain slashes"
+ , ["*(a/b)", ["*(a/b)"], {nonull: true}, ["a/b"]]
+
+ // brace sets trump all else.
+ //
+ // invalid glob pattern. fails on bash4 and bsdglob.
+ // however, in this implementation, it's easier just
+ // to do the intuitive thing, and let brace-expansion
+ // actually come before parsing any extglob patterns,
+ // like the documentation seems to say.
+ //
+ // XXX: if anyone complains about this, either fix it
+ // or tell them to grow up and stop complaining.
+ //
+ // bash/bsdglob says this:
+ // , ["*(a|{b),c)}", ["*(a|{b),c)}"], {}, ["a", "ab", "ac", "ad"]]
+ // but we do this instead:
+ , ["*(a|{b),c)}", ["a", "ab", "ac"], {}, ["a", "ab", "ac", "ad"]]
+
+ // test partial parsing in the presence of comment/negation chars
+ , ["[!a*", ["[!ab"], {}, ["[!ab", "[ab"]]
+ , ["[#a*", ["[#ab"], {}, ["[#ab", "[ab"]]
+
+ // like: {a,b|c\\,d\\\|e} except it's unclosed, so it has to be escaped.
+ , ["+(a|*\\|c\\\\|d\\\\\\|e\\\\\\\\|f\\\\\\\\\\|g"
+ , ["+(a|b\\|c\\\\|d\\\\|e\\\\\\\\|f\\\\\\\\|g"]
+ , {}
+ , ["+(a|b\\|c\\\\|d\\\\|e\\\\\\\\|f\\\\\\\\|g", "a", "b\\c"]]
+
+
+ // crazy nested {,,} and *(||) tests.
+ , function () {
+ files = [ "a", "b", "c", "d"
+ , "ab", "ac", "ad"
+ , "bc", "cb"
+ , "bc,d", "c,db", "c,d"
+ , "d)", "(b|c", "*(b|c"
+ , "b|c", "b|cc", "cb|c"
+ , "x(a|b|c)", "x(a|c)"
+ , "(a|b|c)", "(a|c)"]
+ }
+ , ["*(a|{b,c})", ["a", "b", "c", "ab", "ac"]]
+ , ["{a,*(b|c,d)}", ["a","(b|c", "*(b|c", "d)"]]
+ // a
+ // *(b|c)
+ // *(b|d)
+ , ["{a,*(b|{c,d})}", ["a","b", "bc", "cb", "c", "d"]]
+ , ["*(a|{b|c,c})", ["a", "b", "c", "ab", "ac", "bc", "cb"]]
+
+
+ // test various flag settings.
+ , [ "*(a|{b|c,c})", ["x(a|b|c)", "x(a|c)", "(a|b|c)", "(a|c)"]
+ , { noext: true } ]
+ , ["a?b", ["x/y/acb", "acb/"], {matchBase: true}
+ , ["x/y/acb", "acb/", "acb/d/e", "x/y/acb/d"] ]
+ , ["#*", ["#a", "#b"], {nocomment: true}, ["#a", "#b", "c#d"]]
+
+
+ // begin channelling Boole and deMorgan...
+ , "negation tests"
+ , function () {
+ files = ["d", "e", "!ab", "!abc", "a!b", "\\!a"]
+ }
+
+ // anything that is NOT a* matches.
+ , ["!a*", ["\\!a", "d", "e", "!ab", "!abc"]]
+
+ // anything that IS !a* matches.
+ , ["!a*", ["!ab", "!abc"], {nonegate: true}]
+
+ // anything that IS a* matches
+ , ["!!a*", ["a!b"]]
+
+ // anything that is NOT !a* matches
+ , ["!\\!a*", ["a!b", "d", "e", "\\!a"]]
+
+ // negation nestled within a pattern
+ , function () {
+ files = [ "foo.js"
+ , "foo.bar"
+ // can't match this one without negative lookbehind.
+ , "foo.js.js"
+ , "blar.js"
+ , "foo."
+ , "boo.js.boo" ]
+ }
+ , ["*.!(js)", ["foo.bar", "foo.", "boo.js.boo"] ]
+
+ // https://github.com/isaacs/minimatch/issues/5
+ , function () {
+ files = [ 'a/b/.x/c'
+ , 'a/b/.x/c/d'
+ , 'a/b/.x/c/d/e'
+ , 'a/b/.x'
+ , 'a/b/.x/'
+ , 'a/.x/b'
+ , '.x'
+ , '.x/'
+ , '.x/a'
+ , '.x/a/b'
+ , 'a/.x/b/.x/c'
+ , '.x/.x' ]
+ }
+ , ["**/.x/**", [ '.x/'
+ , '.x/a'
+ , '.x/a/b'
+ , 'a/.x/b'
+ , 'a/b/.x/'
+ , 'a/b/.x/c'
+ , 'a/b/.x/c/d'
+ , 'a/b/.x/c/d/e' ] ]
+
+ ]
+
+var regexps =
+ [ '/^(?:(?=.)a[^/]*?)$/',
+ '/^(?:(?=.)X[^/]*?)$/',
+ '/^(?:(?=.)X[^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\\)|(?!\\.)(?=.)[^/]*?\\(a\\|c\\))$/',
+ '/^(?:(?=.)a[^/]b)$/',
+ '/^(?:(?=.)#[^/]*?)$/',
+ '/^(?!^(?:(?=.)a[^/]*?)$).*$/',
+ '/^(?:(?=.)\\!a[^/]*?)$/',
+ '/^(?:(?=.)a[^/]*?)$/',
+ '/^(?!^(?:(?=.)\\!a[^/]*?)$).*$/',
+ '/^(?:(?!\\.)(?=.)[^/]*?\\.(?:(?!js)[^/]*?))$/',
+ '/^(?:(?:(?!(?:\\/|^)\\.).)*?\\/\\.x\\/(?:(?!(?:\\/|^)\\.).)*?)$/' ]
+var re = 0;
+
+tap.test("basic tests", function (t) {
+ var start = Date.now()
+
+ // [ pattern, [matches], MM opts, files, TAP opts]
+ patterns.forEach(function (c) {
+ if (typeof c === "function") return c()
+ if (typeof c === "string") return t.comment(c)
+
+ var pattern = c[0]
+ , expect = c[1].sort(alpha)
+ , options = c[2] || {}
+ , f = c[3] || files
+ , tapOpts = c[4] || {}
+
+ // options.debug = true
+ var m = new mm.Minimatch(pattern, options)
+ var r = m.makeRe()
+ var expectRe = regexps[re++]
+ tapOpts.re = String(r) || JSON.stringify(r)
+ tapOpts.files = JSON.stringify(f)
+ tapOpts.pattern = pattern
+ tapOpts.set = m.set
+ tapOpts.negated = m.negate
+
+ var actual = mm.match(f, pattern, options)
+ actual.sort(alpha)
+
+ t.equivalent( actual, expect
+ , JSON.stringify(pattern) + " " + JSON.stringify(expect)
+ , tapOpts )
+
+ t.equal(tapOpts.re, expectRe, tapOpts)
+ })
+
+ t.comment("time=" + (Date.now() - start) + "ms")
+ t.end()
+})
+
+tap.test("global leak test", function (t) {
+ var globalAfter = Object.keys(global)
+ t.equivalent(globalAfter, globalBefore, "no new globals, please")
+ t.end()
+})
+
+function alpha (a, b) {
+ return a > b ? 1 : -1
+}
diff --git a/node_modules/globule/node_modules/minimatch/test/brace-expand.js b/node_modules/globule/node_modules/minimatch/test/brace-expand.js
new file mode 100644
index 000000000..7ee278a27
--- /dev/null
+++ b/node_modules/globule/node_modules/minimatch/test/brace-expand.js
@@ -0,0 +1,33 @@
+var tap = require("tap")
+ , minimatch = require("../")
+
+tap.test("brace expansion", function (t) {
+ // [ pattern, [expanded] ]
+ ; [ [ "a{b,c{d,e},{f,g}h}x{y,z}"
+ , [ "abxy"
+ , "abxz"
+ , "acdxy"
+ , "acdxz"
+ , "acexy"
+ , "acexz"
+ , "afhxy"
+ , "afhxz"
+ , "aghxy"
+ , "aghxz" ] ]
+ , [ "a{1..5}b"
+ , [ "a1b"
+ , "a2b"
+ , "a3b"
+ , "a4b"
+ , "a5b" ] ]
+ , [ "a{b}c", ["a{b}c"] ]
+ ].forEach(function (tc) {
+ var p = tc[0]
+ , expect = tc[1]
+ t.equivalent(minimatch.braceExpand(p), expect, p)
+ })
+ console.error("ending")
+ t.end()
+})
+
+
diff --git a/node_modules/globule/node_modules/minimatch/test/caching.js b/node_modules/globule/node_modules/minimatch/test/caching.js
new file mode 100644
index 000000000..0fec4b0fa
--- /dev/null
+++ b/node_modules/globule/node_modules/minimatch/test/caching.js
@@ -0,0 +1,14 @@
+var Minimatch = require("../minimatch.js").Minimatch
+var tap = require("tap")
+tap.test("cache test", function (t) {
+ var mm1 = new Minimatch("a?b")
+ var mm2 = new Minimatch("a?b")
+ t.equal(mm1, mm2, "should get the same object")
+ // the lru should drop it after 100 entries
+ for (var i = 0; i < 100; i ++) {
+ new Minimatch("a"+i)
+ }
+ mm2 = new Minimatch("a?b")
+ t.notEqual(mm1, mm2, "cache should have dropped")
+ t.end()
+})
diff --git a/node_modules/globule/node_modules/minimatch/test/defaults.js b/node_modules/globule/node_modules/minimatch/test/defaults.js
new file mode 100644
index 000000000..25f1f601c
--- /dev/null
+++ b/node_modules/globule/node_modules/minimatch/test/defaults.js
@@ -0,0 +1,274 @@
+// http://www.bashcookbook.com/bashinfo/source/bash-1.14.7/tests/glob-test
+//
+// TODO: Some of these tests do very bad things with backslashes, and will
+// most likely fail badly on windows. They should probably be skipped.
+
+var tap = require("tap")
+ , globalBefore = Object.keys(global)
+ , mm = require("../")
+ , files = [ "a", "b", "c", "d", "abc"
+ , "abd", "abe", "bb", "bcd"
+ , "ca", "cb", "dd", "de"
+ , "bdir/", "bdir/cfile"]
+ , next = files.concat([ "a-b", "aXb"
+ , ".x", ".y" ])
+
+tap.test("basic tests", function (t) {
+ var start = Date.now()
+
+ // [ pattern, [matches], MM opts, files, TAP opts]
+ ; [ "http://www.bashcookbook.com/bashinfo" +
+ "/source/bash-1.14.7/tests/glob-test"
+ , ["a*", ["a", "abc", "abd", "abe"]]
+ , ["X*", ["X*"], {nonull: true}]
+
+ // allow null glob expansion
+ , ["X*", []]
+
+ // isaacs: Slightly different than bash/sh/ksh
+ // \\* is not un-escaped to literal "*" in a failed match,
+ // but it does make it get treated as a literal star
+ , ["\\*", ["\\*"], {nonull: true}]
+ , ["\\**", ["\\**"], {nonull: true}]
+ , ["\\*\\*", ["\\*\\*"], {nonull: true}]
+
+ , ["b*/", ["bdir/"]]
+ , ["c*", ["c", "ca", "cb"]]
+ , ["**", files]
+
+ , ["\\.\\./*/", ["\\.\\./*/"], {nonull: true}]
+ , ["s/\\..*//", ["s/\\..*//"], {nonull: true}]
+
+ , "legendary larry crashes bashes"
+ , ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\\1/"
+ , ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\\1/"], {nonull: true}]
+ , ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\1/"
+ , ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\1/"], {nonull: true}]
+
+ , "character classes"
+ , ["[a-c]b*", ["abc", "abd", "abe", "bb", "cb"]]
+ , ["[a-y]*[^c]", ["abd", "abe", "bb", "bcd",
+ "bdir/", "ca", "cb", "dd", "de"]]
+ , ["a*[^c]", ["abd", "abe"]]
+ , function () { files.push("a-b", "aXb") }
+ , ["a[X-]b", ["a-b", "aXb"]]
+ , function () { files.push(".x", ".y") }
+ , ["[^a-c]*", ["d", "dd", "de"]]
+ , function () { files.push("a*b/", "a*b/ooo") }
+ , ["a\\*b/*", ["a*b/ooo"]]
+ , ["a\\*?/*", ["a*b/ooo"]]
+ , ["*\\\\!*", [], {null: true}, ["echo !7"]]
+ , ["*\\!*", ["echo !7"], null, ["echo !7"]]
+ , ["*.\\*", ["r.*"], null, ["r.*"]]
+ , ["a[b]c", ["abc"]]
+ , ["a[\\b]c", ["abc"]]
+ , ["a?c", ["abc"]]
+ , ["a\\*c", [], {null: true}, ["abc"]]
+ , ["", [""], { null: true }, [""]]
+
+ , "http://www.opensource.apple.com/source/bash/bash-23/" +
+ "bash/tests/glob-test"
+ , function () { files.push("man/", "man/man1/", "man/man1/bash.1") }
+ , ["*/man*/bash.*", ["man/man1/bash.1"]]
+ , ["man/man1/bash.1", ["man/man1/bash.1"]]
+ , ["a***c", ["abc"], null, ["abc"]]
+ , ["a*****?c", ["abc"], null, ["abc"]]
+ , ["?*****??", ["abc"], null, ["abc"]]
+ , ["*****??", ["abc"], null, ["abc"]]
+ , ["?*****?c", ["abc"], null, ["abc"]]
+ , ["?***?****c", ["abc"], null, ["abc"]]
+ , ["?***?****?", ["abc"], null, ["abc"]]
+ , ["?***?****", ["abc"], null, ["abc"]]
+ , ["*******c", ["abc"], null, ["abc"]]
+ , ["*******?", ["abc"], null, ["abc"]]
+ , ["a*cd**?**??k", ["abcdecdhjk"], null, ["abcdecdhjk"]]
+ , ["a**?**cd**?**??k", ["abcdecdhjk"], null, ["abcdecdhjk"]]
+ , ["a**?**cd**?**??k***", ["abcdecdhjk"], null, ["abcdecdhjk"]]
+ , ["a**?**cd**?**??***k", ["abcdecdhjk"], null, ["abcdecdhjk"]]
+ , ["a**?**cd**?**??***k**", ["abcdecdhjk"], null, ["abcdecdhjk"]]
+ , ["a****c**?**??*****", ["abcdecdhjk"], null, ["abcdecdhjk"]]
+ , ["[-abc]", ["-"], null, ["-"]]
+ , ["[abc-]", ["-"], null, ["-"]]
+ , ["\\", ["\\"], null, ["\\"]]
+ , ["[\\\\]", ["\\"], null, ["\\"]]
+ , ["[[]", ["["], null, ["["]]
+ , ["[", ["["], null, ["["]]
+ , ["[*", ["[abc"], null, ["[abc"]]
+ , "a right bracket shall lose its special meaning and\n" +
+ "represent itself in a bracket expression if it occurs\n" +
+ "first in the list. -- POSIX.2 2.8.3.2"
+ , ["[]]", ["]"], null, ["]"]]
+ , ["[]-]", ["]"], null, ["]"]]
+ , ["[a-\z]", ["p"], null, ["p"]]
+ , ["??**********?****?", [], { null: true }, ["abc"]]
+ , ["??**********?****c", [], { null: true }, ["abc"]]
+ , ["?************c****?****", [], { null: true }, ["abc"]]
+ , ["*c*?**", [], { null: true }, ["abc"]]
+ , ["a*****c*?**", [], { null: true }, ["abc"]]
+ , ["a********???*******", [], { null: true }, ["abc"]]
+ , ["[]", [], { null: true }, ["a"]]
+ , ["[abc", [], { null: true }, ["["]]
+
+ , "nocase tests"
+ , ["XYZ", ["xYz"], { nocase: true, null: true }
+ , ["xYz", "ABC", "IjK"]]
+ , ["ab*", ["ABC"], { nocase: true, null: true }
+ , ["xYz", "ABC", "IjK"]]
+ , ["[ia]?[ck]", ["ABC", "IjK"], { nocase: true, null: true }
+ , ["xYz", "ABC", "IjK"]]
+
+ // [ pattern, [matches], MM opts, files, TAP opts]
+ , "onestar/twostar"
+ , ["{/*,*}", [], {null: true}, ["/asdf/asdf/asdf"]]
+ , ["{/?,*}", ["/a", "bb"], {null: true}
+ , ["/a", "/b/b", "/a/b/c", "bb"]]
+
+ , "dots should not match unless requested"
+ , ["**", ["a/b"], {}, ["a/b", "a/.d", ".a/.d"]]
+
+ // .. and . can only match patterns starting with .,
+ // even when options.dot is set.
+ , function () {
+ files = ["a/./b", "a/../b", "a/c/b", "a/.d/b"]
+ }
+ , ["a/*/b", ["a/c/b", "a/.d/b"], {dot: true}]
+ , ["a/.*/b", ["a/./b", "a/../b", "a/.d/b"], {dot: true}]
+ , ["a/*/b", ["a/c/b"], {dot:false}]
+ , ["a/.*/b", ["a/./b", "a/../b", "a/.d/b"], {dot: false}]
+
+
+ // this also tests that changing the options needs
+ // to change the cache key, even if the pattern is
+ // the same!
+ , ["**", ["a/b","a/.d",".a/.d"], { dot: true }
+ , [ ".a/.d", "a/.d", "a/b"]]
+
+ , "paren sets cannot contain slashes"
+ , ["*(a/b)", ["*(a/b)"], {nonull: true}, ["a/b"]]
+
+ // brace sets trump all else.
+ //
+ // invalid glob pattern. fails on bash4 and bsdglob.
+ // however, in this implementation, it's easier just
+ // to do the intuitive thing, and let brace-expansion
+ // actually come before parsing any extglob patterns,
+ // like the documentation seems to say.
+ //
+ // XXX: if anyone complains about this, either fix it
+ // or tell them to grow up and stop complaining.
+ //
+ // bash/bsdglob says this:
+ // , ["*(a|{b),c)}", ["*(a|{b),c)}"], {}, ["a", "ab", "ac", "ad"]]
+ // but we do this instead:
+ , ["*(a|{b),c)}", ["a", "ab", "ac"], {}, ["a", "ab", "ac", "ad"]]
+
+ // test partial parsing in the presence of comment/negation chars
+ , ["[!a*", ["[!ab"], {}, ["[!ab", "[ab"]]
+ , ["[#a*", ["[#ab"], {}, ["[#ab", "[ab"]]
+
+ // like: {a,b|c\\,d\\\|e} except it's unclosed, so it has to be escaped.
+ , ["+(a|*\\|c\\\\|d\\\\\\|e\\\\\\\\|f\\\\\\\\\\|g"
+ , ["+(a|b\\|c\\\\|d\\\\|e\\\\\\\\|f\\\\\\\\|g"]
+ , {}
+ , ["+(a|b\\|c\\\\|d\\\\|e\\\\\\\\|f\\\\\\\\|g", "a", "b\\c"]]
+
+
+ // crazy nested {,,} and *(||) tests.
+ , function () {
+ files = [ "a", "b", "c", "d"
+ , "ab", "ac", "ad"
+ , "bc", "cb"
+ , "bc,d", "c,db", "c,d"
+ , "d)", "(b|c", "*(b|c"
+ , "b|c", "b|cc", "cb|c"
+ , "x(a|b|c)", "x(a|c)"
+ , "(a|b|c)", "(a|c)"]
+ }
+ , ["*(a|{b,c})", ["a", "b", "c", "ab", "ac"]]
+ , ["{a,*(b|c,d)}", ["a","(b|c", "*(b|c", "d)"]]
+ // a
+ // *(b|c)
+ // *(b|d)
+ , ["{a,*(b|{c,d})}", ["a","b", "bc", "cb", "c", "d"]]
+ , ["*(a|{b|c,c})", ["a", "b", "c", "ab", "ac", "bc", "cb"]]
+
+
+ // test various flag settings.
+ , [ "*(a|{b|c,c})", ["x(a|b|c)", "x(a|c)", "(a|b|c)", "(a|c)"]
+ , { noext: true } ]
+ , ["a?b", ["x/y/acb", "acb/"], {matchBase: true}
+ , ["x/y/acb", "acb/", "acb/d/e", "x/y/acb/d"] ]
+ , ["#*", ["#a", "#b"], {nocomment: true}, ["#a", "#b", "c#d"]]
+
+
+ // begin channelling Boole and deMorgan...
+ , "negation tests"
+ , function () {
+ files = ["d", "e", "!ab", "!abc", "a!b", "\\!a"]
+ }
+
+ // anything that is NOT a* matches.
+ , ["!a*", ["\\!a", "d", "e", "!ab", "!abc"]]
+
+ // anything that IS !a* matches.
+ , ["!a*", ["!ab", "!abc"], {nonegate: true}]
+
+ // anything that IS a* matches
+ , ["!!a*", ["a!b"]]
+
+ // anything that is NOT !a* matches
+ , ["!\\!a*", ["a!b", "d", "e", "\\!a"]]
+
+ // negation nestled within a pattern
+ , function () {
+ files = [ "foo.js"
+ , "foo.bar"
+ // can't match this one without negative lookbehind.
+ , "foo.js.js"
+ , "blar.js"
+ , "foo."
+ , "boo.js.boo" ]
+ }
+ , ["*.!(js)", ["foo.bar", "foo.", "boo.js.boo"] ]
+
+ ].forEach(function (c) {
+ if (typeof c === "function") return c()
+ if (typeof c === "string") return t.comment(c)
+
+ var pattern = c[0]
+ , expect = c[1].sort(alpha)
+ , options = c[2] || {}
+ , f = c[3] || files
+ , tapOpts = c[4] || {}
+
+ // options.debug = true
+ var Class = mm.defaults(options).Minimatch
+ var m = new Class(pattern, {})
+ var r = m.makeRe()
+ tapOpts.re = String(r) || JSON.stringify(r)
+ tapOpts.files = JSON.stringify(f)
+ tapOpts.pattern = pattern
+ tapOpts.set = m.set
+ tapOpts.negated = m.negate
+
+ var actual = mm.match(f, pattern, options)
+ actual.sort(alpha)
+
+ t.equivalent( actual, expect
+ , JSON.stringify(pattern) + " " + JSON.stringify(expect)
+ , tapOpts )
+ })
+
+ t.comment("time=" + (Date.now() - start) + "ms")
+ t.end()
+})
+
+tap.test("global leak test", function (t) {
+ var globalAfter = Object.keys(global)
+ t.equivalent(globalAfter, globalBefore, "no new globals, please")
+ t.end()
+})
+
+function alpha (a, b) {
+ return a > b ? 1 : -1
+}
diff --git a/node_modules/globule/node_modules/minimatch/test/extglob-ending-with-state-char.js b/node_modules/globule/node_modules/minimatch/test/extglob-ending-with-state-char.js
new file mode 100644
index 000000000..6676e2629
--- /dev/null
+++ b/node_modules/globule/node_modules/minimatch/test/extglob-ending-with-state-char.js
@@ -0,0 +1,8 @@
+var test = require('tap').test
+var minimatch = require('../')
+
+test('extglob ending with statechar', function(t) {
+ t.notOk(minimatch('ax', 'a?(b*)'))
+ t.ok(minimatch('ax', '?(a*|b)'))
+ t.end()
+})
diff --git a/node_modules/globule/package.json b/node_modules/globule/package.json
new file mode 100644
index 000000000..2e4b1a0b4
--- /dev/null
+++ b/node_modules/globule/package.json
@@ -0,0 +1,109 @@
+{
+ "_args": [
+ [
+ {
+ "raw": "globule@~0.1.0",
+ "scope": null,
+ "escapedName": "globule",
+ "name": "globule",
+ "rawSpec": "~0.1.0",
+ "spec": ">=0.1.0 <0.2.0",
+ "type": "range"
+ },
+ "/home/dold/repos/taler/wallet-webex/node_modules/gaze"
+ ]
+ ],
+ "_from": "globule@>=0.1.0 <0.2.0",
+ "_id": "globule@0.1.0",
+ "_inCache": true,
+ "_location": "/globule",
+ "_npmUser": {
+ "name": "cowboy",
+ "email": "cowboy@rj3.net"
+ },
+ "_npmVersion": "1.1.70",
+ "_phantomChildren": {
+ "lru-cache": "2.7.3",
+ "sigmund": "1.0.1"
+ },
+ "_requested": {
+ "raw": "globule@~0.1.0",
+ "scope": null,
+ "escapedName": "globule",
+ "name": "globule",
+ "rawSpec": "~0.1.0",
+ "spec": ">=0.1.0 <0.2.0",
+ "type": "range"
+ },
+ "_requiredBy": [
+ "/gaze"
+ ],
+ "_resolved": "https://registry.npmjs.org/globule/-/globule-0.1.0.tgz",
+ "_shasum": "d9c8edde1da79d125a151b79533b978676346ae5",
+ "_shrinkwrap": null,
+ "_spec": "globule@~0.1.0",
+ "_where": "/home/dold/repos/taler/wallet-webex/node_modules/gaze",
+ "author": {
+ "name": "\"Cowboy\" Ben Alman",
+ "url": "http://benalman.com/"
+ },
+ "bugs": {
+ "url": "https://github.com/cowboy/node-globule/issues"
+ },
+ "dependencies": {
+ "glob": "~3.1.21",
+ "lodash": "~1.0.1",
+ "minimatch": "~0.2.11"
+ },
+ "description": "An easy-to-use wildcard globbing library.",
+ "devDependencies": {
+ "grunt": "~0.4.1",
+ "grunt-contrib-jshint": "~0.1.1",
+ "grunt-contrib-nodeunit": "~0.1.2",
+ "grunt-contrib-watch": "~0.2.0"
+ },
+ "directories": {},
+ "dist": {
+ "shasum": "d9c8edde1da79d125a151b79533b978676346ae5",
+ "tarball": "https://registry.npmjs.org/globule/-/globule-0.1.0.tgz"
+ },
+ "engines": {
+ "node": ">= 0.8.0"
+ },
+ "homepage": "https://github.com/cowboy/node-globule",
+ "keywords": [
+ "glob",
+ "file",
+ "match",
+ "mapping",
+ "expand",
+ "wildcard",
+ "pattern",
+ "sync",
+ "awesome"
+ ],
+ "licenses": [
+ {
+ "type": "MIT",
+ "url": "https://github.com/cowboy/node-globule/blob/master/LICENSE-MIT"
+ }
+ ],
+ "main": "lib/globule",
+ "maintainers": [
+ {
+ "name": "cowboy",
+ "email": "cowboy@rj3.net"
+ }
+ ],
+ "name": "globule",
+ "optionalDependencies": {},
+ "readme": "ERROR: No README data found!",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/cowboy/node-globule.git"
+ },
+ "scripts": {
+ "test": "grunt nodeunit"
+ },
+ "version": "0.1.0"
+}
diff --git a/node_modules/globule/test/fixtures/expand/README.md b/node_modules/globule/test/fixtures/expand/README.md
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/node_modules/globule/test/fixtures/expand/README.md
diff --git a/node_modules/globule/test/fixtures/expand/css/baz.css b/node_modules/globule/test/fixtures/expand/css/baz.css
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/node_modules/globule/test/fixtures/expand/css/baz.css
diff --git a/node_modules/globule/test/fixtures/expand/css/qux.css b/node_modules/globule/test/fixtures/expand/css/qux.css
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/node_modules/globule/test/fixtures/expand/css/qux.css
diff --git a/node_modules/globule/test/fixtures/expand/deep/deep.txt b/node_modules/globule/test/fixtures/expand/deep/deep.txt
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/node_modules/globule/test/fixtures/expand/deep/deep.txt
diff --git a/node_modules/globule/test/fixtures/expand/deep/deeper/deeper.txt b/node_modules/globule/test/fixtures/expand/deep/deeper/deeper.txt
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/node_modules/globule/test/fixtures/expand/deep/deeper/deeper.txt
diff --git a/node_modules/globule/test/fixtures/expand/deep/deeper/deepest/deepest.txt b/node_modules/globule/test/fixtures/expand/deep/deeper/deepest/deepest.txt
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/node_modules/globule/test/fixtures/expand/deep/deeper/deepest/deepest.txt
diff --git a/node_modules/globule/test/fixtures/expand/js/bar.js b/node_modules/globule/test/fixtures/expand/js/bar.js
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/node_modules/globule/test/fixtures/expand/js/bar.js
diff --git a/node_modules/globule/test/fixtures/expand/js/foo.js b/node_modules/globule/test/fixtures/expand/js/foo.js
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/node_modules/globule/test/fixtures/expand/js/foo.js
diff --git a/node_modules/globule/test/globule_test.js b/node_modules/globule/test/globule_test.js
new file mode 100644
index 000000000..9b55b6b93
--- /dev/null
+++ b/node_modules/globule/test/globule_test.js
@@ -0,0 +1,486 @@
+'use strict';
+
+var path = require('path');
+
+var globule = require('../lib/globule.js');
+
+/*
+ ======== A Handy Little Nodeunit Reference ========
+ https://github.com/caolan/nodeunit
+
+ Test methods:
+ test.expect(numAssertions)
+ test.done()
+ Test assertions:
+ test.ok(value, [message])
+ test.equal(actual, expected, [message])
+ test.notEqual(actual, expected, [message])
+ test.deepEqual(actual, expected, [message])
+ test.notDeepEqual(actual, expected, [message])
+ test.strictEqual(actual, expected, [message])
+ test.notStrictEqual(actual, expected, [message])
+ test.throws(block, [error], [message])
+ test.doesNotThrow(block, [error], [message])
+ test.ifError(value)
+*/
+
+exports['match'] = {
+ 'empty set': function(test) {
+ test.expect(6);
+ // Should return empty set if a required argument is missing or an empty set.
+ test.deepEqual(globule.match(null, 'foo.js'), [], 'should return empty set.');
+ test.deepEqual(globule.match('*.js', null), [], 'should return empty set.');
+ test.deepEqual(globule.match([], 'foo.js'), [], 'should return empty set.');
+ test.deepEqual(globule.match('*.js', []), [], 'should return empty set.');
+ test.deepEqual(globule.match(null, ['foo.js']), [], 'should return empty set.');
+ test.deepEqual(globule.match(['*.js'], null), [], 'should return empty set.');
+ test.done();
+ },
+ 'basic matching': function(test) {
+ test.expect(6);
+ test.deepEqual(globule.match('*.js', 'foo.js'), ['foo.js'], 'should match correctly.');
+ test.deepEqual(globule.match('*.js', ['foo.js']), ['foo.js'], 'should match correctly.');
+ test.deepEqual(globule.match('*.js', ['foo.js', 'bar.css']), ['foo.js'], 'should match correctly.');
+ test.deepEqual(globule.match(['*.js', '*.css'], 'foo.js'), ['foo.js'], 'should match correctly.');
+ test.deepEqual(globule.match(['*.js', '*.css'], ['foo.js']), ['foo.js'], 'should match correctly.');
+ test.deepEqual(globule.match(['*.js', '*.css'], ['foo.js', 'bar.css']), ['foo.js', 'bar.css'], 'should match correctly.');
+ test.done();
+ },
+ 'no matches': function(test) {
+ test.expect(2);
+ test.deepEqual(globule.match('*.js', 'foo.css'), [], 'should fail to match.');
+ test.deepEqual(globule.match('*.js', ['foo.css', 'bar.css']), [], 'should fail to match.');
+ test.done();
+ },
+ 'unique': function(test) {
+ test.expect(2);
+ test.deepEqual(globule.match('*.js', ['foo.js', 'foo.js']), ['foo.js'], 'should return a uniqued set.');
+ test.deepEqual(globule.match(['*.js', '*.*'], ['foo.js', 'foo.js']), ['foo.js'], 'should return a uniqued set.');
+ test.done();
+ },
+ 'flatten': function(test) {
+ test.expect(1);
+ test.deepEqual(globule.match([['*.js', '*.css'], ['*.*', '*.js']], ['foo.js', 'bar.css']),
+ ['foo.js', 'bar.css'],
+ 'should process nested pattern arrays correctly.');
+ test.done();
+ },
+ 'exclusion': function(test) {
+ test.expect(5);
+ test.deepEqual(globule.match(['!*.js'], ['foo.js', 'bar.js']), [], 'solitary exclusion should match nothing');
+ test.deepEqual(globule.match(['*.js', '!*.js'], ['foo.js', 'bar.js']), [], 'exclusion should cancel match');
+ test.deepEqual(globule.match(['*.js', '!f*.js'], ['foo.js', 'bar.js', 'baz.js']),
+ ['bar.js', 'baz.js'],
+ 'partial exclusion should partially cancel match');
+ test.deepEqual(globule.match(['*.js', '!*.js', 'b*.js'], ['foo.js', 'bar.js', 'baz.js']),
+ ['bar.js', 'baz.js'],
+ 'inclusion / exclusion order matters');
+ test.deepEqual(globule.match(['*.js', '!f*.js', '*.js'], ['foo.js', 'bar.js', 'baz.js']),
+ ['bar.js', 'baz.js', 'foo.js'],
+ 'inclusion / exclusion order matters');
+ test.done();
+ },
+ 'options.matchBase': function(test) {
+ test.expect(2);
+ test.deepEqual(globule.match('*.js', ['foo.js', 'bar', 'baz/xyz.js'], {matchBase: true}),
+ ['foo.js', 'baz/xyz.js'],
+ 'should matchBase (minimatch) when specified.');
+ test.deepEqual(globule.match('*.js', ['foo.js', 'bar', 'baz/xyz.js']),
+ ['foo.js'],
+ 'should not matchBase (minimatch) by default.');
+ test.done();
+ },
+};
+
+exports['isMatch'] = {
+ 'basic matching': function(test) {
+ test.expect(6);
+ test.ok(globule.isMatch('*.js', 'foo.js'), 'should match correctly.');
+ test.ok(globule.isMatch('*.js', ['foo.js']), 'should match correctly.');
+ test.ok(globule.isMatch('*.js', ['foo.js', 'bar.css']), 'should match correctly.');
+ test.ok(globule.isMatch(['*.js', '*.css'], 'foo.js'), 'should match correctly.');
+ test.ok(globule.isMatch(['*.js', '*.css'], ['foo.js']), 'should match correctly.');
+ test.ok(globule.isMatch(['*.js', '*.css'], ['foo.js', 'bar.css']), 'should match correctly.');
+ test.done();
+ },
+ 'no matches': function(test) {
+ test.expect(6);
+ test.ok(!globule.isMatch('*.js', 'foo.css'), 'should fail to match.');
+ test.ok(!globule.isMatch('*.js', ['foo.css', 'bar.css']), 'should fail to match.');
+ test.ok(!globule.isMatch(null, 'foo.css'), 'should fail to match.');
+ test.ok(!globule.isMatch('*.js', null), 'should fail to match.');
+ test.ok(!globule.isMatch([], 'foo.css'), 'should fail to match.');
+ test.ok(!globule.isMatch('*.js', []), 'should fail to match.');
+ test.done();
+ },
+ 'options.matchBase': function(test) {
+ test.expect(2);
+ test.ok(globule.isMatch('*.js', ['baz/xyz.js'], {matchBase: true}), 'should matchBase (minimatch) when specified.');
+ test.ok(!globule.isMatch('*.js', ['baz/xyz.js']), 'should not matchBase (minimatch) by default.');
+ test.done();
+ },
+};
+
+exports['find'] = {
+ setUp: function(done) {
+ this.cwd = process.cwd();
+ process.chdir('test/fixtures/expand');
+ done();
+ },
+ tearDown: function(done) {
+ process.chdir(this.cwd);
+ done();
+ },
+ 'basic matching': function(test) {
+ test.expect(5);
+ test.deepEqual(globule.find('**/*.js'), ['js/bar.js', 'js/foo.js'], 'single pattern argument should match.');
+ test.deepEqual(globule.find('**/*.js', '**/*.css'),
+ ['js/bar.js', 'js/foo.js', 'css/baz.css', 'css/qux.css'],
+ 'multiple pattern arguments should match.');
+ test.deepEqual(globule.find(['**/*.js', '**/*.css']),
+ ['js/bar.js', 'js/foo.js', 'css/baz.css', 'css/qux.css'],
+ 'array of patterns should match.');
+ test.deepEqual(globule.find([['**/*.js'], [['**/*.css', 'js/*.js']]]),
+ ['js/bar.js', 'js/foo.js', 'css/baz.css', 'css/qux.css'],
+ 'array of arrays of patterns should be flattened.');
+ test.deepEqual(globule.find('*.xyz'), [], 'bad pattern should fail to match.');
+ test.done();
+ },
+ 'unique': function(test) {
+ test.expect(4);
+ test.deepEqual(globule.find('**/*.js', 'js/*.js'),
+ ['js/bar.js', 'js/foo.js'],
+ 'file list should be uniqed.');
+ test.deepEqual(globule.find('**/*.js', '**/*.css', 'js/*.js'), ['js/bar.js', 'js/foo.js',
+ 'css/baz.css', 'css/qux.css'],
+ 'file list should be uniqed.');
+ test.deepEqual(globule.find('js', 'js/'),
+ ['js', 'js/'],
+ 'mixed non-ending-/ and ending-/ dirs will not be uniqed by default.');
+ test.deepEqual(globule.find('js', 'js/', {mark: true}),
+ ['js/'],
+ 'mixed non-ending-/ and ending-/ dirs will be uniqed when "mark" is specified.');
+ test.done();
+ },
+ 'file order': function(test) {
+ test.expect(5);
+ var actual = globule.find('**/*.{js,css}');
+ var expected = ['css/baz.css', 'css/qux.css', 'js/bar.js', 'js/foo.js'];
+ test.deepEqual(actual, expected, 'should select 4 files in this order, by default.');
+
+ actual = globule.find('js/foo.js', 'js/bar.js', '**/*.{js,css}');
+ expected = ['js/foo.js', 'js/bar.js', 'css/baz.css', 'css/qux.css'];
+ test.deepEqual(actual, expected, 'specifically-specified-up-front file order should be maintained.');
+
+ actual = globule.find('js/bar.js', 'js/foo.js', '**/*.{js,css}');
+ expected = ['js/bar.js', 'js/foo.js', 'css/baz.css', 'css/qux.css'];
+ test.deepEqual(actual, expected, 'specifically-specified-up-front file order should be maintained.');
+
+ actual = globule.find('**/*.{js,css}', '!css/qux.css', 'css/qux.css');
+ expected = ['css/baz.css', 'js/bar.js', 'js/foo.js', 'css/qux.css'];
+ test.deepEqual(actual, expected, 'if a file is excluded and then re-added, it should be added at the end.');
+
+ actual = globule.find('js/foo.js', '**/*.{js,css}', '!css/qux.css', 'css/qux.css');
+ expected = ['js/foo.js', 'css/baz.css', 'js/bar.js', 'css/qux.css'];
+ test.deepEqual(actual, expected, 'should be able to combine specified-up-front and excluded/added-at-end.');
+ test.done();
+ },
+ 'exclusion': function(test) {
+ test.expect(8);
+ test.deepEqual(globule.find(['!js/*.js']), [], 'solitary exclusion should match nothing');
+ test.deepEqual(globule.find(['js/bar.js','!js/bar.js']), [], 'exclusion should negate match');
+ test.deepEqual(globule.find(['**/*.js', '!js/foo.js']),
+ ['js/bar.js'],
+ 'should omit single file from matched set');
+ test.deepEqual(globule.find(['!js/foo.js', '**/*.js']),
+ ['js/bar.js', 'js/foo.js'],
+ 'inclusion / exclusion order matters');
+ test.deepEqual(globule.find(['**/*.js', '**/*.css', '!js/bar.js', '!css/baz.css']),
+ ['js/foo.js','css/qux.css'],
+ 'multiple exclusions should be removed from the set');
+ test.deepEqual(globule.find(['**/*.js', '**/*.css', '!**/*.css']),
+ ['js/bar.js', 'js/foo.js'],
+ 'excluded wildcards should be removed from the matched set');
+ test.deepEqual(globule.find(['js/bar.js', 'js/foo.js', 'css/baz.css', 'css/qux.css', '!**/b*.*']),
+ ['js/foo.js', 'css/qux.css'],
+ 'different pattern for exclusion should still work');
+ test.deepEqual(globule.find(['js/bar.js', '!**/b*.*', 'js/foo.js', 'css/baz.css', 'css/qux.css']),
+ ['js/foo.js', 'css/baz.css', 'css/qux.css'],
+ 'inclusion / exclusion order matters');
+ test.done();
+ },
+ 'options.mark': function(test) {
+ test.expect(4);
+ test.deepEqual(globule.find('**d*/**'), [
+ 'deep',
+ 'deep/deep.txt',
+ 'deep/deeper',
+ 'deep/deeper/deeper.txt',
+ 'deep/deeper/deepest',
+ 'deep/deeper/deepest/deepest.txt'], 'should match files and directories.');
+ test.deepEqual(globule.find('**d*/**/'), [
+ 'deep/',
+ 'deep/deeper/',
+ 'deep/deeper/deepest/'], 'trailing / in pattern should match directories only, matches end in /.');
+ test.deepEqual(globule.find('**d*/**', {mark: true}), [
+ 'deep/',
+ 'deep/deep.txt',
+ 'deep/deeper/',
+ 'deep/deeper/deeper.txt',
+ 'deep/deeper/deepest/',
+ 'deep/deeper/deepest/deepest.txt'], 'the minimatch "mark" option ensures directories end in /.');
+ test.deepEqual(globule.find('**d*/**/', {mark: true}), [
+ 'deep/',
+ 'deep/deeper/',
+ 'deep/deeper/deepest/'], 'the minimatch "mark" option should not remove trailing / from matched paths.');
+ test.done();
+ },
+ 'options.filter': function(test) {
+ test.expect(5);
+ test.deepEqual(globule.find('**d*/**', {filter: 'isFile'}), [
+ 'deep/deep.txt',
+ 'deep/deeper/deeper.txt',
+ 'deep/deeper/deepest/deepest.txt'
+ ], 'should match files only.');
+ test.deepEqual(globule.find('**d*/**', {filter: 'isDirectory'}), [
+ 'deep',
+ 'deep/deeper',
+ 'deep/deeper/deepest'
+ ], 'should match directories only.');
+ test.deepEqual(globule.find('**', {
+ arbitraryProp: /deepest/,
+ filter: function(filepath, options) {
+ return options.arbitraryProp.test(filepath);
+ }
+ }), [
+ 'deep/deeper/deepest',
+ 'deep/deeper/deepest/deepest.txt',
+ ], 'should filter arbitrarily.');
+ test.deepEqual(globule.find('js', 'css', {filter: 'isFile'}), [], 'should fail to match.');
+ test.deepEqual(globule.find('**/*.js', {filter: 'isDirectory'}), [], 'should fail to match.');
+ test.done();
+ },
+ 'options.matchBase': function(test) {
+ test.expect(3);
+ test.deepEqual(globule.find('*.js'), [], 'should not matchBase (minimatch) by default.');
+ test.deepEqual(globule.find('*.js', {matchBase: true}),
+ ['js/bar.js', 'js/foo.js'],
+ 'matchBase option should be passed through to minimatch.');
+ test.deepEqual(globule.find('*.js', '*.css', {matchBase: true}),
+ ['js/bar.js', 'js/foo.js', 'css/baz.css', 'css/qux.css'],
+ 'matchBase option should be passed through to minimatch.');
+ test.done();
+ },
+ 'options.srcBase': function(test) {
+ test.expect(5);
+ test.deepEqual(globule.find(['**/deep*.txt'], {srcBase: 'deep'}),
+ ['deep.txt', 'deeper/deeper.txt', 'deeper/deepest/deepest.txt'],
+ 'should find paths matching pattern relative to srcBase.');
+ test.deepEqual(globule.find(['**/deep*.txt'], {cwd: 'deep'}),
+ ['deep.txt', 'deeper/deeper.txt', 'deeper/deepest/deepest.txt'],
+ 'cwd and srcBase should do the same thing.');
+ test.deepEqual(globule.find(['**/deep*'], {srcBase: 'deep', filter: 'isFile'}),
+ ['deep.txt', 'deeper/deeper.txt', 'deeper/deepest/deepest.txt'],
+ 'srcBase should not prevent filtering.');
+ test.deepEqual(globule.find(['**/deep*'], {srcBase: 'deep', filter: 'isDirectory'}),
+ ['deeper', 'deeper/deepest'],
+ 'srcBase should not prevent filtering.');
+ test.deepEqual(globule.find(['**/deep*.txt', '!**/deeper**'], {srcBase: 'deep'}),
+ ['deep.txt', 'deeper/deepest/deepest.txt'],
+ 'srcBase should not prevent exclusions.');
+ test.done();
+ },
+ 'options.prefixBase': function(test) {
+ test.expect(2);
+ test.deepEqual(globule.find(['**/deep*.txt'], {srcBase: 'deep', prefixBase: false}),
+ ['deep.txt', 'deeper/deeper.txt', 'deeper/deepest/deepest.txt'],
+ 'should not prefix srcBase to returned paths.');
+ test.deepEqual(globule.find(['**/deep*.txt'], {srcBase: 'deep', prefixBase: true}),
+ ['deep/deep.txt', 'deep/deeper/deeper.txt', 'deep/deeper/deepest/deepest.txt'],
+ 'should prefix srcBase to returned paths.');
+ test.done();
+ },
+ 'options.nonull': function(test) {
+ test.expect(3);
+ test.deepEqual(globule.find(['*omg*'], {nonull: true}),
+ ['*omg*'],
+ 'non-matching patterns should be returned in result set.');
+ test.deepEqual(globule.find(['js/a*', 'js/b*', 'js/c*'], {nonull: true}),
+ ['js/a*', 'js/bar.js', 'js/c*'],
+ 'non-matching patterns should be returned in result set.');
+ test.deepEqual(globule.find(['js/foo.js', 'js/bar.js', 'js/nonexistent.js'], {nonull: true}),
+ ['js/foo.js', 'js/bar.js', 'js/nonexistent.js'],
+ 'non-matching filenames should be returned in result set.');
+ test.done();
+ },
+};
+
+exports['mapping'] = {
+ 'basic mapping': function(test) {
+ test.expect(1);
+
+ var actual = globule.mapping(['a.txt', 'b.txt', 'c.txt']);
+ var expected = [
+ {dest: 'a.txt', src: ['a.txt']},
+ {dest: 'b.txt', src: ['b.txt']},
+ {dest: 'c.txt', src: ['c.txt']},
+ ];
+ test.deepEqual(actual, expected, 'default options should create same-to-same src-dest mappings.');
+
+ test.done();
+ },
+ 'options.srcBase': function(test) {
+ test.expect(2);
+ var actual, expected;
+ actual = globule.mapping(['a.txt', 'bar/b.txt', 'bar/baz/c.txt'], {srcBase: 'foo'});
+ expected = [
+ {dest: 'a.txt', src: ['foo/a.txt']},
+ {dest: 'bar/b.txt', src: ['foo/bar/b.txt']},
+ {dest: 'bar/baz/c.txt', src: ['foo/bar/baz/c.txt']},
+ ];
+ test.deepEqual(actual, expected, 'srcBase should be prefixed to src paths (no trailing /).');
+
+ actual = globule.mapping(['a.txt', 'bar/b.txt', 'bar/baz/c.txt'], {srcBase: 'foo/'});
+ test.deepEqual(actual, expected, 'srcBase should be prefixed to src paths (trailing /).');
+
+ test.done();
+ },
+ 'options.destBase': function(test) {
+ test.expect(2);
+ var actual, expected;
+
+ actual = globule.mapping(['a.txt', 'bar/b.txt', 'bar/baz/c.txt'], {destBase: 'dest'});
+ expected = [
+ {dest: 'dest/a.txt', src: ['a.txt']},
+ {dest: 'dest/bar/b.txt', src: ['bar/b.txt']},
+ {dest: 'dest/bar/baz/c.txt', src: ['bar/baz/c.txt']},
+ ];
+ test.deepEqual(actual, expected, 'destBase should be prefixed to dest paths (no trailing /).');
+
+ actual = globule.mapping(['a.txt', 'bar/b.txt', 'bar/baz/c.txt'], {destBase: 'dest/'});
+ test.deepEqual(actual, expected, 'destBase should be prefixed to dest paths (trailing /).');
+
+ test.done();
+ },
+ 'options.flatten': function(test) {
+ test.expect(1);
+ var actual, expected;
+
+ actual = globule.mapping(['a.txt', 'bar/b.txt', 'bar/baz/c.txt'], {flatten: true});
+ expected = [
+ {dest: 'a.txt', src: ['a.txt']},
+ {dest: 'b.txt', src: ['bar/b.txt']},
+ {dest: 'c.txt', src: ['bar/baz/c.txt']},
+ ];
+ test.deepEqual(actual, expected, 'flatten should remove all src path parts from dest.');
+
+ test.done();
+ },
+ 'options.flatten + options.destBase': function(test) {
+ test.expect(1);
+ var actual, expected;
+
+ actual = globule.mapping(['a.txt', 'bar/b.txt', 'bar/baz/c.txt'], {destBase: 'dest', flatten: true});
+ expected = [
+ {dest: 'dest/a.txt', src: ['a.txt']},
+ {dest: 'dest/b.txt', src: ['bar/b.txt']},
+ {dest: 'dest/c.txt', src: ['bar/baz/c.txt']},
+ ];
+ test.deepEqual(actual, expected, 'flatten and destBase should work together.');
+
+ test.done();
+ },
+ 'options.ext': function(test) {
+ test.expect(1);
+ var actual, expected;
+
+ actual = globule.mapping(['x/a.js', 'x.y/b.min.js', 'x.y/z.z/c'], {ext: '.foo'});
+ expected = [
+ {dest: 'x/a.foo', src: ['x/a.js']},
+ {dest: 'x.y/b.foo', src: ['x.y/b.min.js']},
+ {dest: 'x.y/z.z/c.foo', src: ['x.y/z.z/c']},
+ ];
+ test.deepEqual(actual, expected, 'by default, ext should replace everything after the first dot in the filename.');
+
+ test.done();
+ },
+ 'options.extDot': function(test) {
+ test.expect(2);
+ var actual, expected;
+
+ actual = globule.mapping(['x/a.js', 'x.y/b.bbb.min.js', 'x.y/z.z/c'], {ext: '.foo', extDot: 'first'});
+ expected = [
+ {dest: 'x/a.foo', src: ['x/a.js']},
+ {dest: 'x.y/b.foo', src: ['x.y/b.bbb.min.js']},
+ {dest: 'x.y/z.z/c.foo', src: ['x.y/z.z/c']},
+ ];
+ test.deepEqual(actual, expected, 'extDot of "first" should replace everything after the first dot in the filename.');
+
+ actual = globule.mapping(['x/a.js', 'x.y/b.bbb.min.js', 'x.y/z.z/c'], {ext: '.foo', extDot: 'last'});
+ expected = [
+ {dest: 'x/a.foo', src: ['x/a.js']},
+ {dest: 'x.y/b.bbb.min.foo', src: ['x.y/b.bbb.min.js']},
+ {dest: 'x.y/z.z/c.foo', src: ['x.y/z.z/c']},
+ ];
+ test.deepEqual(actual, expected, 'extDot of "last" should replace everything after the last dot in the filename.');
+
+ test.done();
+ },
+ 'options.rename': function(test) {
+ test.expect(1);
+ var actual, expected;
+ actual = globule.mapping(['a.txt', 'bar/b.txt', 'bar/baz/c.txt'], {
+ arbitraryProp: 'FOO',
+ rename: function(dest, options) {
+ return path.join(options.arbitraryProp, dest.toUpperCase());
+ }
+ });
+ expected = [
+ {dest: 'FOO/A.TXT', src: ['a.txt']},
+ {dest: 'FOO/BAR/B.TXT', src: ['bar/b.txt']},
+ {dest: 'FOO/BAR/BAZ/C.TXT', src: ['bar/baz/c.txt']},
+ ];
+ test.deepEqual(actual, expected, 'allow arbitrary renaming of files.');
+
+ test.done();
+ },
+};
+
+exports['findMapping'] = {
+ setUp: function(done) {
+ this.cwd = process.cwd();
+ process.chdir('test/fixtures');
+ done();
+ },
+ tearDown: function(done) {
+ process.chdir(this.cwd);
+ done();
+ },
+ 'basic matching': function(test) {
+ test.expect(2);
+
+ var actual = globule.findMapping(['expand/**/*.txt']);
+ var expected = [
+ {dest: 'expand/deep/deep.txt', src: ['expand/deep/deep.txt']},
+ {dest: 'expand/deep/deeper/deeper.txt', src: ['expand/deep/deeper/deeper.txt']},
+ {dest: 'expand/deep/deeper/deepest/deepest.txt', src: ['expand/deep/deeper/deepest/deepest.txt']},
+ ];
+ test.deepEqual(actual, expected, 'default options');
+
+ expected = globule.mapping(globule.find(['expand/**/*.txt']));
+ test.deepEqual(actual, expected, 'this is what it\'s doing under the hood, anwyays.');
+
+ test.done();
+ },
+ 'options.srcBase': function(test) {
+ test.expect(1);
+ var actual = globule.findMapping(['**/*.txt'], {destBase: 'dest', srcBase: 'expand/deep'});
+ var expected = [
+ {dest: 'dest/deep.txt', src: ['expand/deep/deep.txt']},
+ {dest: 'dest/deeper/deeper.txt', src: ['expand/deep/deeper/deeper.txt']},
+ {dest: 'dest/deeper/deepest/deepest.txt', src: ['expand/deep/deeper/deepest/deepest.txt']},
+ ];
+ test.deepEqual(actual, expected, 'srcBase should be stripped from front of destPath, pre-destBase+destPath join');
+ test.done();
+ },
+};