Browse Source

succes finish first etape game

Valentin 1 year ago
parent
commit
d024ca4181
84 changed files with 869 additions and 4398 deletions
  1. 301 100
      .idea/workspace.xml
  2. 13 2
      Application.js
  3. 14 3
      Application.ts
  4. 2 1
      manager/UserManager.js
  5. 2 1
      manager/UserManager.ts
  6. 2 1
      modules/DbCrafty/config/entity.yml
  7. 2 1
      modules/SecurityCrafty/Security.js
  8. 6 1
      modules/SecurityCrafty/Security.ts
  9. 1 1
      modules/Server0Game/Player.js
  10. 1 1
      modules/Server0Game/Player.ts
  11. 22 3
      modules/Server0Game/SessionGame.js
  12. 23 3
      modules/Server0Game/SessionGame.ts
  13. 0 47
      node_modules/lodash.foreach/LICENSE
  14. 0 18
      node_modules/lodash.foreach/README.md
  15. 0 565
      node_modules/lodash.foreach/index.js
  16. 0 69
      node_modules/lodash.foreach/package.json
  17. 0 47
      node_modules/lodash.get/LICENSE
  18. 0 18
      node_modules/lodash.get/README.md
  19. 0 931
      node_modules/lodash.get/index.js
  20. 0 69
      node_modules/lodash.get/package.json
  21. 0 13
      node_modules/mongoose-unique-validator/.editorconfig
  22. 0 120
      node_modules/mongoose-unique-validator/.eslintrc
  23. 0 15
      node_modules/mongoose-unique-validator/.npmignore
  24. 0 8
      node_modules/mongoose-unique-validator/.travis.yml
  25. 0 17
      node_modules/mongoose-unique-validator/CHANGELOG.md
  26. 0 19
      node_modules/mongoose-unique-validator/CONTRIBUTING.md
  27. 0 162
      node_modules/mongoose-unique-validator/README.md
  28. 0 119
      node_modules/mongoose-unique-validator/index.js
  29. 0 76
      node_modules/mongoose-unique-validator/package.json
  30. 0 221
      node_modules/mongoose-unique-validator/test/helpers.js
  31. 0 20
      node_modules/mongoose-unique-validator/test/index.spec.js
  32. 0 62
      node_modules/mongoose-unique-validator/test/tests/messages.spec.js
  33. 0 45
      node_modules/mongoose-unique-validator/test/tests/types.spec.js
  34. 0 387
      node_modules/mongoose-unique-validator/test/tests/validation.spec.js
  35. 26 19
      package-lock.json
  36. 1 1
      package.json
  37. 0 1186
      public/game/app/app.js
  38. 386 0
      public/member/game/app/app.js
  39. 0 0
      public/member/game/app/canvasInput.js
  40. 0 0
      public/member/game/app/phaser.min.js
  41. 0 0
      public/member/game/app/socket.io.js
  42. 0 0
      public/member/game/asset/AVLevel.png
  43. 0 0
      public/member/game/asset/bdd.png
  44. 0 0
      public/member/game/asset/coh.png
  45. 0 0
      public/member/game/asset/cov.png
  46. 0 0
      public/member/game/asset/disabled.png
  47. 0 0
      public/member/game/asset/fox.png
  48. 0 0
      public/member/game/asset/lockunlock.png
  49. 0 0
      public/member/game/asset/net.png
  50. 0 0
      public/member/game/asset/ok.png
  51. 0 0
      public/member/game/asset/pc.png
  52. 0 0
      public/member/game/asset/player.png
  53. 0 0
      public/member/game/asset/progress.png
  54. 0 0
      public/member/game/asset/protected.png
  55. 0 0
      public/member/game/asset/server.png
  56. 0 0
      public/member/game/lib/HealthBar.standalone.ts
  57. 0 0
      public/member/game/lib/p2.d.ts
  58. 0 0
      public/member/game/lib/phaser.d.ts
  59. 0 0
      public/member/game/lib/pixi.d.ts
  60. 0 0
      public/member/game/lib/socket.io-client.d.ts
  61. 0 0
      public/member/game/maquette.jpg
  62. 0 0
      public/member/game/src/ConsoleManager.ts
  63. 0 0
      public/member/game/src/LevelAvManager.ts
  64. 0 0
      public/member/game/src/ManageText.ts
  65. 0 0
      public/member/game/src/NetworkManager.ts
  66. 0 0
      public/member/game/src/Player.ts
  67. 0 0
      public/member/game/src/Terminal.ts
  68. 0 0
      public/member/game/src/state/BootState.ts
  69. 0 0
      public/member/game/src/state/GameOverState.ts
  70. 3 7
      public/game/src/state/GameState.ts
  71. 0 0
      public/member/game/src/state/LoadState.ts
  72. 1 2
      public/game/src/state/WelcomeState.ts
  73. 0 0
      public/member/game/src/state/WinState.ts
  74. 0 0
      public/member/game/src/terminal/Computer.ts
  75. 0 0
      public/member/game/src/terminal/Database.ts
  76. 0 0
      public/member/game/src/terminal/Server0.ts
  77. 0 0
      public/member/game/src/tsconfig.json
  78. 19 2
      routes/GameController.js
  79. 20 2
      routes/GameController.ts
  80. 6 1
      routes/MemberController.js
  81. 7 1
      routes/MemberController.ts
  82. 4 4
      views/Game/game.twig
  83. 5 5
      views/Member/home.twig
  84. 2 2
      views/layout.twig

+ 301 - 100
.idea/workspace.xml

@@ -2,12 +2,89 @@
 <project version="4">
   <component name="ChangeListManager">
     <list default="true" id="ce4fad63-964c-4bbb-b51c-741aebf58a28" name="Default" comment="">
+      <change type="DELETED" beforePath="$PROJECT_DIR$/node_modules/lodash.foreach/LICENSE" afterPath="" />
+      <change type="DELETED" beforePath="$PROJECT_DIR$/node_modules/lodash.foreach/README.md" afterPath="" />
+      <change type="DELETED" beforePath="$PROJECT_DIR$/node_modules/lodash.foreach/index.js" afterPath="" />
+      <change type="DELETED" beforePath="$PROJECT_DIR$/node_modules/lodash.foreach/package.json" afterPath="" />
+      <change type="DELETED" beforePath="$PROJECT_DIR$/node_modules/lodash.get/LICENSE" afterPath="" />
+      <change type="DELETED" beforePath="$PROJECT_DIR$/node_modules/lodash.get/README.md" afterPath="" />
+      <change type="DELETED" beforePath="$PROJECT_DIR$/node_modules/lodash.get/index.js" afterPath="" />
+      <change type="DELETED" beforePath="$PROJECT_DIR$/node_modules/lodash.get/package.json" afterPath="" />
+      <change type="DELETED" beforePath="$PROJECT_DIR$/node_modules/mongoose-unique-validator/.editorconfig" afterPath="" />
+      <change type="DELETED" beforePath="$PROJECT_DIR$/node_modules/mongoose-unique-validator/.eslintrc" afterPath="" />
+      <change type="DELETED" beforePath="$PROJECT_DIR$/node_modules/mongoose-unique-validator/.npmignore" afterPath="" />
+      <change type="DELETED" beforePath="$PROJECT_DIR$/node_modules/mongoose-unique-validator/.travis.yml" afterPath="" />
+      <change type="DELETED" beforePath="$PROJECT_DIR$/node_modules/mongoose-unique-validator/CHANGELOG.md" afterPath="" />
+      <change type="DELETED" beforePath="$PROJECT_DIR$/node_modules/mongoose-unique-validator/CONTRIBUTING.md" afterPath="" />
+      <change type="DELETED" beforePath="$PROJECT_DIR$/node_modules/mongoose-unique-validator/README.md" afterPath="" />
+      <change type="DELETED" beforePath="$PROJECT_DIR$/node_modules/mongoose-unique-validator/index.js" afterPath="" />
+      <change type="DELETED" beforePath="$PROJECT_DIR$/node_modules/mongoose-unique-validator/package.json" afterPath="" />
+      <change type="DELETED" beforePath="$PROJECT_DIR$/node_modules/mongoose-unique-validator/test/helpers.js" afterPath="" />
+      <change type="DELETED" beforePath="$PROJECT_DIR$/node_modules/mongoose-unique-validator/test/index.spec.js" afterPath="" />
+      <change type="DELETED" beforePath="$PROJECT_DIR$/node_modules/mongoose-unique-validator/test/tests/messages.spec.js" afterPath="" />
+      <change type="DELETED" beforePath="$PROJECT_DIR$/node_modules/mongoose-unique-validator/test/tests/types.spec.js" afterPath="" />
+      <change type="DELETED" beforePath="$PROJECT_DIR$/node_modules/mongoose-unique-validator/test/tests/validation.spec.js" afterPath="" />
+      <change type="DELETED" beforePath="$PROJECT_DIR$/public/game/app/app.js" afterPath="" />
+      <change type="DELETED" beforePath="$PROJECT_DIR$/public/game/app/canvasInput.js" afterPath="" />
+      <change type="DELETED" beforePath="$PROJECT_DIR$/public/game/app/phaser.min.js" afterPath="" />
+      <change type="DELETED" beforePath="$PROJECT_DIR$/public/game/app/socket.io.js" afterPath="" />
+      <change type="DELETED" beforePath="$PROJECT_DIR$/public/game/asset/AVLevel.png" afterPath="" />
+      <change type="DELETED" beforePath="$PROJECT_DIR$/public/game/asset/bdd.png" afterPath="" />
+      <change type="DELETED" beforePath="$PROJECT_DIR$/public/game/asset/coh.png" afterPath="" />
+      <change type="DELETED" beforePath="$PROJECT_DIR$/public/game/asset/cov.png" afterPath="" />
+      <change type="DELETED" beforePath="$PROJECT_DIR$/public/game/asset/disabled.png" afterPath="" />
+      <change type="DELETED" beforePath="$PROJECT_DIR$/public/game/asset/fox.png" afterPath="" />
+      <change type="DELETED" beforePath="$PROJECT_DIR$/public/game/asset/lockunlock.png" afterPath="" />
+      <change type="DELETED" beforePath="$PROJECT_DIR$/public/game/asset/net.png" afterPath="" />
+      <change type="DELETED" beforePath="$PROJECT_DIR$/public/game/asset/ok.png" afterPath="" />
+      <change type="DELETED" beforePath="$PROJECT_DIR$/public/game/asset/pc.png" afterPath="" />
+      <change type="DELETED" beforePath="$PROJECT_DIR$/public/game/asset/player.png" afterPath="" />
+      <change type="DELETED" beforePath="$PROJECT_DIR$/public/game/asset/progress.png" afterPath="" />
+      <change type="DELETED" beforePath="$PROJECT_DIR$/public/game/asset/protected.png" afterPath="" />
+      <change type="DELETED" beforePath="$PROJECT_DIR$/public/game/asset/server.png" afterPath="" />
+      <change type="DELETED" beforePath="$PROJECT_DIR$/public/game/lib/HealthBar.standalone.ts" afterPath="" />
+      <change type="DELETED" beforePath="$PROJECT_DIR$/public/game/lib/p2.d.ts" afterPath="" />
+      <change type="DELETED" beforePath="$PROJECT_DIR$/public/game/lib/phaser.d.ts" afterPath="" />
+      <change type="DELETED" beforePath="$PROJECT_DIR$/public/game/lib/pixi.d.ts" afterPath="" />
+      <change type="DELETED" beforePath="$PROJECT_DIR$/public/game/lib/socket.io-client.d.ts" afterPath="" />
+      <change type="DELETED" beforePath="$PROJECT_DIR$/public/game/maquette.jpg" afterPath="" />
+      <change type="DELETED" beforePath="$PROJECT_DIR$/public/game/src/ConsoleManager.ts" afterPath="" />
+      <change type="DELETED" beforePath="$PROJECT_DIR$/public/game/src/LevelAvManager.ts" afterPath="" />
+      <change type="DELETED" beforePath="$PROJECT_DIR$/public/game/src/ManageText.ts" afterPath="" />
+      <change type="DELETED" beforePath="$PROJECT_DIR$/public/game/src/NetworkManager.ts" afterPath="" />
+      <change type="DELETED" beforePath="$PROJECT_DIR$/public/game/src/Player.ts" afterPath="" />
+      <change type="DELETED" beforePath="$PROJECT_DIR$/public/game/src/Terminal.ts" afterPath="" />
+      <change type="DELETED" beforePath="$PROJECT_DIR$/public/game/src/state/BootState.ts" afterPath="" />
+      <change type="DELETED" beforePath="$PROJECT_DIR$/public/game/src/state/GameOverState.ts" afterPath="" />
+      <change type="DELETED" beforePath="$PROJECT_DIR$/public/game/src/state/GameState.ts" afterPath="" />
+      <change type="DELETED" beforePath="$PROJECT_DIR$/public/game/src/state/LoadState.ts" afterPath="" />
+      <change type="DELETED" beforePath="$PROJECT_DIR$/public/game/src/state/WelcomeState.ts" afterPath="" />
+      <change type="DELETED" beforePath="$PROJECT_DIR$/public/game/src/state/WinState.ts" afterPath="" />
+      <change type="DELETED" beforePath="$PROJECT_DIR$/public/game/src/terminal/Computer.ts" afterPath="" />
+      <change type="DELETED" beforePath="$PROJECT_DIR$/public/game/src/terminal/Database.ts" afterPath="" />
+      <change type="DELETED" beforePath="$PROJECT_DIR$/public/game/src/terminal/Server0.ts" afterPath="" />
+      <change type="DELETED" beforePath="$PROJECT_DIR$/public/game/src/tsconfig.json" afterPath="" />
       <change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/Application.js" afterPath="$PROJECT_DIR$/Application.js" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/Application.ts" afterPath="$PROJECT_DIR$/Application.ts" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/manager/UserManager.js" afterPath="$PROJECT_DIR$/manager/UserManager.js" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/manager/UserManager.ts" afterPath="$PROJECT_DIR$/manager/UserManager.ts" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/DbCrafty/config/entity.yml" afterPath="$PROJECT_DIR$/modules/DbCrafty/config/entity.yml" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/SecurityCrafty/Security.js" afterPath="$PROJECT_DIR$/modules/SecurityCrafty/Security.js" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/SecurityCrafty/Security.ts" afterPath="$PROJECT_DIR$/modules/SecurityCrafty/Security.ts" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/Server0Game/Player.js" afterPath="$PROJECT_DIR$/modules/Server0Game/Player.js" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/Server0Game/Player.ts" afterPath="$PROJECT_DIR$/modules/Server0Game/Player.ts" />
       <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/Server0Game/SessionGame.js" afterPath="$PROJECT_DIR$/modules/Server0Game/SessionGame.js" />
       <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/Server0Game/SessionGame.ts" afterPath="$PROJECT_DIR$/modules/Server0Game/SessionGame.ts" />
