Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added the js-yaml module and made sure the tests pass.

  • Loading branch information...
commit d956545c8bcc4e94a72809a7f1c32013954338d1 1 parent ac95445
@enyo enyo authored
Showing with 12,663 additions and 0 deletions.
  1. +8 −0 node_modules/js-yaml/.npmignore
  2. +6 −0 node_modules/js-yaml/.travis.yml
  3. +86 −0 node_modules/js-yaml/HISTORY.md
  4. +21 −0 node_modules/js-yaml/LICENSE
  5. +94 −0 node_modules/js-yaml/Makefile
  6. +174 −0 node_modules/js-yaml/README.md
  7. +32 −0 node_modules/js-yaml/doc/gotchas.md
  8. +10 −0 node_modules/js-yaml/examples/single.js
  9. +195 −0 node_modules/js-yaml/examples/single.yml
  10. +1 −0  node_modules/js-yaml/index.js
  11. +87 −0 node_modules/js-yaml/lib/js-yaml.js
  12. +240 −0 node_modules/js-yaml/lib/js-yaml/common.js
  13. +209 −0 node_modules/js-yaml/lib/js-yaml/composer.js
  14. +651 −0 node_modules/js-yaml/lib/js-yaml/constructor.js
  15. +160 −0 node_modules/js-yaml/lib/js-yaml/errors.js
  16. +122 −0 node_modules/js-yaml/lib/js-yaml/events.js
  17. +84 −0 node_modules/js-yaml/lib/js-yaml/loader.js
  18. +53 −0 node_modules/js-yaml/lib/js-yaml/nodes.js
  19. +757 −0 node_modules/js-yaml/lib/js-yaml/parser.js
  20. +197 −0 node_modules/js-yaml/lib/js-yaml/reader.js
  21. +138 −0 node_modules/js-yaml/lib/js-yaml/resolver.js
  22. +1,889 −0 node_modules/js-yaml/lib/js-yaml/scanner.js
  23. +171 −0 node_modules/js-yaml/lib/js-yaml/tokens.js
  24. +31 −0 node_modules/js-yaml/package.json
  25. +312 −0 node_modules/js-yaml/support/pyyaml-src/__init__.py
  26. +139 −0 node_modules/js-yaml/support/pyyaml-src/composer.py
  27. +686 −0 node_modules/js-yaml/support/pyyaml-src/constructor.py
  28. +85 −0 node_modules/js-yaml/support/pyyaml-src/cyaml.py
  29. +62 −0 node_modules/js-yaml/support/pyyaml-src/dumper.py
  30. +1,137 −0 node_modules/js-yaml/support/pyyaml-src/emitter.py
  31. +75 −0 node_modules/js-yaml/support/pyyaml-src/error.py
  32. +86 −0 node_modules/js-yaml/support/pyyaml-src/events.py
  33. +40 −0 node_modules/js-yaml/support/pyyaml-src/loader.py
  34. +49 −0 node_modules/js-yaml/support/pyyaml-src/nodes.py
  35. +589 −0 node_modules/js-yaml/support/pyyaml-src/parser.py
  36. +192 −0 node_modules/js-yaml/support/pyyaml-src/reader.py
  37. +374 −0 node_modules/js-yaml/support/pyyaml-src/representer.py
  38. +224 −0 node_modules/js-yaml/support/pyyaml-src/resolver.py
  39. +1,448 −0 node_modules/js-yaml/support/pyyaml-src/scanner.py
  40. +111 −0 node_modules/js-yaml/support/pyyaml-src/serializer.py
  41. +104 −0 node_modules/js-yaml/support/pyyaml-src/tokens.py
  42. +4 −0 node_modules/js-yaml/test/functional-test.js
  43. +294 −0 node_modules/js-yaml/test/functional/canonical.js
  44. +1 −0  node_modules/js-yaml/test/functional/data/a-nasty-libyaml-bug.loader-error
  45. +4 −0 node_modules/js-yaml/test/functional/data/bool.data
  46. +1 −0  node_modules/js-yaml/test/functional/data/bool.detect
  47. +1 −0  node_modules/js-yaml/test/functional/data/colon-in-flow-context.loader-error
  48. +7 −0 node_modules/js-yaml/test/functional/data/construct-map.code
  49. +11 −0 node_modules/js-yaml/test/functional/data/construct-map.data
  50. +11 −0 node_modules/js-yaml/test/functional/data/document-separator-in-quoted-scalar.loader-error
  51. +3 −0  node_modules/js-yaml/test/functional/data/duplicate-anchor-1.loader-error
  52. +1 −0  node_modules/js-yaml/test/functional/data/duplicate-anchor-2.loader-error
  53. +3 −0  node_modules/js-yaml/test/functional/data/duplicate-tag-directive.loader-error
  54. +3 −0  node_modules/js-yaml/test/functional/data/duplicate-yaml-directive.loader-error
  55. +6 −0 node_modules/js-yaml/test/functional/data/emit-block-scalar-in-simple-key-context-bug.canonical
  56. +4 −0 node_modules/js-yaml/test/functional/data/emit-block-scalar-in-simple-key-context-bug.data
  57. +1 −0  node_modules/js-yaml/test/functional/data/empty-document-bug.canonical
  58. 0  node_modules/js-yaml/test/functional/data/empty-document-bug.data
  59. +2 −0  node_modules/js-yaml/test/functional/data/empty-documents.single-loader-error
  60. +1 −0  node_modules/js-yaml/test/functional/data/empty-python-module.loader-error
  61. +1 −0  node_modules/js-yaml/test/functional/data/empty-python-name.loader-error
  62. +1 −0  node_modules/js-yaml/test/functional/data/expected-mapping.loader-error
  63. +1 −0  node_modules/js-yaml/test/functional/data/expected-scalar.loader-error
  64. +1 −0  node_modules/js-yaml/test/functional/data/expected-sequence.loader-error
  65. +4 −0 node_modules/js-yaml/test/functional/data/explicit-document.single-loader-error
  66. +2 −0  node_modules/js-yaml/test/functional/data/fetch-complex-value-bug.loader-error
  67. +6 −0 node_modules/js-yaml/test/functional/data/float.data
  68. +1 −0  node_modules/js-yaml/test/functional/data/float.detect
  69. +2 −0  node_modules/js-yaml/test/functional/data/forbidden-entry.loader-error
  70. +2 −0  node_modules/js-yaml/test/functional/data/forbidden-key.loader-error
  71. +1 −0  node_modules/js-yaml/test/functional/data/forbidden-value.loader-error
  72. +1 −0  node_modules/js-yaml/test/functional/data/function.data
  73. +1 −0  node_modules/js-yaml/test/functional/data/function.detect
  74. +3 −0  node_modules/js-yaml/test/functional/data/implicit-document.single-loader-error
  75. +6 −0 node_modules/js-yaml/test/functional/data/int.data
  76. +1 −0  node_modules/js-yaml/test/functional/data/int.detect
  77. +1 −0  node_modules/js-yaml/test/functional/data/invalid-anchor-1.loader-error
  78. +8 −0 node_modules/js-yaml/test/functional/data/invalid-anchor-2.loader-error
  79. +2 −0  node_modules/js-yaml/test/functional/data/invalid-base64-data-2.loader-error
  80. +2 −0  node_modules/js-yaml/test/functional/data/invalid-base64-data.loader-error
  81. +2 −0  node_modules/js-yaml/test/functional/data/invalid-block-scalar-indicator.loader-error
  82. BIN  node_modules/js-yaml/test/functional/data/invalid-character.loader-error
  83. +2 −0  node_modules/js-yaml/test/functional/data/invalid-directive-line.loader-error
  84. +2 −0  node_modules/js-yaml/test/functional/data/invalid-directive-name-1.loader-error
  85. +2 −0  node_modules/js-yaml/test/functional/data/invalid-directive-name-2.loader-error
  86. +1 −0  node_modules/js-yaml/test/functional/data/invalid-escape-character.loader-error
  87. +1 −0  node_modules/js-yaml/test/functional/data/invalid-escape-numbers.loader-error
  88. +2 −0  node_modules/js-yaml/test/functional/data/invalid-indentation-indicator-1.loader-error
  89. +2 −0  node_modules/js-yaml/test/functional/data/invalid-indentation-indicator-2.loader-error
  90. +2 −0  node_modules/js-yaml/test/functional/data/invalid-item-without-trailing-break.loader-error
  91. +2 −0  node_modules/js-yaml/test/functional/data/invalid-merge-1.loader-error
  92. +2 −0  node_modules/js-yaml/test/functional/data/invalid-merge-2.loader-error
  93. +3 −0  node_modules/js-yaml/test/functional/data/invalid-omap-1.loader-error
  94. +3 −0  node_modules/js-yaml/test/functional/data/invalid-omap-2.loader-error
  95. +4 −0 node_modules/js-yaml/test/functional/data/invalid-omap-3.loader-error
  96. +3 −0  node_modules/js-yaml/test/functional/data/invalid-pairs-1.loader-error
  97. +3 −0  node_modules/js-yaml/test/functional/data/invalid-pairs-2.loader-error
  98. +4 −0 node_modules/js-yaml/test/functional/data/invalid-pairs-3.loader-error
  99. +2 −0  node_modules/js-yaml/test/functional/data/invalid-python-bytes-2-py3.loader-error
  100. +2 −0  node_modules/js-yaml/test/functional/data/invalid-python-bytes-py3.loader-error
  101. +1 −0  node_modules/js-yaml/test/functional/data/invalid-python-module-kind.loader-error
  102. +1 −0  node_modules/js-yaml/test/functional/data/invalid-python-module-value.loader-error
  103. +1 −0  node_modules/js-yaml/test/functional/data/invalid-python-module.loader-error
  104. +1 −0  node_modules/js-yaml/test/functional/data/invalid-python-name-kind.loader-error
  105. +1 −0  node_modules/js-yaml/test/functional/data/invalid-python-name-module-2.loader-error
  106. +1 −0  node_modules/js-yaml/test/functional/data/invalid-python-name-module.loader-error
  107. +1 −0  node_modules/js-yaml/test/functional/data/invalid-python-name-object.loader-error
  108. +1 −0  node_modules/js-yaml/test/functional/data/invalid-python-name-value.loader-error
  109. +3 −0  node_modules/js-yaml/test/functional/data/invalid-simple-key.loader-error
  110. +1 −0  node_modules/js-yaml/test/functional/data/invalid-starting-character.loader-error
  111. +1 −0  node_modules/js-yaml/test/functional/data/invalid-tag-1.loader-error
  112. +1 −0  node_modules/js-yaml/test/functional/data/invalid-tag-2.loader-error
  113. +2 −0  node_modules/js-yaml/test/functional/data/invalid-tag-directive-handle.loader-error
  114. +2 −0  node_modules/js-yaml/test/functional/data/invalid-tag-directive-prefix.loader-error
  115. +2 −0  node_modules/js-yaml/test/functional/data/invalid-tag-handle-1.loader-error
  116. +2 −0  node_modules/js-yaml/test/functional/data/invalid-tag-handle-2.loader-error
  117. +1 −0  node_modules/js-yaml/test/functional/data/invalid-uri-escapes-1.loader-error
  118. +1 −0  node_modules/js-yaml/test/functional/data/invalid-uri-escapes-2.loader-error
  119. +1 −0  node_modules/js-yaml/test/functional/data/invalid-uri-escapes-3.loader-error
  120. +1 −0  node_modules/js-yaml/test/functional/data/invalid-uri.loader-error
  121. +3 −0  node_modules/js-yaml/test/functional/data/invalid-yaml-directive-version-1.loader-error
  122. +2 −0  node_modules/js-yaml/test/functional/data/invalid-yaml-directive-version-2.loader-error
  123. +2 −0  node_modules/js-yaml/test/functional/data/invalid-yaml-directive-version-3.loader-error
  124. +2 −0  node_modules/js-yaml/test/functional/data/invalid-yaml-directive-version-4.loader-error
  125. +2 −0  node_modules/js-yaml/test/functional/data/invalid-yaml-directive-version-5.loader-error
  126. +2 −0  node_modules/js-yaml/test/functional/data/invalid-yaml-directive-version-6.loader-error
  127. +2 −0  node_modules/js-yaml/test/functional/data/invalid-yaml-version.loader-error
  128. +1 −0  node_modules/js-yaml/test/functional/data/merge.data
  129. +1 −0  node_modules/js-yaml/test/functional/data/merge.detect
  130. +3 −0  node_modules/js-yaml/test/functional/data/no-block-collection-end.loader-error
  131. +3 −0  node_modules/js-yaml/test/functional/data/no-block-mapping-end-2.loader-error
  132. +1 −0  node_modules/js-yaml/test/functional/data/no-block-mapping-end.loader-error
  133. +3 −0  node_modules/js-yaml/test/functional/data/no-document-start.loader-error
  134. +1 −0  node_modules/js-yaml/test/functional/data/no-flow-mapping-end.loader-error
  135. +1 −0  node_modules/js-yaml/test/functional/data/no-flow-sequence-end.loader-error
  136. +1 −0  node_modules/js-yaml/test/functional/data/no-node-1.loader-error
  137. +1 −0  node_modules/js-yaml/test/functional/data/no-node-2.loader-error
  138. +3 −0  node_modules/js-yaml/test/functional/data/null.data
  139. +1 −0  node_modules/js-yaml/test/functional/data/null.detect
  140. +3 −0  node_modules/js-yaml/test/functional/data/remove-possible-simple-key-bug.loader-error
  141. +3 −0  node_modules/js-yaml/test/functional/data/scan-document-end-bug.canonical
  142. +3 −0  node_modules/js-yaml/test/functional/data/scan-document-end-bug.data
  143. +3 −0  node_modules/js-yaml/test/functional/data/scan-line-break-bug.canonical
  144. +3 −0  node_modules/js-yaml/test/functional/data/scan-line-break-bug.data
  145. +18 −0 node_modules/js-yaml/test/functional/data/sloppy-indentation.canonical
  146. +17 −0 node_modules/js-yaml/test/functional/data/sloppy-indentation.data
  147. +3 −0  node_modules/js-yaml/test/functional/data/spec-02-01.data
  148. +1 −0  node_modules/js-yaml/test/functional/data/spec-02-01.structure
  149. +1 −0  node_modules/js-yaml/test/functional/data/spec-02-01.tokens
  150. +3 −0  node_modules/js-yaml/test/functional/data/spec-02-02.data
  151. +1 −0  node_modules/js-yaml/test/functional/data/spec-02-02.structure
  152. +5 −0 node_modules/js-yaml/test/functional/data/spec-02-02.tokens
  153. +8 −0 node_modules/js-yaml/test/functional/data/spec-02-03.data
  154. +1 −0  node_modules/js-yaml/test/functional/data/spec-02-03.structure
  155. +4 −0 node_modules/js-yaml/test/functional/data/spec-02-03.tokens
  156. +8 −0 node_modules/js-yaml/test/functional/data/spec-02-04.data
  157. +4 −0 node_modules/js-yaml/test/functional/data/spec-02-04.structure
  158. +4 −0 node_modules/js-yaml/test/functional/data/spec-02-04.tokens
  159. +3 −0  node_modules/js-yaml/test/functional/data/spec-02-05.data
  160. +5 −0 node_modules/js-yaml/test/functional/data/spec-02-05.structure
  161. +5 −0 node_modules/js-yaml/test/functional/data/spec-02-05.tokens
  162. +5 −0 node_modules/js-yaml/test/functional/data/spec-02-06.data
  163. +4 −0 node_modules/js-yaml/test/functional/data/spec-02-06.structure
  164. +4 −0 node_modules/js-yaml/test/functional/data/spec-02-06.tokens
  165. +10 −0 node_modules/js-yaml/test/functional/data/spec-02-07.data
  166. +4 −0 node_modules/js-yaml/test/functional/data/spec-02-07.structure
  167. +12 −0 node_modules/js-yaml/test/functional/data/spec-02-07.tokens
  168. +10 −0 node_modules/js-yaml/test/functional/data/spec-02-08.data
  169. +4 −0 node_modules/js-yaml/test/functional/data/spec-02-08.structure
  170. +15 −0 node_modules/js-yaml/test/functional/data/spec-02-08.tokens
  171. +8 −0 node_modules/js-yaml/test/functional/data/spec-02-09.data
  172. +1 −0  node_modules/js-yaml/test/functional/data/spec-02-09.structure
  173. +5 −0 node_modules/js-yaml/test/functional/data/spec-02-09.tokens
  174. +8 −0 node_modules/js-yaml/test/functional/data/spec-02-10.data
  175. +1 −0  node_modules/js-yaml/test/functional/data/spec-02-10.structure
  176. +5 −0 node_modules/js-yaml/test/functional/data/spec-02-10.tokens
  177. +9 −0 node_modules/js-yaml/test/functional/data/spec-02-11.data
  178. +4 −0 node_modules/js-yaml/test/functional/data/spec-02-11.structure
  179. +6 −0 node_modules/js-yaml/test/functional/data/spec-02-11.tokens
  180. +8 −0 node_modules/js-yaml/test/functional/data/spec-02-12.data
  181. +5 −0 node_modules/js-yaml/test/functional/data/spec-02-12.structure
  182. +6 −0 node_modules/js-yaml/test/functional/data/spec-02-12.tokens
  183. +4 −0 node_modules/js-yaml/test/functional/data/spec-02-13.data
  184. +1 −0  node_modules/js-yaml/test/functional/data/spec-02-13.structure
  185. +1 −0  node_modules/js-yaml/test/functional/data/spec-02-13.tokens
  186. +4 −0 node_modules/js-yaml/test/functional/data/spec-02-14.data
  187. +1 −0  node_modules/js-yaml/test/functional/data/spec-02-14.structure
  188. +1 −0  node_modules/js-yaml/test/functional/data/spec-02-14.tokens
  189. +8 −0 node_modules/js-yaml/test/functional/data/spec-02-15.data
  190. +1 −0  node_modules/js-yaml/test/functional/data/spec-02-15.structure
  191. +1 −0  node_modules/js-yaml/test/functional/data/spec-02-15.tokens
  192. +7 −0 node_modules/js-yaml/test/functional/data/spec-02-16.data
  193. +1 −0  node_modules/js-yaml/test/functional/data/spec-02-16.structure
  194. +5 −0 node_modules/js-yaml/test/functional/data/spec-02-16.tokens
  195. +7 −0 node_modules/js-yaml/test/functional/data/spec-02-17.data
  196. +1 −0  node_modules/js-yaml/test/functional/data/spec-02-17.structure
  197. +8 −0 node_modules/js-yaml/test/functional/data/spec-02-17.tokens
  198. +6 −0 node_modules/js-yaml/test/functional/data/spec-02-18.data
  199. +1 −0  node_modules/js-yaml/test/functional/data/spec-02-18.structure
  200. +4 −0 node_modules/js-yaml/test/functional/data/spec-02-18.tokens
  201. +5 −0 node_modules/js-yaml/test/functional/data/spec-02-19.data
  202. +1 −0  node_modules/js-yaml/test/functional/data/spec-02-19.structure
  203. +7 −0 node_modules/js-yaml/test/functional/data/spec-02-19.tokens
  204. +6 −0 node_modules/js-yaml/test/functional/data/spec-02-20.data
  205. +1 −0  node_modules/js-yaml/test/functional/data/spec-02-20.structure
  206. +8 −0 node_modules/js-yaml/test/functional/data/spec-02-20.tokens
  207. +4 −0 node_modules/js-yaml/test/functional/data/spec-02-21.data
  208. +1 −0  node_modules/js-yaml/test/functional/data/spec-02-21.structure
  209. +6 −0 node_modules/js-yaml/test/functional/data/spec-02-21.tokens
  210. +4 −0 node_modules/js-yaml/test/functional/data/spec-02-22.data
  211. +1 −0  node_modules/js-yaml/test/functional/data/spec-02-22.structure
  212. +6 −0 node_modules/js-yaml/test/functional/data/spec-02-22.tokens
  213. +13 −0 node_modules/js-yaml/test/functional/data/spec-02-23.data
  214. +1 −0  node_modules/js-yaml/test/functional/data/spec-02-23.structure
  215. +6 −0 node_modules/js-yaml/test/functional/data/spec-02-23.tokens
  216. +14 −0 node_modules/js-yaml/test/functional/data/spec-02-24.data
  217. +5 −0 node_modules/js-yaml/test/functional/data/spec-02-24.structure
  218. +20 −0 node_modules/js-yaml/test/functional/data/spec-02-24.tokens
  219. +7 −0 node_modules/js-yaml/test/functional/data/spec-02-25.data
  220. +1 −0  node_modules/js-yaml/test/functional/data/spec-02-25.structure
  221. +6 −0 node_modules/js-yaml/test/functional/data/spec-02-25.tokens
  222. +7 −0 node_modules/js-yaml/test/functional/data/spec-02-26.data
  223. +5 −0 node_modules/js-yaml/test/functional/data/spec-02-26.structure
  224. +6 −0 node_modules/js-yaml/test/functional/data/spec-02-26.tokens
  225. +29 −0 node_modules/js-yaml/test/functional/data/spec-02-27.data
  226. +17 −0 node_modules/js-yaml/test/functional/data/spec-02-27.structure
  227. +20 −0 node_modules/js-yaml/test/functional/data/spec-02-27.tokens
  228. +26 −0 node_modules/js-yaml/test/functional/data/spec-02-28.data
  229. +10 −0 node_modules/js-yaml/test/functional/data/spec-02-28.structure
  230. +23 −0 node_modules/js-yaml/test/functional/data/spec-02-28.tokens
  231. +14 −0 node_modules/js-yaml/test/functional/data/spec-05-03.canonical
  232. +7 −0 node_modules/js-yaml/test/functional/data/spec-05-03.data
  233. +13 −0 node_modules/js-yaml/test/functional/data/spec-05-04.canonical
  234. +2 −0  node_modules/js-yaml/test/functional/data/spec-05-04.data
  235. +8 −0 node_modules/js-yaml/test/functional/data/spec-05-06.canonical
  236. +2 −0  node_modules/js-yaml/test/functional/data/spec-05-06.data
  237. +8 −0 node_modules/js-yaml/test/functional/data/spec-05-07.canonical
  238. +4 −0 node_modules/js-yaml/test/functional/data/spec-05-07.data
  239. +8 −0 node_modules/js-yaml/test/functional/data/spec-05-08.canonical
  240. +2 −0  node_modules/js-yaml/test/functional/data/spec-05-08.data
  241. +3 −0  node_modules/js-yaml/test/functional/data/spec-05-09.canonical
  242. +2 −0  node_modules/js-yaml/test/functional/data/spec-05-09.data
  243. +6 −0 node_modules/js-yaml/test/functional/data/spec-05-11.canonical
  244. +3 −0  node_modules/js-yaml/test/functional/data/spec-05-11.data
  245. +5 −0 node_modules/js-yaml/test/functional/data/spec-05-13.canonical
  246. +3 −0  node_modules/js-yaml/test/functional/data/spec-05-13.data
  247. +7 −0 node_modules/js-yaml/test/functional/data/spec-05-14.canonical
  248. +2 −0  node_modules/js-yaml/test/functional/data/spec-05-14.data
  249. +15 −0 node_modules/js-yaml/test/functional/data/spec-06-01.canonical
  250. +14 −0 node_modules/js-yaml/test/functional/data/spec-06-01.data
  251. +6 −0 node_modules/js-yaml/test/functional/data/spec-06-03.canonical
  252. +2 −0  node_modules/js-yaml/test/functional/data/spec-06-03.data
  253. +6 −0 node_modules/js-yaml/test/functional/data/spec-06-04.canonical
  254. +4 −0 node_modules/js-yaml/test/functional/data/spec-06-04.data
  255. +16 −0 node_modules/js-yaml/test/functional/data/spec-06-05.canonical
  256. +6 −0 node_modules/js-yaml/test/functional/data/spec-06-05.data
  257. +10 −0 node_modules/js-yaml/test/functional/data/spec-06-06.canonical
  258. +7 −0 node_modules/js-yaml/test/functional/data/spec-06-06.data
  259. +6 −0 node_modules/js-yaml/test/functional/data/spec-06-07.canonical
  260. +8 −0 node_modules/js-yaml/test/functional/data/spec-06-07.data
  261. +5 −0 node_modules/js-yaml/test/functional/data/spec-06-08.canonical
  262. +2 −0  node_modules/js-yaml/test/functional/data/spec-06-08.data
  263. +3 −0  node_modules/js-yaml/test/functional/data/spec-07-01.canonical
  264. +3 −0  node_modules/js-yaml/test/functional/data/spec-07-01.data
  265. +3 −0  node_modules/js-yaml/test/functional/data/spec-07-02.canonical
  266. +4 −0 node_modules/js-yaml/test/functional/data/spec-07-02.data
  267. +3 −0  node_modules/js-yaml/test/functional/data/spec-07-04.canonical
  268. +3 −0  node_modules/js-yaml/test/functional/data/spec-07-04.data
  269. +6 −0 node_modules/js-yaml/test/functional/data/spec-07-06.canonical
  270. +5 −0 node_modules/js-yaml/test/functional/data/spec-07-06.data
  271. +3 −0  node_modules/js-yaml/test/functional/data/spec-07-07a.canonical
  272. +2 −0  node_modules/js-yaml/test/functional/data/spec-07-07a.data
  273. +3 −0  node_modules/js-yaml/test/functional/data/spec-07-07b.canonical
  274. +4 −0 node_modules/js-yaml/test/functional/data/spec-07-07b.data
  275. +7 −0 node_modules/js-yaml/test/functional/data/spec-07-08.canonical
  276. +9 −0 node_modules/js-yaml/test/functional/data/spec-07-08.data
  277. +9 −0 node_modules/js-yaml/test/functional/data/spec-07-09.canonical
  278. +11 −0 node_modules/js-yaml/test/functional/data/spec-07-09.data
  279. +15 −0 node_modules/js-yaml/test/functional/data/spec-07-10.canonical
  280. +11 −0 node_modules/js-yaml/test/functional/data/spec-07-10.data
  281. +6 −0 node_modules/js-yaml/test/functional/data/spec-07-12a.canonical
  282. +3 −0  node_modules/js-yaml/test/functional/data/spec-07-12a.data
  283. +3 −0  node_modules/js-yaml/test/functional/data/spec-07-12b.canonical
  284. +4 −0 node_modules/js-yaml/test/functional/data/spec-07-12b.data
  285. +9 −0 node_modules/js-yaml/test/functional/data/spec-07-13.canonical
  286. +9 −0 node_modules/js-yaml/test/functional/data/spec-07-13.data
  287. +8 −0 node_modules/js-yaml/test/functional/data/spec-08-01.canonical
  288. +2 −0  node_modules/js-yaml/test/functional/data/spec-08-01.data
  289. +8 −0 node_modules/js-yaml/test/functional/data/spec-08-02.canonical
  290. +2 −0  node_modules/js-yaml/test/functional/data/spec-08-02.data
  291. +6 −0 node_modules/js-yaml/test/functional/data/spec-08-03.canonical
  292. +2 −0  node_modules/js-yaml/test/functional/data/spec-08-03.data
  293. +7 −0 node_modules/js-yaml/test/functional/data/spec-08-05.canonical
  294. +5 −0 node_modules/js-yaml/test/functional/data/spec-08-05.data
  295. +8 −0 node_modules/js-yaml/test/functional/data/spec-08-07.canonical
  296. +4 −0 node_modules/js-yaml/test/functional/data/spec-08-07.data
  297. +15 −0 node_modules/js-yaml/test/functional/data/spec-08-08.canonical
  298. +13 −0 node_modules/js-yaml/test/functional/data/spec-08-08.data
  299. +21 −0 node_modules/js-yaml/test/functional/data/spec-08-09.canonical
  300. +11 −0 node_modules/js-yaml/test/functional/data/spec-08-09.data
