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:38 UTC
[04/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/fstream/lib/dir-writer.js
----------------------------------------------------------------------
diff --git a/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream/lib/dir-writer.js b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream/lib/dir-writer.js
new file mode 100644
index 0000000..7073b88
--- /dev/null
+++ b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream/lib/dir-writer.js
@@ -0,0 +1,171 @@
+// It is expected that, when .add() returns false, the consumer
+// of the DirWriter will pause until a "drain" event occurs. Note
+// that this is *almost always going to be the case*, unless the
+// thing being written is some sort of unsupported type, and thus
+// skipped over.
+
+module.exports = DirWriter
+
+var fs = require("graceful-fs")
+ , fstream = require("../fstream.js")
+ , Writer = require("./writer.js")
+ , inherits = require("inherits")
+ , mkdir = require("mkdirp")
+ , path = require("path")
+ , collect = require("./collect.js")
+
+inherits(DirWriter, Writer)
+
+function DirWriter (props) {
+ var me = this
+ if (!(me instanceof DirWriter)) me.error(
+ "DirWriter must be called as constructor.", null, true)
+
+ // should already be established as a Directory type
+ if (props.type !== "Directory" || !props.Directory) {
+ me.error("Non-directory type "+ props.type + " " +
+ JSON.stringify(props), null, true)
+ }
+
+ Writer.call(this, props)
+}
+
+DirWriter.prototype._create = function () {
+ var me = this
+ mkdir(me._path, Writer.dirmode, function (er) {
+ if (er) return me.error(er)
+ // ready to start getting entries!
+ me.ready = true
+ me.emit("ready")
+ me._process()
+ })
+}
+
+// a DirWriter has an add(entry) method, but its .write() doesn't
+// do anything. Why a no-op rather than a throw? Because this
+// leaves open the door for writing directory metadata for
+// gnu/solaris style dumpdirs.
+DirWriter.prototype.write = function () {
+ return true
+}
+
+DirWriter.prototype.end = function () {
+ this._ended = true
+ this._process()
+}
+
+DirWriter.prototype.add = function (entry) {
+ var me = this
+
+ // console.error("\tadd", entry._path, "->", me._path)
+ collect(entry)
+ if (!me.ready || me._currentEntry) {
+ me._buffer.push(entry)
+ return false
+ }
+
+ // create a new writer, and pipe the incoming entry into it.
+ if (me._ended) {
+ return me.error("add after end")
+ }
+
+ me._buffer.push(entry)
+ me._process()
+
+ return 0 === this._buffer.length
+}
+
+DirWriter.prototype._process = function () {
+ var me = this
+
+ // console.error("DW Process p=%j", me._processing, me.basename)
+
+ if (me._processing) return
+
+ var entry = me._buffer.shift()
+ if (!entry) {
+ // console.error("DW Drain")
+ me.emit("drain")
+ if (me._ended) me._finish()
+ return
+ }
+
+ me._processing = true
+ // console.error("DW Entry", entry._path)
+
+ me.emit("entry", entry)
+
+ // ok, add this entry
+ //
+ // don't allow recursive copying
+ var p = entry
+ do {
+ var pp = p._path || p.path
+ if (pp === me.root._path || pp === me._path ||
+ (pp && pp.indexOf(me._path) === 0)) {
+ // console.error("DW Exit (recursive)", entry.basename, me._path)
+ me._processing = false
+ if (entry._collected) entry.pipe()
+ return me._process()
+ }
+ } while (p = p.parent)
+
+ // console.error("DW not recursive")
+
+ // chop off the entry's root dir, replace with ours
+ var props = { parent: me
+ , root: me.root || me
+ , type: entry.type
+ , depth: me.depth + 1 }
+
+ var p = entry._path || entry.path || entry.props.path
+ if (entry.parent) {
+ p = p.substr(entry.parent._path.length + 1)
+ }
+ // get rid of any ../../ shenanigans
+ props.path = path.join(me.path, path.join("/", p))
+
+ // if i have a filter, the child should inherit it.
+ props.filter = me.filter
+
+ // all the rest of the stuff, copy over from the source.
+ Object.keys(entry.props).forEach(function (k) {
+ if (!props.hasOwnProperty(k)) {
+ props[k] = entry.props[k]
+ }
+ })
+
+ // not sure at this point what kind of writer this is.
+ var child = me._currentChild = new Writer(props)
+ child.on("ready", function () {
+ // console.error("DW Child Ready", child.type, child._path)
+ // console.error(" resuming", entry._path)
+ entry.pipe(child)
+ entry.resume()
+ })
+
+ // XXX Make this work in node.
+ // Long filenames should not break stuff.
+ child.on("error", function (er) {
+ if (child._swallowErrors) {
+ me.warn(er)
+ child.emit("end")
+ child.emit("close")
+ } else {
+ me.emit("error", er)
+ }
+ })
+
+ // we fire _end internally *after* end, so that we don't move on
+ // until any "end" listeners have had their chance to do stuff.
+ child.on("close", onend)
+ var ended = false
+ function onend () {
+ if (ended) return
+ ended = true
+ // console.error("* DW Child end", child.basename)
+ me._currentChild = null
+ me._processing = false
+ me._process()
+ }
+}
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/file-reader.js
----------------------------------------------------------------------
diff --git a/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream/lib/file-reader.js b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream/lib/file-reader.js
new file mode 100644
index 0000000..b1f9861
--- /dev/null
+++ b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream/lib/file-reader.js
@@ -0,0 +1,147 @@
+// Basically just a wrapper around an fs.ReadStream
+
+module.exports = FileReader
+
+var fs = require("graceful-fs")
+ , fstream = require("../fstream.js")
+ , Reader = fstream.Reader
+ , inherits = require("inherits")
+ , mkdir = require("mkdirp")
+ , Reader = require("./reader.js")
+ , EOF = {EOF: true}
+ , CLOSE = {CLOSE: true}
+
+inherits(FileReader, Reader)
+
+function FileReader (props) {
+ // console.error(" FR create", props.path, props.size, new Error().stack)
+ var me = this
+ if (!(me instanceof FileReader)) throw new Error(
+ "FileReader must be called as constructor.")
+
+ // should already be established as a File type
+ // XXX Todo: preserve hardlinks by tracking dev+inode+nlink,
+ // with a HardLinkReader class.
+ if (!((props.type === "Link" && props.Link) ||
+ (props.type === "File" && props.File))) {
+ throw new Error("Non-file type "+ props.type)
+ }
+
+ me._buffer = []
+ me._bytesEmitted = 0
+ Reader.call(me, props)
+}
+
+FileReader.prototype._getStream = function () {
+ var me = this
+ , stream = me._stream = fs.createReadStream(me._path, me.props)
+
+ if (me.props.blksize) {
+ stream.bufferSize = me.props.blksize
+ }
+
+ stream.on("open", me.emit.bind(me, "open"))
+
+ stream.on("data", function (c) {
+ // console.error("\t\t%d %s", c.length, me.basename)
+ me._bytesEmitted += c.length
+ // no point saving empty chunks
+ if (!c.length) return
+ else if (me._paused || me._buffer.length) {
+ me._buffer.push(c)
+ me._read()
+ } else me.emit("data", c)
+ })
+
+ stream.on("end", function () {
+ if (me._paused || me._buffer.length) {
+ // console.error("FR Buffering End", me._path)
+ me._buffer.push(EOF)
+ me._read()
+ } else {
+ me.emit("end")
+ }
+
+ if (me._bytesEmitted !== me.props.size) {
+ me.error("Didn't get expected byte count\n"+
+ "expect: "+me.props.size + "\n" +
+ "actual: "+me._bytesEmitted)
+ }
+ })
+
+ stream.on("close", function () {
+ if (me._paused || me._buffer.length) {
+ // console.error("FR Buffering Close", me._path)
+ me._buffer.push(CLOSE)
+ me._read()
+ } else {
+ // console.error("FR close 1", me._path)
+ me.emit("close")
+ }
+ })
+
+ me._read()
+}
+
+FileReader.prototype._read = function () {
+ var me = this
+ // console.error("FR _read", me._path)
+ if (me._paused) {
+ // console.error("FR _read paused", me._path)
+ return
+ }
+
+ if (!me._stream) {
+ // console.error("FR _getStream calling", me._path)
+ return me._getStream()
+ }
+
+ // clear out the buffer, if there is one.
+ if (me._buffer.length) {
+ // console.error("FR _read has buffer", me._buffer.length, me._path)
+ var buf = me._buffer
+ for (var i = 0, l = buf.length; i < l; i ++) {
+ var c = buf[i]
+ if (c === EOF) {
+ // console.error("FR Read emitting buffered end", me._path)
+ me.emit("end")
+ } else if (c === CLOSE) {
+ // console.error("FR Read emitting buffered close", me._path)
+ me.emit("close")
+ } else {
+ // console.error("FR Read emitting buffered data", me._path)
+ me.emit("data", c)
+ }
+
+ if (me._paused) {
+ // console.error("FR Read Re-pausing at "+i, me._path)
+ me._buffer = buf.slice(i)
+ return
+ }
+ }
+ me._buffer.length = 0
+ }
+ // console.error("FR _read done")
+ // that's about all there is to it.
+}
+
+FileReader.prototype.pause = function (who) {
+ var me = this
+ // console.error("FR Pause", me._path)
+ if (me._paused) return
+ who = who || me
+ me._paused = true
+ if (me._stream) me._stream.pause()
+ me.emit("pause", who)
+}
+
+FileReader.prototype.resume = function (who) {
+ var me = this
+ // console.error("FR Resume", me._path)
+ if (!me._paused) return
+ who = who || me
+ me.emit("resume", who)
+ me._paused = false
+ if (me._stream) me._stream.resume()
+ me._read()
+}
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/file-writer.js
----------------------------------------------------------------------
diff --git a/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream/lib/file-writer.js b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream/lib/file-writer.js
new file mode 100644
index 0000000..6811462
--- /dev/null
+++ b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream/lib/file-writer.js
@@ -0,0 +1,100 @@
+module.exports = FileWriter
+
+var fs = require("graceful-fs")
+ , mkdir = require("mkdirp")
+ , Writer = require("./writer.js")
+ , inherits = require("inherits")
+ , EOF = {}
+
+inherits(FileWriter, Writer)
+
+function FileWriter (props) {
+ var me = this
+ if (!(me instanceof FileWriter)) throw new Error(
+ "FileWriter must be called as constructor.")
+
+ // should already be established as a File type
+ if (props.type !== "File" || !props.File) {
+ throw new Error("Non-file type "+ props.type)
+ }
+
+ me._buffer = []
+ me._bytesWritten = 0
+
+ Writer.call(this, props)
+}
+
+FileWriter.prototype._create = function () {
+ var me = this
+ if (me._stream) return
+
+ var so = {}
+ if (me.props.flags) so.flags = me.props.flags
+ so.mode = Writer.filemode
+ if (me._old && me._old.blksize) so.bufferSize = me._old.blksize
+
+ me._stream = fs.createWriteStream(me._path, so)
+
+ me._stream.on("open", function (fd) {
+ // console.error("FW open", me._buffer, me._path)
+ me.ready = true
+ me._buffer.forEach(function (c) {
+ if (c === EOF) me._stream.end()
+ else me._stream.write(c)
+ })
+ me.emit("ready")
+ // give this a kick just in case it needs it.
+ me.emit("drain")
+ })
+
+ me._stream.on("drain", function () { me.emit("drain") })
+
+ me._stream.on("close", function () {
+ // console.error("\n\nFW Stream Close", me._path, me.size)
+ me._finish()
+ })
+}
+
+FileWriter.prototype.write = function (c) {
+ var me = this
+
+ me._bytesWritten += c.length
+
+ if (!me.ready) {
+ if (!Buffer.isBuffer(c) && typeof c !== 'string')
+ throw new Error('invalid write data')
+ me._buffer.push(c)
+ return false
+ }
+
+ var ret = me._stream.write(c)
+ // console.error("\t-- fw wrote, _stream says", ret, me._stream._queue.length)
+
+ // allow 2 buffered writes, because otherwise there's just too
+ // much stop and go bs.
+ return ret || (me._stream._queue && me._stream._queue.length <= 2)
+}
+
+FileWriter.prototype.end = function (c) {
+ var me = this
+
+ if (c) me.write(c)
+
+ if (!me.ready) {
+ me._buffer.push(EOF)
+ return false
+ }
+
+ return me._stream.end()
+}
+
+FileWriter.prototype._finish = function () {
+ var me = this
+ if (typeof me.size === "number" && me._bytesWritten != me.size) {
+ me.error(
+ "Did not get expected byte count.\n" +
+ "expect: " + me.size + "\n" +
+ "actual: " + me._bytesWritten)
+ }
+ Writer.prototype._finish.call(me)
+}
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/get-type.js
----------------------------------------------------------------------
diff --git a/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream/lib/get-type.js b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream/lib/get-type.js
new file mode 100644
index 0000000..cd65c41
--- /dev/null
+++ b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream/lib/get-type.js
@@ -0,0 +1,32 @@
+module.exports = getType
+
+function getType (st) {
+ var types =
+ [ "Directory"
+ , "File"
+ , "SymbolicLink"
+ , "Link" // special for hardlinks from tarballs
+ , "BlockDevice"
+ , "CharacterDevice"
+ , "FIFO"
+ , "Socket" ]
+ , type
+
+ if (st.type && -1 !== types.indexOf(st.type)) {
+ st[st.type] = true
+ return st.type
+ }
+
+ for (var i = 0, l = types.length; i < l; i ++) {
+ type = types[i]
+ var is = st[type] || st["is" + type]
+ if (typeof is === "function") is = is.call(st)
+ if (is) {
+ st[type] = true
+ st.type = type
+ return type
+ }
+ }
+
+ return null
+}
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/link-reader.js
----------------------------------------------------------------------
diff --git a/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream/lib/link-reader.js b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream/lib/link-reader.js
new file mode 100644
index 0000000..7e7ab6c
--- /dev/null
+++ b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream/lib/link-reader.js
@@ -0,0 +1,54 @@
+// Basically just a wrapper around an fs.readlink
+//
+// XXX: Enhance this to support the Link type, by keeping
+// a lookup table of {<dev+inode>:<path>}, so that hardlinks
+// can be preserved in tarballs.
+
+module.exports = LinkReader
+
+var fs = require("graceful-fs")
+ , fstream = require("../fstream.js")
+ , inherits = require("inherits")
+ , mkdir = require("mkdirp")
+ , Reader = require("./reader.js")
+
+inherits(LinkReader, Reader)
+
+function LinkReader (props) {
+ var me = this
+ if (!(me instanceof LinkReader)) throw new Error(
+ "LinkReader must be called as constructor.")
+
+ if (!((props.type === "Link" && props.Link) ||
+ (props.type === "SymbolicLink" && props.SymbolicLink))) {
+ throw new Error("Non-link type "+ props.type)
+ }
+
+ Reader.call(me, props)
+}
+
+// When piping a LinkReader into a LinkWriter, we have to
+// already have the linkpath property set, so that has to
+// happen *before* the "ready" event, which means we need to
+// override the _stat method.
+LinkReader.prototype._stat = function (currentStat) {
+ var me = this
+ fs.readlink(me._path, function (er, linkpath) {
+ if (er) return me.error(er)
+ me.linkpath = me.props.linkpath = linkpath
+ me.emit("linkpath", linkpath)
+ Reader.prototype._stat.call(me, currentStat)
+ })
+}
+
+LinkReader.prototype._read = function () {
+ var me = this
+ if (me._paused) return
+ // basically just a no-op, since we got all the info we need
+ // from the _stat method
+ if (!me._ended) {
+ me.emit("end")
+ me.emit("close")
+ me._ended = true
+ }
+}
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/link-writer.js
----------------------------------------------------------------------
diff --git a/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream/lib/link-writer.js b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream/lib/link-writer.js
new file mode 100644
index 0000000..5c8f1e7
--- /dev/null
+++ b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream/lib/link-writer.js
@@ -0,0 +1,95 @@
+
+module.exports = LinkWriter
+
+var fs = require("graceful-fs")
+ , Writer = require("./writer.js")
+ , inherits = require("inherits")
+ , path = require("path")
+ , rimraf = require("rimraf")
+
+inherits(LinkWriter, Writer)
+
+function LinkWriter (props) {
+ var me = this
+ if (!(me instanceof LinkWriter)) throw new Error(
+ "LinkWriter must be called as constructor.")
+
+ // should already be established as a Link type
+ if (!((props.type === "Link" && props.Link) ||
+ (props.type === "SymbolicLink" && props.SymbolicLink))) {
+ throw new Error("Non-link type "+ props.type)
+ }
+
+ if (props.linkpath === "") props.linkpath = "."
+ if (!props.linkpath) {
+ me.error("Need linkpath property to create " + props.type)
+ }
+
+ Writer.call(this, props)
+}
+
+LinkWriter.prototype._create = function () {
+ // console.error(" LW _create")
+ var me = this
+ , hard = me.type === "Link" || process.platform === "win32"
+ , link = hard ? "link" : "symlink"
+ , lp = hard ? path.resolve(me.dirname, me.linkpath) : me.linkpath
+
+ // can only change the link path by clobbering
+ // For hard links, let's just assume that's always the case, since
+ // there's no good way to read them if we don't already know.
+ if (hard) return clobber(me, lp, link)
+
+ fs.readlink(me._path, function (er, p) {
+ // only skip creation if it's exactly the same link
+ if (p && p === lp) return finish(me)
+ clobber(me, lp, link)
+ })
+}
+
+function clobber (me, lp, link) {
+ rimraf(me._path, function (er) {
+ if (er) return me.error(er)
+ create(me, lp, link)
+ })
+}
+
+function create (me, lp, link) {
+ fs[link](lp, me._path, function (er) {
+ // if this is a hard link, and we're in the process of writing out a
+ // directory, it's very possible that the thing we're linking to
+ // doesn't exist yet (especially if it was intended as a symlink),
+ // so swallow ENOENT errors here and just soldier in.
+ // Additionally, an EPERM or EACCES can happen on win32 if it's trying
+ // to make a link to a directory. Again, just skip it.
+ // A better solution would be to have fs.symlink be supported on
+ // windows in some nice fashion.
+ if (er) {
+ if ((er.code === "ENOENT" ||
+ er.code === "EACCES" ||
+ er.code === "EPERM" ) && process.platform === "win32") {
+ me.ready = true
+ me.emit("ready")
+ me.emit("end")
+ me.emit("close")
+ me.end = me._finish = function () {}
+ } else return me.error(er)
+ }
+ finish(me)
+ })
+}
+
+function finish (me) {
+ me.ready = true
+ me.emit("ready")
+ if (me._ended && !me._finished) me._finish()
+}
+
+LinkWriter.prototype.end = function () {
+ // console.error("LW finish in end")
+ this._ended = true
+ if (this.ready) {
+ this._finished = true
+ this._finish()
+ }
+}
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/proxy-reader.js
----------------------------------------------------------------------
diff --git a/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream/lib/proxy-reader.js b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream/lib/proxy-reader.js
new file mode 100644
index 0000000..a0ece34
--- /dev/null
+++ b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream/lib/proxy-reader.js
@@ -0,0 +1,93 @@
+// A reader for when we don't yet know what kind of thing
+// the thing is.
+
+module.exports = ProxyReader
+
+var Reader = require("./reader.js")
+ , getType = require("./get-type.js")
+ , inherits = require("inherits")
+ , fs = require("graceful-fs")
+
+inherits(ProxyReader, Reader)
+
+function ProxyReader (props) {
+ var me = this
+ if (!(me instanceof ProxyReader)) throw new Error(
+ "ProxyReader must be called as constructor.")
+
+ me.props = props
+ me._buffer = []
+ me.ready = false
+
+ Reader.call(me, props)
+}
+
+ProxyReader.prototype._stat = function () {
+ var me = this
+ , props = me.props
+ // stat the thing to see what the proxy should be.
+ , stat = props.follow ? "stat" : "lstat"
+
+ fs[stat](props.path, function (er, current) {
+ var type
+ if (er || !current) {
+ type = "File"
+ } else {
+ type = getType(current)
+ }
+
+ props[type] = true
+ props.type = me.type = type
+
+ me._old = current
+ me._addProxy(Reader(props, current))
+ })
+}
+
+ProxyReader.prototype._addProxy = function (proxy) {
+ var me = this
+ if (me._proxyTarget) {
+ return me.error("proxy already set")
+ }
+
+ me._proxyTarget = proxy
+ proxy._proxy = me
+
+ ; [ "error"
+ , "data"
+ , "end"
+ , "close"
+ , "linkpath"
+ , "entry"
+ , "entryEnd"
+ , "child"
+ , "childEnd"
+ , "warn"
+ , "stat"
+ ].forEach(function (ev) {
+ // console.error("~~ proxy event", ev, me.path)
+ proxy.on(ev, me.emit.bind(me, ev))
+ })
+
+ me.emit("proxy", proxy)
+
+ proxy.on("ready", function () {
+ // console.error("~~ proxy is ready!", me.path)
+ me.ready = true
+ me.emit("ready")
+ })
+
+ var calls = me._buffer
+ me._buffer.length = 0
+ calls.forEach(function (c) {
+ proxy[c[0]].apply(proxy, c[1])
+ })
+}
+
+ProxyReader.prototype.pause = function () {
+ return this._proxyTarget ? this._proxyTarget.pause() : false
+}
+
+ProxyReader.prototype.resume = function () {
+ return this._proxyTarget ? this._proxyTarget.resume() : false
+}
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/proxy-writer.js
----------------------------------------------------------------------
diff --git a/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream/lib/proxy-writer.js b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream/lib/proxy-writer.js
new file mode 100644
index 0000000..b047663
--- /dev/null
+++ b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream/lib/proxy-writer.js
@@ -0,0 +1,109 @@
+// A writer for when we don't know what kind of thing
+// the thing is. That is, it's not explicitly set,
+// so we're going to make it whatever the thing already
+// is, or "File"
+//
+// Until then, collect all events.
+
+module.exports = ProxyWriter
+
+var Writer = require("./writer.js")
+ , getType = require("./get-type.js")
+ , inherits = require("inherits")
+ , collect = require("./collect.js")
+ , fs = require("fs")
+
+inherits(ProxyWriter, Writer)
+
+function ProxyWriter (props) {
+ var me = this
+ if (!(me instanceof ProxyWriter)) throw new Error(
+ "ProxyWriter must be called as constructor.")
+
+ me.props = props
+ me._needDrain = false
+
+ Writer.call(me, props)
+}
+
+ProxyWriter.prototype._stat = function () {
+ var me = this
+ , props = me.props
+ // stat the thing to see what the proxy should be.
+ , stat = props.follow ? "stat" : "lstat"
+
+ fs[stat](props.path, function (er, current) {
+ var type
+ if (er || !current) {
+ type = "File"
+ } else {
+ type = getType(current)
+ }
+
+ props[type] = true
+ props.type = me.type = type
+
+ me._old = current
+ me._addProxy(Writer(props, current))
+ })
+}
+
+ProxyWriter.prototype._addProxy = function (proxy) {
+ // console.error("~~ set proxy", this.path)
+ var me = this
+ if (me._proxy) {
+ return me.error("proxy already set")
+ }
+
+ me._proxy = proxy
+ ; [ "ready"
+ , "error"
+ , "close"
+ , "pipe"
+ , "drain"
+ , "warn"
+ ].forEach(function (ev) {
+ proxy.on(ev, me.emit.bind(me, ev))
+ })
+
+ me.emit("proxy", proxy)
+
+ var calls = me._buffer
+ calls.forEach(function (c) {
+ // console.error("~~ ~~ proxy buffered call", c[0], c[1])
+ proxy[c[0]].apply(proxy, c[1])
+ })
+ me._buffer.length = 0
+ if (me._needsDrain) me.emit("drain")
+}
+
+ProxyWriter.prototype.add = function (entry) {
+ // console.error("~~ proxy add")
+ collect(entry)
+
+ if (!this._proxy) {
+ this._buffer.push(["add", [entry]])
+ this._needDrain = true
+ return false
+ }
+ return this._proxy.add(entry)
+}
+
+ProxyWriter.prototype.write = function (c) {
+ // console.error("~~ proxy write")
+ if (!this._proxy) {
+ this._buffer.push(["write", [c]])
+ this._needDrain = true
+ return false
+ }
+ return this._proxy.write(c)
+}
+
+ProxyWriter.prototype.end = function (c) {
+ // console.error("~~ proxy end")
+ if (!this._proxy) {
+ this._buffer.push(["end", [c]])
+ return false
+ }
+ return this._proxy.end(c)
+}
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/reader.js
----------------------------------------------------------------------
diff --git a/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream/lib/reader.js b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream/lib/reader.js
new file mode 100644
index 0000000..eaf921c
--- /dev/null
+++ b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream/lib/reader.js
@@ -0,0 +1,260 @@
+
+module.exports = Reader
+
+var fs = require("graceful-fs")
+ , Stream = require("stream").Stream
+ , inherits = require("inherits")
+ , path = require("path")
+ , getType = require("./get-type.js")
+ , hardLinks = Reader.hardLinks = {}
+ , Abstract = require("./abstract.js")
+
+// Must do this *before* loading the child classes
+inherits(Reader, Abstract)
+
+var DirReader = require("./dir-reader.js")
+ , FileReader = require("./file-reader.js")
+ , LinkReader = require("./link-reader.js")
+ , SocketReader = require("./socket-reader.js")
+ , ProxyReader = require("./proxy-reader.js")
+
+function Reader (props, currentStat) {
+ var me = this
+ if (!(me instanceof Reader)) return new Reader(props, currentStat)
+
+ if (typeof props === "string") {
+ props = { path: props }
+ }
+
+ if (!props.path) {
+ me.error("Must provide a path", null, true)
+ }
+
+ // polymorphism.
+ // call fstream.Reader(dir) to get a DirReader object, etc.
+ // Note that, unlike in the Writer case, ProxyReader is going
+ // to be the *normal* state of affairs, since we rarely know
+ // the type of a file prior to reading it.
+
+
+ var type
+ , ClassType
+
+ if (props.type && typeof props.type === "function") {
+ type = props.type
+ ClassType = type
+ } else {
+ type = getType(props)
+ ClassType = Reader
+ }
+
+ if (currentStat && !type) {
+ type = getType(currentStat)
+ props[type] = true
+ props.type = type
+ }
+
+ switch (type) {
+ case "Directory":
+ ClassType = DirReader
+ break
+
+ case "Link":
+ // XXX hard links are just files.
+ // However, it would be good to keep track of files' dev+inode
+ // and nlink values, and create a HardLinkReader that emits
+ // a linkpath value of the original copy, so that the tar
+ // writer can preserve them.
+ // ClassType = HardLinkReader
+ // break
+
+ case "File":
+ ClassType = FileReader
+ break
+
+ case "SymbolicLink":
+ ClassType = LinkReader
+ break
+
+ case "Socket":
+ ClassType = SocketReader
+ break
+
+ case null:
+ ClassType = ProxyReader
+ break
+ }
+
+ if (!(me instanceof ClassType)) {
+ return new ClassType(props)
+ }
+
+ Abstract.call(me)
+
+ me.readable = true
+ me.writable = false
+
+ me.type = type
+ me.props = props
+ me.depth = props.depth = props.depth || 0
+ me.parent = props.parent || null
+ me.root = props.root || (props.parent && props.parent.root) || me
+
+ me._path = me.path = path.resolve(props.path)
+ if (process.platform === "win32") {
+ me.path = me._path = me.path.replace(/\?/g, "_")
+ if (me._path.length >= 260) {
+ // how DOES one create files on the moon?
+ // if the path has spaces in it, then UNC will fail.
+ me._swallowErrors = true
+ //if (me._path.indexOf(" ") === -1) {
+ me._path = "\\\\?\\" + me.path.replace(/\//g, "\\")
+ //}
+ }
+ }
+ me.basename = props.basename = path.basename(me.path)
+ me.dirname = props.dirname = path.dirname(me.path)
+
+ // these have served their purpose, and are now just noisy clutter
+ props.parent = props.root = null
+
+ // console.error("\n\n\n%s setting size to", props.path, props.size)
+ me.size = props.size
+ me.filter = typeof props.filter === "function" ? props.filter : null
+ if (props.sort === "alpha") props.sort = alphasort
+
+ // start the ball rolling.
+ // this will stat the thing, and then call me._read()
+ // to start reading whatever it is.
+ // console.error("calling stat", props.path, currentStat)
+ me._stat(currentStat)
+}
+
+function alphasort (a, b) {
+ return a === b ? 0
+ : a.toLowerCase() > b.toLowerCase() ? 1
+ : a.toLowerCase() < b.toLowerCase() ? -1
+ : a > b ? 1
+ : -1
+}
+
+Reader.prototype._stat = function (currentStat) {
+ var me = this
+ , props = me.props
+ , stat = props.follow ? "stat" : "lstat"
+ // console.error("Reader._stat", me._path, currentStat)
+ if (currentStat) process.nextTick(statCb.bind(null, null, currentStat))
+ else fs[stat](me._path, statCb)
+
+
+ function statCb (er, props_) {
+ // console.error("Reader._stat, statCb", me._path, props_, props_.nlink)
+ if (er) return me.error(er)
+
+ Object.keys(props_).forEach(function (k) {
+ props[k] = props_[k]
+ })
+
+ // if it's not the expected size, then abort here.
+ if (undefined !== me.size && props.size !== me.size) {
+ return me.error("incorrect size")
+ }
+ me.size = props.size
+
+ var type = getType(props)
+ var handleHardlinks = props.hardlinks !== false
+
+ // special little thing for handling hardlinks.
+ if (handleHardlinks && type !== "Directory" && props.nlink && props.nlink > 1) {
+ var k = props.dev + ":" + props.ino
+ // console.error("Reader has nlink", me._path, k)
+ if (hardLinks[k] === me._path || !hardLinks[k]) hardLinks[k] = me._path
+ else {
+ // switch into hardlink mode.
+ type = me.type = me.props.type = "Link"
+ me.Link = me.props.Link = true
+ me.linkpath = me.props.linkpath = hardLinks[k]
+ // console.error("Hardlink detected, switching mode", me._path, me.linkpath)
+ // Setting __proto__ would arguably be the "correct"
+ // approach here, but that just seems too wrong.
+ me._stat = me._read = LinkReader.prototype._read
+ }
+ }
+
+ if (me.type && me.type !== type) {
+ me.error("Unexpected type: " + type)
+ }
+
+ // if the filter doesn't pass, then just skip over this one.
+ // still have to emit end so that dir-walking can move on.
+ if (me.filter) {
+ var who = me._proxy || me
+ // special handling for ProxyReaders
+ if (!me.filter.call(who, who, props)) {
+ if (!me._disowned) {
+ me.abort()
+ me.emit("end")
+ me.emit("close")
+ }
+ return
+ }
+ }
+
+ // last chance to abort or disown before the flow starts!
+ var events = ["_stat", "stat", "ready"]
+ var e = 0
+ ;(function go () {
+ if (me._aborted) {
+ me.emit("end")
+ me.emit("close")
+ return
+ }
+
+ if (me._paused) {
+ me.once("resume", go)
+ return
+ }
+
+ var ev = events[e ++]
+ if (!ev) return me._read()
+ me.emit(ev, props)
+ go()
+ })()
+ }
+}
+
+Reader.prototype.pipe = function (dest, opts) {
+ var me = this
+ if (typeof dest.add === "function") {
+ // piping to a multi-compatible, and we've got directory entries.
+ me.on("entry", function (entry) {
+ var ret = dest.add(entry)
+ if (false === ret) {
+ me.pause()
+ }
+ })
+ }
+
+ // console.error("R Pipe apply Stream Pipe")
+ return Stream.prototype.pipe.apply(this, arguments)
+}
+
+Reader.prototype.pause = function (who) {
+ this._paused = true
+ who = who || this
+ this.emit("pause", who)
+ if (this._stream) this._stream.pause(who)
+}
+
+Reader.prototype.resume = function (who) {
+ this._paused = false
+ who = who || this
+ this.emit("resume", who)
+ if (this._stream) this._stream.resume(who)
+ this._read()
+}
+
+Reader.prototype._read = function () {
+ this.error("Cannot read unknown type: "+this.type)
+}
+
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/socket-reader.js
----------------------------------------------------------------------
diff --git a/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream/lib/socket-reader.js b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream/lib/socket-reader.js
new file mode 100644
index 0000000..e89c173
--- /dev/null
+++ b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream/lib/socket-reader.js
@@ -0,0 +1,38 @@
+// Just get the stats, and then don't do anything.
+// You can't really "read" from a socket. You "connect" to it.
+// Mostly, this is here so that reading a dir with a socket in it
+// doesn't blow up.
+
+module.exports = SocketReader
+
+var fs = require("graceful-fs")
+ , fstream = require("../fstream.js")
+ , inherits = require("inherits")
+ , mkdir = require("mkdirp")
+ , Reader = require("./reader.js")
+
+inherits(SocketReader, Reader)
+
+function SocketReader (props) {
+ var me = this
+ if (!(me instanceof SocketReader)) throw new Error(
+ "SocketReader must be called as constructor.")
+
+ if (!(props.type === "Socket" && props.Socket)) {
+ throw new Error("Non-socket type "+ props.type)
+ }
+
+ Reader.call(me, props)
+}
+
+SocketReader.prototype._read = function () {
+ var me = this
+ if (me._paused) return
+ // basically just a no-op, since we got all the info we have
+ // from the _stat method
+ if (!me._ended) {
+ me.emit("end")
+ me.emit("close")
+ me._ended = true
+ }
+}
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/writer.js
----------------------------------------------------------------------
diff --git a/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream/lib/writer.js b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream/lib/writer.js
new file mode 100644
index 0000000..5599fb2
--- /dev/null
+++ b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream/lib/writer.js
@@ -0,0 +1,389 @@
+
+module.exports = Writer
+
+var fs = require("graceful-fs")
+ , inherits = require("inherits")
+ , rimraf = require("rimraf")
+ , mkdir = require("mkdirp")
+ , path = require("path")
+ , umask = process.platform === "win32" ? 0 : process.umask()
+ , getType = require("./get-type.js")
+ , Abstract = require("./abstract.js")
+
+// Must do this *before* loading the child classes
+inherits(Writer, Abstract)
+
+Writer.dirmode = 0777 & (~umask)
+Writer.filemode = 0666 & (~umask)
+
+var DirWriter = require("./dir-writer.js")
+ , LinkWriter = require("./link-writer.js")
+ , FileWriter = require("./file-writer.js")
+ , ProxyWriter = require("./proxy-writer.js")
+
+// props is the desired state. current is optionally the current stat,
+// provided here so that subclasses can avoid statting the target
+// more than necessary.
+function Writer (props, current) {
+ var me = this
+
+ if (typeof props === "string") {
+ props = { path: props }
+ }
+
+ if (!props.path) me.error("Must provide a path", null, true)
+
+ // polymorphism.
+ // call fstream.Writer(dir) to get a DirWriter object, etc.
+ var type = getType(props)
+ , ClassType = Writer
+
+ switch (type) {
+ case "Directory":
+ ClassType = DirWriter
+ break
+ case "File":
+ ClassType = FileWriter
+ break
+ case "Link":
+ case "SymbolicLink":
+ ClassType = LinkWriter
+ break
+ case null:
+ // Don't know yet what type to create, so we wrap in a proxy.
+ ClassType = ProxyWriter
+ break
+ }
+
+ if (!(me instanceof ClassType)) return new ClassType(props)
+
+ // now get down to business.
+
+ Abstract.call(me)
+
+ // props is what we want to set.
+ // set some convenience properties as well.
+ me.type = props.type
+ me.props = props
+ me.depth = props.depth || 0
+ me.clobber = false === props.clobber ? props.clobber : true
+ me.parent = props.parent || null
+ me.root = props.root || (props.parent && props.parent.root) || me
+
+ me._path = me.path = path.resolve(props.path)
+ if (process.platform === "win32") {
+ me.path = me._path = me.path.replace(/\?/g, "_")
+ if (me._path.length >= 260) {
+ me._swallowErrors = true
+ me._path = "\\\\?\\" + me.path.replace(/\//g, "\\")
+ }
+ }
+ me.basename = path.basename(props.path)
+ me.dirname = path.dirname(props.path)
+ me.linkpath = props.linkpath || null
+
+ props.parent = props.root = null
+
+ // console.error("\n\n\n%s setting size to", props.path, props.size)
+ me.size = props.size
+
+ if (typeof props.mode === "string") {
+ props.mode = parseInt(props.mode, 8)
+ }
+
+ me.readable = false
+ me.writable = true
+
+ // buffer until ready, or while handling another entry
+ me._buffer = []
+ me.ready = false
+
+ me.filter = typeof props.filter === "function" ? props.filter: null
+
+ // start the ball rolling.
+ // this checks what's there already, and then calls
+ // me._create() to call the impl-specific creation stuff.
+ me._stat(current)
+}
+
+// Calling this means that it's something we can't create.
+// Just assert that it's already there, otherwise raise a warning.
+Writer.prototype._create = function () {
+ var me = this
+ fs[me.props.follow ? "stat" : "lstat"](me._path, function (er, current) {
+ if (er) {
+ return me.warn("Cannot create " + me._path + "\n" +
+ "Unsupported type: "+me.type, "ENOTSUP")
+ }
+ me._finish()
+ })
+}
+
+Writer.prototype._stat = function (current) {
+ var me = this
+ , props = me.props
+ , stat = props.follow ? "stat" : "lstat"
+ , who = me._proxy || me
+
+ if (current) statCb(null, current)
+ else fs[stat](me._path, statCb)
+
+ function statCb (er, current) {
+ if (me.filter && !me.filter.call(who, who, current)) {
+ me._aborted = true
+ me.emit("end")
+ me.emit("close")
+ return
+ }
+
+ // if it's not there, great. We'll just create it.
+ // if it is there, then we'll need to change whatever differs
+ if (er || !current) {
+ return create(me)
+ }
+
+ me._old = current
+ var currentType = getType(current)
+
+ // if it's a type change, then we need to clobber or error.
+ // if it's not a type change, then let the impl take care of it.
+ if (currentType !== me.type) {
+ return rimraf(me._path, function (er) {
+ if (er) return me.error(er)
+ me._old = null
+ create(me)
+ })
+ }
+
+ // otherwise, just handle in the app-specific way
+ // this creates a fs.WriteStream, or mkdir's, or whatever
+ create(me)
+ }
+}
+
+function create (me) {
+ // console.error("W create", me._path, Writer.dirmode)
+
+ // XXX Need to clobber non-dirs that are in the way,
+ // unless { clobber: false } in the props.
+ mkdir(path.dirname(me._path), Writer.dirmode, function (er, made) {
+ // console.error("W created", path.dirname(me._path), er)
+ if (er) return me.error(er)
+
+ // later on, we have to set the mode and owner for these
+ me._madeDir = made
+ return me._create()
+ })
+}
+
+function endChmod (me, want, current, path, cb) {
+ var wantMode = want.mode
+ , chmod = want.follow || me.type !== "SymbolicLink"
+ ? "chmod" : "lchmod"
+
+ if (!fs[chmod]) return cb()
+ if (typeof wantMode !== "number") return cb()
+
+ var curMode = current.mode & 0777
+ wantMode = wantMode & 0777
+ if (wantMode === curMode) return cb()
+
+ fs[chmod](path, wantMode, cb)
+}
+
+
+function endChown (me, want, current, path, cb) {
+ // Don't even try it unless root. Too easy to EPERM.
+ if (process.platform === "win32") return cb()
+ if (!process.getuid || !process.getuid() === 0) return cb()
+ if (typeof want.uid !== "number" &&
+ typeof want.gid !== "number" ) return cb()
+
+ if (current.uid === want.uid &&
+ current.gid === want.gid) return cb()
+
+ var chown = (me.props.follow || me.type !== "SymbolicLink")
+ ? "chown" : "lchown"
+ if (!fs[chown]) return cb()
+
+ if (typeof want.uid !== "number") want.uid = current.uid
+ if (typeof want.gid !== "number") want.gid = current.gid
+
+ fs[chown](path, want.uid, want.gid, cb)
+}
+
+function endUtimes (me, want, current, path, cb) {
+ if (!fs.utimes || process.platform === "win32") return cb()
+
+ var utimes = (want.follow || me.type !== "SymbolicLink")
+ ? "utimes" : "lutimes"
+
+ if (utimes === "lutimes" && !fs[utimes]) {
+ utimes = "utimes"
+ }
+
+ if (!fs[utimes]) return cb()
+
+ var curA = current.atime
+ , curM = current.mtime
+ , meA = want.atime
+ , meM = want.mtime
+
+ if (meA === undefined) meA = curA
+ if (meM === undefined) meM = curM
+
+ if (!isDate(meA)) meA = new Date(meA)
+ if (!isDate(meM)) meA = new Date(meM)
+
+ if (meA.getTime() === curA.getTime() &&
+ meM.getTime() === curM.getTime()) return cb()
+
+ fs[utimes](path, meA, meM, cb)
+}
+
+
+// XXX This function is beastly. Break it up!
+Writer.prototype._finish = function () {
+ var me = this
+
+ // console.error(" W Finish", me._path, me.size)
+
+ // set up all the things.
+ // At this point, we're already done writing whatever we've gotta write,
+ // adding files to the dir, etc.
+ var todo = 0
+ var errState = null
+ var done = false
+
+ if (me._old) {
+ // the times will almost *certainly* have changed.
+ // adds the utimes syscall, but remove another stat.
+ me._old.atime = new Date(0)
+ me._old.mtime = new Date(0)
+ // console.error(" W Finish Stale Stat", me._path, me.size)
+ setProps(me._old)
+ } else {
+ var stat = me.props.follow ? "stat" : "lstat"
+ // console.error(" W Finish Stating", me._path, me.size)
+ fs[stat](me._path, function (er, current) {
+ // console.error(" W Finish Stated", me._path, me.size, current)
+ if (er) {
+ // if we're in the process of writing out a
+ // directory, it's very possible that the thing we're linking to
+ // doesn't exist yet (especially if it was intended as a symlink),
+ // so swallow ENOENT errors here and just soldier on.
+ if (er.code === "ENOENT" &&
+ (me.type === "Link" || me.type === "SymbolicLink") &&
+ process.platform === "win32") {
+ me.ready = true
+ me.emit("ready")
+ me.emit("end")
+ me.emit("close")
+ me.end = me._finish = function () {}
+ return
+ } else return me.error(er)
+ }
+ setProps(me._old = current)
+ })
+ }
+
+ return
+
+ function setProps (current) {
+ todo += 3
+ endChmod(me, me.props, current, me._path, next("chmod"))
+ endChown(me, me.props, current, me._path, next("chown"))
+ endUtimes(me, me.props, current, me._path, next("utimes"))
+ }
+
+ function next (what) {
+ return function (er) {
+ // console.error(" W Finish", what, todo)
+ if (errState) return
+ if (er) {
+ er.fstream_finish_call = what
+ return me.error(errState = er)
+ }
+ if (--todo > 0) return
+ if (done) return
+ done = true
+
+ // we may still need to set the mode/etc. on some parent dirs
+ // that were created previously. delay end/close until then.
+ if (!me._madeDir) return end()
+ else endMadeDir(me, me._path, end)
+
+ function end (er) {
+ if (er) {
+ er.fstream_finish_call = "setupMadeDir"
+ return me.error(er)
+ }
+ // all the props have been set, so we're completely done.
+ me.emit("end")
+ me.emit("close")
+ }
+ }
+ }
+}
+
+function endMadeDir (me, p, cb) {
+ var made = me._madeDir
+ // everything *between* made and path.dirname(me._path)
+ // needs to be set up. Note that this may just be one dir.
+ var d = path.dirname(p)
+
+ endMadeDir_(me, d, function (er) {
+ if (er) return cb(er)
+ if (d === made) {
+ return cb()
+ }
+ endMadeDir(me, d, cb)
+ })
+}
+
+function endMadeDir_ (me, p, cb) {
+ var dirProps = {}
+ Object.keys(me.props).forEach(function (k) {
+ dirProps[k] = me.props[k]
+
+ // only make non-readable dirs if explicitly requested.
+ if (k === "mode" && me.type !== "Directory") {
+ dirProps[k] = dirProps[k] | 0111
+ }
+ })
+
+ var todo = 3
+ , errState = null
+ fs.stat(p, function (er, current) {
+ if (er) return cb(errState = er)
+ endChmod(me, dirProps, current, p, next)
+ endChown(me, dirProps, current, p, next)
+ endUtimes(me, dirProps, current, p, next)
+ })
+
+ function next (er) {
+ if (errState) return
+ if (er) return cb(errState = er)
+ if (-- todo === 0) return cb()
+ }
+}
+
+Writer.prototype.pipe = function () {
+ this.error("Can't pipe from writable stream")
+}
+
+Writer.prototype.add = function () {
+ this.error("Cannot add to non-Directory type")
+}
+
+Writer.prototype.write = function () {
+ return true
+}
+
+function objectToString (d) {
+ return Object.prototype.toString.call(d)
+}
+
+function isDate(d) {
+ return typeof d === 'object' && objectToString(d) === '[object Date]';
+}
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/package.json
----------------------------------------------------------------------
diff --git a/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream/package.json b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream/package.json
new file mode 100644
index 0000000..cf86878
--- /dev/null
+++ b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/fstream/package.json
@@ -0,0 +1,43 @@
+{
+ "author": {
+ "name": "Isaac Z. Schlueter",
+ "email": "i@izs.me",
+ "url": "http://blog.izs.me/"
+ },
+ "name": "fstream",
+ "description": "Advanced file system stream things",
+ "version": "0.1.25",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/isaacs/fstream.git"
+ },
+ "main": "fstream.js",
+ "engines": {
+ "node": ">=0.6"
+ },
+ "dependencies": {
+ "rimraf": "2",
+ "mkdirp": "0.3",
+ "graceful-fs": "~2.0.0",
+ "inherits": "~2.0.0"
+ },
+ "devDependencies": {
+ "tap": ""
+ },
+ "scripts": {
+ "test": "tap examples/*.js"
+ },
+ "license": "BSD",
+ "readme": "Like FS streams, but with stat on them, and supporting directories and\nsymbolic links, as well as normal files. Also, you can use this to set\nthe stats on a file, even if you don't change its contents, or to create\na symlink, etc.\n\nSo, for example, you can \"write\" a directory, and it'll call `mkdir`. You\ncan specify a uid and gid, and it'll call `chown`. You can specify a\n`mtime` and `atime`, and it'll call `utimes`. You can call it a symlink\nand provide a `linkpath` and it'll call `symlink`.\n\nNote that it won't automatically resolve symbolic links. So, if you\ncall `fstream.Reader('/some/symlink')` then you'll get an object\nthat stats and then ends immediately (since it has no data). To follow\nsymbolic links, do this: `fstream.Reader({path:'/some/symlink', follow:\ntrue })`.\n\nThere are various checks to make sure that the bytes emitted are the\nsame as the intended size, if the size is set.\n\n## Examples\n\n```javascript\nfstream\n .Writer({ pat
h: \"path/to/file\"\n , mode: 0755\n , size: 6\n })\n .write(\"hello\\n\")\n .end()\n```\n\nThis will create the directories if they're missing, and then write\n`hello\\n` into the file, chmod it to 0755, and assert that 6 bytes have\nbeen written when it's done.\n\n```javascript\nfstream\n .Writer({ path: \"path/to/file\"\n , mode: 0755\n , size: 6\n , flags: \"a\"\n })\n .write(\"hello\\n\")\n .end()\n```\n\nYou can pass flags in, if you want to append to a file.\n\n```javascript\nfstream\n .Writer({ path: \"path/to/symlink\"\n , linkpath: \"./file\"\n , SymbolicLink: true\n , mode: \"0755\" // octal strings supported\n })\n .end()\n```\n\nIf isSymbolicLink is a function, it'll be called, and if it returns\ntrue, then it'll treat it as a symlink. If it's not a function, then\nany truish value will make a symlink, or you can set `type:\n'SymbolicLink'`, which does the same thi
ng.\n\nNote that the linkpath is relative to the symbolic link location, not\nthe parent dir or cwd.\n\n```javascript\nfstream\n .Reader(\"path/to/dir\")\n .pipe(fstream.Writer(\"path/to/other/dir\"))\n```\n\nThis will do like `cp -Rp path/to/dir path/to/other/dir`. If the other\ndir exists and isn't a directory, then it'll emit an error. It'll also\nset the uid, gid, mode, etc. to be identical. In this way, it's more\nlike `rsync -a` than simply a copy.\n",
+ "readmeFilename": "README.md",
+ "bugs": {
+ "url": "https://github.com/isaacs/fstream/issues"
+ },
+ "homepage": "https://github.com/isaacs/fstream",
+ "_id": "fstream@0.1.25",
+ "dist": {
+ "shasum": "deef2db7c7898357c2b37202212a9e5b36abc732"
+ },
+ "_from": "fstream@0.1.25",
+ "_resolved": "https://registry.npmjs.org/fstream/-/fstream-0.1.25.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/github-url-from-git/.npmignore
----------------------------------------------------------------------
diff --git a/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/github-url-from-git/.npmignore b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/github-url-from-git/.npmignore
new file mode 100644
index 0000000..3c3629e
--- /dev/null
+++ b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/github-url-from-git/.npmignore
@@ -0,0 +1 @@
+node_modules
http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/a9a83675/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/github-url-from-git/History.md
----------------------------------------------------------------------
diff --git a/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/github-url-from-git/History.md b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/github-url-from-git/History.md
new file mode 100644
index 0000000..fcb296b
--- /dev/null
+++ b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/github-url-from-git/History.md
@@ -0,0 +1,10 @@
+
+1.1.1 / 2013-04-23
+==================
+
+ * package.json: Move test stuff to devDeps
+
+1.1.0 / 2013-04-19
+==================
+
+ * Add support for gist urls
http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/a9a83675/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/github-url-from-git/Makefile
----------------------------------------------------------------------
diff --git a/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/github-url-from-git/Makefile b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/github-url-from-git/Makefile
new file mode 100644
index 0000000..37f330e
--- /dev/null
+++ b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/github-url-from-git/Makefile
@@ -0,0 +1,5 @@
+
+test:
+ @./node_modules/.bin/mocha test.js --reporter spec --require should
+
+.PHONY: test
http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/a9a83675/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/github-url-from-git/Readme.md
----------------------------------------------------------------------
diff --git a/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/github-url-from-git/Readme.md b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/github-url-from-git/Readme.md
new file mode 100644
index 0000000..d027e8e
--- /dev/null
+++ b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/github-url-from-git/Readme.md
@@ -0,0 +1,41 @@
+
+# github-url-from-git
+
+```js
+describe('parse(url)', function(){
+ it('should support git://*', function(){
+ var url = 'git://github.com/jamesor/mongoose-versioner';
+ parse(url).should.equal('https://github.com/jamesor/mongoose-versioner');
+ })
+
+ it('should support git://*.git', function(){
+ var url = 'git://github.com/treygriffith/cellar.git';
+ parse(url).should.equal('https://github.com/treygriffith/cellar');
+ })
+
+ it('should support https://*', function(){
+ var url = 'https://github.com/Empeeric/i18n-node';
+ parse(url).should.equal('https://github.com/Empeeric/i18n-node');
+ })
+
+ it('should support https://*.git', function(){
+ var url = 'https://jpillora@github.com/banchee/tranquil.git';
+ parse(url).should.equal('https://github.com/banchee/tranquil');
+ })
+
+ it('should return undefined on failure', function(){
+ var url = 'git://github.com/justgord/.git';
+ assert(null == parse(url));
+ })
+
+ it('should parse git@gist urls', function() {
+ var url = 'git@gist.github.com:3135914.git';
+ parse(url).should.equal('https://gist.github.com/3135914')
+ })
+
+ it('should parse https://gist urls', function() {
+ var url = 'https://gist.github.com/3135914.git';
+ parse(url).should.equal('https://gist.github.com/3135914')
+ })
+})
+```
http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/a9a83675/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/github-url-from-git/index.js
----------------------------------------------------------------------
diff --git a/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/github-url-from-git/index.js b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/github-url-from-git/index.js
new file mode 100644
index 0000000..9ccc215
--- /dev/null
+++ b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/github-url-from-git/index.js
@@ -0,0 +1,12 @@
+var re = /^(?:https?:\/\/|git:\/\/)?(?:[^@]+@)?(gist.github.com|github.com)[:\/]([^\/]+\/[^\/]+?|[0-9]+)$/
+
+module.exports = function(url){
+ try {
+ var m = re.exec(url.replace(/\.git$/, ''));
+ var host = m[1];
+ var path = m[2];
+ return 'https://' + host + '/' + path;
+ } catch (err) {
+ // ignore
+ }
+};
http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/a9a83675/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/github-url-from-git/package.json
----------------------------------------------------------------------
diff --git a/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/github-url-from-git/package.json b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/github-url-from-git/package.json
new file mode 100644
index 0000000..5673fb9
--- /dev/null
+++ b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/github-url-from-git/package.json
@@ -0,0 +1,31 @@
+{
+ "name": "github-url-from-git",
+ "version": "1.1.1",
+ "description": "Parse a github git url and return the github repo url",
+ "main": "index.js",
+ "scripts": {
+ "test": "mocha test.js --reporter spec --require should"
+ },
+ "repository": "",
+ "keywords": [
+ "github",
+ "git",
+ "url",
+ "parser"
+ ],
+ "author": "",
+ "license": "MIT",
+ "devDependencies": {
+ "better-assert": "~1.0.0",
+ "mocha": "~1.9.0",
+ "should": "~1.2.2"
+ },
+ "readme": "\n# github-url-from-git\n\n```js\ndescribe('parse(url)', function(){\n it('should support git://*', function(){\n var url = 'git://github.com/jamesor/mongoose-versioner';\n parse(url).should.equal('https://github.com/jamesor/mongoose-versioner');\n })\n\n it('should support git://*.git', function(){\n var url = 'git://github.com/treygriffith/cellar.git';\n parse(url).should.equal('https://github.com/treygriffith/cellar');\n })\n\n it('should support https://*', function(){\n var url = 'https://github.com/Empeeric/i18n-node';\n parse(url).should.equal('https://github.com/Empeeric/i18n-node');\n })\n\n it('should support https://*.git', function(){\n var url = 'https://jpillora@github.com/banchee/tranquil.git';\n parse(url).should.equal('https://github.com/banchee/tranquil');\n })\n\n it('should return undefined on failure', function(){\n var url = 'git://github.com/justgord/.git';\n assert(null == parse(url));\n })\n\n it('should
parse git@gist urls', function() {\n var url = 'git@gist.github.com:3135914.git';\n parse(url).should.equal('https://gist.github.com/3135914')\n })\n\n it('should parse https://gist urls', function() {\n var url = 'https://gist.github.com/3135914.git';\n parse(url).should.equal('https://gist.github.com/3135914')\n })\n})\n```\n",
+ "readmeFilename": "Readme.md",
+ "_id": "github-url-from-git@1.1.1",
+ "dist": {
+ "shasum": "a14903bccbd30c91ea41765ae68ba1b27a53c4d1"
+ },
+ "_from": "github-url-from-git@1.1.1",
+ "_resolved": "https://registry.npmjs.org/github-url-from-git/-/github-url-from-git-1.1.1.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/github-url-from-git/test.js
----------------------------------------------------------------------
diff --git a/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/github-url-from-git/test.js b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/github-url-from-git/test.js
new file mode 100644
index 0000000..e472302
--- /dev/null
+++ b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/github-url-from-git/test.js
@@ -0,0 +1,40 @@
+
+var parse = require('./');
+var assert = require('better-assert');
+
+describe('parse(url)', function(){
+ it('should support git://*', function(){
+ var url = 'git://github.com/jamesor/mongoose-versioner';
+ parse(url).should.equal('https://github.com/jamesor/mongoose-versioner');
+ })
+
+ it('should support git://*.git', function(){
+ var url = 'git://github.com/treygriffith/cellar.git';
+ parse(url).should.equal('https://github.com/treygriffith/cellar');
+ })
+
+ it('should support https://*', function(){
+ var url = 'https://github.com/Empeeric/i18n-node';
+ parse(url).should.equal('https://github.com/Empeeric/i18n-node');
+ })
+
+ it('should support https://*.git', function(){
+ var url = 'https://jpillora@github.com/banchee/tranquil.git';
+ parse(url).should.equal('https://github.com/banchee/tranquil');
+ })
+
+ it('should return undefined on failure', function(){
+ var url = 'git://github.com/justgord/.git';
+ assert(null == parse(url));
+ })
+
+ it('should parse git@gist urls', function() {
+ var url = 'git@gist.github.com:3135914.git';
+ parse(url).should.equal('https://gist.github.com/3135914')
+ })
+
+ it('should parse https://gist urls', function() {
+ var url = 'https://gist.github.com/3135914.git';
+ parse(url).should.equal('https://gist.github.com/3135914')
+ })
+})
http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/a9a83675/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/github-url-from-username-repo/.npmignore
----------------------------------------------------------------------
diff --git a/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/github-url-from-username-repo/.npmignore b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/github-url-from-username-repo/.npmignore
new file mode 100644
index 0000000..39747c0
--- /dev/null
+++ b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/github-url-from-username-repo/.npmignore
@@ -0,0 +1,13 @@
+*.swp
+.*.swp
+
+.DS_Store
+*~
+.project
+.settings
+npm-debug.log
+coverage.html
+.idea
+lib-cov
+
+node_modules
\ No newline at end of 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/github-url-from-username-repo/.travis.yml
----------------------------------------------------------------------
diff --git a/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/github-url-from-username-repo/.travis.yml b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/github-url-from-username-repo/.travis.yml
new file mode 100644
index 0000000..a12e3f0
--- /dev/null
+++ b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/github-url-from-username-repo/.travis.yml
@@ -0,0 +1,4 @@
+language: node_js
+node_js:
+ - "0.8"
+ - "0.10"
\ No newline at end of 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/github-url-from-username-repo/LICENSE
----------------------------------------------------------------------
diff --git a/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/github-url-from-username-repo/LICENSE b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/github-url-from-username-repo/LICENSE
new file mode 100644
index 0000000..44c152b
--- /dev/null
+++ b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/github-url-from-username-repo/LICENSE
@@ -0,0 +1,27 @@
+Copyright (c) Robert Kowalski ("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.
\ No newline at end of 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/github-url-from-username-repo/README.md
----------------------------------------------------------------------
diff --git a/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/github-url-from-username-repo/README.md b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/github-url-from-username-repo/README.md
new file mode 100644
index 0000000..27c4054
--- /dev/null
+++ b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/github-url-from-username-repo/README.md
@@ -0,0 +1,14 @@
+[![Build Status](https://travis-ci.org/robertkowalski/github-url-from-username-repo.png?branch=master)](https://travis-ci.org/robertkowalski/github-url-from-username-repo)
+[![Dependency Status](https://gemnasium.com/robertkowalski/github-url-from-username-repo.png)](https://gemnasium.com/robertkowalski/github-url-from-username-repo)
+
+
+# github-url-from-username-repo
+
+## Usage
+
+```javascript
+
+var getUrl = require("github-url-from-username-repo")
+getUrl("visionmedia/express") // git://github.com/visionmedia/express
+
+```
\ No newline at end of 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/github-url-from-username-repo/index.js
----------------------------------------------------------------------
diff --git a/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/github-url-from-username-repo/index.js b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/github-url-from-username-repo/index.js
new file mode 100644
index 0000000..8af2c4f
--- /dev/null
+++ b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/github-url-from-username-repo/index.js
@@ -0,0 +1,9 @@
+module.exports = getUrl
+
+function getUrl (r) {
+ if (!r) return
+ if (/^[\w-]+\/[\w-]+$/.test(r))
+ return "git://github.com/" + r
+ else
+ return null
+}
\ No newline at end of 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/github-url-from-username-repo/package.json
----------------------------------------------------------------------
diff --git a/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/github-url-from-username-repo/package.json b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/github-url-from-username-repo/package.json
new file mode 100644
index 0000000..d0e241d
--- /dev/null
+++ b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/github-url-from-username-repo/package.json
@@ -0,0 +1,33 @@
+{
+ "name": "github-url-from-username-repo",
+ "version": "0.0.2",
+ "description": "Create urls from username/repo",
+ "main": "index.js",
+ "scripts": {
+ "test": "mocha -R spec"
+ },
+ "devDependencies": {
+ "mocha": "~1.13.0"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git@github.com:robertkowalski/github-url-from-username-repo.git"
+ },
+ "author": {
+ "name": "Robert Kowalski",
+ "email": "rok@kowalski.gd"
+ },
+ "license": "BSD-2-Clause",
+ "bugs": {
+ "url": "https://github.com/robertkowalski/github-url-from-username-repo/issues"
+ },
+ "keywords": [
+ "git",
+ "github",
+ "repo"
+ ],
+ "readme": "[![Build Status](https://travis-ci.org/robertkowalski/github-url-from-username-repo.png?branch=master)](https://travis-ci.org/robertkowalski/github-url-from-username-repo)\n[![Dependency Status](https://gemnasium.com/robertkowalski/github-url-from-username-repo.png)](https://gemnasium.com/robertkowalski/github-url-from-username-repo)\n\n\n# github-url-from-username-repo\n\n## Usage\n\n```javascript\n\nvar getUrl = require(\"github-url-from-username-repo\")\ngetUrl(\"visionmedia/express\") // git://github.com/visionmedia/express\n\n```",
+ "readmeFilename": "README.md",
+ "_id": "github-url-from-username-repo@0.0.2",
+ "_from": "github-url-from-username-repo@"
+}
http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/a9a83675/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/github-url-from-username-repo/test/index.js
----------------------------------------------------------------------
diff --git a/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/github-url-from-username-repo/test/index.js b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/github-url-from-username-repo/test/index.js
new file mode 100644
index 0000000..782a95c
--- /dev/null
+++ b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/github-url-from-username-repo/test/index.js
@@ -0,0 +1,21 @@
+var assert = require("assert")
+var getUrl = require("../")
+
+describe("github url from username/repo", function () {
+ it("returns a github url for the username/repo", function () {
+ var url = getUrl("visionmedia/express")
+ assert.equal("git://github.com/visionmedia/express", url)
+ })
+ it("works with -", function () {
+ var url = getUrl("vision-media/express-package")
+ assert.equal("git://github.com/vision-media/express-package", url)
+ })
+ it("returns null if it does not match", function () {
+ var url = getUrl("package")
+ assert.deepEqual(null, url)
+ })
+ it("returns undefined if no repo/user was given", function () {
+ var url = getUrl()
+ assert.deepEqual(undefined, url)
+ })
+})
\ No newline at end of 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/glob/.npmignore
----------------------------------------------------------------------
diff --git a/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/glob/.npmignore b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/glob/.npmignore
new file mode 100644
index 0000000..2af4b71
--- /dev/null
+++ b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/glob/.npmignore
@@ -0,0 +1,2 @@
+.*.swp
+test/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/glob/.travis.yml
----------------------------------------------------------------------
diff --git a/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/glob/.travis.yml b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/glob/.travis.yml
new file mode 100644
index 0000000..baa0031
--- /dev/null
+++ b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/glob/.travis.yml
@@ -0,0 +1,3 @@
+language: node_js
+node_js:
+ - 0.8
http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/a9a83675/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/glob/LICENSE
----------------------------------------------------------------------
diff --git a/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/glob/LICENSE b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/glob/LICENSE
new file mode 100644
index 0000000..0c44ae7
--- /dev/null
+++ b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/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.
http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/a9a83675/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/glob/README.md
----------------------------------------------------------------------
diff --git a/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/glob/README.md b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/glob/README.md
new file mode 100644
index 0000000..cc69164
--- /dev/null
+++ b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/glob/README.md
@@ -0,0 +1,250 @@
+# Glob
+
+Match files using the patterns the shell uses, like stars and stuff.
+
+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.
+* `statCache` Collection of all the stat results the glob search
+ performed.
+* `cache` Convenience object. Each field has the following possible
+ values:
+ * `false` - Path does not exist
+ * `true` - Path exists
+ * `1` - Path exists, and is not a directory
+ * `2` - Path exists, and is a directory
+ * `[file, entries, ...]` - Path exists, is a directory, and the
+ array value is the results of `fs.readdir`
+
+### 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.)
+* `dot` Include `.dot` files in normal matches and `globstar` matches.
+ Note that an explicit dot in a portion of the pattern will always
+ match dot files.
+* `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.
+* `cache` See `cache` property above. Pass in a previously generated
+ cache object to save some fs calls.
+* `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.
+
+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 cache or statCache objects are 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.
http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/a9a83675/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/glob/examples/g.js
----------------------------------------------------------------------
diff --git a/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/glob/examples/g.js b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/glob/examples/g.js
new file mode 100644
index 0000000..be122df
--- /dev/null
+++ b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/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")
http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/a9a83675/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/glob/examples/usr-local.js
----------------------------------------------------------------------
diff --git a/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/glob/examples/usr-local.js b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/node_modules/glob/examples/usr-local.js
new file mode 100644
index 0000000..327a425
--- /dev/null
+++ b/ApacheCMDA_Backend_1.0/project/target/node-modules/webjars/npm/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")