-      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/public/game/app/app.js" afterPath="$PROJECT_DIR$/public/game/app/app.js" />
-      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/public/game/src/state/BootState.ts" afterPath="$PROJECT_DIR$/public/game/src/state/BootState.ts" />
-      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/public/game/src/state/GameState.ts" afterPath="$PROJECT_DIR$/public/game/src/state/GameState.ts" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/package-lock.json" afterPath="$PROJECT_DIR$/package-lock.json" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/package.json" afterPath="$PROJECT_DIR$/package.json" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/routes/GameController.js" afterPath="$PROJECT_DIR$/routes/GameController.js" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/routes/GameController.ts" afterPath="$PROJECT_DIR$/routes/GameController.ts" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/routes/MemberController.js" afterPath="$PROJECT_DIR$/routes/MemberController.js" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/routes/MemberController.ts" afterPath="$PROJECT_DIR$/routes/MemberController.ts" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/views/Game/game.twig" afterPath="$PROJECT_DIR$/views/Game/game.twig" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/views/Member/home.twig" afterPath="$PROJECT_DIR$/views/Member/home.twig" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/views/layout.twig" afterPath="$PROJECT_DIR$/views/layout.twig" />
     </list>
     <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
     <option name="TRACKING_ENABLED" value="true" />
@@ -18,11 +95,11 @@
   </component>
   <component name="FileEditorManager">
     <leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
-      <file leaf-file-name="SessionGame.ts" pinned="false" current-in-tab="false">
+      <file leaf-file-name="SessionGame.ts" pinned="false" current-in-tab="true">
         <entry file="file://$PROJECT_DIR$/modules/Server0Game/SessionGame.ts">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="-858">
-              <caret line="109" column="28" lean-forward="true" selection-start-line="109" selection-start-column="28" selection-end-line="109" selection-end-column="28" />
+            <state relative-caret-position="154">
+              <caret line="47" column="36" lean-forward="true" selection-start-line="47" selection-start-column="36" selection-end-line="47" selection-end-column="36" />
               <folding>
                 <element signature="e#0#34#0" expanded="true" />
               </folding>
@@ -30,21 +107,93 @@
           </provider>
         </entry>
       </file>
-      <file leaf-file-name="Network.ts" pinned="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/modules/Server0Game/Network.ts">
+      <file leaf-file-name="Player.ts" pinned="false" current-in-tab="false">
+        <entry file="file://$PROJECT_DIR$/modules/Server0Game/Player.ts">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="-822">
-              <caret line="17" column="58" lean-forward="true" selection-start-line="17" selection-start-column="58" selection-end-line="17" selection-end-column="58" />
+            <state relative-caret-position="308">
+              <caret line="14" column="5" lean-forward="true" selection-start-line="14" selection-start-column="5" selection-end-line="14" selection-end-column="5" />
               <folding />
             </state>
           </provider>
         </entry>
       </file>
-      <file leaf-file-name="Player.ts" pinned="false" current-in-tab="true">
-        <entry file="file://$PROJECT_DIR$/modules/Server0Game/Player.ts">
+      <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="528">
+              <caret line="26" column="1" lean-forward="true" selection-start-line="26" selection-start-column="1" selection-end-line="26" selection-end-column="1" />
+              <folding />
+            </state>
+          </provider>
+        </entry>
+      </file>
+      <file leaf-file-name="entity.yml" pinned="false" current-in-tab="false">
+        <entry file="file://$PROJECT_DIR$/modules/DbCrafty/config/entity.yml">
+          <provider selected="true" editor-type-id="text-editor">
+            <state relative-caret-position="396">
+              <caret line="18" column="15" lean-forward="false" selection-start-line="18" selection-start-column="4" selection-end-line="18" selection-end-column="15" />
+              <folding />
+            </state>
+          </provider>
+        </entry>
+      </file>
+      <file leaf-file-name="GameController.ts" pinned="false" current-in-tab="false">
+        <entry file="file://$PROJECT_DIR$/routes/GameController.ts">
+          <provider selected="true" editor-type-id="text-editor">
+            <state relative-caret-position="286">
+              <caret line="13" column="67" lean-forward="true" selection-start-line="13" selection-start-column="67" selection-end-line="13" selection-end-column="67" />
+              <folding />
+            </state>
+          </provider>
+        </entry>
+      </file>
+      <file leaf-file-name="MemberController.ts" pinned="false" current-in-tab="false">
+        <entry file="file://$PROJECT_DIR$/routes/MemberController.ts">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="220">
-              <caret line="10" column="5" lean-forward="true" selection-start-line="10" selection-start-column="5" selection-end-line="10" selection-end-column="5" />
+            <state relative-caret-position="242">
+              <caret line="11" column="36" lean-forward="true" selection-start-line="11" selection-start-column="36" selection-end-line="11" selection-end-column="36" />
+              <folding />
+            </state>
+          </provider>
+        </entry>
+      </file>
+      <file leaf-file-name="Security.ts" pinned="false" current-in-tab="false">
+        <entry file="file://$PROJECT_DIR$/modules/SecurityCrafty/Security.ts">
+          <provider selected="true" editor-type-id="text-editor">
+            <state relative-caret-position="264">
+              <caret line="12" column="32" lean-forward="false" selection-start-line="12" selection-start-column="32" selection-end-line="12" selection-end-column="32" />
+              <folding>
+                <element signature="e#0#33#0" expanded="true" />
+              </folding>
+            </state>
+          </provider>
+        </entry>
+      </file>
+      <file leaf-file-name="layout.twig" pinned="false" current-in-tab="false">
+        <entry file="file://$PROJECT_DIR$/views/layout.twig">
+          <provider selected="true" editor-type-id="text-editor">
+            <state relative-caret-position="440">
+              <caret line="20" column="54" lean-forward="true" selection-start-line="20" selection-start-column="54" selection-end-line="20" selection-end-column="54" />
+              <folding />
+            </state>
+          </provider>
+        </entry>
+      </file>
+      <file leaf-file-name="Application.ts" pinned="false" current-in-tab="false">
+        <entry file="file://$PROJECT_DIR$/Application.ts">
+          <provider selected="true" editor-type-id="text-editor">
+            <state relative-caret-position="572">
+              <caret line="77" column="36" lean-forward="true" selection-start-line="77" selection-start-column="36" selection-end-line="77" selection-end-column="36" />
+              <folding />
+            </state>
+          </provider>
+        </entry>
+      </file>
+      <file leaf-file-name="home.twig" pinned="false" current-in-tab="false">
+        <entry file="file://$PROJECT_DIR$/views/Member/home.twig">
+          <provider selected="true" editor-type-id="text-editor">
+            <state relative-caret-position="462">
+              <caret line="21" column="91" lean-forward="false" selection-start-line="21" selection-start-column="91" selection-end-line="21" selection-end-column="91" />
               <folding />
             </state>
           </provider>
@@ -117,19 +266,22 @@
         <option value="$PROJECT_DIR$/views/index.twig" />
         <option value="$PROJECT_DIR$/routes/UserController.ts" />
         <option value="$PROJECT_DIR$/views/User/login.twig" />
-        <option value="$PROJECT_DIR$/modules/SecurityCrafty/Security.ts" />
         <option value="$PROJECT_DIR$/routes/AdminController.ts" />
-        <option value="$PROJECT_DIR$/modules/DbCrafty/config/entity.yml" />
-        <option value="$PROJECT_DIR$/manager/UserManager.ts" />
-        <option value="$PROJECT_DIR$/views/Member/home.twig" />
         <option value="$PROJECT_DIR$/public/javascripts/Game.ts" />
-        <option value="$PROJECT_DIR$/routes/GameController.ts" />
-        <option value="$PROJECT_DIR$/views/layout.twig" />
         <option value="$PROJECT_DIR$/views/Game/game.html.twig" />
-        <option value="$PROJECT_DIR$/Application.ts" />
         <option value="$PROJECT_DIR$/modules/SecurityCrafty/SecurityController.ts" />
         <option value="$PROJECT_DIR$/modules/Server0Game/Network.ts" />
