Browse Source

begin mongoDb module entity

Valentin 2 years ago
parent
commit
3ba096f0dd
100 changed files with 13032 additions and 58 deletions
  1. 6 0
      .idea/vcs.xml
  2. 183 58
      .idea/workspace.xml
  3. 8 0
      Application.js
  4. 10 0
      Application.ts
  5. 20 0
      entity/User.js
  6. 21 0
      entity/User.ts
  7. 21 0
      manager/UserManager.js
  8. 6 0
      manager/UserManager.ts
  9. 26 0
      modules/DbCrafty/BaseEntityManager.js
  10. 32 0
      modules/DbCrafty/BaseEntityManager.ts
  11. 33 0
      modules/DbCrafty/ConfiguratorDB.js
  12. 32 0
      modules/DbCrafty/ConfiguratorDB.ts
  13. 18 0
      modules/DbCrafty/MondoDB.js
  14. 15 0
      modules/DbCrafty/MondoDB.ts
  15. 3 0
      modules/DbCrafty/config/db.yml
  16. 5 0
      modules/DbCrafty/config/entity.yml
  17. 15 0
      node_modules/.bin/esparse
  18. 7 0
      node_modules/.bin/esparse.cmd
  19. 15 0
      node_modules/.bin/esvalidate
  20. 7 0
      node_modules/.bin/esvalidate.cmd
  21. 15 0
      node_modules/.bin/js-yaml
  22. 7 0
      node_modules/.bin/js-yaml.cmd
  23. 15 0
      node_modules/.bin/semver
  24. 7 0
      node_modules/.bin/semver.cmd
  25. 179 0
      node_modules/argparse/CHANGELOG.md
  26. 21 0
      node_modules/argparse/LICENSE
  27. 253 0
      node_modules/argparse/README.md
  28. 3 0
      node_modules/argparse/index.js
  29. 146 0
      node_modules/argparse/lib/action.js
  30. 53 0
      node_modules/argparse/lib/action/append.js
  31. 47 0
      node_modules/argparse/lib/action/append/constant.js
  32. 40 0
      node_modules/argparse/lib/action/count.js
  33. 47 0
      node_modules/argparse/lib/action/help.js
  34. 50 0
      node_modules/argparse/lib/action/store.js
  35. 43 0
      node_modules/argparse/lib/action/store/constant.js
  36. 27 0
      node_modules/argparse/lib/action/store/false.js
  37. 26 0
      node_modules/argparse/lib/action/store/true.js
  38. 149 0
      node_modules/argparse/lib/action/subparsers.js
  39. 47 0
      node_modules/argparse/lib/action/version.js
  40. 482 0
      node_modules/argparse/lib/action_container.js
  41. 14 0
      node_modules/argparse/lib/argparse.js
  42. 50 0
      node_modules/argparse/lib/argument/error.js
  43. 54 0
      node_modules/argparse/lib/argument/exclusive.js
  44. 75 0
      node_modules/argparse/lib/argument/group.js
  45. 1161 0
      node_modules/argparse/lib/argument_parser.js
  46. 21 0
      node_modules/argparse/lib/const.js
  47. 87 0
      node_modules/argparse/lib/help/added_formatters.js
  48. 795 0
      node_modules/argparse/lib/help/formatter.js
  49. 76 0
      node_modules/argparse/lib/namespace.js
  50. 57 0
      node_modules/argparse/lib/utils.js
  51. 70 0
      node_modules/argparse/package.json
  52. 223 0
      node_modules/async/CHANGELOG.md
  53. 19 0
      node_modules/async/LICENSE
  54. 12 0
      node_modules/async/README.md
  55. 62 0
      node_modules/async/apply.js
  56. 51 0
      node_modules/async/applyEach.js
  57. 37 0
      node_modules/async/applyEachSeries.js
  58. 93 0
      node_modules/async/asyncify.js
  59. 285 0
      node_modules/async/auto.js
  60. 163 0
      node_modules/async/autoInject.js
  61. 17 0
      node_modules/async/bower.json
  62. 95 0
      node_modules/async/cargo.js
  63. 55 0
      node_modules/async/compose.js
  64. 45 0
      node_modules/async/concat.js
  65. 37 0
      node_modules/async/concatSeries.js
  66. 65 0
      node_modules/async/constant.js
  67. 61 0
      node_modules/async/detect.js
  68. 48 0
      node_modules/async/detectLimit.js
  69. 46 0
      node_modules/async/detectSeries.js
  70. 42 0
      node_modules/async/dir.js
  71. 5289 0
      node_modules/async/dist/async.js
  72. 2 0
      node_modules/async/dist/async.min.js
  73. 60 0
      node_modules/async/doDuring.js
  74. 39 0
      node_modules/async/doUntil.js
  75. 54 0
      node_modules/async/doWhilst.js
  76. 71 0
      node_modules/async/during.js
  77. 80 0
      node_modules/async/each.js
  78. 42 0
      node_modules/async/eachLimit.js
  79. 105 0
      node_modules/async/eachOf.js
  80. 39 0
      node_modules/async/eachOfLimit.js
  81. 37 0
      node_modules/async/eachOfSeries.js
  82. 38 0
      node_modules/async/eachSeries.js
  83. 69 0
      node_modules/async/ensureAsync.js
  84. 50 0
      node_modules/async/every.js
  85. 42 0
      node_modules/async/everyLimit.js
  86. 37 0
      node_modules/async/everySeries.js
  87. 45 0
      node_modules/async/filter.js
  88. 37 0
      node_modules/async/filterLimit.js
  89. 35 0
      node_modules/async/filterSeries.js
  90. 61 0
      node_modules/async/forever.js
  91. 505 0
      node_modules/async/index.js
  92. 63 0
      node_modules/async/internal/DoublyLinkedList.js
  93. 33 0
      node_modules/async/internal/applyEach.js
  94. 9 0
      node_modules/async/internal/breakLoop.js
  95. 18 0
      node_modules/async/internal/concat.js
  96. 35 0
      node_modules/async/internal/consoleFunc.js
  97. 50 0
      node_modules/async/internal/createTester.js
  98. 12 0
      node_modules/async/internal/doLimit.js
  99. 19 0
      node_modules/async/internal/doParallel.js
  100. 0 0
      node_modules/async/internal/doParallelLimit.js

+ 6 - 0
.idea/vcs.xml

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="VcsDirectoryMappings">
+    <mapping directory="$PROJECT_DIR$" vcs="Git" />
+  </component>
+</project>

+ 183 - 58
.idea/workspace.xml

@@ -11,41 +11,51 @@
   </component>
   <component name="FileEditorManager">
     <leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
-      <file leaf-file-name="Application.ts" pinned="false" current-in-tab="false">
+      <file leaf-file-name="Application.ts" pinned="false" current-in-tab="true">
         <entry file="file://$PROJECT_DIR$/Application.ts">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="1804">
-              <caret line="142" column="9" lean-forward="true" selection-start-line="142" selection-start-column="9" selection-end-line="142" selection-end-column="9" />
+            <state relative-caret-position="330">
+              <caret line="48" column="31" lean-forward="true" selection-start-line="48" selection-start-column="31" selection-end-line="48" selection-end-column="31" />
               <folding />
             </state>
           </provider>
         </entry>
       </file>
-      <file leaf-file-name="index.twig" pinned="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/views/index.twig">
+      <file leaf-file-name="UserManager.ts" pinned="false" current-in-tab="false">
+        <entry file="file://$PROJECT_DIR$/manager/UserManager.ts">
           <provider selected="true" editor-type-id="text-editor">
             <state relative-caret-position="0">
-              <caret line="0" column="17" lean-forward="true" selection-start-line="0" selection-start-column="17" selection-end-line="0" selection-end-column="17" />
+              <caret line="0" column="25" lean-forward="false" selection-start-line="0" selection-start-column="25" selection-end-line="0" selection-end-column="25" />
               <folding />
             </state>
           </provider>
         </entry>
       </file>
-      <file leaf-file-name="layout.twig" pinned="false" current-in-tab="true">
-        <entry file="file://$PROJECT_DIR$/views/layout.twig">
+      <file leaf-file-name="ConfiguratorDB.ts" pinned="false" current-in-tab="false">
+        <entry file="file://$PROJECT_DIR$/modules/DbCrafty/ConfiguratorDB.ts">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="176">
-              <caret line="8" column="9" lean-forward="true" selection-start-line="8" selection-start-column="9" selection-end-line="8" selection-end-column="9" />
+            <state relative-caret-position="220">
+              <caret line="10" column="54" lean-forward="false" selection-start-line="10" selection-start-column="54" selection-end-line="10" selection-end-column="54" />
               <folding />
             </state>
           </provider>
         </entry>
       </file>
-      <file leaf-file-name="IndexController.ts" pinned="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/routes/IndexController.ts">
+      <file leaf-file-name="BaseEntityManager.ts" pinned="false" current-in-tab="false">
+        <entry file="file://$PROJECT_DIR$/modules/DbCrafty/BaseEntityManager.ts">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="198">
-              <caret line="9" column="43" lean-forward="true" selection-start-line="9" selection-start-column="43" selection-end-line="9" selection-end-column="43" />
+            <state relative-caret-position="286">
+              <caret line="13" column="8" lean-forward="false" selection-start-line="13" selection-start-column="8" selection-end-line="13" selection-end-column="8" />
+              <folding />
+            </state>
+          </provider>
+        </entry>
+      </file>
+      <file leaf-file-name="User.ts" pinned="false" current-in-tab="false">
+        <entry file="file://$PROJECT_DIR$/entity/User.ts">
+          <provider selected="true" editor-type-id="text-editor">
+            <state relative-caret-position="220">
+              <caret line="10" column="30" lean-forward="true" selection-start-line="10" selection-start-column="30" selection-end-line="10" selection-end-column="30" />
               <folding />
             </state>
           </provider>
@@ -66,6 +76,9 @@
       <find>gettype</find>
     </findStrings>
   </component>
+  <component name="Git.Settings">
+    <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
+  </component>
   <component name="IdeDocumentHistory">
     <option name="CHANGED_PATHS">
       <list>
@@ -75,10 +88,20 @@
         <option value="$PROJECT_DIR$/app.ts" />
         <option value="$PROJECT_DIR$/bin/www" />
         <option value="$PROJECT_DIR$/routes/Controller.ts" />
-        <option value="$PROJECT_DIR$/routes/ControllerInterface.ts" />
         <option value="$PROJECT_DIR$/routes/HomeController.ts" />
-        <option value="$PROJECT_DIR$/Application.ts" />
+        <option value="$PROJECT_DIR$/routes/ControllerInterface.ts" />
+        <option value="$PROJECT_DIR$/modules/DbCrafty/model_config.yml" />
+        <option value="$PROJECT_DIR$/modules/DbCrafty/config/db.yml" />
+        <option value="$PROJECT_DIR$/modules/DbCrafty/MondoDB.ts" />
         <option value="$PROJECT_DIR$/routes/IndexController.ts" />
+        <option value="$PROJECT_DIR$/modules/DbCrafty/config/model.yml" />
+        <option value="$PROJECT_DIR$/modules/DbCrafty/BaseModel.ts" />
+        <option value="$PROJECT_DIR$/modules/DbCrafty/ConfiguratorDB.ts" />
+        <option value="$PROJECT_DIR$/model/User.ts" />
+        <option value="$PROJECT_DIR$/modules/DbCrafty/BaseManager.ts" />
+        <option value="$PROJECT_DIR$/manager/UserManager.ts" />
+        <option value="$PROJECT_DIR$/modules/DbCrafty/BaseEntityManager.ts" />
+        <option value="$PROJECT_DIR$/Application.ts" />
       </list>
     </option>
   </component>
@@ -127,29 +150,41 @@
         <subPane>
           <expand>
             <path>
