cloudstructs 0.9.18 → 0.9.20

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 (432) hide show
  1. package/.jsii +3 -3
  2. package/assets/slack-textract/detect.lambda/index.js +27 -11
  3. package/lib/codecommit-mirror/index.js +2 -2
  4. package/lib/dmarc/index.js +1 -1
  5. package/lib/ecs-service-roller/index.js +2 -2
  6. package/lib/email-receiver/receiver.js +1 -1
  7. package/lib/mjml-template/index.js +1 -1
  8. package/lib/saml-identity-provider/index.js +2 -2
  9. package/lib/slack-app/manifest.js +1 -1
  10. package/lib/slack-app/slack-app.js +2 -2
  11. package/lib/slack-events/index.js +1 -1
  12. package/lib/slack-textract/index.js +1 -1
  13. package/lib/ssl-server-test/index.js +1 -1
  14. package/lib/state-machine-cr-provider/index.js +1 -1
  15. package/lib/static-website/index.js +1 -1
  16. package/lib/toolkit-cleaner/index.js +1 -1
  17. package/lib/url-shortener/index.js +1 -1
  18. package/node_modules/@babel/runtime/helpers/esm/superPropGet.js +4 -4
  19. package/node_modules/@babel/runtime/helpers/esm/superPropSet.js +2 -2
  20. package/node_modules/@babel/runtime/helpers/superPropGet.js +4 -4
  21. package/node_modules/@babel/runtime/helpers/superPropSet.js +2 -2
  22. package/node_modules/@babel/runtime/package.json +1 -1
  23. package/node_modules/@slack/logger/node_modules/@types/node/README.md +1 -1
  24. package/node_modules/@slack/logger/node_modules/@types/node/assert.d.ts +3 -3
  25. package/node_modules/@slack/logger/node_modules/@types/node/async_hooks.d.ts +1 -1
  26. package/node_modules/@slack/logger/node_modules/@types/node/buffer.buffer.d.ts +385 -0
  27. package/node_modules/@slack/logger/node_modules/@types/node/buffer.d.ts +14 -381
  28. package/node_modules/@slack/logger/node_modules/@types/node/child_process.d.ts +34 -29
  29. package/node_modules/@slack/logger/node_modules/@types/node/cluster.d.ts +2 -1
  30. package/node_modules/@slack/logger/node_modules/@types/node/compatibility/disposable.d.ts +16 -0
  31. package/node_modules/@slack/logger/node_modules/@types/node/compatibility/index.d.ts +9 -0
  32. package/node_modules/@slack/logger/node_modules/@types/node/compatibility/indexable.d.ts +23 -0
  33. package/node_modules/@slack/logger/node_modules/@types/node/compatibility/iterators.d.ts +21 -0
  34. package/node_modules/@slack/logger/node_modules/@types/node/console.d.ts +2 -2
  35. package/node_modules/@slack/logger/node_modules/@types/node/crypto.d.ts +13 -12
  36. package/node_modules/@slack/logger/node_modules/@types/node/diagnostics_channel.d.ts +4 -4
  37. package/node_modules/@slack/logger/node_modules/@types/node/dns/promises.d.ts +5 -5
  38. package/node_modules/@slack/logger/node_modules/@types/node/dns.d.ts +5 -5
  39. package/node_modules/@slack/logger/node_modules/@types/node/domain.d.ts +2 -2
  40. package/node_modules/@slack/logger/node_modules/@types/node/events.d.ts +3 -3
  41. package/node_modules/@slack/logger/node_modules/@types/node/fs/promises.d.ts +17 -6
  42. package/node_modules/@slack/logger/node_modules/@types/node/fs.d.ts +3 -3
  43. package/node_modules/@slack/logger/node_modules/@types/node/globals.d.ts +34 -63
  44. package/node_modules/@slack/logger/node_modules/@types/node/globals.typedarray.d.ts +21 -0
  45. package/node_modules/@slack/logger/node_modules/@types/node/http.d.ts +44 -7
  46. package/node_modules/@slack/logger/node_modules/@types/node/http2.d.ts +238 -101
  47. package/node_modules/@slack/logger/node_modules/@types/node/https.d.ts +17 -23
  48. package/node_modules/@slack/logger/node_modules/@types/node/index.d.ts +11 -9
  49. package/node_modules/@slack/logger/node_modules/@types/node/inspector.d.ts +270 -0
  50. package/node_modules/@slack/logger/node_modules/@types/node/module.d.ts +94 -3
  51. package/node_modules/@slack/logger/node_modules/@types/node/net.d.ts +17 -15
  52. package/node_modules/@slack/logger/node_modules/@types/node/os.d.ts +1 -1
  53. package/node_modules/@slack/logger/node_modules/@types/node/package.json +11 -3
  54. package/node_modules/@slack/logger/node_modules/@types/node/path.d.ts +1 -1
  55. package/node_modules/@slack/logger/node_modules/@types/node/perf_hooks.d.ts +43 -19
  56. package/node_modules/@slack/logger/node_modules/@types/node/punycode.d.ts +1 -1
  57. package/node_modules/@slack/logger/node_modules/@types/node/querystring.d.ts +1 -1
  58. package/node_modules/@slack/logger/node_modules/@types/node/readline/promises.d.ts +1 -1
  59. package/node_modules/@slack/logger/node_modules/@types/node/readline.d.ts +10 -10
  60. package/node_modules/@slack/logger/node_modules/@types/node/repl.d.ts +4 -4
  61. package/node_modules/@slack/logger/node_modules/@types/node/sqlite.d.ts +1 -1
  62. package/node_modules/@slack/logger/node_modules/@types/node/stream/promises.d.ts +8 -1
  63. package/node_modules/@slack/logger/node_modules/@types/node/stream/web.d.ts +22 -19
  64. package/node_modules/@slack/logger/node_modules/@types/node/stream.d.ts +36 -17
  65. package/node_modules/@slack/logger/node_modules/@types/node/string_decoder.d.ts +3 -3
  66. package/node_modules/@slack/logger/node_modules/@types/node/test.d.ts +103 -8
  67. package/node_modules/@slack/logger/node_modules/@types/node/timers/promises.d.ts +5 -5
  68. package/node_modules/@slack/logger/node_modules/@types/node/timers.d.ts +1 -1
  69. package/node_modules/@slack/logger/node_modules/@types/node/tls.d.ts +5 -5
  70. package/node_modules/@slack/logger/node_modules/@types/node/trace_events.d.ts +4 -4
  71. package/node_modules/@slack/logger/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +385 -0
  72. package/node_modules/@slack/logger/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +19 -0
  73. package/node_modules/@slack/logger/node_modules/@types/node/ts5.6/index.d.ts +92 -0
  74. package/node_modules/@slack/logger/node_modules/@types/node/tty.d.ts +1 -1
  75. package/node_modules/@slack/logger/node_modules/@types/node/url.d.ts +14 -11
  76. package/node_modules/@slack/logger/node_modules/@types/node/util.d.ts +59 -54
  77. package/node_modules/@slack/logger/node_modules/@types/node/v8.d.ts +12 -12
  78. package/node_modules/@slack/logger/node_modules/@types/node/vm.d.ts +88 -34
  79. package/node_modules/@slack/logger/node_modules/@types/node/wasi.d.ts +1 -1
  80. package/node_modules/@slack/logger/node_modules/@types/node/worker_threads.d.ts +23 -23
  81. package/node_modules/@slack/logger/node_modules/@types/node/zlib.d.ts +8 -8
  82. package/node_modules/@slack/web-api/dist/WebClient.d.ts +36 -4
  83. package/node_modules/@slack/web-api/dist/WebClient.d.ts.map +1 -1
  84. package/node_modules/@slack/web-api/dist/WebClient.js +23 -10
  85. package/node_modules/@slack/web-api/dist/WebClient.js.map +1 -1
  86. package/node_modules/@slack/web-api/dist/file-upload.d.ts +1 -0
  87. package/node_modules/@slack/web-api/dist/file-upload.d.ts.map +1 -1
  88. package/node_modules/@slack/web-api/dist/methods.d.ts +7 -2
  89. package/node_modules/@slack/web-api/dist/methods.d.ts.map +1 -1
  90. package/node_modules/@slack/web-api/dist/methods.js +5 -0
  91. package/node_modules/@slack/web-api/dist/methods.js.map +1 -1
  92. package/node_modules/@slack/web-api/dist/types/request/conversations.d.ts +15 -3
  93. package/node_modules/@slack/web-api/dist/types/request/conversations.d.ts.map +1 -1
  94. package/node_modules/@slack/web-api/dist/types/request/files.d.ts +1 -0
  95. package/node_modules/@slack/web-api/dist/types/request/files.d.ts.map +1 -1
  96. package/node_modules/@slack/web-api/dist/types/request/index.d.ts +1 -1
  97. package/node_modules/@slack/web-api/dist/types/request/index.d.ts.map +1 -1
  98. package/node_modules/@slack/web-api/dist/types/request/users.d.ts +1 -0
  99. package/node_modules/@slack/web-api/dist/types/request/users.d.ts.map +1 -1
  100. package/node_modules/@slack/web-api/dist/types/response/AdminAppsActivitiesListResponse.d.ts +1 -0
  101. package/node_modules/@slack/web-api/dist/types/response/AdminAppsActivitiesListResponse.d.ts.map +1 -1
  102. package/node_modules/@slack/web-api/dist/types/response/AdminFunctionsListResponse.d.ts +2 -0
  103. package/node_modules/@slack/web-api/dist/types/response/AdminFunctionsListResponse.d.ts.map +1 -1
  104. package/node_modules/@slack/web-api/dist/types/response/AdminUsersListResponse.d.ts +1 -0
  105. package/node_modules/@slack/web-api/dist/types/response/AdminUsersListResponse.d.ts.map +1 -1
  106. package/node_modules/@slack/web-api/dist/types/response/ConversationsRequestSharedInviteListResponse.d.ts +77 -0
  107. package/node_modules/@slack/web-api/dist/types/response/ConversationsRequestSharedInviteListResponse.d.ts.map +1 -0
  108. package/node_modules/@slack/web-api/dist/types/response/ConversationsRequestSharedInviteListResponse.js +11 -0
  109. package/node_modules/@slack/web-api/dist/types/response/ConversationsRequestSharedInviteListResponse.js.map +1 -0
  110. package/node_modules/@slack/web-api/dist/types/response/index.d.ts +1 -0
  111. package/node_modules/@slack/web-api/dist/types/response/index.d.ts.map +1 -1
  112. package/node_modules/@slack/web-api/node_modules/@types/node/README.md +1 -1
  113. package/node_modules/@slack/web-api/node_modules/@types/node/assert.d.ts +3 -3
  114. package/node_modules/@slack/web-api/node_modules/@types/node/async_hooks.d.ts +1 -1
  115. package/node_modules/@slack/web-api/node_modules/@types/node/buffer.buffer.d.ts +385 -0
  116. package/node_modules/@slack/web-api/node_modules/@types/node/buffer.d.ts +14 -381
  117. package/node_modules/@slack/web-api/node_modules/@types/node/child_process.d.ts +34 -29
  118. package/node_modules/@slack/web-api/node_modules/@types/node/cluster.d.ts +2 -1
  119. package/node_modules/@slack/web-api/node_modules/@types/node/compatibility/disposable.d.ts +16 -0
  120. package/node_modules/@slack/web-api/node_modules/@types/node/compatibility/index.d.ts +9 -0
  121. package/node_modules/@slack/web-api/node_modules/@types/node/compatibility/indexable.d.ts +23 -0
  122. package/node_modules/@slack/web-api/node_modules/@types/node/compatibility/iterators.d.ts +21 -0
  123. package/node_modules/@slack/web-api/node_modules/@types/node/console.d.ts +2 -2
  124. package/node_modules/@slack/web-api/node_modules/@types/node/crypto.d.ts +13 -12
  125. package/node_modules/@slack/web-api/node_modules/@types/node/diagnostics_channel.d.ts +4 -4
  126. package/node_modules/@slack/web-api/node_modules/@types/node/dns/promises.d.ts +5 -5
  127. package/node_modules/@slack/web-api/node_modules/@types/node/dns.d.ts +5 -5
  128. package/node_modules/@slack/web-api/node_modules/@types/node/domain.d.ts +2 -2
  129. package/node_modules/@slack/web-api/node_modules/@types/node/events.d.ts +3 -3
  130. package/node_modules/@slack/web-api/node_modules/@types/node/fs/promises.d.ts +17 -6
  131. package/node_modules/@slack/web-api/node_modules/@types/node/fs.d.ts +3 -3
  132. package/node_modules/@slack/web-api/node_modules/@types/node/globals.d.ts +34 -63
  133. package/node_modules/@slack/web-api/node_modules/@types/node/globals.typedarray.d.ts +21 -0
  134. package/node_modules/@slack/web-api/node_modules/@types/node/http.d.ts +44 -7
  135. package/node_modules/@slack/web-api/node_modules/@types/node/http2.d.ts +238 -101
  136. package/node_modules/@slack/web-api/node_modules/@types/node/https.d.ts +17 -23
  137. package/node_modules/@slack/web-api/node_modules/@types/node/index.d.ts +11 -9
  138. package/node_modules/@slack/web-api/node_modules/@types/node/inspector.d.ts +270 -0
  139. package/node_modules/@slack/web-api/node_modules/@types/node/module.d.ts +94 -3
  140. package/node_modules/@slack/web-api/node_modules/@types/node/net.d.ts +17 -15
  141. package/node_modules/@slack/web-api/node_modules/@types/node/os.d.ts +1 -1
  142. package/node_modules/@slack/web-api/node_modules/@types/node/package.json +11 -3
  143. package/node_modules/@slack/web-api/node_modules/@types/node/path.d.ts +1 -1
  144. package/node_modules/@slack/web-api/node_modules/@types/node/perf_hooks.d.ts +43 -19
  145. package/node_modules/@slack/web-api/node_modules/@types/node/punycode.d.ts +1 -1
  146. package/node_modules/@slack/web-api/node_modules/@types/node/querystring.d.ts +1 -1
  147. package/node_modules/@slack/web-api/node_modules/@types/node/readline/promises.d.ts +1 -1
  148. package/node_modules/@slack/web-api/node_modules/@types/node/readline.d.ts +10 -10
  149. package/node_modules/@slack/web-api/node_modules/@types/node/repl.d.ts +4 -4
  150. package/node_modules/@slack/web-api/node_modules/@types/node/sqlite.d.ts +1 -1
  151. package/node_modules/@slack/web-api/node_modules/@types/node/stream/promises.d.ts +8 -1
  152. package/node_modules/@slack/web-api/node_modules/@types/node/stream/web.d.ts +22 -19
  153. package/node_modules/@slack/web-api/node_modules/@types/node/stream.d.ts +36 -17
  154. package/node_modules/@slack/web-api/node_modules/@types/node/string_decoder.d.ts +3 -3
  155. package/node_modules/@slack/web-api/node_modules/@types/node/test.d.ts +103 -8
  156. package/node_modules/@slack/web-api/node_modules/@types/node/timers/promises.d.ts +5 -5
  157. package/node_modules/@slack/web-api/node_modules/@types/node/timers.d.ts +1 -1
  158. package/node_modules/@slack/web-api/node_modules/@types/node/tls.d.ts +5 -5
  159. package/node_modules/@slack/web-api/node_modules/@types/node/trace_events.d.ts +4 -4
  160. package/node_modules/@slack/web-api/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +385 -0
  161. package/node_modules/@slack/web-api/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +19 -0
  162. package/node_modules/@slack/web-api/node_modules/@types/node/ts5.6/index.d.ts +92 -0
  163. package/node_modules/@slack/web-api/node_modules/@types/node/tty.d.ts +1 -1
  164. package/node_modules/@slack/web-api/node_modules/@types/node/url.d.ts +14 -11
  165. package/node_modules/@slack/web-api/node_modules/@types/node/util.d.ts +59 -54
  166. package/node_modules/@slack/web-api/node_modules/@types/node/v8.d.ts +12 -12
  167. package/node_modules/@slack/web-api/node_modules/@types/node/vm.d.ts +88 -34
  168. package/node_modules/@slack/web-api/node_modules/@types/node/wasi.d.ts +1 -1
  169. package/node_modules/@slack/web-api/node_modules/@types/node/worker_threads.d.ts +23 -23
  170. package/node_modules/@slack/web-api/node_modules/@types/node/zlib.d.ts +8 -8
  171. package/node_modules/@slack/web-api/package.json +1 -1
  172. package/node_modules/@types/cacheable-request/node_modules/@types/node/README.md +1 -1
  173. package/node_modules/@types/cacheable-request/node_modules/@types/node/assert.d.ts +3 -3
  174. package/node_modules/@types/cacheable-request/node_modules/@types/node/async_hooks.d.ts +1 -1
  175. package/node_modules/@types/cacheable-request/node_modules/@types/node/buffer.buffer.d.ts +385 -0
  176. package/node_modules/@types/cacheable-request/node_modules/@types/node/buffer.d.ts +14 -381
  177. package/node_modules/@types/cacheable-request/node_modules/@types/node/child_process.d.ts +34 -29
  178. package/node_modules/@types/cacheable-request/node_modules/@types/node/cluster.d.ts +2 -1
  179. package/node_modules/@types/cacheable-request/node_modules/@types/node/compatibility/disposable.d.ts +16 -0
  180. package/node_modules/@types/cacheable-request/node_modules/@types/node/compatibility/index.d.ts +9 -0
  181. package/node_modules/@types/cacheable-request/node_modules/@types/node/compatibility/indexable.d.ts +23 -0
  182. package/node_modules/@types/cacheable-request/node_modules/@types/node/compatibility/iterators.d.ts +21 -0
  183. package/node_modules/@types/cacheable-request/node_modules/@types/node/console.d.ts +2 -2
  184. package/node_modules/@types/cacheable-request/node_modules/@types/node/crypto.d.ts +13 -12
  185. package/node_modules/@types/cacheable-request/node_modules/@types/node/diagnostics_channel.d.ts +4 -4
  186. package/node_modules/@types/cacheable-request/node_modules/@types/node/dns/promises.d.ts +5 -5
  187. package/node_modules/@types/cacheable-request/node_modules/@types/node/dns.d.ts +5 -5
  188. package/node_modules/@types/cacheable-request/node_modules/@types/node/domain.d.ts +2 -2
  189. package/node_modules/@types/cacheable-request/node_modules/@types/node/events.d.ts +3 -3
  190. package/node_modules/@types/cacheable-request/node_modules/@types/node/fs/promises.d.ts +17 -6
  191. package/node_modules/@types/cacheable-request/node_modules/@types/node/fs.d.ts +3 -3
  192. package/node_modules/@types/cacheable-request/node_modules/@types/node/globals.d.ts +34 -63
  193. package/node_modules/@types/cacheable-request/node_modules/@types/node/globals.typedarray.d.ts +21 -0
  194. package/node_modules/@types/cacheable-request/node_modules/@types/node/http.d.ts +44 -7
  195. package/node_modules/@types/cacheable-request/node_modules/@types/node/http2.d.ts +238 -101
  196. package/node_modules/@types/cacheable-request/node_modules/@types/node/https.d.ts +17 -23
  197. package/node_modules/@types/cacheable-request/node_modules/@types/node/index.d.ts +11 -9
  198. package/node_modules/@types/cacheable-request/node_modules/@types/node/inspector.d.ts +270 -0
  199. package/node_modules/@types/cacheable-request/node_modules/@types/node/module.d.ts +94 -3
  200. package/node_modules/@types/cacheable-request/node_modules/@types/node/net.d.ts +17 -15
  201. package/node_modules/@types/cacheable-request/node_modules/@types/node/os.d.ts +1 -1
  202. package/node_modules/@types/cacheable-request/node_modules/@types/node/package.json +11 -3
  203. package/node_modules/@types/cacheable-request/node_modules/@types/node/path.d.ts +1 -1
  204. package/node_modules/@types/cacheable-request/node_modules/@types/node/perf_hooks.d.ts +43 -19
  205. package/node_modules/@types/cacheable-request/node_modules/@types/node/punycode.d.ts +1 -1
  206. package/node_modules/@types/cacheable-request/node_modules/@types/node/querystring.d.ts +1 -1
  207. package/node_modules/@types/cacheable-request/node_modules/@types/node/readline/promises.d.ts +1 -1
  208. package/node_modules/@types/cacheable-request/node_modules/@types/node/readline.d.ts +10 -10
  209. package/node_modules/@types/cacheable-request/node_modules/@types/node/repl.d.ts +4 -4
  210. package/node_modules/@types/cacheable-request/node_modules/@types/node/sqlite.d.ts +1 -1
  211. package/node_modules/@types/cacheable-request/node_modules/@types/node/stream/promises.d.ts +8 -1
  212. package/node_modules/@types/cacheable-request/node_modules/@types/node/stream/web.d.ts +22 -19
  213. package/node_modules/@types/cacheable-request/node_modules/@types/node/stream.d.ts +36 -17
  214. package/node_modules/@types/cacheable-request/node_modules/@types/node/string_decoder.d.ts +3 -3
  215. package/node_modules/@types/cacheable-request/node_modules/@types/node/test.d.ts +103 -8
  216. package/node_modules/@types/cacheable-request/node_modules/@types/node/timers/promises.d.ts +5 -5
  217. package/node_modules/@types/cacheable-request/node_modules/@types/node/timers.d.ts +1 -1
  218. package/node_modules/@types/cacheable-request/node_modules/@types/node/tls.d.ts +5 -5
  219. package/node_modules/@types/cacheable-request/node_modules/@types/node/trace_events.d.ts +4 -4
  220. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +385 -0
  221. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +19 -0
  222. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts5.6/index.d.ts +92 -0
  223. package/node_modules/@types/cacheable-request/node_modules/@types/node/tty.d.ts +1 -1
  224. package/node_modules/@types/cacheable-request/node_modules/@types/node/url.d.ts +14 -11
  225. package/node_modules/@types/cacheable-request/node_modules/@types/node/util.d.ts +59 -54
  226. package/node_modules/@types/cacheable-request/node_modules/@types/node/v8.d.ts +12 -12
  227. package/node_modules/@types/cacheable-request/node_modules/@types/node/vm.d.ts +88 -34
  228. package/node_modules/@types/cacheable-request/node_modules/@types/node/wasi.d.ts +1 -1
  229. package/node_modules/@types/cacheable-request/node_modules/@types/node/worker_threads.d.ts +23 -23
  230. package/node_modules/@types/cacheable-request/node_modules/@types/node/zlib.d.ts +8 -8
  231. package/node_modules/@types/keyv/node_modules/@types/node/README.md +1 -1
  232. package/node_modules/@types/keyv/node_modules/@types/node/assert.d.ts +3 -3
  233. package/node_modules/@types/keyv/node_modules/@types/node/async_hooks.d.ts +1 -1
  234. package/node_modules/@types/keyv/node_modules/@types/node/buffer.buffer.d.ts +385 -0
  235. package/node_modules/@types/keyv/node_modules/@types/node/buffer.d.ts +14 -381
  236. package/node_modules/@types/keyv/node_modules/@types/node/child_process.d.ts +34 -29
  237. package/node_modules/@types/keyv/node_modules/@types/node/cluster.d.ts +2 -1
  238. package/node_modules/@types/keyv/node_modules/@types/node/compatibility/disposable.d.ts +16 -0
  239. package/node_modules/@types/keyv/node_modules/@types/node/compatibility/index.d.ts +9 -0
  240. package/node_modules/@types/keyv/node_modules/@types/node/compatibility/indexable.d.ts +23 -0
  241. package/node_modules/@types/keyv/node_modules/@types/node/compatibility/iterators.d.ts +21 -0
  242. package/node_modules/@types/keyv/node_modules/@types/node/console.d.ts +2 -2
  243. package/node_modules/@types/keyv/node_modules/@types/node/crypto.d.ts +13 -12
  244. package/node_modules/@types/keyv/node_modules/@types/node/diagnostics_channel.d.ts +4 -4
  245. package/node_modules/@types/keyv/node_modules/@types/node/dns/promises.d.ts +5 -5
  246. package/node_modules/@types/keyv/node_modules/@types/node/dns.d.ts +5 -5
  247. package/node_modules/@types/keyv/node_modules/@types/node/domain.d.ts +2 -2
  248. package/node_modules/@types/keyv/node_modules/@types/node/events.d.ts +3 -3
  249. package/node_modules/@types/keyv/node_modules/@types/node/fs/promises.d.ts +17 -6
  250. package/node_modules/@types/keyv/node_modules/@types/node/fs.d.ts +3 -3
  251. package/node_modules/@types/keyv/node_modules/@types/node/globals.d.ts +34 -63
  252. package/node_modules/@types/keyv/node_modules/@types/node/globals.typedarray.d.ts +21 -0
  253. package/node_modules/@types/keyv/node_modules/@types/node/http.d.ts +44 -7
  254. package/node_modules/@types/keyv/node_modules/@types/node/http2.d.ts +238 -101
  255. package/node_modules/@types/keyv/node_modules/@types/node/https.d.ts +17 -23
  256. package/node_modules/@types/keyv/node_modules/@types/node/index.d.ts +11 -9
  257. package/node_modules/@types/keyv/node_modules/@types/node/inspector.d.ts +270 -0
  258. package/node_modules/@types/keyv/node_modules/@types/node/module.d.ts +94 -3
  259. package/node_modules/@types/keyv/node_modules/@types/node/net.d.ts +17 -15
  260. package/node_modules/@types/keyv/node_modules/@types/node/os.d.ts +1 -1
  261. package/node_modules/@types/keyv/node_modules/@types/node/package.json +11 -3
  262. package/node_modules/@types/keyv/node_modules/@types/node/path.d.ts +1 -1
  263. package/node_modules/@types/keyv/node_modules/@types/node/perf_hooks.d.ts +43 -19
  264. package/node_modules/@types/keyv/node_modules/@types/node/punycode.d.ts +1 -1
  265. package/node_modules/@types/keyv/node_modules/@types/node/querystring.d.ts +1 -1
  266. package/node_modules/@types/keyv/node_modules/@types/node/readline/promises.d.ts +1 -1
  267. package/node_modules/@types/keyv/node_modules/@types/node/readline.d.ts +10 -10
  268. package/node_modules/@types/keyv/node_modules/@types/node/repl.d.ts +4 -4
  269. package/node_modules/@types/keyv/node_modules/@types/node/sqlite.d.ts +1 -1
  270. package/node_modules/@types/keyv/node_modules/@types/node/stream/promises.d.ts +8 -1
  271. package/node_modules/@types/keyv/node_modules/@types/node/stream/web.d.ts +22 -19
  272. package/node_modules/@types/keyv/node_modules/@types/node/stream.d.ts +36 -17
  273. package/node_modules/@types/keyv/node_modules/@types/node/string_decoder.d.ts +3 -3
  274. package/node_modules/@types/keyv/node_modules/@types/node/test.d.ts +103 -8
  275. package/node_modules/@types/keyv/node_modules/@types/node/timers/promises.d.ts +5 -5
  276. package/node_modules/@types/keyv/node_modules/@types/node/timers.d.ts +1 -1
  277. package/node_modules/@types/keyv/node_modules/@types/node/tls.d.ts +5 -5
  278. package/node_modules/@types/keyv/node_modules/@types/node/trace_events.d.ts +4 -4
  279. package/node_modules/@types/keyv/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +385 -0
  280. package/node_modules/@types/keyv/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +19 -0
  281. package/node_modules/@types/keyv/node_modules/@types/node/ts5.6/index.d.ts +92 -0
  282. package/node_modules/@types/keyv/node_modules/@types/node/tty.d.ts +1 -1
  283. package/node_modules/@types/keyv/node_modules/@types/node/url.d.ts +14 -11
  284. package/node_modules/@types/keyv/node_modules/@types/node/util.d.ts +59 -54
  285. package/node_modules/@types/keyv/node_modules/@types/node/v8.d.ts +12 -12
  286. package/node_modules/@types/keyv/node_modules/@types/node/vm.d.ts +88 -34
  287. package/node_modules/@types/keyv/node_modules/@types/node/wasi.d.ts +1 -1
  288. package/node_modules/@types/keyv/node_modules/@types/node/worker_threads.d.ts +23 -23
  289. package/node_modules/@types/keyv/node_modules/@types/node/zlib.d.ts +8 -8
  290. package/node_modules/@types/responselike/node_modules/@types/node/README.md +1 -1
  291. package/node_modules/@types/responselike/node_modules/@types/node/assert.d.ts +3 -3
  292. package/node_modules/@types/responselike/node_modules/@types/node/async_hooks.d.ts +1 -1
  293. package/node_modules/@types/responselike/node_modules/@types/node/buffer.buffer.d.ts +385 -0
  294. package/node_modules/@types/responselike/node_modules/@types/node/buffer.d.ts +14 -381
  295. package/node_modules/@types/responselike/node_modules/@types/node/child_process.d.ts +34 -29
  296. package/node_modules/@types/responselike/node_modules/@types/node/cluster.d.ts +2 -1
  297. package/node_modules/@types/responselike/node_modules/@types/node/compatibility/disposable.d.ts +16 -0
  298. package/node_modules/@types/responselike/node_modules/@types/node/compatibility/index.d.ts +9 -0
  299. package/node_modules/@types/responselike/node_modules/@types/node/compatibility/indexable.d.ts +23 -0
  300. package/node_modules/@types/responselike/node_modules/@types/node/compatibility/iterators.d.ts +21 -0
  301. package/node_modules/@types/responselike/node_modules/@types/node/console.d.ts +2 -2
  302. package/node_modules/@types/responselike/node_modules/@types/node/crypto.d.ts +13 -12
  303. package/node_modules/@types/responselike/node_modules/@types/node/diagnostics_channel.d.ts +4 -4
  304. package/node_modules/@types/responselike/node_modules/@types/node/dns/promises.d.ts +5 -5
  305. package/node_modules/@types/responselike/node_modules/@types/node/dns.d.ts +5 -5
  306. package/node_modules/@types/responselike/node_modules/@types/node/domain.d.ts +2 -2
  307. package/node_modules/@types/responselike/node_modules/@types/node/events.d.ts +3 -3
  308. package/node_modules/@types/responselike/node_modules/@types/node/fs/promises.d.ts +17 -6
  309. package/node_modules/@types/responselike/node_modules/@types/node/fs.d.ts +3 -3
  310. package/node_modules/@types/responselike/node_modules/@types/node/globals.d.ts +34 -63
  311. package/node_modules/@types/responselike/node_modules/@types/node/globals.typedarray.d.ts +21 -0
  312. package/node_modules/@types/responselike/node_modules/@types/node/http.d.ts +44 -7
  313. package/node_modules/@types/responselike/node_modules/@types/node/http2.d.ts +238 -101
  314. package/node_modules/@types/responselike/node_modules/@types/node/https.d.ts +17 -23
  315. package/node_modules/@types/responselike/node_modules/@types/node/index.d.ts +11 -9
  316. package/node_modules/@types/responselike/node_modules/@types/node/inspector.d.ts +270 -0
  317. package/node_modules/@types/responselike/node_modules/@types/node/module.d.ts +94 -3
  318. package/node_modules/@types/responselike/node_modules/@types/node/net.d.ts +17 -15
  319. package/node_modules/@types/responselike/node_modules/@types/node/os.d.ts +1 -1
  320. package/node_modules/@types/responselike/node_modules/@types/node/package.json +11 -3
  321. package/node_modules/@types/responselike/node_modules/@types/node/path.d.ts +1 -1
  322. package/node_modules/@types/responselike/node_modules/@types/node/perf_hooks.d.ts +43 -19
  323. package/node_modules/@types/responselike/node_modules/@types/node/punycode.d.ts +1 -1
  324. package/node_modules/@types/responselike/node_modules/@types/node/querystring.d.ts +1 -1
  325. package/node_modules/@types/responselike/node_modules/@types/node/readline/promises.d.ts +1 -1
  326. package/node_modules/@types/responselike/node_modules/@types/node/readline.d.ts +10 -10
  327. package/node_modules/@types/responselike/node_modules/@types/node/repl.d.ts +4 -4
  328. package/node_modules/@types/responselike/node_modules/@types/node/sqlite.d.ts +1 -1
  329. package/node_modules/@types/responselike/node_modules/@types/node/stream/promises.d.ts +8 -1
  330. package/node_modules/@types/responselike/node_modules/@types/node/stream/web.d.ts +22 -19
  331. package/node_modules/@types/responselike/node_modules/@types/node/stream.d.ts +36 -17
  332. package/node_modules/@types/responselike/node_modules/@types/node/string_decoder.d.ts +3 -3
  333. package/node_modules/@types/responselike/node_modules/@types/node/test.d.ts +103 -8
  334. package/node_modules/@types/responselike/node_modules/@types/node/timers/promises.d.ts +5 -5
  335. package/node_modules/@types/responselike/node_modules/@types/node/timers.d.ts +1 -1
  336. package/node_modules/@types/responselike/node_modules/@types/node/tls.d.ts +5 -5
  337. package/node_modules/@types/responselike/node_modules/@types/node/trace_events.d.ts +4 -4
  338. package/node_modules/@types/responselike/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +385 -0
  339. package/node_modules/@types/responselike/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +19 -0
  340. package/node_modules/@types/responselike/node_modules/@types/node/ts5.6/index.d.ts +92 -0
  341. package/node_modules/@types/responselike/node_modules/@types/node/tty.d.ts +1 -1
  342. package/node_modules/@types/responselike/node_modules/@types/node/url.d.ts +14 -11
  343. package/node_modules/@types/responselike/node_modules/@types/node/util.d.ts +59 -54
  344. package/node_modules/@types/responselike/node_modules/@types/node/v8.d.ts +12 -12
  345. package/node_modules/@types/responselike/node_modules/@types/node/vm.d.ts +88 -34
  346. package/node_modules/@types/responselike/node_modules/@types/node/wasi.d.ts +1 -1
  347. package/node_modules/@types/responselike/node_modules/@types/node/worker_threads.d.ts +23 -23
  348. package/node_modules/@types/responselike/node_modules/@types/node/zlib.d.ts +8 -8
  349. package/node_modules/form-data/Readme.md +4 -4
  350. package/node_modules/form-data/lib/form_data.js +1 -1
  351. package/node_modules/form-data/package.json +9 -6
  352. package/node_modules/package-json-from-dist/README.md +21 -6
  353. package/node_modules/package-json-from-dist/dist/commonjs/index.d.ts.map +1 -1
  354. package/node_modules/package-json-from-dist/dist/commonjs/index.js +11 -1
  355. package/node_modules/package-json-from-dist/dist/commonjs/index.js.map +1 -1
  356. package/node_modules/package-json-from-dist/dist/esm/index.d.ts.map +1 -1
  357. package/node_modules/package-json-from-dist/dist/esm/index.js +11 -1
  358. package/node_modules/package-json-from-dist/dist/esm/index.js.map +1 -1
  359. package/node_modules/package-json-from-dist/package.json +2 -2
  360. package/node_modules/parse5/dist/cjs/common/doctype.d.ts +0 -1
  361. package/node_modules/parse5/dist/cjs/common/doctype.js +2 -4
  362. package/node_modules/parse5/dist/cjs/common/error-codes.d.ts +0 -1
  363. package/node_modules/parse5/dist/cjs/common/error-codes.js +1 -2
  364. package/node_modules/parse5/dist/cjs/common/foreign-content.d.ts +0 -1
  365. package/node_modules/parse5/dist/cjs/common/foreign-content.js +7 -9
  366. package/node_modules/parse5/dist/cjs/common/html.d.ts +32 -31
  367. package/node_modules/parse5/dist/cjs/common/html.js +41 -42
  368. package/node_modules/parse5/dist/cjs/common/token.d.ts +0 -1
  369. package/node_modules/parse5/dist/cjs/common/token.js +3 -4
  370. package/node_modules/parse5/dist/cjs/common/unicode.d.ts +1 -8
  371. package/node_modules/parse5/dist/cjs/common/unicode.js +7 -14
  372. package/node_modules/parse5/dist/cjs/index.d.ts +15 -4
  373. package/node_modules/parse5/dist/cjs/index.js +3 -6
  374. package/node_modules/parse5/dist/cjs/parser/formatting-element-list.d.ts +0 -1
  375. package/node_modules/parse5/dist/cjs/parser/formatting-element-list.js +1 -2
  376. package/node_modules/parse5/dist/cjs/parser/index.d.ts +72 -8
  377. package/node_modules/parse5/dist/cjs/parser/index.js +81 -9
  378. package/node_modules/parse5/dist/cjs/parser/open-element-stack.d.ts +2 -2
  379. package/node_modules/parse5/dist/cjs/parser/open-element-stack.js +95 -87
  380. package/node_modules/parse5/dist/cjs/serializer/index.d.ts +1 -2
  381. package/node_modules/parse5/dist/cjs/serializer/index.js +8 -9
  382. package/node_modules/parse5/dist/cjs/tokenizer/index.d.ts +130 -131
  383. package/node_modules/parse5/dist/cjs/tokenizer/index.js +87 -281
  384. package/node_modules/parse5/dist/cjs/tokenizer/preprocessor.d.ts +3 -4
  385. package/node_modules/parse5/dist/cjs/tokenizer/preprocessor.js +8 -7
  386. package/node_modules/parse5/dist/cjs/tree-adapters/default.d.ts +0 -1
  387. package/node_modules/parse5/dist/cjs/tree-adapters/default.js +9 -10
  388. package/node_modules/parse5/dist/cjs/tree-adapters/interface.d.ts +7 -2
  389. package/node_modules/parse5/dist/cjs/tree-adapters/interface.js +0 -1
  390. package/node_modules/parse5/dist/common/doctype.d.ts +0 -1
  391. package/node_modules/parse5/dist/common/doctype.js +0 -1
  392. package/node_modules/parse5/dist/common/error-codes.d.ts +0 -1
  393. package/node_modules/parse5/dist/common/error-codes.js +1 -2
  394. package/node_modules/parse5/dist/common/foreign-content.d.ts +0 -1
  395. package/node_modules/parse5/dist/common/foreign-content.js +0 -2
  396. package/node_modules/parse5/dist/common/html.d.ts +32 -31
  397. package/node_modules/parse5/dist/common/html.js +38 -38
  398. package/node_modules/parse5/dist/common/token.d.ts +0 -1
  399. package/node_modules/parse5/dist/common/token.js +1 -2
  400. package/node_modules/parse5/dist/common/unicode.d.ts +1 -8
  401. package/node_modules/parse5/dist/common/unicode.js +1 -8
  402. package/node_modules/parse5/dist/index.d.ts +15 -4
  403. package/node_modules/parse5/dist/index.js +0 -3
  404. package/node_modules/parse5/dist/parser/formatting-element-list.d.ts +0 -1
  405. package/node_modules/parse5/dist/parser/formatting-element-list.js +1 -2
  406. package/node_modules/parse5/dist/parser/index.d.ts +72 -8
  407. package/node_modules/parse5/dist/parser/index.js +82 -10
  408. package/node_modules/parse5/dist/parser/open-element-stack.d.ts +2 -2
  409. package/node_modules/parse5/dist/parser/open-element-stack.js +96 -88
  410. package/node_modules/parse5/dist/serializer/index.d.ts +1 -2
  411. package/node_modules/parse5/dist/serializer/index.js +6 -6
  412. package/node_modules/parse5/dist/tokenizer/index.d.ts +130 -131
  413. package/node_modules/parse5/dist/tokenizer/index.js +88 -282
  414. package/node_modules/parse5/dist/tokenizer/preprocessor.d.ts +3 -4
  415. package/node_modules/parse5/dist/tokenizer/preprocessor.js +8 -7
  416. package/node_modules/parse5/dist/tree-adapters/default.d.ts +0 -1
  417. package/node_modules/parse5/dist/tree-adapters/default.js +9 -10
  418. package/node_modules/parse5/dist/tree-adapters/interface.d.ts +7 -2
  419. package/node_modules/parse5/dist/tree-adapters/interface.js +0 -1
  420. package/node_modules/parse5/package.json +4 -4
  421. package/node_modules/parse5-htmlparser2-tree-adapter/dist/cjs/index.d.ts +1 -2
  422. package/node_modules/parse5-htmlparser2-tree-adapter/dist/cjs/index.js +11 -12
  423. package/node_modules/parse5-htmlparser2-tree-adapter/dist/index.d.ts +1 -2
  424. package/node_modules/parse5-htmlparser2-tree-adapter/dist/index.js +9 -10
  425. package/node_modules/parse5-htmlparser2-tree-adapter/package.json +7 -6
  426. package/package.json +18 -18
  427. package/node_modules/@slack/logger/node_modules/@types/node/globals.global.d.ts +0 -1
  428. package/node_modules/@slack/web-api/node_modules/@types/node/globals.global.d.ts +0 -1
  429. package/node_modules/@types/cacheable-request/node_modules/@types/node/globals.global.d.ts +0 -1
  430. package/node_modules/@types/keyv/node_modules/@types/node/globals.global.d.ts +0 -1
  431. package/node_modules/@types/responselike/node_modules/@types/node/globals.global.d.ts +0 -1
  432. package/node_modules/form-data/README.md.bak +0 -358
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;AAAA,qCAAsC;AACtC,yCAAiD;AACjD,uCAAwC;AAExC,MAAM,EAAE,GAAG,GAAG,eAAG,eAAe,eAAG,EAAE,CAAA;AACrC,MAAM,IAAI,GAAG,GAAG,eAAG,OAAO,eAAG,EAAE,CAAA;AAE/B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACI,MAAM,eAAe,GAAG,CAC7B,IAAkB,EAClB,cAAsB,iBAAiB,EAC/B,EAAE;IACV,MAAM,CAAC,GACL,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,CAAC;QACtD,IAAA,wBAAa,EAAC,IAAI,CAAC;QACrB,CAAC,CAAC,IAAI,CAAA;IACR,MAAM,SAAS,GAAG,IAAA,mBAAO,EAAC,CAAC,CAAC,CAAA;IAE5B,MAAM,GAAG,GAAG,SAAS,CAAC,WAAW,CAAC,EAAE,CAAC,CAAA;IACrC,IAAI,GAAG,KAAK,CAAC,CAAC,EAAE,CAAC;QACf,qEAAqE;QACrE,MAAM,EAAE,GAAG,SAAS,CAAC,SAAS,CAAC,CAAC,EAAE,GAAG,GAAG,EAAE,CAAC,MAAM,CAAC,CAAA;QAClD,MAAM,MAAM,GAAG,SAAS,CAAC,SAAS,CAAC,GAAG,GAAG,EAAE,CAAC,MAAM,CAAC,CAAA;QACnD,MAAM,OAAO,GACX,MAAM,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC;YACtB,MAAM,CAAC,KAAK,CAAC,eAAG,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,eAAG,CAAC;YACzC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,eAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;QAChC,OAAO,IAAA,mBAAO,EAAC,EAAE,EAAE,OAAO,EAAE,cAAc,CAAC,CAAA;IAC7C,CAAC;SAAM,CAAC;QACN,kCAAkC;QAClC,MAAM,CAAC,GAAG,SAAS,CAAC,WAAW,CAAC,IAAI,CAAC,CAAA;QACrC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC;YACb,OAAO,IAAA,mBAAO,EAAC,SAAS,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,cAAc,CAAC,CAAA;QAC3D,CAAC;aAAM,CAAC;YACN,OAAO,IAAA,mBAAO,EAAC,SAAS,EAAE,WAAW,CAAC,CAAA;QACxC,CAAC;IACH,CAAC;AACH,CAAC,CAAA;AA7BY,QAAA,eAAe,mBA6B3B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACI,MAAM,eAAe,GAAG,CAC7B,IAAkB,EAClB,cAAsB,iBAAiB,EACvC,EAAE,CACF,IAAI,CAAC,KAAK,CAAC,IAAA,sBAAY,EAAC,IAAA,uBAAe,EAAC,IAAI,EAAE,WAAW,CAAC,EAAE,MAAM,CAAC,CAAC,CAAA;AAJzD,QAAA,eAAe,mBAI0C","sourcesContent":["import { readFileSync } from 'node:fs'\nimport { dirname, resolve, sep } from 'node:path'\nimport { fileURLToPath } from 'node:url'\n\nconst NM = `${sep}node_modules${sep}`\nconst DIST = `${sep}dist${sep}`\n\n/**\n * Find the package.json file, either from a TypeScript file somewhere not\n * in a 'dist' folder, or a built and/or installed 'dist' folder.\n *\n * Note: this *only* works if you build your code into `'./dist'`, and that the\n * source path does not also contain `'dist'`! If you don't build into\n * `'./dist'`, or if you have files at `./src/dist/dist.ts`, then this will\n * not work properly!\n *\n * The default `pathFromSrc` option assumes that the calling code lives one\n * folder below the root of the package. Otherwise, it must be specified.\n *\n * Example:\n *\n * ```ts\n * // src/index.ts\n * import { findPackageJson } from 'package-json-from-dist'\n *\n * const pj = findPackageJson(import.meta.url)\n * console.log(`package.json found at ${pj}`)\n * ```\n *\n * If the caller is deeper within the project source, then you must provide\n * the appropriate fallback path:\n *\n * ```ts\n * // src/components/something.ts\n * import { findPackageJson } from 'package-json-from-dist'\n *\n * const pj = findPackageJson(import.meta.url, '../../package.json')\n * console.log(`package.json found at ${pj}`)\n * ```\n *\n * When running from CommmonJS, use `__filename` instead of `import.meta.url`\n *\n * ```ts\n * // src/index.cts\n * import { findPackageJson } from 'package-json-from-dist'\n *\n * const pj = findPackageJson(__filename)\n * console.log(`package.json found at ${pj}`)\n * ```\n */\nexport const findPackageJson = (\n from: string | URL,\n pathFromSrc: string = '../package.json',\n): string => {\n const f =\n typeof from === 'object' || from.startsWith('file://') ?\n fileURLToPath(from)\n : from\n const __dirname = dirname(f)\n\n const nms = __dirname.lastIndexOf(NM)\n if (nms !== -1) {\n // inside of node_modules. find the dist directly under package name.\n const nm = __dirname.substring(0, nms + NM.length)\n const pkgDir = __dirname.substring(nms + NM.length)\n const pkgName =\n pkgDir.startsWith('@') ?\n pkgDir.split(sep).slice(0, 2).join(sep)\n : String(pkgDir.split(sep)[0])\n return resolve(nm, pkgName, 'package.json')\n } else {\n // see if we are in a dist folder.\n const d = __dirname.lastIndexOf(DIST)\n if (d !== -1) {\n return resolve(__dirname.substring(0, d), 'package.json')\n } else {\n return resolve(__dirname, pathFromSrc)\n }\n }\n}\n\n/**\n * Load the package.json file, either from a TypeScript file somewhere not\n * in a 'dist' folder, or a built and/or installed 'dist' folder.\n *\n * Note: this *only* works if you build your code into `'./dist'`, and that the\n * source path does not also contain `'dist'`! If you don't build into\n * `'./dist'`, or if you have files at `./src/dist/dist.ts`, then this will\n * not work properly!\n *\n * The default `pathFromSrc` option assumes that the calling code lives one\n * folder below the root of the package. Otherwise, it must be specified.\n *\n * Example:\n *\n * ```ts\n * // src/index.ts\n * import { loadPackageJson } from 'package-json-from-dist'\n *\n * const pj = loadPackageJson(import.meta.url)\n * console.log(`Hello from ${pj.name}@${pj.version}`)\n * ```\n *\n * If the caller is deeper within the project source, then you must provide\n * the appropriate fallback path:\n *\n * ```ts\n * // src/components/something.ts\n * import { loadPackageJson } from 'package-json-from-dist'\n *\n * const pj = loadPackageJson(import.meta.url, '../../package.json')\n * console.log(`Hello from ${pj.name}@${pj.version}`)\n * ```\n *\n * When running from CommmonJS, use `__filename` instead of `import.meta.url`\n *\n * ```ts\n * // src/index.cts\n * import { loadPackageJson } from 'package-json-from-dist'\n *\n * const pj = loadPackageJson(__filename)\n * console.log(`Hello from ${pj.name}@${pj.version}`)\n * ```\n */\nexport const loadPackageJson = (\n from: string | URL,\n pathFromSrc: string = '../package.json',\n) =>\n JSON.parse(readFileSync(findPackageJson(from, pathFromSrc), 'utf8'))\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;AAAA,qCAAsC;AACtC,yCAAiD;AACjD,uCAAwC;AAExC,MAAM,EAAE,GAAG,GAAG,eAAG,eAAe,eAAG,EAAE,CAAA;AACrC,MAAM,KAAK,GAAG,SAAS,eAAG,EAAE,CAAA;AAC5B,MAAM,GAAG,GAAG,GAAG,eAAG,UAAU,eAAG,EAAE,CAAA;AACjC,MAAM,IAAI,GAAG,GAAG,eAAG,OAAO,eAAG,EAAE,CAAA;AAE/B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACI,MAAM,eAAe,GAAG,CAC7B,IAAkB,EAClB,cAAsB,iBAAiB,EAC/B,EAAE;IACV,MAAM,CAAC,GACL,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,CAAC;QACtD,IAAA,wBAAa,EAAC,IAAI,CAAC;QACrB,CAAC,CAAC,IAAI,CAAA;IACR,MAAM,SAAS,GAAG,IAAA,mBAAO,EAAC,CAAC,CAAC,CAAA;IAE5B,MAAM,GAAG,GAAG,SAAS,CAAC,WAAW,CAAC,EAAE,CAAC,CAAA;IACrC,IAAI,GAAG,KAAK,CAAC,CAAC,EAAE,CAAC;QACf,qEAAqE;QACrE,MAAM,EAAE,GAAG,SAAS,CAAC,SAAS,CAAC,CAAC,EAAE,GAAG,GAAG,EAAE,CAAC,MAAM,CAAC,CAAA;QAClD,MAAM,MAAM,GAAG,SAAS,CAAC,SAAS,CAAC,GAAG,GAAG,EAAE,CAAC,MAAM,CAAC,CAAA;QACnD,4DAA4D;QAC5D,sDAAsD;QACtD,IAAI,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE,CAAC;YAC7B,MAAM,GAAG,GAAG,MAAM,CAAC,OAAO,CAAC,GAAG,EAAE,KAAK,CAAC,MAAM,CAAC,CAAA;YAC7C,IAAI,GAAG,EAAE,CAAC;gBACR,OAAO,IAAA,mBAAO,EACZ,EAAE,EACF,MAAM,CAAC,SAAS,CAAC,CAAC,EAAE,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC,EACrC,cAAc,CACf,CAAA;YACH,CAAC;QACH,CAAC;QACD,MAAM,OAAO,GACX,MAAM,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC;YACtB,MAAM,CAAC,KAAK,CAAC,eAAG,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,eAAG,CAAC;YAChC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,eAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;QAChC,OAAO,IAAA,mBAAO,EAAC,EAAE,EAAE,OAAO,EAAE,cAAc,CAAC,CAAA;IAC7C,CAAC;SAAM,CAAC;QACN,kCAAkC;QAClC,MAAM,CAAC,GAAG,SAAS,CAAC,WAAW,CAAC,IAAI,CAAC,CAAA;QACrC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC;YACb,OAAO,IAAA,mBAAO,EAAC,SAAS,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,cAAc,CAAC,CAAA;QAC3D,CAAC;aAAM,CAAC;YACN,OAAO,IAAA,mBAAO,EAAC,SAAS,EAAE,WAAW,CAAC,CAAA;QACxC,CAAC;IACH,CAAC;AACH,CAAC,CAAA;AAzCY,QAAA,eAAe,mBAyC3B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACI,MAAM,eAAe,GAAG,CAC7B,IAAkB,EAClB,cAAsB,iBAAiB,EACvC,EAAE,CACF,IAAI,CAAC,KAAK,CAAC,IAAA,sBAAY,EAAC,IAAA,uBAAe,EAAC,IAAI,EAAE,WAAW,CAAC,EAAE,MAAM,CAAC,CAAC,CAAA;AAJzD,QAAA,eAAe,mBAI0C","sourcesContent":["import { readFileSync } from 'node:fs'\nimport { dirname, resolve, sep } from 'node:path'\nimport { fileURLToPath } from 'node:url'\n\nconst NM = `${sep}node_modules${sep}`\nconst STORE = `.store${sep}`\nconst PKG = `${sep}package${sep}`\nconst DIST = `${sep}dist${sep}`\n\n/**\n * Find the package.json file, either from a TypeScript file somewhere not\n * in a 'dist' folder, or a built and/or installed 'dist' folder.\n *\n * Note: this *only* works if you build your code into `'./dist'`, and that the\n * source path does not also contain `'dist'`! If you don't build into\n * `'./dist'`, or if you have files at `./src/dist/dist.ts`, then this will\n * not work properly!\n *\n * The default `pathFromSrc` option assumes that the calling code lives one\n * folder below the root of the package. Otherwise, it must be specified.\n *\n * Example:\n *\n * ```ts\n * // src/index.ts\n * import { findPackageJson } from 'package-json-from-dist'\n *\n * const pj = findPackageJson(import.meta.url)\n * console.log(`package.json found at ${pj}`)\n * ```\n *\n * If the caller is deeper within the project source, then you must provide\n * the appropriate fallback path:\n *\n * ```ts\n * // src/components/something.ts\n * import { findPackageJson } from 'package-json-from-dist'\n *\n * const pj = findPackageJson(import.meta.url, '../../package.json')\n * console.log(`package.json found at ${pj}`)\n * ```\n *\n * When running from CommmonJS, use `__filename` instead of `import.meta.url`\n *\n * ```ts\n * // src/index.cts\n * import { findPackageJson } from 'package-json-from-dist'\n *\n * const pj = findPackageJson(__filename)\n * console.log(`package.json found at ${pj}`)\n * ```\n */\nexport const findPackageJson = (\n from: string | URL,\n pathFromSrc: string = '../package.json',\n): string => {\n const f =\n typeof from === 'object' || from.startsWith('file://') ?\n fileURLToPath(from)\n : from\n const __dirname = dirname(f)\n\n const nms = __dirname.lastIndexOf(NM)\n if (nms !== -1) {\n // inside of node_modules. find the dist directly under package name.\n const nm = __dirname.substring(0, nms + NM.length)\n const pkgDir = __dirname.substring(nms + NM.length)\n // affordance for yarn berry, which puts package contents in\n // '.../node_modules/.store/${id}-${hash}/package/...'\n if (pkgDir.startsWith(STORE)) {\n const pkg = pkgDir.indexOf(PKG, STORE.length)\n if (pkg) {\n return resolve(\n nm,\n pkgDir.substring(0, pkg + PKG.length),\n 'package.json',\n )\n }\n }\n const pkgName =\n pkgDir.startsWith('@') ?\n pkgDir.split(sep, 2).join(sep)\n : String(pkgDir.split(sep)[0])\n return resolve(nm, pkgName, 'package.json')\n } else {\n // see if we are in a dist folder.\n const d = __dirname.lastIndexOf(DIST)\n if (d !== -1) {\n return resolve(__dirname.substring(0, d), 'package.json')\n } else {\n return resolve(__dirname, pathFromSrc)\n }\n }\n}\n\n/**\n * Load the package.json file, either from a TypeScript file somewhere not\n * in a 'dist' folder, or a built and/or installed 'dist' folder.\n *\n * Note: this *only* works if you build your code into `'./dist'`, and that the\n * source path does not also contain `'dist'`! If you don't build into\n * `'./dist'`, or if you have files at `./src/dist/dist.ts`, then this will\n * not work properly!\n *\n * The default `pathFromSrc` option assumes that the calling code lives one\n * folder below the root of the package. Otherwise, it must be specified.\n *\n * Example:\n *\n * ```ts\n * // src/index.ts\n * import { loadPackageJson } from 'package-json-from-dist'\n *\n * const pj = loadPackageJson(import.meta.url)\n * console.log(`Hello from ${pj.name}@${pj.version}`)\n * ```\n *\n * If the caller is deeper within the project source, then you must provide\n * the appropriate fallback path:\n *\n * ```ts\n * // src/components/something.ts\n * import { loadPackageJson } from 'package-json-from-dist'\n *\n * const pj = loadPackageJson(import.meta.url, '../../package.json')\n * console.log(`Hello from ${pj.name}@${pj.version}`)\n * ```\n *\n * When running from CommmonJS, use `__filename` instead of `import.meta.url`\n *\n * ```ts\n * // src/index.cts\n * import { loadPackageJson } from 'package-json-from-dist'\n *\n * const pj = loadPackageJson(__filename)\n * console.log(`Hello from ${pj.name}@${pj.version}`)\n * ```\n */\nexport const loadPackageJson = (\n from: string | URL,\n pathFromSrc: string = '../package.json',\n) =>\n JSON.parse(readFileSync(findPackageJson(from, pathFromSrc), 'utf8'))\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAOA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,eAAO,MAAM,eAAe,SACpB,MAAM,GAAG,GAAG,gBACL,MAAM,KAClB,MA0BF,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,eAAO,MAAM,eAAe,SACpB,MAAM,GAAG,GAAG,gBACL,MAAM,QAEiD,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AASA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,eAAO,MAAM,eAAe,SACpB,MAAM,GAAG,GAAG,gBACL,MAAM,KAClB,MAsCF,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,eAAO,MAAM,eAAe,SACpB,MAAM,GAAG,GAAG,gBACL,MAAM,QAEiD,CAAA"}
@@ -2,6 +2,8 @@ import { readFileSync } from 'node:fs';
2
2
  import { dirname, resolve, sep } from 'node:path';
3
3
  import { fileURLToPath } from 'node:url';
4
4
  const NM = `${sep}node_modules${sep}`;
5
+ const STORE = `.store${sep}`;
6
+ const PKG = `${sep}package${sep}`;
5
7
  const DIST = `${sep}dist${sep}`;
6
8
  /**
7
9
  * Find the package.json file, either from a TypeScript file somewhere not
@@ -56,8 +58,16 @@ export const findPackageJson = (from, pathFromSrc = '../package.json') => {
56
58
  // inside of node_modules. find the dist directly under package name.
57
59
  const nm = __dirname.substring(0, nms + NM.length);
58
60
  const pkgDir = __dirname.substring(nms + NM.length);
61
+ // affordance for yarn berry, which puts package contents in
62
+ // '.../node_modules/.store/${id}-${hash}/package/...'
63
+ if (pkgDir.startsWith(STORE)) {
64
+ const pkg = pkgDir.indexOf(PKG, STORE.length);
65
+ if (pkg) {
66
+ return resolve(nm, pkgDir.substring(0, pkg + PKG.length), 'package.json');
67
+ }
68
+ }
59
69
  const pkgName = pkgDir.startsWith('@') ?
60
- pkgDir.split(sep).slice(0, 2).join(sep)
70
+ pkgDir.split(sep, 2).join(sep)
61
71
  : String(pkgDir.split(sep)[0]);
62
72
  return resolve(nm, pkgName, 'package.json');
63
73
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AACtC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,WAAW,CAAA;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAExC,MAAM,EAAE,GAAG,GAAG,GAAG,eAAe,GAAG,EAAE,CAAA;AACrC,MAAM,IAAI,GAAG,GAAG,GAAG,OAAO,GAAG,EAAE,CAAA;AAE/B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAC7B,IAAkB,EAClB,cAAsB,iBAAiB,EAC/B,EAAE;IACV,MAAM,CAAC,GACL,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,CAAC;QACtD,aAAa,CAAC,IAAI,CAAC;QACrB,CAAC,CAAC,IAAI,CAAA;IACR,MAAM,SAAS,GAAG,OAAO,CAAC,CAAC,CAAC,CAAA;IAE5B,MAAM,GAAG,GAAG,SAAS,CAAC,WAAW,CAAC,EAAE,CAAC,CAAA;IACrC,IAAI,GAAG,KAAK,CAAC,CAAC,EAAE,CAAC;QACf,qEAAqE;QACrE,MAAM,EAAE,GAAG,SAAS,CAAC,SAAS,CAAC,CAAC,EAAE,GAAG,GAAG,EAAE,CAAC,MAAM,CAAC,CAAA;QAClD,MAAM,MAAM,GAAG,SAAS,CAAC,SAAS,CAAC,GAAG,GAAG,EAAE,CAAC,MAAM,CAAC,CAAA;QACnD,MAAM,OAAO,GACX,MAAM,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC;YACtB,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC;YACzC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;QAChC,OAAO,OAAO,CAAC,EAAE,EAAE,OAAO,EAAE,cAAc,CAAC,CAAA;IAC7C,CAAC;SAAM,CAAC;QACN,kCAAkC;QAClC,MAAM,CAAC,GAAG,SAAS,CAAC,WAAW,CAAC,IAAI,CAAC,CAAA;QACrC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC;YACb,OAAO,OAAO,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,cAAc,CAAC,CAAA;QAC3D,CAAC;aAAM,CAAC;YACN,OAAO,OAAO,CAAC,SAAS,EAAE,WAAW,CAAC,CAAA;QACxC,CAAC;IACH,CAAC;AACH,CAAC,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAC7B,IAAkB,EAClB,cAAsB,iBAAiB,EACvC,EAAE,CACF,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,eAAe,CAAC,IAAI,EAAE,WAAW,CAAC,EAAE,MAAM,CAAC,CAAC,CAAA","sourcesContent":["import { readFileSync } from 'node:fs'\nimport { dirname, resolve, sep } from 'node:path'\nimport { fileURLToPath } from 'node:url'\n\nconst NM = `${sep}node_modules${sep}`\nconst DIST = `${sep}dist${sep}`\n\n/**\n * Find the package.json file, either from a TypeScript file somewhere not\n * in a 'dist' folder, or a built and/or installed 'dist' folder.\n *\n * Note: this *only* works if you build your code into `'./dist'`, and that the\n * source path does not also contain `'dist'`! If you don't build into\n * `'./dist'`, or if you have files at `./src/dist/dist.ts`, then this will\n * not work properly!\n *\n * The default `pathFromSrc` option assumes that the calling code lives one\n * folder below the root of the package. Otherwise, it must be specified.\n *\n * Example:\n *\n * ```ts\n * // src/index.ts\n * import { findPackageJson } from 'package-json-from-dist'\n *\n * const pj = findPackageJson(import.meta.url)\n * console.log(`package.json found at ${pj}`)\n * ```\n *\n * If the caller is deeper within the project source, then you must provide\n * the appropriate fallback path:\n *\n * ```ts\n * // src/components/something.ts\n * import { findPackageJson } from 'package-json-from-dist'\n *\n * const pj = findPackageJson(import.meta.url, '../../package.json')\n * console.log(`package.json found at ${pj}`)\n * ```\n *\n * When running from CommmonJS, use `__filename` instead of `import.meta.url`\n *\n * ```ts\n * // src/index.cts\n * import { findPackageJson } from 'package-json-from-dist'\n *\n * const pj = findPackageJson(__filename)\n * console.log(`package.json found at ${pj}`)\n * ```\n */\nexport const findPackageJson = (\n from: string | URL,\n pathFromSrc: string = '../package.json',\n): string => {\n const f =\n typeof from === 'object' || from.startsWith('file://') ?\n fileURLToPath(from)\n : from\n const __dirname = dirname(f)\n\n const nms = __dirname.lastIndexOf(NM)\n if (nms !== -1) {\n // inside of node_modules. find the dist directly under package name.\n const nm = __dirname.substring(0, nms + NM.length)\n const pkgDir = __dirname.substring(nms + NM.length)\n const pkgName =\n pkgDir.startsWith('@') ?\n pkgDir.split(sep).slice(0, 2).join(sep)\n : String(pkgDir.split(sep)[0])\n return resolve(nm, pkgName, 'package.json')\n } else {\n // see if we are in a dist folder.\n const d = __dirname.lastIndexOf(DIST)\n if (d !== -1) {\n return resolve(__dirname.substring(0, d), 'package.json')\n } else {\n return resolve(__dirname, pathFromSrc)\n }\n }\n}\n\n/**\n * Load the package.json file, either from a TypeScript file somewhere not\n * in a 'dist' folder, or a built and/or installed 'dist' folder.\n *\n * Note: this *only* works if you build your code into `'./dist'`, and that the\n * source path does not also contain `'dist'`! If you don't build into\n * `'./dist'`, or if you have files at `./src/dist/dist.ts`, then this will\n * not work properly!\n *\n * The default `pathFromSrc` option assumes that the calling code lives one\n * folder below the root of the package. Otherwise, it must be specified.\n *\n * Example:\n *\n * ```ts\n * // src/index.ts\n * import { loadPackageJson } from 'package-json-from-dist'\n *\n * const pj = loadPackageJson(import.meta.url)\n * console.log(`Hello from ${pj.name}@${pj.version}`)\n * ```\n *\n * If the caller is deeper within the project source, then you must provide\n * the appropriate fallback path:\n *\n * ```ts\n * // src/components/something.ts\n * import { loadPackageJson } from 'package-json-from-dist'\n *\n * const pj = loadPackageJson(import.meta.url, '../../package.json')\n * console.log(`Hello from ${pj.name}@${pj.version}`)\n * ```\n *\n * When running from CommmonJS, use `__filename` instead of `import.meta.url`\n *\n * ```ts\n * // src/index.cts\n * import { loadPackageJson } from 'package-json-from-dist'\n *\n * const pj = loadPackageJson(__filename)\n * console.log(`Hello from ${pj.name}@${pj.version}`)\n * ```\n */\nexport const loadPackageJson = (\n from: string | URL,\n pathFromSrc: string = '../package.json',\n) =>\n JSON.parse(readFileSync(findPackageJson(from, pathFromSrc), 'utf8'))\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AACtC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,WAAW,CAAA;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAExC,MAAM,EAAE,GAAG,GAAG,GAAG,eAAe,GAAG,EAAE,CAAA;AACrC,MAAM,KAAK,GAAG,SAAS,GAAG,EAAE,CAAA;AAC5B,MAAM,GAAG,GAAG,GAAG,GAAG,UAAU,GAAG,EAAE,CAAA;AACjC,MAAM,IAAI,GAAG,GAAG,GAAG,OAAO,GAAG,EAAE,CAAA;AAE/B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAC7B,IAAkB,EAClB,cAAsB,iBAAiB,EAC/B,EAAE;IACV,MAAM,CAAC,GACL,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,CAAC;QACtD,aAAa,CAAC,IAAI,CAAC;QACrB,CAAC,CAAC,IAAI,CAAA;IACR,MAAM,SAAS,GAAG,OAAO,CAAC,CAAC,CAAC,CAAA;IAE5B,MAAM,GAAG,GAAG,SAAS,CAAC,WAAW,CAAC,EAAE,CAAC,CAAA;IACrC,IAAI,GAAG,KAAK,CAAC,CAAC,EAAE,CAAC;QACf,qEAAqE;QACrE,MAAM,EAAE,GAAG,SAAS,CAAC,SAAS,CAAC,CAAC,EAAE,GAAG,GAAG,EAAE,CAAC,MAAM,CAAC,CAAA;QAClD,MAAM,MAAM,GAAG,SAAS,CAAC,SAAS,CAAC,GAAG,GAAG,EAAE,CAAC,MAAM,CAAC,CAAA;QACnD,4DAA4D;QAC5D,sDAAsD;QACtD,IAAI,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE,CAAC;YAC7B,MAAM,GAAG,GAAG,MAAM,CAAC,OAAO,CAAC,GAAG,EAAE,KAAK,CAAC,MAAM,CAAC,CAAA;YAC7C,IAAI,GAAG,EAAE,CAAC;gBACR,OAAO,OAAO,CACZ,EAAE,EACF,MAAM,CAAC,SAAS,CAAC,CAAC,EAAE,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC,EACrC,cAAc,CACf,CAAA;YACH,CAAC;QACH,CAAC;QACD,MAAM,OAAO,GACX,MAAM,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC;YACtB,MAAM,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC;YAChC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;QAChC,OAAO,OAAO,CAAC,EAAE,EAAE,OAAO,EAAE,cAAc,CAAC,CAAA;IAC7C,CAAC;SAAM,CAAC;QACN,kCAAkC;QAClC,MAAM,CAAC,GAAG,SAAS,CAAC,WAAW,CAAC,IAAI,CAAC,CAAA;QACrC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC;YACb,OAAO,OAAO,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,cAAc,CAAC,CAAA;QAC3D,CAAC;aAAM,CAAC;YACN,OAAO,OAAO,CAAC,SAAS,EAAE,WAAW,CAAC,CAAA;QACxC,CAAC;IACH,CAAC;AACH,CAAC,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAC7B,IAAkB,EAClB,cAAsB,iBAAiB,EACvC,EAAE,CACF,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,eAAe,CAAC,IAAI,EAAE,WAAW,CAAC,EAAE,MAAM,CAAC,CAAC,CAAA","sourcesContent":["import { readFileSync } from 'node:fs'\nimport { dirname, resolve, sep } from 'node:path'\nimport { fileURLToPath } from 'node:url'\n\nconst NM = `${sep}node_modules${sep}`\nconst STORE = `.store${sep}`\nconst PKG = `${sep}package${sep}`\nconst DIST = `${sep}dist${sep}`\n\n/**\n * Find the package.json file, either from a TypeScript file somewhere not\n * in a 'dist' folder, or a built and/or installed 'dist' folder.\n *\n * Note: this *only* works if you build your code into `'./dist'`, and that the\n * source path does not also contain `'dist'`! If you don't build into\n * `'./dist'`, or if you have files at `./src/dist/dist.ts`, then this will\n * not work properly!\n *\n * The default `pathFromSrc` option assumes that the calling code lives one\n * folder below the root of the package. Otherwise, it must be specified.\n *\n * Example:\n *\n * ```ts\n * // src/index.ts\n * import { findPackageJson } from 'package-json-from-dist'\n *\n * const pj = findPackageJson(import.meta.url)\n * console.log(`package.json found at ${pj}`)\n * ```\n *\n * If the caller is deeper within the project source, then you must provide\n * the appropriate fallback path:\n *\n * ```ts\n * // src/components/something.ts\n * import { findPackageJson } from 'package-json-from-dist'\n *\n * const pj = findPackageJson(import.meta.url, '../../package.json')\n * console.log(`package.json found at ${pj}`)\n * ```\n *\n * When running from CommmonJS, use `__filename` instead of `import.meta.url`\n *\n * ```ts\n * // src/index.cts\n * import { findPackageJson } from 'package-json-from-dist'\n *\n * const pj = findPackageJson(__filename)\n * console.log(`package.json found at ${pj}`)\n * ```\n */\nexport const findPackageJson = (\n from: string | URL,\n pathFromSrc: string = '../package.json',\n): string => {\n const f =\n typeof from === 'object' || from.startsWith('file://') ?\n fileURLToPath(from)\n : from\n const __dirname = dirname(f)\n\n const nms = __dirname.lastIndexOf(NM)\n if (nms !== -1) {\n // inside of node_modules. find the dist directly under package name.\n const nm = __dirname.substring(0, nms + NM.length)\n const pkgDir = __dirname.substring(nms + NM.length)\n // affordance for yarn berry, which puts package contents in\n // '.../node_modules/.store/${id}-${hash}/package/...'\n if (pkgDir.startsWith(STORE)) {\n const pkg = pkgDir.indexOf(PKG, STORE.length)\n if (pkg) {\n return resolve(\n nm,\n pkgDir.substring(0, pkg + PKG.length),\n 'package.json',\n )\n }\n }\n const pkgName =\n pkgDir.startsWith('@') ?\n pkgDir.split(sep, 2).join(sep)\n : String(pkgDir.split(sep)[0])\n return resolve(nm, pkgName, 'package.json')\n } else {\n // see if we are in a dist folder.\n const d = __dirname.lastIndexOf(DIST)\n if (d !== -1) {\n return resolve(__dirname.substring(0, d), 'package.json')\n } else {\n return resolve(__dirname, pathFromSrc)\n }\n }\n}\n\n/**\n * Load the package.json file, either from a TypeScript file somewhere not\n * in a 'dist' folder, or a built and/or installed 'dist' folder.\n *\n * Note: this *only* works if you build your code into `'./dist'`, and that the\n * source path does not also contain `'dist'`! If you don't build into\n * `'./dist'`, or if you have files at `./src/dist/dist.ts`, then this will\n * not work properly!\n *\n * The default `pathFromSrc` option assumes that the calling code lives one\n * folder below the root of the package. Otherwise, it must be specified.\n *\n * Example:\n *\n * ```ts\n * // src/index.ts\n * import { loadPackageJson } from 'package-json-from-dist'\n *\n * const pj = loadPackageJson(import.meta.url)\n * console.log(`Hello from ${pj.name}@${pj.version}`)\n * ```\n *\n * If the caller is deeper within the project source, then you must provide\n * the appropriate fallback path:\n *\n * ```ts\n * // src/components/something.ts\n * import { loadPackageJson } from 'package-json-from-dist'\n *\n * const pj = loadPackageJson(import.meta.url, '../../package.json')\n * console.log(`Hello from ${pj.name}@${pj.version}`)\n * ```\n *\n * When running from CommmonJS, use `__filename` instead of `import.meta.url`\n *\n * ```ts\n * // src/index.cts\n * import { loadPackageJson } from 'package-json-from-dist'\n *\n * const pj = loadPackageJson(__filename)\n * console.log(`Hello from ${pj.name}@${pj.version}`)\n * ```\n */\nexport const loadPackageJson = (\n from: string | URL,\n pathFromSrc: string = '../package.json',\n) =>\n JSON.parse(readFileSync(findPackageJson(from, pathFromSrc), 'utf8'))\n"]}
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "package-json-from-dist",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Load the local package.json from either src or dist folder",
5
5
  "main": "./dist/commonjs/index.js",
6
6
  "exports": {
@@ -28,7 +28,7 @@
28
28
  "presnap": "npm run prepare",
29
29
  "test": "tap",
30
30
  "snap": "tap",
31
- "format": "prettier --write . --loglevel warn --ignore-path ../../.prettierignore --cache",
31
+ "format": "prettier --write . --log-level warn",
32
32
  "typedoc": "typedoc"
33
33
  },
34
34
  "author": "Isaac Z. Schlueter <i@izs.me> (https://izs.me)",
@@ -2,4 +2,3 @@ import { DOCUMENT_MODE } from './html.js';
2
2
  import type { DoctypeToken } from './token.js';
3
3
  export declare function isConforming(token: DoctypeToken): boolean;
4
4
  export declare function getDocumentMode(token: DoctypeToken): DOCUMENT_MODE;
5
- //# sourceMappingURL=doctype.d.ts.map
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getDocumentMode = exports.isConforming = void 0;
3
+ exports.isConforming = isConforming;
4
+ exports.getDocumentMode = getDocumentMode;
4
5
  const html_js_1 = require("./html.js");
5
6
  //Const
6
7
  const VALID_DOCTYPE_NAME = 'html';
@@ -89,7 +90,6 @@ function isConforming(token) {
89
90
  token.publicId === null &&
90
91
  (token.systemId === null || token.systemId === VALID_SYSTEM_ID));
91
92
  }
92
- exports.isConforming = isConforming;
93
93
  function getDocumentMode(token) {
94
94
  if (token.name !== VALID_DOCTYPE_NAME) {
95
95
  return html_js_1.DOCUMENT_MODE.QUIRKS;
@@ -116,5 +116,3 @@ function getDocumentMode(token) {
116
116
  }
117
117
  return html_js_1.DOCUMENT_MODE.NO_QUIRKS;
118
118
  }
119
- exports.getDocumentMode = getDocumentMode;
120
- //# sourceMappingURL=doctype.js.map
@@ -65,4 +65,3 @@ export declare enum ERR {
65
65
  nestedNoscriptInHead = "nested-noscript-in-head",
66
66
  eofInElementThatCanContainOnlyText = "eof-in-element-that-can-contain-only-text"
67
67
  }
68
- //# sourceMappingURL=error-codes.d.ts.map
@@ -63,5 +63,4 @@ var ERR;
63
63
  ERR["misplacedStartTagForHeadElement"] = "misplaced-start-tag-for-head-element";
64
64
  ERR["nestedNoscriptInHead"] = "nested-noscript-in-head";
65
65
  ERR["eofInElementThatCanContainOnlyText"] = "eof-in-element-that-can-contain-only-text";
66
- })(ERR = exports.ERR || (exports.ERR = {}));
67
- //# sourceMappingURL=error-codes.js.map
66
+ })(ERR || (exports.ERR = ERR = {}));
@@ -7,4 +7,3 @@ export declare function adjustTokenSVGAttrs(token: TagToken): void;
7
7
  export declare function adjustTokenXMLAttrs(token: TagToken): void;
