ai 1.1.0 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (340) hide show
  1. package/LICENSE +10 -24
  2. package/dist/ai-stream.d.ts +18 -0
  3. package/dist/ai-stream.js +132 -0
  4. package/dist/ai-stream.mjs +13 -0
  5. package/dist/anthropic-stream.d.ts +5 -0
  6. package/dist/anthropic-stream.js +133 -0
  7. package/dist/anthropic-stream.mjs +8 -0
  8. package/dist/chunk-265FSSO4.mjs +91 -0
  9. package/dist/chunk-2L3ZO4UM.mjs +45 -0
  10. package/dist/chunk-EZJ7FC5E.mjs +33 -0
  11. package/dist/chunk-JGDC3BXD.mjs +22 -0
  12. package/dist/chunk-NK2CVBLI.mjs +38 -0
  13. package/dist/chunk-PEYAHBDF.mjs +43 -0
  14. package/dist/chunk-TJMME6CL.mjs +24 -0
  15. package/dist/huggingface-stream.d.ts +5 -0
  16. package/dist/huggingface-stream.js +121 -0
  17. package/dist/huggingface-stream.mjs +8 -0
  18. package/dist/index.d.ts +131 -0
  19. package/dist/index.js +278 -0
  20. package/dist/index.mjs +35 -0
  21. package/dist/index.test.d.ts +2 -0
  22. package/dist/index.test.js +12 -0
  23. package/dist/index.test.mjs +10 -0
  24. package/dist/langchain-stream.d.ts +12 -0
  25. package/dist/langchain-stream.js +102 -0
  26. package/dist/langchain-stream.mjs +8 -0
  27. package/dist/openai-stream.d.ts +5 -0
  28. package/dist/openai-stream.js +144 -0
  29. package/dist/openai-stream.mjs +8 -0
  30. package/dist/streaming-text-response.d.ts +17 -0
  31. package/dist/streaming-text-response.js +75 -0
  32. package/dist/streaming-text-response.mjs +9 -0
  33. package/package.json +78 -29
  34. package/react/dist/chunk-5PP6W52J.mjs +202 -0
  35. package/react/dist/chunk-6EH3SWMP.mjs +55 -0
  36. package/react/dist/chunk-PW6HSU2N.mjs +154 -0
  37. package/react/dist/index.d.ts +3 -0
  38. package/react/dist/index.js +424 -0
  39. package/react/dist/index.mjs +12 -0
  40. package/react/dist/types-f862f74a.d.ts +123 -0
  41. package/react/dist/use-chat.d.ts +42 -0
  42. package/react/dist/use-chat.js +276 -0
  43. package/react/dist/use-chat.mjs +8 -0
  44. package/react/dist/use-completion.d.ts +47 -0
  45. package/react/dist/use-completion.js +229 -0
  46. package/react/dist/use-completion.mjs +8 -0
  47. package/svelte/dist/chunk-6USBQIV6.mjs +177 -0
  48. package/svelte/dist/chunk-BQ64GHZ3.mjs +136 -0
  49. package/svelte/dist/chunk-CENOSGDG.mjs +493 -0
  50. package/svelte/dist/index.d.ts +4 -0
  51. package/svelte/dist/index.js +808 -0
  52. package/svelte/dist/index.mjs +11 -0
  53. package/svelte/dist/types-f862f74a.d.ts +123 -0
  54. package/svelte/dist/use-chat.d.ts +39 -0
  55. package/svelte/dist/use-chat.js +680 -0
  56. package/svelte/dist/use-chat.mjs +7 -0
  57. package/svelte/dist/use-completion.d.ts +38 -0
  58. package/svelte/dist/use-completion.js +640 -0
  59. package/svelte/dist/use-completion.mjs +7 -0
  60. package/.npmignore +0 -15
  61. package/.travis.yml +0 -4
  62. package/README.md +0 -21
  63. package/bin/ai.js +0 -22
  64. package/index.js +0 -37
  65. package/node_modules/request/.npmignore +0 -2
  66. package/node_modules/request/.travis.yml +0 -12
  67. package/node_modules/request/CHANGELOG.md +0 -954
  68. package/node_modules/request/LICENSE +0 -55
  69. package/node_modules/request/README.md +0 -421
  70. package/node_modules/request/index.js +0 -166
  71. package/node_modules/request/lib/cookies.js +0 -40
  72. package/node_modules/request/lib/copy.js +0 -8
  73. package/node_modules/request/lib/debug.js +0 -7
  74. package/node_modules/request/lib/getSafe.js +0 -34
  75. package/node_modules/request/lib/optional.js +0 -5
  76. package/node_modules/request/node_modules/aws-sign2/LICENSE +0 -55
  77. package/node_modules/request/node_modules/aws-sign2/README.md +0 -4
  78. package/node_modules/request/node_modules/aws-sign2/index.js +0 -202
  79. package/node_modules/request/node_modules/aws-sign2/package.json +0 -47
  80. package/node_modules/request/node_modules/forever-agent/LICENSE +0 -55
  81. package/node_modules/request/node_modules/forever-agent/README.md +0 -4
  82. package/node_modules/request/node_modules/forever-agent/index.js +0 -119
  83. package/node_modules/request/node_modules/forever-agent/package.json +0 -46
  84. package/node_modules/request/node_modules/form-data/License +0 -19
  85. package/node_modules/request/node_modules/form-data/Readme.md +0 -175
  86. package/node_modules/request/node_modules/form-data/lib/form_data.js +0 -351
  87. package/node_modules/request/node_modules/form-data/node_modules/async/.travis.yml +0 -3
  88. package/node_modules/request/node_modules/form-data/node_modules/async/LICENSE +0 -19
  89. package/node_modules/request/node_modules/form-data/node_modules/async/README.md +0 -1646
  90. package/node_modules/request/node_modules/form-data/node_modules/async/component.json +0 -11
  91. package/node_modules/request/node_modules/form-data/node_modules/async/lib/async.js +0 -1123
  92. package/node_modules/request/node_modules/form-data/node_modules/async/package.json +0 -60
  93. package/node_modules/request/node_modules/form-data/node_modules/combined-stream/License +0 -19
  94. package/node_modules/request/node_modules/form-data/node_modules/combined-stream/Readme.md +0 -132
  95. package/node_modules/request/node_modules/form-data/node_modules/combined-stream/lib/combined_stream.js +0 -186
  96. package/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/.npmignore +0 -2
  97. package/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/License +0 -19
  98. package/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/Makefile +0 -7
  99. package/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/Readme.md +0 -154
  100. package/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/lib/delayed_stream.js +0 -99
  101. package/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/package.json +0 -42
  102. package/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/common.js +0 -6
  103. package/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-delayed-http-upload.js +0 -38
  104. package/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-delayed-stream-auto-pause.js +0 -21
  105. package/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-delayed-stream-pause.js +0 -14
  106. package/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-delayed-stream.js +0 -48
  107. package/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-handle-source-errors.js +0 -15
  108. package/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-max-data-size.js +0 -18
  109. package/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-pipe-resumes.js +0 -13
  110. package/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-proxy-readable.js +0 -13
  111. package/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/run.js +0 -7
  112. package/node_modules/request/node_modules/form-data/node_modules/combined-stream/package.json +0 -61
  113. package/node_modules/request/node_modules/form-data/node_modules/mime/LICENSE +0 -19
  114. package/node_modules/request/node_modules/form-data/node_modules/mime/README.md +0 -66
  115. package/node_modules/request/node_modules/form-data/node_modules/mime/mime.js +0 -114
  116. package/node_modules/request/node_modules/form-data/node_modules/mime/package.json +0 -59
  117. package/node_modules/request/node_modules/form-data/node_modules/mime/test.js +0 -84
  118. package/node_modules/request/node_modules/form-data/node_modules/mime/types/mime.types +0 -1588
  119. package/node_modules/request/node_modules/form-data/node_modules/mime/types/node.types +0 -77
  120. package/node_modules/request/node_modules/form-data/package.json +0 -80
  121. package/node_modules/request/node_modules/hawk/.npmignore +0 -18
  122. package/node_modules/request/node_modules/hawk/.travis.yml +0 -5
  123. package/node_modules/request/node_modules/hawk/LICENSE +0 -24
  124. package/node_modules/request/node_modules/hawk/Makefile +0 -10
  125. package/node_modules/request/node_modules/hawk/README.md +0 -625
  126. package/node_modules/request/node_modules/hawk/example/usage.js +0 -78
  127. package/node_modules/request/node_modules/hawk/images/hawk.png +0 -0
  128. package/node_modules/request/node_modules/hawk/images/logo.png +0 -0
  129. package/node_modules/request/node_modules/hawk/index.js +0 -1
  130. package/node_modules/request/node_modules/hawk/lib/browser.js +0 -507
  131. package/node_modules/request/node_modules/hawk/lib/client.js +0 -371
  132. package/node_modules/request/node_modules/hawk/lib/crypto.js +0 -118
  133. package/node_modules/request/node_modules/hawk/lib/index.js +0 -15
  134. package/node_modules/request/node_modules/hawk/lib/server.js +0 -523
  135. package/node_modules/request/node_modules/hawk/lib/utils.js +0 -183
  136. package/node_modules/request/node_modules/hawk/node_modules/boom/.npmignore +0 -18
  137. package/node_modules/request/node_modules/hawk/node_modules/boom/.travis.yml +0 -5
  138. package/node_modules/request/node_modules/hawk/node_modules/boom/LICENSE +0 -24
  139. package/node_modules/request/node_modules/hawk/node_modules/boom/Makefile +0 -11
  140. package/node_modules/request/node_modules/hawk/node_modules/boom/README.md +0 -6
  141. package/node_modules/request/node_modules/hawk/node_modules/boom/images/boom.png +0 -0
  142. package/node_modules/request/node_modules/hawk/node_modules/boom/index.js +0 -1
  143. package/node_modules/request/node_modules/hawk/node_modules/boom/lib/index.js +0 -207
  144. package/node_modules/request/node_modules/hawk/node_modules/boom/package.json +0 -64
  145. package/node_modules/request/node_modules/hawk/node_modules/boom/test/index.js +0 -245
  146. package/node_modules/request/node_modules/hawk/node_modules/cryptiles/.npmignore +0 -18
  147. package/node_modules/request/node_modules/hawk/node_modules/cryptiles/.travis.yml +0 -5
  148. package/node_modules/request/node_modules/hawk/node_modules/cryptiles/LICENSE +0 -24
  149. package/node_modules/request/node_modules/hawk/node_modules/cryptiles/Makefile +0 -11
  150. package/node_modules/request/node_modules/hawk/node_modules/cryptiles/README.md +0 -6
  151. package/node_modules/request/node_modules/hawk/node_modules/cryptiles/index.js +0 -1
  152. package/node_modules/request/node_modules/hawk/node_modules/cryptiles/lib/index.js +0 -68
  153. package/node_modules/request/node_modules/hawk/node_modules/cryptiles/package.json +0 -65
  154. package/node_modules/request/node_modules/hawk/node_modules/cryptiles/test/index.js +0 -101
  155. package/node_modules/request/node_modules/hawk/node_modules/hoek/.npmignore +0 -18
  156. package/node_modules/request/node_modules/hawk/node_modules/hoek/.travis.yml +0 -5
  157. package/node_modules/request/node_modules/hawk/node_modules/hoek/LICENSE +0 -33
  158. package/node_modules/request/node_modules/hawk/node_modules/hoek/Makefile +0 -10
  159. package/node_modules/request/node_modules/hawk/node_modules/hoek/README.md +0 -436
  160. package/node_modules/request/node_modules/hawk/node_modules/hoek/images/hoek.png +0 -0
  161. package/node_modules/request/node_modules/hawk/node_modules/hoek/index.js +0 -1
  162. package/node_modules/request/node_modules/hawk/node_modules/hoek/lib/escape.js +0 -132
  163. package/node_modules/request/node_modules/hawk/node_modules/hoek/lib/index.js +0 -585
  164. package/node_modules/request/node_modules/hawk/node_modules/hoek/package.json +0 -70
  165. package/node_modules/request/node_modules/hawk/node_modules/hoek/test/escaper.js +0 -86
  166. package/node_modules/request/node_modules/hawk/node_modules/hoek/test/index.js +0 -1078
  167. package/node_modules/request/node_modules/hawk/node_modules/hoek/test/modules/test1.js +0 -1
  168. package/node_modules/request/node_modules/hawk/node_modules/hoek/test/modules/test2.js +0 -1
  169. package/node_modules/request/node_modules/hawk/node_modules/hoek/test/modules/test3.js +0 -1
  170. package/node_modules/request/node_modules/hawk/node_modules/sntp/.npmignore +0 -18
  171. package/node_modules/request/node_modules/hawk/node_modules/sntp/.travis.yml +0 -5
  172. package/node_modules/request/node_modules/hawk/node_modules/sntp/LICENSE +0 -24
  173. package/node_modules/request/node_modules/hawk/node_modules/sntp/Makefile +0 -11
  174. package/node_modules/request/node_modules/hawk/node_modules/sntp/README.md +0 -68
  175. package/node_modules/request/node_modules/hawk/node_modules/sntp/examples/offset.js +0 -16
  176. package/node_modules/request/node_modules/hawk/node_modules/sntp/examples/time.js +0 -25
  177. package/node_modules/request/node_modules/hawk/node_modules/sntp/index.js +0 -1
  178. package/node_modules/request/node_modules/hawk/node_modules/sntp/lib/index.js +0 -409
  179. package/node_modules/request/node_modules/hawk/node_modules/sntp/package.json +0 -65
  180. package/node_modules/request/node_modules/hawk/node_modules/sntp/test/index.js +0 -359
  181. package/node_modules/request/node_modules/hawk/package.json +0 -70
  182. package/node_modules/request/node_modules/hawk/test/browser.js +0 -817
  183. package/node_modules/request/node_modules/hawk/test/client.js +0 -206
  184. package/node_modules/request/node_modules/hawk/test/crypto.js +0 -86
  185. package/node_modules/request/node_modules/hawk/test/index.js +0 -316
  186. package/node_modules/request/node_modules/hawk/test/message.js +0 -246
  187. package/node_modules/request/node_modules/hawk/test/readme.js +0 -98
  188. package/node_modules/request/node_modules/hawk/test/server.js +0 -686
  189. package/node_modules/request/node_modules/hawk/test/uri.js +0 -456
  190. package/node_modules/request/node_modules/hawk/test/utils.js +0 -120
  191. package/node_modules/request/node_modules/http-signature/.dir-locals.el +0 -6
  192. package/node_modules/request/node_modules/http-signature/.npmignore +0 -7
  193. package/node_modules/request/node_modules/http-signature/LICENSE +0 -18
  194. package/node_modules/request/node_modules/http-signature/README.md +0 -75
  195. package/node_modules/request/node_modules/http-signature/http_signing.md +0 -296
  196. package/node_modules/request/node_modules/http-signature/lib/index.js +0 -25
  197. package/node_modules/request/node_modules/http-signature/lib/parser.js +0 -304
  198. package/node_modules/request/node_modules/http-signature/lib/signer.js +0 -179
  199. package/node_modules/request/node_modules/http-signature/lib/util.js +0 -249
  200. package/node_modules/request/node_modules/http-signature/lib/verify.js +0 -42
  201. package/node_modules/request/node_modules/http-signature/node_modules/asn1/.npmignore +0 -2
  202. package/node_modules/request/node_modules/http-signature/node_modules/asn1/LICENSE +0 -19
  203. package/node_modules/request/node_modules/http-signature/node_modules/asn1/README.md +0 -50
  204. package/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/ber/errors.js +0 -13
  205. package/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/ber/index.js +0 -27
  206. package/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/ber/reader.js +0 -267
  207. package/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/ber/types.js +0 -36
  208. package/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/ber/writer.js +0 -317
  209. package/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/index.js +0 -20
  210. package/node_modules/request/node_modules/http-signature/node_modules/asn1/package.json +0 -63
  211. package/node_modules/request/node_modules/http-signature/node_modules/asn1/tst/ber/reader.test.js +0 -172
  212. package/node_modules/request/node_modules/http-signature/node_modules/asn1/tst/ber/writer.test.js +0 -296
  213. package/node_modules/request/node_modules/http-signature/node_modules/assert-plus/README.md +0 -126
  214. package/node_modules/request/node_modules/http-signature/node_modules/assert-plus/assert.js +0 -196
  215. package/node_modules/request/node_modules/http-signature/node_modules/assert-plus/package.json +0 -38
  216. package/node_modules/request/node_modules/http-signature/node_modules/ctype/CHANGELOG +0 -71
  217. package/node_modules/request/node_modules/http-signature/node_modules/ctype/LICENSE +0 -24
  218. package/node_modules/request/node_modules/http-signature/node_modules/ctype/README +0 -82
  219. package/node_modules/request/node_modules/http-signature/node_modules/ctype/README.old +0 -298
  220. package/node_modules/request/node_modules/http-signature/node_modules/ctype/ctf.js +0 -245
  221. package/node_modules/request/node_modules/http-signature/node_modules/ctype/ctio.js +0 -1485
  222. package/node_modules/request/node_modules/http-signature/node_modules/ctype/ctype.js +0 -944
  223. package/node_modules/request/node_modules/http-signature/node_modules/ctype/man/man3ctype/ctio.3ctype +0 -241
  224. package/node_modules/request/node_modules/http-signature/node_modules/ctype/package.json +0 -36
  225. package/node_modules/request/node_modules/http-signature/node_modules/ctype/tools/jsl.conf +0 -129
  226. package/node_modules/request/node_modules/http-signature/node_modules/ctype/tools/jsstyle +0 -839
  227. package/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/float.json +0 -13
  228. package/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/int.json +0 -13
  229. package/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/psinfo.json +0 -104
  230. package/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/struct.json +0 -19
  231. package/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.fail.js +0 -39
  232. package/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.float.js +0 -14
  233. package/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.int.js +0 -14
  234. package/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.psinfo.js +0 -17
  235. package/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.struct.js +0 -18
  236. package/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.typedef.js +0 -15
  237. package/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/typedef.json +0 -14
  238. package/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/float/tst.rfloat.js +0 -767
  239. package/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/float/tst.wfloat.js +0 -753
  240. package/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/int/tst.64.js +0 -638
  241. package/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/int/tst.rint.js +0 -101
  242. package/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/int/tst.wbounds.js +0 -53
  243. package/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/int/tst.wint.js +0 -92
  244. package/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/uint/tst.64.js +0 -451
  245. package/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/uint/tst.roundtrip.js +0 -81
  246. package/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/uint/tst.ruint.js +0 -95
  247. package/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/uint/tst.wuint.js +0 -156
  248. package/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.basicr.js +0 -50
  249. package/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.basicw.js +0 -44
  250. package/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.char.js +0 -42
  251. package/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.endian.js +0 -45
  252. package/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.oldwrite.js +0 -28
  253. package/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.readSize.js +0 -128
  254. package/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.structw.js +0 -28
  255. package/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.writeStruct.js +0 -31
  256. package/node_modules/request/node_modules/http-signature/package.json +0 -54
  257. package/node_modules/request/node_modules/json-stringify-safe/LICENSE +0 -27
  258. package/node_modules/request/node_modules/json-stringify-safe/README.md +0 -49
  259. package/node_modules/request/node_modules/json-stringify-safe/package.json +0 -51
  260. package/node_modules/request/node_modules/json-stringify-safe/stringify.js +0 -39
  261. package/node_modules/request/node_modules/json-stringify-safe/test.js +0 -128
  262. package/node_modules/request/node_modules/mime-types/.npmignore +0 -14
  263. package/node_modules/request/node_modules/mime-types/.travis.yml +0 -12
  264. package/node_modules/request/node_modules/mime-types/LICENSE +0 -22
  265. package/node_modules/request/node_modules/mime-types/Makefile +0 -9
  266. package/node_modules/request/node_modules/mime-types/README.md +0 -101
  267. package/node_modules/request/node_modules/mime-types/SOURCES.md +0 -17
  268. package/node_modules/request/node_modules/mime-types/component.json +0 -16
  269. package/node_modules/request/node_modules/mime-types/lib/custom.json +0 -27
  270. package/node_modules/request/node_modules/mime-types/lib/index.js +0 -75
  271. package/node_modules/request/node_modules/mime-types/lib/mime.json +0 -3317
  272. package/node_modules/request/node_modules/mime-types/lib/node.json +0 -55
  273. package/node_modules/request/node_modules/mime-types/package.json +0 -69
  274. package/node_modules/request/node_modules/node-uuid/.npmignore +0 -2
  275. package/node_modules/request/node_modules/node-uuid/LICENSE.md +0 -2
  276. package/node_modules/request/node_modules/node-uuid/README.md +0 -207
  277. package/node_modules/request/node_modules/node-uuid/benchmark/README.md +0 -53
  278. package/node_modules/request/node_modules/node-uuid/benchmark/bench.gnu +0 -174
  279. package/node_modules/request/node_modules/node-uuid/benchmark/bench.sh +0 -34
  280. package/node_modules/request/node_modules/node-uuid/benchmark/benchmark-native.c +0 -34
  281. package/node_modules/request/node_modules/node-uuid/benchmark/benchmark.js +0 -84
  282. package/node_modules/request/node_modules/node-uuid/component.json +0 -18
  283. package/node_modules/request/node_modules/node-uuid/package.json +0 -54
  284. package/node_modules/request/node_modules/node-uuid/test/compare_v1.js +0 -63
  285. package/node_modules/request/node_modules/node-uuid/test/test.html +0 -17
  286. package/node_modules/request/node_modules/node-uuid/test/test.js +0 -228
  287. package/node_modules/request/node_modules/node-uuid/uuid.js +0 -245
  288. package/node_modules/request/node_modules/oauth-sign/LICENSE +0 -55
  289. package/node_modules/request/node_modules/oauth-sign/README.md +0 -4
  290. package/node_modules/request/node_modules/oauth-sign/index.js +0 -43
  291. package/node_modules/request/node_modules/oauth-sign/package.json +0 -49
  292. package/node_modules/request/node_modules/oauth-sign/test.js +0 -49
  293. package/node_modules/request/node_modules/qs/.jshintignore +0 -1
  294. package/node_modules/request/node_modules/qs/.jshintrc +0 -10
  295. package/node_modules/request/node_modules/qs/.npmignore +0 -18
  296. package/node_modules/request/node_modules/qs/.travis.yml +0 -4
  297. package/node_modules/request/node_modules/qs/LICENSE +0 -28
  298. package/node_modules/request/node_modules/qs/Makefile +0 -8
  299. package/node_modules/request/node_modules/qs/Readme.md +0 -120
  300. package/node_modules/request/node_modules/qs/index.js +0 -1
  301. package/node_modules/request/node_modules/qs/lib/index.js +0 -15
  302. package/node_modules/request/node_modules/qs/lib/parse.js +0 -151
  303. package/node_modules/request/node_modules/qs/lib/stringify.js +0 -52
  304. package/node_modules/request/node_modules/qs/lib/utils.js +0 -131
  305. package/node_modules/request/node_modules/qs/package.json +0 -61
  306. package/node_modules/request/node_modules/qs/test/parse.js +0 -236
  307. package/node_modules/request/node_modules/qs/test/stringify.js +0 -123
  308. package/node_modules/request/node_modules/stringstream/.npmignore +0 -15
  309. package/node_modules/request/node_modules/stringstream/.travis.yml +0 -4
  310. package/node_modules/request/node_modules/stringstream/LICENSE.txt +0 -4
  311. package/node_modules/request/node_modules/stringstream/README.md +0 -38
  312. package/node_modules/request/node_modules/stringstream/example.js +0 -27
  313. package/node_modules/request/node_modules/stringstream/package.json +0 -48
  314. package/node_modules/request/node_modules/stringstream/stringstream.js +0 -102
  315. package/node_modules/request/node_modules/tough-cookie/.jshintrc +0 -70
  316. package/node_modules/request/node_modules/tough-cookie/.npmignore +0 -3
  317. package/node_modules/request/node_modules/tough-cookie/.travis.yml +0 -8
  318. package/node_modules/request/node_modules/tough-cookie/LICENSE +0 -78
  319. package/node_modules/request/node_modules/tough-cookie/README.md +0 -412
  320. package/node_modules/request/node_modules/tough-cookie/generate-pubsuffix.js +0 -239
  321. package/node_modules/request/node_modules/tough-cookie/lib/cookie.js +0 -1107
  322. package/node_modules/request/node_modules/tough-cookie/lib/memstore.js +0 -123
  323. package/node_modules/request/node_modules/tough-cookie/lib/pubsuffix.js +0 -69
  324. package/node_modules/request/node_modules/tough-cookie/lib/store.js +0 -37
  325. package/node_modules/request/node_modules/tough-cookie/node_modules/punycode/LICENSE-MIT.txt +0 -20
  326. package/node_modules/request/node_modules/tough-cookie/node_modules/punycode/README.md +0 -176
  327. package/node_modules/request/node_modules/tough-cookie/node_modules/punycode/package.json +0 -87
  328. package/node_modules/request/node_modules/tough-cookie/node_modules/punycode/punycode.js +0 -528
  329. package/node_modules/request/node_modules/tough-cookie/package.json +0 -67
  330. package/node_modules/request/node_modules/tough-cookie/public-suffix.txt +0 -5229
  331. package/node_modules/request/node_modules/tough-cookie/test.js +0 -1625
  332. package/node_modules/request/node_modules/tunnel-agent/.jshintrc +0 -5
  333. package/node_modules/request/node_modules/tunnel-agent/LICENSE +0 -55
  334. package/node_modules/request/node_modules/tunnel-agent/README.md +0 -4
  335. package/node_modules/request/node_modules/tunnel-agent/index.js +0 -236
  336. package/node_modules/request/node_modules/tunnel-agent/package.json +0 -46
  337. package/node_modules/request/package.json +0 -77
  338. package/node_modules/request/request.js +0 -1428
  339. package/test/fixtures/github-response.json +0 -1367
  340. package/test/index.js +0 -55
