You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cmda.apache.org by xi...@apache.org on 2015/10/17 01:11:39 UTC
[05/51] [partial] incubator-cmda git commit: Update ApacheCMDA_1.0
http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/a9a83675/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/editor/package.json
----------------------------------------------------------------------
diff --git a/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/editor/package.json b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/editor/package.json
new file mode 100644
index 0000000..36e5f7e
--- /dev/null
+++ b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/editor/package.json
@@ -0,0 +1,43 @@
+{
+ "name": "editor",
+ "version": "0.0.5",
+ "description": "launch $EDITOR in your program",
+ "main": "index.js",
+ "directories": {
+ "example": "example",
+ "test": "test"
+ },
+ "dependencies": {},
+ "devDependencies": {
+ "tap": "~0.4.4"
+ },
+ "scripts": {
+ "test": "tap test/*.js"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/substack/node-editor.git"
+ },
+ "homepage": "https://github.com/substack/node-editor",
+ "keywords": [
+ "text",
+ "edit",
+ "shell"
+ ],
+ "author": {
+ "name": "James Halliday",
+ "email": "mail@substack.net",
+ "url": "http://substack.net"
+ },
+ "license": "MIT",
+ "engine": {
+ "node": ">=0.6"
+ },
+ "readme": "editor\n======\n\nLaunch $EDITOR in your program.\n\nexample\n=======\n\n``` js\nvar editor = require('editor');\neditor('beep.json', function (code, sig) {\n console.log('finished editing with code ' + code);\n});\n```\n\n***\n\n```\n$ node edit.js\n```\n\n![editor](http://substack.net/images/screenshots/editor.png)\n\n```\nfinished editing with code 0\n```\n\nmethods\n=======\n\n``` js\nvar editor = require('editor')\n```\n\neditor(file, opts={}, cb)\n-------------------------\n\nLaunch the `$EDITOR` (or `opts.editor`) for `file`.\n\nWhen the editor exits, `cb(code, sig)` fires.\n\ninstall\n=======\n\nWith [npm](http://npmjs.org) do:\n\n```\nnpm install editor\n```\n\nlicense\n=======\n\nMIT\n",
+ "readmeFilename": "README.markdown",
+ "bugs": {
+ "url": "https://github.com/substack/node-editor/issues"
+ },
+ "_id": "editor@0.0.5",
+ "_from": "editor@latest"
+}
http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/a9a83675/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream-npm/.npmignore
----------------------------------------------------------------------
diff --git a/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream-npm/.npmignore b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream-npm/.npmignore
new file mode 100644
index 0000000..06aea69
--- /dev/null
+++ b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream-npm/.npmignore
@@ -0,0 +1,2 @@
+# ignore the output junk from the example scripts
+example/output
http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/a9a83675/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream-npm/LICENCE
----------------------------------------------------------------------
diff --git a/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream-npm/LICENCE b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream-npm/LICENCE
new file mode 100644
index 0000000..74489e2
--- /dev/null
+++ b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream-npm/LICENCE
@@ -0,0 +1,25 @@
+Copyright (c) Isaac Z. Schlueter
+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 NETBSD FOUNDATION, INC. 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 FOUNDATION 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.
http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/a9a83675/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream-npm/README.md
----------------------------------------------------------------------
diff --git a/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream-npm/README.md b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream-npm/README.md
new file mode 100644
index 0000000..2c01e90
--- /dev/null
+++ b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream-npm/README.md
@@ -0,0 +1,18 @@
+# fstream-npm
+
+This is an fstream DirReader class that will read a directory and filter
+things according to the semantics of what goes in an npm package.
+
+For example:
+
+```javascript
+// This will print out all the files that would be included
+// by 'npm publish' or 'npm install' of this directory.
+
+var FN = require("fstream-npm")
+FN({ path: "./" })
+ .on("child", function (e) {
+ console.error(e.path.substr(e.root.path.length + 1))
+ })
+```
+
http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/a9a83675/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream-npm/example/bundle.js
----------------------------------------------------------------------
diff --git a/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream-npm/example/bundle.js b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream-npm/example/bundle.js
new file mode 100644
index 0000000..159e4f7
--- /dev/null
+++ b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream-npm/example/bundle.js
@@ -0,0 +1,13 @@
+// this example will bundle every dependency
+var P = require("../")
+P({ path: "./" })
+ .on("package", bundleIt)
+ .on("entry", function (e) {
+ console.error(e.constructor.name, e.path.substr(e.root.dirname.length + 1))
+ e.on("package", bundleIt)
+ })
+
+function bundleIt (p) {
+ p.bundleDependencies = Object.keys(p.dependencies || {})
+}
+
http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/a9a83675/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream-npm/example/dir-tar.js
----------------------------------------------------------------------
diff --git a/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream-npm/example/dir-tar.js b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream-npm/example/dir-tar.js
new file mode 100644
index 0000000..f2bad92
--- /dev/null
+++ b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream-npm/example/dir-tar.js
@@ -0,0 +1,19 @@
+// this will show what ends up in the fstream-npm package
+var P = require("fstream").DirReader
+var tar = require("tar")
+function f (entry) {
+ return entry.basename !== ".git"
+}
+
+new P({ path: "./", type: "Directory", Directory: true, filter: f })
+ .on("package", function (p) {
+ console.error("package", p)
+ })
+ .on("ignoreFile", function (e) {
+ console.error("ignoreFile", e)
+ })
+ .on("entry", function (e) {
+ console.error(e.constructor.name, e.path.substr(e.root.path.length + 1))
+ })
+ .pipe(tar.Pack())
+ .pipe(process.stdout)
http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/a9a83675/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream-npm/example/dir.js
----------------------------------------------------------------------
diff --git a/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream-npm/example/dir.js b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream-npm/example/dir.js
new file mode 100644
index 0000000..75e2eed
--- /dev/null
+++ b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream-npm/example/dir.js
@@ -0,0 +1,25 @@
+// this will show what ends up in the fstream-npm package
+var P = require("../")
+var DW = require("fstream").DirWriter
+
+var target = new DW({ Directory: true, type: "Directory",
+ path: __dirname + "/output"})
+
+function f (entry) {
+ return entry.basename !== ".git"
+}
+
+P({ path: "./", type: "Directory", isDirectory: true, filter: f })
+ .on("package", function (p) {
+ console.error("package", p)
+ })
+ .on("ignoreFile", function (e) {
+ console.error("ignoreFile", e)
+ })
+ .on("entry", function (e) {
+ console.error(e.constructor.name, e.path)
+ })
+ .pipe(target)
+ .on("end", function () {
+ console.error("ended")
+ })
http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/a9a83675/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream-npm/example/example.js
----------------------------------------------------------------------
diff --git a/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream-npm/example/example.js b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream-npm/example/example.js
new file mode 100644
index 0000000..0b53931
--- /dev/null
+++ b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream-npm/example/example.js
@@ -0,0 +1,12 @@
+// this will show what ends up in the fstream-npm package
+var P = require("../")
+P({ path: "./" })
+ .on("package", function (p) {
+ console.error("package", p)
+ })
+ .on("ignoreFile", function (e) {
+ console.error("ignoreFile", e)
+ })
+ .on("entry", function (e) {
+ console.error(e.constructor.name, e.path.substr(e.root.dirname.length + 1))
+ })
http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/a9a83675/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream-npm/example/ig-tar.js
----------------------------------------------------------------------
diff --git a/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream-npm/example/ig-tar.js b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream-npm/example/ig-tar.js
new file mode 100644
index 0000000..c1db810
--- /dev/null
+++ b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream-npm/example/ig-tar.js
@@ -0,0 +1,19 @@
+// this will show what ends up in the fstream-npm package
+var P = require("fstream-ignore")
+var tar = require("tar")
+function f (entry) {
+ return entry.basename !== ".git"
+}
+
+new P({ path: "./", type: "Directory", Directory: true, filter: f })
+ .on("package", function (p) {
+ console.error("package", p)
+ })
+ .on("ignoreFile", function (e) {
+ console.error("ignoreFile", e)
+ })
+ .on("entry", function (e) {
+ console.error(e.constructor.name, e.path.substr(e.root.path.length + 1))
+ })
+ .pipe(tar.Pack())
+ .pipe(process.stdout)
http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/a9a83675/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream-npm/example/tar.js
----------------------------------------------------------------------
diff --git a/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream-npm/example/tar.js b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream-npm/example/tar.js
new file mode 100644
index 0000000..f9bcaea
--- /dev/null
+++ b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream-npm/example/tar.js
@@ -0,0 +1,25 @@
+// this will show what ends up in the fstream-npm package
+var P = require("../")
+var tar = require("tar")
+function f () {
+ return true
+}
+// function f (entry) {
+// return entry.basename !== ".git"
+// }
+
+new P({ path: "./", type: "Directory", isDirectory: true, filter: f })
+ .on("package", function (p) {
+ console.error("package", p)
+ })
+ .on("ignoreFile", function (e) {
+ console.error("ignoreFile", e)
+ })
+ .on("entry", function (e) {
+ console.error(e.constructor.name, e.path)
+ })
+ .on("end", function () {
+ console.error("ended")
+ })
+ .pipe(tar.Pack())
+ .pipe(process.stdout)
http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/a9a83675/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream-npm/fstream-npm.js
----------------------------------------------------------------------
diff --git a/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream-npm/fstream-npm.js b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream-npm/fstream-npm.js
new file mode 100644
index 0000000..ca05880
--- /dev/null
+++ b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream-npm/fstream-npm.js
@@ -0,0 +1,323 @@
+var Ignore = require("fstream-ignore")
+, inherits = require("inherits")
+, path = require("path")
+, fs = require("fs")
+
+module.exports = Packer
+
+inherits(Packer, Ignore)
+
+function Packer (props) {
+ if (!(this instanceof Packer)) {
+ return new Packer(props)
+ }
+
+ if (typeof props === "string") {
+ props = { path: props }
+ }
+
+ props.ignoreFiles = props.ignoreFiles || [ ".npmignore",
+ ".gitignore",
+ "package.json" ]
+
+ Ignore.call(this, props)
+
+ this.bundled = props.bundled
+ this.bundleLinks = props.bundleLinks
+ this.package = props.package
+
+ // only do the magic bundling stuff for the node_modules folder that
+ // lives right next to a package.json file.
+ this.bundleMagic = this.parent &&
+ this.parent.packageRoot &&
+ this.basename === "node_modules"
+
+ // in a node_modules folder, resolve symbolic links to
+ // bundled dependencies when creating the package.
+ props.follow = this.follow = this.bundleMagic
+ // console.error("follow?", this.path, props.follow)
+
+ if (this === this.root ||
+ this.parent &&
+ this.parent.bundleMagic &&
+ this.basename.charAt(0) !== ".") {
+ this.readBundledLinks()
+ }
+
+
+ this.on("entryStat", function (entry, props) {
+ // files should *always* get into tarballs
+ // in a user-writable state, even if they're
+ // being installed from some wackey vm-mounted
+ // read-only filesystem.
+ entry.mode = props.mode = props.mode | 0200
+ })
+}
+
+Packer.prototype.readBundledLinks = function () {
+ if (this._paused) {
+ this.once("resume", this.addIgnoreFiles)
+ return
+ }
+
+ this.pause()
+ fs.readdir(this.path + "/node_modules", function (er, list) {
+ // no harm if there's no bundle
+ var l = list && list.length
+ if (er || l === 0) return this.resume()
+
+ var errState = null
+ , then = function then (er) {
+ if (errState) return
+ if (er) return errState = er, this.resume()
+ if (-- l === 0) return this.resume()
+ }.bind(this)
+
+ list.forEach(function (pkg) {
+ if (pkg.charAt(0) === ".") return then()
+ var pd = this.path + "/node_modules/" + pkg
+ fs.realpath(pd, function (er, rp) {
+ if (er) return then()
+ this.bundleLinks = this.bundleLinks || {}
+ this.bundleLinks[pkg] = rp
+ then()
+ }.bind(this))
+ }, this)
+ }.bind(this))
+}
+
+Packer.prototype.applyIgnores = function (entry, partial, entryObj) {
+ // package.json files can never be ignored.
+ if (entry === "package.json") return true
+
+ // readme files should never be ignored.
+ if (entry.match(/^readme(\.[^\.]*)$/i)) return true
+
+ // special rules. see below.
+ if (entry === "node_modules" && this.packageRoot) return true
+
+ // some files are *never* allowed under any circumstances
+ if (entry === ".git" ||
+ entry === ".lock-wscript" ||
+ entry.match(/^\.wafpickle-[0-9]+$/) ||
+ entry === "CVS" ||
+ entry === ".svn" ||
+ entry === ".hg" ||
+ entry.match(/^\..*\.swp$/) ||
+ entry === ".DS_Store" ||
+ entry.match(/^\._/) ||
+ entry === "npm-debug.log"
+ ) {
+ return false
+ }
+
+ // in a node_modules folder, we only include bundled dependencies
+ // also, prevent packages in node_modules from being affected
+ // by rules set in the containing package, so that
+ // bundles don't get busted.
+ // Also, once in a bundle, everything is installed as-is
+ // To prevent infinite cycles in the case of cyclic deps that are
+ // linked with npm link, even in a bundle, deps are only bundled
+ // if they're not already present at a higher level.
+ if (this.bundleMagic) {
+ // bubbling up. stop here and allow anything the bundled pkg allows
+ if (entry.indexOf("/") !== -1) return true
+
+ // never include the .bin. It's typically full of platform-specific
+ // stuff like symlinks and .cmd files anyway.
+ if (entry === ".bin") return false
+
+ var shouldBundle = false
+ // the package root.
+ var p = this.parent
+ // the package before this one.
+ var pp = p && p.parent
+
+ // if this entry has already been bundled, and is a symlink,
+ // and it is the *same* symlink as this one, then exclude it.
+ if (pp && pp.bundleLinks && this.bundleLinks &&
+ pp.bundleLinks[entry] &&
+ pp.bundleLinks[entry] === this.bundleLinks[entry]) {
+ return false
+ }
+
+ // since it's *not* a symbolic link, if we're *already* in a bundle,
+ // then we should include everything.
+ if (pp && pp.package && pp.basename === "node_modules") {
+ return true
+ }
+
+ // only include it at this point if it's a bundleDependency
+ var bd = this.package && this.package.bundleDependencies
+ var shouldBundle = bd && bd.indexOf(entry) !== -1
+ // if we're not going to bundle it, then it doesn't count as a bundleLink
+ // if (this.bundleLinks && !shouldBundle) delete this.bundleLinks[entry]
+ return shouldBundle
+ }
+ // if (this.bundled) return true
+
+ return Ignore.prototype.applyIgnores.call(this, entry, partial, entryObj)
+}
+
+Packer.prototype.addIgnoreFiles = function () {
+ var entries = this.entries
+ // if there's a .npmignore, then we do *not* want to
+ // read the .gitignore.
+ if (-1 !== entries.indexOf(".npmignore")) {
+ var i = entries.indexOf(".gitignore")
+ if (i !== -1) {
+ entries.splice(i, 1)
+ }
+ }
+
+ this.entries = entries
+
+ Ignore.prototype.addIgnoreFiles.call(this)
+}
+
+
+Packer.prototype.readRules = function (buf, e) {
+ if (e !== "package.json") {
+ return Ignore.prototype.readRules.call(this, buf, e)
+ }
+
+ buf = buf.toString().trim()
+
+ if (buf.length === 0) return []
+
+ try {
+ var p = this.package = JSON.parse(buf)
+ } catch (er) {
+ // just pretend it's a normal old file, not magic at all.
+ return []
+ }
+
+ if (this === this.root) {
+ this.bundleLinks = this.bundleLinks || {}
+ this.bundleLinks[p.name] = this._path
+ }
+
+ this.packageRoot = true
+ this.emit("package", p)
+
+ // make bundle deps predictable
+ if (p.bundledDependencies && !p.bundleDependencies) {
+ p.bundleDependencies = p.bundledDependencies
+ delete p.bundledDependencies
+ }
+
+ if (!p.files || !Array.isArray(p.files)) return []
+
+ // ignore everything except what's in the files array.
+ return ["*"].concat(p.files.map(function (f) {
+ return "!" + f
+ })).concat(p.files.map(function (f) {
+ return "!" + f.replace(/\/+$/, "") + "/**"
+ }))
+}
+
+Packer.prototype.getChildProps = function (stat) {
+ var props = Ignore.prototype.getChildProps.call(this, stat)
+
+ props.package = this.package
+
+ props.bundled = this.bundled && this.bundled.slice(0)
+ props.bundleLinks = this.bundleLinks &&
+ Object.create(this.bundleLinks)
+
+ // Directories have to be read as Packers
+ // otherwise fstream.Reader will create a DirReader instead.
+ if (stat.isDirectory()) {
+ props.type = this.constructor
+ }
+
+ // only follow symbolic links directly in the node_modules folder.
+ props.follow = false
+ return props
+}
+
+
+var order =
+ [ "package.json"
+ , ".npmignore"
+ , ".gitignore"
+ , /^README(\.md)?$/
+ , "LICENCE"
+ , "LICENSE"
+ , /\.js$/ ]
+
+Packer.prototype.sort = function (a, b) {
+ for (var i = 0, l = order.length; i < l; i ++) {
+ var o = order[i]
+ if (typeof o === "string") {
+ if (a === o) return -1
+ if (b === o) return 1
+ } else {
+ if (a.match(o)) return -1
+ if (b.match(o)) return 1
+ }
+ }
+
+ // deps go in the back
+ if (a === "node_modules") return 1
+ if (b === "node_modules") return -1
+
+ return Ignore.prototype.sort.call(this, a, b)
+}
+
+
+
+Packer.prototype.emitEntry = function (entry) {
+ if (this._paused) {
+ this.once("resume", this.emitEntry.bind(this, entry))
+ return
+ }
+
+ // if there is a .gitignore, then we're going to
+ // rename it to .npmignore in the output.
+ if (entry.basename === ".gitignore") {
+ entry.basename = ".npmignore"
+ entry.path = path.resolve(entry.dirname, entry.basename)
+ }
+
+ // all *.gyp files are renamed to binding.gyp for node-gyp
+ // but only when they are in the same folder as a package.json file.
+ if (entry.basename.match(/\.gyp$/) &&
+ this.entries.indexOf("package.json") !== -1) {
+ entry.basename = "binding.gyp"
+ entry.path = path.resolve(entry.dirname, entry.basename)
+ }
+
+ // skip over symbolic links
+ if (entry.type === "SymbolicLink") {
+ entry.abort()
+ return
+ }
+
+ if (entry.type !== "Directory") {
+ // make it so that the folder in the tarball is named "package"
+ var h = path.dirname((entry.root || entry).path)
+ , t = entry.path.substr(h.length + 1).replace(/^[^\/\\]+/, "package")
+ , p = h + "/" + t
+
+ entry.path = p
+ entry.dirname = path.dirname(p)
+ return Ignore.prototype.emitEntry.call(this, entry)
+ }
+
+ // we don't want empty directories to show up in package
+ // tarballs.
+ // don't emit entry events for dirs, but still walk through
+ // and read them. This means that we need to proxy up their
+ // entry events so that those entries won't be missed, since
+ // .pipe() doesn't do anythign special with "child" events, on
+ // with "entry" events.
+ var me = this
+ entry.on("entry", function (e) {
+ if (e.parent === entry) {
+ e.parent = me
+ me.emit("entry", e)
+ }
+ })
+ entry.on("package", this.emit.bind(this, "package"))
+}
http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/a9a83675/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream-npm/node_modules/fstream-ignore/.npmignore
----------------------------------------------------------------------
diff --git a/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream-npm/node_modules/fstream-ignore/.npmignore b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream-npm/node_modules/fstream-ignore/.npmignore
new file mode 100644
index 0000000..a843dc4
--- /dev/null
+++ b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream-npm/node_modules/fstream-ignore/.npmignore
@@ -0,0 +1 @@
+test/fixtures
http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/a9a83675/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream-npm/node_modules/fstream-ignore/LICENSE
----------------------------------------------------------------------
diff --git a/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream-npm/node_modules/fstream-ignore/LICENSE b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream-npm/node_modules/fstream-ignore/LICENSE
new file mode 100644
index 0000000..0c44ae7
--- /dev/null
+++ b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream-npm/node_modules/fstream-ignore/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.
http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/a9a83675/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream-npm/node_modules/fstream-ignore/README.md
----------------------------------------------------------------------
diff --git a/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream-npm/node_modules/fstream-ignore/README.md b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream-npm/node_modules/fstream-ignore/README.md
new file mode 100644
index 0000000..31170fe
--- /dev/null
+++ b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream-npm/node_modules/fstream-ignore/README.md
@@ -0,0 +1,22 @@
+# fstream-ignore
+
+A fstream DirReader that filters out files that match globs in `.ignore`
+files throughout the tree, like how git ignores files based on a
+`.gitignore` file.
+
+Here's an example:
+
+```javascript
+var Ignore = require("fstream-ignore")
+Ignore({ path: __dirname
+ , ignoreFiles: [".ignore", ".gitignore"]
+ })
+ .on("child", function (c) {
+ console.error(c.path.substr(c.root.path.length + 1))
+ })
+ .pipe(tar.Pack())
+ .pipe(fs.createWriteStream("foo.tar"))
+```
+
+This will tar up the files in __dirname into `foo.tar`, ignoring
+anything matched by the globs in any .iginore or .gitignore file.
http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/a9a83675/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream-npm/node_modules/fstream-ignore/example/basic.js
----------------------------------------------------------------------
diff --git a/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream-npm/node_modules/fstream-ignore/example/basic.js b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream-npm/node_modules/fstream-ignore/example/basic.js
new file mode 100644
index 0000000..ff45342
--- /dev/null
+++ b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream-npm/node_modules/fstream-ignore/example/basic.js
@@ -0,0 +1,13 @@
+var Ignore = require("../")
+Ignore({ path: __dirname
+ , ignoreFiles: [".ignore", ".gitignore"]
+ })
+ .on("child", function (c) {
+ console.error(c.path.substr(c.root.path.length + 1))
+ c.on("ignoreFile", onIgnoreFile)
+ })
+ .on("ignoreFile", onIgnoreFile)
+
+function onIgnoreFile (e) {
+ console.error("adding ignore file", e.path)
+}
http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/a9a83675/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream-npm/node_modules/fstream-ignore/ignore.js
----------------------------------------------------------------------
diff --git a/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream-npm/node_modules/fstream-ignore/ignore.js b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream-npm/node_modules/fstream-ignore/ignore.js
new file mode 100644
index 0000000..0728f7c
--- /dev/null
+++ b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream-npm/node_modules/fstream-ignore/ignore.js
@@ -0,0 +1,275 @@
+// Essentially, this is a fstream.DirReader class, but with a
+// bit of special logic to read the specified sort of ignore files,
+// and a filter that prevents it from picking up anything excluded
+// by those files.
+
+var Minimatch = require("minimatch").Minimatch
+, fstream = require("fstream")
+, DirReader = fstream.DirReader
+, inherits = require("inherits")
+, path = require("path")
+, fs = require("fs")
+
+module.exports = IgnoreReader
+
+inherits(IgnoreReader, DirReader)
+
+function IgnoreReader (props) {
+ if (!(this instanceof IgnoreReader)) {
+ return new IgnoreReader(props)
+ }
+
+ // must be a Directory type
+ if (typeof props === "string") {
+ props = { path: path.resolve(props) }
+ }
+
+ props.type = "Directory"
+ props.Directory = true
+
+ if (!props.ignoreFiles) props.ignoreFiles = [".ignore"]
+ this.ignoreFiles = props.ignoreFiles
+
+ this.ignoreRules = null
+
+ // ensure that .ignore files always show up at the top of the list
+ // that way, they can be read before proceeding to handle other
+ // entries in that same folder
+ if (props.sort) {
+ this._sort = props.sort === "alpha" ? alphasort : props.sort
+ props.sort = null
+ }
+
+ this.on("entries", function () {
+ // if there are any ignore files in the list, then
+ // pause and add them.
+ // then, filter the list based on our ignoreRules
+
+ var hasIg = this.entries.some(this.isIgnoreFile, this)
+
+ if (!hasIg) return this.filterEntries()
+
+ this.addIgnoreFiles()
+ })
+
+ // we filter entries before we know what they are.
+ // however, directories have to be re-tested against
+ // rules with a "/" appended, because "a/b/" will only
+ // match if "a/b" is a dir, and not otherwise.
+ this.on("_entryStat", function (entry, props) {
+ var t = entry.basename
+ if (!this.applyIgnores(entry.basename,
+ entry.type === "Directory",
+ entry)) {
+ entry.abort()
+ }
+ }.bind(this))
+
+ DirReader.call(this, props)
+}
+
+
+IgnoreReader.prototype.addIgnoreFiles = function () {
+ if (this._paused) {
+ this.once("resume", this.addIgnoreFiles)
+ return
+ }
+ if (this._ignoreFilesAdded) return
+ this._ignoreFilesAdded = true
+
+ var newIg = this.entries.filter(this.isIgnoreFile, this)
+ , count = newIg.length
+ , errState = null
+
+ if (!count) return
+
+ this.pause()
+
+ var then = function then (er) {
+ if (errState) return
+ if (er) return this.emit("error", errState = er)
+ if (-- count === 0) {
+ this.filterEntries()
+ this.resume()
+ }
+ }.bind(this)
+
+ newIg.forEach(function (ig) {
+ this.addIgnoreFile(ig, then)
+ }, this)
+}
+
+
+IgnoreReader.prototype.isIgnoreFile = function (e) {
+ return e !== "." &&
+ e !== ".." &&
+ -1 !== this.ignoreFiles.indexOf(e)
+}
+
+
+IgnoreReader.prototype.getChildProps = function (stat) {
+ var props = DirReader.prototype.getChildProps.call(this, stat)
+ props.ignoreFiles = this.ignoreFiles
+
+ // Directories have to be read as IgnoreReaders
+ // otherwise fstream.Reader will create a DirReader instead.
+ if (stat.isDirectory()) {
+ props.type = this.constructor
+ }
+ return props
+}
+
+
+IgnoreReader.prototype.addIgnoreFile = function (e, cb) {
+ // read the file, and then call addIgnoreRules
+ // if there's an error, then tell the cb about it.
+
+ var ig = path.resolve(this.path, e)
+ fs.readFile(ig, function (er, data) {
+ if (er) return cb(er)
+
+ this.emit("ignoreFile", e, data)
+ var rules = this.readRules(data, e)
+ this.addIgnoreRules(rules, e)
+ cb()
+ }.bind(this))
+}
+
+
+IgnoreReader.prototype.readRules = function (buf, e) {
+ return buf.toString().split(/\r?\n/)
+}
+
+
+// Override this to do fancier things, like read the
+// "files" array from a package.json file or something.
+IgnoreReader.prototype.addIgnoreRules = function (set, e) {
+ // filter out anything obvious
+ set = set.filter(function (s) {
+ s = s.trim()
+ return s && !s.match(/^#/)
+ })
+
+ // no rules to add!
+ if (!set.length) return
+
+ // now get a minimatch object for each one of these.
+ // Note that we need to allow dot files by default, and
+ // not switch the meaning of their exclusion
+ var mmopt = { matchBase: true, dot: true, flipNegate: true }
+ , mm = set.map(function (s) {
+ var m = new Minimatch(s, mmopt)
+ m.ignoreFile = e
+ return m
+ })
+
+ if (!this.ignoreRules) this.ignoreRules = []
+ this.ignoreRules.push.apply(this.ignoreRules, mm)
+}
+
+
+IgnoreReader.prototype.filterEntries = function () {
+ // this exclusion is at the point where we know the list of
+ // entries in the dir, but don't know what they are. since
+ // some of them *might* be directories, we have to run the
+ // match in dir-mode as well, so that we'll pick up partials
+ // of files that will be included later. Anything included
+ // at this point will be checked again later once we know
+ // what it is.
+ this.entries = this.entries.filter(function (entry) {
+ // at this point, we don't know if it's a dir or not.
+ return this.applyIgnores(entry) || this.applyIgnores(entry, true)
+ }, this)
+}
+
+
+IgnoreReader.prototype.applyIgnores = function (entry, partial, obj) {
+ var included = true
+
+ // this = /a/b/c
+ // entry = d
+ // parent /a/b sees c/d
+ if (this.parent && this.parent.applyIgnores) {
+ var pt = this.basename + "/" + entry
+ included = this.parent.applyIgnores(pt, partial)
+ }
+
+ // Negated Rules
+ // Since we're *ignoring* things here, negating means that a file
+ // is re-included, if it would have been excluded by a previous
+ // rule. So, negated rules are only relevant if the file
+ // has been excluded.
+ //
+ // Similarly, if a file has been excluded, then there's no point
+ // trying it against rules that have already been applied
+ //
+ // We're using the "flipnegate" flag here, which tells minimatch
+ // to set the "negate" for our information, but still report
+ // whether the core pattern was a hit or a miss.
+
+ if (!this.ignoreRules) {
+ return included
+ }
+
+ this.ignoreRules.forEach(function (rule) {
+ // negation means inclusion
+ if (rule.negate && included ||
+ !rule.negate && !included) {
+ // unnecessary
+ return
+ }
+
+ // first, match against /foo/bar
+ var match = rule.match("/" + entry)
+
+ if (!match) {
+ // try with the leading / trimmed off the test
+ // eg: foo/bar instead of /foo/bar
+ match = rule.match(entry)
+ }
+
+ // if the entry is a directory, then it will match
+ // with a trailing slash. eg: /foo/bar/ or foo/bar/
+ if (!match && partial) {
+ match = rule.match("/" + entry + "/") ||
+ rule.match(entry + "/")
+ }
+
+ // When including a file with a negated rule, it's
+ // relevant if a directory partially matches, since
+ // it may then match a file within it.
+ // Eg, if you ignore /a, but !/a/b/c
+ if (!match && rule.negate && partial) {
+ match = rule.match("/" + entry, true) ||
+ rule.match(entry, true)
+ }
+
+ if (match) {
+ included = rule.negate
+ }
+ }, this)
+
+ return included
+}
+
+
+IgnoreReader.prototype.sort = function (a, b) {
+ var aig = this.ignoreFiles.indexOf(a) !== -1
+ , big = this.ignoreFiles.indexOf(b) !== -1
+
+ if (aig && !big) return -1
+ if (big && !aig) return 1
+ return this._sort(a, b)
+}
+
+IgnoreReader.prototype._sort = function (a, b) {
+ return 0
+}
+
+function alphasort (a, b) {
+ return a === b ? 0
+ : a.toLowerCase() > b.toLowerCase() ? 1
+ : a.toLowerCase() < b.toLowerCase() ? -1
+ : a > b ? 1
+ : -1
+}
http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/a9a83675/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream-npm/node_modules/fstream-ignore/package.json
----------------------------------------------------------------------
diff --git a/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream-npm/node_modules/fstream-ignore/package.json b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream-npm/node_modules/fstream-ignore/package.json
new file mode 100644
index 0000000..fcf03f2
--- /dev/null
+++ b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream-npm/node_modules/fstream-ignore/package.json
@@ -0,0 +1,40 @@
+{
+ "author": {
+ "name": "Isaac Z. Schlueter",
+ "email": "i@izs.me",
+ "url": "http://blog.izs.me/"
+ },
+ "name": "fstream-ignore",
+ "description": "A thing for ignoring files based on globs",
+ "version": "0.0.7",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/isaacs/fstream-ignore.git"
+ },
+ "main": "ignore.js",
+ "scripts": {
+ "test": "tap test/*.js"
+ },
+ "dependencies": {
+ "minimatch": "~0.2.0",
+ "fstream": "~0.1.17",
+ "inherits": "2"
+ },
+ "devDependencies": {
+ "tap": "",
+ "rimraf": "",
+ "mkdirp": ""
+ },
+ "license": "BSD",
+ "readme": "# fstream-ignore\n\nA fstream DirReader that filters out files that match globs in `.ignore`\nfiles throughout the tree, like how git ignores files based on a\n`.gitignore` file.\n\nHere's an example:\n\n```javascript\nvar Ignore = require(\"fstream-ignore\")\nIgnore({ path: __dirname\n , ignoreFiles: [\".ignore\", \".gitignore\"]\n })\n .on(\"child\", function (c) {\n console.error(c.path.substr(c.root.path.length + 1))\n })\n .pipe(tar.Pack())\n .pipe(fs.createWriteStream(\"foo.tar\"))\n```\n\nThis will tar up the files in __dirname into `foo.tar`, ignoring\nanything matched by the globs in any .iginore or .gitignore file.\n",
+ "readmeFilename": "README.md",
+ "bugs": {
+ "url": "https://github.com/isaacs/fstream-ignore/issues"
+ },
+ "_id": "fstream-ignore@0.0.7",
+ "dist": {
+ "shasum": "eea3033f0c3728139de7b57ab1b0d6d89c353c63"
+ },
+ "_from": "fstream-ignore@~0.0.5",
+ "_resolved": "https://registry.npmjs.org/fstream-ignore/-/fstream-ignore-0.0.7.tgz"
+}
http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/a9a83675/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream-npm/node_modules/fstream-ignore/test/.ignore
----------------------------------------------------------------------
diff --git a/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream-npm/node_modules/fstream-ignore/test/.ignore b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream-npm/node_modules/fstream-ignore/test/.ignore
new file mode 100644
index 0000000..773679d
--- /dev/null
+++ b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream-npm/node_modules/fstream-ignore/test/.ignore
@@ -0,0 +1,2 @@
+.gitignore
+.*.swp
http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/a9a83675/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream-npm/node_modules/fstream-ignore/test/.npmignore
----------------------------------------------------------------------
diff --git a/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream-npm/node_modules/fstream-ignore/test/.npmignore b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream-npm/node_modules/fstream-ignore/test/.npmignore
new file mode 100644
index 0000000..1b26d0d
--- /dev/null
+++ b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream-npm/node_modules/fstream-ignore/test/.npmignore
@@ -0,0 +1 @@
+*/a
http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/a9a83675/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream-npm/node_modules/fstream-ignore/test/00-setup.js
----------------------------------------------------------------------
diff --git a/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream-npm/node_modules/fstream-ignore/test/00-setup.js b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream-npm/node_modules/fstream-ignore/test/00-setup.js
new file mode 100644
index 0000000..7d7e4a1
--- /dev/null
+++ b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream-npm/node_modules/fstream-ignore/test/00-setup.js
@@ -0,0 +1,71 @@
+// The test fixtures work like this:
+// These dirs are all created: {a,b,c}/{a,b,c}/{a,b,c}/
+// in each one, these files are created:
+// {.,}{a,b,c}{a,b,c}{a,b,c}
+//
+// So, there'll be a/b/c/abc, a/b/c/aba, etc., and dot-versions of each.
+//
+// Each test then writes their own ignore file rules for their purposes,
+// and is responsible for removing them afterwards.
+
+var mkdirp = require("mkdirp")
+var path = require("path")
+var i = 0
+var tap = require("tap")
+var fs = require("fs")
+var rimraf = require("rimraf")
+var fixtures = path.resolve(__dirname, "fixtures")
+
+var chars = ['a', 'b', 'c']
+var dirs = []
+
+for (var i = 0; i < 3; i ++) {
+ for (var j = 0; j < 3; j ++) {
+ for (var k = 0; k < 3; k ++) {
+ dirs.push(chars[i] + '/' + chars[j] + '/' + chars[k])
+ }
+ }
+}
+
+var files = []
+
+for (var i = 0; i < 3; i ++) {
+ for (var j = 0; j < 3; j ++) {
+ for (var k = 0; k < 3; k ++) {
+ files.push(chars[i] + chars[j] + chars[k])
+ files.push('.' + chars[i] + chars[j] + chars[k])
+ }
+ }
+}
+
+tap.test("remove fixtures", function (t) {
+ rimraf(path.resolve(__dirname, "fixtures"), function (er) {
+ t.ifError(er, "remove fixtures")
+ t.end()
+ })
+})
+
+tap.test("create fixtures", function (t) {
+ dirs.forEach(function (dir) {
+ dir = path.resolve(fixtures, dir)
+ t.test("mkdir "+dir, function (t) {
+ mkdirp(dir, function (er) {
+ t.ifError(er, "mkdir "+dir)
+ if (er) return t.end()
+
+ files.forEach(function (file) {
+ file = path.resolve(dir, file)
+ t.test("writeFile "+file, function (t) {
+ fs.writeFile(file, path.basename(file), function (er) {
+ t.ifError(er, "writing "+file)
+ t.end()
+ })
+ })
+ })
+ t.end()
+ })
+ })
+ })
+ t.end()
+})
+
http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/a9a83675/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream-npm/node_modules/fstream-ignore/test/basic.js
----------------------------------------------------------------------
diff --git a/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream-npm/node_modules/fstream-ignore/test/basic.js b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream-npm/node_modules/fstream-ignore/test/basic.js
new file mode 100644
index 0000000..3718076
--- /dev/null
+++ b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream-npm/node_modules/fstream-ignore/test/basic.js
@@ -0,0 +1,28 @@
+var IgnoreFile = require("../")
+
+// set the ignores just for this test
+var c = require("./common.js")
+c.ignores({ "a/.basic-ignore": ["b/", "aca"] })
+
+// the files that we expect to not see
+var notAllowed =
+ [ /^\/a\/b\/.*/
+ , /^\/a\/.*\/aca$/ ]
+
+
+require("tap").test("basic ignore rules", function (t) {
+ t.pass("start")
+
+ IgnoreFile({ path: __dirname + "/fixtures"
+ , ignoreFiles: [".basic-ignore"] })
+ .on("ignoreFile", function (e) {
+ console.error("ignore file!", e)
+ })
+ .on("child", function (e) {
+ var p = e.path.substr(e.root.path.length)
+ notAllowed.forEach(function (na) {
+ t.dissimilar(p, na)
+ })
+ })
+ .on("close", t.end.bind(t))
+})
http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/a9a83675/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream-npm/node_modules/fstream-ignore/test/common.js
----------------------------------------------------------------------
diff --git a/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream-npm/node_modules/fstream-ignore/test/common.js b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream-npm/node_modules/fstream-ignore/test/common.js
new file mode 100644
index 0000000..0e6cd98
--- /dev/null
+++ b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream-npm/node_modules/fstream-ignore/test/common.js
@@ -0,0 +1,40 @@
+if (require.main === module) {
+ console.log("0..1")
+ console.log("ok 1 trivial pass")
+ return
+}
+
+var fs = require("fs")
+var path = require("path")
+var rimraf = require("rimraf")
+
+exports.ignores = ignores
+exports.writeIgnoreFile = writeIgnoreFile
+exports.writeIgnores = writeIgnores
+exports.clearIgnores = clearIgnores
+
+function writeIgnoreFile (file, rules) {
+ file = path.resolve(__dirname, "fixtures", file)
+ if (Array.isArray(rules)) {
+ rules = rules.join("\n")
+ }
+ fs.writeFileSync(file, rules)
+ console.error(file, rules)
+}
+
+function writeIgnores (set) {
+ Object.keys(set).forEach(function (f) {
+ writeIgnoreFile(f, set[f])
+ })
+}
+
+function clearIgnores (set) {
+ Object.keys(set).forEach(function (file) {
+ fs.unlinkSync(path.resolve(__dirname, "fixtures", file))
+ })
+}
+
+function ignores (set) {
+ writeIgnores(set)
+ process.on("exit", clearIgnores.bind(null, set))
+}
http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/a9a83675/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream-npm/node_modules/fstream-ignore/test/ignore-most.js
----------------------------------------------------------------------
diff --git a/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream-npm/node_modules/fstream-ignore/test/ignore-most.js b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream-npm/node_modules/fstream-ignore/test/ignore-most.js
new file mode 100644
index 0000000..43eec4b
--- /dev/null
+++ b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream-npm/node_modules/fstream-ignore/test/ignore-most.js
@@ -0,0 +1,41 @@
+// ignore most things
+var IgnoreFile = require("../")
+
+// set the ignores just for this test
+var c = require("./common.js")
+c.ignores({ ".ignore": ["*", "!a/b/c/.abc", "!/c/b/a/cba"] })
+
+// the only files we expect to see
+var expected =
+ [ "/a/b/c/.abc"
+ , "/a"
+ , "/a/b"
+ , "/a/b/c"
+ , "/c/b/a/cba"
+ , "/c"
+ , "/c/b"
+ , "/c/b/a" ]
+
+require("tap").test("basic ignore rules", function (t) {
+ t.pass("start")
+
+ IgnoreFile({ path: __dirname + "/fixtures"
+ , ignoreFiles: [".ignore"] })
+ .on("ignoreFile", function (e) {
+ console.error("ignore file!", e)
+ })
+ .on("child", function (e) {
+ var p = e.path.substr(e.root.path.length)
+ var i = expected.indexOf(p)
+ if (i === -1) {
+ t.fail("unexpected file found", {file: p})
+ } else {
+ t.pass(p)
+ expected.splice(i, 1)
+ }
+ })
+ .on("close", function () {
+ t.notOk(expected.length, "all expected files should be seen")
+ t.end()
+ })
+})
http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/a9a83675/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream-npm/node_modules/fstream-ignore/test/nested-ignores.js
----------------------------------------------------------------------
diff --git a/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream-npm/node_modules/fstream-ignore/test/nested-ignores.js b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream-npm/node_modules/fstream-ignore/test/nested-ignores.js
new file mode 100644
index 0000000..a9ede59
--- /dev/null
+++ b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream-npm/node_modules/fstream-ignore/test/nested-ignores.js
@@ -0,0 +1,51 @@
+// ignore most things
+var IgnoreFile = require("../")
+
+// set the ignores just for this test
+var c = require("./common.js")
+c.ignores(
+ { ".ignore": ["*", "a", "c", "!a/b/c/.abc", "!/c/b/a/cba"]
+ , "a/.ignore": [ "!*", ".ignore" ] // unignore everything
+ , "a/a/.ignore": [ "*" ] // re-ignore everything
+ , "a/b/.ignore": [ "*", "!/c/.abc" ] // original unignore
+ , "a/c/.ignore": [ "*" ] // ignore everything again
+ , "c/b/a/.ignore": [ "!cba", "!.cba", "!/a{bc,cb}" ]
+ })
+
+// the only files we expect to see
+var expected =
+ [ "/a"
+ , "/a/a"
+ , "/a/b"
+ , "/a/b/c"
+ , "/a/b/c/.abc"
+ , "/a/c"
+ , "/c"
+ , "/c/b"
+ , "/c/b/a"
+ , "/c/b/a/cba"
+ , "/c/b/a/.cba"
+ , "/c/b/a/abc"
+ , "/c/b/a/acb" ]
+
+require("tap").test("basic ignore rules", function (t) {
+ t.pass("start")
+
+ IgnoreFile({ path: __dirname + "/fixtures"
+ , ignoreFiles: [".ignore"] })
+ .on("child", function (e) {
+ var p = e.path.substr(e.root.path.length)
+ var i = expected.indexOf(p)
+ if (i === -1) {
+ console.log("not ok "+p)
+ t.fail("unexpected file found", {found: p})
+ } else {
+ t.pass(p)
+ expected.splice(i, 1)
+ }
+ })
+ .on("close", function () {
+ t.deepEqual(expected, [], "all expected files should be seen")
+ t.end()
+ })
+})
http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/a9a83675/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream-npm/node_modules/fstream-ignore/test/unignore-child.js
----------------------------------------------------------------------
diff --git a/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream-npm/node_modules/fstream-ignore/test/unignore-child.js b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream-npm/node_modules/fstream-ignore/test/unignore-child.js
new file mode 100644
index 0000000..5812354
--- /dev/null
+++ b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream-npm/node_modules/fstream-ignore/test/unignore-child.js
@@ -0,0 +1,38 @@
+// ignore most things
+var IgnoreFile = require("../")
+
+// set the ignores just for this test
+var c = require("./common.js")
+c.ignores({ ".ignore": ["*", "a", "c", "!a/b/c/.abc", "!/c/b/a/cba"] })
+
+// the only files we expect to see
+var expected =
+ [ "/a/b/c/.abc"
+ , "/a"
+ , "/a/b"
+ , "/a/b/c"
+ , "/c/b/a/cba"
+ , "/c"
+ , "/c/b"
+ , "/c/b/a" ]
+
+require("tap").test("basic ignore rules", function (t) {
+ t.pass("start")
+
+ IgnoreFile({ path: __dirname + "/fixtures"
+ , ignoreFiles: [".ignore"] })
+ .on("child", function (e) {
+ var p = e.path.substr(e.root.path.length)
+ var i = expected.indexOf(p)
+ if (i === -1) {
+ t.fail("unexpected file found", {f: p})
+ } else {
+ t.pass(p)
+ expected.splice(i, 1)
+ }
+ })
+ .on("close", function () {
+ t.notOk(expected.length, "all expected files should be seen")
+ t.end()
+ })
+})
http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/a9a83675/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream-npm/node_modules/fstream-ignore/test/zz-cleanup.js
----------------------------------------------------------------------
diff --git a/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream-npm/node_modules/fstream-ignore/test/zz-cleanup.js b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream-npm/node_modules/fstream-ignore/test/zz-cleanup.js
new file mode 100644
index 0000000..82f064a
--- /dev/null
+++ b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream-npm/node_modules/fstream-ignore/test/zz-cleanup.js
@@ -0,0 +1,10 @@
+var tap = require("tap")
+, rimraf = require("rimraf")
+, path = require("path")
+
+tap.test("remove fixtures", function (t) {
+ rimraf(path.resolve(__dirname, "fixtures"), function (er) {
+ t.ifError(er, "remove fixtures")
+ t.end()
+ })
+})
http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/a9a83675/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream-npm/package.json
----------------------------------------------------------------------
diff --git a/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream-npm/package.json b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream-npm/package.json
new file mode 100644
index 0000000..7769921
--- /dev/null
+++ b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream-npm/package.json
@@ -0,0 +1,27 @@
+{
+ "author": {
+ "name": "Isaac Z. Schlueter",
+ "email": "i@izs.me",
+ "url": "http://blog.izs.me/"
+ },
+ "name": "fstream-npm",
+ "description": "fstream class for creating npm packages",
+ "version": "0.1.6",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/isaacs/fstream-npm.git"
+ },
+ "main": "./fstream-npm.js",
+ "dependencies": {
+ "fstream-ignore": "~0.0.5",
+ "inherits": "2"
+ },
+ "license": "BSD",
+ "readme": "# fstream-npm\n\nThis is an fstream DirReader class that will read a directory and filter\nthings according to the semantics of what goes in an npm package.\n\nFor example:\n\n```javascript\n// This will print out all the files that would be included\n// by 'npm publish' or 'npm install' of this directory.\n\nvar FN = require(\"fstream-npm\")\nFN({ path: \"./\" })\n .on(\"child\", function (e) {\n console.error(e.path.substr(e.root.path.length + 1))\n })\n```\n\n",
+ "readmeFilename": "README.md",
+ "bugs": {
+ "url": "https://github.com/isaacs/fstream-npm/issues"
+ },
+ "_id": "fstream-npm@0.1.6",
+ "_from": "fstream-npm@latest"
+}
http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/a9a83675/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream/.npmignore
----------------------------------------------------------------------
diff --git a/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream/.npmignore b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream/.npmignore
new file mode 100644
index 0000000..494272a
--- /dev/null
+++ b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream/.npmignore
@@ -0,0 +1,5 @@
+.*.swp
+node_modules/
+examples/deep-copy/
+examples/path/
+examples/filter-copy/
http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/a9a83675/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream/.travis.yml
----------------------------------------------------------------------
diff --git a/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream/.travis.yml b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream/.travis.yml
new file mode 100644
index 0000000..2d26206
--- /dev/null
+++ b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream/.travis.yml
@@ -0,0 +1,3 @@
+language: node_js
+node_js:
+ - 0.6
http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/a9a83675/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream/LICENSE
----------------------------------------------------------------------
diff --git a/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream/LICENSE b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream/LICENSE
new file mode 100644
index 0000000..0c44ae7
--- /dev/null
+++ b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream/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.
http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/a9a83675/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream/README.md
----------------------------------------------------------------------
diff --git a/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream/README.md b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream/README.md
new file mode 100644
index 0000000..9d8cb77
--- /dev/null
+++ b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream/README.md
@@ -0,0 +1,76 @@
+Like FS streams, but with stat on them, and supporting directories and
+symbolic links, as well as normal files. Also, you can use this to set
+the stats on a file, even if you don't change its contents, or to create
+a symlink, etc.
+
+So, for example, you can "write" a directory, and it'll call `mkdir`. You
+can specify a uid and gid, and it'll call `chown`. You can specify a
+`mtime` and `atime`, and it'll call `utimes`. You can call it a symlink
+and provide a `linkpath` and it'll call `symlink`.
+
+Note that it won't automatically resolve symbolic links. So, if you
+call `fstream.Reader('/some/symlink')` then you'll get an object
+that stats and then ends immediately (since it has no data). To follow
+symbolic links, do this: `fstream.Reader({path:'/some/symlink', follow:
+true })`.
+
+There are various checks to make sure that the bytes emitted are the
+same as the intended size, if the size is set.
+
+## Examples
+
+```javascript
+fstream
+ .Writer({ path: "path/to/file"
+ , mode: 0755
+ , size: 6
+ })
+ .write("hello\n")
+ .end()
+```
+
+This will create the directories if they're missing, and then write
+`hello\n` into the file, chmod it to 0755, and assert that 6 bytes have
+been written when it's done.
+
+```javascript
+fstream
+ .Writer({ path: "path/to/file"
+ , mode: 0755
+ , size: 6
+ , flags: "a"
+ })
+ .write("hello\n")
+ .end()
+```
+
+You can pass flags in, if you want to append to a file.
+
+```javascript
+fstream
+ .Writer({ path: "path/to/symlink"
+ , linkpath: "./file"
+ , SymbolicLink: true
+ , mode: "0755" // octal strings supported
+ })
+ .end()
+```
+
+If isSymbolicLink is a function, it'll be called, and if it returns
+true, then it'll treat it as a symlink. If it's not a function, then
+any truish value will make a symlink, or you can set `type:
+'SymbolicLink'`, which does the same thing.
+
+Note that the linkpath is relative to the symbolic link location, not
+the parent dir or cwd.
+
+```javascript
+fstream
+ .Reader("path/to/dir")
+ .pipe(fstream.Writer("path/to/other/dir"))
+```
+
+This will do like `cp -Rp path/to/dir path/to/other/dir`. If the other
+dir exists and isn't a directory, then it'll emit an error. It'll also
+set the uid, gid, mode, etc. to be identical. In this way, it's more
+like `rsync -a` than simply a copy.
http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/a9a83675/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream/examples/filter-pipe.js
----------------------------------------------------------------------
diff --git a/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream/examples/filter-pipe.js b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream/examples/filter-pipe.js
new file mode 100644
index 0000000..c6b55b3
--- /dev/null
+++ b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream/examples/filter-pipe.js
@@ -0,0 +1,131 @@
+var fstream = require("../fstream.js")
+var path = require("path")
+
+var r = fstream.Reader({ path: path.dirname(__dirname)
+ , filter: function () {
+ return !this.basename.match(/^\./) &&
+ !this.basename.match(/^node_modules$/)
+ !this.basename.match(/^deep-copy$/)
+ !this.basename.match(/^filter-copy$/)
+ }
+ })
+
+// this writer will only write directories
+var w = fstream.Writer({ path: path.resolve(__dirname, "filter-copy")
+ , type: "Directory"
+ , filter: function () {
+ return this.type === "Directory"
+ }
+ })
+
+var indent = ""
+var escape = {}
+
+r.on("entry", appears)
+r.on("ready", function () {
+ console.error("ready to begin!", r.path)
+})
+
+function appears (entry) {
+ console.error(indent + "a %s appears!", entry.type, entry.basename, typeof entry.basename)
+ if (foggy) {
+ console.error("FOGGY!")
+ var p = entry
+ do {
+ console.error(p.depth, p.path, p._paused)
+ } while (p = p.parent)
+
+ throw new Error("\033[mshould not have entries while foggy")
+ }
+ indent += "\t"
+ entry.on("data", missile(entry))
+ entry.on("end", runaway(entry))
+ entry.on("entry", appears)
+}
+
+var foggy
+function missile (entry) {
+ if (entry.type === "Directory") {
+ var ended = false
+ entry.once("end", function () { ended = true })
+ return function (c) {
+ // throw in some pathological pause()/resume() behavior
+ // just for extra fun.
+ process.nextTick(function () {
+ if (!foggy && !ended) { // && Math.random() < 0.3) {
+ console.error(indent +"%s casts a spell", entry.basename)
+ console.error("\na slowing fog comes over the battlefield...\n\033[32m")
+ entry.pause()
+ entry.once("resume", liftFog)
+ foggy = setTimeout(liftFog, 1000)
+
+ function liftFog (who) {
+ if (!foggy) return
+ if (who) {
+ console.error("%s breaks the spell!", who && who.path)
+ } else {
+ console.error("the spell expires!")
+ }
+ console.error("\033[mthe fog lifts!\n")
+ clearTimeout(foggy)
+ foggy = null
+ if (entry._paused) entry.resume()
+ }
+
+ }
+ })
+ }
+ }
+
+ return function (c) {
+ var e = Math.random() < 0.5
+ console.error(indent + "%s %s for %d damage!",
+ entry.basename,
+ e ? "is struck" : "fires a chunk",
+ c.length)
+ }
+}
+
+function runaway (entry) { return function () {
+ var e = Math.random() < 0.5
+ console.error(indent + "%s %s",
+ entry.basename,
+ e ? "turns to flee" : "is vanquished!")
+ indent = indent.slice(0, -1)
+}}
+
+
+w.on("entry", attacks)
+//w.on("ready", function () { attacks(w) })
+function attacks (entry) {
+ console.error(indent + "%s %s!", entry.basename,
+ entry.type === "Directory" ? "calls for backup" : "attacks")
+ entry.on("entry", attacks)
+}
+
+ended = false
+var i = 1
+r.on("end", function () {
+ if (foggy) clearTimeout(foggy)
+ console.error("\033[mIT'S OVER!!")
+ console.error("A WINNAR IS YOU!")
+
+ console.log("ok " + (i ++) + " A WINNAR IS YOU")
+ ended = true
+ // now go through and verify that everything in there is a dir.
+ var p = path.resolve(__dirname, "filter-copy")
+ var checker = fstream.Reader({ path: p })
+ checker.checker = true
+ checker.on("child", function (e) {
+ var ok = e.type === "Directory"
+ console.log((ok ? "" : "not ") + "ok " + (i ++) +
+ " should be a dir: " +
+ e.path.substr(checker.path.length + 1))
+ })
+})
+
+process.on("exit", function () {
+ console.log((ended ? "" : "not ") + "ok " + (i ++) + " ended")
+})
+
+r.pipe(w)
http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/a9a83675/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream/examples/pipe.js
----------------------------------------------------------------------
diff --git a/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream/examples/pipe.js b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream/examples/pipe.js
new file mode 100644
index 0000000..648ec84
--- /dev/null
+++ b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream/examples/pipe.js
@@ -0,0 +1,115 @@
+var fstream = require("../fstream.js")
+var path = require("path")
+
+var r = fstream.Reader({ path: path.dirname(__dirname)
+ , filter: function () {
+ return !this.basename.match(/^\./) &&
+ !this.basename.match(/^node_modules$/)
+ !this.basename.match(/^deep-copy$/)
+ }
+ })
+
+var w = fstream.Writer({ path: path.resolve(__dirname, "deep-copy")
+ , type: "Directory"
+ })
+
+var indent = ""
+var escape = {}
+
+r.on("entry", appears)
+r.on("ready", function () {
+ console.error("ready to begin!", r.path)
+})
+
+function appears (entry) {
+ console.error(indent + "a %s appears!", entry.type, entry.basename, typeof entry.basename, entry)
+ if (foggy) {
+ console.error("FOGGY!")
+ var p = entry
+ do {
+ console.error(p.depth, p.path, p._paused)
+ } while (p = p.parent)
+
+ throw new Error("\033[mshould not have entries while foggy")
+ }
+ indent += "\t"
+ entry.on("data", missile(entry))
+ entry.on("end", runaway(entry))
+ entry.on("entry", appears)
+}
+
+var foggy
+function missile (entry) {
+ if (entry.type === "Directory") {
+ var ended = false
+ entry.once("end", function () { ended = true })
+ return function (c) {
+ // throw in some pathological pause()/resume() behavior
+ // just for extra fun.
+ process.nextTick(function () {
+ if (!foggy && !ended) { // && Math.random() < 0.3) {
+ console.error(indent +"%s casts a spell", entry.basename)
+ console.error("\na slowing fog comes over the battlefield...\n\033[32m")
+ entry.pause()
+ entry.once("resume", liftFog)
+ foggy = setTimeout(liftFog, 10)
+
+ function liftFog (who) {
+ if (!foggy) return
+ if (who) {
+ console.error("%s breaks the spell!", who && who.path)
+ } else {
+ console.error("the spell expires!")
+ }
+ console.error("\033[mthe fog lifts!\n")
+ clearTimeout(foggy)
+ foggy = null
+ if (entry._paused) entry.resume()
+ }
+
+ }
+ })
+ }
+ }
+
+ return function (c) {
+ var e = Math.random() < 0.5
+ console.error(indent + "%s %s for %d damage!",
+ entry.basename,
+ e ? "is struck" : "fires a chunk",
+ c.length)
+ }
+}
+
+function runaway (entry) { return function () {
+ var e = Math.random() < 0.5
+ console.error(indent + "%s %s",
+ entry.basename,
+ e ? "turns to flee" : "is vanquished!")
+ indent = indent.slice(0, -1)
+}}
+
+
+w.on("entry", attacks)
+//w.on("ready", function () { attacks(w) })
+function attacks (entry) {
+ console.error(indent + "%s %s!", entry.basename,
+ entry.type === "Directory" ? "calls for backup" : "attacks")
+ entry.on("entry", attacks)
+}
+
+ended = false
+r.on("end", function () {
+ if (foggy) clearTimeout(foggy)
+ console.error("\033[mIT'S OVER!!")
+ console.error("A WINNAR IS YOU!")
+
+ console.log("ok 1 A WINNAR IS YOU")
+ ended = true
+})
+
+process.on("exit", function () {
+ console.log((ended ? "" : "not ") + "ok 2 ended")
+})
+
+r.pipe(w)
http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/a9a83675/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream/examples/reader.js
----------------------------------------------------------------------
diff --git a/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream/examples/reader.js b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream/examples/reader.js
new file mode 100644
index 0000000..9aa1a95
--- /dev/null
+++ b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream/examples/reader.js
@@ -0,0 +1,54 @@
+var fstream = require("../fstream.js")
+var tap = require("tap")
+var fs = require("fs")
+var path = require("path")
+var children = -1
+var dir = path.dirname(__dirname)
+
+var gotReady = false
+var ended = false
+
+tap.test("reader test", function (t) {
+
+ var r = fstream.Reader({ path: dir
+ , filter: function () {
+ // return this.parent === r
+ return this.parent === r || this === r
+ }
+ })
+
+ r.on("ready", function () {
+ gotReady = true
+ children = fs.readdirSync(dir).length
+ console.error("Setting expected children to "+children)
+ t.equal(r.type, "Directory", "should be a directory")
+ })
+
+ r.on("entry", function (entry) {
+ children --
+ if (!gotReady) {
+ t.fail("children before ready!")
+ }
+ t.equal(entry.dirname, r.path, "basename is parent dir")
+ })
+
+ r.on("error", function (er) {
+ t.fail(er)
+ t.end()
+ process.exit(1)
+ })
+
+ r.on("end", function () {
+ t.equal(children, 0, "should have seen all children")
+ ended = true
+ })
+
+ var closed = false
+ r.on("close", function () {
+ t.ok(ended, "saw end before close")
+ t.notOk(closed, "close should only happen once")
+ closed = true
+ t.end()
+ })
+
+})
http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/a9a83675/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream/examples/symlink-write.js
----------------------------------------------------------------------
diff --git a/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream/examples/symlink-write.js b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream/examples/symlink-write.js
new file mode 100644
index 0000000..d7816d2
--- /dev/null
+++ b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream/examples/symlink-write.js
@@ -0,0 +1,24 @@
+var fstream = require("../fstream.js")
+ , closed = false
+
+fstream
+ .Writer({ path: "path/to/symlink"
+ , linkpath: "./file"
+ , isSymbolicLink: true
+ , mode: "0755" // octal strings supported
+ })
+ .on("close", function () {
+ closed = true
+ var fs = require("fs")
+ var s = fs.lstatSync("path/to/symlink")
+ var isSym = s.isSymbolicLink()
+ console.log((isSym?"":"not ") +"ok 1 should be symlink")
+ var t = fs.readlinkSync("path/to/symlink")
+ var isTarget = t === "./file"
+ console.log((isTarget?"":"not ") +"ok 2 should link to ./file")
+ })
+ .end()
+
+process.on("exit", function () {
+ console.log((closed?"":"not ")+"ok 3 should be closed")
+})
http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/a9a83675/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream/fstream.js
----------------------------------------------------------------------
diff --git a/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream/fstream.js b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream/fstream.js
new file mode 100644
index 0000000..c66d26f
--- /dev/null
+++ b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream/fstream.js
@@ -0,0 +1,31 @@
+exports.Abstract = require("./lib/abstract.js")
+exports.Reader = require("./lib/reader.js")
+exports.Writer = require("./lib/writer.js")
+
+exports.File =
+ { Reader: require("./lib/file-reader.js")
+ , Writer: require("./lib/file-writer.js") }
+
+exports.Dir =
+ { Reader : require("./lib/dir-reader.js")
+ , Writer : require("./lib/dir-writer.js") }
+
+exports.Link =
+ { Reader : require("./lib/link-reader.js")
+ , Writer : require("./lib/link-writer.js") }
+
+exports.Proxy =
+ { Reader : require("./lib/proxy-reader.js")
+ , Writer : require("./lib/proxy-writer.js") }
+
+exports.Reader.Dir = exports.DirReader = exports.Dir.Reader
+exports.Reader.File = exports.FileReader = exports.File.Reader
+exports.Reader.Link = exports.LinkReader = exports.Link.Reader
+exports.Reader.Proxy = exports.ProxyReader = exports.Proxy.Reader
+
+exports.Writer.Dir = exports.DirWriter = exports.Dir.Writer
+exports.Writer.File = exports.FileWriter = exports.File.Writer
+exports.Writer.Link = exports.LinkWriter = exports.Link.Writer
+exports.Writer.Proxy = exports.ProxyWriter = exports.Proxy.Writer
+
+exports.collect = require("./lib/collect.js")
http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/a9a83675/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream/lib/abstract.js
----------------------------------------------------------------------
diff --git a/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream/lib/abstract.js b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream/lib/abstract.js
new file mode 100644
index 0000000..11ef0e2
--- /dev/null
+++ b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream/lib/abstract.js
@@ -0,0 +1,85 @@
+// the parent class for all fstreams.
+
+module.exports = Abstract
+
+var Stream = require("stream").Stream
+ , inherits = require("inherits")
+
+function Abstract () {
+ Stream.call(this)
+}
+
+inherits(Abstract, Stream)
+
+Abstract.prototype.on = function (ev, fn) {
+ if (ev === "ready" && this.ready) {
+ process.nextTick(fn.bind(this))
+ } else {
+ Stream.prototype.on.call(this, ev, fn)
+ }
+ return this
+}
+
+Abstract.prototype.abort = function () {
+ this._aborted = true
+ this.emit("abort")
+}
+
+Abstract.prototype.destroy = function () {}
+
+Abstract.prototype.warn = function (msg, code) {
+ var me = this
+ , er = decorate(msg, code, me)
+ if (!me.listeners("warn")) {
+ console.error("%s %s\n" +
+ "path = %s\n" +
+ "syscall = %s\n" +
+ "fstream_type = %s\n" +
+ "fstream_path = %s\n" +
+ "fstream_unc_path = %s\n" +
+ "fstream_class = %s\n" +
+ "fstream_stack =\n%s\n",
+ code || "UNKNOWN",
+ er.stack,
+ er.path,
+ er.syscall,
+ er.fstream_type,
+ er.fstream_path,
+ er.fstream_unc_path,
+ er.fstream_class,
+ er.fstream_stack.join("\n"))
+ } else {
+ me.emit("warn", er)
+ }
+}
+
+Abstract.prototype.info = function (msg, code) {
+ this.emit("info", msg, code)
+}
+
+Abstract.prototype.error = function (msg, code, th) {
+ var er = decorate(msg, code, this)
+ if (th) throw er
+ else this.emit("error", er)
+}
+
+function decorate (er, code, me) {
+ if (!(er instanceof Error)) er = new Error(er)
+ er.code = er.code || code
+ er.path = er.path || me.path
+ er.fstream_type = er.fstream_type || me.type
+ er.fstream_path = er.fstream_path || me.path
+ if (me._path !== me.path) {
+ er.fstream_unc_path = er.fstream_unc_path || me._path
+ }
+ if (me.linkpath) {
+ er.fstream_linkpath = er.fstream_linkpath || me.linkpath
+ }
+ er.fstream_class = er.fstream_class || me.constructor.name
+ er.fstream_stack = er.fstream_stack ||
+ new Error().stack.split(/\n/).slice(3).map(function (s) {
+ return s.replace(/^ at /, "")
+ })
+
+ return er
+}
http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/a9a83675/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream/lib/collect.js
----------------------------------------------------------------------
diff --git a/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream/lib/collect.js b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream/lib/collect.js
new file mode 100644
index 0000000..a36f780
--- /dev/null
+++ b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream/lib/collect.js
@@ -0,0 +1,67 @@
+module.exports = collect
+
+function collect (stream) {
+ if (stream._collected) return
+
+ stream._collected = true
+ stream.pause()
+
+ stream.on("data", save)
+ stream.on("end", save)
+ var buf = []
+ function save (b) {
+ if (typeof b === "string") b = new Buffer(b)
+ if (Buffer.isBuffer(b) && !b.length) return
+ buf.push(b)
+ }
+
+ stream.on("entry", saveEntry)
+ var entryBuffer = []
+ function saveEntry (e) {
+ collect(e)
+ entryBuffer.push(e)
+ }
+
+ stream.on("proxy", proxyPause)
+ function proxyPause (p) {
+ p.pause()
+ }
+
+
+ // replace the pipe method with a new version that will
+ // unlock the buffered stuff. if you just call .pipe()
+ // without a destination, then it'll re-play the events.
+ stream.pipe = (function (orig) { return function (dest) {
+ // console.error(" === open the pipes", dest && dest.path)
+
+ // let the entries flow through one at a time.
+ // Once they're all done, then we can resume completely.
+ var e = 0
+ ;(function unblockEntry () {
+ var entry = entryBuffer[e++]
+ // console.error(" ==== unblock entry", entry && entry.path)
+ if (!entry) return resume()
+ entry.on("end", unblockEntry)
+ if (dest) dest.add(entry)
+ else stream.emit("entry", entry)
+ })()
+
+ function resume () {
+ stream.removeListener("entry", saveEntry)
+ stream.removeListener("data", save)
+ stream.removeListener("end", save)
+
+ stream.pipe = orig
+ if (dest) stream.pipe(dest)
+
+ buf.forEach(function (b) {
+ if (b) stream.emit("data", b)
+ else stream.emit("end")
+ })
+
+ stream.resume()
+ }
+
+ return dest
+ }})(stream.pipe)
+}
http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/a9a83675/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream/lib/dir-reader.js
----------------------------------------------------------------------
diff --git a/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream/lib/dir-reader.js b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream/lib/dir-reader.js
new file mode 100644
index 0000000..346ac2b
--- /dev/null
+++ b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream/lib/dir-reader.js
@@ -0,0 +1,251 @@
+// A thing that emits "entry" events with Reader objects
+// Pausing it causes it to stop emitting entry events, and also
+// pauses the current entry if there is one.
+
+module.exports = DirReader
+
+var fs = require("graceful-fs")
+ , fstream = require("../fstream.js")
+ , Reader = fstream.Reader
+ , inherits = require("inherits")
+ , mkdir = require("mkdirp")
+ , path = require("path")
+ , Reader = require("./reader.js")
+ , assert = require("assert").ok
+
+inherits(DirReader, Reader)
+
+function DirReader (props) {
+ var me = this
+ if (!(me instanceof DirReader)) throw new Error(
+ "DirReader must be called as constructor.")
+
+ // should already be established as a Directory type
+ if (props.type !== "Directory" || !props.Directory) {
+ throw new Error("Non-directory type "+ props.type)
+ }
+
+ me.entries = null
+ me._index = -1
+ me._paused = false
+ me._length = -1
+
+ if (props.sort) {
+ this.sort = props.sort
+ }
+
+ Reader.call(this, props)
+}
+
+DirReader.prototype._getEntries = function () {
+ var me = this
+
+ // race condition. might pause() before calling _getEntries,
+ // and then resume, and try to get them a second time.
+ if (me._gotEntries) return
+ me._gotEntries = true
+
+ fs.readdir(me._path, function (er, entries) {
+ if (er) return me.error(er)
+
+ me.entries = entries
+
+ me.emit("entries", entries)
+ if (me._paused) me.once("resume", processEntries)
+ else processEntries()
+
+ function processEntries () {
+ me._length = me.entries.length
+ if (typeof me.sort === "function") {
+ me.entries = me.entries.sort(me.sort.bind(me))
+ }
+ me._read()
+ }
+ })
+}
+
+// start walking the dir, and emit an "entry" event for each one.
+DirReader.prototype._read = function () {
+ var me = this
+
+ if (!me.entries) return me._getEntries()
+
+ if (me._paused || me._currentEntry || me._aborted) {
+ // console.error("DR paused=%j, current=%j, aborted=%j", me._paused, !!me._currentEntry, me._aborted)
+ return
+ }
+
+ me._index ++
+ if (me._index >= me.entries.length) {
+ if (!me._ended) {
+ me._ended = true
+ me.emit("end")
+ me.emit("close")
+ }
+ return
+ }
+
+ // ok, handle this one, then.
+
+ // save creating a proxy, by stat'ing the thing now.
+ var p = path.resolve(me._path, me.entries[me._index])
+ assert(p !== me._path)
+ assert(me.entries[me._index])
+
+ // set this to prevent trying to _read() again in the stat time.
+ me._currentEntry = p
+ fs[ me.props.follow ? "stat" : "lstat" ](p, function (er, stat) {
+ if (er) return me.error(er)
+
+ var who = me._proxy || me
+
+ stat.path = p
+ stat.basename = path.basename(p)
+ stat.dirname = path.dirname(p)
+ var childProps = me.getChildProps.call(who, stat)
+ childProps.path = p
+ childProps.basename = path.basename(p)
+ childProps.dirname = path.dirname(p)
+
+ var entry = Reader(childProps, stat)
+
+ // console.error("DR Entry", p, stat.size)
+
+ me._currentEntry = entry
+
+ // "entry" events are for direct entries in a specific dir.
+ // "child" events are for any and all children at all levels.
+ // This nomenclature is not completely final.
+
+ entry.on("pause", function (who) {
+ if (!me._paused && !entry._disowned) {
+ me.pause(who)
+ }
+ })
+
+ entry.on("resume", function (who) {
+ if (me._paused && !entry._disowned) {
+ me.resume(who)
+ }
+ })
+
+ entry.on("stat", function (props) {
+ me.emit("_entryStat", entry, props)
+ if (entry._aborted) return
+ if (entry._paused) entry.once("resume", function () {
+ me.emit("entryStat", entry, props)
+ })
+ else me.emit("entryStat", entry, props)
+ })
+
+ entry.on("ready", function EMITCHILD () {
+ // console.error("DR emit child", entry._path)
+ if (me._paused) {
+ // console.error(" DR emit child - try again later")
+ // pause the child, and emit the "entry" event once we drain.
+ // console.error("DR pausing child entry")
+ entry.pause(me)
+ return me.once("resume", EMITCHILD)
+ }
+
+ // skip over sockets. they can't be piped around properly,
+ // so there's really no sense even acknowledging them.
+ // if someone really wants to see them, they can listen to
+ // the "socket" events.
+ if (entry.type === "Socket") {
+ me.emit("socket", entry)
+ } else {
+ me.emitEntry(entry)
+ }
+ })
+
+ var ended = false
+ entry.on("close", onend)
+ entry.on("disown", onend)
+ function onend () {
+ if (ended) return
+ ended = true
+ me.emit("childEnd", entry)
+ me.emit("entryEnd", entry)
+ me._currentEntry = null
+ if (!me._paused) {
+ me._read()
+ }
+ }
+
+ // XXX Remove this. Works in node as of 0.6.2 or so.
+ // Long filenames should not break stuff.
+ entry.on("error", function (er) {
+ if (entry._swallowErrors) {
+ me.warn(er)
+ entry.emit("end")
+ entry.emit("close")
+ } else {
+ me.emit("error", er)
+ }
+ })
+
+ // proxy up some events.
+ ; [ "child"
+ , "childEnd"
+ , "warn"
+ ].forEach(function (ev) {
+ entry.on(ev, me.emit.bind(me, ev))
+ })
+ })
+}
+
+DirReader.prototype.disown = function (entry) {
+ entry.emit("beforeDisown")
+ entry._disowned = true
+ entry.parent = entry.root = null
+ if (entry === this._currentEntry) {
+ this._currentEntry = null
+ }
+ entry.emit("disown")
+}
+
+DirReader.prototype.getChildProps = function (stat) {
+ return { depth: this.depth + 1
+ , root: this.root || this
+ , parent: this
+ , follow: this.follow
+ , filter: this.filter
+ , sort: this.props.sort
+ , hardlinks: this.props.hardlinks
+ }
+}
+
+DirReader.prototype.pause = function (who) {
+ var me = this
+ if (me._paused) return
+ who = who || me
+ me._paused = true
+ if (me._currentEntry && me._currentEntry.pause) {
+ me._currentEntry.pause(who)
+ }
+ me.emit("pause", who)
+}
+
+DirReader.prototype.resume = function (who) {
+ var me = this
+ if (!me._paused) return
+ who = who || me
+
+ me._paused = false
+ // console.error("DR Emit Resume", me._path)
+ me.emit("resume", who)
+ if (me._paused) {
+ // console.error("DR Re-paused", me._path)
+ return
+ }
+
+ if (me._currentEntry) {
+ if (me._currentEntry.resume) me._currentEntry.resume(who)
+ } else me._read()
+}
+
+DirReader.prototype.emitEntry = function (entry) {
+ this.emit("entry", entry)
+ this.emit("child", entry)
+}