nuxt-ai-ready 2.5.3 → 3.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (287) hide show
  1. package/README.md +13 -12
  2. package/dist/chunks/agent-skills.mjs +35 -12
  3. package/dist/chunks/prerender.mjs +35 -24
  4. package/dist/cli.mjs +5 -2
  5. package/dist/module.d.mts +4 -0
  6. package/dist/module.json +2 -2
  7. package/dist/module.mjs +8 -4
  8. package/dist/runtime/app/index.d.ts +3 -0
  9. package/dist/runtime/app/index.js +2 -0
  10. package/dist/runtime/cache-control.d.ts +2 -0
  11. package/dist/runtime/cache-control.js +11 -0
  12. package/dist/runtime/llms-txt-utils.js +1 -1
  13. package/dist/runtime/server/db/context.d.ts +13 -0
  14. package/dist/runtime/server/db/drizzle/client.d.ts +6 -7
  15. package/dist/runtime/server/db/drizzle/client.js +13 -2
  16. package/dist/runtime/server/db/drizzle/providers/bun.d.ts +2 -2
  17. package/dist/runtime/server/db/drizzle/providers/bun.js +2 -2
  18. package/dist/runtime/server/db/drizzle/providers/d1.d.ts +2 -2
  19. package/dist/runtime/server/db/drizzle/providers/d1.js +3 -2
  20. package/dist/runtime/server/db/drizzle/providers/libsql.d.ts +2 -2
  21. package/dist/runtime/server/db/drizzle/providers/libsql.js +2 -2
  22. package/dist/runtime/server/db/drizzle/providers/neon.d.ts +2 -2
  23. package/dist/runtime/server/db/drizzle/providers/neon.js +2 -2
  24. package/dist/runtime/server/db/drizzle/providers/node-sqlite.d.ts +2 -2
  25. package/dist/runtime/server/db/drizzle/providers/node-sqlite.js +2 -2
  26. package/dist/runtime/server/db/drizzle/providers/postgres.d.ts +2 -2
  27. package/dist/runtime/server/db/drizzle/providers/postgres.js +2 -2
  28. package/dist/runtime/server/db/drizzle/queries.d.ts +27 -27
  29. package/dist/runtime/server/db/drizzle/queries.js +6 -5
  30. package/dist/runtime/server/db/drizzle/raw.d.ts +2 -6
  31. package/dist/runtime/server/db/index.d.ts +1 -1
  32. package/dist/runtime/server/db/index.js +1 -1
  33. package/dist/runtime/server/db/queries.d.ts +36 -36
  34. package/dist/runtime/server/db/queries.js +8 -9
  35. package/dist/runtime/server/db/seed.d.ts +2 -2
  36. package/dist/runtime/server/db/seed.js +4 -3
  37. package/dist/runtime/server/db/shared.d.ts +8 -0
  38. package/dist/runtime/server/db/shared.js +8 -2
  39. package/dist/runtime/server/index.d.ts +2 -0
  40. package/dist/runtime/server/index.js +17 -0
  41. package/dist/runtime/server/mcp/cache-key.js +4 -0
  42. package/dist/runtime/server/mcp/tools/get-page-markdown.js +3 -2
  43. package/dist/runtime/server/mcp/tools/list-pages.js +3 -2
  44. package/dist/runtime/server/mcp/tools/search-pages.js +3 -2
  45. package/dist/runtime/server/middleware/markdown.prerender.js +1 -1
  46. package/dist/runtime/server/plugins/db-lifecycle-nitro3.d.ts +2 -0
  47. package/dist/runtime/server/plugins/db-lifecycle-nitro3.js +16 -0
  48. package/dist/runtime/server/plugins/html-capture.prerender.js +6 -4
  49. package/dist/runtime/server/plugins/link-header-nitro3.d.ts +2 -0
  50. package/dist/runtime/server/plugins/link-header-nitro3.js +20 -0
  51. package/dist/runtime/server/plugins/link-header.d.ts +6 -0
  52. package/dist/runtime/server/plugins/link-header.js +7 -11
  53. package/dist/runtime/server/plugins/markdown-negotiation.js +8 -1
  54. package/dist/runtime/server/plugins/sitemap-seeder.js +3 -3
  55. package/dist/runtime/server/routes/agent-skills-artifact.d.ts +1 -1
  56. package/dist/runtime/server/routes/agent-skills-artifact.js +10 -10
  57. package/dist/runtime/server/routes/agent-skills-index.d.ts +1 -1
  58. package/dist/runtime/server/routes/agent-skills-index.js +7 -6
  59. package/dist/runtime/server/routes/ai-catalog.d.ts +2 -1
  60. package/dist/runtime/server/routes/ai-catalog.js +7 -8
  61. package/dist/runtime/server/routes/api-catalog.d.ts +3 -1
  62. package/dist/runtime/server/routes/api-catalog.js +12 -12
  63. package/dist/runtime/server/routes/llms-full.txt.get.js +1 -1
  64. package/dist/runtime/server/routes/mcp-server-card.d.ts +1 -1
  65. package/dist/runtime/server/routes/mcp-server-card.js +7 -8
  66. package/dist/runtime/server/utils/checkStale.d.ts +2 -2
  67. package/dist/runtime/server/utils/cloudflare-prerendered.d.ts +3 -0
  68. package/dist/runtime/server/utils/cloudflare-prerendered.js +23 -0
  69. package/dist/runtime/server/utils/cloudflare.d.ts +5 -5
  70. package/dist/runtime/server/utils/cloudflare.js +31 -7
  71. package/dist/runtime/server/utils/content-negotiation.d.ts +5 -3
  72. package/dist/runtime/server/utils/content-negotiation.js +8 -7
  73. package/dist/runtime/server/utils/context.d.ts +3 -3
  74. package/dist/runtime/server/utils/context.js +1 -1
  75. package/dist/runtime/server/utils/discovery-response.d.ts +2 -0
  76. package/dist/runtime/server/utils/link-header.d.ts +5 -3
  77. package/dist/runtime/server/utils/link-header.js +26 -2
  78. package/dist/runtime/server/utils/markdown-request.d.ts +4 -3
  79. package/dist/runtime/server/utils/markdown-request.js +15 -13
  80. package/dist/runtime/server/utils/negotiation-decision.d.ts +4 -0
  81. package/dist/runtime/server/utils/negotiation-decision.js +6 -5
  82. package/dist/runtime/server/utils/negotiation-response.js +47 -22
  83. package/dist/runtime/server/utils/prerender-html.d.ts +2 -1
  84. package/dist/runtime/server/utils/prerender-html.js +3 -1
  85. package/dist/runtime/types.d.ts +15 -7
  86. package/dist/shared/nuxt-ai-ready.B3hAuOLQ.mjs +29 -0
  87. package/dist/shared/{nuxt-ai-ready.CLSWou20.mjs → nuxt-ai-ready.C34F0LJo.mjs} +560 -219
  88. package/package.json +86 -20
  89. package/skills/nuxt-ai-ready/SKILL.md +26 -12
  90. package/skills/nuxt-ai-ready/references/runtime-indexing.md +7 -6
  91. package/dist/runtime/server/db/drizzle/providers/sqlite.d.ts +0 -8
  92. package/dist/runtime/server/db/drizzle/providers/sqlite.js +0 -15
  93. package/node_modules/@mdream/js/LICENSE.md +0 -9
  94. package/node_modules/@mdream/js/README.md +0 -792
  95. package/node_modules/@mdream/js/bin/mdream.mjs +0 -2
  96. package/node_modules/@mdream/js/dist/_chunks/const.mjs +0 -134
  97. package/node_modules/@mdream/js/dist/_chunks/index.d.mts +0 -9
  98. package/node_modules/@mdream/js/dist/_chunks/markdown-processor.mjs +0 -1968
  99. package/node_modules/@mdream/js/dist/_chunks/minimal.d.mts +0 -6
  100. package/node_modules/@mdream/js/dist/_chunks/parse.mjs +0 -2756
  101. package/node_modules/@mdream/js/dist/_chunks/plugins.mjs +0 -725
  102. package/node_modules/@mdream/js/dist/_chunks/resolve-plugins.mjs +0 -44
  103. package/node_modules/@mdream/js/dist/_chunks/stream.mjs +0 -37
  104. package/node_modules/@mdream/js/dist/_chunks/types.d.mts +0 -473
  105. package/node_modules/@mdream/js/dist/cli.d.mts +0 -1
  106. package/node_modules/@mdream/js/dist/cli.mjs +0 -32
  107. package/node_modules/@mdream/js/dist/core.d.mts +0 -15
  108. package/node_modules/@mdream/js/dist/core.mjs +0 -28
  109. package/node_modules/@mdream/js/dist/index.d.mts +0 -4
  110. package/node_modules/@mdream/js/dist/index.mjs +0 -58
  111. package/node_modules/@mdream/js/dist/llms-txt.d.mts +0 -86
  112. package/node_modules/@mdream/js/dist/llms-txt.mjs +0 -308
  113. package/node_modules/@mdream/js/dist/negotiate.d.mts +0 -35
  114. package/node_modules/@mdream/js/dist/negotiate.mjs +0 -121
  115. package/node_modules/@mdream/js/dist/parse.d.mts +0 -90
  116. package/node_modules/@mdream/js/dist/parse.mjs +0 -2
  117. package/node_modules/@mdream/js/dist/plugins.d.mts +0 -85
  118. package/node_modules/@mdream/js/dist/plugins.mjs +0 -2
  119. package/node_modules/@mdream/js/dist/preset/minimal.d.mts +0 -2
  120. package/node_modules/@mdream/js/dist/preset/minimal.mjs +0 -33
  121. package/node_modules/@mdream/js/dist/splitter.d.mts +0 -18
  122. package/node_modules/@mdream/js/dist/splitter.mjs +0 -194
  123. package/node_modules/@mdream/js/package.json +0 -103
  124. package/node_modules/cac/LICENSE +0 -21
  125. package/node_modules/cac/README.md +0 -492
  126. package/node_modules/cac/dist/index.d.ts +0 -196
  127. package/node_modules/cac/dist/index.js +0 -638
  128. package/node_modules/cac/package.json +0 -72
  129. package/node_modules/mdream/LICENSE.md +0 -9
  130. package/node_modules/mdream/README.md +0 -1091
  131. package/node_modules/mdream/bin/mdream.mjs +0 -46
  132. package/node_modules/mdream/dist/browser.d.mts +0 -105
  133. package/node_modules/mdream/dist/browser.mjs +0 -262
  134. package/node_modules/mdream/dist/edge.d.mts +0 -100
  135. package/node_modules/mdream/dist/edge.mjs +0 -250
  136. package/node_modules/mdream/dist/iife.js +0 -605
  137. package/node_modules/mdream/dist/index.d.mts +0 -89
  138. package/node_modules/mdream/dist/index.mjs +0 -184
  139. package/node_modules/mdream/dist/wasm.d.mts +0 -100
  140. package/node_modules/mdream/dist/wasm.mjs +0 -140
  141. package/node_modules/mdream/dist/worker.d.mts +0 -101
  142. package/node_modules/mdream/dist/worker.mjs +0 -217
  143. package/node_modules/mdream/napi/index.d.mts +0 -127
  144. package/node_modules/mdream/napi/index.d.ts +0 -127
  145. package/node_modules/mdream/napi/index.mjs +0 -725
  146. package/node_modules/mdream/napi/rust.android-arm-eabi.node +0 -0
  147. package/node_modules/mdream/napi/rust.android-arm64.node +0 -0
  148. package/node_modules/mdream/napi/rust.darwin-arm64.node +0 -0
  149. package/node_modules/mdream/napi/rust.darwin-x64.node +0 -0
  150. package/node_modules/mdream/napi/rust.freebsd-x64.node +0 -0
  151. package/node_modules/mdream/napi/rust.linux-arm-gnueabihf.node +0 -0
  152. package/node_modules/mdream/napi/rust.linux-arm64-gnu.node +0 -0
  153. package/node_modules/mdream/napi/rust.linux-arm64-musl.node +0 -0
  154. package/node_modules/mdream/napi/rust.linux-x64-gnu.node +0 -0
  155. package/node_modules/mdream/napi/rust.linux-x64-musl.node +0 -0
  156. package/node_modules/mdream/napi/rust.wasi.cjs +0 -2144
  157. package/node_modules/mdream/napi/rust.wasm32-wasi.wasm +0 -0
  158. package/node_modules/mdream/napi/rust.win32-arm64-msvc.node +0 -0
  159. package/node_modules/mdream/napi/rust.win32-x64-msvc.node +0 -0
  160. package/node_modules/mdream/node_modules/@emnapi/core/LICENSE +0 -21
  161. package/node_modules/mdream/node_modules/@emnapi/core/README.md +0 -1
  162. package/node_modules/mdream/node_modules/@emnapi/core/dist/emnapi-core.d.ts +0 -392
  163. package/node_modules/mdream/node_modules/@emnapi/core/dist/emnapi-core.full.d.ts +0 -392
  164. package/node_modules/mdream/node_modules/@emnapi/core/dist/emnapi-core.full.js +0 -8351
  165. package/node_modules/mdream/node_modules/@emnapi/core/dist/emnapi-core.js +0 -7268
  166. package/node_modules/mdream/node_modules/@emnapi/core/dist/plugins/async-work.d.ts +0 -5
  167. package/node_modules/mdream/node_modules/@emnapi/core/dist/plugins/async-work.js +0 -843
  168. package/node_modules/mdream/node_modules/@emnapi/core/dist/plugins/index.d.ts +0 -4
  169. package/node_modules/mdream/node_modules/@emnapi/core/dist/plugins/index.js +0 -3
  170. package/node_modules/mdream/node_modules/@emnapi/core/dist/plugins/threadsafe-function.d.ts +0 -5
  171. package/node_modules/mdream/node_modules/@emnapi/core/dist/plugins/threadsafe-function.js +0 -1010
  172. package/node_modules/mdream/node_modules/@emnapi/core/dist/plugins/v8.d.ts +0 -5
  173. package/node_modules/mdream/node_modules/@emnapi/core/dist/plugins/v8.js +0 -1446
  174. package/node_modules/mdream/node_modules/@emnapi/core/node_modules/@emnapi/wasi-threads/LICENSE +0 -21
  175. package/node_modules/mdream/node_modules/@emnapi/core/node_modules/@emnapi/wasi-threads/README.md +0 -203
  176. package/node_modules/mdream/node_modules/@emnapi/core/node_modules/@emnapi/wasi-threads/dist/wasi-threads.d.ts +0 -236
  177. package/node_modules/mdream/node_modules/@emnapi/core/node_modules/@emnapi/wasi-threads/dist/wasi-threads.js +0 -1086
  178. package/node_modules/mdream/node_modules/@emnapi/core/node_modules/@emnapi/wasi-threads/package.json +0 -35
  179. package/node_modules/mdream/node_modules/@emnapi/core/node_modules/@emnapi/wasi-threads/rollup.config.js +0 -6
  180. package/node_modules/mdream/node_modules/@emnapi/core/package.json +0 -39
  181. package/node_modules/mdream/node_modules/@emnapi/core/rollup.config.js +0 -60
  182. package/node_modules/mdream/node_modules/@emnapi/runtime/LICENSE +0 -21
  183. package/node_modules/mdream/node_modules/@emnapi/runtime/README.md +0 -1
  184. package/node_modules/mdream/node_modules/@emnapi/runtime/dist/emnapi.d.ts +0 -833
  185. package/node_modules/mdream/node_modules/@emnapi/runtime/dist/emnapi.js +0 -2306
  186. package/node_modules/mdream/node_modules/@emnapi/runtime/dist/emnapi.js.map +0 -1
  187. package/node_modules/mdream/node_modules/@emnapi/runtime/index.cjs +0 -63
  188. package/node_modules/mdream/node_modules/@emnapi/runtime/package.json +0 -39
  189. package/node_modules/mdream/node_modules/@emnapi/runtime/rollup.config.js +0 -25
  190. package/node_modules/mdream/node_modules/@emnapi/wasi-threads/LICENSE +0 -21
  191. package/node_modules/mdream/node_modules/@emnapi/wasi-threads/README.md +0 -203
  192. package/node_modules/mdream/node_modules/@emnapi/wasi-threads/dist/wasi-threads.d.ts +0 -240
  193. package/node_modules/mdream/node_modules/@emnapi/wasi-threads/dist/wasi-threads.js +0 -1118
  194. package/node_modules/mdream/node_modules/@emnapi/wasi-threads/package.json +0 -35
  195. package/node_modules/mdream/node_modules/@emnapi/wasi-threads/rollup.config.js +0 -6
  196. package/node_modules/mdream/node_modules/@napi-rs/wasm-runtime/dist/emnapi-plugins.cjs +0 -1472
  197. package/node_modules/mdream/node_modules/@napi-rs/wasm-runtime/dist/emnapi-plugins.js +0 -1470
  198. package/node_modules/mdream/node_modules/@napi-rs/wasm-runtime/dist/fs-proxy.cjs +0 -237
  199. package/node_modules/mdream/node_modules/@napi-rs/wasm-runtime/dist/fs.js +0 -17578
  200. package/node_modules/mdream/node_modules/@napi-rs/wasm-runtime/fs-proxy.js +0 -317
  201. package/node_modules/mdream/node_modules/@napi-rs/wasm-runtime/package.json +0 -67
  202. package/node_modules/mdream/node_modules/@napi-rs/wasm-runtime/runtime.cjs +0 -39
  203. package/node_modules/mdream/node_modules/@napi-rs/wasm-runtime/runtime.js +0 -36
  204. package/node_modules/mdream/node_modules/@tybys/wasm-util/LICENSE +0 -21
  205. package/node_modules/mdream/node_modules/@tybys/wasm-util/README.md +0 -193
  206. package/node_modules/mdream/node_modules/@tybys/wasm-util/dist/tsdoc-metadata.json +0 -11
  207. package/node_modules/mdream/node_modules/@tybys/wasm-util/dist/wasm-util.d.ts +0 -423
  208. package/node_modules/mdream/node_modules/@tybys/wasm-util/dist/wasm-util.esm-bundler.js +0 -2932
  209. package/node_modules/mdream/node_modules/@tybys/wasm-util/dist/wasm-util.esm.js +0 -2932
  210. package/node_modules/mdream/node_modules/@tybys/wasm-util/dist/wasm-util.esm.min.js +0 -1
  211. package/node_modules/mdream/node_modules/@tybys/wasm-util/dist/wasm-util.js +0 -2954
  212. package/node_modules/mdream/node_modules/@tybys/wasm-util/dist/wasm-util.min.js +0 -1
  213. package/node_modules/mdream/node_modules/@tybys/wasm-util/lib/cjs/asyncify.js +0 -158
  214. package/node_modules/mdream/node_modules/@tybys/wasm-util/lib/cjs/index.js +0 -13
  215. package/node_modules/mdream/node_modules/@tybys/wasm-util/lib/cjs/jspi.js +0 -46
  216. package/node_modules/mdream/node_modules/@tybys/wasm-util/lib/cjs/load.js +0 -97
  217. package/node_modules/mdream/node_modules/@tybys/wasm-util/lib/cjs/memory.js +0 -35
  218. package/node_modules/mdream/node_modules/@tybys/wasm-util/lib/cjs/wasi/error.js +0 -103
  219. package/node_modules/mdream/node_modules/@tybys/wasm-util/lib/cjs/wasi/fd.js +0 -268
  220. package/node_modules/mdream/node_modules/@tybys/wasm-util/lib/cjs/wasi/fs.js +0 -3
  221. package/node_modules/mdream/node_modules/@tybys/wasm-util/lib/cjs/wasi/index.js +0 -192
  222. package/node_modules/mdream/node_modules/@tybys/wasm-util/lib/cjs/wasi/path.js +0 -316
  223. package/node_modules/mdream/node_modules/@tybys/wasm-util/lib/cjs/wasi/preview1.js +0 -1599
  224. package/node_modules/mdream/node_modules/@tybys/wasm-util/lib/cjs/wasi/rights.js +0 -141
  225. package/node_modules/mdream/node_modules/@tybys/wasm-util/lib/cjs/wasi/types.js +0 -220
  226. package/node_modules/mdream/node_modules/@tybys/wasm-util/lib/cjs/wasi/util.js +0 -128
  227. package/node_modules/mdream/node_modules/@tybys/wasm-util/lib/cjs/webassembly.js +0 -13
  228. package/node_modules/mdream/node_modules/@tybys/wasm-util/lib/mjs/asyncify.mjs +0 -153
  229. package/node_modules/mdream/node_modules/@tybys/wasm-util/lib/mjs/index.mjs +0 -9
  230. package/node_modules/mdream/node_modules/@tybys/wasm-util/lib/mjs/jspi.mjs +0 -39
  231. package/node_modules/mdream/node_modules/@tybys/wasm-util/lib/mjs/load.mjs +0 -89
  232. package/node_modules/mdream/node_modules/@tybys/wasm-util/lib/mjs/memory.mjs +0 -28
  233. package/node_modules/mdream/node_modules/@tybys/wasm-util/lib/mjs/wasi/error.mjs +0 -97
  234. package/node_modules/mdream/node_modules/@tybys/wasm-util/lib/mjs/wasi/fd.mjs +0 -256
  235. package/node_modules/mdream/node_modules/@tybys/wasm-util/lib/mjs/wasi/fs.mjs +0 -1
  236. package/node_modules/mdream/node_modules/@tybys/wasm-util/lib/mjs/wasi/index.mjs +0 -186
  237. package/node_modules/mdream/node_modules/@tybys/wasm-util/lib/mjs/wasi/path.mjs +0 -310
  238. package/node_modules/mdream/node_modules/@tybys/wasm-util/lib/mjs/wasi/preview1.mjs +0 -1593
  239. package/node_modules/mdream/node_modules/@tybys/wasm-util/lib/mjs/wasi/rights.mjs +0 -135
  240. package/node_modules/mdream/node_modules/@tybys/wasm-util/lib/mjs/wasi/types.mjs +0 -216
  241. package/node_modules/mdream/node_modules/@tybys/wasm-util/lib/mjs/wasi/util.mjs +0 -113
  242. package/node_modules/mdream/node_modules/@tybys/wasm-util/lib/mjs/webassembly.mjs +0 -9
  243. package/node_modules/mdream/node_modules/@tybys/wasm-util/package.json +0 -58
  244. package/node_modules/mdream/node_modules/tslib/CopyrightNotice.txt +0 -15
  245. package/node_modules/mdream/node_modules/tslib/LICENSE.txt +0 -12
  246. package/node_modules/mdream/node_modules/tslib/README.md +0 -164
  247. package/node_modules/mdream/node_modules/tslib/SECURITY.md +0 -41
  248. package/node_modules/mdream/node_modules/tslib/modules/index.d.ts +0 -38
  249. package/node_modules/mdream/node_modules/tslib/modules/index.js +0 -70
  250. package/node_modules/mdream/node_modules/tslib/modules/package.json +0 -3
  251. package/node_modules/mdream/node_modules/tslib/package.json +0 -47
  252. package/node_modules/mdream/node_modules/tslib/tslib.d.ts +0 -460
  253. package/node_modules/mdream/node_modules/tslib/tslib.es6.html +0 -1
  254. package/node_modules/mdream/node_modules/tslib/tslib.es6.js +0 -402
  255. package/node_modules/mdream/node_modules/tslib/tslib.es6.mjs +0 -401
  256. package/node_modules/mdream/node_modules/tslib/tslib.html +0 -1
  257. package/node_modules/mdream/node_modules/tslib/tslib.js +0 -484
  258. package/node_modules/mdream/package.json +0 -110
  259. package/node_modules/mdream/skills/mdream/SKILL.md +0 -124
  260. package/node_modules/mdream/skills/mdream/references/runtimes.md +0 -49
  261. package/node_modules/mdream/wasm/mdream_edge.d.ts +0 -90
  262. package/node_modules/mdream/wasm/mdream_edge.js +0 -517
  263. package/node_modules/mdream/wasm/mdream_edge_bg.wasm +0 -0
  264. package/node_modules/mdream/wasm/mdream_edge_bg.wasm.d.ts +0 -20
  265. package/node_modules/mdream/wasm/package.json +0 -17
  266. package/node_modules/mdream/wasm-bundler/mdream_edge.d.ts +0 -45
  267. package/node_modules/mdream/wasm-bundler/mdream_edge.js +0 -13
  268. package/node_modules/mdream/wasm-bundler/mdream_edge_bg.js +0 -413
  269. package/node_modules/mdream/wasm-bundler/mdream_edge_bg.wasm +0 -0
  270. package/node_modules/mdream/wasm-bundler/mdream_edge_bg.wasm.d.ts +0 -20
  271. package/node_modules/mdream/wasm-bundler/package.json +0 -19
  272. package/node_modules/pathe/LICENSE +0 -70
  273. package/node_modules/pathe/README.md +0 -73
  274. package/node_modules/pathe/dist/index.cjs +0 -39
  275. package/node_modules/pathe/dist/index.d.cts +0 -47
  276. package/node_modules/pathe/dist/index.d.mts +0 -47
  277. package/node_modules/pathe/dist/index.d.ts +0 -47
  278. package/node_modules/pathe/dist/index.mjs +0 -19
  279. package/node_modules/pathe/dist/shared/pathe.BSlhyZSM.cjs +0 -266
  280. package/node_modules/pathe/dist/shared/pathe.M-eThtNZ.mjs +0 -249
  281. package/node_modules/pathe/dist/utils.cjs +0 -82
  282. package/node_modules/pathe/dist/utils.d.cts +0 -32
  283. package/node_modules/pathe/dist/utils.d.mts +0 -32
  284. package/node_modules/pathe/dist/utils.d.ts +0 -32
  285. package/node_modules/pathe/dist/utils.mjs +0 -77
  286. package/node_modules/pathe/package.json +0 -61
  287. package/node_modules/pathe/utils.d.ts +0 -1
