koa-classic-server 1.0.0 → 1.0.2

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 (1120) hide show
  1. package/README.md +117 -0
  2. package/package.json +5 -6
  3. package/Readme.md +0 -102
  4. package/test/node_modules/.package-lock.json +0 -1254
  5. package/test/node_modules/abbrev/LICENSE +0 -46
  6. package/test/node_modules/abbrev/README.md +0 -23
  7. package/test/node_modules/abbrev/abbrev.js +0 -61
  8. package/test/node_modules/abbrev/package.json +0 -21
  9. package/test/node_modules/accepts/HISTORY.md +0 -243
  10. package/test/node_modules/accepts/LICENSE +0 -23
  11. package/test/node_modules/accepts/README.md +0 -140
  12. package/test/node_modules/accepts/index.js +0 -238
  13. package/test/node_modules/accepts/package.json +0 -47
  14. package/test/node_modules/ansi-styles/index.d.ts +0 -345
  15. package/test/node_modules/ansi-styles/index.js +0 -163
  16. package/test/node_modules/ansi-styles/license +0 -9
  17. package/test/node_modules/ansi-styles/package.json +0 -56
  18. package/test/node_modules/ansi-styles/readme.md +0 -152
  19. package/test/node_modules/any-promise/.jshintrc +0 -4
  20. package/test/node_modules/any-promise/LICENSE +0 -19
  21. package/test/node_modules/any-promise/README.md +0 -161
  22. package/test/node_modules/any-promise/implementation.d.ts +0 -3
  23. package/test/node_modules/any-promise/implementation.js +0 -1
  24. package/test/node_modules/any-promise/index.d.ts +0 -73
  25. package/test/node_modules/any-promise/index.js +0 -1
  26. package/test/node_modules/any-promise/loader.js +0 -78
  27. package/test/node_modules/any-promise/optional.js +0 -6
  28. package/test/node_modules/any-promise/package.json +0 -45
  29. package/test/node_modules/any-promise/register/bluebird.d.ts +0 -1
  30. package/test/node_modules/any-promise/register/bluebird.js +0 -2
  31. package/test/node_modules/any-promise/register/es6-promise.d.ts +0 -1
  32. package/test/node_modules/any-promise/register/es6-promise.js +0 -2
  33. package/test/node_modules/any-promise/register/lie.d.ts +0 -1
  34. package/test/node_modules/any-promise/register/lie.js +0 -2
  35. package/test/node_modules/any-promise/register/native-promise-only.d.ts +0 -1
  36. package/test/node_modules/any-promise/register/native-promise-only.js +0 -2
  37. package/test/node_modules/any-promise/register/pinkie.d.ts +0 -1
  38. package/test/node_modules/any-promise/register/pinkie.js +0 -2
  39. package/test/node_modules/any-promise/register/promise.d.ts +0 -1
  40. package/test/node_modules/any-promise/register/promise.js +0 -2
  41. package/test/node_modules/any-promise/register/q.d.ts +0 -1
  42. package/test/node_modules/any-promise/register/q.js +0 -2
  43. package/test/node_modules/any-promise/register/rsvp.d.ts +0 -1
  44. package/test/node_modules/any-promise/register/rsvp.js +0 -2
  45. package/test/node_modules/any-promise/register/vow.d.ts +0 -1
  46. package/test/node_modules/any-promise/register/vow.js +0 -2
  47. package/test/node_modules/any-promise/register/when.d.ts +0 -1
  48. package/test/node_modules/any-promise/register/when.js +0 -2
  49. package/test/node_modules/any-promise/register-shim.js +0 -18
  50. package/test/node_modules/any-promise/register.d.ts +0 -17
  51. package/test/node_modules/any-promise/register.js +0 -94
  52. package/test/node_modules/anymatch/LICENSE +0 -15
  53. package/test/node_modules/anymatch/README.md +0 -87
  54. package/test/node_modules/anymatch/index.d.ts +0 -20
  55. package/test/node_modules/anymatch/index.js +0 -104
  56. package/test/node_modules/anymatch/package.json +0 -48
  57. package/test/node_modules/async/CHANGELOG.md +0 -348
  58. package/test/node_modules/async/LICENSE +0 -19
  59. package/test/node_modules/async/README.md +0 -59
  60. package/test/node_modules/async/all.js +0 -119
  61. package/test/node_modules/async/allLimit.js +0 -46
  62. package/test/node_modules/async/allSeries.js +0 -45
  63. package/test/node_modules/async/any.js +0 -122
  64. package/test/node_modules/async/anyLimit.js +0 -47
  65. package/test/node_modules/async/anySeries.js +0 -46
  66. package/test/node_modules/async/apply.js +0 -55
  67. package/test/node_modules/async/applyEach.js +0 -57
  68. package/test/node_modules/async/applyEachSeries.js +0 -37
  69. package/test/node_modules/async/asyncify.js +0 -118
  70. package/test/node_modules/async/auto.js +0 -333
  71. package/test/node_modules/async/autoInject.js +0 -182
  72. package/test/node_modules/async/bower.json +0 -17
  73. package/test/node_modules/async/cargo.js +0 -63
  74. package/test/node_modules/async/cargoQueue.js +0 -71
  75. package/test/node_modules/async/compose.js +0 -55
  76. package/test/node_modules/async/concat.js +0 -115
  77. package/test/node_modules/async/concatLimit.js +0 -60
  78. package/test/node_modules/async/concatSeries.js +0 -41
  79. package/test/node_modules/async/constant.js +0 -55
  80. package/test/node_modules/async/detect.js +0 -96
  81. package/test/node_modules/async/detectLimit.js +0 -48
  82. package/test/node_modules/async/detectSeries.js +0 -47
  83. package/test/node_modules/async/dir.js +0 -43
  84. package/test/node_modules/async/dist/async.js +0 -6059
  85. package/test/node_modules/async/dist/async.min.js +0 -1
  86. package/test/node_modules/async/dist/async.mjs +0 -5947
  87. package/test/node_modules/async/doDuring.js +0 -68
  88. package/test/node_modules/async/doUntil.js +0 -46
  89. package/test/node_modules/async/doWhilst.js +0 -68
  90. package/test/node_modules/async/during.js +0 -78
  91. package/test/node_modules/async/each.js +0 -129
  92. package/test/node_modules/async/eachLimit.js +0 -50
  93. package/test/node_modules/async/eachOf.js +0 -185
  94. package/test/node_modules/async/eachOfLimit.js +0 -47
  95. package/test/node_modules/async/eachOfSeries.js +0 -39
  96. package/test/node_modules/async/eachSeries.js +0 -44
  97. package/test/node_modules/async/ensureAsync.js +0 -67
  98. package/test/node_modules/async/every.js +0 -119
  99. package/test/node_modules/async/everyLimit.js +0 -46
  100. package/test/node_modules/async/everySeries.js +0 -45
  101. package/test/node_modules/async/filter.js +0 -93
  102. package/test/node_modules/async/filterLimit.js +0 -45
  103. package/test/node_modules/async/filterSeries.js +0 -43
  104. package/test/node_modules/async/find.js +0 -96
  105. package/test/node_modules/async/findLimit.js +0 -48
  106. package/test/node_modules/async/findSeries.js +0 -47
  107. package/test/node_modules/async/flatMap.js +0 -115
  108. package/test/node_modules/async/flatMapLimit.js +0 -60
  109. package/test/node_modules/async/flatMapSeries.js +0 -41
  110. package/test/node_modules/async/foldl.js +0 -153
  111. package/test/node_modules/async/foldr.js +0 -41
  112. package/test/node_modules/async/forEach.js +0 -129
  113. package/test/node_modules/async/forEachLimit.js +0 -50
  114. package/test/node_modules/async/forEachOf.js +0 -185
  115. package/test/node_modules/async/forEachOfLimit.js +0 -47
  116. package/test/node_modules/async/forEachOfSeries.js +0 -39
  117. package/test/node_modules/async/forEachSeries.js +0 -44
  118. package/test/node_modules/async/forever.js +0 -68
  119. package/test/node_modules/async/groupBy.js +0 -108
  120. package/test/node_modules/async/groupByLimit.js +0 -71
  121. package/test/node_modules/async/groupBySeries.js +0 -36
  122. package/test/node_modules/async/index.js +0 -588
  123. package/test/node_modules/async/inject.js +0 -153
  124. package/test/node_modules/async/internal/DoublyLinkedList.js +0 -92
  125. package/test/node_modules/async/internal/Heap.js +0 -120
  126. package/test/node_modules/async/internal/applyEach.js +0 -29
  127. package/test/node_modules/async/internal/asyncEachOfLimit.js +0 -75
  128. package/test/node_modules/async/internal/awaitify.js +0 -27
  129. package/test/node_modules/async/internal/breakLoop.js +0 -10
  130. package/test/node_modules/async/internal/consoleFunc.js +0 -31
  131. package/test/node_modules/async/internal/createTester.js +0 -40
  132. package/test/node_modules/async/internal/eachOfLimit.js +0 -90
  133. package/test/node_modules/async/internal/filter.js +0 -55
  134. package/test/node_modules/async/internal/getIterator.js +0 -11
  135. package/test/node_modules/async/internal/initialParams.js +0 -14
  136. package/test/node_modules/async/internal/isArrayLike.js +0 -10
  137. package/test/node_modules/async/internal/iterator.js +0 -57
  138. package/test/node_modules/async/internal/map.js +0 -30
  139. package/test/node_modules/async/internal/once.js +0 -17
  140. package/test/node_modules/async/internal/onlyOnce.js +0 -15
  141. package/test/node_modules/async/internal/parallel.js +0 -34
  142. package/test/node_modules/async/internal/promiseCallback.js +0 -23
  143. package/test/node_modules/async/internal/queue.js +0 -294
  144. package/test/node_modules/async/internal/range.js +0 -14
  145. package/test/node_modules/async/internal/reject.js +0 -26
  146. package/test/node_modules/async/internal/setImmediate.js +0 -34
  147. package/test/node_modules/async/internal/withoutIndex.js +0 -10
  148. package/test/node_modules/async/internal/wrapAsync.js +0 -34
  149. package/test/node_modules/async/log.js +0 -41
  150. package/test/node_modules/async/map.js +0 -142
  151. package/test/node_modules/async/mapLimit.js +0 -45
  152. package/test/node_modules/async/mapSeries.js +0 -44
  153. package/test/node_modules/async/mapValues.js +0 -152
  154. package/test/node_modules/async/mapValuesLimit.js +0 -61
  155. package/test/node_modules/async/mapValuesSeries.js +0 -37
  156. package/test/node_modules/async/memoize.js +0 -91
  157. package/test/node_modules/async/nextTick.js +0 -52
  158. package/test/node_modules/async/package.json +0 -75
  159. package/test/node_modules/async/parallel.js +0 -180
  160. package/test/node_modules/async/parallelLimit.js +0 -41
  161. package/test/node_modules/async/priorityQueue.js +0 -86
  162. package/test/node_modules/async/queue.js +0 -167
  163. package/test/node_modules/async/race.js +0 -67
  164. package/test/node_modules/async/reduce.js +0 -153
  165. package/test/node_modules/async/reduceRight.js +0 -41
  166. package/test/node_modules/async/reflect.js +0 -78
  167. package/test/node_modules/async/reflectAll.js +0 -93
  168. package/test/node_modules/async/reject.js +0 -87
  169. package/test/node_modules/async/rejectLimit.js +0 -45
  170. package/test/node_modules/async/rejectSeries.js +0 -43
  171. package/test/node_modules/async/retry.js +0 -159
  172. package/test/node_modules/async/retryable.js +0 -77
  173. package/test/node_modules/async/select.js +0 -93
  174. package/test/node_modules/async/selectLimit.js +0 -45
  175. package/test/node_modules/async/selectSeries.js +0 -43
  176. package/test/node_modules/async/seq.js +0 -79
  177. package/test/node_modules/async/series.js +0 -186
  178. package/test/node_modules/async/setImmediate.js +0 -45
  179. package/test/node_modules/async/some.js +0 -122
  180. package/test/node_modules/async/someLimit.js +0 -47
  181. package/test/node_modules/async/someSeries.js +0 -46
  182. package/test/node_modules/async/sortBy.js +0 -190
  183. package/test/node_modules/async/timeout.js +0 -89
  184. package/test/node_modules/async/times.js +0 -50
  185. package/test/node_modules/async/timesLimit.js +0 -43
  186. package/test/node_modules/async/timesSeries.js +0 -32
  187. package/test/node_modules/async/transform.js +0 -173
  188. package/test/node_modules/async/tryEach.js +0 -78
  189. package/test/node_modules/async/unmemoize.js +0 -25
  190. package/test/node_modules/async/until.js +0 -61
  191. package/test/node_modules/async/waterfall.js +0 -105
  192. package/test/node_modules/async/whilst.js +0 -78
  193. package/test/node_modules/async/wrapSync.js +0 -118
  194. package/test/node_modules/balanced-match/.github/FUNDING.yml +0 -2
  195. package/test/node_modules/balanced-match/LICENSE.md +0 -21
  196. package/test/node_modules/balanced-match/README.md +0 -97
  197. package/test/node_modules/balanced-match/index.js +0 -62
  198. package/test/node_modules/balanced-match/package.json +0 -48
  199. package/test/node_modules/binary-extensions/binary-extensions.json +0 -260
  200. package/test/node_modules/binary-extensions/binary-extensions.json.d.ts +0 -3
  201. package/test/node_modules/binary-extensions/index.d.ts +0 -14
  202. package/test/node_modules/binary-extensions/index.js +0 -1
  203. package/test/node_modules/binary-extensions/license +0 -9
  204. package/test/node_modules/binary-extensions/package.json +0 -38
  205. package/test/node_modules/binary-extensions/readme.md +0 -41
  206. package/test/node_modules/bluebird/LICENSE +0 -21
  207. package/test/node_modules/bluebird/README.md +0 -57
  208. package/test/node_modules/bluebird/changelog.md +0 -1
  209. package/test/node_modules/bluebird/js/browser/bluebird.core.js +0 -3914
  210. package/test/node_modules/bluebird/js/browser/bluebird.core.min.js +0 -31
  211. package/test/node_modules/bluebird/js/browser/bluebird.js +0 -5778
  212. package/test/node_modules/bluebird/js/browser/bluebird.min.js +0 -31
  213. package/test/node_modules/bluebird/js/release/any.js +0 -21
  214. package/test/node_modules/bluebird/js/release/assert.js +0 -55
  215. package/test/node_modules/bluebird/js/release/async.js +0 -120
  216. package/test/node_modules/bluebird/js/release/bind.js +0 -67
  217. package/test/node_modules/bluebird/js/release/bluebird.js +0 -11
  218. package/test/node_modules/bluebird/js/release/call_get.js +0 -123
  219. package/test/node_modules/bluebird/js/release/cancel.js +0 -129
  220. package/test/node_modules/bluebird/js/release/catch_filter.js +0 -42
  221. package/test/node_modules/bluebird/js/release/context.js +0 -69
  222. package/test/node_modules/bluebird/js/release/debuggability.js +0 -1009
  223. package/test/node_modules/bluebird/js/release/direct_resolve.js +0 -46
  224. package/test/node_modules/bluebird/js/release/each.js +0 -30
  225. package/test/node_modules/bluebird/js/release/errors.js +0 -116
  226. package/test/node_modules/bluebird/js/release/es5.js +0 -80
  227. package/test/node_modules/bluebird/js/release/filter.js +0 -12
  228. package/test/node_modules/bluebird/js/release/finally.js +0 -146
  229. package/test/node_modules/bluebird/js/release/generators.js +0 -223
  230. package/test/node_modules/bluebird/js/release/join.js +0 -165
  231. package/test/node_modules/bluebird/js/release/map.js +0 -175
  232. package/test/node_modules/bluebird/js/release/method.js +0 -55
  233. package/test/node_modules/bluebird/js/release/nodeback.js +0 -51
  234. package/test/node_modules/bluebird/js/release/nodeify.js +0 -58
  235. package/test/node_modules/bluebird/js/release/promise.js +0 -819
  236. package/test/node_modules/bluebird/js/release/promise_array.js +0 -186
  237. package/test/node_modules/bluebird/js/release/promisify.js +0 -314
  238. package/test/node_modules/bluebird/js/release/props.js +0 -118
  239. package/test/node_modules/bluebird/js/release/queue.js +0 -73
  240. package/test/node_modules/bluebird/js/release/race.js +0 -49
  241. package/test/node_modules/bluebird/js/release/reduce.js +0 -183
  242. package/test/node_modules/bluebird/js/release/schedule.js +0 -62
  243. package/test/node_modules/bluebird/js/release/settle.js +0 -47
  244. package/test/node_modules/bluebird/js/release/some.js +0 -148
  245. package/test/node_modules/bluebird/js/release/synchronous_inspection.js +0 -103
  246. package/test/node_modules/bluebird/js/release/thenables.js +0 -86
  247. package/test/node_modules/bluebird/js/release/timers.js +0 -93
  248. package/test/node_modules/bluebird/js/release/using.js +0 -226
  249. package/test/node_modules/bluebird/js/release/util.js +0 -421
  250. package/test/node_modules/bluebird/package.json +0 -78
  251. package/test/node_modules/brace-expansion/LICENSE +0 -21
  252. package/test/node_modules/brace-expansion/README.md +0 -129
  253. package/test/node_modules/brace-expansion/index.js +0 -201
  254. package/test/node_modules/brace-expansion/package.json +0 -47
  255. package/test/node_modules/braces/CHANGELOG.md +0 -184
  256. package/test/node_modules/braces/LICENSE +0 -21
  257. package/test/node_modules/braces/README.md +0 -593
  258. package/test/node_modules/braces/index.js +0 -170
  259. package/test/node_modules/braces/lib/compile.js +0 -57
  260. package/test/node_modules/braces/lib/constants.js +0 -57
  261. package/test/node_modules/braces/lib/expand.js +0 -113
  262. package/test/node_modules/braces/lib/parse.js +0 -333
  263. package/test/node_modules/braces/lib/stringify.js +0 -32
  264. package/test/node_modules/braces/lib/utils.js +0 -112
  265. package/test/node_modules/braces/package.json +0 -77
  266. package/test/node_modules/cache-content-type/History.md +0 -15
  267. package/test/node_modules/cache-content-type/README.md +0 -17
  268. package/test/node_modules/cache-content-type/index.js +0 -15
  269. package/test/node_modules/cache-content-type/package.json +0 -42
  270. package/test/node_modules/chalk/index.d.ts +0 -415
  271. package/test/node_modules/chalk/license +0 -9
  272. package/test/node_modules/chalk/package.json +0 -68
  273. package/test/node_modules/chalk/readme.md +0 -341
  274. package/test/node_modules/chalk/source/index.js +0 -229
  275. package/test/node_modules/chalk/source/templates.js +0 -134
  276. package/test/node_modules/chalk/source/util.js +0 -39
  277. package/test/node_modules/chokidar/LICENSE +0 -21
  278. package/test/node_modules/chokidar/README.md +0 -308
  279. package/test/node_modules/chokidar/index.js +0 -973
  280. package/test/node_modules/chokidar/lib/constants.js +0 -65
  281. package/test/node_modules/chokidar/lib/fsevents-handler.js +0 -524
  282. package/test/node_modules/chokidar/lib/nodefs-handler.js +0 -654
  283. package/test/node_modules/chokidar/package.json +0 -85
  284. package/test/node_modules/chokidar/types/index.d.ts +0 -188
  285. package/test/node_modules/co/History.md +0 -172
  286. package/test/node_modules/co/LICENSE +0 -22
  287. package/test/node_modules/co/Readme.md +0 -212
  288. package/test/node_modules/co/index.js +0 -237
  289. package/test/node_modules/co/package.json +0 -34
  290. package/test/node_modules/color-convert/CHANGELOG.md +0 -54
  291. package/test/node_modules/color-convert/LICENSE +0 -21
  292. package/test/node_modules/color-convert/README.md +0 -68
  293. package/test/node_modules/color-convert/conversions.js +0 -839
  294. package/test/node_modules/color-convert/index.js +0 -81
  295. package/test/node_modules/color-convert/package.json +0 -48
  296. package/test/node_modules/color-convert/route.js +0 -97
  297. package/test/node_modules/color-name/LICENSE +0 -8
  298. package/test/node_modules/color-name/README.md +0 -11
  299. package/test/node_modules/color-name/index.js +0 -152
  300. package/test/node_modules/color-name/package.json +0 -28
  301. package/test/node_modules/commander/CHANGELOG.md +0 -419
  302. package/test/node_modules/commander/LICENSE +0 -22
  303. package/test/node_modules/commander/Readme.md +0 -428
  304. package/test/node_modules/commander/index.js +0 -1224
  305. package/test/node_modules/commander/package.json +0 -38
  306. package/test/node_modules/commander/typings/index.d.ts +0 -310
  307. package/test/node_modules/concat-map/.travis.yml +0 -4
  308. package/test/node_modules/concat-map/LICENSE +0 -18
  309. package/test/node_modules/concat-map/README.markdown +0 -62
  310. package/test/node_modules/concat-map/example/map.js +0 -6
  311. package/test/node_modules/concat-map/index.js +0 -13
  312. package/test/node_modules/concat-map/package.json +0 -43
  313. package/test/node_modules/concat-map/test/map.js +0 -39
  314. package/test/node_modules/condense-newlines/LICENSE +0 -21
  315. package/test/node_modules/condense-newlines/README.md +0 -105
  316. package/test/node_modules/condense-newlines/index.js +0 -60
  317. package/test/node_modules/condense-newlines/package.json +0 -64
  318. package/test/node_modules/config-chain/LICENCE +0 -22
  319. package/test/node_modules/config-chain/index.js +0 -282
  320. package/test/node_modules/config-chain/package.json +0 -28
  321. package/test/node_modules/config-chain/readme.markdown +0 -257
  322. package/test/node_modules/consolidate/History.md +0 -132
  323. package/test/node_modules/consolidate/Readme.md +0 -223
  324. package/test/node_modules/consolidate/index.js +0 -1
  325. package/test/node_modules/consolidate/lib/consolidate.js +0 -1792
  326. package/test/node_modules/consolidate/package.json +0 -94
  327. package/test/node_modules/content-disposition/HISTORY.md +0 -60
  328. package/test/node_modules/content-disposition/LICENSE +0 -22
  329. package/test/node_modules/content-disposition/README.md +0 -142
  330. package/test/node_modules/content-disposition/index.js +0 -458
  331. package/test/node_modules/content-disposition/package.json +0 -44
  332. package/test/node_modules/content-type/HISTORY.md +0 -24
  333. package/test/node_modules/content-type/LICENSE +0 -22
  334. package/test/node_modules/content-type/README.md +0 -92
  335. package/test/node_modules/content-type/index.js +0 -222
  336. package/test/node_modules/content-type/package.json +0 -40
  337. package/test/node_modules/cookies/HISTORY.md +0 -121
  338. package/test/node_modules/cookies/LICENSE +0 -23
  339. package/test/node_modules/cookies/README.md +0 -145
  340. package/test/node_modules/cookies/index.js +0 -224
  341. package/test/node_modules/cookies/package.json +0 -38
  342. package/test/node_modules/debug/LICENSE +0 -20
  343. package/test/node_modules/debug/README.md +0 -481
  344. package/test/node_modules/debug/package.json +0 -59
  345. package/test/node_modules/debug/src/browser.js +0 -269
  346. package/test/node_modules/debug/src/common.js +0 -274
  347. package/test/node_modules/debug/src/index.js +0 -10
  348. package/test/node_modules/debug/src/node.js +0 -263
  349. package/test/node_modules/deep-equal/.travis.yml +0 -8
  350. package/test/node_modules/deep-equal/LICENSE +0 -18
  351. package/test/node_modules/deep-equal/example/cmp.js +0 -11
  352. package/test/node_modules/deep-equal/index.js +0 -94
  353. package/test/node_modules/deep-equal/lib/is_arguments.js +0 -20
  354. package/test/node_modules/deep-equal/lib/keys.js +0 -9
  355. package/test/node_modules/deep-equal/package.json +0 -58
  356. package/test/node_modules/deep-equal/readme.markdown +0 -61
  357. package/test/node_modules/deep-equal/test/cmp.js +0 -95
  358. package/test/node_modules/delegates/History.md +0 -22
  359. package/test/node_modules/delegates/License +0 -20
  360. package/test/node_modules/delegates/Makefile +0 -8
  361. package/test/node_modules/delegates/Readme.md +0 -94
  362. package/test/node_modules/delegates/index.js +0 -121
  363. package/test/node_modules/delegates/package.json +0 -13
  364. package/test/node_modules/delegates/test/index.js +0 -94
  365. package/test/node_modules/depd/History.md +0 -103
  366. package/test/node_modules/depd/LICENSE +0 -22
  367. package/test/node_modules/depd/Readme.md +0 -280
  368. package/test/node_modules/depd/index.js +0 -538
  369. package/test/node_modules/depd/lib/browser/index.js +0 -77
  370. package/test/node_modules/depd/package.json +0 -45
  371. package/test/node_modules/destroy/LICENSE +0 -23
  372. package/test/node_modules/destroy/README.md +0 -63
  373. package/test/node_modules/destroy/index.js +0 -209
  374. package/test/node_modules/destroy/package.json +0 -48
  375. package/test/node_modules/editorconfig/CHANGELOG.md +0 -14
  376. package/test/node_modules/editorconfig/LICENSE +0 -19
  377. package/test/node_modules/editorconfig/README.md +0 -206
  378. package/test/node_modules/editorconfig/bin/editorconfig +0 -3
  379. package/test/node_modules/editorconfig/package.json +0 -59
  380. package/test/node_modules/editorconfig/src/cli.d.ts +0 -1
  381. package/test/node_modules/editorconfig/src/cli.js +0 -53
  382. package/test/node_modules/editorconfig/src/index.d.ts +0 -29
  383. package/test/node_modules/editorconfig/src/index.js +0 -261
  384. package/test/node_modules/editorconfig/src/lib/fnmatch.d.ts +0 -214
  385. package/test/node_modules/editorconfig/src/lib/fnmatch.js +0 -1047
  386. package/test/node_modules/editorconfig/src/lib/ini.d.ts +0 -14
  387. package/test/node_modules/editorconfig/src/lib/ini.js +0 -106
  388. package/test/node_modules/ee-first/LICENSE +0 -22
  389. package/test/node_modules/ee-first/README.md +0 -80
  390. package/test/node_modules/ee-first/index.js +0 -95
  391. package/test/node_modules/ee-first/package.json +0 -29
  392. package/test/node_modules/ejs/LICENSE +0 -202
  393. package/test/node_modules/ejs/README.md +0 -344
  394. package/test/node_modules/ejs/bin/cli.js +0 -212
  395. package/test/node_modules/ejs/ejs.js +0 -1720
  396. package/test/node_modules/ejs/ejs.min.js +0 -1
  397. package/test/node_modules/ejs/jakefile.js +0 -88
  398. package/test/node_modules/ejs/lib/ejs.js +0 -951
  399. package/test/node_modules/ejs/lib/utils.js +0 -225
  400. package/test/node_modules/ejs/package.json +0 -42
  401. package/test/node_modules/ejs/usage.txt +0 -24
  402. package/test/node_modules/encodeurl/HISTORY.md +0 -14
  403. package/test/node_modules/encodeurl/LICENSE +0 -22
  404. package/test/node_modules/encodeurl/README.md +0 -128
  405. package/test/node_modules/encodeurl/index.js +0 -60
  406. package/test/node_modules/encodeurl/package.json +0 -40
  407. package/test/node_modules/escape-html/LICENSE +0 -24
  408. package/test/node_modules/escape-html/Readme.md +0 -43
  409. package/test/node_modules/escape-html/index.js +0 -78
  410. package/test/node_modules/escape-html/package.json +0 -24
  411. package/test/node_modules/extend-shallow/LICENSE +0 -21
  412. package/test/node_modules/extend-shallow/README.md +0 -61
  413. package/test/node_modules/extend-shallow/index.js +0 -33
  414. package/test/node_modules/extend-shallow/package.json +0 -56
  415. package/test/node_modules/filelist/README.md +0 -84
  416. package/test/node_modules/filelist/index.d.ts +0 -110
  417. package/test/node_modules/filelist/index.js +0 -495
  418. package/test/node_modules/filelist/jakefile.js +0 -15
  419. package/test/node_modules/filelist/node_modules/brace-expansion/.github/FUNDING.yml +0 -2
  420. package/test/node_modules/filelist/node_modules/brace-expansion/LICENSE +0 -21
  421. package/test/node_modules/filelist/node_modules/brace-expansion/README.md +0 -135
  422. package/test/node_modules/filelist/node_modules/brace-expansion/index.js +0 -203
  423. package/test/node_modules/filelist/node_modules/brace-expansion/package.json +0 -46
  424. package/test/node_modules/filelist/node_modules/minimatch/LICENSE +0 -15
  425. package/test/node_modules/filelist/node_modules/minimatch/README.md +0 -259
  426. package/test/node_modules/filelist/node_modules/minimatch/lib/path.js +0 -4
  427. package/test/node_modules/filelist/node_modules/minimatch/minimatch.js +0 -906
  428. package/test/node_modules/filelist/node_modules/minimatch/package.json +0 -32
  429. package/test/node_modules/filelist/package.json +0 -28
  430. package/test/node_modules/fill-range/LICENSE +0 -21
  431. package/test/node_modules/fill-range/README.md +0 -237
  432. package/test/node_modules/fill-range/index.js +0 -249
  433. package/test/node_modules/fill-range/package.json +0 -69
  434. package/test/node_modules/fresh/HISTORY.md +0 -70
  435. package/test/node_modules/fresh/LICENSE +0 -23
  436. package/test/node_modules/fresh/README.md +0 -119
  437. package/test/node_modules/fresh/index.js +0 -137
  438. package/test/node_modules/fresh/package.json +0 -46
  439. package/test/node_modules/fs.realpath/LICENSE +0 -43
  440. package/test/node_modules/fs.realpath/README.md +0 -33
  441. package/test/node_modules/fs.realpath/index.js +0 -66
  442. package/test/node_modules/fs.realpath/old.js +0 -303
  443. package/test/node_modules/fs.realpath/package.json +0 -26
  444. package/test/node_modules/get-paths/.editorconfig +0 -9
  445. package/test/node_modules/get-paths/.gitattributes +0 -1
  446. package/test/node_modules/get-paths/.lib.eslintrc +0 -3
  447. package/test/node_modules/get-paths/.remarkignore +0 -1
  448. package/test/node_modules/get-paths/.travis.yml +0 -6
  449. package/test/node_modules/get-paths/LICENSE +0 -21
  450. package/test/node_modules/get-paths/README.md +0 -61
  451. package/test/node_modules/get-paths/index.js +0 -31
  452. package/test/node_modules/get-paths/package.json +0 -100
  453. package/test/node_modules/get-paths/test/test.js +0 -7
  454. package/test/node_modules/glob/LICENSE +0 -15
  455. package/test/node_modules/glob/README.md +0 -378
  456. package/test/node_modules/glob/common.js +0 -240
  457. package/test/node_modules/glob/glob.js +0 -790
  458. package/test/node_modules/glob/node_modules/brace-expansion/.github/FUNDING.yml +0 -2
  459. package/test/node_modules/glob/node_modules/brace-expansion/LICENSE +0 -21
  460. package/test/node_modules/glob/node_modules/brace-expansion/README.md +0 -135
  461. package/test/node_modules/glob/node_modules/brace-expansion/index.js +0 -203
  462. package/test/node_modules/glob/node_modules/brace-expansion/package.json +0 -46
  463. package/test/node_modules/glob/node_modules/minimatch/LICENSE +0 -15
  464. package/test/node_modules/glob/node_modules/minimatch/README.md +0 -259
  465. package/test/node_modules/glob/node_modules/minimatch/lib/path.js +0 -4
  466. package/test/node_modules/glob/node_modules/minimatch/minimatch.js +0 -906
  467. package/test/node_modules/glob/node_modules/minimatch/package.json +0 -32
  468. package/test/node_modules/glob/package.json +0 -55
  469. package/test/node_modules/glob/sync.js +0 -486
  470. package/test/node_modules/glob-parent/CHANGELOG.md +0 -110
  471. package/test/node_modules/glob-parent/LICENSE +0 -15
  472. package/test/node_modules/glob-parent/README.md +0 -137
  473. package/test/node_modules/glob-parent/index.js +0 -42
  474. package/test/node_modules/glob-parent/package.json +0 -48
  475. package/test/node_modules/has-flag/index.d.ts +0 -39
  476. package/test/node_modules/has-flag/index.js +0 -8
  477. package/test/node_modules/has-flag/license +0 -9
  478. package/test/node_modules/has-flag/package.json +0 -46
  479. package/test/node_modules/has-flag/readme.md +0 -89
  480. package/test/node_modules/has-symbols/.eslintrc +0 -11
  481. package/test/node_modules/has-symbols/.github/FUNDING.yml +0 -12
  482. package/test/node_modules/has-symbols/.nycrc +0 -9
  483. package/test/node_modules/has-symbols/CHANGELOG.md +0 -75
  484. package/test/node_modules/has-symbols/LICENSE +0 -21
  485. package/test/node_modules/has-symbols/README.md +0 -46
  486. package/test/node_modules/has-symbols/index.js +0 -13
  487. package/test/node_modules/has-symbols/package.json +0 -101
  488. package/test/node_modules/has-symbols/shams.js +0 -42
  489. package/test/node_modules/has-symbols/test/index.js +0 -22
  490. package/test/node_modules/has-symbols/test/shams/core-js.js +0 -28
  491. package/test/node_modules/has-symbols/test/shams/get-own-property-symbols.js +0 -28
  492. package/test/node_modules/has-symbols/test/tests.js +0 -56
  493. package/test/node_modules/has-tostringtag/.eslintrc +0 -11
  494. package/test/node_modules/has-tostringtag/.github/FUNDING.yml +0 -12
  495. package/test/node_modules/has-tostringtag/CHANGELOG.md +0 -20
  496. package/test/node_modules/has-tostringtag/LICENSE +0 -21
  497. package/test/node_modules/has-tostringtag/README.md +0 -46
  498. package/test/node_modules/has-tostringtag/index.js +0 -7
  499. package/test/node_modules/has-tostringtag/package.json +0 -84
  500. package/test/node_modules/has-tostringtag/shams.js +0 -7
  501. package/test/node_modules/has-tostringtag/test/index.js +0 -21
  502. package/test/node_modules/has-tostringtag/test/shams/core-js.js +0 -28
  503. package/test/node_modules/has-tostringtag/test/shams/get-own-property-symbols.js +0 -28
  504. package/test/node_modules/has-tostringtag/test/tests.js +0 -14
  505. package/test/node_modules/http-assert/HISTORY.md +0 -79
  506. package/test/node_modules/http-assert/LICENSE +0 -22
  507. package/test/node_modules/http-assert/README.md +0 -116
  508. package/test/node_modules/http-assert/index.js +0 -41
  509. package/test/node_modules/http-assert/package.json +0 -41
  510. package/test/node_modules/http-errors/HISTORY.md +0 -165
  511. package/test/node_modules/http-errors/LICENSE +0 -23
  512. package/test/node_modules/http-errors/README.md +0 -169
  513. package/test/node_modules/http-errors/index.js +0 -299
  514. package/test/node_modules/http-errors/node_modules/depd/History.md +0 -96
  515. package/test/node_modules/http-errors/node_modules/depd/LICENSE +0 -22
  516. package/test/node_modules/http-errors/node_modules/depd/Readme.md +0 -280
  517. package/test/node_modules/http-errors/node_modules/depd/index.js +0 -522
  518. package/test/node_modules/http-errors/node_modules/depd/lib/browser/index.js +0 -77
  519. package/test/node_modules/http-errors/node_modules/depd/lib/compat/callsite-tostring.js +0 -103
  520. package/test/node_modules/http-errors/node_modules/depd/lib/compat/event-listener-count.js +0 -22
  521. package/test/node_modules/http-errors/node_modules/depd/lib/compat/index.js +0 -79
  522. package/test/node_modules/http-errors/node_modules/depd/package.json +0 -41
  523. package/test/node_modules/http-errors/package.json +0 -49
  524. package/test/node_modules/ignore-by-default/LICENSE +0 -14
  525. package/test/node_modules/ignore-by-default/README.md +0 -26
  526. package/test/node_modules/ignore-by-default/index.js +0 -12
  527. package/test/node_modules/ignore-by-default/package.json +0 -34
  528. package/test/node_modules/inflight/LICENSE +0 -15
  529. package/test/node_modules/inflight/README.md +0 -37
  530. package/test/node_modules/inflight/inflight.js +0 -54
  531. package/test/node_modules/inflight/package.json +0 -29
  532. package/test/node_modules/inherits/LICENSE +0 -16
  533. package/test/node_modules/inherits/README.md +0 -42
  534. package/test/node_modules/inherits/inherits.js +0 -9
  535. package/test/node_modules/inherits/inherits_browser.js +0 -27
  536. package/test/node_modules/inherits/package.json +0 -29
  537. package/test/node_modules/ini/LICENSE +0 -15
  538. package/test/node_modules/ini/README.md +0 -102
  539. package/test/node_modules/ini/ini.js +0 -206
  540. package/test/node_modules/ini/package.json +0 -33
  541. package/test/node_modules/is-binary-path/index.d.ts +0 -17
  542. package/test/node_modules/is-binary-path/index.js +0 -7
  543. package/test/node_modules/is-binary-path/license +0 -9
  544. package/test/node_modules/is-binary-path/package.json +0 -40
  545. package/test/node_modules/is-binary-path/readme.md +0 -34
  546. package/test/node_modules/is-buffer/LICENSE +0 -21
  547. package/test/node_modules/is-buffer/README.md +0 -53
  548. package/test/node_modules/is-buffer/index.js +0 -21
  549. package/test/node_modules/is-buffer/package.json +0 -51
  550. package/test/node_modules/is-buffer/test/basic.js +0 -24
  551. package/test/node_modules/is-extendable/LICENSE +0 -21
  552. package/test/node_modules/is-extendable/README.md +0 -72
  553. package/test/node_modules/is-extendable/index.js +0 -13
  554. package/test/node_modules/is-extendable/package.json +0 -51
  555. package/test/node_modules/is-extglob/LICENSE +0 -21
  556. package/test/node_modules/is-extglob/README.md +0 -107
  557. package/test/node_modules/is-extglob/index.js +0 -20
  558. package/test/node_modules/is-extglob/package.json +0 -69
  559. package/test/node_modules/is-generator-function/.eslintignore +0 -1
  560. package/test/node_modules/is-generator-function/.eslintrc +0 -9
  561. package/test/node_modules/is-generator-function/.nvmrc +0 -1
  562. package/test/node_modules/is-generator-function/.nycrc +0 -9
  563. package/test/node_modules/is-generator-function/CHANGELOG.md +0 -216
  564. package/test/node_modules/is-generator-function/LICENSE +0 -20
  565. package/test/node_modules/is-generator-function/README.md +0 -40
  566. package/test/node_modules/is-generator-function/index.js +0 -38
  567. package/test/node_modules/is-generator-function/package.json +0 -87
  568. package/test/node_modules/is-generator-function/test/corejs.js +0 -5
  569. package/test/node_modules/is-generator-function/test/index.js +0 -83
  570. package/test/node_modules/is-generator-function/test/uglified.js +0 -8
  571. package/test/node_modules/is-glob/LICENSE +0 -21
  572. package/test/node_modules/is-glob/README.md +0 -206
  573. package/test/node_modules/is-glob/index.js +0 -150
  574. package/test/node_modules/is-glob/package.json +0 -81
  575. package/test/node_modules/is-number/LICENSE +0 -21
  576. package/test/node_modules/is-number/README.md +0 -187
  577. package/test/node_modules/is-number/index.js +0 -18
  578. package/test/node_modules/is-number/package.json +0 -82
  579. package/test/node_modules/is-whitespace/LICENSE +0 -21
  580. package/test/node_modules/is-whitespace/README.md +0 -47
  581. package/test/node_modules/is-whitespace/index.js +0 -19
  582. package/test/node_modules/is-whitespace/package.json +0 -47
  583. package/test/node_modules/jake/Makefile +0 -44
  584. package/test/node_modules/jake/README.md +0 -17
  585. package/test/node_modules/jake/bin/bash_completion.sh +0 -41
  586. package/test/node_modules/jake/bin/cli.js +0 -31
  587. package/test/node_modules/jake/jakefile.js +0 -94
  588. package/test/node_modules/jake/lib/api.js +0 -409
  589. package/test/node_modules/jake/lib/jake.js +0 -330
  590. package/test/node_modules/jake/lib/loader.js +0 -173
  591. package/test/node_modules/jake/lib/namespace.js +0 -115
  592. package/test/node_modules/jake/lib/package_task.js +0 -406
  593. package/test/node_modules/jake/lib/parseargs.js +0 -134
  594. package/test/node_modules/jake/lib/program.js +0 -282
  595. package/test/node_modules/jake/lib/publish_task.js +0 -290
  596. package/test/node_modules/jake/lib/rule.js +0 -311
  597. package/test/node_modules/jake/lib/task/directory_task.js +0 -30
  598. package/test/node_modules/jake/lib/task/file_task.js +0 -124
  599. package/test/node_modules/jake/lib/task/index.js +0 -9
  600. package/test/node_modules/jake/lib/task/task.js +0 -449
  601. package/test/node_modules/jake/lib/test_task.js +0 -270
  602. package/test/node_modules/jake/lib/utils/file.js +0 -286
  603. package/test/node_modules/jake/lib/utils/index.js +0 -297
  604. package/test/node_modules/jake/lib/utils/logger.js +0 -24
  605. package/test/node_modules/jake/package.json +0 -42
  606. package/test/node_modules/jake/test/integration/concurrent.js +0 -45
  607. package/test/node_modules/jake/test/integration/file.js +0 -228
  608. package/test/node_modules/jake/test/integration/file_task.js +0 -126
  609. package/test/node_modules/jake/test/integration/helpers.js +0 -80
  610. package/test/node_modules/jake/test/integration/jakefile.js +0 -337
  611. package/test/node_modules/jake/test/integration/jakelib/concurrent.jake.js +0 -113
  612. package/test/node_modules/jake/test/integration/jakelib/publish.jake.js +0 -49
  613. package/test/node_modules/jake/test/integration/jakelib/required_module.jake.js +0 -10
  614. package/test/node_modules/jake/test/integration/jakelib/rule.jake.js +0 -222
  615. package/test/node_modules/jake/test/integration/publish_task.js +0 -27
  616. package/test/node_modules/jake/test/integration/rule.js +0 -217
  617. package/test/node_modules/jake/test/integration/selfdep.js +0 -42
  618. package/test/node_modules/jake/test/integration/task_base.js +0 -167
  619. package/test/node_modules/jake/test/unit/jakefile.js +0 -36
  620. package/test/node_modules/jake/test/unit/namespace.js +0 -77
  621. package/test/node_modules/jake/test/unit/parseargs.js +0 -169
  622. package/test/node_modules/jake/usage.txt +0 -16
  623. package/test/node_modules/js-beautify/LICENSE +0 -9
  624. package/test/node_modules/js-beautify/README.md +0 -435
  625. package/test/node_modules/js-beautify/js/bin/css-beautify.js +0 -4
  626. package/test/node_modules/js-beautify/js/bin/html-beautify.js +0 -4
  627. package/test/node_modules/js-beautify/js/bin/js-beautify.js +0 -4
  628. package/test/node_modules/js-beautify/js/index.js +0 -86
  629. package/test/node_modules/js-beautify/js/lib/beautifier.js +0 -5982
  630. package/test/node_modules/js-beautify/js/lib/beautifier.min.js +0 -2
  631. package/test/node_modules/js-beautify/js/lib/beautify-css.js +0 -1675
  632. package/test/node_modules/js-beautify/js/lib/beautify-html.js +0 -3136
  633. package/test/node_modules/js-beautify/js/lib/beautify.js +0 -4020
  634. package/test/node_modules/js-beautify/js/lib/cli.js +0 -705
  635. package/test/node_modules/js-beautify/js/lib/unpackers/javascriptobfuscator_unpacker.js +0 -132
  636. package/test/node_modules/js-beautify/js/lib/unpackers/myobfuscate_unpacker.js +0 -119
  637. package/test/node_modules/js-beautify/js/lib/unpackers/p_a_c_k_e_r_unpacker.js +0 -119
  638. package/test/node_modules/js-beautify/js/lib/unpackers/urlencode_unpacker.js +0 -104
  639. package/test/node_modules/js-beautify/js/src/cli.js +0 -705
  640. package/test/node_modules/js-beautify/js/src/core/directives.js +0 -62
  641. package/test/node_modules/js-beautify/js/src/core/inputscanner.js +0 -192
  642. package/test/node_modules/js-beautify/js/src/core/options.js +0 -193
  643. package/test/node_modules/js-beautify/js/src/core/output.js +0 -419
  644. package/test/node_modules/js-beautify/js/src/core/pattern.js +0 -94
  645. package/test/node_modules/js-beautify/js/src/core/templatablepattern.js +0 -211
  646. package/test/node_modules/js-beautify/js/src/core/token.js +0 -54
  647. package/test/node_modules/js-beautify/js/src/core/tokenizer.js +0 -140
  648. package/test/node_modules/js-beautify/js/src/core/tokenstream.js +0 -78
  649. package/test/node_modules/js-beautify/js/src/core/whitespacepattern.js +0 -105
  650. package/test/node_modules/js-beautify/js/src/css/beautifier.js +0 -529
  651. package/test/node_modules/js-beautify/js/src/css/index.js +0 -42
  652. package/test/node_modules/js-beautify/js/src/css/options.js +0 -56
  653. package/test/node_modules/js-beautify/js/src/css/tokenizer.js +0 -29
  654. package/test/node_modules/js-beautify/js/src/html/beautifier.js +0 -878
  655. package/test/node_modules/js-beautify/js/src/html/index.js +0 -42
  656. package/test/node_modules/js-beautify/js/src/html/options.js +0 -91
  657. package/test/node_modules/js-beautify/js/src/html/tokenizer.js +0 -332
  658. package/test/node_modules/js-beautify/js/src/index.js +0 -44
  659. package/test/node_modules/js-beautify/js/src/javascript/acorn.js +0 -57
  660. package/test/node_modules/js-beautify/js/src/javascript/beautifier.js +0 -1472
  661. package/test/node_modules/js-beautify/js/src/javascript/index.js +0 -42
  662. package/test/node_modules/js-beautify/js/src/javascript/options.js +0 -93
  663. package/test/node_modules/js-beautify/js/src/javascript/tokenizer.js +0 -567
  664. package/test/node_modules/js-beautify/js/src/unpackers/javascriptobfuscator_unpacker.js +0 -132
  665. package/test/node_modules/js-beautify/js/src/unpackers/myobfuscate_unpacker.js +0 -119
  666. package/test/node_modules/js-beautify/js/src/unpackers/p_a_c_k_e_r_unpacker.js +0 -119
  667. package/test/node_modules/js-beautify/js/src/unpackers/urlencode_unpacker.js +0 -104
  668. package/test/node_modules/js-beautify/package.json +0 -72
  669. package/test/node_modules/keygrip/HISTORY.md +0 -25
  670. package/test/node_modules/keygrip/LICENSE +0 -21
  671. package/test/node_modules/keygrip/README.md +0 -103
  672. package/test/node_modules/keygrip/index.js +0 -51
  673. package/test/node_modules/keygrip/package.json +0 -28
  674. package/test/node_modules/kind-of/LICENSE +0 -21
  675. package/test/node_modules/kind-of/README.md +0 -261
  676. package/test/node_modules/kind-of/index.js +0 -116
  677. package/test/node_modules/kind-of/package.json +0 -90
  678. package/test/node_modules/koa/History.md +0 -696
  679. package/test/node_modules/koa/LICENSE +0 -22
  680. package/test/node_modules/koa/Readme.md +0 -289
  681. package/test/node_modules/koa/dist/koa.mjs +0 -4
  682. package/test/node_modules/koa/lib/application.js +0 -314
  683. package/test/node_modules/koa/lib/context.js +0 -251
  684. package/test/node_modules/koa/lib/request.js +0 -726
  685. package/test/node_modules/koa/lib/response.js +0 -588
  686. package/test/node_modules/koa/package.json +0 -89
  687. package/test/node_modules/koa-compose/History.md +0 -60
  688. package/test/node_modules/koa-compose/Readme.md +0 -40
  689. package/test/node_modules/koa-compose/index.js +0 -48
  690. package/test/node_modules/koa-compose/package.json +0 -30
  691. package/test/node_modules/koa-convert/LICENSE +0 -22
  692. package/test/node_modules/koa-convert/README.md +0 -166
  693. package/test/node_modules/koa-convert/index.js +0 -105
  694. package/test/node_modules/koa-convert/package.json +0 -64
  695. package/test/node_modules/koa-send/History.md +0 -133
  696. package/test/node_modules/koa-send/LICENSE +0 -22
  697. package/test/node_modules/koa-send/README.md +0 -109
  698. package/test/node_modules/koa-send/index.js +0 -188
  699. package/test/node_modules/koa-send/package.json +0 -58
  700. package/test/node_modules/koa-views/.eslintrc +0 -14
  701. package/test/node_modules/koa-views/.gitattributes +0 -1
  702. package/test/node_modules/koa-views/.github/workflows/test.yml +0 -20
  703. package/test/node_modules/koa-views/README.md +0 -201
  704. package/test/node_modules/koa-views/history.md +0 -110
  705. package/test/node_modules/koa-views/index.d.ts +0 -62
  706. package/test/node_modules/koa-views/license +0 -22
  707. package/test/node_modules/koa-views/package.json +0 -68
  708. package/test/node_modules/koa-views/src/index.js +0 -98
  709. package/test/node_modules/koa-views/test/.eslintrc +0 -5
  710. package/test/node_modules/koa-views/test/fixtures/basic.ejs +0 -10
  711. package/test/node_modules/koa-views/test/fixtures/basic.foo +0 -1
  712. package/test/node_modules/koa-views/test/fixtures/basic.html +0 -11
  713. package/test/node_modules/koa-views/test/fixtures/basic.pug +0 -9
  714. package/test/node_modules/koa-views/test/fixtures/basic.test.html +0 -11
  715. package/test/node_modules/koa-views/test/fixtures/global-state.pug +0 -9
  716. package/test/node_modules/koa-views/test/fixtures/index.html +0 -10
  717. package/test/node_modules/koa-views/test/fixtures/nunjucks-filter.html +0 -11
  718. package/test/node_modules/koa-views/test/fixtures/state.pug +0 -9
  719. package/test/node_modules/koa-views/test/fixtures/underscore.html +0 -11
  720. package/test/node_modules/koa-views/test/fixtures/view-options-partial.hbs +0 -1
  721. package/test/node_modules/koa-views/test/fixtures/view-options.hbs +0 -4
  722. package/test/node_modules/koa-views/test/index.js +0 -431
  723. package/test/node_modules/koa-views/test-outside/fixtures/basic.ejs +0 -10
  724. package/test/node_modules/lru-cache/LICENSE +0 -15
  725. package/test/node_modules/lru-cache/README.md +0 -158
  726. package/test/node_modules/lru-cache/index.js +0 -468
  727. package/test/node_modules/lru-cache/package.json +0 -36
  728. package/test/node_modules/media-typer/HISTORY.md +0 -22
  729. package/test/node_modules/media-typer/LICENSE +0 -22
  730. package/test/node_modules/media-typer/README.md +0 -81
  731. package/test/node_modules/media-typer/index.js +0 -270
  732. package/test/node_modules/media-typer/package.json +0 -26
  733. package/test/node_modules/mime-db/HISTORY.md +0 -507
  734. package/test/node_modules/mime-db/LICENSE +0 -23
  735. package/test/node_modules/mime-db/README.md +0 -100
  736. package/test/node_modules/mime-db/db.json +0 -8519
  737. package/test/node_modules/mime-db/index.js +0 -12
  738. package/test/node_modules/mime-db/package.json +0 -60
  739. package/test/node_modules/mime-types/HISTORY.md +0 -397
  740. package/test/node_modules/mime-types/LICENSE +0 -23
  741. package/test/node_modules/mime-types/README.md +0 -113
  742. package/test/node_modules/mime-types/index.js +0 -188
  743. package/test/node_modules/mime-types/package.json +0 -44
  744. package/test/node_modules/minimatch/LICENSE +0 -15
  745. package/test/node_modules/minimatch/README.md +0 -230
  746. package/test/node_modules/minimatch/minimatch.js +0 -947
  747. package/test/node_modules/minimatch/package.json +0 -33
  748. package/test/node_modules/ms/index.js +0 -162
  749. package/test/node_modules/ms/license.md +0 -21
  750. package/test/node_modules/ms/package.json +0 -37
  751. package/test/node_modules/ms/readme.md +0 -60
  752. package/test/node_modules/mz/HISTORY.md +0 -66
  753. package/test/node_modules/mz/LICENSE +0 -22
  754. package/test/node_modules/mz/README.md +0 -106
  755. package/test/node_modules/mz/child_process.js +0 -8
  756. package/test/node_modules/mz/crypto.js +0 -9
  757. package/test/node_modules/mz/dns.js +0 -16
  758. package/test/node_modules/mz/fs.js +0 -62
  759. package/test/node_modules/mz/index.js +0 -8
  760. package/test/node_modules/mz/package.json +0 -44
  761. package/test/node_modules/mz/readline.js +0 -64
  762. package/test/node_modules/mz/zlib.js +0 -13
  763. package/test/node_modules/negotiator/HISTORY.md +0 -108
  764. package/test/node_modules/negotiator/LICENSE +0 -24
  765. package/test/node_modules/negotiator/README.md +0 -203
  766. package/test/node_modules/negotiator/index.js +0 -82
  767. package/test/node_modules/negotiator/lib/charset.js +0 -169
  768. package/test/node_modules/negotiator/lib/encoding.js +0 -184
  769. package/test/node_modules/negotiator/lib/language.js +0 -179
  770. package/test/node_modules/negotiator/lib/mediaType.js +0 -294
  771. package/test/node_modules/negotiator/package.json +0 -42
  772. package/test/node_modules/nodemon/LICENSE +0 -21
  773. package/test/node_modules/nodemon/README.md +0 -423
  774. package/test/node_modules/nodemon/bin/nodemon.js +0 -16
  775. package/test/node_modules/nodemon/bin/windows-kill.exe +0 -0
  776. package/test/node_modules/nodemon/doc/cli/authors.txt +0 -8
  777. package/test/node_modules/nodemon/doc/cli/config.txt +0 -44
  778. package/test/node_modules/nodemon/doc/cli/help.txt +0 -29
  779. package/test/node_modules/nodemon/doc/cli/logo.txt +0 -20
  780. package/test/node_modules/nodemon/doc/cli/options.txt +0 -36
  781. package/test/node_modules/nodemon/doc/cli/topics.txt +0 -8
  782. package/test/node_modules/nodemon/doc/cli/usage.txt +0 -3
  783. package/test/node_modules/nodemon/doc/cli/whoami.txt +0 -9
  784. package/test/node_modules/nodemon/lib/cli/index.js +0 -49
  785. package/test/node_modules/nodemon/lib/cli/parse.js +0 -230
  786. package/test/node_modules/nodemon/lib/config/command.js +0 -43
  787. package/test/node_modules/nodemon/lib/config/defaults.js +0 -28
  788. package/test/node_modules/nodemon/lib/config/exec.js +0 -225
  789. package/test/node_modules/nodemon/lib/config/index.js +0 -93
  790. package/test/node_modules/nodemon/lib/config/load.js +0 -256
  791. package/test/node_modules/nodemon/lib/help/index.js +0 -27
  792. package/test/node_modules/nodemon/lib/index.js +0 -1
  793. package/test/node_modules/nodemon/lib/monitor/index.js +0 -4
  794. package/test/node_modules/nodemon/lib/monitor/match.js +0 -276
  795. package/test/node_modules/nodemon/lib/monitor/run.js +0 -541
  796. package/test/node_modules/nodemon/lib/monitor/signals.js +0 -34
  797. package/test/node_modules/nodemon/lib/monitor/watch.js +0 -239
  798. package/test/node_modules/nodemon/lib/nodemon.js +0 -311
  799. package/test/node_modules/nodemon/lib/rules/add.js +0 -89
  800. package/test/node_modules/nodemon/lib/rules/index.js +0 -53
  801. package/test/node_modules/nodemon/lib/rules/parse.js +0 -43
  802. package/test/node_modules/nodemon/lib/spawn.js +0 -73
  803. package/test/node_modules/nodemon/lib/utils/bus.js +0 -44
  804. package/test/node_modules/nodemon/lib/utils/clone.js +0 -40
  805. package/test/node_modules/nodemon/lib/utils/colour.js +0 -26
  806. package/test/node_modules/nodemon/lib/utils/index.js +0 -102
  807. package/test/node_modules/nodemon/lib/utils/log.js +0 -82
  808. package/test/node_modules/nodemon/lib/utils/merge.js +0 -47
  809. package/test/node_modules/nodemon/lib/version.js +0 -100
  810. package/test/node_modules/nodemon/node_modules/debug/CHANGELOG.md +0 -395
  811. package/test/node_modules/nodemon/node_modules/debug/LICENSE +0 -19
  812. package/test/node_modules/nodemon/node_modules/debug/README.md +0 -437
  813. package/test/node_modules/nodemon/node_modules/debug/node.js +0 -1
  814. package/test/node_modules/nodemon/node_modules/debug/package.json +0 -51
  815. package/test/node_modules/nodemon/node_modules/debug/src/browser.js +0 -180
  816. package/test/node_modules/nodemon/node_modules/debug/src/common.js +0 -249
  817. package/test/node_modules/nodemon/node_modules/debug/src/index.js +0 -12
  818. package/test/node_modules/nodemon/node_modules/debug/src/node.js +0 -177
  819. package/test/node_modules/nodemon/node_modules/has-flag/index.js +0 -8
  820. package/test/node_modules/nodemon/node_modules/has-flag/license +0 -9
  821. package/test/node_modules/nodemon/node_modules/has-flag/package.json +0 -44
  822. package/test/node_modules/nodemon/node_modules/has-flag/readme.md +0 -70
  823. package/test/node_modules/nodemon/node_modules/supports-color/browser.js +0 -5
  824. package/test/node_modules/nodemon/node_modules/supports-color/index.js +0 -131
  825. package/test/node_modules/nodemon/node_modules/supports-color/license +0 -9
  826. package/test/node_modules/nodemon/node_modules/supports-color/package.json +0 -53
  827. package/test/node_modules/nodemon/node_modules/supports-color/readme.md +0 -66
  828. package/test/node_modules/nodemon/package.json +0 -74
  829. package/test/node_modules/nopt/LICENSE +0 -15
  830. package/test/node_modules/nopt/README.md +0 -213
  831. package/test/node_modules/nopt/bin/nopt.js +0 -56
  832. package/test/node_modules/nopt/lib/nopt.js +0 -515
  833. package/test/node_modules/nopt/package.json +0 -53
  834. package/test/node_modules/normalize-path/LICENSE +0 -21
  835. package/test/node_modules/normalize-path/README.md +0 -127
  836. package/test/node_modules/normalize-path/index.js +0 -35
  837. package/test/node_modules/normalize-path/package.json +0 -77
  838. package/test/node_modules/object-assign/index.js +0 -90
  839. package/test/node_modules/object-assign/license +0 -21
  840. package/test/node_modules/object-assign/package.json +0 -42
  841. package/test/node_modules/object-assign/readme.md +0 -61
  842. package/test/node_modules/on-finished/HISTORY.md +0 -98
  843. package/test/node_modules/on-finished/LICENSE +0 -23
  844. package/test/node_modules/on-finished/README.md +0 -162
  845. package/test/node_modules/on-finished/index.js +0 -234
  846. package/test/node_modules/on-finished/package.json +0 -39
  847. package/test/node_modules/once/LICENSE +0 -15
  848. package/test/node_modules/once/README.md +0 -79
  849. package/test/node_modules/once/once.js +0 -42
  850. package/test/node_modules/once/package.json +0 -33
  851. package/test/node_modules/only/History.md +0 -5
  852. package/test/node_modules/only/Makefile +0 -7
  853. package/test/node_modules/only/Readme.md +0 -58
  854. package/test/node_modules/only/index.js +0 -10
  855. package/test/node_modules/only/package.json +0 -14
  856. package/test/node_modules/parseurl/HISTORY.md +0 -58
  857. package/test/node_modules/parseurl/LICENSE +0 -24
  858. package/test/node_modules/parseurl/README.md +0 -133
  859. package/test/node_modules/parseurl/index.js +0 -158
  860. package/test/node_modules/parseurl/package.json +0 -40
  861. package/test/node_modules/path-is-absolute/index.js +0 -20
  862. package/test/node_modules/path-is-absolute/license +0 -21
  863. package/test/node_modules/path-is-absolute/package.json +0 -43
  864. package/test/node_modules/path-is-absolute/readme.md +0 -59
  865. package/test/node_modules/picomatch/CHANGELOG.md +0 -136
  866. package/test/node_modules/picomatch/LICENSE +0 -21
  867. package/test/node_modules/picomatch/README.md +0 -708
  868. package/test/node_modules/picomatch/index.js +0 -3
  869. package/test/node_modules/picomatch/lib/constants.js +0 -179
  870. package/test/node_modules/picomatch/lib/parse.js +0 -1091
  871. package/test/node_modules/picomatch/lib/picomatch.js +0 -342
  872. package/test/node_modules/picomatch/lib/scan.js +0 -391
  873. package/test/node_modules/picomatch/lib/utils.js +0 -64
  874. package/test/node_modules/picomatch/package.json +0 -81
  875. package/test/node_modules/pify/index.js +0 -68
  876. package/test/node_modules/pify/license +0 -9
  877. package/test/node_modules/pify/package.json +0 -51
  878. package/test/node_modules/pify/readme.md +0 -145
  879. package/test/node_modules/pretty/LICENSE +0 -21
  880. package/test/node_modules/pretty/README.md +0 -105
  881. package/test/node_modules/pretty/index.js +0 -45
  882. package/test/node_modules/pretty/package.json +0 -54
  883. package/test/node_modules/proto-list/LICENSE +0 -15
  884. package/test/node_modules/proto-list/README.md +0 -3
  885. package/test/node_modules/proto-list/package.json +0 -18
  886. package/test/node_modules/proto-list/proto-list.js +0 -88
  887. package/test/node_modules/proto-list/test/basic.js +0 -61
  888. package/test/node_modules/pseudomap/LICENSE +0 -15
  889. package/test/node_modules/pseudomap/README.md +0 -60
  890. package/test/node_modules/pseudomap/map.js +0 -9
  891. package/test/node_modules/pseudomap/package.json +0 -25
  892. package/test/node_modules/pseudomap/pseudomap.js +0 -113
  893. package/test/node_modules/pseudomap/test/basic.js +0 -86
  894. package/test/node_modules/pstree.remy/.travis.yml +0 -8
  895. package/test/node_modules/pstree.remy/LICENSE +0 -7
  896. package/test/node_modules/pstree.remy/README.md +0 -26
  897. package/test/node_modules/pstree.remy/lib/index.js +0 -37
  898. package/test/node_modules/pstree.remy/lib/tree.js +0 -37
  899. package/test/node_modules/pstree.remy/lib/utils.js +0 -53
  900. package/test/node_modules/pstree.remy/package.json +0 -33
  901. package/test/node_modules/pstree.remy/tests/fixtures/index.js +0 -13
  902. package/test/node_modules/pstree.remy/tests/fixtures/out1 +0 -10
  903. package/test/node_modules/pstree.remy/tests/fixtures/out2 +0 -29
  904. package/test/node_modules/pstree.remy/tests/index.test.js +0 -51
  905. package/test/node_modules/readdirp/LICENSE +0 -21
  906. package/test/node_modules/readdirp/README.md +0 -122
  907. package/test/node_modules/readdirp/index.d.ts +0 -43
  908. package/test/node_modules/readdirp/index.js +0 -287
  909. package/test/node_modules/readdirp/package.json +0 -122
  910. package/test/node_modules/resolve-path/HISTORY.md +0 -66
  911. package/test/node_modules/resolve-path/LICENSE +0 -23
  912. package/test/node_modules/resolve-path/README.md +0 -111
  913. package/test/node_modules/resolve-path/index.js +0 -88
  914. package/test/node_modules/resolve-path/node_modules/depd/History.md +0 -96
  915. package/test/node_modules/resolve-path/node_modules/depd/LICENSE +0 -22
  916. package/test/node_modules/resolve-path/node_modules/depd/Readme.md +0 -280
  917. package/test/node_modules/resolve-path/node_modules/depd/index.js +0 -522
  918. package/test/node_modules/resolve-path/node_modules/depd/lib/browser/index.js +0 -77
  919. package/test/node_modules/resolve-path/node_modules/depd/lib/compat/callsite-tostring.js +0 -103
  920. package/test/node_modules/resolve-path/node_modules/depd/lib/compat/event-listener-count.js +0 -22
  921. package/test/node_modules/resolve-path/node_modules/depd/lib/compat/index.js +0 -79
  922. package/test/node_modules/resolve-path/node_modules/depd/package.json +0 -41
  923. package/test/node_modules/resolve-path/node_modules/http-errors/HISTORY.md +0 -132
  924. package/test/node_modules/resolve-path/node_modules/http-errors/LICENSE +0 -23
  925. package/test/node_modules/resolve-path/node_modules/http-errors/README.md +0 -135
  926. package/test/node_modules/resolve-path/node_modules/http-errors/index.js +0 -260
  927. package/test/node_modules/resolve-path/node_modules/http-errors/package.json +0 -48
  928. package/test/node_modules/resolve-path/node_modules/inherits/LICENSE +0 -16
  929. package/test/node_modules/resolve-path/node_modules/inherits/README.md +0 -42
  930. package/test/node_modules/resolve-path/node_modules/inherits/inherits.js +0 -7
  931. package/test/node_modules/resolve-path/node_modules/inherits/inherits_browser.js +0 -23
  932. package/test/node_modules/resolve-path/node_modules/inherits/package.json +0 -29
  933. package/test/node_modules/resolve-path/node_modules/setprototypeof/LICENSE +0 -13
  934. package/test/node_modules/resolve-path/node_modules/setprototypeof/README.md +0 -26
  935. package/test/node_modules/resolve-path/node_modules/setprototypeof/index.d.ts +0 -2
  936. package/test/node_modules/resolve-path/node_modules/setprototypeof/index.js +0 -15
  937. package/test/node_modules/resolve-path/node_modules/setprototypeof/package.json +0 -25
  938. package/test/node_modules/resolve-path/package.json +0 -46
  939. package/test/node_modules/safe-buffer/LICENSE +0 -21
  940. package/test/node_modules/safe-buffer/README.md +0 -584
  941. package/test/node_modules/safe-buffer/index.d.ts +0 -187
  942. package/test/node_modules/safe-buffer/index.js +0 -65
  943. package/test/node_modules/safe-buffer/package.json +0 -51
  944. package/test/node_modules/semver/CHANGELOG.md +0 -39
  945. package/test/node_modules/semver/LICENSE +0 -15
  946. package/test/node_modules/semver/README.md +0 -412
  947. package/test/node_modules/semver/bin/semver +0 -160
  948. package/test/node_modules/semver/package.json +0 -28
  949. package/test/node_modules/semver/range.bnf +0 -16
  950. package/test/node_modules/semver/semver.js +0 -1483
  951. package/test/node_modules/setprototypeof/LICENSE +0 -13
  952. package/test/node_modules/setprototypeof/README.md +0 -31
  953. package/test/node_modules/setprototypeof/index.d.ts +0 -2
  954. package/test/node_modules/setprototypeof/index.js +0 -17
  955. package/test/node_modules/setprototypeof/package.json +0 -38
  956. package/test/node_modules/setprototypeof/test/index.js +0 -24
  957. package/test/node_modules/sigmund/LICENSE +0 -15
  958. package/test/node_modules/sigmund/README.md +0 -53
  959. package/test/node_modules/sigmund/bench.js +0 -283
  960. package/test/node_modules/sigmund/package.json +0 -30
  961. package/test/node_modules/sigmund/sigmund.js +0 -39
  962. package/test/node_modules/sigmund/test/basic.js +0 -24
  963. package/test/node_modules/simple-update-notifier/LICENSE +0 -21
  964. package/test/node_modules/simple-update-notifier/README.md +0 -82
  965. package/test/node_modules/simple-update-notifier/build/index.d.ts +0 -13
  966. package/test/node_modules/simple-update-notifier/build/index.js +0 -217
  967. package/test/node_modules/simple-update-notifier/node_modules/semver/CHANGELOG.md +0 -74
  968. package/test/node_modules/simple-update-notifier/node_modules/semver/LICENSE +0 -15
  969. package/test/node_modules/simple-update-notifier/node_modules/semver/README.md +0 -499
  970. package/test/node_modules/simple-update-notifier/node_modules/semver/bin/semver.js +0 -173
  971. package/test/node_modules/simple-update-notifier/node_modules/semver/classes/comparator.js +0 -139
  972. package/test/node_modules/simple-update-notifier/node_modules/semver/classes/index.js +0 -5
  973. package/test/node_modules/simple-update-notifier/node_modules/semver/classes/range.js +0 -448
  974. package/test/node_modules/simple-update-notifier/node_modules/semver/classes/semver.js +0 -290
  975. package/test/node_modules/simple-update-notifier/node_modules/semver/functions/clean.js +0 -6
  976. package/test/node_modules/simple-update-notifier/node_modules/semver/functions/cmp.js +0 -48
  977. package/test/node_modules/simple-update-notifier/node_modules/semver/functions/coerce.js +0 -51
  978. package/test/node_modules/simple-update-notifier/node_modules/semver/functions/compare-build.js +0 -7
  979. package/test/node_modules/simple-update-notifier/node_modules/semver/functions/compare-loose.js +0 -3
  980. package/test/node_modules/simple-update-notifier/node_modules/semver/functions/compare.js +0 -5
  981. package/test/node_modules/simple-update-notifier/node_modules/semver/functions/diff.js +0 -25
  982. package/test/node_modules/simple-update-notifier/node_modules/semver/functions/eq.js +0 -3
  983. package/test/node_modules/simple-update-notifier/node_modules/semver/functions/gt.js +0 -3
  984. package/test/node_modules/simple-update-notifier/node_modules/semver/functions/gte.js +0 -3
  985. package/test/node_modules/simple-update-notifier/node_modules/semver/functions/inc.js +0 -15
  986. package/test/node_modules/simple-update-notifier/node_modules/semver/functions/lt.js +0 -3
  987. package/test/node_modules/simple-update-notifier/node_modules/semver/functions/lte.js +0 -3
  988. package/test/node_modules/simple-update-notifier/node_modules/semver/functions/major.js +0 -3
  989. package/test/node_modules/simple-update-notifier/node_modules/semver/functions/minor.js +0 -3
  990. package/test/node_modules/simple-update-notifier/node_modules/semver/functions/neq.js +0 -3
  991. package/test/node_modules/simple-update-notifier/node_modules/semver/functions/parse.js +0 -37
  992. package/test/node_modules/simple-update-notifier/node_modules/semver/functions/patch.js +0 -3
  993. package/test/node_modules/simple-update-notifier/node_modules/semver/functions/prerelease.js +0 -6
  994. package/test/node_modules/simple-update-notifier/node_modules/semver/functions/rcompare.js +0 -3
  995. package/test/node_modules/simple-update-notifier/node_modules/semver/functions/rsort.js +0 -3
  996. package/test/node_modules/simple-update-notifier/node_modules/semver/functions/satisfies.js +0 -10
  997. package/test/node_modules/simple-update-notifier/node_modules/semver/functions/sort.js +0 -3
  998. package/test/node_modules/simple-update-notifier/node_modules/semver/functions/valid.js +0 -6
  999. package/test/node_modules/simple-update-notifier/node_modules/semver/index.js +0 -64
  1000. package/test/node_modules/simple-update-notifier/node_modules/semver/internal/constants.js +0 -17
  1001. package/test/node_modules/simple-update-notifier/node_modules/semver/internal/debug.js +0 -9
  1002. package/test/node_modules/simple-update-notifier/node_modules/semver/internal/identifiers.js +0 -23
  1003. package/test/node_modules/simple-update-notifier/node_modules/semver/internal/re.js +0 -179
  1004. package/test/node_modules/simple-update-notifier/node_modules/semver/package.json +0 -34
  1005. package/test/node_modules/simple-update-notifier/node_modules/semver/range.bnf +0 -16
  1006. package/test/node_modules/simple-update-notifier/node_modules/semver/ranges/gtr.js +0 -4
  1007. package/test/node_modules/simple-update-notifier/node_modules/semver/ranges/intersects.js +0 -7
  1008. package/test/node_modules/simple-update-notifier/node_modules/semver/ranges/ltr.js +0 -4
  1009. package/test/node_modules/simple-update-notifier/node_modules/semver/ranges/max-satisfying.js +0 -25
  1010. package/test/node_modules/simple-update-notifier/node_modules/semver/ranges/min-satisfying.js +0 -24
  1011. package/test/node_modules/simple-update-notifier/node_modules/semver/ranges/min-version.js +0 -57
  1012. package/test/node_modules/simple-update-notifier/node_modules/semver/ranges/outside.js +0 -80
  1013. package/test/node_modules/simple-update-notifier/node_modules/semver/ranges/to-comparators.js +0 -8
  1014. package/test/node_modules/simple-update-notifier/node_modules/semver/ranges/valid.js +0 -11
  1015. package/test/node_modules/simple-update-notifier/package.json +0 -97
  1016. package/test/node_modules/simple-update-notifier/src/borderedText.ts +0 -12
  1017. package/test/node_modules/simple-update-notifier/src/cache.spec.ts +0 -17
  1018. package/test/node_modules/simple-update-notifier/src/cache.ts +0 -44
  1019. package/test/node_modules/simple-update-notifier/src/getDistVersion.spec.ts +0 -35
  1020. package/test/node_modules/simple-update-notifier/src/getDistVersion.ts +0 -29
  1021. package/test/node_modules/simple-update-notifier/src/hasNewVersion.spec.ts +0 -82
  1022. package/test/node_modules/simple-update-notifier/src/hasNewVersion.ts +0 -40
  1023. package/test/node_modules/simple-update-notifier/src/index.spec.ts +0 -27
  1024. package/test/node_modules/simple-update-notifier/src/index.ts +0 -34
  1025. package/test/node_modules/simple-update-notifier/src/isNpmOrYarn.ts +0 -12
  1026. package/test/node_modules/simple-update-notifier/src/types.ts +0 -8
  1027. package/test/node_modules/statuses/HISTORY.md +0 -65
  1028. package/test/node_modules/statuses/LICENSE +0 -23
  1029. package/test/node_modules/statuses/README.md +0 -127
  1030. package/test/node_modules/statuses/codes.json +0 -66
  1031. package/test/node_modules/statuses/index.js +0 -113
  1032. package/test/node_modules/statuses/package.json +0 -48
  1033. package/test/node_modules/supports-color/browser.js +0 -5
  1034. package/test/node_modules/supports-color/index.js +0 -135
  1035. package/test/node_modules/supports-color/license +0 -9
  1036. package/test/node_modules/supports-color/package.json +0 -53
  1037. package/test/node_modules/supports-color/readme.md +0 -76
  1038. package/test/node_modules/thenify/History.md +0 -11
  1039. package/test/node_modules/thenify/LICENSE +0 -22
  1040. package/test/node_modules/thenify/README.md +0 -120
  1041. package/test/node_modules/thenify/index.js +0 -77
  1042. package/test/node_modules/thenify/package.json +0 -31
  1043. package/test/node_modules/thenify-all/History.md +0 -11
  1044. package/test/node_modules/thenify-all/LICENSE +0 -22
  1045. package/test/node_modules/thenify-all/README.md +0 -66
  1046. package/test/node_modules/thenify-all/index.js +0 -73
  1047. package/test/node_modules/thenify-all/package.json +0 -34
  1048. package/test/node_modules/to-regex-range/LICENSE +0 -21
  1049. package/test/node_modules/to-regex-range/README.md +0 -305
  1050. package/test/node_modules/to-regex-range/index.js +0 -288
  1051. package/test/node_modules/to-regex-range/package.json +0 -88
  1052. package/test/node_modules/toidentifier/HISTORY.md +0 -9
  1053. package/test/node_modules/toidentifier/LICENSE +0 -21
  1054. package/test/node_modules/toidentifier/README.md +0 -61
  1055. package/test/node_modules/toidentifier/index.js +0 -32
  1056. package/test/node_modules/toidentifier/package.json +0 -38
  1057. package/test/node_modules/touch/LICENSE +0 -15
  1058. package/test/node_modules/touch/README.md +0 -52
  1059. package/test/node_modules/touch/bin/nodetouch.js +0 -112
  1060. package/test/node_modules/touch/index.js +0 -224
  1061. package/test/node_modules/touch/node_modules/nopt/LICENSE +0 -23
  1062. package/test/node_modules/touch/node_modules/nopt/README.md +0 -208
  1063. package/test/node_modules/touch/node_modules/nopt/bin/nopt.js +0 -44
  1064. package/test/node_modules/touch/node_modules/nopt/examples/my-program.js +0 -30
  1065. package/test/node_modules/touch/node_modules/nopt/lib/nopt.js +0 -552
  1066. package/test/node_modules/touch/node_modules/nopt/package.json +0 -12
  1067. package/test/node_modules/touch/package.json +0 -28
  1068. package/test/node_modules/tsscmp/.travis.yml +0 -18
  1069. package/test/node_modules/tsscmp/LICENSE +0 -21
  1070. package/test/node_modules/tsscmp/README.md +0 -48
  1071. package/test/node_modules/tsscmp/appveyor.yml +0 -29
  1072. package/test/node_modules/tsscmp/lib/index.js +0 -38
  1073. package/test/node_modules/tsscmp/package.json +0 -29
  1074. package/test/node_modules/tsscmp/test/benchmark/index.js +0 -30
  1075. package/test/node_modules/tsscmp/test/unit/index.js +0 -69
  1076. package/test/node_modules/type-is/HISTORY.md +0 -259
  1077. package/test/node_modules/type-is/LICENSE +0 -23
  1078. package/test/node_modules/type-is/README.md +0 -170
  1079. package/test/node_modules/type-is/index.js +0 -266
  1080. package/test/node_modules/type-is/package.json +0 -45
  1081. package/test/node_modules/undefsafe/.github/workflows/release.yml +0 -25
  1082. package/test/node_modules/undefsafe/.jscsrc +0 -13
  1083. package/test/node_modules/undefsafe/.jshintrc +0 -16
  1084. package/test/node_modules/undefsafe/.travis.yml +0 -18
  1085. package/test/node_modules/undefsafe/LICENSE +0 -22
  1086. package/test/node_modules/undefsafe/README.md +0 -63
  1087. package/test/node_modules/undefsafe/example.js +0 -14
  1088. package/test/node_modules/undefsafe/lib/undefsafe.js +0 -125
  1089. package/test/node_modules/undefsafe/package.json +0 -34
  1090. package/test/node_modules/vary/HISTORY.md +0 -39
  1091. package/test/node_modules/vary/LICENSE +0 -22
  1092. package/test/node_modules/vary/README.md +0 -101
  1093. package/test/node_modules/vary/index.js +0 -149
  1094. package/test/node_modules/vary/package.json +0 -43
  1095. package/test/node_modules/wrappy/LICENSE +0 -15
  1096. package/test/node_modules/wrappy/README.md +0 -36
  1097. package/test/node_modules/wrappy/package.json +0 -29
  1098. package/test/node_modules/wrappy/wrappy.js +0 -33
  1099. package/test/node_modules/yallist/LICENSE +0 -15
  1100. package/test/node_modules/yallist/README.md +0 -204
  1101. package/test/node_modules/yallist/iterator.js +0 -7
  1102. package/test/node_modules/yallist/package.json +0 -29
  1103. package/test/node_modules/yallist/yallist.js +0 -370
  1104. package/test/node_modules/ylru/History.md +0 -42
  1105. package/test/node_modules/ylru/LICENSE +0 -23
  1106. package/test/node_modules/ylru/README.md +0 -99
  1107. package/test/node_modules/ylru/index.d.ts +0 -18
  1108. package/test/node_modules/ylru/index.js +0 -106
  1109. package/test/node_modules/ylru/package.json +0 -52
  1110. package/test/package-lock.json +0 -2212
  1111. package/test/package.json +0 -17
  1112. package/test/public/api +0 -1
  1113. package/test/public/cartella nuova/ewewew.html +0 -12
  1114. package/test/public/cartella nuova/prova.ejs +0 -12
  1115. package/test/public/index.ejs +0 -12
  1116. package/test/public/index.html +0 -12
  1117. package/test/public/proma_template.ejs +0 -16
  1118. package/test/public/un altro file.html +0 -12
  1119. package/test/public/un_file.html +0 -12
  1120. package/test/test.js +0 -63