+        <option value="$PROJECT_DIR$/package.json" />
+        <option value="$PROJECT_DIR$/Application.ts" />
+        <option value="$PROJECT_DIR$/routes/GameController.ts" />
+        <option value="$PROJECT_DIR$/views/Game/game.twig" />
+        <option value="$PROJECT_DIR$/routes/MemberController.ts" />
+        <option value="$PROJECT_DIR$/modules/SecurityCrafty/Security.ts" />
+        <option value="$PROJECT_DIR$/views/layout.twig" />
+        <option value="$PROJECT_DIR$/modules/DbCrafty/config/entity.yml" />
+        <option value="$PROJECT_DIR$/views/Member/home.twig" />
         <option value="$PROJECT_DIR$/modules/Server0Game/Player.ts" />
+        <option value="$PROJECT_DIR$/manager/UserManager.ts" />
         <option value="$PROJECT_DIR$/modules/Server0Game/SessionGame.ts" />
       </list>
     </option>
@@ -206,6 +358,19 @@
               <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="modules" type="2a2b976b:PhpTreeStructureProvider$1" />
               <item name="SecurityCrafty" type="2a2b976b:PhpTreeStructureProvider$1" />
             </path>
             <path>
@@ -217,8 +382,30 @@
             <path>
               <item name="Server0" type="b2602c69:ProjectViewProjectNode" />
               <item name="Server0" type="2a2b976b:PhpTreeStructureProvider$1" />
+              <item name="public" 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>
+            <path>
+              <item name="Server0" type="b2602c69:ProjectViewProjectNode" />
+              <item name="Server0" type="2a2b976b:PhpTreeStructureProvider$1" />
+              <item name="views" type="2a2b976b:PhpTreeStructureProvider$1" />
+            </path>
+            <path>
+              <item name="Server0" type="b2602c69:ProjectViewProjectNode" />
+              <item name="Server0" type="2a2b976b:PhpTreeStructureProvider$1" />
+              <item name="views" type="2a2b976b:PhpTreeStructureProvider$1" />
+              <item name="Game" type="2a2b976b:PhpTreeStructureProvider$1" />
+            </path>
+            <path>
+              <item name="Server0" type="b2602c69:ProjectViewProjectNode" />
+              <item name="Server0" type="2a2b976b:PhpTreeStructureProvider$1" />
+              <item name="views" type="2a2b976b:PhpTreeStructureProvider$1" />
+              <item name="Member" type="2a2b976b:PhpTreeStructureProvider$1" />
+            </path>
           </expand>
           <select />
         </subPane>
@@ -236,15 +423,16 @@
     <property name="last_opened_file_path" value="$USER_HOME$/AppData/Local/Programs/Git/bin/git.exe" />
   </component>
   <component name="RecentsManager">
-    <key name="MoveFile.RECENT_KEYS">
-      <recent name="C:\Users\Valentin\Desktop\node\Server0\modules\SecurityCrafty" />
-      <recent name="C:\Users\Valentin\Desktop\node\Server0\modules\DbCrafty\config" />
-    </key>
     <key name="CopyFile.RECENT_KEYS">
       <recent name="C:\Users\Valentin\Desktop\node\Server0\public\javascripts" />
       <recent name="C:\Users\Valentin\Desktop\node\Server0\public" />
       <recent name="C:\Users\Valentin\Desktop\node\Server0\views" />
     </key>
+    <key name="MoveFile.RECENT_KEYS">
+      <recent name="C:\Users\Valentin\Desktop\node\Server0\public\member" />
+      <recent name="C:\Users\Valentin\Desktop\node\Server0\modules\SecurityCrafty" />
+      <recent name="C:\Users\Valentin\Desktop\node\Server0\modules\DbCrafty\config" />
+    </key>
   </component>
   <component name="RunDashboard">
     <option name="ruleStates">
@@ -287,24 +475,27 @@
       <workItem from="1504610670641" duration="9813000" />
       <workItem from="1504636645022" duration="8238000" />
       <workItem from="1504686631482" duration="6453000" />
+      <workItem from="1504718503755" duration="4282000" />
+      <workItem from="1504722850018" duration="772000" />
+      <workItem from="1504723728400" duration="2834000" />
     </task>
     <servers />
   </component>
   <component name="TimeTrackingManager">
-    <option name="totallyTimeSpent" value="82601000" />
+    <option name="totallyTimeSpent" value="90489000" />
   </component>
   <component name="ToolWindowManager">
     <frame x="-8" y="-8" width="1936" height="1056" extended-state="6" />
     <editor active="true" />
     <layout>
       <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="10" 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.23667377" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
+      <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.24466951" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
       <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.32979852" sideWeight="0.5" order="7" side_tool="true" content_ui="tabs" />
       <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="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32934782" sideWeight="0.5" order="8" side_tool="false" 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="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="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="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="9" 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="3" side_tool="true" content_ui="tabs" />
@@ -484,13 +675,6 @@
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/package.json">
-      <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="374">
-          <caret line="17" column="42" lean-forward="true" selection-start-line="17" selection-start-column="42" selection-end-line="17" selection-end-column="42" />
-        </state>
-      </provider>
-    </entry>
     <entry file="file://$PROJECT_DIR$/modules/FormCrafty/FormBuilder.ts">
       <provider selected="true" editor-type-id="text-editor">
         <state relative-caret-position="968">
@@ -512,13 +696,6 @@
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/modules/SecurityCrafty/Security.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="6" selection-start-column="8" selection-end-line="8" selection-end-column="9" />
-        </state>
-      </provider>
-    </entry>
     <entry file="file://$PROJECT_DIR$/public/javascripts/phaser.min.js" />
     <entry file="file://$PROJECT_DIR$/public/javascripts/Game.ts" />
     <entry file="file://$PROJECT_DIR$/views/index.twig">
@@ -528,145 +705,169 @@
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/views/Member/home.twig">
+    <entry file="file://$PROJECT_DIR$/modules/DbCrafty/config/db.yml">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="22">
+          <caret line="1" column="14" lean-forward="true" selection-start-line="1" selection-start-column="14" selection-end-line="1" selection-end-column="14" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/modules/DbCrafty/ConfiguratorDB.ts">
       <provider selected="true" editor-type-id="text-editor">
         <state relative-caret-position="0">
-          <caret line="77" column="14" lean-forward="false" selection-start-line="77" selection-start-column="14" selection-end-line="77" selection-end-column="14" />
+          <caret line="0" column="37" lean-forward="false" selection-start-line="0" selection-start-column="37" selection-end-line="0" selection-end-column="37" />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/views/layout.twig">
+    <entry file="file://$PROJECT_DIR$/views/User/register.twig">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="242">
-          <caret line="11" column="87" lean-forward="false" selection-start-line="11" selection-start-column="87" selection-end-line="11" selection-end-column="87" />
+        <state relative-caret-position="330">
+          <caret line="15" column="61" lean-forward="false" selection-start-line="15" selection-start-column="61" selection-end-line="15" selection-end-column="61" />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/views/Game/game.twig">
+    <entry file="file://$PROJECT_DIR$/modules/Server0Game/Player.js">
       <provider selected="true" editor-type-id="text-editor">
         <state relative-caret-position="0">
-          <caret line="7" column="36" lean-forward="false" selection-start-line="7" selection-start-column="36" selection-end-line="7" selection-end-column="36" />
+          <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$/routes/GameController.ts">
+    <entry file="file://$PROJECT_DIR$/modules/Server0Game/SessionGame.js">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="88">
-          <caret line="4" column="37" lean-forward="false" selection-start-line="4" selection-start-column="37" selection-end-line="4" selection-end-column="37" />
+        <state relative-caret-position="528">
+          <caret line="24" column="23" lean-forward="false" selection-start-line="24" selection-start-column="23" selection-end-line="24" selection-end-column="23" />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/Application.ts">
+    <entry file="file://$PROJECT_DIR$/package.json">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="2310">
-          <caret line="105" column="23" lean-forward="false" selection-start-line="105" selection-start-column="23" selection-end-line="105" selection-end-column="23" />
-          <folding />
+        <state relative-caret-position="440">
+          <caret line="20" column="30" lean-forward="true" selection-start-line="20" selection-start-column="30" selection-end-line="20" selection-end-column="30" />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/modules/DbCrafty/config/db.yml">
+    <entry file="file://$PROJECT_DIR$/routes/IndexController.ts">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="22">
-          <caret line="1" column="14" lean-forward="true" selection-start-line="1" selection-start-column="14" selection-end-line="1" selection-end-column="14" />
+        <state relative-caret-position="264">
+          <caret line="12" column="37" lean-forward="false" selection-start-line="12" selection-start-column="37" selection-end-line="12" selection-end-column="37" />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/routes/MemberController.ts">
+    <entry file="file://$PROJECT_DIR$/views/Game/game.twig">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="132">
-          <caret line="6" column="15" lean-forward="false" selection-start-line="6" selection-start-column="15" selection-end-line="6" selection-end-column="15" />
+        <state relative-caret-position="198">
+          <caret line="9" column="10" lean-forward="true" selection-start-line="9" selection-start-column="10" selection-end-line="9" selection-end-column="10" />
         </state>
       </provider>
     </entry>
     <entry file="file://$PROJECT_DIR$/modules/DbCrafty/BaseEntityManager.ts">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="704">
-          <caret line="33" column="53" lean-forward="false" selection-start-line="33" selection-start-column="53" selection-end-line="33" selection-end-column="53" />
+        <state relative-caret-position="356">
+          <caret line="35" column="20" lean-forward="true" selection-start-line="35" selection-start-column="20" selection-end-line="35" selection-end-column="20" />
+          <folding />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/manager/UserManager.ts">
+    <entry file="file://$PROJECT_DIR$/modules/SecurityCrafty/SecurityController.ts">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="308">
-          <caret line="16" column="30" lean-forward="false" selection-start-line="16" selection-start-column="30" selection-end-line="16" selection-end-column="30" />
+        <state relative-caret-position="344">
+          <caret line="22" column="44" lean-forward="false" selection-start-line="22" selection-start-column="44" selection-end-line="22" selection-end-column="44" />
+          <folding />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/modules/DbCrafty/ConfiguratorDB.ts">
+    <entry file="file://$PROJECT_DIR$/Application.ts">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="0">
-          <caret line="0" column="37" lean-forward="false" selection-start-line="0" selection-start-column="37" selection-end-line="0" selection-end-column="37" />
+        <state relative-caret-position="572">
+          <caret line="77" column="36" lean-forward="true" selection-start-line="77" selection-start-column="36" selection-end-line="77" selection-end-column="36" />
+          <folding />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/modules/DbCrafty/config/entity.yml">
+    <entry file="file://$PROJECT_DIR$/modules/SecurityCrafty/Security.ts">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="220">
-          <caret line="10" column="18" lean-forward="false" selection-start-line="10" selection-start-column="18" selection-end-line="10" selection-end-column="18" />
+        <state relative-caret-position="264">
+          <caret line="12" column="32" lean-forward="false" selection-start-line="12" selection-start-column="32" selection-end-line="12" selection-end-column="32" />
+          <folding>
+            <element signature="e#0#33#0" expanded="true" />
+          </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/views/User/register.twig">
+    <entry file="file://$PROJECT_DIR$/routes/GameController.ts">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="330">
-          <caret line="15" column="61" lean-forward="false" selection-start-line="15" selection-start-column="61" selection-end-line="15" selection-end-column="61" />
+        <state relative-caret-position="286">
+          <caret line="13" column="67" lean-forward="true" selection-start-line="13" selection-start-column="67" selection-end-line="13" selection-end-column="67" />
+          <folding />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/modules/Server0Game/Player.js">
+    <entry file="file://$PROJECT_DIR$/routes/MemberController.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" />
+        <state relative-caret-position="242">
+          <caret line="11" column="36" lean-forward="true" selection-start-line="11" selection-start-column="36" selection-end-line="11" selection-end-column="36" />
+          <folding />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/modules/SecurityCrafty/SecurityController.ts">
+    <entry file="file://$PROJECT_DIR$/views/Member/home.twig">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="22">
-          <caret line="1" column="0" lean-forward="false" selection-start-line="1" selection-start-column="0" selection-end-line="1" selection-end-column="54" />
+        <state relative-caret-position="462">
+          <caret line="21" column="91" lean-forward="false" selection-start-line="21" selection-start-column="91" selection-end-line="21" selection-end-column="91" />
+          <folding />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/modules/Server0Game/SessionGame.js">
+    <entry file="file://$PROJECT_DIR$/views/layout.twig">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="528">
-          <caret line="24" column="23" lean-forward="false" selection-start-line="24" selection-start-column="23" selection-end-line="24" selection-end-column="23" />
+        <state relative-caret-position="440">
+          <caret line="20" column="54" lean-forward="true" selection-start-line="20" selection-start-column="54" selection-end-line="20" selection-end-column="54" />
+          <folding />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/routes/IndexController.ts">
+    <entry file="file://$PROJECT_DIR$/modules/Server0Game/Network.ts">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="264">
-          <caret line="12" column="37" lean-forward="false" selection-start-line="12" selection-start-column="37" selection-end-line="12" selection-end-column="37" />
+        <state relative-caret-position="858">
+          <caret line="39" column="34" lean-forward="true" selection-start-line="39" selection-start-column="34" selection-end-line="39" selection-end-column="34" />
           <folding />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/modules/Server0Game/Network.ts">
