avo-cli 0.0.3 → 4.2.0.beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (814) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +605 -0
  3. data/avo-cli.gemspec +22 -23
  4. data/exe/avo +6 -0
  5. data/lib/avo/cli/runner.rb +86 -0
  6. data/lib/avo/cli/version.rb +7 -0
  7. data/lib/avo-cli.rb +5 -0
  8. data/payload/README.md +605 -0
  9. data/payload/bin/run.cmd +3 -0
  10. data/payload/bin/run.js +5 -0
  11. data/payload/dist/base-command.js +60 -0
  12. data/payload/dist/client.js +77 -0
  13. data/payload/dist/commands/create.js +26 -0
  14. data/payload/dist/commands/delete.js +22 -0
  15. data/payload/dist/commands/get.js +19 -0
  16. data/payload/dist/commands/list.js +47 -0
  17. data/payload/dist/commands/login.js +93 -0
  18. data/payload/dist/commands/logout.js +13 -0
  19. data/payload/dist/commands/schema.js +58 -0
  20. data/payload/dist/commands/update.js +27 -0
  21. data/payload/dist/config.js +57 -0
  22. data/payload/dist/data.js +33 -0
  23. data/payload/dist/errors.js +93 -0
  24. data/payload/dist/hooks/command-not-found.js +22 -0
  25. data/payload/dist/index.js +1 -0
  26. data/payload/dist/list.js +7 -0
  27. data/payload/dist/payload.js +35 -0
  28. data/payload/dist/record-command.js +51 -0
  29. data/payload/dist/schema.js +29 -0
  30. data/payload/dist/store.js +91 -0
  31. data/payload/dist/suggest.js +29 -0
  32. data/payload/dist/table.js +40 -0
  33. data/payload/dist/write-command.js +26 -0
  34. data/payload/node_modules/@inquirer/ansi/LICENSE +22 -0
  35. data/payload/node_modules/@inquirer/ansi/README.md +89 -0
  36. data/payload/node_modules/@inquirer/ansi/dist/commonjs/index.d.ts +14 -0
  37. data/payload/node_modules/@inquirer/ansi/dist/commonjs/index.js +28 -0
  38. data/payload/node_modules/@inquirer/ansi/dist/commonjs/package.json +3 -0
  39. data/payload/node_modules/@inquirer/ansi/dist/esm/index.d.ts +14 -0
  40. data/payload/node_modules/@inquirer/ansi/dist/esm/index.js +21 -0
  41. data/payload/node_modules/@inquirer/ansi/dist/esm/package.json +3 -0
  42. data/payload/node_modules/@inquirer/ansi/package.json +97 -0
  43. data/payload/node_modules/@inquirer/core/LICENSE +22 -0
  44. data/payload/node_modules/@inquirer/core/README.md +383 -0
  45. data/payload/node_modules/@inquirer/core/dist/commonjs/index.d.ts +13 -0
  46. data/payload/node_modules/@inquirer/core/dist/commonjs/index.js +46 -0
  47. data/payload/node_modules/@inquirer/core/dist/commonjs/lib/Separator.d.ts +10 -0
  48. data/payload/node_modules/@inquirer/core/dist/commonjs/lib/Separator.js +28 -0
  49. data/payload/node_modules/@inquirer/core/dist/commonjs/lib/create-prompt.d.ts +4 -0
  50. data/payload/node_modules/@inquirer/core/dist/commonjs/lib/create-prompt.js +156 -0
  51. data/payload/node_modules/@inquirer/core/dist/commonjs/lib/errors.d.ts +20 -0
  52. data/payload/node_modules/@inquirer/core/dist/commonjs/lib/errors.js +29 -0
  53. data/payload/node_modules/@inquirer/core/dist/commonjs/lib/hook-engine.d.ts +23 -0
  54. data/payload/node_modules/@inquirer/core/dist/commonjs/lib/hook-engine.js +118 -0
  55. data/payload/node_modules/@inquirer/core/dist/commonjs/lib/key.d.ts +12 -0
  56. data/payload/node_modules/@inquirer/core/dist/commonjs/lib/key.js +29 -0
  57. data/payload/node_modules/@inquirer/core/dist/commonjs/lib/make-theme.d.ts +3 -0
  58. data/payload/node_modules/@inquirer/core/dist/commonjs/lib/make-theme.js +33 -0
  59. data/payload/node_modules/@inquirer/core/dist/commonjs/lib/pagination/use-pagination.d.ts +16 -0
  60. data/payload/node_modules/@inquirer/core/dist/commonjs/lib/pagination/use-pagination.js +124 -0
  61. data/payload/node_modules/@inquirer/core/dist/commonjs/lib/promise-polyfill.d.ts +7 -0
  62. data/payload/node_modules/@inquirer/core/dist/commonjs/lib/promise-polyfill.js +18 -0
  63. data/payload/node_modules/@inquirer/core/dist/commonjs/lib/screen-manager.d.ts +14 -0
  64. data/payload/node_modules/@inquirer/core/dist/commonjs/lib/screen-manager.js +82 -0
  65. data/payload/node_modules/@inquirer/core/dist/commonjs/lib/theme.d.ts +155 -0
  66. data/payload/node_modules/@inquirer/core/dist/commonjs/lib/theme.js +27 -0
  67. data/payload/node_modules/@inquirer/core/dist/commonjs/lib/use-effect.d.ts +2 -0
  68. data/payload/node_modules/@inquirer/core/dist/commonjs/lib/use-effect.js +14 -0
  69. data/payload/node_modules/@inquirer/core/dist/commonjs/lib/use-keypress.d.ts +3 -0
  70. data/payload/node_modules/@inquirer/core/dist/commonjs/lib/use-keypress.js +23 -0
  71. data/payload/node_modules/@inquirer/core/dist/commonjs/lib/use-memo.d.ts +1 -0
  72. data/payload/node_modules/@inquirer/core/dist/commonjs/lib/use-memo.js +17 -0
  73. data/payload/node_modules/@inquirer/core/dist/commonjs/lib/use-prefix.d.ts +5 -0
  74. data/payload/node_modules/@inquirer/core/dist/commonjs/lib/use-prefix.js +38 -0
  75. data/payload/node_modules/@inquirer/core/dist/commonjs/lib/use-ref.d.ts +6 -0
  76. data/payload/node_modules/@inquirer/core/dist/commonjs/lib/use-ref.js +7 -0
  77. data/payload/node_modules/@inquirer/core/dist/commonjs/lib/use-state.d.ts +4 -0
  78. data/payload/node_modules/@inquirer/core/dist/commonjs/lib/use-state.js +23 -0
  79. data/payload/node_modules/@inquirer/core/dist/commonjs/lib/utils.d.ts +13 -0
  80. data/payload/node_modules/@inquirer/core/dist/commonjs/lib/utils.js +32 -0
  81. data/payload/node_modules/@inquirer/core/dist/commonjs/package.json +3 -0
  82. data/payload/node_modules/@inquirer/core/dist/esm/index.d.ts +13 -0
  83. data/payload/node_modules/@inquirer/core/dist/esm/index.js +12 -0
  84. data/payload/node_modules/@inquirer/core/dist/esm/lib/Separator.d.ts +10 -0
  85. data/payload/node_modules/@inquirer/core/dist/esm/lib/Separator.js +21 -0
  86. data/payload/node_modules/@inquirer/core/dist/esm/lib/create-prompt.d.ts +4 -0
  87. data/payload/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js +117 -0
  88. data/payload/node_modules/@inquirer/core/dist/esm/lib/errors.d.ts +20 -0
  89. data/payload/node_modules/@inquirer/core/dist/esm/lib/errors.js +21 -0
  90. data/payload/node_modules/@inquirer/core/dist/esm/lib/hook-engine.d.ts +23 -0
  91. data/payload/node_modules/@inquirer/core/dist/esm/lib/hook-engine.js +110 -0
  92. data/payload/node_modules/@inquirer/core/dist/esm/lib/key.d.ts +12 -0
  93. data/payload/node_modules/@inquirer/core/dist/esm/lib/key.js +19 -0
  94. data/payload/node_modules/@inquirer/core/dist/esm/lib/make-theme.d.ts +3 -0
  95. data/payload/node_modules/@inquirer/core/dist/esm/lib/make-theme.js +30 -0
  96. data/payload/node_modules/@inquirer/core/dist/esm/lib/pagination/use-pagination.d.ts +16 -0
  97. data/payload/node_modules/@inquirer/core/dist/esm/lib/pagination/use-pagination.js +121 -0
  98. data/payload/node_modules/@inquirer/core/dist/esm/lib/promise-polyfill.d.ts +7 -0
  99. data/payload/node_modules/@inquirer/core/dist/esm/lib/promise-polyfill.js +14 -0
  100. data/payload/node_modules/@inquirer/core/dist/esm/lib/screen-manager.d.ts +14 -0
  101. data/payload/node_modules/@inquirer/core/dist/esm/lib/screen-manager.js +79 -0
  102. data/payload/node_modules/@inquirer/core/dist/esm/lib/theme.d.ts +155 -0
  103. data/payload/node_modules/@inquirer/core/dist/esm/lib/theme.js +21 -0
  104. data/payload/node_modules/@inquirer/core/dist/esm/lib/use-effect.d.ts +2 -0
  105. data/payload/node_modules/@inquirer/core/dist/esm/lib/use-effect.js +11 -0
  106. data/payload/node_modules/@inquirer/core/dist/esm/lib/use-keypress.d.ts +3 -0
  107. data/payload/node_modules/@inquirer/core/dist/esm/lib/use-keypress.js +20 -0
  108. data/payload/node_modules/@inquirer/core/dist/esm/lib/use-memo.d.ts +1 -0
  109. data/payload/node_modules/@inquirer/core/dist/esm/lib/use-memo.js +14 -0
  110. data/payload/node_modules/@inquirer/core/dist/esm/lib/use-prefix.d.ts +5 -0
  111. data/payload/node_modules/@inquirer/core/dist/esm/lib/use-prefix.js +35 -0
  112. data/payload/node_modules/@inquirer/core/dist/esm/lib/use-ref.d.ts +6 -0
  113. data/payload/node_modules/@inquirer/core/dist/esm/lib/use-ref.js +4 -0
  114. data/payload/node_modules/@inquirer/core/dist/esm/lib/use-state.d.ts +4 -0
  115. data/payload/node_modules/@inquirer/core/dist/esm/lib/use-state.js +20 -0
  116. data/payload/node_modules/@inquirer/core/dist/esm/lib/utils.d.ts +13 -0
  117. data/payload/node_modules/@inquirer/core/dist/esm/lib/utils.js +25 -0
  118. data/payload/node_modules/@inquirer/core/dist/esm/package.json +3 -0
  119. data/payload/node_modules/@inquirer/core/node_modules/mute-stream/LICENSE +15 -0
  120. data/payload/node_modules/@inquirer/core/node_modules/mute-stream/README.md +68 -0
  121. data/payload/node_modules/@inquirer/core/node_modules/mute-stream/lib/index.js +142 -0
  122. data/payload/node_modules/@inquirer/core/node_modules/mute-stream/package.json +54 -0
  123. data/payload/node_modules/@inquirer/core/package.json +119 -0
  124. data/payload/node_modules/@inquirer/figures/LICENSE +22 -0
  125. data/payload/node_modules/@inquirer/figures/dist/commonjs/index.d.ts +275 -0
  126. data/payload/node_modules/@inquirer/figures/dist/commonjs/index.js +321 -0
  127. data/payload/node_modules/@inquirer/figures/dist/commonjs/package.json +3 -0
  128. data/payload/node_modules/@inquirer/figures/dist/esm/index.d.ts +275 -0
  129. data/payload/node_modules/@inquirer/figures/dist/esm/index.js +314 -0
  130. data/payload/node_modules/@inquirer/figures/dist/esm/package.json +3 -0
  131. data/payload/node_modules/@inquirer/figures/package.json +98 -0
  132. data/payload/node_modules/@inquirer/input/LICENSE +22 -0
  133. data/payload/node_modules/@inquirer/input/README.md +101 -0
  134. data/payload/node_modules/@inquirer/input/dist/commonjs/index.d.ts +20 -0
  135. data/payload/node_modules/@inquirer/input/dist/commonjs/index.js +99 -0
  136. data/payload/node_modules/@inquirer/input/dist/commonjs/package.json +3 -0
  137. data/payload/node_modules/@inquirer/input/dist/esm/index.d.ts +20 -0
  138. data/payload/node_modules/@inquirer/input/dist/esm/index.js +97 -0
  139. data/payload/node_modules/@inquirer/input/dist/esm/package.json +3 -0
  140. data/payload/node_modules/@inquirer/input/package.json +110 -0
  141. data/payload/node_modules/@inquirer/password/LICENSE +22 -0
  142. data/payload/node_modules/@inquirer/password/README.md +93 -0
  143. data/payload/node_modules/@inquirer/password/dist/commonjs/index.d.ts +10 -0
  144. data/payload/node_modules/@inquirer/password/dist/commonjs/index.js +57 -0
  145. data/payload/node_modules/@inquirer/password/dist/commonjs/package.json +3 -0
  146. data/payload/node_modules/@inquirer/password/dist/esm/index.d.ts +10 -0
  147. data/payload/node_modules/@inquirer/password/dist/esm/index.js +55 -0
  148. data/payload/node_modules/@inquirer/password/dist/esm/package.json +3 -0
  149. data/payload/node_modules/@inquirer/password/package.json +111 -0
  150. data/payload/node_modules/@inquirer/type/LICENSE +22 -0
  151. data/payload/node_modules/@inquirer/type/dist/commonjs/index.d.ts +2 -0
  152. data/payload/node_modules/@inquirer/type/dist/commonjs/index.js +18 -0
  153. data/payload/node_modules/@inquirer/type/dist/commonjs/inquirer.d.ts +38 -0
  154. data/payload/node_modules/@inquirer/type/dist/commonjs/inquirer.js +2 -0
  155. data/payload/node_modules/@inquirer/type/dist/commonjs/package.json +3 -0
  156. data/payload/node_modules/@inquirer/type/dist/commonjs/utils.d.ts +29 -0
  157. data/payload/node_modules/@inquirer/type/dist/commonjs/utils.js +3 -0
  158. data/payload/node_modules/@inquirer/type/dist/esm/index.d.ts +2 -0
  159. data/payload/node_modules/@inquirer/type/dist/esm/index.js +2 -0
  160. data/payload/node_modules/@inquirer/type/dist/esm/inquirer.d.ts +38 -0
  161. data/payload/node_modules/@inquirer/type/dist/esm/inquirer.js +1 -0
  162. data/payload/node_modules/@inquirer/type/dist/esm/package.json +3 -0
  163. data/payload/node_modules/@inquirer/type/dist/esm/utils.d.ts +29 -0
  164. data/payload/node_modules/@inquirer/type/dist/esm/utils.js +2 -0
  165. data/payload/node_modules/@inquirer/type/package.json +106 -0
  166. data/payload/node_modules/@oclif/core/LICENSE +21 -0
  167. data/payload/node_modules/@oclif/core/README.md +150 -0
  168. data/payload/node_modules/@oclif/core/lib/args.d.ts +56 -0
  169. data/payload/node_modules/@oclif/core/lib/args.js +85 -0
  170. data/payload/node_modules/@oclif/core/lib/cache.d.ts +27 -0
  171. data/payload/node_modules/@oclif/core/lib/cache.js +40 -0
  172. data/payload/node_modules/@oclif/core/lib/command.d.ts +192 -0
  173. data/payload/node_modules/@oclif/core/lib/command.js +350 -0
  174. data/payload/node_modules/@oclif/core/lib/config/config.d.ts +135 -0
  175. data/payload/node_modules/@oclif/core/lib/config/config.js +749 -0
  176. data/payload/node_modules/@oclif/core/lib/config/index.d.ts +3 -0
  177. data/payload/node_modules/@oclif/core/lib/config/index.js +9 -0
  178. data/payload/node_modules/@oclif/core/lib/config/plugin-loader.d.ts +38 -0
  179. data/payload/node_modules/@oclif/core/lib/config/plugin-loader.js +188 -0
  180. data/payload/node_modules/@oclif/core/lib/config/plugin.d.ts +51 -0
  181. data/payload/node_modules/@oclif/core/lib/config/plugin.js +373 -0
  182. data/payload/node_modules/@oclif/core/lib/config/ts-path.d.ts +9 -0
  183. data/payload/node_modules/@oclif/core/lib/config/ts-path.js +293 -0
  184. data/payload/node_modules/@oclif/core/lib/config/util.d.ts +23 -0
  185. data/payload/node_modules/@oclif/core/lib/config/util.js +54 -0
  186. data/payload/node_modules/@oclif/core/lib/constraints.d.ts +217 -0
  187. data/payload/node_modules/@oclif/core/lib/constraints.js +638 -0
  188. data/payload/node_modules/@oclif/core/lib/errors/error.d.ts +8 -0
  189. data/payload/node_modules/@oclif/core/lib/errors/error.js +63 -0
  190. data/payload/node_modules/@oclif/core/lib/errors/errors/cli.d.ts +29 -0
  191. data/payload/node_modules/@oclif/core/lib/errors/errors/cli.js +77 -0
  192. data/payload/node_modules/@oclif/core/lib/errors/errors/exit.d.ts +7 -0
  193. data/payload/node_modules/@oclif/core/lib/errors/errors/exit.js +14 -0
  194. data/payload/node_modules/@oclif/core/lib/errors/errors/module-load.d.ts +6 -0
  195. data/payload/node_modules/@oclif/core/lib/errors/errors/module-load.js +12 -0
  196. data/payload/node_modules/@oclif/core/lib/errors/errors/pretty-print.d.ts +9 -0
  197. data/payload/node_modules/@oclif/core/lib/errors/errors/pretty-print.js +67 -0
  198. data/payload/node_modules/@oclif/core/lib/errors/exit.d.ts +1 -0
  199. data/payload/node_modules/@oclif/core/lib/errors/exit.js +7 -0
  200. data/payload/node_modules/@oclif/core/lib/errors/handle.d.ts +14 -0
  201. data/payload/node_modules/@oclif/core/lib/errors/handle.js +60 -0
  202. data/payload/node_modules/@oclif/core/lib/errors/index.d.ts +8 -0
  203. data/payload/node_modules/@oclif/core/lib/errors/index.js +17 -0
  204. data/payload/node_modules/@oclif/core/lib/errors/warn.d.ts +8 -0
  205. data/payload/node_modules/@oclif/core/lib/errors/warn.js +40 -0
  206. data/payload/node_modules/@oclif/core/lib/execute.d.ts +44 -0
  207. data/payload/node_modules/@oclif/core/lib/execute.js +61 -0
  208. data/payload/node_modules/@oclif/core/lib/flags.d.ts +181 -0
  209. data/payload/node_modules/@oclif/core/lib/flags.js +129 -0
  210. data/payload/node_modules/@oclif/core/lib/flush.d.ts +1 -0
  211. data/payload/node_modules/@oclif/core/lib/flush.js +26 -0
  212. data/payload/node_modules/@oclif/core/lib/help/command.d.ts +33 -0
  213. data/payload/node_modules/@oclif/core/lib/help/command.js +352 -0
  214. data/payload/node_modules/@oclif/core/lib/help/docopts.d.ts +69 -0
  215. data/payload/node_modules/@oclif/core/lib/help/docopts.js +198 -0
  216. data/payload/node_modules/@oclif/core/lib/help/formatter.d.ts +96 -0
  217. data/payload/node_modules/@oclif/core/lib/help/formatter.js +194 -0
  218. data/payload/node_modules/@oclif/core/lib/help/index.d.ts +46 -0
  219. data/payload/node_modules/@oclif/core/lib/help/index.js +345 -0
  220. data/payload/node_modules/@oclif/core/lib/help/root.d.ts +11 -0
  221. data/payload/node_modules/@oclif/core/lib/help/root.js +47 -0
  222. data/payload/node_modules/@oclif/core/lib/help/util.d.ts +7 -0
  223. data/payload/node_modules/@oclif/core/lib/help/util.js +99 -0
  224. data/payload/node_modules/@oclif/core/lib/index.d.ts +20 -0
  225. data/payload/node_modules/@oclif/core/lib/index.js +101 -0
  226. data/payload/node_modules/@oclif/core/lib/interfaces/alphabet.d.ts +2 -0
  227. data/payload/node_modules/@oclif/core/lib/interfaces/alphabet.js +2 -0
  228. data/payload/node_modules/@oclif/core/lib/interfaces/args.d.ts +22 -0
  229. data/payload/node_modules/@oclif/core/lib/interfaces/args.js +2 -0
  230. data/payload/node_modules/@oclif/core/lib/interfaces/config.d.ts +139 -0
  231. data/payload/node_modules/@oclif/core/lib/interfaces/config.js +2 -0
  232. data/payload/node_modules/@oclif/core/lib/interfaces/errors.d.ts +27 -0
  233. data/payload/node_modules/@oclif/core/lib/interfaces/errors.js +2 -0
  234. data/payload/node_modules/@oclif/core/lib/interfaces/flags.d.ts +34 -0
  235. data/payload/node_modules/@oclif/core/lib/interfaces/flags.js +2 -0
  236. data/payload/node_modules/@oclif/core/lib/interfaces/help.d.ts +58 -0
  237. data/payload/node_modules/@oclif/core/lib/interfaces/help.js +2 -0
  238. data/payload/node_modules/@oclif/core/lib/interfaces/hooks.d.ts +185 -0
  239. data/payload/node_modules/@oclif/core/lib/interfaces/hooks.js +2 -0
  240. data/payload/node_modules/@oclif/core/lib/interfaces/index.d.ts +16 -0
  241. data/payload/node_modules/@oclif/core/lib/interfaces/index.js +2 -0
  242. data/payload/node_modules/@oclif/core/lib/interfaces/logger.d.ts +9 -0
  243. data/payload/node_modules/@oclif/core/lib/interfaces/logger.js +2 -0
  244. data/payload/node_modules/@oclif/core/lib/interfaces/manifest.d.ts +7 -0
  245. data/payload/node_modules/@oclif/core/lib/interfaces/manifest.js +2 -0
  246. data/payload/node_modules/@oclif/core/lib/interfaces/parser.d.ts +520 -0
  247. data/payload/node_modules/@oclif/core/lib/interfaces/parser.js +2 -0
  248. data/payload/node_modules/@oclif/core/lib/interfaces/pjson.d.ts +314 -0
  249. data/payload/node_modules/@oclif/core/lib/interfaces/pjson.js +2 -0
  250. data/payload/node_modules/@oclif/core/lib/interfaces/plugin.d.ts +104 -0
  251. data/payload/node_modules/@oclif/core/lib/interfaces/plugin.js +2 -0
  252. data/payload/node_modules/@oclif/core/lib/interfaces/s3-manifest.d.ts +14 -0
  253. data/payload/node_modules/@oclif/core/lib/interfaces/s3-manifest.js +2 -0
  254. data/payload/node_modules/@oclif/core/lib/interfaces/theme.d.ts +32 -0
  255. data/payload/node_modules/@oclif/core/lib/interfaces/theme.js +44 -0
  256. data/payload/node_modules/@oclif/core/lib/interfaces/topic.d.ts +5 -0
  257. data/payload/node_modules/@oclif/core/lib/interfaces/topic.js +2 -0
  258. data/payload/node_modules/@oclif/core/lib/interfaces/ts-config.d.ts +23 -0
  259. data/payload/node_modules/@oclif/core/lib/interfaces/ts-config.js +2 -0
  260. data/payload/node_modules/@oclif/core/lib/logger.d.ts +14 -0
  261. data/payload/node_modules/@oclif/core/lib/logger.js +89 -0
  262. data/payload/node_modules/@oclif/core/lib/main.d.ts +4 -0
  263. data/payload/node_modules/@oclif/core/lib/main.js +106 -0
  264. data/payload/node_modules/@oclif/core/lib/module-loader.d.ts +71 -0
  265. data/payload/node_modules/@oclif/core/lib/module-loader.js +206 -0
  266. data/payload/node_modules/@oclif/core/lib/parser/errors.d.ts +58 -0
  267. data/payload/node_modules/@oclif/core/lib/parser/errors.js +117 -0
  268. data/payload/node_modules/@oclif/core/lib/parser/help.d.ts +3 -0
  269. data/payload/node_modules/@oclif/core/lib/parser/help.js +29 -0
  270. data/payload/node_modules/@oclif/core/lib/parser/index.d.ts +5 -0
  271. data/payload/node_modules/@oclif/core/lib/parser/index.js +25 -0
  272. data/payload/node_modules/@oclif/core/lib/parser/parse.d.ts +37 -0
  273. data/payload/node_modules/@oclif/core/lib/parser/parse.js +545 -0
  274. data/payload/node_modules/@oclif/core/lib/parser/validate.d.ts +5 -0
  275. data/payload/node_modules/@oclif/core/lib/parser/validate.js +287 -0
  276. data/payload/node_modules/@oclif/core/lib/performance.d.ts +73 -0
  277. data/payload/node_modules/@oclif/core/lib/performance.js +227 -0
  278. data/payload/node_modules/@oclif/core/lib/screen.d.ts +2 -0
  279. data/payload/node_modules/@oclif/core/lib/screen.js +20 -0
  280. data/payload/node_modules/@oclif/core/lib/settings.d.ts +36 -0
  281. data/payload/node_modules/@oclif/core/lib/settings.js +7 -0
  282. data/payload/node_modules/@oclif/core/lib/symbols.d.ts +1 -0
  283. data/payload/node_modules/@oclif/core/lib/symbols.js +4 -0
  284. data/payload/node_modules/@oclif/core/lib/util/aggregate-flags.d.ts +2 -0
  285. data/payload/node_modules/@oclif/core/lib/util/aggregate-flags.js +12 -0
  286. data/payload/node_modules/@oclif/core/lib/util/cache-command.d.ts +3 -0
  287. data/payload/node_modules/@oclif/core/lib/util/cache-command.js +120 -0
  288. data/payload/node_modules/@oclif/core/lib/util/cache-default-value.d.ts +2 -0
  289. data/payload/node_modules/@oclif/core/lib/util/cache-default-value.js +28 -0
  290. data/payload/node_modules/@oclif/core/lib/util/determine-priority.d.ts +18 -0
  291. data/payload/node_modules/@oclif/core/lib/util/determine-priority.js +51 -0
  292. data/payload/node_modules/@oclif/core/lib/util/ensure-arg-object.d.ts +12 -0
  293. data/payload/node_modules/@oclif/core/lib/util/ensure-arg-object.js +13 -0
  294. data/payload/node_modules/@oclif/core/lib/util/find-root.d.ts +16 -0
  295. data/payload/node_modules/@oclif/core/lib/util/find-root.js +185 -0
  296. data/payload/node_modules/@oclif/core/lib/util/fs.d.ts +35 -0
  297. data/payload/node_modules/@oclif/core/lib/util/fs.js +93 -0
  298. data/payload/node_modules/@oclif/core/lib/util/ids.d.ts +3 -0
  299. data/payload/node_modules/@oclif/core/lib/util/ids.js +11 -0
  300. data/payload/node_modules/@oclif/core/lib/util/os.d.ts +19 -0
  301. data/payload/node_modules/@oclif/core/lib/util/os.js +58 -0
  302. data/payload/node_modules/@oclif/core/lib/util/read-pjson.d.ts +7 -0
  303. data/payload/node_modules/@oclif/core/lib/util/read-pjson.js +55 -0
  304. data/payload/node_modules/@oclif/core/lib/util/read-tsconfig.d.ts +2 -0
  305. data/payload/node_modules/@oclif/core/lib/util/read-tsconfig.js +77 -0
  306. data/payload/node_modules/@oclif/core/lib/util/util.d.ts +23 -0
  307. data/payload/node_modules/@oclif/core/lib/util/util.js +103 -0
  308. data/payload/node_modules/@oclif/core/lib/ux/action/base.d.ts +34 -0
  309. data/payload/node_modules/@oclif/core/lib/ux/action/base.js +183 -0
  310. data/payload/node_modules/@oclif/core/lib/ux/action/simple.d.ts +11 -0
  311. data/payload/node_modules/@oclif/core/lib/ux/action/simple.js +47 -0
  312. data/payload/node_modules/@oclif/core/lib/ux/action/spinner.d.ts +19 -0
  313. data/payload/node_modules/@oclif/core/lib/ux/action/spinner.js +88 -0
  314. data/payload/node_modules/@oclif/core/lib/ux/action/types.d.ts +5 -0
  315. data/payload/node_modules/@oclif/core/lib/ux/action/types.js +2 -0
  316. data/payload/node_modules/@oclif/core/lib/ux/colorize-json.d.ts +29 -0
  317. data/payload/node_modules/@oclif/core/lib/ux/colorize-json.js +100 -0
  318. data/payload/node_modules/@oclif/core/lib/ux/index.d.ts +70 -0
  319. data/payload/node_modules/@oclif/core/lib/ux/index.js +89 -0
  320. data/payload/node_modules/@oclif/core/lib/ux/list.d.ts +3 -0
  321. data/payload/node_modules/@oclif/core/lib/ux/list.js +28 -0
  322. data/payload/node_modules/@oclif/core/lib/ux/supports-color.d.ts +1 -0
  323. data/payload/node_modules/@oclif/core/lib/ux/supports-color.js +7 -0
  324. data/payload/node_modules/@oclif/core/lib/ux/theme.d.ts +9 -0
  325. data/payload/node_modules/@oclif/core/lib/ux/theme.js +45 -0
  326. data/payload/node_modules/@oclif/core/lib/ux/write.d.ts +2 -0
  327. data/payload/node_modules/@oclif/core/lib/ux/write.js +34 -0
  328. data/payload/node_modules/@oclif/core/node_modules/balanced-match/LICENSE.md +23 -0
  329. data/payload/node_modules/@oclif/core/node_modules/balanced-match/README.md +57 -0
  330. data/payload/node_modules/@oclif/core/node_modules/balanced-match/dist/commonjs/index.d.ts +9 -0
  331. data/payload/node_modules/@oclif/core/node_modules/balanced-match/dist/commonjs/index.d.ts.map +1 -0
  332. data/payload/node_modules/@oclif/core/node_modules/balanced-match/dist/commonjs/index.js +59 -0
  333. data/payload/node_modules/@oclif/core/node_modules/balanced-match/dist/commonjs/index.js.map +1 -0
  334. data/payload/node_modules/@oclif/core/node_modules/balanced-match/dist/commonjs/package.json +3 -0
  335. data/payload/node_modules/@oclif/core/node_modules/balanced-match/dist/esm/index.d.ts +9 -0
  336. data/payload/node_modules/@oclif/core/node_modules/balanced-match/dist/esm/index.d.ts.map +1 -0
  337. data/payload/node_modules/@oclif/core/node_modules/balanced-match/dist/esm/index.js +54 -0
  338. data/payload/node_modules/@oclif/core/node_modules/balanced-match/dist/esm/index.js.map +1 -0
  339. data/payload/node_modules/@oclif/core/node_modules/balanced-match/dist/esm/package.json +3 -0
  340. data/payload/node_modules/@oclif/core/node_modules/balanced-match/package.json +68 -0
  341. data/payload/node_modules/@oclif/core/node_modules/brace-expansion/LICENSE +23 -0
  342. data/payload/node_modules/@oclif/core/node_modules/brace-expansion/README.md +105 -0
  343. data/payload/node_modules/@oclif/core/node_modules/brace-expansion/dist/commonjs/index.d.ts +8 -0
  344. data/payload/node_modules/@oclif/core/node_modules/brace-expansion/dist/commonjs/index.d.ts.map +1 -0
  345. data/payload/node_modules/@oclif/core/node_modules/brace-expansion/dist/commonjs/index.js +289 -0
  346. data/payload/node_modules/@oclif/core/node_modules/brace-expansion/dist/commonjs/index.js.map +1 -0
  347. data/payload/node_modules/@oclif/core/node_modules/brace-expansion/dist/commonjs/package.json +3 -0
  348. data/payload/node_modules/@oclif/core/node_modules/brace-expansion/dist/esm/index.d.ts +8 -0
  349. data/payload/node_modules/@oclif/core/node_modules/brace-expansion/dist/esm/index.d.ts.map +1 -0
  350. data/payload/node_modules/@oclif/core/node_modules/brace-expansion/dist/esm/index.js +285 -0
  351. data/payload/node_modules/@oclif/core/node_modules/brace-expansion/dist/esm/index.js.map +1 -0
  352. data/payload/node_modules/@oclif/core/node_modules/brace-expansion/dist/esm/package.json +3 -0
  353. data/payload/node_modules/@oclif/core/node_modules/brace-expansion/package.json +64 -0
  354. data/payload/node_modules/@oclif/core/node_modules/ejs/LICENSE +202 -0
  355. data/payload/node_modules/@oclif/core/node_modules/ejs/README.md +389 -0
  356. data/payload/node_modules/@oclif/core/node_modules/ejs/bin/cli.js +218 -0
  357. data/payload/node_modules/@oclif/core/node_modules/ejs/ejs.js +1820 -0
  358. data/payload/node_modules/@oclif/core/node_modules/ejs/ejs.min.js +1 -0
  359. data/payload/node_modules/@oclif/core/node_modules/ejs/jakefile.js +206 -0
  360. data/payload/node_modules/@oclif/core/node_modules/ejs/lib/cjs/ejs.js +853 -0
  361. data/payload/node_modules/@oclif/core/node_modules/ejs/lib/cjs/package.json +1 -0
  362. data/payload/node_modules/@oclif/core/node_modules/ejs/lib/cjs/parseargs.js +122 -0
  363. data/payload/node_modules/@oclif/core/node_modules/ejs/lib/cjs/utils.js +242 -0
  364. data/payload/node_modules/@oclif/core/node_modules/ejs/lib/esm/ejs.js +936 -0
  365. data/payload/node_modules/@oclif/core/node_modules/ejs/lib/esm/package.json +3 -0
  366. data/payload/node_modules/@oclif/core/node_modules/ejs/lib/esm/parseargs.js +136 -0
  367. data/payload/node_modules/@oclif/core/node_modules/ejs/lib/esm/utils.js +259 -0
  368. data/payload/node_modules/@oclif/core/node_modules/ejs/package.json +49 -0
  369. data/payload/node_modules/@oclif/core/node_modules/ejs/usage.txt +24 -0
  370. data/payload/node_modules/@oclif/core/node_modules/minimatch/LICENSE.md +55 -0
  371. data/payload/node_modules/@oclif/core/node_modules/minimatch/README.md +528 -0
  372. data/payload/node_modules/@oclif/core/node_modules/minimatch/dist/commonjs/assert-valid-pattern.d.ts +2 -0
  373. data/payload/node_modules/@oclif/core/node_modules/minimatch/dist/commonjs/assert-valid-pattern.d.ts.map +1 -0
  374. data/payload/node_modules/@oclif/core/node_modules/minimatch/dist/commonjs/assert-valid-pattern.js +14 -0
  375. data/payload/node_modules/@oclif/core/node_modules/minimatch/dist/commonjs/assert-valid-pattern.js.map +1 -0
  376. data/payload/node_modules/@oclif/core/node_modules/minimatch/dist/commonjs/ast.d.ts +22 -0
  377. data/payload/node_modules/@oclif/core/node_modules/minimatch/dist/commonjs/ast.d.ts.map +1 -0
  378. data/payload/node_modules/@oclif/core/node_modules/minimatch/dist/commonjs/ast.js +845 -0
  379. data/payload/node_modules/@oclif/core/node_modules/minimatch/dist/commonjs/ast.js.map +1 -0
  380. data/payload/node_modules/@oclif/core/node_modules/minimatch/dist/commonjs/brace-expressions.d.ts +8 -0
  381. data/payload/node_modules/@oclif/core/node_modules/minimatch/dist/commonjs/brace-expressions.d.ts.map +1 -0
  382. data/payload/node_modules/@oclif/core/node_modules/minimatch/dist/commonjs/brace-expressions.js +150 -0
  383. data/payload/node_modules/@oclif/core/node_modules/minimatch/dist/commonjs/brace-expressions.js.map +1 -0
  384. data/payload/node_modules/@oclif/core/node_modules/minimatch/dist/commonjs/escape.d.ts +15 -0
  385. data/payload/node_modules/@oclif/core/node_modules/minimatch/dist/commonjs/escape.d.ts.map +1 -0
  386. data/payload/node_modules/@oclif/core/node_modules/minimatch/dist/commonjs/escape.js +30 -0
  387. data/payload/node_modules/@oclif/core/node_modules/minimatch/dist/commonjs/escape.js.map +1 -0
  388. data/payload/node_modules/@oclif/core/node_modules/minimatch/dist/commonjs/index.d.ts +174 -0
  389. data/payload/node_modules/@oclif/core/node_modules/minimatch/dist/commonjs/index.d.ts.map +1 -0
  390. data/payload/node_modules/@oclif/core/node_modules/minimatch/dist/commonjs/index.js +1127 -0
  391. data/payload/node_modules/@oclif/core/node_modules/minimatch/dist/commonjs/index.js.map +1 -0
  392. data/payload/node_modules/@oclif/core/node_modules/minimatch/dist/commonjs/package.json +3 -0
  393. data/payload/node_modules/@oclif/core/node_modules/minimatch/dist/commonjs/unescape.d.ts +22 -0
  394. data/payload/node_modules/@oclif/core/node_modules/minimatch/dist/commonjs/unescape.d.ts.map +1 -0
  395. data/payload/node_modules/@oclif/core/node_modules/minimatch/dist/commonjs/unescape.js +38 -0
  396. data/payload/node_modules/@oclif/core/node_modules/minimatch/dist/commonjs/unescape.js.map +1 -0
  397. data/payload/node_modules/@oclif/core/node_modules/minimatch/dist/esm/assert-valid-pattern.d.ts +2 -0
  398. data/payload/node_modules/@oclif/core/node_modules/minimatch/dist/esm/assert-valid-pattern.d.ts.map +1 -0
  399. data/payload/node_modules/@oclif/core/node_modules/minimatch/dist/esm/assert-valid-pattern.js +10 -0
  400. data/payload/node_modules/@oclif/core/node_modules/minimatch/dist/esm/assert-valid-pattern.js.map +1 -0
  401. data/payload/node_modules/@oclif/core/node_modules/minimatch/dist/esm/ast.d.ts +22 -0
  402. data/payload/node_modules/@oclif/core/node_modules/minimatch/dist/esm/ast.d.ts.map +1 -0
  403. data/payload/node_modules/@oclif/core/node_modules/minimatch/dist/esm/ast.js +841 -0
  404. data/payload/node_modules/@oclif/core/node_modules/minimatch/dist/esm/ast.js.map +1 -0
  405. data/payload/node_modules/@oclif/core/node_modules/minimatch/dist/esm/brace-expressions.d.ts +8 -0
  406. data/payload/node_modules/@oclif/core/node_modules/minimatch/dist/esm/brace-expressions.d.ts.map +1 -0
  407. data/payload/node_modules/@oclif/core/node_modules/minimatch/dist/esm/brace-expressions.js +146 -0
  408. data/payload/node_modules/@oclif/core/node_modules/minimatch/dist/esm/brace-expressions.js.map +1 -0
  409. data/payload/node_modules/@oclif/core/node_modules/minimatch/dist/esm/escape.d.ts +15 -0
  410. data/payload/node_modules/@oclif/core/node_modules/minimatch/dist/esm/escape.d.ts.map +1 -0
  411. data/payload/node_modules/@oclif/core/node_modules/minimatch/dist/esm/escape.js +26 -0
  412. data/payload/node_modules/@oclif/core/node_modules/minimatch/dist/esm/escape.js.map +1 -0
  413. data/payload/node_modules/@oclif/core/node_modules/minimatch/dist/esm/index.d.ts +174 -0
  414. data/payload/node_modules/@oclif/core/node_modules/minimatch/dist/esm/index.d.ts.map +1 -0
  415. data/payload/node_modules/@oclif/core/node_modules/minimatch/dist/esm/index.js +1114 -0
  416. data/payload/node_modules/@oclif/core/node_modules/minimatch/dist/esm/index.js.map +1 -0
  417. data/payload/node_modules/@oclif/core/node_modules/minimatch/dist/esm/package.json +3 -0
  418. data/payload/node_modules/@oclif/core/node_modules/minimatch/dist/esm/unescape.d.ts +22 -0
  419. data/payload/node_modules/@oclif/core/node_modules/minimatch/dist/esm/unescape.d.ts.map +1 -0
  420. data/payload/node_modules/@oclif/core/node_modules/minimatch/dist/esm/unescape.js +34 -0
  421. data/payload/node_modules/@oclif/core/node_modules/minimatch/dist/esm/unescape.js.map +1 -0
  422. data/payload/node_modules/@oclif/core/node_modules/minimatch/package.json +73 -0
  423. data/payload/node_modules/@oclif/core/node_modules/wrap-ansi/index.js +216 -0
  424. data/payload/node_modules/@oclif/core/node_modules/wrap-ansi/license +9 -0
  425. data/payload/node_modules/@oclif/core/node_modules/wrap-ansi/package.json +62 -0
  426. data/payload/node_modules/@oclif/core/node_modules/wrap-ansi/readme.md +91 -0
  427. data/payload/node_modules/@oclif/core/package.json +135 -0
  428. data/payload/node_modules/@oclif/plugin-help/LICENSE +21 -0
  429. data/payload/node_modules/@oclif/plugin-help/README.md +35 -0
  430. data/payload/node_modules/@oclif/plugin-help/lib/commands/help.d.ts +12 -0
  431. data/payload/node_modules/@oclif/plugin-help/lib/commands/help.js +20 -0
  432. data/payload/node_modules/@oclif/plugin-help/lib/index.d.ts +4 -0
  433. data/payload/node_modules/@oclif/plugin-help/lib/index.js +4 -0
  434. data/payload/node_modules/@oclif/plugin-help/oclif.manifest.json +43 -0
  435. data/payload/node_modules/@oclif/plugin-help/package.json +68 -0
  436. data/payload/node_modules/ansi-escapes/index.d.ts +248 -0
  437. data/payload/node_modules/ansi-escapes/index.js +157 -0
  438. data/payload/node_modules/ansi-escapes/license +9 -0
  439. data/payload/node_modules/ansi-escapes/package.json +57 -0
  440. data/payload/node_modules/ansi-escapes/readme.md +245 -0
  441. data/payload/node_modules/ansi-regex/index.d.ts +37 -0
  442. data/payload/node_modules/ansi-regex/index.js +10 -0
  443. data/payload/node_modules/ansi-regex/license +9 -0
  444. data/payload/node_modules/ansi-regex/package.json +55 -0
  445. data/payload/node_modules/ansi-regex/readme.md +78 -0
  446. data/payload/node_modules/ansi-styles/index.d.ts +345 -0
  447. data/payload/node_modules/ansi-styles/index.js +163 -0
  448. data/payload/node_modules/ansi-styles/license +9 -0
  449. data/payload/node_modules/ansi-styles/package.json +56 -0
  450. data/payload/node_modules/ansi-styles/readme.md +152 -0
  451. data/payload/node_modules/ansis/LICENSE +15 -0
  452. data/payload/node_modules/ansis/README.md +3 -0
  453. data/payload/node_modules/ansis/index.d.ts +1 -0
  454. data/payload/node_modules/ansis/index.js +1 -0
  455. data/payload/node_modules/ansis/index.mjs +1 -0
  456. data/payload/node_modules/ansis/package.json +20 -0
  457. data/payload/node_modules/clean-stack/index.d.ts +56 -0
  458. data/payload/node_modules/clean-stack/index.js +45 -0
  459. data/payload/node_modules/clean-stack/license +9 -0
  460. data/payload/node_modules/clean-stack/package.json +42 -0
  461. data/payload/node_modules/clean-stack/readme.md +77 -0
  462. data/payload/node_modules/cli-spinners/index.d.ts +128 -0
  463. data/payload/node_modules/cli-spinners/index.js +15 -0
  464. data/payload/node_modules/cli-spinners/license +9 -0
  465. data/payload/node_modules/cli-spinners/package.json +50 -0
  466. data/payload/node_modules/cli-spinners/readme.md +54 -0
  467. data/payload/node_modules/cli-spinners/spinners.json +1622 -0
  468. data/payload/node_modules/cli-width/LICENSE +13 -0
  469. data/payload/node_modules/cli-width/README.md +71 -0
  470. data/payload/node_modules/cli-width/index.d.ts +13 -0
  471. data/payload/node_modules/cli-width/index.js +49 -0
  472. data/payload/node_modules/cli-width/package.json +40 -0
  473. data/payload/node_modules/color-convert/CHANGELOG.md +54 -0
  474. data/payload/node_modules/color-convert/LICENSE +21 -0
  475. data/payload/node_modules/color-convert/README.md +68 -0
  476. data/payload/node_modules/color-convert/conversions.js +839 -0
  477. data/payload/node_modules/color-convert/index.js +81 -0
  478. data/payload/node_modules/color-convert/package.json +48 -0
  479. data/payload/node_modules/color-convert/route.js +97 -0
  480. data/payload/node_modules/color-name/LICENSE +8 -0
  481. data/payload/node_modules/color-name/README.md +11 -0
  482. data/payload/node_modules/color-name/index.js +152 -0
  483. data/payload/node_modules/color-name/package.json +28 -0
  484. data/payload/node_modules/debug/LICENSE +20 -0
  485. data/payload/node_modules/debug/README.md +481 -0
  486. data/payload/node_modules/debug/package.json +64 -0
  487. data/payload/node_modules/debug/src/browser.js +272 -0
  488. data/payload/node_modules/debug/src/common.js +292 -0
  489. data/payload/node_modules/debug/src/index.js +10 -0
  490. data/payload/node_modules/debug/src/node.js +263 -0
  491. data/payload/node_modules/emoji-regex/LICENSE-MIT.txt +20 -0
  492. data/payload/node_modules/emoji-regex/README.md +73 -0
  493. data/payload/node_modules/emoji-regex/es2015/index.js +6 -0
  494. data/payload/node_modules/emoji-regex/es2015/text.js +6 -0
  495. data/payload/node_modules/emoji-regex/index.d.ts +23 -0
  496. data/payload/node_modules/emoji-regex/index.js +6 -0
  497. data/payload/node_modules/emoji-regex/package.json +50 -0
  498. data/payload/node_modules/emoji-regex/text.js +6 -0
  499. data/payload/node_modules/escape-string-regexp/index.d.ts +18 -0
  500. data/payload/node_modules/escape-string-regexp/index.js +13 -0
  501. data/payload/node_modules/escape-string-regexp/license +9 -0
  502. data/payload/node_modules/escape-string-regexp/package.json +38 -0
  503. data/payload/node_modules/escape-string-regexp/readme.md +34 -0
  504. data/payload/node_modules/fdir/LICENSE +7 -0
  505. data/payload/node_modules/fdir/README.md +91 -0
  506. data/payload/node_modules/fdir/dist/index.cjs +588 -0
  507. data/payload/node_modules/fdir/dist/index.d.cts +155 -0
  508. data/payload/node_modules/fdir/dist/index.d.mts +155 -0
  509. data/payload/node_modules/fdir/dist/index.mjs +570 -0
  510. data/payload/node_modules/fdir/package.json +103 -0
  511. data/payload/node_modules/get-package-type/CHANGELOG.md +10 -0
  512. data/payload/node_modules/get-package-type/LICENSE +21 -0
  513. data/payload/node_modules/get-package-type/README.md +32 -0
  514. data/payload/node_modules/get-package-type/async.cjs +52 -0
  515. data/payload/node_modules/get-package-type/cache.cjs +3 -0
  516. data/payload/node_modules/get-package-type/index.cjs +7 -0
  517. data/payload/node_modules/get-package-type/is-node-modules.cjs +15 -0
  518. data/payload/node_modules/get-package-type/package.json +35 -0
  519. data/payload/node_modules/get-package-type/sync.cjs +42 -0
  520. data/payload/node_modules/has-flag/index.d.ts +39 -0
  521. data/payload/node_modules/has-flag/index.js +8 -0
  522. data/payload/node_modules/has-flag/license +9 -0
  523. data/payload/node_modules/has-flag/package.json +46 -0
  524. data/payload/node_modules/has-flag/readme.md +89 -0
  525. data/payload/node_modules/indent-string/index.d.ts +42 -0
  526. data/payload/node_modules/indent-string/index.js +35 -0
  527. data/payload/node_modules/indent-string/license +9 -0
  528. data/payload/node_modules/indent-string/package.json +37 -0
  529. data/payload/node_modules/indent-string/readme.md +70 -0
  530. data/payload/node_modules/is-docker/cli.js +5 -0
  531. data/payload/node_modules/is-docker/index.d.ts +13 -0
  532. data/payload/node_modules/is-docker/index.js +29 -0
  533. data/payload/node_modules/is-docker/license +9 -0
  534. data/payload/node_modules/is-docker/package.json +44 -0
  535. data/payload/node_modules/is-docker/readme.md +27 -0
  536. data/payload/node_modules/is-fullwidth-code-point/index.d.ts +17 -0
  537. data/payload/node_modules/is-fullwidth-code-point/index.js +50 -0
  538. data/payload/node_modules/is-fullwidth-code-point/license +9 -0
  539. data/payload/node_modules/is-fullwidth-code-point/package.json +42 -0
  540. data/payload/node_modules/is-fullwidth-code-point/readme.md +39 -0
  541. data/payload/node_modules/is-inside-container/cli.js +5 -0
  542. data/payload/node_modules/is-inside-container/index.d.ts +13 -0
  543. data/payload/node_modules/is-inside-container/index.js +23 -0
  544. data/payload/node_modules/is-inside-container/license +9 -0
  545. data/payload/node_modules/is-inside-container/package.json +51 -0
  546. data/payload/node_modules/is-inside-container/readme.md +36 -0
  547. data/payload/node_modules/is-wsl/index.d.ts +15 -0
  548. data/payload/node_modules/is-wsl/index.js +36 -0
  549. data/payload/node_modules/is-wsl/license +9 -0
  550. data/payload/node_modules/is-wsl/package.json +58 -0
  551. data/payload/node_modules/is-wsl/readme.md +21 -0
  552. data/payload/node_modules/lilconfig/LICENSE +21 -0
  553. data/payload/node_modules/lilconfig/package.json +42 -0
  554. data/payload/node_modules/lilconfig/readme.md +98 -0
  555. data/payload/node_modules/lilconfig/src/index.d.ts +54 -0
  556. data/payload/node_modules/lilconfig/src/index.js +460 -0
  557. data/payload/node_modules/ms/index.js +162 -0
  558. data/payload/node_modules/ms/license.md +21 -0
  559. data/payload/node_modules/ms/package.json +38 -0
  560. data/payload/node_modules/ms/readme.md +59 -0
  561. data/payload/node_modules/picomatch/LICENSE +21 -0
  562. data/payload/node_modules/picomatch/README.md +743 -0
  563. data/payload/node_modules/picomatch/index.js +17 -0
  564. data/payload/node_modules/picomatch/lib/constants.js +184 -0
  565. data/payload/node_modules/picomatch/lib/parse.js +1425 -0
  566. data/payload/node_modules/picomatch/lib/picomatch.js +361 -0
  567. data/payload/node_modules/picomatch/lib/scan.js +403 -0
  568. data/payload/node_modules/picomatch/lib/utils.js +72 -0
  569. data/payload/node_modules/picomatch/package.json +83 -0
  570. data/payload/node_modules/picomatch/posix.js +3 -0
  571. data/payload/node_modules/powershell-utils/index.d.ts +122 -0
  572. data/payload/node_modules/powershell-utils/index.js +58 -0
  573. data/payload/node_modules/powershell-utils/license +9 -0
  574. data/payload/node_modules/powershell-utils/package.json +47 -0
  575. data/payload/node_modules/powershell-utils/readme.md +153 -0
  576. data/payload/node_modules/semver/LICENSE +15 -0
  577. data/payload/node_modules/semver/README.md +680 -0
  578. data/payload/node_modules/semver/bin/semver.js +195 -0
  579. data/payload/node_modules/semver/classes/comparator.js +143 -0
  580. data/payload/node_modules/semver/classes/index.js +7 -0
  581. data/payload/node_modules/semver/classes/range.js +577 -0
  582. data/payload/node_modules/semver/classes/semver.js +350 -0
  583. data/payload/node_modules/semver/functions/clean.js +8 -0
  584. data/payload/node_modules/semver/functions/cmp.js +54 -0
  585. data/payload/node_modules/semver/functions/coerce.js +62 -0
  586. data/payload/node_modules/semver/functions/compare-build.js +9 -0
  587. data/payload/node_modules/semver/functions/compare-loose.js +5 -0
  588. data/payload/node_modules/semver/functions/compare.js +7 -0
  589. data/payload/node_modules/semver/functions/diff.js +60 -0
  590. data/payload/node_modules/semver/functions/eq.js +5 -0
  591. data/payload/node_modules/semver/functions/gt.js +5 -0
  592. data/payload/node_modules/semver/functions/gte.js +5 -0
  593. data/payload/node_modules/semver/functions/inc.js +21 -0
  594. data/payload/node_modules/semver/functions/lt.js +5 -0
  595. data/payload/node_modules/semver/functions/lte.js +5 -0
  596. data/payload/node_modules/semver/functions/major.js +5 -0
  597. data/payload/node_modules/semver/functions/minor.js +5 -0
  598. data/payload/node_modules/semver/functions/neq.js +5 -0
  599. data/payload/node_modules/semver/functions/parse.js +18 -0
  600. data/payload/node_modules/semver/functions/patch.js +5 -0
  601. data/payload/node_modules/semver/functions/prerelease.js +8 -0
  602. data/payload/node_modules/semver/functions/rcompare.js +5 -0
  603. data/payload/node_modules/semver/functions/rsort.js +5 -0
  604. data/payload/node_modules/semver/functions/satisfies.js +12 -0
  605. data/payload/node_modules/semver/functions/sort.js +5 -0
  606. data/payload/node_modules/semver/functions/truncate.js +48 -0
  607. data/payload/node_modules/semver/functions/valid.js +8 -0
  608. data/payload/node_modules/semver/index.js +93 -0
  609. data/payload/node_modules/semver/internal/constants.js +37 -0
  610. data/payload/node_modules/semver/internal/debug.js +11 -0
  611. data/payload/node_modules/semver/internal/identifiers.js +29 -0
  612. data/payload/node_modules/semver/internal/lrucache.js +42 -0
  613. data/payload/node_modules/semver/internal/parse-options.js +17 -0
  614. data/payload/node_modules/semver/internal/re.js +223 -0
  615. data/payload/node_modules/semver/package.json +78 -0
  616. data/payload/node_modules/semver/preload.js +4 -0
  617. data/payload/node_modules/semver/range.bnf +17 -0
  618. data/payload/node_modules/semver/ranges/gtr.js +6 -0
  619. data/payload/node_modules/semver/ranges/intersects.js +9 -0
  620. data/payload/node_modules/semver/ranges/ltr.js +6 -0
  621. data/payload/node_modules/semver/ranges/max-satisfying.js +27 -0
  622. data/payload/node_modules/semver/ranges/min-satisfying.js +26 -0
  623. data/payload/node_modules/semver/ranges/min-version.js +63 -0
  624. data/payload/node_modules/semver/ranges/outside.js +82 -0
  625. data/payload/node_modules/semver/ranges/simplify.js +49 -0
  626. data/payload/node_modules/semver/ranges/subset.js +249 -0
  627. data/payload/node_modules/semver/ranges/to-comparators.js +10 -0
  628. data/payload/node_modules/semver/ranges/valid.js +13 -0
  629. data/payload/node_modules/signal-exit/LICENSE.txt +16 -0
  630. data/payload/node_modules/signal-exit/README.md +74 -0
  631. data/payload/node_modules/signal-exit/dist/cjs/browser.d.ts +12 -0
  632. data/payload/node_modules/signal-exit/dist/cjs/browser.d.ts.map +1 -0
  633. data/payload/node_modules/signal-exit/dist/cjs/browser.js +10 -0
  634. data/payload/node_modules/signal-exit/dist/cjs/browser.js.map +1 -0
  635. data/payload/node_modules/signal-exit/dist/cjs/index.d.ts +48 -0
  636. data/payload/node_modules/signal-exit/dist/cjs/index.d.ts.map +1 -0
  637. data/payload/node_modules/signal-exit/dist/cjs/index.js +279 -0
  638. data/payload/node_modules/signal-exit/dist/cjs/index.js.map +1 -0
  639. data/payload/node_modules/signal-exit/dist/cjs/package.json +3 -0
  640. data/payload/node_modules/signal-exit/dist/cjs/signals.d.ts +29 -0
  641. data/payload/node_modules/signal-exit/dist/cjs/signals.d.ts.map +1 -0
  642. data/payload/node_modules/signal-exit/dist/cjs/signals.js +42 -0
  643. data/payload/node_modules/signal-exit/dist/cjs/signals.js.map +1 -0
  644. data/payload/node_modules/signal-exit/dist/mjs/browser.d.ts +12 -0
  645. data/payload/node_modules/signal-exit/dist/mjs/browser.d.ts.map +1 -0
  646. data/payload/node_modules/signal-exit/dist/mjs/browser.js +4 -0
  647. data/payload/node_modules/signal-exit/dist/mjs/browser.js.map +1 -0
  648. data/payload/node_modules/signal-exit/dist/mjs/index.d.ts +48 -0
  649. data/payload/node_modules/signal-exit/dist/mjs/index.d.ts.map +1 -0
  650. data/payload/node_modules/signal-exit/dist/mjs/index.js +275 -0
  651. data/payload/node_modules/signal-exit/dist/mjs/index.js.map +1 -0
  652. data/payload/node_modules/signal-exit/dist/mjs/package.json +3 -0
  653. data/payload/node_modules/signal-exit/dist/mjs/signals.d.ts +29 -0
  654. data/payload/node_modules/signal-exit/dist/mjs/signals.d.ts.map +1 -0
  655. data/payload/node_modules/signal-exit/dist/mjs/signals.js +39 -0
  656. data/payload/node_modules/signal-exit/dist/mjs/signals.js.map +1 -0
  657. data/payload/node_modules/signal-exit/package.json +106 -0
  658. data/payload/node_modules/string-width/index.d.ts +29 -0
  659. data/payload/node_modules/string-width/index.js +47 -0
  660. data/payload/node_modules/string-width/license +9 -0
  661. data/payload/node_modules/string-width/package.json +56 -0
  662. data/payload/node_modules/string-width/readme.md +50 -0
  663. data/payload/node_modules/strip-ansi/index.d.ts +17 -0
  664. data/payload/node_modules/strip-ansi/index.js +4 -0
  665. data/payload/node_modules/strip-ansi/license +9 -0
  666. data/payload/node_modules/strip-ansi/package.json +54 -0
  667. data/payload/node_modules/strip-ansi/readme.md +46 -0
  668. data/payload/node_modules/supports-color/browser.js +24 -0
  669. data/payload/node_modules/supports-color/index.js +152 -0
  670. data/payload/node_modules/supports-color/license +9 -0
  671. data/payload/node_modules/supports-color/package.json +58 -0
  672. data/payload/node_modules/supports-color/readme.md +77 -0
  673. data/payload/node_modules/tinyglobby/LICENSE +21 -0
  674. data/payload/node_modules/tinyglobby/README.md +25 -0
  675. data/payload/node_modules/tinyglobby/dist/index.cjs +335 -0
  676. data/payload/node_modules/tinyglobby/dist/index.d.cts +148 -0
  677. data/payload/node_modules/tinyglobby/dist/index.d.mts +148 -0
  678. data/payload/node_modules/tinyglobby/dist/index.mjs +307 -0
  679. data/payload/node_modules/tinyglobby/package.json +70 -0
  680. data/payload/node_modules/type-fest/base.d.ts +39 -0
  681. data/payload/node_modules/type-fest/index.d.ts +2 -0
  682. data/payload/node_modules/type-fest/license +9 -0
  683. data/payload/node_modules/type-fest/package.json +58 -0
  684. data/payload/node_modules/type-fest/readme.md +760 -0
  685. data/payload/node_modules/type-fest/source/async-return-type.d.ts +23 -0
  686. data/payload/node_modules/type-fest/source/asyncify.d.ts +31 -0
  687. data/payload/node_modules/type-fest/source/basic.d.ts +51 -0
  688. data/payload/node_modules/type-fest/source/conditional-except.d.ts +43 -0
  689. data/payload/node_modules/type-fest/source/conditional-keys.d.ts +43 -0
  690. data/payload/node_modules/type-fest/source/conditional-pick.d.ts +42 -0
  691. data/payload/node_modules/type-fest/source/entries.d.ts +57 -0
  692. data/payload/node_modules/type-fest/source/entry.d.ts +60 -0
  693. data/payload/node_modules/type-fest/source/except.d.ts +22 -0
  694. data/payload/node_modules/type-fest/source/fixed-length-array.d.ts +38 -0
  695. data/payload/node_modules/type-fest/source/iterable-element.d.ts +46 -0
  696. data/payload/node_modules/type-fest/source/literal-union.d.ts +33 -0
  697. data/payload/node_modules/type-fest/source/merge-exclusive.d.ts +39 -0
  698. data/payload/node_modules/type-fest/source/merge.d.ts +25 -0
  699. data/payload/node_modules/type-fest/source/mutable.d.ts +38 -0
  700. data/payload/node_modules/type-fest/source/opaque.d.ts +65 -0
  701. data/payload/node_modules/type-fest/source/package-json.d.ts +611 -0
  702. data/payload/node_modules/type-fest/source/partial-deep.d.ts +72 -0
  703. data/payload/node_modules/type-fest/source/promisable.d.ts +23 -0
  704. data/payload/node_modules/type-fest/source/promise-value.d.ts +27 -0
  705. data/payload/node_modules/type-fest/source/readonly-deep.d.ts +59 -0
  706. data/payload/node_modules/type-fest/source/require-at-least-one.d.ts +33 -0
  707. data/payload/node_modules/type-fest/source/require-exactly-one.d.ts +35 -0
  708. data/payload/node_modules/type-fest/source/set-optional.d.ts +33 -0
  709. data/payload/node_modules/type-fest/source/set-required.d.ts +33 -0
  710. data/payload/node_modules/type-fest/source/set-return-type.d.ts +29 -0
  711. data/payload/node_modules/type-fest/source/simplify.d.ts +4 -0
  712. data/payload/node_modules/type-fest/source/stringified.d.ts +21 -0
  713. data/payload/node_modules/type-fest/source/tsconfig-json.d.ts +870 -0
  714. data/payload/node_modules/type-fest/source/typed-array.d.ts +15 -0
  715. data/payload/node_modules/type-fest/source/union-to-intersection.d.ts +58 -0
  716. data/payload/node_modules/type-fest/source/utilities.d.ts +5 -0
  717. data/payload/node_modules/type-fest/source/value-of.d.ts +40 -0
  718. data/payload/node_modules/type-fest/ts41/camel-case.d.ts +64 -0
  719. data/payload/node_modules/type-fest/ts41/delimiter-case.d.ts +85 -0
  720. data/payload/node_modules/type-fest/ts41/get.d.ts +131 -0
  721. data/payload/node_modules/type-fest/ts41/index.d.ts +10 -0
  722. data/payload/node_modules/type-fest/ts41/kebab-case.d.ts +36 -0
  723. data/payload/node_modules/type-fest/ts41/pascal-case.d.ts +36 -0
  724. data/payload/node_modules/type-fest/ts41/snake-case.d.ts +35 -0
  725. data/payload/node_modules/type-fest/ts41/utilities.d.ts +8 -0
  726. data/payload/node_modules/undici-types/LICENSE +21 -0
  727. data/payload/node_modules/undici-types/README.md +6 -0
  728. data/payload/node_modules/undici-types/agent.d.ts +31 -0
  729. data/payload/node_modules/undici-types/api.d.ts +43 -0
  730. data/payload/node_modules/undici-types/balanced-pool.d.ts +29 -0
  731. data/payload/node_modules/undici-types/cache.d.ts +36 -0
  732. data/payload/node_modules/undici-types/client.d.ts +108 -0
  733. data/payload/node_modules/undici-types/connector.d.ts +34 -0
  734. data/payload/node_modules/undici-types/content-type.d.ts +21 -0
  735. data/payload/node_modules/undici-types/cookies.d.ts +28 -0
  736. data/payload/node_modules/undici-types/diagnostics-channel.d.ts +66 -0
  737. data/payload/node_modules/undici-types/dispatcher.d.ts +256 -0
  738. data/payload/node_modules/undici-types/env-http-proxy-agent.d.ts +21 -0
  739. data/payload/node_modules/undici-types/errors.d.ts +149 -0
  740. data/payload/node_modules/undici-types/eventsource.d.ts +61 -0
  741. data/payload/node_modules/undici-types/fetch.d.ts +209 -0
  742. data/payload/node_modules/undici-types/file.d.ts +39 -0
  743. data/payload/node_modules/undici-types/filereader.d.ts +54 -0
  744. data/payload/node_modules/undici-types/formdata.d.ts +108 -0
  745. data/payload/node_modules/undici-types/global-dispatcher.d.ts +9 -0
  746. data/payload/node_modules/undici-types/global-origin.d.ts +7 -0
  747. data/payload/node_modules/undici-types/handlers.d.ts +15 -0
  748. data/payload/node_modules/undici-types/header.d.ts +4 -0
  749. data/payload/node_modules/undici-types/index.d.ts +71 -0
  750. data/payload/node_modules/undici-types/interceptors.d.ts +17 -0
  751. data/payload/node_modules/undici-types/mock-agent.d.ts +50 -0
  752. data/payload/node_modules/undici-types/mock-client.d.ts +25 -0
  753. data/payload/node_modules/undici-types/mock-errors.d.ts +12 -0
  754. data/payload/node_modules/undici-types/mock-interceptor.d.ts +93 -0
  755. data/payload/node_modules/undici-types/mock-pool.d.ts +25 -0
  756. data/payload/node_modules/undici-types/package.json +55 -0
  757. data/payload/node_modules/undici-types/patch.d.ts +33 -0
  758. data/payload/node_modules/undici-types/pool-stats.d.ts +19 -0
  759. data/payload/node_modules/undici-types/pool.d.ts +39 -0
  760. data/payload/node_modules/undici-types/proxy-agent.d.ts +28 -0
  761. data/payload/node_modules/undici-types/readable.d.ts +65 -0
  762. data/payload/node_modules/undici-types/retry-agent.d.ts +8 -0
  763. data/payload/node_modules/undici-types/retry-handler.d.ts +116 -0
  764. data/payload/node_modules/undici-types/util.d.ts +18 -0
  765. data/payload/node_modules/undici-types/webidl.d.ts +228 -0
  766. data/payload/node_modules/undici-types/websocket.d.ts +150 -0
  767. data/payload/node_modules/widest-line/index.d.ts +21 -0
  768. data/payload/node_modules/widest-line/index.js +16 -0
  769. data/payload/node_modules/widest-line/license +9 -0
  770. data/payload/node_modules/widest-line/package.json +54 -0
  771. data/payload/node_modules/widest-line/readme.md +34 -0
  772. data/payload/node_modules/wordwrap/LICENSE +18 -0
  773. data/payload/node_modules/wordwrap/README.markdown +70 -0
  774. data/payload/node_modules/wordwrap/example/center.js +10 -0
  775. data/payload/node_modules/wordwrap/example/meat.js +3 -0
  776. data/payload/node_modules/wordwrap/index.js +76 -0
  777. data/payload/node_modules/wordwrap/package.json +34 -0
  778. data/payload/node_modules/wordwrap/test/break.js +32 -0
  779. data/payload/node_modules/wordwrap/test/idleness.txt +63 -0
  780. data/payload/node_modules/wordwrap/test/wrap.js +33 -0
  781. data/payload/node_modules/wrap-ansi/index.js +186 -0
  782. data/payload/node_modules/wrap-ansi/license +9 -0
  783. data/payload/node_modules/wrap-ansi/package.json +61 -0
  784. data/payload/node_modules/wrap-ansi/readme.md +97 -0
  785. data/payload/node_modules/wsl-utils/index.d.ts +180 -0
  786. data/payload/node_modules/wsl-utils/index.js +140 -0
  787. data/payload/node_modules/wsl-utils/license +9 -0
  788. data/payload/node_modules/wsl-utils/package.json +48 -0
  789. data/payload/node_modules/wsl-utils/readme.md +223 -0
  790. data/payload/node_modules/wsl-utils/utilities.js +19 -0
  791. data/payload/node_modules/yoctocolors-cjs/index.d.ts +94 -0
  792. data/payload/node_modules/yoctocolors-cjs/index.js +98 -0
  793. data/payload/node_modules/yoctocolors-cjs/license +9 -0
  794. data/payload/node_modules/yoctocolors-cjs/package.json +67 -0
  795. data/payload/node_modules/yoctocolors-cjs/readme.md +130 -0
  796. data/payload/oclif.manifest.json +793 -0
  797. data/payload/package.json +80 -0
  798. metadata +809 -35
  799. data/Gemfile +0 -19
  800. data/Gemfile.lock +0 -78
  801. data/LICENSE.md +0 -7
  802. data/bin/avo +0 -9
  803. data/bin/rspec +0 -4
  804. data/lib/avo_cli/cli.rb +0 -60
  805. data/lib/avo_cli/rules/base.rb +0 -31
  806. data/lib/avo_cli/rules/fields_as_class_methods.rb +0 -14
  807. data/lib/avo_cli/scanner.rb +0 -42
  808. data/lib/avo_cli/scanners/base.rb +0 -13
  809. data/lib/avo_cli/scanners/resource_scanner.rb +0 -27
  810. data/lib/avo_cli/version.rb +0 -3
  811. data/lib/avo_cli.rb +0 -23
  812. data/lib/support.rb +0 -52
  813. data/linter.png +0 -0
  814. data/readme.md +0 -40