8
8
  export declare function adjustTokenSVGTagName(token: TagToken): void;
9
9
  export declare function isIntegrationPoint(tn: $, ns: NS, attrs: Attribute[], foreignNS?: NS): boolean;
10
- //# sourceMappingURL=foreign-content.d.ts.map
@@ -1,6 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isIntegrationPoint = exports.adjustTokenSVGTagName = exports.adjustTokenXMLAttrs = exports.adjustTokenSVGAttrs = exports.adjustTokenMathMLAttrs = exports.causesExit = exports.SVG_TAG_NAMES_ADJUSTMENT_MAP = void 0;
3
+ exports.SVG_TAG_NAMES_ADJUSTMENT_MAP = void 0;
4
+ exports.causesExit = causesExit;
5
+ exports.adjustTokenMathMLAttrs = adjustTokenMathMLAttrs;
6
+ exports.adjustTokenSVGAttrs = adjustTokenSVGAttrs;
7
+ exports.adjustTokenXMLAttrs = adjustTokenXMLAttrs;
8
+ exports.adjustTokenSVGTagName = adjustTokenSVGTagName;
9
+ exports.isIntegrationPoint = isIntegrationPoint;
4
10
  const html_js_1 = require("./html.js");
5
11
  //MIME types
6
12
  const MIME_TYPES = {
@@ -78,7 +84,6 @@ const XML_ATTRS_ADJUSTMENT_MAP = new Map([
78
84
  ['xlink:show', { prefix: 'xlink', name: 'show', namespace: html_js_1.NS.XLINK }],
79
85
  ['xlink:title', { prefix: 'xlink', name: 'title', namespace: html_js_1.NS.XLINK }],
80
86
  ['xlink:type', { prefix: 'xlink', name: 'type', namespace: html_js_1.NS.XLINK }],
81
- ['xml:base', { prefix: 'xml', name: 'base', namespace: html_js_1.NS.XML }],
82
87
  ['xml:lang', { prefix: 'xml', name: 'lang', namespace: html_js_1.NS.XML }],
83
88
  ['xml:space', { prefix: 'xml', name: 'space', namespace: html_js_1.NS.XML }],
84
89
  ['xmlns', { prefix: '', name: 'xmlns', namespace: html_js_1.NS.XMLNS }],
@@ -177,7 +182,6 @@ function causesExit(startTagToken) {
177
182
  startTagToken.attrs.some(({ name }) => name === html_js_1.ATTRS.COLOR || name === html_js_1.ATTRS.SIZE || name === html_js_1.ATTRS.FACE);
178
183
  return isFontWithAttrs || EXITS_FOREIGN_CONTENT.has(tn);
179
184
  }
180
- exports.causesExit = causesExit;
181
185
  //Token adjustments
182
186
  function adjustTokenMathMLAttrs(token) {
183
187
  for (let i = 0; i < token.attrs.length; i++) {
@@ -187,7 +191,6 @@ function adjustTokenMathMLAttrs(token) {
187
191
  }
188
192
  }
189
193
  }
190
- exports.adjustTokenMathMLAttrs = adjustTokenMathMLAttrs;
191
194
  function adjustTokenSVGAttrs(token) {
192
195
  for (let i = 0; i < token.attrs.length; i++) {
193
196
  const adjustedAttrName = SVG_ATTRS_ADJUSTMENT_MAP.get(token.attrs[i].name);
@@ -196,7 +199,6 @@ function adjustTokenSVGAttrs(token) {
196
199
  }
197
200
  }
198
201
  }
199
- exports.adjustTokenSVGAttrs = adjustTokenSVGAttrs;
200
202
  function adjustTokenXMLAttrs(token) {
201
203
  for (let i = 0; i < token.attrs.length; i++) {
202
204
  const adjustedAttrEntry = XML_ATTRS_ADJUSTMENT_MAP.get(token.attrs[i].name);
@@ -207,7 +209,6 @@ function adjustTokenXMLAttrs(token) {
207
209
  }
208
210
  }
209
211
  }
210
- exports.adjustTokenXMLAttrs = adjustTokenXMLAttrs;
211
212
  function adjustTokenSVGTagName(token) {
212
213
  const adjustedTagName = exports.SVG_TAG_NAMES_ADJUSTMENT_MAP.get(token.tagName);
213
214
  if (adjustedTagName != null) {
@@ -215,7 +216,6 @@ function adjustTokenSVGTagName(token) {
215
216
  token.tagID = (0, html_js_1.getTagID)(token.tagName);
216
217
  }
217
218
  }
218
- exports.adjustTokenSVGTagName = adjustTokenSVGTagName;
219
219
  //Integration points
220
220
  function isMathMLTextIntegrationPoint(tn, ns) {
221
221
  return ns === html_js_1.NS.MATHML && (tn === html_js_1.TAG_ID.MI || tn === html_js_1.TAG_ID.MO || tn === html_js_1.TAG_ID.MN || tn === html_js_1.TAG_ID.MS || tn === html_js_1.TAG_ID.MTEXT);
@@ -235,5 +235,3 @@ function isIntegrationPoint(tn, ns, attrs, foreignNS) {
235
235
  return (((!foreignNS || foreignNS === html_js_1.NS.HTML) && isHtmlIntegrationPoint(tn, ns, attrs)) ||
236
236
  ((!foreignNS || foreignNS === html_js_1.NS.MATHML) && isMathMLTextIntegrationPoint(tn, ns)));
237
237
  }
238
- exports.isIntegrationPoint = isIntegrationPoint;
239
- //# sourceMappingURL=foreign-content.js.map
@@ -121,6 +121,7 @@ export declare enum TAG_NAMES {
121
121
  RUBY = "ruby",
122
122
  S = "s",
123
123
  SCRIPT = "script",
124
+ SEARCH = "search",
124
125
  SECTION = "section",
125
126
  SELECT = "select",
126
127
  SOURCE = "source",
@@ -251,38 +252,38 @@ export declare enum TAG_ID {
251
252
  RUBY = 91,
252
253
  S = 92,
253
254
  SCRIPT = 93,
254
- SECTION = 94,
255
- SELECT = 95,
256
- SOURCE = 96,
257
- SMALL = 97,
258
- SPAN = 98,
259
- STRIKE = 99,
260
- STRONG = 100,
261
- STYLE = 101,
262
- SUB = 102,
263
- SUMMARY = 103,
264
- SUP = 104,
265
- TABLE = 105,
266
- TBODY = 106,
267
- TEMPLATE = 107,
268
- TEXTAREA = 108,
269
- TFOOT = 109,
270
- TD = 110,
271
- TH = 111,
272
- THEAD = 112,
273
- TITLE = 113,
274
- TR = 114,
275
- TRACK = 115,
276
- TT = 116,
277
- U = 117,
278
- UL = 118,
279
- SVG = 119,
280
- VAR = 120,
281
- WBR = 121,
282
- XMP = 122
255
+ SEARCH = 94,
256
+ SECTION = 95,
257
+ SELECT = 96,
258
+ SOURCE = 97,
259
+ SMALL = 98,
260
+ SPAN = 99,
261
+ STRIKE = 100,
262
+ STRONG = 101,
263
+ STYLE = 102,
264
+ SUB = 103,
265
+ SUMMARY = 104,
266
+ SUP = 105,
267
+ TABLE = 106,
268
+ TBODY = 107,
269
+ TEMPLATE = 108,
270
+ TEXTAREA = 109,
271
+ TFOOT = 110,
272
+ TD = 111,
273
+ TH = 112,
274
+ THEAD = 113,
275
+ TITLE = 114,
276
+ TR = 115,
277
+ TRACK = 116,
278
+ TT = 117,
279
+ U = 118,
280
+ UL = 119,
281
+ SVG = 120,
282
+ VAR = 121,
283
+ WBR = 122,
284
+ XMP = 123
283
285
  }
284
286
  export declare function getTagID(tagName: string): TAG_ID;
285
287
  export declare const SPECIAL_ELEMENTS: Record<NS, Set<TAG_ID>>;
286
- export declare function isNumberedHeader(tn: TAG_ID): boolean;
288
+ export declare const NUMBERED_HEADERS: Set<TAG_ID>;
287
289
  export declare function hasUnescapedText(tn: string, scriptingEnabled: boolean): boolean;
288
- //# sourceMappingURL=html.d.ts.map
@@ -1,6 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.hasUnescapedText = exports.isNumberedHeader = exports.SPECIAL_ELEMENTS = exports.getTagID = exports.TAG_ID = exports.TAG_NAMES = exports.DOCUMENT_MODE = exports.ATTRS = exports.NS = void 0;
3
+ exports.NUMBERED_HEADERS = exports.SPECIAL_ELEMENTS = exports.TAG_ID = exports.TAG_NAMES = exports.DOCUMENT_MODE = exports.ATTRS = exports.NS = void 0;
4
+ exports.getTagID = getTagID;
5
+ exports.hasUnescapedText = hasUnescapedText;
4
6
  /** All valid namespaces in HTML. */
5
7
  var NS;
6
8
  (function (NS) {
@@ -10,7 +12,7 @@ var NS;
10
12
  NS["XLINK"] = "http://www.w3.org/1999/xlink";
11
13
  NS["XML"] = "http://www.w3.org/XML/1998/namespace";
12
14
  NS["XMLNS"] = "http://www.w3.org/2000/xmlns/";
13
- })(NS = exports.NS || (exports.NS = {}));
15
+ })(NS || (exports.NS = NS = {}));
14
16
  var ATTRS;
15
17
  (function (ATTRS) {
16
18
  ATTRS["TYPE"] = "type";
@@ -21,7 +23,7 @@ var ATTRS;
21
23
  ATTRS["COLOR"] = "color";
22
24
  ATTRS["FACE"] = "face";
23
25
  ATTRS["SIZE"] = "size";
24
- })(ATTRS = exports.ATTRS || (exports.ATTRS = {}));
26
+ })(ATTRS || (exports.ATTRS = ATTRS = {}));
25
27
  /**
26
28
  * The mode of the document.
27
29
  *
@@ -32,7 +34,7 @@ var DOCUMENT_MODE;
32
34
  DOCUMENT_MODE["NO_QUIRKS"] = "no-quirks";
33
35
  DOCUMENT_MODE["QUIRKS"] = "quirks";
34
36
  DOCUMENT_MODE["LIMITED_QUIRKS"] = "limited-quirks";
35
- })(DOCUMENT_MODE = exports.DOCUMENT_MODE || (exports.DOCUMENT_MODE = {}));
37
+ })(DOCUMENT_MODE || (exports.DOCUMENT_MODE = DOCUMENT_MODE = {}));
36
38
  var TAG_NAMES;
37
39
  (function (TAG_NAMES) {
38
40
  TAG_NAMES["A"] = "a";
@@ -128,6 +130,7 @@ var TAG_NAMES;
128
130
  TAG_NAMES["RUBY"] = "ruby";
129
131
  TAG_NAMES["S"] = "s";
130
132
  TAG_NAMES["SCRIPT"] = "script";
133
+ TAG_NAMES["SEARCH"] = "search";
131
134
  TAG_NAMES["SECTION"] = "section";
132
135
  TAG_NAMES["SELECT"] = "select";
133
136
  TAG_NAMES["SOURCE"] = "source";
@@ -157,7 +160,7 @@ var TAG_NAMES;
157
160
  TAG_NAMES["VAR"] = "var";
158
161
  TAG_NAMES["WBR"] = "wbr";
159
162
  TAG_NAMES["XMP"] = "xmp";
160
- })(TAG_NAMES = exports.TAG_NAMES || (exports.TAG_NAMES = {}));
163
+ })(TAG_NAMES || (exports.TAG_NAMES = TAG_NAMES = {}));
161
164
  /**
162
165
  * Tag IDs are numeric IDs for known tag names.
163
166
  *
@@ -259,36 +262,37 @@ var TAG_ID;
259
262
  TAG_ID[TAG_ID["RUBY"] = 91] = "RUBY";
260
263
  TAG_ID[TAG_ID["S"] = 92] = "S";
261
264
  TAG_ID[TAG_ID["SCRIPT"] = 93] = "SCRIPT";
262
- TAG_ID[TAG_ID["SECTION"] = 94] = "SECTION";
263
- TAG_ID[TAG_ID["SELECT"] = 95] = "SELECT";
264
- TAG_ID[TAG_ID["SOURCE"] = 96] = "SOURCE";
265
- TAG_ID[TAG_ID["SMALL"] = 97] = "SMALL";
266
- TAG_ID[TAG_ID["SPAN"] = 98] = "SPAN";
267
- TAG_ID[TAG_ID["STRIKE"] = 99] = "STRIKE";
268
- TAG_ID[TAG_ID["STRONG"] = 100] = "STRONG";
269
- TAG_ID[TAG_ID["STYLE"] = 101] = "STYLE";
270
- TAG_ID[TAG_ID["SUB"] = 102] = "SUB";
271
- TAG_ID[TAG_ID["SUMMARY"] = 103] = "SUMMARY";
272
- TAG_ID[TAG_ID["SUP"] = 104] = "SUP";
273
- TAG_ID[TAG_ID["TABLE"] = 105] = "TABLE";
274
- TAG_ID[TAG_ID["TBODY"] = 106] = "TBODY";
275
- TAG_ID[TAG_ID["TEMPLATE"] = 107] = "TEMPLATE";
276
- TAG_ID[TAG_ID["TEXTAREA"] = 108] = "TEXTAREA";
277
- TAG_ID[TAG_ID["TFOOT"] = 109] = "TFOOT";
278
- TAG_ID[TAG_ID["TD"] = 110] = "TD";
279
- TAG_ID[TAG_ID["TH"] = 111] = "TH";
280
- TAG_ID[TAG_ID["THEAD"] = 112] = "THEAD";
281
- TAG_ID[TAG_ID["TITLE"] = 113] = "TITLE";
282
- TAG_ID[TAG_ID["TR"] = 114] = "TR";
283
- TAG_ID[TAG_ID["TRACK"] = 115] = "TRACK";
284
- TAG_ID[TAG_ID["TT"] = 116] = "TT";
285
- TAG_ID[TAG_ID["U"] = 117] = "U";
286
- TAG_ID[TAG_ID["UL"] = 118] = "UL";
287
- TAG_ID[TAG_ID["SVG"] = 119] = "SVG";
288
- TAG_ID[TAG_ID["VAR"] = 120] = "VAR";
289
- TAG_ID[TAG_ID["WBR"] = 121] = "WBR";
290
- TAG_ID[TAG_ID["XMP"] = 122] = "XMP";
291
- })(TAG_ID = exports.TAG_ID || (exports.TAG_ID = {}));
265
+ TAG_ID[TAG_ID["SEARCH"] = 94] = "SEARCH";
266
+ TAG_ID[TAG_ID["SECTION"] = 95] = "SECTION";
267
+ TAG_ID[TAG_ID["SELECT"] = 96] = "SELECT";
268
+ TAG_ID[TAG_ID["SOURCE"] = 97] = "SOURCE";
269
+ TAG_ID[TAG_ID["SMALL"] = 98] = "SMALL";
270
+ TAG_ID[TAG_ID["SPAN"] = 99] = "SPAN";
271
+ TAG_ID[TAG_ID["STRIKE"] = 100] = "STRIKE";
272
+ TAG_ID[TAG_ID["STRONG"] = 101] = "STRONG";
273
+ TAG_ID[TAG_ID["STYLE"] = 102] = "STYLE";
274
+ TAG_ID[TAG_ID["SUB"] = 103] = "SUB";
275
+ TAG_ID[TAG_ID["SUMMARY"] = 104] = "SUMMARY";
276
+ TAG_ID[TAG_ID["SUP"] = 105] = "SUP";
277
+ TAG_ID[TAG_ID["TABLE"] = 106] = "TABLE";
278
+ TAG_ID[TAG_ID["TBODY"] = 107] = "TBODY";
279
+ TAG_ID[TAG_ID["TEMPLATE"] = 108] = "TEMPLATE";
280
+ TAG_ID[TAG_ID["TEXTAREA"] = 109] = "TEXTAREA";
281
+ TAG_ID[TAG_ID["TFOOT"] = 110] = "TFOOT";
282
+ TAG_ID[TAG_ID["TD"] = 111] = "TD";
283
+ TAG_ID[TAG_ID["TH"] = 112] = "TH";
284
+ TAG_ID[TAG_ID["THEAD"] = 113] = "THEAD";
285
+ TAG_ID[TAG_ID["TITLE"] = 114] = "TITLE";
286
+ TAG_ID[TAG_ID["TR"] = 115] = "TR";
287
+ TAG_ID[TAG_ID["TRACK"] = 116] = "TRACK";
288
+ TAG_ID[TAG_ID["TT"] = 117] = "TT";
289
+ TAG_ID[TAG_ID["U"] = 118] = "U";
290
+ TAG_ID[TAG_ID["UL"] = 119] = "UL";
291
+ TAG_ID[TAG_ID["SVG"] = 120] = "SVG";
292
+ TAG_ID[TAG_ID["VAR"] = 121] = "VAR";
293
+ TAG_ID[TAG_ID["WBR"] = 122] = "WBR";
294
+ TAG_ID[TAG_ID["XMP"] = 123] = "XMP";
295
+ })(TAG_ID || (exports.TAG_ID = TAG_ID = {}));
292
296
  const TAG_NAME_TO_ID = new Map([
293
297
  [TAG_NAMES.A, TAG_ID.A],
294
298
  [TAG_NAMES.ADDRESS, TAG_ID.ADDRESS],
@@ -383,6 +387,7 @@ const TAG_NAME_TO_ID = new Map([
383
387
  [TAG_NAMES.RUBY, TAG_ID.RUBY],
384
388
  [TAG_NAMES.S, TAG_ID.S],
385
389
  [TAG_NAMES.SCRIPT, TAG_ID.SCRIPT],
390
+ [TAG_NAMES.SEARCH, TAG_ID.SEARCH],
386
391
  [TAG_NAMES.SECTION, TAG_ID.SECTION],
387
392
  [TAG_NAMES.SELECT, TAG_ID.SELECT],
388
393
  [TAG_NAMES.SOURCE, TAG_ID.SOURCE],
@@ -417,7 +422,6 @@ function getTagID(tagName) {
417
422
  var _a;
418
423
  return (_a = TAG_NAME_TO_ID.get(tagName)) !== null && _a !== void 0 ? _a : TAG_ID.UNKNOWN;
419
424
  }
420
- exports.getTagID = getTagID;
421
425
  const $ = TAG_ID;
422
426
  exports.SPECIAL_ELEMENTS = {
423
427
  [NS.HTML]: new Set([
@@ -509,10 +513,7 @@ exports.SPECIAL_ELEMENTS = {
509
513
  [NS.XML]: new Set(),
510
514
  [NS.XMLNS]: new Set(),
511
515
  };
512
- function isNumberedHeader(tn) {
513
- return tn === $.H1 || tn === $.H2 || tn === $.H3 || tn === $.H4 || tn === $.H5 || tn === $.H6;
514
- }
515
- exports.isNumberedHeader = isNumberedHeader;
516
+ exports.NUMBERED_HEADERS = new Set([$.H1, $.H2, $.H3, $.H4, $.H5, $.H6]);
516
517
  const UNESCAPED_TEXT = new Set([
517
518
  TAG_NAMES.STYLE,
518
519
  TAG_NAMES.SCRIPT,
@@ -525,5 +526,3 @@ const UNESCAPED_TEXT = new Set([
525
526
  function hasUnescapedText(tn, scriptingEnabled) {
526
527
  return UNESCAPED_TEXT.has(tn) || (scriptingEnabled && tn === TAG_NAMES.NOSCRIPT);
527
528
  }
528
- exports.hasUnescapedText = hasUnescapedText;
529
- //# sourceMappingURL=html.js.map
@@ -82,4 +82,3 @@ export interface CharacterToken extends TokenBase {
82
82
  }
83
83
  export type Token = DoctypeToken | TagToken | CommentToken | EOFToken | CharacterToken;
84
84
  export {};
85
- //# sourceMappingURL=token.d.ts.map
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getTokenAttr = exports.TokenType = void 0;
3
+ exports.TokenType = void 0;
4
+ exports.getTokenAttr = getTokenAttr;
4
5
  var TokenType;
5
6
  (function (TokenType) {
6
7
  TokenType[TokenType["CHARACTER"] = 0] = "CHARACTER";
@@ -12,7 +13,7 @@ var TokenType;
12
13
  TokenType[TokenType["DOCTYPE"] = 6] = "DOCTYPE";
13
14
  TokenType[TokenType["EOF"] = 7] = "EOF";
14
15
  TokenType[TokenType["HIBERNATION"] = 8] = "HIBERNATION";
15
- })(TokenType = exports.TokenType || (exports.TokenType = {}));
16
+ })(TokenType || (exports.TokenType = TokenType = {}));
16
17
  function getTokenAttr(token, attrName) {
17
18
  for (let i = token.attrs.length - 1; i >= 0; i--) {
18
19
  if (token.attrs[i].name === attrName) {
@@ -21,5 +22,3 @@ function getTokenAttr(token, attrName) {
21
22
  }
22
23
  return null;
23
24
  }
24
- exports.getTokenAttr = getTokenAttr;
25
- //# sourceMappingURL=token.js.map
@@ -9,7 +9,6 @@ export declare enum CODE_POINTS {
9
9
  SPACE = 32,
10
10
  EXCLAMATION_MARK = 33,
11
11
  QUOTATION_MARK = 34,
12
- NUMBER_SIGN = 35,
13
12
  AMPERSAND = 38,
14
13
  APOSTROPHE = 39,
15
14
  HYPHEN_MINUS = 45,
@@ -22,16 +21,11 @@ export declare enum CODE_POINTS {
22
21
  GREATER_THAN_SIGN = 62,
23
22
  QUESTION_MARK = 63,
24
23
  LATIN_CAPITAL_A = 65,
25
- LATIN_CAPITAL_F = 70,
26
- LATIN_CAPITAL_X = 88,
27
24
  LATIN_CAPITAL_Z = 90,
28
25
  RIGHT_SQUARE_BRACKET = 93,
29
26
  GRAVE_ACCENT = 96,
30
27
  LATIN_SMALL_A = 97,
31
- LATIN_SMALL_F = 102,
32
- LATIN_SMALL_X = 120,
33
- LATIN_SMALL_Z = 122,
34
- REPLACEMENT_CHARACTER = 65533
28
+ LATIN_SMALL_Z = 122
35
29
  }
36
30
  export declare const SEQUENCES: {
37
31
  DASH_DASH: string;
@@ -46,4 +40,3 @@ export declare function isSurrogatePair(cp: number): boolean;
46
40
  export declare function getSurrogatePairCodePoint(cp1: number, cp2: number): number;
47
41
  export declare function isControlCodePoint(cp: number): boolean;
48
42
  export declare function isUndefinedCodePoint(cp: number): boolean;
49
- //# sourceMappingURL=unicode.d.ts.map
@@ -1,6 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isUndefinedCodePoint = exports.isControlCodePoint = exports.getSurrogatePairCodePoint = exports.isSurrogatePair = exports.isSurrogate = exports.SEQUENCES = exports.CODE_POINTS = exports.REPLACEMENT_CHARACTER = void 0;
3
+ exports.SEQUENCES = exports.CODE_POINTS = exports.REPLACEMENT_CHARACTER = void 0;
4
+ exports.isSurrogate = isSurrogate;
5
+ exports.isSurrogatePair = isSurrogatePair;
6
+ exports.getSurrogatePairCodePoint = getSurrogatePairCodePoint;
7
+ exports.isControlCodePoint = isControlCodePoint;
8
+ exports.isUndefinedCodePoint = isUndefinedCodePoint;
4
9
  const UNDEFINED_CODE_POINTS = new Set([
5
10
  65534, 65535, 131070, 131071, 196606, 196607, 262142, 262143, 327678, 327679, 393214,
6
11
  393215, 458750, 458751, 524286, 524287, 589822, 589823, 655358, 655359, 720894,
@@ -19,7 +24,6 @@ var CODE_POINTS;
19
24
  CODE_POINTS[CODE_POINTS["SPACE"] = 32] = "SPACE";
20
25
  CODE_POINTS[CODE_POINTS["EXCLAMATION_MARK"] = 33] = "EXCLAMATION_MARK";
21
26
  CODE_POINTS[CODE_POINTS["QUOTATION_MARK"] = 34] = "QUOTATION_MARK";
22
- CODE_POINTS[CODE_POINTS["NUMBER_SIGN"] = 35] = "NUMBER_SIGN";
23
27
  CODE_POINTS[CODE_POINTS["AMPERSAND"] = 38] = "AMPERSAND";
24
28
  CODE_POINTS[CODE_POINTS["APOSTROPHE"] = 39] = "APOSTROPHE";
25
29
  CODE_POINTS[CODE_POINTS["HYPHEN_MINUS"] = 45] = "HYPHEN_MINUS";
@@ -32,17 +36,12 @@ var CODE_POINTS;
32
36
  CODE_POINTS[CODE_POINTS["GREATER_THAN_SIGN"] = 62] = "GREATER_THAN_SIGN";
33
37
  CODE_POINTS[CODE_POINTS["QUESTION_MARK"] = 63] = "QUESTION_MARK";
34
38
  CODE_POINTS[CODE_POINTS["LATIN_CAPITAL_A"] = 65] = "LATIN_CAPITAL_A";
35
- CODE_POINTS[CODE_POINTS["LATIN_CAPITAL_F"] = 70] = "LATIN_CAPITAL_F";
36
- CODE_POINTS[CODE_POINTS["LATIN_CAPITAL_X"] = 88] = "LATIN_CAPITAL_X";
37
39
  CODE_POINTS[CODE_POINTS["LATIN_CAPITAL_Z"] = 90] = "LATIN_CAPITAL_Z";
38
40
  CODE_POINTS[CODE_POINTS["RIGHT_SQUARE_BRACKET"] = 93] = "RIGHT_SQUARE_BRACKET";
39
41
  CODE_POINTS[CODE_POINTS["GRAVE_ACCENT"] = 96] = "GRAVE_ACCENT";
40
42
  CODE_POINTS[CODE_POINTS["LATIN_SMALL_A"] = 97] = "LATIN_SMALL_A";
41
- CODE_POINTS[CODE_POINTS["LATIN_SMALL_F"] = 102] = "LATIN_SMALL_F";
42
- CODE_POINTS[CODE_POINTS["LATIN_SMALL_X"] = 120] = "LATIN_SMALL_X";
43
43
  CODE_POINTS[CODE_POINTS["LATIN_SMALL_Z"] = 122] = "LATIN_SMALL_Z";
44
- CODE_POINTS[CODE_POINTS["REPLACEMENT_CHARACTER"] = 65533] = "REPLACEMENT_CHARACTER";
45
- })(CODE_POINTS = exports.CODE_POINTS || (exports.CODE_POINTS = {}));
44
+ })(CODE_POINTS || (exports.CODE_POINTS = CODE_POINTS = {}));
46
45
  exports.SEQUENCES = {
47
46
  DASH_DASH: '--',
48
47
  CDATA_START: '[CDATA[',
@@ -55,23 +54,17 @@ exports.SEQUENCES = {
55
54
  function isSurrogate(cp) {
56
55
  return cp >= 55296 && cp <= 57343;
57
56
  }
58
- exports.isSurrogate = isSurrogate;
59
57
  function isSurrogatePair(cp) {
60
58
  return cp >= 56320 && cp <= 57343;
61
59
  }
62
- exports.isSurrogatePair = isSurrogatePair;
63
60
  function getSurrogatePairCodePoint(cp1, cp2) {
64
61
  return (cp1 - 55296) * 1024 + 9216 + cp2;
65
62
  }
66
- exports.getSurrogatePairCodePoint = getSurrogatePairCodePoint;
67
63
  //NOTE: excluding NULL and ASCII whitespace
68
64
  function isControlCodePoint(cp) {
69
65
  return ((cp !== 0x20 && cp !== 0x0a && cp !== 0x0d && cp !== 0x09 && cp !== 0x0c && cp >= 0x01 && cp <= 0x1f) ||
70
66
  (cp >= 0x7f && cp <= 0x9f));
71
67
  }
72
- exports.isControlCodePoint = isControlCodePoint;
73
68
  function isUndefinedCodePoint(cp) {
74
69
  return (cp >= 64976 && cp <= 65007) || UNDEFINED_CODE_POINTS.has(cp);
75
70
  }
76
- exports.isUndefinedCodePoint = isUndefinedCodePoint;
77
- //# sourceMappingURL=unicode.js.map
@@ -2,15 +2,27 @@ import { type ParserOptions } from './parser/index.js';
2
2
  import type { DefaultTreeAdapterMap } from './tree-adapters/default.js';
3
3
  import type { TreeAdapterTypeMap } from './tree-adapters/interface.js';
4
4
  export { type DefaultTreeAdapterMap, defaultTreeAdapter } from './tree-adapters/default.js';
5
+ import type * as DefaultTreeAdapter from './tree-adapters/default.js';
6
+ export declare namespace DefaultTreeAdapterTypes {
7
+ type Document = DefaultTreeAdapter.Document;
8
+ type DocumentFragment = DefaultTreeAdapter.DocumentFragment;
9
+ type Element = DefaultTreeAdapter.Element;
10
+ type CommentNode = DefaultTreeAdapter.CommentNode;
11
+ type TextNode = DefaultTreeAdapter.TextNode;
12
+ type Template = DefaultTreeAdapter.Template;
13
+ type DocumentType = DefaultTreeAdapter.DocumentType;
14
+ type ParentNode = DefaultTreeAdapter.ParentNode;
15
+ type ChildNode = DefaultTreeAdapter.ChildNode;
16
+ type Node = DefaultTreeAdapter.Node;
17
+ type DefaultTreeAdapterMap = DefaultTreeAdapter.DefaultTreeAdapterMap;
18
+ }
5
19
  export type { TreeAdapter, TreeAdapterTypeMap } from './tree-adapters/interface.js';
6
20
  export { type ParserOptions, /** @internal */ Parser } from './parser/index.js';
7
21
  export { serialize, serializeOuter, type SerializerOptions } from './serializer/index.js';
8
- export { ERR as ErrorCodes, type ParserError } from './common/error-codes.js';
22
+ export { ERR as ErrorCodes, type ParserError, type ParserErrorHandler } from './common/error-codes.js';
9
23
  /** @internal */
10
24
  export * as foreignContent from './common/foreign-content.js';
11
- /** @internal */
12
25
  export * as html from './common/html.js';
13
- /** @internal */
14
26
  export * as Token from './common/token.js';
15
27
  /** @internal */
16
28
  export { Tokenizer, type TokenizerOptions, TokenizerMode, type TokenHandler } from './tokenizer/index.js';
@@ -57,4 +69,3 @@ export declare function parse<T extends TreeAdapterTypeMap = DefaultTreeAdapterM
57
69
  */
58
70
  export declare function parseFragment<T extends TreeAdapterTypeMap = DefaultTreeAdapterMap>(fragmentContext: T['parentNode'] | null, html: string, options: ParserOptions<T>): T['documentFragment'];
59
71
  export declare function parseFragment<T extends TreeAdapterTypeMap = DefaultTreeAdapterMap>(html: string, options?: ParserOptions<T>): T['documentFragment'];
60
- //# sourceMappingURL=index.d.ts.map