+    <entry file="file://$PROJECT_DIR$/modules/Server0Game/Player.ts">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="-822">
-          <caret line="17" column="58" lean-forward="true" selection-start-line="17" selection-start-column="58" selection-end-line="17" selection-end-column="58" />
+        <state relative-caret-position="308">
+          <caret line="14" column="5" lean-forward="true" selection-start-line="14" selection-start-column="5" selection-end-line="14" selection-end-column="5" />
           <folding />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/modules/Server0Game/SessionGame.ts">
+    <entry file="file://$PROJECT_DIR$/modules/DbCrafty/config/entity.yml">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="-858">
-          <caret line="109" column="28" lean-forward="true" selection-start-line="109" selection-start-column="28" selection-end-line="109" selection-end-column="28" />
-          <folding>
-            <element signature="e#0#34#0" expanded="true" />
-          </folding>
+        <state relative-caret-position="396">
+          <caret line="18" column="15" lean-forward="false" selection-start-line="18" selection-start-column="4" selection-end-line="18" selection-end-column="15" />
+          <folding />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/modules/Server0Game/Player.ts">
+    <entry file="file://$PROJECT_DIR$/manager/UserManager.ts">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="220">
-          <caret line="10" column="5" lean-forward="true" selection-start-line="10" selection-start-column="5" selection-end-line="10" selection-end-column="5" />
+        <state relative-caret-position="528">
+          <caret line="26" column="1" lean-forward="true" selection-start-line="26" selection-start-column="1" selection-end-line="26" selection-end-column="1" />
           <folding />
         </state>
       </provider>
     </entry>
+    <entry file="file://$PROJECT_DIR$/modules/Server0Game/SessionGame.ts">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="154">
+          <caret line="47" column="36" lean-forward="true" selection-start-line="47" selection-start-column="36" selection-end-line="47" selection-end-column="36" />
+          <folding>
+            <element signature="e#0#34#0" expanded="true" />
+          </folding>
+        </state>
+      </provider>
+    </entry>
   </component>
 </project>

+ 13 - 2
Application.js

