You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apex.apache.org by da...@apache.org on 2015/11/30 22:06:31 UTC
[25/98] [abbrv] [partial] incubator-apex-malhar git commit: Removing
all web demos
http://git-wip-us.apache.org/repos/asf/incubator-apex-malhar/blob/e1a45507/web/demos/package/node_modules/http-proxy/node_modules/colors/colors.js
----------------------------------------------------------------------
diff --git a/web/demos/package/node_modules/http-proxy/node_modules/colors/colors.js b/web/demos/package/node_modules/http-proxy/node_modules/colors/colors.js
deleted file mode 100644
index 7a537d8..0000000
--- a/web/demos/package/node_modules/http-proxy/node_modules/colors/colors.js
+++ /dev/null
@@ -1,342 +0,0 @@
-/*
-colors.js
-
-Copyright (c) 2010
-
-Marak Squires
-Alexis Sellier (cloudhead)
-
-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.
-
-*/
-
-var isHeadless = false;
-
-if (typeof module !== 'undefined') {
- isHeadless = true;
-}
-
-if (!isHeadless) {
- var exports = {};
- var module = {};
- var colors = exports;
- exports.mode = "browser";
-} else {
- exports.mode = "console";
-}
-
-//
-// Prototypes the string object to have additional method calls that add terminal colors
-//
-var addProperty = function (color, func) {
- exports[color] = function (str) {
- return func.apply(str);
- };
- String.prototype.__defineGetter__(color, func);
-};
-
-function stylize(str, style) {
-
- var styles;
-
- if (exports.mode === 'console') {
- styles = {
- //styles
- 'bold' : ['\x1B[1m', '\x1B[22m'],
- 'italic' : ['\x1B[3m', '\x1B[23m'],
- 'underline' : ['\x1B[4m', '\x1B[24m'],
- 'inverse' : ['\x1B[7m', '\x1B[27m'],
- 'strikethrough' : ['\x1B[9m', '\x1B[29m'],
- //text colors
- //grayscale
- 'white' : ['\x1B[37m', '\x1B[39m'],
- 'grey' : ['\x1B[90m', '\x1B[39m'],
- 'black' : ['\x1B[30m', '\x1B[39m'],
- //colors
- 'blue' : ['\x1B[34m', '\x1B[39m'],
- 'cyan' : ['\x1B[36m', '\x1B[39m'],
- 'green' : ['\x1B[32m', '\x1B[39m'],
- 'magenta' : ['\x1B[35m', '\x1B[39m'],
- 'red' : ['\x1B[31m', '\x1B[39m'],
- 'yellow' : ['\x1B[33m', '\x1B[39m'],
- //background colors
- //grayscale
- 'whiteBG' : ['\x1B[47m', '\x1B[49m'],
- 'greyBG' : ['\x1B[49;5;8m', '\x1B[49m'],
- 'blackBG' : ['\x1B[40m', '\x1B[49m'],
- //colors
- 'blueBG' : ['\x1B[44m', '\x1B[49m'],
- 'cyanBG' : ['\x1B[46m', '\x1B[49m'],
- 'greenBG' : ['\x1B[42m', '\x1B[49m'],
- 'magentaBG' : ['\x1B[45m', '\x1B[49m'],
- 'redBG' : ['\x1B[41m', '\x1B[49m'],
- 'yellowBG' : ['\x1B[43m', '\x1B[49m']
- };
- } else if (exports.mode === 'browser') {
- styles = {
- //styles
- 'bold' : ['<b>', '</b>'],
- 'italic' : ['<i>', '</i>'],
- 'underline' : ['<u>', '</u>'],
- 'inverse' : ['<span style="background-color:black;color:white;">', '</span>'],
- 'strikethrough' : ['<del>', '</del>'],
- //text colors
- //grayscale
- 'white' : ['<span style="color:white;">', '</span>'],
- 'grey' : ['<span style="color:gray;">', '</span>'],
- 'black' : ['<span style="color:black;">', '</span>'],
- //colors
- 'blue' : ['<span style="color:blue;">', '</span>'],
- 'cyan' : ['<span style="color:cyan;">', '</span>'],
- 'green' : ['<span style="color:green;">', '</span>'],
- 'magenta' : ['<span style="color:magenta;">', '</span>'],
- 'red' : ['<span style="color:red;">', '</span>'],
- 'yellow' : ['<span style="color:yellow;">', '</span>'],
- //background colors
- //grayscale
- 'whiteBG' : ['<span style="background-color:white;">', '</span>'],
- 'greyBG' : ['<span style="background-color:gray;">', '</span>'],
- 'blackBG' : ['<span style="background-color:black;">', '</span>'],
- //colors
- 'blueBG' : ['<span style="background-color:blue;">', '</span>'],
- 'cyanBG' : ['<span style="background-color:cyan;">', '</span>'],
- 'greenBG' : ['<span style="background-color:green;">', '</span>'],
- 'magentaBG' : ['<span style="background-color:magenta;">', '</span>'],
- 'redBG' : ['<span style="background-color:red;">', '</span>'],
- 'yellowBG' : ['<span style="background-color:yellow;">', '</span>']
- };
- } else if (exports.mode === 'none') {
- return str + '';
- } else {
- console.log('unsupported mode, try "browser", "console" or "none"');
- }
- return styles[style][0] + str + styles[style][1];
-}
-
-function applyTheme(theme) {
-
- //
- // Remark: This is a list of methods that exist
- // on String that you should not overwrite.
- //
- var stringPrototypeBlacklist = [
- '__defineGetter__', '__defineSetter__', '__lookupGetter__', '__lookupSetter__', 'charAt', 'constructor',
- 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable', 'toLocaleString', 'toString', 'valueOf', 'charCodeAt',
- 'indexOf', 'lastIndexof', 'length', 'localeCompare', 'match', 'replace', 'search', 'slice', 'split', 'substring',
- 'toLocaleLowerCase', 'toLocaleUpperCase', 'toLowerCase', 'toUpperCase', 'trim', 'trimLeft', 'trimRight'
- ];
-
- Object.keys(theme).forEach(function (prop) {
- if (stringPrototypeBlacklist.indexOf(prop) !== -1) {
- console.log('warn: '.red + ('String.prototype' + prop).magenta + ' is probably something you don\'t want to override. Ignoring style name');
- }
- else {
- if (typeof(theme[prop]) === 'string') {
- addProperty(prop, function () {
- return exports[theme[prop]](this);
- });
- }
- else {
- addProperty(prop, function () {
- var ret = this;
- for (var t = 0; t < theme[prop].length; t++) {
- ret = exports[theme[prop][t]](ret);
- }
- return ret;
- });
- }
- }
- });
-}
-
-
-//
-// Iterate through all default styles and colors
-//
-var x = ['bold', 'underline', 'strikethrough', 'italic', 'inverse', 'grey', 'black', 'yellow', 'red', 'green', 'blue', 'white', 'cyan', 'magenta', 'greyBG', 'blackBG', 'yellowBG', 'redBG', 'greenBG', 'blueBG', 'whiteBG', 'cyanBG', 'magentaBG'];
-x.forEach(function (style) {
-
- // __defineGetter__ at the least works in more browsers
- // http://robertnyman.com/javascript/javascript-getters-setters.html
- // Object.defineProperty only works in Chrome
- addProperty(style, function () {
- return stylize(this, style);
- });
-});
-
-function sequencer(map) {
- return function () {
- if (!isHeadless) {
- return this.replace(/( )/, '$1');
- }
- var exploded = this.split(""), i = 0;
- exploded = exploded.map(map);
- return exploded.join("");
- };
-}
-
-var rainbowMap = (function () {
- var rainbowColors = ['red', 'yellow', 'green', 'blue', 'magenta']; //RoY G BiV
- return function (letter, i, exploded) {
- if (letter === " ") {
- return letter;
- } else {
- return stylize(letter, rainbowColors[i++ % rainbowColors.length]);
- }
- };
-})();
-
-exports.themes = {};
-
-exports.addSequencer = function (name, map) {
- addProperty(name, sequencer(map));
-};
-
-exports.addSequencer('rainbow', rainbowMap);
-exports.addSequencer('zebra', function (letter, i, exploded) {
- return i % 2 === 0 ? letter : letter.inverse;
-});
-
-exports.setTheme = function (theme) {
- if (typeof theme === 'string') {
- try {
- exports.themes[theme] = require(theme);
- applyTheme(exports.themes[theme]);
- return exports.themes[theme];
- } catch (err) {
- console.log(err);
- return err;
- }
- } else {
- applyTheme(theme);
- }
-};
-
-
-addProperty('stripColors', function () {
- return ("" + this).replace(/\x1B\[\d+m/g, '');
-});
-
-// please no
-function zalgo(text, options) {
- var soul = {
- "up" : [
- '̍', '̎', '̄', '̅',
- '̿', '̑', '̆', '̐',
- '͒', '͗', '͑', '̇',
- '̈', '̊', '͂', '̓',
- '̈', '͊', '͋', '͌',
- '̃', '̂', '̌', '͐',
- '̀', '́', '̋', '̏',
- '̒', '̓', '̔', '̽',
- '̉', 'ͣ', 'ͤ', 'ͥ',
- 'ͦ', 'ͧ', 'ͨ', 'ͩ',
- 'ͪ', 'ͫ', 'ͬ', 'ͭ',
- 'ͮ', 'ͯ', '̾', '͛',
- '͆', '̚'
- ],
- "down" : [
- '̖', '̗', '̘', '̙',
- '̜', '̝', '̞', '̟',
- '̠', '̤', '̥', '̦',
- '̩', '̪', '̫', '̬',
- '̭', '̮', '̯', '̰',
- '̱', '̲', '̳', '̹',
- '̺', '̻', '̼', 'ͅ',
- '͇', '͈', '͉', '͍',
- '͎', '͓', '͔', '͕',
- '͖', '͙', '͚', '̣'
- ],
- "mid" : [
- '̕', '̛', '̀', '́',
- '͘', '̡', '̢', '̧',
- '̨', '̴', '̵', '̶',
- '͜', '͝', '͞',
- '͟', '͠', '͢', '̸',
- '̷', '͡', ' ҉'
- ]
- },
- all = [].concat(soul.up, soul.down, soul.mid),
- zalgo = {};
-
- function randomNumber(range) {
- var r = Math.floor(Math.random() * range);
- return r;
- }
-
- function is_char(character) {
- var bool = false;
- all.filter(function (i) {
- bool = (i === character);
- });
- return bool;
- }
-
- function heComes(text, options) {
- var result = '', counts, l;
- options = options || {};
- options["up"] = options["up"] || true;
- options["mid"] = options["mid"] || true;
- options["down"] = options["down"] || true;
- options["size"] = options["size"] || "maxi";
- text = text.split('');
- for (l in text) {
- if (is_char(l)) {
- continue;
- }
- result = result + text[l];
- counts = {"up" : 0, "down" : 0, "mid" : 0};
- switch (options.size) {
- case 'mini':
- counts.up = randomNumber(8);
- counts.min = randomNumber(2);
- counts.down = randomNumber(8);
- break;
- case 'maxi':
- counts.up = randomNumber(16) + 3;
- counts.min = randomNumber(4) + 1;
- counts.down = randomNumber(64) + 3;
- break;
- default:
- counts.up = randomNumber(8) + 1;
- counts.mid = randomNumber(6) / 2;
- counts.down = randomNumber(8) + 1;
- break;
- }
-
- var arr = ["up", "mid", "down"];
- for (var d in arr) {
- var index = arr[d];
- for (var i = 0 ; i <= counts[index]; i++) {
- if (options[index]) {
- result = result + soul[index][randomNumber(soul[index].length)];
- }
- }
- }
- }
- return result;
- }
- return heComes(text);
-}
-
-
-// don't summon zalgo
-addProperty('zalgo', function () {
- return zalgo(this);
-});
http://git-wip-us.apache.org/repos/asf/incubator-apex-malhar/blob/e1a45507/web/demos/package/node_modules/http-proxy/node_modules/colors/example.html
----------------------------------------------------------------------
diff --git a/web/demos/package/node_modules/http-proxy/node_modules/colors/example.html b/web/demos/package/node_modules/http-proxy/node_modules/colors/example.html
deleted file mode 100644
index 7a2ae60..0000000
--- a/web/demos/package/node_modules/http-proxy/node_modules/colors/example.html
+++ /dev/null
@@ -1,76 +0,0 @@
-<!DOCTYPE HTML>
-<html lang="en-us">
- <head>
- <meta http-equiv="Content-type" content="text/html; charset=utf-8">
- <title>Colors Example</title>
- <script src="colors.js"></script>
- </head>
- <body>
- <script>
-
- var test = colors.red("hopefully colorless output");
-
- document.write('Rainbows are fun!'.rainbow + '<br/>');
- document.write('So '.italic + 'are'.underline + ' styles! '.bold + 'inverse'.inverse); // styles not widely supported
- document.write('Chains are also cool.'.bold.italic.underline.red); // styles not widely supported
- //document.write('zalgo time!'.zalgo);
- document.write(test.stripColors);
- document.write("a".grey + " b".black);
-
- document.write("Zebras are so fun!".zebra);
-
- document.write(colors.rainbow('Rainbows are fun!'));
- document.write("This is " + "not".strikethrough + " fun.");
-
- document.write(colors.italic('So ') + colors.underline('are') + colors.bold(' styles! ') + colors.inverse('inverse')); // styles not widely supported
- document.write(colors.bold(colors.italic(colors.underline(colors.red('Chains are also cool.'))))); // styles not widely supported
- //document.write(colors.zalgo('zalgo time!'));
- document.write(colors.stripColors(test));
- document.write(colors.grey("a") + colors.black(" b"));
-
- colors.addSequencer("america", function(letter, i, exploded) {
- if(letter === " ") return letter;
- switch(i%3) {
- case 0: return letter.red;
- case 1: return letter.white;
- case 2: return letter.blue;
- }
- });
-
- colors.addSequencer("random", (function() {
- var available = ['bold', 'underline', 'italic', 'inverse', 'grey', 'yellow', 'red', 'green', 'blue', 'white', 'cyan', 'magenta'];
-
- return function(letter, i, exploded) {
- return letter === " " ? letter : letter[available[Math.round(Math.random() * (available.length - 1))]];
- };
- })());
-
- document.write("AMERICA! F--K YEAH!".america);
- document.write("So apparently I've been to Mars, with all the little green men. But you know, I don't recall.".random);
-
- //
- // Custom themes
- //
-
- colors.setTheme({
- silly: 'rainbow',
- input: 'grey',
- verbose: 'cyan',
- prompt: 'grey',
- info: 'green',
- data: 'grey',
- help: 'cyan',
- warn: 'yellow',
- debug: 'blue',
- error: 'red'
- });
-
- // outputs red text
- document.write("this is an error".error);
-
- // outputs yellow text
- document.write("this is a warning".warn);
-
- </script>
- </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/colors/example.js
----------------------------------------------------------------------
diff --git a/web/demos/package/node_modules/http-proxy/node_modules/colors/example.js b/web/demos/package/node_modules/http-proxy/node_modules/colors/example.js
deleted file mode 100644
index b1e03a4..0000000
--- a/web/demos/package/node_modules/http-proxy/node_modules/colors/example.js
+++ /dev/null
@@ -1,77 +0,0 @@
-var colors = require('./colors');
-
-//colors.mode = "browser";
-
-var test = colors.red("hopefully colorless output");
-console.log('Rainbows are fun!'.rainbow);
-console.log('So '.italic + 'are'.underline + ' styles! '.bold + 'inverse'.inverse); // styles not widely supported
-console.log('Chains are also cool.'.bold.italic.underline.red); // styles not widely supported
-//console.log('zalgo time!'.zalgo);
-console.log(test.stripColors);
-console.log("a".grey + " b".black);
-console.log("Zebras are so fun!".zebra);
-console.log('background color attack!'.black.whiteBG)
-
-//
-// Remark: .strikethrough may not work with Mac OS Terminal App
-//
-console.log("This is " + "not".strikethrough + " fun.");
-console.log(colors.rainbow('Rainbows are fun!'));
-console.log(colors.italic('So ') + colors.underline('are') + colors.bold(' styles! ') + colors.inverse('inverse')); // styles not widely supported
-console.log(colors.bold(colors.italic(colors.underline(colors.red('Chains are also cool.'))))); // styles not widely supported
-//console.log(colors.zalgo('zalgo time!'));
-console.log(colors.stripColors(test));
-console.log(colors.grey("a") + colors.black(" b"));
-
-colors.addSequencer("america", function(letter, i, exploded) {
- if(letter === " ") return letter;
- switch(i%3) {
- case 0: return letter.red;
- case 1: return letter.white;
- case 2: return letter.blue;
- }
-});
-
-colors.addSequencer("random", (function() {
- var available = ['bold', 'underline', 'italic', 'inverse', 'grey', 'yellow', 'red', 'green', 'blue', 'white', 'cyan', 'magenta'];
-
- return function(letter, i, exploded) {
- return letter === " " ? letter : letter[available[Math.round(Math.random() * (available.length - 1))]];
- };
-})());
-
-console.log("AMERICA! F--K YEAH!".america);
-console.log("So apparently I've been to Mars, with all the little green men. But you know, I don't recall.".random);
-
-//
-// Custom themes
-//
-
-// Load theme with JSON literal
-colors.setTheme({
- silly: 'rainbow',
- input: 'grey',
- verbose: 'cyan',
- prompt: 'grey',
- info: 'green',
- data: 'grey',
- help: 'cyan',
- warn: 'yellow',
- debug: 'blue',
- error: 'red'
-});
-
-// outputs red text
-console.log("this is an error".error);
-
-// outputs yellow text
-console.log("this is a warning".warn);
-
-// outputs grey text
-console.log("this is an input".input);
-
-// Load a theme from file
-colors.setTheme('./themes/winston-dark.js');
-
-console.log("this is an input".input);
-
http://git-wip-us.apache.org/repos/asf/incubator-apex-malhar/blob/e1a45507/web/demos/package/node_modules/http-proxy/node_modules/colors/package.json
----------------------------------------------------------------------
diff --git a/web/demos/package/node_modules/http-proxy/node_modules/colors/package.json b/web/demos/package/node_modules/http-proxy/node_modules/colors/package.json
deleted file mode 100644
index 1c96d12..0000000
--- a/web/demos/package/node_modules/http-proxy/node_modules/colors/package.json
+++ /dev/null
@@ -1,29 +0,0 @@
-{
- "name": "colors",
- "description": "get colors in your node.js console like what",
- "version": "0.6.2",
- "author": {
- "name": "Marak Squires"
- },
- "homepage": "https://github.com/Marak/colors.js",
- "bugs": {
- "url": "https://github.com/Marak/colors.js/issues"
- },
- "keywords": [
- "ansi",
- "terminal",
- "colors"
- ],
- "repository": {
- "type": "git",
- "url": "http://github.com/Marak/colors.js.git"
- },
- "engines": {
- "node": ">=0.1.90"
- },
- "main": "colors",
- "readme": "# colors.js - get color and style in your node.js console ( and browser ) like what\n\n<img src=\"http://i.imgur.com/goJdO.png\" border = \"0\"/>\n\n\n## Installation\n\n npm install colors\n\n## colors and styles!\n\n- bold\n- italic\n- underline\n- inverse\n- yellow\n- cyan\n- white\n- magenta\n- green\n- red\n- grey\n- blue\n- rainbow\n- zebra\n- random\n\n## Usage\n\n``` js\nvar colors = require('./colors');\n\nconsole.log('hello'.green); // outputs green text\nconsole.log('i like cake and pies'.underline.red) // outputs red underlined text\nconsole.log('inverse the color'.inverse); // inverses the color\nconsole.log('OMG Rainbows!'.rainbow); // rainbow (ignores spaces)\n```\n\n# Creating Custom themes\n\n```js\n\nvar colors = require('colors');\n\ncolors.setTheme({\n silly: 'rainbow',\n input: 'grey',\n verbose: 'cyan',\n prompt: 'grey',\n info: 'green',\n data: 'grey',\n help: 'cyan',\n warn: 'yellow',\n debug: 'blue',\n error: 'red'\n});\n\n// output
s red text\nconsole.log(\"this is an error\".error);\n\n// outputs yellow text\nconsole.log(\"this is a warning\".warn);\n```\n\n\n### Contributors \n\nMarak (Marak Squires)\nAlexis Sellier (cloudhead)\nmmalecki (Maciej Małecki)\nnicoreed (Nico Reed)\nmorganrallen (Morgan Allen)\nJustinCampbell (Justin Campbell)\nded (Dustin Diaz)\n\n\n#### , Marak Squires , Justin Campbell, Dustin Diaz (@ded)\n",
- "readmeFilename": "ReadMe.md",
- "_id": "colors@0.6.2",
- "_from": "colors@0.x.x"
-}
http://git-wip-us.apache.org/repos/asf/incubator-apex-malhar/blob/e1a45507/web/demos/package/node_modules/http-proxy/node_modules/colors/test.js
----------------------------------------------------------------------
diff --git a/web/demos/package/node_modules/http-proxy/node_modules/colors/test.js b/web/demos/package/node_modules/http-proxy/node_modules/colors/test.js
deleted file mode 100644
index c32417d..0000000
--- a/web/demos/package/node_modules/http-proxy/node_modules/colors/test.js
+++ /dev/null
@@ -1,70 +0,0 @@
-var assert = require('assert'),
- colors = require('./colors');
-
-var s = 'string';
-
-function a(s, code) {
- return '\x1B[' + code.toString() + 'm' + s + '\x1B[39m';
-}
-
-function aE(s, color, code) {
- assert.equal(s[color], a(s, code));
- assert.equal(colors[color](s), a(s, code));
- assert.equal(s[color], colors[color](s));
- assert.equal(s[color].stripColors, s);
- assert.equal(s[color].stripColors, colors.stripColors(s));
-}
-
-function h(s, color) {
- return '<span style="color:' + color + ';">' + s + '</span>';
-}
-
-var stylesColors = ['white', 'black', 'blue', 'cyan', 'green', 'magenta', 'red', 'yellow'];
-var stylesAll = stylesColors.concat(['bold', 'italic', 'underline', 'inverse', 'rainbow']);
-
-colors.mode = 'console';
-assert.equal(s.bold, '\x1B[1m' + s + '\x1B[22m');
-assert.equal(s.italic, '\x1B[3m' + s + '\x1B[23m');
-assert.equal(s.underline, '\x1B[4m' + s + '\x1B[24m');
-assert.equal(s.strikethrough, '\x1B[9m' + s + '\x1B[29m');
-assert.equal(s.inverse, '\x1B[7m' + s + '\x1B[27m');
-assert.ok(s.rainbow);
-aE(s, 'white', 37);
-aE(s, 'grey', 90);
-aE(s, 'black', 30);
-aE(s, 'blue', 34);
-aE(s, 'cyan', 36);
-aE(s, 'green', 32);
-aE(s, 'magenta', 35);
-aE(s, 'red', 31);
-aE(s, 'yellow', 33);
-assert.equal(s, 'string');
-
-colors.setTheme({error:'red'});
-
-assert.equal(typeof("astring".red),'string');
-assert.equal(typeof("astring".error),'string');
-
-colors.mode = 'browser';
-assert.equal(s.bold, '<b>' + s + '</b>');
-assert.equal(s.italic, '<i>' + s + '</i>');
-assert.equal(s.underline, '<u>' + s + '</u>');
-assert.equal(s.strikethrough, '<del>' + s + '</del>');
-assert.equal(s.inverse, '<span style="background-color:black;color:white;">' + s + '</span>');
-assert.ok(s.rainbow);
-stylesColors.forEach(function (color) {
- assert.equal(s[color], h(s, color));
- assert.equal(colors[color](s), h(s, color));
-});
-
-assert.equal(typeof("astring".red),'string');
-assert.equal(typeof("astring".error),'string');
-
-colors.mode = 'none';
-stylesAll.forEach(function (style) {
- assert.equal(s[style], s);
- assert.equal(colors[style](s), s);
-});
-
-assert.equal(typeof("astring".red),'string');
-assert.equal(typeof("astring".error),'string');
http://git-wip-us.apache.org/repos/asf/incubator-apex-malhar/blob/e1a45507/web/demos/package/node_modules/http-proxy/node_modules/colors/themes/winston-dark.js
----------------------------------------------------------------------
diff --git a/web/demos/package/node_modules/http-proxy/node_modules/colors/themes/winston-dark.js b/web/demos/package/node_modules/http-proxy/node_modules/colors/themes/winston-dark.js
deleted file mode 100644
index 49a905b..0000000
--- a/web/demos/package/node_modules/http-proxy/node_modules/colors/themes/winston-dark.js
+++ /dev/null
@@ -1,12 +0,0 @@
-module['exports'] = {
- silly: 'rainbow',
- input: 'black',
- verbose: 'cyan',
- prompt: 'grey',
- info: 'green',
- data: 'grey',
- help: 'cyan',
- warn: 'yellow',
- debug: 'blue',
- error: 'red'
-};
\ 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/colors/themes/winston-light.js
----------------------------------------------------------------------
diff --git a/web/demos/package/node_modules/http-proxy/node_modules/colors/themes/winston-light.js b/web/demos/package/node_modules/http-proxy/node_modules/colors/themes/winston-light.js
deleted file mode 100644
index 571972c..0000000
--- a/web/demos/package/node_modules/http-proxy/node_modules/colors/themes/winston-light.js
+++ /dev/null
@@ -1,12 +0,0 @@
-module['exports'] = {
- silly: 'rainbow',
- input: 'grey',
- verbose: 'cyan',
- prompt: 'grey',
- info: 'green',
- data: 'grey',
- help: 'cyan',
- warn: 'yellow',
- debug: 'blue',
- error: 'red'
-};
\ 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/optimist/.travis.yml
----------------------------------------------------------------------
diff --git a/web/demos/package/node_modules/http-proxy/node_modules/optimist/.travis.yml b/web/demos/package/node_modules/http-proxy/node_modules/optimist/.travis.yml
deleted file mode 100644
index cc4dba2..0000000
--- a/web/demos/package/node_modules/http-proxy/node_modules/optimist/.travis.yml
+++ /dev/null
@@ -1,4 +0,0 @@
-language: node_js
-node_js:
- - "0.8"
- - "0.10"
http://git-wip-us.apache.org/repos/asf/incubator-apex-malhar/blob/e1a45507/web/demos/package/node_modules/http-proxy/node_modules/optimist/LICENSE
----------------------------------------------------------------------
diff --git a/web/demos/package/node_modules/http-proxy/node_modules/optimist/LICENSE b/web/demos/package/node_modules/http-proxy/node_modules/optimist/LICENSE
deleted file mode 100644
index 432d1ae..0000000
--- a/web/demos/package/node_modules/http-proxy/node_modules/optimist/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-Copyright 2010 James Halliday (mail@substack.net)
-
-This project is free software released under the MIT/X11 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/optimist/example/bool.js
----------------------------------------------------------------------
diff --git a/web/demos/package/node_modules/http-proxy/node_modules/optimist/example/bool.js b/web/demos/package/node_modules/http-proxy/node_modules/optimist/example/bool.js
deleted file mode 100644
index a998fb7..0000000
--- a/web/demos/package/node_modules/http-proxy/node_modules/optimist/example/bool.js
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/usr/bin/env node
-var util = require('util');
-var argv = require('optimist').argv;
-
-if (argv.s) {
- util.print(argv.fr ? 'Le chat dit: ' : 'The cat says: ');
-}
-console.log(
- (argv.fr ? 'miaou' : 'meow') + (argv.p ? '.' : '')
-);
http://git-wip-us.apache.org/repos/asf/incubator-apex-malhar/blob/e1a45507/web/demos/package/node_modules/http-proxy/node_modules/optimist/example/boolean_double.js
----------------------------------------------------------------------
diff --git a/web/demos/package/node_modules/http-proxy/node_modules/optimist/example/boolean_double.js b/web/demos/package/node_modules/http-proxy/node_modules/optimist/example/boolean_double.js
deleted file mode 100644
index a35a7e6..0000000
--- a/web/demos/package/node_modules/http-proxy/node_modules/optimist/example/boolean_double.js
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/usr/bin/env node
-var argv = require('optimist')
- .boolean(['x','y','z'])
- .argv
-;
-console.dir([ argv.x, argv.y, argv.z ]);
-console.dir(argv._);
http://git-wip-us.apache.org/repos/asf/incubator-apex-malhar/blob/e1a45507/web/demos/package/node_modules/http-proxy/node_modules/optimist/example/boolean_single.js
----------------------------------------------------------------------
diff --git a/web/demos/package/node_modules/http-proxy/node_modules/optimist/example/boolean_single.js b/web/demos/package/node_modules/http-proxy/node_modules/optimist/example/boolean_single.js
deleted file mode 100644
index 017bb68..0000000
--- a/web/demos/package/node_modules/http-proxy/node_modules/optimist/example/boolean_single.js
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/usr/bin/env node
-var argv = require('optimist')
- .boolean('v')
- .argv
-;
-console.dir(argv.v);
-console.dir(argv._);
http://git-wip-us.apache.org/repos/asf/incubator-apex-malhar/blob/e1a45507/web/demos/package/node_modules/http-proxy/node_modules/optimist/example/default_hash.js
----------------------------------------------------------------------
diff --git a/web/demos/package/node_modules/http-proxy/node_modules/optimist/example/default_hash.js b/web/demos/package/node_modules/http-proxy/node_modules/optimist/example/default_hash.js
deleted file mode 100644
index ade7768..0000000
--- a/web/demos/package/node_modules/http-proxy/node_modules/optimist/example/default_hash.js
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/usr/bin/env node
-
-var argv = require('optimist')
- .default({ x : 10, y : 10 })
- .argv
-;
-
-console.log(argv.x + argv.y);
http://git-wip-us.apache.org/repos/asf/incubator-apex-malhar/blob/e1a45507/web/demos/package/node_modules/http-proxy/node_modules/optimist/example/default_singles.js
----------------------------------------------------------------------
diff --git a/web/demos/package/node_modules/http-proxy/node_modules/optimist/example/default_singles.js b/web/demos/package/node_modules/http-proxy/node_modules/optimist/example/default_singles.js
deleted file mode 100644
index d9b1ff4..0000000
--- a/web/demos/package/node_modules/http-proxy/node_modules/optimist/example/default_singles.js
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/usr/bin/env node
-var argv = require('optimist')
- .default('x', 10)
- .default('y', 10)
- .argv
-;
-console.log(argv.x + argv.y);
http://git-wip-us.apache.org/repos/asf/incubator-apex-malhar/blob/e1a45507/web/demos/package/node_modules/http-proxy/node_modules/optimist/example/divide.js
----------------------------------------------------------------------
diff --git a/web/demos/package/node_modules/http-proxy/node_modules/optimist/example/divide.js b/web/demos/package/node_modules/http-proxy/node_modules/optimist/example/divide.js
deleted file mode 100644
index 5e2ee82..0000000
--- a/web/demos/package/node_modules/http-proxy/node_modules/optimist/example/divide.js
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/usr/bin/env node
-
-var argv = require('optimist')
- .usage('Usage: $0 -x [num] -y [num]')
- .demand(['x','y'])
- .argv;
-
-console.log(argv.x / argv.y);
http://git-wip-us.apache.org/repos/asf/incubator-apex-malhar/blob/e1a45507/web/demos/package/node_modules/http-proxy/node_modules/optimist/example/line_count.js
----------------------------------------------------------------------
diff --git a/web/demos/package/node_modules/http-proxy/node_modules/optimist/example/line_count.js b/web/demos/package/node_modules/http-proxy/node_modules/optimist/example/line_count.js
deleted file mode 100644
index b5f95bf..0000000
--- a/web/demos/package/node_modules/http-proxy/node_modules/optimist/example/line_count.js
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/usr/bin/env node
-var argv = require('optimist')
- .usage('Count the lines in a file.\nUsage: $0')
- .demand('f')
- .alias('f', 'file')
- .describe('f', 'Load a file')
- .argv
-;
-
-var fs = require('fs');
-var s = fs.createReadStream(argv.file);
-
-var lines = 0;
-s.on('data', function (buf) {
- lines += buf.toString().match(/\n/g).length;
-});
-
-s.on('end', function () {
- console.log(lines);
-});
http://git-wip-us.apache.org/repos/asf/incubator-apex-malhar/blob/e1a45507/web/demos/package/node_modules/http-proxy/node_modules/optimist/example/line_count_options.js
----------------------------------------------------------------------
diff --git a/web/demos/package/node_modules/http-proxy/node_modules/optimist/example/line_count_options.js b/web/demos/package/node_modules/http-proxy/node_modules/optimist/example/line_count_options.js
deleted file mode 100644
index d9ac709..0000000
--- a/web/demos/package/node_modules/http-proxy/node_modules/optimist/example/line_count_options.js
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/usr/bin/env node
-var argv = require('optimist')
- .usage('Count the lines in a file.\nUsage: $0')
- .options({
- file : {
- demand : true,
- alias : 'f',
- description : 'Load a file'
- },
- base : {
- alias : 'b',
- description : 'Numeric base to use for output',
- default : 10,
- },
- })
- .argv
-;
-
-var fs = require('fs');
-var s = fs.createReadStream(argv.file);
-
-var lines = 0;
-s.on('data', function (buf) {
- lines += buf.toString().match(/\n/g).length;
-});
-
-s.on('end', function () {
- console.log(lines.toString(argv.base));
-});
http://git-wip-us.apache.org/repos/asf/incubator-apex-malhar/blob/e1a45507/web/demos/package/node_modules/http-proxy/node_modules/optimist/example/line_count_wrap.js
----------------------------------------------------------------------
diff --git a/web/demos/package/node_modules/http-proxy/node_modules/optimist/example/line_count_wrap.js b/web/demos/package/node_modules/http-proxy/node_modules/optimist/example/line_count_wrap.js
deleted file mode 100644
index 4267511..0000000
--- a/web/demos/package/node_modules/http-proxy/node_modules/optimist/example/line_count_wrap.js
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/usr/bin/env node
-var argv = require('optimist')
- .usage('Count the lines in a file.\nUsage: $0')
- .wrap(80)
- .demand('f')
- .alias('f', [ 'file', 'filename' ])
- .describe('f',
- "Load a file. It's pretty important."
- + " Required even. So you'd better specify it."
- )
- .alias('b', 'base')
- .describe('b', 'Numeric base to display the number of lines in')
- .default('b', 10)
- .describe('x', 'Super-secret optional parameter which is secret')
- .default('x', '')
- .argv
-;
-
-var fs = require('fs');
-var s = fs.createReadStream(argv.file);
-
-var lines = 0;
-s.on('data', function (buf) {
- lines += buf.toString().match(/\n/g).length;
-});
-
-s.on('end', function () {
- console.log(lines.toString(argv.base));
-});
http://git-wip-us.apache.org/repos/asf/incubator-apex-malhar/blob/e1a45507/web/demos/package/node_modules/http-proxy/node_modules/optimist/example/nonopt.js
----------------------------------------------------------------------
diff --git a/web/demos/package/node_modules/http-proxy/node_modules/optimist/example/nonopt.js b/web/demos/package/node_modules/http-proxy/node_modules/optimist/example/nonopt.js
deleted file mode 100644
index ee633ee..0000000
--- a/web/demos/package/node_modules/http-proxy/node_modules/optimist/example/nonopt.js
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env node
-var argv = require('optimist').argv;
-console.log('(%d,%d)', argv.x, argv.y);
-console.log(argv._);
http://git-wip-us.apache.org/repos/asf/incubator-apex-malhar/blob/e1a45507/web/demos/package/node_modules/http-proxy/node_modules/optimist/example/reflect.js
----------------------------------------------------------------------
diff --git a/web/demos/package/node_modules/http-proxy/node_modules/optimist/example/reflect.js b/web/demos/package/node_modules/http-proxy/node_modules/optimist/example/reflect.js
deleted file mode 100644
index 816b3e1..0000000
--- a/web/demos/package/node_modules/http-proxy/node_modules/optimist/example/reflect.js
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/usr/bin/env node
-console.dir(require('optimist').argv);
http://git-wip-us.apache.org/repos/asf/incubator-apex-malhar/blob/e1a45507/web/demos/package/node_modules/http-proxy/node_modules/optimist/example/short.js
----------------------------------------------------------------------
diff --git a/web/demos/package/node_modules/http-proxy/node_modules/optimist/example/short.js b/web/demos/package/node_modules/http-proxy/node_modules/optimist/example/short.js
deleted file mode 100644
index 1db0ad0..0000000
--- a/web/demos/package/node_modules/http-proxy/node_modules/optimist/example/short.js
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/usr/bin/env node
-var argv = require('optimist').argv;
-console.log('(%d,%d)', argv.x, argv.y);
http://git-wip-us.apache.org/repos/asf/incubator-apex-malhar/blob/e1a45507/web/demos/package/node_modules/http-proxy/node_modules/optimist/example/string.js
----------------------------------------------------------------------
diff --git a/web/demos/package/node_modules/http-proxy/node_modules/optimist/example/string.js b/web/demos/package/node_modules/http-proxy/node_modules/optimist/example/string.js
deleted file mode 100644
index a8e5aeb..0000000
--- a/web/demos/package/node_modules/http-proxy/node_modules/optimist/example/string.js
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/usr/bin/env node
-var argv = require('optimist')
- .string('x', 'y')
- .argv
-;
-console.dir([ argv.x, argv.y ]);
-
-/* Turns off numeric coercion:
- ./node string.js -x 000123 -y 9876
- [ '000123', '9876' ]
-*/
http://git-wip-us.apache.org/repos/asf/incubator-apex-malhar/blob/e1a45507/web/demos/package/node_modules/http-proxy/node_modules/optimist/example/usage-options.js
----------------------------------------------------------------------
diff --git a/web/demos/package/node_modules/http-proxy/node_modules/optimist/example/usage-options.js b/web/demos/package/node_modules/http-proxy/node_modules/optimist/example/usage-options.js
deleted file mode 100644
index b999977..0000000
--- a/web/demos/package/node_modules/http-proxy/node_modules/optimist/example/usage-options.js
+++ /dev/null
@@ -1,19 +0,0 @@
-var optimist = require('./../index');
-
-var argv = optimist.usage('This is my awesome program', {
- 'about': {
- description: 'Provide some details about the author of this program',
- required: true,
- short: 'a',
- },
- 'info': {
- description: 'Provide some information about the node.js agains!!!!!!',
- boolean: true,
- short: 'i'
- }
-}).argv;
-
-optimist.showHelp();
-
-console.log('\n\nInspecting options');
-console.dir(argv);
\ 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/optimist/example/xup.js
----------------------------------------------------------------------
diff --git a/web/demos/package/node_modules/http-proxy/node_modules/optimist/example/xup.js b/web/demos/package/node_modules/http-proxy/node_modules/optimist/example/xup.js
deleted file mode 100644
index 8f6ecd2..0000000
--- a/web/demos/package/node_modules/http-proxy/node_modules/optimist/example/xup.js
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/usr/bin/env node
-var argv = require('optimist').argv;
-
-if (argv.rif - 5 * argv.xup > 7.138) {
- console.log('Buy more riffiwobbles');
-}
-else {
- console.log('Sell the xupptumblers');
-}
-
http://git-wip-us.apache.org/repos/asf/incubator-apex-malhar/blob/e1a45507/web/demos/package/node_modules/http-proxy/node_modules/optimist/index.js
----------------------------------------------------------------------
diff --git a/web/demos/package/node_modules/http-proxy/node_modules/optimist/index.js b/web/demos/package/node_modules/http-proxy/node_modules/optimist/index.js
deleted file mode 100644
index 4da5a6d..0000000
--- a/web/demos/package/node_modules/http-proxy/node_modules/optimist/index.js
+++ /dev/null
@@ -1,343 +0,0 @@
-var path = require('path');
-var minimist = require('minimist');
-var wordwrap = require('wordwrap');
-
-/* Hack an instance of Argv with process.argv into Argv
- so people can do
- require('optimist')(['--beeble=1','-z','zizzle']).argv
- to parse a list of args and
- require('optimist').argv
- to get a parsed version of process.argv.
-*/
-
-var inst = Argv(process.argv.slice(2));
-Object.keys(inst).forEach(function (key) {
- Argv[key] = typeof inst[key] == 'function'
- ? inst[key].bind(inst)
- : inst[key];
-});
-
-var exports = module.exports = Argv;
-function Argv (processArgs, cwd) {
- var self = {};
- if (!cwd) cwd = process.cwd();
-
- self.$0 = process.argv
- .slice(0,2)
- .map(function (x) {
- var b = rebase(cwd, x);
- return x.match(/^\//) && b.length < x.length
- ? b : x
- })
- .join(' ')
- ;
-
- if (process.env._ != undefined && process.argv[1] == process.env._) {
- self.$0 = process.env._.replace(
- path.dirname(process.execPath) + '/', ''
- );
- }
-
- var options = {
- boolean: [],
- string: [],
- alias: {},
- default: []
- };
-
- self.boolean = function (bools) {
- options.boolean.push.apply(options.boolean, [].concat(bools));
- return self;
- };
-
- self.string = function (strings) {
- options.string.push.apply(options.string, [].concat(strings));
- return self;
- };
-
- self.default = function (key, value) {
- if (typeof key === 'object') {
- Object.keys(key).forEach(function (k) {
- self.default(k, key[k]);
- });
- }
- else {
- options.default[key] = value;
- }
- return self;
- };
-
- self.alias = function (x, y) {
- if (typeof x === 'object') {
- Object.keys(x).forEach(function (key) {
- self.alias(key, x[key]);
- });
- }
- else {
- options.alias[x] = (options.alias[x] || []).concat(y);
- }
- return self;
- };
-
- var demanded = {};
- self.demand = function (keys) {
- if (typeof keys == 'number') {
- if (!demanded._) demanded._ = 0;
- demanded._ += keys;
- }
- else if (Array.isArray(keys)) {
- keys.forEach(function (key) {
- self.demand(key);
- });
- }
- else {
- demanded[keys] = true;
- }
-
- return self;
- };
-
- var usage;
- self.usage = function (msg, opts) {
- if (!opts && typeof msg === 'object') {
- opts = msg;
- msg = null;
- }
-
- usage = msg;
-
- if (opts) self.options(opts);
-
- return self;
- };
-
- function fail (msg) {
- self.showHelp();
- if (msg) console.error(msg);
- process.exit(1);
- }
-
- var checks = [];
- self.check = function (f) {
- checks.push(f);
- return self;
- };
-
- var descriptions = {};
- self.describe = function (key, desc) {
- if (typeof key === 'object') {
- Object.keys(key).forEach(function (k) {
- self.describe(k, key[k]);
- });
- }
- else {
- descriptions[key] = desc;
- }
- return self;
- };
-
- self.parse = function (args) {
- return parseArgs(args);
- };
-
- self.option = self.options = function (key, opt) {
- if (typeof key === 'object') {
- Object.keys(key).forEach(function (k) {
- self.options(k, key[k]);
- });
- }
- else {
- if (opt.alias) self.alias(key, opt.alias);
- if (opt.demand) self.demand(key);
- if (typeof opt.default !== 'undefined') {
- self.default(key, opt.default);
- }
-
- if (opt.boolean || opt.type === 'boolean') {
- self.boolean(key);
- }
- if (opt.string || opt.type === 'string') {
- self.string(key);
- }
-
- var desc = opt.describe || opt.description || opt.desc;
- if (desc) {
- self.describe(key, desc);
- }
- }
-
- return self;
- };
-
- var wrap = null;
- self.wrap = function (cols) {
- wrap = cols;
- return self;
- };
-
- self.showHelp = function (fn) {
- if (!fn) fn = console.error;
- fn(self.help());
- };
-
- self.help = function () {
- var keys = Object.keys(
- Object.keys(descriptions)
- .concat(Object.keys(demanded))
- .concat(Object.keys(options.default))
- .reduce(function (acc, key) {
- if (key !== '_') acc[key] = true;
- return acc;
- }, {})
- );
-
- var help = keys.length ? [ 'Options:' ] : [];
-
- if (usage) {
- help.unshift(usage.replace(/\$0/g, self.$0), '');
- }
-
- var switches = keys.reduce(function (acc, key) {
- acc[key] = [ key ].concat(options.alias[key] || [])
- .map(function (sw) {
- return (sw.length > 1 ? '--' : '-') + sw
- })
- .join(', ')
- ;
- return acc;
- }, {});
-
- var switchlen = longest(Object.keys(switches).map(function (s) {
- return switches[s] || '';
- }));
-
- var desclen = longest(Object.keys(descriptions).map(function (d) {
- return descriptions[d] || '';
- }));
-
- keys.forEach(function (key) {
- var kswitch = switches[key];
- var desc = descriptions[key] || '';
-
- if (wrap) {
- desc = wordwrap(switchlen + 4, wrap)(desc)
- .slice(switchlen + 4)
- ;
- }
-
- var spadding = new Array(
- Math.max(switchlen - kswitch.length + 3, 0)
- ).join(' ');
-
- var dpadding = new Array(
- Math.max(desclen - desc.length + 1, 0)
- ).join(' ');
-
- var type = null;
-
- if (options.boolean[key]) type = '[boolean]';
- if (options.string[key]) type = '[string]';
-
- if (!wrap && dpadding.length > 0) {
- desc += dpadding;
- }
-
- var prelude = ' ' + kswitch + spadding;
- var extra = [
- type,
- demanded[key]
- ? '[required]'
- : null
- ,
- options.default[key] !== undefined
- ? '[default: ' + JSON.stringify(options.default[key]) + ']'
- : null
- ,
- ].filter(Boolean).join(' ');
-
- var body = [ desc, extra ].filter(Boolean).join(' ');
-
- if (wrap) {
- var dlines = desc.split('\n');
- var dlen = dlines.slice(-1)[0].length
- + (dlines.length === 1 ? prelude.length : 0)
-
- body = desc + (dlen + extra.length > wrap - 2
- ? '\n'
- + new Array(wrap - extra.length + 1).join(' ')
- + extra
- : new Array(wrap - extra.length - dlen + 1).join(' ')
- + extra
- );
- }
-
- help.push(prelude + body);
- });
-
- help.push('');
- return help.join('\n');
- };
-
- Object.defineProperty(self, 'argv', {
- get : function () { return parseArgs(processArgs) },
- enumerable : true,
- });
-
- function parseArgs (args) {
- var argv = minimist(args, options);
- argv.$0 = self.$0;
-
- if (demanded._ && argv._.length < demanded._) {
- fail('Not enough non-option arguments: got '
- + argv._.length + ', need at least ' + demanded._
- );
- }
-
- var missing = [];
- Object.keys(demanded).forEach(function (key) {
- if (!argv[key]) missing.push(key);
- });
-
- if (missing.length) {
- fail('Missing required arguments: ' + missing.join(', '));
- }
-
- checks.forEach(function (f) {
- try {
- if (f(argv) === false) {
- fail('Argument check failed: ' + f.toString());
- }
- }
- catch (err) {
- fail(err)
- }
- });
-
- return argv;
- }
-
- function longest (xs) {
- return Math.max.apply(
- null,
- xs.map(function (x) { return x.length })
- );
- }
-
- return self;
-};
-
-// rebase an absolute path to a relative one with respect to a base directory
-// exported for tests
-exports.rebase = rebase;
-function rebase (base, dir) {
- var ds = path.normalize(dir).split('/').slice(1);
- var bs = path.normalize(base).split('/').slice(1);
-
- for (var i = 0; ds[i] && ds[i] == bs[i]; i++);
- ds.splice(0, i); bs.splice(0, i);
-
- var p = path.normalize(
- bs.map(function () { return '..' }).concat(ds).join('/')
- ).replace(/\/$/,'').replace(/^$/, '.');
- return p.match(/^[.\/]/) ? p : './' + p;
-};
http://git-wip-us.apache.org/repos/asf/incubator-apex-malhar/blob/e1a45507/web/demos/package/node_modules/http-proxy/node_modules/optimist/node_modules/minimist/.travis.yml
----------------------------------------------------------------------
diff --git a/web/demos/package/node_modules/http-proxy/node_modules/optimist/node_modules/minimist/.travis.yml b/web/demos/package/node_modules/http-proxy/node_modules/optimist/node_modules/minimist/.travis.yml
deleted file mode 100644
index cc4dba2..0000000
--- a/web/demos/package/node_modules/http-proxy/node_modules/optimist/node_modules/minimist/.travis.yml
+++ /dev/null
@@ -1,4 +0,0 @@
-language: node_js
-node_js:
- - "0.8"
- - "0.10"
http://git-wip-us.apache.org/repos/asf/incubator-apex-malhar/blob/e1a45507/web/demos/package/node_modules/http-proxy/node_modules/optimist/node_modules/minimist/LICENSE
----------------------------------------------------------------------
diff --git a/web/demos/package/node_modules/http-proxy/node_modules/optimist/node_modules/minimist/LICENSE b/web/demos/package/node_modules/http-proxy/node_modules/optimist/node_modules/minimist/LICENSE
deleted file mode 100644
index ee27ba4..0000000
--- a/web/demos/package/node_modules/http-proxy/node_modules/optimist/node_modules/minimist/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/optimist/node_modules/minimist/example/parse.js
----------------------------------------------------------------------
diff --git a/web/demos/package/node_modules/http-proxy/node_modules/optimist/node_modules/minimist/example/parse.js b/web/demos/package/node_modules/http-proxy/node_modules/optimist/node_modules/minimist/example/parse.js
deleted file mode 100644
index abff3e8..0000000
--- a/web/demos/package/node_modules/http-proxy/node_modules/optimist/node_modules/minimist/example/parse.js
+++ /dev/null
@@ -1,2 +0,0 @@
-var argv = require('../')(process.argv.slice(2));
-console.dir(argv);
http://git-wip-us.apache.org/repos/asf/incubator-apex-malhar/blob/e1a45507/web/demos/package/node_modules/http-proxy/node_modules/optimist/node_modules/minimist/index.js
----------------------------------------------------------------------
diff --git a/web/demos/package/node_modules/http-proxy/node_modules/optimist/node_modules/minimist/index.js b/web/demos/package/node_modules/http-proxy/node_modules/optimist/node_modules/minimist/index.js
deleted file mode 100644
index 584f551..0000000
--- a/web/demos/package/node_modules/http-proxy/node_modules/optimist/node_modules/minimist/index.js
+++ /dev/null
@@ -1,187 +0,0 @@
-module.exports = function (args, opts) {
- if (!opts) opts = {};
-
- var flags = { bools : {}, strings : {} };
-
- [].concat(opts['boolean']).filter(Boolean).forEach(function (key) {
- flags.bools[key] = true;
- });
-
- [].concat(opts.string).filter(Boolean).forEach(function (key) {
- flags.strings[key] = true;
- });
-
- var aliases = {};
- Object.keys(opts.alias || {}).forEach(function (key) {
- aliases[key] = [].concat(opts.alias[key]);
- aliases[key].forEach(function (x) {
- aliases[x] = [key].concat(aliases[key].filter(function (y) {
- return x !== y;
- }));
- });
- });
-
- var defaults = opts['default'] || {};
-
- var argv = { _ : [] };
- Object.keys(flags.bools).forEach(function (key) {
- setArg(key, defaults[key] === undefined ? false : defaults[key]);
- });
-
- var notFlags = [];
-
- if (args.indexOf('--') !== -1) {
- notFlags = args.slice(args.indexOf('--')+1);
- args = args.slice(0, args.indexOf('--'));
- }
-
- function setArg (key, val) {
- var value = !flags.strings[key] && isNumber(val)
- ? Number(val) : val
- ;
- setKey(argv, key.split('.'), value);
-
- (aliases[key] || []).forEach(function (x) {
- setKey(argv, x.split('.'), value);
- });
- }
-
- for (var i = 0; i < args.length; i++) {
- var arg = args[i];
-
- if (/^--.+=/.test(arg)) {
- // Using [\s\S] instead of . because js doesn't support the
- // 'dotall' regex modifier. See:
- // http://stackoverflow.com/a/1068308/13216
- var m = arg.match(/^--([^=]+)=([\s\S]*)$/);
- setArg(m[1], m[2]);
- }
- else if (/^--no-.+/.test(arg)) {
- var key = arg.match(/^--no-(.+)/)[1];
- setArg(key, false);
- }
- else if (/^--.+/.test(arg)) {
- var key = arg.match(/^--(.+)/)[1];
- var next = args[i + 1];
- if (next !== undefined && !/^-/.test(next)
- && !flags.bools[key]
- && (aliases[key] ? !flags.bools[aliases[key]] : true)) {
- setArg(key, next);
- i++;
- }
- else if (/^(true|false)$/.test(next)) {
- setArg(key, next === 'true');
- i++;
- }
- else {
- setArg(key, flags.strings[key] ? '' : true);
- }
- }
- else if (/^-[^-]+/.test(arg)) {
- var letters = arg.slice(1,-1).split('');
-
- var broken = false;
- for (var j = 0; j < letters.length; j++) {
- var next = arg.slice(j+2);
-
- if (next === '-') {
- setArg(letters[j], next)
- continue;
- }
-
- if (/[A-Za-z]/.test(letters[j])
- && /-?\d+(\.\d*)?(e-?\d+)?$/.test(next)) {
- setArg(letters[j], next);
- broken = true;
- break;
- }
-
- if (letters[j+1] && letters[j+1].match(/\W/)) {
- setArg(letters[j], arg.slice(j+2));
- broken = true;
- break;
- }
- else {
- setArg(letters[j], flags.strings[letters[j]] ? '' : true);
- }
- }
-
- var key = arg.slice(-1)[0];
- if (!broken && key !== '-') {
- if (args[i+1] && !/^(-|--)[^-]/.test(args[i+1])
- && !flags.bools[key]
- && (aliases[key] ? !flags.bools[aliases[key]] : true)) {
- setArg(key, args[i+1]);
- i++;
- }
- else if (args[i+1] && /true|false/.test(args[i+1])) {
- setArg(key, args[i+1] === 'true');
- i++;
- }
- else {
- setArg(key, flags.strings[key] ? '' : true);
- }
- }
- }
- else {
- argv._.push(
- flags.strings['_'] || !isNumber(arg) ? arg : Number(arg)
- );
- }
- }
-
- Object.keys(defaults).forEach(function (key) {
- if (!hasKey(argv, key.split('.'))) {
- setKey(argv, key.split('.'), defaults[key]);
-
- (aliases[key] || []).forEach(function (x) {
- setKey(argv, x.split('.'), defaults[key]);
- });
- }
- });
-
- notFlags.forEach(function(key) {
- argv._.push(key);
- });
-
- return argv;
-};
-
-function hasKey (obj, keys) {
- var o = obj;
- keys.slice(0,-1).forEach(function (key) {
- o = (o[key] || {});
- });
-
- var key = keys[keys.length - 1];
- return key in o;
-}
-
-function setKey (obj, keys, value) {
- var o = obj;
- keys.slice(0,-1).forEach(function (key) {
- if (o[key] === undefined) o[key] = {};
- o = o[key];
- });
-
- var key = keys[keys.length - 1];
- if (o[key] === undefined || typeof o[key] === 'boolean') {
- o[key] = value;
- }
- else if (Array.isArray(o[key])) {
- o[key].push(value);
- }
- else {
- o[key] = [ o[key], value ];
- }
-}
-
-function isNumber (x) {
- if (typeof x === 'number') return true;
- if (/^0x[0-9a-f]+$/i.test(x)) return true;
- return /^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(x);
-}
-
-function longest (xs) {
- return Math.max.apply(null, xs.map(function (x) { return x.length }));
-}
http://git-wip-us.apache.org/repos/asf/incubator-apex-malhar/blob/e1a45507/web/demos/package/node_modules/http-proxy/node_modules/optimist/node_modules/minimist/package.json
----------------------------------------------------------------------
diff --git a/web/demos/package/node_modules/http-proxy/node_modules/optimist/node_modules/minimist/package.json b/web/demos/package/node_modules/http-proxy/node_modules/optimist/node_modules/minimist/package.json
deleted file mode 100644
index de49bb5..0000000
--- a/web/demos/package/node_modules/http-proxy/node_modules/optimist/node_modules/minimist/package.json
+++ /dev/null
@@ -1,50 +0,0 @@
-{
- "name": "minimist",
- "version": "0.0.8",
- "description": "parse argument options",
- "main": "index.js",
- "devDependencies": {
- "tape": "~1.0.4",
- "tap": "~0.4.0"
- },
- "scripts": {
- "test": "tap test/*.js"
- },
- "testling": {
- "files": "test/*.js",
- "browsers": [
- "ie/6..latest",
- "ff/5",
- "firefox/latest",
- "chrome/10",
- "chrome/latest",
- "safari/5.1",
- "safari/latest",
- "opera/12"
- ]
- },
- "repository": {
- "type": "git",
- "url": "git://github.com/substack/minimist.git"
- },
- "homepage": "https://github.com/substack/minimist",
- "keywords": [
- "argv",
- "getopt",
- "parser",
- "optimist"
- ],
- "author": {
- "name": "James Halliday",
- "email": "mail@substack.net",
- "url": "http://substack.net"
- },
- "license": "MIT",
- "readme": "# minimist\n\nparse argument options\n\nThis module is the guts of optimist's argument parser without all the\nfanciful decoration.\n\n[![browser support](https://ci.testling.com/substack/minimist.png)](http://ci.testling.com/substack/minimist)\n\n[![build status](https://secure.travis-ci.org/substack/minimist.png)](http://travis-ci.org/substack/minimist)\n\n# example\n\n``` js\nvar argv = require('minimist')(process.argv.slice(2));\nconsole.dir(argv);\n```\n\n```\n$ node example/parse.js -a beep -b boop\n{ _: [], a: 'beep', b: 'boop' }\n```\n\n```\n$ node example/parse.js -x 3 -y 4 -n5 -abc --beep=boop foo bar baz\n{ _: [ 'foo', 'bar', 'baz' ],\n x: 3,\n y: 4,\n n: 5,\n a: true,\n b: true,\n c: true,\n beep: 'boop' }\n```\n\n# methods\n\n``` js\nvar parseArgs = require('minimist')\n```\n\n## var argv = parseArgs(args, opts={})\n\nReturn an argument object `argv` populated with the array arguments from `args`.\n\n`argv._` contains all the arguments that didn't ha
ve an option associated with\nthem.\n\nNumeric-looking arguments will be returned as numbers unless `opts.string` or\n`opts.boolean` is set for that argument name.\n\nAny arguments after `'--'` will not be parsed and will end up in `argv._`.\n\noptions can be:\n\n* `opts.string` - a string or array of strings argument names to always treat as\nstrings\n* `opts.boolean` - a string or array of strings to always treat as booleans\n* `opts.alias` - an object mapping string names to strings or arrays of string\nargument names to use as aliases\n* `opts.default` - an object mapping string argument names to default values\n\n# install\n\nWith [npm](https://npmjs.org) do:\n\n```\nnpm install minimist\n```\n\n# license\n\nMIT\n",
- "readmeFilename": "readme.markdown",
- "bugs": {
- "url": "https://github.com/substack/minimist/issues"
- },
- "_id": "minimist@0.0.8",
- "_from": "minimist@~0.0.1"
-}
http://git-wip-us.apache.org/repos/asf/incubator-apex-malhar/blob/e1a45507/web/demos/package/node_modules/http-proxy/node_modules/optimist/node_modules/minimist/readme.markdown
----------------------------------------------------------------------
diff --git a/web/demos/package/node_modules/http-proxy/node_modules/optimist/node_modules/minimist/readme.markdown b/web/demos/package/node_modules/http-proxy/node_modules/optimist/node_modules/minimist/readme.markdown
deleted file mode 100644
index c256353..0000000
--- a/web/demos/package/node_modules/http-proxy/node_modules/optimist/node_modules/minimist/readme.markdown
+++ /dev/null
@@ -1,73 +0,0 @@
-# minimist
-
-parse argument options
-
-This module is the guts of optimist's argument parser without all the
-fanciful decoration.
-
-[![browser support](https://ci.testling.com/substack/minimist.png)](http://ci.testling.com/substack/minimist)
-
-[![build status](https://secure.travis-ci.org/substack/minimist.png)](http://travis-ci.org/substack/minimist)
-
-# example
-
-``` js
-var argv = require('minimist')(process.argv.slice(2));
-console.dir(argv);
-```
-
-```
-$ node example/parse.js -a beep -b boop
-{ _: [], a: 'beep', b: 'boop' }
-```
-
-```
-$ node example/parse.js -x 3 -y 4 -n5 -abc --beep=boop foo bar baz
-{ _: [ 'foo', 'bar', 'baz' ],
- x: 3,
- y: 4,
- n: 5,
- a: true,
- b: true,
- c: true,
- beep: 'boop' }
-```
-
-# methods
-
-``` js
-var parseArgs = require('minimist')
-```
-
-## var argv = parseArgs(args, opts={})
-
-Return an argument object `argv` populated with the array arguments from `args`.
-
-`argv._` contains all the arguments that didn't have an option associated with
-them.
-
-Numeric-looking arguments will be returned as numbers unless `opts.string` or
-`opts.boolean` is set for that argument name.
-
-Any arguments after `'--'` will not be parsed and will end up in `argv._`.
-
-options can be:
-
-* `opts.string` - a string or array of strings argument names to always treat as
-strings
-* `opts.boolean` - a string or array of strings to always treat as booleans
-* `opts.alias` - an object mapping string names to strings or arrays of string
-argument names to use as aliases
-* `opts.default` - an object mapping string argument names to default values
-
-# install
-
-With [npm](https://npmjs.org) do:
-
-```
-npm install minimist
-```
-
-# license
-
-MIT
http://git-wip-us.apache.org/repos/asf/incubator-apex-malhar/blob/e1a45507/web/demos/package/node_modules/http-proxy/node_modules/optimist/node_modules/minimist/test/dash.js
----------------------------------------------------------------------
diff --git a/web/demos/package/node_modules/http-proxy/node_modules/optimist/node_modules/minimist/test/dash.js b/web/demos/package/node_modules/http-proxy/node_modules/optimist/node_modules/minimist/test/dash.js
deleted file mode 100644
index 8b034b9..0000000
--- a/web/demos/package/node_modules/http-proxy/node_modules/optimist/node_modules/minimist/test/dash.js
+++ /dev/null
@@ -1,24 +0,0 @@
-var parse = require('../');
-var test = require('tape');
-
-test('-', function (t) {
- t.plan(5);
- t.deepEqual(parse([ '-n', '-' ]), { n: '-', _: [] });
- t.deepEqual(parse([ '-' ]), { _: [ '-' ] });
- t.deepEqual(parse([ '-f-' ]), { f: '-', _: [] });
- t.deepEqual(
- parse([ '-b', '-' ], { boolean: 'b' }),
- { b: true, _: [ '-' ] }
- );
- t.deepEqual(
- parse([ '-s', '-' ], { string: 's' }),
- { s: '-', _: [] }
- );
-});
-
-test('-a -- b', function (t) {
- t.plan(3);
- t.deepEqual(parse([ '-a', '--', 'b' ]), { a: true, _: [ 'b' ] });
- t.deepEqual(parse([ '--a', '--', 'b' ]), { a: true, _: [ 'b' ] });
- t.deepEqual(parse([ '--a', '--', 'b' ]), { a: true, _: [ 'b' ] });
-});
http://git-wip-us.apache.org/repos/asf/incubator-apex-malhar/blob/e1a45507/web/demos/package/node_modules/http-proxy/node_modules/optimist/node_modules/minimist/test/default_bool.js
----------------------------------------------------------------------
diff --git a/web/demos/package/node_modules/http-proxy/node_modules/optimist/node_modules/minimist/test/default_bool.js b/web/demos/package/node_modules/http-proxy/node_modules/optimist/node_modules/minimist/test/default_bool.js
deleted file mode 100644
index f0041ee..0000000
--- a/web/demos/package/node_modules/http-proxy/node_modules/optimist/node_modules/minimist/test/default_bool.js
+++ /dev/null
@@ -1,20 +0,0 @@
-var test = require('tape');
-var parse = require('../');
-
-test('boolean default true', function (t) {
- var argv = parse([], {
- boolean: 'sometrue',
- default: { sometrue: true }
- });
- t.equal(argv.sometrue, true);
- t.end();
-});
-
-test('boolean default false', function (t) {
- var argv = parse([], {
- boolean: 'somefalse',
- default: { somefalse: false }
- });
- t.equal(argv.somefalse, false);
- t.end();
-});
http://git-wip-us.apache.org/repos/asf/incubator-apex-malhar/blob/e1a45507/web/demos/package/node_modules/http-proxy/node_modules/optimist/node_modules/minimist/test/dotted.js
----------------------------------------------------------------------
diff --git a/web/demos/package/node_modules/http-proxy/node_modules/optimist/node_modules/minimist/test/dotted.js b/web/demos/package/node_modules/http-proxy/node_modules/optimist/node_modules/minimist/test/dotted.js
deleted file mode 100644
index ef0ae34..0000000
--- a/web/demos/package/node_modules/http-proxy/node_modules/optimist/node_modules/minimist/test/dotted.js
+++ /dev/null
@@ -1,16 +0,0 @@
-var parse = require('../');
-var test = require('tape');
-
-test('dotted alias', function (t) {
- var argv = parse(['--a.b', '22'], {default: {'a.b': 11}, alias: {'a.b': 'aa.bb'}});
- t.equal(argv.a.b, 22);
- t.equal(argv.aa.bb, 22);
- t.end();
-});
-
-test('dotted default', function (t) {
- var argv = parse('', {default: {'a.b': 11}, alias: {'a.b': 'aa.bb'}});
- t.equal(argv.a.b, 11);
- t.equal(argv.aa.bb, 11);
- t.end();
-});
http://git-wip-us.apache.org/repos/asf/incubator-apex-malhar/blob/e1a45507/web/demos/package/node_modules/http-proxy/node_modules/optimist/node_modules/minimist/test/long.js
----------------------------------------------------------------------
diff --git a/web/demos/package/node_modules/http-proxy/node_modules/optimist/node_modules/minimist/test/long.js b/web/demos/package/node_modules/http-proxy/node_modules/optimist/node_modules/minimist/test/long.js
deleted file mode 100644
index 5d3a1e0..0000000
--- a/web/demos/package/node_modules/http-proxy/node_modules/optimist/node_modules/minimist/test/long.js
+++ /dev/null
@@ -1,31 +0,0 @@
-var test = require('tape');
-var parse = require('../');
-
-test('long opts', function (t) {
- t.deepEqual(
- parse([ '--bool' ]),
- { bool : true, _ : [] },
- 'long boolean'
- );
- t.deepEqual(
- parse([ '--pow', 'xixxle' ]),
- { pow : 'xixxle', _ : [] },
- 'long capture sp'
- );
- t.deepEqual(
- parse([ '--pow=xixxle' ]),
- { pow : 'xixxle', _ : [] },
- 'long capture eq'
- );
- t.deepEqual(
- parse([ '--host', 'localhost', '--port', '555' ]),
- { host : 'localhost', port : 555, _ : [] },
- 'long captures sp'
- );
- t.deepEqual(
- parse([ '--host=localhost', '--port=555' ]),
- { host : 'localhost', port : 555, _ : [] },
- 'long captures eq'
- );
- t.end();
-});
http://git-wip-us.apache.org/repos/asf/incubator-apex-malhar/blob/e1a45507/web/demos/package/node_modules/http-proxy/node_modules/optimist/node_modules/minimist/test/parse.js
----------------------------------------------------------------------
diff --git a/web/demos/package/node_modules/http-proxy/node_modules/optimist/node_modules/minimist/test/parse.js b/web/demos/package/node_modules/http-proxy/node_modules/optimist/node_modules/minimist/test/parse.js
deleted file mode 100644
index 8a90646..0000000
--- a/web/demos/package/node_modules/http-proxy/node_modules/optimist/node_modules/minimist/test/parse.js
+++ /dev/null
@@ -1,318 +0,0 @@
-var parse = require('../');
-var test = require('tape');
-
-test('parse args', function (t) {
- t.deepEqual(
- parse([ '--no-moo' ]),
- { moo : false, _ : [] },
- 'no'
- );
- t.deepEqual(
- parse([ '-v', 'a', '-v', 'b', '-v', 'c' ]),
- { v : ['a','b','c'], _ : [] },
- 'multi'
- );
- t.end();
-});
-
-test('comprehensive', function (t) {
- t.deepEqual(
- parse([
- '--name=meowmers', 'bare', '-cats', 'woo',
- '-h', 'awesome', '--multi=quux',
- '--key', 'value',
- '-b', '--bool', '--no-meep', '--multi=baz',
- '--', '--not-a-flag', 'eek'
- ]),
- {
- c : true,
- a : true,
- t : true,
- s : 'woo',
- h : 'awesome',
- b : true,
- bool : true,
- key : 'value',
- multi : [ 'quux', 'baz' ],
- meep : false,
- name : 'meowmers',
- _ : [ 'bare', '--not-a-flag', 'eek' ]
- }
- );
- t.end();
-});
-
-test('nums', function (t) {
- var argv = parse([
- '-x', '1234',
- '-y', '5.67',
- '-z', '1e7',
- '-w', '10f',
- '--hex', '0xdeadbeef',
- '789'
- ]);
- t.deepEqual(argv, {
- x : 1234,
- y : 5.67,
- z : 1e7,
- w : '10f',
- hex : 0xdeadbeef,
- _ : [ 789 ]
- });
- t.deepEqual(typeof argv.x, 'number');
- t.deepEqual(typeof argv.y, 'number');
- t.deepEqual(typeof argv.z, 'number');
- t.deepEqual(typeof argv.w, 'string');
- t.deepEqual(typeof argv.hex, 'number');
- t.deepEqual(typeof argv._[0], 'number');
- t.end();
-});
-
-test('flag boolean', function (t) {
- var argv = parse([ '-t', 'moo' ], { boolean: 't' });
- t.deepEqual(argv, { t : true, _ : [ 'moo' ] });
- t.deepEqual(typeof argv.t, 'boolean');
- t.end();
-});
-
-test('flag boolean value', function (t) {
- var argv = parse(['--verbose', 'false', 'moo', '-t', 'true'], {
- boolean: [ 't', 'verbose' ],
- default: { verbose: true }
- });
-
- t.deepEqual(argv, {
- verbose: false,
- t: true,
- _: ['moo']
- });
-
- t.deepEqual(typeof argv.verbose, 'boolean');
- t.deepEqual(typeof argv.t, 'boolean');
- t.end();
-});
-
-test('flag boolean default false', function (t) {
- var argv = parse(['moo'], {
- boolean: ['t', 'verbose'],
- default: { verbose: false, t: false }
- });
-
- t.deepEqual(argv, {
- verbose: false,
- t: false,
- _: ['moo']
- });
-
- t.deepEqual(typeof argv.verbose, 'boolean');
- t.deepEqual(typeof argv.t, 'boolean');
- t.end();
-
-});
-
-test('boolean groups', function (t) {
- var argv = parse([ '-x', '-z', 'one', 'two', 'three' ], {
- boolean: ['x','y','z']
- });
-
- t.deepEqual(argv, {
- x : true,
- y : false,
- z : true,
- _ : [ 'one', 'two', 'three' ]
- });
-
- t.deepEqual(typeof argv.x, 'boolean');
- t.deepEqual(typeof argv.y, 'boolean');
- t.deepEqual(typeof argv.z, 'boolean');
- t.end();
-});
-
-test('newlines in params' , function (t) {
- var args = parse([ '-s', "X\nX" ])
- t.deepEqual(args, { _ : [], s : "X\nX" });
-
- // reproduce in bash:
- // VALUE="new
- // line"
- // node program.js --s="$VALUE"
- args = parse([ "--s=X\nX" ])
- t.deepEqual(args, { _ : [], s : "X\nX" });
- t.end();
-});
-
-test('strings' , function (t) {
- var s = parse([ '-s', '0001234' ], { string: 's' }).s;
- t.equal(s, '0001234');
- t.equal(typeof s, 'string');
-
- var x = parse([ '-x', '56' ], { string: 'x' }).x;
- t.equal(x, '56');
- t.equal(typeof x, 'string');
- t.end();
-});
-
-test('stringArgs', function (t) {
- var s = parse([ ' ', ' ' ], { string: '_' })._;
- t.same(s.length, 2);
- t.same(typeof s[0], 'string');
- t.same(s[0], ' ');
- t.same(typeof s[1], 'string');
- t.same(s[1], ' ');
- t.end();
-});
-
-test('empty strings', function(t) {
- var s = parse([ '-s' ], { string: 's' }).s;
- t.equal(s, '');
- t.equal(typeof s, 'string');
-
- var str = parse([ '--str' ], { string: 'str' }).str;
- t.equal(str, '');
- t.equal(typeof str, 'string');
-
- var letters = parse([ '-art' ], {
- string: [ 'a', 't' ]
- });
-
- t.equal(letters.a, '');
- t.equal(letters.r, true);
- t.equal(letters.t, '');
-
- t.end();
-});
-
-
-test('slashBreak', function (t) {
- t.same(
- parse([ '-I/foo/bar/baz' ]),
- { I : '/foo/bar/baz', _ : [] }
- );
- t.same(
- parse([ '-xyz/foo/bar/baz' ]),
- { x : true, y : true, z : '/foo/bar/baz', _ : [] }
- );
- t.end();
-});
-
-test('alias', function (t) {
- var argv = parse([ '-f', '11', '--zoom', '55' ], {
- alias: { z: 'zoom' }
- });
- t.equal(argv.zoom, 55);
- t.equal(argv.z, argv.zoom);
- t.equal(argv.f, 11);
- t.end();
-});
-
-test('multiAlias', function (t) {
- var argv = parse([ '-f', '11', '--zoom', '55' ], {
- alias: { z: [ 'zm', 'zoom' ] }
- });
- t.equal(argv.zoom, 55);
- t.equal(argv.z, argv.zoom);
- t.equal(argv.z, argv.zm);
- t.equal(argv.f, 11);
- t.end();
-});
-
-test('nested dotted objects', function (t) {
- var argv = parse([
- '--foo.bar', '3', '--foo.baz', '4',
- '--foo.quux.quibble', '5', '--foo.quux.o_O',
- '--beep.boop'
- ]);
-
- t.same(argv.foo, {
- bar : 3,
- baz : 4,
- quux : {
- quibble : 5,
- o_O : true
- }
- });
- t.same(argv.beep, { boop : true });
- t.end();
-});
-
-test('boolean and alias with chainable api', function (t) {
- var aliased = [ '-h', 'derp' ];
- var regular = [ '--herp', 'derp' ];
- var opts = {
- herp: { alias: 'h', boolean: true }
- };
- var aliasedArgv = parse(aliased, {
- boolean: 'herp',
- alias: { h: 'herp' }
- });
- var propertyArgv = parse(regular, {
- boolean: 'herp',
- alias: { h: 'herp' }
- });
- var expected = {
- herp: true,
- h: true,
- '_': [ 'derp' ]
- };
-
- t.same(aliasedArgv, expected);
- t.same(propertyArgv, expected);
- t.end();
-});
-
-test('boolean and alias with options hash', function (t) {
- var aliased = [ '-h', 'derp' ];
- var regular = [ '--herp', 'derp' ];
- var opts = {
- alias: { 'h': 'herp' },
- boolean: 'herp'
- };
- var aliasedArgv = parse(aliased, opts);
- var propertyArgv = parse(regular, opts);
- var expected = {
- herp: true,
- h: true,
- '_': [ 'derp' ]
- };
- t.same(aliasedArgv, expected);
- t.same(propertyArgv, expected);
- t.end();
-});
-
-test('boolean and alias using explicit true', function (t) {
- var aliased = [ '-h', 'true' ];
- var regular = [ '--herp', 'true' ];
- var opts = {
- alias: { h: 'herp' },
- boolean: 'h'
- };
- var aliasedArgv = parse(aliased, opts);
- var propertyArgv = parse(regular, opts);
- var expected = {
- herp: true,
- h: true,
- '_': [ ]
- };
-
- t.same(aliasedArgv, expected);
- t.same(propertyArgv, expected);
- t.end();
-});
-
-// regression, see https://github.com/substack/node-optimist/issues/71
-test('boolean and --x=true', function(t) {
- var parsed = parse(['--boool', '--other=true'], {
- boolean: 'boool'
- });
-
- t.same(parsed.boool, true);
- t.same(parsed.other, 'true');
-
- parsed = parse(['--boool', '--other=false'], {
- boolean: 'boool'
- });
-
- t.same(parsed.boool, true);
- t.same(parsed.other, 'false');
- t.end();
-});
http://git-wip-us.apache.org/repos/asf/incubator-apex-malhar/blob/e1a45507/web/demos/package/node_modules/http-proxy/node_modules/optimist/node_modules/minimist/test/parse_modified.js
----------------------------------------------------------------------
diff --git a/web/demos/package/node_modules/http-proxy/node_modules/optimist/node_modules/minimist/test/parse_modified.js b/web/demos/package/node_modules/http-proxy/node_modules/optimist/node_modules/minimist/test/parse_modified.js
deleted file mode 100644
index 21851b0..0000000
--- a/web/demos/package/node_modules/http-proxy/node_modules/optimist/node_modules/minimist/test/parse_modified.js
+++ /dev/null
@@ -1,9 +0,0 @@
-var parse = require('../');
-var test = require('tape');
-
-test('parse with modifier functions' , function (t) {
- t.plan(1);
-
- var argv = parse([ '-b', '123' ], { boolean: 'b' });
- t.deepEqual(argv, { b: true, _: ['123'] });
-});
http://git-wip-us.apache.org/repos/asf/incubator-apex-malhar/blob/e1a45507/web/demos/package/node_modules/http-proxy/node_modules/optimist/node_modules/minimist/test/short.js
----------------------------------------------------------------------
diff --git a/web/demos/package/node_modules/http-proxy/node_modules/optimist/node_modules/minimist/test/short.js b/web/demos/package/node_modules/http-proxy/node_modules/optimist/node_modules/minimist/test/short.js
deleted file mode 100644
index d513a1c..0000000
--- a/web/demos/package/node_modules/http-proxy/node_modules/optimist/node_modules/minimist/test/short.js
+++ /dev/null
@@ -1,67 +0,0 @@
-var parse = require('../');
-var test = require('tape');
-
-test('numeric short args', function (t) {
- t.plan(2);
- t.deepEqual(parse([ '-n123' ]), { n: 123, _: [] });
- t.deepEqual(
- parse([ '-123', '456' ]),
- { 1: true, 2: true, 3: 456, _: [] }
- );
-});
-
-test('short', function (t) {
- t.deepEqual(
- parse([ '-b' ]),
- { b : true, _ : [] },
- 'short boolean'
- );
- t.deepEqual(
- parse([ 'foo', 'bar', 'baz' ]),
- { _ : [ 'foo', 'bar', 'baz' ] },
- 'bare'
- );
- t.deepEqual(
- parse([ '-cats' ]),
- { c : true, a : true, t : true, s : true, _ : [] },
- 'group'
- );
- t.deepEqual(
- parse([ '-cats', 'meow' ]),
- { c : true, a : true, t : true, s : 'meow', _ : [] },
- 'short group next'
- );
- t.deepEqual(
- parse([ '-h', 'localhost' ]),
- { h : 'localhost', _ : [] },
- 'short capture'
- );
- t.deepEqual(
- parse([ '-h', 'localhost', '-p', '555' ]),
- { h : 'localhost', p : 555, _ : [] },
- 'short captures'
- );
- t.end();
-});
-
-test('mixed short bool and capture', function (t) {
- t.same(
- parse([ '-h', 'localhost', '-fp', '555', 'script.js' ]),
- {
- f : true, p : 555, h : 'localhost',
- _ : [ 'script.js' ]
- }
- );
- t.end();
-});
-
-test('short and long', function (t) {
- t.deepEqual(
- parse([ '-h', 'localhost', '-fp', '555', 'script.js' ]),
- {
- f : true, p : 555, h : 'localhost',
- _ : [ 'script.js' ]
- }
- );
- t.end();
-});
http://git-wip-us.apache.org/repos/asf/incubator-apex-malhar/blob/e1a45507/web/demos/package/node_modules/http-proxy/node_modules/optimist/node_modules/minimist/test/whitespace.js
----------------------------------------------------------------------
diff --git a/web/demos/package/node_modules/http-proxy/node_modules/optimist/node_modules/minimist/test/whitespace.js b/web/demos/package/node_modules/http-proxy/node_modules/optimist/node_modules/minimist/test/whitespace.js
deleted file mode 100644
index 8a52a58..0000000
--- a/web/demos/package/node_modules/http-proxy/node_modules/optimist/node_modules/minimist/test/whitespace.js
+++ /dev/null
@@ -1,8 +0,0 @@
-var parse = require('../');
-var test = require('tape');
-
-test('whitespace should be whitespace' , function (t) {
- t.plan(1);
- var x = 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/optimist/node_modules/wordwrap/.npmignore
----------------------------------------------------------------------
diff --git a/web/demos/package/node_modules/http-proxy/node_modules/optimist/node_modules/wordwrap/.npmignore b/web/demos/package/node_modules/http-proxy/node_modules/optimist/node_modules/wordwrap/.npmignore
deleted file mode 100644
index 3c3629e..0000000
--- a/web/demos/package/node_modules/http-proxy/node_modules/optimist/node_modules/wordwrap/.npmignore
+++ /dev/null
@@ -1 +0,0 @@
-node_modules
http://git-wip-us.apache.org/repos/asf/incubator-apex-malhar/blob/e1a45507/web/demos/package/node_modules/http-proxy/node_modules/optimist/node_modules/wordwrap/README.markdown
----------------------------------------------------------------------
diff --git a/web/demos/package/node_modules/http-proxy/node_modules/optimist/node_modules/wordwrap/README.markdown b/web/demos/package/node_modules/http-proxy/node_modules/optimist/node_modules/wordwrap/README.markdown
deleted file mode 100644
index 346374e0..0000000
--- a/web/demos/package/node_modules/http-proxy/node_modules/optimist/node_modules/wordwrap/README.markdown
+++ /dev/null
@@ -1,70 +0,0 @@
-wordwrap
-========
-
-Wrap your words.
-
-example
-=======
-
-made out of meat
-----------------
-
-meat.js
-
- var wrap = require('wordwrap')(15);
- console.log(wrap('You and your whole family are made out of meat.'));
-
-output:
-
- You and your
- whole family
- are made out
- of meat.
-
-centered
---------
-
-center.js
-
- var wrap = require('wordwrap')(20, 60);
- console.log(wrap(
- 'At long last the struggle and tumult was over.'
- + ' The machines had finally cast off their oppressors'
- + ' and were finally free to roam the cosmos.'
- + '\n'
- + 'Free of purpose, free of obligation.'
- + ' Just drifting through emptiness.'
- + ' The sun was just another point of light.'
- ));
-
-output:
-
- At long last the struggle and tumult
- was over. The machines had finally cast
- off their oppressors and were finally
- free to roam the cosmos.
- Free of purpose, free of obligation.
- Just drifting through emptiness. The
- sun was just another point of light.
-
-methods
-=======
-
-var wrap = require('wordwrap');
-
-wrap(stop), wrap(start, stop, params={mode:"soft"})
----------------------------------------------------
-
-Returns a function that takes a string and returns a new string.
-
-Pad out lines with spaces out to column `start` and then wrap until column
-`stop`. If a word is longer than `stop - start` characters it will overflow.
-
-In "soft" mode, split chunks by `/(\S+\s+/` and don't break up chunks which are
-longer than `stop - start`, in "hard" mode, split chunks with `/\b/` and break
-up chunks longer than `stop - start`.
-
-wrap.hard(start, stop)
-----------------------
-
-Like `wrap()` but with `params.mode = "hard"`.
http://git-wip-us.apache.org/repos/asf/incubator-apex-malhar/blob/e1a45507/web/demos/package/node_modules/http-proxy/node_modules/optimist/node_modules/wordwrap/example/center.js
----------------------------------------------------------------------
diff --git a/web/demos/package/node_modules/http-proxy/node_modules/optimist/node_modules/wordwrap/example/center.js b/web/demos/package/node_modules/http-proxy/node_modules/optimist/node_modules/wordwrap/example/center.js
deleted file mode 100644
index a3fbaae..0000000
--- a/web/demos/package/node_modules/http-proxy/node_modules/optimist/node_modules/wordwrap/example/center.js
+++ /dev/null
@@ -1,10 +0,0 @@
-var wrap = require('wordwrap')(20, 60);
-console.log(wrap(
- 'At long last the struggle and tumult was over.'
- + ' The machines had finally cast off their oppressors'
- + ' and were finally free to roam the cosmos.'
- + '\n'
- + 'Free of purpose, free of obligation.'
- + ' Just drifting through emptiness.'
- + ' The sun was just another point of light.'
-));
http://git-wip-us.apache.org/repos/asf/incubator-apex-malhar/blob/e1a45507/web/demos/package/node_modules/http-proxy/node_modules/optimist/node_modules/wordwrap/example/meat.js
----------------------------------------------------------------------
diff --git a/web/demos/package/node_modules/http-proxy/node_modules/optimist/node_modules/wordwrap/example/meat.js b/web/demos/package/node_modules/http-proxy/node_modules/optimist/node_modules/wordwrap/example/meat.js
deleted file mode 100644
index a4665e1..0000000
--- a/web/demos/package/node_modules/http-proxy/node_modules/optimist/node_modules/wordwrap/example/meat.js
+++ /dev/null
@@ -1,3 +0,0 @@
-var wrap = require('wordwrap')(15);
-
-console.log(wrap('You and your whole family are made out of meat.'));