-              <item name="testTS" type="b2602c69:ProjectViewProjectNode" />
-              <item name="testTS" type="2a2b976b:PhpTreeStructureProvider$1" />
+              <item name="Server0" type="b2602c69:ProjectViewProjectNode" />
+              <item name="Server0" type="2a2b976b:PhpTreeStructureProvider$1" />
             </path>
             <path>
-              <item name="testTS" type="b2602c69:ProjectViewProjectNode" />
-              <item name="testTS" type="2a2b976b:PhpTreeStructureProvider$1" />
-              <item name="public" type="2a2b976b:PhpTreeStructureProvider$1" />
+              <item name="Server0" type="b2602c69:ProjectViewProjectNode" />
+              <item name="Server0" type="2a2b976b:PhpTreeStructureProvider$1" />
+              <item name="entity" type="2a2b976b:PhpTreeStructureProvider$1" />
             </path>
             <path>
-              <item name="testTS" type="b2602c69:ProjectViewProjectNode" />
-              <item name="testTS" type="2a2b976b:PhpTreeStructureProvider$1" />
-              <item name="public" type="2a2b976b:PhpTreeStructureProvider$1" />
-              <item name="stylesheets" type="2a2b976b:PhpTreeStructureProvider$1" />
+              <item name="Server0" type="b2602c69:ProjectViewProjectNode" />
+              <item name="Server0" type="2a2b976b:PhpTreeStructureProvider$1" />
+              <item name="manager" type="2a2b976b:PhpTreeStructureProvider$1" />
             </path>
             <path>
-              <item name="testTS" type="b2602c69:ProjectViewProjectNode" />
-              <item name="testTS" type="2a2b976b:PhpTreeStructureProvider$1" />
-              <item name="routes" type="2a2b976b:PhpTreeStructureProvider$1" />
+              <item name="Server0" type="b2602c69:ProjectViewProjectNode" />
+              <item name="Server0" type="2a2b976b:PhpTreeStructureProvider$1" />
+              <item name="modules" type="2a2b976b:PhpTreeStructureProvider$1" />
             </path>
             <path>
-              <item name="testTS" type="b2602c69:ProjectViewProjectNode" />
-              <item name="testTS" type="2a2b976b:PhpTreeStructureProvider$1" />
-              <item name="views" type="2a2b976b:PhpTreeStructureProvider$1" />
+              <item name="Server0" type="b2602c69:ProjectViewProjectNode" />
+              <item name="Server0" type="2a2b976b:PhpTreeStructureProvider$1" />
+              <item name="modules" type="2a2b976b:PhpTreeStructureProvider$1" />
+              <item name="DbCrafty" type="2a2b976b:PhpTreeStructureProvider$1" />
+            </path>
+            <path>
+              <item name="Server0" type="b2602c69:ProjectViewProjectNode" />
+              <item name="Server0" type="2a2b976b:PhpTreeStructureProvider$1" />
+              <item name="modules" type="2a2b976b:PhpTreeStructureProvider$1" />
+              <item name="DbCrafty" type="2a2b976b:PhpTreeStructureProvider$1" />
+              <item name="config" type="2a2b976b:PhpTreeStructureProvider$1" />
+            </path>
+            <path>
+              <item name="Server0" type="b2602c69:ProjectViewProjectNode" />
+              <item name="Server0" type="2a2b976b:PhpTreeStructureProvider$1" />
+              <item name="routes" type="2a2b976b:PhpTreeStructureProvider$1" />
             </path>
           </expand>
           <select />
@@ -164,6 +199,12 @@
     <property name="javascript.nodejs.core.library.configured.version" value="8.4.0" />
     <property name="HbShouldOpenHtmlAsHb" value="" />
     <property name="settings.editor.selected.configurable" value="settings.typescriptcompiler" />
+    <property name="last_opened_file_path" value="$PROJECT_DIR$" />
+  </component>
+  <component name="RecentsManager">
+    <key name="MoveFile.RECENT_KEYS">
+      <recent name="C:\Users\Valentin\Desktop\node\Server0\modules\DbCrafty\config" />
+    </key>
   </component>
   <component name="RunDashboard">
     <option name="ruleStates">
@@ -190,11 +231,12 @@
       <updated>1503247899793</updated>
       <workItem from="1503247901887" duration="2851000" />
       <workItem from="1503250798371" duration="5412000" />
+      <workItem from="1503512388796" duration="7207000" />
     </task>
     <servers />
   </component>
   <component name="TimeTrackingManager">
-    <option name="totallyTimeSpent" value="8263000" />
+    <option name="totallyTimeSpent" value="15470000" />
   </component>
   <component name="ToolWindowManager">
     <frame x="-8" y="-8" width="1936" height="1056" extended-state="6" />
@@ -202,14 +244,14 @@
     <layout>
       <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
       <window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="true" content_ui="tabs" />
-      <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
+      <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
       <window_info id="npm" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
       <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
       <window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
       <window_info id="TypeScript" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
       <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
       <window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
-      <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
+      <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32979852" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
       <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
       <window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
       <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
@@ -223,31 +265,58 @@
   </component>
   <component name="TypeScriptGeneratedFilesManager">
     <option name="version" value="1" />
+    <option name="exactExcludedFiles">
+      <list>
+        <option value="$PROJECT_DIR$/modules/DbCrafty/MondoDB.js" />
+        <option value="$PROJECT_DIR$/modules/DbCrafty/ConfiguratorDB.js" />
+        <option value="$PROJECT_DIR$/manager/UserManager.js" />
+      </list>
+    </option>
   </component>
   <component name="VcsContentAnnotationSettings">
     <option name="myLimit" value="2678400000" />
   </component>
   <component name="XDebuggerManager">
-    <breakpoint-manager />
+    <breakpoint-manager>
+      <option name="time" value="1" />
+    </breakpoint-manager>
     <watches-manager />
   </component>
   <component name="editorHistoryManager">
-    <entry file="file://$PROJECT_DIR$/bin/www">
+    <entry file="file://$PROJECT_DIR$/Application.ts">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="3124">
+          <caret line="142" column="9" lean-forward="true" selection-start-line="142" selection-start-column="9" selection-end-line="142" selection-end-column="9" />
+          <folding />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/views/index.twig">
       <provider selected="true" editor-type-id="text-editor">
         <state relative-caret-position="0">
-          <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
+          <caret line="0" column="17" lean-forward="true" selection-start-line="0" selection-start-column="17" selection-end-line="0" selection-end-column="17" />
           <folding />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/bin/www">
+    <entry file="file://$PROJECT_DIR$/routes/IndexController.ts">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="132">
-          <caret line="6" column="0" lean-forward="false" selection-start-line="6" selection-start-column="0" selection-end-line="6" selection-end-column="46" />
+        <state relative-caret-position="198">
+          <caret line="9" column="43" lean-forward="true" selection-start-line="9" selection-start-column="43" selection-end-line="9" selection-end-column="43" />
           <folding />
         </state>
       </provider>
     </entry>
+    <entry file="file://$PROJECT_DIR$/views/layout.twig">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="176">
+          <caret line="8" column="9" lean-forward="true" selection-start-line="8" selection-start-column="9" selection-end-line="8" selection-end-column="9" />
+          <folding />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/bin/www" />
+    <entry file="file://$PROJECT_DIR$/bin/www" />
     <entry file="file://$PROJECT_DIR$/Application.js">
       <provider selected="true" editor-type-id="text-editor">
         <state relative-caret-position="-484">
@@ -264,58 +333,114 @@
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/routes/Controller.ts">
+    <entry file="file://$PROJECT_DIR$/routes/Controller.ts" />
+    <entry file="file://$PROJECT_DIR$/public/stylesheets/style.css">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="0">
+          <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/views/index.twig">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="66">
-          <caret line="3" column="20" lean-forward="false" selection-start-line="3" selection-start-column="20" selection-end-line="3" selection-end-column="20" />
+        <state relative-caret-position="0">
+          <caret line="0" column="17" lean-forward="false" selection-start-line="0" selection-start-column="17" selection-end-line="0" selection-end-column="17" />
+          <folding />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/views/layout.twig">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="176">
+          <caret line="8" column="9" lean-forward="false" selection-start-line="8" selection-start-column="9" selection-end-line="8" selection-end-column="9" />
+          <folding />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/routes/ControllerInterface.js">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="0">
+          <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
           <folding />
         </state>
       </provider>
     </entry>
     <entry file="file://$PROJECT_DIR$/routes/ControllerInterface.ts">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="22">
-          <caret line="1" column="11" lean-forward="false" selection-start-line="1" selection-start-column="11" selection-end-line="1" selection-end-column="11" />
+        <state relative-caret-position="88">
+          <caret line="4" column="1" lean-forward="true" selection-start-line="4" selection-start-column="1" selection-end-line="4" selection-end-column="1" />
+          <folding />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/modules/DbCrafty/config/db.yml">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="44">
+          <caret line="2" column="17" lean-forward="false" selection-start-line="2" selection-start-column="17" selection-end-line="2" selection-end-column="17" />
           <folding />
         </state>
       </provider>
     </entry>
     <entry file="file://$PROJECT_DIR$/routes/IndexController.ts">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="198">
-          <caret line="9" column="43" lean-forward="true" selection-start-line="9" selection-start-column="43" selection-end-line="9" selection-end-column="43" />
+        <state relative-caret-position="110">
+          <caret line="5" column="47" lean-forward="false" selection-start-line="5" selection-start-column="47" selection-end-line="5" selection-end-column="47" />
           <folding />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/Application.ts">
+    <entry file="file://$PROJECT_DIR$/modules/DbCrafty/MondoDB.ts">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="1804">
-          <caret line="142" column="9" lean-forward="true" selection-start-line="142" selection-start-column="9" selection-end-line="142" selection-end-column="9" />
+        <state relative-caret-position="88">
+          <caret line="4" column="22" lean-forward="false" selection-start-line="4" selection-start-column="22" selection-end-line="4" selection-end-column="22" />
           <folding />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/views/index.twig">
+    <entry file="file://$PROJECT_DIR$/modules/DbCrafty/config/entity.yml">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="0">
-          <caret line="0" column="17" lean-forward="true" selection-start-line="0" selection-start-column="17" selection-end-line="0" selection-end-column="17" />
+        <state relative-caret-position="88">
+          <caret line="4" column="19" lean-forward="false" selection-start-line="4" selection-start-column="19" selection-end-line="4" selection-end-column="19" />
           <folding />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/public/stylesheets/style.css">
+    <entry file="file://$PROJECT_DIR$/entity/User.ts">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="220">
+          <caret line="10" column="30" lean-forward="true" selection-start-line="10" selection-start-column="30" selection-end-line="10" selection-end-column="30" />
+          <folding />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/manager/UserManager.ts">
       <provider selected="true" editor-type-id="text-editor">
         <state relative-caret-position="0">
-          <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
+          <caret line="0" column="25" lean-forward="false" selection-start-line="0" selection-start-column="25" selection-end-line="0" selection-end-column="25" />
           <folding />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/views/layout.twig">
+    <entry file="file://$PROJECT_DIR$/modules/DbCrafty/ConfiguratorDB.ts">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="176">
-          <caret line="8" column="9" lean-forward="true" selection-start-line="8" selection-start-column="9" selection-end-line="8" selection-end-column="9" />
+        <state relative-caret-position="220">
+          <caret line="10" column="54" lean-forward="false" selection-start-line="10" selection-start-column="54" selection-end-line="10" selection-end-column="54" />
+          <folding />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/modules/DbCrafty/BaseEntityManager.ts">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="286">
+          <caret line="13" column="8" lean-forward="false" selection-start-line="13" selection-start-column="8" selection-end-line="13" selection-end-column="8" />
+          <folding />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/Application.ts">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="330">
+          <caret line="48" column="31" lean-forward="true" selection-start-line="48" selection-start-column="31" selection-end-line="48" selection-end-column="31" />
           <folding />
         </state>
       </provider>

+ 8 - 0
Application.js