@@ -45,8 +45,14 @@ var Application = (function () {
         app.use(bodyParser.json());
         app.use(bodyParser.urlencoded({ extended: false }));
         app.use(cookieParser());
-        app.use(session({ secret: "ffsdf5454df4ddsssb" }));
         app.use(express.static(__dirname + '/public'));
+        //init session
+        var sess = session({
+            secret: "coucou",
+            resave: true,
+            saveUninitialized: true
+        });
+        app.use(sess);
         //set global user if exist in session and control access
         app.use(function (req, res, next) {
             Security_1.Security.controlAccess(req, res, next);
@@ -56,7 +62,12 @@ var Application = (function () {
         //configure route
         Application.configureRoute(app);
         // load socket.io and listen
-        SessionGame_1.SessionGame.init(require("socket.io").listen(server));
+        var io = require("socket.io")(server);
+        //add session value in each new socket
+        io.use(function (socket, next) {
+            sess(socket.handshake, {}, next);
+        });
+        SessionGame_1.SessionGame.init(io);
         // catch 404 and forward to error handler
         /*app.use(function(req, res, next) {
             let err = new Error('Not Found');

+ 14 - 3
Application.ts

@@ -12,7 +12,6 @@ import http = require("http");
 import {IndexController} from "./routes/IndexController";
 import {ConfiguratorDB} from "./modules/DbCrafty/ConfiguratorDB";
 import {SecurityController} from "./modules/SecurityCrafty/SecurityController";
-import {isUndefined} from "util";
 import {Security} from "./modules/SecurityCrafty/Security";
 import {MemberController} from "./routes/MemberController";
 import {GameController} from "./routes/GameController";
@@ -55,9 +54,16 @@ export class Application {
         app.use(bodyParser.json());
         app.use(bodyParser.urlencoded({ extended: false }));
         app.use(cookieParser());
-        app.use(session({secret:"ffsdf5454df4ddsssb"}));
         app.use(express.static(__dirname + '/public'));
 
+        //init session
+        let sess = session({
+            secret: "coucou",
+            resave: true,
+            saveUninitialized: true
+        });
+        app.use(sess);
+
         //set global user if exist in session and control access
         app.use(function(req, res, next) {
             Security.controlAccess(req, res, next);
@@ -70,7 +76,12 @@ export class Application {
         Application.configureRoute(app);
 
         // load socket.io and listen
-        SessionGame.init(require("socket.io").listen(server));
+        let io = require("socket.io")(server);
+        //add session value in each new socket
+        io.use(function(socket, next) {
+            sess(socket.handshake, {}, next);
+        });
+        SessionGame.init(io);
 
         // catch 404 and forward to error handler
         /*app.use(function(req, res, next) {

+ 2 - 1
manager/UserManager.js

@@ -25,7 +25,8 @@ var UserManager = (function (_super) {
             fc(null);
     };
     UserManager.prototype.insertNewUser = function (user) {
-        user.nbAccess = 0;
+        user.nbAccess = 1;
+        user.totalAccess = 0;
         user.password = UserManager.hash(user.password);
         this.saveEntity(user);
     };

+ 2 - 1
manager/UserManager.ts

@@ -12,7 +12,8 @@ export class UserManager extends BaseEntityManager {
     }
     
     public insertNewUser(user) {
-        user.nbAccess = 0;
+        user.nbAccess = 1;
+        user.totalAccess = 0;
         user.password = UserManager.hash(user.password);
         this.saveEntity(user);
     }

+ 2 - 1
modules/DbCrafty/config/entity.yml

@@ -15,4 +15,5 @@ User:
       minlength:
         - 7
         - "Le mot de passe doit contenir 7 caractères au minimum !"
-    nbAccess: Number
+    nbAccess: Number
+    totalAccess: Number

+ 2 - 1
modules/SecurityCrafty/Security.js

@@ -7,7 +7,8 @@ var Security = (function () {
     Security.controlAccess = function (req, res, next) {
         //set global user if exist in session
         if (!util_1.isUndefined(req.session.user)) {
-            res.locals.user = req.session.user;
+            res.locals.app = {};
+            res.locals.app.user = req.session.user;
         }
         //if access secure
         if (req.originalUrl.search("member") != -1) {

+ 6 - 1
modules/SecurityCrafty/Security.ts

@@ -1,11 +1,16 @@
 import {isUndefined} from "util";
+import {UserManager} from "../../manager/UserManager";
 
 export class Security {
 
+    private static userManager;
+
     public static controlAccess(req, res, next) {
+
         //set global user if exist in session
         if (!isUndefined(req.session.user)) {
-            res.locals.user = req.session.user;
+            res.locals.app = {};
+            res.locals.app.user = req.session.user;
         }
         //if access secure
         if (req.originalUrl.search("member") != -1) {

+ 1 - 1
modules/Server0Game/Player.js

@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
 var Player = (function () {
     function Player() {
         this.nbHash = 0;
-        this.nbkey = 2; //TODO SET TO 0
+        this.nbkey = 0;
         this.currentPos = this.randomInt(1, 16);
     }
     Player.prototype.randomInt = function (low, high) {

+ 1 - 1
modules/Server0Game/Player.ts

@@ -6,7 +6,7 @@ export class Player {
 
     public constructor() {
         this.nbHash = 0;
-        this.nbkey = 2;//TODO SET TO 0
+        this.nbkey = 0;
         this.currentPos = this.randomInt(1,16);
     }
 

+ 22 - 3
modules/Server0Game/SessionGame.js

@@ -2,6 +2,7 @@
 Object.defineProperty(exports, "__esModule", { value: true });
 var Network_1 = require("./Network");
 var Player_1 = require("./Player");
+var UserManager_1 = require("../../manager/UserManager");
 var SessionGame = (function () {
     function SessionGame(socket) {
         var _this = this;
@@ -30,7 +31,7 @@ var SessionGame = (function () {
                             //currentTerminal is not shutdown
                             if (game.network.getTerminal(newPos).status != Network_1.Network.STATUS_SHUTDOWN) {
                                 game.player.setCurrentPos(newPos);
-                                _this.socket.emit("success", { player: game.player, msg: "success to connect on currentTerminal " + newPos });
+                                _this.socket.emit("success", { player: game.player, msg: "success to connect on terminal " + newPos });
                             }
                             else {
                                 _this.socket.emit("errors", "currentTerminal " + newPos + " is disconnect from the network");
@@ -151,7 +152,7 @@ var SessionGame = (function () {
                                 "FORMAT.......................................................FINISH",
                                 "DISCONNECT FROM THE NETWORK.........................."
                             ]);
-                            game = null;
+                            _this.win(true);
                         }
                         break;
                     //DISCONNECT FROM THE NETWORK AND WIN AND
@@ -159,7 +160,7 @@ var SessionGame = (function () {
                         _this.socket.emit("successGame", [
                             "DISCONNECT FROM THE NETWORK.........................."
                         ]);
-                        game = null;
+                        _this.win(false);
                         break;
                     default:
                         _this.socket.emit("errors", "incorrect option please choose 1 or 2");
@@ -188,9 +189,27 @@ var SessionGame = (function () {
         console.log("SOCKET-IO : Server listen !");
         //create session game after connection established
         io.sockets.on('connection', function (socket) {
+            console.log(socket.handshake.session);
             new SessionGame(socket);
         });
     };
+    SessionGame.prototype.win = function (withOption1) {
+        var manageUser = new UserManager_1.UserManager();
+        var session = this.socket.handshake.session;
+        manageUser.findById(session.user._id, function (user) {
+            console.log(session.nbAccess);
+            if (withOption1) {
+                user.nbAccess += parseInt(session.nbAccess) * 2;
+                user.totalAccess += parseInt(session.nbAccess) * 2;
+            }
+            else {
+                user.nbAccess += parseInt(session.nbAccess);
+                user.totalAccess += parseInt(session.nbAccess);
+            }
+            manageUser.saveEntity(user);
+        });
+        this.socket.game = null;
+    };
     SessionGame.prototype.gameOver = function () {
         this.socket.emit("fatalErrors", "WARNING AV PROCESS IS DETECTED...");
         this.socket.game = null;

+ 23 - 3
modules/Server0Game/SessionGame.ts

@@ -1,6 +1,7 @@
 import {Network} from "./Network";
 import {Player} from "./Player";
 import {isNullOrUndefined, isNumber} from "util";
+import {UserManager} from "../../manager/UserManager";
 
 export class SessionGame {
 
@@ -11,6 +12,7 @@ export class SessionGame {
         console.log("SOCKET-IO : Server listen !");
         //create session game after connection established
         io.sockets.on('connection', function (socket) {
+            console.log(socket.handshake.session);
             new SessionGame(socket);
         });
     }
@@ -60,7 +62,7 @@ export class SessionGame {
                         //currentTerminal is not shutdown
                         if (game.network.getTerminal(newPos).status != Network.STATUS_SHUTDOWN) {
                             game.player.setCurrentPos(newPos);
-                            this.socket.emit("success", {player: game.player, msg: "success to connect on currentTerminal "+newPos});
+                            this.socket.emit("success", {player: game.player, msg: "success to connect on terminal "+newPos});
                         } else {
                             this.socket.emit("errors", "currentTerminal "+newPos+" is disconnect from the network");
                         }
@@ -175,7 +177,7 @@ export class SessionGame {
                             "FORMAT.......................................................FINISH",
                             "DISCONNECT FROM THE NETWORK.........................."
                         ]);
-                        game = null;
+                        this.win(true);
                     }
                     break;
 
@@ -184,7 +186,7 @@ export class SessionGame {
                     this.socket.emit("successGame", [
                         "DISCONNECT FROM THE NETWORK.........................."
                     ]);
-                    game = null;
+                    this.win(false);
                     break;
 
                 default:
@@ -194,6 +196,24 @@ export class SessionGame {
         } else {
             this.socket.emit("errors", "command not found");
         }
+    };
+
+    public win(withOption1) {
+        let manageUser = new UserManager();
+        let session = this.socket.handshake.session;
+
+        manageUser.findById(session.user._id, function (user) {
+            console.log(session.nbAccess);
+            if (withOption1) {
+                user.nbAccess += parseInt(session.nbAccess) * 2;
+                user.totalAccess += parseInt(session.nbAccess) * 2;
+            } else {
+                user.nbAccess += parseInt(session.nbAccess);
+                user.totalAccess += parseInt(session.nbAccess);
+            }
+            manageUser.saveEntity(user);
+        });
+        this.socket.game = null;
     }
 
     public gameOver(){

+ 0 - 47
node_modules/lodash.foreach/LICENSE

@@ -1,47 +0,0 @@
-Copyright jQuery Foundation and other contributors <https://jquery.org/>
-
-Based on Underscore.js, copyright Jeremy Ashkenas,
-DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
-
-This software consists of voluntary contributions made by many
-individuals. For exact contribution history, see the revision history
-available at https://github.com/lodash/lodash
-
-The following license applies to all parts of this software except as
-documented below:
-
-====
-
-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.
-
-====
-
-Copyright and related rights for sample code are waived via CC0. Sample
-code is defined as all source code displayed within the prose of the
-documentation.
-
-CC0: http://creativecommons.org/publicdomain/zero/1.0/
-
-====
-
-Files located in the node_modules and vendor directories are externally
-maintained libraries used by this software which have their own
-licenses; we recommend you read them, as their terms may differ from the
-terms above.

+ 0 - 18
node_modules/lodash.foreach/README.md

@@ -1,18 +0,0 @@
-# lodash.foreach v4.5.0
-
-The [lodash](https://lodash.com/) method `_.forEach` exported as a [Node.js](https://nodejs.org/) module.
-
-## Installation
-
-Using npm:
-```bash
-$ {sudo -H} npm i -g npm
-$ npm i --save lodash.foreach
-```
-
-In Node.js:
-```js
-var forEach = require('lodash.foreach');
-```
-
-See the [documentation](https://lodash.com/docs#forEach) or [package source](https://github.com/lodash/lodash/blob/4.5.0-npm-packages/lodash.foreach) for more details.

+ 0 - 565
node_modules/lodash.foreach/index.js

@@ -1,565 +0,0 @@
-/**
- * lodash (Custom Build) <https://lodash.com/>
- * Build: `lodash modularize exports="npm" -o ./`
- * Copyright jQuery Foundation and other contributors <https://jquery.org/>
- * Released under MIT license <https://lodash.com/license>
- * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
- * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
- */
-
-/** Used as references for various `Number` constants. */
-var MAX_SAFE_INTEGER = 9007199254740991;
-
-/** `Object#toString` result references. */
-var argsTag = '[object Arguments]',
-    funcTag = '[object Function]',
-    genTag = '[object GeneratorFunction]';
-
-/** Used to detect unsigned integer values. */
-var reIsUint = /^(?:0|[1-9]\d*)$/;
-
-/**
- * A specialized version of `_.forEach` for arrays without support for
- * iteratee shorthands.
- *
- * @private
- * @param {Array} [array] The array to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @returns {Array} Returns `array`.
- */
-function arrayEach(array, iteratee) {
-  var index = -1,
-      length = array ? array.length : 0;
-
-  while (++index < length) {
-    if (iteratee(array[index], index, array) === false) {
-      break;
-    }
-  }
-  return array;
-}
-
-/**
- * The base implementation of `_.times` without support for iteratee shorthands
- * or max array length checks.
- *
- * @private
- * @param {number} n The number of times to invoke `iteratee`.
- * @param {Function} iteratee The function invoked per iteration.
- * @returns {Array} Returns the array of results.
- */
-function baseTimes(n, iteratee) {
-  var index = -1,
-      result = Array(n);
-
-  while (++index < n) {
-    result[index] = iteratee(index);
-  }
-  return result;
-}
-
-/**
- * Creates a unary function that invokes `func` with its argument transformed.
- *
- * @private
- * @param {Function} func The function to wrap.
- * @param {Function} transform The argument transform.
- * @returns {Function} Returns the new function.
- */
-function overArg(func, transform) {
-  return function(arg) {
-    return func(transform(arg));
-  };
-}
-
-/** Used for built-in method references. */
-var objectProto = Object.prototype;
-
-/** Used to check objects for own properties. */
-var hasOwnProperty = objectProto.hasOwnProperty;
-
-/**
- * Used to resolve the
- * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
- * of values.
- */
-var objectToString = objectProto.toString;
-
-/** Built-in value references. */
-var propertyIsEnumerable = objectProto.propertyIsEnumerable;
-
-/* Built-in method references for those with the same name as other `lodash` methods. */
-var nativeKeys = overArg(Object.keys, Object);
-
-/**
- * Creates an array of the enumerable property names of the array-like `value`.
- *
- * @private
- * @param {*} value The value to query.
- * @param {boolean} inherited Specify returning inherited property names.
- * @returns {Array} Returns the array of property names.
- */
-function arrayLikeKeys(value, inherited) {
-  // Safari 8.1 makes `arguments.callee` enumerable in strict mode.
-  // Safari 9 makes `arguments.length` enumerable in strict mode.
-  var result = (isArray(value) || isArguments(value))
-    ? baseTimes(value.length, String)
-    : [];
-
-  var length = result.length,
-      skipIndexes = !!length;
-
-  for (var key in value) {
-    if ((inherited || hasOwnProperty.call(value, key)) &&
-        !(skipIndexes && (key == 'length' || isIndex(key, length)))) {
-      result.push(key);
-    }
-  }
-  return result;
-}
-
-/**
- * The base implementation of `_.forEach` without support for iteratee shorthands.
- *
- * @private
- * @param {Array|Object} collection The collection to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @returns {Array|Object} Returns `collection`.
- */
-var baseEach = createBaseEach(baseForOwn);
-
-/**
- * The base implementation of `baseForOwn` which iterates over `object`
- * properties returned by `keysFunc` and invokes `iteratee` for each property.
- * Iteratee functions may exit iteration early by explicitly returning `false`.
- *
- * @private
- * @param {Object} object The object to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @param {Function} keysFunc The function to get the keys of `object`.
- * @returns {Object} Returns `object`.
- */
-var baseFor = createBaseFor();
-
-/**
- * The base implementation of `_.forOwn` without support for iteratee shorthands.
- *
- * @private
- * @param {Object} object The object to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @returns {Object} Returns `object`.
- */
-function baseForOwn(object, iteratee) {
-  return object && baseFor(object, iteratee, keys);
-}
-
-/**
- * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
- *
- * @private
- * @param {Object} object The object to query.
- * @returns {Array} Returns the array of property names.
- */
-function baseKeys(object) {
-  if (!isPrototype(object)) {
-    return nativeKeys(object);
-  }
-  var result = [];
-  for (var key in Object(object)) {
-    if (hasOwnProperty.call(object, key) && key != 'constructor') {
-      result.push(key);
-    }
-  }
-  return result;
-}
-
-/**
- * Creates a `baseEach` or `baseEachRight` function.
- *
- * @private
- * @param {Function} eachFunc The function to iterate over a collection.
- * @param {boolean} [fromRight] Specify iterating from right to left.
- * @returns {Function} Returns the new base function.
- */
-function createBaseEach(eachFunc, fromRight) {
-  return function(collection, iteratee) {
-    if (collection == null) {
-      return collection;
-    }
-    if (!isArrayLike(collection)) {
-      return eachFunc(collection, iteratee);
-    }
-    var length = collection.length,
-        index = fromRight ? length : -1,
-        iterable = Object(collection);
-
-    while ((fromRight ? index-- : ++index < length)) {
-      if (iteratee(iterable[index], index, iterable) === false) {
-        break;
-      }
-    }
-    return collection;
-  };
-}
-
-/**
- * Creates a base function for methods like `_.forIn` and `_.forOwn`.
- *
- * @private
- * @param {boolean} [fromRight] Specify iterating from right to left.
- * @returns {Function} Returns the new base function.
- */
-function createBaseFor(fromRight) {
-  return function(object, iteratee, keysFunc) {
-    var index = -1,
-        iterable = Object(object),
-        props = keysFunc(object),
-        length = props.length;
-
-    while (length--) {
-      var key = props[fromRight ? length : ++index];
-      if (iteratee(iterable[key], key, iterable) === false) {
-        break;
-      }
-    }
-    return object;
-  };
-}
-
-/**
- * Checks if `value` is a valid array-like index.
- *
- * @private
- * @param {*} value The value to check.
- * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
- * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
- */
-function isIndex(value, length) {
-  length = length == null ? MAX_SAFE_INTEGER : length;
-  return !!length &&
-    (typeof value == 'number' || reIsUint.test(value)) &&
-    (value > -1 && value % 1 == 0 && value < length);
-}
-
-/**
- * Checks if `value` is likely a prototype object.
- *
- * @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
- */
-function isPrototype(value) {
-  var Ctor = value && value.constructor,
-      proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;
-
-  return value === proto;
-}
-
-/**
- * Iterates over elements of `collection` and invokes `iteratee` for each element.
- * The iteratee is invoked with three arguments: (value, index|key, collection).
- * Iteratee functions may exit iteration early by explicitly returning `false`.
- *
- * **Note:** As with other "Collections" methods, objects with a "length"
- * property are iterated like arrays. To avoid this behavior use `_.forIn`
- * or `_.forOwn` for object iteration.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @alias each
- * @category Collection
- * @param {Array|Object} collection The collection to iterate over.
- * @param {Function} [iteratee=_.identity] The function invoked per iteration.
- * @returns {Array|Object} Returns `collection`.
- * @see _.forEachRight
- * @example
- *
- * _([1, 2]).forEach(function(value) {
- *   console.log(value);
- * });
- * // => Logs `1` then `2`.
- *
- * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) {
- *   console.log(key);
- * });
- * // => Logs 'a' then 'b' (iteration order is not guaranteed).
- */
-function forEach(collection, iteratee) {
-  var func = isArray(collection) ? arrayEach : baseEach;
-  return func(collection, typeof iteratee == 'function' ? iteratee : identity);
-}
-
-/**
- * Checks if `value` is likely an `arguments` object.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is an `arguments` object,
- *  else `false`.
- * @example
- *
- * _.isArguments(function() { return arguments; }());
- * // => true
- *
- * _.isArguments([1, 2, 3]);
- * // => false
- */
-function isArguments(value) {
-  // Safari 8.1 makes `arguments.callee` enumerable in strict mode.
-  return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') &&
-    (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag);
-}
-
-/**
- * Checks if `value` is classified as an `Array` object.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is an array, else `false`.
- * @example
- *
- * _.isArray([1, 2, 3]);
- * // => true
- *
- * _.isArray(document.body.children);
- * // => false
- *
- * _.isArray('abc');
- * // => false
- *
- * _.isArray(_.noop);
- * // => false
- */
-var isArray = Array.isArray;
-
-/**
- * Checks if `value` is array-like. A value is considered array-like if it's
- * not a function and has a `value.length` that's an integer greater than or
- * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
- * @example
- *
- * _.isArrayLike([1, 2, 3]);
- * // => true
- *
- * _.isArrayLike(document.body.children);
- * // => true
- *
- * _.isArrayLike('abc');
- * // => true
- *
- * _.isArrayLike(_.noop);
- * // => false
- */
-function isArrayLike(value) {
-  return value != null && isLength(value.length) && !isFunction(value);
-}
-
-/**
- * This method is like `_.isArrayLike` except that it also checks if `value`
- * is an object.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is an array-like object,
- *  else `false`.
- * @example
- *
- * _.isArrayLikeObject([1, 2, 3]);
- * // => true
- *
- * _.isArrayLikeObject(document.body.children);
- * // => true
- *
- * _.isArrayLikeObject('abc');
- * // => false
- *
- * _.isArrayLikeObject(_.noop);
- * // => false
- */
-function isArrayLikeObject(value) {
-  return isObjectLike(value) && isArrayLike(value);
-}
-
-/**
- * Checks if `value` is classified as a `Function` object.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a function, else `false`.
- * @example
- *
- * _.isFunction(_);
- * // => true
- *
- * _.isFunction(/abc/);
- * // => false
- */
-function isFunction(value) {
-  // The use of `Object#toString` avoids issues with the `typeof` operator
-  // in Safari 8-9 which returns 'object' for typed array and other constructors.
-  var tag = isObject(value) ? objectToString.call(value) : '';
-  return tag == funcTag || tag == genTag;
-}
-
-/**
- * Checks if `value` is a valid array-like length.
- *
- * **Note:** This method is loosely based on
- * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
- * @example
- *
- * _.isLength(3);
- * // => true
- *
- * _.isLength(Number.MIN_VALUE);
- * // => false
- *
- * _.isLength(Infinity);
- * // => false
- *
- * _.isLength('3');
- * // => false
- */
-function isLength(value) {
-  return typeof value == 'number' &&
-    value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
-}
-
-/**
- * Checks if `value` is the
- * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
- * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is an object, else `false`.
- * @example
- *
- * _.isObject({});
- * // => true
- *
- * _.isObject([1, 2, 3]);
- * // => true
- *
- * _.isObject(_.noop);
- * // => true
- *
- * _.isObject(null);
- * // => false
- */
-function isObject(value) {
-  var type = typeof value;
-  return !!value && (type == 'object' || type == 'function');
-}
-
-/**
- * Checks if `value` is object-like. A value is object-like if it's not `null`
- * and has a `typeof` result of "object".
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
- * @example
- *
- * _.isObjectLike({});
- * // => true
- *
- * _.isObjectLike([1, 2, 3]);
- * // => true
- *
- * _.isObjectLike(_.noop);
- * // => false
- *
- * _.isObjectLike(null);
- * // => false
- */
-function isObjectLike(value) {
-  return !!value && typeof value == 'object';
-}
-
-/**
- * Creates an array of the own enumerable property names of `object`.
- *
- * **Note:** Non-object values are coerced to objects. See the
- * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
- * for more details.
- *
- * @static
- * @since 0.1.0
- * @memberOf _
- * @category Object
- * @param {Object} object The object to query.
- * @returns {Array} Returns the array of property names.
- * @example
- *
- * function Foo() {
- *   this.a = 1;
- *   this.b = 2;
- * }
- *
- * Foo.prototype.c = 3;
- *
- * _.keys(new Foo);
- * // => ['a', 'b'] (iteration order is not guaranteed)
- *
- * _.keys('hi');
- * // => ['0', '1']
- */
-function keys(object) {
-  return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
-}
-
-/**
- * This method returns the first argument it receives.
- *
- * @static
- * @since 0.1.0
- * @memberOf _
- * @category Util
- * @param {*} value Any value.
- * @returns {*} Returns `value`.
- * @example
- *
- * var object = { 'a': 1 };
- *
- * console.log(_.identity(object) === object);
- * // => true
- */
-function identity(value) {
-  return value;
-}
-
-module.exports = forEach;

+ 0 - 69
node_modules/lodash.foreach/package.json

@@ -1,69 +0,0 @@
-{
-  "_from": "lodash.foreach@^4.1.0",
-  "_id": "lodash.foreach@4.5.0",
-  "_inBundle": false,
-  "_integrity": "sha1-Gmo16s5AEoDH8G3d7DUWWrJ+PlM=",
-  "_location": "/lodash.foreach",
-  "_phantomChildren": {},
-  "_requested": {
-    "type": "range",
-    "registry": true,
-    "raw": "lodash.foreach@^4.1.0",
-    "name": "lodash.foreach",
-    "escapedName": "lodash.foreach",
-    "rawSpec": "^4.1.0",
-    "saveSpec": null,
-    "fetchSpec": "^4.1.0"
-  },
-  "_requiredBy": [
-    "/mongoose-unique-validator"
-  ],
-  "_resolved": "https://registry.npmjs.org/lodash.foreach/-/lodash.foreach-4.5.0.tgz",
-  "_shasum": "1a6a35eace401280c7f06dddec35165ab27e3e53",
-  "_spec": "lodash.foreach@^4.1.0",
-  "_where": "C:\\Users\\Valentin\\Desktop\\node\\Server0\\node_modules\\mongoose-unique-validator",
-  "author": {
-    "name": "John-David Dalton",
-    "email": "john.david.dalton@gmail.com",
-    "url": "http://allyoucanleet.com/"
-  },
-  "bugs": {
-    "url": "https://github.com/lodash/lodash/issues"
-  },
-  "bundleDependencies": false,
-  "contributors": [
-    {
-      "name": "John-David Dalton",
-      "email": "john.david.dalton@gmail.com",
-      "url": "http://allyoucanleet.com/"
-    },
-    {
-      "name": "Blaine Bublitz",
-      "email": "blaine.bublitz@gmail.com",
-      "url": "https://github.com/phated"
-    },
-    {
-      "name": "Mathias Bynens",
-      "email": "mathias@qiwi.be",
-      "url": "https://mathiasbynens.be/"
-    }
-  ],
-  "deprecated": false,
-  "description": "The lodash method `_.forEach` exported as a module.",
-  "homepage": "https://lodash.com/",
-  "icon": "https://lodash.com/icon.svg",
-  "keywords": [
-    "lodash-modularized",
-    "foreach"
-  ],
-  "license": "MIT",
-  "name": "lodash.foreach",
-  "repository": {
-    "type": "git",
-    "url": "git+https://github.com/lodash/lodash.git"
-  },
-  "scripts": {
-    "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\""
-  },
-  "version": "4.5.0"
-}

+ 0 - 47
node_modules/lodash.get/LICENSE

@@ -1,47 +0,0 @@
-Copyright jQuery Foundation and other contributors <https://jquery.org/>
-
-Based on Underscore.js, copyright Jeremy Ashkenas,
-DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
-
-This software consists of voluntary contributions made by many
-individuals. For exact contribution history, see the revision history
-available at https://github.com/lodash/lodash
-
-The following license applies to all parts of this software except as
-documented below:
-
-====
-
-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.
-
-====
-
-Copyright and related rights for sample code are waived via CC0. Sample
-code is defined as all source code displayed within the prose of the
-documentation.
-
-CC0: http://creativecommons.org/publicdomain/zero/1.0/
-
-====
-
-Files located in the node_modules and vendor directories are externally
-maintained libraries used by this software which have their own
-licenses; we recommend you read them, as their terms may differ from the
-terms above.

+ 0 - 18
node_modules/lodash.get/README.md

@@ -1,18 +0,0 @@
-# lodash.get v4.4.2
-
-The [lodash](https://lodash.com/) method `_.get` exported as a [Node.js](https://nodejs.org/) module.
-
-## Installation
-
-Using npm:
-```bash
-$ {sudo -H} npm i -g npm
-$ npm i --save lodash.get
-```
-
-In Node.js:
-```js
-var get = require('lodash.get');
-```
-
-See the [documentation](https://lodash.com/docs#get) or [package source](https://github.com/lodash/lodash/blob/4.4.2-npm-packages/lodash.get) for more details.

+ 0 - 931
node_modules/lodash.get/index.js

@@ -1,931 +0,0 @@
-/**
- * lodash (Custom Build) <https://lodash.com/>
- * Build: `lodash modularize exports="npm" -o ./`
- * Copyright jQuery Foundation and other contributors <https://jquery.org/>
- * Released under MIT license <https://lodash.com/license>
- * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
- * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
- */
-
-/** Used as the `TypeError` message for "Functions" methods. */
-var FUNC_ERROR_TEXT = 'Expected a function';
-
-/** Used to stand-in for `undefined` hash values. */
-var HASH_UNDEFINED = '__lodash_hash_undefined__';
-
-/** Used as references for various `Number` constants. */
-var INFINITY = 1 / 0;
-
-/** `Object#toString` result references. */
-var funcTag = '[object Function]',
-    genTag = '[object GeneratorFunction]',
-    symbolTag = '[object Symbol]';
-
-/** Used to match property names within property paths. */
-var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
-    reIsPlainProp = /^\w*$/,
-    reLeadingDot = /^\./,
-    rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
-
-/**
- * Used to match `RegExp`
- * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
- */
-var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
-
-/** Used to match backslashes in property paths. */
-var reEscapeChar = /\\(\\)?/g;
-
-/** Used to detect host constructors (Safari). */
-var reIsHostCtor = /^\[object .+?Constructor\]$/;
-
-/** Detect free variable `global` from Node.js. */
-var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
-
-/** Detect free variable `self`. */
-var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
-
-/** Used as a reference to the global object. */
-var root = freeGlobal || freeSelf || Function('return this')();
-
-/**
- * Gets the value at `key` of `object`.
- *
- * @private
- * @param {Object} [object] The object to query.
- * @param {string} key The key of the property to get.
- * @returns {*} Returns the property value.
- */
-function getValue(object, key) {
-  return object == null ? undefined : object[key];
-}
-
-/**
- * Checks if `value` is a host object in IE < 9.
- *
- * @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a host object, else `false`.
- */
-function isHostObject(value) {
-  // Many host objects are `Object` objects that can coerce to strings
-  // despite having improperly defined `toString` methods.
-  var result = false;
-  if (value != null && typeof value.toString != 'function') {
-    try {
-      result = !!(value + '');
-    } catch (e) {}
-  }
-  return result;
-}
-
-/** Used for built-in method references. */
-var arrayProto = Array.prototype,
-    funcProto = Function.prototype,
-    objectProto = Object.prototype;
-
-/** Used to detect overreaching core-js shims. */
-var coreJsData = root['__core-js_shared__'];
-
-/** Used to detect methods masquerading as native. */
-var maskSrcKey = (function() {
-  var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
-  return uid ? ('Symbol(src)_1.' + uid) : '';
-}());
-
-/** Used to resolve the decompiled source of functions. */
-var funcToString = funcProto.toString;
-
-/** Used to check objects for own properties. */
-var hasOwnProperty = objectProto.hasOwnProperty;
-
-/**
- * Used to resolve the
- * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
- * of values.
- */
-var objectToString = objectProto.toString;
-
-/** Used to detect if a method is native. */
-var reIsNative = RegExp('^' +
-  funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
-  .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
-);
-
-/** Built-in value references. */
-var Symbol = root.Symbol,
-    splice = arrayProto.splice;
-
-/* Built-in method references that are verified to be native. */
-var Map = getNative(root, 'Map'),
-    nativeCreate = getNative(Object, 'create');
-
-/** Used to convert symbols to primitives and strings. */
-var symbolProto = Symbol ? Symbol.prototype : undefined,
-    symbolToString = symbolProto ? symbolProto.toString : undefined;
-
-/**
- * Creates a hash object.
- *
- * @private
- * @constructor
- * @param {Array} [entries] The key-value pairs to cache.
- */
-function Hash(entries) {
-  var index = -1,
-      length = entries ? entries.length : 0;
-
-  this.clear();
-  while (++index < length) {
-    var entry = entries[index];
-    this.set(entry[0], entry[1]);
-  }
-}
-
-/**
- * Removes all key-value entries from the hash.
- *
- * @private
- * @name clear
- * @memberOf Hash
- */
-function hashClear() {
-  this.__data__ = nativeCreate ? nativeCreate(null) : {};
-}
-
-/**
- * Removes `key` and its value from the hash.
- *
- * @private
- * @name delete
- * @memberOf Hash
- * @param {Object} hash The hash to modify.
- * @param {string} key The key of the value to remove.
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
- */
-function hashDelete(key) {
-  return this.has(key) && delete this.__data__[key];
-}
-
-/**
- * Gets the hash value for `key`.
- *
- * @private
- * @name get
- * @memberOf Hash
- * @param {string} key The key of the value to get.
- * @returns {*} Returns the entry value.
- */
-function hashGet(key) {
-  var data = this.__data__;
-  if (nativeCreate) {
-    var result = data[key];
-    return result === HASH_UNDEFINED ? undefined : result;
-  }
-  return hasOwnProperty.call(data, key) ? data[key] : undefined;
-}
-
-/**
- * Checks if a hash value for `key` exists.
- *
- * @private
- * @name has
- * @memberOf Hash
- * @param {string} key The key of the entry to check.
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
- */
-function hashHas(key) {
-  var data = this.__data__;
-  return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key);
-}
-
-/**
- * Sets the hash `key` to `value`.
- *
- * @private
- * @name set
- * @memberOf Hash
- * @param {string} key The key of the value to set.
- * @param {*} value The value to set.
- * @returns {Object} Returns the hash instance.
- */
-function hashSet(key, value) {
-  var data = this.__data__;
-  data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
-  return this;
-}
-
-// Add methods to `Hash`.
-Hash.prototype.clear = hashClear;
-Hash.prototype['delete'] = hashDelete;
-Hash.prototype.get = hashGet;
-Hash.prototype.has = hashHas;
-Hash.prototype.set = hashSet;
-
-/**
- * Creates an list cache object.
- *
- * @private
- * @constructor
- * @param {Array} [entries] The key-value pairs to cache.
- */
-function ListCache(entries) {
-  var index = -1,
-      length = entries ? entries.length : 0;
-
-  this.clear();
-  while (++index < length) {
-    var entry = entries[index];
-    this.set(entry[0], entry[1]);
-  }
-}
-
-/**
- * Removes all key-value entries from the list cache.
- *
- * @private
- * @name clear
- * @memberOf ListCache
- */
-function listCacheClear() {
-  this.__data__ = [];
-}
-
-/**
- * Removes `key` and its value from the list cache.
- *
- * @private
- * @name delete
- * @memberOf ListCache
- * @param {string} key The key of the value to remove.
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
- */
-function listCacheDelete(key) {
-  var data = this.__data__,
-      index = assocIndexOf(data, key);
-
-  if (index < 0) {
-    return false;
-  }
-  var lastIndex = data.length - 1;
-  if (index == lastIndex) {
-    data.pop();
-  } else {
-    splice.call(data, index, 1);
-  }
-  return true;
-}
-
-/**
- * Gets the list cache value for `key`.
- *
- * @private
- * @name get
- * @memberOf ListCache
- * @param {string} key The key of the value to get.
- * @returns {*} Returns the entry value.
- */
-function listCacheGet(key) {
-  var data = this.__data__,
-      index = assocIndexOf(data, key);
-
-  return index < 0 ? undefined : data[index][1];
-}
-
-/**
- * Checks if a list cache value for `key` exists.
- *
- * @private
- * @name has
- * @memberOf ListCache
- * @param {string} key The key of the entry to check.
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
- */
-function listCacheHas(key) {
-  return assocIndexOf(this.__data__, key) > -1;
-}
-
-/**
- * Sets the list cache `key` to `value`.
- *
- * @private
- * @name set
- * @memberOf ListCache
- * @param {string} key The key of the value to set.
- * @param {*} value The value to set.
- * @returns {Object} Returns the list cache instance.
- */
-function listCacheSet(key, value) {
-  var data = this.__data__,
-      index = assocIndexOf(data, key);
-
-  if (index < 0) {
-    data.push([key, value]);
-  } else {
-    data[index][1] = value;
-  }
-  return this;
-}
-
-// Add methods to `ListCache`.
-ListCache.prototype.clear = listCacheClear;
-ListCache.prototype['delete'] = listCacheDelete;
-ListCache.prototype.get = listCacheGet;
-ListCache.prototype.has = listCacheHas;
-ListCache.prototype.set = listCacheSet;
-
-/**
- * Creates a map cache object to store key-value pairs.
- *
- * @private
- * @constructor
- * @param {Array} [entries] The key-value pairs to cache.
- */
-function MapCache(entries) {
-  var index = -1,
-      length = entries ? entries.length : 0;
-
-  this.clear();
-  while (++index < length) {
-    var entry = entries[index];
-    this.set(entry[0], entry[1]);
-  }
-}
-
-/**
- * Removes all key-value entries from the map.
- *
- * @private
- * @name clear
- * @memberOf MapCache
- */
-function mapCacheClear() {
-  this.__data__ = {
-    'hash': new Hash,
-    'map': new (Map || ListCache),
-    'string': new Hash
-  };
-}
-
-/**
- * Removes `key` and its value from the map.
- *
- * @private
- * @name delete
- * @memberOf MapCache
- * @param {string} key The key of the value to remove.
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
- */
-function mapCacheDelete(key) {
-  return getMapData(this, key)['delete'](key);
-}
-
-/**
- * Gets the map value for `key`.
- *
- * @private
- * @name get
- * @memberOf MapCache
- * @param {string} key The key of the value to get.
- * @returns {*} Returns the entry value.
- */
-function mapCacheGet(key) {
-  return getMapData(this, key).get(key);
-}
-
-/**
- * Checks if a map value for `key` exists.
- *
- * @private
- * @name has
- * @memberOf MapCache
- * @param {string} key The key of the entry to check.
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
- */
-function mapCacheHas(key) {
-  return getMapData(this, key).has(key);
-}
-
-/**
- * Sets the map `key` to `value`.
- *
- * @private
- * @name set
- * @memberOf MapCache
- * @param {string} key The key of the value to set.
- * @param {*} value The value to set.
- * @returns {Object} Returns the map cache instance.
- */
-function mapCacheSet(key, value) {
-  getMapData(this, key).set(key, value);
-  return this;
-}
-
-// Add methods to `MapCache`.
-MapCache.prototype.clear = mapCacheClear;
-MapCache.prototype['delete'] = mapCacheDelete;
-MapCache.prototype.get = mapCacheGet;
-MapCache.prototype.has = mapCacheHas;
-MapCache.prototype.set = mapCacheSet;
-
-/**
- * Gets the index at which the `key` is found in `array` of key-value pairs.
- *
- * @private
- * @param {Array} array The array to inspect.
- * @param {*} key The key to search for.
- * @returns {number} Returns the index of the matched value, else `-1`.
- */
-function assocIndexOf(array, key) {
-  var length = array.length;
-  while (length--) {
-    if (eq(array[length][0], key)) {
-      return length;
-    }
-  }
-  return -1;
-}
-
-/**
- * The base implementation of `_.get` without support for default values.
- *
- * @private
- * @param {Object} object The object to query.
- * @param {Array|string} path The path of the property to get.
- * @returns {*} Returns the resolved value.
- */
-function baseGet(object, path) {
-  path = isKey(path, object) ? [path] : castPath(path);
-
-  var index = 0,
-      length = path.length;
-
-  while (object != null && index < length) {
-    object = object[toKey(path[index++])];
-  }
-  return (index && index == length) ? object : undefined;
-}
-
-/**
- * The base implementation of `_.isNative` without bad shim checks.
- *
- * @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a native function,
- *  else `false`.
- */
-function baseIsNative(value) {
-  if (!isObject(value) || isMasked(value)) {
-    return false;
-  }
-  var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor;
-  return pattern.test(toSource(value));
-}
-
-/**
- * The base implementation of `_.toString` which doesn't convert nullish
- * values to empty strings.
- *
- * @private
- * @param {*} value The value to process.
- * @returns {string} Returns the string.
- */
-function baseToString(value) {
-  // Exit early for strings to avoid a performance hit in some environments.
-  if (typeof value == 'string') {
-    return value;
-  }
-  if (isSymbol(value)) {
-    return symbolToString ? symbolToString.call(value) : '';
-  }
-  var result = (value + '');
-  return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
-}
-
-/**
- * Casts `value` to a path array if it's not one.
- *
- * @private
- * @param {*} value The value to inspect.
- * @returns {Array} Returns the cast property path array.
- */
-function castPath(value) {
-  return isArray(value) ? value : stringToPath(value);
-}
-
-/**
- * Gets the data for `map`.
- *
- * @private
- * @param {Object} map The map to query.
- * @param {string} key The reference key.
- * @returns {*} Returns the map data.
- */
-function getMapData(map, key) {
-  var data = map.__data__;
-  return isKeyable(key)
-    ? data[typeof key == 'string' ? 'string' : 'hash']
-    : data.map;
-}
-
-/**
- * Gets the native function at `key` of `object`.
- *
- * @private
- * @param {Object} object The object to query.
- * @param {string} key The key of the method to get.
- * @returns {*} Returns the function if it's native, else `undefined`.
- */
-function getNative(object, key) {
-  var value = getValue(object, key);
-  return baseIsNative(value) ? value : undefined;
-}
-
-/**
- * Checks if `value` is a property name and not a property path.
- *
- * @private
- * @param {*} value The value to check.
- * @param {Object} [object] The object to query keys on.
- * @returns {boolean} Returns `true` if `value` is a property name, else `false`.
- */
-function isKey(value, object) {
-  if (isArray(value)) {
-    return false;
-  }
-  var type = typeof value;
-  if (type == 'number' || type == 'symbol' || type == 'boolean' ||
-      value == null || isSymbol(value)) {
-    return true;
-  }
-  return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
-    (object != null && value in Object(object));
-}
-
-/**
- * Checks if `value` is suitable for use as unique object key.
- *
- * @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
- */
-function isKeyable(value) {
-  var type = typeof value;
-  return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
-    ? (value !== '__proto__')
-    : (value === null);
-}
-
-/**
- * Checks if `func` has its source masked.
- *
- * @private
- * @param {Function} func The function to check.
- * @returns {boolean} Returns `true` if `func` is masked, else `false`.
- */
-function isMasked(func) {
-  return !!maskSrcKey && (maskSrcKey in func);
-}
-
-/**
- * Converts `string` to a property path array.
- *
- * @private
- * @param {string} string The string to convert.
- * @returns {Array} Returns the property path array.
- */
-var stringToPath = memoize(function(string) {
-  string = toString(string);
-
-  var result = [];
-  if (reLeadingDot.test(string)) {
-    result.push('');
-  }
-  string.replace(rePropName, function(match, number, quote, string) {
-    result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match));
-  });
-  return result;
-});
-
-/**
- * Converts `value` to a string key if it's not a string or symbol.
- *
- * @private
- * @param {*} value The value to inspect.
- * @returns {string|symbol} Returns the key.
- */
-function toKey(value) {
-  if (typeof value == 'string' || isSymbol(value)) {
-    return value;
-  }
-  var result = (value + '');
-  return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
-}
-
-/**
- * Converts `func` to its source code.
- *
- * @private
- * @param {Function} func The function to process.
- * @returns {string} Returns the source code.
- */
-function toSource(func) {
-  if (func != null) {
-    try {
-      return funcToString.call(func);
-    } catch (e) {}
-    try {
-      return (func + '');
-    } catch (e) {}
-  }
-  return '';
-}
-
-/**
- * Creates a function that memoizes the result of `func`. If `resolver` is
- * provided, it determines the cache key for storing the result based on the
- * arguments provided to the memoized function. By default, the first argument
- * provided to the memoized function is used as the map cache key. The `func`
- * is invoked with the `this` binding of the memoized function.
- *
- * **Note:** The cache is exposed as the `cache` property on the memoized
- * function. Its creation may be customized by replacing the `_.memoize.Cache`
- * constructor with one whose instances implement the
- * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
- * method interface of `delete`, `get`, `has`, and `set`.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Function
- * @param {Function} func The function to have its output memoized.
- * @param {Function} [resolver] The function to resolve the cache key.
- * @returns {Function} Returns the new memoized function.
- * @example
- *
- * var object = { 'a': 1, 'b': 2 };
- * var other = { 'c': 3, 'd': 4 };
- *
- * var values = _.memoize(_.values);
- * values(object);
- * // => [1, 2]
- *
- * values(other);
- * // => [3, 4]
- *
- * object.a = 2;
- * values(object);
- * // => [1, 2]
- *
- * // Modify the result cache.
- * values.cache.set(object, ['a', 'b']);
- * values(object);
- * // => ['a', 'b']
- *
- * // Replace `_.memoize.Cache`.
- * _.memoize.Cache = WeakMap;
- */
-function memoize(func, resolver) {
-  if (typeof func != 'function' || (resolver && typeof resolver != 'function')) {
-    throw new TypeError(FUNC_ERROR_TEXT);
-  }
-  var memoized = function() {
-    var args = arguments,
-        key = resolver ? resolver.apply(this, args) : args[0],
-        cache = memoized.cache;
-
-    if (cache.has(key)) {
-      return cache.get(key);
-    }
-    var result = func.apply(this, args);
-    memoized.cache = cache.set(key, result);
-    return result;
-  };
-  memoized.cache = new (memoize.Cache || MapCache);
-  return memoized;
-}
-
-// Assign cache to `_.memoize`.
-memoize.Cache = MapCache;
-
-/**
- * Performs a
- * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
- * comparison between two values to determine if they are equivalent.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to compare.
- * @param {*} other The other value to compare.
- * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
- * @example
- *
- * var object = { 'a': 1 };
- * var other = { 'a': 1 };
- *
- * _.eq(object, object);
- * // => true
- *
- * _.eq(object, other);
- * // => false
- *
- * _.eq('a', 'a');
- * // => true
- *
- * _.eq('a', Object('a'));
- * // => false
- *
- * _.eq(NaN, NaN);
- * // => true
- */
-function eq(value, other) {
-  return value === other || (value !== value && other !== other);
-}
-
-/**
- * Checks if `value` is classified as an `Array` object.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is an array, else `false`.
- * @example
- *
- * _.isArray([1, 2, 3]);
- * // => true
- *
- * _.isArray(document.body.children);
- * // => false
- *
- * _.isArray('abc');
- * // => false
- *
- * _.isArray(_.noop);
- * // => false
- */
-var isArray = Array.isArray;
-
-/**
- * Checks if `value` is classified as a `Function` object.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a function, else `false`.
- * @example
- *
- * _.isFunction(_);
- * // => true
- *
- * _.isFunction(/abc/);
- * // => false
- */
-function isFunction(value) {
-  // The use of `Object#toString` avoids issues with the `typeof` operator
-  // in Safari 8-9 which returns 'object' for typed array and other constructors.
-  var tag = isObject(value) ? objectToString.call(value) : '';
-  return tag == funcTag || tag == genTag;
-}
-
-/**
- * Checks if `value` is the
- * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
- * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is an object, else `false`.
- * @example
- *
- * _.isObject({});
- * // => true
- *
- * _.isObject([1, 2, 3]);
- * // => true
- *
- * _.isObject(_.noop);
- * // => true
- *
- * _.isObject(null);
- * // => false
- */
-function isObject(value) {
-  var type = typeof value;
-  return !!value && (type == 'object' || type == 'function');
-}
-
-/**
- * Checks if `value` is object-like. A value is object-like if it's not `null`
- * and has a `typeof` result of "object".
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
- * @example
- *
- * _.isObjectLike({});
- * // => true
- *
- * _.isObjectLike([1, 2, 3]);
- * // => true
- *
- * _.isObjectLike(_.noop);
- * // => false
- *
- * _.isObjectLike(null);
- * // => false
- */
-function isObjectLike(value) {
-  return !!value && typeof value == 'object';
-}
-
-/**
- * Checks if `value` is classified as a `Symbol` primitive or object.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
- * @example
- *
- * _.isSymbol(Symbol.iterator);
- * // => true
- *
- * _.isSymbol('abc');
- * // => false
- */
-function isSymbol(value) {
-  return typeof value == 'symbol' ||
-    (isObjectLike(value) && objectToString.call(value) == symbolTag);
-}
-
-/**
- * Converts `value` to a string. An empty string is returned for `null`
- * and `undefined` values. The sign of `-0` is preserved.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to process.
- * @returns {string} Returns the string.
- * @example
- *
- * _.toString(null);
- * // => ''
- *
- * _.toString(-0);
- * // => '-0'
- *
- * _.toString([1, 2, 3]);
- * // => '1,2,3'
- */
-function toString(value) {
-  return value == null ? '' : baseToString(value);
-}
-
-/**
- * Gets the value at `path` of `object`. If the resolved value is
- * `undefined`, the `defaultValue` is returned in its place.
- *
- * @static
- * @memberOf _
- * @since 3.7.0
- * @category Object
- * @param {Object} object The object to query.
- * @param {Array|string} path The path of the property to get.
- * @param {*} [defaultValue] The value returned for `undefined` resolved values.
- * @returns {*} Returns the resolved value.
- * @example
- *
- * var object = { 'a': [{ 'b': { 'c': 3 } }] };
- *
- * _.get(object, 'a[0].b.c');
- * // => 3
- *
- * _.get(object, ['a', '0', 'b', 'c']);
- * // => 3
- *
- * _.get(object, 'a.b.c', 'default');
- * // => 'default'
- */
-function get(object, path, defaultValue) {
-  var result = object == null ? undefined : baseGet(object, path);
-  return result === undefined ? defaultValue : result;
-}
-
-module.exports = get;

+ 0 - 69
node_modules/lodash.get/package.json

@@ -1,69 +0,0 @@
-{
-  "_from": "lodash.get@^4.0.2",
-  "_id": "lodash.get@4.4.2",
-  "_inBundle": false,
-  "_integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=",
-  "_location": "/lodash.get",
-  "_phantomChildren": {},
-  "_requested": {
-    "type": "range",
-    "registry": true,
-    "raw": "lodash.get@^4.0.2",
-    "name": "lodash.get",
-    "escapedName": "lodash.get",
-    "rawSpec": "^4.0.2",
-    "saveSpec": null,
-    "fetchSpec": "^4.0.2"
-  },
-  "_requiredBy": [
-    "/mongoose-unique-validator"
-  ],
-  "_resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz",
-  "_shasum": "2d177f652fa31e939b4438d5341499dfa3825e99",
-  "_spec": "lodash.get@^4.0.2",
-  "_where": "C:\\Users\\Valentin\\Desktop\\node\\Server0\\node_modules\\mongoose-unique-validator",
-  "author": {
-    "name": "John-David Dalton",
-    "email": "john.david.dalton@gmail.com",
-    "url": "http://allyoucanleet.com/"
-  },
-  "bugs": {
-    "url": "https://github.com/lodash/lodash/issues"
-  },
-  "bundleDependencies": false,
-  "contributors": [
-    {
-      "name": "John-David Dalton",
-      "email": "john.david.dalton@gmail.com",
-      "url": "http://allyoucanleet.com/"
-    },
-    {
-      "name": "Blaine Bublitz",
-      "email": "blaine.bublitz@gmail.com",
-      "url": "https://github.com/phated"
-    },
-    {
-      "name": "Mathias Bynens",
-      "email": "mathias@qiwi.be",
-      "url": "https://mathiasbynens.be/"
-    }
-  ],
-  "deprecated": false,
-  "description": "The lodash method `_.get` exported as a module.",
-  "homepage": "https://lodash.com/",
-  "icon": "https://lodash.com/icon.svg",
-  "keywords": [
-    "lodash-modularized",
-    "get"
-  ],
-  "license": "MIT",
-  "name": "lodash.get",
-  "repository": {
-    "type": "git",
-    "url": "git+https://github.com/lodash/lodash.git"
-  },
-  "scripts": {
-    "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\""
-  },
-  "version": "4.4.2"
-}

+ 0 - 13
node_modules/mongoose-unique-validator/.editorconfig

@@ -1,13 +0,0 @@
-# http://editorconfig.org
-root = true
-
-[*]
-indent_style = space
-indent_size = 4
-end_of_line = lf
-charset = utf-8
-trim_trailing_whitespace = true
-insert_final_newline = true
-
-[*.md]
-trim_trailing_whitespace = false

+ 0 - 120
node_modules/mongoose-unique-validator/.eslintrc

@@ -1,120 +0,0 @@
-{