@@ -1,3136 +0,0 @@
1
- /* AUTO-GENERATED. DO NOT MODIFY. */
2
- /*
3
-
4
- The MIT License (MIT)
5
-
6
- Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors.
7
-
8
- Permission is hereby granted, free of charge, to any person
9
- obtaining a copy of this software and associated documentation files
10
- (the "Software"), to deal in the Software without restriction,
11
- including without limitation the rights to use, copy, modify, merge,
12
- publish, distribute, sublicense, and/or sell copies of the Software,
13
- and to permit persons to whom the Software is furnished to do so,
14
- subject to the following conditions:
15
-
16
- The above copyright notice and this permission notice shall be
17
- included in all copies or substantial portions of the Software.
18
-
19
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
20
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
21
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
22
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
23
- BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
24
- ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
25
- CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
26
- SOFTWARE.
27
-
28
-
29
- Style HTML
30
- ---------------
31
-
32
- Written by Nochum Sossonko, (nsossonko@hotmail.com)
33
-
34
- Based on code initially developed by: Einar Lielmanis, <einar@beautifier.io>
35
- https://beautifier.io/
36
-
37
- Usage:
38
- style_html(html_source);
39
-
40
- style_html(html_source, options);
41
-
42
- The options are:
43
- indent_inner_html (default false) — indent <head> and <body> sections,
44
- indent_size (default 4) — indentation size,
45
- indent_char (default space) — character to indent with,
46
- wrap_line_length (default 250) - maximum amount of characters per line (0 = disable)
47
- brace_style (default "collapse") - "collapse" | "expand" | "end-expand" | "none"
48
- put braces on the same line as control statements (default), or put braces on own line (Allman / ANSI style), or just put end braces on own line, or attempt to keep them where they are.
49
- inline (defaults to inline tags) - list of tags to be considered inline tags
50
- unformatted (defaults to inline tags) - list of tags, that shouldn't be reformatted
51
- content_unformatted (defaults to ["pre", "textarea"] tags) - list of tags, whose content shouldn't be reformatted
52
- indent_scripts (default normal) - "keep"|"separate"|"normal"
53
- preserve_newlines (default true) - whether existing line breaks before elements should be preserved
54
- Only works before elements, not inside tags or for text.
55
- max_preserve_newlines (default unlimited) - maximum number of line breaks to be preserved in one chunk
56
- indent_handlebars (default false) - format and indent {{#foo}} and {{/foo}}
57
- end_with_newline (false) - end with a newline
58
- extra_liners (default [head,body,/html]) -List of tags that should have an extra newline before them.
59
-
60
- e.g.
61
-
62
- style_html(html_source, {
63
- 'indent_inner_html': false,
64
- 'indent_size': 2,
65
- 'indent_char': ' ',
66
- 'wrap_line_length': 78,
67
- 'brace_style': 'expand',
68
- 'preserve_newlines': true,
69
- 'max_preserve_newlines': 5,
70
- 'indent_handlebars': false,
71
- 'extra_liners': ['/html']
72
- });
73
- */
74
-
75
- (function() {
76
-
77
- /* GENERATED_BUILD_OUTPUT */
78
- var legacy_beautify_html;
79
- /******/ (function() { // webpackBootstrap
80
- /******/ "use strict";
81
- /******/ var __webpack_modules__ = ([
82
- /* 0 */,
83
- /* 1 */,
84
- /* 2 */
85
- /***/ (function(module) {
86
-
87
- /*jshint node:true */
88
- /*
89
- The MIT License (MIT)
90
-
91
- Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors.
92
-
93
- Permission is hereby granted, free of charge, to any person
94
- obtaining a copy of this software and associated documentation files
95
- (the "Software"), to deal in the Software without restriction,
96
- including without limitation the rights to use, copy, modify, merge,
97
- publish, distribute, sublicense, and/or sell copies of the Software,
98
- and to permit persons to whom the Software is furnished to do so,
99
- subject to the following conditions:
100
-
101
- The above copyright notice and this permission notice shall be
102
- included in all copies or substantial portions of the Software.
103
-
104
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
105
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
106
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
107
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
108
- BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
109
- ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
110
- CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
111
- SOFTWARE.
112
- */
113
-
114
-
115
-
116
- function OutputLine(parent) {
117
- this.__parent = parent;
118
- this.__character_count = 0;
119
- // use indent_count as a marker for this.__lines that have preserved indentation
120
- this.__indent_count = -1;
121
- this.__alignment_count = 0;
122
- this.__wrap_point_index = 0;
123
- this.__wrap_point_character_count = 0;
124
- this.__wrap_point_indent_count = -1;
125
- this.__wrap_point_alignment_count = 0;
126
-
127
- this.__items = [];
128
- }
129
-
130
- OutputLine.prototype.clone_empty = function() {
131
- var line = new OutputLine(this.__parent);
132
- line.set_indent(this.__indent_count, this.__alignment_count);
133
- return line;
134
- };
135
-
136
- OutputLine.prototype.item = function(index) {
137
- if (index < 0) {
138
- return this.__items[this.__items.length + index];
139
- } else {
140
- return this.__items[index];
141
- }
142
- };
143
-
144
- OutputLine.prototype.has_match = function(pattern) {
145
- for (var lastCheckedOutput = this.__items.length - 1; lastCheckedOutput >= 0; lastCheckedOutput--) {
146
- if (this.__items[lastCheckedOutput].match(pattern)) {
147
- return true;
148
- }
149
- }
150
- return false;
151
- };
152
-
153
- OutputLine.prototype.set_indent = function(indent, alignment) {
154
- if (this.is_empty()) {
155
- this.__indent_count = indent || 0;
156
- this.__alignment_count = alignment || 0;
157
- this.__character_count = this.__parent.get_indent_size(this.__indent_count, this.__alignment_count);
158
- }
159
- };
160
-
161
- OutputLine.prototype._set_wrap_point = function() {
162
- if (this.__parent.wrap_line_length) {
163
- this.__wrap_point_index = this.__items.length;
164
- this.__wrap_point_character_count = this.__character_count;
165
- this.__wrap_point_indent_count = this.__parent.next_line.__indent_count;
166
- this.__wrap_point_alignment_count = this.__parent.next_line.__alignment_count;
167
- }
168
- };
169
-
170
- OutputLine.prototype._should_wrap = function() {
171
- return this.__wrap_point_index &&
172
- this.__character_count > this.__parent.wrap_line_length &&
173
- this.__wrap_point_character_count > this.__parent.next_line.__character_count;
174
- };
175
-
176
- OutputLine.prototype._allow_wrap = function() {
177
- if (this._should_wrap()) {
178
- this.__parent.add_new_line();
179
- var next = this.__parent.current_line;
180
- next.set_indent(this.__wrap_point_indent_count, this.__wrap_point_alignment_count);
181
- next.__items = this.__items.slice(this.__wrap_point_index);
182
- this.__items = this.__items.slice(0, this.__wrap_point_index);
183
-
184
- next.__character_count += this.__character_count - this.__wrap_point_character_count;
185
- this.__character_count = this.__wrap_point_character_count;
186
-
187
- if (next.__items[0] === " ") {
188
- next.__items.splice(0, 1);
189
- next.__character_count -= 1;
190
- }
191
- return true;
192
- }
193
- return false;
194
- };
195
-
196
- OutputLine.prototype.is_empty = function() {
197
- return this.__items.length === 0;
198
- };
199
-
200
- OutputLine.prototype.last = function() {
201
- if (!this.is_empty()) {
202
- return this.__items[this.__items.length - 1];
203
- } else {
204
- return null;
205
- }
206
- };
207
-
208
- OutputLine.prototype.push = function(item) {
209
- this.__items.push(item);
210
- var last_newline_index = item.lastIndexOf('\n');
211
- if (last_newline_index !== -1) {
212
- this.__character_count = item.length - last_newline_index;
213
- } else {
214
- this.__character_count += item.length;
215
- }
216
- };
217
-
218
- OutputLine.prototype.pop = function() {
219
- var item = null;
220
- if (!this.is_empty()) {
221
- item = this.__items.pop();
222
- this.__character_count -= item.length;
223
- }
224
- return item;
225
- };
226
-
227
-
228
- OutputLine.prototype._remove_indent = function() {
229
- if (this.__indent_count > 0) {
230
- this.__indent_count -= 1;
231
- this.__character_count -= this.__parent.indent_size;
232
- }
233
- };
234
-
235
- OutputLine.prototype._remove_wrap_indent = function() {
236
- if (this.__wrap_point_indent_count > 0) {
237
- this.__wrap_point_indent_count -= 1;
238
- }
239
- };
240
- OutputLine.prototype.trim = function() {
241
- while (this.last() === ' ') {
242
- this.__items.pop();
243
- this.__character_count -= 1;
244
- }
245
- };
246
-
247
- OutputLine.prototype.toString = function() {
248
- var result = '';
249
- if (this.is_empty()) {
250
- if (this.__parent.indent_empty_lines) {
251
- result = this.__parent.get_indent_string(this.__indent_count);
252
- }
253
- } else {
254
- result = this.__parent.get_indent_string(this.__indent_count, this.__alignment_count);
255
- result += this.__items.join('');
256
- }
257
- return result;
258
- };
259
-
260
- function IndentStringCache(options, baseIndentString) {
261
- this.__cache = [''];
262
- this.__indent_size = options.indent_size;
263
- this.__indent_string = options.indent_char;
264
- if (!options.indent_with_tabs) {
265
- this.__indent_string = new Array(options.indent_size + 1).join(options.indent_char);
266
- }
267
-
268
- // Set to null to continue support for auto detection of base indent
269
- baseIndentString = baseIndentString || '';
270
- if (options.indent_level > 0) {
271
- baseIndentString = new Array(options.indent_level + 1).join(this.__indent_string);
272
- }
273
-
274
- this.__base_string = baseIndentString;
275
- this.__base_string_length = baseIndentString.length;
276
- }
277
-
278
- IndentStringCache.prototype.get_indent_size = function(indent, column) {
279
- var result = this.__base_string_length;
280
- column = column || 0;
281
- if (indent < 0) {
282
- result = 0;
283
- }
284
- result += indent * this.__indent_size;
285
- result += column;
286
- return result;
287
- };
288
-
289
- IndentStringCache.prototype.get_indent_string = function(indent_level, column) {
290
- var result = this.__base_string;
291
- column = column || 0;
292
- if (indent_level < 0) {
293
- indent_level = 0;
294
- result = '';
295
- }
296
- column += indent_level * this.__indent_size;
297
- this.__ensure_cache(column);
298
- result += this.__cache[column];
299
- return result;
300
- };
301
-
302
- IndentStringCache.prototype.__ensure_cache = function(column) {
303
- while (column >= this.__cache.length) {
304
- this.__add_column();
305
- }
306
- };
307
-
308
- IndentStringCache.prototype.__add_column = function() {
309
- var column = this.__cache.length;
310
- var indent = 0;
311
- var result = '';
312
- if (this.__indent_size && column >= this.__indent_size) {
313
- indent = Math.floor(column / this.__indent_size);
314
- column -= indent * this.__indent_size;
315
- result = new Array(indent + 1).join(this.__indent_string);
316
- }
317
- if (column) {
318
- result += new Array(column + 1).join(' ');
319
- }
320
-
321
- this.__cache.push(result);
322
- };
323
-
324
- function Output(options, baseIndentString) {
325
- this.__indent_cache = new IndentStringCache(options, baseIndentString);
326
- this.raw = false;
327
- this._end_with_newline = options.end_with_newline;
328
- this.indent_size = options.indent_size;
329
- this.wrap_line_length = options.wrap_line_length;
330
- this.indent_empty_lines = options.indent_empty_lines;
331
- this.__lines = [];
332
- this.previous_line = null;
333
- this.current_line = null;
334
- this.next_line = new OutputLine(this);
335
- this.space_before_token = false;
336
- this.non_breaking_space = false;
337
- this.previous_token_wrapped = false;
338
- // initialize
339
- this.__add_outputline();
340
- }
341
-
342
- Output.prototype.__add_outputline = function() {
343
- this.previous_line = this.current_line;
344
- this.current_line = this.next_line.clone_empty();
345
- this.__lines.push(this.current_line);
346
- };
347
-
348
- Output.prototype.get_line_number = function() {
349
- return this.__lines.length;
350
- };
351
-
352
- Output.prototype.get_indent_string = function(indent, column) {
353
- return this.__indent_cache.get_indent_string(indent, column);
354
- };
355
-
356
- Output.prototype.get_indent_size = function(indent, column) {
357
- return this.__indent_cache.get_indent_size(indent, column);
358
- };
359
-
360
- Output.prototype.is_empty = function() {
361
- return !this.previous_line && this.current_line.is_empty();
362
- };
363
-
364
- Output.prototype.add_new_line = function(force_newline) {
365
- // never newline at the start of file
366
- // otherwise, newline only if we didn't just add one or we're forced
367
- if (this.is_empty() ||
368
- (!force_newline && this.just_added_newline())) {
369
- return false;
370
- }
371
-
372
- // if raw output is enabled, don't print additional newlines,
373
- // but still return True as though you had
374
- if (!this.raw) {
375
- this.__add_outputline();
376
- }
377
- return true;
378
- };
379
-
380
- Output.prototype.get_code = function(eol) {
381
- this.trim(true);
382
-
383
- // handle some edge cases where the last tokens
384
- // has text that ends with newline(s)
385
- var last_item = this.current_line.pop();
386
- if (last_item) {
387
- if (last_item[last_item.length - 1] === '\n') {
388
- last_item = last_item.replace(/\n+$/g, '');
389
- }
390
- this.current_line.push(last_item);
391
- }
392
-
393
- if (this._end_with_newline) {
394
- this.__add_outputline();
395
- }
396
-
397
- var sweet_code = this.__lines.join('\n');
398
-
399
- if (eol !== '\n') {
400
- sweet_code = sweet_code.replace(/[\n]/g, eol);
401
- }
402
- return sweet_code;
403
- };
404
-
405
- Output.prototype.set_wrap_point = function() {
406
- this.current_line._set_wrap_point();
407
- };
408
-
409
- Output.prototype.set_indent = function(indent, alignment) {
410
- indent = indent || 0;
411
- alignment = alignment || 0;
412
-
413
- // Next line stores alignment values
414
- this.next_line.set_indent(indent, alignment);
415
-
416
- // Never indent your first output indent at the start of the file
417
- if (this.__lines.length > 1) {
418
- this.current_line.set_indent(indent, alignment);
419
- return true;
420
- }
421
-
422
- this.current_line.set_indent();
423
- return false;
424
- };
425
-
426
- Output.prototype.add_raw_token = function(token) {
427
- for (var x = 0; x < token.newlines; x++) {
428
- this.__add_outputline();
429
- }
430
- this.current_line.set_indent(-1);
431
- this.current_line.push(token.whitespace_before);
432
- this.current_line.push(token.text);
433
- this.space_before_token = false;
434
- this.non_breaking_space = false;
435
- this.previous_token_wrapped = false;
436
- };
437
-
438
- Output.prototype.add_token = function(printable_token) {
439
- this.__add_space_before_token();
440
- this.current_line.push(printable_token);
441
- this.space_before_token = false;
442
- this.non_breaking_space = false;
443
- this.previous_token_wrapped = this.current_line._allow_wrap();
444
- };
445
-
446
- Output.prototype.__add_space_before_token = function() {
447
- if (this.space_before_token && !this.just_added_newline()) {
448
- if (!this.non_breaking_space) {
449
- this.set_wrap_point();
450
- }
451
- this.current_line.push(' ');
452
- }
453
- };
454
-
455
- Output.prototype.remove_indent = function(index) {
456
- var output_length = this.__lines.length;
457
- while (index < output_length) {
458
- this.__lines[index]._remove_indent();
459
- index++;
460
- }
461
- this.current_line._remove_wrap_indent();
462
- };
463
-
464
- Output.prototype.trim = function(eat_newlines) {
465
- eat_newlines = (eat_newlines === undefined) ? false : eat_newlines;
466
-
467
- this.current_line.trim();
468
-
469
- while (eat_newlines && this.__lines.length > 1 &&
470
- this.current_line.is_empty()) {
471
- this.__lines.pop();
472
- this.current_line = this.__lines[this.__lines.length - 1];
473
- this.current_line.trim();
474
- }
475
-
476
- this.previous_line = this.__lines.length > 1 ?
477
- this.__lines[this.__lines.length - 2] : null;
478
- };
479
-
480
- Output.prototype.just_added_newline = function() {
481
- return this.current_line.is_empty();
482
- };
483
-
484
- Output.prototype.just_added_blankline = function() {
485
- return this.is_empty() ||
486
- (this.current_line.is_empty() && this.previous_line.is_empty());
487
- };
488
-
489
- Output.prototype.ensure_empty_line_above = function(starts_with, ends_with) {
490
- var index = this.__lines.length - 2;
491
- while (index >= 0) {
492
- var potentialEmptyLine = this.__lines[index];
493
- if (potentialEmptyLine.is_empty()) {
494
- break;
495
- } else if (potentialEmptyLine.item(0).indexOf(starts_with) !== 0 &&
496
- potentialEmptyLine.item(-1) !== ends_with) {
497
- this.__lines.splice(index + 1, 0, new OutputLine(this));
498
- this.previous_line = this.__lines[this.__lines.length - 2];
499
- break;
500
- }
501
- index--;
502
- }
503
- };
504
-
505
- module.exports.Output = Output;
506
-
507
-
508
- /***/ }),
509
- /* 3 */
510
- /***/ (function(module) {
511
-
512
- /*jshint node:true */
513
- /*
514
-
515
- The MIT License (MIT)
516
-
517
- Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors.
518
-
519
- Permission is hereby granted, free of charge, to any person
520
- obtaining a copy of this software and associated documentation files
521
- (the "Software"), to deal in the Software without restriction,
522
- including without limitation the rights to use, copy, modify, merge,
523
- publish, distribute, sublicense, and/or sell copies of the Software,
524
- and to permit persons to whom the Software is furnished to do so,
525
- subject to the following conditions:
526
-
527
- The above copyright notice and this permission notice shall be
528
- included in all copies or substantial portions of the Software.
529
-
530
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
531
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
532
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
533
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
534
- BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
535
- ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
536
- CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
537
- SOFTWARE.
538
- */
539
-
540
-
541
-
542
- function Token(type, text, newlines, whitespace_before) {
543
- this.type = type;
544
- this.text = text;
545
-
546
- // comments_before are
547
- // comments that have a new line before them
548
- // and may or may not have a newline after
549
- // this is a set of comments before
550
- this.comments_before = null; /* inline comment*/
551
-
552
-
553
- // this.comments_after = new TokenStream(); // no new line before and newline after
554
- this.newlines = newlines || 0;
555
- this.whitespace_before = whitespace_before || '';
556
- this.parent = null;
557
- this.next = null;
558
- this.previous = null;
559
- this.opened = null;
560
- this.closed = null;
561
- this.directives = null;
562
- }
563
-
564
-
565
- module.exports.Token = Token;
566
-
567
-
568
- /***/ }),
569
- /* 4 */,
570
- /* 5 */,
571
- /* 6 */
572
- /***/ (function(module) {
573
-
574
- /*jshint node:true */
575
- /*
576
-
577
- The MIT License (MIT)
578
-
579
- Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors.
580
-
581
- Permission is hereby granted, free of charge, to any person
582
- obtaining a copy of this software and associated documentation files
583
- (the "Software"), to deal in the Software without restriction,
584
- including without limitation the rights to use, copy, modify, merge,
585
- publish, distribute, sublicense, and/or sell copies of the Software,
586
- and to permit persons to whom the Software is furnished to do so,
587
- subject to the following conditions:
588
-
589
- The above copyright notice and this permission notice shall be
590
- included in all copies or substantial portions of the Software.
591
-
592
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
593
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
594
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
595
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
596
- BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
597
- ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
598
- CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
599
- SOFTWARE.
600
- */
601
-
602
-
603
-
604
- function Options(options, merge_child_field) {
605
- this.raw_options = _mergeOpts(options, merge_child_field);
606
-
607
- // Support passing the source text back with no change
608
- this.disabled = this._get_boolean('disabled');
609
-
610
- this.eol = this._get_characters('eol', 'auto');
611
- this.end_with_newline = this._get_boolean('end_with_newline');
612
- this.indent_size = this._get_number('indent_size', 4);
613
- this.indent_char = this._get_characters('indent_char', ' ');
614
- this.indent_level = this._get_number('indent_level');
615
-
616
- this.preserve_newlines = this._get_boolean('preserve_newlines', true);
617
- this.max_preserve_newlines = this._get_number('max_preserve_newlines', 32786);
618
- if (!this.preserve_newlines) {
619
- this.max_preserve_newlines = 0;
620
- }
621
-
622
- this.indent_with_tabs = this._get_boolean('indent_with_tabs', this.indent_char === '\t');
623
- if (this.indent_with_tabs) {
624
- this.indent_char = '\t';
625
-
626
- // indent_size behavior changed after 1.8.6
627
- // It used to be that indent_size would be
628
- // set to 1 for indent_with_tabs. That is no longer needed and
629
- // actually doesn't make sense - why not use spaces? Further,
630
- // that might produce unexpected behavior - tabs being used
631
- // for single-column alignment. So, when indent_with_tabs is true
632
- // and indent_size is 1, reset indent_size to 4.
633
- if (this.indent_size === 1) {
634
- this.indent_size = 4;
635
- }
636
- }
637
-
638
- // Backwards compat with 1.3.x
639
- this.wrap_line_length = this._get_number('wrap_line_length', this._get_number('max_char'));
640
-
641
- this.indent_empty_lines = this._get_boolean('indent_empty_lines');
642
-
643
- // valid templating languages ['django', 'erb', 'handlebars', 'php', 'smarty']
644
- // For now, 'auto' = all off for javascript, all on for html (and inline javascript).
645
- // other values ignored
646
- this.templating = this._get_selection_list('templating', ['auto', 'none', 'django', 'erb', 'handlebars', 'php', 'smarty'], ['auto']);
647
- }
648
-
649
- Options.prototype._get_array = function(name, default_value) {
650
- var option_value = this.raw_options[name];
651
- var result = default_value || [];
652
- if (typeof option_value === 'object') {
653
- if (option_value !== null && typeof option_value.concat === 'function') {
654
- result = option_value.concat();
655
- }
656
- } else if (typeof option_value === 'string') {
657
- result = option_value.split(/[^a-zA-Z0-9_\/\-]+/);
658
- }
659
- return result;
660
- };
661
-
662
- Options.prototype._get_boolean = function(name, default_value) {
663
- var option_value = this.raw_options[name];
664
- var result = option_value === undefined ? !!default_value : !!option_value;
665
- return result;
666
- };
667
-
668
- Options.prototype._get_characters = function(name, default_value) {
669
- var option_value = this.raw_options[name];
670
- var result = default_value || '';
671
- if (typeof option_value === 'string') {
672
- result = option_value.replace(/\\r/, '\r').replace(/\\n/, '\n').replace(/\\t/, '\t');
673
- }
674
- return result;
675
- };
676
-
677
- Options.prototype._get_number = function(name, default_value) {
678
- var option_value = this.raw_options[name];
679
- default_value = parseInt(default_value, 10);
680
- if (isNaN(default_value)) {
681
- default_value = 0;
682
- }
683
- var result = parseInt(option_value, 10);
684
- if (isNaN(result)) {
685
- result = default_value;
686
- }
687
- return result;
688
- };
689
-
690
- Options.prototype._get_selection = function(name, selection_list, default_value) {
691
- var result = this._get_selection_list(name, selection_list, default_value);
692
- if (result.length !== 1) {
693
- throw new Error(
694
- "Invalid Option Value: The option '" + name + "' can only be one of the following values:\n" +
695
- selection_list + "\nYou passed in: '" + this.raw_options[name] + "'");
696
- }
697
-
698
- return result[0];
699
- };
700
-
701
-
702
- Options.prototype._get_selection_list = function(name, selection_list, default_value) {
703
- if (!selection_list || selection_list.length === 0) {
704
- throw new Error("Selection list cannot be empty.");
705
- }
706
-
707
- default_value = default_value || [selection_list[0]];
708
- if (!this._is_valid_selection(default_value, selection_list)) {
709
- throw new Error("Invalid Default Value!");
710
- }
711
-
712
- var result = this._get_array(name, default_value);
713
- if (!this._is_valid_selection(result, selection_list)) {
714
- throw new Error(
715
- "Invalid Option Value: The option '" + name + "' can contain only the following values:\n" +
716
- selection_list + "\nYou passed in: '" + this.raw_options[name] + "'");
717
- }
718
-
719
- return result;
720
- };
721
-
722
- Options.prototype._is_valid_selection = function(result, selection_list) {
723
- return result.length && selection_list.length &&
724
- !result.some(function(item) { return selection_list.indexOf(item) === -1; });
725
- };
726
-
727
-
728
- // merges child options up with the parent options object
729
- // Example: obj = {a: 1, b: {a: 2}}
730
- // mergeOpts(obj, 'b')
731
- //
732
- // Returns: {a: 2}
733
- function _mergeOpts(allOptions, childFieldName) {
734
- var finalOpts = {};
735
- allOptions = _normalizeOpts(allOptions);
736
- var name;
737
-
738
- for (name in allOptions) {
739
- if (name !== childFieldName) {
740
- finalOpts[name] = allOptions[name];
741
- }
742
- }
743
-
744
- //merge in the per type settings for the childFieldName
745
- if (childFieldName && allOptions[childFieldName]) {
746
- for (name in allOptions[childFieldName]) {
747
- finalOpts[name] = allOptions[childFieldName][name];
748
- }
749
- }
750
- return finalOpts;
751
- }
752
-
753
- function _normalizeOpts(options) {
754
- var convertedOpts = {};
755
- var key;
756
-
757
- for (key in options) {
758
- var newKey = key.replace(/-/g, "_");
759
- convertedOpts[newKey] = options[key];
760
- }
761
- return convertedOpts;
762
- }
763
-
764
- module.exports.Options = Options;
765
- module.exports.normalizeOpts = _normalizeOpts;
766
- module.exports.mergeOpts = _mergeOpts;
767
-
768
-
769
- /***/ }),
770
- /* 7 */,
771
- /* 8 */
772
- /***/ (function(module) {
773
-
774
- /*jshint node:true */
775
- /*
776
-
777
- The MIT License (MIT)
778
-
779
- Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors.
780
-
781
- Permission is hereby granted, free of charge, to any person
782
- obtaining a copy of this software and associated documentation files
783
- (the "Software"), to deal in the Software without restriction,
784
- including without limitation the rights to use, copy, modify, merge,
785
- publish, distribute, sublicense, and/or sell copies of the Software,
786
- and to permit persons to whom the Software is furnished to do so,
787
- subject to the following conditions:
788
-
789
- The above copyright notice and this permission notice shall be
790
- included in all copies or substantial portions of the Software.
791
-
792
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
793
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
794
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
795
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
796
- BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
797
- ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
798
- CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
799
- SOFTWARE.
800
- */
801
-
802
-
803
-
804
- var regexp_has_sticky = RegExp.prototype.hasOwnProperty('sticky');
805
-
806
- function InputScanner(input_string) {
807
- this.__input = input_string || '';
808
- this.__input_length = this.__input.length;
809
- this.__position = 0;
810
- }
811
-
812
- InputScanner.prototype.restart = function() {
813
- this.__position = 0;
814
- };
815
-
816
- InputScanner.prototype.back = function() {
817
- if (this.__position > 0) {
818
- this.__position -= 1;
819
- }
820
- };
821
-
822
- InputScanner.prototype.hasNext = function() {
823
- return this.__position < this.__input_length;
824
- };
825
-
826
- InputScanner.prototype.next = function() {
827
- var val = null;
828
- if (this.hasNext()) {
829
- val = this.__input.charAt(this.__position);
830
- this.__position += 1;
831
- }
832
- return val;
833
- };
834
-
835
- InputScanner.prototype.peek = function(index) {
836
- var val = null;
837
- index = index || 0;
838
- index += this.__position;
839
- if (index >= 0 && index < this.__input_length) {
840
- val = this.__input.charAt(index);
841
- }
842
- return val;
843
- };
844
-
845
- // This is a JavaScript only helper function (not in python)
846
- // Javascript doesn't have a match method
847
- // and not all implementation support "sticky" flag.
848
- // If they do not support sticky then both this.match() and this.test() method
849
- // must get the match and check the index of the match.
850
- // If sticky is supported and set, this method will use it.
851
- // Otherwise it will check that global is set, and fall back to the slower method.
852
- InputScanner.prototype.__match = function(pattern, index) {
853
- pattern.lastIndex = index;
854
- var pattern_match = pattern.exec(this.__input);
855
-
856
- if (pattern_match && !(regexp_has_sticky && pattern.sticky)) {
857
- if (pattern_match.index !== index) {
858
- pattern_match = null;
859
- }
860
- }
861
-
862
- return pattern_match;
863
- };
864
-
865
- InputScanner.prototype.test = function(pattern, index) {
866
- index = index || 0;
867
- index += this.__position;
868
-
869
- if (index >= 0 && index < this.__input_length) {
870
- return !!this.__match(pattern, index);
871
- } else {
872
- return false;
873
- }
874
- };
875
-
876
- InputScanner.prototype.testChar = function(pattern, index) {
877
- // test one character regex match
878
- var val = this.peek(index);
879
- pattern.lastIndex = 0;
880
- return val !== null && pattern.test(val);
881
- };
882
-
883
- InputScanner.prototype.match = function(pattern) {
884
- var pattern_match = this.__match(pattern, this.__position);
885
- if (pattern_match) {
886
- this.__position += pattern_match[0].length;
887
- } else {
888
- pattern_match = null;
889
- }
890
- return pattern_match;
891
- };
892
-
893
- InputScanner.prototype.read = function(starting_pattern, until_pattern, until_after) {
894
- var val = '';
895
- var match;
896
- if (starting_pattern) {
897
- match = this.match(starting_pattern);
898
- if (match) {
899
- val += match[0];
900
- }
901
- }
902
- if (until_pattern && (match || !starting_pattern)) {
903
- val += this.readUntil(until_pattern, until_after);
904
- }
905
- return val;
906
- };
907
-
908
- InputScanner.prototype.readUntil = function(pattern, until_after) {
909
- var val = '';
910
- var match_index = this.__position;
911
- pattern.lastIndex = this.__position;
912
- var pattern_match = pattern.exec(this.__input);
913
- if (pattern_match) {
914
- match_index = pattern_match.index;
915
- if (until_after) {
916
- match_index += pattern_match[0].length;
917
- }
918
- } else {
919
- match_index = this.__input_length;
920
- }
921
-
922
- val = this.__input.substring(this.__position, match_index);
923
- this.__position = match_index;
924
- return val;
925
- };
926
-
927
- InputScanner.prototype.readUntilAfter = function(pattern) {
928
- return this.readUntil(pattern, true);
929
- };
930
-
931
- InputScanner.prototype.get_regexp = function(pattern, match_from) {
932
- var result = null;
933
- var flags = 'g';
934
- if (match_from && regexp_has_sticky) {
935
- flags = 'y';
936
- }
937
- // strings are converted to regexp
938
- if (typeof pattern === "string" && pattern !== '') {
939
- // result = new RegExp(pattern.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&'), flags);
940
- result = new RegExp(pattern, flags);
941
- } else if (pattern) {
942
- result = new RegExp(pattern.source, flags);
943
- }
944
- return result;
945
- };
946
-
947
- InputScanner.prototype.get_literal_regexp = function(literal_string) {
948
- return RegExp(literal_string.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&'));
949
- };
950
-
951
- /* css beautifier legacy helpers */
952
- InputScanner.prototype.peekUntilAfter = function(pattern) {
953
- var start = this.__position;
954
- var val = this.readUntilAfter(pattern);
955
- this.__position = start;
956
- return val;
957
- };
958
-
959
- InputScanner.prototype.lookBack = function(testVal) {
960
- var start = this.__position - 1;
961
- return start >= testVal.length && this.__input.substring(start - testVal.length, start)
962
- .toLowerCase() === testVal;
963
- };
964
-
965
- module.exports.InputScanner = InputScanner;
966
-
967
-
968
- /***/ }),
969
- /* 9 */
970
- /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
971
-
972
- /*jshint node:true */
973
- /*
974
-
975
- The MIT License (MIT)
976
-
977
- Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors.
978
-
979
- Permission is hereby granted, free of charge, to any person
980
- obtaining a copy of this software and associated documentation files
981
- (the "Software"), to deal in the Software without restriction,
982
- including without limitation the rights to use, copy, modify, merge,
983
- publish, distribute, sublicense, and/or sell copies of the Software,
984
- and to permit persons to whom the Software is furnished to do so,
985
- subject to the following conditions:
986
-
987
- The above copyright notice and this permission notice shall be
988
- included in all copies or substantial portions of the Software.
989
-
990
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
991
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
992
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
993
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
994
- BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
995
- ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
996
- CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
997
- SOFTWARE.
998
- */
999
-
1000
-
1001
-
1002
- var InputScanner = (__webpack_require__(8).InputScanner);
1003
- var Token = (__webpack_require__(3).Token);
1004
- var TokenStream = (__webpack_require__(10).TokenStream);
1005
- var WhitespacePattern = (__webpack_require__(11).WhitespacePattern);
1006
-
1007
- var TOKEN = {
1008
- START: 'TK_START',
1009
- RAW: 'TK_RAW',
1010
- EOF: 'TK_EOF'
1011
- };
1012
-
1013
- var Tokenizer = function(input_string, options) {
1014
- this._input = new InputScanner(input_string);
1015
- this._options = options || {};
1016
- this.__tokens = null;
1017
-
1018
- this._patterns = {};
1019
- this._patterns.whitespace = new WhitespacePattern(this._input);
1020
- };
1021
-
1022
- Tokenizer.prototype.tokenize = function() {
1023
- this._input.restart();
1024
- this.__tokens = new TokenStream();
1025
-
1026
- this._reset();
1027
-
1028
- var current;
1029
- var previous = new Token(TOKEN.START, '');
1030
- var open_token = null;
1031
- var open_stack = [];
1032
- var comments = new TokenStream();
1033
-
1034
- while (previous.type !== TOKEN.EOF) {
1035
- current = this._get_next_token(previous, open_token);
1036
- while (this._is_comment(current)) {
1037
- comments.add(current);
1038
- current = this._get_next_token(previous, open_token);
1039
- }
1040
-
1041
- if (!comments.isEmpty()) {
1042
- current.comments_before = comments;
1043
- comments = new TokenStream();
1044
- }
1045
-
1046
- current.parent = open_token;
1047
-
1048
- if (this._is_opening(current)) {
1049
- open_stack.push(open_token);
1050
- open_token = current;
1051
- } else if (open_token && this._is_closing(current, open_token)) {
1052
- current.opened = open_token;
1053
- open_token.closed = current;
1054
- open_token = open_stack.pop();
1055
- current.parent = open_token;
1056
- }
1057
-
1058
- current.previous = previous;
1059
- previous.next = current;
1060
-
1061
- this.__tokens.add(current);
1062
- previous = current;
1063
- }
1064
-
1065
- return this.__tokens;
1066
- };
1067
-
1068
-
1069
- Tokenizer.prototype._is_first_token = function() {
1070
- return this.__tokens.isEmpty();
1071
- };
1072
-
1073
- Tokenizer.prototype._reset = function() {};
1074
-
1075
- Tokenizer.prototype._get_next_token = function(previous_token, open_token) { // jshint unused:false
1076
- this._readWhitespace();
1077
- var resulting_string = this._input.read(/.+/g);
1078
- if (resulting_string) {
1079
- return this._create_token(TOKEN.RAW, resulting_string);
1080
- } else {
1081
- return this._create_token(TOKEN.EOF, '');
1082
- }
1083
- };
1084
-
1085
- Tokenizer.prototype._is_comment = function(current_token) { // jshint unused:false
1086
- return false;
1087
- };
1088
-
1089
- Tokenizer.prototype._is_opening = function(current_token) { // jshint unused:false
1090
- return false;
1091
- };
1092
-
1093
- Tokenizer.prototype._is_closing = function(current_token, open_token) { // jshint unused:false
1094
- return false;
1095
- };
1096
-
1097
- Tokenizer.prototype._create_token = function(type, text) {
1098
- var token = new Token(type, text,
1099
- this._patterns.whitespace.newline_count,
1100
- this._patterns.whitespace.whitespace_before_token);
1101
- return token;
1102
- };
1103
-
1104
- Tokenizer.prototype._readWhitespace = function() {
1105
- return this._patterns.whitespace.read();
1106
- };
1107
-
1108
-
1109
-
1110
- module.exports.Tokenizer = Tokenizer;
1111
- module.exports.TOKEN = TOKEN;
1112
-
1113
-
1114
- /***/ }),
1115
- /* 10 */
1116
- /***/ (function(module) {
1117
-
1118
- /*jshint node:true */
1119
- /*
1120
-
1121
- The MIT License (MIT)
1122
-
1123
- Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors.
1124
-
1125
- Permission is hereby granted, free of charge, to any person
1126
- obtaining a copy of this software and associated documentation files
1127
- (the "Software"), to deal in the Software without restriction,
1128
- including without limitation the rights to use, copy, modify, merge,
1129
- publish, distribute, sublicense, and/or sell copies of the Software,
1130
- and to permit persons to whom the Software is furnished to do so,
1131
- subject to the following conditions:
1132
-
1133
- The above copyright notice and this permission notice shall be
1134
- included in all copies or substantial portions of the Software.
1135
-
1136
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
1137
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
1138
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
1139
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
1140
- BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
1141
- ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
1142
- CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1143
- SOFTWARE.
1144
- */
1145
-
1146
-
1147
-
1148
- function TokenStream(parent_token) {
1149
- // private
1150
- this.__tokens = [];
1151
- this.__tokens_length = this.__tokens.length;
1152
- this.__position = 0;
1153
- this.__parent_token = parent_token;
1154
- }
1155
-
1156
- TokenStream.prototype.restart = function() {
1157
- this.__position = 0;
1158
- };
1159
-
1160
- TokenStream.prototype.isEmpty = function() {
1161
- return this.__tokens_length === 0;
1162
- };
1163
-
1164
- TokenStream.prototype.hasNext = function() {
1165
- return this.__position < this.__tokens_length;
1166
- };
1167
-
1168
- TokenStream.prototype.next = function() {
1169
- var val = null;
1170
- if (this.hasNext()) {
1171
- val = this.__tokens[this.__position];
1172
- this.__position += 1;
1173
- }
1174
- return val;
1175
- };
1176
-
1177
- TokenStream.prototype.peek = function(index) {
1178
- var val = null;
1179
- index = index || 0;
1180
- index += this.__position;
1181
- if (index >= 0 && index < this.__tokens_length) {
1182
- val = this.__tokens[index];
1183
- }
1184
- return val;
1185
- };
1186
-
1187
- TokenStream.prototype.add = function(token) {
1188
- if (this.__parent_token) {
1189
- token.parent = this.__parent_token;
1190
- }
1191
- this.__tokens.push(token);
1192
- this.__tokens_length += 1;
1193
- };
1194
-
1195
- module.exports.TokenStream = TokenStream;
1196
-
1197
-
1198
- /***/ }),
1199
- /* 11 */
1200
- /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
1201
-
1202
- /*jshint node:true */
1203
- /*
1204
-
1205
- The MIT License (MIT)
1206
-
1207
- Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors.
1208
-
1209
- Permission is hereby granted, free of charge, to any person
1210
- obtaining a copy of this software and associated documentation files
1211
- (the "Software"), to deal in the Software without restriction,
1212
- including without limitation the rights to use, copy, modify, merge,
1213
- publish, distribute, sublicense, and/or sell copies of the Software,
1214
- and to permit persons to whom the Software is furnished to do so,
1215
- subject to the following conditions:
1216
-
1217
- The above copyright notice and this permission notice shall be
1218
- included in all copies or substantial portions of the Software.
1219
-
1220
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
1221
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
1222
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
1223
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
1224
- BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
1225
- ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
1226
- CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1227
- SOFTWARE.
1228
- */
1229
-
1230
-
1231
-
1232
- var Pattern = (__webpack_require__(12).Pattern);
1233
-
1234
- function WhitespacePattern(input_scanner, parent) {
1235
- Pattern.call(this, input_scanner, parent);
1236
- if (parent) {
1237
- this._line_regexp = this._input.get_regexp(parent._line_regexp);
1238
- } else {
1239
- this.__set_whitespace_patterns('', '');
1240
- }
1241
-
1242
- this.newline_count = 0;
1243
- this.whitespace_before_token = '';
1244
- }
1245
- WhitespacePattern.prototype = new Pattern();
1246
-
1247
- WhitespacePattern.prototype.__set_whitespace_patterns = function(whitespace_chars, newline_chars) {
1248
- whitespace_chars += '\\t ';
1249
- newline_chars += '\\n\\r';
1250
-
1251
- this._match_pattern = this._input.get_regexp(
1252
- '[' + whitespace_chars + newline_chars + ']+', true);
1253
- this._newline_regexp = this._input.get_regexp(
1254
- '\\r\\n|[' + newline_chars + ']');
1255
- };
1256
-
1257
- WhitespacePattern.prototype.read = function() {
1258
- this.newline_count = 0;
1259
- this.whitespace_before_token = '';
1260
-
1261
- var resulting_string = this._input.read(this._match_pattern);
1262
- if (resulting_string === ' ') {
1263
- this.whitespace_before_token = ' ';
1264
- } else if (resulting_string) {
1265
- var matches = this.__split(this._newline_regexp, resulting_string);
1266
- this.newline_count = matches.length - 1;
1267
- this.whitespace_before_token = matches[this.newline_count];
1268
- }
1269
-
1270
- return resulting_string;
1271
- };
1272
-
1273
- WhitespacePattern.prototype.matching = function(whitespace_chars, newline_chars) {
1274
- var result = this._create();
1275
- result.__set_whitespace_patterns(whitespace_chars, newline_chars);
1276
- result._update();
1277
- return result;
1278
- };
1279
-
1280
- WhitespacePattern.prototype._create = function() {
1281
- return new WhitespacePattern(this._input, this);
1282
- };
1283
-
1284
- WhitespacePattern.prototype.__split = function(regexp, input_string) {
1285
- regexp.lastIndex = 0;
1286
- var start_index = 0;
1287
- var result = [];
1288
- var next_match = regexp.exec(input_string);
1289
- while (next_match) {
1290
- result.push(input_string.substring(start_index, next_match.index));
1291
- start_index = next_match.index + next_match[0].length;
1292
- next_match = regexp.exec(input_string);
1293
- }
1294
-
1295
- if (start_index < input_string.length) {
1296
- result.push(input_string.substring(start_index, input_string.length));
1297
- } else {
1298
- result.push('');
1299
- }
1300
-
1301
- return result;
1302
- };
1303
-
1304
-
1305
-
1306
- module.exports.WhitespacePattern = WhitespacePattern;
1307
-
1308
-
1309
- /***/ }),
1310
- /* 12 */
1311
- /***/ (function(module) {
1312
-
1313
- /*jshint node:true */
1314
- /*
1315
-
1316
- The MIT License (MIT)
1317
-
1318
- Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors.
1319
-
1320
- Permission is hereby granted, free of charge, to any person
1321
- obtaining a copy of this software and associated documentation files
1322
- (the "Software"), to deal in the Software without restriction,
1323
- including without limitation the rights to use, copy, modify, merge,
1324
- publish, distribute, sublicense, and/or sell copies of the Software,
1325
- and to permit persons to whom the Software is furnished to do so,
1326
- subject to the following conditions:
1327
-
1328
- The above copyright notice and this permission notice shall be
1329
- included in all copies or substantial portions of the Software.
1330
-
1331
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
1332
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
1333
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
1334
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
1335
- BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
1336
- ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
1337
- CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1338
- SOFTWARE.
1339
- */
1340
-
1341
-
1342
-
1343
- function Pattern(input_scanner, parent) {
1344
- this._input = input_scanner;
1345
- this._starting_pattern = null;
1346
- this._match_pattern = null;
1347
- this._until_pattern = null;
1348
- this._until_after = false;
1349
-
1350
- if (parent) {
1351
- this._starting_pattern = this._input.get_regexp(parent._starting_pattern, true);
1352
- this._match_pattern = this._input.get_regexp(parent._match_pattern, true);
1353
- this._until_pattern = this._input.get_regexp(parent._until_pattern);
1354
- this._until_after = parent._until_after;
1355
- }
1356
- }
1357
-
1358
- Pattern.prototype.read = function() {
1359
- var result = this._input.read(this._starting_pattern);
1360
- if (!this._starting_pattern || result) {
1361
- result += this._input.read(this._match_pattern, this._until_pattern, this._until_after);
1362
- }
1363
- return result;
1364
- };
1365
-
1366
- Pattern.prototype.read_match = function() {
1367
- return this._input.match(this._match_pattern);
1368
- };
1369
-
1370
- Pattern.prototype.until_after = function(pattern) {
1371
- var result = this._create();
1372
- result._until_after = true;
1373
- result._until_pattern = this._input.get_regexp(pattern);
1374
- result._update();
1375
- return result;
1376
- };
1377
-
1378
- Pattern.prototype.until = function(pattern) {
1379
- var result = this._create();
1380
- result._until_after = false;
1381
- result._until_pattern = this._input.get_regexp(pattern);
1382
- result._update();
1383
- return result;
1384
- };
1385
-
1386
- Pattern.prototype.starting_with = function(pattern) {
1387
- var result = this._create();
1388
- result._starting_pattern = this._input.get_regexp(pattern, true);
1389
- result._update();
1390
- return result;
1391
- };
1392
-
1393
- Pattern.prototype.matching = function(pattern) {
1394
- var result = this._create();
1395
- result._match_pattern = this._input.get_regexp(pattern, true);
1396
- result._update();
1397
- return result;
1398
- };
1399
-
1400
- Pattern.prototype._create = function() {
1401
- return new Pattern(this._input, this);
1402
- };
1403
-
1404
- Pattern.prototype._update = function() {};
1405
-
1406
- module.exports.Pattern = Pattern;
1407
-
1408
-
1409
- /***/ }),
1410
- /* 13 */
1411
- /***/ (function(module) {
1412
-
1413
- /*jshint node:true */
1414
- /*
1415
-
1416
- The MIT License (MIT)
1417
-
1418
- Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors.
1419
-
1420
- Permission is hereby granted, free of charge, to any person
1421
- obtaining a copy of this software and associated documentation files
1422
- (the "Software"), to deal in the Software without restriction,
1423
- including without limitation the rights to use, copy, modify, merge,
1424
- publish, distribute, sublicense, and/or sell copies of the Software,
1425
- and to permit persons to whom the Software is furnished to do so,
1426
- subject to the following conditions:
1427
-
1428
- The above copyright notice and this permission notice shall be
1429
- included in all copies or substantial portions of the Software.
1430
-
1431
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
1432
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
1433
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
1434
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
1435
- BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
1436
- ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
1437
- CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1438
- SOFTWARE.
1439
- */
1440
-
1441
-
1442
-
1443
- function Directives(start_block_pattern, end_block_pattern) {
1444
- start_block_pattern = typeof start_block_pattern === 'string' ? start_block_pattern : start_block_pattern.source;
1445
- end_block_pattern = typeof end_block_pattern === 'string' ? end_block_pattern : end_block_pattern.source;
1446
- this.__directives_block_pattern = new RegExp(start_block_pattern + / beautify( \w+[:]\w+)+ /.source + end_block_pattern, 'g');
1447
- this.__directive_pattern = / (\w+)[:](\w+)/g;
1448
-
1449
- this.__directives_end_ignore_pattern = new RegExp(start_block_pattern + /\sbeautify\signore:end\s/.source + end_block_pattern, 'g');
1450
- }
1451
-
1452
- Directives.prototype.get_directives = function(text) {
1453
- if (!text.match(this.__directives_block_pattern)) {
1454
- return null;
1455
- }
1456
-
1457
- var directives = {};
1458
- this.__directive_pattern.lastIndex = 0;
1459
- var directive_match = this.__directive_pattern.exec(text);
1460
-
1461
- while (directive_match) {
1462
- directives[directive_match[1]] = directive_match[2];
1463
- directive_match = this.__directive_pattern.exec(text);
1464
- }
1465
-
1466
- return directives;
1467
- };
1468
-
1469
- Directives.prototype.readIgnored = function(input) {
1470
- return input.readUntilAfter(this.__directives_end_ignore_pattern);
1471
- };
1472
-
1473
-
1474
- module.exports.Directives = Directives;
1475
-
1476
-
1477
- /***/ }),
1478
- /* 14 */
1479
- /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
1480
-
1481
- /*jshint node:true */
1482
- /*
1483
-
1484
- The MIT License (MIT)
1485
-
1486
- Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors.
1487
-
1488
- Permission is hereby granted, free of charge, to any person
1489
- obtaining a copy of this software and associated documentation files
1490
- (the "Software"), to deal in the Software without restriction,
1491
- including without limitation the rights to use, copy, modify, merge,
1492
- publish, distribute, sublicense, and/or sell copies of the Software,
1493
- and to permit persons to whom the Software is furnished to do so,
1494
- subject to the following conditions:
1495
-
1496
- The above copyright notice and this permission notice shall be
1497
- included in all copies or substantial portions of the Software.
1498
-
1499
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
1500
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
1501
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
1502
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
1503
- BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
1504
- ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
1505
- CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1506
- SOFTWARE.
1507
- */
1508
-
1509
-
1510
-
1511
- var Pattern = (__webpack_require__(12).Pattern);
1512
-
1513
-
1514
- var template_names = {
1515
- django: false,
1516
- erb: false,
1517
- handlebars: false,
1518
- php: false,
1519
- smarty: false
1520
- };
1521
-
1522
- // This lets templates appear anywhere we would do a readUntil
1523
- // The cost is higher but it is pay to play.
1524
- function TemplatablePattern(input_scanner, parent) {
1525
- Pattern.call(this, input_scanner, parent);
1526
- this.__template_pattern = null;
1527
- this._disabled = Object.assign({}, template_names);
1528
- this._excluded = Object.assign({}, template_names);
1529
-
1530
- if (parent) {
1531
- this.__template_pattern = this._input.get_regexp(parent.__template_pattern);
1532
- this._excluded = Object.assign(this._excluded, parent._excluded);
1533
- this._disabled = Object.assign(this._disabled, parent._disabled);
1534
- }
1535
- var pattern = new Pattern(input_scanner);
1536
- this.__patterns = {
1537
- handlebars_comment: pattern.starting_with(/{{!--/).until_after(/--}}/),
1538
- handlebars_unescaped: pattern.starting_with(/{{{/).until_after(/}}}/),
1539
- handlebars: pattern.starting_with(/{{/).until_after(/}}/),
1540
- php: pattern.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),
1541
- erb: pattern.starting_with(/<%[^%]/).until_after(/[^%]%>/),
1542
- // django coflicts with handlebars a bit.
1543
- django: pattern.starting_with(/{%/).until_after(/%}/),
1544
- django_value: pattern.starting_with(/{{/).until_after(/}}/),
1545
- django_comment: pattern.starting_with(/{#/).until_after(/#}/),
1546
- smarty: pattern.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),
1547
- smarty_comment: pattern.starting_with(/{\*/).until_after(/\*}/),
1548
- smarty_literal: pattern.starting_with(/{literal}/).until_after(/{\/literal}/)
1549
- };
1550
- }
1551
- TemplatablePattern.prototype = new Pattern();
1552
-
1553
- TemplatablePattern.prototype._create = function() {
1554
- return new TemplatablePattern(this._input, this);
1555
- };
1556
-
1557
- TemplatablePattern.prototype._update = function() {
1558
- this.__set_templated_pattern();
1559
- };
1560
-
1561
- TemplatablePattern.prototype.disable = function(language) {
1562
- var result = this._create();
1563
- result._disabled[language] = true;
1564
- result._update();
1565
- return result;
1566
- };
1567
-
1568
- TemplatablePattern.prototype.read_options = function(options) {
1569
- var result = this._create();
1570
- for (var language in template_names) {
1571
- result._disabled[language] = options.templating.indexOf(language) === -1;
1572
- }
1573
- result._update();
1574
- return result;
1575
- };
1576
-
1577
- TemplatablePattern.prototype.exclude = function(language) {
1578
- var result = this._create();
1579
- result._excluded[language] = true;
1580
- result._update();
1581
- return result;
1582
- };
1583
-
1584
- TemplatablePattern.prototype.read = function() {
1585
- var result = '';
1586
- if (this._match_pattern) {
1587
- result = this._input.read(this._starting_pattern);
1588
- } else {
1589
- result = this._input.read(this._starting_pattern, this.__template_pattern);
1590
- }
1591
- var next = this._read_template();
1592
- while (next) {
1593
- if (this._match_pattern) {
1594
- next += this._input.read(this._match_pattern);
1595
- } else {
1596
- next += this._input.readUntil(this.__template_pattern);
1597
- }
1598
- result += next;
1599
- next = this._read_template();
1600
- }
1601
-
1602
- if (this._until_after) {
1603
- result += this._input.readUntilAfter(this._until_pattern);
1604
- }
1605
- return result;
1606
- };
1607
-
1608
- TemplatablePattern.prototype.__set_templated_pattern = function() {
1609
- var items = [];
1610
-
1611
- if (!this._disabled.php) {
1612
- items.push(this.__patterns.php._starting_pattern.source);
1613
- }
1614
- if (!this._disabled.handlebars) {
1615
- items.push(this.__patterns.handlebars._starting_pattern.source);
1616
- }
1617
- if (!this._disabled.erb) {
1618
- items.push(this.__patterns.erb._starting_pattern.source);
1619
- }
1620
- if (!this._disabled.django) {
1621
- items.push(this.__patterns.django._starting_pattern.source);
1622
- // The starting pattern for django is more complex because it has different
1623
- // patterns for value, comment, and other sections
1624
- items.push(this.__patterns.django_value._starting_pattern.source);
1625
- items.push(this.__patterns.django_comment._starting_pattern.source);
1626
- }
1627
- if (!this._disabled.smarty) {
1628
- items.push(this.__patterns.smarty._starting_pattern.source);
1629
- }
1630
-
1631
- if (this._until_pattern) {
1632
- items.push(this._until_pattern.source);
1633
- }
1634
- this.__template_pattern = this._input.get_regexp('(?:' + items.join('|') + ')');
1635
- };
1636
-
1637
- TemplatablePattern.prototype._read_template = function() {
1638
- var resulting_string = '';
1639
- var c = this._input.peek();
1640
- if (c === '<') {
1641
- var peek1 = this._input.peek(1);
1642
- //if we're in a comment, do something special
1643
- // We treat all comments as literals, even more than preformatted tags
1644
- // we just look for the appropriate close tag
1645
- if (!this._disabled.php && !this._excluded.php && peek1 === '?') {
1646
- resulting_string = resulting_string ||
1647
- this.__patterns.php.read();
1648
- }
1649
- if (!this._disabled.erb && !this._excluded.erb && peek1 === '%') {
1650
- resulting_string = resulting_string ||
1651
- this.__patterns.erb.read();
1652
- }
1653
- } else if (c === '{') {
1654
- if (!this._disabled.handlebars && !this._excluded.handlebars) {
1655
- resulting_string = resulting_string ||
1656
- this.__patterns.handlebars_comment.read();
1657
- resulting_string = resulting_string ||
1658
- this.__patterns.handlebars_unescaped.read();
1659
- resulting_string = resulting_string ||
1660
- this.__patterns.handlebars.read();
1661
- }
1662
- if (!this._disabled.django) {
1663
- // django coflicts with handlebars a bit.
1664
- if (!this._excluded.django && !this._excluded.handlebars) {
1665
- resulting_string = resulting_string ||
1666
- this.__patterns.django_value.read();
1667
- }
1668
- if (!this._excluded.django) {
1669
- resulting_string = resulting_string ||
1670
- this.__patterns.django_comment.read();
1671
- resulting_string = resulting_string ||
1672
- this.__patterns.django.read();
1673
- }
1674
- }
1675
- if (!this._disabled.smarty) {
1676
- // smarty cannot be enabled with django or handlebars enabled
1677
- if (this._disabled.django && this._disabled.handlebars) {
1678
- resulting_string = resulting_string ||
1679
- this.__patterns.smarty_comment.read();
1680
- resulting_string = resulting_string ||
1681
- this.__patterns.smarty_literal.read();
1682
- resulting_string = resulting_string ||
1683
- this.__patterns.smarty.read();
1684
- }
1685
- }
1686
- }
1687
- return resulting_string;
1688
- };
1689
-
1690
-
1691
- module.exports.TemplatablePattern = TemplatablePattern;
1692
-
1693
-
1694
- /***/ }),
1695
- /* 15 */,
1696
- /* 16 */,
1697
- /* 17 */,
1698
- /* 18 */
1699
- /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
1700
-
1701
- /*jshint node:true */
1702
- /*
1703
-
1704
- The MIT License (MIT)
1705
-
1706
- Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors.
1707
-
1708
- Permission is hereby granted, free of charge, to any person
1709
- obtaining a copy of this software and associated documentation files
1710
- (the "Software"), to deal in the Software without restriction,
1711
- including without limitation the rights to use, copy, modify, merge,
1712
- publish, distribute, sublicense, and/or sell copies of the Software,
1713
- and to permit persons to whom the Software is furnished to do so,
1714
- subject to the following conditions:
1715
-
1716
- The above copyright notice and this permission notice shall be
1717
- included in all copies or substantial portions of the Software.
1718
-
1719
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
1720
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
1721
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
1722
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
1723
- BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
1724
- ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
1725
- CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1726
- SOFTWARE.
1727
- */
1728
-
1729
-
1730
-
1731
- var Beautifier = (__webpack_require__(19).Beautifier),
1732
- Options = (__webpack_require__(20).Options);
1733
-
1734
- function style_html(html_source, options, js_beautify, css_beautify) {
1735
- var beautifier = new Beautifier(html_source, options, js_beautify, css_beautify);
1736
- return beautifier.beautify();
1737
- }
1738
-
1739
- module.exports = style_html;
1740
- module.exports.defaultOptions = function() {
1741
- return new Options();
1742
- };
1743
-
1744
-
1745
- /***/ }),
1746
- /* 19 */
1747
- /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
1748
-
1749
- /*jshint node:true */
1750
- /*
1751
-
1752
- The MIT License (MIT)
1753
-
1754
- Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors.
1755
-
1756
- Permission is hereby granted, free of charge, to any person
1757
- obtaining a copy of this software and associated documentation files
1758
- (the "Software"), to deal in the Software without restriction,
1759
- including without limitation the rights to use, copy, modify, merge,
1760
- publish, distribute, sublicense, and/or sell copies of the Software,
1761
- and to permit persons to whom the Software is furnished to do so,
1762
- subject to the following conditions:
1763
-
1764
- The above copyright notice and this permission notice shall be
1765
- included in all copies or substantial portions of the Software.
1766
-
1767
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
1768
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
1769
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
1770
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
1771
- BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
1772
- ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
1773
- CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1774
- SOFTWARE.
1775
- */
1776
-
1777
-
1778
-
1779
- var Options = (__webpack_require__(20).Options);
1780
- var Output = (__webpack_require__(2).Output);
1781
- var Tokenizer = (__webpack_require__(21).Tokenizer);
1782
- var TOKEN = (__webpack_require__(21).TOKEN);
1783
-
1784
- var lineBreak = /\r\n|[\r\n]/;
1785
- var allLineBreaks = /\r\n|[\r\n]/g;
1786
-
1787
- var Printer = function(options, base_indent_string) { //handles input/output and some other printing functions
1788
-
1789
- this.indent_level = 0;
1790
- this.alignment_size = 0;
1791
- this.max_preserve_newlines = options.max_preserve_newlines;
1792
- this.preserve_newlines = options.preserve_newlines;
1793
-
1794
- this._output = new Output(options, base_indent_string);
1795
-
1796
- };
1797
-
1798
- Printer.prototype.current_line_has_match = function(pattern) {
1799
- return this._output.current_line.has_match(pattern);
1800
- };
1801
-
1802
- Printer.prototype.set_space_before_token = function(value, non_breaking) {
1803
- this._output.space_before_token = value;
1804
- this._output.non_breaking_space = non_breaking;
1805
- };
1806
-
1807
- Printer.prototype.set_wrap_point = function() {
1808
- this._output.set_indent(this.indent_level, this.alignment_size);
1809
- this._output.set_wrap_point();
1810
- };
1811
-
1812
-
1813
- Printer.prototype.add_raw_token = function(token) {
1814
- this._output.add_raw_token(token);
1815
- };
1816
-
1817
- Printer.prototype.print_preserved_newlines = function(raw_token) {
1818
- var newlines = 0;
1819
- if (raw_token.type !== TOKEN.TEXT && raw_token.previous.type !== TOKEN.TEXT) {
1820
- newlines = raw_token.newlines ? 1 : 0;
1821
- }
1822
-
1823
- if (this.preserve_newlines) {
1824
- newlines = raw_token.newlines < this.max_preserve_newlines + 1 ? raw_token.newlines : this.max_preserve_newlines + 1;
1825
- }
1826
- for (var n = 0; n < newlines; n++) {
1827
- this.print_newline(n > 0);
1828
- }
1829
-
1830
- return newlines !== 0;
1831
- };
1832
-
1833
- Printer.prototype.traverse_whitespace = function(raw_token) {
1834
- if (raw_token.whitespace_before || raw_token.newlines) {
1835
- if (!this.print_preserved_newlines(raw_token)) {
1836
- this._output.space_before_token = true;
1837
- }
1838
- return true;
1839
- }
1840
- return false;
1841
- };
1842
-
1843
- Printer.prototype.previous_token_wrapped = function() {
1844
- return this._output.previous_token_wrapped;
1845
- };
1846
-
1847
- Printer.prototype.print_newline = function(force) {
1848
- this._output.add_new_line(force);
1849
- };
1850
-
1851
- Printer.prototype.print_token = function(token) {
1852
- if (token.text) {
1853
- this._output.set_indent(this.indent_level, this.alignment_size);
1854
- this._output.add_token(token.text);
1855
- }
1856
- };
1857
-
1858
- Printer.prototype.indent = function() {
1859
- this.indent_level++;
1860
- };
1861
-
1862
- Printer.prototype.get_full_indent = function(level) {
1863
- level = this.indent_level + (level || 0);
1864
- if (level < 1) {
1865
- return '';
1866
- }
1867
-
1868
- return this._output.get_indent_string(level);
1869
- };
1870
-
1871
- var get_type_attribute = function(start_token) {
1872
- var result = null;
1873
- var raw_token = start_token.next;
1874
-
1875
- // Search attributes for a type attribute
1876
- while (raw_token.type !== TOKEN.EOF && start_token.closed !== raw_token) {
1877
- if (raw_token.type === TOKEN.ATTRIBUTE && raw_token.text === 'type') {
1878
- if (raw_token.next && raw_token.next.type === TOKEN.EQUALS &&
1879
- raw_token.next.next && raw_token.next.next.type === TOKEN.VALUE) {
1880
- result = raw_token.next.next.text;
1881
- }
1882
- break;
1883
- }
1884
- raw_token = raw_token.next;
1885
- }
1886
-
1887
- return result;
1888
- };
1889
-
1890
- var get_custom_beautifier_name = function(tag_check, raw_token) {
1891
- var typeAttribute = null;
1892
- var result = null;
1893
-
1894
- if (!raw_token.closed) {
1895
- return null;
1896
- }
1897
-
1898
- if (tag_check === 'script') {
1899
- typeAttribute = 'text/javascript';
1900
- } else if (tag_check === 'style') {
1901
- typeAttribute = 'text/css';
1902
- }
1903
-
1904
- typeAttribute = get_type_attribute(raw_token) || typeAttribute;
1905
-
1906
- // For script and style tags that have a type attribute, only enable custom beautifiers for matching values
1907
- // For those without a type attribute use default;
1908
- if (typeAttribute.search('text/css') > -1) {
1909
- result = 'css';
1910
- } else if (typeAttribute.search(/module|((text|application|dojo)\/(x-)?(javascript|ecmascript|jscript|livescript|(ld\+)?json|method|aspect))/) > -1) {
1911
- result = 'javascript';
1912
- } else if (typeAttribute.search(/(text|application|dojo)\/(x-)?(html)/) > -1) {
1913
- result = 'html';
1914
- } else if (typeAttribute.search(/test\/null/) > -1) {
1915
- // Test only mime-type for testing the beautifier when null is passed as beautifing function
1916
- result = 'null';
1917
- }
1918
-
1919
- return result;
1920
- };
1921
-
1922
- function in_array(what, arr) {
1923
- return arr.indexOf(what) !== -1;
1924
- }
1925
-
1926
- function TagFrame(parent, parser_token, indent_level) {
1927
- this.parent = parent || null;
1928
- this.tag = parser_token ? parser_token.tag_name : '';
1929
- this.indent_level = indent_level || 0;
1930
- this.parser_token = parser_token || null;
1931
- }
1932
-
1933
- function TagStack(printer) {
1934
- this._printer = printer;
1935
- this._current_frame = null;
1936
- }
1937
-
1938
- TagStack.prototype.get_parser_token = function() {
1939
- return this._current_frame ? this._current_frame.parser_token : null;
1940
- };
1941
-
1942
- TagStack.prototype.record_tag = function(parser_token) { //function to record a tag and its parent in this.tags Object
1943
- var new_frame = new TagFrame(this._current_frame, parser_token, this._printer.indent_level);
1944
- this._current_frame = new_frame;
1945
- };
1946
-
1947
- TagStack.prototype._try_pop_frame = function(frame) { //function to retrieve the opening tag to the corresponding closer
1948
- var parser_token = null;
1949
-
1950
- if (frame) {
1951
- parser_token = frame.parser_token;
1952
- this._printer.indent_level = frame.indent_level;
1953
- this._current_frame = frame.parent;
1954
- }
1955
-
1956
- return parser_token;
1957
- };
1958
-
1959
- TagStack.prototype._get_frame = function(tag_list, stop_list) { //function to retrieve the opening tag to the corresponding closer
1960
- var frame = this._current_frame;
1961
-
1962
- while (frame) { //till we reach '' (the initial value);
1963
- if (tag_list.indexOf(frame.tag) !== -1) { //if this is it use it
1964
- break;
1965
- } else if (stop_list && stop_list.indexOf(frame.tag) !== -1) {
1966
- frame = null;
1967
- break;
1968
- }
1969
- frame = frame.parent;
1970
- }
1971
-
1972
- return frame;
1973
- };
1974
-
1975
- TagStack.prototype.try_pop = function(tag, stop_list) { //function to retrieve the opening tag to the corresponding closer
1976
- var frame = this._get_frame([tag], stop_list);
1977
- return this._try_pop_frame(frame);
1978
- };
1979
-
1980
- TagStack.prototype.indent_to_tag = function(tag_list) {
1981
- var frame = this._get_frame(tag_list);
1982
- if (frame) {
1983
- this._printer.indent_level = frame.indent_level;
1984
- }
1985
- };
1986
-
1987
- function Beautifier(source_text, options, js_beautify, css_beautify) {
1988
- //Wrapper function to invoke all the necessary constructors and deal with the output.
1989
- this._source_text = source_text || '';
1990
- options = options || {};
1991
- this._js_beautify = js_beautify;
1992
- this._css_beautify = css_beautify;
1993
- this._tag_stack = null;
1994
-
1995
- // Allow the setting of language/file-type specific options
1996
- // with inheritance of overall settings
1997
- var optionHtml = new Options(options, 'html');
1998
-
1999
- this._options = optionHtml;
2000
-
2001
- this._is_wrap_attributes_force = this._options.wrap_attributes.substr(0, 'force'.length) === 'force';
2002
- this._is_wrap_attributes_force_expand_multiline = (this._options.wrap_attributes === 'force-expand-multiline');
2003
- this._is_wrap_attributes_force_aligned = (this._options.wrap_attributes === 'force-aligned');
2004
- this._is_wrap_attributes_aligned_multiple = (this._options.wrap_attributes === 'aligned-multiple');
2005
- this._is_wrap_attributes_preserve = this._options.wrap_attributes.substr(0, 'preserve'.length) === 'preserve';
2006
- this._is_wrap_attributes_preserve_aligned = (this._options.wrap_attributes === 'preserve-aligned');
2007
- }
2008
-
2009
- Beautifier.prototype.beautify = function() {
2010
-
2011
- // if disabled, return the input unchanged.
2012
- if (this._options.disabled) {
2013
- return this._source_text;
2014
- }
2015
-
2016
- var source_text = this._source_text;
2017
- var eol = this._options.eol;
2018
- if (this._options.eol === 'auto') {
2019
- eol = '\n';
2020
- if (source_text && lineBreak.test(source_text)) {
2021
- eol = source_text.match(lineBreak)[0];
2022
- }
2023
- }
2024
-
2025
- // HACK: newline parsing inconsistent. This brute force normalizes the input.
2026
- source_text = source_text.replace(allLineBreaks, '\n');
2027
-
2028
- var baseIndentString = source_text.match(/^[\t ]*/)[0];
2029
-
2030
- var last_token = {
2031
- text: '',
2032
- type: ''
2033
- };
2034
-
2035
- var last_tag_token = new TagOpenParserToken();
2036
-
2037
- var printer = new Printer(this._options, baseIndentString);
2038
- var tokens = new Tokenizer(source_text, this._options).tokenize();
2039
-
2040
- this._tag_stack = new TagStack(printer);
2041
-
2042
- var parser_token = null;
2043
- var raw_token = tokens.next();
2044
- while (raw_token.type !== TOKEN.EOF) {
2045
-
2046
- if (raw_token.type === TOKEN.TAG_OPEN || raw_token.type === TOKEN.COMMENT) {
2047
- parser_token = this._handle_tag_open(printer, raw_token, last_tag_token, last_token);
2048
- last_tag_token = parser_token;
2049
- } else if ((raw_token.type === TOKEN.ATTRIBUTE || raw_token.type === TOKEN.EQUALS || raw_token.type === TOKEN.VALUE) ||
2050
- (raw_token.type === TOKEN.TEXT && !last_tag_token.tag_complete)) {
2051
- parser_token = this._handle_inside_tag(printer, raw_token, last_tag_token, tokens);
2052
- } else if (raw_token.type === TOKEN.TAG_CLOSE) {
2053
- parser_token = this._handle_tag_close(printer, raw_token, last_tag_token);
2054
- } else if (raw_token.type === TOKEN.TEXT) {
2055
- parser_token = this._handle_text(printer, raw_token, last_tag_token);
2056
- } else {
2057
- // This should never happen, but if it does. Print the raw token
2058
- printer.add_raw_token(raw_token);
2059
- }
2060
-
2061
- last_token = parser_token;
2062
-
2063
- raw_token = tokens.next();
2064
- }
2065
- var sweet_code = printer._output.get_code(eol);
2066
-
2067
- return sweet_code;
2068
- };
2069
-
2070
- Beautifier.prototype._handle_tag_close = function(printer, raw_token, last_tag_token) {
2071
- var parser_token = {
2072
- text: raw_token.text,
2073
- type: raw_token.type
2074
- };
2075
- printer.alignment_size = 0;
2076
- last_tag_token.tag_complete = true;
2077
-
2078
- printer.set_space_before_token(raw_token.newlines || raw_token.whitespace_before !== '', true);
2079
- if (last_tag_token.is_unformatted) {
2080
- printer.add_raw_token(raw_token);
2081
- } else {
2082
- if (last_tag_token.tag_start_char === '<') {
2083
- printer.set_space_before_token(raw_token.text[0] === '/', true); // space before />, no space before >
2084
- if (this._is_wrap_attributes_force_expand_multiline && last_tag_token.has_wrapped_attrs) {
2085
- printer.print_newline(false);
2086
- }
2087
- }
2088
- printer.print_token(raw_token);
2089
-
2090
- }
2091
-
2092
- if (last_tag_token.indent_content &&
2093
- !(last_tag_token.is_unformatted || last_tag_token.is_content_unformatted)) {
2094
- printer.indent();
2095
-
2096
- // only indent once per opened tag
2097
- last_tag_token.indent_content = false;
2098
- }
2099
-
2100
- if (!last_tag_token.is_inline_element &&
2101
- !(last_tag_token.is_unformatted || last_tag_token.is_content_unformatted)) {
2102
- printer.set_wrap_point();
2103
- }
2104
-
2105
- return parser_token;
2106
- };
2107
-
2108
- Beautifier.prototype._handle_inside_tag = function(printer, raw_token, last_tag_token, tokens) {
2109
- var wrapped = last_tag_token.has_wrapped_attrs;
2110
- var parser_token = {
2111
- text: raw_token.text,
2112
- type: raw_token.type
2113
- };
2114
-
2115
- printer.set_space_before_token(raw_token.newlines || raw_token.whitespace_before !== '', true);
2116
- if (last_tag_token.is_unformatted) {
2117
- printer.add_raw_token(raw_token);
2118
- } else if (last_tag_token.tag_start_char === '{' && raw_token.type === TOKEN.TEXT) {
2119
- // For the insides of handlebars allow newlines or a single space between open and contents
2120
- if (printer.print_preserved_newlines(raw_token)) {
2121
- raw_token.newlines = 0;
2122
- printer.add_raw_token(raw_token);
2123
- } else {
2124
- printer.print_token(raw_token);
2125
- }
2126
- } else {
2127
- if (raw_token.type === TOKEN.ATTRIBUTE) {
2128
- printer.set_space_before_token(true);
2129
- last_tag_token.attr_count += 1;
2130
- } else if (raw_token.type === TOKEN.EQUALS) { //no space before =
2131
- printer.set_space_before_token(false);
2132
- } else if (raw_token.type === TOKEN.VALUE && raw_token.previous.type === TOKEN.EQUALS) { //no space before value
2133
- printer.set_space_before_token(false);
2134
- }
2135
-
2136
- if (raw_token.type === TOKEN.ATTRIBUTE && last_tag_token.tag_start_char === '<') {
2137
- if (this._is_wrap_attributes_preserve || this._is_wrap_attributes_preserve_aligned) {
2138
- printer.traverse_whitespace(raw_token);
2139
- wrapped = wrapped || raw_token.newlines !== 0;
2140
- }
2141
-
2142
-
2143
- if (this._is_wrap_attributes_force) {
2144
- var force_attr_wrap = last_tag_token.attr_count > 1;
2145
- if (this._is_wrap_attributes_force_expand_multiline && last_tag_token.attr_count === 1) {
2146
- var is_only_attribute = true;
2147
- var peek_index = 0;
2148
- var peek_token;
2149
- do {
2150
- peek_token = tokens.peek(peek_index);
2151
- if (peek_token.type === TOKEN.ATTRIBUTE) {
2152
- is_only_attribute = false;
2153
- break;
2154
- }
2155
- peek_index += 1;
2156
- } while (peek_index < 4 && peek_token.type !== TOKEN.EOF && peek_token.type !== TOKEN.TAG_CLOSE);
2157
-
2158
- force_attr_wrap = !is_only_attribute;
2159
- }
2160
-
2161
- if (force_attr_wrap) {
2162
- printer.print_newline(false);
2163
- wrapped = true;
2164
- }
2165
- }
2166
- }
2167
- printer.print_token(raw_token);
2168
- wrapped = wrapped || printer.previous_token_wrapped();
2169
- last_tag_token.has_wrapped_attrs = wrapped;
2170
- }
2171
- return parser_token;
2172
- };
2173
-
2174
- Beautifier.prototype._handle_text = function(printer, raw_token, last_tag_token) {
2175
- var parser_token = {
2176
- text: raw_token.text,
2177
- type: 'TK_CONTENT'
2178
- };
2179
- if (last_tag_token.custom_beautifier_name) { //check if we need to format javascript
2180
- this._print_custom_beatifier_text(printer, raw_token, last_tag_token);
2181
- } else if (last_tag_token.is_unformatted || last_tag_token.is_content_unformatted) {
2182
- printer.add_raw_token(raw_token);
2183
- } else {
2184
- printer.traverse_whitespace(raw_token);
2185
- printer.print_token(raw_token);
2186
- }
2187
- return parser_token;
2188
- };
2189
-
2190
- Beautifier.prototype._print_custom_beatifier_text = function(printer, raw_token, last_tag_token) {
2191
- var local = this;
2192
- if (raw_token.text !== '') {
2193
-
2194
- var text = raw_token.text,
2195
- _beautifier,
2196
- script_indent_level = 1,
2197
- pre = '',
2198
- post = '';
2199
- if (last_tag_token.custom_beautifier_name === 'javascript' && typeof this._js_beautify === 'function') {
2200
- _beautifier = this._js_beautify;
2201
- } else if (last_tag_token.custom_beautifier_name === 'css' && typeof this._css_beautify === 'function') {
2202
- _beautifier = this._css_beautify;
2203
- } else if (last_tag_token.custom_beautifier_name === 'html') {
2204
- _beautifier = function(html_source, options) {
2205
- var beautifier = new Beautifier(html_source, options, local._js_beautify, local._css_beautify);
2206
- return beautifier.beautify();
2207
- };
2208
- }
2209
-
2210
- if (this._options.indent_scripts === "keep") {
2211
- script_indent_level = 0;
2212
- } else if (this._options.indent_scripts === "separate") {
2213
- script_indent_level = -printer.indent_level;
2214
- }
2215
-
2216
- var indentation = printer.get_full_indent(script_indent_level);
2217
-
2218
- // if there is at least one empty line at the end of this text, strip it
2219
- // we'll be adding one back after the text but before the containing tag.
2220
- text = text.replace(/\n[ \t]*$/, '');
2221
-
2222
- // Handle the case where content is wrapped in a comment or cdata.
2223
- if (last_tag_token.custom_beautifier_name !== 'html' &&
2224
- text[0] === '<' && text.match(/^(<!--|<!\[CDATA\[)/)) {
2225
- var matched = /^(<!--[^\n]*|<!\[CDATA\[)(\n?)([ \t\n]*)([\s\S]*)(-->|]]>)$/.exec(text);
2226
-
2227
- // if we start to wrap but don't finish, print raw
2228
- if (!matched) {
2229
- printer.add_raw_token(raw_token);
2230
- return;
2231
- }
2232
-
2233
- pre = indentation + matched[1] + '\n';
2234
- text = matched[4];
2235
- if (matched[5]) {
2236
- post = indentation + matched[5];
2237
- }
2238
-
2239
- // if there is at least one empty line at the end of this text, strip it
2240
- // we'll be adding one back after the text but before the containing tag.
2241
- text = text.replace(/\n[ \t]*$/, '');
2242
-
2243
- if (matched[2] || matched[3].indexOf('\n') !== -1) {
2244
- // if the first line of the non-comment text has spaces
2245
- // use that as the basis for indenting in null case.
2246
- matched = matched[3].match(/[ \t]+$/);
2247
- if (matched) {
2248
- raw_token.whitespace_before = matched[0];
2249
- }
2250
- }
2251
- }
2252
-
2253
- if (text) {
2254
- if (_beautifier) {
2255
-
2256
- // call the Beautifier if avaliable
2257
- var Child_options = function() {
2258
- this.eol = '\n';
2259
- };
2260
- Child_options.prototype = this._options.raw_options;
2261
- var child_options = new Child_options();
2262
- text = _beautifier(indentation + text, child_options);
2263
- } else {
2264
- // simply indent the string otherwise
2265
- var white = raw_token.whitespace_before;
2266
- if (white) {
2267
- text = text.replace(new RegExp('\n(' + white + ')?', 'g'), '\n');
2268
- }
2269
-
2270
- text = indentation + text.replace(/\n/g, '\n' + indentation);
2271
- }
2272
- }
2273
-
2274
- if (pre) {
2275
- if (!text) {
2276
- text = pre + post;
2277
- } else {
2278
- text = pre + text + '\n' + post;
2279
- }
2280
- }
2281
-
2282
- printer.print_newline(false);
2283
- if (text) {
2284
- raw_token.text = text;
2285
- raw_token.whitespace_before = '';
2286
- raw_token.newlines = 0;
2287
- printer.add_raw_token(raw_token);
2288
- printer.print_newline(true);
2289
- }
2290
- }
2291
- };
2292
-
2293
- Beautifier.prototype._handle_tag_open = function(printer, raw_token, last_tag_token, last_token) {
2294
- var parser_token = this._get_tag_open_token(raw_token);
2295
-
2296
- if ((last_tag_token.is_unformatted || last_tag_token.is_content_unformatted) &&
2297
- !last_tag_token.is_empty_element &&
2298
- raw_token.type === TOKEN.TAG_OPEN && raw_token.text.indexOf('</') === 0) {
2299
- // End element tags for unformatted or content_unformatted elements
2300
- // are printed raw to keep any newlines inside them exactly the same.
2301
- printer.add_raw_token(raw_token);
2302
- parser_token.start_tag_token = this._tag_stack.try_pop(parser_token.tag_name);
2303
- } else {
2304
- printer.traverse_whitespace(raw_token);
2305
- this._set_tag_position(printer, raw_token, parser_token, last_tag_token, last_token);
2306
- if (!parser_token.is_inline_element) {
2307
- printer.set_wrap_point();
2308
- }
2309
- printer.print_token(raw_token);
2310
- }
2311
-
2312
- //indent attributes an auto, forced, aligned or forced-align line-wrap
2313
- if (this._is_wrap_attributes_force_aligned || this._is_wrap_attributes_aligned_multiple || this._is_wrap_attributes_preserve_aligned) {
2314
- parser_token.alignment_size = raw_token.text.length + 1;
2315
- }
2316
-
2317
- if (!parser_token.tag_complete && !parser_token.is_unformatted) {
2318
- printer.alignment_size = parser_token.alignment_size;
2319
- }
2320
-
2321
- return parser_token;
2322
- };
2323
-
2324
- var TagOpenParserToken = function(parent, raw_token) {
2325
- this.parent = parent || null;
2326
- this.text = '';
2327
- this.type = 'TK_TAG_OPEN';
2328
- this.tag_name = '';
2329
- this.is_inline_element = false;
2330
- this.is_unformatted = false;
2331
- this.is_content_unformatted = false;
2332
- this.is_empty_element = false;
2333
- this.is_start_tag = false;
2334
- this.is_end_tag = false;
2335
- this.indent_content = false;
2336
- this.multiline_content = false;
2337
- this.custom_beautifier_name = null;
2338
- this.start_tag_token = null;
2339
- this.attr_count = 0;
2340
- this.has_wrapped_attrs = false;
2341
- this.alignment_size = 0;
2342
- this.tag_complete = false;
2343
- this.tag_start_char = '';
2344
- this.tag_check = '';
2345
-
2346
- if (!raw_token) {
2347
- this.tag_complete = true;
2348
- } else {
2349
- var tag_check_match;
2350
-
2351
- this.tag_start_char = raw_token.text[0];
2352
- this.text = raw_token.text;
2353
-
2354
- if (this.tag_start_char === '<') {
2355
- tag_check_match = raw_token.text.match(/^<([^\s>]*)/);
2356
- this.tag_check = tag_check_match ? tag_check_match[1] : '';
2357
- } else {
2358
- tag_check_match = raw_token.text.match(/^{{~?(?:[\^]|#\*?)?([^\s}]+)/);
2359
- this.tag_check = tag_check_match ? tag_check_match[1] : '';
2360
-
2361
- // handle "{{#> myPartial}}" or "{{~#> myPartial}}"
2362
- if ((raw_token.text.startsWith('{{#>') || raw_token.text.startsWith('{{~#>')) && this.tag_check[0] === '>') {
2363
- if (this.tag_check === '>' && raw_token.next !== null) {
2364
- this.tag_check = raw_token.next.text.split(' ')[0];
2365
- } else {
2366
- this.tag_check = raw_token.text.split('>')[1];
2367
- }
2368
- }
2369
- }
2370
-
2371
- this.tag_check = this.tag_check.toLowerCase();
2372
-
2373
- if (raw_token.type === TOKEN.COMMENT) {
2374
- this.tag_complete = true;
2375
- }
2376
-
2377
- this.is_start_tag = this.tag_check.charAt(0) !== '/';
2378
- this.tag_name = !this.is_start_tag ? this.tag_check.substr(1) : this.tag_check;
2379
- this.is_end_tag = !this.is_start_tag ||
2380
- (raw_token.closed && raw_token.closed.text === '/>');
2381
-
2382
- // if whitespace handler ~ included (i.e. {{~#if true}}), handlebars tags start at pos 3 not pos 2
2383
- var handlebar_starts = 2;
2384
- if (this.tag_start_char === '{' && this.text.length >= 3) {
2385
- if (this.text.charAt(2) === '~') {
2386
- handlebar_starts = 3;
2387
- }
2388
- }
2389
-
2390
- // handlebars tags that don't start with # or ^ are single_tags, and so also start and end.
2391
- this.is_end_tag = this.is_end_tag ||
2392
- (this.tag_start_char === '{' && (this.text.length < 3 || (/[^#\^]/.test(this.text.charAt(handlebar_starts)))));
2393
- }
2394
- };
2395
-
2396
- Beautifier.prototype._get_tag_open_token = function(raw_token) { //function to get a full tag and parse its type
2397
- var parser_token = new TagOpenParserToken(this._tag_stack.get_parser_token(), raw_token);
2398
-
2399
- parser_token.alignment_size = this._options.wrap_attributes_indent_size;
2400
-
2401
- parser_token.is_end_tag = parser_token.is_end_tag ||
2402
- in_array(parser_token.tag_check, this._options.void_elements);
2403
-
2404
- parser_token.is_empty_element = parser_token.tag_complete ||
2405
- (parser_token.is_start_tag && parser_token.is_end_tag);
2406
-
2407
- parser_token.is_unformatted = !parser_token.tag_complete && in_array(parser_token.tag_check, this._options.unformatted);
2408
- parser_token.is_content_unformatted = !parser_token.is_empty_element && in_array(parser_token.tag_check, this._options.content_unformatted);
2409
- parser_token.is_inline_element = in_array(parser_token.tag_name, this._options.inline) || parser_token.tag_name.includes("-") || parser_token.tag_start_char === '{';
2410
-
2411
- return parser_token;
2412
- };
2413
-
2414
- Beautifier.prototype._set_tag_position = function(printer, raw_token, parser_token, last_tag_token, last_token) {
2415
-
2416
- if (!parser_token.is_empty_element) {
2417
- if (parser_token.is_end_tag) { //this tag is a double tag so check for tag-ending
2418
- parser_token.start_tag_token = this._tag_stack.try_pop(parser_token.tag_name); //remove it and all ancestors
2419
- } else { // it's a start-tag
2420
- // check if this tag is starting an element that has optional end element
2421
- // and do an ending needed
2422
- if (this._do_optional_end_element(parser_token)) {
2423
- if (!parser_token.is_inline_element) {
2424
- printer.print_newline(false);
2425
- }
2426
- }
2427
-
2428
- this._tag_stack.record_tag(parser_token); //push it on the tag stack
2429
-
2430
- if ((parser_token.tag_name === 'script' || parser_token.tag_name === 'style') &&
2431
- !(parser_token.is_unformatted || parser_token.is_content_unformatted)) {
2432
- parser_token.custom_beautifier_name = get_custom_beautifier_name(parser_token.tag_check, raw_token);
2433
- }
2434
- }
2435
- }
2436
-
2437
- if (in_array(parser_token.tag_check, this._options.extra_liners)) { //check if this double needs an extra line
2438
- printer.print_newline(false);
2439
- if (!printer._output.just_added_blankline()) {
2440
- printer.print_newline(true);
2441
- }
2442
- }
2443
-
2444
- if (parser_token.is_empty_element) { //if this tag name is a single tag type (either in the list or has a closing /)
2445
-
2446
- // if you hit an else case, reset the indent level if you are inside an:
2447
- // 'if', 'unless', or 'each' block.
2448
- if (parser_token.tag_start_char === '{' && parser_token.tag_check === 'else') {
2449
- this._tag_stack.indent_to_tag(['if', 'unless', 'each']);
2450
- parser_token.indent_content = true;
2451
- // Don't add a newline if opening {{#if}} tag is on the current line
2452
- var foundIfOnCurrentLine = printer.current_line_has_match(/{{#if/);
2453
- if (!foundIfOnCurrentLine) {
2454
- printer.print_newline(false);
2455
- }
2456
- }
2457
-
2458
- // Don't add a newline before elements that should remain where they are.
2459
- if (parser_token.tag_name === '!--' && last_token.type === TOKEN.TAG_CLOSE &&
2460
- last_tag_token.is_end_tag && parser_token.text.indexOf('\n') === -1) {
2461
- //Do nothing. Leave comments on same line.
2462
- } else {
2463
- if (!(parser_token.is_inline_element || parser_token.is_unformatted)) {
2464
- printer.print_newline(false);
2465
- }
2466
- this._calcluate_parent_multiline(printer, parser_token);
2467
- }
2468
- } else if (parser_token.is_end_tag) { //this tag is a double tag so check for tag-ending
2469
- var do_end_expand = false;
2470
-
2471
- // deciding whether a block is multiline should not be this hard
2472
- do_end_expand = parser_token.start_tag_token && parser_token.start_tag_token.multiline_content;
2473
- do_end_expand = do_end_expand || (!parser_token.is_inline_element &&
2474
- !(last_tag_token.is_inline_element || last_tag_token.is_unformatted) &&
2475
- !(last_token.type === TOKEN.TAG_CLOSE && parser_token.start_tag_token === last_tag_token) &&
2476
- last_token.type !== 'TK_CONTENT'
2477
- );
2478
-
2479
- if (parser_token.is_content_unformatted || parser_token.is_unformatted) {
2480
- do_end_expand = false;
2481
- }
2482
-
2483
- if (do_end_expand) {
2484
- printer.print_newline(false);
2485
- }
2486
- } else { // it's a start-tag
2487
- parser_token.indent_content = !parser_token.custom_beautifier_name;
2488
-
2489
- if (parser_token.tag_start_char === '<') {
2490
- if (parser_token.tag_name === 'html') {
2491
- parser_token.indent_content = this._options.indent_inner_html;
2492
- } else if (parser_token.tag_name === 'head') {
2493
- parser_token.indent_content = this._options.indent_head_inner_html;
2494
- } else if (parser_token.tag_name === 'body') {
2495
- parser_token.indent_content = this._options.indent_body_inner_html;
2496
- }
2497
- }
2498
-
2499
- if (!(parser_token.is_inline_element || parser_token.is_unformatted) &&
2500
- (last_token.type !== 'TK_CONTENT' || parser_token.is_content_unformatted)) {
2501
- printer.print_newline(false);
2502
- }
2503
-
2504
- this._calcluate_parent_multiline(printer, parser_token);
2505
- }
2506
- };
2507
-
2508
- Beautifier.prototype._calcluate_parent_multiline = function(printer, parser_token) {
2509
- if (parser_token.parent && printer._output.just_added_newline() &&
2510
- !((parser_token.is_inline_element || parser_token.is_unformatted) && parser_token.parent.is_inline_element)) {
2511
- parser_token.parent.multiline_content = true;
2512
- }
2513
- };
2514
-
2515
- //To be used for <p> tag special case:
2516
- var p_closers = ['address', 'article', 'aside', 'blockquote', 'details', 'div', 'dl', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'header', 'hr', 'main', 'nav', 'ol', 'p', 'pre', 'section', 'table', 'ul'];
2517
- var p_parent_excludes = ['a', 'audio', 'del', 'ins', 'map', 'noscript', 'video'];
2518
-
2519
- Beautifier.prototype._do_optional_end_element = function(parser_token) {
2520
- var result = null;
2521
- // NOTE: cases of "if there is no more content in the parent element"
2522
- // are handled automatically by the beautifier.
2523
- // It assumes parent or ancestor close tag closes all children.
2524
- // https://www.w3.org/TR/html5/syntax.html#optional-tags
2525
- if (parser_token.is_empty_element || !parser_token.is_start_tag || !parser_token.parent) {
2526
- return;
2527
-
2528
- }
2529
-
2530
- if (parser_token.tag_name === 'body') {
2531
- // A head element’s end tag may be omitted if the head element is not immediately followed by a space character or a comment.
2532
- result = result || this._tag_stack.try_pop('head');
2533
-
2534
- //} else if (parser_token.tag_name === 'body') {
2535
- // DONE: A body element’s end tag may be omitted if the body element is not immediately followed by a comment.
2536
-
2537
- } else if (parser_token.tag_name === 'li') {
2538
- // An li element’s end tag may be omitted if the li element is immediately followed by another li element or if there is no more content in the parent element.
2539
- result = result || this._tag_stack.try_pop('li', ['ol', 'ul']);
2540
-
2541
- } else if (parser_token.tag_name === 'dd' || parser_token.tag_name === 'dt') {
2542
- // A dd element’s end tag may be omitted if the dd element is immediately followed by another dd element or a dt element, or if there is no more content in the parent element.
2543
- // A dt element’s end tag may be omitted if the dt element is immediately followed by another dt element or a dd element.
2544
- result = result || this._tag_stack.try_pop('dt', ['dl']);
2545
- result = result || this._tag_stack.try_pop('dd', ['dl']);
2546
-
2547
-
2548
- } else if (parser_token.parent.tag_name === 'p' && p_closers.indexOf(parser_token.tag_name) !== -1) {
2549
- // IMPORTANT: this else-if works because p_closers has no overlap with any other element we look for in this method
2550
- // check for the parent element is an HTML element that is not an <a>, <audio>, <del>, <ins>, <map>, <noscript>, or <video> element, or an autonomous custom element.
2551
- // To do this right, this needs to be coded as an inclusion of the inverse of the exclusion above.
2552
- // But to start with (if we ignore "autonomous custom elements") the exclusion would be fine.
2553
- var p_parent = parser_token.parent.parent;
2554
- if (!p_parent || p_parent_excludes.indexOf(p_parent.tag_name) === -1) {
2555
- result = result || this._tag_stack.try_pop('p');
2556
- }
2557
- } else if (parser_token.tag_name === 'rp' || parser_token.tag_name === 'rt') {
2558
- // An rt element’s end tag may be omitted if the rt element is immediately followed by an rt or rp element, or if there is no more content in the parent element.
2559
- // An rp element’s end tag may be omitted if the rp element is immediately followed by an rt or rp element, or if there is no more content in the parent element.
2560
- result = result || this._tag_stack.try_pop('rt', ['ruby', 'rtc']);
2561
- result = result || this._tag_stack.try_pop('rp', ['ruby', 'rtc']);
2562
-
2563
- } else if (parser_token.tag_name === 'optgroup') {
2564
- // An optgroup element’s end tag may be omitted if the optgroup element is immediately followed by another optgroup element, or if there is no more content in the parent element.
2565
- // An option element’s end tag may be omitted if the option element is immediately followed by another option element, or if it is immediately followed by an optgroup element, or if there is no more content in the parent element.
2566
- result = result || this._tag_stack.try_pop('optgroup', ['select']);
2567
- //result = result || this._tag_stack.try_pop('option', ['select']);
2568
-
2569
- } else if (parser_token.tag_name === 'option') {
2570
- // An option element’s end tag may be omitted if the option element is immediately followed by another option element, or if it is immediately followed by an optgroup element, or if there is no more content in the parent element.
2571
- result = result || this._tag_stack.try_pop('option', ['select', 'datalist', 'optgroup']);
2572
-
2573
- } else if (parser_token.tag_name === 'colgroup') {
2574
- // DONE: A colgroup element’s end tag may be omitted if the colgroup element is not immediately followed by a space character or a comment.
2575
- // A caption element's end tag may be ommitted if a colgroup, thead, tfoot, tbody, or tr element is started.
2576
- result = result || this._tag_stack.try_pop('caption', ['table']);
2577
-
2578
- } else if (parser_token.tag_name === 'thead') {
2579
- // A colgroup element's end tag may be ommitted if a thead, tfoot, tbody, or tr element is started.
2580
- // A caption element's end tag may be ommitted if a colgroup, thead, tfoot, tbody, or tr element is started.
2581
- result = result || this._tag_stack.try_pop('caption', ['table']);
2582
- result = result || this._tag_stack.try_pop('colgroup', ['table']);
2583
-
2584
- //} else if (parser_token.tag_name === 'caption') {
2585
- // DONE: A caption element’s end tag may be omitted if the caption element is not immediately followed by a space character or a comment.
2586
-
2587
- } else if (parser_token.tag_name === 'tbody' || parser_token.tag_name === 'tfoot') {
2588
- // A thead element’s end tag may be omitted if the thead element is immediately followed by a tbody or tfoot element.
2589
- // A tbody element’s end tag may be omitted if the tbody element is immediately followed by a tbody or tfoot element, or if there is no more content in the parent element.
2590
- // A colgroup element's end tag may be ommitted if a thead, tfoot, tbody, or tr element is started.
2591
- // A caption element's end tag may be ommitted if a colgroup, thead, tfoot, tbody, or tr element is started.
2592
- result = result || this._tag_stack.try_pop('caption', ['table']);
2593
- result = result || this._tag_stack.try_pop('colgroup', ['table']);
2594
- result = result || this._tag_stack.try_pop('thead', ['table']);
2595
- result = result || this._tag_stack.try_pop('tbody', ['table']);
2596
-
2597
- //} else if (parser_token.tag_name === 'tfoot') {
2598
- // DONE: A tfoot element’s end tag may be omitted if there is no more content in the parent element.
2599
-
2600
- } else if (parser_token.tag_name === 'tr') {
2601
- // A tr element’s end tag may be omitted if the tr element is immediately followed by another tr element, or if there is no more content in the parent element.
2602
- // A colgroup element's end tag may be ommitted if a thead, tfoot, tbody, or tr element is started.
2603
- // A caption element's end tag may be ommitted if a colgroup, thead, tfoot, tbody, or tr element is started.
2604
- result = result || this._tag_stack.try_pop('caption', ['table']);
2605
- result = result || this._tag_stack.try_pop('colgroup', ['table']);
2606
- result = result || this._tag_stack.try_pop('tr', ['table', 'thead', 'tbody', 'tfoot']);
2607
-
2608
- } else if (parser_token.tag_name === 'th' || parser_token.tag_name === 'td') {
2609
- // A td element’s end tag may be omitted if the td element is immediately followed by a td or th element, or if there is no more content in the parent element.
2610
- // A th element’s end tag may be omitted if the th element is immediately followed by a td or th element, or if there is no more content in the parent element.
2611
- result = result || this._tag_stack.try_pop('td', ['table', 'thead', 'tbody', 'tfoot', 'tr']);
2612
- result = result || this._tag_stack.try_pop('th', ['table', 'thead', 'tbody', 'tfoot', 'tr']);
2613
- }
2614
-
2615
- // Start element omission not handled currently
2616
- // A head element’s start tag may be omitted if the element is empty, or if the first thing inside the head element is an element.
2617
- // A tbody element’s start tag may be omitted if the first thing inside the tbody element is a tr element, and if the element is not immediately preceded by a tbody, thead, or tfoot element whose end tag has been omitted. (It can’t be omitted if the element is empty.)
2618
- // A colgroup element’s start tag may be omitted if the first thing inside the colgroup element is a col element, and if the element is not immediately preceded by another colgroup element whose end tag has been omitted. (It can’t be omitted if the element is empty.)
2619
-
2620
- // Fix up the parent of the parser token
2621
- parser_token.parent = this._tag_stack.get_parser_token();
2622
-
2623
- return result;
2624
- };
2625
-
2626
- module.exports.Beautifier = Beautifier;
2627
-
2628
-
2629
- /***/ }),
2630
- /* 20 */
2631
- /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
2632
-
2633
- /*jshint node:true */
2634
- /*
2635
-
2636
- The MIT License (MIT)
2637
-
2638
- Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors.
2639
-
2640
- Permission is hereby granted, free of charge, to any person
2641
- obtaining a copy of this software and associated documentation files
2642
- (the "Software"), to deal in the Software without restriction,
2643
- including without limitation the rights to use, copy, modify, merge,
2644
- publish, distribute, sublicense, and/or sell copies of the Software,
2645
- and to permit persons to whom the Software is furnished to do so,
2646
- subject to the following conditions:
2647
-
2648
- The above copyright notice and this permission notice shall be
2649
- included in all copies or substantial portions of the Software.
2650
-
2651
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
2652
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
2653
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
2654
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
2655
- BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
2656
- ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
2657
- CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2658
- SOFTWARE.
2659
- */
2660
-
2661
-
2662
-
2663
- var BaseOptions = (__webpack_require__(6).Options);
2664
-
2665
- function Options(options) {
2666
- BaseOptions.call(this, options, 'html');
2667
- if (this.templating.length === 1 && this.templating[0] === 'auto') {
2668
- this.templating = ['django', 'erb', 'handlebars', 'php'];
2669
- }
2670
-
2671
- this.indent_inner_html = this._get_boolean('indent_inner_html');
2672
- this.indent_body_inner_html = this._get_boolean('indent_body_inner_html', true);
2673
- this.indent_head_inner_html = this._get_boolean('indent_head_inner_html', true);
2674
-
2675
- this.indent_handlebars = this._get_boolean('indent_handlebars', true);
2676
- this.wrap_attributes = this._get_selection('wrap_attributes',
2677
- ['auto', 'force', 'force-aligned', 'force-expand-multiline', 'aligned-multiple', 'preserve', 'preserve-aligned']);
2678
- this.wrap_attributes_indent_size = this._get_number('wrap_attributes_indent_size', this.indent_size);
2679
- this.extra_liners = this._get_array('extra_liners', ['head', 'body', '/html']);
2680
-
2681
- // Block vs inline elements
2682
- // https://developer.mozilla.org/en-US/docs/Web/HTML/Block-level_elements
2683
- // https://developer.mozilla.org/en-US/docs/Web/HTML/Inline_elements
2684
- // https://www.w3.org/TR/html5/dom.html#phrasing-content
2685
- this.inline = this._get_array('inline', [
2686
- 'a', 'abbr', 'area', 'audio', 'b', 'bdi', 'bdo', 'br', 'button', 'canvas', 'cite',
2687
- 'code', 'data', 'datalist', 'del', 'dfn', 'em', 'embed', 'i', 'iframe', 'img',
2688
- 'input', 'ins', 'kbd', 'keygen', 'label', 'map', 'mark', 'math', 'meter', 'noscript',
2689
- 'object', 'output', 'progress', 'q', 'ruby', 's', 'samp', /* 'script', */ 'select', 'small',
2690
- 'span', 'strong', 'sub', 'sup', 'svg', 'template', 'textarea', 'time', 'u', 'var',
2691
- 'video', 'wbr', 'text',
2692
- // obsolete inline tags
2693
- 'acronym', 'big', 'strike', 'tt'
2694
- ]);
2695
- this.void_elements = this._get_array('void_elements', [
2696
- // HTLM void elements - aka self-closing tags - aka singletons
2697
- // https://www.w3.org/html/wg/drafts/html/master/syntax.html#void-elements
2698
- 'area', 'base', 'br', 'col', 'embed', 'hr', 'img', 'input', 'keygen',
2699
- 'link', 'menuitem', 'meta', 'param', 'source', 'track', 'wbr',
2700
- // NOTE: Optional tags are too complex for a simple list
2701
- // they are hard coded in _do_optional_end_element
2702
-
2703
- // Doctype and xml elements
2704
- '!doctype', '?xml',
2705
-
2706
- // obsolete tags
2707
- // basefont: https://www.computerhope.com/jargon/h/html-basefont-tag.htm
2708
- // isndex: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/isindex
2709
- 'basefont', 'isindex'
2710
- ]);
2711
- this.unformatted = this._get_array('unformatted', []);
2712
- this.content_unformatted = this._get_array('content_unformatted', [
2713
- 'pre', 'textarea'
2714
- ]);
2715
- this.unformatted_content_delimiter = this._get_characters('unformatted_content_delimiter');
2716
- this.indent_scripts = this._get_selection('indent_scripts', ['normal', 'keep', 'separate']);
2717
-
2718
- }
2719
- Options.prototype = new BaseOptions();
2720
-
2721
-
2722
-
2723
- module.exports.Options = Options;
2724
-
2725
-
2726
- /***/ }),
2727
- /* 21 */
2728
- /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
2729
-
2730
- /*jshint node:true */
2731
- /*
2732
-
2733
- The MIT License (MIT)
2734
-
2735
- Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors.
2736
-
2737
- Permission is hereby granted, free of charge, to any person
2738
- obtaining a copy of this software and associated documentation files
2739
- (the "Software"), to deal in the Software without restriction,
2740
- including without limitation the rights to use, copy, modify, merge,
2741
- publish, distribute, sublicense, and/or sell copies of the Software,
2742
- and to permit persons to whom the Software is furnished to do so,
2743
- subject to the following conditions:
2744
-
2745
- The above copyright notice and this permission notice shall be
2746
- included in all copies or substantial portions of the Software.
2747
-
2748
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
2749
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
2750
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
2751
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
2752
- BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
2753
- ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
2754
- CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2755
- SOFTWARE.
2756
- */
2757
-
2758
-
2759
-
2760
- var BaseTokenizer = (__webpack_require__(9).Tokenizer);
2761
- var BASETOKEN = (__webpack_require__(9).TOKEN);
2762
- var Directives = (__webpack_require__(13).Directives);
2763
- var TemplatablePattern = (__webpack_require__(14).TemplatablePattern);
2764
- var Pattern = (__webpack_require__(12).Pattern);
2765
-
2766
- var TOKEN = {
2767
- TAG_OPEN: 'TK_TAG_OPEN',
2768
- TAG_CLOSE: 'TK_TAG_CLOSE',
2769
- ATTRIBUTE: 'TK_ATTRIBUTE',
2770
- EQUALS: 'TK_EQUALS',
2771
- VALUE: 'TK_VALUE',
2772
- COMMENT: 'TK_COMMENT',
2773
- TEXT: 'TK_TEXT',
2774
- UNKNOWN: 'TK_UNKNOWN',
2775
- START: BASETOKEN.START,
2776
- RAW: BASETOKEN.RAW,
2777
- EOF: BASETOKEN.EOF
2778
- };
2779
-
2780
- var directives_core = new Directives(/<\!--/, /-->/);
2781
-
2782
- var Tokenizer = function(input_string, options) {
2783
- BaseTokenizer.call(this, input_string, options);
2784
- this._current_tag_name = '';
2785
-
2786
- // Words end at whitespace or when a tag starts
2787
- // if we are indenting handlebars, they are considered tags
2788
- var templatable_reader = new TemplatablePattern(this._input).read_options(this._options);
2789
- var pattern_reader = new Pattern(this._input);
2790
-
2791
- this.__patterns = {
2792
- word: templatable_reader.until(/[\n\r\t <]/),
2793
- single_quote: templatable_reader.until_after(/'/),
2794
- double_quote: templatable_reader.until_after(/"/),
2795
- attribute: templatable_reader.until(/[\n\r\t =>]|\/>/),
2796
- element_name: templatable_reader.until(/[\n\r\t >\/]/),
2797
-
2798
- handlebars_comment: pattern_reader.starting_with(/{{!--/).until_after(/--}}/),
2799
- handlebars: pattern_reader.starting_with(/{{/).until_after(/}}/),
2800
- handlebars_open: pattern_reader.until(/[\n\r\t }]/),
2801
- handlebars_raw_close: pattern_reader.until(/}}/),
2802
- comment: pattern_reader.starting_with(/<!--/).until_after(/-->/),
2803
- cdata: pattern_reader.starting_with(/<!\[CDATA\[/).until_after(/]]>/),
2804
- // https://en.wikipedia.org/wiki/Conditional_comment
2805
- conditional_comment: pattern_reader.starting_with(/<!\[/).until_after(/]>/),
2806
- processing: pattern_reader.starting_with(/<\?/).until_after(/\?>/)
2807
- };
2808
-
2809
- if (this._options.indent_handlebars) {
2810
- this.__patterns.word = this.__patterns.word.exclude('handlebars');
2811
- }
2812
-
2813
- this._unformatted_content_delimiter = null;
2814
-
2815
- if (this._options.unformatted_content_delimiter) {
2816
- var literal_regexp = this._input.get_literal_regexp(this._options.unformatted_content_delimiter);
2817
- this.__patterns.unformatted_content_delimiter =
2818
- pattern_reader.matching(literal_regexp)
2819
- .until_after(literal_regexp);
2820
- }
2821
- };
2822
- Tokenizer.prototype = new BaseTokenizer();
2823
-
2824
- Tokenizer.prototype._is_comment = function(current_token) { // jshint unused:false
2825
- return false; //current_token.type === TOKEN.COMMENT || current_token.type === TOKEN.UNKNOWN;
2826
- };
2827
-
2828
- Tokenizer.prototype._is_opening = function(current_token) {
2829
- return current_token.type === TOKEN.TAG_OPEN;
2830
- };
2831
-
2832
- Tokenizer.prototype._is_closing = function(current_token, open_token) {
2833
- return current_token.type === TOKEN.TAG_CLOSE &&
2834
- (open_token && (
2835
- ((current_token.text === '>' || current_token.text === '/>') && open_token.text[0] === '<') ||
2836
- (current_token.text === '}}' && open_token.text[0] === '{' && open_token.text[1] === '{')));
2837
- };
2838
-
2839
- Tokenizer.prototype._reset = function() {
2840
- this._current_tag_name = '';
2841
- };
2842
-
2843
- Tokenizer.prototype._get_next_token = function(previous_token, open_token) { // jshint unused:false
2844
- var token = null;
2845
- this._readWhitespace();
2846
- var c = this._input.peek();
2847
-
2848
- if (c === null) {
2849
- return this._create_token(TOKEN.EOF, '');
2850
- }
2851
-
2852
- token = token || this._read_open_handlebars(c, open_token);
2853
- token = token || this._read_attribute(c, previous_token, open_token);
2854
- token = token || this._read_close(c, open_token);
2855
- token = token || this._read_raw_content(c, previous_token, open_token);
2856
- token = token || this._read_content_word(c);
2857
- token = token || this._read_comment_or_cdata(c);
2858
- token = token || this._read_processing(c);
2859
- token = token || this._read_open(c, open_token);
2860
- token = token || this._create_token(TOKEN.UNKNOWN, this._input.next());
2861
-
2862
- return token;
2863
- };
2864
-
2865
- Tokenizer.prototype._read_comment_or_cdata = function(c) { // jshint unused:false
2866
- var token = null;
2867
- var resulting_string = null;
2868
- var directives = null;
2869
-
2870
- if (c === '<') {
2871
- var peek1 = this._input.peek(1);
2872
- // We treat all comments as literals, even more than preformatted tags
2873
- // we only look for the appropriate closing marker
2874
- if (peek1 === '!') {
2875
- resulting_string = this.__patterns.comment.read();
2876
-
2877
- // only process directive on html comments
2878
- if (resulting_string) {
2879
- directives = directives_core.get_directives(resulting_string);
2880
- if (directives && directives.ignore === 'start') {
2881
- resulting_string += directives_core.readIgnored(this._input);
2882
- }
2883
- } else {
2884
- resulting_string = this.__patterns.cdata.read();
2885
- }
2886
- }
2887
-
2888
- if (resulting_string) {
2889
- token = this._create_token(TOKEN.COMMENT, resulting_string);
2890
- token.directives = directives;
2891
- }
2892
- }
2893
-
2894
- return token;
2895
- };
2896
-
2897
- Tokenizer.prototype._read_processing = function(c) { // jshint unused:false
2898
- var token = null;
2899
- var resulting_string = null;
2900
- var directives = null;
2901
-
2902
- if (c === '<') {
2903
- var peek1 = this._input.peek(1);
2904
- if (peek1 === '!' || peek1 === '?') {
2905
- resulting_string = this.__patterns.conditional_comment.read();
2906
- resulting_string = resulting_string || this.__patterns.processing.read();
2907
- }
2908
-
2909
- if (resulting_string) {
2910
- token = this._create_token(TOKEN.COMMENT, resulting_string);
2911
- token.directives = directives;
2912
- }
2913
- }
2914
-
2915
- return token;
2916
- };
2917
-
2918
- Tokenizer.prototype._read_open = function(c, open_token) {
2919
- var resulting_string = null;
2920
- var token = null;
2921
- if (!open_token) {
2922
- if (c === '<') {
2923
-
2924
- resulting_string = this._input.next();
2925
- if (this._input.peek() === '/') {
2926
- resulting_string += this._input.next();
2927
- }
2928
- resulting_string += this.__patterns.element_name.read();
2929
- token = this._create_token(TOKEN.TAG_OPEN, resulting_string);
2930
- }
2931
- }
2932
- return token;
2933
- };
2934
-
2935
- Tokenizer.prototype._read_open_handlebars = function(c, open_token) {
2936
- var resulting_string = null;
2937
- var token = null;
2938
- if (!open_token) {
2939
- if (this._options.indent_handlebars && c === '{' && this._input.peek(1) === '{') {
2940
- if (this._input.peek(2) === '!') {
2941
- resulting_string = this.__patterns.handlebars_comment.read();
2942
- resulting_string = resulting_string || this.__patterns.handlebars.read();
2943
- token = this._create_token(TOKEN.COMMENT, resulting_string);
2944
- } else {
2945
- resulting_string = this.__patterns.handlebars_open.read();
2946
- token = this._create_token(TOKEN.TAG_OPEN, resulting_string);
2947
- }
2948
- }
2949
- }
2950
- return token;
2951
- };
2952
-
2953
-
2954
- Tokenizer.prototype._read_close = function(c, open_token) {
2955
- var resulting_string = null;
2956
- var token = null;
2957
- if (open_token) {
2958
- if (open_token.text[0] === '<' && (c === '>' || (c === '/' && this._input.peek(1) === '>'))) {
2959
- resulting_string = this._input.next();
2960
- if (c === '/') { // for close tag "/>"
2961
- resulting_string += this._input.next();
2962
- }
2963
- token = this._create_token(TOKEN.TAG_CLOSE, resulting_string);
2964
- } else if (open_token.text[0] === '{' && c === '}' && this._input.peek(1) === '}') {
2965
- this._input.next();
2966
- this._input.next();
2967
- token = this._create_token(TOKEN.TAG_CLOSE, '}}');
2968
- }
2969
- }
2970
-
2971
- return token;
2972
- };
2973
-
2974
- Tokenizer.prototype._read_attribute = function(c, previous_token, open_token) {
2975
- var token = null;
2976
- var resulting_string = '';
2977
- if (open_token && open_token.text[0] === '<') {
2978
-
2979
- if (c === '=') {
2980
- token = this._create_token(TOKEN.EQUALS, this._input.next());
2981
- } else if (c === '"' || c === "'") {
2982
- var content = this._input.next();
2983
- if (c === '"') {
2984
- content += this.__patterns.double_quote.read();
2985
- } else {
2986
- content += this.__patterns.single_quote.read();
2987
- }
2988
- token = this._create_token(TOKEN.VALUE, content);
2989
- } else {
2990
- resulting_string = this.__patterns.attribute.read();
2991
-
2992
- if (resulting_string) {
2993
- if (previous_token.type === TOKEN.EQUALS) {
2994
- token = this._create_token(TOKEN.VALUE, resulting_string);
2995
- } else {
2996
- token = this._create_token(TOKEN.ATTRIBUTE, resulting_string);
2997
- }
2998
- }
2999
- }
3000
- }
3001
- return token;
3002
- };
3003
-
3004
- Tokenizer.prototype._is_content_unformatted = function(tag_name) {
3005
- // void_elements have no content and so cannot have unformatted content
3006
- // script and style tags should always be read as unformatted content
3007
- // finally content_unformatted and unformatted element contents are unformatted
3008
- return this._options.void_elements.indexOf(tag_name) === -1 &&
3009
- (this._options.content_unformatted.indexOf(tag_name) !== -1 ||
3010
- this._options.unformatted.indexOf(tag_name) !== -1);
3011
- };
3012
-
3013
-
3014
- Tokenizer.prototype._read_raw_content = function(c, previous_token, open_token) { // jshint unused:false
3015
- var resulting_string = '';
3016
- if (open_token && open_token.text[0] === '{') {
3017
- resulting_string = this.__patterns.handlebars_raw_close.read();
3018
- } else if (previous_token.type === TOKEN.TAG_CLOSE &&
3019
- previous_token.opened.text[0] === '<' && previous_token.text[0] !== '/') {
3020
- // ^^ empty tag has no content
3021
- var tag_name = previous_token.opened.text.substr(1).toLowerCase();
3022
- if (tag_name === 'script' || tag_name === 'style') {
3023
- // Script and style tags are allowed to have comments wrapping their content
3024
- // or just have regular content.
3025
- var token = this._read_comment_or_cdata(c);
3026
- if (token) {
3027
- token.type = TOKEN.TEXT;
3028
- return token;
3029
- }
3030
- resulting_string = this._input.readUntil(new RegExp('</' + tag_name + '[\\n\\r\\t ]*?>', 'ig'));
3031
- } else if (this._is_content_unformatted(tag_name)) {
3032
-
3033
- resulting_string = this._input.readUntil(new RegExp('</' + tag_name + '[\\n\\r\\t ]*?>', 'ig'));
3034
- }
3035
- }
3036
-
3037
- if (resulting_string) {
3038
- return this._create_token(TOKEN.TEXT, resulting_string);
3039
- }
3040
-
3041
- return null;
3042
- };
3043
-
3044
- Tokenizer.prototype._read_content_word = function(c) {
3045
- var resulting_string = '';
3046
- if (this._options.unformatted_content_delimiter) {
3047
- if (c === this._options.unformatted_content_delimiter[0]) {
3048
- resulting_string = this.__patterns.unformatted_content_delimiter.read();
3049
- }
3050
- }
3051
-
3052
- if (!resulting_string) {
3053
- resulting_string = this.__patterns.word.read();
3054
- }
3055
- if (resulting_string) {
3056
- return this._create_token(TOKEN.TEXT, resulting_string);
3057
- }
3058
- };
3059
-
3060
- module.exports.Tokenizer = Tokenizer;
3061
- module.exports.TOKEN = TOKEN;
3062
-
3063
-
3064
- /***/ })
3065
- /******/ ]);
3066
- /************************************************************************/
3067
- /******/ // The module cache
3068
- /******/ var __webpack_module_cache__ = {};
3069
- /******/
3070
- /******/ // The require function
3071
- /******/ function __webpack_require__(moduleId) {
3072
- /******/ // Check if module is in cache
3073
- /******/ var cachedModule = __webpack_module_cache__[moduleId];
3074
- /******/ if (cachedModule !== undefined) {
3075
- /******/ return cachedModule.exports;
3076
- /******/ }
3077
- /******/ // Create a new module (and put it into the cache)
3078
- /******/ var module = __webpack_module_cache__[moduleId] = {
3079
- /******/ // no module.id needed
3080
- /******/ // no module.loaded needed
3081
- /******/ exports: {}
3082
- /******/ };
3083
- /******/
3084
- /******/ // Execute the module function
3085
- /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
3086
- /******/
3087
- /******/ // Return the exports of the module
3088
- /******/ return module.exports;
3089
- /******/ }
3090
- /******/
3091
- /************************************************************************/
3092
- /******/
3093
- /******/ // startup
3094
- /******/ // Load entry module and return exports
3095
- /******/ // This entry module is referenced by other modules so it can't be inlined
3096
- /******/ var __webpack_exports__ = __webpack_require__(18);
3097
- /******/ legacy_beautify_html = __webpack_exports__;
3098
- /******/
3099
- /******/ })()
3100
- ;
3101
- var style_html = legacy_beautify_html;
3102
- /* Footer */
3103
- if (typeof define === "function" && define.amd) {
3104
- // Add support for AMD ( https://github.com/amdjs/amdjs-api/wiki/AMD#defineamd-property- )
3105
- define(["require", "./beautify", "./beautify-css"], function(requireamd) {
3106
- var js_beautify = requireamd("./beautify");
3107
- var css_beautify = requireamd("./beautify-css");
3108
-
3109
- return {
3110
- html_beautify: function(html_source, options) {
3111
- return style_html(html_source, options, js_beautify.js_beautify, css_beautify.css_beautify);
3112
- }
3113
- };
3114
- });
3115
- } else if (typeof exports !== "undefined") {
3116
- // Add support for CommonJS. Just put this file somewhere on your require.paths
3117
- // and you will be able to `var html_beautify = require("beautify").html_beautify`.
3118
- var js_beautify = require('./beautify.js');
3119
- var css_beautify = require('./beautify-css.js');
3120
-
3121
- exports.html_beautify = function(html_source, options) {
3122
- return style_html(html_source, options, js_beautify.js_beautify, css_beautify.css_beautify);
3123
- };
3124
- } else if (typeof window !== "undefined") {
3125
- // If we're running a web page and don't have either of the above, add our one global
3126
- window.html_beautify = function(html_source, options) {
3127
- return style_html(html_source, options, window.js_beautify, window.css_beautify);
3128
- };
3129
- } else if (typeof global !== "undefined") {
3130
- // If we don't even have window, try global.
3131
- global.html_beautify = function(html_source, options) {
3132
- return style_html(html_source, options, global.js_beautify, global.css_beautify);
3133
- };
3134
- }
3135
-
3136
- }());