http://git-wip-us.apache.org/repos/asf/incubator-apex-malhar/blob/e1a45507/web/demos/package/node_modules/http-proxy/node_modules/optimist/test/whitespace.js ---------------------------------------------------------------------- diff --git a/web/demos/package/node_modules/http-proxy/node_modules/optimist/test/whitespace.js b/web/demos/package/node_modules/http-proxy/node_modules/optimist/test/whitespace.js deleted file mode 100644 index 90b9075..0000000 --- a/web/demos/package/node_modules/http-proxy/node_modules/optimist/test/whitespace.js +++ /dev/null @@ -1,8 +0,0 @@ -var optimist = require('../'); -var test = require('tap').test; - -test('whitespace should be whitespace' , function (t) { - t.plan(1); - var x = optimist.parse([ '-x', '\t' ]).x; - t.equal(x, '\t'); -});
http://git-wip-us.apache.org/repos/asf/incubator-apex-malhar/blob/e1a45507/web/demos/package/node_modules/http-proxy/node_modules/pkginfo/.npmignore ---------------------------------------------------------------------- diff --git a/web/demos/package/node_modules/http-proxy/node_modules/pkginfo/.npmignore b/web/demos/package/node_modules/http-proxy/node_modules/pkginfo/.npmignore deleted file mode 100644 index 9303c34..0000000 --- a/web/demos/package/node_modules/http-proxy/node_modules/pkginfo/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -node_modules/ -npm-debug.log \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-apex-malhar/blob/e1a45507/web/demos/package/node_modules/http-proxy/node_modules/pkginfo/LICENSE ---------------------------------------------------------------------- diff --git a/web/demos/package/node_modules/http-proxy/node_modules/pkginfo/LICENSE b/web/demos/package/node_modules/http-proxy/node_modules/pkginfo/LICENSE deleted file mode 100644 index ed4a4e7..0000000 --- a/web/demos/package/node_modules/http-proxy/node_modules/pkginfo/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2010 Charlie Robbins. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-apex-malhar/blob/e1a45507/web/demos/package/node_modules/http-proxy/node_modules/pkginfo/README.md ---------------------------------------------------------------------- diff --git a/web/demos/package/node_modules/http-proxy/node_modules/pkginfo/README.md b/web/demos/package/node_modules/http-proxy/node_modules/pkginfo/README.md deleted file mode 100644 index 332704e..0000000 --- a/web/demos/package/node_modules/http-proxy/node_modules/pkginfo/README.md +++ /dev/null @@ -1,86 +0,0 @@ -# node-pkginfo - -An easy way to expose properties on a module from a package.json - -## Installation - -### Installing npm (node package manager) -``` - curl http://npmjs.org/install.sh | sh -``` - -### Installing pkginfo -``` - [sudo] npm install pkginfo -``` - -## Motivation -How often when writing node.js modules have you written the following line(s) of code? - -* Hard code your version string into your code - -``` js - exports.version = '0.1.0'; -``` - -* Programmatically expose the version from the package.json - -``` js - exports.version = JSON.parse(fs.readFileSync('/path/to/package.json', 'utf8')).version; -``` - -In other words, how often have you wanted to expose basic information from your package.json onto your module programmatically? **WELL NOW YOU CAN!** - -## Usage - -Using `pkginfo` is idiot-proof, just require and invoke it. - -``` js - var pkginfo = require('pkginfo')(module); - - console.dir(module.exports); -``` - -By invoking the `pkginfo` module all of the properties in your `package.json` file will be automatically exposed on the callee module (i.e. the parent module of `pkginfo`). - -Here's a sample of the output: - -``` - { name: 'simple-app', - description: 'A test fixture for pkginfo', - version: '0.1.0', - author: 'Charlie Robbins <[email protected]>', - keywords: [ 'test', 'fixture' ], - main: './index.js', - scripts: { test: 'vows test/*-test.js --spec' }, - engines: { node: '>= 0.4.0' } } -``` - -### Expose specific properties -If you don't want to expose **all** properties on from your `package.json` on your module then simple pass those properties to the `pkginfo` function: - -``` js - var pkginfo = require('pkginfo')(module, 'version', 'author'); - - console.dir(module.exports); -``` - -``` - { version: '0.1.0', - author: 'Charlie Robbins <[email protected]>' } -``` - -If you're looking for further usage see the [examples][0] included in this repository. - -## Run Tests -Tests are written in [vows][1] and give complete coverage of all APIs. - -``` - vows test/*-test.js --spec -``` - -[0]: https://github.com/indexzero/node-pkginfo/tree/master/examples -[1]: http://vowsjs.org - -#### Author: [Charlie Robbins](http://nodejitsu.com) -#### License: MIT \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-apex-malhar/blob/e1a45507/web/demos/package/node_modules/http-proxy/node_modules/pkginfo/docs/docco.css ---------------------------------------------------------------------- diff --git a/web/demos/package/node_modules/http-proxy/node_modules/pkginfo/docs/docco.css b/web/demos/package/node_modules/http-proxy/node_modules/pkginfo/docs/docco.css deleted file mode 100644 index bd54134..0000000 --- a/web/demos/package/node_modules/http-proxy/node_modules/pkginfo/docs/docco.css +++ /dev/null @@ -1,194 +0,0 @@ -/*--------------------- Layout and Typography ----------------------------*/ -body { - font-family: 'Palatino Linotype', 'Book Antiqua', Palatino, FreeSerif, serif; - font-size: 15px; - line-height: 22px; - color: #252519; - margin: 0; padding: 0; -} -a { - color: #261a3b; -} - a:visited { - color: #261a3b; - } -p { - margin: 0 0 15px 0; -} -h4, h5, h6 { - color: #333; - margin: 6px 0 6px 0; - font-size: 13px; -} - h2, h3 { - margin-bottom: 0; - color: #000; - } - h1 { - margin-top: 40px; - margin-bottom: 15px; - color: #000; - } -#container { - position: relative; -} -#background { - position: fixed; - top: 0; left: 525px; right: 0; bottom: 0; - background: #f5f5ff; - border-left: 1px solid #e5e5ee; - z-index: -1; -} -#jump_to, #jump_page { - background: white; - -webkit-box-shadow: 0 0 25px #777; -moz-box-shadow: 0 0 25px #777; - -webkit-border-bottom-left-radius: 5px; -moz-border-radius-bottomleft: 5px; - font: 10px Arial; - text-transform: uppercase; - cursor: pointer; - text-align: right; -} -#jump_to, #jump_wrapper { - position: fixed; - right: 0; top: 0; - padding: 5px 10px; -} - #jump_wrapper { - padding: 0; - display: none; - } - #jump_to:hover #jump_wrapper { - display: block; - } - #jump_page { - padding: 5px 0 3px; - margin: 0 0 25px 25px; - } - #jump_page .source { - display: block; - padding: 5px 10px; - text-decoration: none; - border-top: 1px solid #eee; - } - #jump_page .source:hover { - background: #f5f5ff; - } - #jump_page .source:first-child { - } -table td { - border: 0; - outline: 0; -} - td.docs, th.docs { - max-width: 450px; - min-width: 450px; - min-height: 5px; - padding: 10px 25px 1px 50px; - overflow-x: hidden; - vertical-align: top; - text-align: left; - } - .docs pre { - margin: 15px 0 15px; - padding-left: 15px; - } - .docs p tt, .docs p code { - background: #f8f8ff; - border: 1px solid #dedede; - font-size: 12px; - padding: 0 0.2em; - } - .pilwrap { - position: relative; - } - .pilcrow { - font: 12px Arial; - text-decoration: none; - color: #454545; - position: absolute; - top: 3px; left: -20px; - padding: 1px 2px; - opacity: 0; - -webkit-transition: opacity 0.2s linear; - } - td.docs:hover .pilcrow { - opacity: 1; - } - td.code, th.code { - padding: 14px 15px 16px 25px; - width: 100%; - vertical-align: top; - background: #f5f5ff; - border-left: 1px solid #e5e5ee; - } - pre, tt, code { - font-size: 12px; line-height: 18px; - font-family: Menlo, Monaco, Consolas, "Lucida Console", monospace; - margin: 0; padding: 0; - } - - -/*---------------------- Syntax Highlighting -----------------------------*/ -td.linenos { background-color: #f0f0f0; padding-right: 10px; } -span.lineno { background-color: #f0f0f0; padding: 0 5px 0 5px; } -body .hll { background-color: #ffffcc } -body .c { color: #408080; font-style: italic } /* Comment */ -body .err { border: 1px solid #FF0000 } /* Error */ -body .k { color: #954121 } /* Keyword */ -body .o { color: #666666 } /* Operator */ -body .cm { color: #408080; font-style: italic } /* Comment.Multiline */ -body .cp { color: #BC7A00 } /* Comment.Preproc */ -body .c1 { color: #408080; font-style: italic } /* Comment.Single */ -body .cs { color: #408080; font-style: italic } /* Comment.Special */ -body .gd { color: #A00000 } /* Generic.Deleted */ -body .ge { font-style: italic } /* Generic.Emph */ -body .gr { color: #FF0000 } /* Generic.Error */ -body .gh { color: #000080; font-weight: bold } /* Generic.Heading */ -body .gi { color: #00A000 } /* Generic.Inserted */ -body .go { color: #808080 } /* Generic.Output */ -body .gp { color: #000080; font-weight: bold } /* Generic.Prompt */ -body .gs { font-weight: bold } /* Generic.Strong */ -body .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ -body .gt { color: #0040D0 } /* Generic.Traceback */ -body .kc { color: #954121 } /* Keyword.Constant */ -body .kd { color: #954121; font-weight: bold } /* Keyword.Declaration */ -body .kn { color: #954121; font-weight: bold } /* Keyword.Namespace */ -body .kp { color: #954121 } /* Keyword.Pseudo */ -body .kr { color: #954121; font-weight: bold } /* Keyword.Reserved */ -body .kt { color: #B00040 } /* Keyword.Type */ -body .m { color: #666666 } /* Literal.Number */ -body .s { color: #219161 } /* Literal.String */ -body .na { color: #7D9029 } /* Name.Attribute */ -body .nb { color: #954121 } /* Name.Builtin */ -body .nc { color: #0000FF; font-weight: bold } /* Name.Class */ -body .no { color: #880000 } /* Name.Constant */ -body .nd { color: #AA22FF } /* Name.Decorator */ -body .ni { color: #999999; font-weight: bold } /* Name.Entity */ -body .ne { color: #D2413A; font-weight: bold } /* Name.Exception */ -body .nf { color: #0000FF } /* Name.Function */ -body .nl { color: #A0A000 } /* Name.Label */ -body .nn { color: #0000FF; font-weight: bold } /* Name.Namespace */ -body .nt { color: #954121; font-weight: bold } /* Name.Tag */ -body .nv { color: #19469D } /* Name.Variable */ -body .ow { color: #AA22FF; font-weight: bold } /* Operator.Word */ -body .w { color: #bbbbbb } /* Text.Whitespace */ -body .mf { color: #666666 } /* Literal.Number.Float */ -body .mh { color: #666666 } /* Literal.Number.Hex */ -body .mi { color: #666666 } /* Literal.Number.Integer */ -body .mo { color: #666666 } /* Literal.Number.Oct */ -body .sb { color: #219161 } /* Literal.String.Backtick */ -body .sc { color: #219161 } /* Literal.String.Char */ -body .sd { color: #219161; font-style: italic } /* Literal.String.Doc */ -body .s2 { color: #219161 } /* Literal.String.Double */ -body .se { color: #BB6622; font-weight: bold } /* Literal.String.Escape */ -body .sh { color: #219161 } /* Literal.String.Heredoc */ -body .si { color: #BB6688; font-weight: bold } /* Literal.String.Interpol */ -body .sx { color: #954121 } /* Literal.String.Other */ -body .sr { color: #BB6688 } /* Literal.String.Regex */ -body .s1 { color: #219161 } /* Literal.String.Single */ -body .ss { color: #19469D } /* Literal.String.Symbol */ -body .bp { color: #954121 } /* Name.Builtin.Pseudo */ -body .vc { color: #19469D } /* Name.Variable.Class */ -body .vg { color: #19469D } /* Name.Variable.Global */ -body .vi { color: #19469D } /* Name.Variable.Instance */ -body .il { color: #666666 } /* Literal.Number.Integer.Long */ \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-apex-malhar/blob/e1a45507/web/demos/package/node_modules/http-proxy/node_modules/pkginfo/docs/pkginfo.html ---------------------------------------------------------------------- diff --git a/web/demos/package/node_modules/http-proxy/node_modules/pkginfo/docs/pkginfo.html b/web/demos/package/node_modules/http-proxy/node_modules/pkginfo/docs/pkginfo.html deleted file mode 100644 index bf615fa..0000000 --- a/web/demos/package/node_modules/http-proxy/node_modules/pkginfo/docs/pkginfo.html +++ /dev/null @@ -1,101 +0,0 @@ -<!DOCTYPE html> <html> <head> <title>pkginfo.js</title> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <link rel="stylesheet" media="all" href="docco.css" /> </head> <body> <div id="container"> <div id="background"></div> <table cellpadding="0" cellspacing="0"> <thead> <tr> <th class="docs"> <h1> pkginfo.js </h1> </th> <th class="code"> </th> </tr> </thead> <tbody> <tr id="section-1"> <td class="docs"> <div class="pilwrap"> <a class="pilcrow" href="#section-1">¶</a> </div> </td> <td class="code"> <div class="highlight"><pre><span class="cm">/*</span> -<span class="cm"> * pkginfo.js: Top-level include for the pkginfo module</span> -<span class="cm"> *</span> -<span class="cm"> * (C) 2011, Charlie Robbins</span> -<span class="cm"> *</span> -<span class="cm"> */</span> - -<span class="kd">var</span> <span class="nx">fs</span> <span class="o">=</span> <span class="nx">require</span><span class="p">(</span><span class="s1">'fs'</span><span class="p">),</span> - <span class="nx">path</span> <span class="o">=</span> <span class="nx">require</span><span class="p">(</span><span class="s1">'path'</span><span class="p">);</span></pre></div> </td> </tr> <tr id="section-2"> <td class="docs"> <div class="pilwrap"> <a class="pilcrow" href="#section-2">¶</a> </div> <h3>function pkginfo ([options, 'property', 'property' ..])</h3> - -<h4>@pmodule {Module} Parent module to read from.</h4> - -<h4>@options {Object|Array|string} <strong>Optional</strong> Options used when exposing properties.</h4> - -<h4>@arguments {string...} <strong>Optional</strong> Specified properties to expose.</h4> - -<p>Exposes properties from the package.json file for the parent module on -it's exports. Valid usage:</p> - -<p><code>require('pkginfo')()</code></p> - -<p><code>require('pkginfo')('version', 'author');</code></p> - -<p><code>require('pkginfo')(['version', 'author']);</code></p> - -<p><code>require('pkginfo')({ include: ['version', 'author'] });</code></p> </td> <td class="code"> <div class="highlight"><pre><span class="kd">var</span> <span class="nx">pkginfo</span> <span class="o">=</span> <span class="nx">module</span><span class="p">.</span><span class="nx">exports</span> <span class="o">=</span> <span class="kd">function</span> <span class="p">(</span><span class="nx">pmodule</span><span class="p">,</span> <span class="nx">options</span><span class="p">)</span> <span class="p">{</span> - <span class="kd">var</span> <span class="nx">args</span> <span class="o">=</span> <span class="p">[].</span><span class="nx">slice</span><span class="p">.</span><span class="nx">call</span><span class="p">(</span><span class="nx">arguments</span><span class="p">,</span> <span class="mi">2</span><span class="p">).</span><span class="nx">filter</span><span class="p">(</span><span class="kd">function</span> <span class="p">(</span><span class="nx">arg</span><span class="p">)</span> <span class="p">{</span> - <span class="k">return</span> <span class="k">typeof</span> <span class="nx">arg</span> <span class="o">===</span> <span class="s1">'string'</span><span class="p">;</span> - <span class="p">});</span> - </pre></div> </td> </tr> <tr id="section-3"> <td class="docs"> <div class="pilwrap"> <a class="pilcrow" href="#section-3">¶</a> </div> <p><strong>Parse variable arguments</strong></p> </td> <td class="code"> <div class="highlight"><pre> <span class="k">if</span> <span class="p">(</span><span class="nb">Array</span><span class="p">.</span><span class="nx">isArray</span><span class="p">(</span><span class="nx">options</span><span class="p">))</span> <span class="p">{</span></pre></div> </td> </tr> <tr id="section-4"> <td class="docs"> <div class="pilwrap"> <a class="pilcrow" href="#section-4">¶</a> </div> <p>If the options passed in is an Array assume that -it is the Array of properties to expose from the -on the package.json file on the parent module.</p> </td> <td class="code"> <div class="highlight"><pre> <span class="nx">options</span> <span class="o">=</span> <span class="p">{</span> <span class="nx">include</span><span class="o">:</span> <span class="nx">options</span> <span class="p">};</span> - <span class="p">}</span> - <span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span class="k">typeof</span> <span class="nx">options</span> <span class="o">===</span> <span class="s1">'string'</span><span class="p">)</span> <span class="p">{</span></pre></div> </td> </tr> <tr id="section-5"> <td class="docs"> <div class="pilwrap"> <a class="pilcrow" href="#section-5">¶</a> </div> <p>Otherwise if the first argument is a string, then -assume that it is the first property to expose from -the package.json file on the parent module.</p> </td> <td class="code"> <div class="highlight"><pre> <span class="nx">options</span> <span class="o">=</span> <span class="p">{</span> <span class="nx">include</span><span class="o">:</span> <span class="p">[</span><span class="nx">options</span><span class="p">]</span> <span class="p">};</span> - <span class="p">}</span> - </pre></div> </td> </tr> <tr id="section-6"> <td class="docs"> <div class="pilwrap"> <a class="pilcrow" href="#section-6">¶</a> </div> <p><strong>Setup default options</strong></p> </td> <td class="code"> <div class="highlight"><pre> <span class="nx">options</span> <span class="o">=</span> <span class="nx">options</span> <span class="o">||</span> <span class="p">{</span> <span class="nx">include</span><span class="o">:</span> <span class="p">[]</span> <span class="p">};</span> - - <span class="k">if</span> <span class="p">(</span><span class="nx">args</span><span class="p">.</span><span class="nx">length</span> <span class="o">></span> <span class="mi">0</span><span class="p">)</span> <span class="p">{</span></pre></div> </td> </tr> <tr id="section-7"> <td class="docs"> <div class="pilwrap"> <a class="pilcrow" href="#section-7">¶</a> </div> <p>If additional string arguments have been passed in -then add them to the properties to expose on the -parent module. </p> </td> <td class="code"> <div class="highlight"><pre> <span class="nx">options</span><span class="p">.</span><span class="nx">include</span> <span class="o">=</span> <span class="nx">options</span><span class="p">.</span><span class="nx">include</span><span class="p">.</span><span class="nx">concat</span><span class="p">(</span><span class="nx">args</span><span class="p">);</span> - <span class="p">}</span> - - <span class="kd">var</span> <span class="nx">pkg</span> <span class="o">=</span> <span class="nx">pkginfo</span><span class="p">.</span><span class="nx">read</span><span class="p">(</span><span class="nx">pmodule</span><span class="p">,</span> <span class="nx">options</span><span class="p">.</span><span class="nx">dir</span><span class="p">).</span><span class="kr">package</span><span class="p">;</span> - <span class="nb">Object</span><span class="p">.</span><span class="nx">keys</span><span class="p">(</span><span class="nx">pkg</span><span class="p">).</span><span class="nx">forEach</span><span class="p">(</span><span class="kd">function</span> <span class="p">(</span><span class="nx">key</span><span class="p">)</span> <span class="p">{</span> - <span class="k">if</span> <span class="p">(</span><span class="nx">options</span><span class="p">.</span><span class="nx">include</span><span class="p">.</span><span class="nx">length</span> <span class="o">></span> <span class="mi">0</span> <span class="o">&&</span> <span class="o">!~</span><span class="nx">options</span><span class="p">.</span><span class="nx">include</span><span class="p">.</span><span class="nx">indexOf</span><span class="p">(</span><span class="nx">key</span><span class="p">))</span> <span class="p">{</span> - <span class="k">return</span><span class="p">;</span> - <span class="p">}</span> - - <span class="k">if</span> <span class="p">(</span><span class="o">!</span><span class="nx">pmodule</span><span class="p">.</span><span class="nx">exports</span><span class="p">[</span><span class="nx">key</span><span class="p">])</span> <span class="p">{</span> - <span class="nx">pmodule</span><span class="p">.</span><span class="nx">exports</span><span class="p">[</span><span class="nx">key</span><span class="p">]</span> <span class="o">=</span> <span class="nx">pkg</span><span class="p">[</span><span class="nx">key</span><span class="p">];</span> - <span class="p">}</span> - <span class="p">});</span> - - <span class="k">return</span> <span class="nx">pkginfo</span><span class="p">;</span> -<span class="p">};</span></pre></div> </td> </tr> <tr id="section-8"> <td class="docs"> <div class="pilwrap"> <a class="pilcrow" href="#section-8">¶</a> </div> <h3>function find (dir)</h3> - -<h4>@pmodule {Module} Parent module to read from.</h4> - -<h4>@dir {string} <strong>Optional</strong> Directory to start search from.</h4> - -<p>Searches up the directory tree from <code>dir</code> until it finds a directory -which contains a <code>package.json</code> file. </p> </td> <td class="code"> <div class="highlight"><pre><span class="nx">pkginfo</span><span class="p">.</span><span class="nx">find</span> <span class="o">=</span> <span class="kd">function</span> <span class="p">(</span><span class="nx">pmodule</span><span class="p">,</span> <span class="nx">dir</span><span class="p">)</span> <span class="p">{</span> - <span class="nx">dir</span> <span class="o">=</span> <span class="nx">dir</span> <span class="o">||</span> <span class="nx">pmodule</span><span class="p">.</span><span class="nx">filename</span><span class="p">;</span> - <span class="nx">dir</span> <span class="o">=</span> <span class="nx">path</span><span class="p">.</span><span class="nx">dirname</span><span class="p">(</span><span class="nx">dir</span><span class="p">);</span> - - <span class="kd">var</span> <span class="nx">files</span> <span class="o">=</span> <span class="nx">fs</span><span class="p">.</span><span class="nx">readdirSync</span><span class="p">(</span><span class="nx">dir</span><span class="p">);</span> - - <span class="k">if</span> <span class="p">(</span><span class="o">~</span><span class="nx">files</span><span class="p">.</span><span class="nx">indexOf</span><span class="p">(</span><span class="s1">'package.json'</span><span class="p">))</span> <span class="p">{</span> - <span class="k">return</span> <span class="nx">path</span><span class="p">.</span><span class="nx">join</span><span class="p">(</span><span class="nx">dir</span><span class="p">,</span> <span class="s1">'package.json'</span><span class="p">);</span> - <span class="p">}</span> - - <span class="k">if</span> <span class="p">(</span><span class="nx">dir</span> <span class="o">===</span> <span class="s1">'/'</span><span class="p">)</span> <span class="p">{</span> - <span class="k">throw</span> <span class="k">new</span> <span class="nb">Error</span><span class="p">(</span><span class="s1">'Could not find package.json up from: '</span> <span class="o">+</span> <span class="nx">dir</span><span class="p">);</span> - <span class="p">}</span> - - <span class="k">return</span> <span class="nx">pkginfo</span><span class="p">.</span><span class="nx">find</span><span class="p">(</span><span class="nx">dir</span><span class="p">);</span> -<span class="p">};</span></pre></div> </td> </tr> <tr id="section-9"> <td class="docs"> <div class="pilwrap"> <a class="pilcrow" href="#section-9">¶</a> </div> <h3>function read (pmodule, dir)</h3> - -<h4>@pmodule {Module} Parent module to read from.</h4> - -<h4>@dir {string} <strong>Optional</strong> Directory to start search from.</h4> - -<p>Searches up the directory tree from <code>dir</code> until it finds a directory -which contains a <code>package.json</code> file and returns the package information.</p> </td> <td class="code"> <div class="highlight"><pre><span class="nx">pkginfo</span><span class="p">.</span><span class="nx">read</span> <span class="o">=</span> <span class="kd">function</span> <span class="p">(</span><span class="nx">pmodule</span><span class="p">,</span> <span class="nx">dir</span><span class="p">)</span> <span class="p">{</span> - <span class="nx">dir</span> <span class="o">=</span> <span class="nx">pkginfo</span><span class="p">.</span><span class="nx">find</span><span class="p">(</span><span class="nx">pmodule</span><span class="p">,</span> <span class="nx">dir</span><span class="p">);</span> - - <span class="kd">var</span> <span class="nx">data</span> <span class="o">=</span> <span class="nx">fs</span><span class="p">.</span><span class="nx">readFileSync</span><span class="p">(</span><span class="nx">dir</span><span class="p">).</span><span class="nx">toString</span><span class="p">();</span> - - <span class="k">return</span> <span class="p">{</span> - <span class="nx">dir</span><span class="o">:</span> <span class="nx">dir</span><span class="p">,</span> - <span class="kr">package</span><span class="o">:</span> <span class="nx">JSON</span><span class="p">.</span><span class="nx">parse</span><span class="p">(</span><span class="nx">data</span><span class="p">)</span> - <span class="p">};</span> -<span class="p">};</span></pre></div> </td> </tr> <tr id="section-10"> <td class="docs"> <div class="pilwrap"> <a class="pilcrow" href="#section-10">¶</a> </div> <p>Call <code>pkginfo</code> on this module and expose version.</p> </td> <td class="code"> <div class="highlight"><pre><span class="nx">pkginfo</span><span class="p">(</span><span class="nx">module</span><span class="p">,</span> <span class="p">{</span> - <span class="nx">dir</span><span class="o">:</span> <span class="nx">__dirname</span><span class="p">,</span> - <span class="nx">include</span><span class="o">:</span> <span class="p">[</span><span class="s1">'version'</span><span class="p">],</span> - <span class="nx">target</span><span class="o">:</span> <span class="nx">pkginfo</span> -<span class="p">});</span> - -</pre></div> </td> </tr> </tbody> </table> </div> </body> </html> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-apex-malhar/blob/e1a45507/web/demos/package/node_modules/http-proxy/node_modules/pkginfo/examples/all-properties.js ---------------------------------------------------------------------- diff --git a/web/demos/package/node_modules/http-proxy/node_modules/pkginfo/examples/all-properties.js b/web/demos/package/node_modules/http-proxy/node_modules/pkginfo/examples/all-properties.js deleted file mode 100644 index fd1d831..0000000 --- a/web/demos/package/node_modules/http-proxy/node_modules/pkginfo/examples/all-properties.js +++ /dev/null @@ -1,19 +0,0 @@ -/* - * all-properties.js: Sample of including all properties from a package.json file - * - * (C) 2011, Charlie Robbins - * - */ - -var util = require('util'), - pkginfo = require('../lib/pkginfo')(module); - -exports.someFunction = function () { - console.log('some of your custom logic here'); -}; - -console.log('Inspecting module:'); -console.dir(module.exports); - -console.log('\nAll exports exposed:'); -console.error(Object.keys(module.exports)); \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-apex-malhar/blob/e1a45507/web/demos/package/node_modules/http-proxy/node_modules/pkginfo/examples/array-argument.js ---------------------------------------------------------------------- diff --git a/web/demos/package/node_modules/http-proxy/node_modules/pkginfo/examples/array-argument.js b/web/demos/package/node_modules/http-proxy/node_modules/pkginfo/examples/array-argument.js deleted file mode 100644 index b1b6848..0000000 --- a/web/demos/package/node_modules/http-proxy/node_modules/pkginfo/examples/array-argument.js +++ /dev/null @@ -1,20 +0,0 @@ -/* - * array-argument.js: Sample of including specific properties from a package.json file - * using Array argument syntax. - * - * (C) 2011, Charlie Robbins - * - */ - -var util = require('util'), - pkginfo = require('../lib/pkginfo')(module, ['version', 'author']); - -exports.someFunction = function () { - console.log('some of your custom logic here'); -}; - -console.log('Inspecting module:'); -console.dir(module.exports); - -console.log('\nAll exports exposed:'); -console.error(Object.keys(module.exports)); \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-apex-malhar/blob/e1a45507/web/demos/package/node_modules/http-proxy/node_modules/pkginfo/examples/multiple-properties.js ---------------------------------------------------------------------- diff --git a/web/demos/package/node_modules/http-proxy/node_modules/pkginfo/examples/multiple-properties.js b/web/demos/package/node_modules/http-proxy/node_modules/pkginfo/examples/multiple-properties.js deleted file mode 100644 index b4b5fd6..0000000 --- a/web/demos/package/node_modules/http-proxy/node_modules/pkginfo/examples/multiple-properties.js +++ /dev/null @@ -1,19 +0,0 @@ -/* - * multiple-properties.js: Sample of including multiple properties from a package.json file - * - * (C) 2011, Charlie Robbins - * - */ - -var util = require('util'), - pkginfo = require('../lib/pkginfo')(module, 'version', 'author'); - -exports.someFunction = function () { - console.log('some of your custom logic here'); -}; - -console.log('Inspecting module:'); -console.dir(module.exports); - -console.log('\nAll exports exposed:'); -console.error(Object.keys(module.exports)); \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-apex-malhar/blob/e1a45507/web/demos/package/node_modules/http-proxy/node_modules/pkginfo/examples/object-argument.js ---------------------------------------------------------------------- diff --git a/web/demos/package/node_modules/http-proxy/node_modules/pkginfo/examples/object-argument.js b/web/demos/package/node_modules/http-proxy/node_modules/pkginfo/examples/object-argument.js deleted file mode 100644 index 28420c8..0000000 --- a/web/demos/package/node_modules/http-proxy/node_modules/pkginfo/examples/object-argument.js +++ /dev/null @@ -1,22 +0,0 @@ -/* - * object-argument.js: Sample of including specific properties from a package.json file - * using Object argument syntax. - * - * (C) 2011, Charlie Robbins - * - */ - -var util = require('util'), - pkginfo = require('../lib/pkginfo')(module, { - include: ['version', 'author'] - }); - -exports.someFunction = function () { - console.log('some of your custom logic here'); -}; - -console.log('Inspecting module:'); -console.dir(module.exports); - -console.log('\nAll exports exposed:'); -console.error(Object.keys(module.exports)); \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-apex-malhar/blob/e1a45507/web/demos/package/node_modules/http-proxy/node_modules/pkginfo/examples/package.json ---------------------------------------------------------------------- diff --git a/web/demos/package/node_modules/http-proxy/node_modules/pkginfo/examples/package.json b/web/demos/package/node_modules/http-proxy/node_modules/pkginfo/examples/package.json deleted file mode 100644 index 1f2f01c..0000000 --- a/web/demos/package/node_modules/http-proxy/node_modules/pkginfo/examples/package.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "name": "simple-app", - "description": "A test fixture for pkginfo", - "version": "0.1.0", - "author": "Charlie Robbins <[email protected]>", - "keywords": ["test", "fixture"], - "main": "./index.js", - "scripts": { "test": "vows test/*-test.js --spec" }, - "engines": { "node": ">= 0.4.0" } -} http://git-wip-us.apache.org/repos/asf/incubator-apex-malhar/blob/e1a45507/web/demos/package/node_modules/http-proxy/node_modules/pkginfo/examples/single-property.js ---------------------------------------------------------------------- diff --git a/web/demos/package/node_modules/http-proxy/node_modules/pkginfo/examples/single-property.js b/web/demos/package/node_modules/http-proxy/node_modules/pkginfo/examples/single-property.js deleted file mode 100644 index 4f44561..0000000 --- a/web/demos/package/node_modules/http-proxy/node_modules/pkginfo/examples/single-property.js +++ /dev/null @@ -1,19 +0,0 @@ -/* - * single-property.js: Sample of including a single specific properties from a package.json file - * - * (C) 2011, Charlie Robbins - * - */ - -var util = require('util'), - pkginfo = require('../lib/pkginfo')(module, 'version'); - -exports.someFunction = function () { - console.log('some of your custom logic here'); -}; - -console.log('Inspecting module:'); -console.dir(module.exports); - -console.log('\nAll exports exposed:'); -console.error(Object.keys(module.exports)); \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-apex-malhar/blob/e1a45507/web/demos/package/node_modules/http-proxy/node_modules/pkginfo/examples/subdir/package.json ---------------------------------------------------------------------- diff --git a/web/demos/package/node_modules/http-proxy/node_modules/pkginfo/examples/subdir/package.json b/web/demos/package/node_modules/http-proxy/node_modules/pkginfo/examples/subdir/package.json deleted file mode 100644 index aa85410..0000000 --- a/web/demos/package/node_modules/http-proxy/node_modules/pkginfo/examples/subdir/package.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "simple-app-subdir", - "description": "A test fixture for pkginfo", - "version": "0.1.0", - "author": "Charlie Robbins <[email protected]>", - "keywords": ["test", "fixture"], - "main": "./index.js", - "scripts": { "test": "vows test/*-test.js --spec" }, - "engines": { "node": ">= 0.4.0" }, - "subdironly": "true" -} http://git-wip-us.apache.org/repos/asf/incubator-apex-malhar/blob/e1a45507/web/demos/package/node_modules/http-proxy/node_modules/pkginfo/examples/target-dir.js ---------------------------------------------------------------------- diff --git a/web/demos/package/node_modules/http-proxy/node_modules/pkginfo/examples/target-dir.js b/web/demos/package/node_modules/http-proxy/node_modules/pkginfo/examples/target-dir.js deleted file mode 100644 index 88770e6..0000000 --- a/web/demos/package/node_modules/http-proxy/node_modules/pkginfo/examples/target-dir.js +++ /dev/null @@ -1,20 +0,0 @@ -/* - * multiple-properties.js: Sample of including multiple properties from a package.json file - * - * (C) 2011, Charlie Robbins - * - */ - -var util = require('util'), - path = require('path'), - pkginfo = require('../lib/pkginfo')(module, { dir: path.resolve(__dirname, 'subdir' )}); - -exports.someFunction = function () { - console.log('some of your custom logic here'); -}; - -console.log('Inspecting module:'); -console.dir(module.exports); - -console.log('\nAll exports exposed:'); -console.error(Object.keys(module.exports)); \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-apex-malhar/blob/e1a45507/web/demos/package/node_modules/http-proxy/node_modules/pkginfo/lib/pkginfo.js ---------------------------------------------------------------------- diff --git a/web/demos/package/node_modules/http-proxy/node_modules/pkginfo/lib/pkginfo.js b/web/demos/package/node_modules/http-proxy/node_modules/pkginfo/lib/pkginfo.js deleted file mode 100644 index c5dc020..0000000 --- a/web/demos/package/node_modules/http-proxy/node_modules/pkginfo/lib/pkginfo.js +++ /dev/null @@ -1,136 +0,0 @@ -/* - * pkginfo.js: Top-level include for the pkginfo module - * - * (C) 2011, Charlie Robbins - * - */ - -var fs = require('fs'), - path = require('path'); - -// -// ### function pkginfo ([options, 'property', 'property' ..]) -// #### @pmodule {Module} Parent module to read from. -// #### @options {Object|Array|string} **Optional** Options used when exposing properties. -// #### @arguments {string...} **Optional** Specified properties to expose. -// Exposes properties from the package.json file for the parent module on -// it's exports. Valid usage: -// -// `require('pkginfo')()` -// -// `require('pkginfo')('version', 'author');` -// -// `require('pkginfo')(['version', 'author']);` -// -// `require('pkginfo')({ include: ['version', 'author'] });` -// -var pkginfo = module.exports = function (pmodule, options) { - var args = [].slice.call(arguments, 2).filter(function (arg) { - return typeof arg === 'string'; - }); - - // - // **Parse variable arguments** - // - if (Array.isArray(options)) { - // - // If the options passed in is an Array assume that - // it is the Array of properties to expose from the - // on the package.json file on the parent module. - // - options = { include: options }; - } - else if (typeof options === 'string') { - // - // Otherwise if the first argument is a string, then - // assume that it is the first property to expose from - // the package.json file on the parent module. - // - options = { include: [options] }; - } - - // - // **Setup default options** - // - options = options || {}; - - // ensure that includes have been defined - options.include = options.include || []; - - if (args.length > 0) { - // - // If additional string arguments have been passed in - // then add them to the properties to expose on the - // parent module. - // - options.include = options.include.concat(args); - } - - var pkg = pkginfo.read(pmodule, options.dir).package; - Object.keys(pkg).forEach(function (key) { - if (options.include.length > 0 && !~options.include.indexOf(key)) { - return; - } - - if (!pmodule.exports[key]) { - pmodule.exports[key] = pkg[key]; - } - }); - - return pkginfo; -}; - -// -// ### function find (dir) -// #### @pmodule {Module} Parent module to read from. -// #### @dir {string} **Optional** Directory to start search from. -// Searches up the directory tree from `dir` until it finds a directory -// which contains a `package.json` file. -// -pkginfo.find = function (pmodule, dir) { - if (! dir) { - dir = path.dirname(pmodule.filename); - } - - var files = fs.readdirSync(dir); - - if (~files.indexOf('package.json')) { - return path.join(dir, 'package.json'); - } - - if (dir === '/') { - throw new Error('Could not find package.json up from: ' + dir); - } - else if (!dir || dir === '.') { - throw new Error('Cannot find package.json from unspecified directory'); - } - - return pkginfo.find(pmodule, path.dirname(dir)); -}; - -// -// ### function read (pmodule, dir) -// #### @pmodule {Module} Parent module to read from. -// #### @dir {string} **Optional** Directory to start search from. -// Searches up the directory tree from `dir` until it finds a directory -// which contains a `package.json` file and returns the package information. -// -pkginfo.read = function (pmodule, dir) { - dir = pkginfo.find(pmodule, dir); - - var data = fs.readFileSync(dir).toString(); - - return { - dir: dir, - package: JSON.parse(data) - }; -}; - -// -// Call `pkginfo` on this module and expose version. -// -pkginfo(module, { - dir: __dirname, - include: ['version'], - target: pkginfo -}); \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-apex-malhar/blob/e1a45507/web/demos/package/node_modules/http-proxy/node_modules/pkginfo/package.json ---------------------------------------------------------------------- diff --git a/web/demos/package/node_modules/http-proxy/node_modules/pkginfo/package.json b/web/demos/package/node_modules/http-proxy/node_modules/pkginfo/package.json deleted file mode 100644 index c16292e..0000000 --- a/web/demos/package/node_modules/http-proxy/node_modules/pkginfo/package.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "name": "pkginfo", - "version": "0.3.0", - "description": "An easy way to expose properties on a module from a package.json", - "author": { - "name": "Charlie Robbins", - "email": "[email protected]" - }, - "repository": { - "type": "git", - "url": "http://github.com/indexzero/node-pkginfo.git" - }, - "keywords": [ - "info", - "tools", - "package.json" - ], - "devDependencies": { - "vows": "0.7.x" - }, - "main": "./lib/pkginfo", - "scripts": { - "test": "vows test/*-test.js --spec" - }, - "engines": { - "node": ">= 0.4.0" - }, - "readme": "# node-pkginfo\n\nAn easy way to expose properties on a module from a package.json\n\n## Installation\n\n### Installing npm (node package manager)\n```\n curl http://npmjs.org/install.sh | sh\n```\n\n### Installing pkginfo\n```\n [sudo] npm install pkginfo\n```\n\n## Motivation\nHow often when writing node.js modules have you written the following line(s) of code? \n\n* Hard code your version string into your code\n\n``` js\n exports.version = '0.1.0';\n```\n\n* Programmatically expose the version from the package.json\n\n``` js\n exports.version = JSON.parse(fs.readFileSync('/path/to/package.json', 'utf8')).version;\n```\n\nIn other words, how often have you wanted to expose basic information from your package.json onto your module programmatically? **WELL NOW YOU CAN!**\n\n## Usage\n\nUsing `pkginfo` is idiot-proof, just require and invoke it. \n\n``` js\n var pkginfo = require('pkginfo')(module);\n \n console.dir(module.exports);\n```\n\nBy invoking the `pkgin fo` module all of the properties in your `package.json` file will be automatically exposed on the callee module (i.e. the parent module of `pkginfo`). \n\nHere's a sample of the output:\n\n```\n { name: 'simple-app',\n description: 'A test fixture for pkginfo',\n version: '0.1.0',\n author: 'Charlie Robbins <[email protected]>',\n keywords: [ 'test', 'fixture' ],\n main: './index.js',\n scripts: { test: 'vows test/*-test.js --spec' },\n engines: { node: '>= 0.4.0' } }\n```\n\n### Expose specific properties\nIf you don't want to expose **all** properties on from your `package.json` on your module then simple pass those properties to the `pkginfo` function:\n\n``` js\n var pkginfo = require('pkginfo')(module, 'version', 'author');\n \n console.dir(module.exports);\n```\n\n```\n { version: '0.1.0',\n author: 'Charlie Robbins <[email protected]>' }\n```\n\nIf you're looking for further usage see the [examples][0] included in this repository. \n\n## Run Tests\nTests are written in [vows][1] and give complete coverage of all APIs.\n\n```\n vows test/*-test.js --spec\n```\n\n[0]: https://github.com/indexzero/node-pkginfo/tree/master/examples\n[1]: http://vowsjs.org\n\n#### Author: [Charlie Robbins](http://nodejitsu.com)\n#### License: MIT", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/indexzero/node-pkginfo/issues" - }, - "homepage": "https://github.com/indexzero/node-pkginfo", - "_id": "[email protected]", - "_from": "[email protected]" -} http://git-wip-us.apache.org/repos/asf/incubator-apex-malhar/blob/e1a45507/web/demos/package/node_modules/http-proxy/node_modules/pkginfo/test/pkginfo-test.js ---------------------------------------------------------------------- diff --git a/web/demos/package/node_modules/http-proxy/node_modules/pkginfo/test/pkginfo-test.js b/web/demos/package/node_modules/http-proxy/node_modules/pkginfo/test/pkginfo-test.js deleted file mode 100644 index a59f077..0000000 --- a/web/demos/package/node_modules/http-proxy/node_modules/pkginfo/test/pkginfo-test.js +++ /dev/null @@ -1,83 +0,0 @@ -/* - * pkginfo-test.js: Tests for the pkginfo module. - * - * (C) 2011, Charlie Robbins - * - */ - -var assert = require('assert'), - exec = require('child_process').exec, - fs = require('fs'), - path = require('path'), - vows = require('vows'), - pkginfo = require('../lib/pkginfo'); - -function assertProperties (source, target) { - assert.lengthOf(source, target.length + 1); - target.forEach(function (prop) { - assert.isTrue(!!~source.indexOf(prop)); - }); -} - -function compareWithExample(targetPath) { - var examplePaths = ['package.json']; - - if (targetPath) { - examplePaths.unshift(targetPath); - } - - return function(exposed) { - var pkg = fs.readFileSync(path.join.apply(null, [__dirname, '..', 'examples'].concat(examplePaths))).toString(), - keys = Object.keys(JSON.parse(pkg)); - - assertProperties(exposed, keys); - }; -} - -function testExposes (options) { - return { - topic: function () { - exec('node ' + path.join(__dirname, '..', 'examples', options.script), this.callback); - }, - "should expose that property correctly": function (err, stdout, stderr) { - assert.isNull(err); - - var exposed = stderr.match(/'(\w+)'/ig).map(function (p) { - return p.substring(1, p.length - 1); - }); - - return !options.assert - ? assertProperties(exposed, options.properties) - : options.assert(exposed); - } - } -} - -vows.describe('pkginfo').addBatch({ - "When using the pkginfo module": { - "and passed a single `string` argument": testExposes({ - script: 'single-property.js', - properties: ['version'] - }), - "and passed multiple `string` arguments": testExposes({ - script: 'multiple-properties.js', - properties: ['version', 'author'] - }), - "and passed an `object` argument": testExposes({ - script: 'object-argument.js', - properties: ['version', 'author'] - }), - "and passed an `array` argument": testExposes({ - script: 'array-argument.js', - properties: ['version', 'author'] - }), - "and read from a specified directory": testExposes({ - script: 'target-dir.js', - assert: compareWithExample('subdir') - }), - "and passed no arguments": testExposes({ - script: 'all-properties.js', - assert: compareWithExample() - }) - } -}).export(module); http://git-wip-us.apache.org/repos/asf/incubator-apex-malhar/blob/e1a45507/web/demos/package/node_modules/http-proxy/node_modules/utile/.npmignore ---------------------------------------------------------------------- diff --git a/web/demos/package/node_modules/http-proxy/node_modules/utile/.npmignore b/web/demos/package/node_modules/http-proxy/node_modules/utile/.npmignore deleted file mode 100644 index 8d8bfd5..0000000 --- a/web/demos/package/node_modules/http-proxy/node_modules/utile/.npmignore +++ /dev/null @@ -1,4 +0,0 @@ -node_modules -npm-debug.log -*.swp -*.swo http://git-wip-us.apache.org/repos/asf/incubator-apex-malhar/blob/e1a45507/web/demos/package/node_modules/http-proxy/node_modules/utile/.travis.yml ---------------------------------------------------------------------- diff --git a/web/demos/package/node_modules/http-proxy/node_modules/utile/.travis.yml b/web/demos/package/node_modules/http-proxy/node_modules/utile/.travis.yml deleted file mode 100644 index 88cf1f3..0000000 --- a/web/demos/package/node_modules/http-proxy/node_modules/utile/.travis.yml +++ /dev/null @@ -1,10 +0,0 @@ -language: node_js -node_js: - - 0.6 - - 0.8 - -notifications: - email: - - [email protected] - irc: "irc.freenode.org#nodejitsu" - http://git-wip-us.apache.org/repos/asf/incubator-apex-malhar/blob/e1a45507/web/demos/package/node_modules/http-proxy/node_modules/utile/CHANGELOG.md ---------------------------------------------------------------------- diff --git a/web/demos/package/node_modules/http-proxy/node_modules/utile/CHANGELOG.md b/web/demos/package/node_modules/http-proxy/node_modules/utile/CHANGELOG.md deleted file mode 100644 index b4e427a..0000000 --- a/web/demos/package/node_modules/http-proxy/node_modules/utile/CHANGELOG.md +++ /dev/null @@ -1,16 +0,0 @@ - -0.1.5 / 2012-09-18 -================== - - * Fixed problem with underscore values in camelToUnderscore - -0.1.4 / 2012-07-26 -================== - - * Made use of inflect for camel to underscore conversion - -0.1.3 / 2012-07-25 -================== - - * Added camel to underscore conversion and vice-versa - http://git-wip-us.apache.org/repos/asf/incubator-apex-malhar/blob/e1a45507/web/demos/package/node_modules/http-proxy/node_modules/utile/LICENSE ---------------------------------------------------------------------- diff --git a/web/demos/package/node_modules/http-proxy/node_modules/utile/LICENSE b/web/demos/package/node_modules/http-proxy/node_modules/utile/LICENSE deleted file mode 100644 index 56217ca..0000000 --- a/web/demos/package/node_modules/http-proxy/node_modules/utile/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2010 Nodejitsu Inc. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-apex-malhar/blob/e1a45507/web/demos/package/node_modules/http-proxy/node_modules/utile/README.md ---------------------------------------------------------------------- diff --git a/web/demos/package/node_modules/http-proxy/node_modules/utile/README.md b/web/demos/package/node_modules/http-proxy/node_modules/utile/README.md deleted file mode 100644 index 451b1fc..0000000 --- a/web/demos/package/node_modules/http-proxy/node_modules/utile/README.md +++ /dev/null @@ -1,87 +0,0 @@ -# utile [](http://travis-ci.org/flatiron/utile) - -A drop-in replacement for `util` with some additional advantageous functions - -## Motivation -Javascript is definitely a "batteries not included language" when compared to languages like Ruby or Python. Node.js has a simple utility library which exposes some basic (but important) functionality: - -``` -$ node -> var util = require('util'); -> util. -(...) - -util.debug util.error util.exec util.inherits util.inspect -util.log util.p util.print util.pump util.puts -``` - -When one considers their own utility library, why ever bother requiring `util` again? That is the approach taken by this module. To compare: - -``` -$ node -> var utile = require('./lib') -> utile. -(...) - -utile.async utile.capitalize utile.clone utile.cpr utile.createPath utile.debug -utile.each utile.error utile.exec utile.file utile.filter utile.find -utile.inherits utile.log utile.mixin utile.mkdirp utile.p utile.path -utile.print utile.pump utile.puts utile.randomString utile.requireDir uile.requireDirLazy -utile.rimraf -``` - -As you can see all of the original methods from `util` are there, but there are several new methods specific to `utile`. A note about implementation: _no node.js native modules are modified by utile, it simply copies those methods._ - -## Methods -The `utile` modules exposes some simple utility methods: - -* `.each(obj, iterator)`: Iterate over the keys of an object. -* `.mixin(target [source0, source1, ...])`: Copies enumerable properties from `source0 ... sourceN` onto `target` and returns the resulting object. -* `.clone(obj)`: Shallow clones the specified object. -* `.capitalize(str)`: Capitalizes the specified `str`. -* `.randomString(length)`: randomString returns a pseudo-random ASCII string (subset) the return value is a string of length âbits/6â of characters from the base64 alphabet. -* `.filter(obj, test)`: return an object with the properties that `test` returns true on. -* `.args(arguments)`: Converts function arguments into actual array with special `callback`, `cb`, `array`, and `last` properties. Also supports *optional* argument contracts. See [the example](https://github.com/flatiron/utile/blob/master/examples/utile-args.js) for more details. -* `.requireDir(directory)`: Requires all files and directories from `directory`, returning an object with keys being filenames (without trailing `.js`) and respective values being return values of `require(filename)`. -* `.requireDirLazy(directory)`: Lazily requires all files and directories from `directory`, returning an object with keys being filenames (without trailing `.js`) and respective values (getters) being return values of `require(filename)`. -* `.format([string] text, [array] formats, [array] replacements)`: Replace `formats` in `text` with `replacements`. This will fall back to the original `util.format` command if it is called improperly. - -## Packaged Dependencies -In addition to the methods that are built-in, utile includes a number of commonly used dependencies to reduce the number of includes in your package.json. These modules _are not eagerly loaded to be respectful of startup time,_ but instead are lazy-loaded getters on the `utile` object - -* `.async`: [Async utilities for node and the browser][0] -* `.inflect`: [Customizable inflections for node.js][6] -* `.mkdirp`: [Recursively mkdir, like mkdir -p, but in node.js][1] -* `.rimraf`: [A rm -rf util for nodejs][2] -* `.cpr`: [Asynchronous recursive file copying with Node.js][3] - -## Installation - -### Installing npm (node package manager) -``` - curl http://npmjs.org/install.sh | sh -``` - -### Installing utile -``` - [sudo] npm install utile -``` - -## Tests -All tests are written with [vows][4] and should be run with [npm][5]: - -``` bash - $ npm test -``` - -#### Author: [Nodejitsu Inc.](http://www.nodejitsu.com) -#### Contributors: [Charlie Robbins](http://github.com/indexzero), [Dominic Tarr](http://github.com/dominictarr) -#### License: MIT - -[0]: https://github.com/caolan/async -[1]: https://github.com/substack/node-mkdirp -[2]: https://github.com/isaacs/rimraf -[3]: https://github.com/avianflu/ncp -[4]: https://vowsjs.org -[5]: https://npmjs.org -[6]: https://github.com/pksunkara/inflect http://git-wip-us.apache.org/repos/asf/incubator-apex-malhar/blob/e1a45507/web/demos/package/node_modules/http-proxy/node_modules/utile/lib/args.js ---------------------------------------------------------------------- diff --git a/web/demos/package/node_modules/http-proxy/node_modules/utile/lib/args.js b/web/demos/package/node_modules/http-proxy/node_modules/utile/lib/args.js deleted file mode 100644 index 34f1c11..0000000 --- a/web/demos/package/node_modules/http-proxy/node_modules/utile/lib/args.js +++ /dev/null @@ -1,46 +0,0 @@ -/* - * args.js: function argument parsing helper utility - * - * (C) 2012, Nodejitsu Inc. - * MIT LICENSE - * - */ - -var utile = require('./index'); - -// -// ### function args(_args) -// #### _args {Arguments} Original function arguments -// -// Top-level method will accept a javascript "arguments" object (the actual keyword -// "arguments" inside any scope), and attempt to return back an intelligent object -// representing the functions arguments -// -module.exports = function (_args) { - var args = utile.rargs(_args), - _cb; - - // - // Find and define the first argument - // - Object.defineProperty(args, 'first', { value: args[0] }); - - // - // Find and define any callback - // - _cb = args[args.length - 1] || args[args.length]; - if (typeof _cb === "function") { - Object.defineProperty(args, 'callback', { value: _cb }); - Object.defineProperty(args, 'cb', { value: _cb }); - args.pop(); - } - - // - // Find and define the last argument - // - if (args.length) { - Object.defineProperty(args, 'last', { value: args[args.length - 1] }); - } - - return args; -}; http://git-wip-us.apache.org/repos/asf/incubator-apex-malhar/blob/e1a45507/web/demos/package/node_modules/http-proxy/node_modules/utile/lib/base64.js ---------------------------------------------------------------------- diff --git a/web/demos/package/node_modules/http-proxy/node_modules/utile/lib/base64.js b/web/demos/package/node_modules/http-proxy/node_modules/utile/lib/base64.js deleted file mode 100644 index 1de7a76..0000000 --- a/web/demos/package/node_modules/http-proxy/node_modules/utile/lib/base64.js +++ /dev/null @@ -1,44 +0,0 @@ -/* - * base64.js: An extremely simple implementation of base64 encoding / decoding using node.js Buffers - * - * (C) 2010, Nodejitsu Inc. - * - */ - -var base64 = exports; - -// -// ### function encode (unencoded) -// #### @unencoded {string} The string to base64 encode -// Encodes the specified string to base64 using node.js Buffers. -// -base64.encode = function (unencoded) { - var encoded; - - try { - encoded = new Buffer(unencoded || '').toString('base64'); - } - catch (ex) { - return null; - } - - return encoded; -}; - -// -// ### function decode (encoded) -// #### @encoded {string} The string to base64 decode -// Decodes the specified string from base64 using node.js Buffers. -// -base64.decode = function (encoded) { - var decoded; - - try { - decoded = new Buffer(encoded || '', 'base64').toString('utf8'); - } - catch (ex) { - return null; - } - - return decoded; -}; \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-apex-malhar/blob/e1a45507/web/demos/package/node_modules/http-proxy/node_modules/utile/lib/file.js ---------------------------------------------------------------------- diff --git a/web/demos/package/node_modules/http-proxy/node_modules/utile/lib/file.js b/web/demos/package/node_modules/http-proxy/node_modules/utile/lib/file.js deleted file mode 100644 index 4641878..0000000 --- a/web/demos/package/node_modules/http-proxy/node_modules/utile/lib/file.js +++ /dev/null @@ -1,33 +0,0 @@ -/* - * file.js: Simple utilities for working with the file system. - * - * (C) 2011, Nodejitsu Inc. - * MIT LICENSE - * - */ - -var fs = require('fs'); - -exports.readJson = exports.readJSON = function (file, callback) { - if (typeof callback !== 'function') { - throw new Error('utile.file.readJson needs a callback'); - } - - fs.readFile(file, 'utf-8', function (err, data) { - if (err) { - return callback(err); - } - - try { - var json = JSON.parse(data); - callback(null, json); - } - catch (err) { - return callback(err); - } - }); -}; - -exports.readJsonSync = exports.readJSONSync = function (file) { - return JSON.parse(fs.readFileSync(file, 'utf-8')); -}; http://git-wip-us.apache.org/repos/asf/incubator-apex-malhar/blob/e1a45507/web/demos/package/node_modules/http-proxy/node_modules/utile/lib/format.js ---------------------------------------------------------------------- diff --git a/web/demos/package/node_modules/http-proxy/node_modules/utile/lib/format.js b/web/demos/package/node_modules/http-proxy/node_modules/utile/lib/format.js deleted file mode 100644 index 3262dd5..0000000 --- a/web/demos/package/node_modules/http-proxy/node_modules/utile/lib/format.js +++ /dev/null @@ -1,25 +0,0 @@ -/* - * format.js: `util.format` enhancement to allow custom formatting parameters. - * - * (C) 2012, Nodejitsu Inc. - * MIT LICENSE - * - */ - -var util = require('util'); - -exports = module.exports = function(str) { - var formats = [].slice.call(arguments, 1, 3); - - if (!(formats[0] instanceof Array && formats[1] instanceof Array) || arguments.length > 3) - return util.format.apply(null, arguments); - - var replacements = formats.pop(), - formats = formats.shift(); - - formats.forEach(function(format, id) { - str = str.replace(new RegExp(format), replacements[id]); - }); - - return str; -}; http://git-wip-us.apache.org/repos/asf/incubator-apex-malhar/blob/e1a45507/web/demos/package/node_modules/http-proxy/node_modules/utile/lib/index.js ---------------------------------------------------------------------- diff --git a/web/demos/package/node_modules/http-proxy/node_modules/utile/lib/index.js b/web/demos/package/node_modules/http-proxy/node_modules/utile/lib/index.js deleted file mode 100644 index ac9f925..0000000 --- a/web/demos/package/node_modules/http-proxy/node_modules/utile/lib/index.js +++ /dev/null @@ -1,467 +0,0 @@ -/* - * index.js: Top-level include for the `utile` module. - * - * (C) 2011, Nodejitsu Inc. - * MIT LICENSE - * - */ - -var fs = require('fs'), - path = require('path'), - util = require('util'); - -var utile = module.exports; - -// -// Extend the `utile` object with all methods from the -// core node `util` methods. -// -Object.keys(util).forEach(function (key) { - utile[key] = util[key]; -}); - -Object.defineProperties(utile, { - - // - // ### function async - // Simple wrapper to `require('async')`. - // - 'async': { - get: function() { - return utile.async = require('async'); - } - }, - - // - // ### function inflect - // Simple wrapper to `require('i')`. - // - 'inflect': { - get: function() { - return utile.inflect = require('i')(); - } - }, - - // - // ### function mkdirp - // Simple wrapper to `require('mkdirp')` - // - 'mkdirp': { - get: function() { - return utile.mkdirp = require('mkdirp'); - } - }, - - // - // ### function deepEqual - // Simple wrapper to `require('deep-equal')` - // Remark: deepEqual is 4x faster then using assert.deepEqual - // see: https://gist.github.com/2790507 - // - 'deepEqual': { - get: function() { - return utile.deepEqual = require('deep-equal'); - } - }, - - // - // ### function rimraf - // Simple wrapper to `require('rimraf')` - // - 'rimraf': { - get: function() { - return utile.rimraf = require('rimraf'); - } - }, - - // - // ### function cpr - // Simple wrapper to `require('ncp').ncp` - // - 'cpr': { - get: function() { - return utile.cpr = require('ncp').ncp; - } - }, - - // - // ### @file {Object} - // Lazy-loaded `file` module - // - 'file': { - get: function() { - return utile.file = require('./file'); - } - }, - - // - // ### @args {Object} - // Lazy-loaded `args` module - // - 'args': { - get: function() { - return utile.args = require('./args'); - } - }, - - // - // ### @base64 {Object} - // Lazy-loaded `base64` object - // - 'base64': { - get: function() { - return utile.base64 = require('./base64'); - } - }, - - // - // ### @format {Object} - // Lazy-loaded `format` object - // - 'format': { - get: function() { - return utile.format = require('./format'); - } - } - -}); - - -// -// ### function rargs(_args) -// #### _args {Arguments} Original function arguments -// -// Top-level method will accept a javascript "arguments" object -// (the actual keyword "arguments" inside any scope) and return -// back an Array. -// -utile.rargs = function (_args, slice) { - if (!slice) { - slice = 0; - } - - var len = (_args || []).length, - args = new Array(len - slice), - i; - - // - // Convert the raw `_args` to a proper Array. - // - for (i = slice; i < len; i++) { - args[i - slice] = _args[i]; - } - - return args; -}; - -// -// ### function each (obj, iterator) -// #### @obj {Object} Object to iterate over -// #### @iterator {function} Continuation to use on each key. `function (value, key, object)` -// Iterate over the keys of an object. -// -utile.each = function (obj, iterator) { - Object.keys(obj).forEach(function (key) { - iterator(obj[key], key, obj); - }); -}; - -// -// ### function find (o) -// -// -utile.find = function (obj, pred) { - var value, key; - - for (key in obj) { - value = obj[key]; - if (pred(value, key)) { - return value; - } - } -}; - -// -// ### function pad (str, len, chr) -// ### @str {String} String to pad -// ### @len {Number} Number of chars to pad str with -// ### @chr {String} Optional replacement character, defaults to empty space -// Appends chr to str until it reaches a length of len -// -utile.pad = function pad(str, len, chr) { - var s; - if (!chr) { - chr = ' '; - } - str = str || ''; - s = str; - if (str.length < len) { - for (var i = 0; i < (len - str.length); i++) { - s += chr; - } - } - return s; -} - -// -// ### function path (obj, path, value) -// ### @obj {Object} Object to insert value into -// ### @path {Array} List of nested keys to insert value at -// Retreives a value from given Object, `obj`, located at the -// nested keys, `path`. -// -utile.path = function (obj, path) { - var key, i; - - for (i in path) { - if (typeof obj === 'undefined') { - return undefined; - } - - key = path[i]; - obj = obj[key]; - } - - return obj; -}; - -// -// ### function createPath (obj, path, value) -// ### @obj {Object} Object to insert value into -// ### @path {Array} List of nested keys to insert value at -// ### @value {*} Value to insert into the object. -// Inserts the `value` into the given Object, `obj`, creating -// any keys in `path` along the way if necessary. -// -utile.createPath = function (obj, path, value) { - var key, i; - - for (i in path) { - key = path[i]; - if (!obj[key]) { - obj[key] = ((+i + 1 === path.length) ? value : {}); - } - - obj = obj[key]; - } -}; - -// -// ### function mixin (target [source0, source1, ...]) -// Copies enumerable properties from `source0 ... sourceN` -// onto `target` and returns the resulting object. -// -utile.mixin = function (target) { - utile.rargs(arguments, 1).forEach(function (o) { - Object.getOwnPropertyNames(o).forEach(function(attr) { - var getter = Object.getOwnPropertyDescriptor(o, attr).get, - setter = Object.getOwnPropertyDescriptor(o, attr).set; - - if (!getter && !setter) { - target[attr] = o[attr]; - } - else { - Object.defineProperty(target, attr, { - get: getter, - set: setter - }); - } - }); - }); - - return target; -}; - - -// -// ### function capitalize (str) -// #### @str {string} String to capitalize -// Capitalizes the specified `str`. -// -utile.capitalize = utile.inflect.camelize; - -// -// ### function escapeRegExp (str) -// #### @str {string} String to be escaped -// Escape string for use in Javascript regex -// -utile.escapeRegExp = function (str) { - return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&"); -}; - -// -// ### function randomString (length) -// #### @length {integer} The number of bits for the random base64 string returned to contain -// randomString returns a pseude-random ASCII string (subset) -// the return value is a string of length âbits/6â of characters -// from the base64 alphabet. -// -utile.randomString = function (length) { - var chars, rand, i, ret, mod, bits; - - chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_-'; - ret = ''; - // standard 4 - mod = 4; - // default is 16 - bits = length * mod || 64; - - // in v8, Math.random() yields 32 pseudo-random bits (in spidermonkey it gives 53) - while (bits > 0) { - // 32-bit integer - rand = Math.floor(Math.random() * 0x100000000); - //we use the top bits - for (i = 26; i > 0 && bits > 0; i -= mod, bits -= mod) { - ret += chars[0x3F & rand >>> i]; - } - } - - return ret; -}; - -// -// ### function filter (object, test) -// #### @obj {Object} Object to iterate over -// #### @pred {function} Predicate applied to each property. `function (value, key, object)` -// Returns an object with properties from `obj` which satisfy -// the predicate `pred` -// -utile.filter = function (obj, pred) { - var copy; - if (Array.isArray(obj)) { - copy = []; - utile.each(obj, function (val, key) { - if (pred(val, key, obj)) { - copy.push(val); - } - }); - } - else { - copy = {}; - utile.each(obj, function (val, key) { - if (pred(val, key, obj)) { - copy[key] = val; - } - }); - } - return copy; -}; - -// -// ### function requireDir (directory) -// #### @directory {string} Directory to require -// Requires all files and directories from `directory`, returning an object -// with keys being filenames (without trailing `.js`) and respective values -// being return values of `require(filename)`. -// -utile.requireDir = function (directory) { - var result = {}, - files = fs.readdirSync(directory); - - files.forEach(function (file) { - if (file.substr(-3) === '.js') { - file = file.substr(0, file.length - 3); - } - result[file] = require(path.resolve(directory, file)); - }); - return result; -}; - -// -// ### function requireDirLazy (directory) -// #### @directory {string} Directory to require -// Lazily requires all files and directories from `directory`, returning an -// object with keys being filenames (without trailing `.js`) and respective -// values (getters) being return values of `require(filename)`. -// -utile.requireDirLazy = function (directory) { - var result = {}, - files = fs.readdirSync(directory); - - files.forEach(function (file) { - if (file.substr(-3) === '.js') { - file = file.substr(0, file.length - 3); - } - Object.defineProperty(result, file, { - get: function() { - return result[file] = require(path.resolve(directory, file)); - } - }); - }); - - return result; -}; - -// -// ### function clone (object, filter) -// #### @object {Object} Object to clone -// #### @filter {Function} Filter to be used -// Shallow clones the specified object. -// -utile.clone = function (object, filter) { - return Object.keys(object).reduce(filter ? function (obj, k) { - if (filter(k)) obj[k] = object[k]; - return obj; - } : function (obj, k) { - obj[k] = object[k]; - return obj; - }, {}); -}; - -// -// ### function camelToUnderscore (obj) -// #### @obj {Object} Object to convert keys on. -// Converts all keys of the type `keyName` to `key_name` on the -// specified `obj`. -// -utile.camelToUnderscore = function (obj) { - if (typeof obj !== 'object' || obj === null) { - return obj; - } - - if (Array.isArray(obj)) { - obj.forEach(utile.camelToUnderscore); - return obj; - } - - Object.keys(obj).forEach(function (key) { - var k = utile.inflect.underscore(key); - if (k !== key) { - obj[k] = obj[key]; - delete obj[key]; - key = k; - } - utile.camelToUnderscore(obj[key]); - }); - - return obj; -}; - -// -// ### function underscoreToCamel (obj) -// #### @obj {Object} Object to convert keys on. -// Converts all keys of the type `key_name` to `keyName` on the -// specified `obj`. -// -utile.underscoreToCamel = function (obj) { - if (typeof obj !== 'object' || obj === null) { - return obj; - } - - if (Array.isArray(obj)) { - obj.forEach(utile.underscoreToCamel); - return obj; - } - - Object.keys(obj).forEach(function (key) { - var k = utile.inflect.camelize(key, false); - if (k !== key) { - obj[k] = obj[key]; - delete obj[key]; - key = k; - } - utile.underscoreToCamel(obj[key]); - }); - - return obj; -}; http://git-wip-us.apache.org/repos/asf/incubator-apex-malhar/blob/e1a45507/web/demos/package/node_modules/http-proxy/node_modules/utile/node_modules/.bin/ncp ---------------------------------------------------------------------- diff --git a/web/demos/package/node_modules/http-proxy/node_modules/utile/node_modules/.bin/ncp b/web/demos/package/node_modules/http-proxy/node_modules/utile/node_modules/.bin/ncp deleted file mode 100755 index 388eaba..0000000 --- a/web/demos/package/node_modules/http-proxy/node_modules/utile/node_modules/.bin/ncp +++ /dev/null @@ -1,48 +0,0 @@ -#!/usr/bin/env node - - - - -var ncp = require('../lib/ncp'), - args = process.argv.slice(2), - source, dest; - -if (args.length < 2) { - console.error('Usage: ncp [source] [destination] [--filter=filter] [--limit=concurrency limit]'); - process.exit(1); -} - -// parse arguments the hard way -function startsWith(str, prefix) { - return str.substr(0, prefix.length) == prefix; -} - -var options = {}; -args.forEach(function (arg) { - if (startsWith(arg, "--limit=")) { - options.limit = parseInt(arg.split('=', 2)[1], 10); - } - if (startsWith(arg, "--filter=")) { - options.filter = new RegExp(arg.split('=', 2)[1]); - } - if (startsWith(arg, "--stoponerr")) { - options.stopOnErr = true; - } -}); - -ncp.ncp(args[0], args[1], options, function (err) { - if (Array.isArray(err)) { - console.error('There were errors during the copy.'); - err.forEach(function (err) { - console.error(err.stack || err.message); - }); - process.exit(1); - } - else if (err) { - console.error('An error has occurred.'); - console.error(err.stack || err.message); - process.exit(1); - } -}); - - http://git-wip-us.apache.org/repos/asf/incubator-apex-malhar/blob/e1a45507/web/demos/package/node_modules/http-proxy/node_modules/utile/node_modules/.bin/rimraf ---------------------------------------------------------------------- diff --git a/web/demos/package/node_modules/http-proxy/node_modules/utile/node_modules/.bin/rimraf b/web/demos/package/node_modules/http-proxy/node_modules/utile/node_modules/.bin/rimraf deleted file mode 100755 index 29bfa8a..0000000 --- a/web/demos/package/node_modules/http-proxy/node_modules/utile/node_modules/.bin/rimraf +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/bin/env node - -var rimraf = require('./') - -var help = false -var dashdash = false -var args = process.argv.slice(2).filter(function(arg) { - if (dashdash) - return !!arg - else if (arg === '--') - dashdash = true - else if (arg.match(/^(-+|\/)(h(elp)?|\?)$/)) - help = true - else - return !!arg -}); - -if (help || args.length === 0) { - // If they didn't ask for help, then this is not a "success" - var log = help ? console.log : console.error - log('Usage: rimraf <path>') - log('') - log(' Deletes all files and folders at "path" recursively.') - log('') - log('Options:') - log('') - log(' -h, --help Display this usage info') - process.exit(help ? 0 : 1) -} else { - args.forEach(function(arg) { - rimraf.sync(arg) - }) -} http://git-wip-us.apache.org/repos/asf/incubator-apex-malhar/blob/e1a45507/web/demos/package/node_modules/http-proxy/node_modules/utile/node_modules/deep-equal/.travis.yml ---------------------------------------------------------------------- diff --git a/web/demos/package/node_modules/http-proxy/node_modules/utile/node_modules/deep-equal/.travis.yml b/web/demos/package/node_modules/http-proxy/node_modules/utile/node_modules/deep-equal/.travis.yml deleted file mode 100644 index f1d0f13..0000000 --- a/web/demos/package/node_modules/http-proxy/node_modules/utile/node_modules/deep-equal/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - 0.4 - - 0.6 http://git-wip-us.apache.org/repos/asf/incubator-apex-malhar/blob/e1a45507/web/demos/package/node_modules/http-proxy/node_modules/utile/node_modules/deep-equal/LICENSE ---------------------------------------------------------------------- diff --git a/web/demos/package/node_modules/http-proxy/node_modules/utile/node_modules/deep-equal/LICENSE b/web/demos/package/node_modules/http-proxy/node_modules/utile/node_modules/deep-equal/LICENSE deleted file mode 100644 index ee27ba4..0000000 --- a/web/demos/package/node_modules/http-proxy/node_modules/utile/node_modules/deep-equal/LICENSE +++ /dev/null @@ -1,18 +0,0 @@ -This software is released under the MIT license: - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. http://git-wip-us.apache.org/repos/asf/incubator-apex-malhar/blob/e1a45507/web/demos/package/node_modules/http-proxy/node_modules/utile/node_modules/deep-equal/example/cmp.js ---------------------------------------------------------------------- diff --git a/web/demos/package/node_modules/http-proxy/node_modules/utile/node_modules/deep-equal/example/cmp.js b/web/demos/package/node_modules/http-proxy/node_modules/utile/node_modules/deep-equal/example/cmp.js deleted file mode 100644 index 67014b8..0000000 --- a/web/demos/package/node_modules/http-proxy/node_modules/utile/node_modules/deep-equal/example/cmp.js +++ /dev/null @@ -1,11 +0,0 @@ -var equal = require('../'); -console.dir([ - equal( - { a : [ 2, 3 ], b : [ 4 ] }, - { a : [ 2, 3 ], b : [ 4 ] } - ), - equal( - { x : 5, y : [6] }, - { x : 5, y : 6 } - ) -]); http://git-wip-us.apache.org/repos/asf/incubator-apex-malhar/blob/e1a45507/web/demos/package/node_modules/http-proxy/node_modules/utile/node_modules/deep-equal/index.js ---------------------------------------------------------------------- diff --git a/web/demos/package/node_modules/http-proxy/node_modules/utile/node_modules/deep-equal/index.js b/web/demos/package/node_modules/http-proxy/node_modules/utile/node_modules/deep-equal/index.js deleted file mode 100644 index fd2c4f3..0000000 --- a/web/demos/package/node_modules/http-proxy/node_modules/utile/node_modules/deep-equal/index.js +++ /dev/null @@ -1,94 +0,0 @@ -var pSlice = Array.prototype.slice; -var objectKeys = require('./lib/keys.js'); -var isArguments = require('./lib/is_arguments.js'); - -var deepEqual = module.exports = function (actual, expected, opts) { - if (!opts) opts = {}; - // 7.1. All identical values are equivalent, as determined by ===. - if (actual === expected) { - return true; - - } else if (actual instanceof Date && expected instanceof Date) { - return actual.getTime() === expected.getTime(); - - // 7.3. Other pairs that do not both pass typeof value == 'object', - // equivalence is determined by ==. - } else if (typeof actual != 'object' && typeof expected != 'object') { - return opts.strict ? actual === expected : actual == expected; - - // 7.4. For all other Object pairs, including Array objects, equivalence is - // determined by having the same number of owned properties (as verified - // with Object.prototype.hasOwnProperty.call), the same set of keys - // (although not necessarily the same order), equivalent values for every - // corresponding key, and an identical 'prototype' property. Note: this - // accounts for both named and indexed properties on Arrays. - } else { - return objEquiv(actual, expected, opts); - } -} - -function isUndefinedOrNull(value) { - return value === null || value === undefined; -} - -function isBuffer (x) { - if (!x || typeof x !== 'object' || typeof x.length !== 'number') return false; - if (typeof x.copy !== 'function' || typeof x.slice !== 'function') { - return false; - } - if (x.length > 0 && typeof x[0] !== 'number') return false; - return true; -} - -function objEquiv(a, b, opts) { - var i, key; - if (isUndefinedOrNull(a) || isUndefinedOrNull(b)) - return false; - // an identical 'prototype' property. - if (a.prototype !== b.prototype) return false; - //~~~I've managed to break Object.keys through screwy arguments passing. - // Converting to array solves the problem. - if (isArguments(a)) { - if (!isArguments(b)) { - return false; - } - a = pSlice.call(a); - b = pSlice.call(b); - return deepEqual(a, b, opts); - } - if (isBuffer(a)) { - if (!isBuffer(b)) { - return false; - } - if (a.length !== b.length) return false; - for (i = 0; i < a.length; i++) { - if (a[i] !== b[i]) return false; - } - return true; - } - try { - var ka = objectKeys(a), - kb = objectKeys(b); - } catch (e) {//happens when one is a string literal and the other isn't - return false; - } - // having the same number of owned properties (keys incorporates - // hasOwnProperty) - if (ka.length != kb.length) - return false; - //the same set of keys (although not necessarily the same order), - ka.sort(); - kb.sort(); - //~~~cheap key test - for (i = ka.length - 1; i >= 0; i--) { - if (ka[i] != kb[i]) - return false; - } - //equivalent values for every corresponding key, and - //~~~possibly expensive deep test - for (i = ka.length - 1; i >= 0; i--) { - key = ka[i]; - if (!deepEqual(a[key], b[key], opts)) return false; - } - return true; -} http://git-wip-us.apache.org/repos/asf/incubator-apex-malhar/blob/e1a45507/web/demos/package/node_modules/http-proxy/node_modules/utile/node_modules/deep-equal/lib/is_arguments.js ---------------------------------------------------------------------- diff --git a/web/demos/package/node_modules/http-proxy/node_modules/utile/node_modules/deep-equal/lib/is_arguments.js b/web/demos/package/node_modules/http-proxy/node_modules/utile/node_modules/deep-equal/lib/is_arguments.js deleted file mode 100644 index 1ff150f..0000000 --- a/web/demos/package/node_modules/http-proxy/node_modules/utile/node_modules/deep-equal/lib/is_arguments.js +++ /dev/null @@ -1,20 +0,0 @@ -var supportsArgumentsClass = (function(){ - return Object.prototype.toString.call(arguments) -})() == '[object Arguments]'; - -exports = module.exports = supportsArgumentsClass ? supported : unsupported; - -exports.supported = supported; -function supported(object) { - return Object.prototype.toString.call(object) == '[object Arguments]'; -}; - -exports.unsupported = unsupported; -function unsupported(object){ - return object && - typeof object == 'object' && - typeof object.length == 'number' && - Object.prototype.hasOwnProperty.call(object, 'callee') && - !Object.prototype.propertyIsEnumerable.call(object, 'callee') || - false; -}; http://git-wip-us.apache.org/repos/asf/incubator-apex-malhar/blob/e1a45507/web/demos/package/node_modules/http-proxy/node_modules/utile/node_modules/deep-equal/lib/keys.js ---------------------------------------------------------------------- diff --git a/web/demos/package/node_modules/http-proxy/node_modules/utile/node_modules/deep-equal/lib/keys.js b/web/demos/package/node_modules/http-proxy/node_modules/utile/node_modules/deep-equal/lib/keys.js deleted file mode 100644 index 13af263..0000000 --- a/web/demos/package/node_modules/http-proxy/node_modules/utile/node_modules/deep-equal/lib/keys.js +++ /dev/null @@ -1,9 +0,0 @@ -exports = module.exports = typeof Object.keys === 'function' - ? Object.keys : shim; - -exports.shim = shim; -function shim (obj) { - var keys = []; - for (var key in obj) keys.push(key); - return keys; -}