Sorry, we could not display the entire diff because too many files (447) changed.
View
8 node_modules/js-yaml/.npmignore
@@ -0,0 +1,8 @@
+/src/
+/test/unported/
+
+/demo/
+/js-yaml.js
+/js-yaml.min.js
+/support/browserify/
+!/lib/js-yaml.js
View
6 node_modules/js-yaml/.travis.yml
@@ -0,0 +1,6 @@
+language: node_js
+node_js:
+ - 0.4
+ - 0.6
+before_script: "npm install --dev"
+script: "make test"
View
86 node_modules/js-yaml/HISTORY.md
@@ -0,0 +1,86 @@
+0.3.7 / 2012-02-28
+------------------
+
+* Fix export of `addConstructor()`. Closes #39.
+
+
+0.3.6 / 2012-02-22
+------------------
+
+* Removed AMD parts - too buggy to use. Need help to rewrite from scratch
+* Removed YUI compressor warning (renamed `double` variable). Closes #40.
+
+
+0.3.5 / 2012-01-10
+------------------
+
+* Workagound for .npmignore fuckup under windows. Thanks to airportyh.
+
+
+0.3.4 / 2011-12-24
+------------------
+
+* Fixes str[] for oldIEs support.
+* Adds better has change support for browserified demo.
+* improves compact output of Error. Closes #33.
+
+
+0.3.3 / 2011-12-20
+------------------
+
+* jsyaml executable moved to separate module.
+* adds `compact` stringification of Errors.
+
+
+0.3.2 / 2011-12-16
+------------------
+
+* Fixes ug with block style scalars. Closes #26.
+* All sources are passing JSLint now.
+* Fixes bug in Safari. Closes #28.
+* Fixes bug in Opers. Closes #29.
+* Improves browser support. Closes #20.
+* Added jsyaml executable.
+* Added !!js/function support. Closes #12.
+
+
+0.3.1 / 2011-11-18
+------------------
+
+* Added AMD support for browserified version.
+* Wrapped browserified js-yaml into closure.
+* Fixed the resolvement of non-specific tags. Closes #17.
+* Added permalinks for online demo YAML snippets. Now we have YPaste service, lol.
+* Added !!js/regexp and !!js/undefined types. Partially solves #12.
+* Fixed !!set mapping.
+* Fixed month parse in dates. Closes #19.
+
+
+0.3.0 / 2011-11-09
+------------------
+
+* Removed JS.Class dependency. Closes #3.
+* Added browserified version. Closes #13.
+* Added live demo of browserified version.
+* Ported some of the PyYAML tests. See #14.
+* Fixed timestamp bug when fraction was given.
+
+
+0.2.2 / 2011-11-06
+------------------
+
+* Fixed crash on docs without ---. Closes #8.
+* Fixed miltiline string parse
+* Fixed tests/comments for using array as key
+
+
+0.2.1 / 2011-11-02
+------------------
+
+* Fixed short file read (<4k). Closes #9.
+
+
+0.2.0 / 2011-11-02
+------------------
+
+* First public release
View
21 node_modules/js-yaml/LICENSE
@@ -0,0 +1,21 @@
+(The MIT License)
+
+Copyright (C) 2011 by Vitaly Puzrin
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
View
94 node_modules/js-yaml/Makefile
@@ -0,0 +1,94 @@
+PATH := $(shell pwd)/node_modules/.bin:${PATH}
+
+NPM_PACKAGE := $(shell node -e 'console.log(require("./package.json").name)')
+NPM_VERSION := $(shell node -e 'console.log(require("./package.json").version)')
+
+TMP_PATH := /tmp/${NPM_PACKAGE}-$(shell date +%s)
+
+REMOTE_NAME ?= origin
+REMOTE_REPO ?= $(shell git config --get remote.${REMOTE_NAME}.url)
+
+CURR_HEAD := $(firstword $(shell git show-ref --hash HEAD | cut --bytes=-6) master)
+GITHUB_PROJ := nodeca/${NPM_PACKAGE}
+SRC_URL_FMT := https://github.com/${GITHUB_PROJ}/blob/${CURR_HEAD}/{file}\#L{line}
+
+JS_FILES := $(shell find ./bin ./lib ./test -type f -name '*.js' -print)
+
+lint:
+ @if test ! `which jslint` ; then \
+ echo "You need 'jslint' installed in order to run lint." >&2 ; \
+ echo " $ make dev-deps" >&2 ; \
+ exit 128 ; \
+ fi
+ # (node) -> Node.JS compatibility mode
+ # (indent) -> indentation level (2 spaces)
+ # (nomen) -> tolerate underscores in identifiers (e.g. `var _val = 1`)
+ # (bitwise) -> tolerate bitwise operators (used in base64)
+ # (white) -> tolerate messy whitespace
+ jslint --node --nomen --bitwise --white --indent=2 ./index.js ${JS_FILES}
+
+test: lint
+ @if test ! `which vows` ; then \
+ echo "You need 'vows' installed in order to run tests." >&2 ; \
+ echo " $ make dev-deps" >&2 ; \
+ exit 128 ; \
+ fi
+ NODE_ENV=test vows --spec
+
+dev-deps:
+ @if test ! `which npm` ; then \
+ echo "You need 'npm' installed." >&2 ; \
+ echo " See: http://npmjs.org/" >&2 ; \
+ exit 128 ; \
+ fi
+ npm install --dev
+
+build: browserify uglify
+
+browserify:
+ if test ! `which browserify` ; then npm install browserify ; fi
+ cp -r support/browserify/ ${TMP_PATH}
+ browserify index.js -o ${TMP_PATH}/50_js-yaml.js
+ cat ${TMP_PATH}/* > js-yaml.js
+ rm -rf ${TMP_PATH}
+ cp js-yaml.js demo/js/
+
+uglify:
+ if test ! `which uglifyjs` ; then npm install uglify-js ; fi
+ uglifyjs js-yaml.js > js-yaml.min.js
+
+
+gh-pages:
+ @if test -z ${REMOTE_REPO} ; then \
+ echo 'Remote repo URL not found' >&2 ; \
+ exit 128 ; \
+ fi
+ mkdir ${TMP_PATH}
+ cp -r demo/* ${TMP_PATH}
+ touch ${TMP_PATH}/.nojekyll
+ cd ${TMP_PATH} && \
+ git init && \
+ git add . && \
+ git commit -q -m 'Update browserified demo'
+ cd ${TMP_PATH} && \
+ git remote add remote ${REMOTE_REPO} && \
+ git push --force remote +master:gh-pages
+ rm -rf ${TMP_PATH}
+
+publish:
+ @if test 0 -ne `git status --porcelain | wc -l` ; then \
+ echo "Unclean working tree. Commit or stash changes first." >&2 ; \
+ exit 128 ; \
+ fi
+ @if test 0 -ne `git tag -l ${NPM_VERSION} | wc -l` ; then \
+ echo "Tag ${NPM_VERSION} exists. Update package.json" >&2 ; \
+ exit 128 ; \
+ fi
+ git tag ${NPM_VERSION} && git push origin ${NPM_VERSION}
+ npm publish https://github.com/${GITHUB_PROJ}/tarball/${NPM_VERSION}
+
+todo:
+ grep 'TODO' -n -r ./lib 2>/dev/null || test true
+
+.PHONY: publish test lint dev-deps gh-pages todo
+.SILENT: todo test test-functional test-issues
View
174 node_modules/js-yaml/README.md
@@ -0,0 +1,174 @@
+JS-YAML - YAML 1.1 parser for JavaScript
+========================================
+
+[![Build Status](https://secure.travis-ci.org/nodeca/js-yaml.png)](http://travis-ci.org/nodeca/js-yaml)
+
+[Online Demo](http://nodeca.github.com/js-yaml/)
+
+This is a native port of [PyYAML](http://pyyaml.org/), the most advanced YAML parser.
+Now you can use all modern YAML feature right in JavaScript. Originally snapshoted version - PyYAML 3.10 (2011-05-30).
+
+## Installation
+
+### YAML module for node.js
+
+```
+npm install js-yaml
+```
+
+If you want to inspect your YAML files from CLI,
+install [js-yaml.bin](https://github.com/nodeca/js-yaml.bin).
+
+
+### bundled YAML library for browser
+
+``` html
+<script src="js-yaml.min.js"></script>
+<script type="text/javascript">
+var doc = jsyaml.load('greeting: hello\nname: world');
+</script>
+```
+
+Browser support is still buggy, and mostly done to run online demo. If you
+can help to improve browser compatibility and AMD support - rise pull request.
+
+
+## API
+
+JS-YAML automatically registers handlers for `.yml` and `.yaml` files. You can load them just with `require`.
+That's mostly equivalent to calling loadAll() on file handler ang gathering all documents into array.
+Just with one string!
+
+``` javascript
+require('js-yaml');
+
+// Get array of documents, or throw exception on error
+var docs = require('/home/ixti/examples.yml');
+
+console.log(docs);
+```
+
+If you are sure, that file has only one document, chained `shift()` will help to exclude array wrapper:
+
+``` javascript
+require('js-yaml');
+
+// Get array of documents, or throw exception on error
+var singleDoc = require('/home/ixti/examples.yml').shift();
+
+console.log(singleDoc);
+```
+
+
+### load (string|buffer|file\_resource)
+
+Parses source as single YAML document. Returns JS object or throws exception on error.
+
+This function does NOT understands multi-doc sources, it throws exception on those.
+
+``` javascript
+var yaml = require('js-yaml');
+
+// pass the string
+fs.readFile('/home/ixti/example.yml', 'utf8', function (err, data) {
+ if (err) {
+ // handle error
+ return;
+ }
+ try {
+ console.log( yaml.load(data) );
+ } catch(e) {
+ console.log(e);
+ }
+});
+```
+
+
+### loadAll (string|buffer|file\_resource, iterator)
+
+Same as `Load`, but understands multi-doc sources and apply iterator to each document.
+
+``` javascript
+var yaml = require('js-yaml');
+
+// pass the string
+fs.readFile('/home/ixti/example.yml', 'utf8', function (err, data) {
+ if (err) {
+ // handle error
+ return;
+ }
+
+ try {
+ yaml.loadAll(data, function (doc) {
+ console.log(doc);
+ });
+ } catch(e) {
+ console.log(e);
+ }
+});
+```
+
+
+### safeLoad (string|buffer|file\_resource)
+
+Same as `load()` but uses _safe_ schema - only recommended tags of YAML
+specification (no JavaScript-specific tags, e.g. `!!js/regexp`).
+
+
+### safeLoadAll (string|buffer|file\_resource, iterator)
+
+Same as `loadAll()` but uses _safe_ schema - only recommended tags of YAML
+specification (no JavaScript-specific tags, e.g. `!!js/regexp`).
+
+
+## JavaScript YAML tags scheme
+
+The list of standard YAML tags and corresponding JavaScipt types. See also
+[YAML Tag Discussion](http://pyyaml.org/wiki/YAMLTagDiscussion) and [Yaml Types](http://yaml.org/type/).
+
+```
+!!null '' # null
+!!bool 'yes' # bool
+!!int '3...' # number
+!!float '3.14...' # number
+!!binary '...base64...' # buffer
+!!timestamp 'YYYY-...' # date
+!!omap [ ... ] # array of key-value pairs
+!!pairs [ ... ] # array or array pairs
+!!set { ... } # array of objects with given keys and null values
+!!str '...' # string
+!!seq [ ... ] # array
+!!map { ... } # object
+```
+
+**JavaScript-specific tags**
+
+```
+!!js/regexp /pattern/gim # RegExp
+!!js/undefined '' # Undefined
+!!js/function 'function () {...}' # Function
+```
+
+### Caveats
+
+Note, that you use arrays or objects as key in JS-YAML. JS do not allows objects
+or array as keys, and stringifies them at the moment of adding them.
+
+``` yaml
+---
+? [ foo, bar ]
+: - baz
+? { foo: bar }
+: - baz
+ - baz
+```
+
+=>
+
+``` javascript
+{ "": ["baz"], "[object Object]": ["baz", "baz"] }
+```
+
+## License
+
+View the [LICENSE](https://github.com/nodeca/js-yaml/blob/master/LICENSE) file (MIT).
View
32 node_modules/js-yaml/doc/gotchas.md
@@ -0,0 +1,32 @@
+Gotchas and Kludges
+-------------------
+
+Expose class properties into instance
+=====================================
+
+Example:
+
+``` javascript
+function BaseConstructor() {
+ // ...
+ this.yamlConstructors = BaseConstructor.yamlConstructors;
+ // ...
+}
+
+BaseConstructor.yamlConstructors = {};
+```
+
+Some of instance methods needs access to "class properties". Normally we would
+use:
+
+``` javascript
+Foo.prototype.bar = function bar(key) {
+ return this.constructor.yamlConstructors[key];
+}
+```
+
+And this will work, if you will work ONLY with Foo or its childs. But we glue
+modules (like SafeConstructor, Resolver, Composer, etc.) together via Loader.
+So we call `BaseResolver#resolve` via `Resolver` from within `Loader` instance.
+So `this.constructor` in the exampe above will be `Loader()` and not `Resolver`
+as we might expect it.
View
10 node_modules/js-yaml/examples/single.js
@@ -0,0 +1,10 @@
+var inspect = require('util').inspect,
+ jsyaml = require(__dirname + '/../lib/js-yaml'),
+ doc;
+
+try {
+ doc = require(__dirname + '/single.yml');
+ console.log(inspect(doc, false, 10, true));
+} catch (e) {
+ console.log(e.stack || e.toString());
+}
View
195 node_modules/js-yaml/examples/single.yml
@@ -0,0 +1,195 @@
+---
+# Collection Types #############################################################
+################################################################################
+
+# http://yaml.org/type/map.html -----------------------------------------------#
+
+map:
+ # Unordered set of key: value pairs.
+ Block style: !!map
+ Clark : Evans
+ Ingy : döt Net
+ Oren : Ben-Kiki
+ Flow style: !!map { Clark: Evans, Ingy: döt Net, Oren: Ben-Kiki }
+
+# http://yaml.org/type/omap.html ----------------------------------------------#
+
+omap:
+ # Explicitly typed ordered map (dictionary).
+ Bestiary: !!omap
+ - aardvark: African pig-like ant eater. Ugly.
+ - anteater: South-American ant eater. Two species.
+ - anaconda: South-American constrictor snake. Scaly.
+ # Etc.
+ # Flow style
+ Numbers: !!omap [ one: 1, two: 2, three : 3 ]
+
+# http://yaml.org/type/pairs.html ---------------------------------------------#
+
+pairs:
+ # Explicitly typed pairs.
+ Block tasks: !!pairs
+ - meeting: with team.
+ - meeting: with boss.
+ - break: lunch.
+ - meeting: with client.
+ Flow tasks: !!pairs [ meeting: with team, meeting: with boss ]
+
+# http://yaml.org/type/set.html -----------------------------------------------#
+
+set:
+ # Explicitly typed set.
+ baseball players: !!set
+ ? Mark McGwire
+ ? Sammy Sosa
+ ? Ken Griffey
+ # Flow style
+ baseball teams: !!set { Boston Red Sox, Detroit Tigers, New York Yankees }
+
+# http://yaml.org/type/seq.html -----------------------------------------------#
+
+seq:
+ # Ordered sequence of nodes
+ Block style: !!seq
+ - Mercury # Rotates - no light/dark sides.
+ - Venus # Deadliest. Aptly named.
+ - Earth # Mostly dirt.
+ - Mars # Seems empty.
+ - Jupiter # The king.
+ - Saturn # Pretty.
+ - Uranus # Where the sun hardly shines.
+ - Neptune # Boring. No rings.
+ - Pluto # You call this a planet?
+ Flow style: !!seq [ Mercury, Venus, Earth, Mars, # Rocks
+ Jupiter, Saturn, Uranus, Neptune, # Gas
+ Pluto ] # Overrated
+
+
+# Scalar Types #################################################################
+################################################################################
+
+# http://yaml.org/type/binary.html --------------------------------------------#
+
+binary:
+ canonical: !!binary "\
+ R0lGODlhDAAMAIQAAP//9/X17unp5WZmZgAAAOfn515eXvPz7Y6OjuDg4J+fn5\
+ OTk6enp56enmlpaWNjY6Ojo4SEhP/++f/++f/++f/++f/++f/++f/++f/++f/+\
+ +f/++f/++f/++f/++f/++SH+Dk1hZGUgd2l0aCBHSU1QACwAAAAADAAMAAAFLC\
+ AgjoEwnuNAFOhpEMTRiggcz4BNJHrv/zCFcLiwMWYNG84BwwEeECcgggoBADs="
+ generic: !!binary |
+ R0lGODlhDAAMAIQAAP//9/X17unp5WZmZgAAAOfn515eXvPz7Y6OjuDg4J+fn5
+ OTk6enp56enmlpaWNjY6Ojo4SEhP/++f/++f/++f/++f/++f/++f/++f/++f/+
+ +f/++f/++f/++f/++f/++SH+Dk1hZGUgd2l0aCBHSU1QACwAAAAADAAMAAAFLC
+ AgjoEwnuNAFOhpEMTRiggcz4BNJHrv/zCFcLiwMWYNG84BwwEeECcgggoBADs=
+ description:
+ The binary value above is a tiny arrow encoded as a gif image.
+
+# http://yaml.org/type/bool.html ----------------------------------------------#
+
+bool:
+ canonical: y
+ answer: NO
+ logical: True
+ option: on
+
+# http://yaml.org/type/float.html ---------------------------------------------#
+
+float:
+ canonical: 6.8523015e+5
+ exponentioal: 685.230_15e+03
+ fixed: 685_230.15
+ sexagesimal: 190:20:30.15
+ negative infinity: -.inf
+ not a number: .NaN
+
+# http://yaml.org/type/int.html -----------------------------------------------#
+
+int:
+ canonical: 685230
+ decimal: +685_230
+ octal: 02472256
+ hexadecimal: 0x_0A_74_AE
+ binary: 0b1010_0111_0100_1010_1110
+ sexagesimal: 190:20:30
+
+# http://yaml.org/type/merge.html ---------------------------------------------#
+
+merge:
+ - &CENTER { x: 1, y: 2 }
+ - &LEFT { x: 0, y: 2 }
+ - &BIG { r: 10 }
+ - &SMALL { r: 1 }
+
+ # All the following maps are equal:
+
+ - # Explicit keys
+ x: 1
+ y: 2
+ r: 10
+ label: nothing
+
+ - # Merge one map
+ << : *CENTER
+ r: 10
+ label: center
+
+ - # Merge multiple maps
+ << : [ *CENTER, *BIG ]
+ label: center/big
+
+ - # Override
+ << : [ *BIG, *LEFT, *SMALL ]
+ x: 1
+ label: big/left/small
+
+# http://yaml.org/type/null.html ----------------------------------------------#
+
+null:
+ # This mapping has four keys,
+ # one has a value.
+ empty:
+ canonical: ~
+ english: null
+ ~: null key
+ # This sequence has five
+ # entries, two have values.
+ sparse:
+ - ~
+ - 2nd entry
+ -
+ - 4th entry
+ - Null
+
+# http://yaml.org/type/str.html -----------------------------------------------#
+
+string: abcd
+
+# http://yaml.org/type/timestamp.html -----------------------------------------#
+
+timestamp:
+ canonical: 2001-12-15T02:59:43.1Z
+ valid iso8601: 2001-12-14t21:59:43.10-05:00
+ space separated: 2001-12-14 21:59:43.10 -5
+ no time zone (Z): 2001-12-15 2:59:43.10
+ date (00:00:00Z): 2002-12-14
+
+
+# JavaScript Specific Types ####################################################
+################################################################################
+
+# https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/RegExp
+
+regexp:
+ simple: !!js/regexp foobar
+ modifiers: !!js/regexp /foobar/mi
+
+# https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/undefined
+
+undefined: !!js/undefined ~
+
+# https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Function
+
+function: !!js/function >
+ function foobar() {
+ return 'Wow! JS-YAML Rocks!';
+ }
View
1  node_modules/js-yaml/index.js
@@ -0,0 +1 @@
+module.exports = require('./lib/js-yaml.js');
View
87 node_modules/js-yaml/lib/js-yaml.js
@@ -0,0 +1,87 @@
+'use strict';
+
+
+var fs = require('fs');
+var _loader = require('./js-yaml/loader');
+
+
+var jsyaml = module.exports = {};
+
+
+jsyaml.scan = function scan(stream, callback, Loader) {
+ Loader = (Loader || _loader.SafeLoader);
+
+ var loader = new Loader(stream);
+ while (loader.checkToken()) {
+ callback(loader.getToken());
+ }
+};
+
+
+jsyaml.compose = function compose(stream, Loader) {
+ Loader = (Loader || _loader.SafeLoader);
+
+ var loader = new Loader(stream);
+ return loader.getSingleNode();
+};
+
+
+jsyaml.load = function load(stream, Loader) {
+ Loader = (Loader || _loader.Loader);
+
+ var loader = new Loader(stream);
+ return loader.getSingleData();
+};
+
+
+jsyaml.loadAll = function loadAll(stream, callback, Loader) {
+ Loader = (Loader || _loader.Loader);
+
+ var loader = new Loader(stream);
+ while (loader.checkData()) {
+ callback(loader.getData());
+ }
+};
+
+
+jsyaml.safeLoad = function load(stream) {
+ return jsyaml.load(stream, _loader.SafeLoader);
+};
+
+
+jsyaml.safeLoadAll = function loadAll(stream, callback) {
+ jsyaml.loadAll(stream, callback, _loader.SafeLoader);
+};
+
+
+/**
+ * jsyaml.addConstructor(tag, constructor[, Loader]) -> Void
+ * Add a constructor for the given tag.
+ *
+ * Constructor is a function that accepts a Loader instance
+ * and a node object and produces the corresponding JavaScript object.
+ **/
+jsyaml.addConstructor = function addConstructor(tag, constructor, Loader) {
+ (Loader || _loader.Loader).addConstructor(tag, constructor);
+};
+
+
+// Register extensions handler
+(function () {
+ var require_handler = function (module, filename) {
+ var fd = fs.openSync(filename, 'r');
+
+ // fill in documents
+ module.exports = [];
+ jsyaml.loadAll(fd, function (doc) { module.exports.push(doc); });
+
+ fs.closeSync(fd);
+ };
+
+ // register require extensions only if we're on node.js
+ // hack for browserify
+ if (undefined !== require.extensions) {
+ require.extensions['.yml'] = require_handler;
+ require.extensions['.yaml'] = require_handler;
+ }
+}());
View
240 node_modules/js-yaml/lib/js-yaml/common.js
@@ -0,0 +1,240 @@
+'use strict';
+
+
+var $$ = module.exports = {};
+
+
+// UTILITY METHODS
+////////////////////////////////////////////////////////////////////////////////
+
+
+// <object> $$.extend(receiver, *sources)
+//
+// Copy all of the properties in the source objects over to the target object.
+// It's in-order, so the last source will override properties of the same name
+// in previous arguments.
+//
+// Example: var o = $$.extend({}, a, b, c);
+$$.extend = function extend(receiver) {
+ var i, l, key, skip = [];
+
+ receiver = receiver || {};
+ l = arguments.length;
+
+ if (!!arguments[l - 1] && !!arguments[l - 1].except) {
+ skip = arguments[l - 1].except;
+ l -= 1;
+ }
+
+ for (i = 1; i < l; i += 1) {
+ if (!!arguments[i] && 'object' === typeof arguments[i]) {
+ for (key in arguments[i]) {
+ if (arguments[i].hasOwnProperty(key) && -1 === skip.indexOf(key)) {
+ receiver[key] = arguments[i][key];
+ }
+ }
+ }
+ }
+
+ return receiver;
+};
+
+
+// simple inheritance algorithm
+$$.inherits = function inherits(child, parent) {
+ var InheritanceGlue = function () {};
+
+ InheritanceGlue.prototype = parent.prototype;
+ child.prototype = new InheritanceGlue();
+
+ // copy parent prototype' methods into child, so mixing made possible
+ // think of it as of caching of parent's prototype methods in child
+ $$.extend(child.prototype, parent.prototype, {except: [
+ 'arguments', 'length', 'name', 'prototype', 'caller'
+ ]});
+
+ // restore constructor
+ $$.extend(child.prototype, {constructor: child});
+
+ child.__parent__ = parent;
+};
+
+
+// wrapper for instanceof that allows to check inheritance after $$.inherits
+$$.isInstanceOf = function isInstanceOf(obj, klass) {
+ var parent;
+
+ if (obj instanceof klass) {
+ return true;
+ }
+
+ if (!!obj && !!obj.constructor) {
+ parent = obj.constructor.__parent__;
+ return (parent === klass || $$.isInstanceOf(parent, klass));
+ }
+
+ return false;
+};
+
+
+// iterates through all object keys-value pairs calling iterator on each one
+// example: $$.each(objOrArr, function (val, key) { /* ... */ });
+$$.each = function each(obj, iterator, context) {
+ var keys, i, l;
+
+ if (null === obj || undefined === obj) {
+ return;
+ }
+
+ context = context || iterator;
+
+ if (obj.forEach === Array.prototype.forEach) {
+ obj.forEach(iterator, context);
+ } else {
+ keys = Object.getOwnPropertyNames(obj);
+ for (i = 0, l = keys.length; i < l; i += 1) {
+ iterator.call(context, obj[keys[i]], keys[i], obj);
+ }
+ }
+};
+
+
+// returns reversed copy of array
+$$.reverse = function reverse(arr) {
+ var result = [], i, l;
+ for (i = 0, l = arr.length; i < l; i += 1) {
+ result.unshift(arr[i]);
+ }
+ return result;
+};
+
+
+// Modified from:
+// https://raw.github.com/kanaka/noVNC/d890e8640f20fba3215ba7be8e0ff145aeb8c17c/include/base64.js
+$$.decodeBase64 = (function () {
+ var padding = '=', binTable = [
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 62, -1, -1, -1, 63,
+ 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, -1, -1, -1, 0, -1, -1,
+ -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
+ 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -1, -1, -1, -1, -1,
+ -1, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
+ 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, -1, -1, -1, -1, -1
+ ];
+
+ return function decode(data) {
+ var value, code, idx = 0, result = [], leftbits, leftdata;
+
+ leftbits = 0; // number of bits decoded, but yet to be appended
+ leftdata = 0; // bits decoded, but yet to be appended
+
+ // Convert one by one.
+ for (idx = 0; idx < data.length; idx += 1) {
+ code = data.charCodeAt(idx);
+ value = binTable[code & 0x7F];
+
+ // Skip LF(NL) || CR
+ if (0x0A !== code && 0x0D !== code) {
+ // Fail on illegal characters
+ if (-1 === value) {
+ throw new Error("Illegal characters (code=" + code + ") in position " +
+ idx + ": ordinal not in range(0..128)");
+ }
+
+ // Collect data into leftdata, update bitcount
+ leftdata = (leftdata << 6) | value;
+ leftbits += 6;
+
+ // If we have 8 or more bits, append 8 bits to the result
+ if (leftbits >= 8) {
+ leftbits -= 8;
+ // Append if not padding.
+ if (padding !== data.charAt(idx)) {
+ result.push((leftdata >> leftbits) & 0xFF);
+ }
+ leftdata &= (1 << leftbits) - 1;
+ }
+ }
+ }
+
+ // If there are any bits left, the base64 string was corrupted
+ if (leftbits) {
+ throw new Error("Corrupted base64 string");
+ }
+
+ return new Buffer(result);
+ };
+}());
+
+
+// CLASSES
+////////////////////////////////////////////////////////////////////////////////
+
+
+// Dummy alternative of delayed population based on generators in PyYAML
+$$.Populator = function Populator(data, callback, context) {
+ if (!(this instanceof $$.Populator)) {
+ return new $$.Populator(data, callback, context);
+ }
+
+ this.data = data;
+ this.execute = function () {
+ callback.call(context || callback);
+ };
+};
+
+
+// Simple implementation of hashtable
+$$.Hash = function Hash(defaultValue) {
+ var keys, values, index;
+
+ if (!(this instanceof $$.Hash)) {
+ return new $$.Hash(defaultValue);
+ }
+
+ index = 0;
+ keys = [];
+ values = [];
+
+ this.store = function store(key, value) {
+ var i = keys.indexOf(key);
+
+ if (0 <= i) {
+ values[i] = value;
+ return;
+ }
+
+ i = index;
+ index += 1;
+
+ keys[i] = key;
+ values[i] = value;
+ };
+
+
+ this.remove = function remove(key) {
+ var i = keys.indexOf(key);
+
+ if (0 <= i) {
+ delete keys[i];
+ delete values[i];
+ }
+ };
+
+
+ this.hasKey = function hasKey(key) {
+ return 0 <= keys.indexOf(key);
+ };
+
+
+ this.get = function get(key) {
+ var i = keys.indexOf(key);
+ return (0 <= i) ? values[i] : defaultValue;
+ };
+};
+
+
+////////////////////////////////////////////////////////////////////////////////
+// vim:ts=2:sw=2
+////////////////////////////////////////////////////////////////////////////////
View
209 node_modules/js-yaml/lib/js-yaml/composer.js
@@ -0,0 +1,209 @@
+'use strict';
+
+
+var $$ = require('./common');
+var _nodes = require('./nodes');
+var _events = require('./events');
+var _errors = require('./errors');
+
+
+function ComposerError() {
+ _errors.MarkedYAMLError.apply(this, arguments);
+ this.name = 'ComposerError';
+}
+$$.inherits(ComposerError, _errors.MarkedYAMLError);
+
+
+function Composer() {
+ this.anchors = {};
+}
+
+
+Composer.prototype.checkNode = function checkNode() {
+ // Drop the STREAM-START event
+ if (this.checkEvent(_events.StreamStartEvent)) {
+ this.getEvent();
+ }
+
+ // If there are more documents vailable?
+ return !this.checkEvent(_events.StreamEndEvent);
+};
+
+Composer.prototype.getNode = function getNode() {
+ // Get the root node of the next document.
+ if (!this.checkEvent(_events.StreamEndEvent)) {
+ return this.composeDocument();
+ }
+
+ return null;
+};
+
+Composer.prototype.getSingleNode = function getSingleNode() {
+ var document = null;
+
+ // Drop the STREAM-START event.
+ this.getEvent();
+
+ // Compose a document if the stream is not empty.
+ if (!this.checkEvent(_events.StreamEndEvent)) {
+ document = this.composeDocument();
+ }
+
+ // Ensure that the stream contains no more documents.
+ if (!this.checkEvent(_events.StreamEndEvent)) {
+ throw new ComposerError("expected a single document in the stream",
+ document.startMark, "but found another document",
+ this.getEvent().startMark);
+ }
+
+ // Drop the STREAM-END event.
+ this.getEvent();
+
+ return document;
+};
+
+Composer.prototype.composeDocument = function composeDocument() {
+ var node;
+
+ // Drop the DOCUMENT-START event.
+ this.getEvent();
+
+ // Compose the root node.
+ node = this.composeNode(null, null);
+
+ // Drop the DOCUMENT-END event.
+ this.getEvent();
+
+ this.anchors = {};
+
+ return node;
+};
+
+Composer.prototype.composeNode = function composeNode(parent, index) {
+ var node = null, event, anchor;
+
+ if (this.checkEvent(_events.AliasEvent)) {
+ event = this.getEvent();
+ anchor = event.anchor;
+
+ if (undefined === this.anchors[anchor]) {
+ throw new ComposerError(null, null, "found undefined alias " + anchor,
+ event.startMark);
+ }
+
+ return this.anchors[anchor];
+ }
+
+ event = this.peekEvent();
+ anchor = event.anchor;
+
+ if (null !== anchor && undefined !== this.anchors[anchor]) {
+ throw new ComposerError("found duplicate anchor " + anchor + "; first occurence",
+ this.anchors[anchor].startMark, "second occurence",
+ event.startMark);
+ }
+
+ if (this.checkEvent(_events.ScalarEvent)) {
+ node = this.composeScalarNode(anchor);
+ } else if (this.checkEvent(_events.SequenceStartEvent)) {
+ node = this.composeSequenceNode(anchor);
+ } else if (this.checkEvent(_events.MappingStartEvent)) {
+ node = this.composeMappingNode(anchor);
+ }
+
+ return node;
+};
+
+Composer.prototype.composeScalarNode = function composeScalarNode(anchor) {
+ var event, tag, node;
+
+ event = this.getEvent();
+ tag = event.tag;
+
+ if (null === tag) {
+ tag = this.resolve(_nodes.ScalarNode, event.value, event.implicit);
+ } else if ("!" === tag) {
+ tag = this.resolve(_nodes.ScalarNode, event.value, false);
+ }
+
+ node = new _nodes.ScalarNode(tag, event.value, event.startMark, event.endMark,
+ event.style);
+
+ if (null !== anchor) {
+ this.anchors[anchor] = node;
+ }
+
+ return node;
+};
+
+Composer.prototype.composeSequenceNode = function composeSequenceNode(anchor) {
+ var start_event, event, tag, node, index, end_event;
+
+ start_event = this.getEvent();
+ tag = start_event.tag;
+
+ if (null === tag) {
+ tag = this.resolve(_nodes.SequenceNode, null, start_event.implicit);
+ } else if ("!" === tag) {
+ tag = this.resolve(_nodes.SequenceNode, null, false);
+ }
+
+ node = new _nodes.SequenceNode(tag, [], start_event.startMark, null,
+ start_event.flowStyle);
+
+ if (null !== anchor) {
+ this.anchors[anchor] = node;
+ }
+
+ index = 0;
+
+ while (!this.checkEvent(_events.SequenceEndEvent)) {
+ node.value.push(this.composeNode(node, index));
+ index += 1;
+ }
+
+ end_event = this.getEvent();
+ node.endMark = end_event.endMark;
+
+ return node;
+};
+
+
+Composer.prototype.composeMappingNode = function composeMappingNode(anchor) {
+ var startEvent, event, tag, node, itemKey, itemValue, endEvent;
+
+ startEvent = this.getEvent();
+ tag = startEvent.tag;
+
+ if (null === tag) {
+ tag = this.resolve(_nodes.MappingNode, null, startEvent.implicit);
+ } else if ("!" === tag) {
+ tag = this.resolve(_nodes.MappingNode, null, false);
+ }
+
+ node = new _nodes.MappingNode(tag, [], startEvent.startMark, null,
+ startEvent.flowStyle);
+
+ if (null !== anchor) {
+ this.anchors[anchor] = node;
+ }
+
+ while (!this.checkEvent(_events.MappingEndEvent)) {
+ itemKey = this.composeNode(node, null);
+ itemValue = this.composeNode(node, itemKey);
+ node.value.push([itemKey, itemValue]);
+ }
+
+ endEvent = this.getEvent();
+ node.endMark = endEvent.endMark;
+
+ return node;
+};
+
+
+module.exports.Composer = Composer;
+
+
+////////////////////////////////////////////////////////////////////////////////
+// vim:ts=2:sw=2
+////////////////////////////////////////////////////////////////////////////////
View
651 node_modules/js-yaml/lib/js-yaml/constructor.js
@@ -0,0 +1,651 @@
+'use strict';
+
+
+var $$ = require('./common');
+var _errors = require('./errors');
+var _nodes = require('./nodes');
+
+
+function ConstructorError() {
+ _errors.MarkedYAMLError.apply(this, arguments);
+ this.name = 'ConstructorError';
+}
+$$.inherits(ConstructorError, _errors.MarkedYAMLError);
+
+
+var BOOL_VALUES = {
+ 'y': true,
+ 'yes': true,
+ 'n': false,
+ 'no': false,
+ 'true': true,
+ 'false': false,
+ 'on': true,
+ 'off': false
+};
+
+
+var TIMESTAMP_REGEXP = new RegExp(
+ '^([0-9][0-9][0-9][0-9])' + // [1] year
+ '-([0-9][0-9]?)' + // [2] month
+ '-([0-9][0-9]?)' + // [3] day
+ '(?:(?:[Tt]|[ \\t]+)' + // ...
+ '([0-9][0-9]?)' + // [4] hour
+ ':([0-9][0-9])' + // [5] minute
+ ':([0-9][0-9])' + // [6] second
+ '(?:\\.([0-9]*))?' + // [7] fraction
+ '(?:[ \\t]*(Z|([-+])([0-9][0-9]?)' + // [8] tz [9] tz_sign [10] tz_hour
+ '(?::([0-9][0-9]))?))?)?$' // [11] tz_minute
+);
+
+
+function BaseConstructor() {
+ this.constructedObjects = new $$.Hash();
+ this.recursiveObjects = new $$.Hash();
+ this.statePopulators = []; // was state_generators
+ this.deepConstruct = false;
+
+ this.yamlConstructors = BaseConstructor.yamlConstructors;
+}
+
+BaseConstructor.yamlConstructors = {};
+BaseConstructor.addConstructor = function addConstructor(tag, constructor) {
+ this.yamlConstructors[tag] = constructor;
+};
+
+BaseConstructor.prototype.checkData = function checkData() {
+ return this.checkNode();
+};
+
+BaseConstructor.prototype.getData = function getData() {
+ if (this.checkNode()) {
+ return this.constructDocument(this.getNode());
+ }
+};
+
+BaseConstructor.prototype.getSingleData = function getSingleData() {
+ var node = this.getSingleNode();
+ if (null !== node) {
+ return this.constructDocument(node);
+ }
+ return null;
+};
+
+BaseConstructor.prototype.constructDocument = function constructDocument(node) {
+ var data = this.constructObject(node),
+ stateIterator, statePopulators;
+
+ stateIterator = function (populator) { populator.execute(); };
+
+ while (!!this.statePopulators.length) {
+ statePopulators = this.statePopulators;
+ this.statePopulators = [];
+
+ statePopulators.forEach(stateIterator);
+ }
+
+ this.constructedObjects = new $$.Hash();
+ this.recursiveObjects = new $$.Hash();
+ this.deepConstruct = false;
+
+ return data;
+};
+
+BaseConstructor.prototype.constructObject = function constructObject(node, deep) {
+ var data, old_deep, constructor, populator;
+
+ if (this.constructedObjects.hasKey(node)) {
+ return this.constructedObjects.get(node);
+ }
+
+ if (!!deep) {
+ old_deep = this.deepConstruct;
+ this.deepConstruct = true;
+ }
+
+ if (this.recursiveObjects.hasKey(node)) {
+ throw new ConstructorError(null, null,
+ "found unconstructable recursive node",
+ node.startMark);
+ }
+
+ this.recursiveObjects.store(node, null);
+
+ if (undefined !== this.yamlConstructors[node.tag]) {
+ constructor = this.yamlConstructors[node.tag];
+ } else {
+ if (undefined !== this.yamlConstructors[null]) {
+ constructor = this.yamlConstructors[null];
+ } else {
+ throw new ConstructorError(null, null,
+ "can't find any constructor for tag=" + node.tag,
+ node.startMark);
+ }
+ }
+
+ data = constructor.call(this, node);
+
+ if (data instanceof $$.Populator) {
+ populator = data;
+ data = populator.data;
+
+ if (this.deepConstruct) {
+ populator.execute();
+ } else {
+ this.statePopulators.push(populator);
+ }
+ }
+
+ this.constructedObjects.store(node, data);
+ this.recursiveObjects.remove(node);
+
+ if (deep) {
+ this.deepConstruct = old_deep;
+ }
+
+ return data;
+};
+
+BaseConstructor.prototype.constructScalar = function constructScalar(node) {
+ if (!$$.isInstanceOf(node, _nodes.ScalarNode)) {
+ throw new ConstructorError(null, null,
+ "expected a scalar node, but found " + node.id,
+ node.startMark);
+ }
+
+ return node.value;
+};
+
+BaseConstructor.prototype.constructSequence = function constructSequence(node, deep) {
+ if (!$$.isInstanceOf(node, _nodes.SequenceNode)) {
+ throw new ConstructorError(null, null,
+ "expected a sequence node, but found " + node.id,
+ node.startMark);
+ }
+
+ return node.value.map(function (child) {
+ return this.constructObject(child, deep);
+ }, this);
+};
+
+BaseConstructor.prototype.constructMapping = function constructMapping(node, deep) {
+ var mapping;
+
+ if (!$$.isInstanceOf(node, _nodes.MappingNode)) {
+ throw new ConstructorError(null, null,
+ "expected a mapping node, but found " + node.id,
+ node.startMark);
+ }
+
+ mapping = {};
+
+ $$.each(node.value, function (pair) {
+ var key_node = pair[0], value_node = pair[1], key, value;
+
+ key = this.constructObject(key_node, deep);
+ // TODO: Do we need to check
+ if (undefined === key_node.hash) {
+ throw new ConstructorError("while constructing a mapping", key_node.startMark,
+ "found unhashable key", key_node.startMark);
+ }
+ value = this.constructObject(value_node, deep);
+
+ mapping[key] = value;
+ }, this);
+
+ return mapping;
+};
+
+BaseConstructor.prototype.constructPairs = function constructPairs(node, deep) {
+ var pairs;
+
+ if (!$$.isInstanceOf(node, _nodes.MappingNode)) {
+ throw new ConstructorError(null, null,
+ "expected a mapping node, but found " + node.id,
+ node.startMark);
+ }
+
+ pairs = [];
+
+ $$.each(node.value, function (pair) {
+ var key, value;
+ key = this.constructObject(pair[0], deep);
+ value = this.constructObject(pair[1], deep);
+ pairs.store(key, value);
+ }, this);
+
+ return pairs;
+};
+
+
+function SafeConstructor() {
+ BaseConstructor.apply(this);
+ this.yamlConstructors = SafeConstructor.yamlConstructors;
+}
+
+$$.inherits(SafeConstructor, BaseConstructor);
+
+SafeConstructor.yamlConstructors = $$.extend({}, BaseConstructor.yamlConstructors);
+SafeConstructor.addConstructor = BaseConstructor.addConstructor;
+
+SafeConstructor.prototype.constructScalar = function constructScalar(node) {
+ var result;
+
+ if ($$.isInstanceOf(node, _nodes.MappingNode)) {
+ $$.each(node.value, function (pair) {
+ var key_node = pair[0], value_node = pair[1], value;
+
+ if ('tag:yaml.org,2002:value' === key_node.tag) {
+ result = this.constructScalar(value_node);
+ }
+ }, this);
+
+ if (undefined !== result) {
+ return result;
+ }
+ }
+
+ return BaseConstructor.prototype.constructScalar.call(this, node);
+};
+
+SafeConstructor.prototype.flattenMapping = function flattenMapping(node) {
+ var self = this, merge = [], index = 0, keyNode, valueNode, submerge,
+ pushSingleValue, pushMultipleValues, submergeIterator;
+
+ pushSingleValue = function (value) {
+ merge.push(value);
+ };
+
+ pushMultipleValues = function (values) {
+ values.forEach(pushSingleValue);
+ };
+
+ submergeIterator = function (subnode) {
+ if (!$$.isInstanceOf(subnode, _nodes.MappingNode)) {
+ throw new ConstructorError("while constructing a mapping", node.startMark,
+ "expected a mapping for merging, but found " + subnode.id,
+ subnode.startMark);
+ }
+ self.flattenMapping(subnode);
+ submerge.push(subnode.value);
+ };
+
+ while (index < node.value.length) {
+ keyNode = node.value[index][0];
+ valueNode = node.value[index][1];
+
+ if ('tag:yaml.org,2002:merge' === keyNode.tag) {
+ node.value.splice(index, 1);
+
+ if ($$.isInstanceOf(valueNode, _nodes.MappingNode)) {
+ self.flattenMapping(valueNode);
+ $$.each(valueNode.value, pushSingleValue);
+ } else if ($$.isInstanceOf(valueNode, _nodes.SequenceNode)) {
+ submerge = [];
+ $$.each(valueNode.value, submergeIterator);
+ $$.reverse(submerge).forEach(pushMultipleValues);
+ } else {
+ throw new ConstructorError("while constructing a mapping", node.startMark,
+ "expected a mapping or list of mappings for merging, but found " + valueNode.id,
+ valueNode.startMark);
+ }
+ } else if ('tag:yaml.org,2002:value' === keyNode.tag) {
+ keyNode.tag = 'tag:yaml.org,2002:str';
+ index += 1;
+ } else {
+ index += 1;
+ }
+ }
+
+ if (!!merge.length) {
+ $$.each(node.value, function (value) { merge.push(value); });
+ node.value = merge;
+ }
+};
+
+SafeConstructor.prototype.constructMapping = function constructMapping(node, deep) {
+ if ($$.isInstanceOf(node, _nodes.MappingNode)) {
+ this.flattenMapping(node);
+ }
+ return BaseConstructor.prototype.constructMapping.call(this, node);
+};
+
+SafeConstructor.prototype.constructYamlNull = function constructYamlNull(node) {
+ this.constructScalar(node);
+ return null;
+};
+
+SafeConstructor.prototype.constructYamlBool = function constructYamlBool(node) {
+ var value = this.constructScalar(node);
+ return BOOL_VALUES[value.toLowerCase()];
+};
+
+SafeConstructor.prototype.constructYamlInt = function constructYamlInt(node) {
+ var value = this.constructScalar(node).replace(/_/g, ''),
+ sign = ('-' === value[0]) ? -1 : 1,
+ base, digits = [];
+
+ if (0 <= '+-'.indexOf(value[0])) {
+ value = value.slice(1);
+ }
+
+ if ('0' === value) {
+ return 0;
+ } else if (/^0b/.test(value)) {
+ return sign * parseInt(value.slice(2), 2);
+ } else if (/^0x/.test(value)) {
+ return sign * parseInt(value, 16);
+ } else if ('0' === value[0]) {
+ return sign * parseInt(value, 8);
+ } else if (0 <= value.indexOf(':')) {
+ value.split(':').forEach(function (v) {
+ digits.unshift(parseInt(v, 10));
+ });
+ value = 0;
+ base = 1;
+ digits.forEach(function (d) {
+ value += (d * base);
+ base *= 60;
+ });
+ return sign * value;
+ } else {
+ return sign * parseInt(value, 10);
+ }
+};
+
+SafeConstructor.prototype.constructYamlFloat = function constructYamlFloat(node) {
+ var value = this.constructScalar(node).replace(/_/g, ''),
+ sign = ('-' === value[0]) ? -1 : 1,
+ base, digits = [];
+
+ if (0 <= '+-'.indexOf(value[0])) {
+ value = value.slice(1);
+ }
+
+ if ('.inf' === value) {
+ return (1 === sign) ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY;
+ } else if ('.nan' === value) {
+ return NaN;
+ } else if (0 <= value.indexOf(':')) {
+ value.split(':').forEach(function (v) {
+ digits.unshift(parseFloat(v, 10));
+ });
+ value = 0.0;
+ base = 1;
+ digits.forEach(function (d) {
+ value += d * base;
+ base *= 60;
+ });
+ return sign * value;
+ } else {
+ return sign * parseFloat(value, 10);
+ }
+};
+
+SafeConstructor.prototype.constructYamlBinary = function constructYamlBinary(node) {
+ try {
+ return $$.decodeBase64(this.constructScalar(node));
+ } catch (err) {
+ throw new ConstructorError(null, null,
+ "failed to decode base64 data: " + err.toString(), node.startMark);
+ }
+};
+
+SafeConstructor.prototype.constructYamlTimestamp = function constructYamlTimestamp(node) {
+ var match, year, month, day, hour, minute, second, fraction = 0,
+ delta = null, tz_hour, tz_minute, data;
+
+ match = TIMESTAMP_REGEXP.exec(this.constructScalar(node));
+
+ // match: [1] year [2] month [3] day
+
+ year = +(match[1]);
+ month = +(match[2]) - 1; // JS month starts with 0
+ day = +(match[3]);
+
+ if (!match[4]) { // no hour
+ return new Date(year, month, day);
+ }
+
+ // match: [4] hour [5] minute [6] second [7] fraction
+
+ hour = +(match[4]);
+ minute = +(match[5]);
+ second = +(match[6]);
+
+ if (!!match[7]) {
+ fraction = match[7].slice(0,3);
+ while (fraction.length < 3) { // milli-seconds
+ fraction += '0';
+ }
+ fraction = +fraction;
+ }
+
+ // match: [8] tz [9] tz_sign [10] tz_hour [11] tz_minute
+
+ if (!!match[9]) {
+ tz_hour = +(match[10]);
+ tz_minute = +(match[11] || 0);
+ delta = (tz_hour * 60 + tz_minute) * 60000; // delta in mili-seconds
+ if ('-' === match[9]) {
+ delta = -delta;
+ }
+ }
+
+ data = new Date(year, month, day, hour, minute, second, fraction);
+
+ if (!!delta) {
+ data.setTime(data.getTime() - delta);
+ }
+
+ return data;
+};
+
+SafeConstructor.prototype.constructYamlOmap = function constructYamlOmap(node) {
+ var self = this, omap = [];
+ return $$.Populator(omap, function () {
+ if (!$$.isInstanceOf(node, _nodes.SequenceNode)) {
+ throw new ConstructorError("while constructing an ordered map", node.startMark,
+ "expected a sequence, but found " + node.id, node.startMark);
+ }
+
+ node.value.forEach(function (subnode) {
+ var data, key, value;
+
+ if (!$$.isInstanceOf(subnode, _nodes.MappingNode)) {
+ throw new ConstructorError("while constructing an ordered map", node.startMark,
+ "expected a mapping of length 1, but found " + subnode.id,
+ subnode.startMark);
+ }
+
+ if (1 !== subnode.value.length) {
+ throw new ConstructorError("while constructing an ordered map", node.startMark,
+ "expected a single mapping item, but found " + subnode.value.length + " items",
+ subnode.startMark);
+ }
+
+ key = self.constructObject(subnode.value[0][0]);
+ value = self.constructObject(subnode.value[0][1]);
+ data = Object.create(null);
+
+ data[key] = value;
+
+ omap.push(data);
+ });
+ });
+};
+
+SafeConstructor.prototype.constructYamlPairs = function constructYamlPairs(node) {
+ var self = this, pairs = [];
+ return $$.Populator(pairs, function () {
+ if (!$$.isInstanceOf(node, _nodes.SequenceNode)) {
+ throw new ConstructorError("while constructing pairs", node.startMark,
+ "expected a sequence, but found " + node.id, node.startMark);
+ }
+
+ node.value.forEach(function (subnode) {
+ var key, value;
+
+ if (!$$.isInstanceOf(subnode, _nodes.MappingNode)) {
+ throw new ConstructorError("while constructing pairs", node.startMark,
+ "expected a mapping of length 1, but found " + subnode.id,
+ subnode.startMark);
+ }
+
+ if (1 !== subnode.value.length) {
+ throw new ConstructorError("while constructing pairs", node.startMark,
+ "expected a single mapping item, but found " + subnode.value.length + " items",
+ subnode.startMark);
+ }
+
+ key = self.constructObject(subnode.value[0][0]);
+ value = self.constructObject(subnode.value[0][1]);
+
+ pairs.push([key, value]);
+ });
+ });
+};
+
+SafeConstructor.prototype.constructYamlSet = function constructYamlSet(node) {
+ var data = {};
+ return $$.Populator(data, function () {
+ $$.extend(data, this.constructMapping(node));
+ }, this);
+};
+
+SafeConstructor.prototype.constructYamlStr = function constructYamlStr(node) {
+ return this.constructScalar(node);
+};
+
+SafeConstructor.prototype.constructYamlSeq = function constructYamlSeq(node) {
+ var data = [];
+ return $$.Populator(data, function () {
+ this.constructSequence(node).forEach(function (value) {
+ data.push(value);
+ });
+ }, this);
+};
+
+SafeConstructor.prototype.constructYamlMap = function constructYamlMap(node) {
+ var data = {};
+ return $$.Populator(data, function () {
+ $$.extend(data, this.constructMapping(node, true));
+ }, this);
+};
+
+SafeConstructor.prototype.constructUndefined = function constructUndefined(node) {
+ throw new ConstructorError(null, null,
+ "could not determine constructor for the tag " + node.tag,
+ node.startMark);
+};
+
+
+SafeConstructor.addConstructor(
+ 'tag:yaml.org,2002:null',
+ SafeConstructor.prototype.constructYamlNull);
+
+SafeConstructor.addConstructor(
+ 'tag:yaml.org,2002:bool',
+ SafeConstructor.prototype.constructYamlBool);
+
+SafeConstructor.addConstructor(
+ 'tag:yaml.org,2002:int',
+ SafeConstructor.prototype.constructYamlInt);
+
+SafeConstructor.addConstructor(
+ 'tag:yaml.org,2002:float',
+ SafeConstructor.prototype.constructYamlFloat);
+
+SafeConstructor.addConstructor(
+ 'tag:yaml.org,2002:binary',
+ SafeConstructor.prototype.constructYamlBinary);
+
+SafeConstructor.addConstructor(
+ 'tag:yaml.org,2002:timestamp',
+ SafeConstructor.prototype.constructYamlTimestamp);
+
+SafeConstructor.addConstructor(
+ 'tag:yaml.org,2002:omap',
+ SafeConstructor.prototype.constructYamlOmap);
+
+SafeConstructor.addConstructor(
+ 'tag:yaml.org,2002:pairs',
+ SafeConstructor.prototype.constructYamlPairs);
+
+SafeConstructor.addConstructor(
+ 'tag:yaml.org,2002:set',
+ SafeConstructor.prototype.constructYamlSet);
+
+SafeConstructor.addConstructor(
+ 'tag:yaml.org,2002:str',
+ SafeConstructor.prototype.constructYamlStr);
+
+SafeConstructor.addConstructor(
+ 'tag:yaml.org,2002:seq',
+ SafeConstructor.prototype.constructYamlSeq);
+
+SafeConstructor.addConstructor(
+ 'tag:yaml.org,2002:map',
+ SafeConstructor.prototype.constructYamlMap);
+
+SafeConstructor.addConstructor(
+ null,
+ SafeConstructor.prototype.constructUndefined);
+
+
+function Constructor() {
+ SafeConstructor.apply(this);
+ this.yamlConstructors = Constructor.yamlConstructors;
+}
+
+$$.inherits(Constructor, SafeConstructor);
+
+Constructor.yamlConstructors = $$.extend({}, SafeConstructor.yamlConstructors);
+Constructor.addConstructor = SafeConstructor.addConstructor;
+
+Constructor.prototype.constructJavascriptRegExp = function constructJavascriptRegExp(node) {
+ var regexp = this.constructScalar(node),
+ tail =/\/([gim]*)$/.exec(regexp),
+ modifiers;
+
+ // `/foo/gim` - tail can be maximum 4 chars
+ if ('/' === regexp[0] && !!tail && 4 >= tail[0].length) {
+ regexp = regexp.slice(1, regexp.length - tail[0].length);
+ modifiers = tail[1];
+ }
+
+ return new RegExp(regexp, modifiers);
+};
+
+Constructor.prototype.constructJavascriptUndefined = function constructJavascriptUndefined(node) {
+ var undef;
+ return undef;
+};
+
+Constructor.prototype.constructJavascriptFunction = function constructJavascriptFunction(node) {
+ /*jslint evil:true*/
+ var func = new Function('return ' + this.constructScalar(node));
+ return func();
+};
+
+Constructor.addConstructor(
+ 'tag:yaml.org,2002:js/undefined',
+ Constructor.prototype.constructJavascriptUndefined);
+
+Constructor.addConstructor(
+ 'tag:yaml.org,2002:js/regexp',
+ Constructor.prototype.constructJavascriptRegExp);
+
+Constructor.addConstructor(
+ 'tag:yaml.org,2002:js/function',
+ Constructor.prototype.constructJavascriptFunction);
+
+
+module.exports.BaseConstructor = BaseConstructor;
+module.exports.SafeConstructor = SafeConstructor;
+module.exports.Constructor = Constructor;
+
+
+////////////////////////////////////////////////////////////////////////////////
+// vim:ts=2:sw=2
+////////////////////////////////////////////////////////////////////////////////
View
160 node_modules/js-yaml/lib/js-yaml/errors.js
@@ -0,0 +1,160 @@
+'use strict';
+
+
+var $$ = require('./common');
+
+
+var repeat = function repeat(str, n) {
+ var result = '', i;
+ for (i = 0; i < n; i += 1) {
+ result += str;
+ }
+ return result;
+};
+
+
+function Mark(name, index, line, column, buffer, pointer) {
+ this.name = name;
+ this.index = index;
+ this.line = line;
+ this.column = column;
+ this.buffer = buffer;
+ this.pointer = pointer;
+}
+
+Mark.prototype.getSnippet = function (indent, maxLength) {
+ var head, start, tail, end, snippet;
+
+ if (!this.buffer) {
+ return null;
+ }
+
+ indent = indent || 4;
+ maxLength = maxLength || 75;
+
+ head = '';
+ start = this.pointer;
+
+ while (start > 0 && -1 === '\x00\r\n\x85\u2028\u2029'.indexOf(this.buffer[start - 1])) {
+ start -= 1;
+ if (this.pointer - start > (maxLength / 2 - 1)) {
+ head = ' ... ';
+ start += 5;
+ break;
+ }
+ }
+
+ tail = '';
+ end = this.pointer;
+
+ while (end < this.buffer.length && -1 === '\x00\r\n\x85\u2028\u2029'.indexOf(this.buffer[end])) {
+ end += 1;
+ if (end - this.pointer > (maxLength / 2 - 1)) {
+ tail = ' ... ';
+ end -= 5;
+ break;
+ }
+ }
+
+ snippet = this.buffer.slice(start, end);
+
+ return repeat(' ', indent) + head + snippet + tail + '\n' +
+ repeat(' ', indent + this.pointer - start + head.length) + '^';
+};
+
+Mark.prototype.toString = function () {
+ var snippet = this.getSnippet(), where;
+
+ where = ' in "' + this.name +
+ '", line ' + (this.line + 1) +
+ ', column ' + (this.column + 1);
+
+ if (snippet) {
+ where += ':\n' + snippet;
+ }
+
+ return where;
+};
+
+
+function YAMLError(message) {
+ $$.extend(this, Error.prototype.constructor.call(this, message));
+ this.name = 'YAMLError';
+}
+$$.inherits(YAMLError, Error);
+
+
+function toStringCompact(self) {
+ var str = "Error ";
+
+ if (null !== self.problemMark) {
+ str += "on line " + (self.problemMark.line+1) + ", col " + (self.problemMark.column+1) + ": ";
+ }
+
+ if (null !== self.problem) {
+ str += self.problem;
+ }
+
+ if (null !== self.note) {
+ str += self.note;
+ }
+
+ return str;
+}
+
+function toStringFull(self) {
+ var lines = [];
+
+ if (null !== self.context) {
+ lines.push(self.context);
+ }
+
+ if (null !== self.contextMark
+ && (null === self.problem || null === self.problemMark
+ || self.contextMark.name !== self.problemMark.name
+ || self.contextMark.line !== self.problemMark.line
+ || self.contextMark.column !== self.problemMark.column)) {
+ lines.push(self.contextMark.toString());
+ }
+
+ if (null !== self.problem) {
+ lines.push(self.problem);
+ }
+
+ if (null !== self.problemMark) {
+ lines.push(self.problemMark.toString());
+ }
+
+ if (null !== self.note) {
+ lines.push(self.note);
+ }
+
+ return lines.join('\n');
+}
+
+
+function MarkedYAMLError(context, contextMark, problem, problemMark, note) {
+ YAMLError.call(this);
+ this.name = 'MarkedYAMLError';
+
+ this.context = context || null;
+ this.contextMark = contextMark || null;
+ this.problem = problem || null;
+ this.problemMark = problemMark || null;
+ this.note = note || null;
+
+ this.toString = function toString(compact) {
+ return compact ? toStringCompact(this) : toStringFull(this);
+ };
+}
+$$.inherits(MarkedYAMLError, YAMLError);
+
+
+module.exports.Mark = Mark;
+module.exports.YAMLError = YAMLError;
+module.exports.MarkedYAMLError = MarkedYAMLError;
+
+
+////////////////////////////////////////////////////////////////////////////////
+// vim:ts=2:sw=2
+////////////////////////////////////////////////////////////////////////////////
View
122 node_modules/js-yaml/lib/js-yaml/events.js
@@ -0,0 +1,122 @@
+'use strict';
+
+
+var $$ = require('./common');
+
+
+var HASHIFY_KEYS = ['anchor', 'tag', 'implicit', 'value'];
+
+
+function Event(startMark, endMark) {
+ this.startMark = startMark || null;
+ this.endMark = endMark || null;
+}
+
+Event.prototype.hash = Event.prototype.toString = function toString() {
+ var self = this, values = [];
+
+ Object.getOwnPropertyNames(this).forEach(function (key) {
+ if (0 <= HASHIFY_KEYS.indexOf(key)) {
+ values.push(key + '=' + self[key]);
+ }
+ });
+
+ return this.constructor.name + '(' + values.join(', ') + ')';
+};
+
+
+function NodeEvent(anchor, startMark, endMark) {
+ Event.call(this, startMark, endMark);
+ this.anchor = anchor;
+}
+$$.inherits(NodeEvent, Event);
+
+
+function CollectionStartEvent(anchor, tag, implicit, startMark, endMark, flowStyle) {
+ NodeEvent.call(this, anchor, startMark, endMark);