@@ -0,0 +1,1820 @@
1
+ (function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.ejs = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
2
+ /*
3
+ * EJS Embedded JavaScript templates
4
+ * Copyright 2112 Matthew Eernisse (mde@fleegix.org)
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ *
18
+ */
19
+ 'use strict';
20
+ var __importDefault = (this && this.__importDefault) || function (mod) {
21
+ return (mod && mod.__esModule) ? mod : { "default": mod };
22
+ };
23
+ Object.defineProperty(exports, "__esModule", { value: true });
24
+ var fs_1 = __importDefault(require("fs"));
25
+ var path_1 = __importDefault(require("path"));
26
+ var utils_js_1 = __importDefault(require("./utils.js"));
27
+ /**
28
+ * @file Embedded JavaScript templating engine. {@link http://ejs.co}
29
+ * @author Matthew Eernisse <mde@fleegix.org>
30
+ * @project EJS
31
+ * @license {@link http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0}
32
+ */
33
+ /**
34
+ * EJS internal functions.
35
+ *
36
+ * Technically this "module" lies in the same file as {@link module:ejs}, for
37
+ * the sake of organization all the private functions re grouped into this
38
+ * module.
39
+ *
40
+ * @module ejs-internal
41
+ * @private
42
+ */
43
+ /**
44
+ * Embedded JavaScript templating engine.
45
+ *
46
+ * @module ejs
47
+ * @public
48
+ */
49
+ // Keyword used in code generation -- updated to 'var' in CJS build
50
+ var DECLARATION_KEYWORD = 'var';
51
+ var ejs = {};
52
+ /** @type {string} */
53
+ var _DEFAULT_OPEN_DELIMITER = '<';
54
+ var _DEFAULT_CLOSE_DELIMITER = '>';
55
+ var _DEFAULT_DELIMITER = '%';
56
+ var _DEFAULT_LOCALS_NAME = 'locals';
57
+ var _REGEX_STRING = '(<%%|%%>|<%=|<%-|<%_|<%#|<%|%>|-%>|_%>)';
58
+ var _OPTS_PASSABLE_WITH_DATA = ['delimiter', 'scope', 'context', 'debug', 'compileDebug',
59
+ '_with', 'rmWhitespace', 'strict', 'filename', 'async'];
60
+ // We don't allow 'cache' option to be passed in the data obj for
61
+ // the normal `render` call, but this is where Express 2 & 3 put it
62
+ // so we make an exception for `renderFile`
63
+ var _OPTS_PASSABLE_WITH_DATA_EXPRESS = _OPTS_PASSABLE_WITH_DATA.concat('cache');
64
+ var _BOM = /^\uFEFF/;
65
+ var _JS_IDENTIFIER = /^[a-zA-Z_$][0-9a-zA-Z_$]*$/;
66
+ /**
67
+ * EJS template function cache. This can be a LRU object from lru-cache NPM
68
+ * module. By default, it is {@link module:utils.cache}, a simple in-process
69
+ * cache that grows continuously.
70
+ *
71
+ * @type {Cache}
72
+ */
73
+ ejs.cache = utils_js_1.default.cache;
74
+ /**
75
+ * Custom file loader. Useful for template preprocessing or restricting access
76
+ * to a certain part of the filesystem.
77
+ *
78
+ * @type {fileLoader}
79
+ */
80
+ ejs.fileLoader = fs_1.default.readFileSync;
81
+ /**
82
+ * Name of the object containing the locals.
83
+ *
84
+ * This variable is overridden by {@link Options}`.localsName` if it is not
85
+ * `undefined`.
86
+ *
87
+ * @type {String}
88
+ * @public
89
+ */
90
+ ejs.localsName = _DEFAULT_LOCALS_NAME;
91
+ /**
92
+ * Promise implementation -- defaults to the native implementation if available
93
+ * This is mostly just for testability
94
+ *
95
+ * @type {PromiseConstructorLike}
96
+ * @public
97
+ */
98
+ ejs.promiseImpl = (new Function('return this;'))().Promise;
99
+ /**
100
+ * Get the path to the included file from the parent file path and the
101
+ * specified path.
102
+ *
103
+ * @param {String} name specified path
104
+ * @param {String} filename parent file path
105
+ * @param {Boolean} [isDir=false] whether the parent file path is a directory
106
+ * @return {String}
107
+ */
108
+ ejs.resolveInclude = function (name, filename, isDir) {
109
+ var dirname = path_1.default.dirname;
110
+ var extname = path_1.default.extname;
111
+ var resolve = path_1.default.resolve;
112
+ var includePath = resolve(isDir ? filename : dirname(filename), name);
113
+ var ext = extname(name);
114
+ if (!ext) {
115
+ includePath += '.ejs';
116
+ }
117
+ return includePath;
118
+ };
119
+ /**
120
+ * Try to resolve file path on multiple directories
121
+ *
122
+ * @param {String} name specified path
123
+ * @param {Array<String>} paths list of possible parent directory paths
124
+ * @return {String}
125
+ */
126
+ function resolvePaths(name, paths) {
127
+ var filePath;
128
+ if (paths.some(function (v) {
129
+ filePath = ejs.resolveInclude(name, v, true);
130
+ return fs_1.default.existsSync(filePath);
131
+ })) {
132
+ return filePath;
133
+ }
134
+ }
135
+ /**
136
+ * Get the path to the included file by Options
137
+ *
138
+ * @param {String} path specified path
139
+ * @param {Options} options compilation options
140
+ * @return {String}
141
+ */
142
+ function getIncludePath(path, options) {
143
+ var includePath;
144
+ var filePath;
145
+ var views = options.views;
146
+ var match = /^[A-Za-z]+:\\|^\//.exec(path);
147
+ // Abs path
148
+ if (match && match.length) {
149
+ path = path.replace(/^\/*/, '');
150
+ if (Array.isArray(options.root)) {
151
+ includePath = resolvePaths(path, options.root);
152
+ }
153
+ else {
154
+ includePath = ejs.resolveInclude(path, options.root || '/', true);
155
+ }
156
+ }
157
+ // Relative paths
158
+ else {
159
+ // Look relative to a passed filename first
160
+ if (options.filename) {
161
+ filePath = ejs.resolveInclude(path, options.filename);
162
+ if (fs_1.default.existsSync(filePath)) {
163
+ includePath = filePath;
164
+ }
165
+ }
166
+ // Then look in any views directories
167
+ if (!includePath && Array.isArray(views)) {
168
+ includePath = resolvePaths(path, views);
169
+ }
170
+ if (!includePath && typeof options.includer !== 'function') {
171
+ throw new Error('Could not find the include file "' +
172
+ options.escapeFunction(path) + '"');
173
+ }
174
+ }
175
+ return includePath;
176
+ }
177
+ /**
178
+ * Get the template from a string or a file, either compiled on-the-fly or
179
+ * read from cache (if enabled), and cache the template if needed.
180
+ *
181
+ * If `template` is not set, the file specified in `options.filename` will be
182
+ * read.
183
+ *
184
+ * If `options.cache` is true, this function reads the file from
185
+ * `options.filename` so it must be set prior to calling this function.
186
+ *
187
+ * @memberof module:ejs-internal
188
+ * @param {Options} options compilation options
189
+ * @param {String} [template] template source
190
+ * @return {TemplateFunction}
191
+ * @static
192
+ */
193
+ function handleCache(options, template) {
194
+ var func;
195
+ var filename = options.filename;
196
+ var hasTemplate = arguments.length > 1;
197
+ if (options.cache) {
198
+ if (!filename) {
199
+ throw new Error('cache option requires a filename');
200
+ }
201
+ func = ejs.cache.get(filename);
202
+ if (func) {
203
+ return func;
204
+ }
205
+ if (!hasTemplate) {
206
+ template = fileLoader(filename).toString().replace(_BOM, '');
207
+ }
208
+ }
209
+ else if (!hasTemplate) {
210
+ // istanbul ignore if: should not happen at all
211
+ if (!filename) {
212
+ throw new Error('Internal EJS error: no file name or template '
213
+ + 'provided');
214
+ }
215
+ template = fileLoader(filename).toString().replace(_BOM, '');
216
+ }
217
+ func = ejs.compile(template, options);
218
+ if (options.cache) {
219
+ ejs.cache.set(filename, func);
220
+ }
221
+ return func;
222
+ }
223
+ /**
224
+ * Try calling handleCache with the given options and data and call the
225
+ * callback with the result. If an error occurs, call the callback with
226
+ * the error. Used by renderFile().
227
+ *
228
+ * @memberof module:ejs-internal
229
+ * @param {Options} options compilation options
230
+ * @param {Object} data template data
231
+ * @param {RenderFileCallback} cb callback
232
+ * @static
233
+ */
234
+ function tryHandleCache(options, data, cb) {
235
+ var result;
236
+ if (!cb) {
237
+ if (typeof ejs.promiseImpl == 'function') {
238
+ return new ejs.promiseImpl(function (resolve, reject) {
239
+ try {
240
+ result = handleCache(options)(data);
241
+ resolve(result);
242
+ }
243
+ catch (err) {
244
+ reject(err);
245
+ }
246
+ });
247
+ }
248
+ else {
249
+ throw new Error('Please provide a callback function');
250
+ }
251
+ }
252
+ else {
253
+ try {
254
+ result = handleCache(options)(data);
255
+ }
256
+ catch (err) {
257
+ return cb(err);
258
+ }
259
+ cb(null, result);
260
+ }
261
+ }
262
+ /**
263
+ * fileLoader is independent
264
+ *
265
+ * @param {String} filePath ejs file path.
266
+ * @return {String} The contents of the specified file.
267
+ * @static
268
+ */
269
+ function fileLoader(filePath) {
270
+ return ejs.fileLoader(filePath);
271
+ }
272
+ /**
273
+ * Get the template function.
274
+ *
275
+ * If `options.cache` is `true`, then the template is cached.
276
+ *
277
+ * @memberof module:ejs-internal
278
+ * @param {String} path path for the specified file
279
+ * @param {Options} options compilation options
280
+ * @return {TemplateFunction}
281
+ * @static
282
+ */
283
+ function includeFile(path, options) {
284
+ var opts = utils_js_1.default.shallowCopy(utils_js_1.default.createNullProtoObjWherePossible(), options);
285
+ opts.filename = getIncludePath(path, opts);
286
+ if (typeof options.includer === 'function') {
287
+ var includerResult = options.includer(path, opts.filename);
288
+ if (includerResult) {
289
+ if (includerResult.filename) {
290
+ opts.filename = includerResult.filename;
291
+ }
292
+ if (includerResult.template) {
293
+ return handleCache(opts, includerResult.template);
294
+ }
295
+ }
296
+ }
297
+ return handleCache(opts);
298
+ }
299
+ /**
300
+ * Re-throw the given `err` in context to the `str` of ejs, `filename`, and
301
+ * `lineno`.
302
+ *
303
+ * @implements {RethrowCallback}
304
+ * @memberof module:ejs-internal
305
+ * @param {Error} err Error object
306
+ * @param {String} str EJS source
307
+ * @param {String} flnm file name of the EJS file
308
+ * @param {Number} lineno line number of the error
309
+ * @param {EscapeCallback} esc
310
+ * @static
311
+ */
312
+ function rethrow(err, str, flnm, lineno, esc) {
313
+ var lines = str.split('\n');
314
+ var start = Math.max(lineno - 3, 0);
315
+ var end = Math.min(lines.length, lineno + 3);
316
+ var filename = esc(flnm);
317
+ // Error context
318
+ var context = lines.slice(start, end).map(function (line, i) {
319
+ var curr = i + start + 1;
320
+ return (curr == lineno ? ' >> ' : ' ')
321
+ + curr
322
+ + '| '
323
+ + line;
324
+ }).join('\n');
325
+ // Alter exception message
326
+ err.path = filename;
327
+ err.message = (filename || 'ejs') + ':'
328
+ + lineno + '\n'
329
+ + context + '\n\n'
330
+ + err.message;
331
+ throw err;
332
+ }
333
+ function stripSemi(str) {
334
+ return str.replace(/;(\s*$)/, '$1');
335
+ }
336
+ /**
337
+ * Compile the given `str` of ejs into a template function.
338
+ *
339
+ * @param {String} template EJS template
340
+ *
341
+ * @param {Options} [opts] compilation options
342
+ *
343
+ * @return {TemplateFunction}
344
+ * Note that the return type of the function depends on the value of `opts.async`.
345
+ * @public
346
+ */
347
+ ejs.compile = function compile(template, opts) {
348
+ var templ;
349
+ // v1 compat
350
+ // 'scope' is 'context'
351
+ // FIXME: Remove this in a future version
352
+ if (opts && opts.scope) {
353
+ console.warn('`scope` option is deprecated and will be removed in future EJS');
354
+ if (!opts.context) {
355
+ opts.context = opts.scope;
356
+ }
357
+ delete opts.scope;
358
+ }
359
+ templ = new Template(template, opts);
360
+ return templ.compile();
361
+ };
362
+ /**
363
+ * Render the given `template` of ejs.
364
+ *
365
+ * If you would like to include options but not data, you need to explicitly
366
+ * call this function with `data` being an empty object or `null`.
367
+ *
368
+ * @param {String} template EJS template
369
+ * @param {Object} [data={}] template data
370
+ * @param {Options} [opts={}] compilation and rendering options
371
+ * @return {(String|Promise<String>)}
372
+ * Return value type depends on `opts.async`.
373
+ * @public
374
+ */
375
+ ejs.render = function (template, d, o) {
376
+ var data = d || utils_js_1.default.createNullProtoObjWherePossible();
377
+ var opts = o || utils_js_1.default.createNullProtoObjWherePossible();
378
+ // No options object -- if there are optiony names
379
+ // in the data, copy them to options
380
+ if (arguments.length == 2) {
381
+ utils_js_1.default.shallowCopyFromList(opts, data, _OPTS_PASSABLE_WITH_DATA);
382
+ }
383
+ return handleCache(opts, template)(data);
384
+ };
385
+ /**
386
+ * Render an EJS file at the given `path` and callback `cb(err, str)`.
387
+ *
388
+ * If you would like to include options but not data, you need to explicitly
389
+ * call this function with `data` being an empty object or `null`.
390
+ *
391
+ * @param {String} path path to the EJS file
392
+ * @param {Object} [data={}] template data
393
+ * @param {Options} [opts={}] compilation and rendering options
394
+ * @param {RenderFileCallback} cb callback
395
+ * @public
396
+ */
397
+ ejs.renderFile = function () {
398
+ var args = Array.prototype.slice.call(arguments);
399
+ var filename = args.shift();
400
+ var cb;
401
+ var opts = { filename: filename };
402
+ var data;
403
+ var viewOpts;
404
+ // Do we have a callback?
405
+ if (typeof arguments[arguments.length - 1] == 'function') {
406
+ cb = args.pop();
407
+ }
408
+ // Do we have data/opts?
409
+ if (args.length) {
410
+ // Should always have data obj
411
+ data = args.shift();
412
+ // Normal passed opts (data obj + opts obj)
413
+ if (args.length) {
414
+ // Use shallowCopy so we don't pollute passed in opts obj with new vals
415
+ utils_js_1.default.shallowCopy(opts, args.pop());
416
+ }
417
+ // Special casing for Express (settings + opts-in-data)
418
+ else {
419
+ // Express 3 and 4
420
+ if (utils_js_1.default.hasOwn(data, 'settings') && data.settings) {
421
+ // Pull a few things from known locations
422
+ if (data.settings.views) {
423
+ opts.views = data.settings.views;
424
+ }
425
+ if (data.settings['view cache']) {
426
+ opts.cache = true;
427
+ }
428
+ // Undocumented after Express 2, but still usable, esp. for
429
+ // items that are unsafe to be passed along with data, like `root`
430
+ viewOpts = data.settings['view options'];
431
+ if (viewOpts) {
432
+ utils_js_1.default.shallowCopy(opts, viewOpts);
433
+ }
434
+ }
435
+ // Express 2 and lower, values set in app.locals, or people who just
436
+ // want to pass options in their data. NOTE: These values will override
437
+ // anything previously set in settings or settings['view options']
438
+ utils_js_1.default.shallowCopyFromList(opts, data, _OPTS_PASSABLE_WITH_DATA_EXPRESS);
439
+ }
440
+ opts.filename = filename;
441
+ }
442
+ else {
443
+ data = utils_js_1.default.createNullProtoObjWherePossible();
444
+ }
445
+ return tryHandleCache(opts, data, cb);
446
+ };
447
+ /**
448
+ * Clear intermediate JavaScript cache. Calls {@link Cache#reset}.
449
+ * @public
450
+ */
451
+ /**
452
+ * EJS template class
453
+ * @public
454
+ */
455
+ ejs.Template = Template;
456
+ ejs.clearCache = function () {
457
+ ejs.cache.reset();
458
+ };
459
+ function Template(text, optsParam) {
460
+ var opts = utils_js_1.default.hasOwnOnlyObject(optsParam);
461
+ var options = utils_js_1.default.createNullProtoObjWherePossible();
462
+ this.templateText = text;
463
+ /** @type {string | null} */
464
+ this.mode = null;
465
+ this.truncate = false;
466
+ this.currentLine = 1;
467
+ this.source = '';
468
+ options.escapeFunction = opts.escape || opts.escapeFunction || utils_js_1.default.escapeXML;
469
+ options.compileDebug = opts.compileDebug !== false;
470
+ options.debug = !!opts.debug;
471
+ options.filename = opts.filename;
472
+ options.openDelimiter = opts.openDelimiter || ejs.openDelimiter || _DEFAULT_OPEN_DELIMITER;
473
+ options.closeDelimiter = opts.closeDelimiter || ejs.closeDelimiter || _DEFAULT_CLOSE_DELIMITER;
474
+ options.delimiter = opts.delimiter || ejs.delimiter || _DEFAULT_DELIMITER;
475
+ options.strict = opts.strict || false;
476
+ options.context = opts.context;
477
+ options.cache = opts.cache || false;
478
+ options.rmWhitespace = opts.rmWhitespace;
479
+ options.root = opts.root;
480
+ options.includer = opts.includer;
481
+ options.outputFunctionName = opts.outputFunctionName;
482
+ options.localsName = opts.localsName || ejs.localsName || _DEFAULT_LOCALS_NAME;
483
+ options.views = opts.views;
484
+ options.async = opts.async;
485
+ options.destructuredLocals = opts.destructuredLocals;
486
+ options.legacyInclude = typeof opts.legacyInclude != 'undefined' ? !!opts.legacyInclude : true;
487
+ // Opt-in: keep locals' prototype chain visible inside `with`. Vulnerable to
488
+ // prototype-pollution gadgets (Object.prototype.escapeFn, include, etc.) —
489
+ // default is to strip the prototype chain via a shallow null-proto copy.
490
+ options.unsafePrototypeLocals = !!opts.unsafePrototypeLocals;
491
+ if (options.strict) {
492
+ options._with = false;
493
+ }
494
+ else {
495
+ options._with = typeof opts._with != 'undefined' ? opts._with : true;
496
+ }
497
+ this.opts = options;
498
+ this.regex = this.createRegex();
499
+ }
500
+ Template.modes = {
501
+ EVAL: 'eval',
502
+ ESCAPED: 'escaped',
503
+ RAW: 'raw',
504
+ COMMENT: 'comment',
505
+ LITERAL: 'literal'
506
+ };
507
+ Template.prototype = {
508
+ createRegex: function () {
509
+ var str = _REGEX_STRING;
510
+ var delim = utils_js_1.default.escapeRegExpChars(this.opts.delimiter);
511
+ var open = utils_js_1.default.escapeRegExpChars(this.opts.openDelimiter);
512
+ var close = utils_js_1.default.escapeRegExpChars(this.opts.closeDelimiter);
513
+ str = str.replace(/%/g, delim)
514
+ .replace(/</g, open)
515
+ .replace(/>/g, close);
516
+ return new RegExp(str);
517
+ },
518
+ compile: function () {
519
+ /** @type {string} */
520
+ var src;
521
+ var fn;
522
+ var opts = this.opts;
523
+ var prepended = '';
524
+ var appended = '';
525
+ /** @type {EscapeCallback} */
526
+ var escapeFn = opts.escapeFunction;
527
+ /** @type {FunctionConstructor} */
528
+ var ctor;
529
+ /** @type {string} */
530
+ var sanitizedFilename = opts.filename ? JSON.stringify(opts.filename) : 'undefined';
531
+ if (!this.source) {
532
+ this.generateSource();
533
+ prepended +=
534
+ " ".concat(DECLARATION_KEYWORD, " __output = \"\";\n") +
535
+ ' function __append(s) { if (s !== undefined && s !== null) __output += s }\n';
536
+ if (opts.outputFunctionName) {
537
+ if (!_JS_IDENTIFIER.test(opts.outputFunctionName)) {
538
+ throw new Error('outputFunctionName is not a valid JS identifier.');
539
+ }
540
+ prepended += " ".concat(DECLARATION_KEYWORD, " ") + opts.outputFunctionName + ' = __append;' + '\n';
541
+ }
542
+ if (opts.localsName && !_JS_IDENTIFIER.test(opts.localsName)) {
543
+ throw new Error('localsName is not a valid JS identifier.');
544
+ }
545
+ if (opts.destructuredLocals && opts.destructuredLocals.length) {
546
+ var destructuring = " ".concat(DECLARATION_KEYWORD, " __locals = (") + opts.localsName + ' || {}),\n';
547
+ for (var i = 0; i < opts.destructuredLocals.length; i++) {
548
+ var name_1 = opts.destructuredLocals[i];
549
+ if (!_JS_IDENTIFIER.test(name_1)) {
550
+ throw new Error('destructuredLocals[' + i + '] is not a valid JS identifier.');
551
+ }
552
+ if (i > 0) {
553
+ destructuring += ',\n ';
554
+ }
555
+ destructuring += name_1 + ' = __locals.' + name_1;
556
+ }
557
+ prepended += destructuring + ';\n';
558
+ }
559
+ if (opts._with !== false) {
560
+ prepended += ' with (' + opts.localsName + ' || {}) {' + '\n';
561
+ appended += ' }' + '\n';
562
+ }
563
+ appended += ' return __output;' + '\n';
564
+ this.source = prepended + this.source + appended;
565
+ }
566
+ if (opts.compileDebug) {
567
+ src = "".concat(DECLARATION_KEYWORD, " __line = 1") + '\n'
568
+ + ' , __lines = ' + JSON.stringify(this.templateText) + '\n'
569
+ + ' , __filename = ' + sanitizedFilename + ';' + '\n'
570
+ + 'try {' + '\n'
571
+ + this.source
572
+ + '} catch (e) {' + '\n'
573
+ + ' rethrow(e, __lines, __filename, __line, escapeFn);' + '\n'
574
+ + '}' + '\n';
575
+ }
576
+ else {
577
+ src = this.source;
578
+ }
579
+ if (opts.strict) {
580
+ src = '"use strict";\n' + src;
581
+ }
582
+ if (opts.debug) {
583
+ console.log(src);
584
+ }
585
+ if (opts.compileDebug && opts.filename) {
586
+ src = src + '\n'
587
+ + '//# sourceURL=' + sanitizedFilename + '\n';
588
+ }
589
+ try {
590
+ if (opts.async) {
591
+ // Have to use generated function for this, since in envs without support,
592
+ // it breaks in parsing
593
+ try {
594
+ ctor = (new Function('return (async function(){}).constructor;'))();
595
+ }
596
+ catch (e) {
597
+ if (e instanceof SyntaxError) {
598
+ throw new Error('This environment does not support async/await');
599
+ }
600
+ else {
601
+ throw e;
602
+ }
603
+ }
604
+ }
605
+ else {
606
+ ctor = Function;
607
+ }
608
+ fn = new ctor(opts.localsName + ', escapeFn, include, rethrow', src);
609
+ }
610
+ catch (e) {
611
+ // istanbul ignore else
612
+ if (e instanceof SyntaxError) {
613
+ if (opts.filename) {
614
+ e.message += ' in ' + opts.filename;
615
+ }
616
+ e.message += ' while compiling ejs\n\n';
617
+ e.message += 'If the above error is not helpful, you may want to try EJS-Lint:\n';
618
+ e.message += 'https://github.com/RyanZim/EJS-Lint';
619
+ if (!opts.async) {
620
+ e.message += '\n';
621
+ e.message += 'Or, if you meant to create an async function, pass `async: true` as an option.';
622
+ }
623
+ }
624
+ throw e;
625
+ }
626
+ // Return a callable function which will execute the function
627
+ // created by the source-code, with the passed data as locals
628
+ // Adds a local `include` function which allows full recursive include
629
+ var returnedFn = function anonymous(data) {
630
+ var include = function (path, includeData) {
631
+ var d = utils_js_1.default.shallowCopy(utils_js_1.default.createNullProtoObjWherePossible(), data);
632
+ if (includeData) {
633
+ d = utils_js_1.default.shallowCopy(d, includeData);
634
+ }
635
+ return includeFile(path, opts)(d);
636
+ };
637
+ var locals;
638
+ if (opts.unsafePrototypeLocals) {
639
+ locals = data || utils_js_1.default.createNullProtoObjWherePossible();
640
+ }
641
+ else {
642
+ locals = utils_js_1.default.shallowCopy(utils_js_1.default.createNullProtoObjWherePossible(), data);
643
+ }
644
+ return fn.apply(opts.context, [locals, escapeFn, include, rethrow]);
645
+ };
646
+ if (opts.filename && typeof Object.defineProperty === 'function') {
647
+ var filename = opts.filename;
648
+ var basename = path_1.default.basename(filename, path_1.default.extname(filename));
649
+ try {
650
+ Object.defineProperty(returnedFn, 'name', {
651
+ value: basename,
652
+ writable: false,
653
+ enumerable: false,
654
+ configurable: true
655
+ });
656
+ }
657
+ catch (e) { /* ignore */ }
658
+ }
659
+ return returnedFn;
660
+ },
661
+ generateSource: function () {
662
+ var opts = this.opts;
663
+ if (opts.rmWhitespace) {
664
+ // Have to use two separate replace here as `^` and `$` operators don't
665
+ // work well with `\r` and empty lines don't work well with the `m` flag.
666
+ this.templateText =
667
+ this.templateText.replace(/[\r\n]+/g, '\n').replace(/^\s+|\s+$/gm, '');
668
+ }
669
+ var self = this;
670
+ var d = this.opts.delimiter;
671
+ var o = this.opts.openDelimiter;
672
+ var c = this.opts.closeDelimiter;
673
+ // Slurp spaces and tabs before opening whitespace slurp tag and after closing whitespace slurp tag
674
+ // Build the tags using custom delimiters: openDelimiter + delimiter + '_' and '_' + delimiter + closeDelimiter
675
+ var openWhitespaceSlurpTag = utils_js_1.default.escapeRegExpChars(o + d + '_');
676
+ var closeWhitespaceSlurpTag = utils_js_1.default.escapeRegExpChars('_' + d + c);
677
+ var openWhitespaceSlurpReplacement = o + d + '_';
678
+ var closeWhitespaceSlurpReplacement = '_' + d + c;
679
+ this.templateText =
680
+ this.templateText.replace(new RegExp('[ \\t]*' + openWhitespaceSlurpTag, 'gm'), openWhitespaceSlurpReplacement)
681
+ .replace(new RegExp(closeWhitespaceSlurpTag + '[ \\t]*', 'gm'), closeWhitespaceSlurpReplacement);
682
+ var matches = this.parseTemplateText();
683
+ if (matches && matches.length) {
684
+ matches.forEach(function (line, index) {
685
+ var closing;
686
+ // If this is an opening tag, check for closing tags
687
+ // FIXME: May end up with some false positives here
688
+ // Better to store modes as k/v with openDelimiter + delimiter as key
689
+ // Then this can simply check against the map
690
+ if (line.indexOf(o + d) === 0 // If it is a tag
691
+ && line.indexOf(o + d + d) !== 0) { // and is not escaped
692
+ closing = matches[index + 2];
693
+ if (!(closing == d + c || closing == '-' + d + c || closing == '_' + d + c)) {
694
+ throw new Error('Could not find matching close tag for "' + line + '".');
695
+ }
696
+ }
697
+ self.scanLine(line);
698
+ });
699
+ }
700
+ },
701
+ parseTemplateText: function () {
702
+ var str = this.templateText;
703
+ var pat = this.regex;
704
+ var result = pat.exec(str);
705
+ var arr = [];
706
+ var firstPos;
707
+ while (result) {
708
+ firstPos = result.index;
709
+ if (firstPos !== 0) {
710
+ arr.push(str.substring(0, firstPos));
711
+ str = str.slice(firstPos);
712
+ }
713
+ arr.push(result[0]);
714
+ str = str.slice(result[0].length);
715
+ result = pat.exec(str);
716
+ }
717
+ if (str) {
718
+ arr.push(str);
719
+ }
720
+ return arr;
721
+ },
722
+ _addOutput: function (line) {
723
+ if (this.truncate) {
724
+ // Only replace single leading linebreak in the line after
725
+ // -%> tag -- this is the single, trailing linebreak
726
+ // after the tag that the truncation mode replaces
727
+ // Handle Win / Unix / old Mac linebreaks -- do the \r\n
728
+ // combo first in the regex-or
729
+ line = line.replace(/^(?:\r\n|\r|\n)/, '');
730
+ this.truncate = false;
731
+ }
732
+ if (!line) {
733
+ return line;
734
+ }
735
+ // Preserve literal slashes
736
+ line = line.replace(/\\/g, '\\\\');
737
+ // Convert linebreaks
738
+ line = line.replace(/\n/g, '\\n');
739
+ line = line.replace(/\r/g, '\\r');
740
+ // Escape double-quotes
741
+ // - this will be the delimiter during execution
742
+ line = line.replace(/"/g, '\\"');
743
+ this.source += ' ; __append("' + line + '")' + '\n';
744
+ },
745
+ scanLine: function (line) {
746
+ var self = this;
747
+ var d = this.opts.delimiter;
748
+ var o = this.opts.openDelimiter;
749
+ var c = this.opts.closeDelimiter;
750
+ var newLineCount = 0;
751
+ newLineCount = (line.split('\n').length - 1);
752
+ switch (line) {
753
+ case o + d:
754
+ case o + d + '_':
755
+ this.mode = Template.modes.EVAL;
756
+ break;
757
+ case o + d + '=':
758
+ this.mode = Template.modes.ESCAPED;
759
+ break;
760
+ case o + d + '-':
761
+ this.mode = Template.modes.RAW;
762
+ break;
763
+ case o + d + '#':
764
+ this.mode = Template.modes.COMMENT;
765
+ break;
766
+ case o + d + d:
767
+ this.mode = Template.modes.LITERAL;
768
+ this.source += ' ; __append("' + line.replace(o + d + d, o + d) + '")' + '\n';
769
+ break;
770
+ case d + d + c:
771
+ this.mode = Template.modes.LITERAL;
772
+ this.source += ' ; __append("' + line.replace(d + d + c, d + c) + '")' + '\n';
773
+ break;
774
+ case d + c:
775
+ case '-' + d + c:
776
+ case '_' + d + c:
777
+ if (this.mode == Template.modes.LITERAL) {
778
+ this._addOutput(line);
779
+ }
780
+ this.mode = null;
781
+ this.truncate = line.indexOf('-') === 0 || line.indexOf('_') === 0;
782
+ break;
783
+ default:
784
+ // In script mode, depends on type of tag
785
+ if (this.mode) {
786
+ // If '//' is found without a line break, add a line break.
787
+ switch (this.mode) {
788
+ case Template.modes.EVAL:
789
+ case Template.modes.ESCAPED:
790
+ case Template.modes.RAW:
791
+ if (line.lastIndexOf('//') > line.lastIndexOf('\n')) {
792
+ line += '\n';
793
+ }
794
+ }
795
+ switch (this.mode) {
796
+ // Just executing code
797
+ case Template.modes.EVAL:
798
+ this.source += ' ; ' + line + '\n';
799
+ break;
800
+ // Exec, esc, and output
801
+ case Template.modes.ESCAPED:
802
+ this.source += ' ; __append(escapeFn(' + stripSemi(line) + '))' + '\n';
803
+ break;
804
+ // Exec and output
805
+ case Template.modes.RAW:
806
+ this.source += ' ; __append(' + stripSemi(line) + ')' + '\n';
807
+ break;
808
+ case Template.modes.COMMENT:
809
+ // Do nothing
810
+ break;
811
+ // Literal <%% mode, append as raw output
812
+ case Template.modes.LITERAL:
813
+ this._addOutput(line);
814
+ break;
815
+ }
816
+ }
817
+ // In string mode, just add the output
818
+ else {
819
+ this._addOutput(line);
820
+ }
821
+ }
822
+ if (self.opts.compileDebug && newLineCount) {
823
+ this.currentLine += newLineCount;
824
+ this.source += ' ; __line = ' + this.currentLine + '\n';
825
+ }
826
+ }
827
+ };
828
+ /**
829
+ * Escape characters reserved in XML.
830
+ *
831
+ * This is simply an export of {@link module:utils.escapeXML}.
832
+ *
833
+ * If `markup` is `undefined` or `null`, the empty string is returned.
834
+ *
835
+ * @param {String} markup Input string
836
+ * @return {String} Escaped string
837
+ * @public
838
+ * @func
839
+ * */
840
+ ejs.escapeXML = utils_js_1.default.escapeXML;
841
+ /**
842
+ * Express.js support.
843
+ *
844
+ * This is an alias for {@link module:ejs.renderFile}, in order to support
845
+ * Express.js out-of-the-box.
846
+ *
847
+ * @func
848
+ */
849
+ ejs.__express = ejs.renderFile;
850
+ /* istanbul ignore if */
851
+ if (typeof window != 'undefined') {
852
+ window.ejs = ejs;
853
+ }
854
+ module.exports = ejs;
855
+ },{"./utils.js":2,"fs":3,"path":4}],2:[function(require,module,exports){
856
+ /*
857
+ * EJS Embedded JavaScript templates
858
+ * Copyright 2112 Matthew Eernisse (mde@fleegix.org)
859
+ *
860
+ * Licensed under the Apache License, Version 2.0 (the "License");
861
+ * you may not use this file except in compliance with the License.
862
+ * You may obtain a copy of the License at
863
+ *
864
+ * http://www.apache.org/licenses/LICENSE-2.0
865
+ *
866
+ * Unless required by applicable law or agreed to in writing, software
867
+ * distributed under the License is distributed on an "AS IS" BASIS,
868
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
869
+ * See the License for the specific language governing permissions and
870
+ * limitations under the License.
871
+ *
872
+ */
873
+ /**
874
+ * Private utility functions
875
+ * @module utils
876
+ * @private
877
+ */
878
+ 'use strict';
879
+ Object.defineProperty(exports, "__esModule", { value: true });
880
+ var utils = {};
881
+ var regExpChars = /[|\\{}()[\]^$+*?.]/g;
882
+ var hasOwnProperty = Object.prototype.hasOwnProperty;
883
+ var hasOwn = function (obj, key) { return hasOwnProperty.apply(obj, [key]); };
884
+ utils.hasOwn = hasOwn;
885
+ /**
886
+ * Escape characters reserved in regular expressions.
887
+ *
888
+ * If `string` is `undefined` or `null`, the empty string is returned.
889
+ *
890
+ * @param {String} string Input string
891
+ * @return {String} Escaped string
892
+ * @static
893
+ * @private
894
+ */
895
+ utils.escapeRegExpChars = function (string) {
896
+ // istanbul ignore if
897
+ if (!string) {
898
+ return '';
899
+ }
900
+ return String(string).replace(regExpChars, '\\$&');
901
+ };
902
+ var _ENCODE_HTML_RULES = {
903
+ '&': '&amp;',
904
+ '<': '&lt;',
905
+ '>': '&gt;',
906
+ '"': '&#34;',
907
+ "'": '&#39;'
908
+ };
909
+ var _MATCH_HTML = /[&<>'"]/g;
910
+ function encode_char(c) {
911
+ return _ENCODE_HTML_RULES[c] || c;
912
+ }
913
+ /**
914
+ * Stringified version of constants used by {@link module:utils.escapeXML}.
915
+ *
916
+ * @readonly
917
+ * @type {String}
918
+ */
919
+ var escapeFuncStr = 'var _ENCODE_HTML_RULES = {\n'
920
+ + ' "&": "&amp;"\n'
921
+ + ' , "<": "&lt;"\n'
922
+ + ' , ">": "&gt;"\n'
923
+ + ' , \'"\': "&#34;"\n'
924
+ + ' , "\'": "&#39;"\n'
925
+ + ' }\n'
926
+ + ' , _MATCH_HTML = /[&<>\'"]/g;\n'
927
+ + 'function encode_char(c) {\n'
928
+ + ' return _ENCODE_HTML_RULES[c] || c;\n'
929
+ + '};\n';
930
+ /**
931
+ * Escape characters reserved in XML.
932
+ *
933
+ * If `markup` is `undefined` or `null`, the empty string is returned.
934
+ *
935
+ * @implements {EscapeCallback}
936
+ * @param {String} markup Input string
937
+ * @return {String} Escaped string
938
+ * @static
939
+ * @private
940
+ */
941
+ utils.escapeXML = function (markup) {
942
+ return markup == undefined
943
+ ? ''
944
+ : String(markup)
945
+ .replace(_MATCH_HTML, encode_char);
946
+ };
947
+ function escapeXMLToString() {
948
+ return Function.prototype.toString.call(this) + ';\n' + escapeFuncStr;
949
+ }
950
+ try {
951
+ if (typeof Object.defineProperty === 'function') {
952
+ // If the Function prototype is frozen, the "toString" property is non-writable. This means that any objects which inherit this property
953
+ // cannot have the property changed using an assignment. If using strict mode, attempting that will cause an error. If not using strict
954
+ // mode, attempting that will be silently ignored.
955
+ // However, we can still explicitly shadow the prototype's "toString" property by defining a new "toString" property on this object.
956
+ Object.defineProperty(utils.escapeXML, 'toString', { value: escapeXMLToString });
957
+ }
958
+ else {
959
+ // If Object.defineProperty() doesn't exist, attempt to shadow this property using the assignment operator.
960
+ utils.escapeXML.toString = escapeXMLToString;
961
+ }
962
+ }
963
+ catch (err) {
964
+ console.warn('Unable to set escapeXML.toString (is the Function prototype frozen?)');
965
+ }
966
+ /**
967
+ * Naive copy of properties from one object to another.
968
+ * Does not recurse into non-scalar properties
969
+ * Does not check to see if the property has a value before copying
970
+ *
971
+ * @param {Object} to Destination object
972
+ * @param {Object} from Source object
973
+ * @return {Object} Destination object
974
+ * @static
975
+ * @private
976
+ */
977
+ utils.shallowCopy = function (to, from) {
978
+ from = from || {};
979
+ if ((to !== null) && (to !== undefined)) {
980
+ for (var p in from) {
981
+ if (!hasOwn(from, p)) {
982
+ continue;
983
+ }
984
+ if (p === '__proto__' || p === 'constructor') {
985
+ continue;
986
+ }
987
+ to[p] = from[p];
988
+ }
989
+ }
990
+ return to;
991
+ };
992
+ /**
993
+ * Naive copy of a list of key names, from one object to another.
994
+ * Only copies property if it is actually defined
995
+ * Does not recurse into non-scalar properties
996
+ *
997
+ * @param {Object} to Destination object
998
+ * @param {Object} from Source object
999
+ * @param {Array} list List of properties to copy
1000
+ * @return {Object} Destination object
1001
+ * @static
1002
+ * @private
1003
+ */
1004
+ utils.shallowCopyFromList = function (to, from, list) {
1005
+ list = list || [];
1006
+ from = from || {};
1007
+ if ((to !== null) && (to !== undefined)) {
1008
+ for (var i = 0; i < list.length; i++) {
1009
+ var p = list[i];
1010
+ if (typeof from[p] != 'undefined') {
1011
+ if (!hasOwn(from, p)) {
1012
+ continue;
1013
+ }
1014
+ if (p === '__proto__' || p === 'constructor') {
1015
+ continue;
1016
+ }
1017
+ to[p] = from[p];
1018
+ }
1019
+ }
1020
+ }
1021
+ return to;
1022
+ };
1023
+ /**
1024
+ * Simple in-process cache implementation. Does not implement limits of any
1025
+ * sort.
1026
+ *
1027
+ * @implements {Cache}
1028
+ * @static
1029
+ * @private
1030
+ */
1031
+ utils.cache = {
1032
+ _data: {},
1033
+ set: function (key, val) {
1034
+ this._data[key] = val;
1035
+ },
1036
+ get: function (key) {
1037
+ return this._data[key];
1038
+ },
1039
+ remove: function (key) {
1040
+ delete this._data[key];
1041
+ },
1042
+ reset: function () {
1043
+ this._data = {};
1044
+ }
1045
+ };
1046
+ /**
1047
+ * Transforms hyphen case variable into camel case.
1048
+ *
1049
+ * @param {String} string Hyphen case string
1050
+ * @return {String} Camel case string
1051
+ * @static
1052
+ * @private
1053
+ */
1054
+ utils.hyphenToCamel = function (str) {
1055
+ return str.replace(/-[a-z]/g, function (match) { return match[1].toUpperCase(); });
1056
+ };
1057
+ /**
1058
+ * Returns a null-prototype object in runtimes that support it
1059
+ *
1060
+ * @return {Object} Object, prototype will be set to null where possible
1061
+ * @static
1062
+ * @private
1063
+ */
1064
+ utils.createNullProtoObjWherePossible = (function () {
1065
+ if (typeof Object.create == 'function') {
1066
+ return function () {
1067
+ return Object.create(null);
1068
+ };
1069
+ }
1070
+ if (!({ __proto__: null } instanceof Object)) {
1071
+ return function () {
1072
+ return { __proto__: null };
1073
+ };
1074
+ }
1075
+ // Not possible, just pass through
1076
+ return function () {
1077
+ return {};
1078
+ };
1079
+ })();
1080
+ /**
1081
+ * Copies own-properties from one object to a null-prototype object for basic
1082
+ * protection against prototype pollution
1083
+ *
1084
+ * @return {Object} Object with own-properties of input object
1085
+ * @static
1086
+ * @private
1087
+ */
1088
+ utils.hasOwnOnlyObject = function (obj) {
1089
+ var o = utils.createNullProtoObjWherePossible();
1090
+ for (var p in obj) {
1091
+ if (hasOwn(obj, p)) {
1092
+ o[p] = obj[p];
1093
+ }
1094
+ }
1095
+ return o;
1096
+ };
1097
+ module.exports = utils;
1098
+ },{}],3:[function(require,module,exports){
1099
+
1100
+ },{}],4:[function(require,module,exports){
1101
+ (function (process){(function (){
1102
+ // 'path' module extracted from Node.js v8.11.1 (only the posix part)
1103
+ // transplited with Babel
1104
+
1105
+ // Copyright Joyent, Inc. and other Node contributors.
1106
+ //
1107
+ // Permission is hereby granted, free of charge, to any person obtaining a
1108
+ // copy of this software and associated documentation files (the
1109
+ // "Software"), to deal in the Software without restriction, including
1110
+ // without limitation the rights to use, copy, modify, merge, publish,
1111
+ // distribute, sublicense, and/or sell copies of the Software, and to permit
1112
+ // persons to whom the Software is furnished to do so, subject to the
1113
+ // following conditions:
1114
+ //
1115
+ // The above copyright notice and this permission notice shall be included
1116
+ // in all copies or substantial portions of the Software.
1117
+ //
1118
+ // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
1119
+ // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
1120
+ // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
1121
+ // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
1122
+ // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
1123
+ // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
1124
+ // USE OR OTHER DEALINGS IN THE SOFTWARE.
1125
+
1126
+ 'use strict';
1127
+
1128
+ function assertPath(path) {
1129
+ if (typeof path !== 'string') {
1130
+ throw new TypeError('Path must be a string. Received ' + JSON.stringify(path));
1131
+ }
1132
+ }
1133
+
1134
+ // Resolves . and .. elements in a path with directory names
1135
+ function normalizeStringPosix(path, allowAboveRoot) {
1136
+ var res = '';
1137
+ var lastSegmentLength = 0;
1138
+ var lastSlash = -1;
1139
+ var dots = 0;
1140
+ var code;
1141
+ for (var i = 0; i <= path.length; ++i) {
1142
+ if (i < path.length)
1143
+ code = path.charCodeAt(i);
1144
+ else if (code === 47 /*/*/)
1145
+ break;
1146
+ else
1147
+ code = 47 /*/*/;
1148
+ if (code === 47 /*/*/) {
1149
+ if (lastSlash === i - 1 || dots === 1) {
1150
+ // NOOP
1151
+ } else if (lastSlash !== i - 1 && dots === 2) {
1152
+ if (res.length < 2 || lastSegmentLength !== 2 || res.charCodeAt(res.length - 1) !== 46 /*.*/ || res.charCodeAt(res.length - 2) !== 46 /*.*/) {
1153
+ if (res.length > 2) {
1154
+ var lastSlashIndex = res.lastIndexOf('/');
1155
+ if (lastSlashIndex !== res.length - 1) {
1156
+ if (lastSlashIndex === -1) {
1157
+ res = '';
1158
+ lastSegmentLength = 0;
1159
+ } else {
1160
+ res = res.slice(0, lastSlashIndex);
1161
+ lastSegmentLength = res.length - 1 - res.lastIndexOf('/');
1162
+ }
1163
+ lastSlash = i;
1164
+ dots = 0;
1165
+ continue;
1166
+ }
1167
+ } else if (res.length === 2 || res.length === 1) {
1168
+ res = '';
1169
+ lastSegmentLength = 0;
1170
+ lastSlash = i;
1171
+ dots = 0;
1172
+ continue;
1173
+ }
1174
+ }
1175
+ if (allowAboveRoot) {
1176
+ if (res.length > 0)
1177
+ res += '/..';
1178
+ else
1179
+ res = '..';
1180
+ lastSegmentLength = 2;
1181
+ }
1182
+ } else {
1183
+ if (res.length > 0)
1184
+ res += '/' + path.slice(lastSlash + 1, i);
1185
+ else
1186
+ res = path.slice(lastSlash + 1, i);
1187
+ lastSegmentLength = i - lastSlash - 1;
1188
+ }
1189
+ lastSlash = i;
1190
+ dots = 0;
1191
+ } else if (code === 46 /*.*/ && dots !== -1) {
1192
+ ++dots;
1193
+ } else {
1194
+ dots = -1;
1195
+ }
1196
+ }
1197
+ return res;
1198
+ }
1199
+
1200
+ function _format(sep, pathObject) {
1201
+ var dir = pathObject.dir || pathObject.root;
1202
+ var base = pathObject.base || (pathObject.name || '') + (pathObject.ext || '');
1203
+ if (!dir) {
1204
+ return base;
1205
+ }
1206
+ if (dir === pathObject.root) {
1207
+ return dir + base;
1208
+ }
1209
+ return dir + sep + base;
1210
+ }
1211
+
1212
+ var posix = {
1213
+ // path.resolve([from ...], to)
1214
+ resolve: function resolve() {
1215
+ var resolvedPath = '';
1216
+ var resolvedAbsolute = false;
1217
+ var cwd;
1218
+
1219
+ for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {
1220
+ var path;
1221
+ if (i >= 0)
1222
+ path = arguments[i];
1223
+ else {
1224
+ if (cwd === undefined)
1225
+ cwd = process.cwd();
1226
+ path = cwd;
1227
+ }
1228
+
1229
+ assertPath(path);
1230
+
1231
+ // Skip empty entries
1232
+ if (path.length === 0) {
1233
+ continue;
1234
+ }
1235
+
1236
+ resolvedPath = path + '/' + resolvedPath;
1237
+ resolvedAbsolute = path.charCodeAt(0) === 47 /*/*/;
1238
+ }
1239
+
1240
+ // At this point the path should be resolved to a full absolute path, but
1241
+ // handle relative paths to be safe (might happen when process.cwd() fails)
1242
+
1243
+ // Normalize the path
1244
+ resolvedPath = normalizeStringPosix(resolvedPath, !resolvedAbsolute);
1245
+
1246
+ if (resolvedAbsolute) {
1247
+ if (resolvedPath.length > 0)
1248
+ return '/' + resolvedPath;
1249
+ else
1250
+ return '/';
1251
+ } else if (resolvedPath.length > 0) {
1252
+ return resolvedPath;
1253
+ } else {
1254
+ return '.';
1255
+ }
1256
+ },
1257
+
1258
+ normalize: function normalize(path) {
1259
+ assertPath(path);
1260
+
1261
+ if (path.length === 0) return '.';
1262
+
1263
+ var isAbsolute = path.charCodeAt(0) === 47 /*/*/;
1264
+ var trailingSeparator = path.charCodeAt(path.length - 1) === 47 /*/*/;
1265
+
1266
+ // Normalize the path
1267
+ path = normalizeStringPosix(path, !isAbsolute);
1268
+
1269
+ if (path.length === 0 && !isAbsolute) path = '.';
1270
+ if (path.length > 0 && trailingSeparator) path += '/';
1271
+
1272
+ if (isAbsolute) return '/' + path;
1273
+ return path;
1274
+ },
1275
+
1276
+ isAbsolute: function isAbsolute(path) {
1277
+ assertPath(path);
1278
+ return path.length > 0 && path.charCodeAt(0) === 47 /*/*/;
1279
+ },
1280
+
1281
+ join: function join() {
1282
+ if (arguments.length === 0)
1283
+ return '.';
1284
+ var joined;
1285
+ for (var i = 0; i < arguments.length; ++i) {
1286
+ var arg = arguments[i];
1287
+ assertPath(arg);
1288
+ if (arg.length > 0) {
1289
+ if (joined === undefined)
1290
+ joined = arg;
1291
+ else
1292
+ joined += '/' + arg;
1293
+ }
1294
+ }
1295
+ if (joined === undefined)
1296
+ return '.';
1297
+ return posix.normalize(joined);
1298
+ },
1299
+
1300
+ relative: function relative(from, to) {
1301
+ assertPath(from);
1302
+ assertPath(to);
1303
+
1304
+ if (from === to) return '';
1305
+
1306
+ from = posix.resolve(from);
1307
+ to = posix.resolve(to);
1308
+
1309
+ if (from === to) return '';
1310
+
1311
+ // Trim any leading backslashes
1312
+ var fromStart = 1;
1313
+ for (; fromStart < from.length; ++fromStart) {
1314
+ if (from.charCodeAt(fromStart) !== 47 /*/*/)
1315
+ break;
1316
+ }
1317
+ var fromEnd = from.length;
1318
+ var fromLen = fromEnd - fromStart;
1319
+
1320
+ // Trim any leading backslashes
1321
+ var toStart = 1;
1322
+ for (; toStart < to.length; ++toStart) {
1323
+ if (to.charCodeAt(toStart) !== 47 /*/*/)
1324
+ break;
1325
+ }
1326
+ var toEnd = to.length;
1327
+ var toLen = toEnd - toStart;
1328
+
1329
+ // Compare paths to find the longest common path from root
1330
+ var length = fromLen < toLen ? fromLen : toLen;
1331
+ var lastCommonSep = -1;
1332
+ var i = 0;
1333
+ for (; i <= length; ++i) {
1334
+ if (i === length) {
1335
+ if (toLen > length) {
1336
+ if (to.charCodeAt(toStart + i) === 47 /*/*/) {
1337
+ // We get here if `from` is the exact base path for `to`.
1338
+ // For example: from='/foo/bar'; to='/foo/bar/baz'
1339
+ return to.slice(toStart + i + 1);
1340
+ } else if (i === 0) {
1341
+ // We get here if `from` is the root
1342
+ // For example: from='/'; to='/foo'
1343
+ return to.slice(toStart + i);
1344
+ }
1345
+ } else if (fromLen > length) {
1346
+ if (from.charCodeAt(fromStart + i) === 47 /*/*/) {
1347
+ // We get here if `to` is the exact base path for `from`.
1348
+ // For example: from='/foo/bar/baz'; to='/foo/bar'
1349
+ lastCommonSep = i;
1350
+ } else if (i === 0) {
1351
+ // We get here if `to` is the root.
1352
+ // For example: from='/foo'; to='/'
1353
+ lastCommonSep = 0;
1354
+ }
1355
+ }
1356
+ break;
1357
+ }
1358
+ var fromCode = from.charCodeAt(fromStart + i);
1359
+ var toCode = to.charCodeAt(toStart + i);
1360
+ if (fromCode !== toCode)
1361
+ break;
1362
+ else if (fromCode === 47 /*/*/)
1363
+ lastCommonSep = i;
1364
+ }
1365
+
1366
+ var out = '';
1367
+ // Generate the relative path based on the path difference between `to`
1368
+ // and `from`
1369
+ for (i = fromStart + lastCommonSep + 1; i <= fromEnd; ++i) {
1370
+ if (i === fromEnd || from.charCodeAt(i) === 47 /*/*/) {
1371
+ if (out.length === 0)
1372
+ out += '..';
1373
+ else
1374
+ out += '/..';
1375
+ }
1376
+ }
1377
+
1378
+ // Lastly, append the rest of the destination (`to`) path that comes after
1379
+ // the common path parts
1380
+ if (out.length > 0)
1381
+ return out + to.slice(toStart + lastCommonSep);
1382
+ else {
1383
+ toStart += lastCommonSep;
1384
+ if (to.charCodeAt(toStart) === 47 /*/*/)
1385
+ ++toStart;
1386
+ return to.slice(toStart);
1387
+ }
1388
+ },
1389
+
1390
+ _makeLong: function _makeLong(path) {
1391
+ return path;
1392
+ },
1393
+
1394
+ dirname: function dirname(path) {
1395
+ assertPath(path);
1396
+ if (path.length === 0) return '.';
1397
+ var code = path.charCodeAt(0);
1398
+ var hasRoot = code === 47 /*/*/;
1399
+ var end = -1;
1400
+ var matchedSlash = true;
1401
+ for (var i = path.length - 1; i >= 1; --i) {
1402
+ code = path.charCodeAt(i);
1403
+ if (code === 47 /*/*/) {
1404
+ if (!matchedSlash) {
1405
+ end = i;
1406
+ break;
1407
+ }
1408
+ } else {
1409
+ // We saw the first non-path separator
1410
+ matchedSlash = false;
1411
+ }
1412
+ }
1413
+
1414
+ if (end === -1) return hasRoot ? '/' : '.';
1415
+ if (hasRoot && end === 1) return '//';
1416
+ return path.slice(0, end);
1417
+ },
1418
+
1419
+ basename: function basename(path, ext) {
1420
+ if (ext !== undefined && typeof ext !== 'string') throw new TypeError('"ext" argument must be a string');
1421
+ assertPath(path);
1422
+
1423
+ var start = 0;
1424
+ var end = -1;
1425
+ var matchedSlash = true;
1426
+ var i;
1427
+
1428
+ if (ext !== undefined && ext.length > 0 && ext.length <= path.length) {
1429
+ if (ext.length === path.length && ext === path) return '';
1430
+ var extIdx = ext.length - 1;
1431
+ var firstNonSlashEnd = -1;
1432
+ for (i = path.length - 1; i >= 0; --i) {
1433
+ var code = path.charCodeAt(i);
1434
+ if (code === 47 /*/*/) {
1435
+ // If we reached a path separator that was not part of a set of path
1436
+ // separators at the end of the string, stop now
1437
+ if (!matchedSlash) {
1438
+ start = i + 1;
1439
+ break;
1440
+ }
1441
+ } else {
1442
+ if (firstNonSlashEnd === -1) {
1443
+ // We saw the first non-path separator, remember this index in case
1444
+ // we need it if the extension ends up not matching
1445
+ matchedSlash = false;
1446
+ firstNonSlashEnd = i + 1;
1447
+ }
1448
+ if (extIdx >= 0) {
1449
+ // Try to match the explicit extension
1450
+ if (code === ext.charCodeAt(extIdx)) {
1451
+ if (--extIdx === -1) {
1452
+ // We matched the extension, so mark this as the end of our path
1453
+ // component
1454
+ end = i;
1455
+ }
1456
+ } else {
1457
+ // Extension does not match, so our result is the entire path
1458
+ // component
1459
+ extIdx = -1;
1460
+ end = firstNonSlashEnd;
1461
+ }
1462
+ }
1463
+ }
1464
+ }
1465
+
1466
+ if (start === end) end = firstNonSlashEnd;else if (end === -1) end = path.length;
1467
+ return path.slice(start, end);
1468
+ } else {
1469
+ for (i = path.length - 1; i >= 0; --i) {
1470
+ if (path.charCodeAt(i) === 47 /*/*/) {
1471
+ // If we reached a path separator that was not part of a set of path
1472
+ // separators at the end of the string, stop now
1473
+ if (!matchedSlash) {
1474
+ start = i + 1;
1475
+ break;
1476
+ }
1477
+ } else if (end === -1) {
1478
+ // We saw the first non-path separator, mark this as the end of our
1479
+ // path component
1480
+ matchedSlash = false;
1481
+ end = i + 1;
1482
+ }
1483
+ }
1484
+
1485
+ if (end === -1) return '';
1486
+ return path.slice(start, end);
1487
+ }
1488
+ },
1489
+
1490
+ extname: function extname(path) {
1491
+ assertPath(path);
1492
+ var startDot = -1;
1493
+ var startPart = 0;
1494
+ var end = -1;
1495
+ var matchedSlash = true;
1496
+ // Track the state of characters (if any) we see before our first dot and
1497
+ // after any path separator we find
1498
+ var preDotState = 0;
1499
+ for (var i = path.length - 1; i >= 0; --i) {
1500
+ var code = path.charCodeAt(i);
1501
+ if (code === 47 /*/*/) {
1502
+ // If we reached a path separator that was not part of a set of path
1503
+ // separators at the end of the string, stop now
1504
+ if (!matchedSlash) {
1505
+ startPart = i + 1;
1506
+ break;
1507
+ }
1508
+ continue;
1509
+ }
1510
+ if (end === -1) {
1511
+ // We saw the first non-path separator, mark this as the end of our
1512
+ // extension
1513
+ matchedSlash = false;
1514
+ end = i + 1;
1515
+ }
1516
+ if (code === 46 /*.*/) {
1517
+ // If this is our first dot, mark it as the start of our extension
1518
+ if (startDot === -1)
1519
+ startDot = i;
1520
+ else if (preDotState !== 1)
1521
+ preDotState = 1;
1522
+ } else if (startDot !== -1) {
1523
+ // We saw a non-dot and non-path separator before our dot, so we should
1524
+ // have a good chance at having a non-empty extension
1525
+ preDotState = -1;
1526
+ }
1527
+ }
1528
+
1529
+ if (startDot === -1 || end === -1 ||
1530
+ // We saw a non-dot character immediately before the dot
1531
+ preDotState === 0 ||
1532
+ // The (right-most) trimmed path component is exactly '..'
1533
+ preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {
1534
+ return '';
1535
+ }
1536
+ return path.slice(startDot, end);
1537
+ },
1538
+
1539
+ format: function format(pathObject) {
1540
+ if (pathObject === null || typeof pathObject !== 'object') {
1541
+ throw new TypeError('The "pathObject" argument must be of type Object. Received type ' + typeof pathObject);
1542
+ }
1543
+ return _format('/', pathObject);
1544
+ },
1545
+
1546
+ parse: function parse(path) {
1547
+ assertPath(path);
1548
+
1549
+ var ret = { root: '', dir: '', base: '', ext: '', name: '' };
1550
+ if (path.length === 0) return ret;
1551
+ var code = path.charCodeAt(0);
1552
+ var isAbsolute = code === 47 /*/*/;
1553
+ var start;
1554
+ if (isAbsolute) {
1555
+ ret.root = '/';
1556
+ start = 1;
1557
+ } else {
1558
+ start = 0;
1559
+ }
1560
+ var startDot = -1;
1561
+ var startPart = 0;
1562
+ var end = -1;
1563
+ var matchedSlash = true;
1564
+ var i = path.length - 1;
1565
+
1566
+ // Track the state of characters (if any) we see before our first dot and
1567
+ // after any path separator we find
1568
+ var preDotState = 0;
1569
+
1570
+ // Get non-dir info
1571
+ for (; i >= start; --i) {
1572
+ code = path.charCodeAt(i);
1573
+ if (code === 47 /*/*/) {
1574
+ // If we reached a path separator that was not part of a set of path
1575
+ // separators at the end of the string, stop now
1576
+ if (!matchedSlash) {
1577
+ startPart = i + 1;
1578
+ break;
1579
+ }
1580
+ continue;
1581
+ }
1582
+ if (end === -1) {
1583
+ // We saw the first non-path separator, mark this as the end of our
1584
+ // extension
1585
+ matchedSlash = false;
1586
+ end = i + 1;
1587
+ }
1588
+ if (code === 46 /*.*/) {
1589
+ // If this is our first dot, mark it as the start of our extension
1590
+ if (startDot === -1) startDot = i;else if (preDotState !== 1) preDotState = 1;
1591
+ } else if (startDot !== -1) {
1592
+ // We saw a non-dot and non-path separator before our dot, so we should
1593
+ // have a good chance at having a non-empty extension
1594
+ preDotState = -1;
1595
+ }
1596
+ }
1597
+
1598
+ if (startDot === -1 || end === -1 ||
1599
+ // We saw a non-dot character immediately before the dot
1600
+ preDotState === 0 ||
1601
+ // The (right-most) trimmed path component is exactly '..'
1602
+ preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {
1603
+ if (end !== -1) {
1604
+ if (startPart === 0 && isAbsolute) ret.base = ret.name = path.slice(1, end);else ret.base = ret.name = path.slice(startPart, end);
1605
+ }
1606
+ } else {
1607
+ if (startPart === 0 && isAbsolute) {
1608
+ ret.name = path.slice(1, startDot);
1609
+ ret.base = path.slice(1, end);
1610
+ } else {
1611
+ ret.name = path.slice(startPart, startDot);
1612
+ ret.base = path.slice(startPart, end);
1613
+ }
1614
+ ret.ext = path.slice(startDot, end);
1615
+ }
1616
+
1617
+ if (startPart > 0) ret.dir = path.slice(0, startPart - 1);else if (isAbsolute) ret.dir = '/';
1618
+
1619
+ return ret;
1620
+ },
1621
+
1622
+ sep: '/',
1623
+ delimiter: ':',
1624
+ win32: null,
1625
+ posix: null
1626
+ };
1627
+
1628
+ posix.posix = posix;
1629
+
1630
+ module.exports = posix;
1631
+
1632
+ }).call(this)}).call(this,require('_process'))
1633
+ },{"_process":5}],5:[function(require,module,exports){
1634
+ // shim for using process in browser
1635
+ var process = module.exports = {};
1636
+
1637
+ // cached from whatever global is present so that test runners that stub it
1638
+ // don't break things. But we need to wrap it in a try catch in case it is
1639
+ // wrapped in strict mode code which doesn't define any globals. It's inside a
1640
+ // function because try/catches deoptimize in certain engines.
1641
+
1642
+ var cachedSetTimeout;
1643
+ var cachedClearTimeout;
1644
+
1645
+ function defaultSetTimout() {
1646
+ throw new Error('setTimeout has not been defined');
1647
+ }
1648
+ function defaultClearTimeout () {
1649
+ throw new Error('clearTimeout has not been defined');
1650
+ }
1651
+ (function () {
1652
+ try {
1653
+ if (typeof setTimeout === 'function') {
1654
+ cachedSetTimeout = setTimeout;
1655
+ } else {
1656
+ cachedSetTimeout = defaultSetTimout;
1657
+ }
1658
+ } catch (e) {
1659
+ cachedSetTimeout = defaultSetTimout;
1660
+ }
1661
+ try {
1662
+ if (typeof clearTimeout === 'function') {
1663
+ cachedClearTimeout = clearTimeout;
1664
+ } else {
1665
+ cachedClearTimeout = defaultClearTimeout;
1666
+ }
1667
+ } catch (e) {
1668
+ cachedClearTimeout = defaultClearTimeout;
1669
+ }
1670
+ } ())
1671
+ function runTimeout(fun) {
1672
+ if (cachedSetTimeout === setTimeout) {
1673
+ //normal enviroments in sane situations
1674
+ return setTimeout(fun, 0);
1675
+ }
1676
+ // if setTimeout wasn't available but was latter defined
1677
+ if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
1678
+ cachedSetTimeout = setTimeout;
1679
+ return setTimeout(fun, 0);
1680
+ }
1681
+ try {
1682
+ // when when somebody has screwed with setTimeout but no I.E. maddness
1683
+ return cachedSetTimeout(fun, 0);
1684
+ } catch(e){
1685
+ try {
1686
+ // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
1687
+ return cachedSetTimeout.call(null, fun, 0);
1688
+ } catch(e){
1689
+ // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
1690
+ return cachedSetTimeout.call(this, fun, 0);
1691
+ }
1692
+ }
1693
+
1694
+
1695
+ }
1696
+ function runClearTimeout(marker) {
1697
+ if (cachedClearTimeout === clearTimeout) {
1698
+ //normal enviroments in sane situations
1699
+ return clearTimeout(marker);
1700
+ }
1701
+ // if clearTimeout wasn't available but was latter defined
1702
+ if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
1703
+ cachedClearTimeout = clearTimeout;
1704
+ return clearTimeout(marker);
1705
+ }
1706
+ try {
1707
+ // when when somebody has screwed with setTimeout but no I.E. maddness
1708
+ return cachedClearTimeout(marker);
1709
+ } catch (e){
1710
+ try {
1711
+ // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
1712
+ return cachedClearTimeout.call(null, marker);
1713
+ } catch (e){
1714
+ // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
1715
+ // Some versions of I.E. have different rules for clearTimeout vs setTimeout
1716
+ return cachedClearTimeout.call(this, marker);
1717
+ }
1718
+ }
1719
+
1720
+
1721
+
1722
+ }
1723
+ var queue = [];
1724
+ var draining = false;
1725
+ var currentQueue;
1726
+ var queueIndex = -1;
1727
+
1728
+ function cleanUpNextTick() {
1729
+ if (!draining || !currentQueue) {
1730
+ return;
1731
+ }
1732
+ draining = false;
1733
+ if (currentQueue.length) {
1734
+ queue = currentQueue.concat(queue);
1735
+ } else {
1736
+ queueIndex = -1;
1737
+ }
1738
+ if (queue.length) {
1739
+ drainQueue();
1740
+ }
1741
+ }
1742
+
1743
+ function drainQueue() {
1744
+ if (draining) {
1745
+ return;
1746
+ }
1747
+ var timeout = runTimeout(cleanUpNextTick);
1748
+ draining = true;
1749
+
1750
+ var len = queue.length;
1751
+ while(len) {
1752
+ currentQueue = queue;
1753
+ queue = [];
1754
+ while (++queueIndex < len) {
1755
+ if (currentQueue) {
1756
+ currentQueue[queueIndex].run();
1757
+ }
1758
+ }
1759
+ queueIndex = -1;
1760
+ len = queue.length;
1761
+ }
1762
+ currentQueue = null;
1763
+ draining = false;
1764
+ runClearTimeout(timeout);
1765
+ }
1766
+
1767
+ process.nextTick = function (fun) {
1768
+ var args = new Array(arguments.length - 1);
1769
+ if (arguments.length > 1) {
1770
+ for (var i = 1; i < arguments.length; i++) {
1771
+ args[i - 1] = arguments[i];
1772
+ }
1773
+ }
1774
+ queue.push(new Item(fun, args));
1775
+ if (queue.length === 1 && !draining) {
1776
+ runTimeout(drainQueue);
1777
+ }
1778
+ };
1779
+
1780
+ // v8 likes predictible objects
1781
+ function Item(fun, array) {
1782
+ this.fun = fun;
1783
+ this.array = array;
1784
+ }
1785
+ Item.prototype.run = function () {
1786
+ this.fun.apply(null, this.array);
1787
+ };
1788
+ process.title = 'browser';
1789
+ process.browser = true;
1790
+ process.env = {};
1791
+ process.argv = [];
1792
+ process.version = ''; // empty string to avoid regexp issues
1793
+ process.versions = {};
1794
+
1795
+ function noop() {}
1796
+
1797
+ process.on = noop;
1798
+ process.addListener = noop;
1799
+ process.once = noop;
1800
+ process.off = noop;
1801
+ process.removeListener = noop;
1802
+ process.removeAllListeners = noop;
1803
+ process.emit = noop;
1804
+ process.prependListener = noop;
1805
+ process.prependOnceListener = noop;
1806
+
1807
+ process.listeners = function (name) { return [] }
1808
+
1809
+ process.binding = function (name) {
1810
+ throw new Error('process.binding is not supported');
1811
+ };
1812
+
1813
+ process.cwd = function () { return '/' };
1814
+ process.chdir = function (dir) {
1815
+ throw new Error('process.chdir is not supported');
1816
+ };
1817
+ process.umask = function() { return 0; };
1818
+
1819
+ },{}]},{},[1])(1)
1820
+ });