@@ -1,245 +0,0 @@
1
- // uuid.js
2
- //
3
- // Copyright (c) 2010-2012 Robert Kieffer
4
- // MIT License - http://opensource.org/licenses/mit-license.php
5
-
6
- (function() {
7
- var _global = this;
8
-
9
- // Unique ID creation requires a high quality random # generator. We feature
10
- // detect to determine the best RNG source, normalizing to a function that
11
- // returns 128-bits of randomness, since that's what's usually required
12
- var _rng;
13
-
14
- // Node.js crypto-based RNG - http://nodejs.org/docs/v0.6.2/api/crypto.html
15
- //
16
- // Moderately fast, high quality
17
- if (typeof(require) == 'function') {
18
- try {
19
- var _rb = require('crypto').randomBytes;
20
- _rng = _rb && function() {return _rb(16);};
21
- } catch(e) {}
22
- }
23
-
24
- if (!_rng && _global.crypto && crypto.getRandomValues) {
25
- // WHATWG crypto-based RNG - http://wiki.whatwg.org/wiki/Crypto
26
- //
27
- // Moderately fast, high quality
28
- var _rnds8 = new Uint8Array(16);
29
- _rng = function whatwgRNG() {
30
- crypto.getRandomValues(_rnds8);
31
- return _rnds8;
32
- };
33
- }
34
-
35
- if (!_rng) {
36
- // Math.random()-based (RNG)
37
- //
38
- // If all else fails, use Math.random(). It's fast, but is of unspecified
39
- // quality.
40
- var _rnds = new Array(16);
41
- _rng = function() {
42
- for (var i = 0, r; i < 16; i++) {
43
- if ((i & 0x03) === 0) r = Math.random() * 0x100000000;
44
- _rnds[i] = r >>> ((i & 0x03) << 3) & 0xff;
45
- }
46
-
47
- return _rnds;
48
- };
49
- }
50
-
51
- // Buffer class to use
52
- var BufferClass = typeof(Buffer) == 'function' ? Buffer : Array;
53
-
54
- // Maps for number <-> hex string conversion
55
- var _byteToHex = [];
56
- var _hexToByte = {};
57
- for (var i = 0; i < 256; i++) {
58
- _byteToHex[i] = (i + 0x100).toString(16).substr(1);
59
- _hexToByte[_byteToHex[i]] = i;
60
- }
61
-
62
- // **`parse()` - Parse a UUID into it's component bytes**
63
- function parse(s, buf, offset) {
64
- var i = (buf && offset) || 0, ii = 0;
65
-
66
- buf = buf || [];
67
- s.toLowerCase().replace(/[0-9a-f]{2}/g, function(oct) {
68
- if (ii < 16) { // Don't overflow!
69
- buf[i + ii++] = _hexToByte[oct];
70
- }
71
- });
72
-
73
- // Zero out remaining bytes if string was short
74
- while (ii < 16) {
75
- buf[i + ii++] = 0;
76
- }
77
-
78
- return buf;
79
- }
80
-
81
- // **`unparse()` - Convert UUID byte array (ala parse()) into a string**
82
- function unparse(buf, offset) {
83
- var i = offset || 0, bth = _byteToHex;
84
- return bth[buf[i++]] + bth[buf[i++]] +
85
- bth[buf[i++]] + bth[buf[i++]] + '-' +
86
- bth[buf[i++]] + bth[buf[i++]] + '-' +
87
- bth[buf[i++]] + bth[buf[i++]] + '-' +
88
- bth[buf[i++]] + bth[buf[i++]] + '-' +
89
- bth[buf[i++]] + bth[buf[i++]] +
90
- bth[buf[i++]] + bth[buf[i++]] +
91
- bth[buf[i++]] + bth[buf[i++]];
92
- }
93
-
94
- // **`v1()` - Generate time-based UUID**
95
- //
96
- // Inspired by https://github.com/LiosK/UUID.js
97
- // and http://docs.python.org/library/uuid.html
98
-
99
- // random #'s we need to init node and clockseq
100
- var _seedBytes = _rng();
101
-
102
- // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)
103
- var _nodeId = [
104
- _seedBytes[0] | 0x01,
105
- _seedBytes[1], _seedBytes[2], _seedBytes[3], _seedBytes[4], _seedBytes[5]
106
- ];
107
-
108
- // Per 4.2.2, randomize (14 bit) clockseq
109
- var _clockseq = (_seedBytes[6] << 8 | _seedBytes[7]) & 0x3fff;
110
-
111
- // Previous uuid creation time
112
- var _lastMSecs = 0, _lastNSecs = 0;
113
-
114
- // See https://github.com/broofa/node-uuid for API details
115
- function v1(options, buf, offset) {
116
- var i = buf && offset || 0;
117
- var b = buf || [];
118
-
119
- options = options || {};
120
-
121
- var clockseq = options.clockseq != null ? options.clockseq : _clockseq;
122
-
123
- // UUID timestamps are 100 nano-second units since the Gregorian epoch,
124
- // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so
125
- // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'
126
- // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.
127
- var msecs = options.msecs != null ? options.msecs : new Date().getTime();
128
-
129
- // Per 4.2.1.2, use count of uuid's generated during the current clock
130
- // cycle to simulate higher resolution clock
131
- var nsecs = options.nsecs != null ? options.nsecs : _lastNSecs + 1;
132
-
133
- // Time since last uuid creation (in msecs)
134
- var dt = (msecs - _lastMSecs) + (nsecs - _lastNSecs)/10000;
135
-
136
- // Per 4.2.1.2, Bump clockseq on clock regression
137
- if (dt < 0 && options.clockseq == null) {
138
- clockseq = clockseq + 1 & 0x3fff;
139
- }
140
-
141
- // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new
142
- // time interval
143
- if ((dt < 0 || msecs > _lastMSecs) && options.nsecs == null) {
144
- nsecs = 0;
145
- }
146
-
147
- // Per 4.2.1.2 Throw error if too many uuids are requested
148
- if (nsecs >= 10000) {
149
- throw new Error('uuid.v1(): Can\'t create more than 10M uuids/sec');
150
- }
151
-
152
- _lastMSecs = msecs;
153
- _lastNSecs = nsecs;
154
- _clockseq = clockseq;
155
-
156
- // Per 4.1.4 - Convert from unix epoch to Gregorian epoch
157
- msecs += 12219292800000;
158
-
159
- // `time_low`
160
- var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;
161
- b[i++] = tl >>> 24 & 0xff;
162
- b[i++] = tl >>> 16 & 0xff;
163
- b[i++] = tl >>> 8 & 0xff;
164
- b[i++] = tl & 0xff;
165
-
166
- // `time_mid`
167
- var tmh = (msecs / 0x100000000 * 10000) & 0xfffffff;
168
- b[i++] = tmh >>> 8 & 0xff;
169
- b[i++] = tmh & 0xff;
170
-
171
- // `time_high_and_version`
172
- b[i++] = tmh >>> 24 & 0xf | 0x10; // include version
173
- b[i++] = tmh >>> 16 & 0xff;
174
-
175
- // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)
176
- b[i++] = clockseq >>> 8 | 0x80;
177
-
178
- // `clock_seq_low`
179
- b[i++] = clockseq & 0xff;
180
-
181
- // `node`
182
- var node = options.node || _nodeId;
183
- for (var n = 0; n < 6; n++) {
184
- b[i + n] = node[n];
185
- }
186
-
187
- return buf ? buf : unparse(b);
188
- }
189
-
190
- // **`v4()` - Generate random UUID**
191
-
192
- // See https://github.com/broofa/node-uuid for API details
193
- function v4(options, buf, offset) {
194
- // Deprecated - 'format' argument, as supported in v1.2
195
- var i = buf && offset || 0;
196
-
197
- if (typeof(options) == 'string') {
198
- buf = options == 'binary' ? new BufferClass(16) : null;
199
- options = null;
200
- }
201
- options = options || {};
202
-
203
- var rnds = options.random || (options.rng || _rng)();
204
-
205
- // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
206
- rnds[6] = (rnds[6] & 0x0f) | 0x40;
207
- rnds[8] = (rnds[8] & 0x3f) | 0x80;
208
-
209
- // Copy bytes to buffer, if provided
210
- if (buf) {
211
- for (var ii = 0; ii < 16; ii++) {
212
- buf[i + ii] = rnds[ii];
213
- }
214
- }
215
-
216
- return buf || unparse(rnds);
217
- }
218
-
219
- // Export public API
220
- var uuid = v4;
221
- uuid.v1 = v1;
222
- uuid.v4 = v4;
223
- uuid.parse = parse;
224
- uuid.unparse = unparse;
225
- uuid.BufferClass = BufferClass;
226
-
227
- if (typeof define === 'function' && define.amd) {
228
- // Publish as AMD module
229
- define(function() {return uuid;});
230
- } else if (typeof(module) != 'undefined' && module.exports) {
231
- // Publish as node.js module
232
- module.exports = uuid;
233
- } else {
234
- // Publish as global (in browsers)
235
- var _previousRoot = _global.uuid;
236
-
237
- // **`noConflict()` - (browser only) to reset global 'uuid' var**
238
- uuid.noConflict = function() {
239
- _global.uuid = _previousRoot;
240
- return uuid;
241
- };
242
-
243
- _global.uuid = uuid;
244
- }
245
- }).call(this);
@@ -1,55 +0,0 @@
1
- Apache License
2
-
3
- Version 2.0, January 2004
4
-
5
- http://www.apache.org/licenses/
6
-
7
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
8
-
9
- 1. Definitions.
10
-
11
- "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
12
-
13
- "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
14
-
15
- "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
16
-
17
- "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
18
-
19
- "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
20
-
21
- "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
22
-
23
- "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
24
-
25
- "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
26
-
27
- "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
28
-
29
- "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
30
-
31
- 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
32
-
33
- 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
34
-
35
- 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
36
-
37
- You must give any other recipients of the Work or Derivative Works a copy of this License; and
38
-
39
- You must cause any modified files to carry prominent notices stating that You changed the files; and
40
-
41
- You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
42
-
43
- If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
44
-
45
- 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
46
-
47
- 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
48
-
49
- 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
50
-
51
- 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
52
-
53
- 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
54
-
55
- END OF TERMS AND CONDITIONS
@@ -1,4 +0,0 @@
1
- oauth-sign
2
- ==========
3
-
4
- OAuth 1 signing. Formerly a vendor lib in mikeal/request, now a standalone module.
@@ -1,43 +0,0 @@
1
- var crypto = require('crypto')
2
- , qs = require('querystring')
3
- ;
4
-
5
- function sha1 (key, body) {
6
- return crypto.createHmac('sha1', key).update(body).digest('base64')
7
- }
8
-
9
- function rfc3986 (str) {
10
- return encodeURIComponent(str)
11
- .replace(/!/g,'%21')
12
- .replace(/\*/g,'%2A')
13
- .replace(/\(/g,'%28')
14
- .replace(/\)/g,'%29')
15
- .replace(/'/g,'%27')
16
- ;
17
- }
18
-
19
- function hmacsign (httpMethod, base_uri, params, consumer_secret, token_secret) {
20
- // adapted from https://dev.twitter.com/docs/auth/oauth and
21
- // https://dev.twitter.com/docs/auth/creating-signature
22
-
23
- var querystring = Object.keys(params).sort().map(function(key){
24
- // big WTF here with the escape + encoding but it's what twitter wants
25
- return escape(rfc3986(key)) + "%3D" + escape(rfc3986(params[key]))
26
- }).join('%26')
27
-
28
- var base = [
29
- httpMethod ? httpMethod.toUpperCase() : 'GET',
30
- rfc3986(base_uri),
31
- querystring
32
- ].join('&')
33
-
34
- var key = [
35
- consumer_secret,
36
- token_secret || ''
37
- ].map(rfc3986).join('&')
38
-
39
- return sha1(key, base)
40
- }
41
-
42
- exports.hmacsign = hmacsign
43
- exports.rfc3986 = rfc3986
@@ -1,49 +0,0 @@
1
- {
2
- "author": {
3
- "name": "Mikeal Rogers",
4
- "email": "mikeal.rogers@gmail.com",
5
- "url": "http://www.futurealoof.com"
6
- },
7
- "name": "oauth-sign",
8
- "description": "OAuth 1 signing. Formerly a vendor lib in mikeal/request, now a standalone module.",
9
- "version": "0.3.0",
10
- "repository": {
11
- "url": "https://github.com/mikeal/oauth-sign"
12
- },
13
- "main": "index.js",
14
- "dependencies": {},
15
- "devDependencies": {},
16
- "optionalDependencies": {},
17
- "engines": {
18
- "node": "*"
19
- },
20
- "scripts": {
21
- "test": "node test.js"
22
- },
23
- "readme": "oauth-sign\n==========\n\nOAuth 1 signing. Formerly a vendor lib in mikeal/request, now a standalone module. \n",
24
- "readmeFilename": "README.md",
25
- "_id": "oauth-sign@0.3.0",
26
- "dist": {
27
- "shasum": "cb540f93bb2b22a7d5941691a288d60e8ea9386e",
28
- "tarball": "http://registry.npmjs.org/oauth-sign/-/oauth-sign-0.3.0.tgz"
29
- },
30
- "_from": "oauth-sign@~0.3.0",
31
- "_npmVersion": "1.2.14",
32
- "_npmUser": {
33
- "name": "mikeal",
34
- "email": "mikeal.rogers@gmail.com"
35
- },
36
- "maintainers": [
37
- {
38
- "name": "mikeal",
39
- "email": "mikeal.rogers@gmail.com"
40
- }
41
- ],
42
- "directories": {},
43
- "_shasum": "cb540f93bb2b22a7d5941691a288d60e8ea9386e",
44
- "_resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.3.0.tgz",
45
- "bugs": {
46
- "url": "https://github.com/mikeal/oauth-sign/issues"
47
- },
48
- "homepage": "https://github.com/mikeal/oauth-sign"
49
- }
@@ -1,49 +0,0 @@
1
- var hmacsign = require('./index').hmacsign
2
- , assert = require('assert')
3
- , qs = require('querystring')
4
- ;
5
-
6
- // Tests from Twitter documentation https://dev.twitter.com/docs/auth/oauth
7
-
8
- var reqsign = hmacsign('POST', 'https://api.twitter.com/oauth/request_token',
9
- { oauth_callback: 'http://localhost:3005/the_dance/process_callback?service_provider_id=11'
10
- , oauth_consumer_key: 'GDdmIQH6jhtmLUypg82g'
11
- , oauth_nonce: 'QP70eNmVz8jvdPevU3oJD2AfF7R7odC2XJcn4XlZJqk'
12
- , oauth_signature_method: 'HMAC-SHA1'
13
- , oauth_timestamp: '1272323042'
14
- , oauth_version: '1.0'
15
- }, "MCD8BKwGdgPHvAuvgvz4EQpqDAtx89grbuNMRd7Eh98")
16
-
17
- console.log(reqsign)
18
- console.log('8wUi7m5HFQy76nowoCThusfgB+Q=')
19
- assert.equal(reqsign, '8wUi7m5HFQy76nowoCThusfgB+Q=')
20
-
21
- var accsign = hmacsign('POST', 'https://api.twitter.com/oauth/access_token',
22
- { oauth_consumer_key: 'GDdmIQH6jhtmLUypg82g'
23
- , oauth_nonce: '9zWH6qe0qG7Lc1telCn7FhUbLyVdjEaL3MO5uHxn8'
24
- , oauth_signature_method: 'HMAC-SHA1'
25
- , oauth_token: '8ldIZyxQeVrFZXFOZH5tAwj6vzJYuLQpl0WUEYtWc'
26
- , oauth_timestamp: '1272323047'
27
- , oauth_verifier: 'pDNg57prOHapMbhv25RNf75lVRd6JDsni1AJJIDYoTY'
28
- , oauth_version: '1.0'
29
- }, "MCD8BKwGdgPHvAuvgvz4EQpqDAtx89grbuNMRd7Eh98", "x6qpRnlEmW9JbQn4PQVVeVG8ZLPEx6A0TOebgwcuA")
30
-
31
- console.log(accsign)
32
- console.log('PUw/dHA4fnlJYM6RhXk5IU/0fCc=')
33
- assert.equal(accsign, 'PUw/dHA4fnlJYM6RhXk5IU/0fCc=')
34
-
35
- var upsign = hmacsign('POST', 'http://api.twitter.com/1/statuses/update.json',
36
- { oauth_consumer_key: "GDdmIQH6jhtmLUypg82g"
37
- , oauth_nonce: "oElnnMTQIZvqvlfXM56aBLAf5noGD0AQR3Fmi7Q6Y"
38
- , oauth_signature_method: "HMAC-SHA1"
39
- , oauth_token: "819797-Jxq8aYUDRmykzVKrgoLhXSq67TEa5ruc4GJC2rWimw"
40
- , oauth_timestamp: "1272325550"
41
- , oauth_version: "1.0"
42
- , status: 'setting up my twitter 私のさえずりを設定する'
43
- }, "MCD8BKwGdgPHvAuvgvz4EQpqDAtx89grbuNMRd7Eh98", "J6zix3FfA9LofH0awS24M3HcBYXO5nI1iYe8EfBA")
44
-
45
- console.log(upsign)
46
- console.log('yOahq5m0YjDDjfjxHaXEsW9D+X0=')
47
- assert.equal(upsign, 'yOahq5m0YjDDjfjxHaXEsW9D+X0=')
48
-
49
-
@@ -1 +0,0 @@
1
- node_modules
@@ -1,10 +0,0 @@
1
- {
2
- "node": true,
3
-
4
- "curly": true,
5
- "latedef": true,
6
- "quotmark": true,
7
- "undef": true,
8
- "unused": true,
9
- "trailing": true
10
- }
@@ -1,18 +0,0 @@
1
- .idea
2
- *.iml
3
- npm-debug.log
4
- dump.rdb
5
- node_modules
6
- results.tap
7
- results.xml
8
- npm-shrinkwrap.json
9
- config.json
10
- .DS_Store
11
- */.DS_Store
12
- */*/.DS_Store
13
- ._*
14
- */._*
15
- */*/._*
16
- coverage.*
17
- lib-cov
18
- complexity.md
@@ -1,4 +0,0 @@
1
- language: node_js
2
-
3
- node_js:
4
- - 0.10
@@ -1,28 +0,0 @@
1
- Copyright (c) 2014 Nathan LaFreniere and other contributors.
2
- All rights reserved.
3
-
4
- Redistribution and use in source and binary forms, with or without
5
- modification, are permitted provided that the following conditions are met:
6
- * Redistributions of source code must retain the above copyright
7
- notice, this list of conditions and the following disclaimer.
8
- * Redistributions in binary form must reproduce the above copyright
9
- notice, this list of conditions and the following disclaimer in the
10
- documentation and/or other materials provided with the distribution.
11
- * The names of any contributors may not be used to endorse or promote
12
- products derived from this software without specific prior written
13
- permission.
14
-
15
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
16
- ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
17
- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
18
- DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE LIABLE FOR ANY
19
- DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
20
- (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21
- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
22
- ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
24
- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25
-
26
- * * *
27
-
28
- The complete list of contributors can be found at: https://github.com/hapijs/qs/graphs/contributors
@@ -1,8 +0,0 @@
1
- test:
2
- @node node_modules/lab/bin/lab
3
- test-cov:
4
- @node node_modules/lab/bin/lab -t 100
5
- test-cov-html:
6
- @node node_modules/lab/bin/lab -r html -o coverage.html
7
-
8
- .PHONY: test test-cov test-cov-html
@@ -1,120 +0,0 @@
1
- # qs
2
-
3
- A querystring parsing and stringifying library with some added security.
4
-
5
- [![Build Status](https://secure.travis-ci.org/hapijs/qs.svg)](http://travis-ci.org/hapijs/qs)
6
-
7
- Lead Maintainer: [Nathan LaFreniere](https://github.com/nlf)
8
-
9
- The **qs** module was original created and maintained by [TJ Holowaychuk](https://github.com/visionmedia/node-querystring).
10
-
11
- ## Usage
12
-
13
- ```javascript
14
- var Qs = require('qs');
15
-
16
- var obj = Qs.parse('a=c'); // { a: 'c' }
17
- var str = Qs.stringify(obj); // 'a=c'
18
- ```
19
-
20
- ### Objects
21
-
22
- **qs** allows you to create nested objects within your query strings, by surrounding the name of sub-keys with square brackets `[]`.
23
- For example, the string `'foo[bar]=baz'` converts to:
24
-
25
- ```javascript
26
- {
27
- foo: {
28
- bar: 'baz'
29
- }
30
- }
31
- ```
32
-
33
- You can also nest your objects, like `'foo[bar][baz]=foobarbaz'`:
34
-
35
- ```javascript
36
- {
37
- foo: {
38
- bar: {
39
- baz: 'foobarbaz'
40
- }
41
- }
42
- }
43
- ```
44
-
45
- By default, when nesting objects **qs** will only parse up to 5 children deep. This means if you attempt to parse a string like
46
- `'a[b][c][d][e][f][g][h][i]=j'` your resulting object will be:
47
-
48
- ```javascript
49
- {
50
- a: {
51
- b: {
52
- c: {
53
- d: {
54
- e: {
55
- f: {
56
- '[g][h][i]': 'j'
57
- }
58
- }
59
- }
60
- }
61
- }
62
- }
63
- }
64
- ```
65
-
66
- This depth can be overridden by passing a `depth` option to `Qs.parse(string, depth)`:
67
-
68
- ```javascript
69
- Qs.parse('a[b][c][d][e][f][g][h][i]=j', 1);
70
- // { a: { b: { '[c][d][e][f][g][h][i]': 'j' } } }
71
- ```
72
-
73
- The depth limit mitigate abuse when **qs** is used to parse user input, and it is recommended to keep it a reasonably small number.
74
-
75
- ### Arrays
76
-
77
- **qs** can also parse arrays using a similar `[]` notation:
78
-
79
- ```javascript
80
- Qs.parse('a[]=b&a[]=c');
81
- // { a: ['b', 'c'] }
82
- ```
83
-
84
- You may specify an index as well:
85
-
86
- ```javascript
87
- Qs.parse('a[1]=c&a[0]=b');
88
- // { a: ['b', 'c'] }
89
- ```
90
-
91
- Note that the only difference between an index in an array and a key in an object is that the value between the brackets must be a number
92
- to create an array. When creating arrays with specific indices, **qs** will compact a sparse array to only the existing values preserving
93
- their order:
94
-
95
- ```javascript
96
- Qs.parse('a[1]=b&a[15]=c');
97
- // { a: ['b', 'c'] }
98
- ```
99
-
100
- **qs** will also limit specifying indices in an array to a maximum index of `20`. Any array members with an index of greater than `20` will
101
- instead be converted to an object with the index as the key:
102
-
103
- ```javascript
104
- Qs.parse('a[100]=b');
105
- // { a: { '100': 'b' } }
106
- ```
107
-
108
- If you mix notations, **qs** will merge the two items into an object:
109
-
110
- ```javascript
111
- Qs.parse('a[0]=b&a[b]=c');
112
- // { a: { '0': 'b', b: 'c' } }
113
- ```
114
-
115
- You can also create arrays of objects:
116
-
117
- ```javascript
118
- Qs.parse('a[][b]=c');
119
- // { a: [{ b: 'c' }] }
120
- ```
@@ -1 +0,0 @@
1
- module.exports = require('./lib');
@@ -1,15 +0,0 @@
1
- // Load modules
2
-
3
- var Stringify = require('./stringify');
4
- var Parse = require('./parse');
5
-
6
-
7
- // Declare internals
8
-
9
- var internals = {};
10
-
11
-
12
- module.exports = {
13
- stringify: Stringify,
14
- parse: Parse
15
- };