Ver código fonte

moving to new nodeJS server

master
lmc_development 4 anos atrás
pai
commit
7934d35ba3
100 arquivos alterados com 13808 adições e 0 exclusões
  1. 0
    0
      assets/imgs/logo.png
  2. 14
    0
      index.js
  3. 1
    0
      node_modules/.bin/mime
  4. 500
    0
      node_modules/.package-lock.json
  5. 236
    0
      node_modules/accepts/HISTORY.md
  6. 23
    0
      node_modules/accepts/LICENSE
  7. 142
    0
      node_modules/accepts/README.md
  8. 238
    0
      node_modules/accepts/index.js
  9. 47
    0
      node_modules/accepts/package.json
  10. 21
    0
      node_modules/array-flatten/LICENSE
  11. 43
    0
      node_modules/array-flatten/README.md
  12. 64
    0
      node_modules/array-flatten/array-flatten.js
  13. 39
    0
      node_modules/array-flatten/package.json
  14. 624
    0
      node_modules/body-parser/HISTORY.md
  15. 23
    0
      node_modules/body-parser/LICENSE
  16. 456
    0
      node_modules/body-parser/README.md
  17. 157
    0
      node_modules/body-parser/index.js
  18. 181
    0
      node_modules/body-parser/lib/read.js
  19. 230
    0
      node_modules/body-parser/lib/types/json.js
  20. 101
    0
      node_modules/body-parser/lib/types/raw.js
  21. 121
    0
      node_modules/body-parser/lib/types/text.js
  22. 284
    0
      node_modules/body-parser/lib/types/urlencoded.js
  23. 52
    0
      node_modules/body-parser/package.json
  24. 92
    0
      node_modules/bytes/History.md
  25. 23
    0
      node_modules/bytes/LICENSE
  26. 152
    0
      node_modules/bytes/Readme.md
  27. 166
    0
      node_modules/bytes/index.js
  28. 42
    0
      node_modules/bytes/package.json
  29. 60
    0
      node_modules/content-disposition/HISTORY.md
  30. 22
    0
      node_modules/content-disposition/LICENSE
  31. 142
    0
      node_modules/content-disposition/README.md
  32. 458
    0
      node_modules/content-disposition/index.js
  33. 44
    0
      node_modules/content-disposition/package.json
  34. 24
    0
      node_modules/content-type/HISTORY.md
  35. 22
    0
      node_modules/content-type/LICENSE
  36. 92
    0
      node_modules/content-type/README.md
  37. 222
    0
      node_modules/content-type/index.js
  38. 40
    0
      node_modules/content-type/package.json
  39. 4
    0
      node_modules/cookie-signature/.npmignore
  40. 38
    0
      node_modules/cookie-signature/History.md
  41. 42
    0
      node_modules/cookie-signature/Readme.md
  42. 51
    0
      node_modules/cookie-signature/index.js
  43. 18
    0
      node_modules/cookie-signature/package.json
  44. 128
    0
      node_modules/cookie/HISTORY.md
  45. 24
    0
      node_modules/cookie/LICENSE
  46. 257
    0
      node_modules/cookie/README.md
  47. 202
    0
      node_modules/cookie/index.js
  48. 40
    0
      node_modules/cookie/package.json
  49. 1
    0
      node_modules/debug/.coveralls.yml
  50. 11
    0
      node_modules/debug/.eslintrc
  51. 9
    0
      node_modules/debug/.npmignore
  52. 14
    0
      node_modules/debug/.travis.yml
  53. 362
    0
      node_modules/debug/CHANGELOG.md
  54. 19
    0
      node_modules/debug/LICENSE
  55. 50
    0
      node_modules/debug/Makefile
  56. 312
    0
      node_modules/debug/README.md
  57. 19
    0
      node_modules/debug/component.json
  58. 70
    0
      node_modules/debug/karma.conf.js
  59. 1
    0
      node_modules/debug/node.js
  60. 49
    0
      node_modules/debug/package.json
  61. 185
    0
      node_modules/debug/src/browser.js
  62. 202
    0
      node_modules/debug/src/debug.js
  63. 10
    0
      node_modules/debug/src/index.js
  64. 15
    0
      node_modules/debug/src/inspector-log.js
  65. 248
    0
      node_modules/debug/src/node.js
  66. 96
    0
      node_modules/depd/History.md
  67. 22
    0
      node_modules/depd/LICENSE
  68. 280
    0
      node_modules/depd/Readme.md
  69. 522
    0
      node_modules/depd/index.js
  70. 77
    0
      node_modules/depd/lib/browser/index.js
  71. 103
    0
      node_modules/depd/lib/compat/callsite-tostring.js
  72. 22
    0
      node_modules/depd/lib/compat/event-listener-count.js
  73. 79
    0
      node_modules/depd/lib/compat/index.js
  74. 41
    0
      node_modules/depd/package.json
  75. 22
    0
      node_modules/destroy/LICENSE
  76. 60
    0
      node_modules/destroy/README.md
  77. 75
    0
      node_modules/destroy/index.js
  78. 37
    0
      node_modules/destroy/package.json
  79. 22
    0
      node_modules/ee-first/LICENSE
  80. 80
    0
      node_modules/ee-first/README.md
  81. 95
    0
      node_modules/ee-first/index.js
  82. 29
    0
      node_modules/ee-first/package.json
  83. 14
    0
      node_modules/encodeurl/HISTORY.md
  84. 22
    0
      node_modules/encodeurl/LICENSE
  85. 128
    0
      node_modules/encodeurl/README.md
  86. 60
    0
      node_modules/encodeurl/index.js
  87. 40
    0
      node_modules/encodeurl/package.json
  88. 24
    0
      node_modules/escape-html/LICENSE
  89. 43
    0
      node_modules/escape-html/Readme.md
  90. 78
    0
      node_modules/escape-html/index.js
  91. 24
    0
      node_modules/escape-html/package.json
  92. 83
    0
      node_modules/etag/HISTORY.md
  93. 22
    0
      node_modules/etag/LICENSE
  94. 159
    0
      node_modules/etag/README.md
  95. 131
    0
      node_modules/etag/index.js
  96. 47
    0
      node_modules/etag/package.json
  97. 3510
    0
      node_modules/express/History.md
  98. 24
    0
      node_modules/express/LICENSE
  99. 158
    0
      node_modules/express/Readme.md
  100. 0
    0
      node_modules/express/index.js

assets/imgs/Logo.png → assets/imgs/logo.png Ver arquivo


+ 14
- 0
index.js Ver arquivo

@@ -0,0 +1,14 @@
1
+//Simple server to host the website, using node so we can add more functionality in the future
2
+
3
+
4
+const express = require('express');
5
+const app = express();
6
+
7
+app.use(express.json());
8
+app.use(express.static('.'));
9
+
10
+function begin(){
11
+	app.listen(8080, () => console.log(`Server running on Port 8080`));
12
+}
13
+
14
+begin();

+ 1
- 0
node_modules/.bin/mime Ver arquivo

@@ -0,0 +1 @@
1
+../mime/cli.js

+ 500
- 0
node_modules/.package-lock.json Ver arquivo

@@ -0,0 +1,500 @@
1
+{
2
+  "name": "lmc-website",
3
+  "version": "1.0.0",
4
+  "lockfileVersion": 2,
5
+  "requires": true,
6
+  "packages": {
7
+    "node_modules/accepts": {
8
+      "version": "1.3.7",
9
+      "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz",
10
+      "integrity": "sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==",
11
+      "dependencies": {
12
+        "mime-types": "~2.1.24",
13
+        "negotiator": "0.6.2"
14
+      },
15
+      "engines": {
16
+        "node": ">= 0.6"
17
+      }
18
+    },
19
+    "node_modules/array-flatten": {
20
+      "version": "1.1.1",
21
+      "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz",
22
+      "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI="
23
+    },
24
+    "node_modules/body-parser": {
25
+      "version": "1.19.1",
26
+      "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.1.tgz",
27
+      "integrity": "sha512-8ljfQi5eBk8EJfECMrgqNGWPEY5jWP+1IzkzkGdFFEwFQZZyaZ21UqdaHktgiMlH0xLHqIFtE/u2OYE5dOtViA==",
28
+      "dependencies": {
29
+        "bytes": "3.1.1",
30
+        "content-type": "~1.0.4",
31
+        "debug": "2.6.9",
32
+        "depd": "~1.1.2",
33
+        "http-errors": "1.8.1",
34
+        "iconv-lite": "0.4.24",
35
+        "on-finished": "~2.3.0",
36
+        "qs": "6.9.6",
37
+        "raw-body": "2.4.2",
38
+        "type-is": "~1.6.18"
39
+      },
40
+      "engines": {
41
+        "node": ">= 0.8"
42
+      }
43
+    },
44
+    "node_modules/bytes": {
45
+      "version": "3.1.1",
46
+      "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.1.tgz",
47
+      "integrity": "sha512-dWe4nWO/ruEOY7HkUJ5gFt1DCFV9zPRoJr8pV0/ASQermOZjtq8jMjOprC0Kd10GLN+l7xaUPvxzJFWtxGu8Fg==",
48
+      "engines": {
49
+        "node": ">= 0.8"
50
+      }
51
+    },
52
+    "node_modules/content-disposition": {
53
+      "version": "0.5.4",
54
+      "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz",
55
+      "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==",
56
+      "dependencies": {
57
+        "safe-buffer": "5.2.1"
58
+      },
59
+      "engines": {
60
+        "node": ">= 0.6"
61
+      }
62
+    },
63
+    "node_modules/content-type": {
64
+      "version": "1.0.4",
65
+      "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz",
66
+      "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==",
67
+      "engines": {
68
+        "node": ">= 0.6"
69
+      }
70
+    },
71
+    "node_modules/cookie": {
72
+      "version": "0.4.1",
73
+      "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.1.tgz",
74
+      "integrity": "sha512-ZwrFkGJxUR3EIoXtO+yVE69Eb7KlixbaeAWfBQB9vVsNn/o+Yw69gBWSSDK825hQNdN+wF8zELf3dFNl/kxkUA==",
75
+      "engines": {
76
+        "node": ">= 0.6"
77
+      }
78
+    },
79
+    "node_modules/cookie-signature": {
80
+      "version": "1.0.6",
81
+      "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz",
82
+      "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw="
83
+    },
84
+    "node_modules/debug": {
85
+      "version": "2.6.9",
86
+      "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
87
+      "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
88
+      "dependencies": {
89
+        "ms": "2.0.0"
90
+      }
91
+    },
92
+    "node_modules/depd": {
93
+      "version": "1.1.2",
94
+      "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz",
95
+      "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=",
96
+      "engines": {
97
+        "node": ">= 0.6"
98
+      }
99
+    },
100
+    "node_modules/destroy": {
101
+      "version": "1.0.4",
102
+      "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz",
103
+      "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA="
104
+    },
105
+    "node_modules/ee-first": {
106
+      "version": "1.1.1",
107
+      "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
108
+      "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0="
109
+    },
110
+    "node_modules/encodeurl": {
111
+      "version": "1.0.2",
112
+      "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz",
113
+      "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=",
114
+      "engines": {
115
+        "node": ">= 0.8"
116
+      }
117
+    },
118
+    "node_modules/escape-html": {
119
+      "version": "1.0.3",
120
+      "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz",
121
+      "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg="
122
+    },
123
+    "node_modules/etag": {
124
+      "version": "1.8.1",
125
+      "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz",
126
+      "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=",
127
+      "engines": {
128
+        "node": ">= 0.6"
129
+      }
130
+    },
131
+    "node_modules/express": {
132
+      "version": "4.17.2",
133
+      "resolved": "https://registry.npmjs.org/express/-/express-4.17.2.tgz",
134
+      "integrity": "sha512-oxlxJxcQlYwqPWKVJJtvQiwHgosH/LrLSPA+H4UxpyvSS6jC5aH+5MoHFM+KABgTOt0APue4w66Ha8jCUo9QGg==",
135
+      "dependencies": {
136
+        "accepts": "~1.3.7",
137
+        "array-flatten": "1.1.1",
138
+        "body-parser": "1.19.1",
139
+        "content-disposition": "0.5.4",
140
+        "content-type": "~1.0.4",
141
+        "cookie": "0.4.1",
142
+        "cookie-signature": "1.0.6",
143
+        "debug": "2.6.9",
144
+        "depd": "~1.1.2",
145
+        "encodeurl": "~1.0.2",
146
+        "escape-html": "~1.0.3",
147
+        "etag": "~1.8.1",
148
+        "finalhandler": "~1.1.2",
149
+        "fresh": "0.5.2",
150
+        "merge-descriptors": "1.0.1",
151
+        "methods": "~1.1.2",
152
+        "on-finished": "~2.3.0",
153
+        "parseurl": "~1.3.3",
154
+        "path-to-regexp": "0.1.7",
155
+        "proxy-addr": "~2.0.7",
156
+        "qs": "6.9.6",
157
+        "range-parser": "~1.2.1",
158
+        "safe-buffer": "5.2.1",
159
+        "send": "0.17.2",
160
+        "serve-static": "1.14.2",
161
+        "setprototypeof": "1.2.0",
162
+        "statuses": "~1.5.0",
163
+        "type-is": "~1.6.18",
164
+        "utils-merge": "1.0.1",
165
+        "vary": "~1.1.2"
166
+      },
167
+      "engines": {
168
+        "node": ">= 0.10.0"
169
+      }
170
+    },
171
+    "node_modules/finalhandler": {
172
+      "version": "1.1.2",
173
+      "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz",
174
+      "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==",
175
+      "dependencies": {
176
+        "debug": "2.6.9",
177
+        "encodeurl": "~1.0.2",
178
+        "escape-html": "~1.0.3",
179
+        "on-finished": "~2.3.0",
180
+        "parseurl": "~1.3.3",
181
+        "statuses": "~1.5.0",
182
+        "unpipe": "~1.0.0"
183
+      },
184
+      "engines": {
185
+        "node": ">= 0.8"
186
+      }
187
+    },
188
+    "node_modules/forwarded": {
189
+      "version": "0.2.0",
190
+      "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz",
191
+      "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==",
192
+      "engines": {
193
+        "node": ">= 0.6"
194
+      }
195
+    },
196
+    "node_modules/fresh": {
197
+      "version": "0.5.2",
198
+      "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz",
199
+      "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=",
200
+      "engines": {
201
+        "node": ">= 0.6"
202
+      }
203
+    },
204
+    "node_modules/http-errors": {
205
+      "version": "1.8.1",
206
+      "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.8.1.tgz",
207
+      "integrity": "sha512-Kpk9Sm7NmI+RHhnj6OIWDI1d6fIoFAtFt9RLaTMRlg/8w49juAStsrBgp0Dp4OdxdVbRIeKhtCUvoi/RuAhO4g==",
208
+      "dependencies": {
209
+        "depd": "~1.1.2",
210
+        "inherits": "2.0.4",
211
+        "setprototypeof": "1.2.0",
212
+        "statuses": ">= 1.5.0 < 2",
213
+        "toidentifier": "1.0.1"
214
+      },
215
+      "engines": {
216
+        "node": ">= 0.6"
217
+      }
218
+    },
219
+    "node_modules/iconv-lite": {
220
+      "version": "0.4.24",
221
+      "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
222
+      "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==",
223
+      "dependencies": {
224
+        "safer-buffer": ">= 2.1.2 < 3"
225
+      },
226
+      "engines": {
227
+        "node": ">=0.10.0"
228
+      }
229
+    },
230
+    "node_modules/inherits": {
231
+      "version": "2.0.4",
232
+      "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
233
+      "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
234
+    },
235
+    "node_modules/ipaddr.js": {
236
+      "version": "1.9.1",
237
+      "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz",
238
+      "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==",
239
+      "engines": {
240
+        "node": ">= 0.10"
241
+      }
242
+    },
243
+    "node_modules/media-typer": {
244
+      "version": "0.3.0",
245
+      "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz",
246
+      "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=",
247
+      "engines": {
248
+        "node": ">= 0.6"
249
+      }
250
+    },
251
+    "node_modules/merge-descriptors": {
252
+      "version": "1.0.1",
253
+      "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz",
254
+      "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E="
255
+    },
256
+    "node_modules/methods": {
257
+      "version": "1.1.2",
258
+      "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz",
259
+      "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=",
260
+      "engines": {
261
+        "node": ">= 0.6"
262
+      }
263
+    },
264
+    "node_modules/mime": {
265
+      "version": "1.6.0",
266
+      "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz",
267
+      "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==",
268
+      "bin": {
269
+        "mime": "cli.js"
270
+      },
271
+      "engines": {
272
+        "node": ">=4"
273
+      }
274
+    },
275
+    "node_modules/mime-db": {
276
+      "version": "1.51.0",
277
+      "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.51.0.tgz",
278
+      "integrity": "sha512-5y8A56jg7XVQx2mbv1lu49NR4dokRnhZYTtL+KGfaa27uq4pSTXkwQkFJl4pkRMyNFz/EtYDSkiiEHx3F7UN6g==",
279
+      "engines": {
280
+        "node": ">= 0.6"
281
+      }
282
+    },
283
+    "node_modules/mime-types": {
284
+      "version": "2.1.34",
285
+      "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.34.tgz",
286
+      "integrity": "sha512-6cP692WwGIs9XXdOO4++N+7qjqv0rqxxVvJ3VHPh/Sc9mVZcQP+ZGhkKiTvWMQRr2tbHkJP/Yn7Y0npb3ZBs4A==",
287
+      "dependencies": {
288
+        "mime-db": "1.51.0"
289
+      },
290
+      "engines": {
291
+        "node": ">= 0.6"
292
+      }
293
+    },
294
+    "node_modules/ms": {
295
+      "version": "2.0.0",
296
+      "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
297
+      "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
298
+    },
299
+    "node_modules/negotiator": {
300
+      "version": "0.6.2",
301
+      "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz",
302
+      "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==",
303
+      "engines": {
304
+        "node": ">= 0.6"
305
+      }
306
+    },
307
+    "node_modules/on-finished": {
308
+      "version": "2.3.0",
309
+      "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz",
310
+      "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=",
311
+      "dependencies": {
312
+        "ee-first": "1.1.1"
313
+      },
314
+      "engines": {
315
+        "node": ">= 0.8"
316
+      }
317
+    },
318
+    "node_modules/parseurl": {
319
+      "version": "1.3.3",
320
+      "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz",
321
+      "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==",
322
+      "engines": {
323
+        "node": ">= 0.8"
324
+      }
325
+    },
326
+    "node_modules/path-to-regexp": {
327
+      "version": "0.1.7",
328
+      "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz",
329
+      "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w="
330
+    },
331
+    "node_modules/proxy-addr": {
332
+      "version": "2.0.7",
333
+      "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz",
334
+      "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==",
335
+      "dependencies": {
336
+        "forwarded": "0.2.0",
337
+        "ipaddr.js": "1.9.1"
338
+      },
339
+      "engines": {
340
+        "node": ">= 0.10"
341
+      }
342
+    },
343
+    "node_modules/qs": {
344
+      "version": "6.9.6",
345
+      "resolved": "https://registry.npmjs.org/qs/-/qs-6.9.6.tgz",
346
+      "integrity": "sha512-TIRk4aqYLNoJUbd+g2lEdz5kLWIuTMRagAXxl78Q0RiVjAOugHmeKNGdd3cwo/ktpf9aL9epCfFqWDEKysUlLQ==",
347
+      "engines": {
348
+        "node": ">=0.6"
349
+      },
350
+      "funding": {
351
+        "url": "https://github.com/sponsors/ljharb"
352
+      }
353
+    },
354
+    "node_modules/range-parser": {
355
+      "version": "1.2.1",
356
+      "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz",
357
+      "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==",
358
+      "engines": {
359
+        "node": ">= 0.6"
360
+      }
361
+    },
362
+    "node_modules/raw-body": {
363
+      "version": "2.4.2",
364
+      "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.4.2.tgz",
365
+      "integrity": "sha512-RPMAFUJP19WIet/99ngh6Iv8fzAbqum4Li7AD6DtGaW2RpMB/11xDoalPiJMTbu6I3hkbMVkATvZrqb9EEqeeQ==",
366
+      "dependencies": {
367
+        "bytes": "3.1.1",
368
+        "http-errors": "1.8.1",
369
+        "iconv-lite": "0.4.24",
370
+        "unpipe": "1.0.0"
371
+      },
372
+      "engines": {
373
+        "node": ">= 0.8"
374
+      }
375
+    },
376
+    "node_modules/safe-buffer": {
377
+      "version": "5.2.1",
378
+      "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
379
+      "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",
380
+      "funding": [
381
+        {
382
+          "type": "github",
383
+          "url": "https://github.com/sponsors/feross"
384
+        },
385
+        {
386
+          "type": "patreon",
387
+          "url": "https://www.patreon.com/feross"
388
+        },
389
+        {
390
+          "type": "consulting",
391
+          "url": "https://feross.org/support"
392
+        }
393
+      ]
394
+    },
395
+    "node_modules/safer-buffer": {
396
+      "version": "2.1.2",
397
+      "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
398
+      "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
399
+    },
400
+    "node_modules/send": {
401
+      "version": "0.17.2",
402
+      "resolved": "https://registry.npmjs.org/send/-/send-0.17.2.tgz",
403
+      "integrity": "sha512-UJYB6wFSJE3G00nEivR5rgWp8c2xXvJ3OPWPhmuteU0IKj8nKbG3DrjiOmLwpnHGYWAVwA69zmTm++YG0Hmwww==",
404
+      "dependencies": {
405
+        "debug": "2.6.9",
406
+        "depd": "~1.1.2",
407
+        "destroy": "~1.0.4",
408
+        "encodeurl": "~1.0.2",
409
+        "escape-html": "~1.0.3",
410
+        "etag": "~1.8.1",
411
+        "fresh": "0.5.2",
412
+        "http-errors": "1.8.1",
413
+        "mime": "1.6.0",
414
+        "ms": "2.1.3",
415
+        "on-finished": "~2.3.0",
416
+        "range-parser": "~1.2.1",
417
+        "statuses": "~1.5.0"
418
+      },
419
+      "engines": {
420
+        "node": ">= 0.8.0"
421
+      }
422
+    },
423
+    "node_modules/send/node_modules/ms": {
424
+      "version": "2.1.3",
425
+      "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
426
+      "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="
427
+    },
428
+    "node_modules/serve-static": {
429
+      "version": "1.14.2",
430
+      "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.14.2.tgz",
431
+      "integrity": "sha512-+TMNA9AFxUEGuC0z2mevogSnn9MXKb4fa7ngeRMJaaGv8vTwnIEkKi+QGvPt33HSnf8pRS+WGM0EbMtCJLKMBQ==",
432
+      "dependencies": {
433
+        "encodeurl": "~1.0.2",
434
+        "escape-html": "~1.0.3",
435
+        "parseurl": "~1.3.3",
436
+        "send": "0.17.2"
437
+      },
438
+      "engines": {
439
+        "node": ">= 0.8.0"
440
+      }
441
+    },
442
+    "node_modules/setprototypeof": {
443
+      "version": "1.2.0",
444
+      "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz",
445
+      "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw=="
446
+    },
447
+    "node_modules/statuses": {
448
+      "version": "1.5.0",
449
+      "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz",
450
+      "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=",
451
+      "engines": {
452
+        "node": ">= 0.6"
453
+      }
454
+    },
455
+    "node_modules/toidentifier": {
456
+      "version": "1.0.1",
457
+      "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz",
458
+      "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==",
459
+      "engines": {
460
+        "node": ">=0.6"
461
+      }
462
+    },
463
+    "node_modules/type-is": {
464
+      "version": "1.6.18",
465
+      "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz",
466
+      "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==",
467
+      "dependencies": {
468
+        "media-typer": "0.3.0",
469
+        "mime-types": "~2.1.24"
470
+      },
471
+      "engines": {
472
+        "node": ">= 0.6"
473
+      }
474
+    },
475
+    "node_modules/unpipe": {
476
+      "version": "1.0.0",
477
+      "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
478
+      "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=",
479
+      "engines": {
480
+        "node": ">= 0.8"
481
+      }
482
+    },
483
+    "node_modules/utils-merge": {
484
+      "version": "1.0.1",
485
+      "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz",
486
+      "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=",
487
+      "engines": {
488
+        "node": ">= 0.4.0"
489
+      }
490
+    },
491
+    "node_modules/vary": {
492
+      "version": "1.1.2",
493
+      "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
494
+      "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=",
495
+      "engines": {
496
+        "node": ">= 0.8"
497
+      }
498
+    }
499
+  }
500
+}

+ 236
- 0
node_modules/accepts/HISTORY.md Ver arquivo

@@ -0,0 +1,236 @@
1
+1.3.7 / 2019-04-29
2
+==================
3
+
4
+  * deps: negotiator@0.6.2
5
+    - Fix sorting charset, encoding, and language with extra parameters
6
+
7
+1.3.6 / 2019-04-28
8
+==================
9
+
10
+  * deps: mime-types@~2.1.24
11
+    - deps: mime-db@~1.40.0
12
+
13
+1.3.5 / 2018-02-28
14
+==================
15
+
16
+  * deps: mime-types@~2.1.18
17
+    - deps: mime-db@~1.33.0
18
+
19
+1.3.4 / 2017-08-22
20
+==================
21
+
22
+  * deps: mime-types@~2.1.16
23
+    - deps: mime-db@~1.29.0
24
+
25
+1.3.3 / 2016-05-02
26
+==================
27
+
28
+  * deps: mime-types@~2.1.11
29
+    - deps: mime-db@~1.23.0
30
+  * deps: negotiator@0.6.1
31
+    - perf: improve `Accept` parsing speed
32
+    - perf: improve `Accept-Charset` parsing speed
33
+    - perf: improve `Accept-Encoding` parsing speed
34
+    - perf: improve `Accept-Language` parsing speed
35
+
36
+1.3.2 / 2016-03-08
37
+==================
38
+
39
+  * deps: mime-types@~2.1.10
40
+    - Fix extension of `application/dash+xml`
41
+    - Update primary extension for `audio/mp4`
42
+    - deps: mime-db@~1.22.0
43
+
44
+1.3.1 / 2016-01-19
45
+==================
46
+
47
+  * deps: mime-types@~2.1.9
48
+    - deps: mime-db@~1.21.0
49
+
50
+1.3.0 / 2015-09-29
51
+==================
52
+
53
+  * deps: mime-types@~2.1.7
54
+    - deps: mime-db@~1.19.0
55
+  * deps: negotiator@0.6.0
56
+    - Fix including type extensions in parameters in `Accept` parsing
57
+    - Fix parsing `Accept` parameters with quoted equals
58
+    - Fix parsing `Accept` parameters with quoted semicolons
59
+    - Lazy-load modules from main entry point
60
+    - perf: delay type concatenation until needed
61
+    - perf: enable strict mode
62
+    - perf: hoist regular expressions
63
+    - perf: remove closures getting spec properties
64
+    - perf: remove a closure from media type parsing
65
+    - perf: remove property delete from media type parsing
66
+
67
+1.2.13 / 2015-09-06
68
+===================
69
+
70
+  * deps: mime-types@~2.1.6
71
+    - deps: mime-db@~1.18.0
72
+
73
+1.2.12 / 2015-07-30
74
+===================
75
+
76
+  * deps: mime-types@~2.1.4
77
+    - deps: mime-db@~1.16.0
78
+
79
+1.2.11 / 2015-07-16
80
+===================
81
+
82
+  * deps: mime-types@~2.1.3
83
+    - deps: mime-db@~1.15.0
84
+
85
+1.2.10 / 2015-07-01
86
+===================
87
+
88
+  * deps: mime-types@~2.1.2
89
+    - deps: mime-db@~1.14.0
90
+
91
+1.2.9 / 2015-06-08
92
+==================
93
+
94
+  * deps: mime-types@~2.1.1
95
+    - perf: fix deopt during mapping
96
+
97
+1.2.8 / 2015-06-07
98
+==================
99
+
100
+  * deps: mime-types@~2.1.0
101
+    - deps: mime-db@~1.13.0
102
+  * perf: avoid argument reassignment & argument slice
103
+  * perf: avoid negotiator recursive construction
104
+  * perf: enable strict mode
105
+  * perf: remove unnecessary bitwise operator
106
+
107
+1.2.7 / 2015-05-10
108
+==================
109
+
110
+  * deps: negotiator@0.5.3
111
+    - Fix media type parameter matching to be case-insensitive
112
+
113
+1.2.6 / 2015-05-07
114
+==================
115
+
116
+  * deps: mime-types@~2.0.11
117
+    - deps: mime-db@~1.9.1
118
+  * deps: negotiator@0.5.2
119
+    - Fix comparing media types with quoted values
120
+    - Fix splitting media types with quoted commas
121
+
122
+1.2.5 / 2015-03-13
123
+==================
124
+
125
+  * deps: mime-types@~2.0.10
126
+    - deps: mime-db@~1.8.0
127
+
128
+1.2.4 / 2015-02-14
129
+==================
130
+
131
+  * Support Node.js 0.6
132
+  * deps: mime-types@~2.0.9
133
+    - deps: mime-db@~1.7.0
134
+  * deps: negotiator@0.5.1
135
+    - Fix preference sorting to be stable for long acceptable lists
136
+
137
+1.2.3 / 2015-01-31
138
+==================
139
+
140
+  * deps: mime-types@~2.0.8
141
+    - deps: mime-db@~1.6.0
142
+
143
+1.2.2 / 2014-12-30
144
+==================
145
+
146
+  * deps: mime-types@~2.0.7
147
+    - deps: mime-db@~1.5.0
148
+
149
+1.2.1 / 2014-12-30
150
+==================
151
+
152
+  * deps: mime-types@~2.0.5
153
+    - deps: mime-db@~1.3.1
154
+
155
+1.2.0 / 2014-12-19
156
+==================
157
+
158
+  * deps: negotiator@0.5.0
159
+    - Fix list return order when large accepted list
160
+    - Fix missing identity encoding when q=0 exists
161
+    - Remove dynamic building of Negotiator class
162
+
163
+1.1.4 / 2014-12-10
164
+==================
165
+
166
+  * deps: mime-types@~2.0.4
167
+    - deps: mime-db@~1.3.0
168
+
169
+1.1.3 / 2014-11-09
170
+==================
171
+
172
+  * deps: mime-types@~2.0.3
173
+    - deps: mime-db@~1.2.0
174
+
175
+1.1.2 / 2014-10-14
176
+==================
177
+
178
+  * deps: negotiator@0.4.9
179
+    - Fix error when media type has invalid parameter
180
+
181
+1.1.1 / 2014-09-28
182
+==================
183
+
184
+  * deps: mime-types@~2.0.2
185
+    - deps: mime-db@~1.1.0
186
+  * deps: negotiator@0.4.8
187
+    - Fix all negotiations to be case-insensitive
188
+    - Stable sort preferences of same quality according to client order
189
+
190
+1.1.0 / 2014-09-02
191
+==================
192
+
193
+  * update `mime-types`
194
+
195
+1.0.7 / 2014-07-04
196
+==================
197
+
198
+  * Fix wrong type returned from `type` when match after unknown extension
199
+
200
+1.0.6 / 2014-06-24
201
+==================
202
+
203
+  * deps: negotiator@0.4.7
204
+
205
+1.0.5 / 2014-06-20
206
+==================
207
+
208
+ * fix crash when unknown extension given
209
+
210
+1.0.4 / 2014-06-19
211
+==================
212
+
213
+  * use `mime-types`
214
+
215
+1.0.3 / 2014-06-11
216
+==================
217
+
218
+  * deps: negotiator@0.4.6
219
+    - Order by specificity when quality is the same
220
+
221
+1.0.2 / 2014-05-29
222
+==================
223
+
224
+  * Fix interpretation when header not in request
225
+  * deps: pin negotiator@0.4.5
226
+
227
+1.0.1 / 2014-01-18
228
+==================
229
+
230
+  * Identity encoding isn't always acceptable
231
+  * deps: negotiator@~0.4.0
232
+
233
+1.0.0 / 2013-12-27
234
+==================
235
+
236
+  * Genesis

+ 23
- 0
node_modules/accepts/LICENSE Ver arquivo

@@ -0,0 +1,23 @@
1
+(The MIT License)
2
+
3
+Copyright (c) 2014 Jonathan Ong <me@jongleberry.com>
4
+Copyright (c) 2015 Douglas Christopher Wilson <doug@somethingdoug.com>
5
+
6
+Permission is hereby granted, free of charge, to any person obtaining
7
+a copy of this software and associated documentation files (the
8
+'Software'), to deal in the Software without restriction, including
9
+without limitation the rights to use, copy, modify, merge, publish,
10
+distribute, sublicense, and/or sell copies of the Software, and to
11
+permit persons to whom the Software is furnished to do so, subject to
12
+the following conditions:
13
+
14
+The above copyright notice and this permission notice shall be
15
+included in all copies or substantial portions of the Software.
16
+
17
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
18
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
19
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
20
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
21
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
22
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
23
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

+ 142
- 0
node_modules/accepts/README.md Ver arquivo

@@ -0,0 +1,142 @@
1
+# accepts
2
+
3
+[![NPM Version][npm-version-image]][npm-url]
4
+[![NPM Downloads][npm-downloads-image]][npm-url]
5
+[![Node.js Version][node-version-image]][node-version-url]
6
+[![Build Status][travis-image]][travis-url]
7
+[![Test Coverage][coveralls-image]][coveralls-url]
8
+
9
+Higher level content negotiation based on [negotiator](https://www.npmjs.com/package/negotiator).
10
+Extracted from [koa](https://www.npmjs.com/package/koa) for general use.
11
+
12
+In addition to negotiator, it allows:
13
+
14
+- Allows types as an array or arguments list, ie `(['text/html', 'application/json'])`
15
+  as well as `('text/html', 'application/json')`.
16
+- Allows type shorthands such as `json`.
17
+- Returns `false` when no types match
18
+- Treats non-existent headers as `*`
19
+
20
+## Installation
21
+
22
+This is a [Node.js](https://nodejs.org/en/) module available through the
23
+[npm registry](https://www.npmjs.com/). Installation is done using the
24
+[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally):
25
+
26
+```sh
27
+$ npm install accepts
28
+```
29
+
30
+## API
31
+
32
+<!-- eslint-disable no-unused-vars -->
33
+
34
+```js
35
+var accepts = require('accepts')
36
+```
37
+
38
+### accepts(req)
39
+
40
+Create a new `Accepts` object for the given `req`.
41
+
42
+#### .charset(charsets)
43
+
44
+Return the first accepted charset. If nothing in `charsets` is accepted,
45
+then `false` is returned.
46
+
47
+#### .charsets()
48
+
49
+Return the charsets that the request accepts, in the order of the client's
50
+preference (most preferred first).
51
+
52
+#### .encoding(encodings)
53
+
54
+Return the first accepted encoding. If nothing in `encodings` is accepted,
55
+then `false` is returned.
56
+
57
+#### .encodings()
58
+
59
+Return the encodings that the request accepts, in the order of the client's
60
+preference (most preferred first).
61
+
62
+#### .language(languages)
63
+
64
+Return the first accepted language. If nothing in `languages` is accepted,
65
+then `false` is returned.
66
+
67
+#### .languages()
68
+
69
+Return the languages that the request accepts, in the order of the client's
70
+preference (most preferred first).
71
+
72
+#### .type(types)
73
+
74
+Return the first accepted type (and it is returned as the same text as what
75
+appears in the `types` array). If nothing in `types` is accepted, then `false`
76
+is returned.
77
+
78
+The `types` array can contain full MIME types or file extensions. Any value
79
+that is not a full MIME types is passed to `require('mime-types').lookup`.
80
+
81
+#### .types()
82
+
83
+Return the types that the request accepts, in the order of the client's
84
+preference (most preferred first).
85
+
86
+## Examples
87
+
88
+### Simple type negotiation
89
+
90
+This simple example shows how to use `accepts` to return a different typed
91
+respond body based on what the client wants to accept. The server lists it's
92
+preferences in order and will get back the best match between the client and
93
+server.
94
+
95
+```js
96
+var accepts = require('accepts')
97
+var http = require('http')
98
+
99
+function app (req, res) {
100
+  var accept = accepts(req)
101
+
102
+  // the order of this list is significant; should be server preferred order
103
+  switch (accept.type(['json', 'html'])) {
104
+    case 'json':
105
+      res.setHeader('Content-Type', 'application/json')
106
+      res.write('{"hello":"world!"}')
107
+      break
108
+    case 'html':
109
+      res.setHeader('Content-Type', 'text/html')
110
+      res.write('<b>hello, world!</b>')
111
+      break
112
+    default:
113
+      // the fallback is text/plain, so no need to specify it above
114
+      res.setHeader('Content-Type', 'text/plain')
115
+      res.write('hello, world!')
116
+      break
117
+  }
118
+
119
+  res.end()
120
+}
121
+
122
+http.createServer(app).listen(3000)
123
+```
124
+
125
+You can test this out with the cURL program:
126
+```sh
127
+curl -I -H'Accept: text/html' http://localhost:3000/
128
+```
129
+
130
+## License
131
+
132
+[MIT](LICENSE)
133
+
134
+[coveralls-image]: https://badgen.net/coveralls/c/github/jshttp/accepts/master
135
+[coveralls-url]: https://coveralls.io/r/jshttp/accepts?branch=master
136
+[node-version-image]: https://badgen.net/npm/node/accepts
137
+[node-version-url]: https://nodejs.org/en/download
138
+[npm-downloads-image]: https://badgen.net/npm/dm/accepts
139
+[npm-url]: https://npmjs.org/package/accepts
140
+[npm-version-image]: https://badgen.net/npm/v/accepts
141
+[travis-image]: https://badgen.net/travis/jshttp/accepts/master
142
+[travis-url]: https://travis-ci.org/jshttp/accepts

+ 238
- 0
node_modules/accepts/index.js Ver arquivo

@@ -0,0 +1,238 @@
1
+/*!
2
+ * accepts
3
+ * Copyright(c) 2014 Jonathan Ong
4
+ * Copyright(c) 2015 Douglas Christopher Wilson
5
+ * MIT Licensed
6
+ */
7
+
8
+'use strict'
9
+
10
+/**
11
+ * Module dependencies.
12
+ * @private
13
+ */
14
+
15
+var Negotiator = require('negotiator')
16
+var mime = require('mime-types')
17
+
18
+/**
19
+ * Module exports.
20
+ * @public
21
+ */
22
+
23
+module.exports = Accepts
24
+
25
+/**
26
+ * Create a new Accepts object for the given req.
27
+ *
28
+ * @param {object} req
29
+ * @public
30
+ */
31
+
32
+function Accepts (req) {
33
+  if (!(this instanceof Accepts)) {
34
+    return new Accepts(req)
35
+  }
36
+
37
+  this.headers = req.headers
38
+  this.negotiator = new Negotiator(req)
39
+}
40
+
41
+/**
42
+ * Check if the given `type(s)` is acceptable, returning
43
+ * the best match when true, otherwise `undefined`, in which
44
+ * case you should respond with 406 "Not Acceptable".
45
+ *
46
+ * The `type` value may be a single mime type string
47
+ * such as "application/json", the extension name
48
+ * such as "json" or an array `["json", "html", "text/plain"]`. When a list
49
+ * or array is given the _best_ match, if any is returned.
50
+ *
51
+ * Examples:
52
+ *
53
+ *     // Accept: text/html
54
+ *     this.types('html');
55
+ *     // => "html"
56
+ *
57
+ *     // Accept: text/*, application/json
58
+ *     this.types('html');
59
+ *     // => "html"
60
+ *     this.types('text/html');
61
+ *     // => "text/html"
62
+ *     this.types('json', 'text');
63
+ *     // => "json"
64
+ *     this.types('application/json');
65
+ *     // => "application/json"
66
+ *
67
+ *     // Accept: text/*, application/json
68
+ *     this.types('image/png');
69
+ *     this.types('png');
70
+ *     // => undefined
71
+ *
72
+ *     // Accept: text/*;q=.5, application/json
73
+ *     this.types(['html', 'json']);
74
+ *     this.types('html', 'json');
75
+ *     // => "json"
76
+ *
77
+ * @param {String|Array} types...
78
+ * @return {String|Array|Boolean}
79
+ * @public
80
+ */
81
+
82
+Accepts.prototype.type =
83
+Accepts.prototype.types = function (types_) {
84
+  var types = types_
85
+
86
+  // support flattened arguments
87
+  if (types && !Array.isArray(types)) {
88
+    types = new Array(arguments.length)
89
+    for (var i = 0; i < types.length; i++) {
90
+      types[i] = arguments[i]
91
+    }
92
+  }
93
+
94
+  // no types, return all requested types
95
+  if (!types || types.length === 0) {
96
+    return this.negotiator.mediaTypes()
97
+  }
98
+
99
+  // no accept header, return first given type
100
+  if (!this.headers.accept) {
101
+    return types[0]
102
+  }
103
+
104
+  var mimes = types.map(extToMime)
105
+  var accepts = this.negotiator.mediaTypes(mimes.filter(validMime))
106
+  var first = accepts[0]
107
+
108
+  return first
109
+    ? types[mimes.indexOf(first)]
110
+    : false
111
+}
112
+
113
+/**
114
+ * Return accepted encodings or best fit based on `encodings`.
115
+ *
116
+ * Given `Accept-Encoding: gzip, deflate`
117
+ * an array sorted by quality is returned:
118
+ *
119
+ *     ['gzip', 'deflate']
120
+ *
121
+ * @param {String|Array} encodings...
122
+ * @return {String|Array}
123
+ * @public
124
+ */
125
+
126
+Accepts.prototype.encoding =
127
+Accepts.prototype.encodings = function (encodings_) {
128
+  var encodings = encodings_
129
+
130
+  // support flattened arguments
131
+  if (encodings && !Array.isArray(encodings)) {
132
+    encodings = new Array(arguments.length)
133
+    for (var i = 0; i < encodings.length; i++) {
134
+      encodings[i] = arguments[i]
135
+    }
136
+  }
137
+
138
+  // no encodings, return all requested encodings
139
+  if (!encodings || encodings.length === 0) {
140
+    return this.negotiator.encodings()
141
+  }
142
+
143
+  return this.negotiator.encodings(encodings)[0] || false
144
+}
145
+
146
+/**
147
+ * Return accepted charsets or best fit based on `charsets`.
148
+ *
149
+ * Given `Accept-Charset: utf-8, iso-8859-1;q=0.2, utf-7;q=0.5`
150
+ * an array sorted by quality is returned:
151
+ *
152
+ *     ['utf-8', 'utf-7', 'iso-8859-1']
153
+ *
154
+ * @param {String|Array} charsets...
155
+ * @return {String|Array}
156
+ * @public
157
+ */
158
+
159
+Accepts.prototype.charset =
160
+Accepts.prototype.charsets = function (charsets_) {
161
+  var charsets = charsets_
162
+
163
+  // support flattened arguments
164
+  if (charsets && !Array.isArray(charsets)) {
165
+    charsets = new Array(arguments.length)
166
+    for (var i = 0; i < charsets.length; i++) {
167
+      charsets[i] = arguments[i]
168
+    }
169
+  }
170
+
171
+  // no charsets, return all requested charsets
172
+  if (!charsets || charsets.length === 0) {
173
+    return this.negotiator.charsets()
174
+  }
175
+
176
+  return this.negotiator.charsets(charsets)[0] || false
177
+}
178
+
179
+/**
180
+ * Return accepted languages or best fit based on `langs`.
181
+ *
182
+ * Given `Accept-Language: en;q=0.8, es, pt`
183
+ * an array sorted by quality is returned:
184
+ *
185
+ *     ['es', 'pt', 'en']
186
+ *
187
+ * @param {String|Array} langs...
188
+ * @return {Array|String}
189
+ * @public
190
+ */
191
+
192
+Accepts.prototype.lang =
193
+Accepts.prototype.langs =
194
+Accepts.prototype.language =
195
+Accepts.prototype.languages = function (languages_) {
196
+  var languages = languages_
197
+
198
+  // support flattened arguments
199
+  if (languages && !Array.isArray(languages)) {
200
+    languages = new Array(arguments.length)
201
+    for (var i = 0; i < languages.length; i++) {
202
+      languages[i] = arguments[i]
203
+    }
204
+  }
205
+
206
+  // no languages, return all requested languages
207
+  if (!languages || languages.length === 0) {
208
+    return this.negotiator.languages()
209
+  }
210
+
211
+  return this.negotiator.languages(languages)[0] || false
212
+}
213
+
214
+/**
215
+ * Convert extnames to mime.
216
+ *
217
+ * @param {String} type
218
+ * @return {String}
219
+ * @private
220
+ */
221
+
222
+function extToMime (type) {
223
+  return type.indexOf('/') === -1
224
+    ? mime.lookup(type)
225
+    : type
226
+}
227
+
228
+/**
229
+ * Check if mime is valid.
230
+ *
231
+ * @param {String} type
232
+ * @return {String}
233
+ * @private
234
+ */
235
+
236
+function validMime (type) {
237
+  return typeof type === 'string'
238
+}

+ 47
- 0
node_modules/accepts/package.json Ver arquivo

@@ -0,0 +1,47 @@
1
+{
2
+  "name": "accepts",
3
+  "description": "Higher-level content negotiation",
4
+  "version": "1.3.7",
5
+  "contributors": [
6
+    "Douglas Christopher Wilson <doug@somethingdoug.com>",
7
+    "Jonathan Ong <me@jongleberry.com> (http://jongleberry.com)"
8
+  ],
9
+  "license": "MIT",
10
+  "repository": "jshttp/accepts",
11
+  "dependencies": {
12
+    "mime-types": "~2.1.24",
13
+    "negotiator": "0.6.2"
14
+  },
15
+  "devDependencies": {
16
+    "deep-equal": "1.0.1",
17
+    "eslint": "5.16.0",
18
+    "eslint-config-standard": "12.0.0",
19
+    "eslint-plugin-import": "2.17.2",
20
+    "eslint-plugin-markdown": "1.0.0",
21
+    "eslint-plugin-node": "8.0.1",
22
+    "eslint-plugin-promise": "4.1.1",
23
+    "eslint-plugin-standard": "4.0.0",
24
+    "mocha": "6.1.4",
25
+    "nyc": "14.0.0"
26
+  },
27
+  "files": [
28
+    "LICENSE",
29
+    "HISTORY.md",
30
+    "index.js"
31
+  ],
32
+  "engines": {
33
+    "node": ">= 0.6"
34
+  },
35
+  "scripts": {
36
+    "lint": "eslint --plugin markdown --ext js,md .",
37
+    "test": "mocha --reporter spec --check-leaks --bail test/",
38
+    "test-cov": "nyc --reporter=html --reporter=text npm test",
39
+    "test-travis": "nyc --reporter=text npm test"
40
+  },
41
+  "keywords": [
42
+    "content",
43
+    "negotiation",
44
+    "accept",
45
+    "accepts"
46
+  ]
47
+}

+ 21
- 0
node_modules/array-flatten/LICENSE Ver arquivo

@@ -0,0 +1,21 @@
1
+The MIT License (MIT)
2
+
3
+Copyright (c) 2014 Blake Embrey (hello@blakeembrey.com)
4
+
5
+Permission is hereby granted, free of charge, to any person obtaining a copy
6
+of this software and associated documentation files (the "Software"), to deal
7
+in the Software without restriction, including without limitation the rights
8
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+copies of the Software, and to permit persons to whom the Software is
10
+furnished to do so, subject to the following conditions:
11
+
12
+The above copyright notice and this permission notice shall be included in
13
+all copies or substantial portions of the Software.
14
+
15
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+THE SOFTWARE.

+ 43
- 0
node_modules/array-flatten/README.md Ver arquivo

@@ -0,0 +1,43 @@
1
+# Array Flatten
2
+
3
+[![NPM version][npm-image]][npm-url]
4
+[![NPM downloads][downloads-image]][downloads-url]
5
+[![Build status][travis-image]][travis-url]
6
+[![Test coverage][coveralls-image]][coveralls-url]
7
+
8
+> Flatten an array of nested arrays into a single flat array. Accepts an optional depth.
9
+
10
+## Installation
11
+
12
+```
13
+npm install array-flatten --save
14
+```
15
+
16
+## Usage
17
+
18
+```javascript
19
+var flatten = require('array-flatten')
20
+
21
+flatten([1, [2, [3, [4, [5], 6], 7], 8], 9])
22
+//=> [1, 2, 3, 4, 5, 6, 7, 8, 9]
23
+
24
+flatten([1, [2, [3, [4, [5], 6], 7], 8], 9], 2)
25
+//=> [1, 2, 3, [4, [5], 6], 7, 8, 9]
26
+
27
+(function () {
28
+  flatten(arguments) //=> [1, 2, 3]
29
+})(1, [2, 3])
30
+```
31
+
32
+## License
33
+
34
+MIT
35
+
36
+[npm-image]: https://img.shields.io/npm/v/array-flatten.svg?style=flat
37
+[npm-url]: https://npmjs.org/package/array-flatten
38
+[downloads-image]: https://img.shields.io/npm/dm/array-flatten.svg?style=flat
39
+[downloads-url]: https://npmjs.org/package/array-flatten
40
+[travis-image]: https://img.shields.io/travis/blakeembrey/array-flatten.svg?style=flat
41
+[travis-url]: https://travis-ci.org/blakeembrey/array-flatten
42
+[coveralls-image]: https://img.shields.io/coveralls/blakeembrey/array-flatten.svg?style=flat
43
+[coveralls-url]: https://coveralls.io/r/blakeembrey/array-flatten?branch=master

+ 64
- 0
node_modules/array-flatten/array-flatten.js Ver arquivo

@@ -0,0 +1,64 @@
1
+'use strict'
2
+
3
+/**
4
+ * Expose `arrayFlatten`.
5
+ */
6
+module.exports = arrayFlatten
7
+
8
+/**
9
+ * Recursive flatten function with depth.
10
+ *
11
+ * @param  {Array}  array
12
+ * @param  {Array}  result
13
+ * @param  {Number} depth
14
+ * @return {Array}
15
+ */
16
+function flattenWithDepth (array, result, depth) {
17
+  for (var i = 0; i < array.length; i++) {
18
+    var value = array[i]
19
+
20
+    if (depth > 0 && Array.isArray(value)) {
21
+      flattenWithDepth(value, result, depth - 1)
22
+    } else {
23
+      result.push(value)
24
+    }
25
+  }
26
+
27
+  return result
28
+}
29
+
30
+/**
31
+ * Recursive flatten function. Omitting depth is slightly faster.
32
+ *
33
+ * @param  {Array} array
34
+ * @param  {Array} result
35
+ * @return {Array}
36
+ */
37
+function flattenForever (array, result) {
38
+  for (var i = 0; i < array.length; i++) {
39
+    var value = array[i]
40
+
41
+    if (Array.isArray(value)) {
42
+      flattenForever(value, result)
43
+    } else {
44
+      result.push(value)
45
+    }
46
+  }
47
+
48
+  return result
49
+}
50
+
51
+/**
52
+ * Flatten an array, with the ability to define a depth.
53
+ *
54
+ * @param  {Array}  array
55
+ * @param  {Number} depth
56
+ * @return {Array}
57
+ */
58
+function arrayFlatten (array, depth) {
59
+  if (depth == null) {
60
+    return flattenForever(array, [])
61
+  }
62
+
63
+  return flattenWithDepth(array, [], depth)
64
+}

+ 39
- 0
node_modules/array-flatten/package.json Ver arquivo

@@ -0,0 +1,39 @@
1
+{
2
+  "name": "array-flatten",
3
+  "version": "1.1.1",
4
+  "description": "Flatten an array of nested arrays into a single flat array",
5
+  "main": "array-flatten.js",
6
+  "files": [
7
+    "array-flatten.js",
8
+    "LICENSE"
9
+  ],
10
+  "scripts": {
11
+    "test": "istanbul cover _mocha -- -R spec"
12
+  },
13
+  "repository": {
14
+    "type": "git",
15
+    "url": "git://github.com/blakeembrey/array-flatten.git"
16
+  },
17
+  "keywords": [
18
+    "array",
19
+    "flatten",
20
+    "arguments",
21
+    "depth"
22
+  ],
23
+  "author": {
24
+    "name": "Blake Embrey",
25
+    "email": "hello@blakeembrey.com",
26
+    "url": "http://blakeembrey.me"
27
+  },
28
+  "license": "MIT",
29
+  "bugs": {
30
+    "url": "https://github.com/blakeembrey/array-flatten/issues"
31
+  },
32
+  "homepage": "https://github.com/blakeembrey/array-flatten",
33
+  "devDependencies": {
34
+    "istanbul": "^0.3.13",
35
+    "mocha": "^2.2.4",
36
+    "pre-commit": "^1.0.7",
37
+    "standard": "^3.7.3"
38
+  }
39
+}

+ 624
- 0
node_modules/body-parser/HISTORY.md Ver arquivo

@@ -0,0 +1,624 @@
1
+1.19.1 / 2021-12-10
2
+===================
3
+
4
+  * deps: bytes@3.1.1
5
+  * deps: http-errors@1.8.1
6
+    - deps: inherits@2.0.4
7
+    - deps: toidentifier@1.0.1
8
+    - deps: setprototypeof@1.2.0
9
+  * deps: qs@6.9.6
10
+  * deps: raw-body@2.4.2
11
+    - deps: bytes@3.1.1
12
+    - deps: http-errors@1.8.1
13
+  * deps: safe-buffer@5.2.1
14
+  * deps: type-is@~1.6.18
15
+
16
+1.19.0 / 2019-04-25
17
+===================
18
+
19
+  * deps: bytes@3.1.0
20
+    - Add petabyte (`pb`) support
21
+  * deps: http-errors@1.7.2
22
+    - Set constructor name when possible
23
+    - deps: setprototypeof@1.1.1
24
+    - deps: statuses@'>= 1.5.0 < 2'
25
+  * deps: iconv-lite@0.4.24
26
+    - Added encoding MIK
27
+  * deps: qs@6.7.0
28
+    - Fix parsing array brackets after index
29
+  * deps: raw-body@2.4.0
30
+    - deps: bytes@3.1.0
31
+    - deps: http-errors@1.7.2
32
+    - deps: iconv-lite@0.4.24
33
+  * deps: type-is@~1.6.17
34
+    - deps: mime-types@~2.1.24
35
+    - perf: prevent internal `throw` on invalid type
36
+
37
+1.18.3 / 2018-05-14
38
+===================
39
+
40
+  * Fix stack trace for strict json parse error
41
+  * deps: depd@~1.1.2
42
+    - perf: remove argument reassignment
43
+  * deps: http-errors@~1.6.3
44
+    - deps: depd@~1.1.2
45
+    - deps: setprototypeof@1.1.0
46
+    - deps: statuses@'>= 1.3.1 < 2'
47
+  * deps: iconv-lite@0.4.23
48
+    - Fix loading encoding with year appended
49
+    - Fix deprecation warnings on Node.js 10+
50
+  * deps: qs@6.5.2
51
+  * deps: raw-body@2.3.3
52
+    - deps: http-errors@1.6.3
53
+    - deps: iconv-lite@0.4.23
54
+  * deps: type-is@~1.6.16
55
+    - deps: mime-types@~2.1.18
56
+
57
+1.18.2 / 2017-09-22
58
+===================
59
+
60
+  * deps: debug@2.6.9
61
+  * perf: remove argument reassignment
62
+
63
+1.18.1 / 2017-09-12
64
+===================
65
+
66
+  * deps: content-type@~1.0.4
67
+    - perf: remove argument reassignment
68
+    - perf: skip parameter parsing when no parameters
69
+  * deps: iconv-lite@0.4.19
70
+    - Fix ISO-8859-1 regression
71
+    - Update Windows-1255
72
+  * deps: qs@6.5.1
73
+    - Fix parsing & compacting very deep objects
74
+  * deps: raw-body@2.3.2
75
+    - deps: iconv-lite@0.4.19
76
+
77
+1.18.0 / 2017-09-08
78
+===================
79
+
80
+  * Fix JSON strict violation error to match native parse error
81
+  * Include the `body` property on verify errors
82
+  * Include the `type` property on all generated errors
83
+  * Use `http-errors` to set status code on errors
84
+  * deps: bytes@3.0.0
85
+  * deps: debug@2.6.8
86
+  * deps: depd@~1.1.1
87
+    - Remove unnecessary `Buffer` loading
88
+  * deps: http-errors@~1.6.2
89
+    - deps: depd@1.1.1
90
+  * deps: iconv-lite@0.4.18
91
+    - Add support for React Native
92
+    - Add a warning if not loaded as utf-8
93
+    - Fix CESU-8 decoding in Node.js 8
94
+    - Improve speed of ISO-8859-1 encoding
95
+  * deps: qs@6.5.0
96
+  * deps: raw-body@2.3.1
97
+    - Use `http-errors` for standard emitted errors
98
+    - deps: bytes@3.0.0
99
+    - deps: iconv-lite@0.4.18
100
+    - perf: skip buffer decoding on overage chunk
101
+  * perf: prevent internal `throw` when missing charset
102
+
103
+1.17.2 / 2017-05-17
104
+===================
105
+
106
+  * deps: debug@2.6.7
107
+    - Fix `DEBUG_MAX_ARRAY_LENGTH`
108
+    - deps: ms@2.0.0
109
+  * deps: type-is@~1.6.15
110
+    - deps: mime-types@~2.1.15
111
+
112
+1.17.1 / 2017-03-06
113
+===================
114
+
115
+  * deps: qs@6.4.0
116
+    - Fix regression parsing keys starting with `[`
117
+
118
+1.17.0 / 2017-03-01
119
+===================
120
+
121
+  * deps: http-errors@~1.6.1
122
+    - Make `message` property enumerable for `HttpError`s
123
+    - deps: setprototypeof@1.0.3
124
+  * deps: qs@6.3.1
125
+    - Fix compacting nested arrays
126
+
127
+1.16.1 / 2017-02-10
128
+===================
129
+
130
+  * deps: debug@2.6.1
131
+    - Fix deprecation messages in WebStorm and other editors
132
+    - Undeprecate `DEBUG_FD` set to `1` or `2`
133
+
134
+1.16.0 / 2017-01-17
135
+===================
136
+
137
+  * deps: debug@2.6.0
138
+    - Allow colors in workers
139
+    - Deprecated `DEBUG_FD` environment variable
140
+    - Fix error when running under React Native
141
+    - Use same color for same namespace
142
+    - deps: ms@0.7.2
143
+  * deps: http-errors@~1.5.1
144
+    - deps: inherits@2.0.3
145
+    - deps: setprototypeof@1.0.2
146
+    - deps: statuses@'>= 1.3.1 < 2'
147
+  * deps: iconv-lite@0.4.15
148
+    - Added encoding MS-31J
149
+    - Added encoding MS-932
150
+    - Added encoding MS-936
151
+    - Added encoding MS-949
152
+    - Added encoding MS-950
153
+    - Fix GBK/GB18030 handling of Euro character
154
+  * deps: qs@6.2.1
155
+    - Fix array parsing from skipping empty values
156
+  * deps: raw-body@~2.2.0
157
+    - deps: iconv-lite@0.4.15
158
+  * deps: type-is@~1.6.14
159
+    - deps: mime-types@~2.1.13
160
+
161
+1.15.2 / 2016-06-19
162
+===================
163
+
164
+  * deps: bytes@2.4.0
165
+  * deps: content-type@~1.0.2
166
+    - perf: enable strict mode
167
+  * deps: http-errors@~1.5.0
168
+    - Use `setprototypeof` module to replace `__proto__` setting
169
+    - deps: statuses@'>= 1.3.0 < 2'
170
+    - perf: enable strict mode
171
+  * deps: qs@6.2.0
172
+  * deps: raw-body@~2.1.7
173
+    - deps: bytes@2.4.0
174
+    - perf: remove double-cleanup on happy path
175
+  * deps: type-is@~1.6.13
176
+    - deps: mime-types@~2.1.11
177
+
178
+1.15.1 / 2016-05-05
179
+===================
180
+
181
+  * deps: bytes@2.3.0
182
+    - Drop partial bytes on all parsed units
183
+    - Fix parsing byte string that looks like hex
184
+  * deps: raw-body@~2.1.6
185
+    - deps: bytes@2.3.0
186
+  * deps: type-is@~1.6.12
187
+    - deps: mime-types@~2.1.10
188
+
189
+1.15.0 / 2016-02-10
190
+===================
191
+
192
+  * deps: http-errors@~1.4.0
193
+    - Add `HttpError` export, for `err instanceof createError.HttpError`
194
+    - deps: inherits@2.0.1
195
+    - deps: statuses@'>= 1.2.1 < 2'
196
+  * deps: qs@6.1.0
197
+  * deps: type-is@~1.6.11
198
+    - deps: mime-types@~2.1.9
199
+
200
+1.14.2 / 2015-12-16
201
+===================
202
+
203
+  * deps: bytes@2.2.0
204
+  * deps: iconv-lite@0.4.13
205
+  * deps: qs@5.2.0
206
+  * deps: raw-body@~2.1.5
207
+    - deps: bytes@2.2.0
208
+    - deps: iconv-lite@0.4.13
209
+  * deps: type-is@~1.6.10
210
+    - deps: mime-types@~2.1.8
211
+
212
+1.14.1 / 2015-09-27
213
+===================
214
+
215
+  * Fix issue where invalid charset results in 400 when `verify` used
216
+  * deps: iconv-lite@0.4.12
217
+    - Fix CESU-8 decoding in Node.js 4.x
218
+  * deps: raw-body@~2.1.4
219
+    - Fix masking critical errors from `iconv-lite`
220
+    - deps: iconv-lite@0.4.12
221
+  * deps: type-is@~1.6.9
222
+    - deps: mime-types@~2.1.7
223
+
224
+1.14.0 / 2015-09-16
225
+===================
226
+
227
+  * Fix JSON strict parse error to match syntax errors
228
+  * Provide static `require` analysis in `urlencoded` parser
229
+  * deps: depd@~1.1.0
230
+    - Support web browser loading
231
+  * deps: qs@5.1.0
232
+  * deps: raw-body@~2.1.3
233
+    - Fix sync callback when attaching data listener causes sync read
234
+  * deps: type-is@~1.6.8
235
+    - Fix type error when given invalid type to match against
236
+    - deps: mime-types@~2.1.6
237
+
238
+1.13.3 / 2015-07-31
239
+===================
240
+
241
+  * deps: type-is@~1.6.6
242
+    - deps: mime-types@~2.1.4
243
+
244
+1.13.2 / 2015-07-05
245
+===================
246
+
247
+  * deps: iconv-lite@0.4.11
248
+  * deps: qs@4.0.0
249
+    - Fix dropping parameters like `hasOwnProperty`
250
+    - Fix user-visible incompatibilities from 3.1.0
251
+    - Fix various parsing edge cases
252
+  * deps: raw-body@~2.1.2
253
+    - Fix error stack traces to skip `makeError`
254
+    - deps: iconv-lite@0.4.11
255
+  * deps: type-is@~1.6.4
256
+    - deps: mime-types@~2.1.2
257
+    - perf: enable strict mode
258
+    - perf: remove argument reassignment
259
+
260
+1.13.1 / 2015-06-16
261
+===================
262
+
263
+  * deps: qs@2.4.2
264
+    - Downgraded from 3.1.0 because of user-visible incompatibilities
265
+
266
+1.13.0 / 2015-06-14
267
+===================
268
+
269
+  * Add `statusCode` property on `Error`s, in addition to `status`
270
+  * Change `type` default to `application/json` for JSON parser
271
+  * Change `type` default to `application/x-www-form-urlencoded` for urlencoded parser
272
+  * Provide static `require` analysis
273
+  * Use the `http-errors` module to generate errors
274
+  * deps: bytes@2.1.0
275
+    - Slight optimizations
276
+  * deps: iconv-lite@0.4.10
277
+    - The encoding UTF-16 without BOM now defaults to UTF-16LE when detection fails
278
+    - Leading BOM is now removed when decoding
279
+  * deps: on-finished@~2.3.0
280
+    - Add defined behavior for HTTP `CONNECT` requests
281
+    - Add defined behavior for HTTP `Upgrade` requests
282
+    - deps: ee-first@1.1.1
283
+  * deps: qs@3.1.0
284
+    - Fix dropping parameters like `hasOwnProperty`
285
+    - Fix various parsing edge cases
286
+    - Parsed object now has `null` prototype
287
+  * deps: raw-body@~2.1.1
288
+    - Use `unpipe` module for unpiping requests
289
+    - deps: iconv-lite@0.4.10
290
+  * deps: type-is@~1.6.3
291
+    - deps: mime-types@~2.1.1
292
+    - perf: reduce try block size
293
+    - perf: remove bitwise operations
294
+  * perf: enable strict mode
295
+  * perf: remove argument reassignment
296
+  * perf: remove delete call
297
+
298
+1.12.4 / 2015-05-10
299
+===================
300
+
301
+  * deps: debug@~2.2.0
302
+  * deps: qs@2.4.2
303
+    - Fix allowing parameters like `constructor`
304
+  * deps: on-finished@~2.2.1
305
+  * deps: raw-body@~2.0.1
306
+    - Fix a false-positive when unpiping in Node.js 0.8
307
+    - deps: bytes@2.0.1
308
+  * deps: type-is@~1.6.2
309
+    - deps: mime-types@~2.0.11
310
+
311
+1.12.3 / 2015-04-15
312
+===================
313
+
314
+  * Slight efficiency improvement when not debugging
315
+  * deps: depd@~1.0.1
316
+  * deps: iconv-lite@0.4.8
317
+    - Add encoding alias UNICODE-1-1-UTF-7
318
+  * deps: raw-body@1.3.4
319
+    - Fix hanging callback if request aborts during read
320
+    - deps: iconv-lite@0.4.8
321
+
322
+1.12.2 / 2015-03-16
323
+===================
324
+
325
+  * deps: qs@2.4.1
326
+    - Fix error when parameter `hasOwnProperty` is present
327
+
328
+1.12.1 / 2015-03-15
329
+===================
330
+
331
+  * deps: debug@~2.1.3
332
+    - Fix high intensity foreground color for bold
333
+    - deps: ms@0.7.0
334
+  * deps: type-is@~1.6.1
335
+    - deps: mime-types@~2.0.10
336
+
337
+1.12.0 / 2015-02-13
338
+===================
339
+
340
+  * add `debug` messages
341
+  * accept a function for the `type` option
342
+  * use `content-type` to parse `Content-Type` headers
343
+  * deps: iconv-lite@0.4.7
344
+    - Gracefully support enumerables on `Object.prototype`
345
+  * deps: raw-body@1.3.3
346
+    - deps: iconv-lite@0.4.7
347
+  * deps: type-is@~1.6.0
348
+    - fix argument reassignment
349
+    - fix false-positives in `hasBody` `Transfer-Encoding` check
350
+    - support wildcard for both type and subtype (`*/*`)
351
+    - deps: mime-types@~2.0.9
352
+
353
+1.11.0 / 2015-01-30
354
+===================
355
+
356
+  * make internal `extended: true` depth limit infinity
357
+  * deps: type-is@~1.5.6
358
+    - deps: mime-types@~2.0.8
359
+
360
+1.10.2 / 2015-01-20
361
+===================
362
+
363
+  * deps: iconv-lite@0.4.6
364
+    - Fix rare aliases of single-byte encodings
365
+  * deps: raw-body@1.3.2
366
+    - deps: iconv-lite@0.4.6
367
+
368
+1.10.1 / 2015-01-01
369
+===================
370
+
371
+  * deps: on-finished@~2.2.0
372
+  * deps: type-is@~1.5.5
373
+    - deps: mime-types@~2.0.7
374
+
375
+1.10.0 / 2014-12-02
376
+===================
377
+
378
+  * make internal `extended: true` array limit dynamic
379
+
380
+1.9.3 / 2014-11-21
381
+==================
382
+
383
+  * deps: iconv-lite@0.4.5
384
+    - Fix Windows-31J and X-SJIS encoding support
385
+  * deps: qs@2.3.3
386
+    - Fix `arrayLimit` behavior
387
+  * deps: raw-body@1.3.1
388
+    - deps: iconv-lite@0.4.5
389
+  * deps: type-is@~1.5.3
390
+    - deps: mime-types@~2.0.3
391
+
392
+1.9.2 / 2014-10-27
393
+==================
394
+
395
+  * deps: qs@2.3.2
396
+    - Fix parsing of mixed objects and values
397
+
398
+1.9.1 / 2014-10-22
399
+==================
400
+
401
+  * deps: on-finished@~2.1.1
402
+    - Fix handling of pipelined requests
403
+  * deps: qs@2.3.0
404
+    - Fix parsing of mixed implicit and explicit arrays
405
+  * deps: type-is@~1.5.2
406
+    - deps: mime-types@~2.0.2
407
+
408
+1.9.0 / 2014-09-24
409
+==================
410
+
411
+  * include the charset in "unsupported charset" error message
412
+  * include the encoding in "unsupported content encoding" error message
413
+  * deps: depd@~1.0.0
414
+
415
+1.8.4 / 2014-09-23
416
+==================
417
+
418
+  * fix content encoding to be case-insensitive
419
+
420
+1.8.3 / 2014-09-19
421
+==================
422
+
423
+  * deps: qs@2.2.4
424
+    - Fix issue with object keys starting with numbers truncated
425
+
426
+1.8.2 / 2014-09-15
427
+==================
428
+
429
+  * deps: depd@0.4.5
430
+
431
+1.8.1 / 2014-09-07
432
+==================
433
+
434
+  * deps: media-typer@0.3.0
435
+  * deps: type-is@~1.5.1
436
+
437
+1.8.0 / 2014-09-05
438
+==================
439
+
440
+  * make empty-body-handling consistent between chunked requests
441
+    - empty `json` produces `{}`
442
+    - empty `raw` produces `new Buffer(0)`
443
+    - empty `text` produces `''`
444
+    - empty `urlencoded` produces `{}`
445
+  * deps: qs@2.2.3
446
+    - Fix issue where first empty value in array is discarded
447
+  * deps: type-is@~1.5.0
448
+    - fix `hasbody` to be true for `content-length: 0`
449
+
450
+1.7.0 / 2014-09-01
451
+==================
452
+
453
+  * add `parameterLimit` option to `urlencoded` parser
454
+  * change `urlencoded` extended array limit to 100
455
+  * respond with 413 when over `parameterLimit` in `urlencoded`
456
+
457
+1.6.7 / 2014-08-29
458
+==================
459
+
460
+  * deps: qs@2.2.2
461
+    - Remove unnecessary cloning
462
+
463
+1.6.6 / 2014-08-27
464
+==================
465
+
466
+  * deps: qs@2.2.0
467
+    - Array parsing fix
468
+    - Performance improvements
469
+
470
+1.6.5 / 2014-08-16
471
+==================
472
+
473
+  * deps: on-finished@2.1.0
474
+
475
+1.6.4 / 2014-08-14
476
+==================
477
+
478
+  * deps: qs@1.2.2
479
+
480
+1.6.3 / 2014-08-10
481
+==================
482
+
483
+  * deps: qs@1.2.1
484
+
485
+1.6.2 / 2014-08-07
486
+==================
487
+
488
+  * deps: qs@1.2.0
489
+    - Fix parsing array of objects
490
+
491
+1.6.1 / 2014-08-06
492
+==================
493
+
494
+  * deps: qs@1.1.0
495
+    - Accept urlencoded square brackets
496
+    - Accept empty values in implicit array notation
497
+
498
+1.6.0 / 2014-08-05
499
+==================
500
+
501
+  * deps: qs@1.0.2
502
+    - Complete rewrite
503
+    - Limits array length to 20
504
+    - Limits object depth to 5
505
+    - Limits parameters to 1,000
506
+
507
+1.5.2 / 2014-07-27
508
+==================
509
+
510
+  * deps: depd@0.4.4
511
+    - Work-around v8 generating empty stack traces
512
+
513
+1.5.1 / 2014-07-26
514
+==================
515
+
516
+  * deps: depd@0.4.3
517
+    - Fix exception when global `Error.stackTraceLimit` is too low
518
+
519
+1.5.0 / 2014-07-20
520
+==================
521
+
522
+  * deps: depd@0.4.2
523
+    - Add `TRACE_DEPRECATION` environment variable
524
+    - Remove non-standard grey color from color output
525
+    - Support `--no-deprecation` argument
526
+    - Support `--trace-deprecation` argument
527
+  * deps: iconv-lite@0.4.4
528
+    - Added encoding UTF-7
529
+  * deps: raw-body@1.3.0
530
+    - deps: iconv-lite@0.4.4
531
+    - Added encoding UTF-7
532
+    - Fix `Cannot switch to old mode now` error on Node.js 0.10+
533
+  * deps: type-is@~1.3.2
534
+
535
+1.4.3 / 2014-06-19
536
+==================
537
+
538
+  * deps: type-is@1.3.1
539
+    - fix global variable leak
540
+
541
+1.4.2 / 2014-06-19
542
+==================
543
+
544
+  * deps: type-is@1.3.0
545
+    - improve type parsing
546
+
547
+1.4.1 / 2014-06-19
548
+==================
549
+
550
+  * fix urlencoded extended deprecation message
551
+
552
+1.4.0 / 2014-06-19
553
+==================
554
+
555
+  * add `text` parser
556
+  * add `raw` parser
557
+  * check accepted charset in content-type (accepts utf-8)
558
+  * check accepted encoding in content-encoding (accepts identity)
559
+  * deprecate `bodyParser()` middleware; use `.json()` and `.urlencoded()` as needed
560
+  * deprecate `urlencoded()` without provided `extended` option
561
+  * lazy-load urlencoded parsers
562
+  * parsers split into files for reduced mem usage
563
+  * support gzip and deflate bodies
564
+    - set `inflate: false` to turn off
565
+  * deps: raw-body@1.2.2
566
+    - Support all encodings from `iconv-lite`
567
+
568
+1.3.1 / 2014-06-11
569
+==================
570
+
571
+  * deps: type-is@1.2.1
572
+    - Switch dependency from mime to mime-types@1.0.0
573
+
574
+1.3.0 / 2014-05-31
575
+==================
576
+
577
+  * add `extended` option to urlencoded parser
578
+
579
+1.2.2 / 2014-05-27
580
+==================
581
+
582
+  * deps: raw-body@1.1.6
583
+    - assert stream encoding on node.js 0.8
584
+    - assert stream encoding on node.js < 0.10.6
585
+    - deps: bytes@1
586
+
587
+1.2.1 / 2014-05-26
588
+==================
589
+
590
+  * invoke `next(err)` after request fully read
591
+    - prevents hung responses and socket hang ups
592
+
593
+1.2.0 / 2014-05-11
594
+==================
595
+
596
+  * add `verify` option
597
+  * deps: type-is@1.2.0
598
+    - support suffix matching
599
+
600
+1.1.2 / 2014-05-11
601
+==================
602
+
603
+  * improve json parser speed
604
+
605
+1.1.1 / 2014-05-11
606
+==================
607
+
608
+  * fix repeated limit parsing with every request
609
+
610
+1.1.0 / 2014-05-10
611
+==================
612
+
613
+  * add `type` option
614
+  * deps: pin for safety and consistency
615
+
616
+1.0.2 / 2014-04-14
617
+==================
618
+
619
+  * use `type-is` module
620
+
621
+1.0.1 / 2014-03-20
622
+==================
623
+
624
+  * lower default limits to 100kb

+ 23
- 0
node_modules/body-parser/LICENSE Ver arquivo

@@ -0,0 +1,23 @@
1
+(The MIT License)
2
+
3
+Copyright (c) 2014 Jonathan Ong <me@jongleberry.com>
4
+Copyright (c) 2014-2015 Douglas Christopher Wilson <doug@somethingdoug.com>
5
+
6
+Permission is hereby granted, free of charge, to any person obtaining
7
+a copy of this software and associated documentation files (the
8
+'Software'), to deal in the Software without restriction, including
9
+without limitation the rights to use, copy, modify, merge, publish,
10
+distribute, sublicense, and/or sell copies of the Software, and to
11
+permit persons to whom the Software is furnished to do so, subject to
12
+the following conditions:
13
+
14
+The above copyright notice and this permission notice shall be
15
+included in all copies or substantial portions of the Software.
16
+
17
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
18
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
19
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
20
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
21
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
22
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
23
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

+ 456
- 0
node_modules/body-parser/README.md Ver arquivo

@@ -0,0 +1,456 @@
1
+# body-parser
2
+
3
+[![NPM Version][npm-image]][npm-url]
4
+[![NPM Downloads][downloads-image]][downloads-url]
5
+[![Build Status][github-actions-ci-image]][github-actions-ci-url]
6
+[![Test Coverage][coveralls-image]][coveralls-url]
7
+
8
+Node.js body parsing middleware.
9
+
10
+Parse incoming request bodies in a middleware before your handlers, available
11
+under the `req.body` property.
12
+
13
+**Note** As `req.body`'s shape is based on user-controlled input, all
14
+properties and values in this object are untrusted and should be validated
15
+before trusting. For example, `req.body.foo.toString()` may fail in multiple
16
+ways, for example the `foo` property may not be there or may not be a string,
17
+and `toString` may not be a function and instead a string or other user input.
18
+
19
+[Learn about the anatomy of an HTTP transaction in Node.js](https://nodejs.org/en/docs/guides/anatomy-of-an-http-transaction/).
20
+
21
+_This does not handle multipart bodies_, due to their complex and typically
22
+large nature. For multipart bodies, you may be interested in the following
23
+modules:
24
+
25
+  * [busboy](https://www.npmjs.org/package/busboy#readme) and
26
+    [connect-busboy](https://www.npmjs.org/package/connect-busboy#readme)
27
+  * [multiparty](https://www.npmjs.org/package/multiparty#readme) and
28
+    [connect-multiparty](https://www.npmjs.org/package/connect-multiparty#readme)
29
+  * [formidable](https://www.npmjs.org/package/formidable#readme)
30
+  * [multer](https://www.npmjs.org/package/multer#readme)
31
+
32
+This module provides the following parsers:
33
+
34
+  * [JSON body parser](#bodyparserjsonoptions)
35
+  * [Raw body parser](#bodyparserrawoptions)
36
+  * [Text body parser](#bodyparsertextoptions)
37
+  * [URL-encoded form body parser](#bodyparserurlencodedoptions)
38
+
39
+Other body parsers you might be interested in:
40
+
41
+- [body](https://www.npmjs.org/package/body#readme)
42
+- [co-body](https://www.npmjs.org/package/co-body#readme)
43
+
44
+## Installation
45
+
46
+```sh
47
+$ npm install body-parser
48
+```
49
+
50
+## API
51
+
52
+```js
53
+var bodyParser = require('body-parser')
54
+```
55
+
56
+The `bodyParser` object exposes various factories to create middlewares. All
57
+middlewares will populate the `req.body` property with the parsed body when
58
+the `Content-Type` request header matches the `type` option, or an empty
59
+object (`{}`) if there was no body to parse, the `Content-Type` was not matched,
60
+or an error occurred.
61
+
62
+The various errors returned by this module are described in the
63
+[errors section](#errors).
64
+
65
+### bodyParser.json([options])
66
+
67
+Returns middleware that only parses `json` and only looks at requests where
68
+the `Content-Type` header matches the `type` option. This parser accepts any
69
+Unicode encoding of the body and supports automatic inflation of `gzip` and
70
+`deflate` encodings.
71
+
72
+A new `body` object containing the parsed data is populated on the `request`
73
+object after the middleware (i.e. `req.body`).
74
+
75
+#### Options
76
+
77
+The `json` function takes an optional `options` object that may contain any of
78
+the following keys:
79
+
80
+##### inflate
81
+
82
+When set to `true`, then deflated (compressed) bodies will be inflated; when
83
+`false`, deflated bodies are rejected. Defaults to `true`.
84
+
85
+##### limit
86
+
87
+Controls the maximum request body size. If this is a number, then the value
88
+specifies the number of bytes; if it is a string, the value is passed to the
89
+[bytes](https://www.npmjs.com/package/bytes) library for parsing. Defaults
90
+to `'100kb'`.
91
+
92
+##### reviver
93
+
94
+The `reviver` option is passed directly to `JSON.parse` as the second
95
+argument. You can find more information on this argument
96
+[in the MDN documentation about JSON.parse](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse#Example.3A_Using_the_reviver_parameter).
97
+
98
+##### strict
99
+
100
+When set to `true`, will only accept arrays and objects; when `false` will
101
+accept anything `JSON.parse` accepts. Defaults to `true`.
102
+
103
+##### type
104
+
105
+The `type` option is used to determine what media type the middleware will
106
+parse. This option can be a string, array of strings, or a function. If not a
107
+function, `type` option is passed directly to the
108
+[type-is](https://www.npmjs.org/package/type-is#readme) library and this can
109
+be an extension name (like `json`), a mime type (like `application/json`), or
110
+a mime type with a wildcard (like `*/*` or `*/json`). If a function, the `type`
111
+option is called as `fn(req)` and the request is parsed if it returns a truthy
112
+value. Defaults to `application/json`.
113
+
114
+##### verify
115
+
116
+The `verify` option, if supplied, is called as `verify(req, res, buf, encoding)`,
117
+where `buf` is a `Buffer` of the raw request body and `encoding` is the
118
+encoding of the request. The parsing can be aborted by throwing an error.
119
+
120
+### bodyParser.raw([options])
121
+
122
+Returns middleware that parses all bodies as a `Buffer` and only looks at
123
+requests where the `Content-Type` header matches the `type` option. This
124
+parser supports automatic inflation of `gzip` and `deflate` encodings.
125
+
126
+A new `body` object containing the parsed data is populated on the `request`
127
+object after the middleware (i.e. `req.body`). This will be a `Buffer` object
128
+of the body.
129
+
130
+#### Options
131
+
132
+The `raw` function takes an optional `options` object that may contain any of
133
+the following keys:
134
+
135
+##### inflate
136
+
137
+When set to `true`, then deflated (compressed) bodies will be inflated; when
138
+`false`, deflated bodies are rejected. Defaults to `true`.
139
+
140
+##### limit
141
+
142
+Controls the maximum request body size. If this is a number, then the value
143
+specifies the number of bytes; if it is a string, the value is passed to the
144
+[bytes](https://www.npmjs.com/package/bytes) library for parsing. Defaults
145
+to `'100kb'`.
146
+
147
+##### type
148
+
149
+The `type` option is used to determine what media type the middleware will
150
+parse. This option can be a string, array of strings, or a function.
151
+If not a function, `type` option is passed directly to the
152
+[type-is](https://www.npmjs.org/package/type-is#readme) library and this
153
+can be an extension name (like `bin`), a mime type (like
154
+`application/octet-stream`), or a mime type with a wildcard (like `*/*` or
155
+`application/*`). If a function, the `type` option is called as `fn(req)`
156
+and the request is parsed if it returns a truthy value. Defaults to
157
+`application/octet-stream`.
158
+
159
+##### verify
160
+
161
+The `verify` option, if supplied, is called as `verify(req, res, buf, encoding)`,
162
+where `buf` is a `Buffer` of the raw request body and `encoding` is the
163
+encoding of the request. The parsing can be aborted by throwing an error.
164
+
165
+### bodyParser.text([options])
166
+
167
+Returns middleware that parses all bodies as a string and only looks at
168
+requests where the `Content-Type` header matches the `type` option. This
169
+parser supports automatic inflation of `gzip` and `deflate` encodings.
170
+
171
+A new `body` string containing the parsed data is populated on the `request`
172
+object after the middleware (i.e. `req.body`). This will be a string of the
173
+body.
174
+
175
+#### Options
176
+
177
+The `text` function takes an optional `options` object that may contain any of
178
+the following keys:
179
+
180
+##### defaultCharset
181
+
182
+Specify the default character set for the text content if the charset is not
183
+specified in the `Content-Type` header of the request. Defaults to `utf-8`.
184
+
185
+##### inflate
186
+
187
+When set to `true`, then deflated (compressed) bodies will be inflated; when
188
+`false`, deflated bodies are rejected. Defaults to `true`.
189
+
190
+##### limit
191
+
192
+Controls the maximum request body size. If this is a number, then the value
193
+specifies the number of bytes; if it is a string, the value is passed to the
194
+[bytes](https://www.npmjs.com/package/bytes) library for parsing. Defaults
195
+to `'100kb'`.
196
+
197
+##### type
198
+
199
+The `type` option is used to determine what media type the middleware will
200
+parse. This option can be a string, array of strings, or a function. If not
201
+a function, `type` option is passed directly to the
202
+[type-is](https://www.npmjs.org/package/type-is#readme) library and this can
203
+be an extension name (like `txt`), a mime type (like `text/plain`), or a mime
204
+type with a wildcard (like `*/*` or `text/*`). If a function, the `type`
205
+option is called as `fn(req)` and the request is parsed if it returns a
206
+truthy value. Defaults to `text/plain`.
207
+
208
+##### verify
209
+
210
+The `verify` option, if supplied, is called as `verify(req, res, buf, encoding)`,
211
+where `buf` is a `Buffer` of the raw request body and `encoding` is the
212
+encoding of the request. The parsing can be aborted by throwing an error.
213
+
214
+### bodyParser.urlencoded([options])
215
+
216
+Returns middleware that only parses `urlencoded` bodies and only looks at
217
+requests where the `Content-Type` header matches the `type` option. This
218
+parser accepts only UTF-8 encoding of the body and supports automatic
219
+inflation of `gzip` and `deflate` encodings.
220
+
221
+A new `body` object containing the parsed data is populated on the `request`
222
+object after the middleware (i.e. `req.body`). This object will contain
223
+key-value pairs, where the value can be a string or array (when `extended` is
224
+`false`), or any type (when `extended` is `true`).
225
+
226
+#### Options
227
+
228
+The `urlencoded` function takes an optional `options` object that may contain
229
+any of the following keys:
230
+
231
+##### extended
232
+
233
+The `extended` option allows to choose between parsing the URL-encoded data
234
+with the `querystring` library (when `false`) or the `qs` library (when
235
+`true`). The "extended" syntax allows for rich objects and arrays to be
236
+encoded into the URL-encoded format, allowing for a JSON-like experience
237
+with URL-encoded. For more information, please
238
+[see the qs library](https://www.npmjs.org/package/qs#readme).
239
+
240
+Defaults to `true`, but using the default has been deprecated. Please
241
+research into the difference between `qs` and `querystring` and choose the
242
+appropriate setting.
243
+
244
+##### inflate
245
+
246
+When set to `true`, then deflated (compressed) bodies will be inflated; when
247
+`false`, deflated bodies are rejected. Defaults to `true`.
248
+
249
+##### limit
250
+
251
+Controls the maximum request body size. If this is a number, then the value
252
+specifies the number of bytes; if it is a string, the value is passed to the
253
+[bytes](https://www.npmjs.com/package/bytes) library for parsing. Defaults
254
+to `'100kb'`.
255
+
256
+##### parameterLimit
257
+
258
+The `parameterLimit` option controls the maximum number of parameters that
259
+are allowed in the URL-encoded data. If a request contains more parameters
260
+than this value, a 413 will be returned to the client. Defaults to `1000`.
261
+
262
+##### type
263
+
264
+The `type` option is used to determine what media type the middleware will
265
+parse. This option can be a string, array of strings, or a function. If not
266
+a function, `type` option is passed directly to the
267
+[type-is](https://www.npmjs.org/package/type-is#readme) library and this can
268
+be an extension name (like `urlencoded`), a mime type (like
269
+`application/x-www-form-urlencoded`), or a mime type with a wildcard (like
270
+`*/x-www-form-urlencoded`). If a function, the `type` option is called as
271
+`fn(req)` and the request is parsed if it returns a truthy value. Defaults
272
+to `application/x-www-form-urlencoded`.
273
+
274
+##### verify
275
+
276
+The `verify` option, if supplied, is called as `verify(req, res, buf, encoding)`,
277
+where `buf` is a `Buffer` of the raw request body and `encoding` is the
278
+encoding of the request. The parsing can be aborted by throwing an error.
279
+
280
+## Errors
281
+
282
+The middlewares provided by this module create errors using the
283
+[`http-errors` module](https://www.npmjs.com/package/http-errors). The errors
284
+will typically have a `status`/`statusCode` property that contains the suggested
285
+HTTP response code, an `expose` property to determine if the `message` property
286
+should be displayed to the client, a `type` property to determine the type of
287
+error without matching against the `message`, and a `body` property containing
288
+the read body, if available.
289
+
290
+The following are the common errors created, though any error can come through
291
+for various reasons.
292
+
293
+### content encoding unsupported
294
+
295
+This error will occur when the request had a `Content-Encoding` header that
296
+contained an encoding but the "inflation" option was set to `false`. The
297
+`status` property is set to `415`, the `type` property is set to
298
+`'encoding.unsupported'`, and the `charset` property will be set to the
299
+encoding that is unsupported.
300
+
301
+### entity parse failed
302
+
303
+This error will occur when the request contained an entity that could not be
304
+parsed by the middleware. The `status` property is set to `400`, the `type`
305
+property is set to `'entity.parse.failed'`, and the `body` property is set to
306
+the entity value that failed parsing.
307
+
308
+### entity verify failed
309
+
310
+This error will occur when the request contained an entity that could not be
311
+failed verification by the defined `verify` option. The `status` property is
312
+set to `403`, the `type` property is set to `'entity.verify.failed'`, and the
313
+`body` property is set to the entity value that failed verification.
314
+
315
+### request aborted
316
+
317
+This error will occur when the request is aborted by the client before reading
318
+the body has finished. The `received` property will be set to the number of
319
+bytes received before the request was aborted and the `expected` property is
320
+set to the number of expected bytes. The `status` property is set to `400`
321
+and `type` property is set to `'request.aborted'`.
322
+
323
+### request entity too large
324
+
325
+This error will occur when the request body's size is larger than the "limit"
326
+option. The `limit` property will be set to the byte limit and the `length`
327
+property will be set to the request body's length. The `status` property is
328
+set to `413` and the `type` property is set to `'entity.too.large'`.
329
+
330
+### request size did not match content length
331
+
332
+This error will occur when the request's length did not match the length from
333
+the `Content-Length` header. This typically occurs when the request is malformed,
334
+typically when the `Content-Length` header was calculated based on characters
335
+instead of bytes. The `status` property is set to `400` and the `type` property
336
+is set to `'request.size.invalid'`.
337
+
338
+### stream encoding should not be set
339
+
340
+This error will occur when something called the `req.setEncoding` method prior
341
+to this middleware. This module operates directly on bytes only and you cannot
342
+call `req.setEncoding` when using this module. The `status` property is set to
343
+`500` and the `type` property is set to `'stream.encoding.set'`.
344
+
345
+### too many parameters
346
+
347
+This error will occur when the content of the request exceeds the configured
348
+`parameterLimit` for the `urlencoded` parser. The `status` property is set to
349
+`413` and the `type` property is set to `'parameters.too.many'`.
350
+
351
+### unsupported charset "BOGUS"
352
+
353
+This error will occur when the request had a charset parameter in the
354
+`Content-Type` header, but the `iconv-lite` module does not support it OR the
355
+parser does not support it. The charset is contained in the message as well
356
+as in the `charset` property. The `status` property is set to `415`, the
357
+`type` property is set to `'charset.unsupported'`, and the `charset` property
358
+is set to the charset that is unsupported.
359
+
360
+### unsupported content encoding "bogus"
361
+
362
+This error will occur when the request had a `Content-Encoding` header that
363
+contained an unsupported encoding. The encoding is contained in the message
364
+as well as in the `encoding` property. The `status` property is set to `415`,
365
+the `type` property is set to `'encoding.unsupported'`, and the `encoding`
366
+property is set to the encoding that is unsupported.
367
+
368
+## Examples
369
+
370
+### Express/Connect top-level generic
371
+
372
+This example demonstrates adding a generic JSON and URL-encoded parser as a
373
+top-level middleware, which will parse the bodies of all incoming requests.
374
+This is the simplest setup.
375
+
376
+```js
377
+var express = require('express')
378
+var bodyParser = require('body-parser')
379
+
380
+var app = express()
381
+
382
+// parse application/x-www-form-urlencoded
383
+app.use(bodyParser.urlencoded({ extended: false }))
384
+
385
+// parse application/json
386
+app.use(bodyParser.json())
387
+
388
+app.use(function (req, res) {
389
+  res.setHeader('Content-Type', 'text/plain')
390
+  res.write('you posted:\n')
391
+  res.end(JSON.stringify(req.body, null, 2))
392
+})
393
+```
394
+
395
+### Express route-specific
396
+
397
+This example demonstrates adding body parsers specifically to the routes that
398
+need them. In general, this is the most recommended way to use body-parser with
399
+Express.
400
+
401
+```js
402
+var express = require('express')
403
+var bodyParser = require('body-parser')
404
+
405
+var app = express()
406
+
407
+// create application/json parser
408
+var jsonParser = bodyParser.json()
409
+
410
+// create application/x-www-form-urlencoded parser
411
+var urlencodedParser = bodyParser.urlencoded({ extended: false })
412
+
413
+// POST /login gets urlencoded bodies
414
+app.post('/login', urlencodedParser, function (req, res) {
415
+  res.send('welcome, ' + req.body.username)
416
+})
417
+
418
+// POST /api/users gets JSON bodies
419
+app.post('/api/users', jsonParser, function (req, res) {
420
+  // create user in req.body
421
+})
422
+```
423
+
424
+### Change accepted type for parsers
425
+
426
+All the parsers accept a `type` option which allows you to change the
427
+`Content-Type` that the middleware will parse.
428
+
429
+```js
430
+var express = require('express')
431
+var bodyParser = require('body-parser')
432
+
433
+var app = express()
434
+
435
+// parse various different custom JSON types as JSON
436
+app.use(bodyParser.json({ type: 'application/*+json' }))
437
+
438
+// parse some custom thing into a Buffer
439
+app.use(bodyParser.raw({ type: 'application/vnd.custom-type' }))
440
+
441
+// parse an HTML body into a string
442
+app.use(bodyParser.text({ type: 'text/html' }))
443
+```
444
+
445
+## License
446
+
447
+[MIT](LICENSE)
448
+
449
+[npm-image]: https://img.shields.io/npm/v/body-parser.svg
450
+[npm-url]: https://npmjs.org/package/body-parser
451
+[coveralls-image]: https://img.shields.io/coveralls/expressjs/body-parser/master.svg
452
+[coveralls-url]: https://coveralls.io/r/expressjs/body-parser?branch=master
453
+[downloads-image]: https://img.shields.io/npm/dm/body-parser.svg
454
+[downloads-url]: https://npmjs.org/package/body-parser
455
+[github-actions-ci-image]: https://img.shields.io/github/workflow/status/expressjs/body-parser/ci/master?label=ci
456
+[github-actions-ci-url]: https://github.com/expressjs/body-parser?query=workflow%3Aci

+ 157
- 0
node_modules/body-parser/index.js Ver arquivo

@@ -0,0 +1,157 @@
1
+/*!
2
+ * body-parser
3
+ * Copyright(c) 2014-2015 Douglas Christopher Wilson
4
+ * MIT Licensed
5
+ */
6
+
7
+'use strict'
8
+
9
+/**
10
+ * Module dependencies.
11
+ * @private
12
+ */
13
+
14
+var deprecate = require('depd')('body-parser')
15
+
16
+/**
17
+ * Cache of loaded parsers.
18
+ * @private
19
+ */
20
+
21
+var parsers = Object.create(null)
22
+
23
+/**
24
+ * @typedef Parsers
25
+ * @type {function}
26
+ * @property {function} json
27
+ * @property {function} raw
28
+ * @property {function} text
29
+ * @property {function} urlencoded
30
+ */
31
+
32
+/**
33
+ * Module exports.
34
+ * @type {Parsers}
35
+ */
36
+
37
+exports = module.exports = deprecate.function(bodyParser,
38
+  'bodyParser: use individual json/urlencoded middlewares')
39
+
40
+/**
41
+ * JSON parser.
42
+ * @public
43
+ */
44
+
45
+Object.defineProperty(exports, 'json', {
46
+  configurable: true,
47
+  enumerable: true,
48
+  get: createParserGetter('json')
49
+})
50
+
51
+/**
52
+ * Raw parser.
53
+ * @public
54
+ */
55
+
56
+Object.defineProperty(exports, 'raw', {
57
+  configurable: true,
58
+  enumerable: true,
59
+  get: createParserGetter('raw')
60
+})
61
+
62
+/**
63
+ * Text parser.
64
+ * @public
65
+ */
66
+
67
+Object.defineProperty(exports, 'text', {
68
+  configurable: true,
69
+  enumerable: true,
70
+  get: createParserGetter('text')
71
+})
72
+
73
+/**
74
+ * URL-encoded parser.
75
+ * @public
76
+ */
77
+
78
+Object.defineProperty(exports, 'urlencoded', {
79
+  configurable: true,
80
+  enumerable: true,
81
+  get: createParserGetter('urlencoded')
82
+})
83
+
84
+/**
85
+ * Create a middleware to parse json and urlencoded bodies.
86
+ *
87
+ * @param {object} [options]
88
+ * @return {function}
89
+ * @deprecated
90
+ * @public
91
+ */
92
+
93
+function bodyParser (options) {
94
+  var opts = {}
95
+
96
+  // exclude type option
97
+  if (options) {
98
+    for (var prop in options) {
99
+      if (prop !== 'type') {
100
+        opts[prop] = options[prop]
101
+      }
102
+    }
103
+  }
104
+
105
+  var _urlencoded = exports.urlencoded(opts)
106
+  var _json = exports.json(opts)
107
+
108
+  return function bodyParser (req, res, next) {
109
+    _json(req, res, function (err) {
110
+      if (err) return next(err)
111
+      _urlencoded(req, res, next)
112
+    })
113
+  }
114
+}
115
+
116
+/**
117
+ * Create a getter for loading a parser.
118
+ * @private
119
+ */
120
+
121
+function createParserGetter (name) {
122
+  return function get () {
123
+    return loadParser(name)
124
+  }
125
+}
126
+
127
+/**
128
+ * Load a parser module.
129
+ * @private
130
+ */
131
+
132
+function loadParser (parserName) {
133
+  var parser = parsers[parserName]
134
+
135
+  if (parser !== undefined) {
136
+    return parser
137
+  }
138
+
139
+  // this uses a switch for static require analysis
140
+  switch (parserName) {
141
+    case 'json':
142
+      parser = require('./lib/types/json')
143
+      break
144
+    case 'raw':
145
+      parser = require('./lib/types/raw')
146
+      break
147
+    case 'text':
148
+      parser = require('./lib/types/text')
149
+      break
150
+    case 'urlencoded':
151
+      parser = require('./lib/types/urlencoded')
152
+      break
153
+  }
154
+
155
+  // store to prevent invoking require()
156
+  return (parsers[parserName] = parser)
157
+}

+ 181
- 0
node_modules/body-parser/lib/read.js Ver arquivo

@@ -0,0 +1,181 @@
1
+/*!
2
+ * body-parser
3
+ * Copyright(c) 2014-2015 Douglas Christopher Wilson
4
+ * MIT Licensed
5
+ */
6
+
7
+'use strict'
8
+
9
+/**
10
+ * Module dependencies.
11
+ * @private
12
+ */
13
+
14
+var createError = require('http-errors')
15
+var getBody = require('raw-body')
16
+var iconv = require('iconv-lite')
17
+var onFinished = require('on-finished')
18
+var zlib = require('zlib')
19
+
20
+/**
21
+ * Module exports.
22
+ */
23
+
24
+module.exports = read
25
+
26
+/**
27
+ * Read a request into a buffer and parse.
28
+ *
29
+ * @param {object} req
30
+ * @param {object} res
31
+ * @param {function} next
32
+ * @param {function} parse
33
+ * @param {function} debug
34
+ * @param {object} options
35
+ * @private
36
+ */
37
+
38
+function read (req, res, next, parse, debug, options) {
39
+  var length
40
+  var opts = options
41
+  var stream
42
+
43
+  // flag as parsed
44
+  req._body = true
45
+
46
+  // read options
47
+  var encoding = opts.encoding !== null
48
+    ? opts.encoding
49
+    : null
50
+  var verify = opts.verify
51
+
52
+  try {
53
+    // get the content stream
54
+    stream = contentstream(req, debug, opts.inflate)
55
+    length = stream.length
56
+    stream.length = undefined
57
+  } catch (err) {
58
+    return next(err)
59
+  }
60
+
61
+  // set raw-body options
62
+  opts.length = length
63
+  opts.encoding = verify
64
+    ? null
65
+    : encoding
66
+
67
+  // assert charset is supported
68
+  if (opts.encoding === null && encoding !== null && !iconv.encodingExists(encoding)) {
69
+    return next(createError(415, 'unsupported charset "' + encoding.toUpperCase() + '"', {
70
+      charset: encoding.toLowerCase(),
71
+      type: 'charset.unsupported'
72
+    }))
73
+  }
74
+
75
+  // read body
76
+  debug('read body')
77
+  getBody(stream, opts, function (error, body) {
78
+    if (error) {
79
+      var _error
80
+
81
+      if (error.type === 'encoding.unsupported') {
82
+        // echo back charset
83
+        _error = createError(415, 'unsupported charset "' + encoding.toUpperCase() + '"', {
84
+          charset: encoding.toLowerCase(),
85
+          type: 'charset.unsupported'
86
+        })
87
+      } else {
88
+        // set status code on error
89
+        _error = createError(400, error)
90
+      }
91
+
92
+      // read off entire request
93
+      stream.resume()
94
+      onFinished(req, function onfinished () {
95
+        next(createError(400, _error))
96
+      })
97
+      return
98
+    }
99
+
100
+    // verify
101
+    if (verify) {
102
+      try {
103
+        debug('verify body')
104
+        verify(req, res, body, encoding)
105
+      } catch (err) {
106
+        next(createError(403, err, {
107
+          body: body,
108
+          type: err.type || 'entity.verify.failed'
109
+        }))
110
+        return
111
+      }
112
+    }
113
+
114
+    // parse
115
+    var str = body
116
+    try {
117
+      debug('parse body')
118
+      str = typeof body !== 'string' && encoding !== null
119
+        ? iconv.decode(body, encoding)
120
+        : body
121
+      req.body = parse(str)
122
+    } catch (err) {
123
+      next(createError(400, err, {
124
+        body: str,
125
+        type: err.type || 'entity.parse.failed'
126
+      }))
127
+      return
128
+    }
129
+
130
+    next()
131
+  })
132
+}
133
+
134
+/**
135
+ * Get the content stream of the request.
136
+ *
137
+ * @param {object} req
138
+ * @param {function} debug
139
+ * @param {boolean} [inflate=true]
140
+ * @return {object}
141
+ * @api private
142
+ */
143
+
144
+function contentstream (req, debug, inflate) {
145
+  var encoding = (req.headers['content-encoding'] || 'identity').toLowerCase()
146
+  var length = req.headers['content-length']
147
+  var stream
148
+
149
+  debug('content-encoding "%s"', encoding)
150
+
151
+  if (inflate === false && encoding !== 'identity') {
152
+    throw createError(415, 'content encoding unsupported', {
153
+      encoding: encoding,
154
+      type: 'encoding.unsupported'
155
+    })
156
+  }
157
+
158
+  switch (encoding) {
159
+    case 'deflate':
160
+      stream = zlib.createInflate()
161
+      debug('inflate body')
162
+      req.pipe(stream)
163
+      break
164
+    case 'gzip':
165
+      stream = zlib.createGunzip()
166
+      debug('gunzip body')
167
+      req.pipe(stream)
168
+      break
169
+    case 'identity':
170
+      stream = req
171
+      stream.length = length
172
+      break
173
+    default:
174
+      throw createError(415, 'unsupported content encoding "' + encoding + '"', {
175
+        encoding: encoding,
176
+        type: 'encoding.unsupported'
177
+      })
178
+  }
179
+
180
+  return stream
181
+}

+ 230
- 0
node_modules/body-parser/lib/types/json.js Ver arquivo

@@ -0,0 +1,230 @@
1
+/*!
2
+ * body-parser
3
+ * Copyright(c) 2014 Jonathan Ong
4
+ * Copyright(c) 2014-2015 Douglas Christopher Wilson
5
+ * MIT Licensed
6
+ */
7
+
8
+'use strict'
9
+
10
+/**
11
+ * Module dependencies.
12
+ * @private
13
+ */
14
+
15
+var bytes = require('bytes')
16
+var contentType = require('content-type')
17
+var createError = require('http-errors')
18
+var debug = require('debug')('body-parser:json')
19
+var read = require('../read')
20
+var typeis = require('type-is')
21
+
22
+/**
23
+ * Module exports.
24
+ */
25
+
26
+module.exports = json
27
+
28
+/**
29
+ * RegExp to match the first non-space in a string.
30
+ *
31
+ * Allowed whitespace is defined in RFC 7159:
32
+ *
33
+ *    ws = *(
34
+ *            %x20 /              ; Space
35
+ *            %x09 /              ; Horizontal tab
36
+ *            %x0A /              ; Line feed or New line
37
+ *            %x0D )              ; Carriage return
38
+ */
39
+
40
+var FIRST_CHAR_REGEXP = /^[\x20\x09\x0a\x0d]*(.)/ // eslint-disable-line no-control-regex
41
+
42
+/**
43
+ * Create a middleware to parse JSON bodies.
44
+ *
45
+ * @param {object} [options]
46
+ * @return {function}
47
+ * @public
48
+ */
49
+
50
+function json (options) {
51
+  var opts = options || {}
52
+
53
+  var limit = typeof opts.limit !== 'number'
54
+    ? bytes.parse(opts.limit || '100kb')
55
+    : opts.limit
56
+  var inflate = opts.inflate !== false
57
+  var reviver = opts.reviver
58
+  var strict = opts.strict !== false
59
+  var type = opts.type || 'application/json'
60
+  var verify = opts.verify || false
61
+
62
+  if (verify !== false && typeof verify !== 'function') {
63
+    throw new TypeError('option verify must be function')
64
+  }
65
+
66
+  // create the appropriate type checking function
67
+  var shouldParse = typeof type !== 'function'
68
+    ? typeChecker(type)
69
+    : type
70
+
71
+  function parse (body) {
72
+    if (body.length === 0) {
73
+      // special-case empty json body, as it's a common client-side mistake
74
+      // TODO: maybe make this configurable or part of "strict" option
75
+      return {}
76
+    }
77
+
78
+    if (strict) {
79
+      var first = firstchar(body)
80
+
81
+      if (first !== '{' && first !== '[') {
82
+        debug('strict violation')
83
+        throw createStrictSyntaxError(body, first)
84
+      }
85
+    }
86
+
87
+    try {
88
+      debug('parse json')
89
+      return JSON.parse(body, reviver)
90
+    } catch (e) {
91
+      throw normalizeJsonSyntaxError(e, {
92
+        message: e.message,
93
+        stack: e.stack
94
+      })
95
+    }
96
+  }
97
+
98
+  return function jsonParser (req, res, next) {
99
+    if (req._body) {
100
+      debug('body already parsed')
101
+      next()
102
+      return
103
+    }
104
+
105
+    req.body = req.body || {}
106
+
107
+    // skip requests without bodies
108
+    if (!typeis.hasBody(req)) {
109
+      debug('skip empty body')
110
+      next()
111
+      return
112
+    }
113
+
114
+    debug('content-type %j', req.headers['content-type'])
115
+
116
+    // determine if request should be parsed
117
+    if (!shouldParse(req)) {
118
+      debug('skip parsing')
119
+      next()
120
+      return
121
+    }
122
+
123
+    // assert charset per RFC 7159 sec 8.1
124
+    var charset = getCharset(req) || 'utf-8'
125
+    if (charset.substr(0, 4) !== 'utf-') {
126
+      debug('invalid charset')
127
+      next(createError(415, 'unsupported charset "' + charset.toUpperCase() + '"', {
128
+        charset: charset,
129
+        type: 'charset.unsupported'
130
+      }))
131
+      return
132
+    }
133
+
134
+    // read
135
+    read(req, res, next, parse, debug, {
136
+      encoding: charset,
137
+      inflate: inflate,
138
+      limit: limit,
139
+      verify: verify
140
+    })
141
+  }
142
+}
143
+
144
+/**
145
+ * Create strict violation syntax error matching native error.
146
+ *
147
+ * @param {string} str
148
+ * @param {string} char
149
+ * @return {Error}
150
+ * @private
151
+ */
152
+
153
+function createStrictSyntaxError (str, char) {
154
+  var index = str.indexOf(char)
155
+  var partial = str.substring(0, index) + '#'
156
+
157
+  try {
158
+    JSON.parse(partial); /* istanbul ignore next */ throw new SyntaxError('strict violation')
159
+  } catch (e) {
160
+    return normalizeJsonSyntaxError(e, {
161
+      message: e.message.replace('#', char),
162
+      stack: e.stack
163
+    })
164
+  }
165
+}
166
+
167
+/**
168
+ * Get the first non-whitespace character in a string.
169
+ *
170
+ * @param {string} str
171
+ * @return {function}
172
+ * @private
173
+ */
174
+
175
+function firstchar (str) {
176
+  return FIRST_CHAR_REGEXP.exec(str)[1]
177
+}
178
+
179
+/**
180
+ * Get the charset of a request.
181
+ *
182
+ * @param {object} req
183
+ * @api private
184
+ */
185
+
186
+function getCharset (req) {
187
+  try {
188
+    return (contentType.parse(req).parameters.charset || '').toLowerCase()
189
+  } catch (e) {
190
+    return undefined
191
+  }
192
+}
193
+
194
+/**
195
+ * Normalize a SyntaxError for JSON.parse.
196
+ *
197
+ * @param {SyntaxError} error
198
+ * @param {object} obj
199
+ * @return {SyntaxError}
200
+ */
201
+
202
+function normalizeJsonSyntaxError (error, obj) {
203
+  var keys = Object.getOwnPropertyNames(error)
204
+
205
+  for (var i = 0; i < keys.length; i++) {
206
+    var key = keys[i]
207
+    if (key !== 'stack' && key !== 'message') {
208
+      delete error[key]
209
+    }
210
+  }
211
+
212
+  // replace stack before message for Node.js 0.10 and below
213
+  error.stack = obj.stack.replace(error.message, obj.message)
214
+  error.message = obj.message
215
+
216
+  return error
217
+}
218
+
219
+/**
220
+ * Get the simple type checker.
221
+ *
222
+ * @param {string} type
223
+ * @return {function}
224
+ */
225
+
226
+function typeChecker (type) {
227
+  return function checkType (req) {
228
+    return Boolean(typeis(req, type))
229
+  }
230
+}

+ 101
- 0
node_modules/body-parser/lib/types/raw.js Ver arquivo

@@ -0,0 +1,101 @@
1
+/*!
2
+ * body-parser
3
+ * Copyright(c) 2014-2015 Douglas Christopher Wilson
4
+ * MIT Licensed
5
+ */
6
+
7
+'use strict'
8
+
9
+/**
10
+ * Module dependencies.
11
+ */
12
+
13
+var bytes = require('bytes')
14
+var debug = require('debug')('body-parser:raw')
15
+var read = require('../read')
16
+var typeis = require('type-is')
17
+
18
+/**
19
+ * Module exports.
20
+ */
21
+
22
+module.exports = raw
23
+
24
+/**
25
+ * Create a middleware to parse raw bodies.
26
+ *
27
+ * @param {object} [options]
28
+ * @return {function}
29
+ * @api public
30
+ */
31
+
32
+function raw (options) {
33
+  var opts = options || {}
34
+
35
+  var inflate = opts.inflate !== false
36
+  var limit = typeof opts.limit !== 'number'
37
+    ? bytes.parse(opts.limit || '100kb')
38
+    : opts.limit
39
+  var type = opts.type || 'application/octet-stream'
40
+  var verify = opts.verify || false
41
+
42
+  if (verify !== false && typeof verify !== 'function') {
43
+    throw new TypeError('option verify must be function')
44
+  }
45
+
46
+  // create the appropriate type checking function
47
+  var shouldParse = typeof type !== 'function'
48
+    ? typeChecker(type)
49
+    : type
50
+
51
+  function parse (buf) {
52
+    return buf
53
+  }
54
+
55
+  return function rawParser (req, res, next) {
56
+    if (req._body) {
57
+      debug('body already parsed')
58
+      next()
59
+      return
60
+    }
61
+
62
+    req.body = req.body || {}
63
+
64
+    // skip requests without bodies
65
+    if (!typeis.hasBody(req)) {
66
+      debug('skip empty body')
67
+      next()
68
+      return
69
+    }
70
+
71
+    debug('content-type %j', req.headers['content-type'])
72
+
73
+    // determine if request should be parsed
74
+    if (!shouldParse(req)) {
75
+      debug('skip parsing')
76
+      next()
77
+      return
78
+    }
79
+
80
+    // read
81
+    read(req, res, next, parse, debug, {
82
+      encoding: null,
83
+      inflate: inflate,
84
+      limit: limit,
85
+      verify: verify
86
+    })
87
+  }
88
+}
89
+
90
+/**
91
+ * Get the simple type checker.
92
+ *
93
+ * @param {string} type
94
+ * @return {function}
95
+ */
96
+
97
+function typeChecker (type) {
98
+  return function checkType (req) {
99
+    return Boolean(typeis(req, type))
100
+  }
101
+}

+ 121
- 0
node_modules/body-parser/lib/types/text.js Ver arquivo

@@ -0,0 +1,121 @@
1
+/*!
2
+ * body-parser
3
+ * Copyright(c) 2014-2015 Douglas Christopher Wilson
4
+ * MIT Licensed
5
+ */
6
+
7
+'use strict'
8
+
9
+/**
10
+ * Module dependencies.
11
+ */
12
+
13
+var bytes = require('bytes')
14
+var contentType = require('content-type')
15
+var debug = require('debug')('body-parser:text')
16
+var read = require('../read')
17
+var typeis = require('type-is')
18
+
19
+/**
20
+ * Module exports.
21
+ */
22
+
23
+module.exports = text
24
+
25
+/**
26
+ * Create a middleware to parse text bodies.
27
+ *
28
+ * @param {object} [options]
29
+ * @return {function}
30
+ * @api public
31
+ */
32
+
33
+function text (options) {
34
+  var opts = options || {}
35
+
36
+  var defaultCharset = opts.defaultCharset || 'utf-8'
37
+  var inflate = opts.inflate !== false
38
+  var limit = typeof opts.limit !== 'number'
39
+    ? bytes.parse(opts.limit || '100kb')
40
+    : opts.limit
41
+  var type = opts.type || 'text/plain'
42
+  var verify = opts.verify || false
43
+
44
+  if (verify !== false && typeof verify !== 'function') {
45
+    throw new TypeError('option verify must be function')
46
+  }
47
+
48
+  // create the appropriate type checking function
49
+  var shouldParse = typeof type !== 'function'
50
+    ? typeChecker(type)
51
+    : type
52
+
53
+  function parse (buf) {
54
+    return buf
55
+  }
56
+
57
+  return function textParser (req, res, next) {
58
+    if (req._body) {
59
+      debug('body already parsed')
60
+      next()
61
+      return
62
+    }
63
+
64
+    req.body = req.body || {}
65
+
66
+    // skip requests without bodies
67
+    if (!typeis.hasBody(req)) {
68
+      debug('skip empty body')
69
+      next()
70
+      return
71
+    }
72
+
73
+    debug('content-type %j', req.headers['content-type'])
74
+
75
+    // determine if request should be parsed
76
+    if (!shouldParse(req)) {
77
+      debug('skip parsing')
78
+      next()
79
+      return
80
+    }
81
+
82
+    // get charset
83
+    var charset = getCharset(req) || defaultCharset
84
+
85
+    // read
86
+    read(req, res, next, parse, debug, {
87
+      encoding: charset,
88
+      inflate: inflate,
89
+      limit: limit,
90
+      verify: verify
91
+    })
92
+  }
93
+}
94
+
95
+/**
96
+ * Get the charset of a request.
97
+ *
98
+ * @param {object} req
99
+ * @api private
100
+ */
101
+
102
+function getCharset (req) {
103
+  try {
104
+    return (contentType.parse(req).parameters.charset || '').toLowerCase()
105
+  } catch (e) {
106
+    return undefined
107
+  }
108
+}
109
+
110
+/**
111
+ * Get the simple type checker.
112
+ *
113
+ * @param {string} type
114
+ * @return {function}
115
+ */
116
+
117
+function typeChecker (type) {
118
+  return function checkType (req) {
119
+    return Boolean(typeis(req, type))
120
+  }
121
+}

+ 284
- 0
node_modules/body-parser/lib/types/urlencoded.js Ver arquivo

@@ -0,0 +1,284 @@
1
+/*!
2
+ * body-parser
3
+ * Copyright(c) 2014 Jonathan Ong
4
+ * Copyright(c) 2014-2015 Douglas Christopher Wilson
5
+ * MIT Licensed
6
+ */
7
+
8
+'use strict'
9
+
10
+/**
11
+ * Module dependencies.
12
+ * @private
13
+ */
14
+
15
+var bytes = require('bytes')
16
+var contentType = require('content-type')
17
+var createError = require('http-errors')
18
+var debug = require('debug')('body-parser:urlencoded')
19
+var deprecate = require('depd')('body-parser')
20
+var read = require('../read')
21
+var typeis = require('type-is')
22
+
23
+/**
24
+ * Module exports.
25
+ */
26
+
27
+module.exports = urlencoded
28
+
29
+/**
30
+ * Cache of parser modules.
31
+ */
32
+
33
+var parsers = Object.create(null)
34
+
35
+/**
36
+ * Create a middleware to parse urlencoded bodies.
37
+ *
38
+ * @param {object} [options]
39
+ * @return {function}
40
+ * @public
41
+ */
42
+
43
+function urlencoded (options) {
44
+  var opts = options || {}
45
+
46
+  // notice because option default will flip in next major
47
+  if (opts.extended === undefined) {
48
+    deprecate('undefined extended: provide extended option')
49
+  }
50
+
51
+  var extended = opts.extended !== false
52
+  var inflate = opts.inflate !== false
53
+  var limit = typeof opts.limit !== 'number'
54
+    ? bytes.parse(opts.limit || '100kb')
55
+    : opts.limit
56
+  var type = opts.type || 'application/x-www-form-urlencoded'
57
+  var verify = opts.verify || false
58
+
59
+  if (verify !== false && typeof verify !== 'function') {
60
+    throw new TypeError('option verify must be function')
61
+  }
62
+
63
+  // create the appropriate query parser
64
+  var queryparse = extended
65
+    ? extendedparser(opts)
66
+    : simpleparser(opts)
67
+
68
+  // create the appropriate type checking function
69
+  var shouldParse = typeof type !== 'function'
70
+    ? typeChecker(type)
71
+    : type
72
+
73
+  function parse (body) {
74
+    return body.length
75
+      ? queryparse(body)
76
+      : {}
77
+  }
78
+
79
+  return function urlencodedParser (req, res, next) {
80
+    if (req._body) {
81
+      debug('body already parsed')
82
+      next()
83
+      return
84
+    }
85
+
86
+    req.body = req.body || {}
87
+
88
+    // skip requests without bodies
89
+    if (!typeis.hasBody(req)) {
90
+      debug('skip empty body')
91
+      next()
92
+      return
93
+    }
94
+
95
+    debug('content-type %j', req.headers['content-type'])
96
+
97
+    // determine if request should be parsed
98
+    if (!shouldParse(req)) {
99
+      debug('skip parsing')
100
+      next()
101
+      return
102
+    }
103
+
104
+    // assert charset
105
+    var charset = getCharset(req) || 'utf-8'
106
+    if (charset !== 'utf-8') {
107
+      debug('invalid charset')
108
+      next(createError(415, 'unsupported charset "' + charset.toUpperCase() + '"', {
109
+        charset: charset,
110
+        type: 'charset.unsupported'
111
+      }))
112
+      return
113
+    }
114
+
115
+    // read
116
+    read(req, res, next, parse, debug, {
117
+      debug: debug,
118
+      encoding: charset,
119
+      inflate: inflate,
120
+      limit: limit,
121
+      verify: verify
122
+    })
123
+  }
124
+}
125
+
126
+/**
127
+ * Get the extended query parser.
128
+ *
129
+ * @param {object} options
130
+ */
131
+
132
+function extendedparser (options) {
133
+  var parameterLimit = options.parameterLimit !== undefined
134
+    ? options.parameterLimit
135
+    : 1000
136
+  var parse = parser('qs')
137
+
138
+  if (isNaN(parameterLimit) || parameterLimit < 1) {
139
+    throw new TypeError('option parameterLimit must be a positive number')
140
+  }
141
+
142
+  if (isFinite(parameterLimit)) {
143
+    parameterLimit = parameterLimit | 0
144
+  }
145
+
146
+  return function queryparse (body) {
147
+    var paramCount = parameterCount(body, parameterLimit)
148
+
149
+    if (paramCount === undefined) {
150
+      debug('too many parameters')
151
+      throw createError(413, 'too many parameters', {
152
+        type: 'parameters.too.many'
153
+      })
154
+    }
155
+
156
+    var arrayLimit = Math.max(100, paramCount)
157
+
158
+    debug('parse extended urlencoding')
159
+    return parse(body, {
160
+      allowPrototypes: true,
161
+      arrayLimit: arrayLimit,
162
+      depth: Infinity,
163
+      parameterLimit: parameterLimit
164
+    })
165
+  }
166
+}
167
+
168
+/**
169
+ * Get the charset of a request.
170
+ *
171
+ * @param {object} req
172
+ * @api private
173
+ */
174
+
175
+function getCharset (req) {
176
+  try {
177
+    return (contentType.parse(req).parameters.charset || '').toLowerCase()
178
+  } catch (e) {
179
+    return undefined
180
+  }
181
+}
182
+
183
+/**
184
+ * Count the number of parameters, stopping once limit reached
185
+ *
186
+ * @param {string} body
187
+ * @param {number} limit
188
+ * @api private
189
+ */
190
+
191
+function parameterCount (body, limit) {
192
+  var count = 0
193
+  var index = 0
194
+
195
+  while ((index = body.indexOf('&', index)) !== -1) {
196
+    count++
197
+    index++
198
+
199
+    if (count === limit) {
200
+      return undefined
201
+    }
202
+  }
203
+
204
+  return count
205
+}
206
+
207
+/**
208
+ * Get parser for module name dynamically.
209
+ *
210
+ * @param {string} name
211
+ * @return {function}
212
+ * @api private
213
+ */
214
+
215
+function parser (name) {
216
+  var mod = parsers[name]
217
+
218
+  if (mod !== undefined) {
219
+    return mod.parse
220
+  }
221
+
222
+  // this uses a switch for static require analysis
223
+  switch (name) {
224
+    case 'qs':
225
+      mod = require('qs')
226
+      break
227
+    case 'querystring':
228
+      mod = require('querystring')
229
+      break
230
+  }
231
+
232
+  // store to prevent invoking require()
233
+  parsers[name] = mod
234
+
235
+  return mod.parse
236
+}
237
+
238
+/**
239
+ * Get the simple query parser.
240
+ *
241
+ * @param {object} options
242
+ */
243
+
244
+function simpleparser (options) {
245
+  var parameterLimit = options.parameterLimit !== undefined
246
+    ? options.parameterLimit
247
+    : 1000
248
+  var parse = parser('querystring')
249
+
250
+  if (isNaN(parameterLimit) || parameterLimit < 1) {
251
+    throw new TypeError('option parameterLimit must be a positive number')
252
+  }
253
+
254
+  if (isFinite(parameterLimit)) {
255
+    parameterLimit = parameterLimit | 0
256
+  }
257
+
258
+  return function queryparse (body) {
259
+    var paramCount = parameterCount(body, parameterLimit)
260
+
261
+    if (paramCount === undefined) {
262
+      debug('too many parameters')
263
+      throw createError(413, 'too many parameters', {
264
+        type: 'parameters.too.many'
265
+      })
266
+    }
267
+
268
+    debug('parse urlencoding')
269
+    return parse(body, undefined, undefined, { maxKeys: parameterLimit })
270
+  }
271
+}
272
+
273
+/**
274
+ * Get the simple type checker.
275
+ *
276
+ * @param {string} type
277
+ * @return {function}
278
+ */
279
+
280
+function typeChecker (type) {
281
+  return function checkType (req) {
282
+    return Boolean(typeis(req, type))
283
+  }
284
+}

+ 52
- 0
node_modules/body-parser/package.json Ver arquivo

@@ -0,0 +1,52 @@
1
+{
2
+  "name": "body-parser",
3
+  "description": "Node.js body parsing middleware",
4
+  "version": "1.19.1",
5
+  "contributors": [
6
+    "Douglas Christopher Wilson <doug@somethingdoug.com>",
7
+    "Jonathan Ong <me@jongleberry.com> (http://jongleberry.com)"
8
+  ],
9
+  "license": "MIT",
10
+  "repository": "expressjs/body-parser",
11
+  "dependencies": {
12
+    "bytes": "3.1.1",
13
+    "content-type": "~1.0.4",
14
+    "debug": "2.6.9",
15
+    "depd": "~1.1.2",
16
+    "http-errors": "1.8.1",
17
+    "iconv-lite": "0.4.24",
18
+    "on-finished": "~2.3.0",
19
+    "qs": "6.9.6",
20
+    "raw-body": "2.4.2",
21
+    "type-is": "~1.6.18"
22
+  },
23
+  "devDependencies": {
24
+    "eslint": "7.32.0",
25
+    "eslint-config-standard": "14.1.1",
26
+    "eslint-plugin-import": "2.25.3",
27
+    "eslint-plugin-markdown": "2.2.1",
28
+    "eslint-plugin-node": "11.1.0",
29
+    "eslint-plugin-promise": "5.2.0",
30
+    "eslint-plugin-standard": "4.1.0",
31
+    "methods": "1.1.2",
32
+    "mocha": "9.1.3",
33
+    "nyc": "15.1.0",
34
+    "safe-buffer": "5.2.1",
35
+    "supertest": "6.1.6"
36
+  },
37
+  "files": [
38
+    "lib/",
39
+    "LICENSE",
40
+    "HISTORY.md",
41
+    "index.js"
42
+  ],
43
+  "engines": {
44
+    "node": ">= 0.8"
45
+  },
46
+  "scripts": {
47
+    "lint": "eslint .",
48
+    "test": "mocha --require test/support/env --reporter spec --check-leaks --bail test/",
49
+    "test-ci": "nyc --reporter=lcov --reporter=text npm test",
50
+    "test-cov": "nyc --reporter=html --reporter=text npm test"
51
+  }
52
+}

+ 92
- 0
node_modules/bytes/History.md Ver arquivo

@@ -0,0 +1,92 @@
1
+3.1.1 / 2021-11-15
2
+==================
3
+
4
+  * Fix "thousandsSeparator" incorrecting formatting fractional part
5
+
6
+3.1.0 / 2019-01-22
7
+==================
8
+
9
+  * Add petabyte (`pb`) support
10
+
11
+3.0.0 / 2017-08-31
12
+==================
13
+
14
+  * Change "kB" to "KB" in format output
15
+  * Remove support for Node.js 0.6
16
+  * Remove support for ComponentJS
17
+
18
+2.5.0 / 2017-03-24
19
+==================
20
+
21
+  * Add option "unit"
22
+
23
+2.4.0 / 2016-06-01
24
+==================
25
+
26
+  * Add option "unitSeparator"
27
+
28
+2.3.0 / 2016-02-15
29
+==================
30
+
31
+  * Drop partial bytes on all parsed units
32
+  * Fix non-finite numbers to `.format` to return `null`
33
+  * Fix parsing byte string that looks like hex
34
+  * perf: hoist regular expressions
35
+
36
+2.2.0 / 2015-11-13
37
+==================
38
+
39
+  * add option "decimalPlaces"
40
+  * add option "fixedDecimals"
41
+
42
+2.1.0 / 2015-05-21
43
+==================
44
+
45
+  * add `.format` export
46
+  * add `.parse` export
47
+
48
+2.0.2 / 2015-05-20
49
+==================
50
+
51
+  * remove map recreation
52
+  * remove unnecessary object construction
53
+
54
+2.0.1 / 2015-05-07
55
+==================
56
+
57
+  * fix browserify require
58
+  * remove node.extend dependency
59
+
60
+2.0.0 / 2015-04-12
61
+==================
62
+
63
+  * add option "case"
64
+  * add option "thousandsSeparator"
65
+  * return "null" on invalid parse input
66
+  * support proper round-trip: bytes(bytes(num)) === num
67
+  * units no longer case sensitive when parsing
68
+
69
+1.0.0 / 2014-05-05
70
+==================
71
+
72
+ * add negative support. fixes #6
73
+
74
+0.3.0 / 2014-03-19
75
+==================
76
+
77
+ * added terabyte support
78
+
79
+0.2.1 / 2013-04-01
80
+==================
81
+
82
+  * add .component
83
+
84
+0.2.0 / 2012-10-28
85
+==================
86
+
87
+  * bytes(200).should.eql('200b')
88
+
89
+0.1.0 / 2012-07-04
90
+==================
91
+
92
+  * add bytes to string conversion [yields]

+ 23
- 0
node_modules/bytes/LICENSE Ver arquivo

@@ -0,0 +1,23 @@
1
+(The MIT License)
2
+
3
+Copyright (c) 2012-2014 TJ Holowaychuk <tj@vision-media.ca>
4
+Copyright (c) 2015 Jed Watson <jed.watson@me.com>
5
+
6
+Permission is hereby granted, free of charge, to any person obtaining
7
+a copy of this software and associated documentation files (the
8
+'Software'), to deal in the Software without restriction, including
9
+without limitation the rights to use, copy, modify, merge, publish,
10
+distribute, sublicense, and/or sell copies of the Software, and to
11
+permit persons to whom the Software is furnished to do so, subject to
12
+the following conditions:
13
+
14
+The above copyright notice and this permission notice shall be
15
+included in all copies or substantial portions of the Software.
16
+
17
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
18
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
19
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
20
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
21
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
22
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
23
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

+ 152
- 0
node_modules/bytes/Readme.md Ver arquivo

@@ -0,0 +1,152 @@
1
+# Bytes utility
2
+
3
+[![NPM Version][npm-image]][npm-url]
4
+[![NPM Downloads][downloads-image]][downloads-url]
5
+[![Build Status][ci-image]][ci-url]
6
+[![Test Coverage][coveralls-image]][coveralls-url]
7
+
8
+Utility to parse a string bytes (ex: `1TB`) to bytes (`1099511627776`) and vice-versa.
9
+
10
+## Installation
11
+
12
+This is a [Node.js](https://nodejs.org/en/) module available through the
13
+[npm registry](https://www.npmjs.com/). Installation is done using the
14
+[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally):
15
+
16
+```bash
17
+$ npm install bytes
18
+```
19
+
20
+## Usage
21
+
22
+```js
23
+var bytes = require('bytes');
24
+```
25
+
26
+#### bytes(number|string value, [options]): number|string|null
27
+
28
+Default export function. Delegates to either `bytes.format` or `bytes.parse` based on the type of `value`.
29
+
30
+**Arguments**
31
+
32
+| Name    | Type     | Description        |
33
+|---------|----------|--------------------|
34
+| value   | `number`|`string` | Number value to format or string value to parse |
35
+| options | `Object` | Conversion options for `format` |
36
+
37
+**Returns**
38
+
39
+| Name    | Type             | Description                                     |
40
+|---------|------------------|-------------------------------------------------|
41
+| results | `string`|`number`|`null` | Return null upon error. Numeric value in bytes, or string value otherwise. |
42
+
43
+**Example**
44
+
45
+```js
46
+bytes(1024);
47
+// output: '1KB'
48
+
49
+bytes('1KB');
50
+// output: 1024
51
+```
52
+
53
+#### bytes.format(number value, [options]): string|null
54
+
55
+Format the given value in bytes into a string. If the value is negative, it is kept as such. If it is a float, it is
56
+ rounded.
57
+
58
+**Arguments**
59
+
60
+| Name    | Type     | Description        |
61
+|---------|----------|--------------------|
62
+| value   | `number` | Value in bytes     |
63
+| options | `Object` | Conversion options |
64
+
65
+**Options**
66
+
67
+| Property          | Type   | Description                                                                             |
68
+|-------------------|--------|-----------------------------------------------------------------------------------------|
69
+| decimalPlaces | `number`|`null` | Maximum number of decimal places to include in output. Default value to `2`. |
70
+| fixedDecimals | `boolean`|`null` | Whether to always display the maximum number of decimal places. Default value to `false` |
71
+| thousandsSeparator | `string`|`null` | Example of values: `' '`, `','` and `'.'`... Default value to `''`. |
72
+| unit | `string`|`null` | The unit in which the result will be returned (B/KB/MB/GB/TB). Default value to `''` (which means auto detect). |
73
+| unitSeparator | `string`|`null` | Separator to use between number and unit. Default value to `''`. |
74
+
75
+**Returns**
76
+
77
+| Name    | Type             | Description                                     |
78
+|---------|------------------|-------------------------------------------------|
79
+| results | `string`|`null` | Return null upon error. String value otherwise. |
80
+
81
+**Example**
82
+
83
+```js
84
+bytes.format(1024);
85
+// output: '1KB'
86
+
87
+bytes.format(1000);
88
+// output: '1000B'
89
+
90
+bytes.format(1000, {thousandsSeparator: ' '});
91
+// output: '1 000B'
92
+
93
+bytes.format(1024 * 1.7, {decimalPlaces: 0});
94
+// output: '2KB'
95
+
96
+bytes.format(1024, {unitSeparator: ' '});
97
+// output: '1 KB'
98
+```
99
+
100
+#### bytes.parse(string|number value): number|null
101
+
102
+Parse the string value into an integer in bytes. If no unit is given, or `value`
103
+is a number, it is assumed the value is in bytes.
104
+
105
+Supported units and abbreviations are as follows and are case-insensitive:
106
+
107
+  * `b` for bytes
108
+  * `kb` for kilobytes
109
+  * `mb` for megabytes
110
+  * `gb` for gigabytes
111
+  * `tb` for terabytes
112
+  * `pb` for petabytes
113
+
114
+The units are in powers of two, not ten. This means 1kb = 1024b according to this parser.
115
+
116
+**Arguments**
117
+
118
+| Name          | Type   | Description        |
119
+|---------------|--------|--------------------|
120
+| value   | `string`|`number` | String to parse, or number in bytes.   |
121
+
122
+**Returns**
123
+
124
+| Name    | Type        | Description             |
125
+|---------|-------------|-------------------------|
126
+| results | `number`|`null` | Return null upon error. Value in bytes otherwise. |
127
+
128
+**Example**
129
+
130
+```js
131
+bytes.parse('1KB');
132
+// output: 1024
133
+
134
+bytes.parse('1024');
135
+// output: 1024
136
+
137
+bytes.parse(1024);
138
+// output: 1024
139
+```
140
+
141
+## License
142
+
143
+[MIT](LICENSE)
144
+
145
+[ci-image]: https://badgen.net/github/checks/visionmedia/bytes.js/master?label=ci
146
+[ci-url]: https://github.com/visionmedia/bytes.js/actions?query=workflow%3Aci
147
+[coveralls-image]: https://badgen.net/coveralls/c/github/visionmedia/bytes.js/master
148
+[coveralls-url]: https://coveralls.io/r/visionmedia/bytes.js?branch=master
149
+[downloads-image]: https://badgen.net/npm/dm/bytes
150
+[downloads-url]: https://npmjs.org/package/bytes
151
+[npm-image]: https://badgen.net/npm/v/bytes
152
+[npm-url]: https://npmjs.org/package/bytes

+ 166
- 0
node_modules/bytes/index.js Ver arquivo

@@ -0,0 +1,166 @@
1
+/*!
2
+ * bytes
3
+ * Copyright(c) 2012-2014 TJ Holowaychuk
4
+ * Copyright(c) 2015 Jed Watson
5
+ * MIT Licensed
6
+ */
7
+
8
+'use strict';
9
+
10
+/**
11
+ * Module exports.
12
+ * @public
13
+ */
14
+
15
+module.exports = bytes;
16
+module.exports.format = format;
17
+module.exports.parse = parse;
18
+
19
+/**
20
+ * Module variables.
21
+ * @private
22
+ */
23
+
24
+var formatThousandsRegExp = /\B(?=(\d{3})+(?!\d))/g;
25
+
26
+var formatDecimalsRegExp = /(?:\.0*|(\.[^0]+)0+)$/;
27
+
28
+var map = {
29
+  b:  1,
30
+  kb: 1 << 10,
31
+  mb: 1 << 20,
32
+  gb: 1 << 30,
33
+  tb: Math.pow(1024, 4),
34
+  pb: Math.pow(1024, 5),
35
+};
36
+
37
+var parseRegExp = /^((-|\+)?(\d+(?:\.\d+)?)) *(kb|mb|gb|tb|pb)$/i;
38
+
39
+/**
40
+ * Convert the given value in bytes into a string or parse to string to an integer in bytes.
41
+ *
42
+ * @param {string|number} value
43
+ * @param {{
44
+ *  case: [string],
45
+ *  decimalPlaces: [number]
46
+ *  fixedDecimals: [boolean]
47
+ *  thousandsSeparator: [string]
48
+ *  unitSeparator: [string]
49
+ *  }} [options] bytes options.
50
+ *
51
+ * @returns {string|number|null}
52
+ */
53
+
54
+function bytes(value, options) {
55
+  if (typeof value === 'string') {
56
+    return parse(value);
57
+  }
58
+
59
+  if (typeof value === 'number') {
60
+    return format(value, options);
61
+  }
62
+
63
+  return null;
64
+}
65
+
66
+/**
67
+ * Format the given value in bytes into a string.
68
+ *
69
+ * If the value is negative, it is kept as such. If it is a float,
70
+ * it is rounded.
71
+ *
72
+ * @param {number} value
73
+ * @param {object} [options]
74
+ * @param {number} [options.decimalPlaces=2]
75
+ * @param {number} [options.fixedDecimals=false]
76
+ * @param {string} [options.thousandsSeparator=]
77
+ * @param {string} [options.unit=]
78
+ * @param {string} [options.unitSeparator=]
79
+ *
80
+ * @returns {string|null}
81
+ * @public
82
+ */
83
+
84
+function format(value, options) {
85
+  if (!Number.isFinite(value)) {
86
+    return null;
87
+  }
88
+
89
+  var mag = Math.abs(value);
90
+  var thousandsSeparator = (options && options.thousandsSeparator) || '';
91
+  var unitSeparator = (options && options.unitSeparator) || '';
92
+  var decimalPlaces = (options && options.decimalPlaces !== undefined) ? options.decimalPlaces : 2;
93
+  var fixedDecimals = Boolean(options && options.fixedDecimals);
94
+  var unit = (options && options.unit) || '';
95
+
96
+  if (!unit || !map[unit.toLowerCase()]) {
97
+    if (mag >= map.pb) {
98
+      unit = 'PB';
99
+    } else if (mag >= map.tb) {
100
+      unit = 'TB';
101
+    } else if (mag >= map.gb) {
102
+      unit = 'GB';
103
+    } else if (mag >= map.mb) {
104
+      unit = 'MB';
105
+    } else if (mag >= map.kb) {
106
+      unit = 'KB';
107
+    } else {
108
+      unit = 'B';
109
+    }
110
+  }
111
+
112
+  var val = value / map[unit.toLowerCase()];
113
+  var str = val.toFixed(decimalPlaces);
114
+
115
+  if (!fixedDecimals) {
116
+    str = str.replace(formatDecimalsRegExp, '$1');
117
+  }
118
+
119
+  if (thousandsSeparator) {
120
+    str = str.split('.').map(function (s, i) {
121
+      return i === 0
122
+        ? s.replace(formatThousandsRegExp, thousandsSeparator)
123
+        : s
124
+    }).join('.');
125
+  }
126
+
127
+  return str + unitSeparator + unit;
128
+}
129
+
130
+/**
131
+ * Parse the string value into an integer in bytes.
132
+ *
133
+ * If no unit is given, it is assumed the value is in bytes.
134
+ *
135
+ * @param {number|string} val
136
+ *
137
+ * @returns {number|null}
138
+ * @public
139
+ */
140
+
141
+function parse(val) {
142
+  if (typeof val === 'number' && !isNaN(val)) {
143
+    return val;
144
+  }
145
+
146
+  if (typeof val !== 'string') {
147
+    return null;
148
+  }
149
+
150
+  // Test if the string passed is valid
151
+  var results = parseRegExp.exec(val);
152
+  var floatValue;
153
+  var unit = 'b';
154
+
155
+  if (!results) {
156
+    // Nothing could be extracted from the given string
157
+    floatValue = parseInt(val, 10);
158
+    unit = 'b'
159
+  } else {
160
+    // Retrieve the value and the unit
161
+    floatValue = parseFloat(results[1]);
162
+    unit = results[4].toLowerCase();
163
+  }
164
+
165
+  return Math.floor(map[unit] * floatValue);
166
+}

+ 42
- 0
node_modules/bytes/package.json Ver arquivo

@@ -0,0 +1,42 @@
1
+{
2
+  "name": "bytes",
3
+  "description": "Utility to parse a string bytes to bytes and vice-versa",
4
+  "version": "3.1.1",
5
+  "author": "TJ Holowaychuk <tj@vision-media.ca> (http://tjholowaychuk.com)",
6
+  "contributors": [
7
+    "Jed Watson <jed.watson@me.com>",
8
+    "Théo FIDRY <theo.fidry@gmail.com>"
9
+  ],
10
+  "license": "MIT",
11
+  "keywords": [
12
+    "byte",
13
+    "bytes",
14
+    "utility",
15
+    "parse",
16
+    "parser",
17
+    "convert",
18
+    "converter"
19
+  ],
20
+  "repository": "visionmedia/bytes.js",
21
+  "devDependencies": {
22
+    "eslint": "7.32.0",
23
+    "eslint-plugin-markdown": "2.2.1",
24
+    "mocha": "9.1.3",
25
+    "nyc": "15.1.0"
26
+  },
27
+  "files": [
28
+    "History.md",
29
+    "LICENSE",
30
+    "Readme.md",
31
+    "index.js"
32
+  ],
33
+  "engines": {
34
+    "node": ">= 0.8"
35
+  },
36
+  "scripts": {
37
+    "lint": "eslint .",
38
+    "test": "mocha --check-leaks --reporter spec",
39
+    "test-ci": "nyc --reporter=lcov --reporter=text npm test",
40
+    "test-cov": "nyc --reporter=html --reporter=text npm test"
41
+  }
42
+}

+ 60
- 0
node_modules/content-disposition/HISTORY.md Ver arquivo

@@ -0,0 +1,60 @@
1
+0.5.4 / 2021-12-10
2
+==================
3
+
4
+  * deps: safe-buffer@5.2.1
5
+
6
+0.5.3 / 2018-12-17
7
+==================
8
+
9
+  * Use `safe-buffer` for improved Buffer API
10
+
11
+0.5.2 / 2016-12-08
12
+==================
13
+
14
+  * Fix `parse` to accept any linear whitespace character
15
+
16
+0.5.1 / 2016-01-17
17
+==================
18
+
19
+  * perf: enable strict mode
20
+
21
+0.5.0 / 2014-10-11
22
+==================
23
+
24
+  * Add `parse` function
25
+
26
+0.4.0 / 2014-09-21
27
+==================
28
+
29
+  * Expand non-Unicode `filename` to the full ISO-8859-1 charset
30
+
31
+0.3.0 / 2014-09-20
32
+==================
33
+
34
+  * Add `fallback` option
35
+  * Add `type` option
36
+
37
+0.2.0 / 2014-09-19
38
+==================
39
+
40
+  * Reduce ambiguity of file names with hex escape in buggy browsers
41
+
42
+0.1.2 / 2014-09-19
43
+==================
44
+
45
+  * Fix periodic invalid Unicode filename header
46
+
47
+0.1.1 / 2014-09-19
48
+==================
49
+
50
+  * Fix invalid characters appearing in `filename*` parameter
51
+
52
+0.1.0 / 2014-09-18
53
+==================
54
+
55
+  * Make the `filename` argument optional
56
+
57
+0.0.0 / 2014-09-18
58
+==================
59
+
60
+  * Initial release

+ 22
- 0
node_modules/content-disposition/LICENSE Ver arquivo

@@ -0,0 +1,22 @@
1
+(The MIT License)
2
+
3
+Copyright (c) 2014-2017 Douglas Christopher Wilson
4
+
5
+Permission is hereby granted, free of charge, to any person obtaining
6
+a copy of this software and associated documentation files (the
7
+'Software'), to deal in the Software without restriction, including
8
+without limitation the rights to use, copy, modify, merge, publish,
9
+distribute, sublicense, and/or sell copies of the Software, and to
10
+permit persons to whom the Software is furnished to do so, subject to
11
+the following conditions:
12
+
13
+The above copyright notice and this permission notice shall be
14
+included in all copies or substantial portions of the Software.
15
+
16
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
17
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
19
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
20
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
21
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
22
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

+ 142
- 0
node_modules/content-disposition/README.md Ver arquivo

@@ -0,0 +1,142 @@
1
+# content-disposition
2
+
3
+[![NPM Version][npm-image]][npm-url]
4
+[![NPM Downloads][downloads-image]][downloads-url]
5
+[![Node.js Version][node-version-image]][node-version-url]
6
+[![Build Status][github-actions-ci-image]][github-actions-ci-url]
7
+[![Test Coverage][coveralls-image]][coveralls-url]
8
+
9
+Create and parse HTTP `Content-Disposition` header
10
+
11
+## Installation
12
+
13
+```sh
14
+$ npm install content-disposition
15
+```
16
+
17
+## API
18
+
19
+```js
20
+var contentDisposition = require('content-disposition')
21
+```
22
+
23
+### contentDisposition(filename, options)
24
+
25
+Create an attachment `Content-Disposition` header value using the given file name,
26
+if supplied. The `filename` is optional and if no file name is desired, but you
27
+want to specify `options`, set `filename` to `undefined`.
28
+
29
+```js
30
+res.setHeader('Content-Disposition', contentDisposition('∫ maths.pdf'))
31
+```
32
+
33
+**note** HTTP headers are of the ISO-8859-1 character set. If you are writing this
34
+header through a means different from `setHeader` in Node.js, you'll want to specify
35
+the `'binary'` encoding in Node.js.
36
+
37
+#### Options
38
+
39
+`contentDisposition` accepts these properties in the options object.
40
+
41
+##### fallback
42
+
43
+If the `filename` option is outside ISO-8859-1, then the file name is actually
44
+stored in a supplemental field for clients that support Unicode file names and
45
+a ISO-8859-1 version of the file name is automatically generated.
46
+
47
+This specifies the ISO-8859-1 file name to override the automatic generation or
48
+disables the generation all together, defaults to `true`.
49
+
50
+  - A string will specify the ISO-8859-1 file name to use in place of automatic
51
+    generation.
52
+  - `false` will disable including a ISO-8859-1 file name and only include the
53
+    Unicode version (unless the file name is already ISO-8859-1).
54
+  - `true` will enable automatic generation if the file name is outside ISO-8859-1.
55
+
56
+If the `filename` option is ISO-8859-1 and this option is specified and has a
57
+different value, then the `filename` option is encoded in the extended field
58
+and this set as the fallback field, even though they are both ISO-8859-1.
59
+
60
+##### type
61
+
62
+Specifies the disposition type, defaults to `"attachment"`. This can also be
63
+`"inline"`, or any other value (all values except inline are treated like
64
+`attachment`, but can convey additional information if both parties agree to
65
+it). The type is normalized to lower-case.
66
+
67
+### contentDisposition.parse(string)
68
+
69
+```js
70
+var disposition = contentDisposition.parse('attachment; filename="EURO rates.txt"; filename*=UTF-8\'\'%e2%82%ac%20rates.txt')
71
+```
72
+
73
+Parse a `Content-Disposition` header string. This automatically handles extended
74
+("Unicode") parameters by decoding them and providing them under the standard
75
+parameter name. This will return an object with the following properties (examples
76
+are shown for the string `'attachment; filename="EURO rates.txt"; filename*=UTF-8\'\'%e2%82%ac%20rates.txt'`):
77
+
78
+ - `type`: The disposition type (always lower case). Example: `'attachment'`
79
+
80
+ - `parameters`: An object of the parameters in the disposition (name of parameter
81
+   always lower case and extended versions replace non-extended versions). Example:
82
+   `{filename: "€ rates.txt"}`
83
+
84
+## Examples
85
+
86
+### Send a file for download
87
+
88
+```js
89
+var contentDisposition = require('content-disposition')
90
+var destroy = require('destroy')
91
+var fs = require('fs')
92
+var http = require('http')
93
+var onFinished = require('on-finished')
94
+
95
+var filePath = '/path/to/public/plans.pdf'
96
+
97
+http.createServer(function onRequest (req, res) {
98
+  // set headers
99
+  res.setHeader('Content-Type', 'application/pdf')
100
+  res.setHeader('Content-Disposition', contentDisposition(filePath))
101
+
102
+  // send file
103
+  var stream = fs.createReadStream(filePath)
104
+  stream.pipe(res)
105
+  onFinished(res, function () {
106
+    destroy(stream)
107
+  })
108
+})
109
+```
110
+
111
+## Testing
112
+
113
+```sh
114
+$ npm test
115
+```
116
+
117
+## References
118
+
119
+- [RFC 2616: Hypertext Transfer Protocol -- HTTP/1.1][rfc-2616]
120
+- [RFC 5987: Character Set and Language Encoding for Hypertext Transfer Protocol (HTTP) Header Field Parameters][rfc-5987]
121
+- [RFC 6266: Use of the Content-Disposition Header Field in the Hypertext Transfer Protocol (HTTP)][rfc-6266]
122
+- [Test Cases for HTTP Content-Disposition header field (RFC 6266) and the Encodings defined in RFCs 2047, 2231 and 5987][tc-2231]
123
+
124
+[rfc-2616]: https://tools.ietf.org/html/rfc2616
125
+[rfc-5987]: https://tools.ietf.org/html/rfc5987
126
+[rfc-6266]: https://tools.ietf.org/html/rfc6266
127
+[tc-2231]: http://greenbytes.de/tech/tc2231/
128
+
129
+## License
130
+
131
+[MIT](LICENSE)
132
+
133
+[npm-image]: https://img.shields.io/npm/v/content-disposition.svg
134
+[npm-url]: https://npmjs.org/package/content-disposition
135
+[node-version-image]: https://img.shields.io/node/v/content-disposition.svg
136
+[node-version-url]: https://nodejs.org/en/download
137
+[coveralls-image]: https://img.shields.io/coveralls/jshttp/content-disposition.svg
138
+[coveralls-url]: https://coveralls.io/r/jshttp/content-disposition?branch=master
139
+[downloads-image]: https://img.shields.io/npm/dm/content-disposition.svg
140
+[downloads-url]: https://npmjs.org/package/content-disposition
141
+[github-actions-ci-image]: https://img.shields.io/github/workflow/status/jshttp/content-disposition/ci/master?label=ci
142
+[github-actions-ci-url]: https://github.com/jshttp/content-disposition?query=workflow%3Aci

+ 458
- 0
node_modules/content-disposition/index.js Ver arquivo

@@ -0,0 +1,458 @@
1
+/*!
2
+ * content-disposition
3
+ * Copyright(c) 2014-2017 Douglas Christopher Wilson
4
+ * MIT Licensed
5
+ */
6
+
7
+'use strict'
8
+
9
+/**
10
+ * Module exports.
11
+ * @public
12
+ */
13
+
14
+module.exports = contentDisposition
15
+module.exports.parse = parse
16
+
17
+/**
18
+ * Module dependencies.
19
+ * @private
20
+ */
21
+
22
+var basename = require('path').basename
23
+var Buffer = require('safe-buffer').Buffer
24
+
25
+/**
26
+ * RegExp to match non attr-char, *after* encodeURIComponent (i.e. not including "%")
27
+ * @private
28
+ */
29
+
30
+var ENCODE_URL_ATTR_CHAR_REGEXP = /[\x00-\x20"'()*,/:;<=>?@[\\\]{}\x7f]/g // eslint-disable-line no-control-regex
31
+
32
+/**
33
+ * RegExp to match percent encoding escape.
34
+ * @private
35
+ */
36
+
37
+var HEX_ESCAPE_REGEXP = /%[0-9A-Fa-f]{2}/
38
+var HEX_ESCAPE_REPLACE_REGEXP = /%([0-9A-Fa-f]{2})/g
39
+
40
+/**
41
+ * RegExp to match non-latin1 characters.
42
+ * @private
43
+ */
44
+
45
+var NON_LATIN1_REGEXP = /[^\x20-\x7e\xa0-\xff]/g
46
+
47
+/**
48
+ * RegExp to match quoted-pair in RFC 2616
49
+ *
50
+ * quoted-pair = "\" CHAR
51
+ * CHAR        = <any US-ASCII character (octets 0 - 127)>
52
+ * @private
53
+ */
54
+
55
+var QESC_REGEXP = /\\([\u0000-\u007f])/g // eslint-disable-line no-control-regex
56
+
57
+/**
58
+ * RegExp to match chars that must be quoted-pair in RFC 2616
59
+ * @private
60
+ */
61
+
62
+var QUOTE_REGEXP = /([\\"])/g
63
+
64
+/**
65
+ * RegExp for various RFC 2616 grammar
66
+ *
67
+ * parameter     = token "=" ( token | quoted-string )
68
+ * token         = 1*<any CHAR except CTLs or separators>
69
+ * separators    = "(" | ")" | "<" | ">" | "@"
70
+ *               | "," | ";" | ":" | "\" | <">
71
+ *               | "/" | "[" | "]" | "?" | "="
72
+ *               | "{" | "}" | SP | HT
73
+ * quoted-string = ( <"> *(qdtext | quoted-pair ) <"> )
74
+ * qdtext        = <any TEXT except <">>
75
+ * quoted-pair   = "\" CHAR
76
+ * CHAR          = <any US-ASCII character (octets 0 - 127)>
77
+ * TEXT          = <any OCTET except CTLs, but including LWS>
78
+ * LWS           = [CRLF] 1*( SP | HT )
79
+ * CRLF          = CR LF
80
+ * CR            = <US-ASCII CR, carriage return (13)>
81
+ * LF            = <US-ASCII LF, linefeed (10)>
82
+ * SP            = <US-ASCII SP, space (32)>
83
+ * HT            = <US-ASCII HT, horizontal-tab (9)>
84
+ * CTL           = <any US-ASCII control character (octets 0 - 31) and DEL (127)>
85
+ * OCTET         = <any 8-bit sequence of data>
86
+ * @private
87
+ */
88
+
89
+var PARAM_REGEXP = /;[\x09\x20]*([!#$%&'*+.0-9A-Z^_`a-z|~-]+)[\x09\x20]*=[\x09\x20]*("(?:[\x20!\x23-\x5b\x5d-\x7e\x80-\xff]|\\[\x20-\x7e])*"|[!#$%&'*+.0-9A-Z^_`a-z|~-]+)[\x09\x20]*/g // eslint-disable-line no-control-regex
90
+var TEXT_REGEXP = /^[\x20-\x7e\x80-\xff]+$/
91
+var TOKEN_REGEXP = /^[!#$%&'*+.0-9A-Z^_`a-z|~-]+$/
92
+
93
+/**
94
+ * RegExp for various RFC 5987 grammar
95
+ *
96
+ * ext-value     = charset  "'" [ language ] "'" value-chars
97
+ * charset       = "UTF-8" / "ISO-8859-1" / mime-charset
98
+ * mime-charset  = 1*mime-charsetc
99
+ * mime-charsetc = ALPHA / DIGIT
100
+ *               / "!" / "#" / "$" / "%" / "&"
101
+ *               / "+" / "-" / "^" / "_" / "`"
102
+ *               / "{" / "}" / "~"
103
+ * language      = ( 2*3ALPHA [ extlang ] )
104
+ *               / 4ALPHA
105
+ *               / 5*8ALPHA
106
+ * extlang       = *3( "-" 3ALPHA )
107
+ * value-chars   = *( pct-encoded / attr-char )
108
+ * pct-encoded   = "%" HEXDIG HEXDIG
109
+ * attr-char     = ALPHA / DIGIT
110
+ *               / "!" / "#" / "$" / "&" / "+" / "-" / "."
111
+ *               / "^" / "_" / "`" / "|" / "~"
112
+ * @private
113
+ */
114
+
115
+var EXT_VALUE_REGEXP = /^([A-Za-z0-9!#$%&+\-^_`{}~]+)'(?:[A-Za-z]{2,3}(?:-[A-Za-z]{3}){0,3}|[A-Za-z]{4,8}|)'((?:%[0-9A-Fa-f]{2}|[A-Za-z0-9!#$&+.^_`|~-])+)$/
116
+
117
+/**
118
+ * RegExp for various RFC 6266 grammar
119
+ *
120
+ * disposition-type = "inline" | "attachment" | disp-ext-type
121
+ * disp-ext-type    = token
122
+ * disposition-parm = filename-parm | disp-ext-parm
123
+ * filename-parm    = "filename" "=" value
124
+ *                  | "filename*" "=" ext-value
125
+ * disp-ext-parm    = token "=" value
126
+ *                  | ext-token "=" ext-value
127
+ * ext-token        = <the characters in token, followed by "*">
128
+ * @private
129
+ */
130
+
131
+var DISPOSITION_TYPE_REGEXP = /^([!#$%&'*+.0-9A-Z^_`a-z|~-]+)[\x09\x20]*(?:$|;)/ // eslint-disable-line no-control-regex
132
+
133
+/**
134
+ * Create an attachment Content-Disposition header.
135
+ *
136
+ * @param {string} [filename]
137
+ * @param {object} [options]
138
+ * @param {string} [options.type=attachment]
139
+ * @param {string|boolean} [options.fallback=true]
140
+ * @return {string}
141
+ * @public
142
+ */
143
+
144
+function contentDisposition (filename, options) {
145
+  var opts = options || {}
146
+
147
+  // get type
148
+  var type = opts.type || 'attachment'
149
+
150
+  // get parameters
151
+  var params = createparams(filename, opts.fallback)
152
+
153
+  // format into string
154
+  return format(new ContentDisposition(type, params))
155
+}
156
+
157
+/**
158
+ * Create parameters object from filename and fallback.
159
+ *
160
+ * @param {string} [filename]
161
+ * @param {string|boolean} [fallback=true]
162
+ * @return {object}
163
+ * @private
164
+ */
165
+
166
+function createparams (filename, fallback) {
167
+  if (filename === undefined) {
168
+    return
169
+  }
170
+
171
+  var params = {}
172
+
173
+  if (typeof filename !== 'string') {
174
+    throw new TypeError('filename must be a string')
175
+  }
176
+
177
+  // fallback defaults to true
178
+  if (fallback === undefined) {
179
+    fallback = true
180
+  }
181
+
182
+  if (typeof fallback !== 'string' && typeof fallback !== 'boolean') {
183
+    throw new TypeError('fallback must be a string or boolean')
184
+  }
185
+
186
+  if (typeof fallback === 'string' && NON_LATIN1_REGEXP.test(fallback)) {
187
+    throw new TypeError('fallback must be ISO-8859-1 string')
188
+  }
189
+
190
+  // restrict to file base name
191
+  var name = basename(filename)
192
+
193
+  // determine if name is suitable for quoted string
194
+  var isQuotedString = TEXT_REGEXP.test(name)
195
+
196
+  // generate fallback name
197
+  var fallbackName = typeof fallback !== 'string'
198
+    ? fallback && getlatin1(name)
199
+    : basename(fallback)
200
+  var hasFallback = typeof fallbackName === 'string' && fallbackName !== name
201
+
202
+  // set extended filename parameter
203
+  if (hasFallback || !isQuotedString || HEX_ESCAPE_REGEXP.test(name)) {
204
+    params['filename*'] = name
205
+  }
206
+
207
+  // set filename parameter
208
+  if (isQuotedString || hasFallback) {
209
+    params.filename = hasFallback
210
+      ? fallbackName
211
+      : name
212
+  }
213
+
214
+  return params
215
+}
216
+
217
+/**
218
+ * Format object to Content-Disposition header.
219
+ *
220
+ * @param {object} obj
221
+ * @param {string} obj.type
222
+ * @param {object} [obj.parameters]
223
+ * @return {string}
224
+ * @private
225
+ */
226
+
227
+function format (obj) {
228
+  var parameters = obj.parameters
229
+  var type = obj.type
230
+
231
+  if (!type || typeof type !== 'string' || !TOKEN_REGEXP.test(type)) {
232
+    throw new TypeError('invalid type')
233
+  }
234
+
235
+  // start with normalized type
236
+  var string = String(type).toLowerCase()
237
+
238
+  // append parameters
239
+  if (parameters && typeof parameters === 'object') {
240
+    var param
241
+    var params = Object.keys(parameters).sort()
242
+
243
+    for (var i = 0; i < params.length; i++) {
244
+      param = params[i]
245
+
246
+      var val = param.substr(-1) === '*'
247
+        ? ustring(parameters[param])
248
+        : qstring(parameters[param])
249
+
250
+      string += '; ' + param + '=' + val
251
+    }
252
+  }
253
+
254
+  return string
255
+}
256
+
257
+/**
258
+ * Decode a RFC 5987 field value (gracefully).
259
+ *
260
+ * @param {string} str
261
+ * @return {string}
262
+ * @private
263
+ */
264
+
265
+function decodefield (str) {
266
+  var match = EXT_VALUE_REGEXP.exec(str)
267
+
268
+  if (!match) {
269
+    throw new TypeError('invalid extended field value')
270
+  }
271
+
272
+  var charset = match[1].toLowerCase()
273
+  var encoded = match[2]
274
+  var value
275
+
276
+  // to binary string
277
+  var binary = encoded.replace(HEX_ESCAPE_REPLACE_REGEXP, pdecode)
278
+
279
+  switch (charset) {
280
+    case 'iso-8859-1':
281
+      value = getlatin1(binary)
282
+      break
283
+    case 'utf-8':
284
+      value = Buffer.from(binary, 'binary').toString('utf8')
285
+      break
286
+    default:
287
+      throw new TypeError('unsupported charset in extended field')
288
+  }
289
+
290
+  return value
291
+}
292
+
293
+/**
294
+ * Get ISO-8859-1 version of string.
295
+ *
296
+ * @param {string} val
297
+ * @return {string}
298
+ * @private
299
+ */
300
+
301
+function getlatin1 (val) {
302
+  // simple Unicode -> ISO-8859-1 transformation
303
+  return String(val).replace(NON_LATIN1_REGEXP, '?')
304
+}
305
+
306
+/**
307
+ * Parse Content-Disposition header string.
308
+ *
309
+ * @param {string} string
310
+ * @return {object}
311
+ * @public
312
+ */
313
+
314
+function parse (string) {
315
+  if (!string || typeof string !== 'string') {
316
+    throw new TypeError('argument string is required')
317
+  }
318
+
319
+  var match = DISPOSITION_TYPE_REGEXP.exec(string)
320
+
321
+  if (!match) {
322
+    throw new TypeError('invalid type format')
323
+  }
324
+
325
+  // normalize type
326
+  var index = match[0].length
327
+  var type = match[1].toLowerCase()
328
+
329
+  var key
330
+  var names = []
331
+  var params = {}
332
+  var value
333
+
334
+  // calculate index to start at
335
+  index = PARAM_REGEXP.lastIndex = match[0].substr(-1) === ';'
336
+    ? index - 1
337
+    : index
338
+
339
+  // match parameters
340
+  while ((match = PARAM_REGEXP.exec(string))) {
341
+    if (match.index !== index) {
342
+      throw new TypeError('invalid parameter format')
343
+    }
344
+
345
+    index += match[0].length
346
+    key = match[1].toLowerCase()
347
+    value = match[2]
348
+
349
+    if (names.indexOf(key) !== -1) {
350
+      throw new TypeError('invalid duplicate parameter')
351
+    }
352
+
353
+    names.push(key)
354
+
355
+    if (key.indexOf('*') + 1 === key.length) {
356
+      // decode extended value
357
+      key = key.slice(0, -1)
358
+      value = decodefield(value)
359
+
360
+      // overwrite existing value
361
+      params[key] = value
362
+      continue
363
+    }
364
+
365
+    if (typeof params[key] === 'string') {
366
+      continue
367
+    }
368
+
369
+    if (value[0] === '"') {
370
+      // remove quotes and escapes
371
+      value = value
372
+        .substr(1, value.length - 2)
373
+        .replace(QESC_REGEXP, '$1')
374
+    }
375
+
376
+    params[key] = value
377
+  }
378
+
379
+  if (index !== -1 && index !== string.length) {
380
+    throw new TypeError('invalid parameter format')
381
+  }
382
+
383
+  return new ContentDisposition(type, params)
384
+}
385
+
386
+/**
387
+ * Percent decode a single character.
388
+ *
389
+ * @param {string} str
390
+ * @param {string} hex
391
+ * @return {string}
392
+ * @private
393
+ */
394
+
395
+function pdecode (str, hex) {
396
+  return String.fromCharCode(parseInt(hex, 16))
397
+}
398
+
399
+/**
400
+ * Percent encode a single character.
401
+ *
402
+ * @param {string} char
403
+ * @return {string}
404
+ * @private
405
+ */
406
+
407
+function pencode (char) {
408
+  return '%' + String(char)
409
+    .charCodeAt(0)
410
+    .toString(16)
411
+    .toUpperCase()
412
+}
413
+
414
+/**
415
+ * Quote a string for HTTP.
416
+ *
417
+ * @param {string} val
418
+ * @return {string}
419
+ * @private
420
+ */
421
+
422
+function qstring (val) {
423
+  var str = String(val)
424
+
425
+  return '"' + str.replace(QUOTE_REGEXP, '\\$1') + '"'
426
+}
427
+
428
+/**
429
+ * Encode a Unicode string for HTTP (RFC 5987).
430
+ *
431
+ * @param {string} val
432
+ * @return {string}
433
+ * @private
434
+ */
435
+
436
+function ustring (val) {
437
+  var str = String(val)
438
+
439
+  // percent encode as UTF-8
440
+  var encoded = encodeURIComponent(str)
441
+    .replace(ENCODE_URL_ATTR_CHAR_REGEXP, pencode)
442
+
443
+  return 'UTF-8\'\'' + encoded
444
+}
445
+
446
+/**
447
+ * Class for parsed Content-Disposition header for v8 optimization
448
+ *
449
+ * @public
450
+ * @param {string} type
451
+ * @param {object} parameters
452
+ * @constructor
453
+ */
454
+
455
+function ContentDisposition (type, parameters) {
456
+  this.type = type
457
+  this.parameters = parameters
458
+}

+ 44
- 0
node_modules/content-disposition/package.json Ver arquivo

@@ -0,0 +1,44 @@
1
+{
2
+  "name": "content-disposition",
3
+  "description": "Create and parse Content-Disposition header",
4
+  "version": "0.5.4",
5
+  "author": "Douglas Christopher Wilson <doug@somethingdoug.com>",
6
+  "license": "MIT",
7
+  "keywords": [
8
+    "content-disposition",
9
+    "http",
10
+    "rfc6266",
11
+    "res"
12
+  ],
13
+  "repository": "jshttp/content-disposition",
14
+  "dependencies": {
15
+    "safe-buffer": "5.2.1"
16
+  },
17
+  "devDependencies": {
18
+    "deep-equal": "1.0.1",
19
+    "eslint": "7.32.0",
20
+    "eslint-config-standard": "13.0.1",
21
+    "eslint-plugin-import": "2.25.3",
22
+    "eslint-plugin-markdown": "2.2.1",
23
+    "eslint-plugin-node": "11.1.0",
24
+    "eslint-plugin-promise": "5.2.0",
25
+    "eslint-plugin-standard": "4.1.0",
26
+    "istanbul": "0.4.5",
27
+    "mocha": "9.1.3"
28
+  },
29
+  "files": [
30
+    "LICENSE",
31
+    "HISTORY.md",
32
+    "README.md",
33
+    "index.js"
34
+  ],
35
+  "engines": {
36
+    "node": ">= 0.6"
37
+  },
38
+  "scripts": {
39
+    "lint": "eslint .",
40
+    "test": "mocha --reporter spec --bail --check-leaks test/",
41
+    "test-ci": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/",
42
+    "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/"
43
+  }
44
+}

+ 24
- 0
node_modules/content-type/HISTORY.md Ver arquivo

@@ -0,0 +1,24 @@
1
+1.0.4 / 2017-09-11
2
+==================
3
+
4
+  * perf: skip parameter parsing when no parameters
5
+
6
+1.0.3 / 2017-09-10
7
+==================
8
+
9
+  * perf: remove argument reassignment
10
+
11
+1.0.2 / 2016-05-09
12
+==================
13
+
14
+  * perf: enable strict mode
15
+
16
+1.0.1 / 2015-02-13
17
+==================
18
+
19
+  * Improve missing `Content-Type` header error message
20
+
21
+1.0.0 / 2015-02-01
22
+==================
23
+
24
+  * Initial implementation, derived from `media-typer@0.3.0`

+ 22
- 0
node_modules/content-type/LICENSE Ver arquivo

@@ -0,0 +1,22 @@
1
+(The MIT License)
2
+
3
+Copyright (c) 2015 Douglas Christopher Wilson
4
+
5
+Permission is hereby granted, free of charge, to any person obtaining
6
+a copy of this software and associated documentation files (the
7
+'Software'), to deal in the Software without restriction, including
8
+without limitation the rights to use, copy, modify, merge, publish,
9
+distribute, sublicense, and/or sell copies of the Software, and to
10
+permit persons to whom the Software is furnished to do so, subject to
11
+the following conditions:
12
+
13
+The above copyright notice and this permission notice shall be
14
+included in all copies or substantial portions of the Software.
15
+
16
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
17
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
19
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
20
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
21
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
22
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

+ 92
- 0
node_modules/content-type/README.md Ver arquivo

@@ -0,0 +1,92 @@
1
+# content-type
2
+
3
+[![NPM Version][npm-image]][npm-url]
4
+[![NPM Downloads][downloads-image]][downloads-url]
5
+[![Node.js Version][node-version-image]][node-version-url]
6
+[![Build Status][travis-image]][travis-url]
7
+[![Test Coverage][coveralls-image]][coveralls-url]
8
+
9
+Create and parse HTTP Content-Type header according to RFC 7231
10
+
11
+## Installation
12
+
13
+```sh
14
+$ npm install content-type
15
+```
16
+
17
+## API
18
+
19
+```js
20
+var contentType = require('content-type')
21
+```
22
+
23
+### contentType.parse(string)
24
+
25
+```js
26
+var obj = contentType.parse('image/svg+xml; charset=utf-8')
27
+```
28
+
29
+Parse a content type string. This will return an object with the following
30
+properties (examples are shown for the string `'image/svg+xml; charset=utf-8'`):
31
+
32
+ - `type`: The media type (the type and subtype, always lower case).
33
+   Example: `'image/svg+xml'`
34
+
35
+ - `parameters`: An object of the parameters in the media type (name of parameter
36
+   always lower case). Example: `{charset: 'utf-8'}`
37
+
38
+Throws a `TypeError` if the string is missing or invalid.
39
+
40
+### contentType.parse(req)
41
+
42
+```js
43
+var obj = contentType.parse(req)
44
+```
45
+
46
+Parse the `content-type` header from the given `req`. Short-cut for
47
+`contentType.parse(req.headers['content-type'])`.
48
+
49
+Throws a `TypeError` if the `Content-Type` header is missing or invalid.
50
+
51
+### contentType.parse(res)
52
+
53
+```js
54
+var obj = contentType.parse(res)
55
+```
56
+
57
+Parse the `content-type` header set on the given `res`. Short-cut for
58
+`contentType.parse(res.getHeader('content-type'))`.
59
+
60
+Throws a `TypeError` if the `Content-Type` header is missing or invalid.
61
+
62
+### contentType.format(obj)
63
+
64
+```js
65
+var str = contentType.format({type: 'image/svg+xml'})
66
+```
67
+
68
+Format an object into a content type string. This will return a string of the
69
+content type for the given object with the following properties (examples are
70
+shown that produce the string `'image/svg+xml; charset=utf-8'`):
71
+
72
+ - `type`: The media type (will be lower-cased). Example: `'image/svg+xml'`
73
+
74
+ - `parameters`: An object of the parameters in the media type (name of the
75
+   parameter will be lower-cased). Example: `{charset: 'utf-8'}`
76
+
77
+Throws a `TypeError` if the object contains an invalid type or parameter names.
78
+
79
+## License
80
+
81
+[MIT](LICENSE)
82
+
83
+[npm-image]: https://img.shields.io/npm/v/content-type.svg
84
+[npm-url]: https://npmjs.org/package/content-type
85
+[node-version-image]: https://img.shields.io/node/v/content-type.svg
86
+[node-version-url]: http://nodejs.org/download/
87
+[travis-image]: https://img.shields.io/travis/jshttp/content-type/master.svg
88
+[travis-url]: https://travis-ci.org/jshttp/content-type
89
+[coveralls-image]: https://img.shields.io/coveralls/jshttp/content-type/master.svg
90
+[coveralls-url]: https://coveralls.io/r/jshttp/content-type
91
+[downloads-image]: https://img.shields.io/npm/dm/content-type.svg
92
+[downloads-url]: https://npmjs.org/package/content-type

+ 222
- 0
node_modules/content-type/index.js Ver arquivo

@@ -0,0 +1,222 @@
1
+/*!
2
+ * content-type
3
+ * Copyright(c) 2015 Douglas Christopher Wilson
4
+ * MIT Licensed
5
+ */
6
+
7
+'use strict'
8
+
9
+/**
10
+ * RegExp to match *( ";" parameter ) in RFC 7231 sec 3.1.1.1
11
+ *
12
+ * parameter     = token "=" ( token / quoted-string )
13
+ * token         = 1*tchar
14
+ * tchar         = "!" / "#" / "$" / "%" / "&" / "'" / "*"
15
+ *               / "+" / "-" / "." / "^" / "_" / "`" / "|" / "~"
16
+ *               / DIGIT / ALPHA
17
+ *               ; any VCHAR, except delimiters
18
+ * quoted-string = DQUOTE *( qdtext / quoted-pair ) DQUOTE
19
+ * qdtext        = HTAB / SP / %x21 / %x23-5B / %x5D-7E / obs-text
20
+ * obs-text      = %x80-FF
21
+ * quoted-pair   = "\" ( HTAB / SP / VCHAR / obs-text )
22
+ */
23
+var PARAM_REGEXP = /; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g
24
+var TEXT_REGEXP = /^[\u000b\u0020-\u007e\u0080-\u00ff]+$/
25
+var TOKEN_REGEXP = /^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/
26
+
27
+/**
28
+ * RegExp to match quoted-pair in RFC 7230 sec 3.2.6
29
+ *
30
+ * quoted-pair = "\" ( HTAB / SP / VCHAR / obs-text )
31
+ * obs-text    = %x80-FF
32
+ */
33
+var QESC_REGEXP = /\\([\u000b\u0020-\u00ff])/g
34
+
35
+/**
36
+ * RegExp to match chars that must be quoted-pair in RFC 7230 sec 3.2.6
37
+ */
38
+var QUOTE_REGEXP = /([\\"])/g
39
+
40
+/**
41
+ * RegExp to match type in RFC 7231 sec 3.1.1.1
42
+ *
43
+ * media-type = type "/" subtype
44
+ * type       = token
45
+ * subtype    = token
46
+ */
47
+var TYPE_REGEXP = /^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/
48
+
49
+/**
50
+ * Module exports.
51
+ * @public
52
+ */
53
+
54
+exports.format = format
55
+exports.parse = parse
56
+
57
+/**
58
+ * Format object to media type.
59
+ *
60
+ * @param {object} obj
61
+ * @return {string}
62
+ * @public
63
+ */
64
+
65
+function format (obj) {
66
+  if (!obj || typeof obj !== 'object') {
67
+    throw new TypeError('argument obj is required')
68
+  }
69
+
70
+  var parameters = obj.parameters
71
+  var type = obj.type
72
+
73
+  if (!type || !TYPE_REGEXP.test(type)) {
74
+    throw new TypeError('invalid type')
75
+  }
76
+
77
+  var string = type
78
+
79
+  // append parameters
80
+  if (parameters && typeof parameters === 'object') {
81
+    var param
82
+    var params = Object.keys(parameters).sort()
83
+
84
+    for (var i = 0; i < params.length; i++) {
85
+      param = params[i]
86
+
87
+      if (!TOKEN_REGEXP.test(param)) {
88
+        throw new TypeError('invalid parameter name')
89
+      }
90
+
91
+      string += '; ' + param + '=' + qstring(parameters[param])
92
+    }
93
+  }
94
+
95
+  return string
96
+}
97
+
98
+/**
99
+ * Parse media type to object.
100
+ *
101
+ * @param {string|object} string
102
+ * @return {Object}
103
+ * @public
104
+ */
105
+
106
+function parse (string) {
107
+  if (!string) {
108
+    throw new TypeError('argument string is required')
109
+  }
110
+
111
+  // support req/res-like objects as argument
112
+  var header = typeof string === 'object'
113
+    ? getcontenttype(string)
114
+    : string
115
+
116
+  if (typeof header !== 'string') {
117
+    throw new TypeError('argument string is required to be a string')
118
+  }
119
+
120
+  var index = header.indexOf(';')
121
+  var type = index !== -1
122
+    ? header.substr(0, index).trim()
123
+    : header.trim()
124
+
125
+  if (!TYPE_REGEXP.test(type)) {
126
+    throw new TypeError('invalid media type')
127
+  }
128
+
129
+  var obj = new ContentType(type.toLowerCase())
130
+
131
+  // parse parameters
132
+  if (index !== -1) {
133
+    var key
134
+    var match
135
+    var value
136
+
137
+    PARAM_REGEXP.lastIndex = index
138
+
139
+    while ((match = PARAM_REGEXP.exec(header))) {
140
+      if (match.index !== index) {
141
+        throw new TypeError('invalid parameter format')
142
+      }
143
+
144
+      index += match[0].length
145
+      key = match[1].toLowerCase()
146
+      value = match[2]
147
+
148
+      if (value[0] === '"') {
149
+        // remove quotes and escapes
150
+        value = value
151
+          .substr(1, value.length - 2)
152
+          .replace(QESC_REGEXP, '$1')
153
+      }
154
+
155
+      obj.parameters[key] = value
156
+    }
157
+
158
+    if (index !== header.length) {
159
+      throw new TypeError('invalid parameter format')
160
+    }
161
+  }
162
+
163
+  return obj
164
+}
165
+
166
+/**
167
+ * Get content-type from req/res objects.
168
+ *
169
+ * @param {object}
170
+ * @return {Object}
171
+ * @private
172
+ */
173
+
174
+function getcontenttype (obj) {
175
+  var header
176
+
177
+  if (typeof obj.getHeader === 'function') {
178
+    // res-like
179
+    header = obj.getHeader('content-type')
180
+  } else if (typeof obj.headers === 'object') {
181
+    // req-like
182
+    header = obj.headers && obj.headers['content-type']
183
+  }
184
+
185
+  if (typeof header !== 'string') {
186
+    throw new TypeError('content-type header is missing from object')
187
+  }
188
+
189
+  return header
190
+}
191
+
192
+/**
193
+ * Quote a string if necessary.
194
+ *
195
+ * @param {string} val
196
+ * @return {string}
197
+ * @private
198
+ */
199
+
200
+function qstring (val) {
201
+  var str = String(val)
202
+
203
+  // no need to quote tokens
204
+  if (TOKEN_REGEXP.test(str)) {
205
+    return str
206
+  }
207
+
208
+  if (str.length > 0 && !TEXT_REGEXP.test(str)) {
209
+    throw new TypeError('invalid parameter value')
210
+  }
211
+
212
+  return '"' + str.replace(QUOTE_REGEXP, '\\$1') + '"'
213
+}
214
+
215
+/**
216
+ * Class to represent a content type.
217
+ * @private
218
+ */
219
+function ContentType (type) {
220
+  this.parameters = Object.create(null)
221
+  this.type = type
222
+}

+ 40
- 0
node_modules/content-type/package.json Ver arquivo

@@ -0,0 +1,40 @@
1
+{
2
+  "name": "content-type",
3
+  "description": "Create and parse HTTP Content-Type header",
4
+  "version": "1.0.4",
5
+  "author": "Douglas Christopher Wilson <doug@somethingdoug.com>",
6
+  "license": "MIT",
7
+  "keywords": [
8
+    "content-type",
9
+    "http",
10
+    "req",
11
+    "res",
12
+    "rfc7231"
13
+  ],
14
+  "repository": "jshttp/content-type",
15
+  "devDependencies": {
16
+    "eslint": "3.19.0",
17
+    "eslint-config-standard": "10.2.1",
18
+    "eslint-plugin-import": "2.7.0",
19
+    "eslint-plugin-node": "5.1.1",
20
+    "eslint-plugin-promise": "3.5.0",
21
+    "eslint-plugin-standard": "3.0.1",
22
+    "istanbul": "0.4.5",
23
+    "mocha": "~1.21.5"
24
+  },
25
+  "files": [
26
+    "LICENSE",
27
+    "HISTORY.md",
28
+    "README.md",
29
+    "index.js"
30
+  ],
31
+  "engines": {
32
+    "node": ">= 0.6"
33
+  },
34
+  "scripts": {
35
+    "lint": "eslint .",
36
+    "test": "mocha --reporter spec --check-leaks --bail test/",
37
+    "test-ci": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/",
38
+    "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/"
39
+  }
40
+}

+ 4
- 0
node_modules/cookie-signature/.npmignore Ver arquivo

@@ -0,0 +1,4 @@
1
+support
2
+test
3
+examples
4
+*.sock

+ 38
- 0
node_modules/cookie-signature/History.md Ver arquivo

@@ -0,0 +1,38 @@
1
+1.0.6 / 2015-02-03
2
+==================
3
+
4
+* use `npm test` instead of `make test` to run tests
5
+* clearer assertion messages when checking input
6
+
7
+
8
+1.0.5 / 2014-09-05
9
+==================
10
+
11
+* add license to package.json
12
+
13
+1.0.4 / 2014-06-25
14
+==================
15
+
16
+ * corrected avoidance of timing attacks (thanks @tenbits!)
17
+
18
+1.0.3 / 2014-01-28
19
+==================
20
+
21
+ * [incorrect] fix for timing attacks
22
+
23
+1.0.2 / 2014-01-28
24
+==================
25
+
26
+ * fix missing repository warning
27
+ * fix typo in test
28
+
29
+1.0.1 / 2013-04-15
30
+==================
31
+
32
+  * Revert "Changed underlying HMAC algo. to sha512."
33
+  * Revert "Fix for timing attacks on MAC verification."
34
+
35
+0.0.1 / 2010-01-03
36
+==================
37
+
38
+  * Initial release

+ 42
- 0
node_modules/cookie-signature/Readme.md Ver arquivo

@@ -0,0 +1,42 @@
1
+
2
+# cookie-signature
3
+
4
+  Sign and unsign cookies.
5
+
6
+## Example
7
+
8
+```js
9
+var cookie = require('cookie-signature');
10
+
11
+var val = cookie.sign('hello', 'tobiiscool');
12
+val.should.equal('hello.DGDUkGlIkCzPz+C0B064FNgHdEjox7ch8tOBGslZ5QI');
13
+
14
+var val = cookie.sign('hello', 'tobiiscool');
15
+cookie.unsign(val, 'tobiiscool').should.equal('hello');
16
+cookie.unsign(val, 'luna').should.be.false;
17
+```
18
+
19
+## License 
20
+
21
+(The MIT License)
22
+
23
+Copyright (c) 2012 LearnBoost &lt;tj@learnboost.com&gt;
24
+
25
+Permission is hereby granted, free of charge, to any person obtaining
26
+a copy of this software and associated documentation files (the
27
+'Software'), to deal in the Software without restriction, including
28
+without limitation the rights to use, copy, modify, merge, publish,
29
+distribute, sublicense, and/or sell copies of the Software, and to
30
+permit persons to whom the Software is furnished to do so, subject to
31
+the following conditions:
32
+
33
+The above copyright notice and this permission notice shall be
34
+included in all copies or substantial portions of the Software.
35
+
36
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
37
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
38
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
39
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
40
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
41
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
42
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

+ 51
- 0
node_modules/cookie-signature/index.js Ver arquivo

@@ -0,0 +1,51 @@
1
+/**
2
+ * Module dependencies.
3
+ */
4
+
5
+var crypto = require('crypto');
6
+
7
+/**
8
+ * Sign the given `val` with `secret`.
9
+ *
10
+ * @param {String} val
11
+ * @param {String} secret
12
+ * @return {String}
13
+ * @api private
14
+ */
15
+
16
+exports.sign = function(val, secret){
17
+  if ('string' != typeof val) throw new TypeError("Cookie value must be provided as a string.");
18
+  if ('string' != typeof secret) throw new TypeError("Secret string must be provided.");
19
+  return val + '.' + crypto
20
+    .createHmac('sha256', secret)
21
+    .update(val)
22
+    .digest('base64')
23
+    .replace(/\=+$/, '');
24
+};
25
+
26
+/**
27
+ * Unsign and decode the given `val` with `secret`,
28
+ * returning `false` if the signature is invalid.
29
+ *
30
+ * @param {String} val
31
+ * @param {String} secret
32
+ * @return {String|Boolean}
33
+ * @api private
34
+ */
35
+
36
+exports.unsign = function(val, secret){
37
+  if ('string' != typeof val) throw new TypeError("Signed cookie string must be provided.");
38
+  if ('string' != typeof secret) throw new TypeError("Secret string must be provided.");
39
+  var str = val.slice(0, val.lastIndexOf('.'))
40
+    , mac = exports.sign(str, secret);
41
+  
42
+  return sha1(mac) == sha1(val) ? str : false;
43
+};
44
+
45
+/**
46
+ * Private
47
+ */
48
+
49
+function sha1(str){
50
+  return crypto.createHash('sha1').update(str).digest('hex');
51
+}

+ 18
- 0
node_modules/cookie-signature/package.json Ver arquivo

@@ -0,0 +1,18 @@
1
+{
2
+  "name": "cookie-signature",
3
+  "version": "1.0.6",
4
+  "description": "Sign and unsign cookies",
5
+  "keywords": ["cookie", "sign", "unsign"],
6
+  "author": "TJ Holowaychuk <tj@learnboost.com>",
7
+  "license": "MIT",
8
+  "repository": { "type": "git", "url": "https://github.com/visionmedia/node-cookie-signature.git"},
9
+  "dependencies": {},
10
+  "devDependencies": {
11
+    "mocha": "*",
12
+    "should": "*"
13
+  },
14
+  "scripts": {
15
+    "test": "mocha --require should --reporter spec"
16
+  },
17
+  "main": "index"
18
+}

+ 128
- 0
node_modules/cookie/HISTORY.md Ver arquivo

@@ -0,0 +1,128 @@
1
+0.4.1 / 2020-04-21
2
+==================
3
+
4
+  * Fix `maxAge` option to reject invalid values
5
+
6
+0.4.0 / 2019-05-15
7
+==================
8
+
9
+  * Add `SameSite=None` support
10
+
11
+0.3.1 / 2016-05-26
12
+==================
13
+
14
+  * Fix `sameSite: true` to work with draft-7 clients
15
+    - `true` now sends `SameSite=Strict` instead of `SameSite`
16
+
17
+0.3.0 / 2016-05-26
18
+==================
19
+
20
+  * Add `sameSite` option
21
+    - Replaces `firstPartyOnly` option, never implemented by browsers
22
+  * Improve error message when `encode` is not a function
23
+  * Improve error message when `expires` is not a `Date`
24
+
25
+0.2.4 / 2016-05-20
26
+==================
27
+
28
+  * perf: enable strict mode
29
+  * perf: use for loop in parse
30
+  * perf: use string concatination for serialization
31
+
32
+0.2.3 / 2015-10-25
33
+==================
34
+
35
+  * Fix cookie `Max-Age` to never be a floating point number
36
+
37
+0.2.2 / 2015-09-17
38
+==================
39
+
40
+  * Fix regression when setting empty cookie value
41
+    - Ease the new restriction, which is just basic header-level validation
42
+  * Fix typo in invalid value errors
43
+
44
+0.2.1 / 2015-09-17
45
+==================
46
+
47
+  * Throw on invalid values provided to `serialize`
48
+    - Ensures the resulting string is a valid HTTP header value
49
+
50
+0.2.0 / 2015-08-13
51
+==================
52
+
53
+  * Add `firstPartyOnly` option
54
+  * Throw better error for invalid argument to parse
55
+  * perf: hoist regular expression
56
+
57
+0.1.5 / 2015-09-17
58
+==================
59
+
60
+  * Fix regression when setting empty cookie value
61
+    - Ease the new restriction, which is just basic header-level validation
62
+  * Fix typo in invalid value errors
63
+
64
+0.1.4 / 2015-09-17
65
+==================
66
+
67
+  * Throw better error for invalid argument to parse
68
+  * Throw on invalid values provided to `serialize`
69
+    - Ensures the resulting string is a valid HTTP header value
70
+
71
+0.1.3 / 2015-05-19
72
+==================
73
+
74
+  * Reduce the scope of try-catch deopt
75
+  * Remove argument reassignments
76
+
77
+0.1.2 / 2014-04-16
78
+==================
79
+
80
+  * Remove unnecessary files from npm package
81
+
82
+0.1.1 / 2014-02-23
83
+==================
84
+
85
+  * Fix bad parse when cookie value contained a comma
86
+  * Fix support for `maxAge` of `0`
87
+
88
+0.1.0 / 2013-05-01
89
+==================
90
+
91
+  * Add `decode` option
92
+  * Add `encode` option
93
+
94
+0.0.6 / 2013-04-08
95
+==================
96
+
97
+  * Ignore cookie parts missing `=`
98
+
99
+0.0.5 / 2012-10-29
100
+==================
101
+
102
+  * Return raw cookie value if value unescape errors
103
+
104
+0.0.4 / 2012-06-21
105
+==================
106
+
107
+  * Use encode/decodeURIComponent for cookie encoding/decoding
108
+    - Improve server/client interoperability
109
+
110
+0.0.3 / 2012-06-06
111
+==================
112
+
113
+  * Only escape special characters per the cookie RFC
114
+
115
+0.0.2 / 2012-06-01
116
+==================
117
+
118
+  * Fix `maxAge` option to not throw error
119
+
120
+0.0.1 / 2012-05-28
121
+==================
122
+
123
+  * Add more tests
124
+
125
+0.0.0 / 2012-05-28
126
+==================
127
+
128
+  * Initial release

+ 24
- 0
node_modules/cookie/LICENSE Ver arquivo

@@ -0,0 +1,24 @@
1
+(The MIT License)
2
+
3
+Copyright (c) 2012-2014 Roman Shtylman <shtylman@gmail.com>
4
+Copyright (c) 2015 Douglas Christopher Wilson <doug@somethingdoug.com>
5
+
6
+Permission is hereby granted, free of charge, to any person obtaining
7
+a copy of this software and associated documentation files (the
8
+'Software'), to deal in the Software without restriction, including
9
+without limitation the rights to use, copy, modify, merge, publish,
10
+distribute, sublicense, and/or sell copies of the Software, and to
11
+permit persons to whom the Software is furnished to do so, subject to
12
+the following conditions:
13
+
14
+The above copyright notice and this permission notice shall be
15
+included in all copies or substantial portions of the Software.
16
+
17
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
18
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
19
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
20
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
21
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
22
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
23
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24
+

+ 257
- 0
node_modules/cookie/README.md Ver arquivo

@@ -0,0 +1,257 @@
1
+# cookie
2
+
3
+[![NPM Version][npm-version-image]][npm-url]
4
+[![NPM Downloads][npm-downloads-image]][npm-url]
5
+[![Node.js Version][node-version-image]][node-version-url]
6
+[![Build Status][travis-image]][travis-url]
7
+[![Test Coverage][coveralls-image]][coveralls-url]
8
+
9
+Basic HTTP cookie parser and serializer for HTTP servers.
10
+
11
+## Installation
12
+
13
+This is a [Node.js](https://nodejs.org/en/) module available through the
14
+[npm registry](https://www.npmjs.com/). Installation is done using the
15
+[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally):
16
+
17
+```sh
18
+$ npm install cookie
19
+```
20
+
21
+## API
22
+
23
+```js
24
+var cookie = require('cookie');
25
+```
26
+
27
+### cookie.parse(str, options)
28
+
29
+Parse an HTTP `Cookie` header string and returning an object of all cookie name-value pairs.
30
+The `str` argument is the string representing a `Cookie` header value and `options` is an
31
+optional object containing additional parsing options.
32
+
33
+```js
34
+var cookies = cookie.parse('foo=bar; equation=E%3Dmc%5E2');
35
+// { foo: 'bar', equation: 'E=mc^2' }
36
+```
37
+
38
+#### Options
39
+
40
+`cookie.parse` accepts these properties in the options object.
41
+
42
+##### decode
43
+
44
+Specifies a function that will be used to decode a cookie's value. Since the value of a cookie
45
+has a limited character set (and must be a simple string), this function can be used to decode
46
+a previously-encoded cookie value into a JavaScript string or other object.
47
+
48
+The default function is the global `decodeURIComponent`, which will decode any URL-encoded
49
+sequences into their byte representations.
50
+
51
+**note** if an error is thrown from this function, the original, non-decoded cookie value will
52
+be returned as the cookie's value.
53
+
54
+### cookie.serialize(name, value, options)
55
+
56
+Serialize a cookie name-value pair into a `Set-Cookie` header string. The `name` argument is the
57
+name for the cookie, the `value` argument is the value to set the cookie to, and the `options`
58
+argument is an optional object containing additional serialization options.
59
+
60
+```js
61
+var setCookie = cookie.serialize('foo', 'bar');
62
+// foo=bar
63
+```
64
+
65
+#### Options
66
+
67
+`cookie.serialize` accepts these properties in the options object.
68
+
69
+##### domain
70
+
71
+Specifies the value for the [`Domain` `Set-Cookie` attribute][rfc-6265-5.2.3]. By default, no
72
+domain is set, and most clients will consider the cookie to apply to only the current domain.
73
+
74
+##### encode
75
+
76
+Specifies a function that will be used to encode a cookie's value. Since value of a cookie
77
+has a limited character set (and must be a simple string), this function can be used to encode
78
+a value into a string suited for a cookie's value.
79
+
80
+The default function is the global `encodeURIComponent`, which will encode a JavaScript string
81
+into UTF-8 byte sequences and then URL-encode any that fall outside of the cookie range.
82
+
83
+##### expires
84
+
85
+Specifies the `Date` object to be the value for the [`Expires` `Set-Cookie` attribute][rfc-6265-5.2.1].
86
+By default, no expiration is set, and most clients will consider this a "non-persistent cookie" and
87
+will delete it on a condition like exiting a web browser application.
88
+
89
+**note** the [cookie storage model specification][rfc-6265-5.3] states that if both `expires` and
90
+`maxAge` are set, then `maxAge` takes precedence, but it is possible not all clients by obey this,
91
+so if both are set, they should point to the same date and time.
92
+
93
+##### httpOnly
94
+
95
+Specifies the `boolean` value for the [`HttpOnly` `Set-Cookie` attribute][rfc-6265-5.2.6]. When truthy,
96
+the `HttpOnly` attribute is set, otherwise it is not. By default, the `HttpOnly` attribute is not set.
97
+
98
+**note** be careful when setting this to `true`, as compliant clients will not allow client-side
99
+JavaScript to see the cookie in `document.cookie`.
100
+
101
+##### maxAge
102
+
103
+Specifies the `number` (in seconds) to be the value for the [`Max-Age` `Set-Cookie` attribute][rfc-6265-5.2.2].
104
+The given number will be converted to an integer by rounding down. By default, no maximum age is set.
105
+
106
+**note** the [cookie storage model specification][rfc-6265-5.3] states that if both `expires` and
107
+`maxAge` are set, then `maxAge` takes precedence, but it is possible not all clients by obey this,
108
+so if both are set, they should point to the same date and time.
109
+
110
+##### path
111
+
112
+Specifies the value for the [`Path` `Set-Cookie` attribute][rfc-6265-5.2.4]. By default, the path
113
+is considered the ["default path"][rfc-6265-5.1.4].
114
+
115
+##### sameSite
116
+
117
+Specifies the `boolean` or `string` to be the value for the [`SameSite` `Set-Cookie` attribute][rfc-6265bis-03-4.1.2.7].
118
+
119
+  - `true` will set the `SameSite` attribute to `Strict` for strict same site enforcement.
120
+  - `false` will not set the `SameSite` attribute.
121
+  - `'lax'` will set the `SameSite` attribute to `Lax` for lax same site enforcement.
122
+  - `'none'` will set the `SameSite` attribute to `None` for an explicit cross-site cookie.
123
+  - `'strict'` will set the `SameSite` attribute to `Strict` for strict same site enforcement.
124
+
125
+More information about the different enforcement levels can be found in
126
+[the specification][rfc-6265bis-03-4.1.2.7].
127
+
128
+**note** This is an attribute that has not yet been fully standardized, and may change in the future.
129
+This also means many clients may ignore this attribute until they understand it.
130
+
131
+##### secure
132
+
133
+Specifies the `boolean` value for the [`Secure` `Set-Cookie` attribute][rfc-6265-5.2.5]. When truthy,
134
+the `Secure` attribute is set, otherwise it is not. By default, the `Secure` attribute is not set.
135
+
136
+**note** be careful when setting this to `true`, as compliant clients will not send the cookie back to
137
+the server in the future if the browser does not have an HTTPS connection.
138
+
139
+## Example
140
+
141
+The following example uses this module in conjunction with the Node.js core HTTP server
142
+to prompt a user for their name and display it back on future visits.
143
+
144
+```js
145
+var cookie = require('cookie');
146
+var escapeHtml = require('escape-html');
147
+var http = require('http');
148
+var url = require('url');
149
+
150
+function onRequest(req, res) {
151
+  // Parse the query string
152
+  var query = url.parse(req.url, true, true).query;
153
+
154
+  if (query && query.name) {
155
+    // Set a new cookie with the name
156
+    res.setHeader('Set-Cookie', cookie.serialize('name', String(query.name), {
157
+      httpOnly: true,
158
+      maxAge: 60 * 60 * 24 * 7 // 1 week
159
+    }));
160
+
161
+    // Redirect back after setting cookie
162
+    res.statusCode = 302;
163
+    res.setHeader('Location', req.headers.referer || '/');
164
+    res.end();
165
+    return;
166
+  }
167
+
168
+  // Parse the cookies on the request
169
+  var cookies = cookie.parse(req.headers.cookie || '');
170
+
171
+  // Get the visitor name set in the cookie
172
+  var name = cookies.name;
173
+
174
+  res.setHeader('Content-Type', 'text/html; charset=UTF-8');
175
+
176
+  if (name) {
177
+    res.write('<p>Welcome back, <b>' + escapeHtml(name) + '</b>!</p>');
178
+  } else {
179
+    res.write('<p>Hello, new visitor!</p>');
180
+  }
181
+
182
+  res.write('<form method="GET">');
183
+  res.write('<input placeholder="enter your name" name="name"> <input type="submit" value="Set Name">');
184
+  res.end('</form>');
185
+}
186
+
187
+http.createServer(onRequest).listen(3000);
188
+```
189
+
190
+## Testing
191
+
192
+```sh
193
+$ npm test
194
+```
195
+
196
+## Benchmark
197
+
198
+```
199
+$ npm run bench
200
+
201
+> cookie@0.3.1 bench cookie
202
+> node benchmark/index.js
203
+
204
+  http_parser@2.8.0
205
+  node@6.14.2
206
+  v8@5.1.281.111
207
+  uv@1.16.1
208
+  zlib@1.2.11
209
+  ares@1.10.1-DEV
210
+  icu@58.2
211
+  modules@48
212
+  napi@3
213
+  openssl@1.0.2o
214
+
215
+> node benchmark/parse.js
216
+
217
+  cookie.parse
218
+
219
+  6 tests completed.
220
+
221
+  simple      x 1,200,691 ops/sec ±1.12% (189 runs sampled)
222
+  decode      x 1,012,994 ops/sec ±0.97% (186 runs sampled)
223
+  unquote     x 1,074,174 ops/sec ±2.43% (186 runs sampled)
224
+  duplicates  x   438,424 ops/sec ±2.17% (184 runs sampled)
225
+  10 cookies  x   147,154 ops/sec ±1.01% (186 runs sampled)
226
+  100 cookies x    14,274 ops/sec ±1.07% (187 runs sampled)
227
+```
228
+
229
+## References
230
+
231
+- [RFC 6265: HTTP State Management Mechanism][rfc-6265]
232
+- [Same-site Cookies][rfc-6265bis-03-4.1.2.7]
233
+
234
+[rfc-6265bis-03-4.1.2.7]: https://tools.ietf.org/html/draft-ietf-httpbis-rfc6265bis-03#section-4.1.2.7
235
+[rfc-6265]: https://tools.ietf.org/html/rfc6265
236
+[rfc-6265-5.1.4]: https://tools.ietf.org/html/rfc6265#section-5.1.4
237
+[rfc-6265-5.2.1]: https://tools.ietf.org/html/rfc6265#section-5.2.1
238
+[rfc-6265-5.2.2]: https://tools.ietf.org/html/rfc6265#section-5.2.2
239
+[rfc-6265-5.2.3]: https://tools.ietf.org/html/rfc6265#section-5.2.3
240
+[rfc-6265-5.2.4]: https://tools.ietf.org/html/rfc6265#section-5.2.4
241
+[rfc-6265-5.2.5]: https://tools.ietf.org/html/rfc6265#section-5.2.5
242
+[rfc-6265-5.2.6]: https://tools.ietf.org/html/rfc6265#section-5.2.6
243
+[rfc-6265-5.3]: https://tools.ietf.org/html/rfc6265#section-5.3
244
+
245
+## License
246
+
247
+[MIT](LICENSE)
248
+
249
+[coveralls-image]: https://badgen.net/coveralls/c/github/jshttp/cookie/master
250
+[coveralls-url]: https://coveralls.io/r/jshttp/cookie?branch=master
251
+[node-version-image]: https://badgen.net/npm/node/cookie
252
+[node-version-url]: https://nodejs.org/en/download
253
+[npm-downloads-image]: https://badgen.net/npm/dm/cookie
254
+[npm-url]: https://npmjs.org/package/cookie
255
+[npm-version-image]: https://badgen.net/npm/v/cookie
256
+[travis-image]: https://badgen.net/travis/jshttp/cookie/master
257
+[travis-url]: https://travis-ci.org/jshttp/cookie

+ 202
- 0
node_modules/cookie/index.js Ver arquivo

@@ -0,0 +1,202 @@
1
+/*!
2
+ * cookie
3
+ * Copyright(c) 2012-2014 Roman Shtylman
4
+ * Copyright(c) 2015 Douglas Christopher Wilson
5
+ * MIT Licensed
6
+ */
7
+
8
+'use strict';
9
+
10
+/**
11
+ * Module exports.
12
+ * @public
13
+ */
14
+
15
+exports.parse = parse;
16
+exports.serialize = serialize;
17
+
18
+/**
19
+ * Module variables.
20
+ * @private
21
+ */
22
+
23
+var decode = decodeURIComponent;
24
+var encode = encodeURIComponent;
25
+var pairSplitRegExp = /; */;
26
+
27
+/**
28
+ * RegExp to match field-content in RFC 7230 sec 3.2
29
+ *
30
+ * field-content = field-vchar [ 1*( SP / HTAB ) field-vchar ]
31
+ * field-vchar   = VCHAR / obs-text
32
+ * obs-text      = %x80-FF
33
+ */
34
+
35
+var fieldContentRegExp = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;
36
+
37
+/**
38
+ * Parse a cookie header.
39
+ *
40
+ * Parse the given cookie header string into an object
41
+ * The object has the various cookies as keys(names) => values
42
+ *
43
+ * @param {string} str
44
+ * @param {object} [options]
45
+ * @return {object}
46
+ * @public
47
+ */
48
+
49
+function parse(str, options) {
50
+  if (typeof str !== 'string') {
51
+    throw new TypeError('argument str must be a string');
52
+  }
53
+
54
+  var obj = {}
55
+  var opt = options || {};
56
+  var pairs = str.split(pairSplitRegExp);
57
+  var dec = opt.decode || decode;
58
+
59
+  for (var i = 0; i < pairs.length; i++) {
60
+    var pair = pairs[i];
61
+    var eq_idx = pair.indexOf('=');
62
+
63
+    // skip things that don't look like key=value
64
+    if (eq_idx < 0) {
65
+      continue;
66
+    }
67
+
68
+    var key = pair.substr(0, eq_idx).trim()
69
+    var val = pair.substr(++eq_idx, pair.length).trim();
70
+
71
+    // quoted values
72
+    if ('"' == val[0]) {
73
+      val = val.slice(1, -1);
74
+    }
75
+
76
+    // only assign once
77
+    if (undefined == obj[key]) {
78
+      obj[key] = tryDecode(val, dec);
79
+    }
80
+  }
81
+
82
+  return obj;
83
+}
84
+
85
+/**
86
+ * Serialize data into a cookie header.
87
+ *
88
+ * Serialize the a name value pair into a cookie string suitable for
89
+ * http headers. An optional options object specified cookie parameters.
90
+ *
91
+ * serialize('foo', 'bar', { httpOnly: true })
92
+ *   => "foo=bar; httpOnly"
93
+ *
94
+ * @param {string} name
95
+ * @param {string} val
96
+ * @param {object} [options]
97
+ * @return {string}
98
+ * @public
99
+ */
100
+
101
+function serialize(name, val, options) {
102
+  var opt = options || {};
103
+  var enc = opt.encode || encode;
104
+
105
+  if (typeof enc !== 'function') {
106
+    throw new TypeError('option encode is invalid');
107
+  }
108
+
109
+  if (!fieldContentRegExp.test(name)) {
110
+    throw new TypeError('argument name is invalid');
111
+  }
112
+
113
+  var value = enc(val);
114
+
115
+  if (value && !fieldContentRegExp.test(value)) {
116
+    throw new TypeError('argument val is invalid');
117
+  }
118
+
119
+  var str = name + '=' + value;
120
+
121
+  if (null != opt.maxAge) {
122
+    var maxAge = opt.maxAge - 0;
123
+
124
+    if (isNaN(maxAge) || !isFinite(maxAge)) {
125
+      throw new TypeError('option maxAge is invalid')
126
+    }
127
+
128
+    str += '; Max-Age=' + Math.floor(maxAge);
129
+  }
130
+
131
+  if (opt.domain) {
132
+    if (!fieldContentRegExp.test(opt.domain)) {
133
+      throw new TypeError('option domain is invalid');
134
+    }
135
+
136
+    str += '; Domain=' + opt.domain;
137
+  }
138
+
139
+  if (opt.path) {
140
+    if (!fieldContentRegExp.test(opt.path)) {
141
+      throw new TypeError('option path is invalid');
142
+    }
143
+
144
+    str += '; Path=' + opt.path;
145
+  }
146
+
147
+  if (opt.expires) {
148
+    if (typeof opt.expires.toUTCString !== 'function') {
149
+      throw new TypeError('option expires is invalid');
150
+    }
151
+
152
+    str += '; Expires=' + opt.expires.toUTCString();
153
+  }
154
+
155
+  if (opt.httpOnly) {
156
+    str += '; HttpOnly';
157
+  }
158
+
159
+  if (opt.secure) {
160
+    str += '; Secure';
161
+  }
162
+
163
+  if (opt.sameSite) {
164
+    var sameSite = typeof opt.sameSite === 'string'
165
+      ? opt.sameSite.toLowerCase() : opt.sameSite;
166
+
167
+    switch (sameSite) {
168
+      case true:
169
+        str += '; SameSite=Strict';
170
+        break;
171
+      case 'lax':
172
+        str += '; SameSite=Lax';
173
+        break;
174
+      case 'strict':
175
+        str += '; SameSite=Strict';
176
+        break;
177
+      case 'none':
178
+        str += '; SameSite=None';
179
+        break;
180
+      default:
181
+        throw new TypeError('option sameSite is invalid');
182
+    }
183
+  }
184
+
185
+  return str;
186
+}
187
+
188
+/**
189
+ * Try decoding a string using a decoding function.
190
+ *
191
+ * @param {string} str
192
+ * @param {function} decode
193
+ * @private
194
+ */
195
+
196
+function tryDecode(str, decode) {
197
+  try {
198
+    return decode(str);
199
+  } catch (e) {
200
+    return str;
201
+  }
202
+}

+ 40
- 0
node_modules/cookie/package.json Ver arquivo

@@ -0,0 +1,40 @@
1
+{
2
+  "name": "cookie",
3
+  "description": "HTTP server cookie parsing and serialization",
4
+  "version": "0.4.1",
5
+  "author": "Roman Shtylman <shtylman@gmail.com>",
6
+  "contributors": [
7
+    "Douglas Christopher Wilson <doug@somethingdoug.com>"
8
+  ],
9
+  "license": "MIT",
10
+  "keywords": [
11
+    "cookie",
12
+    "cookies"
13
+  ],
14
+  "repository": "jshttp/cookie",
15
+  "devDependencies": {
16
+    "beautify-benchmark": "0.2.4",
17
+    "benchmark": "2.1.4",
18
+    "eslint": "6.8.0",
19
+    "eslint-plugin-markdown": "1.0.2",
20
+    "mocha": "7.1.1",
21
+    "nyc": "15.0.1"
22
+  },
23
+  "files": [
24
+    "HISTORY.md",
25
+    "LICENSE",
26
+    "README.md",
27
+    "index.js"
28
+  ],
29
+  "engines": {
30
+    "node": ">= 0.6"
31
+  },
32
+  "scripts": {
33
+    "bench": "node benchmark/index.js",
34
+    "lint": "eslint --plugin markdown --ext js,md .",
35
+    "test": "mocha --reporter spec --bail --check-leaks --ui qunit test/",
36
+    "test-ci": "nyc --reporter=text npm test",
37
+    "test-cov": "nyc --reporter=html --reporter=text npm test",
38
+    "version": "node scripts/version-history.js && git add HISTORY.md"
39
+  }
40
+}

+ 1
- 0
node_modules/debug/.coveralls.yml Ver arquivo

@@ -0,0 +1 @@
1
+repo_token: SIAeZjKYlHK74rbcFvNHMUzjRiMpflxve

+ 11
- 0
node_modules/debug/.eslintrc Ver arquivo

@@ -0,0 +1,11 @@
1
+{
2
+  "env": {
3
+    "browser": true,
4
+    "node": true
5
+  },
6
+  "rules": {
7
+    "no-console": 0,
8
+    "no-empty": [1, { "allowEmptyCatch": true }]
9
+  },
10
+  "extends": "eslint:recommended"
11
+}

+ 9
- 0
node_modules/debug/.npmignore Ver arquivo

@@ -0,0 +1,9 @@
1
+support
2
+test
3
+examples
4
+example
5
+*.sock
6
+dist
7
+yarn.lock
8
+coverage
9
+bower.json

+ 14
- 0
node_modules/debug/.travis.yml Ver arquivo

@@ -0,0 +1,14 @@
1
+
2
+language: node_js
3
+node_js:
4
+  - "6"
5
+  - "5"
6
+  - "4"
7
+
8
+install:
9
+  - make node_modules
10
+
11
+script:
12
+  - make lint
13
+  - make test
14
+  - make coveralls

+ 362
- 0
node_modules/debug/CHANGELOG.md Ver arquivo

@@ -0,0 +1,362 @@
1
+
2
+2.6.9 / 2017-09-22
3
+==================
4
+
5
+  * remove ReDoS regexp in %o formatter (#504)
6
+
7
+2.6.8 / 2017-05-18
8
+==================
9
+
10
+  * Fix: Check for undefined on browser globals (#462, @marbemac)
11
+
12
+2.6.7 / 2017-05-16
13
+==================
14
+
15
+  * Fix: Update ms to 2.0.0 to fix regular expression denial of service vulnerability (#458, @hubdotcom)
16
+  * Fix: Inline extend function in node implementation (#452, @dougwilson)
17
+  * Docs: Fix typo (#455, @msasad)
18
+
19
+2.6.5 / 2017-04-27
20
+==================
21
+  
22
+  * Fix: null reference check on window.documentElement.style.WebkitAppearance (#447, @thebigredgeek)
23
+  * Misc: clean up browser reference checks (#447, @thebigredgeek)
24
+  * Misc: add npm-debug.log to .gitignore (@thebigredgeek)
25
+
26
+
27
+2.6.4 / 2017-04-20
28
+==================
29
+
30
+  * Fix: bug that would occure if process.env.DEBUG is a non-string value. (#444, @LucianBuzzo)
31
+  * Chore: ignore bower.json in npm installations. (#437, @joaovieira)
32
+  * Misc: update "ms" to v0.7.3 (@tootallnate)
33
+
34
+2.6.3 / 2017-03-13
35
+==================
36
+
37
+  * Fix: Electron reference to `process.env.DEBUG` (#431, @paulcbetts)
38
+  * Docs: Changelog fix (@thebigredgeek)
39
+
40
+2.6.2 / 2017-03-10
41
+==================
42
+
43
+  * Fix: DEBUG_MAX_ARRAY_LENGTH (#420, @slavaGanzin)
44
+  * Docs: Add backers and sponsors from Open Collective (#422, @piamancini)
45
+  * Docs: Add Slackin invite badge (@tootallnate)
46
+
47
+2.6.1 / 2017-02-10
48
+==================
49
+
50
+  * Fix: Module's `export default` syntax fix for IE8 `Expected identifier` error
51
+  * Fix: Whitelist DEBUG_FD for values 1 and 2 only (#415, @pi0)
52
+  * Fix: IE8 "Expected identifier" error (#414, @vgoma)
53
+  * Fix: Namespaces would not disable once enabled (#409, @musikov)
54
+
55
+2.6.0 / 2016-12-28
56
+==================
57
+
58
+  * Fix: added better null pointer checks for browser useColors (@thebigredgeek)
59
+  * Improvement: removed explicit `window.debug` export (#404, @tootallnate)
60
+  * Improvement: deprecated `DEBUG_FD` environment variable (#405, @tootallnate)
61
+
62
+2.5.2 / 2016-12-25
63
+==================
64
+
65
+  * Fix: reference error on window within webworkers (#393, @KlausTrainer)
66
+  * Docs: fixed README typo (#391, @lurch)
67
+  * Docs: added notice about v3 api discussion (@thebigredgeek)
68
+
69
+2.5.1 / 2016-12-20
70
+==================
71
+
72
+  * Fix: babel-core compatibility
73
+
74
+2.5.0 / 2016-12-20
75
+==================
76
+
77
+  * Fix: wrong reference in bower file (@thebigredgeek)
78
+  * Fix: webworker compatibility (@thebigredgeek)
79
+  * Fix: output formatting issue (#388, @kribblo)
80
+  * Fix: babel-loader compatibility (#383, @escwald)
81
+  * Misc: removed built asset from repo and publications (@thebigredgeek)
82
+  * Misc: moved source files to /src (#378, @yamikuronue)
83
+  * Test: added karma integration and replaced babel with browserify for browser tests (#378, @yamikuronue)
84
+  * Test: coveralls integration (#378, @yamikuronue)
85
+  * Docs: simplified language in the opening paragraph (#373, @yamikuronue)
86
+
87
+2.4.5 / 2016-12-17
88
+==================
89
+
90
+  * Fix: `navigator` undefined in Rhino (#376, @jochenberger)
91
+  * Fix: custom log function (#379, @hsiliev)
92
+  * Improvement: bit of cleanup + linting fixes (@thebigredgeek)
93
+  * Improvement: rm non-maintainted `dist/` dir (#375, @freewil)
94
+  * Docs: simplified language in the opening paragraph. (#373, @yamikuronue)
95
+
96
+2.4.4 / 2016-12-14
97
+==================
98
+
99
+  * Fix: work around debug being loaded in preload scripts for electron (#368, @paulcbetts)
100
+
101
+2.4.3 / 2016-12-14
102
+==================
103
+
104
+  * Fix: navigation.userAgent error for react native (#364, @escwald)
105
+
106
+2.4.2 / 2016-12-14
107
+==================
108
+
109
+  * Fix: browser colors (#367, @tootallnate)
110
+  * Misc: travis ci integration (@thebigredgeek)
111
+  * Misc: added linting and testing boilerplate with sanity check (@thebigredgeek)
112
+
113
+2.4.1 / 2016-12-13
114
+==================
115
+
116
+  * Fix: typo that broke the package (#356)
117
+
118
+2.4.0 / 2016-12-13
119
+==================
120
+
121
+  * Fix: bower.json references unbuilt src entry point (#342, @justmatt)
122
+  * Fix: revert "handle regex special characters" (@tootallnate)
123
+  * Feature: configurable util.inspect()`options for NodeJS (#327, @tootallnate)
124
+  * Feature: %O`(big O) pretty-prints objects (#322, @tootallnate)
125
+  * Improvement: allow colors in workers (#335, @botverse)
126
+  * Improvement: use same color for same namespace. (#338, @lchenay)
127
+
128
+2.3.3 / 2016-11-09
129
+==================
130
+
131
+  * Fix: Catch `JSON.stringify()` errors (#195, Jovan Alleyne)
132
+  * Fix: Returning `localStorage` saved values (#331, Levi Thomason)
133
+  * Improvement: Don't create an empty object when no `process` (Nathan Rajlich)
134
+
135
+2.3.2 / 2016-11-09
136
+==================
137
+
138
+  * Fix: be super-safe in index.js as well (@TooTallNate)
139
+  * Fix: should check whether process exists (Tom Newby)
140
+
141
+2.3.1 / 2016-11-09
142
+==================
143
+
144
+  * Fix: Added electron compatibility (#324, @paulcbetts)
145
+  * Improvement: Added performance optimizations (@tootallnate)
146
+  * Readme: Corrected PowerShell environment variable example (#252, @gimre)
147
+  * Misc: Removed yarn lock file from source control (#321, @fengmk2)
148
+
149
+2.3.0 / 2016-11-07
150
+==================
151
+
152
+  * Fix: Consistent placement of ms diff at end of output (#215, @gorangajic)
153
+  * Fix: Escaping of regex special characters in namespace strings (#250, @zacronos)
154
+  * Fix: Fixed bug causing crash on react-native (#282, @vkarpov15)
155
+  * Feature: Enabled ES6+ compatible import via default export (#212 @bucaran)
156
+  * Feature: Added %O formatter to reflect Chrome's console.log capability (#279, @oncletom)
157
+  * Package: Update "ms" to 0.7.2 (#315, @DevSide)
158
+  * Package: removed superfluous version property from bower.json (#207 @kkirsche)
159
+  * Readme: fix USE_COLORS to DEBUG_COLORS
160
+  * Readme: Doc fixes for format string sugar (#269, @mlucool)
161
+  * Readme: Updated docs for DEBUG_FD and DEBUG_COLORS environment variables (#232, @mattlyons0)
162
+  * Readme: doc fixes for PowerShell (#271 #243, @exoticknight @unreadable)
163
+  * Readme: better docs for browser support (#224, @matthewmueller)
164
+  * Tooling: Added yarn integration for development (#317, @thebigredgeek)
165
+  * Misc: Renamed History.md to CHANGELOG.md (@thebigredgeek)
166
+  * Misc: Added license file (#226 #274, @CantemoInternal @sdaitzman)
167
+  * Misc: Updated contributors (@thebigredgeek)
168
+
169
+2.2.0 / 2015-05-09
170
+==================
171
+
172
+  * package: update "ms" to v0.7.1 (#202, @dougwilson)
173
+  * README: add logging to file example (#193, @DanielOchoa)
174
+  * README: fixed a typo (#191, @amir-s)
175
+  * browser: expose `storage` (#190, @stephenmathieson)
176
+  * Makefile: add a `distclean` target (#189, @stephenmathieson)
177
+
178
+2.1.3 / 2015-03-13
179
+==================
180
+
181
+  * Updated stdout/stderr example (#186)
182
+  * Updated example/stdout.js to match debug current behaviour
183
+  * Renamed example/stderr.js to stdout.js
184
+  * Update Readme.md (#184)
185
+  * replace high intensity foreground color for bold (#182, #183)
186
+
187
+2.1.2 / 2015-03-01
188
+==================
189
+
190
+  * dist: recompile
191
+  * update "ms" to v0.7.0
192
+  * package: update "browserify" to v9.0.3
193
+  * component: fix "ms.js" repo location
194
+  * changed bower package name
195
+  * updated documentation about using debug in a browser
196
+  * fix: security error on safari (#167, #168, @yields)
197
+
198
+2.1.1 / 2014-12-29
199
+==================
200
+
201
+  * browser: use `typeof` to check for `console` existence
202
+  * browser: check for `console.log` truthiness (fix IE 8/9)
203
+  * browser: add support for Chrome apps
204
+  * Readme: added Windows usage remarks
205
+  * Add `bower.json` to properly support bower install
206
+
207
+2.1.0 / 2014-10-15
208
+==================
209
+
210
+  * node: implement `DEBUG_FD` env variable support
211
+  * package: update "browserify" to v6.1.0
212
+  * package: add "license" field to package.json (#135, @panuhorsmalahti)
213
+
214
+2.0.0 / 2014-09-01
215
+==================
216
+
217
+  * package: update "browserify" to v5.11.0
218
+  * node: use stderr rather than stdout for logging (#29, @stephenmathieson)
219
+
220
+1.0.4 / 2014-07-15
221
+==================
222
+
223
+  * dist: recompile
224
+  * example: remove `console.info()` log usage
225
+  * example: add "Content-Type" UTF-8 header to browser example
226
+  * browser: place %c marker after the space character
227
+  * browser: reset the "content" color via `color: inherit`
228
+  * browser: add colors support for Firefox >= v31
229
+  * debug: prefer an instance `log()` function over the global one (#119)
230
+  * Readme: update documentation about styled console logs for FF v31 (#116, @wryk)
231
+
232
+1.0.3 / 2014-07-09
233
+==================
234
+
235
+  * Add support for multiple wildcards in namespaces (#122, @seegno)
236
+  * browser: fix lint
237
+
238
+1.0.2 / 2014-06-10
239
+==================
240
+
241
+  * browser: update color palette (#113, @gscottolson)
242
+  * common: make console logging function configurable (#108, @timoxley)
243
+  * node: fix %o colors on old node <= 0.8.x
244
+  * Makefile: find node path using shell/which (#109, @timoxley)
245
+
246
+1.0.1 / 2014-06-06
247
+==================
248
+
249
+  * browser: use `removeItem()` to clear localStorage
250
+  * browser, node: don't set DEBUG if namespaces is undefined (#107, @leedm777)
251
+  * package: add "contributors" section
252
+  * node: fix comment typo
253
+  * README: list authors
254
+
255
+1.0.0 / 2014-06-04
256
+==================
257
+
258
+  * make ms diff be global, not be scope
259
+  * debug: ignore empty strings in enable()
260
+  * node: make DEBUG_COLORS able to disable coloring
261
+  * *: export the `colors` array
262
+  * npmignore: don't publish the `dist` dir
263
+  * Makefile: refactor to use browserify
264
+  * package: add "browserify" as a dev dependency
265
+  * Readme: add Web Inspector Colors section
266
+  * node: reset terminal color for the debug content
267
+  * node: map "%o" to `util.inspect()`
268
+  * browser: map "%j" to `JSON.stringify()`
269
+  * debug: add custom "formatters"
270
+  * debug: use "ms" module for humanizing the diff
271
+  * Readme: add "bash" syntax highlighting
272
+  * browser: add Firebug color support
273
+  * browser: add colors for WebKit browsers
274
+  * node: apply log to `console`
275
+  * rewrite: abstract common logic for Node & browsers
276
+  * add .jshintrc file
277
+
278
+0.8.1 / 2014-04-14
279
+==================
280
+
281
+  * package: re-add the "component" section
282
+
283
+0.8.0 / 2014-03-30
284
+==================
285
+
286
+  * add `enable()` method for nodejs. Closes #27
287
+  * change from stderr to stdout
288
+  * remove unnecessary index.js file
289
+
290
+0.7.4 / 2013-11-13
291
+==================
292
+
293
+  * remove "browserify" key from package.json (fixes something in browserify)
294
+
295
+0.7.3 / 2013-10-30
296
+==================
297
+
298
+  * fix: catch localStorage security error when cookies are blocked (Chrome)
299
+  * add debug(err) support. Closes #46
300
+  * add .browser prop to package.json. Closes #42
301
+
302
+0.7.2 / 2013-02-06
303
+==================
304
+
305
+  * fix package.json
306
+  * fix: Mobile Safari (private mode) is broken with debug
307
+  * fix: Use unicode to send escape character to shell instead of octal to work with strict mode javascript
308
+
309
+0.7.1 / 2013-02-05
310
+==================
311
+
312
+  * add repository URL to package.json
313
+  * add DEBUG_COLORED to force colored output
314
+  * add browserify support
315
+  * fix component. Closes #24
316
+
317
+0.7.0 / 2012-05-04
318
+==================
319
+
320
+  * Added .component to package.json
321
+  * Added debug.component.js build
322
+
323
+0.6.0 / 2012-03-16
324
+==================
325
+
326
+  * Added support for "-" prefix in DEBUG [Vinay Pulim]
327
+  * Added `.enabled` flag to the node version [TooTallNate]
328
+
329
+0.5.0 / 2012-02-02
330
+==================
331
+
332
+  * Added: humanize diffs. Closes #8
333
+  * Added `debug.disable()` to the CS variant
334
+  * Removed padding. Closes #10
335
+  * Fixed: persist client-side variant again. Closes #9
336
+
337
+0.4.0 / 2012-02-01
338
+==================
339
+
340
+  * Added browser variant support for older browsers [TooTallNate]
341
+  * Added `debug.enable('project:*')` to browser variant [TooTallNate]
342
+  * Added padding to diff (moved it to the right)
343
+
344
+0.3.0 / 2012-01-26
345
+==================
346
+
347
+  * Added millisecond diff when isatty, otherwise UTC string
348
+
349
+0.2.0 / 2012-01-22
350
+==================
351
+
352
+  * Added wildcard support
353
+
354
+0.1.0 / 2011-12-02
355
+==================
356
+
357
+  * Added: remove colors unless stderr isatty [TooTallNate]
358
+
359
+0.0.1 / 2010-01-03
360
+==================
361
+
362
+  * Initial release

+ 19
- 0
node_modules/debug/LICENSE Ver arquivo

@@ -0,0 +1,19 @@
1
+(The MIT License)
2
+
3
+Copyright (c) 2014 TJ Holowaychuk <tj@vision-media.ca>
4
+
5
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software 
6
+and associated documentation files (the 'Software'), to deal in the Software without restriction, 
7
+including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 
8
+and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
9
+subject to the following conditions:
10
+
11
+The above copyright notice and this permission notice shall be included in all copies or substantial 
12
+portions of the Software.
13
+
14
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT 
15
+LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 
16
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 
17
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 
18
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
19
+

+ 50
- 0
node_modules/debug/Makefile Ver arquivo

@@ -0,0 +1,50 @@
1
+# get Makefile directory name: http://stackoverflow.com/a/5982798/376773
2
+THIS_MAKEFILE_PATH:=$(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))
3
+THIS_DIR:=$(shell cd $(dir $(THIS_MAKEFILE_PATH));pwd)
4
+
5
+# BIN directory
6
+BIN := $(THIS_DIR)/node_modules/.bin
7
+
8
+# Path
9
+PATH := node_modules/.bin:$(PATH)
10
+SHELL := /bin/bash
11
+
12
+# applications
13
+NODE ?= $(shell which node)
14
+YARN ?= $(shell which yarn)
15
+PKG ?= $(if $(YARN),$(YARN),$(NODE) $(shell which npm))
16
+BROWSERIFY ?= $(NODE) $(BIN)/browserify
17
+
18
+.FORCE:
19
+
20
+install: node_modules
21
+
22
+node_modules: package.json
23
+	@NODE_ENV= $(PKG) install
24
+	@touch node_modules
25
+
26
+lint: .FORCE
27
+	eslint browser.js debug.js index.js node.js
28
+
29
+test-node: .FORCE
30
+	istanbul cover node_modules/mocha/bin/_mocha -- test/**.js
31
+
32
+test-browser: .FORCE
33
+	mkdir -p dist
34
+
35
+	@$(BROWSERIFY) \
36
+		--standalone debug \
37
+		. > dist/debug.js
38
+
39
+	karma start --single-run
40
+	rimraf dist
41
+
42
+test: .FORCE
43
+	concurrently \
44
+		"make test-node" \
45
+		"make test-browser"
46
+
47
+coveralls:
48
+	cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js
49
+
50
+.PHONY: all install clean distclean

+ 312
- 0
node_modules/debug/README.md Ver arquivo

@@ -0,0 +1,312 @@
1
+# debug
2
+[![Build Status](https://travis-ci.org/visionmedia/debug.svg?branch=master)](https://travis-ci.org/visionmedia/debug)  [![Coverage Status](https://coveralls.io/repos/github/visionmedia/debug/badge.svg?branch=master)](https://coveralls.io/github/visionmedia/debug?branch=master)  [![Slack](https://visionmedia-community-slackin.now.sh/badge.svg)](https://visionmedia-community-slackin.now.sh/) [![OpenCollective](https://opencollective.com/debug/backers/badge.svg)](#backers) 
3
+[![OpenCollective](https://opencollective.com/debug/sponsors/badge.svg)](#sponsors)
4
+
5
+
6
+
7
+A tiny node.js debugging utility modelled after node core's debugging technique.
8
+
9
+**Discussion around the V3 API is under way [here](https://github.com/visionmedia/debug/issues/370)**
10
+
11
+## Installation
12
+
13
+```bash
14
+$ npm install debug
15
+```
16
+
17
+## Usage
18
+
19
+`debug` exposes a function; simply pass this function the name of your module, and it will return a decorated version of `console.error` for you to pass debug statements to. This will allow you to toggle the debug output for different parts of your module as well as the module as a whole.
20
+
21
+Example _app.js_:
22
+
23
+```js
24
+var debug = require('debug')('http')
25
+  , http = require('http')
26
+  , name = 'My App';
27
+
28
+// fake app
29
+
30
+debug('booting %s', name);
31
+
32
+http.createServer(function(req, res){
33
+  debug(req.method + ' ' + req.url);
34
+  res.end('hello\n');
35
+}).listen(3000, function(){
36
+  debug('listening');
37
+});
38
+
39
+// fake worker of some kind
40
+
41
+require('./worker');
42
+```
43
+
44
+Example _worker.js_:
45
+
46
+```js
47
+var debug = require('debug')('worker');
48
+
49
+setInterval(function(){
50
+  debug('doing some work');
51
+}, 1000);
52
+```
53
+
54
+ The __DEBUG__ environment variable is then used to enable these based on space or comma-delimited names. Here are some examples:
55
+
56
+  ![debug http and worker](http://f.cl.ly/items/18471z1H402O24072r1J/Screenshot.png)
57
+
58
+  ![debug worker](http://f.cl.ly/items/1X413v1a3M0d3C2c1E0i/Screenshot.png)
59
+
60
+#### Windows note
61
+
62
+ On Windows the environment variable is set using the `set` command.
63
+
64
+ ```cmd
65
+ set DEBUG=*,-not_this
66
+ ```
67
+
68
+ Note that PowerShell uses different syntax to set environment variables.
69
+
70
+ ```cmd
71
+ $env:DEBUG = "*,-not_this"
72
+  ```
73
+
74
+Then, run the program to be debugged as usual.
75
+
76
+## Millisecond diff
77
+
78
+  When actively developing an application it can be useful to see when the time spent between one `debug()` call and the next. Suppose for example you invoke `debug()` before requesting a resource, and after as well, the "+NNNms" will show you how much time was spent between calls.
79
+
80
+  ![](http://f.cl.ly/items/2i3h1d3t121M2Z1A3Q0N/Screenshot.png)
81
+
82
+  When stdout is not a TTY, `Date#toUTCString()` is used, making it more useful for logging the debug information as shown below:
83
+
84
+  ![](http://f.cl.ly/items/112H3i0e0o0P0a2Q2r11/Screenshot.png)
85
+
86
+## Conventions
87
+
88
+  If you're using this in one or more of your libraries, you _should_ use the name of your library so that developers may toggle debugging as desired without guessing names. If you have more than one debuggers you _should_ prefix them with your library name and use ":" to separate features. For example "bodyParser" from Connect would then be "connect:bodyParser".
89
+
90
+## Wildcards
91
+
92
+  The `*` character may be used as a wildcard. Suppose for example your library has debuggers named "connect:bodyParser", "connect:compress", "connect:session", instead of listing all three with `DEBUG=connect:bodyParser,connect:compress,connect:session`, you may simply do `DEBUG=connect:*`, or to run everything using this module simply use `DEBUG=*`.
93
+
94
+  You can also exclude specific debuggers by prefixing them with a "-" character.  For example, `DEBUG=*,-connect:*` would include all debuggers except those starting with "connect:".
95
+
96
+## Environment Variables
97
+
98
+  When running through Node.js, you can set a few environment variables that will
99
+  change the behavior of the debug logging:
100
+
101
+| Name      | Purpose                                         |
102
+|-----------|-------------------------------------------------|
103
+| `DEBUG`   | Enables/disables specific debugging namespaces. |
104
+| `DEBUG_COLORS`| Whether or not to use colors in the debug output. |
105
+| `DEBUG_DEPTH` | Object inspection depth. |
106
+| `DEBUG_SHOW_HIDDEN` | Shows hidden properties on inspected objects. |
107
+
108
+
109
+  __Note:__ The environment variables beginning with `DEBUG_` end up being
110
+  converted into an Options object that gets used with `%o`/`%O` formatters.
111
+  See the Node.js documentation for
112
+  [`util.inspect()`](https://nodejs.org/api/util.html#util_util_inspect_object_options)
113
+  for the complete list.
114
+
115
+## Formatters
116
+
117
+
118
+  Debug uses [printf-style](https://wikipedia.org/wiki/Printf_format_string) formatting. Below are the officially supported formatters:
119
+
120
+| Formatter | Representation |
121
+|-----------|----------------|
122
+| `%O`      | Pretty-print an Object on multiple lines. |
123
+| `%o`      | Pretty-print an Object all on a single line. |
124
+| `%s`      | String. |
125
+| `%d`      | Number (both integer and float). |
126
+| `%j`      | JSON. Replaced with the string '[Circular]' if the argument contains circular references. |
127
+| `%%`      | Single percent sign ('%'). This does not consume an argument. |
128
+
129
+### Custom formatters
130
+
131
+  You can add custom formatters by extending the `debug.formatters` object. For example, if you wanted to add support for rendering a Buffer as hex with `%h`, you could do something like:
132
+
133
+```js
134
+const createDebug = require('debug')
135
+createDebug.formatters.h = (v) => {
136
+  return v.toString('hex')
137
+}
138
+
139
+// …elsewhere
140
+const debug = createDebug('foo')
141
+debug('this is hex: %h', new Buffer('hello world'))
142
+//   foo this is hex: 68656c6c6f20776f726c6421 +0ms
143
+```
144
+
145
+## Browser support
146
+  You can build a browser-ready script using [browserify](https://github.com/substack/node-browserify),
147
+  or just use the [browserify-as-a-service](https://wzrd.in/) [build](https://wzrd.in/standalone/debug@latest),
148
+  if you don't want to build it yourself.
149
+
150
+  Debug's enable state is currently persisted by `localStorage`.
151
+  Consider the situation shown below where you have `worker:a` and `worker:b`,
152
+  and wish to debug both. You can enable this using `localStorage.debug`:
153
+
154
+```js
155
+localStorage.debug = 'worker:*'
156
+```
157
+
158
+And then refresh the page.
159
+
160
+```js
161
+a = debug('worker:a');
162
+b = debug('worker:b');
163
+
164
+setInterval(function(){
165
+  a('doing some work');
166
+}, 1000);
167
+
168
+setInterval(function(){
169
+  b('doing some work');
170
+}, 1200);
171
+```
172
+
173
+#### Web Inspector Colors
174
+
175
+  Colors are also enabled on "Web Inspectors" that understand the `%c` formatting
176
+  option. These are WebKit web inspectors, Firefox ([since version
177
+  31](https://hacks.mozilla.org/2014/05/editable-box-model-multiple-selection-sublime-text-keys-much-more-firefox-developer-tools-episode-31/))
178
+  and the Firebug plugin for Firefox (any version).
179
+
180
+  Colored output looks something like:
181
+
182
+  ![](https://cloud.githubusercontent.com/assets/71256/3139768/b98c5fd8-e8ef-11e3-862a-f7253b6f47c6.png)
183
+
184
+
185
+## Output streams
186
+
187
+  By default `debug` will log to stderr, however this can be configured per-namespace by overriding the `log` method:
188
+
189
+Example _stdout.js_:
190
+
191
+```js
192
+var debug = require('debug');
193
+var error = debug('app:error');
194
+
195
+// by default stderr is used
196
+error('goes to stderr!');
197
+
198
+var log = debug('app:log');
199
+// set this namespace to log via console.log
200
+log.log = console.log.bind(console); // don't forget to bind to console!
201
+log('goes to stdout');
202
+error('still goes to stderr!');
203
+
204
+// set all output to go via console.info
205
+// overrides all per-namespace log settings
206
+debug.log = console.info.bind(console);
207
+error('now goes to stdout via console.info');
208
+log('still goes to stdout, but via console.info now');
209
+```
210
+
211
+
212
+## Authors
213
+
214
+ - TJ Holowaychuk
215
+ - Nathan Rajlich
216
+ - Andrew Rhyne
217
+ 
218
+## Backers
219
+
220
+Support us with a monthly donation and help us continue our activities. [[Become a backer](https://opencollective.com/debug#backer)]
221
+
222
+<a href="https://opencollective.com/debug/backer/0/website" target="_blank"><img src="https://opencollective.com/debug/backer/0/avatar.svg"></a>
223
+<a href="https://opencollective.com/debug/backer/1/website" target="_blank"><img src="https://opencollective.com/debug/backer/1/avatar.svg"></a>
224
+<a href="https://opencollective.com/debug/backer/2/website" target="_blank"><img src="https://opencollective.com/debug/backer/2/avatar.svg"></a>
225
+<a href="https://opencollective.com/debug/backer/3/website" target="_blank"><img src="https://opencollective.com/debug/backer/3/avatar.svg"></a>
226
+<a href="https://opencollective.com/debug/backer/4/website" target="_blank"><img src="https://opencollective.com/debug/backer/4/avatar.svg"></a>
227
+<a href="https://opencollective.com/debug/backer/5/website" target="_blank"><img src="https://opencollective.com/debug/backer/5/avatar.svg"></a>
228
+<a href="https://opencollective.com/debug/backer/6/website" target="_blank"><img src="https://opencollective.com/debug/backer/6/avatar.svg"></a>
229
+<a href="https://opencollective.com/debug/backer/7/website" target="_blank"><img src="https://opencollective.com/debug/backer/7/avatar.svg"></a>
230
+<a href="https://opencollective.com/debug/backer/8/website" target="_blank"><img src="https://opencollective.com/debug/backer/8/avatar.svg"></a>
231
+<a href="https://opencollective.com/debug/backer/9/website" target="_blank"><img src="https://opencollective.com/debug/backer/9/avatar.svg"></a>
232
+<a href="https://opencollective.com/debug/backer/10/website" target="_blank"><img src="https://opencollective.com/debug/backer/10/avatar.svg"></a>
233
+<a href="https://opencollective.com/debug/backer/11/website" target="_blank"><img src="https://opencollective.com/debug/backer/11/avatar.svg"></a>
234
+<a href="https://opencollective.com/debug/backer/12/website" target="_blank"><img src="https://opencollective.com/debug/backer/12/avatar.svg"></a>
235
+<a href="https://opencollective.com/debug/backer/13/website" target="_blank"><img src="https://opencollective.com/debug/backer/13/avatar.svg"></a>
236
+<a href="https://opencollective.com/debug/backer/14/website" target="_blank"><img src="https://opencollective.com/debug/backer/14/avatar.svg"></a>
237
+<a href="https://opencollective.com/debug/backer/15/website" target="_blank"><img src="https://opencollective.com/debug/backer/15/avatar.svg"></a>
238
+<a href="https://opencollective.com/debug/backer/16/website" target="_blank"><img src="https://opencollective.com/debug/backer/16/avatar.svg"></a>
239
+<a href="https://opencollective.com/debug/backer/17/website" target="_blank"><img src="https://opencollective.com/debug/backer/17/avatar.svg"></a>
240
+<a href="https://opencollective.com/debug/backer/18/website" target="_blank"><img src="https://opencollective.com/debug/backer/18/avatar.svg"></a>
241
+<a href="https://opencollective.com/debug/backer/19/website" target="_blank"><img src="https://opencollective.com/debug/backer/19/avatar.svg"></a>
242
+<a href="https://opencollective.com/debug/backer/20/website" target="_blank"><img src="https://opencollective.com/debug/backer/20/avatar.svg"></a>
243
+<a href="https://opencollective.com/debug/backer/21/website" target="_blank"><img src="https://opencollective.com/debug/backer/21/avatar.svg"></a>
244
+<a href="https://opencollective.com/debug/backer/22/website" target="_blank"><img src="https://opencollective.com/debug/backer/22/avatar.svg"></a>
245
+<a href="https://opencollective.com/debug/backer/23/website" target="_blank"><img src="https://opencollective.com/debug/backer/23/avatar.svg"></a>
246
+<a href="https://opencollective.com/debug/backer/24/website" target="_blank"><img src="https://opencollective.com/debug/backer/24/avatar.svg"></a>
247
+<a href="https://opencollective.com/debug/backer/25/website" target="_blank"><img src="https://opencollective.com/debug/backer/25/avatar.svg"></a>
248
+<a href="https://opencollective.com/debug/backer/26/website" target="_blank"><img src="https://opencollective.com/debug/backer/26/avatar.svg"></a>
249
+<a href="https://opencollective.com/debug/backer/27/website" target="_blank"><img src="https://opencollective.com/debug/backer/27/avatar.svg"></a>
250
+<a href="https://opencollective.com/debug/backer/28/website" target="_blank"><img src="https://opencollective.com/debug/backer/28/avatar.svg"></a>
251
+<a href="https://opencollective.com/debug/backer/29/website" target="_blank"><img src="https://opencollective.com/debug/backer/29/avatar.svg"></a>
252
+
253
+
254
+## Sponsors
255
+
256
+Become a sponsor and get your logo on our README on Github with a link to your site. [[Become a sponsor](https://opencollective.com/debug#sponsor)]
257
+
258
+<a href="https://opencollective.com/debug/sponsor/0/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/0/avatar.svg"></a>
259
+<a href="https://opencollective.com/debug/sponsor/1/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/1/avatar.svg"></a>
260
+<a href="https://opencollective.com/debug/sponsor/2/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/2/avatar.svg"></a>
261
+<a href="https://opencollective.com/debug/sponsor/3/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/3/avatar.svg"></a>
262
+<a href="https://opencollective.com/debug/sponsor/4/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/4/avatar.svg"></a>
263
+<a href="https://opencollective.com/debug/sponsor/5/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/5/avatar.svg"></a>
264
+<a href="https://opencollective.com/debug/sponsor/6/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/6/avatar.svg"></a>
265
+<a href="https://opencollective.com/debug/sponsor/7/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/7/avatar.svg"></a>
266
+<a href="https://opencollective.com/debug/sponsor/8/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/8/avatar.svg"></a>
267
+<a href="https://opencollective.com/debug/sponsor/9/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/9/avatar.svg"></a>
268
+<a href="https://opencollective.com/debug/sponsor/10/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/10/avatar.svg"></a>
269
+<a href="https://opencollective.com/debug/sponsor/11/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/11/avatar.svg"></a>
270
+<a href="https://opencollective.com/debug/sponsor/12/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/12/avatar.svg"></a>
271
+<a href="https://opencollective.com/debug/sponsor/13/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/13/avatar.svg"></a>
272
+<a href="https://opencollective.com/debug/sponsor/14/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/14/avatar.svg"></a>
273
+<a href="https://opencollective.com/debug/sponsor/15/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/15/avatar.svg"></a>
274
+<a href="https://opencollective.com/debug/sponsor/16/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/16/avatar.svg"></a>
275
+<a href="https://opencollective.com/debug/sponsor/17/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/17/avatar.svg"></a>
276
+<a href="https://opencollective.com/debug/sponsor/18/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/18/avatar.svg"></a>
277
+<a href="https://opencollective.com/debug/sponsor/19/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/19/avatar.svg"></a>
278
+<a href="https://opencollective.com/debug/sponsor/20/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/20/avatar.svg"></a>
279
+<a href="https://opencollective.com/debug/sponsor/21/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/21/avatar.svg"></a>
280
+<a href="https://opencollective.com/debug/sponsor/22/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/22/avatar.svg"></a>
281
+<a href="https://opencollective.com/debug/sponsor/23/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/23/avatar.svg"></a>
282
+<a href="https://opencollective.com/debug/sponsor/24/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/24/avatar.svg"></a>
283
+<a href="https://opencollective.com/debug/sponsor/25/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/25/avatar.svg"></a>
284
+<a href="https://opencollective.com/debug/sponsor/26/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/26/avatar.svg"></a>
285
+<a href="https://opencollective.com/debug/sponsor/27/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/27/avatar.svg"></a>
286
+<a href="https://opencollective.com/debug/sponsor/28/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/28/avatar.svg"></a>
287
+<a href="https://opencollective.com/debug/sponsor/29/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/29/avatar.svg"></a>
288
+
289
+## License
290
+
291
+(The MIT License)
292
+
293
+Copyright (c) 2014-2016 TJ Holowaychuk &lt;tj@vision-media.ca&gt;
294
+
295
+Permission is hereby granted, free of charge, to any person obtaining
296
+a copy of this software and associated documentation files (the
297
+'Software'), to deal in the Software without restriction, including
298
+without limitation the rights to use, copy, modify, merge, publish,
299
+distribute, sublicense, and/or sell copies of the Software, and to
300
+permit persons to whom the Software is furnished to do so, subject to
301
+the following conditions:
302
+
303
+The above copyright notice and this permission notice shall be
304
+included in all copies or substantial portions of the Software.
305
+
306
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
307
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
308
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
309
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
310
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
311
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
312
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

+ 19
- 0
node_modules/debug/component.json Ver arquivo

@@ -0,0 +1,19 @@
1
+{
2
+  "name": "debug",
3
+  "repo": "visionmedia/debug",
4
+  "description": "small debugging utility",
5
+  "version": "2.6.9",
6
+  "keywords": [
7
+    "debug",
8
+    "log",
9
+    "debugger"
10
+  ],
11
+  "main": "src/browser.js",
12
+  "scripts": [
13
+    "src/browser.js",
14
+    "src/debug.js"
15
+  ],
16
+  "dependencies": {
17
+    "rauchg/ms.js": "0.7.1"
18
+  }
19
+}

+ 70
- 0
node_modules/debug/karma.conf.js Ver arquivo

@@ -0,0 +1,70 @@
1
+// Karma configuration
2
+// Generated on Fri Dec 16 2016 13:09:51 GMT+0000 (UTC)
3
+
4
+module.exports = function(config) {
5
+  config.set({
6
+
7
+    // base path that will be used to resolve all patterns (eg. files, exclude)
8
+    basePath: '',
9
+
10
+
11
+    // frameworks to use
12
+    // available frameworks: https://npmjs.org/browse/keyword/karma-adapter
13
+    frameworks: ['mocha', 'chai', 'sinon'],
14
+
15
+
16
+    // list of files / patterns to load in the browser
17
+    files: [
18
+      'dist/debug.js',
19
+      'test/*spec.js'
20
+    ],
21
+
22
+
23
+    // list of files to exclude
24
+    exclude: [
25
+      'src/node.js'
26
+    ],
27
+
28
+
29
+    // preprocess matching files before serving them to the browser
30
+    // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
31
+    preprocessors: {
32
+    },
33
+
34
+    // test results reporter to use
35
+    // possible values: 'dots', 'progress'
36
+    // available reporters: https://npmjs.org/browse/keyword/karma-reporter
37
+    reporters: ['progress'],
38
+
39
+
40
+    // web server port
41
+    port: 9876,
42
+
43
+
44
+    // enable / disable colors in the output (reporters and logs)
45
+    colors: true,
46
+
47
+
48
+    // level of logging
49
+    // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
50
+    logLevel: config.LOG_INFO,
51
+
52
+
53
+    // enable / disable watching file and executing tests whenever any file changes
54
+    autoWatch: true,
55
+
56
+
57
+    // start these browsers
58
+    // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
59
+    browsers: ['PhantomJS'],
60
+
61
+
62
+    // Continuous Integration mode
63
+    // if true, Karma captures browsers, runs the tests and exits
64
+    singleRun: false,
65
+
66
+    // Concurrency level
67
+    // how many browser should be started simultaneous
68
+    concurrency: Infinity
69
+  })
70
+}

+ 1
- 0
node_modules/debug/node.js Ver arquivo

@@ -0,0 +1 @@
1
+module.exports = require('./src/node');

+ 49
- 0
node_modules/debug/package.json Ver arquivo

@@ -0,0 +1,49 @@
1
+{
2
+  "name": "debug",
3
+  "version": "2.6.9",
4
+  "repository": {
5
+    "type": "git",
6
+    "url": "git://github.com/visionmedia/debug.git"
7
+  },
8
+  "description": "small debugging utility",
9
+  "keywords": [
10
+    "debug",
11
+    "log",
12
+    "debugger"
13
+  ],
14
+  "author": "TJ Holowaychuk <tj@vision-media.ca>",
15
+  "contributors": [
16
+    "Nathan Rajlich <nathan@tootallnate.net> (http://n8.io)",
17
+    "Andrew Rhyne <rhyneandrew@gmail.com>"
18
+  ],
19
+  "license": "MIT",
20
+  "dependencies": {
21
+    "ms": "2.0.0"
22
+  },
23
+  "devDependencies": {
24
+    "browserify": "9.0.3",
25
+    "chai": "^3.5.0",
26
+    "concurrently": "^3.1.0",
27
+    "coveralls": "^2.11.15",
28
+    "eslint": "^3.12.1",
29
+    "istanbul": "^0.4.5",
30
+    "karma": "^1.3.0",
31
+    "karma-chai": "^0.1.0",
32
+    "karma-mocha": "^1.3.0",
33
+    "karma-phantomjs-launcher": "^1.0.2",
34
+    "karma-sinon": "^1.0.5",
35
+    "mocha": "^3.2.0",
36
+    "mocha-lcov-reporter": "^1.2.0",
37
+    "rimraf": "^2.5.4",
38
+    "sinon": "^1.17.6",
39
+    "sinon-chai": "^2.8.0"
40
+  },
41
+  "main": "./src/index.js",
42
+  "browser": "./src/browser.js",
43
+  "component": {
44
+    "scripts": {
45
+      "debug/index.js": "browser.js",
46
+      "debug/debug.js": "debug.js"
47
+    }
48
+  }
49
+}

+ 185
- 0
node_modules/debug/src/browser.js Ver arquivo

@@ -0,0 +1,185 @@
1
+/**
2
+ * This is the web browser implementation of `debug()`.
3
+ *
4
+ * Expose `debug()` as the module.
5
+ */
6
+
7
+exports = module.exports = require('./debug');
8
+exports.log = log;
9
+exports.formatArgs = formatArgs;
10
+exports.save = save;
11
+exports.load = load;
12
+exports.useColors = useColors;
13
+exports.storage = 'undefined' != typeof chrome
14
+               && 'undefined' != typeof chrome.storage
15
+                  ? chrome.storage.local
16
+                  : localstorage();
17
+
18
+/**
19
+ * Colors.
20
+ */
21
+
22
+exports.colors = [
23
+  'lightseagreen',
24
+  'forestgreen',
25
+  'goldenrod',
26
+  'dodgerblue',
27
+  'darkorchid',
28
+  'crimson'
29
+];
30
+
31
+/**
32
+ * Currently only WebKit-based Web Inspectors, Firefox >= v31,
33
+ * and the Firebug extension (any Firefox version) are known
34
+ * to support "%c" CSS customizations.
35
+ *
36
+ * TODO: add a `localStorage` variable to explicitly enable/disable colors
37
+ */
38
+
39
+function useColors() {
40
+  // NB: In an Electron preload script, document will be defined but not fully
41
+  // initialized. Since we know we're in Chrome, we'll just detect this case
42
+  // explicitly
43
+  if (typeof window !== 'undefined' && window.process && window.process.type === 'renderer') {
44
+    return true;
45
+  }
46
+
47
+  // is webkit? http://stackoverflow.com/a/16459606/376773
48
+  // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
49
+  return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||
50
+    // is firebug? http://stackoverflow.com/a/398120/376773
51
+    (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||
52
+    // is firefox >= v31?
53
+    // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
54
+    (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||
55
+    // double check webkit in userAgent just in case we are in a worker
56
+    (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/));
57
+}
58
+
59
+/**
60
+ * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.
61
+ */
62
+
63
+exports.formatters.j = function(v) {
64
+  try {
65
+    return JSON.stringify(v);
66
+  } catch (err) {
67
+    return '[UnexpectedJSONParseError]: ' + err.message;
68
+  }
69
+};
70
+
71
+
72
+/**
73
+ * Colorize log arguments if enabled.
74
+ *
75
+ * @api public
76
+ */
77
+
78
+function formatArgs(args) {
79
+  var useColors = this.useColors;
80
+
81
+  args[0] = (useColors ? '%c' : '')
82
+    + this.namespace
83
+    + (useColors ? ' %c' : ' ')
84
+    + args[0]
85
+    + (useColors ? '%c ' : ' ')
86
+    + '+' + exports.humanize(this.diff);
87
+
88
+  if (!useColors) return;
89
+
90
+  var c = 'color: ' + this.color;
91
+  args.splice(1, 0, c, 'color: inherit')
92
+
93
+  // the final "%c" is somewhat tricky, because there could be other
94
+  // arguments passed either before or after the %c, so we need to
95
+  // figure out the correct index to insert the CSS into
96
+  var index = 0;
97
+  var lastC = 0;
98
+  args[0].replace(/%[a-zA-Z%]/g, function(match) {
99
+    if ('%%' === match) return;
100
+    index++;
101
+    if ('%c' === match) {
102
+      // we only are interested in the *last* %c
103
+      // (the user may have provided their own)
104
+      lastC = index;
105
+    }
106
+  });
107
+
108
+  args.splice(lastC, 0, c);
109
+}
110
+
111
+/**
112
+ * Invokes `console.log()` when available.
113
+ * No-op when `console.log` is not a "function".
114
+ *
115
+ * @api public
116
+ */
117
+
118
+function log() {
119
+  // this hackery is required for IE8/9, where
120
+  // the `console.log` function doesn't have 'apply'
121
+  return 'object' === typeof console
122
+    && console.log
123
+    && Function.prototype.apply.call(console.log, console, arguments);
124
+}
125
+
126
+/**
127
+ * Save `namespaces`.
128
+ *
129
+ * @param {String} namespaces
130
+ * @api private
131
+ */
132
+
133
+function save(namespaces) {
134
+  try {
135
+    if (null == namespaces) {
136
+      exports.storage.removeItem('debug');
137
+    } else {
138
+      exports.storage.debug = namespaces;
139
+    }
140
+  } catch(e) {}
141
+}
142
+
143
+/**
144
+ * Load `namespaces`.
145
+ *
146
+ * @return {String} returns the previously persisted debug modes
147
+ * @api private
148
+ */
149
+
150
+function load() {
151
+  var r;
152
+  try {
153
+    r = exports.storage.debug;
154
+  } catch(e) {}
155
+
156
+  // If debug isn't set in LS, and we're in Electron, try to load $DEBUG
157
+  if (!r && typeof process !== 'undefined' && 'env' in process) {
158
+    r = process.env.DEBUG;
159
+  }
160
+
161
+  return r;
162
+}
163
+
164
+/**
165
+ * Enable namespaces listed in `localStorage.debug` initially.
166
+ */
167
+
168
+exports.enable(load());
169
+
170
+/**
171
+ * Localstorage attempts to return the localstorage.
172
+ *
173
+ * This is necessary because safari throws
174
+ * when a user disables cookies/localstorage
175
+ * and you attempt to access it.
176
+ *
177
+ * @return {LocalStorage}
178
+ * @api private
179
+ */
180
+
181
+function localstorage() {
182
+  try {
183
+    return window.localStorage;
184
+  } catch (e) {}
185
+}

+ 202
- 0
node_modules/debug/src/debug.js Ver arquivo

@@ -0,0 +1,202 @@
1
+
2
+/**
3
+ * This is the common logic for both the Node.js and web browser
4
+ * implementations of `debug()`.
5
+ *
6
+ * Expose `debug()` as the module.
7
+ */
8
+
9
+exports = module.exports = createDebug.debug = createDebug['default'] = createDebug;
10
+exports.coerce = coerce;
11
+exports.disable = disable;
12
+exports.enable = enable;
13
+exports.enabled = enabled;
14
+exports.humanize = require('ms');
15
+
16
+/**
17
+ * The currently active debug mode names, and names to skip.
18
+ */
19
+
20
+exports.names = [];
21
+exports.skips = [];
22
+
23
+/**
24
+ * Map of special "%n" handling functions, for the debug "format" argument.
25
+ *
26
+ * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N".
27
+ */
28
+
29
+exports.formatters = {};
30
+
31
+/**
32
+ * Previous log timestamp.
33
+ */
34
+
35
+var prevTime;
36
+
37
+/**
38
+ * Select a color.
39
+ * @param {String} namespace
40
+ * @return {Number}
41
+ * @api private
42
+ */
43
+
44
+function selectColor(namespace) {
45
+  var hash = 0, i;
46
+
47
+  for (i in namespace) {
48
+    hash  = ((hash << 5) - hash) + namespace.charCodeAt(i);
49
+    hash |= 0; // Convert to 32bit integer
50
+  }
51
+
52
+  return exports.colors[Math.abs(hash) % exports.colors.length];
53
+}
54
+
55
+/**
56
+ * Create a debugger with the given `namespace`.
57
+ *
58
+ * @param {String} namespace
59
+ * @return {Function}
60
+ * @api public
61
+ */
62
+
63
+function createDebug(namespace) {
64
+
65
+  function debug() {
66
+    // disabled?
67
+    if (!debug.enabled) return;
68
+
69
+    var self = debug;
70
+
71
+    // set `diff` timestamp
72
+    var curr = +new Date();
73
+    var ms = curr - (prevTime || curr);
74
+    self.diff = ms;
75
+    self.prev = prevTime;
76
+    self.curr = curr;
77
+    prevTime = curr;
78
+
79
+    // turn the `arguments` into a proper Array
80
+    var args = new Array(arguments.length);
81
+    for (var i = 0; i < args.length; i++) {
82
+      args[i] = arguments[i];
83
+    }
84
+
85
+    args[0] = exports.coerce(args[0]);
86
+
87
+    if ('string' !== typeof args[0]) {
88
+      // anything else let's inspect with %O
89
+      args.unshift('%O');
90
+    }
91
+
92
+    // apply any `formatters` transformations
93
+    var index = 0;
94
+    args[0] = args[0].replace(/%([a-zA-Z%])/g, function(match, format) {
95
+      // if we encounter an escaped % then don't increase the array index
96
+      if (match === '%%') return match;
97
+      index++;
98
+      var formatter = exports.formatters[format];
99
+      if ('function' === typeof formatter) {
100
+        var val = args[index];
101
+        match = formatter.call(self, val);
102
+
103
+        // now we need to remove `args[index]` since it's inlined in the `format`
104
+        args.splice(index, 1);
105
+        index--;
106
+      }
107
+      return match;
108
+    });
109
+
110
+    // apply env-specific formatting (colors, etc.)
111
+    exports.formatArgs.call(self, args);
112
+
113
+    var logFn = debug.log || exports.log || console.log.bind(console);
114
+    logFn.apply(self, args);
115
+  }
116
+
117
+  debug.namespace = namespace;
118
+  debug.enabled = exports.enabled(namespace);
119
+  debug.useColors = exports.useColors();
120
+  debug.color = selectColor(namespace);
121
+
122
+  // env-specific initialization logic for debug instances
123
+  if ('function' === typeof exports.init) {
124
+    exports.init(debug);
125
+  }
126
+
127
+  return debug;
128
+}
129
+
130
+/**
131
+ * Enables a debug mode by namespaces. This can include modes
132
+ * separated by a colon and wildcards.
133
+ *
134
+ * @param {String} namespaces
135
+ * @api public
136
+ */
137
+
138
+function enable(namespaces) {
139
+  exports.save(namespaces);
140
+
141
+  exports.names = [];
142
+  exports.skips = [];
143
+
144
+  var split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/);
145
+  var len = split.length;
146
+
147
+  for (var i = 0; i < len; i++) {
148
+    if (!split[i]) continue; // ignore empty strings
149
+    namespaces = split[i].replace(/\*/g, '.*?');
150
+    if (namespaces[0] === '-') {
151
+      exports.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));
152
+    } else {
153
+      exports.names.push(new RegExp('^' + namespaces + '$'));
154
+    }
155
+  }
156
+}
157
+
158
+/**
159
+ * Disable debug output.
160
+ *
161
+ * @api public
162
+ */
163
+
164
+function disable() {
165
+  exports.enable('');
166
+}
167
+
168
+/**
169
+ * Returns true if the given mode name is enabled, false otherwise.
170
+ *
171
+ * @param {String} name
172
+ * @return {Boolean}
173
+ * @api public
174
+ */
175
+
176
+function enabled(name) {
177
+  var i, len;
178
+  for (i = 0, len = exports.skips.length; i < len; i++) {
179
+    if (exports.skips[i].test(name)) {
180
+      return false;
181
+    }
182
+  }
183
+  for (i = 0, len = exports.names.length; i < len; i++) {
184
+    if (exports.names[i].test(name)) {
185
+      return true;
186
+    }
187
+  }
188
+  return false;
189
+}
190
+
191
+/**
192
+ * Coerce `val`.
193
+ *
194
+ * @param {Mixed} val
195
+ * @return {Mixed}
196
+ * @api private
197
+ */
198
+
199
+function coerce(val) {
200
+  if (val instanceof Error) return val.stack || val.message;
201
+  return val;
202
+}

+ 10
- 0
node_modules/debug/src/index.js Ver arquivo

@@ -0,0 +1,10 @@
1
+/**
2
+ * Detect Electron renderer process, which is node, but we should
3
+ * treat as a browser.
4
+ */
5
+
6
+if (typeof process !== 'undefined' && process.type === 'renderer') {
7
+  module.exports = require('./browser.js');
8
+} else {
9
+  module.exports = require('./node.js');
10
+}

+ 15
- 0
node_modules/debug/src/inspector-log.js Ver arquivo

@@ -0,0 +1,15 @@
1
+module.exports = inspectorLog;
2
+
3
+// black hole
4
+const nullStream = new (require('stream').Writable)();
5
+nullStream._write = () => {};
6
+
7
+/**
8
+ * Outputs a `console.log()` to the Node.js Inspector console *only*.
9
+ */
10
+function inspectorLog() {
11
+  const stdout = console._stdout;
12
+  console._stdout = nullStream;
13
+  console.log.apply(console, arguments);
14
+  console._stdout = stdout;
15
+}

+ 248
- 0
node_modules/debug/src/node.js Ver arquivo

@@ -0,0 +1,248 @@
1
+/**
2
+ * Module dependencies.
3
+ */
4
+
5
+var tty = require('tty');
6
+var util = require('util');
7
+
8
+/**
9
+ * This is the Node.js implementation of `debug()`.
10
+ *
11
+ * Expose `debug()` as the module.
12
+ */
13
+
14
+exports = module.exports = require('./debug');
15
+exports.init = init;
16
+exports.log = log;
17
+exports.formatArgs = formatArgs;
18
+exports.save = save;
19
+exports.load = load;
20
+exports.useColors = useColors;
21
+
22
+/**
23
+ * Colors.
24
+ */
25
+
26
+exports.colors = [6, 2, 3, 4, 5, 1];
27
+
28
+/**
29
+ * Build up the default `inspectOpts` object from the environment variables.
30
+ *
31
+ *   $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js
32
+ */
33
+
34
+exports.inspectOpts = Object.keys(process.env).filter(function (key) {
35
+  return /^debug_/i.test(key);
36
+}).reduce(function (obj, key) {
37
+  // camel-case
38
+  var prop = key
39
+    .substring(6)
40
+    .toLowerCase()
41
+    .replace(/_([a-z])/g, function (_, k) { return k.toUpperCase() });
42
+
43
+  // coerce string value into JS value
44
+  var val = process.env[key];
45
+  if (/^(yes|on|true|enabled)$/i.test(val)) val = true;
46
+  else if (/^(no|off|false|disabled)$/i.test(val)) val = false;
47
+  else if (val === 'null') val = null;
48
+  else val = Number(val);
49
+
50
+  obj[prop] = val;
51
+  return obj;
52
+}, {});
53
+
54
+/**
55
+ * The file descriptor to write the `debug()` calls to.
56
+ * Set the `DEBUG_FD` env variable to override with another value. i.e.:
57
+ *
58
+ *   $ DEBUG_FD=3 node script.js 3>debug.log
59
+ */
60
+
61
+var fd = parseInt(process.env.DEBUG_FD, 10) || 2;
62
+
63
+if (1 !== fd && 2 !== fd) {
64
+  util.deprecate(function(){}, 'except for stderr(2) and stdout(1), any other usage of DEBUG_FD is deprecated. Override debug.log if you want to use a different log function (https://git.io/debug_fd)')()
65
+}
66
+
67
+var stream = 1 === fd ? process.stdout :
68
+             2 === fd ? process.stderr :
69
+             createWritableStdioStream(fd);
70
+
71
+/**
72
+ * Is stdout a TTY? Colored output is enabled when `true`.
73
+ */
74
+
75
+function useColors() {
76
+  return 'colors' in exports.inspectOpts
77
+    ? Boolean(exports.inspectOpts.colors)
78
+    : tty.isatty(fd);
79
+}
80
+
81
+/**
82
+ * Map %o to `util.inspect()`, all on a single line.
83
+ */
84
+
85
+exports.formatters.o = function(v) {
86
+  this.inspectOpts.colors = this.useColors;
87
+  return util.inspect(v, this.inspectOpts)
88
+    .split('\n').map(function(str) {
89
+      return str.trim()
90
+    }).join(' ');
91
+};
92
+
93
+/**
94
+ * Map %o to `util.inspect()`, allowing multiple lines if needed.
95
+ */
96
+
97
+exports.formatters.O = function(v) {
98
+  this.inspectOpts.colors = this.useColors;
99
+  return util.inspect(v, this.inspectOpts);
100
+};
101
+
102
+/**
103
+ * Adds ANSI color escape codes if enabled.
104
+ *
105
+ * @api public
106
+ */
107
+
108
+function formatArgs(args) {
109
+  var name = this.namespace;
110
+  var useColors = this.useColors;
111
+
112
+  if (useColors) {
113
+    var c = this.color;
114
+    var prefix = '  \u001b[3' + c + ';1m' + name + ' ' + '\u001b[0m';
115
+
116
+    args[0] = prefix + args[0].split('\n').join('\n' + prefix);
117
+    args.push('\u001b[3' + c + 'm+' + exports.humanize(this.diff) + '\u001b[0m');
118
+  } else {
119
+    args[0] = new Date().toUTCString()
120
+      + ' ' + name + ' ' + args[0];
121
+  }
122
+}
123
+
124
+/**
125
+ * Invokes `util.format()` with the specified arguments and writes to `stream`.
126
+ */
127
+
128
+function log() {
129
+  return stream.write(util.format.apply(util, arguments) + '\n');
130
+}
131
+
132
+/**
133
+ * Save `namespaces`.
134
+ *
135
+ * @param {String} namespaces
136
+ * @api private
137
+ */
138
+
139
+function save(namespaces) {
140
+  if (null == namespaces) {
141
+    // If you set a process.env field to null or undefined, it gets cast to the
142
+    // string 'null' or 'undefined'. Just delete instead.
143
+    delete process.env.DEBUG;
144
+  } else {
145
+    process.env.DEBUG = namespaces;
146
+  }
147
+}
148
+
149
+/**
150
+ * Load `namespaces`.
151
+ *
152
+ * @return {String} returns the previously persisted debug modes
153
+ * @api private
154
+ */
155
+
156
+function load() {
157
+  return process.env.DEBUG;
158
+}
159
+
160
+/**
161
+ * Copied from `node/src/node.js`.
162
+ *
163
+ * XXX: It's lame that node doesn't expose this API out-of-the-box. It also
164
+ * relies on the undocumented `tty_wrap.guessHandleType()` which is also lame.
165
+ */
166
+
167
+function createWritableStdioStream (fd) {
168
+  var stream;
169
+  var tty_wrap = process.binding('tty_wrap');
170
+
171
+  // Note stream._type is used for test-module-load-list.js
172
+
173
+  switch (tty_wrap.guessHandleType(fd)) {
174
+    case 'TTY':
175
+      stream = new tty.WriteStream(fd);
176
+      stream._type = 'tty';
177
+
178
+      // Hack to have stream not keep the event loop alive.
179
+      // See https://github.com/joyent/node/issues/1726
180
+      if (stream._handle && stream._handle.unref) {
181
+        stream._handle.unref();
182
+      }
183
+      break;
184
+
185
+    case 'FILE':
186
+      var fs = require('fs');
187
+      stream = new fs.SyncWriteStream(fd, { autoClose: false });
188
+      stream._type = 'fs';
189
+      break;
190
+
191
+    case 'PIPE':
192
+    case 'TCP':
193
+      var net = require('net');
194
+      stream = new net.Socket({
195
+        fd: fd,
196
+        readable: false,
197
+        writable: true
198
+      });
199
+
200
+      // FIXME Should probably have an option in net.Socket to create a
201
+      // stream from an existing fd which is writable only. But for now
202
+      // we'll just add this hack and set the `readable` member to false.
203
+      // Test: ./node test/fixtures/echo.js < /etc/passwd
204
+      stream.readable = false;
205
+      stream.read = null;
206
+      stream._type = 'pipe';
207
+
208
+      // FIXME Hack to have stream not keep the event loop alive.
209
+      // See https://github.com/joyent/node/issues/1726
210
+      if (stream._handle && stream._handle.unref) {
211
+        stream._handle.unref();
212
+      }
213
+      break;
214
+
215
+    default:
216
+      // Probably an error on in uv_guess_handle()
217
+      throw new Error('Implement me. Unknown stream file type!');
218
+  }
219
+
220
+  // For supporting legacy API we put the FD here.
221
+  stream.fd = fd;
222
+
223
+  stream._isStdio = true;
224
+
225
+  return stream;
226
+}
227
+
228
+/**
229
+ * Init logic for `debug` instances.
230
+ *
231
+ * Create a new `inspectOpts` object in case `useColors` is set
232
+ * differently for a particular `debug` instance.
233
+ */
234
+
235
+function init (debug) {
236
+  debug.inspectOpts = {};
237
+
238
+  var keys = Object.keys(exports.inspectOpts);
239
+  for (var i = 0; i < keys.length; i++) {
240
+    debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];
241
+  }
242
+}
243
+
244
+/**
245
+ * Enable namespaces listed in `process.env.DEBUG` initially.
246
+ */
247
+
248
+exports.enable(load());

+ 96
- 0
node_modules/depd/History.md Ver arquivo

@@ -0,0 +1,96 @@
1
+1.1.2 / 2018-01-11
2
+==================
3
+
4
+  * perf: remove argument reassignment
5
+  * Support Node.js 0.6 to 9.x
6
+
7
+1.1.1 / 2017-07-27
8
+==================
9
+
10
+  * Remove unnecessary `Buffer` loading
11
+  * Support Node.js 0.6 to 8.x
12
+
13
+1.1.0 / 2015-09-14
14
+==================
15
+
16
+  * Enable strict mode in more places
17
+  * Support io.js 3.x
18
+  * Support io.js 2.x
19
+  * Support web browser loading
20
+    - Requires bundler like Browserify or webpack
21
+
22
+1.0.1 / 2015-04-07
23
+==================
24
+
25
+  * Fix `TypeError`s when under `'use strict'` code
26
+  * Fix useless type name on auto-generated messages
27
+  * Support io.js 1.x
28
+  * Support Node.js 0.12
29
+
30
+1.0.0 / 2014-09-17
31
+==================
32
+
33
+  * No changes
34
+
35
+0.4.5 / 2014-09-09
36
+==================
37
+
38
+  * Improve call speed to functions using the function wrapper
39
+  * Support Node.js 0.6
40
+
41
+0.4.4 / 2014-07-27
42
+==================
43
+
44
+  * Work-around v8 generating empty stack traces
45
+
46
+0.4.3 / 2014-07-26
47
+==================
48
+
49
+  * Fix exception when global `Error.stackTraceLimit` is too low
50
+
51
+0.4.2 / 2014-07-19
52
+==================
53
+
54
+  * Correct call site for wrapped functions and properties
55
+
56
+0.4.1 / 2014-07-19
57
+==================
58
+
59
+  * Improve automatic message generation for function properties
60
+
61
+0.4.0 / 2014-07-19
62
+==================
63
+
64
+  * Add `TRACE_DEPRECATION` environment variable
65
+  * Remove non-standard grey color from color output
66
+  * Support `--no-deprecation` argument
67
+  * Support `--trace-deprecation` argument
68
+  * Support `deprecate.property(fn, prop, message)`
69
+
70
+0.3.0 / 2014-06-16
71
+==================
72
+
73
+  * Add `NO_DEPRECATION` environment variable
74
+
75
+0.2.0 / 2014-06-15
76
+==================
77
+
78
+  * Add `deprecate.property(obj, prop, message)`
79
+  * Remove `supports-color` dependency for node.js 0.8
80
+
81
+0.1.0 / 2014-06-15
82
+==================
83
+
84
+  * Add `deprecate.function(fn, message)`
85
+  * Add `process.on('deprecation', fn)` emitter
86
+  * Automatically generate message when omitted from `deprecate()`
87
+
88
+0.0.1 / 2014-06-15
89
+==================
90
+
91
+  * Fix warning for dynamic calls at singe call site
92
+
93
+0.0.0 / 2014-06-15
94
+==================
95
+
96
+  * Initial implementation

+ 22
- 0
node_modules/depd/LICENSE Ver arquivo

@@ -0,0 +1,22 @@
1
+(The MIT License)
2
+
3
+Copyright (c) 2014-2017 Douglas Christopher Wilson
4
+
5
+Permission is hereby granted, free of charge, to any person obtaining
6
+a copy of this software and associated documentation files (the
7
+'Software'), to deal in the Software without restriction, including
8
+without limitation the rights to use, copy, modify, merge, publish,
9
+distribute, sublicense, and/or sell copies of the Software, and to
10
+permit persons to whom the Software is furnished to do so, subject to
11
+the following conditions:
12
+
13
+The above copyright notice and this permission notice shall be
14
+included in all copies or substantial portions of the Software.
15
+
16
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
17
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
19
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
20
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
21
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
22
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

+ 280
- 0
node_modules/depd/Readme.md Ver arquivo

@@ -0,0 +1,280 @@
1
+# depd
2
+
3
+[![NPM Version][npm-version-image]][npm-url]
4
+[![NPM Downloads][npm-downloads-image]][npm-url]
5
+[![Node.js Version][node-image]][node-url]
6
+[![Linux Build][travis-image]][travis-url]
7
+[![Windows Build][appveyor-image]][appveyor-url]
8
+[![Coverage Status][coveralls-image]][coveralls-url]
9
+
10
+Deprecate all the things
11
+
12
+> With great modules comes great responsibility; mark things deprecated!
13
+
14
+## Install
15
+
16
+This module is installed directly using `npm`:
17
+
18
+```sh
19
+$ npm install depd
20
+```
21
+
22
+This module can also be bundled with systems like
23
+[Browserify](http://browserify.org/) or [webpack](https://webpack.github.io/),
24
+though by default this module will alter it's API to no longer display or
25
+track deprecations.
26
+
27
+## API
28
+
29
+<!-- eslint-disable no-unused-vars -->
30
+
31
+```js
32
+var deprecate = require('depd')('my-module')
33
+```
34
+
35
+This library allows you to display deprecation messages to your users.
36
+This library goes above and beyond with deprecation warnings by
37
+introspection of the call stack (but only the bits that it is interested
38
+in).
39
+
40
+Instead of just warning on the first invocation of a deprecated
41
+function and never again, this module will warn on the first invocation
42
+of a deprecated function per unique call site, making it ideal to alert
43
+users of all deprecated uses across the code base, rather than just
44
+whatever happens to execute first.
45
+
46
+The deprecation warnings from this module also include the file and line
47
+information for the call into the module that the deprecated function was
48
+in.
49
+
50
+**NOTE** this library has a similar interface to the `debug` module, and
51
+this module uses the calling file to get the boundary for the call stacks,
52
+so you should always create a new `deprecate` object in each file and not
53
+within some central file.
54
+
55
+### depd(namespace)
56
+
57
+Create a new deprecate function that uses the given namespace name in the
58
+messages and will display the call site prior to the stack entering the
59
+file this function was called from. It is highly suggested you use the
60
+name of your module as the namespace.
61
+
62
+### deprecate(message)
63
+
64
+Call this function from deprecated code to display a deprecation message.
65
+This message will appear once per unique caller site. Caller site is the
66
+first call site in the stack in a different file from the caller of this
67
+function.
68
+
69
+If the message is omitted, a message is generated for you based on the site
70
+of the `deprecate()` call and will display the name of the function called,
71
+similar to the name displayed in a stack trace.
72
+
73
+### deprecate.function(fn, message)
74
+
75
+Call this function to wrap a given function in a deprecation message on any
76
+call to the function. An optional message can be supplied to provide a custom
77
+message.
78
+
79
+### deprecate.property(obj, prop, message)
80
+
81
+Call this function to wrap a given property on object in a deprecation message
82
+on any accessing or setting of the property. An optional message can be supplied
83
+to provide a custom message.
84
+
85
+The method must be called on the object where the property belongs (not
86
+inherited from the prototype).
87
+
88
+If the property is a data descriptor, it will be converted to an accessor
89
+descriptor in order to display the deprecation message.
90
+
91
+### process.on('deprecation', fn)
92
+
93
+This module will allow easy capturing of deprecation errors by emitting the
94
+errors as the type "deprecation" on the global `process`. If there are no
95
+listeners for this type, the errors are written to STDERR as normal, but if
96
+there are any listeners, nothing will be written to STDERR and instead only
97
+emitted. From there, you can write the errors in a different format or to a
98
+logging source.
99
+
100
+The error represents the deprecation and is emitted only once with the same
101
+rules as writing to STDERR. The error has the following properties:
102
+
103
+  - `message` - This is the message given by the library
104
+  - `name` - This is always `'DeprecationError'`
105
+  - `namespace` - This is the namespace the deprecation came from
106
+  - `stack` - This is the stack of the call to the deprecated thing
107
+
108
+Example `error.stack` output:
109
+
110
+```
111
+DeprecationError: my-cool-module deprecated oldfunction
112
+    at Object.<anonymous> ([eval]-wrapper:6:22)
113
+    at Module._compile (module.js:456:26)
114
+    at evalScript (node.js:532:25)
115
+    at startup (node.js:80:7)
116
+    at node.js:902:3
117
+```
118
+
119
+### process.env.NO_DEPRECATION
120
+
121
+As a user of modules that are deprecated, the environment variable `NO_DEPRECATION`
122
+is provided as a quick solution to silencing deprecation warnings from being
123
+output. The format of this is similar to that of `DEBUG`:
124
+
125
+```sh
126
+$ NO_DEPRECATION=my-module,othermod node app.js
127
+```
128
+
129
+This will suppress deprecations from being output for "my-module" and "othermod".
130
+The value is a list of comma-separated namespaces. To suppress every warning
131
+across all namespaces, use the value `*` for a namespace.
132
+
133
+Providing the argument `--no-deprecation` to the `node` executable will suppress
134
+all deprecations (only available in Node.js 0.8 or higher).
135
+
136
+**NOTE** This will not suppress the deperecations given to any "deprecation"
137
+event listeners, just the output to STDERR.
138
+
139
+### process.env.TRACE_DEPRECATION
140
+
141
+As a user of modules that are deprecated, the environment variable `TRACE_DEPRECATION`
142
+is provided as a solution to getting more detailed location information in deprecation
143
+warnings by including the entire stack trace. The format of this is the same as
144
+`NO_DEPRECATION`:
145
+
146
+```sh
147
+$ TRACE_DEPRECATION=my-module,othermod node app.js
148
+```
149
+
150
+This will include stack traces for deprecations being output for "my-module" and
151
+"othermod". The value is a list of comma-separated namespaces. To trace every
152
+warning across all namespaces, use the value `*` for a namespace.
153
+
154
+Providing the argument `--trace-deprecation` to the `node` executable will trace
155
+all deprecations (only available in Node.js 0.8 or higher).
156
+
157
+**NOTE** This will not trace the deperecations silenced by `NO_DEPRECATION`.
158
+
159
+## Display
160
+
161
+![message](files/message.png)
162
+
163
+When a user calls a function in your library that you mark deprecated, they
164
+will see the following written to STDERR (in the given colors, similar colors
165
+and layout to the `debug` module):
166
+
167
+```
168
+bright cyan    bright yellow
169
+|              |          reset       cyan
170
+|              |          |           |
171
+▼              ▼          ▼           ▼
172
+my-cool-module deprecated oldfunction [eval]-wrapper:6:22
173
+▲              ▲          ▲           ▲
174
+|              |          |           |
175
+namespace      |          |           location of mycoolmod.oldfunction() call
176
+               |          deprecation message
177
+               the word "deprecated"
178
+```
179
+
180
+If the user redirects their STDERR to a file or somewhere that does not support
181
+colors, they see (similar layout to the `debug` module):
182
+
183
+```
184
+Sun, 15 Jun 2014 05:21:37 GMT my-cool-module deprecated oldfunction at [eval]-wrapper:6:22
185
+▲                             ▲              ▲          ▲              ▲
186
+|                             |              |          |              |
187
+timestamp of message          namespace      |          |             location of mycoolmod.oldfunction() call
188
+                                             |          deprecation message
189
+                                             the word "deprecated"
190
+```
191
+
192
+## Examples
193
+
194
+### Deprecating all calls to a function
195
+
196
+This will display a deprecated message about "oldfunction" being deprecated
197
+from "my-module" on STDERR.
198
+
199
+```js
200
+var deprecate = require('depd')('my-cool-module')
201
+
202
+// message automatically derived from function name
203
+// Object.oldfunction
204
+exports.oldfunction = deprecate.function(function oldfunction () {
205
+  // all calls to function are deprecated
206
+})
207
+
208
+// specific message
209
+exports.oldfunction = deprecate.function(function () {
210
+  // all calls to function are deprecated
211
+}, 'oldfunction')
212
+```
213
+
214
+### Conditionally deprecating a function call
215
+
216
+This will display a deprecated message about "weirdfunction" being deprecated
217
+from "my-module" on STDERR when called with less than 2 arguments.
218
+
219
+```js
220
+var deprecate = require('depd')('my-cool-module')
221
+
222
+exports.weirdfunction = function () {
223
+  if (arguments.length < 2) {
224
+    // calls with 0 or 1 args are deprecated
225
+    deprecate('weirdfunction args < 2')
226
+  }
227
+}
228
+```
229
+
230
+When calling `deprecate` as a function, the warning is counted per call site
231
+within your own module, so you can display different deprecations depending
232
+on different situations and the users will still get all the warnings:
233
+
234
+```js
235
+var deprecate = require('depd')('my-cool-module')
236
+
237
+exports.weirdfunction = function () {
238
+  if (arguments.length < 2) {
239
+    // calls with 0 or 1 args are deprecated
240
+    deprecate('weirdfunction args < 2')
241
+  } else if (typeof arguments[0] !== 'string') {
242
+    // calls with non-string first argument are deprecated
243
+    deprecate('weirdfunction non-string first arg')
244
+  }
245
+}
246
+```
247
+
248
+### Deprecating property access
249
+
250
+This will display a deprecated message about "oldprop" being deprecated
251
+from "my-module" on STDERR when accessed. A deprecation will be displayed
252
+when setting the value and when getting the value.
253
+
254
+```js
255
+var deprecate = require('depd')('my-cool-module')
256
+
257
+exports.oldprop = 'something'
258
+
259
+// message automatically derives from property name
260
+deprecate.property(exports, 'oldprop')
261
+
262
+// explicit message
263
+deprecate.property(exports, 'oldprop', 'oldprop >= 0.10')
264
+```
265
+
266
+## License
267
+
268
+[MIT](LICENSE)
269
+
270
+[npm-version-image]: https://img.shields.io/npm/v/depd.svg
271
+[npm-downloads-image]: https://img.shields.io/npm/dm/depd.svg
272
+[npm-url]: https://npmjs.org/package/depd
273
+[travis-image]: https://img.shields.io/travis/dougwilson/nodejs-depd/master.svg?label=linux
274
+[travis-url]: https://travis-ci.org/dougwilson/nodejs-depd
275
+[appveyor-image]: https://img.shields.io/appveyor/ci/dougwilson/nodejs-depd/master.svg?label=windows
276
+[appveyor-url]: https://ci.appveyor.com/project/dougwilson/nodejs-depd
277
+[coveralls-image]: https://img.shields.io/coveralls/dougwilson/nodejs-depd/master.svg
278
+[coveralls-url]: https://coveralls.io/r/dougwilson/nodejs-depd?branch=master
279
+[node-image]: https://img.shields.io/node/v/depd.svg
280
+[node-url]: https://nodejs.org/en/download/

+ 522
- 0
node_modules/depd/index.js Ver arquivo

@@ -0,0 +1,522 @@
1
+/*!
2
+ * depd
3
+ * Copyright(c) 2014-2017 Douglas Christopher Wilson
4
+ * MIT Licensed
5
+ */
6
+
7
+/**
8
+ * Module dependencies.
9
+ */
10
+
11
+var callSiteToString = require('./lib/compat').callSiteToString
12
+var eventListenerCount = require('./lib/compat').eventListenerCount
13
+var relative = require('path').relative
14
+
15
+/**
16
+ * Module exports.
17
+ */
18
+
19
+module.exports = depd
20
+
21
+/**
22
+ * Get the path to base files on.
23
+ */
24
+
25
+var basePath = process.cwd()
26
+
27
+/**
28
+ * Determine if namespace is contained in the string.
29
+ */
30
+
31
+function containsNamespace (str, namespace) {
32
+  var vals = str.split(/[ ,]+/)
33
+  var ns = String(namespace).toLowerCase()
34
+
35
+  for (var i = 0; i < vals.length; i++) {
36
+    var val = vals[i]
37
+
38
+    // namespace contained
39
+    if (val && (val === '*' || val.toLowerCase() === ns)) {
40
+      return true
41
+    }
42
+  }
43
+
44
+  return false
45
+}
46
+
47
+/**
48
+ * Convert a data descriptor to accessor descriptor.
49
+ */
50
+
51
+function convertDataDescriptorToAccessor (obj, prop, message) {
52
+  var descriptor = Object.getOwnPropertyDescriptor(obj, prop)
53
+  var value = descriptor.value
54
+
55
+  descriptor.get = function getter () { return value }
56
+
57
+  if (descriptor.writable) {
58
+    descriptor.set = function setter (val) { return (value = val) }
59
+  }
60
+
61
+  delete descriptor.value
62
+  delete descriptor.writable
63
+
64
+  Object.defineProperty(obj, prop, descriptor)
65
+
66
+  return descriptor
67
+}
68
+
69
+/**
70
+ * Create arguments string to keep arity.
71
+ */
72
+
73
+function createArgumentsString (arity) {
74
+  var str = ''
75
+
76
+  for (var i = 0; i < arity; i++) {
77
+    str += ', arg' + i
78
+  }
79
+
80
+  return str.substr(2)
81
+}
82
+
83
+/**
84
+ * Create stack string from stack.
85
+ */
86
+
87
+function createStackString (stack) {
88
+  var str = this.name + ': ' + this.namespace
89
+
90
+  if (this.message) {
91
+    str += ' deprecated ' + this.message
92
+  }
93
+
94
+  for (var i = 0; i < stack.length; i++) {
95
+    str += '\n    at ' + callSiteToString(stack[i])
96
+  }
97
+
98
+  return str
99
+}
100
+
101
+/**
102
+ * Create deprecate for namespace in caller.
103
+ */
104
+
105
+function depd (namespace) {
106
+  if (!namespace) {
107
+    throw new TypeError('argument namespace is required')
108
+  }
109
+
110
+  var stack = getStack()
111
+  var site = callSiteLocation(stack[1])
112
+  var file = site[0]
113
+
114
+  function deprecate (message) {
115
+    // call to self as log
116
+    log.call(deprecate, message)
117
+  }
118
+
119
+  deprecate._file = file
120
+  deprecate._ignored = isignored(namespace)
121
+  deprecate._namespace = namespace
122
+  deprecate._traced = istraced(namespace)
123
+  deprecate._warned = Object.create(null)
124
+
125
+  deprecate.function = wrapfunction
126
+  deprecate.property = wrapproperty
127
+
128
+  return deprecate
129
+}
130
+
131
+/**
132
+ * Determine if namespace is ignored.
133
+ */
134
+
135
+function isignored (namespace) {
136
+  /* istanbul ignore next: tested in a child processs */
137
+  if (process.noDeprecation) {
138
+    // --no-deprecation support
139
+    return true
140
+  }
141
+
142
+  var str = process.env.NO_DEPRECATION || ''
143
+
144
+  // namespace ignored
145
+  return containsNamespace(str, namespace)
146
+}
147
+
148
+/**
149
+ * Determine if namespace is traced.
150
+ */
151
+
152
+function istraced (namespace) {
153
+  /* istanbul ignore next: tested in a child processs */
154
+  if (process.traceDeprecation) {
155
+    // --trace-deprecation support
156
+    return true
157
+  }
158
+
159
+  var str = process.env.TRACE_DEPRECATION || ''
160
+
161
+  // namespace traced
162
+  return containsNamespace(str, namespace)
163
+}
164
+
165
+/**
166
+ * Display deprecation message.
167
+ */
168
+
169
+function log (message, site) {
170
+  var haslisteners = eventListenerCount(process, 'deprecation') !== 0
171
+
172
+  // abort early if no destination
173
+  if (!haslisteners && this._ignored) {
174
+    return
175
+  }
176
+
177
+  var caller
178
+  var callFile
179
+  var callSite
180
+  var depSite
181
+  var i = 0
182
+  var seen = false
183
+  var stack = getStack()
184
+  var file = this._file
185
+
186
+  if (site) {
187
+    // provided site
188
+    depSite = site
189
+    callSite = callSiteLocation(stack[1])
190
+    callSite.name = depSite.name
191
+    file = callSite[0]
192
+  } else {
193
+    // get call site
194
+    i = 2
195
+    depSite = callSiteLocation(stack[i])
196
+    callSite = depSite
197
+  }
198
+
199
+  // get caller of deprecated thing in relation to file
200
+  for (; i < stack.length; i++) {
201
+    caller = callSiteLocation(stack[i])
202
+    callFile = caller[0]
203
+
204
+    if (callFile === file) {
205
+      seen = true
206
+    } else if (callFile === this._file) {
207
+      file = this._file
208
+    } else if (seen) {
209
+      break
210
+    }
211
+  }
212
+
213
+  var key = caller
214
+    ? depSite.join(':') + '__' + caller.join(':')
215
+    : undefined
216
+
217
+  if (key !== undefined && key in this._warned) {
218
+    // already warned
219
+    return
220
+  }
221
+
222
+  this._warned[key] = true
223
+
224
+  // generate automatic message from call site
225
+  var msg = message
226
+  if (!msg) {
227
+    msg = callSite === depSite || !callSite.name
228
+      ? defaultMessage(depSite)
229
+      : defaultMessage(callSite)
230
+  }
231
+
232
+  // emit deprecation if listeners exist
233
+  if (haslisteners) {
234
+    var err = DeprecationError(this._namespace, msg, stack.slice(i))
235
+    process.emit('deprecation', err)
236
+    return
237
+  }
238
+
239
+  // format and write message
240
+  var format = process.stderr.isTTY
241
+    ? formatColor
242
+    : formatPlain
243
+  var output = format.call(this, msg, caller, stack.slice(i))
244
+  process.stderr.write(output + '\n', 'utf8')
245
+}
246
+
247
+/**
248
+ * Get call site location as array.
249
+ */
250
+
251
+function callSiteLocation (callSite) {
252
+  var file = callSite.getFileName() || '<anonymous>'
253
+  var line = callSite.getLineNumber()
254
+  var colm = callSite.getColumnNumber()
255
+
256
+  if (callSite.isEval()) {
257
+    file = callSite.getEvalOrigin() + ', ' + file
258
+  }
259
+
260
+  var site = [file, line, colm]
261
+
262
+  site.callSite = callSite
263
+  site.name = callSite.getFunctionName()
264
+
265
+  return site
266
+}
267
+
268
+/**
269
+ * Generate a default message from the site.
270
+ */
271
+
272
+function defaultMessage (site) {
273
+  var callSite = site.callSite
274
+  var funcName = site.name
275
+
276
+  // make useful anonymous name
277
+  if (!funcName) {
278
+    funcName = '<anonymous@' + formatLocation(site) + '>'
279
+  }
280
+
281
+  var context = callSite.getThis()
282
+  var typeName = context && callSite.getTypeName()
283
+
284
+  // ignore useless type name
285
+  if (typeName === 'Object') {
286
+    typeName = undefined
287
+  }
288
+
289
+  // make useful type name
290
+  if (typeName === 'Function') {
291
+    typeName = context.name || typeName
292
+  }
293
+
294
+  return typeName && callSite.getMethodName()
295
+    ? typeName + '.' + funcName
296
+    : funcName
297
+}
298
+
299
+/**
300
+ * Format deprecation message without color.
301
+ */
302
+
303
+function formatPlain (msg, caller, stack) {
304
+  var timestamp = new Date().toUTCString()
305
+
306
+  var formatted = timestamp +
307
+    ' ' + this._namespace +
308
+    ' deprecated ' + msg
309
+
310
+  // add stack trace
311
+  if (this._traced) {
312
+    for (var i = 0; i < stack.length; i++) {
313
+      formatted += '\n    at ' + callSiteToString(stack[i])
314
+    }
315
+
316
+    return formatted
317
+  }
318
+
319
+  if (caller) {
320
+    formatted += ' at ' + formatLocation(caller)
321
+  }
322
+
323
+  return formatted
324
+}
325
+
326
+/**
327
+ * Format deprecation message with color.
328
+ */
329
+
330
+function formatColor (msg, caller, stack) {
331
+  var formatted = '\x1b[36;1m' + this._namespace + '\x1b[22;39m' + // bold cyan
332
+    ' \x1b[33;1mdeprecated\x1b[22;39m' + // bold yellow
333
+    ' \x1b[0m' + msg + '\x1b[39m' // reset
334
+
335
+  // add stack trace
336
+  if (this._traced) {
337
+    for (var i = 0; i < stack.length; i++) {
338
+      formatted += '\n    \x1b[36mat ' + callSiteToString(stack[i]) + '\x1b[39m' // cyan
339
+    }
340
+
341
+    return formatted
342
+  }
343
+
344
+  if (caller) {
345
+    formatted += ' \x1b[36m' + formatLocation(caller) + '\x1b[39m' // cyan
346
+  }
347
+
348
+  return formatted
349
+}
350
+
351
+/**
352
+ * Format call site location.
353
+ */
354
+
355
+function formatLocation (callSite) {
356
+  return relative(basePath, callSite[0]) +
357
+    ':' + callSite[1] +
358
+    ':' + callSite[2]
359
+}
360
+
361
+/**
362
+ * Get the stack as array of call sites.
363
+ */
364
+
365
+function getStack () {
366
+  var limit = Error.stackTraceLimit
367
+  var obj = {}
368
+  var prep = Error.prepareStackTrace
369
+
370
+  Error.prepareStackTrace = prepareObjectStackTrace
371
+  Error.stackTraceLimit = Math.max(10, limit)
372
+
373
+  // capture the stack
374
+  Error.captureStackTrace(obj)
375
+
376
+  // slice this function off the top
377
+  var stack = obj.stack.slice(1)
378
+
379
+  Error.prepareStackTrace = prep
380
+  Error.stackTraceLimit = limit
381
+
382
+  return stack
383
+}
384
+
385
+/**
386
+ * Capture call site stack from v8.
387
+ */
388
+
389
+function prepareObjectStackTrace (obj, stack) {
390
+  return stack
391
+}
392
+
393
+/**
394
+ * Return a wrapped function in a deprecation message.
395
+ */
396
+
397
+function wrapfunction (fn, message) {
398
+  if (typeof fn !== 'function') {
399
+    throw new TypeError('argument fn must be a function')
400
+  }
401
+
402
+  var args = createArgumentsString(fn.length)
403
+  var deprecate = this // eslint-disable-line no-unused-vars
404
+  var stack = getStack()
405
+  var site = callSiteLocation(stack[1])
406
+
407
+  site.name = fn.name
408
+
409
+   // eslint-disable-next-line no-eval
410
+  var deprecatedfn = eval('(function (' + args + ') {\n' +
411
+    '"use strict"\n' +
412
+    'log.call(deprecate, message, site)\n' +
413
+    'return fn.apply(this, arguments)\n' +
414
+    '})')
415
+
416
+  return deprecatedfn
417
+}
418
+
419
+/**
420
+ * Wrap property in a deprecation message.
421
+ */
422
+
423
+function wrapproperty (obj, prop, message) {
424
+  if (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) {
425
+    throw new TypeError('argument obj must be object')
426
+  }
427
+
428
+  var descriptor = Object.getOwnPropertyDescriptor(obj, prop)
429
+
430
+  if (!descriptor) {
431
+    throw new TypeError('must call property on owner object')
432
+  }
433
+
434
+  if (!descriptor.configurable) {
435
+    throw new TypeError('property must be configurable')
436
+  }
437
+
438
+  var deprecate = this
439
+  var stack = getStack()
440
+  var site = callSiteLocation(stack[1])
441
+
442
+  // set site name
443
+  site.name = prop
444
+
445
+  // convert data descriptor
446
+  if ('value' in descriptor) {
447
+    descriptor = convertDataDescriptorToAccessor(obj, prop, message)
448
+  }
449
+
450
+  var get = descriptor.get
451
+  var set = descriptor.set
452
+
453
+  // wrap getter
454
+  if (typeof get === 'function') {
455
+    descriptor.get = function getter () {
456
+      log.call(deprecate, message, site)
457
+      return get.apply(this, arguments)
458
+    }
459
+  }
460
+
461
+  // wrap setter
462
+  if (typeof set === 'function') {
463
+    descriptor.set = function setter () {
464
+      log.call(deprecate, message, site)
465
+      return set.apply(this, arguments)
466
+    }
467
+  }
468
+
469
+  Object.defineProperty(obj, prop, descriptor)
470
+}
471
+
472
+/**
473
+ * Create DeprecationError for deprecation
474
+ */
475
+
476
+function DeprecationError (namespace, message, stack) {
477
+  var error = new Error()
478
+  var stackString
479
+
480
+  Object.defineProperty(error, 'constructor', {
481
+    value: DeprecationError
482
+  })
483
+
484
+  Object.defineProperty(error, 'message', {
485
+    configurable: true,
486
+    enumerable: false,
487
+    value: message,
488
+    writable: true
489
+  })
490
+
491
+  Object.defineProperty(error, 'name', {
492
+    enumerable: false,
493
+    configurable: true,
494
+    value: 'DeprecationError',
495
+    writable: true
496
+  })
497
+
498
+  Object.defineProperty(error, 'namespace', {
499
+    configurable: true,
500
+    enumerable: false,
501
+    value: namespace,
502
+    writable: true
503
+  })
504
+
505
+  Object.defineProperty(error, 'stack', {
506
+    configurable: true,
507
+    enumerable: false,
508
+    get: function () {
509
+      if (stackString !== undefined) {
510
+        return stackString
511
+      }
512
+
513
+      // prepare stack trace
514
+      return (stackString = createStackString.call(this, stack))
515
+    },
516
+    set: function setter (val) {
517
+      stackString = val
518
+    }
519
+  })
520
+
521
+  return error
522
+}

+ 77
- 0
node_modules/depd/lib/browser/index.js Ver arquivo

@@ -0,0 +1,77 @@
1
+/*!
2
+ * depd
3
+ * Copyright(c) 2015 Douglas Christopher Wilson
4
+ * MIT Licensed
5
+ */
6
+
7
+'use strict'
8
+
9
+/**
10
+ * Module exports.
11
+ * @public
12
+ */
13
+
14
+module.exports = depd
15
+
16
+/**
17
+ * Create deprecate for namespace in caller.
18
+ */
19
+
20
+function depd (namespace) {
21
+  if (!namespace) {
22
+    throw new TypeError('argument namespace is required')
23
+  }
24
+
25
+  function deprecate (message) {
26
+    // no-op in browser
27
+  }
28
+
29
+  deprecate._file = undefined
30
+  deprecate._ignored = true
31
+  deprecate._namespace = namespace
32
+  deprecate._traced = false
33
+  deprecate._warned = Object.create(null)
34
+
35
+  deprecate.function = wrapfunction
36
+  deprecate.property = wrapproperty
37
+
38
+  return deprecate
39
+}
40
+
41
+/**
42
+ * Return a wrapped function in a deprecation message.
43
+ *
44
+ * This is a no-op version of the wrapper, which does nothing but call
45
+ * validation.
46
+ */
47
+
48
+function wrapfunction (fn, message) {
49
+  if (typeof fn !== 'function') {
50
+    throw new TypeError('argument fn must be a function')
51
+  }
52
+
53
+  return fn
54
+}
55
+
56
+/**
57
+ * Wrap property in a deprecation message.
58
+ *
59
+ * This is a no-op version of the wrapper, which does nothing but call
60
+ * validation.
61
+ */
62
+
63
+function wrapproperty (obj, prop, message) {
64
+  if (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) {
65
+    throw new TypeError('argument obj must be object')
66
+  }
67
+
68
+  var descriptor = Object.getOwnPropertyDescriptor(obj, prop)
69
+
70
+  if (!descriptor) {
71
+    throw new TypeError('must call property on owner object')
72
+  }
73
+
74
+  if (!descriptor.configurable) {
75
+    throw new TypeError('property must be configurable')
76
+  }
77
+}

+ 103
- 0
node_modules/depd/lib/compat/callsite-tostring.js Ver arquivo

@@ -0,0 +1,103 @@
1
+/*!
2
+ * depd
3
+ * Copyright(c) 2014 Douglas Christopher Wilson
4
+ * MIT Licensed
5
+ */
6
+
7
+'use strict'
8
+
9
+/**
10
+ * Module exports.
11
+ */
12
+
13
+module.exports = callSiteToString
14
+
15
+/**
16
+ * Format a CallSite file location to a string.
17
+ */
18
+
19
+function callSiteFileLocation (callSite) {
20
+  var fileName
21
+  var fileLocation = ''
22
+
23
+  if (callSite.isNative()) {
24
+    fileLocation = 'native'
25
+  } else if (callSite.isEval()) {
26
+    fileName = callSite.getScriptNameOrSourceURL()
27
+    if (!fileName) {
28
+      fileLocation = callSite.getEvalOrigin()
29
+    }
30
+  } else {
31
+    fileName = callSite.getFileName()
32
+  }
33
+
34
+  if (fileName) {
35
+    fileLocation += fileName
36
+
37
+    var lineNumber = callSite.getLineNumber()
38
+    if (lineNumber != null) {
39
+      fileLocation += ':' + lineNumber
40
+
41
+      var columnNumber = callSite.getColumnNumber()
42
+      if (columnNumber) {
43
+        fileLocation += ':' + columnNumber
44
+      }
45
+    }
46
+  }
47
+
48
+  return fileLocation || 'unknown source'
49
+}
50
+
51
+/**
52
+ * Format a CallSite to a string.
53
+ */
54
+
55
+function callSiteToString (callSite) {
56
+  var addSuffix = true
57
+  var fileLocation = callSiteFileLocation(callSite)
58
+  var functionName = callSite.getFunctionName()
59
+  var isConstructor = callSite.isConstructor()
60
+  var isMethodCall = !(callSite.isToplevel() || isConstructor)
61
+  var line = ''
62
+
63
+  if (isMethodCall) {
64
+    var methodName = callSite.getMethodName()
65
+    var typeName = getConstructorName(callSite)
66
+
67
+    if (functionName) {
68
+      if (typeName && functionName.indexOf(typeName) !== 0) {
69
+        line += typeName + '.'
70
+      }
71
+
72
+      line += functionName
73
+
74
+      if (methodName && functionName.lastIndexOf('.' + methodName) !== functionName.length - methodName.length - 1) {
75
+        line += ' [as ' + methodName + ']'
76
+      }
77
+    } else {
78
+      line += typeName + '.' + (methodName || '<anonymous>')
79
+    }
80
+  } else if (isConstructor) {
81
+    line += 'new ' + (functionName || '<anonymous>')
82
+  } else if (functionName) {
83
+    line += functionName
84
+  } else {
85
+    addSuffix = false
86
+    line += fileLocation
87
+  }
88
+
89
+  if (addSuffix) {
90
+    line += ' (' + fileLocation + ')'
91
+  }
92
+
93
+  return line
94
+}
95
+
96
+/**
97
+ * Get constructor name of reviver.
98
+ */
99
+
100
+function getConstructorName (obj) {
101
+  var receiver = obj.receiver
102
+  return (receiver.constructor && receiver.constructor.name) || null
103
+}

+ 22
- 0
node_modules/depd/lib/compat/event-listener-count.js Ver arquivo

@@ -0,0 +1,22 @@
1
+/*!
2
+ * depd
3
+ * Copyright(c) 2015 Douglas Christopher Wilson
4
+ * MIT Licensed
5
+ */
6
+
7
+'use strict'
8
+
9
+/**
10
+ * Module exports.
11
+ * @public
12
+ */
13
+
14
+module.exports = eventListenerCount
15
+
16
+/**
17
+ * Get the count of listeners on an event emitter of a specific type.
18
+ */
19
+
20
+function eventListenerCount (emitter, type) {
21
+  return emitter.listeners(type).length
22
+}

+ 79
- 0
node_modules/depd/lib/compat/index.js Ver arquivo

@@ -0,0 +1,79 @@
1
+/*!
2
+ * depd
3
+ * Copyright(c) 2014-2015 Douglas Christopher Wilson
4
+ * MIT Licensed
5
+ */
6
+
7
+'use strict'
8
+
9
+/**
10
+ * Module dependencies.
11
+ * @private
12
+ */
13
+
14
+var EventEmitter = require('events').EventEmitter
15
+
16
+/**
17
+ * Module exports.
18
+ * @public
19
+ */
20
+
21
+lazyProperty(module.exports, 'callSiteToString', function callSiteToString () {
22
+  var limit = Error.stackTraceLimit
23
+  var obj = {}
24
+  var prep = Error.prepareStackTrace
25
+
26
+  function prepareObjectStackTrace (obj, stack) {
27
+    return stack
28
+  }
29
+
30
+  Error.prepareStackTrace = prepareObjectStackTrace
31
+  Error.stackTraceLimit = 2
32
+
33
+  // capture the stack
34
+  Error.captureStackTrace(obj)
35
+
36
+  // slice the stack
37
+  var stack = obj.stack.slice()
38
+
39
+  Error.prepareStackTrace = prep
40
+  Error.stackTraceLimit = limit
41
+
42
+  return stack[0].toString ? toString : require('./callsite-tostring')
43
+})
44
+
45
+lazyProperty(module.exports, 'eventListenerCount', function eventListenerCount () {
46
+  return EventEmitter.listenerCount || require('./event-listener-count')
47
+})
48
+
49
+/**
50
+ * Define a lazy property.
51
+ */
52
+
53
+function lazyProperty (obj, prop, getter) {
54
+  function get () {
55
+    var val = getter()
56
+
57
+    Object.defineProperty(obj, prop, {
58
+      configurable: true,
59
+      enumerable: true,
60
+      value: val
61
+    })
62
+
63
+    return val
64
+  }
65
+
66
+  Object.defineProperty(obj, prop, {
67
+    configurable: true,
68
+    enumerable: true,
69
+    get: get
70
+  })
71
+}
72
+
73
+/**
74
+ * Call toString() on the obj
75
+ */
76
+
77
+function toString (obj) {
78
+  return obj.toString()
79
+}

+ 41
- 0
node_modules/depd/package.json Ver arquivo

@@ -0,0 +1,41 @@
1
+{
2
+  "name": "depd",
3
+  "description": "Deprecate all the things",
4
+  "version": "1.1.2",
5
+  "author": "Douglas Christopher Wilson <doug@somethingdoug.com>",
6
+  "license": "MIT",
7
+  "keywords": [
8
+    "deprecate",
9
+    "deprecated"
10
+  ],
11
+  "repository": "dougwilson/nodejs-depd",
12
+  "browser": "lib/browser/index.js",
13
+  "devDependencies": {
14
+    "benchmark": "2.1.4",
15
+    "beautify-benchmark": "0.2.4",
16
+    "eslint": "3.19.0",
17
+    "eslint-config-standard": "7.1.0",
18
+    "eslint-plugin-markdown": "1.0.0-beta.7",
19
+    "eslint-plugin-promise": "3.6.0",
20
+    "eslint-plugin-standard": "3.0.1",
21
+    "istanbul": "0.4.5",
22
+    "mocha": "~1.21.5"
23
+  },
24
+  "files": [
25
+    "lib/",
26
+    "History.md",
27
+    "LICENSE",
28
+    "index.js",
29
+    "Readme.md"
30
+  ],
31
+  "engines": {
32
+    "node": ">= 0.6"
33
+  },
34
+  "scripts": {
35
+    "bench": "node benchmark/index.js",
36
+    "lint": "eslint --plugin markdown --ext js,md .",
37
+    "test": "mocha --reporter spec --bail test/",
38
+    "test-ci": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --no-exit test/",
39
+    "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot test/"
40
+  }
41
+}

+ 22
- 0
node_modules/destroy/LICENSE Ver arquivo

@@ -0,0 +1,22 @@
1
+
2
+The MIT License (MIT)
3
+
4
+Copyright (c) 2014 Jonathan Ong me@jongleberry.com
5
+
6
+Permission is hereby granted, free of charge, to any person obtaining a copy
7
+of this software and associated documentation files (the "Software"), to deal
8
+in the Software without restriction, including without limitation the rights
9
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+copies of the Software, and to permit persons to whom the Software is
11
+furnished to do so, subject to the following conditions:
12
+
13
+The above copyright notice and this permission notice shall be included in
14
+all copies or substantial portions of the Software.
15
+
16
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22
+THE SOFTWARE.

+ 60
- 0
node_modules/destroy/README.md Ver arquivo

@@ -0,0 +1,60 @@
1
+# Destroy
2
+
3
+[![NPM version][npm-image]][npm-url]
4
+[![Build status][travis-image]][travis-url]
5
+[![Test coverage][coveralls-image]][coveralls-url]
6
+[![License][license-image]][license-url]
7
+[![Downloads][downloads-image]][downloads-url]
8
+[![Gittip][gittip-image]][gittip-url]
9
+
10
+Destroy a stream.
11
+
12
+This module is meant to ensure a stream gets destroyed, handling different APIs
13
+and Node.js bugs.
14
+
15
+## API
16
+
17
+```js
18
+var destroy = require('destroy')
19
+```
20
+
21
+### destroy(stream)
22
+
23
+Destroy the given stream. In most cases, this is identical to a simple
24
+`stream.destroy()` call. The rules are as follows for a given stream:
25
+
26
+  1. If the `stream` is an instance of `ReadStream`, then call `stream.destroy()`
27
+     and add a listener to the `open` event to call `stream.close()` if it is
28
+     fired. This is for a Node.js bug that will leak a file descriptor if
29
+     `.destroy()` is called before `open`.
30
+  2. If the `stream` is not an instance of `Stream`, then nothing happens.
31
+  3. If the `stream` has a `.destroy()` method, then call it.
32
+
33
+The function returns the `stream` passed in as the argument.
34
+
35
+## Example
36
+
37
+```js
38
+var destroy = require('destroy')
39
+
40
+var fs = require('fs')
41
+var stream = fs.createReadStream('package.json')
42
+
43
+// ... and later
44
+destroy(stream)
45
+```
46
+
47
+[npm-image]: https://img.shields.io/npm/v/destroy.svg?style=flat-square
48
+[npm-url]: https://npmjs.org/package/destroy
49
+[github-tag]: http://img.shields.io/github/tag/stream-utils/destroy.svg?style=flat-square
50
+[github-url]: https://github.com/stream-utils/destroy/tags
51
+[travis-image]: https://img.shields.io/travis/stream-utils/destroy.svg?style=flat-square
52
+[travis-url]: https://travis-ci.org/stream-utils/destroy
53
+[coveralls-image]: https://img.shields.io/coveralls/stream-utils/destroy.svg?style=flat-square
54
+[coveralls-url]: https://coveralls.io/r/stream-utils/destroy?branch=master
55
+[license-image]: http://img.shields.io/npm/l/destroy.svg?style=flat-square
56
+[license-url]: LICENSE.md
57
+[downloads-image]: http://img.shields.io/npm/dm/destroy.svg?style=flat-square
58
+[downloads-url]: https://npmjs.org/package/destroy
59
+[gittip-image]: https://img.shields.io/gittip/jonathanong.svg?style=flat-square
60
+[gittip-url]: https://www.gittip.com/jonathanong/

+ 75
- 0
node_modules/destroy/index.js Ver arquivo

@@ -0,0 +1,75 @@
1
+/*!
2
+ * destroy
3
+ * Copyright(c) 2014 Jonathan Ong
4
+ * MIT Licensed
5
+ */
6
+
7
+'use strict'
8
+
9
+/**
10
+ * Module dependencies.
11
+ * @private
12
+ */
13
+
14
+var ReadStream = require('fs').ReadStream
15
+var Stream = require('stream')
16
+
17
+/**
18
+ * Module exports.
19
+ * @public
20
+ */
21
+
22
+module.exports = destroy
23
+
24
+/**
25
+ * Destroy a stream.
26
+ *
27
+ * @param {object} stream
28
+ * @public
29
+ */
30
+
31
+function destroy(stream) {
32
+  if (stream instanceof ReadStream) {
33
+    return destroyReadStream(stream)
34
+  }
35
+
36
+  if (!(stream instanceof Stream)) {
37
+    return stream
38
+  }
39
+
40
+  if (typeof stream.destroy === 'function') {
41
+    stream.destroy()
42
+  }
43
+
44
+  return stream
45
+}
46
+
47
+/**
48
+ * Destroy a ReadStream.
49
+ *
50
+ * @param {object} stream
51
+ * @private
52
+ */
53
+
54
+function destroyReadStream(stream) {
55
+  stream.destroy()
56
+
57
+  if (typeof stream.close === 'function') {
58
+    // node.js core bug work-around
59
+    stream.on('open', onOpenClose)
60
+  }
61
+
62
+  return stream
63
+}
64
+
65
+/**
66
+ * On open handler to close stream.
67
+ * @private
68
+ */
69
+
70
+function onOpenClose() {
71
+  if (typeof this.fd === 'number') {
72
+    // actually close down the fd
73
+    this.close()
74
+  }
75
+}

+ 37
- 0
node_modules/destroy/package.json Ver arquivo

@@ -0,0 +1,37 @@
1
+{
2
+  "name": "destroy",
3
+  "description": "destroy a stream if possible",
4
+  "version": "1.0.4",
5
+  "author": {
6
+    "name": "Jonathan Ong",
7
+    "email": "me@jongleberry.com",
8
+    "url": "http://jongleberry.com",
9
+    "twitter": "https://twitter.com/jongleberry"
10
+  },
11
+  "contributors": [
12
+    "Douglas Christopher Wilson <doug@somethingdoug.com>"
13
+  ],
14
+  "license": "MIT",
15
+  "repository": "stream-utils/destroy",
16
+  "devDependencies": {
17
+    "istanbul": "0.4.2",
18
+    "mocha": "2.3.4"
19
+  },
20
+  "scripts": {
21
+    "test": "mocha --reporter spec",
22
+    "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot",
23
+    "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter dot"
24
+  },
25
+  "files": [
26
+    "index.js",
27
+    "LICENSE"
28
+  ],
29
+  "keywords": [
30
+    "stream",
31
+    "streams",
32
+    "destroy",
33
+    "cleanup",
34
+    "leak",
35
+    "fd"
36
+  ]
37
+}

+ 22
- 0
node_modules/ee-first/LICENSE Ver arquivo

@@ -0,0 +1,22 @@
1
+
2
+The MIT License (MIT)
3
+
4
+Copyright (c) 2014 Jonathan Ong me@jongleberry.com
5
+
6
+Permission is hereby granted, free of charge, to any person obtaining a copy
7
+of this software and associated documentation files (the "Software"), to deal
8
+in the Software without restriction, including without limitation the rights
9
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+copies of the Software, and to permit persons to whom the Software is
11
+furnished to do so, subject to the following conditions:
12
+
13
+The above copyright notice and this permission notice shall be included in
14
+all copies or substantial portions of the Software.
15
+
16
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22
+THE SOFTWARE.

+ 80
- 0
node_modules/ee-first/README.md Ver arquivo

@@ -0,0 +1,80 @@
1
+# EE First
2
+
3
+[![NPM version][npm-image]][npm-url]
4
+[![Build status][travis-image]][travis-url]
5
+[![Test coverage][coveralls-image]][coveralls-url]
6
+[![License][license-image]][license-url]
7
+[![Downloads][downloads-image]][downloads-url]
8
+[![Gittip][gittip-image]][gittip-url]
9
+
10
+Get the first event in a set of event emitters and event pairs,
11
+then clean up after itself.
12
+
13
+## Install
14
+
15
+```sh
16
+$ npm install ee-first
17
+```
18
+
19
+## API
20
+
21
+```js
22
+var first = require('ee-first')
23
+```
24
+
25
+### first(arr, listener)
26
+
27
+Invoke `listener` on the first event from the list specified in `arr`. `arr` is
28
+an array of arrays, with each array in the format `[ee, ...event]`. `listener`
29
+will be called only once, the first time any of the given events are emitted. If
30
+`error` is one of the listened events, then if that fires first, the `listener`
31
+will be given the `err` argument.
32
+
33
+The `listener` is invoked as `listener(err, ee, event, args)`, where `err` is the
34
+first argument emitted from an `error` event, if applicable; `ee` is the event
35
+emitter that fired; `event` is the string event name that fired; and `args` is an
36
+array of the arguments that were emitted on the event.
37
+
38
+```js
39
+var ee1 = new EventEmitter()
40
+var ee2 = new EventEmitter()
41
+
42
+first([
43
+  [ee1, 'close', 'end', 'error'],
44
+  [ee2, 'error']
45
+], function (err, ee, event, args) {
46
+  // listener invoked
47
+})
48
+```
49
+
50
+#### .cancel()
51
+
52
+The group of listeners can be cancelled before being invoked and have all the event
53
+listeners removed from the underlying event emitters.
54
+
55
+```js
56
+var thunk = first([
57
+  [ee1, 'close', 'end', 'error'],
58
+  [ee2, 'error']
59
+], function (err, ee, event, args) {
60
+  // listener invoked
61
+})
62
+
63
+// cancel and clean up
64
+thunk.cancel()
65
+```
66
+
67
+[npm-image]: https://img.shields.io/npm/v/ee-first.svg?style=flat-square
68
+[npm-url]: https://npmjs.org/package/ee-first
69
+[github-tag]: http://img.shields.io/github/tag/jonathanong/ee-first.svg?style=flat-square
70
+[github-url]: https://github.com/jonathanong/ee-first/tags
71
+[travis-image]: https://img.shields.io/travis/jonathanong/ee-first.svg?style=flat-square
72
+[travis-url]: https://travis-ci.org/jonathanong/ee-first
73
+[coveralls-image]: https://img.shields.io/coveralls/jonathanong/ee-first.svg?style=flat-square
74
+[coveralls-url]: https://coveralls.io/r/jonathanong/ee-first?branch=master
75
+[license-image]: http://img.shields.io/npm/l/ee-first.svg?style=flat-square
76
+[license-url]: LICENSE.md
77
+[downloads-image]: http://img.shields.io/npm/dm/ee-first.svg?style=flat-square
78
+[downloads-url]: https://npmjs.org/package/ee-first
79
+[gittip-image]: https://img.shields.io/gittip/jonathanong.svg?style=flat-square
80
+[gittip-url]: https://www.gittip.com/jonathanong/

+ 95
- 0
node_modules/ee-first/index.js Ver arquivo

@@ -0,0 +1,95 @@
1
+/*!
2
+ * ee-first
3
+ * Copyright(c) 2014 Jonathan Ong
4
+ * MIT Licensed
5
+ */
6
+
7
+'use strict'
8
+
9
+/**
10
+ * Module exports.
11
+ * @public
12
+ */
13
+
14
+module.exports = first
15
+
16
+/**
17
+ * Get the first event in a set of event emitters and event pairs.
18
+ *
19
+ * @param {array} stuff
20
+ * @param {function} done
21
+ * @public
22
+ */
23
+
24
+function first(stuff, done) {
25
+  if (!Array.isArray(stuff))
26
+    throw new TypeError('arg must be an array of [ee, events...] arrays')
27
+
28
+  var cleanups = []
29
+
30
+  for (var i = 0; i < stuff.length; i++) {
31
+    var arr = stuff[i]
32
+
33
+    if (!Array.isArray(arr) || arr.length < 2)
34
+      throw new TypeError('each array member must be [ee, events...]')
35
+
36
+    var ee = arr[0]
37
+
38
+    for (var j = 1; j < arr.length; j++) {
39
+      var event = arr[j]
40
+      var fn = listener(event, callback)
41
+
42
+      // listen to the event
43
+      ee.on(event, fn)
44
+      // push this listener to the list of cleanups
45
+      cleanups.push({
46
+        ee: ee,
47
+        event: event,
48
+        fn: fn,
49
+      })
50
+    }
51
+  }
52
+
53
+  function callback() {
54
+    cleanup()
55
+    done.apply(null, arguments)
56
+  }
57
+
58
+  function cleanup() {
59
+    var x
60
+    for (var i = 0; i < cleanups.length; i++) {
61
+      x = cleanups[i]
62
+      x.ee.removeListener(x.event, x.fn)
63
+    }
64
+  }
65
+
66
+  function thunk(fn) {
67
+    done = fn
68
+  }
69
+
70
+  thunk.cancel = cleanup
71
+
72
+  return thunk
73
+}
74
+
75
+/**
76
+ * Create the event listener.
77
+ * @private
78
+ */
79
+
80
+function listener(event, done) {
81
+  return function onevent(arg1) {
82
+    var args = new Array(arguments.length)
83
+    var ee = this
84
+    var err = event === 'error'
85
+      ? arg1
86
+      : null
87
+
88
+    // copy args to prevent arguments escaping scope
89
+    for (var i = 0; i < args.length; i++) {
90
+      args[i] = arguments[i]
91
+    }
92
+
93
+    done(err, ee, event, args)
94
+  }
95
+}

+ 29
- 0
node_modules/ee-first/package.json Ver arquivo

@@ -0,0 +1,29 @@
1
+{
2
+  "name": "ee-first",
3
+  "description": "return the first event in a set of ee/event pairs",
4
+  "version": "1.1.1",
5
+  "author": {
6
+    "name": "Jonathan Ong",
7
+    "email": "me@jongleberry.com",
8
+    "url": "http://jongleberry.com",
9
+    "twitter": "https://twitter.com/jongleberry"
10
+  },
11
+  "contributors": [
12
+    "Douglas Christopher Wilson <doug@somethingdoug.com>"
13
+  ],
14
+  "license": "MIT",
15
+  "repository": "jonathanong/ee-first",
16
+  "devDependencies": {
17
+    "istanbul": "0.3.9",
18
+    "mocha": "2.2.5"
19
+  },
20
+  "files": [
21
+    "index.js",
22
+    "LICENSE"
23
+  ],
24
+  "scripts": {
25
+    "test": "mocha --reporter spec --bail --check-leaks test/",
26
+    "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/",
27
+    "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/"
28
+  }
29
+}

+ 14
- 0
node_modules/encodeurl/HISTORY.md Ver arquivo

@@ -0,0 +1,14 @@
1
+1.0.2 / 2018-01-21
2
+==================
3
+
4
+  * Fix encoding `%` as last character
5
+
6
+1.0.1 / 2016-06-09
7
+==================
8
+
9
+  * Fix encoding unpaired surrogates at start/end of string
10
+
11
+1.0.0 / 2016-06-08
12
+==================
13
+
14
+  * Initial release

+ 22
- 0
node_modules/encodeurl/LICENSE Ver arquivo

@@ -0,0 +1,22 @@
1
+(The MIT License)
2
+
3
+Copyright (c) 2016 Douglas Christopher Wilson
4
+
5
+Permission is hereby granted, free of charge, to any person obtaining
6
+a copy of this software and associated documentation files (the
7
+'Software'), to deal in the Software without restriction, including
8
+without limitation the rights to use, copy, modify, merge, publish,
9
+distribute, sublicense, and/or sell copies of the Software, and to
10
+permit persons to whom the Software is furnished to do so, subject to
11
+the following conditions:
12
+
13
+The above copyright notice and this permission notice shall be
14
+included in all copies or substantial portions of the Software.
15
+
16
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
17
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
19
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
20
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
21
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
22
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

+ 128
- 0
node_modules/encodeurl/README.md Ver arquivo

@@ -0,0 +1,128 @@
1
+# encodeurl
2
+
3
+[![NPM Version][npm-image]][npm-url]
4
+[![NPM Downloads][downloads-image]][downloads-url]
5
+[![Node.js Version][node-version-image]][node-version-url]
6
+[![Build Status][travis-image]][travis-url]
7
+[![Test Coverage][coveralls-image]][coveralls-url]
8
+
9
+Encode a URL to a percent-encoded form, excluding already-encoded sequences
10
+
11
+## Installation
12
+
13
+This is a [Node.js](https://nodejs.org/en/) module available through the
14
+[npm registry](https://www.npmjs.com/). Installation is done using the
15
+[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally):
16
+
17
+```sh
18
+$ npm install encodeurl
19
+```
20
+
21
+## API
22
+
23
+```js
24
+var encodeUrl = require('encodeurl')
25
+```
26
+
27
+### encodeUrl(url)
28
+
29
+Encode a URL to a percent-encoded form, excluding already-encoded sequences.
30
+
31
+This function will take an already-encoded URL and encode all the non-URL
32
+code points (as UTF-8 byte sequences). This function will not encode the
33
+"%" character unless it is not part of a valid sequence (`%20` will be
34
+left as-is, but `%foo` will be encoded as `%25foo`).
35
+
36
+This encode is meant to be "safe" and does not throw errors. It will try as
37
+hard as it can to properly encode the given URL, including replacing any raw,
38
+unpaired surrogate pairs with the Unicode replacement character prior to
39
+encoding.
40
+
41
+This function is _similar_ to the intrinsic function `encodeURI`, except it
42
+will not encode the `%` character if that is part of a valid sequence, will
43
+not encode `[` and `]` (for IPv6 hostnames) and will replace raw, unpaired
44
+surrogate pairs with the Unicode replacement character (instead of throwing).
45
+
46
+## Examples
47
+
48
+### Encode a URL containing user-controled data
49
+
50
+```js
51
+var encodeUrl = require('encodeurl')
52
+var escapeHtml = require('escape-html')
53
+
54
+http.createServer(function onRequest (req, res) {
55
+  // get encoded form of inbound url
56
+  var url = encodeUrl(req.url)
57
+
58
+  // create html message
59
+  var body = '<p>Location ' + escapeHtml(url) + ' not found</p>'
60
+
61
+  // send a 404
62
+  res.statusCode = 404
63
+  res.setHeader('Content-Type', 'text/html; charset=UTF-8')
64
+  res.setHeader('Content-Length', String(Buffer.byteLength(body, 'utf-8')))
65
+  res.end(body, 'utf-8')
66
+})
67
+```
68
+
69
+### Encode a URL for use in a header field
70
+
71
+```js
72
+var encodeUrl = require('encodeurl')
73
+var escapeHtml = require('escape-html')
74
+var url = require('url')
75
+
76
+http.createServer(function onRequest (req, res) {
77
+  // parse inbound url
78
+  var href = url.parse(req)
79
+
80
+  // set new host for redirect
81
+  href.host = 'localhost'
82
+  href.protocol = 'https:'
83
+  href.slashes = true
84
+
85
+  // create location header
86
+  var location = encodeUrl(url.format(href))
87
+
88
+  // create html message
89
+  var body = '<p>Redirecting to new site: ' + escapeHtml(location) + '</p>'
90
+
91
+  // send a 301
92
+  res.statusCode = 301
93
+  res.setHeader('Content-Type', 'text/html; charset=UTF-8')
94
+  res.setHeader('Content-Length', String(Buffer.byteLength(body, 'utf-8')))
95
+  res.setHeader('Location', location)
96
+  res.end(body, 'utf-8')
97
+})
98
+```
99
+
100
+## Testing
101
+
102
+```sh
103
+$ npm test
104
+$ npm run lint
105
+```
106
+
107
+## References
108
+
109
+- [RFC 3986: Uniform Resource Identifier (URI): Generic Syntax][rfc-3986]
110
+- [WHATWG URL Living Standard][whatwg-url]
111
+
112
+[rfc-3986]: https://tools.ietf.org/html/rfc3986
113
+[whatwg-url]: https://url.spec.whatwg.org/
114
+
115
+## License
116
+
117
+[MIT](LICENSE)
118
+
119
+[npm-image]: https://img.shields.io/npm/v/encodeurl.svg
120
+[npm-url]: https://npmjs.org/package/encodeurl
121
+[node-version-image]: https://img.shields.io/node/v/encodeurl.svg
122
+[node-version-url]: https://nodejs.org/en/download
123
+[travis-image]: https://img.shields.io/travis/pillarjs/encodeurl.svg
124
+[travis-url]: https://travis-ci.org/pillarjs/encodeurl
125
+[coveralls-image]: https://img.shields.io/coveralls/pillarjs/encodeurl.svg
126
+[coveralls-url]: https://coveralls.io/r/pillarjs/encodeurl?branch=master
127
+[downloads-image]: https://img.shields.io/npm/dm/encodeurl.svg
128
+[downloads-url]: https://npmjs.org/package/encodeurl

+ 60
- 0
node_modules/encodeurl/index.js Ver arquivo

@@ -0,0 +1,60 @@
1
+/*!
2
+ * encodeurl
3
+ * Copyright(c) 2016 Douglas Christopher Wilson
4
+ * MIT Licensed
5
+ */
6
+
7
+'use strict'
8
+
9
+/**
10
+ * Module exports.
11
+ * @public
12
+ */
13
+
14
+module.exports = encodeUrl
15
+
16
+/**
17
+ * RegExp to match non-URL code points, *after* encoding (i.e. not including "%")
18
+ * and including invalid escape sequences.
19
+ * @private
20
+ */
21
+
22
+var ENCODE_CHARS_REGEXP = /(?:[^\x21\x25\x26-\x3B\x3D\x3F-\x5B\x5D\x5F\x61-\x7A\x7E]|%(?:[^0-9A-Fa-f]|[0-9A-Fa-f][^0-9A-Fa-f]|$))+/g
23
+
24
+/**
25
+ * RegExp to match unmatched surrogate pair.
26
+ * @private
27
+ */
28
+
29
+var UNMATCHED_SURROGATE_PAIR_REGEXP = /(^|[^\uD800-\uDBFF])[\uDC00-\uDFFF]|[\uD800-\uDBFF]([^\uDC00-\uDFFF]|$)/g
30
+
31
+/**
32
+ * String to replace unmatched surrogate pair with.
33
+ * @private
34
+ */
35
+
36
+var UNMATCHED_SURROGATE_PAIR_REPLACE = '$1\uFFFD$2'
37
+
38
+/**
39
+ * Encode a URL to a percent-encoded form, excluding already-encoded sequences.
40
+ *
41
+ * This function will take an already-encoded URL and encode all the non-URL
42
+ * code points. This function will not encode the "%" character unless it is
43
+ * not part of a valid sequence (`%20` will be left as-is, but `%foo` will
44
+ * be encoded as `%25foo`).
45
+ *
46
+ * This encode is meant to be "safe" and does not throw errors. It will try as
47
+ * hard as it can to properly encode the given URL, including replacing any raw,
48
+ * unpaired surrogate pairs with the Unicode replacement character prior to
49
+ * encoding.
50
+ *
51
+ * @param {string} url
52
+ * @return {string}
53
+ * @public
54
+ */
55
+
56
+function encodeUrl (url) {
57
+  return String(url)
58
+    .replace(UNMATCHED_SURROGATE_PAIR_REGEXP, UNMATCHED_SURROGATE_PAIR_REPLACE)
59
+    .replace(ENCODE_CHARS_REGEXP, encodeURI)
60
+}

+ 40
- 0
node_modules/encodeurl/package.json Ver arquivo

@@ -0,0 +1,40 @@
1
+{
2
+  "name": "encodeurl",
3
+  "description": "Encode a URL to a percent-encoded form, excluding already-encoded sequences",
4
+  "version": "1.0.2",
5
+  "contributors": [
6
+    "Douglas Christopher Wilson <doug@somethingdoug.com>"
7
+  ],
8
+  "license": "MIT",
9
+  "keywords": [
10
+    "encode",
11
+    "encodeurl",
12
+    "url"
13
+  ],
14
+  "repository": "pillarjs/encodeurl",
15
+  "devDependencies": {
16
+    "eslint": "3.19.0",
17
+    "eslint-config-standard": "10.2.1",
18
+    "eslint-plugin-import": "2.8.0",
19
+    "eslint-plugin-node": "5.2.1",
20
+    "eslint-plugin-promise": "3.6.0",
21
+    "eslint-plugin-standard": "3.0.1",
22
+    "istanbul": "0.4.5",
23
+    "mocha": "2.5.3"
24
+  },
25
+  "files": [
26
+    "LICENSE",
27
+    "HISTORY.md",
28
+    "README.md",
29
+    "index.js"
30
+  ],
31
+  "engines": {
32
+    "node": ">= 0.8"
33
+  },
34
+  "scripts": {
35
+    "lint": "eslint .",
36
+    "test": "mocha --reporter spec --bail --check-leaks test/",
37
+    "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/",
38
+    "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/"
39
+  }
40
+}

+ 24
- 0
node_modules/escape-html/LICENSE Ver arquivo

@@ -0,0 +1,24 @@
1
+(The MIT License)
2
+
3
+Copyright (c) 2012-2013 TJ Holowaychuk
4
+Copyright (c) 2015 Andreas Lubbe
5
+Copyright (c) 2015 Tiancheng "Timothy" Gu
6
+
7
+Permission is hereby granted, free of charge, to any person obtaining
8
+a copy of this software and associated documentation files (the
9
+'Software'), to deal in the Software without restriction, including
10
+without limitation the rights to use, copy, modify, merge, publish,
11
+distribute, sublicense, and/or sell copies of the Software, and to
12
+permit persons to whom the Software is furnished to do so, subject to
13
+the following conditions:
14
+
15
+The above copyright notice and this permission notice shall be
16
+included in all copies or substantial portions of the Software.
17
+
18
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
19
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
20
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
21
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
22
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
23
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
24
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

+ 43
- 0
node_modules/escape-html/Readme.md Ver arquivo

@@ -0,0 +1,43 @@
1
+
2
+# escape-html
3
+
4
+  Escape string for use in HTML
5
+
6
+## Example
7
+
8
+```js
9
+var escape = require('escape-html');
10
+var html = escape('foo & bar');
11
+// -> foo &amp; bar
12
+```
13
+
14
+## Benchmark
15
+
16
+```
17
+$ npm run-script bench
18
+
19
+> escape-html@1.0.3 bench nodejs-escape-html
20
+> node benchmark/index.js
21
+
22
+
23
+  http_parser@1.0
24
+  node@0.10.33
25
+  v8@3.14.5.9
26
+  ares@1.9.0-DEV
27
+  uv@0.10.29
28
+  zlib@1.2.3
29
+  modules@11
30
+  openssl@1.0.1j
31
+
32
+  1 test completed.
33
+  2 tests completed.
34
+  3 tests completed.
35
+
36
+  no special characters    x 19,435,271 ops/sec ±0.85% (187 runs sampled)
37
+  single special character x  6,132,421 ops/sec ±0.67% (194 runs sampled)
38
+  many special characters  x  3,175,826 ops/sec ±0.65% (193 runs sampled)
39
+```
40
+
41
+## License
42
+
43
+  MIT

+ 78
- 0
node_modules/escape-html/index.js Ver arquivo

@@ -0,0 +1,78 @@
1
+/*!
2
+ * escape-html
3
+ * Copyright(c) 2012-2013 TJ Holowaychuk
4
+ * Copyright(c) 2015 Andreas Lubbe
5
+ * Copyright(c) 2015 Tiancheng "Timothy" Gu
6
+ * MIT Licensed
7
+ */
8
+
9
+'use strict';
10
+
11
+/**
12
+ * Module variables.
13
+ * @private
14
+ */
15
+
16
+var matchHtmlRegExp = /["'&<>]/;
17
+
18
+/**
19
+ * Module exports.
20
+ * @public
21
+ */
22
+
23
+module.exports = escapeHtml;
24
+
25
+/**
26
+ * Escape special characters in the given string of html.
27
+ *
28
+ * @param  {string} string The string to escape for inserting into HTML
29
+ * @return {string}
30
+ * @public
31
+ */
32
+
33
+function escapeHtml(string) {
34
+  var str = '' + string;
35
+  var match = matchHtmlRegExp.exec(str);
36
+
37
+  if (!match) {
38
+    return str;
39
+  }
40
+
41
+  var escape;
42
+  var html = '';
43
+  var index = 0;
44
+  var lastIndex = 0;
45
+
46
+  for (index = match.index; index < str.length; index++) {
47
+    switch (str.charCodeAt(index)) {
48
+      case 34: // "
49
+        escape = '&quot;';
50
+        break;
51
+      case 38: // &
52
+        escape = '&amp;';
53
+        break;
54
+      case 39: // '
55
+        escape = '&#39;';
56
+        break;
57
+      case 60: // <
58
+        escape = '&lt;';
59
+        break;
60
+      case 62: // >
61
+        escape = '&gt;';
62
+        break;
63
+      default:
64
+        continue;
65
+    }
66
+
67
+    if (lastIndex !== index) {
68
+      html += str.substring(lastIndex, index);
69
+    }
70
+
71
+    lastIndex = index + 1;
72
+    html += escape;
73
+  }
74
+
75
+  return lastIndex !== index
76
+    ? html + str.substring(lastIndex, index)
77
+    : html;
78
+}

+ 24
- 0
node_modules/escape-html/package.json Ver arquivo

@@ -0,0 +1,24 @@
1
+{
2
+  "name": "escape-html",
3
+  "description": "Escape string for use in HTML",
4
+  "version": "1.0.3",
5
+  "license": "MIT",
6
+  "keywords": [
7
+    "escape",
8
+    "html",
9
+    "utility"
10
+  ],
11
+  "repository": "component/escape-html",
12
+  "devDependencies": {
13
+    "benchmark": "1.0.0",
14
+    "beautify-benchmark": "0.2.4"
15
+  },
16
+  "files": [
17
+    "LICENSE",
18
+    "Readme.md",
19
+    "index.js"
20
+  ],
21
+  "scripts": {
22
+    "bench": "node benchmark/index.js"
23
+  }
24
+}

+ 83
- 0
node_modules/etag/HISTORY.md Ver arquivo

@@ -0,0 +1,83 @@
1
+1.8.1 / 2017-09-12
2
+==================
3
+
4
+  * perf: replace regular expression with substring
5
+
6
+1.8.0 / 2017-02-18
7
+==================
8
+
9
+  * Use SHA1 instead of MD5 for ETag hashing
10
+    - Improves performance for larger entities
11
+    - Works with FIPS 140-2 OpenSSL configuration
12
+
13
+1.7.0 / 2015-06-08
14
+==================
15
+
16
+  * Always include entity length in ETags for hash length extensions
17
+  * Generate non-Stats ETags using MD5 only (no longer CRC32)
18
+  * Improve stat performance by removing hashing
19
+  * Remove base64 padding in ETags to shorten
20
+  * Use MD5 instead of MD4 in weak ETags over 1KB
21
+
22
+1.6.0 / 2015-05-10
23
+==================
24
+
25
+  * Improve support for JXcore
26
+  * Remove requirement of `atime` in the stats object
27
+  * Support "fake" stats objects in environments without `fs`
28
+
29
+1.5.1 / 2014-11-19
30
+==================
31
+
32
+  * deps: crc@3.2.1
33
+    - Minor fixes
34
+
35
+1.5.0 / 2014-10-14
36
+==================
37
+
38
+  * Improve string performance
39
+  * Slightly improve speed for weak ETags over 1KB
40
+
41
+1.4.0 / 2014-09-21
42
+==================
43
+
44
+  * Support "fake" stats objects
45
+  * Support Node.js 0.6
46
+
47
+1.3.1 / 2014-09-14
48
+==================
49
+
50
+  * Use the (new and improved) `crc` for crc32
51
+
52
+1.3.0 / 2014-08-29
53
+==================
54
+
55
+  * Default strings to strong ETags
56
+  * Improve speed for weak ETags over 1KB
57
+
58
+1.2.1 / 2014-08-29
59
+==================
60
+
61
+  * Use the (much faster) `buffer-crc32` for crc32
62
+
63
+1.2.0 / 2014-08-24
64
+==================
65
+
66
+  * Add support for file stat objects
67
+
68
+1.1.0 / 2014-08-24
69
+==================
70
+
71
+  * Add fast-path for empty entity
72
+  * Add weak ETag generation
73
+  * Shrink size of generated ETags
74
+
75
+1.0.1 / 2014-08-24
76
+==================
77
+
78
+  * Fix behavior of string containing Unicode
79
+
80
+1.0.0 / 2014-05-18
81
+==================
82
+
83
+  * Initial release

+ 22
- 0
node_modules/etag/LICENSE Ver arquivo

@@ -0,0 +1,22 @@
1
+(The MIT License)
2
+
3
+Copyright (c) 2014-2016 Douglas Christopher Wilson
4
+
5
+Permission is hereby granted, free of charge, to any person obtaining
6
+a copy of this software and associated documentation files (the
7
+'Software'), to deal in the Software without restriction, including
8
+without limitation the rights to use, copy, modify, merge, publish,
9
+distribute, sublicense, and/or sell copies of the Software, and to
10
+permit persons to whom the Software is furnished to do so, subject to
11
+the following conditions:
12
+
13
+The above copyright notice and this permission notice shall be
14
+included in all copies or substantial portions of the Software.
15
+
16
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
17
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
19
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
20
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
21
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
22
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

+ 159
- 0
node_modules/etag/README.md Ver arquivo

@@ -0,0 +1,159 @@
1
+# etag
2
+
3
+[![NPM Version][npm-image]][npm-url]
4
+[![NPM Downloads][downloads-image]][downloads-url]
5
+[![Node.js Version][node-version-image]][node-version-url]
6
+[![Build Status][travis-image]][travis-url]
7
+[![Test Coverage][coveralls-image]][coveralls-url]
8
+
9
+Create simple HTTP ETags
10
+
11
+This module generates HTTP ETags (as defined in RFC 7232) for use in
12
+HTTP responses.
13
+
14
+## Installation
15
+
16
+This is a [Node.js](https://nodejs.org/en/) module available through the
17
+[npm registry](https://www.npmjs.com/). Installation is done using the
18
+[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally):
19
+
20
+```sh
21
+$ npm install etag
22
+```
23
+
24
+## API
25
+
26
+<!-- eslint-disable no-unused-vars -->
27
+
28
+```js
29
+var etag = require('etag')
30
+```
31
+
32
+### etag(entity, [options])
33
+
34
+Generate a strong ETag for the given entity. This should be the complete
35
+body of the entity. Strings, `Buffer`s, and `fs.Stats` are accepted. By
36
+default, a strong ETag is generated except for `fs.Stats`, which will
37
+generate a weak ETag (this can be overwritten by `options.weak`).
38
+
39
+<!-- eslint-disable no-undef -->
40
+
41
+```js
42
+res.setHeader('ETag', etag(body))
43
+```
44
+
45
+#### Options
46
+
47
+`etag` accepts these properties in the options object.
48
+
49
+##### weak
50
+
51
+Specifies if the generated ETag will include the weak validator mark (that
52
+is, the leading `W/`). The actual entity tag is the same. The default value
53
+is `false`, unless the `entity` is `fs.Stats`, in which case it is `true`.
54
+
55
+## Testing
56
+
57
+```sh
58
+$ npm test
59
+```
60
+
61
+## Benchmark
62
+
63
+```bash
64
+$ npm run-script bench
65
+
66
+> etag@1.8.1 bench nodejs-etag
67
+> node benchmark/index.js
68
+
69
+  http_parser@2.7.0
70
+  node@6.11.1
71
+  v8@5.1.281.103
72
+  uv@1.11.0
73
+  zlib@1.2.11
74
+  ares@1.10.1-DEV
75
+  icu@58.2
76
+  modules@48
77
+  openssl@1.0.2k
78
+
79
+> node benchmark/body0-100b.js
80
+
81
+  100B body
82
+
83
+  4 tests completed.
84
+
85
+  buffer - strong x 258,647 ops/sec ±1.07% (180 runs sampled)
86
+  buffer - weak   x 263,812 ops/sec ±0.61% (184 runs sampled)
87
+  string - strong x 259,955 ops/sec ±1.19% (185 runs sampled)
88
+  string - weak   x 264,356 ops/sec ±1.09% (184 runs sampled)
89
+
90
+> node benchmark/body1-1kb.js
91
+
92
+  1KB body
93
+
94
+  4 tests completed.
95
+
96
+  buffer - strong x 189,018 ops/sec ±1.12% (182 runs sampled)
97
+  buffer - weak   x 190,586 ops/sec ±0.81% (186 runs sampled)
98
+  string - strong x 144,272 ops/sec ±0.96% (188 runs sampled)
99
+  string - weak   x 145,380 ops/sec ±1.43% (187 runs sampled)
100
+
101
+> node benchmark/body2-5kb.js
102
+
103
+  5KB body
104
+
105
+  4 tests completed.
106
+
107
+  buffer - strong x 92,435 ops/sec ±0.42% (188 runs sampled)
108
+  buffer - weak   x 92,373 ops/sec ±0.58% (189 runs sampled)
109
+  string - strong x 48,850 ops/sec ±0.56% (186 runs sampled)
110
+  string - weak   x 49,380 ops/sec ±0.56% (190 runs sampled)
111
+
112
+> node benchmark/body3-10kb.js
113
+
114
+  10KB body
115
+
116
+  4 tests completed.
117
+
118
+  buffer - strong x 55,989 ops/sec ±0.93% (188 runs sampled)
119
+  buffer - weak   x 56,148 ops/sec ±0.55% (190 runs sampled)
120
+  string - strong x 27,345 ops/sec ±0.43% (188 runs sampled)
121
+  string - weak   x 27,496 ops/sec ±0.45% (190 runs sampled)
122
+
123
+> node benchmark/body4-100kb.js
124
+
125
+  100KB body
126
+
127
+  4 tests completed.
128
+
129
+  buffer - strong x 7,083 ops/sec ±0.22% (190 runs sampled)
130
+  buffer - weak   x 7,115 ops/sec ±0.26% (191 runs sampled)
131
+  string - strong x 3,068 ops/sec ±0.34% (190 runs sampled)
132
+  string - weak   x 3,096 ops/sec ±0.35% (190 runs sampled)
133
+
134
+> node benchmark/stats.js
135
+
136
+  stat
137
+
138
+  4 tests completed.
139
+
140
+  real - strong x 871,642 ops/sec ±0.34% (189 runs sampled)
141
+  real - weak   x 867,613 ops/sec ±0.39% (190 runs sampled)
142
+  fake - strong x 401,051 ops/sec ±0.40% (189 runs sampled)
143
+  fake - weak   x 400,100 ops/sec ±0.47% (188 runs sampled)
144
+```
145
+
146
+## License
147
+
148
+[MIT](LICENSE)
149
+
150
+[npm-image]: https://img.shields.io/npm/v/etag.svg
151
+[npm-url]: https://npmjs.org/package/etag
152
+[node-version-image]: https://img.shields.io/node/v/etag.svg
153
+[node-version-url]: https://nodejs.org/en/download/
154
+[travis-image]: https://img.shields.io/travis/jshttp/etag/master.svg
155
+[travis-url]: https://travis-ci.org/jshttp/etag
156
+[coveralls-image]: https://img.shields.io/coveralls/jshttp/etag/master.svg
157
+[coveralls-url]: https://coveralls.io/r/jshttp/etag?branch=master
158
+[downloads-image]: https://img.shields.io/npm/dm/etag.svg
159
+[downloads-url]: https://npmjs.org/package/etag

+ 131
- 0
node_modules/etag/index.js Ver arquivo

@@ -0,0 +1,131 @@
1
+/*!
2
+ * etag
3
+ * Copyright(c) 2014-2016 Douglas Christopher Wilson
4
+ * MIT Licensed
5
+ */
6
+
7
+'use strict'
8
+
9
+/**
10
+ * Module exports.
11
+ * @public
12
+ */
13
+
14
+module.exports = etag
15
+
16
+/**
17
+ * Module dependencies.
18
+ * @private
19
+ */
20
+
21
+var crypto = require('crypto')
22
+var Stats = require('fs').Stats
23
+
24
+/**
25
+ * Module variables.
26
+ * @private
27
+ */
28
+
29
+var toString = Object.prototype.toString
30
+
31
+/**
32
+ * Generate an entity tag.
33
+ *
34
+ * @param {Buffer|string} entity
35
+ * @return {string}
36
+ * @private
37
+ */
38
+
39
+function entitytag (entity) {
40
+  if (entity.length === 0) {
41
+    // fast-path empty
42
+    return '"0-2jmj7l5rSw0yVb/vlWAYkK/YBwk"'
43
+  }
44
+
45
+  // compute hash of entity
46
+  var hash = crypto
47
+    .createHash('sha1')
48
+    .update(entity, 'utf8')
49
+    .digest('base64')
50
+    .substring(0, 27)
51
+
52
+  // compute length of entity
53
+  var len = typeof entity === 'string'
54
+    ? Buffer.byteLength(entity, 'utf8')
55
+    : entity.length
56
+
57
+  return '"' + len.toString(16) + '-' + hash + '"'
58
+}
59
+
60
+/**
61
+ * Create a simple ETag.
62
+ *
63
+ * @param {string|Buffer|Stats} entity
64
+ * @param {object} [options]
65
+ * @param {boolean} [options.weak]
66
+ * @return {String}
67
+ * @public
68
+ */
69
+
70
+function etag (entity, options) {
71
+  if (entity == null) {
72
+    throw new TypeError('argument entity is required')
73
+  }
74
+
75
+  // support fs.Stats object
76
+  var isStats = isstats(entity)
77
+  var weak = options && typeof options.weak === 'boolean'
78
+    ? options.weak
79
+    : isStats
80
+
81
+  // validate argument
82
+  if (!isStats && typeof entity !== 'string' && !Buffer.isBuffer(entity)) {
83
+    throw new TypeError('argument entity must be string, Buffer, or fs.Stats')
84
+  }
85
+
86
+  // generate entity tag
87
+  var tag = isStats
88
+    ? stattag(entity)
89
+    : entitytag(entity)
90
+
91
+  return weak
92
+    ? 'W/' + tag
93
+    : tag
94
+}
95
+
96
+/**
97
+ * Determine if object is a Stats object.
98
+ *
99
+ * @param {object} obj
100
+ * @return {boolean}
101
+ * @api private
102
+ */
103
+
104
+function isstats (obj) {
105
+  // genuine fs.Stats
106
+  if (typeof Stats === 'function' && obj instanceof Stats) {
107
+    return true
108
+  }
109
+
110
+  // quack quack
111
+  return obj && typeof obj === 'object' &&
112
+    'ctime' in obj && toString.call(obj.ctime) === '[object Date]' &&
113
+    'mtime' in obj && toString.call(obj.mtime) === '[object Date]' &&
114
+    'ino' in obj && typeof obj.ino === 'number' &&
115
+    'size' in obj && typeof obj.size === 'number'
116
+}
117
+
118
+/**
119
+ * Generate a tag for a stat.
120
+ *
121
+ * @param {object} stat
122
+ * @return {string}
123
+ * @private
124
+ */
125
+
126
+function stattag (stat) {
127
+  var mtime = stat.mtime.getTime().toString(16)
128
+  var size = stat.size.toString(16)
129
+
130
+  return '"' + size + '-' + mtime + '"'
131
+}

+ 47
- 0
node_modules/etag/package.json Ver arquivo

@@ -0,0 +1,47 @@
1
+{
2
+  "name": "etag",
3
+  "description": "Create simple HTTP ETags",
4
+  "version": "1.8.1",
5
+  "contributors": [
6
+    "Douglas Christopher Wilson <doug@somethingdoug.com>",
7
+    "David Björklund <david.bjorklund@gmail.com>"
8
+  ],
9
+  "license": "MIT",
10
+  "keywords": [
11
+    "etag",
12
+    "http",
13
+    "res"
14
+  ],
15
+  "repository": "jshttp/etag",
16
+  "devDependencies": {
17
+    "beautify-benchmark": "0.2.4",
18
+    "benchmark": "2.1.4",
19
+    "eslint": "3.19.0",
20
+    "eslint-config-standard": "10.2.1",
21
+    "eslint-plugin-import": "2.7.0",
22
+    "eslint-plugin-markdown": "1.0.0-beta.6",
23
+    "eslint-plugin-node": "5.1.1",
24
+    "eslint-plugin-promise": "3.5.0",
25
+    "eslint-plugin-standard": "3.0.1",
26
+    "istanbul": "0.4.5",
27
+    "mocha": "1.21.5",
28
+    "safe-buffer": "5.1.1",
29
+    "seedrandom": "2.4.3"
30
+  },
31
+  "files": [
32
+    "LICENSE",
33
+    "HISTORY.md",
34
+    "README.md",
35
+    "index.js"
36
+  ],
37
+  "engines": {
38
+    "node": ">= 0.6"
39
+  },
40
+  "scripts": {
41
+    "bench": "node benchmark/index.js",
42
+    "lint": "eslint --plugin markdown --ext js,md .",
43
+    "test": "mocha --reporter spec --bail --check-leaks test/",
44
+    "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/",
45
+    "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/"
46
+  }
47
+}

+ 3510
- 0
node_modules/express/History.md
Diferenças do arquivo suprimidas por serem muito extensas
Ver arquivo


+ 24
- 0
node_modules/express/LICENSE Ver arquivo

@@ -0,0 +1,24 @@
1
+(The MIT License)
2
+
3
+Copyright (c) 2009-2014 TJ Holowaychuk <tj@vision-media.ca>
4
+Copyright (c) 2013-2014 Roman Shtylman <shtylman+expressjs@gmail.com>
5
+Copyright (c) 2014-2015 Douglas Christopher Wilson <doug@somethingdoug.com>
6
+
7
+Permission is hereby granted, free of charge, to any person obtaining
8
+a copy of this software and associated documentation files (the
9
+'Software'), to deal in the Software without restriction, including
10
+without limitation the rights to use, copy, modify, merge, publish,
11
+distribute, sublicense, and/or sell copies of the Software, and to
12
+permit persons to whom the Software is furnished to do so, subject to
13
+the following conditions:
14
+
15
+The above copyright notice and this permission notice shall be
16
+included in all copies or substantial portions of the Software.
17
+
18
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
19
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
20
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
21
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
22
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
23
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
24
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

+ 158
- 0
node_modules/express/Readme.md Ver arquivo

@@ -0,0 +1,158 @@
1
+[![Express Logo](https://i.cloudup.com/zfY6lL7eFa-3000x3000.png)](http://expressjs.com/)
2
+
3
+  Fast, unopinionated, minimalist web framework for [node](http://nodejs.org).
4
+
5
+  [![NPM Version][npm-image]][npm-url]
6
+  [![NPM Downloads][downloads-image]][downloads-url]
7
+  [![Linux Build][ci-image]][ci-url]
8
+  [![Windows Build][appveyor-image]][appveyor-url]
9
+  [![Test Coverage][coveralls-image]][coveralls-url]
10
+
11
+```js
12
+const express = require('express')
13
+const app = express()
14
+
15
+app.get('/', function (req, res) {
16
+  res.send('Hello World')
17
+})
18
+
19
+app.listen(3000)
20
+```
21
+
22
+## Installation
23
+
24
+This is a [Node.js](https://nodejs.org/en/) module available through the
25
+[npm registry](https://www.npmjs.com/).
26
+
27
+Before installing, [download and install Node.js](https://nodejs.org/en/download/).
28
+Node.js 0.10 or higher is required.
29
+
30
+If this is a brand new project, make sure to create a `package.json` first with
31
+the [`npm init` command](https://docs.npmjs.com/creating-a-package-json-file).
32
+
33
+Installation is done using the
34
+[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally):
35
+
36
+```bash
37
+$ npm install express
38
+```
39
+
40
+Follow [our installing guide](http://expressjs.com/en/starter/installing.html)
41
+for more information.
42
+
43
+## Features
44
+
45
+  * Robust routing
46
+  * Focus on high performance
47
+  * Super-high test coverage
48
+  * HTTP helpers (redirection, caching, etc)
49
+  * View system supporting 14+ template engines
50
+  * Content negotiation
51
+  * Executable for generating applications quickly
52
+
53
+## Docs & Community
54
+
55
+  * [Website and Documentation](http://expressjs.com/) - [[website repo](https://github.com/expressjs/expressjs.com)]
56
+  * [#express](https://webchat.freenode.net/?channels=express) on freenode IRC
57
+  * [GitHub Organization](https://github.com/expressjs) for Official Middleware & Modules
58
+  * Visit the [Wiki](https://github.com/expressjs/express/wiki)
59
+  * [Google Group](https://groups.google.com/group/express-js) for discussion
60
+  * [Gitter](https://gitter.im/expressjs/express) for support and discussion
61
+
62
+**PROTIP** Be sure to read [Migrating from 3.x to 4.x](https://github.com/expressjs/express/wiki/Migrating-from-3.x-to-4.x) as well as [New features in 4.x](https://github.com/expressjs/express/wiki/New-features-in-4.x).
63
+
64
+### Security Issues
65
+
66
+If you discover a security vulnerability in Express, please see [Security Policies and Procedures](Security.md).
67
+
68
+## Quick Start
69
+
70
+  The quickest way to get started with express is to utilize the executable [`express(1)`](https://github.com/expressjs/generator) to generate an application as shown below:
71
+
72
+  Install the executable. The executable's major version will match Express's:
73
+
74
+```bash
75
+$ npm install -g express-generator@4
76
+```
77
+
78
+  Create the app:
79
+
80
+```bash
81
+$ express /tmp/foo && cd /tmp/foo
82
+```
83
+
84
+  Install dependencies:
85
+
86
+```bash
87
+$ npm install
88
+```
89
+
90
+  Start the server:
91
+
92
+```bash
93
+$ npm start
94
+```
95
+
96
+  View the website at: http://localhost:3000
97
+
98
+## Philosophy
99
+
100
+  The Express philosophy is to provide small, robust tooling for HTTP servers, making
101
+  it a great solution for single page applications, websites, hybrids, or public
102
+  HTTP APIs.
103
+
104
+  Express does not force you to use any specific ORM or template engine. With support for over
105
+  14 template engines via [Consolidate.js](https://github.com/tj/consolidate.js),
106
+  you can quickly craft your perfect framework.
107
+
108
+## Examples
109
+
110
+  To view the examples, clone the Express repo and install the dependencies:
111
+
112
+```bash
113
+$ git clone git://github.com/expressjs/express.git --depth 1
114
+$ cd express
115
+$ npm install
116
+```
117
+
118
+  Then run whichever example you want:
119
+
120
+```bash
121
+$ node examples/content-negotiation
122
+```
123
+
124
+## Tests
125
+
126
+  To run the test suite, first install the dependencies, then run `npm test`:
127
+
128
+```bash
129
+$ npm install
130
+$ npm test
131
+```
132
+
133
+## Contributing
134
+
135
+[Contributing Guide](Contributing.md)
136
+
137
+## People
138
+
139
+The original author of Express is [TJ Holowaychuk](https://github.com/tj)
140
+
141
+The current lead maintainer is [Douglas Christopher Wilson](https://github.com/dougwilson)
142
+
143
+[List of all contributors](https://github.com/expressjs/express/graphs/contributors)
144
+
145
+## License
146
+
147
+  [MIT](LICENSE)
148
+
149
+[ci-image]: https://img.shields.io/github/workflow/status/expressjs/express/ci/master.svg?label=linux
150
+[ci-url]: https://github.com/expressjs/express/actions?query=workflow%3Aci
151
+[npm-image]: https://img.shields.io/npm/v/express.svg
152
+[npm-url]: https://npmjs.org/package/express
153
+[downloads-image]: https://img.shields.io/npm/dm/express.svg
154
+[downloads-url]: https://npmcharts.com/compare/express?minimal=true
155
+[appveyor-image]: https://img.shields.io/appveyor/ci/dougwilson/express/master.svg?label=windows
156
+[appveyor-url]: https://ci.appveyor.com/project/dougwilson/express
157
+[coveralls-image]: https://img.shields.io/coveralls/expressjs/express/master.svg
158
+[coveralls-url]: https://coveralls.io/r/expressjs/express?branch=master

+ 0
- 0
node_modules/express/index.js Ver arquivo


Alguns arquivos não foram mostrados porque muitos arquivos mudaram nesse diff

Carregando…
Cancelar
Salvar