@@ -1,47 +0,0 @@
1
- import * as path from 'node:path';
2
- import path__default from 'node:path';
3
-
4
- /**
5
- * Constant for path separator.
6
- *
7
- * Always equals to `"/"`.
8
- */
9
- declare const sep = "/";
10
- declare const normalize: typeof path__default.normalize;
11
- declare const join: typeof path__default.join;
12
- declare const resolve: typeof path__default.resolve;
13
- /**
14
- * Resolves a string path, resolving '.' and '.' segments and allowing paths above the root.
15
- *
16
- * @param path - The path to normalise.
17
- * @param allowAboveRoot - Whether to allow the resulting path to be above the root directory.
18
- * @returns the normalised path string.
19
- */
20
- declare function normalizeString(path: string, allowAboveRoot: boolean): string;
21
- declare const isAbsolute: typeof path__default.isAbsolute;
22
- declare const toNamespacedPath: typeof path__default.toNamespacedPath;
23
- declare const extname: typeof path__default.extname;
24
- declare const relative: typeof path__default.relative;
25
- declare const dirname: typeof path__default.dirname;
26
- declare const format: typeof path__default.format;
27
- declare const basename: typeof path__default.basename;
28
- declare const parse: typeof path__default.parse;
29
- /**
30
- * The `path.matchesGlob()` method determines if `path` matches the `pattern`.
31
- * @param path The path to glob-match against.
32
- * @param pattern The glob to check the path against.
33
- */
34
- declare const matchesGlob: (path: string, pattern: string | string[]) => boolean;
35
-
36
- type NodePath = typeof path;
37
- /**
38
- * The platform-specific file delimiter.
39
- *
40
- * Equals to `";"` in windows and `":"` in all other platforms.
41
- */
42
- declare const delimiter: ";" | ":";
43
- declare const posix: NodePath["posix"];
44
- declare const win32: NodePath["win32"];
45
- declare const _default: NodePath;
46
-
47
- export { basename, _default as default, delimiter, dirname, extname, format, isAbsolute, join, matchesGlob, normalize, normalizeString, parse, posix, relative, resolve, sep, toNamespacedPath, win32 };
@@ -1,47 +0,0 @@
1
- import * as path from 'node:path';
2
- import path__default from 'node:path';
3
-
4
- /**
5
- * Constant for path separator.
6
- *
7
- * Always equals to `"/"`.
8
- */
9
- declare const sep = "/";
10
- declare const normalize: typeof path__default.normalize;
11
- declare const join: typeof path__default.join;
12
- declare const resolve: typeof path__default.resolve;
13
- /**
14
- * Resolves a string path, resolving '.' and '.' segments and allowing paths above the root.
15
- *
16
- * @param path - The path to normalise.
17
- * @param allowAboveRoot - Whether to allow the resulting path to be above the root directory.
18
- * @returns the normalised path string.
19
- */
20
- declare function normalizeString(path: string, allowAboveRoot: boolean): string;
21
- declare const isAbsolute: typeof path__default.isAbsolute;
22
- declare const toNamespacedPath: typeof path__default.toNamespacedPath;
23
- declare const extname: typeof path__default.extname;
24
- declare const relative: typeof path__default.relative;
25
- declare const dirname: typeof path__default.dirname;
26
- declare const format: typeof path__default.format;
27
- declare const basename: typeof path__default.basename;
28
- declare const parse: typeof path__default.parse;
29
- /**
30
- * The `path.matchesGlob()` method determines if `path` matches the `pattern`.
31
- * @param path The path to glob-match against.
32
- * @param pattern The glob to check the path against.
33
- */
34
- declare const matchesGlob: (path: string, pattern: string | string[]) => boolean;
35
-
36
- type NodePath = typeof path;
37
- /**
38
- * The platform-specific file delimiter.
39
- *
40
- * Equals to `";"` in windows and `":"` in all other platforms.
41
- */
42
- declare const delimiter: ";" | ":";
43
- declare const posix: NodePath["posix"];
44
- declare const win32: NodePath["win32"];
45
- declare const _default: NodePath;
46
-
47
- export { basename, _default as default, delimiter, dirname, extname, format, isAbsolute, join, matchesGlob, normalize, normalizeString, parse, posix, relative, resolve, sep, toNamespacedPath, win32 };
@@ -1,19 +0,0 @@
1
- import { _ as _path } from './shared/pathe.M-eThtNZ.mjs';
2
- export { c as basename, d as dirname, e as extname, f as format, i as isAbsolute, j as join, m as matchesGlob, n as normalize, a as normalizeString, p as parse, b as relative, r as resolve, s as sep, t as toNamespacedPath } from './shared/pathe.M-eThtNZ.mjs';
3
-
4
- const delimiter = /* @__PURE__ */ (() => globalThis.process?.platform === "win32" ? ";" : ":")();
5
- const _platforms = { posix: void 0, win32: void 0 };
6
- const mix = (del = delimiter) => {
7
- return new Proxy(_path, {
8
- get(_, prop) {
9
- if (prop === "delimiter") return del;
10
- if (prop === "posix") return posix;
11
- if (prop === "win32") return win32;
12
- return _platforms[prop] || _path[prop];
13
- }
14
- });
15
- };
16
- const posix = /* @__PURE__ */ mix(":");
17
- const win32 = /* @__PURE__ */ mix(";");
18
-
19
- export { posix as default, delimiter, posix, win32 };
@@ -1,266 +0,0 @@
1
- 'use strict';
2
-
3
- let _lazyMatch = () => { var __lib__=(()=>{var m=Object.defineProperty,V=Object.getOwnPropertyDescriptor,G=Object.getOwnPropertyNames,T=Object.prototype.hasOwnProperty,q=(r,e)=>{for(var n in e)m(r,n,{get:e[n],enumerable:true});},H=(r,e,n,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of G(e))!T.call(r,t)&&t!==n&&m(r,t,{get:()=>e[t],enumerable:!(a=V(e,t))||a.enumerable});return r},J=r=>H(m({},"__esModule",{value:true}),r),w={};q(w,{default:()=>re});var A=r=>Array.isArray(r),d=r=>typeof r=="function",Q=r=>r.length===0,W=r=>typeof r=="number",K=r=>typeof r=="object"&&r!==null,X=r=>r instanceof RegExp,b=r=>typeof r=="string",h=r=>r===void 0,Y=r=>{const e=new Map;return n=>{const a=e.get(n);if(a)return a;const t=r(n);return e.set(n,t),t}},rr=(r,e,n={})=>{const a={cache:{},input:r,index:0,indexMax:0,options:n,output:[]};if(v(e)(a)&&a.index===r.length)return a.output;throw new Error(`Failed to parse at index ${a.indexMax}`)},i=(r,e)=>A(r)?er(r,e):b(r)?ar(r,e):nr(r,e),er=(r,e)=>{const n={};for(const a of r){if(a.length!==1)throw new Error(`Invalid character: "${a}"`);const t=a.charCodeAt(0);n[t]=true;}return a=>{const t=a.index,o=a.input;for(;a.index<o.length&&o.charCodeAt(a.index)in n;)a.index+=1;const u=a.index;if(u>t){if(!h(e)&&!a.options.silent){const s=a.input.slice(t,u),c=d(e)?e(s,o,String(t)):e;h(c)||a.output.push(c);}a.indexMax=Math.max(a.indexMax,a.index);}return true}},nr=(r,e)=>{const n=r.source,a=r.flags.replace(/y|$/,"y"),t=new RegExp(n,a);return g(o=>{t.lastIndex=o.index;const u=t.exec(o.input);if(u){if(!h(e)&&!o.options.silent){const s=d(e)?e(...u,o.input,String(o.index)):e;h(s)||o.output.push(s);}return o.index+=u[0].length,o.indexMax=Math.max(o.indexMax,o.index),true}else return false})},ar=(r,e)=>n=>{if(n.input.startsWith(r,n.index)){if(!h(e)&&!n.options.silent){const t=d(e)?e(r,n.input,String(n.index)):e;h(t)||n.output.push(t);}return n.index+=r.length,n.indexMax=Math.max(n.indexMax,n.index),true}else return false},C=(r,e,n,a)=>{const t=v(r);return g(_(M(o=>{let u=0;for(;u<n;){const s=o.index;if(!t(o)||(u+=1,o.index===s))break}return u>=e})))},tr=(r,e)=>C(r,0,1),f=(r,e)=>C(r,0,1/0),x=(r,e)=>{const n=r.map(v);return g(_(M(a=>{for(let t=0,o=n.length;t<o;t++)if(!n[t](a))return false;return true})))},l=(r,e)=>{const n=r.map(v);return g(_(a=>{for(let t=0,o=n.length;t<o;t++)if(n[t](a))return true;return false}))},M=(r,e=false)=>{const n=v(r);return a=>{const t=a.index,o=a.output.length,u=n(a);return (!u||e)&&(a.index=t,a.output.length!==o&&(a.output.length=o)),u}},_=(r,e)=>{const n=v(r);return n},g=(()=>{let r=0;return e=>{const n=v(e),a=r+=1;return t=>{var o;if(t.options.memoization===false)return n(t);const u=t.index,s=(o=t.cache)[a]||(o[a]=new Map),c=s.get(u);if(c===false)return false;if(W(c))return t.index=c,true;if(c)return t.index=c.index,c.output?.length&&t.output.push(...c.output),true;{const Z=t.output.length;if(n(t)){const D=t.index,U=t.output.length;if(U>Z){const ee=t.output.slice(Z,U);s.set(u,{index:D,output:ee});}else s.set(u,D);return true}else return s.set(u,false),false}}}})(),E=r=>{let e;return n=>(e||(e=v(r())),e(n))},v=Y(r=>{if(d(r))return Q(r)?E(r):r;if(b(r)||X(r))return i(r);if(A(r))return x(r);if(K(r))return l(Object.values(r));throw new Error("Invalid rule")}),P="abcdefghijklmnopqrstuvwxyz",ir=r=>{let e="";for(;r>0;){const n=(r-1)%26;e=P[n]+e,r=Math.floor((r-1)/26);}return e},O=r=>{let e=0;for(let n=0,a=r.length;n<a;n++)e=e*26+P.indexOf(r[n])+1;return e},S=(r,e)=>{if(e<r)return S(e,r);const n=[];for(;r<=e;)n.push(r++);return n},or=(r,e,n)=>S(r,e).map(a=>String(a).padStart(n,"0")),R=(r,e)=>S(O(r),O(e)).map(ir),p=r=>r,z=r=>ur(e=>rr(e,r,{memoization:false}).join("")),ur=r=>{const e={};return n=>e[n]??(e[n]=r(n))},sr=i(/^\*\*\/\*$/,".*"),cr=i(/^\*\*\/(\*)?([ a-zA-Z0-9._-]+)$/,(r,e,n)=>`.*${e?"":"(?:^|/)"}${n.replaceAll(".","\\.")}`),lr=i(/^\*\*\/(\*)?([ a-zA-Z0-9._-]*)\{([ a-zA-Z0-9._-]+(?:,[ a-zA-Z0-9._-]+)*)\}$/,(r,e,n,a)=>`.*${e?"":"(?:^|/)"}${n.replaceAll(".","\\.")}(?:${a.replaceAll(",","|").replaceAll(".","\\.")})`),y=i(/\\./,p),pr=i(/[$.*+?^(){}[\]\|]/,r=>`\\${r}`),vr=i(/./,p),hr=i(/^(?:!!)*!(.*)$/,(r,e)=>`(?!^${L(e)}$).*?`),dr=i(/^(!!)+/,""),fr=l([hr,dr]),xr=i(/\/(\*\*\/)+/,"(?:/.+/|/)"),gr=i(/^(\*\*\/)+/,"(?:^|.*/)"),mr=i(/\/(\*\*)$/,"(?:/.*|$)"),_r=i(/\*\*/,".*"),j=l([xr,gr,mr,_r]),Sr=i(/\*\/(?!\*\*\/)/,"[^/]*/"),yr=i(/\*/,"[^/]*"),N=l([Sr,yr]),k=i("?","[^/]"),$r=i("[",p),wr=i("]",p),Ar=i(/[!^]/,"^/"),br=i(/[a-z]-[a-z]|[0-9]-[0-9]/i,p),Cr=i(/[$.*+?^(){}[\|]/,r=>`\\${r}`),Mr=i(/[^\]]/,p),Er=l([y,Cr,br,Mr]),B=x([$r,tr(Ar),f(Er),wr]),Pr=i("{","(?:"),Or=i("}",")"),Rr=i(/(\d+)\.\.(\d+)/,(r,e,n)=>or(+e,+n,Math.min(e.length,n.length)).join("|")),zr=i(/([a-z]+)\.\.([a-z]+)/,(r,e,n)=>R(e,n).join("|")),jr=i(/([A-Z]+)\.\.([A-Z]+)/,(r,e,n)=>R(e.toLowerCase(),n.toLowerCase()).join("|").toUpperCase()),Nr=l([Rr,zr,jr]),I=x([Pr,Nr,Or]),kr=i("{","(?:"),Br=i("}",")"),Ir=i(",","|"),Fr=i(/[$.*+?^(){[\]\|]/,r=>`\\${r}`),Lr=i(/[^}]/,p),Zr=E(()=>F),Dr=l([j,N,k,B,I,Zr,y,Fr,Ir,Lr]),F=x([kr,f(Dr),Br]),Ur=f(l([sr,cr,lr,fr,j,N,k,B,I,F,y,pr,vr])),Vr=Ur,Gr=z(Vr),L=Gr,Tr=i(/\\./,p),qr=i(/./,p),Hr=i(/\*\*\*+/,"*"),Jr=i(/([^/{[(!])\*\*/,(r,e)=>`${e}*`),Qr=i(/(^|.)\*\*(?=[^*/)\]}])/,(r,e)=>`${e}*`),Wr=f(l([Tr,Hr,Jr,Qr,qr])),Kr=Wr,Xr=z(Kr),Yr=Xr,$=(r,e)=>{const n=Array.isArray(r)?r:[r];if(!n.length)return false;const a=n.map($.compile),t=n.every(s=>/(\/(?:\*\*)?|\[\/\])$/.test(s)),o=e.replace(/[\\\/]+/g,"/").replace(/\/$/,t?"/":"");return a.some(s=>s.test(o))};$.compile=r=>new RegExp(`^${L(Yr(r))}$`,"s");var re=$;return J(w)})();
4
- return __lib__.default || __lib__; };
5
- let _match;
6
- const zeptomatch = (path, pattern) => {
7
- if (!_match) {
8
- _match = _lazyMatch();
9
- _lazyMatch = null;
10
- }
11
- return _match(path, pattern);
12
- };
13
-
14
- const _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//;
15
- function normalizeWindowsPath(input = "") {
16
- if (!input) {
17
- return input;
18
- }
19
- return input.replace(/\\/g, "/").replace(_DRIVE_LETTER_START_RE, (r) => r.toUpperCase());
20
- }
21
-
22
- const _UNC_REGEX = /^[/\\]{2}/;
23
- const _IS_ABSOLUTE_RE = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;
24
- const _DRIVE_LETTER_RE = /^[A-Za-z]:$/;
25
- const _ROOT_FOLDER_RE = /^\/([A-Za-z]:)?$/;
26
- const _EXTNAME_RE = /.(\.[^./]+|\.)$/;
27
- const _PATH_ROOT_RE = /^[/\\]|^[a-zA-Z]:[/\\]/;
28
- const sep = "/";
29
- const normalize = function(path) {
30
- if (path.length === 0) {
31
- return ".";
32
- }
33
- path = normalizeWindowsPath(path);
34
- const isUNCPath = path.match(_UNC_REGEX);
35
- const isPathAbsolute = isAbsolute(path);
36
- const trailingSeparator = path[path.length - 1] === "/";
37
- path = normalizeString(path, !isPathAbsolute);
38
- if (path.length === 0) {
39
- if (isPathAbsolute) {
40
- return "/";
41
- }
42
- return trailingSeparator ? "./" : ".";
43
- }
44
- if (trailingSeparator) {
45
- path += "/";
46
- }
47
- if (_DRIVE_LETTER_RE.test(path)) {
48
- path += "/";
49
- }
50
- if (isUNCPath) {
51
- if (!isPathAbsolute) {
52
- return `//./${path}`;
53
- }
54
- return `//${path}`;
55
- }
56
- return isPathAbsolute && !isAbsolute(path) ? `/${path}` : path;
57
- };
58
- const join = function(...segments) {
59
- let path = "";
60
- for (const seg of segments) {
61
- if (!seg) {
62
- continue;
63
- }
64
- if (path.length > 0) {
65
- const pathTrailing = path[path.length - 1] === "/";
66
- const segLeading = seg[0] === "/";
67
- const both = pathTrailing && segLeading;
68
- if (both) {
69
- path += seg.slice(1);
70
- } else {
71
- path += pathTrailing || segLeading ? seg : `/${seg}`;
72
- }
73
- } else {
74
- path += seg;
75
- }
76
- }
77
- return normalize(path);
78
- };
79
- function cwd() {
80
- if (typeof process !== "undefined" && typeof process.cwd === "function") {
81
- return process.cwd().replace(/\\/g, "/");
82
- }
83
- return "/";
84
- }
85
- const resolve = function(...arguments_) {
86
- arguments_ = arguments_.map((argument) => normalizeWindowsPath(argument));
87
- let resolvedPath = "";
88
- let resolvedAbsolute = false;
89
- for (let index = arguments_.length - 1; index >= -1 && !resolvedAbsolute; index--) {
90
- const path = index >= 0 ? arguments_[index] : cwd();
91
- if (!path || path.length === 0) {
92
- continue;
93
- }
94
- resolvedPath = `${path}/${resolvedPath}`;
95
- resolvedAbsolute = isAbsolute(path);
96
- }
97
- resolvedPath = normalizeString(resolvedPath, !resolvedAbsolute);
98
- if (resolvedAbsolute && !isAbsolute(resolvedPath)) {
99
- return `/${resolvedPath}`;
100
- }
101
- return resolvedPath.length > 0 ? resolvedPath : ".";
102
- };
103
- function normalizeString(path, allowAboveRoot) {
104
- let res = "";
105
- let lastSegmentLength = 0;
106
- let lastSlash = -1;
107
- let dots = 0;
108
- let char = null;
109
- for (let index = 0; index <= path.length; ++index) {
110
- if (index < path.length) {
111
- char = path[index];
112
- } else if (char === "/") {
113
- break;
114
- } else {
115
- char = "/";
116
- }
117
- if (char === "/") {
118
- if (lastSlash === index - 1 || dots === 1) ; else if (dots === 2) {
119
- if (res.length < 2 || lastSegmentLength !== 2 || res[res.length - 1] !== "." || res[res.length - 2] !== ".") {
120
- if (res.length > 2) {
121
- const lastSlashIndex = res.lastIndexOf("/");
122
- if (lastSlashIndex === -1) {
123
- res = "";
124
- lastSegmentLength = 0;
125
- } else {
126
- res = res.slice(0, lastSlashIndex);
127
- lastSegmentLength = res.length - 1 - res.lastIndexOf("/");
128
- }
129
- lastSlash = index;
130
- dots = 0;
131
- continue;
132
- } else if (res.length > 0) {
133
- res = "";
134
- lastSegmentLength = 0;
135
- lastSlash = index;
136
- dots = 0;
137
- continue;
138
- }
139
- }
140
- if (allowAboveRoot) {
141
- res += res.length > 0 ? "/.." : "..";
142
- lastSegmentLength = 2;
143
- }
144
- } else {
145
- if (res.length > 0) {
146
- res += `/${path.slice(lastSlash + 1, index)}`;
147
- } else {
148
- res = path.slice(lastSlash + 1, index);
149
- }
150
- lastSegmentLength = index - lastSlash - 1;
151
- }
152
- lastSlash = index;
153
- dots = 0;
154
- } else if (char === "." && dots !== -1) {
155
- ++dots;
156
- } else {
157
- dots = -1;
158
- }
159
- }
160
- return res;
161
- }
162
- const isAbsolute = function(p) {
163
- return _IS_ABSOLUTE_RE.test(p);
164
- };
165
- const toNamespacedPath = function(p) {
166
- return normalizeWindowsPath(p);
167
- };
168
- const extname = function(p) {
169
- if (p === "..") return "";
170
- const match = _EXTNAME_RE.exec(normalizeWindowsPath(p));
171
- return match && match[1] || "";
172
- };
173
- const relative = function(from, to) {
174
- const _from = resolve(from).replace(_ROOT_FOLDER_RE, "$1").split("/");
175
- const _to = resolve(to).replace(_ROOT_FOLDER_RE, "$1").split("/");
176
- if (_to[0][1] === ":" && _from[0][1] === ":" && _from[0] !== _to[0]) {
177
- return _to.join("/");
178
- }
179
- const _fromCopy = [..._from];
180
- for (const segment of _fromCopy) {
181
- if (_to[0] !== segment) {
182
- break;
183
- }
184
- _from.shift();
185
- _to.shift();
186
- }
187
- return [..._from.map(() => ".."), ..._to].join("/");
188
- };
189
- const dirname = function(p) {
190
- const segments = normalizeWindowsPath(p).replace(/\/$/, "").split("/").slice(0, -1);
191
- if (segments.length === 1 && _DRIVE_LETTER_RE.test(segments[0])) {
192
- segments[0] += "/";
193
- }
194
- return segments.join("/") || (isAbsolute(p) ? "/" : ".");
195
- };
196
- const format = function(p) {
197
- const ext = p.ext ? p.ext.startsWith(".") ? p.ext : `.${p.ext}` : "";
198
- const segments = [p.root, p.dir, p.base ?? (p.name ?? "") + ext].filter(
199
- Boolean
200
- );
201
- return normalizeWindowsPath(
202
- p.root ? resolve(...segments) : segments.join("/")
203
- );
204
- };
205
- const basename = function(p, extension) {
206
- const segments = normalizeWindowsPath(p).split("/");
207
- let lastSegment = "";
208
- for (let i = segments.length - 1; i >= 0; i--) {
209
- const val = segments[i];
210
- if (val) {
211
- lastSegment = val;
212
- break;
213
- }
214
- }
215
- return extension && lastSegment.endsWith(extension) ? lastSegment.slice(0, -extension.length) : lastSegment;
216
- };
217
- const parse = function(p) {
218
- const root = _PATH_ROOT_RE.exec(p)?.[0]?.replace(/\\/g, "/") || "";
219
- const base = basename(p);
220
- const extension = extname(base);
221
- return {
222
- root,
223
- dir: dirname(p),
224
- base,
225
- ext: extension,
226
- name: base.slice(0, base.length - extension.length)
227
- };
228
- };
229
- const matchesGlob = (path, pattern) => {
230
- return zeptomatch(pattern, normalize(path));
231
- };
232
-
233
- const _path = {
234
- __proto__: null,
235
- basename: basename,
236
- dirname: dirname,
237
- extname: extname,
238
- format: format,
239
- isAbsolute: isAbsolute,
240
- join: join,
241
- matchesGlob: matchesGlob,
242
- normalize: normalize,
243
- normalizeString: normalizeString,
244
- parse: parse,
245
- relative: relative,
246
- resolve: resolve,
247
- sep: sep,
248
- toNamespacedPath: toNamespacedPath
249
- };
250
-
251
- exports._path = _path;
252
- exports.basename = basename;
253
- exports.dirname = dirname;
254
- exports.extname = extname;
255
- exports.format = format;
256
- exports.isAbsolute = isAbsolute;
257
- exports.join = join;
258
- exports.matchesGlob = matchesGlob;
259
- exports.normalize = normalize;
260
- exports.normalizeString = normalizeString;
261
- exports.normalizeWindowsPath = normalizeWindowsPath;
262
- exports.parse = parse;
263
- exports.relative = relative;
264
- exports.resolve = resolve;
265
- exports.sep = sep;
266
- exports.toNamespacedPath = toNamespacedPath;
@@ -1,249 +0,0 @@
1
- let _lazyMatch = () => { var __lib__=(()=>{var m=Object.defineProperty,V=Object.getOwnPropertyDescriptor,G=Object.getOwnPropertyNames,T=Object.prototype.hasOwnProperty,q=(r,e)=>{for(var n in e)m(r,n,{get:e[n],enumerable:true});},H=(r,e,n,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of G(e))!T.call(r,t)&&t!==n&&m(r,t,{get:()=>e[t],enumerable:!(a=V(e,t))||a.enumerable});return r},J=r=>H(m({},"__esModule",{value:true}),r),w={};q(w,{default:()=>re});var A=r=>Array.isArray(r),d=r=>typeof r=="function",Q=r=>r.length===0,W=r=>typeof r=="number",K=r=>typeof r=="object"&&r!==null,X=r=>r instanceof RegExp,b=r=>typeof r=="string",h=r=>r===void 0,Y=r=>{const e=new Map;return n=>{const a=e.get(n);if(a)return a;const t=r(n);return e.set(n,t),t}},rr=(r,e,n={})=>{const a={cache:{},input:r,index:0,indexMax:0,options:n,output:[]};if(v(e)(a)&&a.index===r.length)return a.output;throw new Error(`Failed to parse at index ${a.indexMax}`)},i=(r,e)=>A(r)?er(r,e):b(r)?ar(r,e):nr(r,e),er=(r,e)=>{const n={};for(const a of r){if(a.length!==1)throw new Error(`Invalid character: "${a}"`);const t=a.charCodeAt(0);n[t]=true;}return a=>{const t=a.index,o=a.input;for(;a.index<o.length&&o.charCodeAt(a.index)in n;)a.index+=1;const u=a.index;if(u>t){if(!h(e)&&!a.options.silent){const s=a.input.slice(t,u),c=d(e)?e(s,o,String(t)):e;h(c)||a.output.push(c);}a.indexMax=Math.max(a.indexMax,a.index);}return true}},nr=(r,e)=>{const n=r.source,a=r.flags.replace(/y|$/,"y"),t=new RegExp(n,a);return g(o=>{t.lastIndex=o.index;const u=t.exec(o.input);if(u){if(!h(e)&&!o.options.silent){const s=d(e)?e(...u,o.input,String(o.index)):e;h(s)||o.output.push(s);}return o.index+=u[0].length,o.indexMax=Math.max(o.indexMax,o.index),true}else return false})},ar=(r,e)=>n=>{if(n.input.startsWith(r,n.index)){if(!h(e)&&!n.options.silent){const t=d(e)?e(r,n.input,String(n.index)):e;h(t)||n.output.push(t);}return n.index+=r.length,n.indexMax=Math.max(n.indexMax,n.index),true}else return false},C=(r,e,n,a)=>{const t=v(r);return g(_(M(o=>{let u=0;for(;u<n;){const s=o.index;if(!t(o)||(u+=1,o.index===s))break}return u>=e})))},tr=(r,e)=>C(r,0,1),f=(r,e)=>C(r,0,1/0),x=(r,e)=>{const n=r.map(v);return g(_(M(a=>{for(let t=0,o=n.length;t<o;t++)if(!n[t](a))return false;return true})))},l=(r,e)=>{const n=r.map(v);return g(_(a=>{for(let t=0,o=n.length;t<o;t++)if(n[t](a))return true;return false}))},M=(r,e=false)=>{const n=v(r);return a=>{const t=a.index,o=a.output.length,u=n(a);return (!u||e)&&(a.index=t,a.output.length!==o&&(a.output.length=o)),u}},_=(r,e)=>{const n=v(r);return n},g=(()=>{let r=0;return e=>{const n=v(e),a=r+=1;return t=>{var o;if(t.options.memoization===false)return n(t);const u=t.index,s=(o=t.cache)[a]||(o[a]=new Map),c=s.get(u);if(c===false)return false;if(W(c))return t.index=c,true;if(c)return t.index=c.index,c.output?.length&&t.output.push(...c.output),true;{const Z=t.output.length;if(n(t)){const D=t.index,U=t.output.length;if(U>Z){const ee=t.output.slice(Z,U);s.set(u,{index:D,output:ee});}else s.set(u,D);return true}else return s.set(u,false),false}}}})(),E=r=>{let e;return n=>(e||(e=v(r())),e(n))},v=Y(r=>{if(d(r))return Q(r)?E(r):r;if(b(r)||X(r))return i(r);if(A(r))return x(r);if(K(r))return l(Object.values(r));throw new Error("Invalid rule")}),P="abcdefghijklmnopqrstuvwxyz",ir=r=>{let e="";for(;r>0;){const n=(r-1)%26;e=P[n]+e,r=Math.floor((r-1)/26);}return e},O=r=>{let e=0;for(let n=0,a=r.length;n<a;n++)e=e*26+P.indexOf(r[n])+1;return e},S=(r,e)=>{if(e<r)return S(e,r);const n=[];for(;r<=e;)n.push(r++);return n},or=(r,e,n)=>S(r,e).map(a=>String(a).padStart(n,"0")),R=(r,e)=>S(O(r),O(e)).map(ir),p=r=>r,z=r=>ur(e=>rr(e,r,{memoization:false}).join("")),ur=r=>{const e={};return n=>e[n]??(e[n]=r(n))},sr=i(/^\*\*\/\*$/,".*"),cr=i(/^\*\*\/(\*)?([ a-zA-Z0-9._-]+)$/,(r,e,n)=>`.*${e?"":"(?:^|/)"}${n.replaceAll(".","\\.")}`),lr=i(/^\*\*\/(\*)?([ a-zA-Z0-9._-]*)\{([ a-zA-Z0-9._-]+(?:,[ a-zA-Z0-9._-]+)*)\}$/,(r,e,n,a)=>`.*${e?"":"(?:^|/)"}${n.replaceAll(".","\\.")}(?:${a.replaceAll(",","|").replaceAll(".","\\.")})`),y=i(/\\./,p),pr=i(/[$.*+?^(){}[\]\|]/,r=>`\\${r}`),vr=i(/./,p),hr=i(/^(?:!!)*!(.*)$/,(r,e)=>`(?!^${L(e)}$).*?`),dr=i(/^(!!)+/,""),fr=l([hr,dr]),xr=i(/\/(\*\*\/)+/,"(?:/.+/|/)"),gr=i(/^(\*\*\/)+/,"(?:^|.*/)"),mr=i(/\/(\*\*)$/,"(?:/.*|$)"),_r=i(/\*\*/,".*"),j=l([xr,gr,mr,_r]),Sr=i(/\*\/(?!\*\*\/)/,"[^/]*/"),yr=i(/\*/,"[^/]*"),N=l([Sr,yr]),k=i("?","[^/]"),$r=i("[",p),wr=i("]",p),Ar=i(/[!^]/,"^/"),br=i(/[a-z]-[a-z]|[0-9]-[0-9]/i,p),Cr=i(/[$.*+?^(){}[\|]/,r=>`\\${r}`),Mr=i(/[^\]]/,p),Er=l([y,Cr,br,Mr]),B=x([$r,tr(Ar),f(Er),wr]),Pr=i("{","(?:"),Or=i("}",")"),Rr=i(/(\d+)\.\.(\d+)/,(r,e,n)=>or(+e,+n,Math.min(e.length,n.length)).join("|")),zr=i(/([a-z]+)\.\.([a-z]+)/,(r,e,n)=>R(e,n).join("|")),jr=i(/([A-Z]+)\.\.([A-Z]+)/,(r,e,n)=>R(e.toLowerCase(),n.toLowerCase()).join("|").toUpperCase()),Nr=l([Rr,zr,jr]),I=x([Pr,Nr,Or]),kr=i("{","(?:"),Br=i("}",")"),Ir=i(",","|"),Fr=i(/[$.*+?^(){[\]\|]/,r=>`\\${r}`),Lr=i(/[^}]/,p),Zr=E(()=>F),Dr=l([j,N,k,B,I,Zr,y,Fr,Ir,Lr]),F=x([kr,f(Dr),Br]),Ur=f(l([sr,cr,lr,fr,j,N,k,B,I,F,y,pr,vr])),Vr=Ur,Gr=z(Vr),L=Gr,Tr=i(/\\./,p),qr=i(/./,p),Hr=i(/\*\*\*+/,"*"),Jr=i(/([^/{[(!])\*\*/,(r,e)=>`${e}*`),Qr=i(/(^|.)\*\*(?=[^*/)\]}])/,(r,e)=>`${e}*`),Wr=f(l([Tr,Hr,Jr,Qr,qr])),Kr=Wr,Xr=z(Kr),Yr=Xr,$=(r,e)=>{const n=Array.isArray(r)?r:[r];if(!n.length)return false;const a=n.map($.compile),t=n.every(s=>/(\/(?:\*\*)?|\[\/\])$/.test(s)),o=e.replace(/[\\\/]+/g,"/").replace(/\/$/,t?"/":"");return a.some(s=>s.test(o))};$.compile=r=>new RegExp(`^${L(Yr(r))}$`,"s");var re=$;return J(w)})();
2
- return __lib__.default || __lib__; };
3
- let _match;
4
- const zeptomatch = (path, pattern) => {
5
- if (!_match) {
6
- _match = _lazyMatch();
7
- _lazyMatch = null;
8
- }
9
- return _match(path, pattern);
10
- };
11
-
12
- const _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//;
13
- function normalizeWindowsPath(input = "") {
14
- if (!input) {
15
- return input;
16
- }
17
- return input.replace(/\\/g, "/").replace(_DRIVE_LETTER_START_RE, (r) => r.toUpperCase());
18
- }
19
-
20
- const _UNC_REGEX = /^[/\\]{2}/;
21
- const _IS_ABSOLUTE_RE = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;
22
- const _DRIVE_LETTER_RE = /^[A-Za-z]:$/;
23
- const _ROOT_FOLDER_RE = /^\/([A-Za-z]:)?$/;
24
- const _EXTNAME_RE = /.(\.[^./]+|\.)$/;
25
- const _PATH_ROOT_RE = /^[/\\]|^[a-zA-Z]:[/\\]/;
26
- const sep = "/";
27
- const normalize = function(path) {
28
- if (path.length === 0) {
29
- return ".";
30
- }
31
- path = normalizeWindowsPath(path);
32
- const isUNCPath = path.match(_UNC_REGEX);
33
- const isPathAbsolute = isAbsolute(path);
34
- const trailingSeparator = path[path.length - 1] === "/";
35
- path = normalizeString(path, !isPathAbsolute);
36
- if (path.length === 0) {
37
- if (isPathAbsolute) {
38
- return "/";
39
- }
40
- return trailingSeparator ? "./" : ".";
41
- }
42
- if (trailingSeparator) {
43
- path += "/";
44
- }
45
- if (_DRIVE_LETTER_RE.test(path)) {
46
- path += "/";
47
- }
48
- if (isUNCPath) {
49
- if (!isPathAbsolute) {
50
- return `//./${path}`;
51
- }
52
- return `//${path}`;
53
- }
54
- return isPathAbsolute && !isAbsolute(path) ? `/${path}` : path;
55
- };
56
- const join = function(...segments) {
57
- let path = "";
58
- for (const seg of segments) {
59
- if (!seg) {
60
- continue;
61
- }
62
- if (path.length > 0) {
63
- const pathTrailing = path[path.length - 1] === "/";
64
- const segLeading = seg[0] === "/";
65
- const both = pathTrailing && segLeading;
66
- if (both) {
67
- path += seg.slice(1);
68
- } else {
69
- path += pathTrailing || segLeading ? seg : `/${seg}`;
70
- }
71
- } else {
72
- path += seg;
73
- }
74
- }
75
- return normalize(path);
76
- };
77
- function cwd() {
78
- if (typeof process !== "undefined" && typeof process.cwd === "function") {
79
- return process.cwd().replace(/\\/g, "/");
80
- }
81
- return "/";
82
- }
83
- const resolve = function(...arguments_) {
84
- arguments_ = arguments_.map((argument) => normalizeWindowsPath(argument));
85
- let resolvedPath = "";
86
- let resolvedAbsolute = false;
87
- for (let index = arguments_.length - 1; index >= -1 && !resolvedAbsolute; index--) {
88
- const path = index >= 0 ? arguments_[index] : cwd();
89
- if (!path || path.length === 0) {
90
- continue;
91
- }
92
- resolvedPath = `${path}/${resolvedPath}`;
93
- resolvedAbsolute = isAbsolute(path);
94
- }
95
- resolvedPath = normalizeString(resolvedPath, !resolvedAbsolute);
96
- if (resolvedAbsolute && !isAbsolute(resolvedPath)) {
97
- return `/${resolvedPath}`;
98
- }
99
- return resolvedPath.length > 0 ? resolvedPath : ".";
100
- };
101
- function normalizeString(path, allowAboveRoot) {
102
- let res = "";
103
- let lastSegmentLength = 0;
104
- let lastSlash = -1;
105
- let dots = 0;
106
- let char = null;
107
- for (let index = 0; index <= path.length; ++index) {
108
- if (index < path.length) {
109
- char = path[index];
110
- } else if (char === "/") {
111
- break;
112
- } else {
113
- char = "/";
114
- }
115
- if (char === "/") {
116
- if (lastSlash === index - 1 || dots === 1) ; else if (dots === 2) {
117
- if (res.length < 2 || lastSegmentLength !== 2 || res[res.length - 1] !== "." || res[res.length - 2] !== ".") {
118
- if (res.length > 2) {
119
- const lastSlashIndex = res.lastIndexOf("/");
120
- if (lastSlashIndex === -1) {
121
- res = "";
122
- lastSegmentLength = 0;
123
- } else {
124
- res = res.slice(0, lastSlashIndex);
125
- lastSegmentLength = res.length - 1 - res.lastIndexOf("/");
126
- }
127
- lastSlash = index;
128
- dots = 0;
129
- continue;
130
- } else if (res.length > 0) {
131
- res = "";
132
- lastSegmentLength = 0;
133
- lastSlash = index;
134
- dots = 0;
135
- continue;
136
- }
137
- }
138
- if (allowAboveRoot) {
139
- res += res.length > 0 ? "/.." : "..";
140
- lastSegmentLength = 2;
141
- }
142
- } else {
143
- if (res.length > 0) {
144
- res += `/${path.slice(lastSlash + 1, index)}`;
145
- } else {
146
- res = path.slice(lastSlash + 1, index);
147
- }
148
- lastSegmentLength = index - lastSlash - 1;
149
- }
150
- lastSlash = index;
151
- dots = 0;
152
- } else if (char === "." && dots !== -1) {
153
- ++dots;
154
- } else {
155
- dots = -1;
156
- }
157
- }
158
- return res;
159
- }
160
- const isAbsolute = function(p) {
161
- return _IS_ABSOLUTE_RE.test(p);
162
- };
163
- const toNamespacedPath = function(p) {
164
- return normalizeWindowsPath(p);
165
- };
166
- const extname = function(p) {
167
- if (p === "..") return "";
168
- const match = _EXTNAME_RE.exec(normalizeWindowsPath(p));
169
- return match && match[1] || "";
170
- };
171
- const relative = function(from, to) {
172
- const _from = resolve(from).replace(_ROOT_FOLDER_RE, "$1").split("/");
173
- const _to = resolve(to).replace(_ROOT_FOLDER_RE, "$1").split("/");
174
- if (_to[0][1] === ":" && _from[0][1] === ":" && _from[0] !== _to[0]) {
175
- return _to.join("/");
176
- }
177
- const _fromCopy = [..._from];
178
- for (const segment of _fromCopy) {
179
- if (_to[0] !== segment) {
180
- break;
181
- }
182
- _from.shift();
183
- _to.shift();
184
- }
185
- return [..._from.map(() => ".."), ..._to].join("/");
186
- };
187
- const dirname = function(p) {
188
- const segments = normalizeWindowsPath(p).replace(/\/$/, "").split("/").slice(0, -1);
189
- if (segments.length === 1 && _DRIVE_LETTER_RE.test(segments[0])) {
190
- segments[0] += "/";
191
- }
192
- return segments.join("/") || (isAbsolute(p) ? "/" : ".");
193
- };
194
- const format = function(p) {
195
- const ext = p.ext ? p.ext.startsWith(".") ? p.ext : `.${p.ext}` : "";
196
- const segments = [p.root, p.dir, p.base ?? (p.name ?? "") + ext].filter(
197
- Boolean
198
- );
199
- return normalizeWindowsPath(
200
- p.root ? resolve(...segments) : segments.join("/")
201
- );
202
- };
203
- const basename = function(p, extension) {
204
- const segments = normalizeWindowsPath(p).split("/");
205
- let lastSegment = "";
206
- for (let i = segments.length - 1; i >= 0; i--) {
207
- const val = segments[i];
208
- if (val) {
209
- lastSegment = val;
210
- break;
211
- }
212
- }
213
- return extension && lastSegment.endsWith(extension) ? lastSegment.slice(0, -extension.length) : lastSegment;
214
- };
215
- const parse = function(p) {
216
- const root = _PATH_ROOT_RE.exec(p)?.[0]?.replace(/\\/g, "/") || "";
217
- const base = basename(p);
218
- const extension = extname(base);
219
- return {
220
- root,
221
- dir: dirname(p),
222
- base,
223
- ext: extension,
224
- name: base.slice(0, base.length - extension.length)
225
- };
226
- };
227
- const matchesGlob = (path, pattern) => {
228
- return zeptomatch(pattern, normalize(path));
229
- };
230
-
231
- const _path = {
232
- __proto__: null,
233
- basename: basename,
234
- dirname: dirname,
235
- extname: extname,
236
- format: format,
237
- isAbsolute: isAbsolute,
238
- join: join,
239
- matchesGlob: matchesGlob,
240
- normalize: normalize,
241
- normalizeString: normalizeString,
242
- parse: parse,
243
- relative: relative,
244
- resolve: resolve,
245
- sep: sep,
246
- toNamespacedPath: toNamespacedPath
247
- };
248
-
249
- export { _path as _, normalizeString as a, relative as b, basename as c, dirname as d, extname as e, format as f, normalizeWindowsPath as g, isAbsolute as i, join as j, matchesGlob as m, normalize as n, parse as p, resolve as r, sep as s, toNamespacedPath as t };