fsevents 1.0.7 → 1.0.8

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of fsevents might be problematic. Click here for more details.

Files changed (322) hide show
  1. package/node_modules/ansi/History.md +7 -0
  2. package/node_modules/ansi/LICENSE +24 -0
  3. package/node_modules/ansi/lib/ansi.js +2 -2
  4. package/node_modules/ansi/package.json +15 -10
  5. package/node_modules/ansi-regex/package.json +1 -0
  6. package/node_modules/ansi-styles/package.json +1 -0
  7. package/node_modules/are-we-there-yet/.npmignore +2 -0
  8. package/node_modules/are-we-there-yet/index.js +20 -18
  9. package/node_modules/are-we-there-yet/package.json +15 -13
  10. package/node_modules/asn1/package.json +3 -1
  11. package/node_modules/assert-plus/README.md +50 -21
  12. package/node_modules/assert-plus/assert.js +168 -207
  13. package/node_modules/assert-plus/package.json +55 -15
  14. package/node_modules/async/README.md +86 -4
  15. package/node_modules/async/dist/async.js +4 -3
  16. package/node_modules/async/dist/async.min.js +1 -1
  17. package/node_modules/async/lib/async.js +4 -3
  18. package/node_modules/async/package.json +10 -10
  19. package/node_modules/aws-sign2/package.json +1 -0
  20. package/node_modules/aws4/.npmignore +3 -0
  21. package/node_modules/aws4/.tern-port +1 -0
  22. package/node_modules/{tar-pack/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match → aws4}/.travis.yml +2 -0
  23. package/node_modules/{tar-pack/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/LICENSE.md → aws4/LICENSE} +1 -3
  24. package/node_modules/aws4/README.md +510 -0
  25. package/node_modules/aws4/aws4.js +313 -0
  26. package/node_modules/aws4/example.js +372 -0
  27. package/node_modules/aws4/node_modules/lru-cache/.npmignore +1 -0
  28. package/node_modules/aws4/node_modules/lru-cache/.travis.yml +8 -0
  29. package/node_modules/aws4/node_modules/lru-cache/CONTRIBUTORS +14 -0
  30. package/node_modules/aws4/node_modules/lru-cache/README.md +137 -0
  31. package/node_modules/aws4/node_modules/lru-cache/lib/lru-cache.js +334 -0
  32. package/node_modules/aws4/node_modules/lru-cache/package.json +66 -0
  33. package/node_modules/aws4/node_modules/lru-cache/test/basic.js +396 -0
  34. package/node_modules/aws4/node_modules/lru-cache/test/foreach.js +120 -0
  35. package/node_modules/aws4/node_modules/lru-cache/test/memory-leak.js +51 -0
  36. package/node_modules/aws4/node_modules/lru-cache/test/serialize.js +216 -0
  37. package/node_modules/aws4/package.json +113 -0
  38. package/node_modules/bl/.travis.yml +5 -6
  39. package/node_modules/bl/bl.js +5 -0
  40. package/node_modules/bl/package.json +16 -13
  41. package/node_modules/bl/test/test.js +554 -6
  42. package/node_modules/block-stream/package.json +1 -0
  43. package/node_modules/boom/package.json +1 -0
  44. package/node_modules/caseless/package.json +1 -0
  45. package/node_modules/chalk/package.json +1 -0
  46. package/node_modules/combined-stream/package.json +1 -0
  47. package/node_modules/commander/package.json +1 -0
  48. package/node_modules/core-util-is/package.json +2 -2
  49. package/node_modules/cryptiles/package.json +1 -0
  50. package/node_modules/dashdash/README.md +70 -7
  51. package/node_modules/dashdash/etc/dashdash.bash_completion.in +388 -0
  52. package/node_modules/dashdash/lib/dashdash.js +202 -2
  53. package/node_modules/dashdash/package.json +12 -9
  54. package/node_modules/debug/.jshintrc +3 -0
  55. package/node_modules/debug/.npmignore +6 -0
  56. package/node_modules/debug/History.md +195 -0
  57. package/node_modules/debug/Makefile +36 -0
  58. package/node_modules/debug/Readme.md +86 -13
  59. package/node_modules/debug/bower.json +28 -0
  60. package/node_modules/debug/browser.js +168 -0
  61. package/node_modules/debug/component.json +19 -0
  62. package/node_modules/debug/debug.js +132 -72
  63. package/node_modules/debug/node.js +209 -0
  64. package/node_modules/debug/package.json +32 -22
  65. package/node_modules/deep-extend/README.md +51 -50
  66. package/node_modules/deep-extend/package.json +14 -16
  67. package/node_modules/delayed-stream/package.json +1 -0
  68. package/node_modules/delegates/History.md +6 -0
  69. package/node_modules/delegates/License +20 -0
  70. package/node_modules/delegates/package.json +17 -13
  71. package/node_modules/ecc-jsbn/package.json +3 -1
  72. package/node_modules/escape-string-regexp/package.json +2 -2
  73. package/node_modules/extend/package.json +1 -0
  74. package/node_modules/extsprintf/package.json +4 -2
  75. package/node_modules/forever-agent/package.json +1 -0
  76. package/node_modules/form-data/package.json +1 -0
  77. package/node_modules/fstream/package.json +1 -0
  78. package/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/package.json +1 -0
  79. package/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/package.json +1 -0
  80. package/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/package.json +1 -0
  81. package/node_modules/fstream-ignore/node_modules/minimatch/package.json +1 -0
  82. package/node_modules/fstream-ignore/package.json +3 -1
  83. package/node_modules/gauge/package.json +14 -12
  84. package/node_modules/gauge/progress-bar.js +4 -5
  85. package/node_modules/gauge/test/progress-bar.js +1 -1
  86. package/node_modules/generate-function/package.json +1 -0
  87. package/node_modules/generate-object-property/package.json +1 -0
  88. package/node_modules/graceful-fs/README.md +17 -0
  89. package/node_modules/graceful-fs/graceful-fs.js +2 -0
  90. package/node_modules/graceful-fs/package.json +16 -11
  91. package/node_modules/graceful-readlink/package.json +1 -0
  92. package/node_modules/har-validator/README.md +45 -122
  93. package/node_modules/har-validator/package.json +16 -16
  94. package/node_modules/has-ansi/package.json +1 -0
  95. package/node_modules/has-unicode/README.md +6 -3
  96. package/node_modules/has-unicode/index.js +7 -3
  97. package/node_modules/has-unicode/package.json +15 -13
  98. package/node_modules/has-unicode/test/index.js +1 -1
  99. package/node_modules/hawk/README.md +634 -634
  100. package/node_modules/hawk/bower.json +24 -24
  101. package/node_modules/hawk/component.json +18 -18
  102. package/node_modules/hawk/dist/client.js +343 -340
  103. package/node_modules/hawk/example/usage.js +78 -78
  104. package/node_modules/hawk/lib/browser.js +637 -637
  105. package/node_modules/hawk/lib/client.js +369 -369
  106. package/node_modules/hawk/lib/crypto.js +126 -126
  107. package/node_modules/hawk/lib/index.js +15 -15
  108. package/node_modules/hawk/lib/server.js +548 -540
  109. package/node_modules/hawk/lib/utils.js +184 -164
  110. package/node_modules/hawk/package.json +9 -8
  111. package/node_modules/hawk/test/browser.js +1492 -1492
  112. package/node_modules/hawk/test/client.js +440 -440
  113. package/node_modules/hawk/test/crypto.js +70 -70
  114. package/node_modules/hawk/test/index.js +378 -378
  115. package/node_modules/hawk/test/readme.js +95 -95
  116. package/node_modules/hawk/test/server.js +1329 -1302
  117. package/node_modules/hawk/test/uri.js +838 -838
  118. package/node_modules/hawk/test/utils.js +149 -121
  119. package/node_modules/hoek/package.json +1 -0
  120. package/node_modules/http-signature/CHANGES.md +7 -0
  121. package/node_modules/http-signature/http_signing.md +71 -3
  122. package/node_modules/http-signature/lib/signer.js +5 -0
  123. package/node_modules/http-signature/package.json +13 -11
  124. package/node_modules/ini/package.json +3 -1
  125. package/node_modules/is-my-json-valid/formats.js +1 -1
  126. package/node_modules/is-my-json-valid/package.json +11 -10
  127. package/node_modules/is-property/package.json +1 -0
  128. package/node_modules/is-typedarray/package.json +3 -1
  129. package/node_modules/isarray/package.json +2 -2
  130. package/node_modules/isstream/package.json +1 -0
  131. package/node_modules/jodid25519/package.json +3 -1
  132. package/node_modules/jsbn/package.json +3 -1
  133. package/node_modules/json-schema/package.json +2 -1
  134. package/node_modules/json-stringify-safe/package.json +1 -0
  135. package/node_modules/jsonpointer/package.json +1 -0
  136. package/node_modules/jsprim/package.json +3 -1
  137. package/node_modules/lodash._basetostring/package.json +4 -4
  138. package/node_modules/lodash._createpadding/package.json +3 -2
  139. package/node_modules/lodash._root/LICENSE +22 -0
  140. package/node_modules/lodash._root/README.md +18 -0
  141. package/node_modules/lodash._root/index.js +53 -0
  142. package/node_modules/lodash._root/package.json +77 -0
  143. package/node_modules/lodash.pad/LICENSE +2 -2
  144. package/node_modules/lodash.pad/README.md +4 -6
  145. package/node_modules/lodash.pad/index.js +347 -15
  146. package/node_modules/lodash.pad/package.json +20 -34
  147. package/node_modules/lodash.padleft/package.json +3 -1
  148. package/node_modules/lodash.padright/package.json +3 -1
  149. package/node_modules/lodash.repeat/LICENSE +2 -2
  150. package/node_modules/lodash.repeat/README.md +4 -6
  151. package/node_modules/lodash.repeat/index.js +262 -11
  152. package/node_modules/lodash.repeat/package.json +21 -34
  153. package/node_modules/mime-db/package.json +2 -2
  154. package/node_modules/mime-types/package.json +2 -2
  155. package/node_modules/ms/.npmignore +5 -0
  156. package/node_modules/{deep-extend → ms}/LICENSE +2 -2
  157. package/node_modules/ms/README.md +35 -0
  158. package/node_modules/ms/index.js +125 -0
  159. package/node_modules/ms/package.json +56 -0
  160. package/node_modules/node-pre-gyp/CHANGELOG.md +8 -0
  161. package/node_modules/node-pre-gyp/LICENSE +27 -0
  162. package/node_modules/node-pre-gyp/lib/util/abi_crosswalk.json +36 -0
  163. package/node_modules/node-pre-gyp/package.json +23 -22
  164. package/node_modules/node-uuid/package.json +1 -0
  165. package/node_modules/npmlog/package.json +18 -16
  166. package/node_modules/oauth-sign/index.js +2 -0
  167. package/node_modules/oauth-sign/package.json +10 -9
  168. package/node_modules/once/README.md +18 -0
  169. package/node_modules/once/once.js +8 -6
  170. package/node_modules/once/package.json +20 -12
  171. package/node_modules/pinkie/index.js +3 -3
  172. package/node_modules/pinkie/package.json +10 -9
  173. package/node_modules/pinkie/readme.md +1 -1
  174. package/node_modules/pinkie-promise/package.json +1 -0
  175. package/node_modules/process-nextick-args/package.json +2 -2
  176. package/node_modules/qs/.eslintrc +17 -0
  177. package/node_modules/qs/.travis.yml +66 -5
  178. package/node_modules/qs/CHANGELOG.md +86 -75
  179. package/node_modules/qs/README.md +85 -81
  180. package/node_modules/qs/bower.json +1 -1
  181. package/node_modules/qs/component.json +1 -1
  182. package/node_modules/qs/dist/qs.js +108 -177
  183. package/node_modules/qs/lib/index.js +1 -7
  184. package/node_modules/qs/lib/parse.js +26 -49
  185. package/node_modules/qs/lib/stringify.js +22 -46
  186. package/node_modules/qs/lib/utils.js +45 -73
  187. package/node_modules/qs/package.json +51 -28
  188. package/node_modules/qs/test/index.js +5 -0
  189. package/node_modules/qs/test/parse.js +236 -321
  190. package/node_modules/qs/test/stringify.js +139 -197
  191. package/node_modules/qs/test/utils.js +6 -25
  192. package/node_modules/rc/node_modules/minimist/package.json +1 -0
  193. package/node_modules/rc/package.json +1 -0
  194. package/node_modules/readable-stream/package.json +1 -0
  195. package/node_modules/request/CHANGELOG.md +16 -1
  196. package/node_modules/request/README.md +1 -1
  197. package/node_modules/request/lib/har.js +3 -2
  198. package/node_modules/request/lib/multipart.js +3 -0
  199. package/node_modules/request/lib/tunnel.js +0 -2
  200. package/node_modules/request/package.json +20 -17
  201. package/node_modules/request/request.js +50 -26
  202. package/node_modules/rimraf/README.md +1 -1
  203. package/node_modules/rimraf/node_modules/glob/README.md +2 -2
  204. package/node_modules/rimraf/node_modules/glob/glob.js +14 -1
  205. package/node_modules/rimraf/node_modules/glob/node_modules/inflight/node_modules/wrappy/package.json +1 -0
  206. package/node_modules/rimraf/node_modules/glob/node_modules/inflight/package.json +1 -0
  207. package/node_modules/rimraf/node_modules/glob/node_modules/inherits/package.json +2 -1
  208. package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/package.json +1 -0
  209. package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/package.json +1 -0
  210. package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/package.json +1 -0
  211. package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/package.json +1 -0
  212. package/node_modules/rimraf/node_modules/glob/node_modules/once/node_modules/wrappy/package.json +1 -0
  213. package/node_modules/rimraf/node_modules/glob/node_modules/once/package.json +1 -0
  214. package/node_modules/rimraf/node_modules/glob/node_modules/path-is-absolute/package.json +1 -0
  215. package/node_modules/rimraf/node_modules/glob/package.json +11 -11
  216. package/node_modules/rimraf/package.json +13 -12
  217. package/node_modules/semver/package.json +3 -1
  218. package/node_modules/sntp/package.json +1 -0
  219. package/node_modules/sshpk/.npmignore +1 -0
  220. package/node_modules/sshpk/bin/sshpk-sign +176 -0
  221. package/node_modules/sshpk/bin/sshpk-verify +166 -0
  222. package/node_modules/sshpk/lib/ed-compat.js +2 -0
  223. package/node_modules/sshpk/lib/key.js +6 -0
  224. package/node_modules/sshpk/man/man1/sshpk-conv.1 +135 -0
  225. package/node_modules/sshpk/man/man1/sshpk-sign.1 +81 -0
  226. package/node_modules/sshpk/man/man1/sshpk-verify.1 +68 -0
  227. package/node_modules/sshpk/package.json +18 -9
  228. package/node_modules/string_decoder/package.json +2 -2
  229. package/node_modules/stringstream/package.json +1 -0
  230. package/node_modules/strip-ansi/package.json +1 -0
  231. package/node_modules/strip-json-comments/package.json +1 -0
  232. package/node_modules/supports-color/package.json +1 -0
  233. package/node_modules/tar/package.json +1 -0
  234. package/node_modules/tar-pack/README.md +2 -2
  235. package/node_modules/tar-pack/package.json +25 -26
  236. package/node_modules/tough-cookie/package.json +1 -0
  237. package/node_modules/tunnel-agent/package.json +1 -0
  238. package/node_modules/tweetnacl/README.md +1 -1
  239. package/node_modules/tweetnacl/package.json +13 -11
  240. package/node_modules/uid-number/package.json +14 -13
  241. package/node_modules/uid-number/uid-number.js +9 -4
  242. package/node_modules/util-deprecate/package.json +2 -2
  243. package/node_modules/verror/package.json +1 -0
  244. package/node_modules/{tar-pack/node_modules/rimraf/node_modules/glob/node_modules/once/node_modules/wrappy → wrappy}/package.json +3 -2
  245. package/node_modules/xtend/package.json +1 -0
  246. package/package.json +2 -2
  247. package/node_modules/are-we-there-yet/README.md~ +0 -183
  248. package/node_modules/bl/test/basic-test.js +0 -541
  249. package/node_modules/bl/test/sauce.js +0 -38
  250. package/node_modules/debug/index.js +0 -5
  251. package/node_modules/debug/lib/debug.js +0 -147
  252. package/node_modules/deep-extend/test/index.spec.js +0 -220
  253. package/node_modules/deep-extend/test/mocha.opts +0 -1
  254. package/node_modules/gauge/README.md~ +0 -161
  255. package/node_modules/has-unicode/README.md~ +0 -4
  256. package/node_modules/once/LICENSE +0 -27
  257. package/node_modules/once/test/once.js +0 -18
  258. package/node_modules/sshpk/node_modules/assert-plus/README.md +0 -155
  259. package/node_modules/sshpk/node_modules/assert-plus/assert.js +0 -206
  260. package/node_modules/sshpk/node_modules/assert-plus/package.json +0 -88
  261. package/node_modules/tar-pack/node_modules/rimraf/README.md +0 -43
  262. package/node_modules/tar-pack/node_modules/rimraf/bin.js +0 -40
  263. package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/README.md +0 -359
  264. package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/common.js +0 -226
  265. package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/glob.js +0 -752
  266. package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/inflight/.eslintrc +0 -17
  267. package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/inflight/README.md +0 -37
  268. package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/inflight/inflight.js +0 -44
  269. package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/inflight/node_modules/wrappy/package.json +0 -58
  270. package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/inflight/package.json +0 -67
  271. package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/inflight/test.js +0 -97
  272. package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/inherits/LICENSE +0 -16
  273. package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/inherits/README.md +0 -42
  274. package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/inherits/inherits.js +0 -1
  275. package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/inherits/inherits_browser.js +0 -23
  276. package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/inherits/package.json +0 -58
  277. package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/inherits/test.js +0 -25
  278. package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/minimatch/README.md +0 -216
  279. package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/minimatch/minimatch.js +0 -912
  280. package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/.npmignore +0 -3
  281. package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/README.md +0 -122
  282. package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/example.js +0 -8
  283. package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/index.js +0 -191
  284. package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.npmignore +0 -2
  285. package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/Makefile +0 -6
  286. package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/README.md +0 -89
  287. package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/example.js +0 -5
  288. package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/index.js +0 -50
  289. package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/package.json +0 -79
  290. package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/test/balanced.js +0 -84
  291. package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/.travis.yml +0 -4
  292. package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/LICENSE +0 -18
  293. package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/README.markdown +0 -62
  294. package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/example/map.js +0 -6
  295. package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/index.js +0 -13
  296. package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/package.json +0 -90
  297. package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/test/map.js +0 -39
  298. package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/package.json +0 -81
  299. package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/minimatch/package.json +0 -66
  300. package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/once/README.md +0 -51
  301. package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/once/node_modules/wrappy/LICENSE +0 -15
  302. package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/once/node_modules/wrappy/README.md +0 -36
  303. package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/once/node_modules/wrappy/test/basic.js +0 -51
  304. package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/once/node_modules/wrappy/wrappy.js +0 -33
  305. package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/once/once.js +0 -21
  306. package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/once/package.json +0 -70
  307. package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/path-is-absolute/index.js +0 -20
  308. package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/path-is-absolute/package.json +0 -78
  309. package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/path-is-absolute/readme.md +0 -51
  310. package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/package.json +0 -79
  311. package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/sync.js +0 -460
  312. package/node_modules/tar-pack/node_modules/rimraf/package.json +0 -69
  313. package/node_modules/tar-pack/node_modules/rimraf/rimraf.js +0 -333
  314. package/node_modules/uid-number/LICENCE +0 -25
  315. /package/node_modules/{sshpk/node_modules/assert-plus → assert-plus}/AUTHORS +0 -0
  316. /package/node_modules/{sshpk/node_modules/assert-plus → assert-plus}/CHANGES.md +0 -0
  317. /package/node_modules/{tar-pack/node_modules/rimraf → aws4/node_modules/lru-cache}/LICENSE +0 -0
  318. /package/node_modules/{tar-pack/node_modules/rimraf/node_modules/glob/node_modules/inflight → uid-number}/LICENSE +0 -0
  319. /package/node_modules/{tar-pack/node_modules/rimraf/node_modules/glob/node_modules/inflight/node_modules/wrappy → wrappy}/LICENSE +0 -0
  320. /package/node_modules/{tar-pack/node_modules/rimraf/node_modules/glob/node_modules/inflight/node_modules/wrappy → wrappy}/README.md +0 -0
  321. /package/node_modules/{tar-pack/node_modules/rimraf/node_modules/glob/node_modules/inflight/node_modules/wrappy → wrappy}/test/basic.js +0 -0
  322. /package/node_modules/{tar-pack/node_modules/rimraf/node_modules/glob/node_modules/inflight/node_modules/wrappy → wrappy}/wrappy.js +0 -0