@@ -7,6 +7,8 @@ var cookieParser = require("cookie-parser");
 var bodyParser = require("body-parser");
 var http = require("http");
 var IndexController_1 = require("./routes/IndexController");
+var ConfiguratorDB_1 = require("./modules/DbCrafty/ConfiguratorDB");
+var UserManager_1 = require("./manager/UserManager");
 var Application = (function () {
     function Application() {
     }
@@ -39,7 +41,13 @@ var Application = (function () {
         app.use(bodyParser.urlencoded({ extended: false }));
         app.use(cookieParser());
         app.use(express.static(__dirname + '/public'));
+        //configure route
         Application.configureRoute(app);
+        //configure DB
+        ConfiguratorDB_1.ConfiguratorDB.loadModelConfig();
+        var managerUser = new UserManager_1.UserManager();
+        var User = require("./entity/User.js");
+        console.log();
         // catch 404 and forward to error handler
         /*app.use(function(req, res, next) {
             let err = new Error('Not Found');

+ 10 - 0
Application.ts

@@ -9,6 +9,9 @@ import cookieParser = require('cookie-parser');
 import bodyParser = require('body-parser');
 import http = require("http");
 import {IndexController} from "./routes/IndexController";
+import {ConfiguratorDB} from "./modules/DbCrafty/ConfiguratorDB";
+import {UserManager} from "./manager/UserManager";
+import Global = NodeJS.Global;
 
 export class Application {
     private static app;
@@ -49,8 +52,15 @@ export class Application {
         app.use(cookieParser());
         app.use(express.static(__dirname + '/public'));
 
+        //configure route
         Application.configureRoute(app);
 
+        //configure DB
+        ConfiguratorDB.loadModelConfig();
+        let managerUser = new UserManager();
+        let User = require("./entity/User.js");
+        console.log();
+
         // catch 404 and forward to error handler
         /*app.use(function(req, res, next) {
             let err = new Error('Not Found');

+ 20 - 0
entity/User.js

@@ -0,0 +1,20 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+var User = (function () {
+    function User() {
+    }
+    User.prototype.getUsername = function () {
+        return this.username;
+    };
+    User.prototype.setUsername = function (value) {
+        this.username = value;
+    };
+    User.prototype.getpassword = function () {
+        return this.password;
+    };
+    User.prototype.setPassword = function (value) {
+        this.password = value;
+    };
+    return User;
+}());
+exports.User = User;

+ 21 - 0
entity/User.ts

@@ -0,0 +1,21 @@
+export class User {
+
+    private username;
+    private password;
+
+    public getUsername() {
+        return this.username;
+    }
+
+    public setUsername(value) {
+        this.username = value;
+    }
+
+    public getpassword() {
+        return this.password;
+    }
+
+    public setPassword(value) {
+        this.password = value;
+    }
+}

+ 21 - 0
manager/UserManager.js

@@ -0,0 +1,21 @@
+"use strict";
+var __extends = (this && this.__extends) || (function () {
+    var extendStatics = Object.setPrototypeOf ||
+        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
+        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
+    return function (d, b) {
+        extendStatics(d, b);
+        function __() { this.constructor = d; }
+        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+    };
+})();
+Object.defineProperty(exports, "__esModule", { value: true });
+var BaseEntityManager_1 = require("../modules/DbCrafty/BaseEntityManager");
+var UserManager = (function (_super) {
+    __extends(UserManager, _super);
+    function UserManager() {
+        return _super !== null && _super.apply(this, arguments) || this;
+    }
+    return UserManager;
+}(BaseEntityManager_1.BaseEntityManager));
+exports.UserManager = UserManager;

+ 6 - 0
manager/UserManager.ts

@@ -0,0 +1,6 @@
+import {BaseEntityManager} from "../modules/DbCrafty/BaseEntityManager";
+
+export class UserManager extends BaseEntityManager {
+
+
+}

+ 26 - 0
modules/DbCrafty/BaseEntityManager.js

@@ -0,0 +1,26 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+var ConfiguratorDB_1 = require("./ConfiguratorDB");
+var BaseEntityManager = (function () {
+    function BaseEntityManager() {
+        var modelName = BaseEntityManager.getObjectClass(this).replace("Manager", "");
+        this.model = ConfiguratorDB_1.ConfiguratorDB.getModel(modelName);
+    }
+    BaseEntityManager.prototype.createEntity = function () {
+        var entity = require(this.className);
+    };
+    BaseEntityManager.getObjectClass = function (obj) {
+        if (obj && obj.constructor && obj.constructor.toString) {
+            var arr = obj.constructor.toString().match(/function\s*(\w+)/);
+            if (arr && arr.length == 2) {
+                return arr[1];
+            }
+        }
+        return undefined;
+    };
+    BaseEntityManager.prototype.getModel = function () {
+        return this.model;
+    };
+    return BaseEntityManager;
+}());
+exports.BaseEntityManager = BaseEntityManager;

+ 32 - 0
modules/DbCrafty/BaseEntityManager.ts

@@ -0,0 +1,32 @@
+import {ConfiguratorDB} from "./ConfiguratorDB";
+
+export abstract class BaseEntityManager {
+    private model;
+    private className;
+
+    constructor() {
+        let modelName = BaseEntityManager.getObjectClass(this).replace("Manager", "");
+        this.model = ConfiguratorDB.getModel(modelName);
+    }
+
+    public createEntity() {
+        let entity = require(this.className);
+        
+    }
+
+    private static getObjectClass(obj) {
+        if (obj && obj.constructor && obj.constructor.toString) {
+            let arr = obj.constructor.toString().match(
+                /function\s*(\w+)/);
+
+            if (arr && arr.length == 2) {
+                return arr[1];
+            }
+        }
+        return undefined;
+    }
+
+    public getModel() {
+        return this.model;
+    }
+}

+ 33 - 0
modules/DbCrafty/ConfiguratorDB.js

@@ -0,0 +1,33 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+var mongose = require("mongoose");
+var yaml = require("js-yaml");
+var fs = require("fs");
+var ConfiguratorDB = (function () {
+    function ConfiguratorDB() {
+    }
+    ConfiguratorDB.loadModelConfig = function () {
+        //load entity config
+        var configModel = yaml.safeLoad(fs.readFileSync('./modules/DbCrafty/config/entity.yml', 'utf8'));
+        //for each entity config
+        for (var nameModel in configModel) {
+            if (configModel.hasOwnProperty(nameModel)) {
+                var model = configModel[nameModel];
+                var properties = model.properties;
+                //create schema
+                var schema = mongose.Schema(properties);
+                //create entity
+                ConfiguratorDB.model[nameModel] = {
+                    classModel: configModel[nameModel]["class"],
+                    model: mongose.model(nameModel, schema)
+                };
+            }
+        }
+    };
+    ConfiguratorDB.getModel = function (nameModel) {
+        return ConfiguratorDB.model[nameModel];
+    };
+    ConfiguratorDB.model = {};
+    return ConfiguratorDB;
+}());
+exports.ConfiguratorDB = ConfiguratorDB;

+ 32 - 0
modules/DbCrafty/ConfiguratorDB.ts

@@ -0,0 +1,32 @@
+import mongose = require("mongoose");
+import yaml = require("js-yaml");
+import fs = require("fs");
+
+export class ConfiguratorDB {
+
+    private static model = {};
+
+    public static loadModelConfig() {
+        //load entity config
+        let configModel = yaml.safeLoad(fs.readFileSync('./modules/DbCrafty/config/entity.yml', 'utf8'));
+        //for each entity config
+        for (let nameModel in configModel) {
+            if (configModel.hasOwnProperty(nameModel)) {
+                let model = configModel[nameModel];
+                let properties = model.properties;
+                //create schema
+                let schema = mongose.Schema(properties);
+                //create entity
+                ConfiguratorDB.model[nameModel] = {
+                    classModel: configModel[nameModel]["class"],
+                    model: mongose.model(nameModel, schema)
+                };
+            }
+        }
+    }
+
+    public static getModel(nameModel) {
+        return ConfiguratorDB.model[nameModel];
+    }
+
+}

+ 18 - 0
modules/DbCrafty/MondoDB.js

@@ -0,0 +1,18 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+var mongose = require("mongoose");
+var yaml = require("js-yaml");
+var fs = require("fs");
+var MongoDB = (function () {
+    function MongoDB() {
+    }
+    MongoDB.getConnection = function () {
+        var configDb = yaml.safeLoad(fs.readFileSync('./modules/DbCrafty/config/db.yml', 'utf8'));
+        mongose.connect("mongodb://" + configDb.db.ip + "/" + configDb.db.name, {
+            useMongoClient: true
+        });
+        return mongose;
+    };
+    return MongoDB;
+}());
+exports.MongoDB = MongoDB;

+ 15 - 0
modules/DbCrafty/MondoDB.ts

@@ -0,0 +1,15 @@
+import mongose = require("mongoose");
+import yaml = require("js-yaml");
+import fs = require("fs");
+
+export class MongoDB {
+
+    public static getConnection() {
+        let configDb = yaml.safeLoad(fs.readFileSync('./modules/DbCrafty/config/db.yml', 'utf8'));
+        mongose.connect("mongodb://"+configDb.db.ip+"/"+configDb.db.name,{
+            useMongoClient: true
+        });
+        return mongose;
+    }
+
+}

+ 3 - 0
modules/DbCrafty/config/db.yml

@@ -0,0 +1,3 @@
+db:
+  name: "MyDB"
+  ip: "127.0.0.1"

+ 5 - 0
modules/DbCrafty/config/entity.yml

@@ -0,0 +1,5 @@
+User:
+  class: /entity/User.js
+  properties:
+    username: String
+    password: String

+ 15 - 0
node_modules/.bin/esparse

@@ -0,0 +1,15 @@
+#!/bin/sh
+basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
+
+case `uname` in
+    *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
+esac
+
+if [ -x "$basedir/node" ]; then
+  "$basedir/node"  "$basedir/../esprima/bin/esparse.js" "$@"
+  ret=$?
+else 
+  node  "$basedir/../esprima/bin/esparse.js" "$@"
+  ret=$?
+fi
+exit $ret

+ 7 - 0
node_modules/.bin/esparse.cmd

@@ -0,0 +1,7 @@
+@IF EXIST "%~dp0\node.exe" (
+  "%~dp0\node.exe"  "%~dp0\..\esprima\bin\esparse.js" %*
+) ELSE (
+  @SETLOCAL
+  @SET PATHEXT=%PATHEXT:;.JS;=;%
+  node  "%~dp0\..\esprima\bin\esparse.js" %*
+)

+ 15 - 0
node_modules/.bin/esvalidate

@@ -0,0 +1,15 @@
+#!/bin/sh
+basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
+
+case `uname` in
+    *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
+esac
+
+if [ -x "$basedir/node" ]; then
+  "$basedir/node"  "$basedir/../esprima/bin/esvalidate.js" "$@"
+  ret=$?
+else 
+  node  "$basedir/../esprima/bin/esvalidate.js" "$@"
+  ret=$?
+fi
+exit $ret

+ 7 - 0
node_modules/.bin/esvalidate.cmd

@@ -0,0 +1,7 @@
+@IF EXIST "%~dp0\node.exe" (
+  "%~dp0\node.exe"  "%~dp0\..\esprima\bin\esvalidate.js" %*
+) ELSE (
+  @SETLOCAL
+  @SET PATHEXT=%PATHEXT:;.JS;=;%
+  node  "%~dp0\..\esprima\bin\esvalidate.js" %*
+)

+ 15 - 0
node_modules/.bin/js-yaml

@@ -0,0 +1,15 @@
+#!/bin/sh
+basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
+
+case `uname` in
+    *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
+esac
+
+if [ -x "$basedir/node" ]; then
+  "$basedir/node"  "$basedir/../js-yaml/bin/js-yaml.js" "$@"
+  ret=$?
+else 
+  node  "$basedir/../js-yaml/bin/js-yaml.js" "$@"
+  ret=$?
+fi
+exit $ret

+ 7 - 0
node_modules/.bin/js-yaml.cmd

@@ -0,0 +1,7 @@
+@IF EXIST "%~dp0\node.exe" (
+  "%~dp0\node.exe"  "%~dp0\..\js-yaml\bin\js-yaml.js" %*
+) ELSE (
+  @SETLOCAL
+  @SET PATHEXT=%PATHEXT:;.JS;=;%
+  node  "%~dp0\..\js-yaml\bin\js-yaml.js" %*
+)

+ 15 - 0
node_modules/.bin/semver

@@ -0,0 +1,15 @@
+#!/bin/sh
+basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
+
+case `uname` in
+    *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
+esac
+
+if [ -x "$basedir/node" ]; then
+  "$basedir/node"  "$basedir/../semver/bin/semver" "$@"
+  ret=$?
+else 
+  node  "$basedir/../semver/bin/semver" "$@"
+  ret=$?
+fi
+exit $ret

+ 7 - 0
node_modules/.bin/semver.cmd

@@ -0,0 +1,7 @@
+@IF EXIST "%~dp0\node.exe" (
+  "%~dp0\node.exe"  "%~dp0\..\semver\bin\semver" %*
+) ELSE (
+  @SETLOCAL
+  @SET PATHEXT=%PATHEXT:;.JS;=;%
+  node  "%~dp0\..\semver\bin\semver" %*
+)

+ 179 - 0
node_modules/argparse/CHANGELOG.md

@@ -0,0 +1,179 @@
+1.0.9 / 2016-09-29
+------------------
+
+- Rerelease after 1.0.8 - deps cleanup.
+
+
+1.0.8 / 2016-09-29
+------------------
+
+- Maintenance (deps bump, fix node 6.5+ tests, coverage report).
+
+
+1.0.7 / 2016-03-17
+------------------
+
+- Teach `addArgument` to accept string arg names. #97, @tomxtobin.
+
+
+1.0.6 / 2016-02-06
+------------------
+
+- Maintenance: moved to eslint & updated CS.
+
+
+1.0.5 / 2016-02-05
+------------------
+
+- Removed lodash dependency to significantly reduce install size.
+  Thanks to @mourner.
+
+
+1.0.4 / 2016-01-17
+------------------
+
+- Maintenance: lodash update to 4.0.0.
+
+
+1.0.3 / 2015-10-27
+------------------
+
+- Fix parse `=` in args: `--examplepath="C:\myfolder\env=x64"`. #84, @CatWithApple.
+
+
+1.0.2 / 2015-03-22
+------------------
+
+- Relaxed lodash version dependency.
+
+
+1.0.1 / 2015-02-20
+------------------
+
+- Changed dependencies to be compatible with ancient nodejs.
+
+
+1.0.0 / 2015-02-19
+------------------
+
+- Maintenance release.
+- Replaced `underscore` with `lodash`.
+- Bumped version to 1.0.0 to better reflect semver meaning.
+- HISTORY.md -> CHANGELOG.md
+
+
+0.1.16 / 2013-12-01
+-------------------
+
+- Maintenance release. Updated dependencies and docs.
+
+
+0.1.15 / 2013-05-13
+-------------------
+
+- Fixed #55, @trebor89
+
+
+0.1.14 / 2013-05-12
+-------------------
+
+- Fixed #62, @maxtaco
+
+
+0.1.13 / 2013-04-08
+-------------------
+
+- Added `.npmignore` to reduce package size
+
+
+0.1.12 / 2013-02-10
+-------------------
+
+- Fixed conflictHandler (#46), @hpaulj
+
+
+0.1.11 / 2013-02-07
+-------------------
+
+- Multiple bugfixes, @hpaulj
+- Added 70+ tests (ported from python), @hpaulj
+- Added conflictHandler, @applepicke
+- Added fromfilePrefixChar, @hpaulj
+
+
+0.1.10 / 2012-12-30
+-------------------
+
+- Added [mutual exclusion](http://docs.python.org/dev/library/argparse.html#mutual-exclusion)
+  support, thanks to @hpaulj
+- Fixed options check for `storeConst` & `appendConst` actions, thanks to @hpaulj
+
+
+0.1.9 / 2012-12-27
+------------------
+
+- Fixed option dest interferens with other options (issue #23), thanks to @hpaulj
+- Fixed default value behavior with `*` positionals, thanks to @hpaulj
+- Improve `getDefault()` behavior, thanks to @hpaulj
+- Imrove negative argument parsing, thanks to @hpaulj
+
+
+0.1.8 / 2012-12-01
+------------------
+
+- Fixed parser parents (issue #19), thanks to @hpaulj
+- Fixed negative argument parse (issue #20), thanks to @hpaulj
+
+
+0.1.7 / 2012-10-14
+------------------
+
+- Fixed 'choices' argument parse (issue #16)
+- Fixed stderr output (issue #15)
+
+
+0.1.6 / 2012-09-09
+------------------
+
+- Fixed check for conflict of options (thanks to @tomxtobin)
+
+
+0.1.5 / 2012-09-03
+------------------
+
+- Fix parser #setDefaults method (thanks to @tomxtobin)
+
+
+0.1.4 / 2012-07-30
+------------------
+
+- Fixed pseudo-argument support (thanks to @CGamesPlay)
+- Fixed addHelp default (should be true), if not set (thanks to @benblank)
+
+
+0.1.3 / 2012-06-27
+------------------
+
+- Fixed formatter api name: Formatter -> HelpFormatter
+
+
+0.1.2 / 2012-05-29
+------------------
+
+- Added basic tests
+- Removed excess whitespace in help
+- Fixed error reporting, when parcer with subcommands
+  called with empty arguments
+
+
+0.1.1 / 2012-05-23
+------------------
+
+- Fixed line wrapping in help formatter
+- Added better error reporting on invalid arguments
+
+
+0.1.0 / 2012-05-16
+------------------
+
+- First release.

+ 21 - 0
node_modules/argparse/LICENSE

@@ -0,0 +1,21 @@
+(The MIT License)
+
+Copyright (C) 2012 by Vitaly Puzrin
+
+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.

+ 253 - 0
node_modules/argparse/README.md

@@ -0,0 +1,253 @@
+argparse
+========
+
+[![Build Status](https://secure.travis-ci.org/nodeca/argparse.png?branch=master)](http://travis-ci.org/nodeca/argparse)
+[![NPM version](https://img.shields.io/npm/v/argparse.svg)](https://www.npmjs.org/package/argparse)
+
+CLI arguments parser for node.js. Javascript port of python's
+[argparse](http://docs.python.org/dev/library/argparse.html) module
+(original version 3.2). That's a full port, except some very rare options,
+recorded in issue tracker.
+
+**NB. Difference with original.**
+
+- Method names changed to camelCase. See [generated docs](http://nodeca.github.com/argparse/).
+- Use `defaultValue` instead of `default`.
+
+
+Example
+=======
+
+test.js file:
+
+```javascript
+#!/usr/bin/env node
+'use strict';
+
+var ArgumentParser = require('../lib/argparse').ArgumentParser;
+var parser = new ArgumentParser({
+  version: '0.0.1',
+  addHelp:true,
+  description: 'Argparse example'
+});
+parser.addArgument(
+  [ '-f', '--foo' ],
+  {
+    help: 'foo bar'
+  }
+);
+parser.addArgument(
+  [ '-b', '--bar' ],
+  {
+    help: 'bar foo'
+  }
+);
+parser.addArgument(
+  '--baz',
+  {
+    help: 'baz bar'
+  }
+);
+var args = parser.parseArgs();
+console.dir(args);
+```
+
+Display help:
+
+```
+$ ./test.js -h
+usage: example.js [-h] [-v] [-f FOO] [-b BAR] [--baz BAZ]
+
+Argparse example
+
+Optional arguments:
+  -h, --help         Show this help message and exit.
+  -v, --version      Show program's version number and exit.
+  -f FOO, --foo FOO  foo bar
+  -b BAR, --bar BAR  bar foo
+  --baz BAZ          baz bar
+```
+
+Parse arguments:
+
+```
+$ ./test.js -f=3 --bar=4 --baz 5
+{ foo: '3', bar: '4', baz: '5' }
+```
+
+More [examples](https://github.com/nodeca/argparse/tree/master/examples).
+
+
+ArgumentParser objects
+======================
+
+```
+new ArgumentParser({paramters hash});
+```
+
+Creates a new ArgumentParser object.
+
+**Supported params:**
+
+- ```description``` - Text to display before the argument help.
+- ```epilog``` - Text to display after the argument help.
+- ```addHelp``` - Add a -h/–help option to the parser. (default: true)
+- ```argumentDefault``` - Set the global default value for arguments. (default: null)
+- ```parents``` - A list of ArgumentParser objects whose arguments should also be included.
+- ```prefixChars``` - The set of characters that prefix optional arguments. (default: ‘-‘)
+- ```formatterClass``` - A class for customizing the help output.
+- ```prog``` - The name of the program (default: `path.basename(process.argv[1])`)
+- ```usage``` - The string describing the program usage (default: generated)
+- ```conflictHandler``` - Usually unnecessary, defines strategy for resolving conflicting optionals.
+
+**Not supportied yet**
+
+- ```fromfilePrefixChars``` - The set of characters that prefix files from which additional arguments should be read.
+
+
+Details in [original ArgumentParser guide](http://docs.python.org/dev/library/argparse.html#argumentparser-objects)
+
+
+addArgument() method
+====================
+
+```
+ArgumentParser.addArgument(name or flag or [name] or [flags...], {options})
+```
+
+Defines how a single command-line argument should be parsed.
+
+- ```name or flag or [name] or [flags...]``` - Either a positional name
+  (e.g., `'foo'`), a single option (e.g., `'-f'` or `'--foo'`), an array
+  of a single positional name (e.g., `['foo']`), or an array of options
+  (e.g., `['-f', '--foo']`).
+
+Options:
+
+- ```action``` - The basic type of action to be taken when this argument is encountered at the command line.
+- ```nargs```- The number of command-line arguments that should be consumed.
+- ```constant``` - A constant value required by some action and nargs selections.
+- ```defaultValue``` - The value produced if the argument is absent from the command line.
+- ```type``` - The type to which the command-line argument should be converted.
+- ```choices``` - A container of the allowable values for the argument.
+- ```required``` - Whether or not the command-line option may be omitted (optionals only).
+- ```help``` - A brief description of what the argument does.
+- ```metavar``` - A name for the argument in usage messages.
+- ```dest``` - The name of the attribute to be added to the object returned by parseArgs().
+
+Details in [original add_argument guide](http://docs.python.org/dev/library/argparse.html#the-add-argument-method)
+
+
+Action (some details)
+================
+
+ArgumentParser objects associate command-line arguments with actions.
+These actions can do just about anything with the command-line arguments associated
+with them, though most actions simply add an attribute to the object returned by
+parseArgs(). The action keyword argument specifies how the command-line arguments
+should be handled. The supported actions are:
+
+- ```store``` - Just stores the argument’s value. This is the default action.
+- ```storeConst``` - Stores value, specified by the const keyword argument.
+  (Note that the const keyword argument defaults to the rather unhelpful None.)
+  The 'storeConst' action is most commonly used with optional arguments, that
+  specify some sort of flag.
+- ```storeTrue``` and ```storeFalse``` - Stores values True and False
+  respectively. These are special cases of 'storeConst'.
+- ```append``` - Stores a list, and appends each argument value to the list.
+  This is useful to allow an option to be specified multiple times.
+- ```appendConst``` - Stores a list, and appends value, specified by the
+  const keyword argument to the list. (Note, that the const keyword argument defaults
+  is None.) The 'appendConst' action is typically used when multiple arguments need
+  to store constants to the same list.
+- ```count``` - Counts the number of times a keyword argument occurs. For example,
+  used for increasing verbosity levels.
+- ```help``` - Prints a complete help message for all the options in the current
+  parser and then exits. By default a help action is automatically added to the parser.
+  See ArgumentParser for details of how the output is created.
+- ```version``` - Prints version information and exit. Expects a `version=`
+  keyword argument in the addArgument() call.
+
+Details in [original action guide](http://docs.python.org/dev/library/argparse.html#action)
+
+
+Sub-commands
+============
+
+ArgumentParser.addSubparsers()
+
+Many programs split their functionality into a number of sub-commands, for
+example, the svn program can invoke sub-commands like `svn checkout`, `svn update`,
+and `svn commit`. Splitting up functionality this way can be a particularly good
+idea when a program performs several different functions which require different
+kinds of command-line arguments. `ArgumentParser` supports creation of such
+sub-commands with `addSubparsers()` method. The `addSubparsers()` method is
+normally called with no arguments and returns an special action object.
+This object has a single method `addParser()`, which takes a command name and
+any `ArgumentParser` constructor arguments, and returns an `ArgumentParser` object
+that can be modified as usual.
+
+Example:
+
+sub_commands.js
+```javascript
+#!/usr/bin/env node
+'use strict';
+
+var ArgumentParser = require('../lib/argparse').ArgumentParser;
+var parser = new ArgumentParser({
+  version: '0.0.1',
+  addHelp:true,
+  description: 'Argparse examples: sub-commands',
+});
+
+var subparsers = parser.addSubparsers({
+  title:'subcommands',
+  dest:"subcommand_name"
+});
+
+var bar = subparsers.addParser('c1', {addHelp:true});
+bar.addArgument(
+  [ '-f', '--foo' ],
+  {
+    action: 'store',
+    help: 'foo3 bar3'
+  }
+);
+var bar = subparsers.addParser(
+  'c2',
+  {aliases:['co'], addHelp:true}
+);
+bar.addArgument(
+  [ '-b', '--bar' ],
+  {
+    action: 'store',
+    type: 'int',
+    help: 'foo3 bar3'
+  }
+);
+
+var args = parser.parseArgs();
+console.dir(args);
+
+```
+
+Details in [original sub-commands guide](http://docs.python.org/dev/library/argparse.html#sub-commands)
+
+
+Contributors
+============
+
+- [Eugene Shkuropat](https://github.com/shkuropat)
+- [Paul Jacobson](https://github.com/hpaulj)
+
+[others](https://github.com/nodeca/argparse/graphs/contributors)
+
+License
+=======
+
+Copyright (c) 2012 [Vitaly Puzrin](https://github.com/puzrin).
+Released under the MIT license. See
+[LICENSE](https://github.com/nodeca/argparse/blob/master/LICENSE) for details.
+
+

+ 3 - 0
node_modules/argparse/index.js

@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = require('./lib/argparse');

+ 146 - 0
node_modules/argparse/lib/action.js

@@ -0,0 +1,146 @@
+/**
+ * class Action
+ *
+ * Base class for all actions
+ * Do not call in your code, use this class only for inherits your own action
+ *
+ * Information about how to convert command line strings to Javascript objects.
+ * Action objects are used by an ArgumentParser to represent the information
+ * needed to parse a single argument from one or more strings from the command
+ * line. The keyword arguments to the Action constructor are also all attributes
+ * of Action instances.
+ *
+ * #####Alowed keywords:
+ *
+ * - `store`
+ * - `storeConstant`
+ * - `storeTrue`
+ * - `storeFalse`
+ * - `append`
+ * - `appendConstant`
+ * - `count`
+ * - `help`
+ * - `version`
+ *
+ * Information about action options see [[Action.new]]
+ *
+ * See also [original guide](http://docs.python.org/dev/library/argparse.html#action)
+ *
+ **/
+
+'use strict';
+
+
+// Constants
+var c = require('./const');
+
+
+/**
+ * new Action(options)
+ *
+ * Base class for all actions. Used only for inherits
+ *
+ *
+ * ##### Options:
+ *
+ * - `optionStrings`  A list of command-line option strings for the action.
+ * - `dest`  Attribute to hold the created object(s)
+ * - `nargs`  The number of command-line arguments that should be consumed.
+ * By default, one argument will be consumed and a single value will be
+ * produced.
+ * - `constant`  Default value for an action with no value.
+ * - `defaultValue`  The value to be produced if the option is not specified.
+ * - `type`  Cast to 'string'|'int'|'float'|'complex'|function (string). If
+ * None, 'string'.
+ * - `choices`  The choices available.
+ * - `required`  True if the action must always be specified at the command
+ * line.
+ * - `help`  The help describing the argument.
+ * - `metavar`  The name to be used for the option's argument with the help
+ * string. If None, the 'dest' value will be used as the name.
+ *
+ * ##### nargs supported values:
+ *
+ * - `N` (an integer) consumes N arguments (and produces a list)
+ * - `?`  consumes zero or one arguments
+ * - `*` consumes zero or more arguments (and produces a list)
+ * - `+` consumes one or more arguments (and produces a list)
+ *
+ * Note: that the difference between the default and nargs=1 is that with the
+ * default, a single value will be produced, while with nargs=1, a list
+ * containing a single value will be produced.
+ **/
+var Action = module.exports = function Action(options) {
+  options = options || {};
+  this.optionStrings = options.optionStrings || [];
+  this.dest = options.dest;
+  this.nargs = typeof options.nargs !== 'undefined' ? options.nargs : null;
+  this.constant = typeof options.constant !== 'undefined' ? options.constant : null;
+  this.defaultValue = options.defaultValue;
+  this.type = typeof options.type !== 'undefined' ? options.type : null;
+  this.choices = typeof options.choices !== 'undefined' ? options.choices : null;
+  this.required = typeof options.required !== 'undefined' ? options.required : false;
+  this.help = typeof options.help !== 'undefined' ? options.help : null;
+  this.metavar = typeof options.metavar !== 'undefined' ? options.metavar : null;
+
+  if (!(this.optionStrings instanceof Array)) {
+    throw new Error('optionStrings should be an array');
+  }
+  if (typeof this.required !== 'undefined' && typeof this.required !== 'boolean') {
+    throw new Error('required should be a boolean');
+  }
+};
+
+/**
+ * Action#getName -> String
+ *
+ * Tells action name
+ **/
+Action.prototype.getName = function () {
+  if (this.optionStrings.length > 0) {
+    return this.optionStrings.join('/');
+  } else if (this.metavar !== null && this.metavar !== c.SUPPRESS) {
+    return this.metavar;
+  } else if (typeof this.dest !== 'undefined' && this.dest !== c.SUPPRESS) {
+    return this.dest;
+  }
+  return null;
+};
+
+/**
+ * Action#isOptional -> Boolean
+ *
+ * Return true if optional
+ **/
+Action.prototype.isOptional = function () {
+  return !this.isPositional();
+};
+
+/**
+ * Action#isPositional -> Boolean
+ *
+ * Return true if positional
+ **/
+Action.prototype.isPositional = function () {
+  return (this.optionStrings.length === 0);
+};
+
+/**
+ * Action#call(parser, namespace, values, optionString) -> Void
+ * - parser (ArgumentParser): current parser
+ * - namespace (Namespace): namespace for output data
+ * - values (Array): parsed values
+ * - optionString (Array): input option string(not parsed)
+ *
+ * Call the action. Should be implemented in inherited classes
+ *
+ * ##### Example
+ *
+ *      ActionCount.prototype.call = function (parser, namespace, values, optionString) {
+ *        namespace.set(this.dest, (namespace[this.dest] || 0) + 1);
+ *      };
+ *
+ **/
+Action.prototype.call = function () {
+  throw new Error('.call() not defined');// Not Implemented error
+};

+ 53 - 0
node_modules/argparse/lib/action/append.js

@@ -0,0 +1,53 @@
+/*:nodoc:*
+ * class ActionAppend
+ *
+ * This action stores a list, and appends each argument value to the list.
+ * This is useful to allow an option to be specified multiple times.
+ * This class inherided from [[Action]]
+ *
+ **/
+
+'use strict';
+
+var util = require('util');
+
+var Action = require('../action');
+
+// Constants
+var c = require('../const');
+
+/*:nodoc:*
+ * new ActionAppend(options)
+ * - options (object): options hash see [[Action.new]]
+ *
+ * Note: options.nargs should be optional for constants
+ * and more then zero for other
+ **/
+var ActionAppend = module.exports = function ActionAppend(options) {
+  options = options || {};
+  if (this.nargs <= 0) {
+    throw new Error('nargs for append actions must be > 0; if arg ' +
+        'strings are not supplying the value to append, ' +
+        'the append const action may be more appropriate');
+  }
+  if (!!this.constant && this.nargs !== c.OPTIONAL) {
+    throw new Error('nargs must be OPTIONAL to supply const');
+  }
+  Action.call(this, options);
+};
+util.inherits(ActionAppend, Action);
+
+/*:nodoc:*
+ * ActionAppend#call(parser, namespace, values, optionString) -> Void
+ * - parser (ArgumentParser): current parser
+ * - namespace (Namespace): namespace for output data
+ * - values (Array): parsed values
+ * - optionString (Array): input option string(not parsed)
+ *
+ * Call the action. Save result in namespace object
+ **/
+ActionAppend.prototype.call = function (parser, namespace, values) {
+  var items = (namespace[this.dest] || []).slice();
+  items.push(values);
+  namespace.set(this.dest, items);
+};

+ 47 - 0
node_modules/argparse/lib/action/append/constant.js

@@ -0,0 +1,47 @@
+/*:nodoc:*
+ * class ActionAppendConstant
+ *
+ * This stores a list, and appends the value specified by
+ * the const keyword argument to the list.
+ * (Note that the const keyword argument defaults to null.)
+ * The 'appendConst' action is typically useful when multiple
+ * arguments need to store constants to the same list.
+ *
+ * This class inherited from [[Action]]
+ **/
+
+'use strict';
+
+var util = require('util');
+
+var Action = require('../../action');
+
+/*:nodoc:*
+ * new ActionAppendConstant(options)
+ * - options (object): options hash see [[Action.new]]
+ *
+ **/
+var ActionAppendConstant = module.exports = function ActionAppendConstant(options) {
+  options = options || {};
+  options.nargs = 0;
+  if (typeof options.constant === 'undefined') {
+    throw new Error('constant option is required for appendAction');
+  }
+  Action.call(this, options);
+};
+util.inherits(ActionAppendConstant, Action);
+
+/*:nodoc:*
+ * ActionAppendConstant#call(parser, namespace, values, optionString) -> Void
+ * - parser (ArgumentParser): current parser
+ * - namespace (Namespace): namespace for output data
+ * - values (Array): parsed values
+ * - optionString (Array): input option string(not parsed)
+ *
+ * Call the action. Save result in namespace object
+ **/
+ActionAppendConstant.prototype.call = function (parser, namespace) {
+  var items = [].concat(namespace[this.dest] || []);
+  items.push(this.constant);
+  namespace.set(this.dest, items);
+};

+ 40 - 0
node_modules/argparse/lib/action/count.js

@@ -0,0 +1,40 @@
+/*:nodoc:*
+ * class ActionCount
+ *
+ * This counts the number of times a keyword argument occurs.
+ * For example, this is useful for increasing verbosity levels
+ *
+ * This class inherided from [[Action]]
+ *
+ **/
+'use strict';
+
+var util = require('util');
+
+var Action = require('../action');
+
+/*:nodoc:*
+ * new ActionCount(options)
+ * - options (object): options hash see [[Action.new]]
+ *
+ **/
+var ActionCount = module.exports = function ActionCount(options) {
+  options = options || {};
+  options.nargs = 0;
+
+  Action.call(this, options);
+};
+util.inherits(ActionCount, Action);
+
+/*:nodoc:*
+ * ActionCount#call(parser, namespace, values, optionString) -> Void
+ * - parser (ArgumentParser): current parser
+ * - namespace (Namespace): namespace for output data
+ * - values (Array): parsed values
+ * - optionString (Array): input option string(not parsed)
+ *
+ * Call the action. Save result in namespace object
+ **/
+ActionCount.prototype.call = function (parser, namespace) {
+  namespace.set(this.dest, (namespace[this.dest] || 0) + 1);
+};

+ 47 - 0
node_modules/argparse/lib/action/help.js

@@ -0,0 +1,47 @@
+/*:nodoc:*
+ * class ActionHelp
+ *
+ * Support action for printing help
+ * This class inherided from [[Action]]
+ **/
+'use strict';
+
+var util = require('util');
+
+var Action = require('../action');
+
+// Constants
+var c  = require('../const');
+
+/*:nodoc:*
+ * new ActionHelp(options)
+ * - options (object): options hash see [[Action.new]]
+ *
+ **/
+var ActionHelp = module.exports = function ActionHelp(options) {
+  options = options || {};
+  if (options.defaultValue !== null) {
+    options.defaultValue = options.defaultValue;
+  } else {
+    options.defaultValue = c.SUPPRESS;
+  }
+  options.dest = (options.dest !== null ? options.dest : c.SUPPRESS);
+  options.nargs = 0;
+  Action.call(this, options);
+
+};
+util.inherits(ActionHelp, Action);
+
+/*:nodoc:*
+ * ActionHelp#call(parser, namespace, values, optionString)
+ * - parser (ArgumentParser): current parser
+ * - namespace (Namespace): namespace for output data
+ * - values (Array): parsed values
+ * - optionString (Array): input option string(not parsed)
+ *
+ * Print help and exit
+ **/
+ActionHelp.prototype.call = function (parser) {
+  parser.printHelp();
+  parser.exit();
+};

+ 50 - 0
node_modules/argparse/lib/action/store.js

@@ -0,0 +1,50 @@
+/*:nodoc:*
+ * class ActionStore
+ *
+ * This action just stores the argument’s value. This is the default action.
+ *
+ * This class inherited from [[Action]]
+ *
+ **/
+'use strict';
+
+var util = require('util');
+
+var Action = require('../action');
+
+// Constants
+var c = require('../const');
+
+
+/*:nodoc:*
+ * new ActionStore(options)
+ * - options (object): options hash see [[Action.new]]
+ *
+ **/
+var ActionStore = module.exports = function ActionStore(options) {
+  options = options || {};
+  if (this.nargs <= 0) {
+    throw new Error('nargs for store actions must be > 0; if you ' +
+        'have nothing to store, actions such as store ' +
+        'true or store const may be more appropriate');
+
+  }
+  if (typeof this.constant !== 'undefined' && this.nargs !== c.OPTIONAL) {
+    throw new Error('nargs must be OPTIONAL to supply const');
+  }
+  Action.call(this, options);
+};
+util.inherits(ActionStore, Action);
+
+/*:nodoc:*
+ * ActionStore#call(parser, namespace, values, optionString) -> Void
+ * - parser (ArgumentParser): current parser
+ * - namespace (Namespace): namespace for output data
+ * - values (Array): parsed values
+ * - optionString (Array): input option string(not parsed)
+ *
+ * Call the action. Save result in namespace object
+ **/
+ActionStore.prototype.call = function (parser, namespace, values) {
+  namespace.set(this.dest, values);
+};

+ 43 - 0
node_modules/argparse/lib/action/store/constant.js

@@ -0,0 +1,43 @@
+/*:nodoc:*
+ * class ActionStoreConstant
+ *
+ * This action stores the value specified by the const keyword argument.
+ * (Note that the const keyword argument defaults to the rather unhelpful null.)
+ * The 'store_const' action is most commonly used with optional
+ * arguments that specify some sort of flag.
+ *
+ * This class inherited from [[Action]]
+ **/
+'use strict';
+
+var util = require('util');
+
+var Action = require('../../action');
+
+/*:nodoc:*
+ * new ActionStoreConstant(options)
+ * - options (object): options hash see [[Action.new]]
+ *
+ **/
+var ActionStoreConstant = module.exports = function ActionStoreConstant(options) {
+  options = options || {};
+  options.nargs = 0;
+  if (typeof options.constant === 'undefined') {
+    throw new Error('constant option is required for storeAction');
+  }
+  Action.call(this, options);
+};
+util.inherits(ActionStoreConstant, Action);
+
+/*:nodoc:*
+ * ActionStoreConstant#call(parser, namespace, values, optionString) -> Void
+ * - parser (ArgumentParser): current parser
+ * - namespace (Namespace): namespace for output data
+ * - values (Array): parsed values
+ * - optionString (Array): input option string(not parsed)
+ *
+ * Call the action. Save result in namespace object
+ **/
+ActionStoreConstant.prototype.call = function (parser, namespace) {
+  namespace.set(this.dest, this.constant);
+};

+ 27 - 0
node_modules/argparse/lib/action/store/false.js

@@ -0,0 +1,27 @@
+/*:nodoc:*
+ * class ActionStoreFalse
+ *
+ * This action store the values False respectively.
+ * This is special cases of 'storeConst'
+ *
+ * This class inherited from [[Action]]
+ **/
+
+'use strict';
+
+var util = require('util');
+
+var ActionStoreConstant = require('./constant');
+
+/*:nodoc:*
+ * new ActionStoreFalse(options)
+ * - options (object): hash of options see [[Action.new]]
+ *
+ **/
+var ActionStoreFalse = module.exports = function ActionStoreFalse(options) {
+  options = options || {};
+  options.constant = false;
+  options.defaultValue = options.defaultValue !== null ? options.defaultValue : true;
+  ActionStoreConstant.call(this, options);
+};
+util.inherits(ActionStoreFalse, ActionStoreConstant);

+ 26 - 0
node_modules/argparse/lib/action/store/true.js

@@ -0,0 +1,26 @@
+/*:nodoc:*
+ * class ActionStoreTrue
+ *
+ * This action store the values True respectively.
+ * This isspecial cases of 'storeConst'
+ *
+ * This class inherited from [[Action]]
+ **/
+'use strict';
+
+var util = require('util');
+
+var ActionStoreConstant = require('./constant');
+
+/*:nodoc:*
+ * new ActionStoreTrue(options)
+ * - options (object): options hash see [[Action.new]]
+ *
+ **/
+var ActionStoreTrue = module.exports = function ActionStoreTrue(options) {
+  options = options || {};
+  options.constant = true;
+  options.defaultValue = options.defaultValue !== null ? options.defaultValue : false;
+  ActionStoreConstant.call(this, options);
+};
+util.inherits(ActionStoreTrue, ActionStoreConstant);

+ 149 - 0
node_modules/argparse/lib/action/subparsers.js

@@ -0,0 +1,149 @@
+/** internal
+ * class ActionSubparsers
+ *
+ * Support the creation of such sub-commands with the addSubparsers()
+ *
+ * This class inherited from [[Action]]
+ **/
+'use strict';
+
+var util    = require('util');
+var format  = require('util').format;
+
+
+var Action = require('../action');
+
+// Constants
+var c = require('../const');
+
+// Errors
+var argumentErrorHelper = require('../argument/error');
+
+
+/*:nodoc:*
+ * new ChoicesPseudoAction(name, help)
+ *
+ * Create pseudo action for correct help text
+ *
+ **/
+function ChoicesPseudoAction(name, help) {
+  var options = {
+    optionStrings: [],
+    dest: name,
+    help: help
+  };
+
+  Action.call(this, options);
+}
+
+util.inherits(ChoicesPseudoAction, Action);
+
+/**
+ * new ActionSubparsers(options)
+ * - options (object): options hash see [[Action.new]]
+ *
+ **/
+function ActionSubparsers(options) {
+  options = options || {};
+  options.dest = options.dest || c.SUPPRESS;
+  options.nargs = c.PARSER;
+
+  this.debug = (options.debug === true);
+
+  this._progPrefix = options.prog;
+  this._parserClass = options.parserClass;
+  this._nameParserMap = {};
+  this._choicesActions = [];
+
+  options.choices = this._nameParserMap;
+  Action.call(this, options);
+}
+
+util.inherits(ActionSubparsers, Action);
+
+/*:nodoc:*
+ * ActionSubparsers#addParser(name, options) -> ArgumentParser
+ * - name (string): sub-command name
+ * - options (object): see [[ArgumentParser.new]]
+ *
+ *  Note:
+ *  addParser supports an additional aliases option,
+ *  which allows multiple strings to refer to the same subparser.
+ *  This example, like svn, aliases co as a shorthand for checkout
+ *
+ **/
+ActionSubparsers.prototype.addParser = function (name, options) {
+  var parser;
+
+  var self = this;
+
+  options = options || {};
+
+  options.debug = (this.debug === true);
+
+  // set program from the existing prefix
+  if (!options.prog) {
+    options.prog = this._progPrefix + ' ' + name;
+  }
+
+  var aliases = options.aliases || [];
+
+  // create a pseudo-action to hold the choice help
+  if (!!options.help || typeof options.help === 'string') {
+    var help = options.help;
+    delete options.help;
+
+    var choiceAction = new ChoicesPseudoAction(name, help);
+    this._choicesActions.push(choiceAction);
+  }
+
+  // create the parser and add it to the map
+  parser = new this._parserClass(options);
+  this._nameParserMap[name] = parser;
+
+  // make parser available under aliases also
+  aliases.forEach(function (alias) {
+    self._nameParserMap[alias] = parser;
+  });
+
+  return parser;
+};
+
+ActionSubparsers.prototype._getSubactions = function () {
+  return this._choicesActions;
+};
+
+/*:nodoc:*
+ * ActionSubparsers#call(parser, namespace, values, optionString) -> Void
+ * - parser (ArgumentParser): current parser
+ * - namespace (Namespace): namespace for output data
+ * - values (Array): parsed values
+ * - optionString (Array): input option string(not parsed)
+ *
+ * Call the action. Parse input aguments
+ **/
+ActionSubparsers.prototype.call = function (parser, namespace, values) {
+  var parserName = values[0];
+  var argStrings = values.slice(1);
+
+  // set the parser name if requested
+  if (this.dest !== c.SUPPRESS) {
+    namespace[this.dest] = parserName;
+  }
+
+  // select the parser
+  if (this._nameParserMap[parserName]) {
+    parser = this._nameParserMap[parserName];
+  } else {
+    throw argumentErrorHelper(format(
+      'Unknown parser "%s" (choices: [%s]).',
+        parserName,
+        Object.keys(this._nameParserMap).join(', ')
+    ));
+  }
+
+  // parse all the remaining options into the namespace
+  parser.parseArgs(argStrings, namespace);
+};
+
+module.exports = ActionSubparsers;

+ 47 - 0
node_modules/argparse/lib/action/version.js

@@ -0,0 +1,47 @@
+/*:nodoc:*
+ * class ActionVersion
+ *
+ * Support action for printing program version
+ * This class inherited from [[Action]]
+ **/
+'use strict';
+
+var util = require('util');
+
+var Action = require('../action');
+
+//
+// Constants
+//
+var c = require('../const');
+
+/*:nodoc:*
+ * new ActionVersion(options)
+ * - options (object): options hash see [[Action.new]]
+ *
+ **/
+var ActionVersion = module.exports = function ActionVersion(options) {
+  options = options || {};
+  options.defaultValue = (options.defaultValue ? options.defaultValue : c.SUPPRESS);
+  options.dest = (options.dest || c.SUPPRESS);
+  options.nargs = 0;
+  this.version = options.version;
+  Action.call(this, options);
+};
+util.inherits(ActionVersion, Action);
+
+/*:nodoc:*
+ * ActionVersion#call(parser, namespace, values, optionString) -> Void
+ * - parser (ArgumentParser): current parser
+ * - namespace (Namespace): namespace for output data
+ * - values (Array): parsed values
+ * - optionString (Array): input option string(not parsed)
+ *
+ * Print version and exit
+ **/
+ActionVersion.prototype.call = function (parser) {
+  var version = this.version || parser.version;
+  var formatter = parser._getFormatter();
+  formatter.addText(version);
+  parser.exit(0, formatter.formatHelp());
+};

+ 482 - 0
node_modules/argparse/lib/action_container.js

@@ -0,0 +1,482 @@
+/** internal
+ * class ActionContainer
+ *
+ * Action container. Parent for [[ArgumentParser]] and [[ArgumentGroup]]
+ **/
+
+'use strict';
+
+var format = require('util').format;
+
+// Constants
+var c = require('./const');
+
+var $$ = require('./utils');
+
+//Actions
+var ActionHelp = require('./action/help');
+var ActionAppend = require('./action/append');
+var ActionAppendConstant = require('./action/append/constant');
+var ActionCount = require('./action/count');
+var ActionStore = require('./action/store');
+var ActionStoreConstant = require('./action/store/constant');
+var ActionStoreTrue = require('./action/store/true');
+var ActionStoreFalse = require('./action/store/false');
+var ActionVersion = require('./action/version');
+var ActionSubparsers = require('./action/subparsers');
+
+// Errors
+var argumentErrorHelper = require('./argument/error');
+
+/**
+ * new ActionContainer(options)
+ *
+ * Action container. Parent for [[ArgumentParser]] and [[ArgumentGroup]]
+ *
+ * ##### Options:
+ *
+ * - `description` -- A description of what the program does
+ * - `prefixChars`  -- Characters that prefix optional arguments
+ * - `argumentDefault`  -- The default value for all arguments
+ * - `conflictHandler` -- The conflict handler to use for duplicate arguments
+ **/
+var ActionContainer = module.exports = function ActionContainer(options) {
+  options = options || {};
+
+  this.description = options.description;
+  this.argumentDefault = options.argumentDefault;
+  this.prefixChars = options.prefixChars || '';
+  this.conflictHandler = options.conflictHandler;
+
+  // set up registries
+  this._registries = {};
+
+  // register actions
+  this.register('action', null, ActionStore);
+  this.register('action', 'store', ActionStore);
+  this.register('action', 'storeConst', ActionStoreConstant);
+  this.register('action', 'storeTrue', ActionStoreTrue);
+  this.register('action', 'storeFalse', ActionStoreFalse);
+  this.register('action', 'append', ActionAppend);
+  this.register('action', 'appendConst', ActionAppendConstant);
+  this.register('action', 'count', ActionCount);
+  this.register('action', 'help', ActionHelp);
+  this.register('action', 'version', ActionVersion);
+  this.register('action', 'parsers', ActionSubparsers);
+
+  // raise an exception if the conflict handler is invalid
+  this._getHandler();
+
+  // action storage
+  this._actions = [];
+  this._optionStringActions = {};
+
+  // groups
+  this._actionGroups = [];
+  this._mutuallyExclusiveGroups = [];
+
+  // defaults storage
+  this._defaults = {};
+
+  // determines whether an "option" looks like a negative number
+  // -1, -1.5 -5e+4
+  this._regexpNegativeNumber = new RegExp('^[-]?[0-9]*\\.?[0-9]+([eE][-+]?[0-9]+)?$');
+
+  // whether or not there are any optionals that look like negative
+  // numbers -- uses a list so it can be shared and edited
+  this._hasNegativeNumberOptionals = [];
+};
+
+// Groups must be required, then ActionContainer already defined
+var ArgumentGroup = require('./argument/group');
+var MutuallyExclusiveGroup = require('./argument/exclusive');
+
+//
+// Registration methods
+//
+
+/**
+ * ActionContainer#register(registryName, value, object) -> Void
+ * - registryName (String) : object type action|type
+ * - value (string) : keyword
+ * - object (Object|Function) : handler
+ *
+ *  Register handlers
+ **/
+ActionContainer.prototype.register = function (registryName, value, object) {
+  this._registries[registryName] = this._registries[registryName] || {};
+  this._registries[registryName][value] = object;
+};
+
+ActionContainer.prototype._registryGet = function (registryName, value, defaultValue) {
+  if (arguments.length < 3) {
+    defaultValue = null;
+  }
+  return this._registries[registryName][value] || defaultValue;
+};
+
+//
+// Namespace default accessor methods
+//
+
+/**
+ * ActionContainer#setDefaults(options) -> Void
+ * - options (object):hash of options see [[Action.new]]
+ *
+ * Set defaults
+ **/
+ActionContainer.prototype.setDefaults = function (options) {
+  options = options || {};
+  for (var property in options) {
+    if ($$.has(options, property)) {
+      this._defaults[property] = options[property];
+    }
+  }
+
+  // if these defaults match any existing arguments, replace the previous
+  // default on the object with the new one
+  this._actions.forEach(function (action) {
+    if ($$.has(options, action.dest)) {
+      action.defaultValue = options[action.dest];
+    }
+  });
+};
+
+/**
+ * ActionContainer#getDefault(dest) -> Mixed
+ * - dest (string): action destination
+ *
+ * Return action default value
+ **/
+ActionContainer.prototype.getDefault = function (dest) {
+  var result = $$.has(this._defaults, dest) ? this._defaults[dest] : null;
+
+  this._actions.forEach(function (action) {
+    if (action.dest === dest && $$.has(action, 'defaultValue')) {
+      result = action.defaultValue;
+    }
+  });
+
+  return result;
+};
+//
+// Adding argument actions
+//
+
+/**
+ * ActionContainer#addArgument(args, options) -> Object
+ * - args (String|Array): argument key, or array of argument keys
+ * - options (Object): action objects see [[Action.new]]
+ *
+ * #### Examples
+ * - addArgument([ '-f', '--foo' ], { action: 'store', defaultValue: 1, ... })
+ * - addArgument([ 'bar' ], { action: 'store', nargs: 1, ... })
+ * - addArgument('--baz', { action: 'store', nargs: 1, ... })
+ **/
+ActionContainer.prototype.addArgument = function (args, options) {
+  args = args;
+  options = options || {};
+
+  if (typeof args === 'string') {
+    args = [ args ];
+  }
+  if (!Array.isArray(args)) {
+    throw new TypeError('addArgument first argument should be a string or an array');
+  }
+  if (typeof options !== 'object' || Array.isArray(options)) {
+    throw new TypeError('addArgument second argument should be a hash');
+  }
+
+  // if no positional args are supplied or only one is supplied and
+  // it doesn't look like an option string, parse a positional argument
+  if (!args || args.length === 1 && this.prefixChars.indexOf(args[0][0]) < 0) {
+    if (args && !!options.dest) {
+      throw new Error('dest supplied twice for positional argument');
+    }
+    options = this._getPositional(args, options);
+
+    // otherwise, we're adding an optional argument
+  } else {
+    options = this._getOptional(args, options);
+  }
+
+  // if no default was supplied, use the parser-level default
+  if (typeof options.defaultValue === 'undefined') {
+    var dest = options.dest;
+    if ($$.has(this._defaults, dest)) {
+      options.defaultValue = this._defaults[dest];
+    } else if (typeof this.argumentDefault !== 'undefined') {
+      options.defaultValue = this.argumentDefault;
+    }
+  }
+
+  // create the action object, and add it to the parser
+  var ActionClass = this._popActionClass(options);
+  if (typeof ActionClass !== 'function') {
+    throw new Error(format('Unknown action "%s".', ActionClass));
+  }
+  var action = new ActionClass(options);
+
+  // throw an error if the action type is not callable
+  var typeFunction = this._registryGet('type', action.type, action.type);
+  if (typeof typeFunction !== 'function') {
+    throw new Error(format('"%s" is not callable', typeFunction));
+  }
+
+  return this._addAction(action);
+};
+
+/**
+ * ActionContainer#addArgumentGroup(options) -> ArgumentGroup
+ * - options (Object): hash of options see [[ArgumentGroup.new]]
+ *
+ * Create new arguments groups
+ **/
+ActionContainer.prototype.addArgumentGroup = function (options) {
+  var group = new ArgumentGroup(this, options);
+  this._actionGroups.push(group);
+  return group;
+};
+
+/**
+ * ActionContainer#addMutuallyExclusiveGroup(options) -> ArgumentGroup
+ * - options (Object): {required: false}
+ *
+ * Create new mutual exclusive groups
+ **/
+ActionContainer.prototype.addMutuallyExclusiveGroup = function (options) {
+  var group = new MutuallyExclusiveGroup(this, options);
+  this._mutuallyExclusiveGroups.push(group);
+  return group;
+};
+
+ActionContainer.prototype._addAction = function (action) {
+  var self = this;
+
+  // resolve any conflicts
+  this._checkConflict(action);
+
+  // add to actions list
+  this._actions.push(action);
+  action.container = this;
+
+  // index the action by any option strings it has
+  action.optionStrings.forEach(function (optionString) {
+    self._optionStringActions[optionString] = action;
+  });
+
+  // set the flag if any option strings look like negative numbers
+  action.optionStrings.forEach(function (optionString) {
+    if (optionString.match(self._regexpNegativeNumber)) {
+      if (!self._hasNegativeNumberOptionals.some(Boolean)) {
+        self._hasNegativeNumberOptionals.push(true);
+      }
+    }
+  });
+
+  // return the created action
+  return action;
+};
+
+ActionContainer.prototype._removeAction = function (action) {
+  var actionIndex = this._actions.indexOf(action);
+  if (actionIndex >= 0) {
+    this._actions.splice(actionIndex, 1);
+  }
+};
+
+ActionContainer.prototype._addContainerActions = function (container) {
+  // collect groups by titles
+  var titleGroupMap = {};
+  this._actionGroups.forEach(function (group) {
+    if (titleGroupMap[group.title]) {
+      throw new Error(format('Cannot merge actions - two groups are named "%s".', group.title));
+    }
+    titleGroupMap[group.title] = group;
+  });
+
+  // map each action to its group
+  var groupMap = {};
+  function actionHash(action) {
+    // unique (hopefully?) string suitable as dictionary key
+    return action.getName();
+  }
+  container._actionGroups.forEach(function (group) {
+    // if a group with the title exists, use that, otherwise
+    // create a new group matching the container's group
+    if (!titleGroupMap[group.title]) {
+      titleGroupMap[group.title] = this.addArgumentGroup({
+        title: group.title,
+        description: group.description
+      });
+    }
+
+    // map the actions to their new group
+    group._groupActions.forEach(function (action) {
+      groupMap[actionHash(action)] = titleGroupMap[group.title];
+    });
+  }, this);
+
+  // add container's mutually exclusive groups
+  // NOTE: if add_mutually_exclusive_group ever gains title= and
+  // description= then this code will need to be expanded as above
+  var mutexGroup;
+  container._mutuallyExclusiveGroups.forEach(function (group) {
+    mutexGroup = this.addMutuallyExclusiveGroup({
+      required: group.required
+    });
+    // map the actions to their new mutex group
+    group._groupActions.forEach(function (action) {
+      groupMap[actionHash(action)] = mutexGroup;
+    });
+  }, this);  // forEach takes a 'this' argument
+
+  // add all actions to this container or their group
+  container._actions.forEach(function (action) {
+    var key = actionHash(action);
+    if (groupMap[key]) {
+      groupMap[key]._addAction(action);
+    } else {
+      this._addAction(action);
+    }
+  });
+};
+
+ActionContainer.prototype._getPositional = function (dest, options) {
+  if (Array.isArray(dest)) {
+    dest = dest[0];
+  }
+  // make sure required is not specified
+  if (options.required) {
+    throw new Error('"required" is an invalid argument for positionals.');
+  }
+
+  // mark positional arguments as required if at least one is
+  // always required
+  if (options.nargs !== c.OPTIONAL && options.nargs !== c.ZERO_OR_MORE) {
+    options.required = true;
+  }
+  if (options.nargs === c.ZERO_OR_MORE && typeof options.defaultValue === 'undefined') {
+    options.required = true;
+  }
+
+  // return the keyword arguments with no option strings
+  options.dest = dest;
+  options.optionStrings = [];
+  return options;
+};
+
+ActionContainer.prototype._getOptional = function (args, options) {
+  var prefixChars = this.prefixChars;
+  var optionStrings = [];
+  var optionStringsLong = [];
+
+  // determine short and long option strings
+  args.forEach(function (optionString) {
+    // error on strings that don't start with an appropriate prefix
+    if (prefixChars.indexOf(optionString[0]) < 0) {
+      throw new Error(format('Invalid option string "%s": must start with a "%s".',
+        optionString,
+        prefixChars
+      ));
+    }
+
+    // strings starting with two prefix characters are long options
+    optionStrings.push(optionString);
+    if (optionString.length > 1 && prefixChars.indexOf(optionString[1]) >= 0) {
+      optionStringsLong.push(optionString);
+    }
+  });
+
+  // infer dest, '--foo-bar' -> 'foo_bar' and '-x' -> 'x'
+  var dest = options.dest || null;
+  delete options.dest;
+
+  if (!dest) {
+    var optionStringDest = optionStringsLong.length ? optionStringsLong[0] : optionStrings[0];
+    dest = $$.trimChars(optionStringDest, this.prefixChars);
+
+    if (dest.length === 0) {
+      throw new Error(
+        format('dest= is required for options like "%s"', optionStrings.join(', '))
+      );
+    }
+    dest = dest.replace(/-/g, '_');
+  }
+
+  // return the updated keyword arguments
+  options.dest = dest;
+  options.optionStrings = optionStrings;
+
+  return options;
+};
+
+ActionContainer.prototype._popActionClass = function (options, defaultValue) {
+  defaultValue = defaultValue || null;
+
+  var action = (options.action || defaultValue);
+  delete options.action;
+
+  var actionClass = this._registryGet('action', action, action);
+  return actionClass;
+};
+
+ActionContainer.prototype._getHandler = function () {
+  var handlerString = this.conflictHandler;
+  var handlerFuncName = '_handleConflict' + $$.capitalize(handlerString);
+  var func = this[handlerFuncName];
+  if (typeof func === 'undefined') {
+    var msg = 'invalid conflict resolution value: ' + handlerString;
+    throw new Error(msg);
+  } else {
+    return func;
+  }
+};
+
+ActionContainer.prototype._checkConflict = function (action) {
+  var optionStringActions = this._optionStringActions;
+  var conflictOptionals = [];
+
+  // find all options that conflict with this option
+  // collect pairs, the string, and an existing action that it conflicts with
+  action.optionStrings.forEach(function (optionString) {
+    var conflOptional = optionStringActions[optionString];
+    if (typeof conflOptional !== 'undefined') {
+      conflictOptionals.push([ optionString, conflOptional ]);
+    }
+  });
+
+  if (conflictOptionals.length > 0) {
+    var conflictHandler = this._getHandler();
+    conflictHandler.call(this, action, conflictOptionals);
+  }
+};
+
+ActionContainer.prototype._handleConflictError = function (action, conflOptionals) {
+  var conflicts = conflOptionals.map(function (pair) { return pair[0]; });
+  conflicts = conflicts.join(', ');
+  throw argumentErrorHelper(
+    action,
+    format('Conflicting option string(s): %s', conflicts)
+  );
+};
+
+ActionContainer.prototype._handleConflictResolve = function (action, conflOptionals) {
+  // remove all conflicting options
+  var self = this;
+  conflOptionals.forEach(function (pair) {
+    var optionString = pair[0];
+    var conflictingAction = pair[1];
+    // remove the conflicting option string
+    var i = conflictingAction.optionStrings.indexOf(optionString);
+    if (i >= 0) {
+      conflictingAction.optionStrings.splice(i, 1);
+    }
+    delete self._optionStringActions[optionString];
+    // if the option now has no option string, remove it from the
+    // container holding it
+    if (conflictingAction.optionStrings.length === 0) {
+      conflictingAction.container._removeAction(conflictingAction);
+    }
+  });
+};

+ 14 - 0
node_modules/argparse/lib/argparse.js

@@ -0,0 +1,14 @@
+'use strict';
+
+module.exports.ArgumentParser = require('./argument_parser.js');
+module.exports.Namespace = require('./namespace');
+module.exports.Action = require('./action');
+module.exports.HelpFormatter = require('./help/formatter.js');
+module.exports.Const = require('./const.js');
+
+module.exports.ArgumentDefaultsHelpFormatter =
+  require('./help/added_formatters.js').ArgumentDefaultsHelpFormatter;
+module.exports.RawDescriptionHelpFormatter =
+  require('./help/added_formatters.js').RawDescriptionHelpFormatter;
+module.exports.RawTextHelpFormatter =
+  require('./help/added_formatters.js').RawTextHelpFormatter;

+ 50 - 0
node_modules/argparse/lib/argument/error.js

@@ -0,0 +1,50 @@
+'use strict';
+
+
+var format  = require('util').format;
+
+
+var ERR_CODE = 'ARGError';
+
+/*:nodoc:*
+ * argumentError(argument, message) -> TypeError
+ * - argument (Object): action with broken argument
+ * - message (String): error message
+ *
+ * Error format helper. An error from creating or using an argument
+ * (optional or positional). The string value of this exception
+ * is the message, augmented with information
+ * about the argument that caused it.
+ *
+ * #####Example
+ *
+ *      var argumentErrorHelper = require('./argument/error');
+ *      if (conflictOptionals.length > 0) {
+ *        throw argumentErrorHelper(
+ *          action,
+ *          format('Conflicting option string(s): %s', conflictOptionals.join(', '))
+ *        );
+ *      }
+ *
+ **/
+module.exports = function (argument, message) {
+  var argumentName = null;
+  var errMessage;
+  var err;
+
+  if (argument.getName) {
+    argumentName = argument.getName();
+  } else {
+    argumentName = '' + argument;
+  }
+
+  if (!argumentName) {
+    errMessage = message;
+  } else {
+    errMessage = format('argument "%s": %s', argumentName, message);
+  }
+
+  err = new TypeError(errMessage);
+  err.code = ERR_CODE;
+  return err;
+};

+ 54 - 0
node_modules/argparse/lib/argument/exclusive.js

@@ -0,0 +1,54 @@
+/** internal
+ * class MutuallyExclusiveGroup
+ *
+ * Group arguments.
+ * By default, ArgumentParser groups command-line arguments
+ * into “positional arguments” and “optional arguments”
+ * when displaying help messages. When there is a better
+ * conceptual grouping of arguments than this default one,
+ * appropriate groups can be created using the addArgumentGroup() method
+ *
+ * This class inherited from [[ArgumentContainer]]
+ **/
+'use strict';
+
+var util = require('util');
+
+var ArgumentGroup = require('./group');
+
+/**
+ * new MutuallyExclusiveGroup(container, options)
+ * - container (object): main container
+ * - options (object): options.required -> true/false
+ *
+ * `required` could be an argument itself, but making it a property of
+ * the options argument is more consistent with the JS adaptation of the Python)
+ **/
+var MutuallyExclusiveGroup = module.exports = function MutuallyExclusiveGroup(container, options) {
+  var required;
+  options = options || {};
+  required = options.required || false;
+  ArgumentGroup.call(this, container);
+  this.required = required;
+
+};
+util.inherits(MutuallyExclusiveGroup, ArgumentGroup);
+
+
+MutuallyExclusiveGroup.prototype._addAction = function (action) {
+  var msg;
+  if (action.required) {
+    msg = 'mutually exclusive arguments must be optional';
+    throw new Error(msg);
+  }
+  action = this._container._addAction(action);
+  this._groupActions.push(action);
+  return action;
+};
+
+
+MutuallyExclusiveGroup.prototype._removeAction = function (action) {
+  this._container._removeAction(action);
+  this._groupActions.remove(action);
+};
+

+ 75 - 0
node_modules/argparse/lib/argument/group.js

@@ -0,0 +1,75 @@
+/** internal
+ * class ArgumentGroup
+ *
+ * Group arguments.
+ * By default, ArgumentParser groups command-line arguments
+ * into “positional arguments” and “optional arguments”
+ * when displaying help messages. When there is a better
+ * conceptual grouping of arguments than this default one,
+ * appropriate groups can be created using the addArgumentGroup() method
+ *
+ * This class inherited from [[ArgumentContainer]]
+ **/
+'use strict';
+
+var util = require('util');
+
+var ActionContainer = require('../action_container');
+
+
+/**
+ * new ArgumentGroup(container, options)
+ * - container (object): main container
+ * - options (object): hash of group options
+ *
+ * #### options
+ * - **prefixChars**  group name prefix
+ * - **argumentDefault**  default argument value
+ * - **title**  group title
+ * - **description** group description
+ *
+ **/
+var ArgumentGroup = module.exports = function ArgumentGroup(container, options) {
+
+  options = options || {};
+
+  // add any missing keyword arguments by checking the container
+  options.conflictHandler = (options.conflictHandler || container.conflictHandler);
+  options.prefixChars = (options.prefixChars || container.prefixChars);
+  options.argumentDefault = (options.argumentDefault || container.argumentDefault);
+
+  ActionContainer.call(this, options);
+
+  // group attributes
+  this.title = options.title;
+  this._groupActions = [];
+
+  // share most attributes with the container
+  this._container = container;
+  this._registries = container._registries;
+  this._actions = container._actions;
+  this._optionStringActions = container._optionStringActions;
+  this._defaults = container._defaults;
+  this._hasNegativeNumberOptionals = container._hasNegativeNumberOptionals;
+  this._mutuallyExclusiveGroups = container._mutuallyExclusiveGroups;
+};
+util.inherits(ArgumentGroup, ActionContainer);
+
+
+ArgumentGroup.prototype._addAction = function (action) {
+  // Parent add action
+  action = ActionContainer.prototype._addAction.call(this, action);
+  this._groupActions.push(action);
+  return action;
+};
+
+
+ArgumentGroup.prototype._removeAction = function (action) {
+  // Parent remove action
+  ActionContainer.prototype._removeAction.call(this, action);
+  var actionIndex = this._groupActions.indexOf(action);
+  if (actionIndex >= 0) {
+    this._groupActions.splice(actionIndex, 1);
+  }
+};
+

File diff suppressed because it is too large
+ 1161 - 0
node_modules/argparse/lib/argument_parser.js


+ 21 - 0
node_modules/argparse/lib/const.js

@@ -0,0 +1,21 @@
+//
+// Constants
+//
+
+'use strict';
+
+module.exports.EOL = '\n';
+
+module.exports.SUPPRESS = '==SUPPRESS==';
+
+module.exports.OPTIONAL = '?';
+
+module.exports.ZERO_OR_MORE = '*';
+
+module.exports.ONE_OR_MORE = '+';
+
+module.exports.PARSER = 'A...';
+
+module.exports.REMAINDER = '...';
+
+module.exports._UNRECOGNIZED_ARGS_ATTR = '_unrecognized_args';

+ 87 - 0
node_modules/argparse/lib/help/added_formatters.js

@@ -0,0 +1,87 @@
+'use strict';
+
+var util    = require('util');
+
+// Constants
+var c = require('../const');
+
+var $$ = require('../utils');
+var HelpFormatter = require('./formatter.js');
+
+/**
+ * new RawDescriptionHelpFormatter(options)
+ * new ArgumentParser({formatterClass: argparse.RawDescriptionHelpFormatter, ...})
+ *
+ * Help message formatter which adds default values to argument help.
+ *
+ * Only the name of this class is considered a public API. All the methods
+ * provided by the class are considered an implementation detail.
+ **/
+
+function ArgumentDefaultsHelpFormatter(options) {
+  HelpFormatter.call(this, options);