Retooled site in React and React-router. Whole new world.
This commit is contained in:
parent
4c546ac9b6
commit
c0b6a197d5
13
.editorconfig
Normal file
13
.editorconfig
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
# http://editorconfig.org
|
||||||
|
root = true
|
||||||
|
|
||||||
|
[*]
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 2
|
||||||
|
end_of_line = lf
|
||||||
|
charset = utf-8
|
||||||
|
trim_trailing_whitespace = true
|
||||||
|
insert_final_newline = true
|
||||||
|
|
||||||
|
[*.md]
|
||||||
|
trim_trailing_whitespace = false
|
17
.jshintrc
Normal file
17
.jshintrc
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
{
|
||||||
|
"node": true,
|
||||||
|
"esnext": true,
|
||||||
|
"bitwise": true,
|
||||||
|
"camelcase": true,
|
||||||
|
"curly": true,
|
||||||
|
"eqeqeq": true,
|
||||||
|
"immed": true,
|
||||||
|
"indent": 2,
|
||||||
|
"latedef": true,
|
||||||
|
"newcap": true,
|
||||||
|
"noarg": true,
|
||||||
|
"quotmark": "single",
|
||||||
|
"undef": true,
|
||||||
|
"unused": true,
|
||||||
|
"strict": true
|
||||||
|
}
|
Binary file not shown.
Before Width: | Height: | Size: 1.7 KiB |
BIN
images/me.jpg
BIN
images/me.jpg
Binary file not shown.
Before Width: | Height: | Size: 44 KiB |
288
index.html
288
index.html
@ -1,288 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html lang="en">
|
|
||||||
<head>
|
|
||||||
<title>Vertinext - Charles Click</title>
|
|
||||||
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
|
|
||||||
<link type="text/css" rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.1/css/materialize.min.css" media="screen,projection"/>
|
|
||||||
<link type="text/css" rel="stylesheet" href="https://cdn.rawgit.com/konpa/devicon/89f2f44ba07ea3fff7e561c2142813b278c2d6c6/devicon.min.css">
|
|
||||||
<link href="http://www.vertinext.com" rel="canonical">
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
|
||||||
<meta name="google-site-verification" content="FW6N6eQoOr6Tc6m7knz7Ls4w9J4-7Y_kVXSTpiU_rQ8" />
|
|
||||||
<meta name="description" content="Personal site of Charles Click Cataloging coding exploits" />
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<!-- Navbar -->
|
|
||||||
<nav>
|
|
||||||
<div class="nav-wrapper z-depth-0">
|
|
||||||
<a href="#" class="brand-logo center">Vertinext</a>
|
|
||||||
<ul id="rss" class="right">
|
|
||||||
<li><a href="https://github.com/ccubed.atom" alt="Github RSS Feed"><i class="material-icons" alt="RSS Icon for Github Link">leak_add</i></a></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</nav>
|
|
||||||
<br />
|
|
||||||
<div class="container">
|
|
||||||
<div class="row">
|
|
||||||
<div class="col s12">
|
|
||||||
<ul class="collection z-depth-2">
|
|
||||||
<li class="collection-item avatar">
|
|
||||||
<img src="images/me.jpg" alt="Cooper Click" class="circle">
|
|
||||||
<span class="title"><h1>Charles Click</h1></span>
|
|
||||||
<p>I am a coder and web host in Knoxville, TN that uses github for side projects in various languages. Feel free to view my github repos and website portfolio.</p>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
<ul class="collection with-header z-depth-1">
|
|
||||||
<li class="collection-header center"><h4>Website Portfolio</h4> <br/> All self hosted</li>
|
|
||||||
<a href="http://www.vertinext.com" class="collection-item active">Vertinext</a>
|
|
||||||
<a href="http://kingsmouth.vertinext.com" class="collection-item">Kingsmouth Website</a>
|
|
||||||
<a href="http://bti.vertinext.com" class="collection-item">BTI Mush Website</a>
|
|
||||||
<a href="http://safehaven.vertinext.com" class="collection-item">Safehaven Website</a>
|
|
||||||
</ul>
|
|
||||||
<ul class="collection with-header z-depth-1">
|
|
||||||
<li class="collection-header center"><h4>Github Repositories</h4></li>
|
|
||||||
<li class="collection-item avatar">
|
|
||||||
<i class="material-icons circle">web</i>
|
|
||||||
<span class="title">Vertinext</span>
|
|
||||||
<p style="width:85%">Git repository for this website's source.</p> <br/>
|
|
||||||
<div class="center">
|
|
||||||
<i class="devicon-html5-plain-wordmark colored medium" alt="HTML5 Icon"></i>
|
|
||||||
<i class="devicon-css3-plain-wordmark colored medium" alt="CSS3 Icon"></i>
|
|
||||||
</div>
|
|
||||||
<a href="https://github.com/ccubed/Vertinext" class="secondary-content" alt="Github Repo for this site"><img src="images/GithubMark.png" alt="Github Logo"></img></a>
|
|
||||||
</li>
|
|
||||||
<li class="collection-item avatar">
|
|
||||||
<i class="material-icons circle">edit</i>
|
|
||||||
<span class="title">MuDocker</span>
|
|
||||||
<p style="width:85%">Docker scripts for various types of text based game servers with SQL support.</p>
|
|
||||||
<div class="center">
|
|
||||||
<i class="devicon-docker-plain-wordmark colored medium" alt="Docker Icon"></i>
|
|
||||||
</div>
|
|
||||||
<a href="https://github.com/ccubed/MuDocker" class="secondary-content" alt="MuDocker Github Repo"><img src="images/GithubMark.png" alt="Github Logo"></img></a>
|
|
||||||
</li>
|
|
||||||
<li class="collection-item avatar">
|
|
||||||
<i class="material-icons circle">code</i>
|
|
||||||
<span class="title">ReadyMu</span>
|
|
||||||
<p style="width:85%">Softcode code suite for running a text based game.</p>
|
|
||||||
<div class="center">
|
|
||||||
<i class="devicon-mysql-plain-wordmark colored medium" alt="MySQL Icon"></i>
|
|
||||||
</div>
|
|
||||||
<a href="https://github.com/ccubed/ReadyMu" class="secondary-content" alt="ReadyMu Github Repo"><img src="images/GithubMark.png" alt="Github Logo"></img></a>
|
|
||||||
</li>
|
|
||||||
<li class="collection-item avatar">
|
|
||||||
<i class="material-icons circle">code</i>
|
|
||||||
<span class="title">Mu2</span>
|
|
||||||
<p style="width:85%">Systems built for Pennmush mushcode that pushes data into a database.</p> <br/>
|
|
||||||
<div class="center">
|
|
||||||
<i class="devicon-mysql-plain-wordmark colored medium" alt="MySQL Icon"></i>
|
|
||||||
</div>
|
|
||||||
<a href="https://github.com/ccubed/Mu2" class="secondary-content" alt="Mu2 Github Repo"><img src="images/GithubMark.png" alt="Github Logo"></img></a>
|
|
||||||
</li>
|
|
||||||
<li class="collection-item avatar">
|
|
||||||
<i class="material-icons circle">code</i>
|
|
||||||
<span class="title">BTI</span>
|
|
||||||
<p style="width:85%">Repository for all code relating to Bereman Training Institute, a mush.</p> <br/>
|
|
||||||
<div class="center">
|
|
||||||
<i class="devicon-mysql-plain-wordmark colored medium" alt="MySQL Icon"></i>
|
|
||||||
</div>
|
|
||||||
<a href="https://github.com/ccubed/BTI" class="secondary-content" alt="BTI Github Repo"><img src="images/GithubMark.png" alt="Github Logo"></img></a>
|
|
||||||
</li>
|
|
||||||
<li class="collection-item avatar">
|
|
||||||
<i class="material-icons circle">edit</i>
|
|
||||||
<span class="title">language-mushcode</span>
|
|
||||||
<p style="width:85%">Mushcode language definition for the Atom Editor.</p> <br/>
|
|
||||||
<div class="center">
|
|
||||||
<i class="devicon-atom-original colored medium" alt="Atom Editor Icon"></i>
|
|
||||||
</div>
|
|
||||||
<a href="https://github.com/ccubed/language-mushcode" class="secondary-content" alt="language mushcode Github Repo"><img src="images/GithubMark.png" alt="Github Logo"></img></a>
|
|
||||||
</li>
|
|
||||||
<li class="collection-item avatar">
|
|
||||||
<i class="material-icons circle">code</i>
|
|
||||||
<span class="title">Requiem for Kingsmouth</span>
|
|
||||||
<p style="width:85%">Large collaborative project to maintain a large amount of softcode for a mush called Requiem for Kingsmouth.</p> <br/>
|
|
||||||
<div class="center">
|
|
||||||
<i class="devicon-mysql-plain-wordmark colored medium" alt="MySQL Icon"></i>
|
|
||||||
</div>
|
|
||||||
<a href="https://github.com/ccubed/RFK" class="secondary-content" alt="Requiem for kingsmouth Github Repo"><img src="images/GithubMark.png" alt="Github Logo"></img></a>
|
|
||||||
</li>
|
|
||||||
<li class="collection-item avatar">
|
|
||||||
<i class="material-icons circle">code</i>
|
|
||||||
<span class="title">Requiem for Kingsmouth Website</span>
|
|
||||||
<p style="width:85%">Integrated a website into the Requiem for Kingsmouth game database to allow web based interactions.</p> <br/>
|
|
||||||
<div class="center">
|
|
||||||
<i class="devicon-html5-plain-wordmark colored medium" alt="HTML5 Icon"></i>
|
|
||||||
<i class="devicon-css3-plain-wordmark colored medium" alt="CSS3 Icon"></i>
|
|
||||||
</div>
|
|
||||||
<a href="https://github.com/ccubed/RFKWeb" class="secondary-content" alt="RFK Website Github Repo"><img src="images/GithubMark.png" alt="Github Logo"></img></a>
|
|
||||||
</li>
|
|
||||||
<li class="collection-item avatar">
|
|
||||||
<i class="material-icons circle">code</i>
|
|
||||||
<span class="title">UGS</span>
|
|
||||||
<p style="width:85%">Mushcode project to achieve a series of universal systems for character sheets, character generation and inventory.</p> <br/>
|
|
||||||
<a href="https://github.com/ccubed/UGS" class="secondary-content" alt="UGS Github Repo"><img src="images/GithubMark.png" alt="Github Logo"></img></a>
|
|
||||||
</li>
|
|
||||||
<li class="collection-item avatar">
|
|
||||||
<i class="material-icons circle">code</i>
|
|
||||||
<span class="title">Chevon</span>
|
|
||||||
<p style="width:85%">VB.NET Interface to the Voat.co API. Development stopped.</p> <br/>
|
|
||||||
<a href="https://github.com/ccubed/Chevon" class="secondary-content" alt="Chevon Github Repo"><img src="images/GithubMark.png" alt="Github Logo"></img></a>
|
|
||||||
</li>
|
|
||||||
<li class="collection-item avatar">
|
|
||||||
<i class="material-icons circle">code</i>
|
|
||||||
<span class="title">Reach</span>
|
|
||||||
<p style="width:85%">Code for The Reach, a now closed Mush.</p> <br/>
|
|
||||||
<a href="https://github.com/ccubed/Reach" class="secondary-content" alt="Reach Github Repo"><img src="images/GithubMark.png" alt="Github Logo"></img></a>
|
|
||||||
</li>
|
|
||||||
<li class="collection-item avatar">
|
|
||||||
<i class="material-icons circle">code</i>
|
|
||||||
<span class="title">SWFoteCustom</span>
|
|
||||||
<p style="width:85%">Custom version of the SW Fote mud Codebase called Sagas.</p> <br/>
|
|
||||||
<div class="center">
|
|
||||||
<i class="devicon-c-plain colored medium" alt="C Icon"></i>
|
|
||||||
</div>
|
|
||||||
<a href="https://github.com/ccubed/SWFoteCustom" class="secondary-content" alt="SWFoteCustom Github Repo"><img src="images/GithubMark.png" alt="Github Logo"></img></a>
|
|
||||||
</li>
|
|
||||||
<li class="collection-item avatar">
|
|
||||||
<i class="material-icons circle">code</i>
|
|
||||||
<span class="title">SWRCustom</span>
|
|
||||||
<p style="width:85%">Custom version of the Star Wars Reality mud Codebase.</p> <br/>
|
|
||||||
<div class="center">
|
|
||||||
<i class="devicon-c-plain colored medium" alt="C Icon"></i>
|
|
||||||
</div>
|
|
||||||
<a href="https://github.com/ccubed/SWRCustom" class="secondary-content" alt="SWRCustom Github Repo"><img src="images/GithubMark.png" alt="Github Logo"></img></a>
|
|
||||||
</li>
|
|
||||||
<li class="collection-item avatar">
|
|
||||||
<i class="material-icons circle">code</i>
|
|
||||||
<span class="title">War</span>
|
|
||||||
<p style="width:85%">Mushcode system for tracking warring nations. Meant for a Romance of the Three Kingdoms mush I never built.</p> <br/>
|
|
||||||
<a href="https://github.com/ccubed/War" class="secondary-content" alt="War Github Repo"><img src="images/GithubMark.png" alt="Github Logo"></img></a>
|
|
||||||
</li>
|
|
||||||
<li class="collection-item avatar">
|
|
||||||
<i class="material-icons circle">code</i>
|
|
||||||
<span class="title">Roguelike</span>
|
|
||||||
<p style="width:85%">C++ Library for creating Roguelike games.</p> <br/>
|
|
||||||
<div class="center">
|
|
||||||
<i class="devicon-cplusplus-plain colored medium" alt="C++ Icon"></i>
|
|
||||||
</div>
|
|
||||||
<a href="https://github.com/ccubed/Roguelike" class="secondary-content" alt="Roguelike Github Repo"><img src="images/GithubMark.png" alt="Github Logo"></img></a>
|
|
||||||
</li>
|
|
||||||
<li class="collection-item avatar">
|
|
||||||
<i class="material-icons circle">view_module</i>
|
|
||||||
<span class="title">LOTJMushclientPlugins</span>
|
|
||||||
<p style="width:85%">Collection of Lua plugins for Legends of the Jedi Mud.</p> <br/>
|
|
||||||
<a href="https://github.com/ccubed/LOTJMushclientPlugins" class="secondary-content" alt="LOTJ Plugins Github Repo"><img src="images/GithubMark.png" alt="Github Logo"></img></a>
|
|
||||||
</li>
|
|
||||||
<li class="collection-item avatar">
|
|
||||||
<i class="material-icons circle">edit</i>
|
|
||||||
<span class="title">MIDE</span>
|
|
||||||
<p style="width:85%">Mushcode Editor written in C++ with QT. Not finished.</p> <br/>
|
|
||||||
<div class="center">
|
|
||||||
<i class="devicon-cplusplus-plain colored medium" alt="C++ Icon"></i>
|
|
||||||
</div>
|
|
||||||
<a href="https://github.com/ccubed/MIDE" class="secondary-content" alt="MIDE Github Repo"><img src="images/GithubMark.png" alt="Github Logo"></img></a>
|
|
||||||
</li>
|
|
||||||
<li class="collection-item avatar">
|
|
||||||
<i class="material-icons circle">code</i>
|
|
||||||
<span class="title">WS2Wrapper</span>
|
|
||||||
<p style="width:85%">C++ Wrapper for WinSock2.</p> <br/>
|
|
||||||
<div class="center">
|
|
||||||
<i class="devicon-cplusplus-plain colored medium" alt="C++ Icon"></i>
|
|
||||||
</div>
|
|
||||||
<a href="https://github.com/ccubed/WS2Wrapper" class="secondary-content" alt="Winsock2 Wrapper Github Repo"><img src="images/GithubMark.png" alt="Github Logo"></img></a>
|
|
||||||
</li>
|
|
||||||
<li class="collection-item avatar">
|
|
||||||
<i class="material-icons circle">web</i>
|
|
||||||
<span class="title">MorningStar</span>
|
|
||||||
<p style="width:85%">Simple login script to protect a calendar for Morning Star in Knoxville, TN.</p> <br/>
|
|
||||||
<div class="center">
|
|
||||||
<i class="devicon-php-plain colored medium" alt="PHP Icon"></i>
|
|
||||||
</div>
|
|
||||||
<a href="https://github.com/ccubed/MorningStar" class="secondary-content" alt="Morning star Github Repo"><img src="images/GithubMark.png" alt="Github Logo"></img></a>
|
|
||||||
</li>
|
|
||||||
<li class="collection-item avatar">
|
|
||||||
<i class="material-icons circle">code</i>
|
|
||||||
<span class="title">IniWrapper</span>
|
|
||||||
<p style="width:85%">C++ Wrapper for reading INI Files.</p> <br/>
|
|
||||||
<div class="center">
|
|
||||||
<i class="devicon-cplusplus-plain colored medium" alt="C++ Icon"></i>
|
|
||||||
</div>
|
|
||||||
<a href="https://github.com/ccubed/IniWrapper" class="secondary-content" alt="INI Wrapper Github Repo"><img src="images/GithubMark.png" alt="Github Logo"></img></a>
|
|
||||||
</li>
|
|
||||||
<li class="collection-item avatar">
|
|
||||||
<i class="material-icons circle">code</i>
|
|
||||||
<span class="title">MushBot</span>
|
|
||||||
<p style="width:85%">C++ bot for logging into mushes and executing commands.<br/>Never started.</p> <br/>
|
|
||||||
<div class="center">
|
|
||||||
<i class="devicon-cplusplus-plain colored medium" alt="C++ Icon"></i>
|
|
||||||
</div>
|
|
||||||
<a href="https://github.com/ccubed/MushBot" class="secondary-content" alt="Mush Bot Github Repo"><img src="images/GithubMark.png" alt="Github Logo"></img></a>
|
|
||||||
</li>
|
|
||||||
<li class="collection-item avatar">
|
|
||||||
<i class="material-icons circle">code</i>
|
|
||||||
<span class="title">Skins of Steel</span>
|
|
||||||
<p style="width:85%">VB.NET Program to build a machine based on a rule set for the Exalted table top series presented on the forums.</p> <br/>
|
|
||||||
<a href="https://github.com/ccubed/SkinsofSteel" class="secondary-content" alt="Skins of Steel Github Repo"><img src="images/GithubMark.png" alt="Github Logo"></img></a>
|
|
||||||
</li>
|
|
||||||
<li class="collection-item avatar">
|
|
||||||
<i class="material-icons circle">code</i>
|
|
||||||
<span class="title">BusinessDirectory</span>
|
|
||||||
<p style="width:85%">Javascript business directory for Morgan County TN Website.</p> <br/>
|
|
||||||
<div class="center">
|
|
||||||
<i class="devicon-javascript-plain colored medium" alt="Javascript Icon"></i>
|
|
||||||
</div>
|
|
||||||
<a href="https://github.com/ccubed/BusinessDirectory" class="secondary-content" alt="Business Directory Github Repo"><img src="images/GithubMark.png" alt="Github Logo"></img></a>
|
|
||||||
</li>
|
|
||||||
<li class="collection-item avatar">
|
|
||||||
<i class="material-icons circle">code</i>
|
|
||||||
<span class="title">FileComparison</span>
|
|
||||||
<p style="width:85%">Python script to compare directories.</p> <br/>
|
|
||||||
<div class="center">
|
|
||||||
<i class="devicon-python-plain colored medium" alt="Python Icon"></i>
|
|
||||||
</div>
|
|
||||||
<a href="https://github.com/ccubed/FileComparison" class="secondary-content" alt="File Comparison Github Repo"><img src="images/GithubMark.png" alt="Github Logo"></img></a>
|
|
||||||
</li>
|
|
||||||
<li class="collection-item avatar">
|
|
||||||
<i class="material-icons circle">code</i>
|
|
||||||
<span class="title">EmpireCity</span>
|
|
||||||
<p style="width:85%">Old MushCode CG for New World of Darkness Mush that I wrote.</p> <br/>
|
|
||||||
<a href="https://github.com/ccubed/EmpireCity" class="secondary-content" alt="Empire city Github Repo"><img src="images/GithubMark.png" alt="Github Logo"></img></a>
|
|
||||||
</li>
|
|
||||||
<li class="collection-item avatar">
|
|
||||||
<i class="material-icons circle">code</i>
|
|
||||||
<span class="title">AutoExtracter</span>
|
|
||||||
<p style="width:85%">Python script to auto-extract a directory of compressed files using 7zip command line.</p> <br/>
|
|
||||||
<div class="center">
|
|
||||||
<i class="devicon-python-plain colored medium" alt="Python Icon"></i>
|
|
||||||
</div>
|
|
||||||
<a href="https://github.com/ccubed/AutoExtracter" class="secondary-content" alt="Auto Extracter Github Repo"><img src="images/GithubMark.png" alt="Github Logo"></img></a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<footer class="page-footer">
|
|
||||||
<div class="container">
|
|
||||||
<div class="row">
|
|
||||||
<div class="col s6">
|
|
||||||
<h5 class="white-text">Made and Hosted by Cooper Click</h5>
|
|
||||||
<p class="grey-text text-lighten-4">Using Materialize.CSS, Devicon and Google's Material Icons. Also a nudge to Github for being great.</p>
|
|
||||||
</div>
|
|
||||||
<div class="col s6">
|
|
||||||
<div class="collection">
|
|
||||||
<a href="http://materializecss.com" class="collection-item">Materialize.CSS</a>
|
|
||||||
<a href="http://devicon.fr" class="collection-item">Devicon 2.0 Icons</a>
|
|
||||||
<a href="https://design.google.com/" class="collection-item">Google Material Design Resources</a>
|
|
||||||
<a href="https://github.com/" class="collection-item">Github</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</footer>
|
|
||||||
|
|
||||||
<script type="text/javascript" src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
|
|
||||||
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.1/js/materialize.min.js"></script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
87
npm-debug.log
Normal file
87
npm-debug.log
Normal file
@ -0,0 +1,87 @@
|
|||||||
|
0 info it worked if it ends with ok
|
||||||
|
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'install', 'fsevents' ]
|
||||||
|
2 info using npm@3.7.2
|
||||||
|
3 info using node@v5.6.0
|
||||||
|
4 silly loadCurrentTree Starting
|
||||||
|
5 silly install loadCurrentTree
|
||||||
|
6 silly install readLocalPackageData
|
||||||
|
7 silly fetchPackageMetaData fsevents
|
||||||
|
8 silly fetchNamedPackageData fsevents
|
||||||
|
9 silly mapToRegistry name fsevents
|
||||||
|
10 silly mapToRegistry using default registry
|
||||||
|
11 silly mapToRegistry registry https://registry.npmjs.org/
|
||||||
|
12 silly mapToRegistry uri https://registry.npmjs.org/fsevents
|
||||||
|
13 verbose request uri https://registry.npmjs.org/fsevents
|
||||||
|
14 verbose request no auth needed
|
||||||
|
15 info attempt registry request try #1 at 3:35:52 PM
|
||||||
|
16 verbose request id a47b3aa7217ba0e0
|
||||||
|
17 verbose etag "D9PC4PL08KP2KF4WZ96D0QN5T"
|
||||||
|
18 http request GET https://registry.npmjs.org/fsevents
|
||||||
|
19 http 304 https://registry.npmjs.org/fsevents
|
||||||
|
20 verbose headers { date: 'Sun, 21 Feb 2016 20:35:52 GMT',
|
||||||
|
20 verbose headers via: '1.1 varnish',
|
||||||
|
20 verbose headers 'cache-control': 'max-age=300',
|
||||||
|
20 verbose headers etag: '"D9PC4PL08KP2KF4WZ96D0QN5T"',
|
||||||
|
20 verbose headers age: '152',
|
||||||
|
20 verbose headers connection: 'keep-alive',
|
||||||
|
20 verbose headers 'x-served-by': 'cache-iad2135-IAD',
|
||||||
|
20 verbose headers 'x-cache': 'HIT',
|
||||||
|
20 verbose headers 'x-cache-hits': '8',
|
||||||
|
20 verbose headers 'x-timer': 'S1456086952.842252,VS0,VE0',
|
||||||
|
20 verbose headers vary: 'Accept' }
|
||||||
|
21 silly get cb [ 304,
|
||||||
|
21 silly get { date: 'Sun, 21 Feb 2016 20:35:52 GMT',
|
||||||
|
21 silly get via: '1.1 varnish',
|
||||||
|
21 silly get 'cache-control': 'max-age=300',
|
||||||
|
21 silly get etag: '"D9PC4PL08KP2KF4WZ96D0QN5T"',
|
||||||
|
21 silly get age: '152',
|
||||||
|
21 silly get connection: 'keep-alive',
|
||||||
|
21 silly get 'x-served-by': 'cache-iad2135-IAD',
|
||||||
|
21 silly get 'x-cache': 'HIT',
|
||||||
|
21 silly get 'x-cache-hits': '8',
|
||||||
|
21 silly get 'x-timer': 'S1456086952.842252,VS0,VE0',
|
||||||
|
21 silly get vary: 'Accept' } ]
|
||||||
|
22 verbose etag https://registry.npmjs.org/fsevents from cache
|
||||||
|
23 verbose get saving fsevents to /home/hestia/.npm/registry.npmjs.org/fsevents/.cache.json
|
||||||
|
24 verbose correctMkdir /home/hestia/.npm correctMkdir not in flight; initializing
|
||||||
|
25 silly install normalizeTree
|
||||||
|
26 silly loadCurrentTree Finishing
|
||||||
|
27 silly loadIdealTree Starting
|
||||||
|
28 silly install loadIdealTree
|
||||||
|
29 silly cloneCurrentTree Starting
|
||||||
|
30 silly install cloneCurrentTreeToIdealTree
|
||||||
|
31 silly cloneCurrentTree Finishing
|
||||||
|
32 silly loadShrinkwrap Starting
|
||||||
|
33 silly install loadShrinkwrap
|
||||||
|
34 silly loadShrinkwrap Finishing
|
||||||
|
35 silly loadAllDepsIntoIdealTree Starting
|
||||||
|
36 silly install loadAllDepsIntoIdealTree
|
||||||
|
37 silly rollbackFailedOptional Starting
|
||||||
|
38 silly rollbackFailedOptional Finishing
|
||||||
|
39 silly runTopLevelLifecycles Starting
|
||||||
|
40 silly runTopLevelLifecycles Finishing
|
||||||
|
41 silly install printInstalled
|
||||||
|
42 verbose stack Error: Unsupported platform for fsevents@1.0.7: wanted {"name":"fsevents","version":"1.0.7","description":"Native Access to Mac OS-X FSEvents","main":"fsevents.js","dependencies":{"nan":"^2.1.0","node-pre-gyp":"^0.6.19"},"os":["darwin"],"engines":{"node":">=0.8.0"},"scripts":{"install":"node-pre-gyp install --fallback-to-build","prepublish":"if [ $(npm -v | head -c 1) -lt 3 ]; then exit 1; fi && npm dedupe","test":"tap ./test"},"binary":{"module_name":"fse","module_path":"./lib/binding/{configuration}/{node_abi}-{platform}-{arch}/","remote_path":"./v{version}/","package_name":"{module_name}-v{version}-{node_abi}-{platform}-{arch}.tar.gz","host":"https://fsevents-binaries.s3-us-west-2.amazonaws.com"},"repository":{"type":"git","url":"git+https://github.com/strongloop/fsevents.git"},"keywords":["fsevents","mac"],"author":{"name":"Philipp Dunkel","email":"pip@pipobscure.com"},"license":"MIT","bugs":{"url":"https://github.com/strongloop/fsevents/issues"},"homepage":"https://github.com/strongloop/fsevents","devDependencies":{"tap":"~0.4.8"},"gitHead":"012302f8468f59e78b49bd7009bc539a9955fa3b","bundleDependencies":["node-pre-gyp"],"_id":"fsevents@1.0.7","_npmVersion":"3.3.6","_nodeVersion":"5.0.0","_npmUser":{"name":"es128","email":"elan.shanker+npm@gmail.com"},"dist":{"shasum":"2d90585bbcac9ff535ff1a1a94b04ebb5080858f","tarball":"http://registry.npmjs.org/fsevents/-/fsevents-1.0.7.tgz"},"maintainers":[{"name":"bajtos","email":"miro.bajtos@gmail.com"},{"name":"bnoordhuis","email":"info@bnoordhuis.nl"},{"name":"es128","email":"elan.shanker+npm@gmail.com"},{"name":"pipobscure","email":"pip@pipobscure.com"},{"name":"strongloop","email":"callback@strongloop.com"}],"_npmOperationalInternal":{"host":"packages-6-west.internal.npmjs.com","tmp":"tmp/fsevents-1.0.7.tgz_1454512352801_0.3029270030092448"},"directories":{},"_requested":{"raw":"fsevents","scope":null,"name":"fsevents","rawSpec":"","spec":"latest","type":"tag"},"_spec":"fsevents","_where":"/media/Github/Vertinext2","_args":[["fsevents","/media/Github/Vertinext2"]],"readme":"ERROR: No README data found!"} (current: {"os":"linux","cpu":"x64"})
|
||||||
|
42 verbose stack at checkPlatform (/usr/lib/node_modules/npm/node_modules/npm-install-checks/index.js:45:14)
|
||||||
|
42 verbose stack at thenWarnEngineIssues (/usr/lib/node_modules/npm/lib/install/validate-args.js:41:5)
|
||||||
|
42 verbose stack at /usr/lib/node_modules/npm/node_modules/iferr/index.js:13:50
|
||||||
|
42 verbose stack at checkEngine (/usr/lib/node_modules/npm/node_modules/npm-install-checks/index.js:24:10)
|
||||||
|
42 verbose stack at module.exports.isInstallable (/usr/lib/node_modules/npm/lib/install/validate-args.js:38:3)
|
||||||
|
42 verbose stack at Array.<anonymous> (/usr/lib/node_modules/npm/node_modules/slide/lib/bind-actor.js:15:8)
|
||||||
|
42 verbose stack at LOOP (/usr/lib/node_modules/npm/node_modules/slide/lib/chain.js:15:14)
|
||||||
|
42 verbose stack at /usr/lib/node_modules/npm/node_modules/slide/lib/chain.js:18:7
|
||||||
|
42 verbose stack at checkSelf (/usr/lib/node_modules/npm/lib/install/validate-args.js:46:72)
|
||||||
|
42 verbose stack at Array.<anonymous> (/usr/lib/node_modules/npm/node_modules/slide/lib/bind-actor.js:15:8)
|
||||||
|
43 verbose pkgid fsevents@1.0.7
|
||||||
|
44 verbose cwd /media/Github/Vertinext2
|
||||||
|
45 error Linux 4.4.1-2-ARCH
|
||||||
|
46 error argv "/usr/bin/node" "/usr/bin/npm" "install" "fsevents"
|
||||||
|
47 error node v5.6.0
|
||||||
|
48 error npm v3.7.2
|
||||||
|
49 error code EBADPLATFORM
|
||||||
|
50 error notsup Not compatible with your operating system or architecture: fsevents@1.0.7
|
||||||
|
51 error notsup Valid OS: darwin
|
||||||
|
51 error notsup Valid Arch: any
|
||||||
|
51 error notsup Actual OS: linux
|
||||||
|
51 error notsup Actual Arch: x64
|
||||||
|
52 verbose exit [ 1, true ]
|
36
src/App/Components/GitItem.js
Normal file
36
src/App/Components/GitItem.js
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
import React from 'react';
|
||||||
|
import Spinner from 'react-spinkit';
|
||||||
|
|
||||||
|
class Gititem extends React.Component {
|
||||||
|
|
||||||
|
constructor(props){
|
||||||
|
|
||||||
|
super();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
render() {
|
||||||
|
|
||||||
|
var repoNodes = [];
|
||||||
|
|
||||||
|
if( this.props.data.length > 0 ){
|
||||||
|
|
||||||
|
this.props.data.forEach(function(repo){
|
||||||
|
|
||||||
|
repoNodes.push(<li className="collection-item avatar">
|
||||||
|
<img className="circle" src={repo.owner.avatar_url} alt={repo.owner.login}></img>
|
||||||
|
<span className="title"><a href={repo.html_url}>{repo.name}</a></span>
|
||||||
|
<p>{repo.description ? repo.description : "No description given."}</p>
|
||||||
|
<a href={repo.forks_url} className="secondary-content"><i className="fa fa-code-fork fa-2x"></i></a>
|
||||||
|
</li>);
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return repoNodes.length > 0 ? (<ul className="collection">{repoNodes}</ul>) : (<Spinner spinnerName='three-bounce' />);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = Gititem;
|
42
src/App/Components/GitListing.js
Normal file
42
src/App/Components/GitListing.js
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
import React from 'react';
|
||||||
|
import GitItem from './GitItem';
|
||||||
|
|
||||||
|
class GitListing extends React.Component {
|
||||||
|
|
||||||
|
constructor(props){
|
||||||
|
|
||||||
|
super(props);
|
||||||
|
this.state = {data: []};
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
loadGitRepos(){
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
url: "https://api.github.com/users/ccubed/repos",
|
||||||
|
dataType: 'json',
|
||||||
|
success: (data) =>{
|
||||||
|
this.setState({data: data});
|
||||||
|
},
|
||||||
|
error: (xhr, status, err) => {
|
||||||
|
console.error("api.github.com", status, err.toString());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
componentDidMount(){
|
||||||
|
|
||||||
|
this.loadGitRepos();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
render(){
|
||||||
|
|
||||||
|
return (<div className="container"><div className="row"><div className="col s6 m12"><GitItem data={this.state.data} /></div></div></div>)
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = GitListing;
|
49
src/App/Components/HostLists.js
Normal file
49
src/App/Components/HostLists.js
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
import React from 'react';
|
||||||
|
|
||||||
|
class HostLists extends React.Component {
|
||||||
|
|
||||||
|
render(){
|
||||||
|
|
||||||
|
return(
|
||||||
|
|
||||||
|
<table className="highlight centered">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th data-field="url">URL</th>
|
||||||
|
<th data-field="desc">Description</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td><a href="https://www.vertinext.com">www.vertinext.com</a></td>
|
||||||
|
<td>This Website</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><a href="https://kingsmouth.vertinext.com">kingsmouth.vertinext.com</a></td>
|
||||||
|
<td>Website built for a now defunct text game. Acted as an admin interface.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><a href="https://safehaven.vertinext.com">safehaven.vertinext.com</a></td>
|
||||||
|
<td>Wiki for a text game</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><a href="https://welltrackr.vertinext.com">welltrackr.vertinext.com</a></td>
|
||||||
|
<td>Mock health tracking website made for family that never got used</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><a href="http://git.vertinext.com">git.vertinext.com</a></td>
|
||||||
|
<td>Personal gitlab server</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><a href="http://radialblur.vertinext.com">radialblur.vertinext.com</a></td>
|
||||||
|
<td>Django website for a text based game</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
)
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = HostLists;
|
20
src/App/Components/Menu.js
Normal file
20
src/App/Components/Menu.js
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
import React from 'react';
|
||||||
|
import MenuItem from './MenuItem';
|
||||||
|
|
||||||
|
class Menu extends React.Component {
|
||||||
|
render() {
|
||||||
|
return (
|
||||||
|
<nav>
|
||||||
|
<div class="nav-wrapper">
|
||||||
|
<ul class="left">
|
||||||
|
<MenuItem route="app" text="Home" />
|
||||||
|
<MenuItem route="gitrepos" text="Github Repos" />
|
||||||
|
<MenuItem route="hosting" text="Hosting" />
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</nav>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = Menu;
|
16
src/App/Components/MenuItem.js
Normal file
16
src/App/Components/MenuItem.js
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
import React from 'react';
|
||||||
|
import {Link} from 'react-router';
|
||||||
|
|
||||||
|
class MenuItem extends React.Component {
|
||||||
|
render() {
|
||||||
|
return (
|
||||||
|
<li>
|
||||||
|
<Link to={this.props.route}>
|
||||||
|
{this.props.text}
|
||||||
|
</Link>
|
||||||
|
</li>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = MenuItem;
|
5
src/App/Core/App.js
Normal file
5
src/App/Core/App.js
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
import React from 'react';
|
||||||
|
import Router from 'react-router';
|
||||||
|
import routes from './Routes';
|
||||||
|
|
||||||
|
Router.run(routes, (Handler) => React.render(<Handler /> , document.body));
|
18
src/App/Core/Layout.js
Normal file
18
src/App/Core/Layout.js
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
import React from 'react';
|
||||||
|
import Router from 'react-router';
|
||||||
|
var {RouteHandler} = Router;
|
||||||
|
|
||||||
|
import Menu from '../Components/Menu';
|
||||||
|
|
||||||
|
class App extends React.Component {
|
||||||
|
render() {
|
||||||
|
return (
|
||||||
|
<div>
|
||||||
|
<Menu />
|
||||||
|
<RouteHandler/>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = App;
|
18
src/App/Core/Routes.js
Normal file
18
src/App/Core/Routes.js
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
import React from 'react';
|
||||||
|
import Router from 'react-router';
|
||||||
|
var {DefaultRoute, Route} = Router;
|
||||||
|
|
||||||
|
import Layout from './Layout';
|
||||||
|
import Home from '../Views/Home';
|
||||||
|
import Gitrepos from '../Views/Gitrepos';
|
||||||
|
import Hosts from '../Views/Hosts';
|
||||||
|
|
||||||
|
var routes = (
|
||||||
|
<Route name="app" path="/" handler={Layout}>
|
||||||
|
<Route name="gitrepos" handler={Gitrepos}/>
|
||||||
|
<Route name="hosting" handler={Hosts}/>
|
||||||
|
<DefaultRoute handler={Home}/>
|
||||||
|
</Route>
|
||||||
|
);
|
||||||
|
|
||||||
|
module.exports = routes;
|
12
src/App/Views/Gitrepos.js
Normal file
12
src/App/Views/Gitrepos.js
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
import React from 'react';
|
||||||
|
import GitListing from '../Components/GitListing';
|
||||||
|
|
||||||
|
class Gitrepos extends React.Component {
|
||||||
|
render() {
|
||||||
|
return (
|
||||||
|
<GitListing />
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = Gitrepos;
|
31
src/App/Views/Home.js
Normal file
31
src/App/Views/Home.js
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
import React from 'react';
|
||||||
|
|
||||||
|
class Home extends React.Component {
|
||||||
|
render() {
|
||||||
|
return (
|
||||||
|
<div className="container">
|
||||||
|
<div className="row">
|
||||||
|
<div className="col s12">
|
||||||
|
<div className="card hoverable">
|
||||||
|
<div className="card-content red-text">
|
||||||
|
<span className="card-title red-text">Charles C Click</span><br />
|
||||||
|
Email: <a href="mailto:CharlesClick@vertinext.com">CharlesClick@vertinext.com</a><br />
|
||||||
|
Skillset: Web Development<br />
|
||||||
|
This Website: <a href="https://facebook.github.io/react/">React</a> and <a href="http://materializecss.com/">Materialize</a><br />
|
||||||
|
<blockquote>
|
||||||
|
I am a coder and web developer in Knoxville, TN, who also hosts websites, games and other services through a personal server. There is a list of my Github repositories and currently hosted games and services available on other pages.
|
||||||
|
</blockquote>
|
||||||
|
</div>
|
||||||
|
<div className="card-action red-text">
|
||||||
|
<a href="https://docs.google.com/document/d/1ykS2_34-GQd0SbrjpG9NbBvq40L62qWxGJc43KAjOD8/edit?usp=sharing">View Resume</a>
|
||||||
|
<a href="https://docs.google.com/document/d/1ykS2_34-GQd0SbrjpG9NbBvq40L62qWxGJc43KAjOD8/edit?usp=sharing">View References</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = Home;
|
18
src/App/Views/Hosts.js
Normal file
18
src/App/Views/Hosts.js
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
import React from 'react';
|
||||||
|
import HostLists from '../Components/HostLists';
|
||||||
|
|
||||||
|
class Hosts extends React.Component {
|
||||||
|
render() {
|
||||||
|
return (
|
||||||
|
<div className="container">
|
||||||
|
<div className="row">
|
||||||
|
<div className="col s12">
|
||||||
|
<HostLists />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = Hosts;
|
1
src/App/app.js
Normal file
1
src/App/app.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
import './Core/App';
|
21
src/App/index.html
Normal file
21
src/App/index.html
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<meta name="google-site-verification" content="FW6N6eQoOr6Tc6m7knz7Ls4w9J4-7Y_kVXSTpiU_rQ8" />
|
||||||
|
<meta name="description" content="Personal site of Charles Click Cataloging coding exploits" />
|
||||||
|
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
|
||||||
|
<link type="text/css" rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.1/css/materialize.min.css" media="screen,projection"/>
|
||||||
|
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">
|
||||||
|
<title>Charles Click</title>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<script src="app.js"></script>
|
||||||
|
<script type="text/javascript" src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
|
||||||
|
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.1/js/materialize.min.js"></script>
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
23979
src/build/app.js
Normal file
23979
src/build/app.js
Normal file
File diff suppressed because it is too large
Load Diff
21
src/build/index.html
Normal file
21
src/build/index.html
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<meta name="google-site-verification" content="FW6N6eQoOr6Tc6m7knz7Ls4w9J4-7Y_kVXSTpiU_rQ8" />
|
||||||
|
<meta name="description" content="Personal site of Charles Click Cataloging coding exploits" />
|
||||||
|
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
|
||||||
|
<link type="text/css" rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.1/css/materialize.min.css" media="screen,projection"/>
|
||||||
|
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">
|
||||||
|
<title>Charles Click</title>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<script src="app.js"></script>
|
||||||
|
<script type="text/javascript" src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
|
||||||
|
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.1/js/materialize.min.js"></script>
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
43
src/gulpfile.js
Normal file
43
src/gulpfile.js
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
var browserify = require('browserify');
|
||||||
|
var gulp = require('gulp');
|
||||||
|
var source = require('vinyl-source-stream');
|
||||||
|
var browserSync = require('browser-sync');
|
||||||
|
var rename = require('gulp-rename');
|
||||||
|
var babelify = require("babelify");
|
||||||
|
|
||||||
|
var opts = {
|
||||||
|
mainJsInput: './App/app.js',
|
||||||
|
mainJsOutput: 'app.js',
|
||||||
|
buildFolder: './build/',
|
||||||
|
indexHtml: './App/index.html',
|
||||||
|
watchedFiles: [
|
||||||
|
'./App/**/*'
|
||||||
|
]
|
||||||
|
};
|
||||||
|
|
||||||
|
gulp.task('index', function() {
|
||||||
|
gulp.src(opts.indexHtml)
|
||||||
|
.pipe(gulp.dest(opts.buildFolder));
|
||||||
|
});
|
||||||
|
|
||||||
|
gulp.task('compile', function() {
|
||||||
|
var b = browserify();
|
||||||
|
b.transform(babelify);
|
||||||
|
b.add(opts.mainJsInput);
|
||||||
|
return b.bundle()
|
||||||
|
.pipe(source(opts.mainJsInput))
|
||||||
|
.pipe(rename(opts.mainJsOutput))
|
||||||
|
.pipe(gulp.dest(opts.buildFolder));
|
||||||
|
});
|
||||||
|
|
||||||
|
gulp.task('browser-sync', function() {
|
||||||
|
browserSync({
|
||||||
|
server: {
|
||||||
|
baseDir: opts.buildFolder
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
gulp.task('default', ['browser-sync', 'compile', 'index'], function() {
|
||||||
|
gulp.watch(opts.watchedFiles, ['compile', 'index', browserSync.reload]);
|
||||||
|
});
|
1
src/node_modules/.bin/JSONStream
generated
vendored
Symbolic link
1
src/node_modules/.bin/JSONStream
generated
vendored
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../JSONStream/index.js
|
1
src/node_modules/.bin/acorn
generated
vendored
Symbolic link
1
src/node_modules/.bin/acorn
generated
vendored
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../acorn/bin/acorn
|
1
src/node_modules/.bin/browser-pack
generated
vendored
Symbolic link
1
src/node_modules/.bin/browser-pack
generated
vendored
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../browser-pack/bin/cmd.js
|
1
src/node_modules/.bin/browser-sync
generated
vendored
Symbolic link
1
src/node_modules/.bin/browser-sync
generated
vendored
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../browser-sync/bin/browser-sync.js
|
1
src/node_modules/.bin/browserify
generated
vendored
Symbolic link
1
src/node_modules/.bin/browserify
generated
vendored
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../browserify/bin/cmd.js
|
1
src/node_modules/.bin/commonize
generated
vendored
Symbolic link
1
src/node_modules/.bin/commonize
generated
vendored
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../commoner/bin/commonize
|
1
src/node_modules/.bin/cssesc
generated
vendored
Symbolic link
1
src/node_modules/.bin/cssesc
generated
vendored
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../cssesc/bin/cssesc
|
1
src/node_modules/.bin/dateformat
generated
vendored
Symbolic link
1
src/node_modules/.bin/dateformat
generated
vendored
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../dateformat/bin/cli.js
|
1
src/node_modules/.bin/defs
generated
vendored
Symbolic link
1
src/node_modules/.bin/defs
generated
vendored
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../defs/build/es5/defs
|
1
src/node_modules/.bin/deps-sort
generated
vendored
Symbolic link
1
src/node_modules/.bin/deps-sort
generated
vendored
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../deps-sort/bin/cmd.js
|
1
src/node_modules/.bin/detect-indent
generated
vendored
Symbolic link
1
src/node_modules/.bin/detect-indent
generated
vendored
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../detect-indent/cli.js
|
1
src/node_modules/.bin/dev-ip
generated
vendored
Symbolic link
1
src/node_modules/.bin/dev-ip
generated
vendored
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../dev-ip/lib/dev-ip.js
|
1
src/node_modules/.bin/envify
generated
vendored
Symbolic link
1
src/node_modules/.bin/envify
generated
vendored
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../envify/bin/envify
|
1
src/node_modules/.bin/esparse
generated
vendored
Symbolic link
1
src/node_modules/.bin/esparse
generated
vendored
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../esprima-fb/bin/esparse.js
|
1
src/node_modules/.bin/esvalidate
generated
vendored
Symbolic link
1
src/node_modules/.bin/esvalidate
generated
vendored
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../esprima-fb/bin/esvalidate.js
|
1
src/node_modules/.bin/express
generated
vendored
Symbolic link
1
src/node_modules/.bin/express
generated
vendored
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../express/bin/express
|
1
src/node_modules/.bin/foxy
generated
vendored
Symbolic link
1
src/node_modules/.bin/foxy
generated
vendored
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../foxy/cli.js
|
1
src/node_modules/.bin/gulp
generated
vendored
Symbolic link
1
src/node_modules/.bin/gulp
generated
vendored
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../gulp/bin/gulp.js
|
1
src/node_modules/.bin/har-validator
generated
vendored
Symbolic link
1
src/node_modules/.bin/har-validator
generated
vendored
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../har-validator/bin/har-validator
|
1
src/node_modules/.bin/indent-string
generated
vendored
Symbolic link
1
src/node_modules/.bin/indent-string
generated
vendored
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../indent-string/cli.js
|
1
src/node_modules/.bin/insert-module-globals
generated
vendored
Symbolic link
1
src/node_modules/.bin/insert-module-globals
generated
vendored
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../insert-module-globals/bin/cmd.js
|
1
src/node_modules/.bin/jsesc
generated
vendored
Symbolic link
1
src/node_modules/.bin/jsesc
generated
vendored
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../jsesc/bin/jsesc
|
1
src/node_modules/.bin/json5
generated
vendored
Symbolic link
1
src/node_modules/.bin/json5
generated
vendored
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../json5/lib/cli.js
|
1
src/node_modules/.bin/leven
generated
vendored
Symbolic link
1
src/node_modules/.bin/leven
generated
vendored
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../leven/cli.js
|
1
src/node_modules/.bin/lt
generated
vendored
Symbolic link
1
src/node_modules/.bin/lt
generated
vendored
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../localtunnel/bin/client
|
1
src/node_modules/.bin/miller-rabin
generated
vendored
Symbolic link
1
src/node_modules/.bin/miller-rabin
generated
vendored
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../miller-rabin/bin/miller-rabin
|
1
src/node_modules/.bin/mkdirp
generated
vendored
Symbolic link
1
src/node_modules/.bin/mkdirp
generated
vendored
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../mkdirp/bin/cmd.js
|
1
src/node_modules/.bin/module-deps
generated
vendored
Symbolic link
1
src/node_modules/.bin/module-deps
generated
vendored
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../module-deps/bin/cmd.js
|
1
src/node_modules/.bin/nopt
generated
vendored
Symbolic link
1
src/node_modules/.bin/nopt
generated
vendored
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../nopt/bin/nopt.js
|
1
src/node_modules/.bin/regenerator
generated
vendored
Symbolic link
1
src/node_modules/.bin/regenerator
generated
vendored
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../regenerator/bin/regenerator
|
1
src/node_modules/.bin/regexpu
generated
vendored
Symbolic link
1
src/node_modules/.bin/regexpu
generated
vendored
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../regexpu/bin/regexpu
|
1
src/node_modules/.bin/regjsparser
generated
vendored
Symbolic link
1
src/node_modules/.bin/regjsparser
generated
vendored
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../regjsparser/bin/parser
|
1
src/node_modules/.bin/repeating
generated
vendored
Symbolic link
1
src/node_modules/.bin/repeating
generated
vendored
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../repeating/cli.js
|
1
src/node_modules/.bin/rimraf
generated
vendored
Symbolic link
1
src/node_modules/.bin/rimraf
generated
vendored
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../rimraf/bin.js
|
1
src/node_modules/.bin/semver
generated
vendored
Symbolic link
1
src/node_modules/.bin/semver
generated
vendored
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../semver/bin/semver
|
1
src/node_modules/.bin/sha.js
generated
vendored
Symbolic link
1
src/node_modules/.bin/sha.js
generated
vendored
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../sha.js/bin.js
|
1
src/node_modules/.bin/strip-bom
generated
vendored
Symbolic link
1
src/node_modules/.bin/strip-bom
generated
vendored
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../strip-bom/cli.js
|
1
src/node_modules/.bin/throttleproxy
generated
vendored
Symbolic link
1
src/node_modules/.bin/throttleproxy
generated
vendored
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../stream-throttle/bin/throttleproxy.js
|
1
src/node_modules/.bin/umd
generated
vendored
Symbolic link
1
src/node_modules/.bin/umd
generated
vendored
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../umd/bin/cli.js
|
1
src/node_modules/.bin/user-home
generated
vendored
Symbolic link
1
src/node_modules/.bin/user-home
generated
vendored
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../user-home/cli.js
|
1
src/node_modules/.bin/uuid
generated
vendored
Symbolic link
1
src/node_modules/.bin/uuid
generated
vendored
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../node-uuid/bin/uuid
|
1
src/node_modules/.bin/weinre
generated
vendored
Symbolic link
1
src/node_modules/.bin/weinre
generated
vendored
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../weinre/weinre
|
1
src/node_modules/.bin/window-size
generated
vendored
Symbolic link
1
src/node_modules/.bin/window-size
generated
vendored
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../window-size/cli.js
|
2
src/node_modules/Base64/.npmignore
generated
vendored
Normal file
2
src/node_modules/Base64/.npmignore
generated
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
/coverage/
|
||||||
|
/node_modules/
|
7
src/node_modules/Base64/.travis.yml
generated
vendored
Normal file
7
src/node_modules/Base64/.travis.yml
generated
vendored
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
language: node_js
|
||||||
|
node_js:
|
||||||
|
- "0.8"
|
||||||
|
- "0.10"
|
||||||
|
- "0.11"
|
||||||
|
install: make setup
|
||||||
|
script: make test
|
14
src/node_modules/Base64/LICENSE
generated
vendored
Normal file
14
src/node_modules/Base64/LICENSE
generated
vendored
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
|
||||||
|
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
|
||||||
|
Version 2, December 2004
|
||||||
|
|
||||||
|
Copyright (c) 2011..2012 David Chambers <dc@hashify.me>
|
||||||
|
|
||||||
|
Everyone is permitted to copy and distribute verbatim or modified
|
||||||
|
copies of this license document, and changing it is allowed as long
|
||||||
|
as the name is changed.
|
||||||
|
|
||||||
|
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
|
||||||
|
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||||
|
|
||||||
|
0. You just DO WHAT THE FUCK YOU WANT TO.
|
42
src/node_modules/Base64/Makefile
generated
vendored
Normal file
42
src/node_modules/Base64/Makefile
generated
vendored
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
ISTANBUL = node_modules/.bin/istanbul
|
||||||
|
UGLIFYJS = node_modules/.bin/uglifyjs
|
||||||
|
XYZ = node_modules/.bin/xyz --message X.Y.Z --tag X.Y.Z
|
||||||
|
|
||||||
|
SRC = base64.js
|
||||||
|
MIN = $(patsubst %.js,%.min.js,$(SRC))
|
||||||
|
|
||||||
|
|
||||||
|
.PHONY: all
|
||||||
|
all: $(MIN)
|
||||||
|
|
||||||
|
%.min.js: %.js
|
||||||
|
$(UGLIFYJS) $< --compress --mangle > $@
|
||||||
|
|
||||||
|
|
||||||
|
.PHONY: bytes
|
||||||
|
bytes: base64.min.js
|
||||||
|
gzip --best --stdout $< | wc -c | tr -d ' '
|
||||||
|
|
||||||
|
|
||||||
|
.PHONY: clean
|
||||||
|
clean:
|
||||||
|
rm -f -- $(MIN)
|
||||||
|
|
||||||
|
|
||||||
|
.PHONY: release-major release-minor release-patch
|
||||||
|
release-major:
|
||||||
|
$(XYZ) --increment major
|
||||||
|
release-minor:
|
||||||
|
$(XYZ) --increment minor
|
||||||
|
release-patch:
|
||||||
|
$(XYZ) --increment patch
|
||||||
|
|
||||||
|
|
||||||
|
.PHONY: setup
|
||||||
|
setup:
|
||||||
|
npm install
|
||||||
|
|
||||||
|
|
||||||
|
.PHONY: test
|
||||||
|
test:
|
||||||
|
$(ISTANBUL) cover node_modules/.bin/_mocha -- --compilers coffee:coffee-script/register
|
34
src/node_modules/Base64/README.md
generated
vendored
Normal file
34
src/node_modules/Base64/README.md
generated
vendored
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
# Base64.js
|
||||||
|
|
||||||
|
≈ 500 byte* polyfill for browsers which don't provide [`window.btoa`][1] and
|
||||||
|
[`window.atob`][2].
|
||||||
|
|
||||||
|
Although the script does no harm in browsers which do provide these functions,
|
||||||
|
a conditional script loader such as [yepnope][3] can prevent unnecessary HTTP
|
||||||
|
requests.
|
||||||
|
|
||||||
|
```javascript
|
||||||
|
yepnope({
|
||||||
|
test: window.btoa && window.atob,
|
||||||
|
nope: 'base64.js',
|
||||||
|
callback: function () {
|
||||||
|
// `btoa` and `atob` are now safe to use
|
||||||
|
}
|
||||||
|
})
|
||||||
|
```
|
||||||
|
|
||||||
|
Base64.js stems from a [gist][4] by [yahiko][5].
|
||||||
|
|
||||||
|
### Running the test suite
|
||||||
|
|
||||||
|
make setup
|
||||||
|
make test
|
||||||
|
|
||||||
|
\* Minified and gzipped. Run `make bytes` to verify.
|
||||||
|
|
||||||
|
|
||||||
|
[1]: https://developer.mozilla.org/en/DOM/window.btoa
|
||||||
|
[2]: https://developer.mozilla.org/en/DOM/window.atob
|
||||||
|
[3]: http://yepnopejs.com/
|
||||||
|
[4]: https://gist.github.com/229984
|
||||||
|
[5]: https://github.com/yahiko
|
60
src/node_modules/Base64/base64.js
generated
vendored
Normal file
60
src/node_modules/Base64/base64.js
generated
vendored
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
;(function () {
|
||||||
|
|
||||||
|
var object = typeof exports != 'undefined' ? exports : this; // #8: web workers
|
||||||
|
var chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
|
||||||
|
|
||||||
|
function InvalidCharacterError(message) {
|
||||||
|
this.message = message;
|
||||||
|
}
|
||||||
|
InvalidCharacterError.prototype = new Error;
|
||||||
|
InvalidCharacterError.prototype.name = 'InvalidCharacterError';
|
||||||
|
|
||||||
|
// encoder
|
||||||
|
// [https://gist.github.com/999166] by [https://github.com/nignag]
|
||||||
|
object.btoa || (
|
||||||
|
object.btoa = function (input) {
|
||||||
|
for (
|
||||||
|
// initialize result and counter
|
||||||
|
var block, charCode, idx = 0, map = chars, output = '';
|
||||||
|
// if the next input index does not exist:
|
||||||
|
// change the mapping table to "="
|
||||||
|
// check if d has no fractional digits
|
||||||
|
input.charAt(idx | 0) || (map = '=', idx % 1);
|
||||||
|
// "8 - idx % 1 * 8" generates the sequence 2, 4, 6, 8
|
||||||
|
output += map.charAt(63 & block >> 8 - idx % 1 * 8)
|
||||||
|
) {
|
||||||
|
charCode = input.charCodeAt(idx += 3/4);
|
||||||
|
if (charCode > 0xFF) {
|
||||||
|
throw new InvalidCharacterError("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.");
|
||||||
|
}
|
||||||
|
block = block << 8 | charCode;
|
||||||
|
}
|
||||||
|
return output;
|
||||||
|
});
|
||||||
|
|
||||||
|
// decoder
|
||||||
|
// [https://gist.github.com/1020396] by [https://github.com/atk]
|
||||||
|
object.atob || (
|
||||||
|
object.atob = function (input) {
|
||||||
|
input = input.replace(/=+$/, '');
|
||||||
|
if (input.length % 4 == 1) {
|
||||||
|
throw new InvalidCharacterError("'atob' failed: The string to be decoded is not correctly encoded.");
|
||||||
|
}
|
||||||
|
for (
|
||||||
|
// initialize result and counters
|
||||||
|
var bc = 0, bs, buffer, idx = 0, output = '';
|
||||||
|
// get next character
|
||||||
|
buffer = input.charAt(idx++);
|
||||||
|
// character found in table? initialize bit storage and add its ascii value;
|
||||||
|
~buffer && (bs = bc % 4 ? bs * 64 + buffer : buffer,
|
||||||
|
// and if not first of each 4 characters,
|
||||||
|
// convert the first 8 bits to one ascii character
|
||||||
|
bc++ % 4) ? output += String.fromCharCode(255 & bs >> (-2 * bc & 6)) : 0
|
||||||
|
) {
|
||||||
|
// try to find character in table (0-63, not found => -1)
|
||||||
|
buffer = chars.indexOf(buffer);
|
||||||
|
}
|
||||||
|
return output;
|
||||||
|
});
|
||||||
|
|
||||||
|
}());
|
1
src/node_modules/Base64/base64.min.js
generated
vendored
Normal file
1
src/node_modules/Base64/base64.min.js
generated
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
!function(){function t(t){this.message=t}var e="undefined"!=typeof exports?exports:this,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";t.prototype=new Error,t.prototype.name="InvalidCharacterError",e.btoa||(e.btoa=function(e){for(var o,n,a=0,i=r,c="";e.charAt(0|a)||(i="=",a%1);c+=i.charAt(63&o>>8-a%1*8)){if(n=e.charCodeAt(a+=.75),n>255)throw new t("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.");o=o<<8|n}return c}),e.atob||(e.atob=function(e){if(e=e.replace(/=+$/,""),e.length%4==1)throw new t("'atob' failed: The string to be decoded is not correctly encoded.");for(var o,n,a=0,i=0,c="";n=e.charAt(i++);~n&&(o=a%4?64*o+n:n,a++%4)?c+=String.fromCharCode(255&o>>(-2*a&6)):0)n=r.indexOf(n);return c})}();
|
82
src/node_modules/Base64/package.json
generated
vendored
Normal file
82
src/node_modules/Base64/package.json
generated
vendored
Normal file
@ -0,0 +1,82 @@
|
|||||||
|
{
|
||||||
|
"_args": [
|
||||||
|
[
|
||||||
|
"Base64@~0.2.0",
|
||||||
|
"/media/Github/Vertinext2/src/node_modules/http-browserify"
|
||||||
|
]
|
||||||
|
],
|
||||||
|
"_from": "Base64@>=0.2.0 <0.3.0",
|
||||||
|
"_id": "Base64@0.2.1",
|
||||||
|
"_inCache": true,
|
||||||
|
"_installable": true,
|
||||||
|
"_location": "/Base64",
|
||||||
|
"_npmUser": {
|
||||||
|
"email": "npm@michael.ficarra.me",
|
||||||
|
"name": "michaelficarra"
|
||||||
|
},
|
||||||
|
"_npmVersion": "1.4.3",
|
||||||
|
"_phantomChildren": {},
|
||||||
|
"_requested": {
|
||||||
|
"name": "Base64",
|
||||||
|
"raw": "Base64@~0.2.0",
|
||||||
|
"rawSpec": "~0.2.0",
|
||||||
|
"scope": null,
|
||||||
|
"spec": ">=0.2.0 <0.3.0",
|
||||||
|
"type": "range"
|
||||||
|
},
|
||||||
|
"_requiredBy": [
|
||||||
|
"/http-browserify"
|
||||||
|
],
|
||||||
|
"_resolved": "https://registry.npmjs.org/Base64/-/Base64-0.2.1.tgz",
|
||||||
|
"_shasum": "ba3a4230708e186705065e66babdd4c35cf60028",
|
||||||
|
"_shrinkwrap": null,
|
||||||
|
"_spec": "Base64@~0.2.0",
|
||||||
|
"_where": "/media/Github/Vertinext2/src/node_modules/http-browserify",
|
||||||
|
"author": {
|
||||||
|
"email": "dc@davidchambers.me",
|
||||||
|
"name": "David Chambers"
|
||||||
|
},
|
||||||
|
"bugs": {
|
||||||
|
"url": "https://github.com/davidchambers/Base64.js/issues"
|
||||||
|
},
|
||||||
|
"dependencies": {},
|
||||||
|
"description": "Base64 encoding and decoding",
|
||||||
|
"devDependencies": {
|
||||||
|
"coffee-script": "1.7.x",
|
||||||
|
"istanbul": "0.2.x",
|
||||||
|
"mocha": "1.18.x",
|
||||||
|
"uglify-js": "2.4.x",
|
||||||
|
"xyz": "0.1.x"
|
||||||
|
},
|
||||||
|
"directories": {},
|
||||||
|
"dist": {
|
||||||
|
"shasum": "ba3a4230708e186705065e66babdd4c35cf60028",
|
||||||
|
"tarball": "http://registry.npmjs.org/Base64/-/Base64-0.2.1.tgz"
|
||||||
|
},
|
||||||
|
"homepage": "https://github.com/davidchambers/Base64.js",
|
||||||
|
"licenses": [
|
||||||
|
{
|
||||||
|
"type": "WTFPL",
|
||||||
|
"url": "https://raw.github.com/davidchambers/Base64.js/master/LICENSE"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"main": "./base64.js",
|
||||||
|
"maintainers": [
|
||||||
|
{
|
||||||
|
"email": "dc@hashify.me",
|
||||||
|
"name": "davidchambers"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"email": "npm@michael.ficarra.me",
|
||||||
|
"name": "michaelficarra"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": "Base64",
|
||||||
|
"optionalDependencies": {},
|
||||||
|
"readme": "ERROR: No README data found!",
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "git://github.com/davidchambers/Base64.js.git"
|
||||||
|
},
|
||||||
|
"version": "0.2.1"
|
||||||
|
}
|
52
src/node_modules/Base64/test/base64.coffee
generated
vendored
Normal file
52
src/node_modules/Base64/test/base64.coffee
generated
vendored
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
assert = require 'assert'
|
||||||
|
|
||||||
|
{btoa, atob} = require '..'
|
||||||
|
|
||||||
|
|
||||||
|
describe 'Base64.js', ->
|
||||||
|
|
||||||
|
it 'can encode ASCII input', ->
|
||||||
|
assert.strictEqual btoa(''), ''
|
||||||
|
assert.strictEqual btoa('f'), 'Zg=='
|
||||||
|
assert.strictEqual btoa('fo'), 'Zm8='
|
||||||
|
assert.strictEqual btoa('foo'), 'Zm9v'
|
||||||
|
assert.strictEqual btoa('quux'), 'cXV1eA=='
|
||||||
|
assert.strictEqual btoa('!"#$%'), 'ISIjJCU='
|
||||||
|
assert.strictEqual btoa("&'()*+"), 'JicoKSor'
|
||||||
|
assert.strictEqual btoa(',-./012'), 'LC0uLzAxMg=='
|
||||||
|
assert.strictEqual btoa('3456789:'), 'MzQ1Njc4OTo='
|
||||||
|
assert.strictEqual btoa(';<=>?@ABC'), 'Ozw9Pj9AQUJD'
|
||||||
|
assert.strictEqual btoa('DEFGHIJKLM'), 'REVGR0hJSktMTQ=='
|
||||||
|
assert.strictEqual btoa('NOPQRSTUVWX'), 'Tk9QUVJTVFVWV1g='
|
||||||
|
assert.strictEqual btoa('YZ[\\]^_`abc'), 'WVpbXF1eX2BhYmM='
|
||||||
|
assert.strictEqual btoa('defghijklmnop'), 'ZGVmZ2hpamtsbW5vcA=='
|
||||||
|
assert.strictEqual btoa('qrstuvwxyz{|}~'), 'cXJzdHV2d3h5ent8fX4='
|
||||||
|
|
||||||
|
it 'cannot encode non-ASCII input', ->
|
||||||
|
assert.throws (-> btoa '✈'), (err) ->
|
||||||
|
err instanceof Error and
|
||||||
|
err.name is 'InvalidCharacterError' and
|
||||||
|
err.message is "'btoa' failed: The string to be encoded contains characters outside of the Latin1 range."
|
||||||
|
|
||||||
|
it 'can decode Base64-encoded input', ->
|
||||||
|
assert.strictEqual atob(''), ''
|
||||||
|
assert.strictEqual atob('Zg=='), 'f'
|
||||||
|
assert.strictEqual atob('Zm8='), 'fo'
|
||||||
|
assert.strictEqual atob('Zm9v'), 'foo'
|
||||||
|
assert.strictEqual atob('cXV1eA=='), 'quux'
|
||||||
|
assert.strictEqual atob('ISIjJCU='), '!"#$%'
|
||||||
|
assert.strictEqual atob('JicoKSor'), "&'()*+"
|
||||||
|
assert.strictEqual atob('LC0uLzAxMg=='), ',-./012'
|
||||||
|
assert.strictEqual atob('MzQ1Njc4OTo='), '3456789:'
|
||||||
|
assert.strictEqual atob('Ozw9Pj9AQUJD'), ';<=>?@ABC'
|
||||||
|
assert.strictEqual atob('REVGR0hJSktMTQ=='), 'DEFGHIJKLM'
|
||||||
|
assert.strictEqual atob('Tk9QUVJTVFVWV1g='), 'NOPQRSTUVWX'
|
||||||
|
assert.strictEqual atob('WVpbXF1eX2BhYmM='), 'YZ[\\]^_`abc'
|
||||||
|
assert.strictEqual atob('ZGVmZ2hpamtsbW5vcA=='), 'defghijklmnop'
|
||||||
|
assert.strictEqual atob('cXJzdHV2d3h5ent8fX4='), 'qrstuvwxyz{|}~'
|
||||||
|
|
||||||
|
it 'cannot decode invalid input', ->
|
||||||
|
assert.throws (-> atob 'a'), (err) ->
|
||||||
|
err instanceof Error and
|
||||||
|
err.name is 'InvalidCharacterError' and
|
||||||
|
err.message is "'atob' failed: The string to be decoded is not correctly encoded."
|
2
src/node_modules/JSONStream/.npmignore
generated
vendored
Normal file
2
src/node_modules/JSONStream/.npmignore
generated
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
node_modules/*
|
||||||
|
node_modules
|
3
src/node_modules/JSONStream/.travis.yml
generated
vendored
Normal file
3
src/node_modules/JSONStream/.travis.yml
generated
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
language: node_js
|
||||||
|
node_js:
|
||||||
|
- "0.10"
|
15
src/node_modules/JSONStream/LICENSE.APACHE2
generated
vendored
Normal file
15
src/node_modules/JSONStream/LICENSE.APACHE2
generated
vendored
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
Apache License, Version 2.0
|
||||||
|
|
||||||
|
Copyright (c) 2011 Dominic Tarr
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
24
src/node_modules/JSONStream/LICENSE.MIT
generated
vendored
Normal file
24
src/node_modules/JSONStream/LICENSE.MIT
generated
vendored
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
The MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2011 Dominic Tarr
|
||||||
|
|
||||||
|
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.
|
13
src/node_modules/JSONStream/examples/all_docs.js
generated
vendored
Normal file
13
src/node_modules/JSONStream/examples/all_docs.js
generated
vendored
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
var request = require('request')
|
||||||
|
, JSONStream = require('JSONStream')
|
||||||
|
, es = require('event-stream')
|
||||||
|
|
||||||
|
var parser = JSONStream.parse(['rows', true]) //emit parts that match this path (any element of the rows array)
|
||||||
|
, req = request({url: 'http://isaacs.couchone.com/registry/_all_docs'})
|
||||||
|
, logger = es.mapSync(function (data) { //create a stream that logs to stderr,
|
||||||
|
console.error(data)
|
||||||
|
return data
|
||||||
|
})
|
||||||
|
|
||||||
|
req.pipe(parser)
|
||||||
|
parser.pipe(logger)
|
203
src/node_modules/JSONStream/index.js
generated
vendored
Executable file
203
src/node_modules/JSONStream/index.js
generated
vendored
Executable file
@ -0,0 +1,203 @@
|
|||||||
|
#! /usr/bin/env node
|
||||||
|
|
||||||
|
'use strict'
|
||||||
|
|
||||||
|
var Parser = require('jsonparse')
|
||||||
|
, through = require('through')
|
||||||
|
|
||||||
|
/*
|
||||||
|
|
||||||
|
the value of this.stack that creationix's jsonparse has is weird.
|
||||||
|
|
||||||
|
it makes this code ugly, but his problem is way harder that mine,
|
||||||
|
so i'll forgive him.
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
exports.parse = function (path, map) {
|
||||||
|
|
||||||
|
var parser = new Parser()
|
||||||
|
var stream = through(function (chunk) {
|
||||||
|
if('string' === typeof chunk)
|
||||||
|
chunk = new Buffer(chunk)
|
||||||
|
parser.write(chunk)
|
||||||
|
},
|
||||||
|
function (data) {
|
||||||
|
if(data)
|
||||||
|
stream.write(data)
|
||||||
|
stream.queue(null)
|
||||||
|
})
|
||||||
|
|
||||||
|
if('string' === typeof path)
|
||||||
|
path = path.split('.').map(function (e) {
|
||||||
|
if (e === '*')
|
||||||
|
return true
|
||||||
|
else if (e === '') // '..'.split('.') returns an empty string
|
||||||
|
return {recurse: true}
|
||||||
|
else
|
||||||
|
return e
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
var count = 0, _key
|
||||||
|
if(!path || !path.length)
|
||||||
|
path = null
|
||||||
|
|
||||||
|
parser.onValue = function (value) {
|
||||||
|
if (!this.root)
|
||||||
|
stream.root = value
|
||||||
|
|
||||||
|
if(! path) return
|
||||||
|
|
||||||
|
var i = 0 // iterates on path
|
||||||
|
var j = 0 // iterates on stack
|
||||||
|
while (i < path.length) {
|
||||||
|
var key = path[i]
|
||||||
|
var c
|
||||||
|
j++
|
||||||
|
|
||||||
|
if (key && !key.recurse) {
|
||||||
|
c = (j === this.stack.length) ? this : this.stack[j]
|
||||||
|
if (!c) return
|
||||||
|
if (! check(key, c.key)) return
|
||||||
|
i++
|
||||||
|
} else {
|
||||||
|
i++
|
||||||
|
var nextKey = path[i]
|
||||||
|
if (! nextKey) return
|
||||||
|
while (true) {
|
||||||
|
c = (j === this.stack.length) ? this : this.stack[j]
|
||||||
|
if (!c) return
|
||||||
|
if (check(nextKey, c.key)) {
|
||||||
|
i++;
|
||||||
|
this.stack[j].value = null
|
||||||
|
break
|
||||||
|
}
|
||||||
|
j++
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
if (j !== this.stack.length) return
|
||||||
|
|
||||||
|
count ++
|
||||||
|
var actualPath = this.stack.slice(1).map(function(element) { return element.key }).concat([this.key])
|
||||||
|
var data = this.value[this.key]
|
||||||
|
if(null != data)
|
||||||
|
if(null != (data = map ? map(data, actualPath) : data))
|
||||||
|
stream.queue(data)
|
||||||
|
delete this.value[this.key]
|
||||||
|
for(var k in this.stack)
|
||||||
|
this.stack[k].value = null
|
||||||
|
}
|
||||||
|
parser._onToken = parser.onToken;
|
||||||
|
|
||||||
|
parser.onToken = function (token, value) {
|
||||||
|
parser._onToken(token, value);
|
||||||
|
if (this.stack.length === 0) {
|
||||||
|
if (stream.root) {
|
||||||
|
if(!path)
|
||||||
|
stream.queue(stream.root)
|
||||||
|
count = 0;
|
||||||
|
stream.root = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
parser.onError = function (err) {
|
||||||
|
if(err.message.indexOf("at position") > -1)
|
||||||
|
err.message = "Invalid JSON (" + err.message + ")";
|
||||||
|
stream.emit('error', err)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
return stream
|
||||||
|
}
|
||||||
|
|
||||||
|
function check (x, y) {
|
||||||
|
if ('string' === typeof x)
|
||||||
|
return y == x
|
||||||
|
else if (x && 'function' === typeof x.exec)
|
||||||
|
return x.exec(y)
|
||||||
|
else if ('boolean' === typeof x)
|
||||||
|
return x
|
||||||
|
else if ('function' === typeof x)
|
||||||
|
return x(y)
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
exports.stringify = function (op, sep, cl, indent) {
|
||||||
|
indent = indent || 0
|
||||||
|
if (op === false){
|
||||||
|
op = ''
|
||||||
|
sep = '\n'
|
||||||
|
cl = ''
|
||||||
|
} else if (op == null) {
|
||||||
|
|
||||||
|
op = '[\n'
|
||||||
|
sep = '\n,\n'
|
||||||
|
cl = '\n]\n'
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
//else, what ever you like
|
||||||
|
|
||||||
|
var stream
|
||||||
|
, first = true
|
||||||
|
, anyData = false
|
||||||
|
stream = through(function (data) {
|
||||||
|
anyData = true
|
||||||
|
var json = JSON.stringify(data, null, indent)
|
||||||
|
if(first) { first = false ; stream.queue(op + json)}
|
||||||
|
else stream.queue(sep + json)
|
||||||
|
},
|
||||||
|
function (data) {
|
||||||
|
if(!anyData)
|
||||||
|
stream.queue(op)
|
||||||
|
stream.queue(cl)
|
||||||
|
stream.queue(null)
|
||||||
|
})
|
||||||
|
|
||||||
|
return stream
|
||||||
|
}
|
||||||
|
|
||||||
|
exports.stringifyObject = function (op, sep, cl, indent) {
|
||||||
|
indent = indent || 0
|
||||||
|
if (op === false){
|
||||||
|
op = ''
|
||||||
|
sep = '\n'
|
||||||
|
cl = ''
|
||||||
|
} else if (op == null) {
|
||||||
|
|
||||||
|
op = '{\n'
|
||||||
|
sep = '\n,\n'
|
||||||
|
cl = '\n}\n'
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
//else, what ever you like
|
||||||
|
|
||||||
|
var first = true
|
||||||
|
var anyData = false
|
||||||
|
var stream = through(function (data) {
|
||||||
|
anyData = true
|
||||||
|
var json = JSON.stringify(data[0]) + ':' + JSON.stringify(data[1], null, indent)
|
||||||
|
if(first) { first = false ; this.queue(op + json)}
|
||||||
|
else this.queue(sep + json)
|
||||||
|
},
|
||||||
|
function (data) {
|
||||||
|
if(!anyData) this.queue(op)
|
||||||
|
this.queue(cl)
|
||||||
|
|
||||||
|
this.queue(null)
|
||||||
|
})
|
||||||
|
|
||||||
|
return stream
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!module.parent && process.title !== 'browser') {
|
||||||
|
process.stdin
|
||||||
|
.pipe(exports.parse(process.argv[2]))
|
||||||
|
.pipe(exports.stringify('[', ',\n', ']\n', 2))
|
||||||
|
.pipe(process.stdout)
|
||||||
|
}
|
100
src/node_modules/JSONStream/package.json
generated
vendored
Normal file
100
src/node_modules/JSONStream/package.json
generated
vendored
Normal file
@ -0,0 +1,100 @@
|
|||||||
|
{
|
||||||
|
"_args": [
|
||||||
|
[
|
||||||
|
"JSONStream@^1.0.3",
|
||||||
|
"/media/Github/Vertinext2/src/node_modules/browserify"
|
||||||
|
]
|
||||||
|
],
|
||||||
|
"_from": "JSONStream@>=1.0.3 <2.0.0",
|
||||||
|
"_id": "JSONStream@1.0.7",
|
||||||
|
"_inCache": true,
|
||||||
|
"_installable": true,
|
||||||
|
"_location": "/JSONStream",
|
||||||
|
"_nodeVersion": "4.2.1",
|
||||||
|
"_npmUser": {
|
||||||
|
"email": "dominic.tarr@gmail.com",
|
||||||
|
"name": "dominictarr"
|
||||||
|
},
|
||||||
|
"_npmVersion": "2.14.8",
|
||||||
|
"_phantomChildren": {},
|
||||||
|
"_requested": {
|
||||||
|
"name": "JSONStream",
|
||||||
|
"raw": "JSONStream@^1.0.3",
|
||||||
|
"rawSpec": "^1.0.3",
|
||||||
|
"scope": null,
|
||||||
|
"spec": ">=1.0.3 <2.0.0",
|
||||||
|
"type": "range"
|
||||||
|
},
|
||||||
|
"_requiredBy": [
|
||||||
|
"/browser-pack",
|
||||||
|
"/browserify",
|
||||||
|
"/deps-sort",
|
||||||
|
"/insert-module-globals",
|
||||||
|
"/module-deps"
|
||||||
|
],
|
||||||
|
"_resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.0.7.tgz",
|
||||||
|
"_shasum": "700c8e4711fef1ce421f650bead55235bb21d7de",
|
||||||
|
"_shrinkwrap": null,
|
||||||
|
"_spec": "JSONStream@^1.0.3",
|
||||||
|
"_where": "/media/Github/Vertinext2/src/node_modules/browserify",
|
||||||
|
"author": {
|
||||||
|
"email": "dominic.tarr@gmail.com",
|
||||||
|
"name": "Dominic Tarr",
|
||||||
|
"url": "http://bit.ly/dominictarr"
|
||||||
|
},
|
||||||
|
"bin": {
|
||||||
|
"JSONStream": "./index.js"
|
||||||
|
},
|
||||||
|
"bugs": {
|
||||||
|
"url": "https://github.com/dominictarr/JSONStream/issues"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"jsonparse": "^1.1.0",
|
||||||
|
"through": ">=2.2.7 <3"
|
||||||
|
},
|
||||||
|
"description": "rawStream.pipe(JSONStream.parse()).pipe(streamOfObjects)",
|
||||||
|
"devDependencies": {
|
||||||
|
"assertions": "~2.2.2",
|
||||||
|
"event-stream": "~0.7.0",
|
||||||
|
"it-is": "~1",
|
||||||
|
"render": "~0.1.1",
|
||||||
|
"tape": "~2.12.3",
|
||||||
|
"trees": "~0.0.3"
|
||||||
|
},
|
||||||
|
"directories": {},
|
||||||
|
"dist": {
|
||||||
|
"shasum": "700c8e4711fef1ce421f650bead55235bb21d7de",
|
||||||
|
"tarball": "http://registry.npmjs.org/JSONStream/-/JSONStream-1.0.7.tgz"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": "*"
|
||||||
|
},
|
||||||
|
"gitHead": "d02b9d588241f05271190b174c23f0c3846edf9c",
|
||||||
|
"homepage": "http://github.com/dominictarr/JSONStream",
|
||||||
|
"keywords": [
|
||||||
|
"json",
|
||||||
|
"stream",
|
||||||
|
"streaming",
|
||||||
|
"parser",
|
||||||
|
"async",
|
||||||
|
"parsing"
|
||||||
|
],
|
||||||
|
"license": "(MIT OR Apache-2.0)",
|
||||||
|
"maintainers": [
|
||||||
|
{
|
||||||
|
"email": "dominic.tarr@gmail.com",
|
||||||
|
"name": "dominictarr"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": "JSONStream",
|
||||||
|
"optionalDependencies": {},
|
||||||
|
"readme": "ERROR: No README data found!",
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "git://github.com/dominictarr/JSONStream.git"
|
||||||
|
},
|
||||||
|
"scripts": {
|
||||||
|
"test": "set -e; for t in test/*.js; do echo '***' $t '***'; node $t; done"
|
||||||
|
},
|
||||||
|
"version": "1.0.7"
|
||||||
|
}
|
172
src/node_modules/JSONStream/readme.markdown
generated
vendored
Normal file
172
src/node_modules/JSONStream/readme.markdown
generated
vendored
Normal file
@ -0,0 +1,172 @@
|
|||||||
|
# JSONStream
|
||||||
|
|
||||||
|
streaming JSON.parse and stringify
|
||||||
|
|
||||||
|
![](https://secure.travis-ci.org/dominictarr/JSONStream.png?branch=master)
|
||||||
|
|
||||||
|
## example
|
||||||
|
|
||||||
|
``` js
|
||||||
|
|
||||||
|
var request = require('request')
|
||||||
|
, JSONStream = require('JSONStream')
|
||||||
|
, es = require('event-stream')
|
||||||
|
|
||||||
|
request({url: 'http://isaacs.couchone.com/registry/_all_docs'})
|
||||||
|
.pipe(JSONStream.parse('rows.*'))
|
||||||
|
.pipe(es.mapSync(function (data) {
|
||||||
|
console.error(data)
|
||||||
|
return data
|
||||||
|
}))
|
||||||
|
```
|
||||||
|
|
||||||
|
## JSONStream.parse(path)
|
||||||
|
|
||||||
|
parse stream of values that match a path
|
||||||
|
|
||||||
|
``` js
|
||||||
|
JSONStream.parse('rows.*.doc')
|
||||||
|
```
|
||||||
|
|
||||||
|
The `..` operator is the recursive descent operator from [JSONPath](http://goessner.net/articles/JsonPath/), which will match a child at any depth (see examples below).
|
||||||
|
|
||||||
|
If your keys have keys that include `.` or `*` etc, use an array instead.
|
||||||
|
`['row', true, /^doc/]`.
|
||||||
|
|
||||||
|
If you use an array, `RegExp`s, booleans, and/or functions. The `..` operator is also available in array representation, using `{recurse: true}`.
|
||||||
|
any object that matches the path will be emitted as 'data' (and `pipe`d down stream)
|
||||||
|
|
||||||
|
If `path` is empty or null, no 'data' events are emitted.
|
||||||
|
|
||||||
|
### Examples
|
||||||
|
|
||||||
|
query a couchdb view:
|
||||||
|
|
||||||
|
``` bash
|
||||||
|
curl -sS localhost:5984/tests/_all_docs&include_docs=true
|
||||||
|
```
|
||||||
|
you will get something like this:
|
||||||
|
|
||||||
|
``` js
|
||||||
|
{"total_rows":129,"offset":0,"rows":[
|
||||||
|
{ "id":"change1_0.6995461115147918"
|
||||||
|
, "key":"change1_0.6995461115147918"
|
||||||
|
, "value":{"rev":"1-e240bae28c7bb3667f02760f6398d508"}
|
||||||
|
, "doc":{
|
||||||
|
"_id": "change1_0.6995461115147918"
|
||||||
|
, "_rev": "1-e240bae28c7bb3667f02760f6398d508","hello":1}
|
||||||
|
},
|
||||||
|
{ "id":"change2_0.6995461115147918"
|
||||||
|
, "key":"change2_0.6995461115147918"
|
||||||
|
, "value":{"rev":"1-13677d36b98c0c075145bb8975105153"}
|
||||||
|
, "doc":{
|
||||||
|
"_id":"change2_0.6995461115147918"
|
||||||
|
, "_rev":"1-13677d36b98c0c075145bb8975105153"
|
||||||
|
, "hello":2
|
||||||
|
}
|
||||||
|
},
|
||||||
|
]}
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
we are probably most interested in the `rows.*.doc`
|
||||||
|
|
||||||
|
create a `Stream` that parses the documents from the feed like this:
|
||||||
|
|
||||||
|
``` js
|
||||||
|
var stream = JSONStream.parse(['rows', true, 'doc']) //rows, ANYTHING, doc
|
||||||
|
|
||||||
|
stream.on('data', function(data) {
|
||||||
|
console.log('received:', data);
|
||||||
|
});
|
||||||
|
```
|
||||||
|
awesome!
|
||||||
|
|
||||||
|
### recursive patterns (..)
|
||||||
|
|
||||||
|
`JSONStream.parse('docs..value')`
|
||||||
|
(or `JSONStream.parse(['docs', {recurse: true}, 'value'])` using an array)
|
||||||
|
will emit every `value` object that is a child, grand-child, etc. of the
|
||||||
|
`docs` object. In this example, it will match exactly 5 times at various depth
|
||||||
|
levels, emitting 0, 1, 2, 3 and 4 as results.
|
||||||
|
|
||||||
|
```js
|
||||||
|
{
|
||||||
|
"total": 5,
|
||||||
|
"docs": [
|
||||||
|
{
|
||||||
|
"key": {
|
||||||
|
"value": 0,
|
||||||
|
"some": "property"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{"value": 1},
|
||||||
|
{"value": 2},
|
||||||
|
{"blbl": [{}, {"a":0, "b":1, "value":3}, 10]},
|
||||||
|
{"value": 4}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## JSONStream.parse(pattern, map)
|
||||||
|
|
||||||
|
provide a function that can be used to map or filter
|
||||||
|
the json output. `map` is passed the value at that node of the pattern,
|
||||||
|
if `map` return non-nullish (anything but `null` or `undefined`)
|
||||||
|
that value will be emitted in the stream. If it returns a nullish value,
|
||||||
|
nothing will be emitted.
|
||||||
|
|
||||||
|
## JSONStream.stringify(open, sep, close)
|
||||||
|
|
||||||
|
Create a writable stream.
|
||||||
|
|
||||||
|
you may pass in custom `open`, `close`, and `seperator` strings.
|
||||||
|
But, by default, `JSONStream.stringify()` will create an array,
|
||||||
|
(with default options `open='[\n', sep='\n,\n', close='\n]\n'`)
|
||||||
|
|
||||||
|
If you call `JSONStream.stringify(false)`
|
||||||
|
the elements will only be seperated by a newline.
|
||||||
|
|
||||||
|
If you only write one item this will be valid JSON.
|
||||||
|
|
||||||
|
If you write many items,
|
||||||
|
you can use a `RegExp` to split it into valid chunks.
|
||||||
|
|
||||||
|
## JSONStream.stringifyObject(open, sep, close)
|
||||||
|
|
||||||
|
Very much like `JSONStream.stringify`,
|
||||||
|
but creates a writable stream for objects instead of arrays.
|
||||||
|
|
||||||
|
Accordingly, `open='{\n', sep='\n,\n', close='\n}\n'`.
|
||||||
|
|
||||||
|
When you `.write()` to the stream you must supply an array with `[ key, data ]`
|
||||||
|
as the first argument.
|
||||||
|
|
||||||
|
## unix tool
|
||||||
|
|
||||||
|
query npm to see all the modules that browserify has ever depended on.
|
||||||
|
|
||||||
|
``` bash
|
||||||
|
curl https://registry.npmjs.org/browserify | JSONStream 'versions.*.dependencies'
|
||||||
|
```
|
||||||
|
|
||||||
|
## numbers
|
||||||
|
|
||||||
|
There are occasional problems parsing and unparsing very precise numbers.
|
||||||
|
|
||||||
|
I have opened an issue here:
|
||||||
|
|
||||||
|
https://github.com/creationix/jsonparse/issues/2
|
||||||
|
|
||||||
|
+1
|
||||||
|
|
||||||
|
## Acknowlegements
|
||||||
|
|
||||||
|
this module depends on https://github.com/creationix/jsonparse
|
||||||
|
by Tim Caswell
|
||||||
|
and also thanks to Florent Jaby for teaching me about parsing with:
|
||||||
|
https://github.com/Floby/node-json-streams
|
||||||
|
|
||||||
|
## license
|
||||||
|
|
||||||
|
Dual-licensed under the MIT License or the Apache License, version 2.0
|
41
src/node_modules/JSONStream/test/bool.js
generated
vendored
Normal file
41
src/node_modules/JSONStream/test/bool.js
generated
vendored
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
|
||||||
|
var fs = require ('fs')
|
||||||
|
, join = require('path').join
|
||||||
|
, file = join(__dirname, 'fixtures','all_npm.json')
|
||||||
|
, JSONStream = require('../')
|
||||||
|
, it = require('it-is').style('colour')
|
||||||
|
|
||||||
|
function randomObj () {
|
||||||
|
return (
|
||||||
|
Math.random () < 0.4
|
||||||
|
? {hello: 'eonuhckmqjk',
|
||||||
|
whatever: 236515,
|
||||||
|
lies: true,
|
||||||
|
nothing: [null],
|
||||||
|
// stuff: [Math.random(),Math.random(),Math.random()]
|
||||||
|
}
|
||||||
|
: ['AOREC', 'reoubaor', {ouec: 62642}, [[[], {}, 53]]]
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
var expected = []
|
||||||
|
, stringify = JSONStream.stringify()
|
||||||
|
, es = require('event-stream')
|
||||||
|
, stringified = ''
|
||||||
|
, called = 0
|
||||||
|
, count = 10
|
||||||
|
, ended = false
|
||||||
|
|
||||||
|
while (count --)
|
||||||
|
expected.push(randomObj())
|
||||||
|
|
||||||
|
es.connect(
|
||||||
|
es.readArray(expected),
|
||||||
|
stringify,
|
||||||
|
JSONStream.parse([true]),
|
||||||
|
es.writeArray(function (err, lines) {
|
||||||
|
|
||||||
|
it(lines).has(expected)
|
||||||
|
console.error('PASSED')
|
||||||
|
})
|
||||||
|
)
|
18
src/node_modules/JSONStream/test/browser.js
generated
vendored
Normal file
18
src/node_modules/JSONStream/test/browser.js
generated
vendored
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
var test = require('tape')
|
||||||
|
var JSONStream = require('../')
|
||||||
|
var testData = '{"rows":[{"hello":"world"}, {"foo": "bar"}]}'
|
||||||
|
|
||||||
|
test('basic parsing', function (t) {
|
||||||
|
t.plan(2)
|
||||||
|
var parsed = JSONStream.parse("rows.*")
|
||||||
|
var parsedKeys = {}
|
||||||
|
parsed.on('data', function(match) {
|
||||||
|
parsedKeys[Object.keys(match)[0]] = true
|
||||||
|
})
|
||||||
|
parsed.on('end', function() {
|
||||||
|
t.equal(!!parsedKeys['hello'], true)
|
||||||
|
t.equal(!!parsedKeys['foo'], true)
|
||||||
|
})
|
||||||
|
parsed.write(testData)
|
||||||
|
parsed.end()
|
||||||
|
})
|
27
src/node_modules/JSONStream/test/destroy_missing.js
generated
vendored
Normal file
27
src/node_modules/JSONStream/test/destroy_missing.js
generated
vendored
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
var fs = require ('fs');
|
||||||
|
var net = require('net');
|
||||||
|
var join = require('path').join;
|
||||||
|
var file = join(__dirname, 'fixtures','all_npm.json');
|
||||||
|
var JSONStream = require('../');
|
||||||
|
|
||||||
|
|
||||||
|
var server = net.createServer(function(client) {
|
||||||
|
var parser = JSONStream.parse([]);
|
||||||
|
parser.on('end', function() {
|
||||||
|
console.log('close')
|
||||||
|
console.error('PASSED');
|
||||||
|
server.close();
|
||||||
|
});
|
||||||
|
client.pipe(parser);
|
||||||
|
var n = 4
|
||||||
|
client.on('data', function () {
|
||||||
|
if(--n) return
|
||||||
|
client.end();
|
||||||
|
})
|
||||||
|
});
|
||||||
|
server.listen(9999);
|
||||||
|
|
||||||
|
|
||||||
|
var client = net.connect({ port : 9999 }, function() {
|
||||||
|
fs.createReadStream(file).pipe(client).on('data', console.log) //.resume();
|
||||||
|
});
|
29
src/node_modules/JSONStream/test/disabled/doubledot1.js
generated
vendored
Normal file
29
src/node_modules/JSONStream/test/disabled/doubledot1.js
generated
vendored
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
var fs = require ('fs')
|
||||||
|
, join = require('path').join
|
||||||
|
, file = join(__dirname, 'fixtures','all_npm.json')
|
||||||
|
, JSONStream = require('../')
|
||||||
|
, it = require('it-is')
|
||||||
|
|
||||||
|
var expected = JSON.parse(fs.readFileSync(file))
|
||||||
|
, parser = JSONStream.parse('rows..rev')
|
||||||
|
, called = 0
|
||||||
|
, ended = false
|
||||||
|
, parsed = []
|
||||||
|
|
||||||
|
fs.createReadStream(file).pipe(parser)
|
||||||
|
|
||||||
|
parser.on('data', function (data) {
|
||||||
|
called ++
|
||||||
|
parsed.push(data)
|
||||||
|
})
|
||||||
|
|
||||||
|
parser.on('end', function () {
|
||||||
|
ended = true
|
||||||
|
})
|
||||||
|
|
||||||
|
process.on('exit', function () {
|
||||||
|
it(called).equal(expected.rows.length)
|
||||||
|
for (var i = 0 ; i < expected.rows.length ; i++)
|
||||||
|
it(parsed[i]).deepEqual(expected.rows[i].value.rev)
|
||||||
|
console.error('PASSED')
|
||||||
|
})
|
29
src/node_modules/JSONStream/test/disabled/doubledot2.js
generated
vendored
Normal file
29
src/node_modules/JSONStream/test/disabled/doubledot2.js
generated
vendored
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
var fs = require ('fs')
|
||||||
|
, join = require('path').join
|
||||||
|
, file = join(__dirname, 'fixtures','depth.json')
|
||||||
|
, JSONStream = require('../')
|
||||||
|
, it = require('it-is')
|
||||||
|
|
||||||
|
var expected = JSON.parse(fs.readFileSync(file))
|
||||||
|
, parser = JSONStream.parse(['docs', {recurse: true}, 'value'])
|
||||||
|
, called = 0
|
||||||
|
, ended = false
|
||||||
|
, parsed = []
|
||||||
|
|
||||||
|
fs.createReadStream(file).pipe(parser)
|
||||||
|
|
||||||
|
parser.on('data', function (data) {
|
||||||
|
called ++
|
||||||
|
parsed.push(data)
|
||||||
|
})
|
||||||
|
|
||||||
|
parser.on('end', function () {
|
||||||
|
ended = true
|
||||||
|
})
|
||||||
|
|
||||||
|
process.on('exit', function () {
|
||||||
|
it(called).equal(5)
|
||||||
|
for (var i = 0 ; i < 5 ; i++)
|
||||||
|
it(parsed[i]).deepEqual(i)
|
||||||
|
console.error('PASSED')
|
||||||
|
})
|
44
src/node_modules/JSONStream/test/empty.js
generated
vendored
Normal file
44
src/node_modules/JSONStream/test/empty.js
generated
vendored
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
var JSONStream = require('../')
|
||||||
|
, stream = require('stream')
|
||||||
|
, it = require('it-is')
|
||||||
|
|
||||||
|
var output = [ [], [] ]
|
||||||
|
|
||||||
|
var parser1 = JSONStream.parse(['docs', /./])
|
||||||
|
parser1.on('data', function(data) {
|
||||||
|
output[0].push(data)
|
||||||
|
})
|
||||||
|
|
||||||
|
var parser2 = JSONStream.parse(['docs', /./])
|
||||||
|
parser2.on('data', function(data) {
|
||||||
|
output[1].push(data)
|
||||||
|
})
|
||||||
|
|
||||||
|
var pending = 2
|
||||||
|
function onend () {
|
||||||
|
if (--pending > 0) return
|
||||||
|
it(output).deepEqual([
|
||||||
|
[], [{hello: 'world'}]
|
||||||
|
])
|
||||||
|
console.error('PASSED')
|
||||||
|
}
|
||||||
|
parser1.on('end', onend)
|
||||||
|
parser2.on('end', onend)
|
||||||
|
|
||||||
|
function makeReadableStream() {
|
||||||
|
var readStream = new stream.Stream()
|
||||||
|
readStream.readable = true
|
||||||
|
readStream.write = function (data) { this.emit('data', data) }
|
||||||
|
readStream.end = function (data) { this.emit('end') }
|
||||||
|
return readStream
|
||||||
|
}
|
||||||
|
|
||||||
|
var emptyArray = makeReadableStream()
|
||||||
|
emptyArray.pipe(parser1)
|
||||||
|
emptyArray.write('{"docs":[]}')
|
||||||
|
emptyArray.end()
|
||||||
|
|
||||||
|
var objectArray = makeReadableStream()
|
||||||
|
objectArray.pipe(parser2)
|
||||||
|
objectArray.write('{"docs":[{"hello":"world"}]}')
|
||||||
|
objectArray.end()
|
4030
src/node_modules/JSONStream/test/fixtures/all_npm.json
generated
vendored
Normal file
4030
src/node_modules/JSONStream/test/fixtures/all_npm.json
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
15
src/node_modules/JSONStream/test/fixtures/depth.json
generated
vendored
Normal file
15
src/node_modules/JSONStream/test/fixtures/depth.json
generated
vendored
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
{
|
||||||
|
"total": 5,
|
||||||
|
"docs": [
|
||||||
|
{
|
||||||
|
"key": {
|
||||||
|
"value": 0,
|
||||||
|
"some": "property"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{"value": 1},
|
||||||
|
{"value": 2},
|
||||||
|
{"blbl": [{}, {"a":0, "b":1, "value":3}, 10]},
|
||||||
|
{"value": 4}
|
||||||
|
]
|
||||||
|
}
|
39
src/node_modules/JSONStream/test/fn.js
generated
vendored
Normal file
39
src/node_modules/JSONStream/test/fn.js
generated
vendored
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
|
||||||
|
|
||||||
|
var fs = require ('fs')
|
||||||
|
, join = require('path').join
|
||||||
|
, file = join(__dirname, 'fixtures','all_npm.json')
|
||||||
|
, JSONStream = require('../')
|
||||||
|
, it = require('it-is')
|
||||||
|
|
||||||
|
function fn (s) {
|
||||||
|
return !isNaN(parseInt(s, 10))
|
||||||
|
}
|
||||||
|
|
||||||
|
var expected = JSON.parse(fs.readFileSync(file))
|
||||||
|
, parser = JSONStream.parse(['rows', fn])
|
||||||
|
, called = 0
|
||||||
|
, ended = false
|
||||||
|
, parsed = []
|
||||||
|
|
||||||
|
fs.createReadStream(file).pipe(parser)
|
||||||
|
|
||||||
|
parser.on('data', function (data) {
|
||||||
|
called ++
|
||||||
|
it.has({
|
||||||
|
id: it.typeof('string'),
|
||||||
|
value: {rev: it.typeof('string')},
|
||||||
|
key:it.typeof('string')
|
||||||
|
})
|
||||||
|
parsed.push(data)
|
||||||
|
})
|
||||||
|
|
||||||
|
parser.on('end', function () {
|
||||||
|
ended = true
|
||||||
|
})
|
||||||
|
|
||||||
|
process.on('exit', function () {
|
||||||
|
it(called).equal(expected.rows.length)
|
||||||
|
it(parsed).deepEqual(expected.rows)
|
||||||
|
console.error('PASSED')
|
||||||
|
})
|
135
src/node_modules/JSONStream/test/gen.js
generated
vendored
Normal file
135
src/node_modules/JSONStream/test/gen.js
generated
vendored
Normal file
@ -0,0 +1,135 @@
|
|||||||
|
return // dont run this test for now since tape is weird and broken on 0.10
|
||||||
|
|
||||||
|
var fs = require('fs')
|
||||||
|
var JSONStream = require('../')
|
||||||
|
var file = process.argv[2] || '/tmp/JSONStream-test-large.json'
|
||||||
|
var size = Number(process.argv[3] || 100000)
|
||||||
|
var tape = require('tape')
|
||||||
|
// if (process.title !== 'browser') {
|
||||||
|
tape('out of mem', function (t) {
|
||||||
|
t.plan(1)
|
||||||
|
//////////////////////////////////////////////////////
|
||||||
|
// Produces a random number between arg1 and arg2
|
||||||
|
//////////////////////////////////////////////////////
|
||||||
|
var randomNumber = function (min, max) {
|
||||||
|
var number = Math.floor(Math.random() * (max - min + 1) + min);
|
||||||
|
return number;
|
||||||
|
};
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////
|
||||||
|
// Produces a random string of a length between arg1 and arg2
|
||||||
|
//////////////////////////////////////////////////////
|
||||||
|
var randomString = function (min, max) {
|
||||||
|
|
||||||
|
// add several spaces to increase chanses of creating 'words'
|
||||||
|
var chars = ' 0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
|
||||||
|
var result = '';
|
||||||
|
|
||||||
|
var randomLength = randomNumber(min, max);
|
||||||
|
|
||||||
|
for (var i = randomLength; i > 0; --i) {
|
||||||
|
result += chars[Math.round(Math.random() * (chars.length - 1))];
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
};
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////
|
||||||
|
// Produces a random JSON document, as a string
|
||||||
|
//////////////////////////////////////////////////////
|
||||||
|
var randomJsonDoc = function () {
|
||||||
|
|
||||||
|
var doc = {
|
||||||
|
"CrashOccurenceID": randomNumber(10000, 50000),
|
||||||
|
"CrashID": randomNumber(1000, 10000),
|
||||||
|
"SiteName": randomString(10, 25),
|
||||||
|
"MachineName": randomString(10, 25),
|
||||||
|
"Date": randomString(26, 26),
|
||||||
|
"ProcessDuration": randomString(18, 18),
|
||||||
|
"ThreadIdentityName": null,
|
||||||
|
"WindowsIdentityName": randomString(15, 40),
|
||||||
|
"OperatingSystemName": randomString(35, 65),
|
||||||
|
"DetailedExceptionInformation": randomString(100, 800)
|
||||||
|
};
|
||||||
|
|
||||||
|
doc = JSON.stringify(doc);
|
||||||
|
doc = doc.replace(/\,/g, ',\n'); // add new lines after each attribute
|
||||||
|
return doc;
|
||||||
|
};
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////
|
||||||
|
// generates test data
|
||||||
|
//////////////////////////////////////////////////////
|
||||||
|
var generateTestData = function (cb) {
|
||||||
|
|
||||||
|
console.log('generating large data file...');
|
||||||
|
|
||||||
|
var stream = fs.createWriteStream(file, {
|
||||||
|
encoding: 'utf8'
|
||||||
|
});
|
||||||
|
|
||||||
|
var i = 0;
|
||||||
|
var max = size;
|
||||||
|
var writing = false
|
||||||
|
var split = ',\n';
|
||||||
|
var doc = randomJsonDoc();
|
||||||
|
stream.write('[');
|
||||||
|
|
||||||
|
function write () {
|
||||||
|
if(writing) return
|
||||||
|
writing = true
|
||||||
|
while(++i < max) {
|
||||||
|
if(Math.random() < 0.001)
|
||||||
|
console.log('generate..', i + ' / ' + size)
|
||||||
|
if(!stream.write(doc + split)) {
|
||||||
|
writing = false
|
||||||
|
return stream.once('drain', write)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stream.write(doc + ']')
|
||||||
|
stream.end();
|
||||||
|
console.log('END')
|
||||||
|
}
|
||||||
|
write()
|
||||||
|
stream.on('close', cb)
|
||||||
|
};
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////
|
||||||
|
// Shows that parsing 100000 instances using JSONStream fails
|
||||||
|
//
|
||||||
|
// After several seconds, you will get this crash
|
||||||
|
// FATAL ERROR: JS Allocation failed - process out of memory
|
||||||
|
//////////////////////////////////////////////////////
|
||||||
|
var testJSONStreamParse_causesOutOfMem = function (done) {
|
||||||
|
var items = 0
|
||||||
|
console.log('parsing data files using JSONStream...');
|
||||||
|
|
||||||
|
var parser = JSONStream.parse([true]);
|
||||||
|
var stream = fs.createReadStream(file);
|
||||||
|
stream.pipe(parser);
|
||||||
|
|
||||||
|
parser.on('data', function (data) {
|
||||||
|
items++
|
||||||
|
if(Math.random() < 0.01) console.log(items, '...')
|
||||||
|
});
|
||||||
|
|
||||||
|
parser.on('end', function () {
|
||||||
|
t.equal(items, size)
|
||||||
|
});
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////
|
||||||
|
// main
|
||||||
|
//////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
fs.stat(file, function (err, stat) {
|
||||||
|
console.log(stat)
|
||||||
|
if(err)
|
||||||
|
generateTestData(testJSONStreamParse_causesOutOfMem);
|
||||||
|
else
|
||||||
|
testJSONStreamParse_causesOutOfMem()
|
||||||
|
})
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
// }
|
20
src/node_modules/JSONStream/test/issues.js
generated
vendored
Normal file
20
src/node_modules/JSONStream/test/issues.js
generated
vendored
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
var JSONStream = require('../');
|
||||||
|
var test = require('tape')
|
||||||
|
|
||||||
|
test('#66', function (t) {
|
||||||
|
var error = 0;
|
||||||
|
var stream = JSONStream
|
||||||
|
.parse()
|
||||||
|
.on('error', function (err) {
|
||||||
|
t.ok(err);
|
||||||
|
error++;
|
||||||
|
})
|
||||||
|
.on('end', function () {
|
||||||
|
t.ok(error === 1);
|
||||||
|
t.end();
|
||||||
|
});
|
||||||
|
|
||||||
|
stream.write('["foo":bar[');
|
||||||
|
stream.end();
|
||||||
|
|
||||||
|
});
|
40
src/node_modules/JSONStream/test/map.js
generated
vendored
Normal file
40
src/node_modules/JSONStream/test/map.js
generated
vendored
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
|
||||||
|
var test = require('tape')
|
||||||
|
|
||||||
|
var JSONStream = require('../')
|
||||||
|
|
||||||
|
test('map function', function (t) {
|
||||||
|
|
||||||
|
var actual = []
|
||||||
|
|
||||||
|
stream = JSONStream.parse([true], function (e) { return e*10 })
|
||||||
|
stream.on('data', function (v) { actual.push(v)})
|
||||||
|
stream.on('end', function () {
|
||||||
|
t.deepEqual(actual, [10,20,30,40,50,60])
|
||||||
|
t.end()
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
stream.write(JSON.stringify([1,2,3,4,5,6], null, 2))
|
||||||
|
stream.end()
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
test('filter function', function (t) {
|
||||||
|
|
||||||
|
var actual = []
|
||||||
|
|
||||||
|
stream = JSONStream
|
||||||
|
.parse([true], function (e) { return e%2 ? e : null})
|
||||||
|
.on('data', function (v) { actual.push(v)})
|
||||||
|
.on('end', function () {
|
||||||
|
t.deepEqual(actual, [1,3,5])
|
||||||
|
t.end()
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
stream.write(JSON.stringify([1,2,3,4,5,6], null, 2))
|
||||||
|
stream.end()
|
||||||
|
|
||||||
|
})
|
||||||
|
|
36
src/node_modules/JSONStream/test/multiple_objects.js
generated
vendored
Normal file
36
src/node_modules/JSONStream/test/multiple_objects.js
generated
vendored
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
var fs = require ('fs');
|
||||||
|
var net = require('net');
|
||||||
|
var join = require('path').join;
|
||||||
|
var file = join(__dirname, 'fixtures','all_npm.json');
|
||||||
|
var it = require('it-is');
|
||||||
|
var JSONStream = require('../');
|
||||||
|
|
||||||
|
var str = fs.readFileSync(file);
|
||||||
|
|
||||||
|
var datas = {}
|
||||||
|
|
||||||
|
var server = net.createServer(function(client) {
|
||||||
|
var data_calls = 0;
|
||||||
|
var parser = JSONStream.parse(['rows', true, 'key']);
|
||||||
|
parser.on('data', function(data) {
|
||||||
|
++ data_calls;
|
||||||
|
datas[data] = (datas[data] || 0) + 1
|
||||||
|
it(data).typeof('string')
|
||||||
|
});
|
||||||
|
|
||||||
|
parser.on('end', function() {
|
||||||
|
console.log('END')
|
||||||
|
var min = Infinity
|
||||||
|
for (var d in datas)
|
||||||
|
min = min > datas[d] ? datas[d] : min
|
||||||
|
it(min).equal(3);
|
||||||
|
server.close();
|
||||||
|
});
|
||||||
|
client.pipe(parser);
|
||||||
|
});
|
||||||
|
server.listen(9999);
|
||||||
|
|
||||||
|
var client = net.connect({ port : 9999 }, function() {
|
||||||
|
var msgs = str + ' ' + str + '\n\n' + str
|
||||||
|
client.end(msgs);
|
||||||
|
});
|
29
src/node_modules/JSONStream/test/multiple_objects_error.js
generated
vendored
Normal file
29
src/node_modules/JSONStream/test/multiple_objects_error.js
generated
vendored
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
var fs = require ('fs');
|
||||||
|
var net = require('net');
|
||||||
|
var join = require('path').join;
|
||||||
|
var file = join(__dirname, 'fixtures','all_npm.json');
|
||||||
|
var it = require('it-is');
|
||||||
|
var JSONStream = require('../');
|
||||||
|
|
||||||
|
var str = fs.readFileSync(file);
|
||||||
|
|
||||||
|
var server = net.createServer(function(client) {
|
||||||
|
var data_calls = 0;
|
||||||
|
var parser = JSONStream.parse();
|
||||||
|
parser.on('error', function(err) {
|
||||||
|
console.log(err);
|
||||||
|
server.close();
|
||||||
|
});
|
||||||
|
|
||||||
|
parser.on('end', function() {
|
||||||
|
console.log('END');
|
||||||
|
server.close();
|
||||||
|
});
|
||||||
|
client.pipe(parser);
|
||||||
|
});
|
||||||
|
server.listen(9999);
|
||||||
|
|
||||||
|
var client = net.connect({ port : 9999 }, function() {
|
||||||
|
var msgs = str + '}';
|
||||||
|
client.end(msgs);
|
||||||
|
});
|
28
src/node_modules/JSONStream/test/null.js
generated
vendored
Normal file
28
src/node_modules/JSONStream/test/null.js
generated
vendored
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
var JSONStream = require('../')
|
||||||
|
|
||||||
|
var data = [
|
||||||
|
{ID: 1, optional: null},
|
||||||
|
{ID: 2, optional: null},
|
||||||
|
{ID: 3, optional: 20},
|
||||||
|
{ID: 4, optional: null},
|
||||||
|
{ID: 5, optional: 'hello'},
|
||||||
|
{ID: 6, optional: null}
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
var test = require('tape')
|
||||||
|
|
||||||
|
test ('null properties', function (t) {
|
||||||
|
var actual = []
|
||||||
|
var stream =
|
||||||
|
|
||||||
|
JSONStream.parse('*.optional')
|
||||||
|
.on('data', function (v) { actual.push(v) })
|
||||||
|
.on('end', function () {
|
||||||
|
t.deepEqual(actual, [20, 'hello'])
|
||||||
|
t.end()
|
||||||
|
})
|
||||||
|
|
||||||
|
stream.write(JSON.stringify(data, null, 2))
|
||||||
|
stream.end()
|
||||||
|
})
|
28
src/node_modules/JSONStream/test/parsejson.js
generated
vendored
Normal file
28
src/node_modules/JSONStream/test/parsejson.js
generated
vendored
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
sometimes jsonparse changes numbers slightly.
|
||||||
|
*/
|
||||||
|
|
||||||
|
var r = Math.random()
|
||||||
|
, Parser = require('jsonparse')
|
||||||
|
, p = new Parser()
|
||||||
|
, assert = require('assert')
|
||||||
|
, times = 20
|
||||||
|
while (times --) {
|
||||||
|
|
||||||
|
assert.equal(JSON.parse(JSON.stringify(r)), r, 'core JSON')
|
||||||
|
|
||||||
|
p.onValue = function (v) {
|
||||||
|
console.error('parsed', v)
|
||||||
|
assert.equal(
|
||||||
|
String(v).slice(0,12),
|
||||||
|
String(r).slice(0,12)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
console.error('correct', r)
|
||||||
|
p.write (new Buffer(JSON.stringify([r])))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
41
src/node_modules/JSONStream/test/stringify.js
generated
vendored
Normal file
41
src/node_modules/JSONStream/test/stringify.js
generated
vendored
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
|
||||||
|
var fs = require ('fs')
|
||||||
|
, join = require('path').join
|
||||||
|
, file = join(__dirname, 'fixtures','all_npm.json')
|
||||||
|
, JSONStream = require('../')
|
||||||
|
, it = require('it-is').style('colour')
|
||||||
|
|
||||||
|
function randomObj () {
|
||||||
|
return (
|
||||||
|
Math.random () < 0.4
|
||||||
|
? {hello: 'eonuhckmqjk',
|
||||||
|
whatever: 236515,
|
||||||
|
lies: true,
|
||||||
|
nothing: [null],
|
||||||
|
stuff: [Math.random(),Math.random(),Math.random()]
|
||||||
|
}
|
||||||
|
: ['AOREC', 'reoubaor', {ouec: 62642}, [[[], {}, 53]]]
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
var expected = []
|
||||||
|
, stringify = JSONStream.stringify()
|
||||||
|
, es = require('event-stream')
|
||||||
|
, stringified = ''
|
||||||
|
, called = 0
|
||||||
|
, count = 10
|
||||||
|
, ended = false
|
||||||
|
|
||||||
|
while (count --)
|
||||||
|
expected.push(randomObj())
|
||||||
|
|
||||||
|
es.connect(
|
||||||
|
es.readArray(expected),
|
||||||
|
stringify,
|
||||||
|
//JSONStream.parse([/./]),
|
||||||
|
es.writeArray(function (err, lines) {
|
||||||
|
|
||||||
|
it(JSON.parse(lines.join(''))).deepEqual(expected)
|
||||||
|
console.error('PASSED')
|
||||||
|
})
|
||||||
|
)
|
47
src/node_modules/JSONStream/test/stringify_object.js
generated
vendored
Normal file
47
src/node_modules/JSONStream/test/stringify_object.js
generated
vendored
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
|
||||||
|
var fs = require ('fs')
|
||||||
|
, join = require('path').join
|
||||||
|
, file = join(__dirname, 'fixtures','all_npm.json')
|
||||||
|
, JSONStream = require('../')
|
||||||
|
, it = require('it-is').style('colour')
|
||||||
|
, es = require('event-stream')
|
||||||
|
, pending = 10
|
||||||
|
, passed = true
|
||||||
|
|
||||||
|
function randomObj () {
|
||||||
|
return (
|
||||||
|
Math.random () < 0.4
|
||||||
|
? {hello: 'eonuhckmqjk',
|
||||||
|
whatever: 236515,
|
||||||
|
lies: true,
|
||||||
|
nothing: [null],
|
||||||
|
stuff: [Math.random(),Math.random(),Math.random()]
|
||||||
|
}
|
||||||
|
: ['AOREC', 'reoubaor', {ouec: 62642}, [[[], {}, 53]]]
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
for (var ix = 0; ix < pending; ix++) (function (count) {
|
||||||
|
var expected = {}
|
||||||
|
, stringify = JSONStream.stringifyObject()
|
||||||
|
|
||||||
|
es.connect(
|
||||||
|
stringify,
|
||||||
|
es.writeArray(function (err, lines) {
|
||||||
|
it(JSON.parse(lines.join(''))).deepEqual(expected)
|
||||||
|
if (--pending === 0) {
|
||||||
|
console.error('PASSED')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
)
|
||||||
|
|
||||||
|
while (count --) {
|
||||||
|
var key = Math.random().toString(16).slice(2)
|
||||||
|
expected[key] = randomObj()
|
||||||
|
stringify.write([ key, expected[key] ])
|
||||||
|
}
|
||||||
|
|
||||||
|
process.nextTick(function () {
|
||||||
|
stringify.end()
|
||||||
|
})
|
||||||
|
})(ix)
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user