@@ -1,340 +1,343 @@
1
- 'use strict'
2
-
3
- // Load modules
4
-
5
- ;
6
-
7
- function _typeof(obj) { return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj; }
8
-
9
- var Url = require('url');
10
- var Hoek = require('hoek');
11
- var Cryptiles = require('cryptiles');
12
- var Crypto = require('./crypto');
13
- var Utils = require('./utils');
14
-
15
- // Declare internals
16
-
17
- var internals = {};
18
-
19
- // Generate an Authorization header for a given request
20
-
21
- /*
22
- uri: 'http://example.com/resource?a=b' or object from Url.parse()
23
- method: HTTP verb (e.g. 'GET', 'POST')
24
- options: {
25
-
26
- // Required
27
-
28
- credentials: {
29
- id: 'dh37fgj492je',
30
- key: 'aoijedoaijsdlaksjdl',
31
- algorithm: 'sha256' // 'sha1', 'sha256'
32
- },
33
-
34
- // Optional
35
-
36
- ext: 'application-specific', // Application specific data sent via the ext attribute
37
- timestamp: Date.now(), // A pre-calculated timestamp
38
- nonce: '2334f34f', // A pre-generated nonce
39
- localtimeOffsetMsec: 400, // Time offset to sync with server time (ignored if timestamp provided)
40
- payload: '{"some":"payload"}', // UTF-8 encoded string for body hash generation (ignored if hash provided)
41
- contentType: 'application/json', // Payload content-type (ignored if hash provided)
42
- hash: 'U4MKKSmiVxk37JCCrAVIjV=', // Pre-calculated payload hash
43
- app: '24s23423f34dx', // Oz application id
44
- dlg: '234sz34tww3sd' // Oz delegated-by application id
45
- }
46
- */
47
-
48
- exports.header = function (uri, method, options) {
49
-
50
- var result = {
51
- field: '',
52
- artifacts: {}
53
- };
54
-
55
- // Validate inputs
56
-
57
- if (!uri || typeof uri !== 'string' && (typeof uri === 'undefined' ? 'undefined' : _typeof(uri)) !== 'object' || !method || typeof method !== 'string' || !options || (typeof options === 'undefined' ? 'undefined' : _typeof(options)) !== 'object') {
58
-
59
- result.err = 'Invalid argument type';
60
- return result;
61
- }
62
-
63
- // Application time
64
-
65
- var timestamp = options.timestamp || Utils.nowSecs(options.localtimeOffsetMsec);
66
-
67
- // Validate credentials
68
-
69
- var credentials = options.credentials;
70
- if (!credentials || !credentials.id || !credentials.key || !credentials.algorithm) {
71
-
72
- result.err = 'Invalid credential object';
73
- return result;
74
- }
75
-
76
- if (Crypto.algorithms.indexOf(credentials.algorithm) === -1) {
77
- result.err = 'Unknown algorithm';
78
- return result;
79
- }
80
-
81
- // Parse URI
82
-
83
- if (typeof uri === 'string') {
84
- uri = Url.parse(uri);
85
- }
86
-
87
- // Calculate signature
88
-
89
- var artifacts = {
90
- ts: timestamp,
91
- nonce: options.nonce || Cryptiles.randomString(6),
92
- method: method,
93
- resource: uri.pathname + (uri.search || ''), // Maintain trailing '?'
94
- host: uri.hostname,
95
- port: uri.port || (uri.protocol === 'http:' ? 80 : 443),
96
- hash: options.hash,
97
- ext: options.ext,
98
- app: options.app,
99
- dlg: options.dlg
100
- };
101
-
102
- result.artifacts = artifacts;
103
-
104
- // Calculate payload hash
105
-
106
- if (!artifacts.hash && (options.payload || options.payload === '')) {
107
-
108
- artifacts.hash = Crypto.calculatePayloadHash(options.payload, credentials.algorithm, options.contentType);
109
- }
110
-
111
- var mac = Crypto.calculateMac('header', credentials, artifacts);
112
-
113
- // Construct header
114
-
115
- var hasExt = artifacts.ext !== null && artifacts.ext !== undefined && artifacts.ext !== ''; // Other falsey values allowed
116
- var header = 'Hawk id="' + credentials.id + '", ts="' + artifacts.ts + '", nonce="' + artifacts.nonce + (artifacts.hash ? '", hash="' + artifacts.hash : '') + (hasExt ? '", ext="' + Hoek.escapeHeaderAttribute(artifacts.ext) : '') + '", mac="' + mac + '"';
117
-
118
- if (artifacts.app) {
119
- header = header + ', app="' + artifacts.app + (artifacts.dlg ? '", dlg="' + artifacts.dlg : '') + '"';
120
- }
121
-
122
- result.field = header;
123
-
124
- return result;
125
- };
126
-
127
- // Validate server response
128
-
129
- /*
130
- res: node's response object
131
- artifacts: object received from header().artifacts
132
- options: {
133
- payload: optional payload received
134
- required: specifies if a Server-Authorization header is required. Defaults to 'false'
135
- }
136
- */
137
-
138
- exports.authenticate = function (res, credentials, artifacts, options) {
139
-
140
- artifacts = Hoek.clone(artifacts);
141
- options = options || {};
142
-
143
- if (res.headers['www-authenticate']) {
144
-
145
- // Parse HTTP WWW-Authenticate header
146
-
147
- var wwwAttributes = Utils.parseAuthorizationHeader(res.headers['www-authenticate'], ['ts', 'tsm', 'error']);
148
- if (wwwAttributes instanceof Error) {
149
- return false;
150
- }
151
-
152
- // Validate server timestamp (not used to update clock since it is done via the SNPT client)
153
-
154
- if (wwwAttributes.ts) {
155
- var tsm = Crypto.calculateTsMac(wwwAttributes.ts, credentials);
156
- if (tsm !== wwwAttributes.tsm) {
157
- return false;
158
- }
159
- }
160
- }
161
-
162
- // Parse HTTP Server-Authorization header
163
-
164
- if (!res.headers['server-authorization'] && !options.required) {
165
-
166
- return true;
167
- }
168
-
169
- var attributes = Utils.parseAuthorizationHeader(res.headers['server-authorization'], ['mac', 'ext', 'hash']);
170
- if (attributes instanceof Error) {
171
- return false;
172
- }
173
-
174
- artifacts.ext = attributes.ext;
175
- artifacts.hash = attributes.hash;
176
-
177
- var mac = Crypto.calculateMac('response', credentials, artifacts);
178
- if (mac !== attributes.mac) {
179
- return false;
180
- }
181
-
182
- if (!options.payload && options.payload !== '') {
183
-
184
- return true;
185
- }
186
-
187
- if (!attributes.hash) {
188
- return false;
189
- }
190
-
191
- var calculatedHash = Crypto.calculatePayloadHash(options.payload, credentials.algorithm, res.headers['content-type']);
192
- return calculatedHash === attributes.hash;
193
- };
194
-
195
- // Generate a bewit value for a given URI
196
-
197
- /*
198
- uri: 'http://example.com/resource?a=b' or object from Url.parse()
199
- options: {
200
-
201
- // Required
202
-
203
- credentials: {
204
- id: 'dh37fgj492je',
205
- key: 'aoijedoaijsdlaksjdl',
206
- algorithm: 'sha256' // 'sha1', 'sha256'
207
- },
208
- ttlSec: 60 * 60, // TTL in seconds
209
-
210
- // Optional
211
-
212
- ext: 'application-specific', // Application specific data sent via the ext attribute
213
- localtimeOffsetMsec: 400 // Time offset to sync with server time
214
- };
215
- */
216
-
217
- exports.getBewit = function (uri, options) {
218
-
219
- // Validate inputs
220
-
221
- if (!uri || typeof uri !== 'string' && (typeof uri === 'undefined' ? 'undefined' : _typeof(uri)) !== 'object' || !options || (typeof options === 'undefined' ? 'undefined' : _typeof(options)) !== 'object' || !options.ttlSec) {
222
-
223
- return '';
224
- }
225
-
226
- options.ext = options.ext === null || options.ext === undefined ? '' : options.ext; // Zero is valid value
227
-
228
- // Application time
229
-
230
- var now = Utils.now(options.localtimeOffsetMsec);
231
-
232
- // Validate credentials
233
-
234
- var credentials = options.credentials;
235
- if (!credentials || !credentials.id || !credentials.key || !credentials.algorithm) {
236
-
237
- return '';
238
- }
239
-
240
- if (Crypto.algorithms.indexOf(credentials.algorithm) === -1) {
241
- return '';
242
- }
243
-
244
- // Parse URI
245
-
246
- if (typeof uri === 'string') {
247
- uri = Url.parse(uri);
248
- }
249
-
250
- // Calculate signature
251
-
252
- var exp = Math.floor(now / 1000) + options.ttlSec;
253
- var mac = Crypto.calculateMac('bewit', credentials, {
254
- ts: exp,
255
- nonce: '',
256
- method: 'GET',
257
- resource: uri.pathname + (uri.search || ''), // Maintain trailing '?'
258
- host: uri.hostname,
259
- port: uri.port || (uri.protocol === 'http:' ? 80 : 443),
260
- ext: options.ext
261
- });
262
-
263
- // Construct bewit: id\exp\mac\ext
264
-
265
- var bewit = credentials.id + '\\' + exp + '\\' + mac + '\\' + options.ext;
266
- return Hoek.base64urlEncode(bewit);
267
- };
268
-
269
- // Generate an authorization string for a message
270
-
271
- /*
272
- host: 'example.com',
273
- port: 8000,
274
- message: '{"some":"payload"}', // UTF-8 encoded string for body hash generation
275
- options: {
276
-
277
- // Required
278
-
279
- credentials: {
280
- id: 'dh37fgj492je',
281
- key: 'aoijedoaijsdlaksjdl',
282
- algorithm: 'sha256' // 'sha1', 'sha256'
283
- },
284
-
285
- // Optional
286
-
287
- timestamp: Date.now(), // A pre-calculated timestamp
288
- nonce: '2334f34f', // A pre-generated nonce
289
- localtimeOffsetMsec: 400, // Time offset to sync with server time (ignored if timestamp provided)
290
- }
291
- */
292
-
293
- exports.message = function (host, port, message, options) {
294
-
295
- // Validate inputs
296
-
297
- if (!host || typeof host !== 'string' || !port || typeof port !== 'number' || message === null || message === undefined || typeof message !== 'string' || !options || (typeof options === 'undefined' ? 'undefined' : _typeof(options)) !== 'object') {
298
-
299
- return null;
300
- }
301
-
302
- // Application time
303
-
304
- var timestamp = options.timestamp || Utils.nowSecs(options.localtimeOffsetMsec);
305
-
306
- // Validate credentials
307
-
308
- var credentials = options.credentials;
309
- if (!credentials || !credentials.id || !credentials.key || !credentials.algorithm) {
310
-
311
- // Invalid credential object
312
- return null;
313
- }
314
-
315
- if (Crypto.algorithms.indexOf(credentials.algorithm) === -1) {
316
- return null;
317
- }
318
-
319
- // Calculate signature
320
-
321
- var artifacts = {
322
- ts: timestamp,
323
- nonce: options.nonce || Cryptiles.randomString(6),
324
- host: host,
325
- port: port,
326
- hash: Crypto.calculatePayloadHash(message, credentials.algorithm)
327
- };
328
-
329
- // Construct authorization
330
-
331
- var result = {
332
- id: credentials.id,
333
- ts: artifacts.ts,
334
- nonce: artifacts.nonce,
335
- hash: artifacts.hash,
336
- mac: Crypto.calculateMac('message', credentials, artifacts)
337
- };
338
-
339
- return result;
340
- };
1
+ 'use strict'
2
+
3
+ // Load modules
4
+
5
+ ;
6
+
7
+ var _typeof = function (obj) {
8
+
9
+ return obj && typeof Symbol !== 'undefined' && obj.constructor === Symbol ? 'symbol' : typeof obj;
10
+ };
11
+
12
+ var Url = require('url');
13
+ var Hoek = require('hoek');
14
+ var Cryptiles = require('cryptiles');
15
+ var Crypto = require('./crypto');
16
+ var Utils = require('./utils');
17
+
18
+ // Declare internals
19
+
20
+ var internals = {};
21
+
22
+ // Generate an Authorization header for a given request
23
+
24
+ /*
25
+ uri: 'http://example.com/resource?a=b' or object from Url.parse()
26
+ method: HTTP verb (e.g. 'GET', 'POST')
27
+ options: {
28
+
29
+ // Required
30
+
31
+ credentials: {
32
+ id: 'dh37fgj492je',
33
+ key: 'aoijedoaijsdlaksjdl',
34
+ algorithm: 'sha256' // 'sha1', 'sha256'
35
+ },
36
+
37
+ // Optional
38
+
39
+ ext: 'application-specific', // Application specific data sent via the ext attribute
40
+ timestamp: Date.now(), // A pre-calculated timestamp
41
+ nonce: '2334f34f', // A pre-generated nonce
42
+ localtimeOffsetMsec: 400, // Time offset to sync with server time (ignored if timestamp provided)
43
+ payload: '{"some":"payload"}', // UTF-8 encoded string for body hash generation (ignored if hash provided)
44
+ contentType: 'application/json', // Payload content-type (ignored if hash provided)
45
+ hash: 'U4MKKSmiVxk37JCCrAVIjV=', // Pre-calculated payload hash
46
+ app: '24s23423f34dx', // Oz application id
47
+ dlg: '234sz34tww3sd' // Oz delegated-by application id
48
+ }
49
+ */
50
+
51
+ exports.header = function (uri, method, options) {
52
+
53
+ var result = {
54
+ field: '',
55
+ artifacts: {}
56
+ };
57
+
58
+ // Validate inputs
59
+
60
+ if (!uri || typeof uri !== 'string' && (typeof uri === 'undefined' ? 'undefined' : _typeof(uri)) !== 'object' || !method || typeof method !== 'string' || !options || (typeof options === 'undefined' ? 'undefined' : _typeof(options)) !== 'object') {
61
+
62
+ result.err = 'Invalid argument type';
63
+ return result;
64
+ }
65
+
66
+ // Application time
67
+
68
+ var timestamp = options.timestamp || Utils.nowSecs(options.localtimeOffsetMsec);
69
+
70
+ // Validate credentials
71
+
72
+ var credentials = options.credentials;
73
+ if (!credentials || !credentials.id || !credentials.key || !credentials.algorithm) {
74
+
75
+ result.err = 'Invalid credential object';
76
+ return result;
77
+ }
78
+
79
+ if (Crypto.algorithms.indexOf(credentials.algorithm) === -1) {
80
+ result.err = 'Unknown algorithm';
81
+ return result;
82
+ }
83
+
84
+ // Parse URI
85
+
86
+ if (typeof uri === 'string') {
87
+ uri = Url.parse(uri);
88
+ }
89
+
90
+ // Calculate signature
91
+
92
+ var artifacts = {
93
+ ts: timestamp,
94
+ nonce: options.nonce || Cryptiles.randomString(6),
95
+ method: method,
96
+ resource: uri.pathname + (uri.search || ''), // Maintain trailing '?'
97
+ host: uri.hostname,
98
+ port: uri.port || (uri.protocol === 'http:' ? 80 : 443),
99
+ hash: options.hash,
100
+ ext: options.ext,
101
+ app: options.app,
102
+ dlg: options.dlg
103
+ };
104
+
105
+ result.artifacts = artifacts;
106
+
107
+ // Calculate payload hash
108
+
109
+ if (!artifacts.hash && (options.payload || options.payload === '')) {
110
+
111
+ artifacts.hash = Crypto.calculatePayloadHash(options.payload, credentials.algorithm, options.contentType);
112
+ }
113
+
114
+ var mac = Crypto.calculateMac('header', credentials, artifacts);
115
+
116
+ // Construct header
117
+
118
+ var hasExt = artifacts.ext !== null && artifacts.ext !== undefined && artifacts.ext !== ''; // Other falsey values allowed
119
+ var header = 'Hawk id="' + credentials.id + '", ts="' + artifacts.ts + '", nonce="' + artifacts.nonce + (artifacts.hash ? '", hash="' + artifacts.hash : '') + (hasExt ? '", ext="' + Hoek.escapeHeaderAttribute(artifacts.ext) : '') + '", mac="' + mac + '"';
120
+
121
+ if (artifacts.app) {
122
+ header = header + ', app="' + artifacts.app + (artifacts.dlg ? '", dlg="' + artifacts.dlg : '') + '"';
123
+ }
124
+
125
+ result.field = header;
126
+
127
+ return result;
128
+ };
129
+
130
+ // Validate server response
131
+
132
+ /*
133
+ res: node's response object
134
+ artifacts: object received from header().artifacts
135
+ options: {
136
+ payload: optional payload received
137
+ required: specifies if a Server-Authorization header is required. Defaults to 'false'
138
+ }
139
+ */
140
+
141
+ exports.authenticate = function (res, credentials, artifacts, options) {
142
+
143
+ artifacts = Hoek.clone(artifacts);
144
+ options = options || {};
145
+
146
+ if (res.headers['www-authenticate']) {
147
+
148
+ // Parse HTTP WWW-Authenticate header
149
+
150
+ var wwwAttributes = Utils.parseAuthorizationHeader(res.headers['www-authenticate'], ['ts', 'tsm', 'error']);
151
+ if (wwwAttributes instanceof Error) {
152
+ return false;
153
+ }
154
+
155
+ // Validate server timestamp (not used to update clock since it is done via the SNPT client)
156
+
157
+ if (wwwAttributes.ts) {
158
+ var tsm = Crypto.calculateTsMac(wwwAttributes.ts, credentials);
159
+ if (tsm !== wwwAttributes.tsm) {
160
+ return false;
161
+ }
162
+ }
163
+ }
164
+
165
+ // Parse HTTP Server-Authorization header
166
+
167
+ if (!res.headers['server-authorization'] && !options.required) {
168
+
169
+ return true;
170
+ }
171
+
172
+ var attributes = Utils.parseAuthorizationHeader(res.headers['server-authorization'], ['mac', 'ext', 'hash']);
173
+ if (attributes instanceof Error) {
174
+ return false;
175
+ }
176
+
177
+ artifacts.ext = attributes.ext;
178
+ artifacts.hash = attributes.hash;
179
+
180
+ var mac = Crypto.calculateMac('response', credentials, artifacts);
181
+ if (mac !== attributes.mac) {
182
+ return false;
183
+ }
184
+
185
+ if (!options.payload && options.payload !== '') {
186
+
187
+ return true;
188
+ }
189
+
190
+ if (!attributes.hash) {
191
+ return false;
192
+ }
193
+
194
+ var calculatedHash = Crypto.calculatePayloadHash(options.payload, credentials.algorithm, res.headers['content-type']);
195
+ return calculatedHash === attributes.hash;
196
+ };
197
+
198
+ // Generate a bewit value for a given URI
199
+
200
+ /*
201
+ uri: 'http://example.com/resource?a=b' or object from Url.parse()
202
+ options: {
203
+
204
+ // Required
205
+
206
+ credentials: {
207
+ id: 'dh37fgj492je',
208
+ key: 'aoijedoaijsdlaksjdl',
209
+ algorithm: 'sha256' // 'sha1', 'sha256'
210
+ },
211
+ ttlSec: 60 * 60, // TTL in seconds
212
+
213
+ // Optional
214
+
215
+ ext: 'application-specific', // Application specific data sent via the ext attribute
216
+ localtimeOffsetMsec: 400 // Time offset to sync with server time
217
+ };
218
+ */
219
+
220
+ exports.getBewit = function (uri, options) {
221
+
222
+ // Validate inputs
223
+
224
+ if (!uri || typeof uri !== 'string' && (typeof uri === 'undefined' ? 'undefined' : _typeof(uri)) !== 'object' || !options || (typeof options === 'undefined' ? 'undefined' : _typeof(options)) !== 'object' || !options.ttlSec) {
225
+
226
+ return '';
227
+ }
228
+
229
+ options.ext = options.ext === null || options.ext === undefined ? '' : options.ext; // Zero is valid value
230
+
231
+ // Application time
232
+
233
+ var now = Utils.now(options.localtimeOffsetMsec);
234
+
235
+ // Validate credentials
236
+
237
+ var credentials = options.credentials;
238
+ if (!credentials || !credentials.id || !credentials.key || !credentials.algorithm) {
239
+
240
+ return '';
241
+ }
242
+
243
+ if (Crypto.algorithms.indexOf(credentials.algorithm) === -1) {
244
+ return '';
245
+ }
246
+
247
+ // Parse URI
248
+
249
+ if (typeof uri === 'string') {
250
+ uri = Url.parse(uri);
251
+ }
252
+
253
+ // Calculate signature
254
+
255
+ var exp = Math.floor(now / 1000) + options.ttlSec;
256
+ var mac = Crypto.calculateMac('bewit', credentials, {
257
+ ts: exp,
258
+ nonce: '',
259
+ method: 'GET',
260
+ resource: uri.pathname + (uri.search || ''), // Maintain trailing '?'
261
+ host: uri.hostname,
262
+ port: uri.port || (uri.protocol === 'http:' ? 80 : 443),
263
+ ext: options.ext
264
+ });
265
+
266
+ // Construct bewit: id\exp\mac\ext
267
+
268
+ var bewit = credentials.id + '\\' + exp + '\\' + mac + '\\' + options.ext;
269
+ return Hoek.base64urlEncode(bewit);
270
+ };
271
+
272
+ // Generate an authorization string for a message
273
+
274
+ /*
275
+ host: 'example.com',
276
+ port: 8000,
277
+ message: '{"some":"payload"}', // UTF-8 encoded string for body hash generation
278
+ options: {
279
+
280
+ // Required
281
+
282
+ credentials: {
283
+ id: 'dh37fgj492je',
284
+ key: 'aoijedoaijsdlaksjdl',
285
+ algorithm: 'sha256' // 'sha1', 'sha256'
286
+ },
287
+
288
+ // Optional
289
+
290
+ timestamp: Date.now(), // A pre-calculated timestamp
291
+ nonce: '2334f34f', // A pre-generated nonce
292
+ localtimeOffsetMsec: 400, // Time offset to sync with server time (ignored if timestamp provided)
293
+ }
294
+ */
295
+
296
+ exports.message = function (host, port, message, options) {
297
+
298
+ // Validate inputs
299
+
300
+ if (!host || typeof host !== 'string' || !port || typeof port !== 'number' || message === null || message === undefined || typeof message !== 'string' || !options || (typeof options === 'undefined' ? 'undefined' : _typeof(options)) !== 'object') {
301
+
302
+ return null;
303
+ }
304
+
305
+ // Application time
306
+
307
+ var timestamp = options.timestamp || Utils.nowSecs(options.localtimeOffsetMsec);
308
+
309
+ // Validate credentials
310
+
311
+ var credentials = options.credentials;
312
+ if (!credentials || !credentials.id || !credentials.key || !credentials.algorithm) {
313
+
314
+ // Invalid credential object
315
+ return null;
316
+ }
317
+
318
+ if (Crypto.algorithms.indexOf(credentials.algorithm) === -1) {
319
+ return null;
320
+ }
321
+
322
+ // Calculate signature
323
+
324
+ var artifacts = {
325
+ ts: timestamp,
326
+ nonce: options.nonce || Cryptiles.randomString(6),
327
+ host: host,
328
+ port: port,
329
+ hash: Crypto.calculatePayloadHash(message, credentials.algorithm)
330
+ };
331
+
332
+ // Construct authorization
333
+
334
+ var result = {
335
+ id: credentials.id,
336
+ ts: artifacts.ts,
337
+ nonce: artifacts.nonce,
338
+ hash: artifacts.hash,
339
+ mac: Crypto.calculateMac('message', credentials, artifacts)
340
+ };
341
+
342
+ return result;
343
+ };