nuxt-ai-ready 2.5.3 → 3.0.0

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 (286) 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/tools/get-page-markdown.js +1 -1
  42. package/dist/runtime/server/mcp/tools/list-pages.js +1 -1
  43. package/dist/runtime/server/mcp/tools/search-pages.js +1 -1
  44. package/dist/runtime/server/middleware/markdown.prerender.js +1 -1
  45. package/dist/runtime/server/plugins/db-lifecycle-nitro3.d.ts +2 -0
  46. package/dist/runtime/server/plugins/db-lifecycle-nitro3.js +16 -0
  47. package/dist/runtime/server/plugins/html-capture.prerender.js +6 -4
  48. package/dist/runtime/server/plugins/link-header-nitro3.d.ts +2 -0
  49. package/dist/runtime/server/plugins/link-header-nitro3.js +20 -0
  50. package/dist/runtime/server/plugins/link-header.d.ts +6 -0
  51. package/dist/runtime/server/plugins/link-header.js +7 -11
  52. package/dist/runtime/server/plugins/markdown-negotiation.js +8 -1
  53. package/dist/runtime/server/plugins/sitemap-seeder.js +3 -3
  54. package/dist/runtime/server/routes/agent-skills-artifact.d.ts +1 -1
  55. package/dist/runtime/server/routes/agent-skills-artifact.js +10 -10
  56. package/dist/runtime/server/routes/agent-skills-index.d.ts +1 -1
  57. package/dist/runtime/server/routes/agent-skills-index.js +7 -6
  58. package/dist/runtime/server/routes/ai-catalog.d.ts +2 -1
  59. package/dist/runtime/server/routes/ai-catalog.js +7 -8
  60. package/dist/runtime/server/routes/api-catalog.d.ts +3 -1
  61. package/dist/runtime/server/routes/api-catalog.js +12 -12
  62. package/dist/runtime/server/routes/llms-full.txt.get.js +1 -1
  63. package/dist/runtime/server/routes/mcp-server-card.d.ts +1 -1
  64. package/dist/runtime/server/routes/mcp-server-card.js +7 -8
  65. package/dist/runtime/server/utils/checkStale.d.ts +2 -2
  66. package/dist/runtime/server/utils/cloudflare-prerendered.d.ts +3 -0
  67. package/dist/runtime/server/utils/cloudflare-prerendered.js +23 -0
  68. package/dist/runtime/server/utils/cloudflare.d.ts +5 -5
  69. package/dist/runtime/server/utils/cloudflare.js +31 -7
  70. package/dist/runtime/server/utils/content-negotiation.d.ts +5 -3
  71. package/dist/runtime/server/utils/content-negotiation.js +8 -7
  72. package/dist/runtime/server/utils/context.d.ts +3 -3
  73. package/dist/runtime/server/utils/context.js +1 -1
  74. package/dist/runtime/server/utils/discovery-response.d.ts +2 -0
  75. package/dist/runtime/server/utils/link-header.d.ts +5 -3
  76. package/dist/runtime/server/utils/link-header.js +26 -2
  77. package/dist/runtime/server/utils/markdown-request.d.ts +4 -3
  78. package/dist/runtime/server/utils/markdown-request.js +15 -13
  79. package/dist/runtime/server/utils/negotiation-decision.d.ts +4 -0
  80. package/dist/runtime/server/utils/negotiation-decision.js +6 -5
  81. package/dist/runtime/server/utils/negotiation-response.js +47 -22
  82. package/dist/runtime/server/utils/prerender-html.d.ts +2 -1
  83. package/dist/runtime/server/utils/prerender-html.js +3 -1
  84. package/dist/runtime/types.d.ts +15 -7
  85. package/dist/shared/nuxt-ai-ready.B3hAuOLQ.mjs +29 -0
  86. package/dist/shared/{nuxt-ai-ready.CLSWou20.mjs → nuxt-ai-ready.C34F0LJo.mjs} +560 -219
  87. package/package.json +85 -20
  88. package/skills/nuxt-ai-ready/SKILL.md +26 -12
  89. package/skills/nuxt-ai-ready/references/runtime-indexing.md +7 -6
  90. package/dist/runtime/server/db/drizzle/providers/sqlite.d.ts +0 -8
  91. package/dist/runtime/server/db/drizzle/providers/sqlite.js +0 -15
  92. package/node_modules/@mdream/js/LICENSE.md +0 -9
  93. package/node_modules/@mdream/js/README.md +0 -792
  94. package/node_modules/@mdream/js/bin/mdream.mjs +0 -2
  95. package/node_modules/@mdream/js/dist/_chunks/const.mjs +0 -134
  96. package/node_modules/@mdream/js/dist/_chunks/index.d.mts +0 -9
  97. package/node_modules/@mdream/js/dist/_chunks/markdown-processor.mjs +0 -1968
  98. package/node_modules/@mdream/js/dist/_chunks/minimal.d.mts +0 -6
  99. package/node_modules/@mdream/js/dist/_chunks/parse.mjs +0 -2756
  100. package/node_modules/@mdream/js/dist/_chunks/plugins.mjs +0 -725
  101. package/node_modules/@mdream/js/dist/_chunks/resolve-plugins.mjs +0 -44
  102. package/node_modules/@mdream/js/dist/_chunks/stream.mjs +0 -37
  103. package/node_modules/@mdream/js/dist/_chunks/types.d.mts +0 -473
  104. package/node_modules/@mdream/js/dist/cli.d.mts +0 -1
  105. package/node_modules/@mdream/js/dist/cli.mjs +0 -32
  106. package/node_modules/@mdream/js/dist/core.d.mts +0 -15
  107. package/node_modules/@mdream/js/dist/core.mjs +0 -28
  108. package/node_modules/@mdream/js/dist/index.d.mts +0 -4
  109. package/node_modules/@mdream/js/dist/index.mjs +0 -58
  110. package/node_modules/@mdream/js/dist/llms-txt.d.mts +0 -86
  111. package/node_modules/@mdream/js/dist/llms-txt.mjs +0 -308
  112. package/node_modules/@mdream/js/dist/negotiate.d.mts +0 -35
  113. package/node_modules/@mdream/js/dist/negotiate.mjs +0 -121
  114. package/node_modules/@mdream/js/dist/parse.d.mts +0 -90
  115. package/node_modules/@mdream/js/dist/parse.mjs +0 -2
  116. package/node_modules/@mdream/js/dist/plugins.d.mts +0 -85
  117. package/node_modules/@mdream/js/dist/plugins.mjs +0 -2
  118. package/node_modules/@mdream/js/dist/preset/minimal.d.mts +0 -2
  119. package/node_modules/@mdream/js/dist/preset/minimal.mjs +0 -33
  120. package/node_modules/@mdream/js/dist/splitter.d.mts +0 -18
  121. package/node_modules/@mdream/js/dist/splitter.mjs +0 -194
  122. package/node_modules/@mdream/js/package.json +0 -103
  123. package/node_modules/cac/LICENSE +0 -21
  124. package/node_modules/cac/README.md +0 -492
  125. package/node_modules/cac/dist/index.d.ts +0 -196
  126. package/node_modules/cac/dist/index.js +0 -638
  127. package/node_modules/cac/package.json +0 -72
  128. package/node_modules/mdream/LICENSE.md +0 -9
  129. package/node_modules/mdream/README.md +0 -1091
  130. package/node_modules/mdream/bin/mdream.mjs +0 -46
  131. package/node_modules/mdream/dist/browser.d.mts +0 -105
  132. package/node_modules/mdream/dist/browser.mjs +0 -262
  133. package/node_modules/mdream/dist/edge.d.mts +0 -100
  134. package/node_modules/mdream/dist/edge.mjs +0 -250
  135. package/node_modules/mdream/dist/iife.js +0 -605
  136. package/node_modules/mdream/dist/index.d.mts +0 -89
  137. package/node_modules/mdream/dist/index.mjs +0 -184
  138. package/node_modules/mdream/dist/wasm.d.mts +0 -100
  139. package/node_modules/mdream/dist/wasm.mjs +0 -140
  140. package/node_modules/mdream/dist/worker.d.mts +0 -101
  141. package/node_modules/mdream/dist/worker.mjs +0 -217
  142. package/node_modules/mdream/napi/index.d.mts +0 -127
  143. package/node_modules/mdream/napi/index.d.ts +0 -127
  144. package/node_modules/mdream/napi/index.mjs +0 -725
  145. package/node_modules/mdream/napi/rust.android-arm-eabi.node +0 -0
  146. package/node_modules/mdream/napi/rust.android-arm64.node +0 -0
  147. package/node_modules/mdream/napi/rust.darwin-arm64.node +0 -0
  148. package/node_modules/mdream/napi/rust.darwin-x64.node +0 -0
  149. package/node_modules/mdream/napi/rust.freebsd-x64.node +0 -0
  150. package/node_modules/mdream/napi/rust.linux-arm-gnueabihf.node +0 -0
  151. package/node_modules/mdream/napi/rust.linux-arm64-gnu.node +0 -0
  152. package/node_modules/mdream/napi/rust.linux-arm64-musl.node +0 -0
  153. package/node_modules/mdream/napi/rust.linux-x64-gnu.node +0 -0
  154. package/node_modules/mdream/napi/rust.linux-x64-musl.node +0 -0
  155. package/node_modules/mdream/napi/rust.wasi.cjs +0 -2144
  156. package/node_modules/mdream/napi/rust.wasm32-wasi.wasm +0 -0
  157. package/node_modules/mdream/napi/rust.win32-arm64-msvc.node +0 -0
  158. package/node_modules/mdream/napi/rust.win32-x64-msvc.node +0 -0
  159. package/node_modules/mdream/node_modules/@emnapi/core/LICENSE +0 -21
  160. package/node_modules/mdream/node_modules/@emnapi/core/README.md +0 -1
  161. package/node_modules/mdream/node_modules/@emnapi/core/dist/emnapi-core.d.ts +0 -392
  162. package/node_modules/mdream/node_modules/@emnapi/core/dist/emnapi-core.full.d.ts +0 -392
  163. package/node_modules/mdream/node_modules/@emnapi/core/dist/emnapi-core.full.js +0 -8351
  164. package/node_modules/mdream/node_modules/@emnapi/core/dist/emnapi-core.js +0 -7268
  165. package/node_modules/mdream/node_modules/@emnapi/core/dist/plugins/async-work.d.ts +0 -5
  166. package/node_modules/mdream/node_modules/@emnapi/core/dist/plugins/async-work.js +0 -843
  167. package/node_modules/mdream/node_modules/@emnapi/core/dist/plugins/index.d.ts +0 -4
  168. package/node_modules/mdream/node_modules/@emnapi/core/dist/plugins/index.js +0 -3
  169. package/node_modules/mdream/node_modules/@emnapi/core/dist/plugins/threadsafe-function.d.ts +0 -5
  170. package/node_modules/mdream/node_modules/@emnapi/core/dist/plugins/threadsafe-function.js +0 -1010
  171. package/node_modules/mdream/node_modules/@emnapi/core/dist/plugins/v8.d.ts +0 -5
  172. package/node_modules/mdream/node_modules/@emnapi/core/dist/plugins/v8.js +0 -1446
  173. package/node_modules/mdream/node_modules/@emnapi/core/node_modules/@emnapi/wasi-threads/LICENSE +0 -21
  174. package/node_modules/mdream/node_modules/@emnapi/core/node_modules/@emnapi/wasi-threads/README.md +0 -203
  175. package/node_modules/mdream/node_modules/@emnapi/core/node_modules/@emnapi/wasi-threads/dist/wasi-threads.d.ts +0 -236
  176. package/node_modules/mdream/node_modules/@emnapi/core/node_modules/@emnapi/wasi-threads/dist/wasi-threads.js +0 -1086
  177. package/node_modules/mdream/node_modules/@emnapi/core/node_modules/@emnapi/wasi-threads/package.json +0 -35
  178. package/node_modules/mdream/node_modules/@emnapi/core/node_modules/@emnapi/wasi-threads/rollup.config.js +0 -6
  179. package/node_modules/mdream/node_modules/@emnapi/core/package.json +0 -39
  180. package/node_modules/mdream/node_modules/@emnapi/core/rollup.config.js +0 -60
  181. package/node_modules/mdream/node_modules/@emnapi/runtime/LICENSE +0 -21
  182. package/node_modules/mdream/node_modules/@emnapi/runtime/README.md +0 -1
  183. package/node_modules/mdream/node_modules/@emnapi/runtime/dist/emnapi.d.ts +0 -833
  184. package/node_modules/mdream/node_modules/@emnapi/runtime/dist/emnapi.js +0 -2306
  185. package/node_modules/mdream/node_modules/@emnapi/runtime/dist/emnapi.js.map +0 -1
  186. package/node_modules/mdream/node_modules/@emnapi/runtime/index.cjs +0 -63
  187. package/node_modules/mdream/node_modules/@emnapi/runtime/package.json +0 -39
  188. package/node_modules/mdream/node_modules/@emnapi/runtime/rollup.config.js +0 -25
  189. package/node_modules/mdream/node_modules/@emnapi/wasi-threads/LICENSE +0 -21
  190. package/node_modules/mdream/node_modules/@emnapi/wasi-threads/README.md +0 -203
  191. package/node_modules/mdream/node_modules/@emnapi/wasi-threads/dist/wasi-threads.d.ts +0 -240
  192. package/node_modules/mdream/node_modules/@emnapi/wasi-threads/dist/wasi-threads.js +0 -1118
  193. package/node_modules/mdream/node_modules/@emnapi/wasi-threads/package.json +0 -35
  194. package/node_modules/mdream/node_modules/@emnapi/wasi-threads/rollup.config.js +0 -6
  195. package/node_modules/mdream/node_modules/@napi-rs/wasm-runtime/dist/emnapi-plugins.cjs +0 -1472
  196. package/node_modules/mdream/node_modules/@napi-rs/wasm-runtime/dist/emnapi-plugins.js +0 -1470
  197. package/node_modules/mdream/node_modules/@napi-rs/wasm-runtime/dist/fs-proxy.cjs +0 -237
  198. package/node_modules/mdream/node_modules/@napi-rs/wasm-runtime/dist/fs.js +0 -17578
  199. package/node_modules/mdream/node_modules/@napi-rs/wasm-runtime/fs-proxy.js +0 -317
  200. package/node_modules/mdream/node_modules/@napi-rs/wasm-runtime/package.json +0 -67
  201. package/node_modules/mdream/node_modules/@napi-rs/wasm-runtime/runtime.cjs +0 -39
  202. package/node_modules/mdream/node_modules/@napi-rs/wasm-runtime/runtime.js +0 -36
  203. package/node_modules/mdream/node_modules/@tybys/wasm-util/LICENSE +0 -21
  204. package/node_modules/mdream/node_modules/@tybys/wasm-util/README.md +0 -193
  205. package/node_modules/mdream/node_modules/@tybys/wasm-util/dist/tsdoc-metadata.json +0 -11
  206. package/node_modules/mdream/node_modules/@tybys/wasm-util/dist/wasm-util.d.ts +0 -423
  207. package/node_modules/mdream/node_modules/@tybys/wasm-util/dist/wasm-util.esm-bundler.js +0 -2932
  208. package/node_modules/mdream/node_modules/@tybys/wasm-util/dist/wasm-util.esm.js +0 -2932
  209. package/node_modules/mdream/node_modules/@tybys/wasm-util/dist/wasm-util.esm.min.js +0 -1
  210. package/node_modules/mdream/node_modules/@tybys/wasm-util/dist/wasm-util.js +0 -2954
  211. package/node_modules/mdream/node_modules/@tybys/wasm-util/dist/wasm-util.min.js +0 -1
  212. package/node_modules/mdream/node_modules/@tybys/wasm-util/lib/cjs/asyncify.js +0 -158
  213. package/node_modules/mdream/node_modules/@tybys/wasm-util/lib/cjs/index.js +0 -13
  214. package/node_modules/mdream/node_modules/@tybys/wasm-util/lib/cjs/jspi.js +0 -46
  215. package/node_modules/mdream/node_modules/@tybys/wasm-util/lib/cjs/load.js +0 -97
  216. package/node_modules/mdream/node_modules/@tybys/wasm-util/lib/cjs/memory.js +0 -35
  217. package/node_modules/mdream/node_modules/@tybys/wasm-util/lib/cjs/wasi/error.js +0 -103
  218. package/node_modules/mdream/node_modules/@tybys/wasm-util/lib/cjs/wasi/fd.js +0 -268
  219. package/node_modules/mdream/node_modules/@tybys/wasm-util/lib/cjs/wasi/fs.js +0 -3
  220. package/node_modules/mdream/node_modules/@tybys/wasm-util/lib/cjs/wasi/index.js +0 -192
  221. package/node_modules/mdream/node_modules/@tybys/wasm-util/lib/cjs/wasi/path.js +0 -316
  222. package/node_modules/mdream/node_modules/@tybys/wasm-util/lib/cjs/wasi/preview1.js +0 -1599
  223. package/node_modules/mdream/node_modules/@tybys/wasm-util/lib/cjs/wasi/rights.js +0 -141
  224. package/node_modules/mdream/node_modules/@tybys/wasm-util/lib/cjs/wasi/types.js +0 -220
  225. package/node_modules/mdream/node_modules/@tybys/wasm-util/lib/cjs/wasi/util.js +0 -128
  226. package/node_modules/mdream/node_modules/@tybys/wasm-util/lib/cjs/webassembly.js +0 -13
  227. package/node_modules/mdream/node_modules/@tybys/wasm-util/lib/mjs/asyncify.mjs +0 -153
  228. package/node_modules/mdream/node_modules/@tybys/wasm-util/lib/mjs/index.mjs +0 -9
  229. package/node_modules/mdream/node_modules/@tybys/wasm-util/lib/mjs/jspi.mjs +0 -39
  230. package/node_modules/mdream/node_modules/@tybys/wasm-util/lib/mjs/load.mjs +0 -89
  231. package/node_modules/mdream/node_modules/@tybys/wasm-util/lib/mjs/memory.mjs +0 -28
  232. package/node_modules/mdream/node_modules/@tybys/wasm-util/lib/mjs/wasi/error.mjs +0 -97
  233. package/node_modules/mdream/node_modules/@tybys/wasm-util/lib/mjs/wasi/fd.mjs +0 -256
  234. package/node_modules/mdream/node_modules/@tybys/wasm-util/lib/mjs/wasi/fs.mjs +0 -1
  235. package/node_modules/mdream/node_modules/@tybys/wasm-util/lib/mjs/wasi/index.mjs +0 -186
  236. package/node_modules/mdream/node_modules/@tybys/wasm-util/lib/mjs/wasi/path.mjs +0 -310
  237. package/node_modules/mdream/node_modules/@tybys/wasm-util/lib/mjs/wasi/preview1.mjs +0 -1593
  238. package/node_modules/mdream/node_modules/@tybys/wasm-util/lib/mjs/wasi/rights.mjs +0 -135
  239. package/node_modules/mdream/node_modules/@tybys/wasm-util/lib/mjs/wasi/types.mjs +0 -216
  240. package/node_modules/mdream/node_modules/@tybys/wasm-util/lib/mjs/wasi/util.mjs +0 -113
  241. package/node_modules/mdream/node_modules/@tybys/wasm-util/lib/mjs/webassembly.mjs +0 -9
  242. package/node_modules/mdream/node_modules/@tybys/wasm-util/package.json +0 -58
  243. package/node_modules/mdream/node_modules/tslib/CopyrightNotice.txt +0 -15
  244. package/node_modules/mdream/node_modules/tslib/LICENSE.txt +0 -12
  245. package/node_modules/mdream/node_modules/tslib/README.md +0 -164
  246. package/node_modules/mdream/node_modules/tslib/SECURITY.md +0 -41
  247. package/node_modules/mdream/node_modules/tslib/modules/index.d.ts +0 -38
  248. package/node_modules/mdream/node_modules/tslib/modules/index.js +0 -70
  249. package/node_modules/mdream/node_modules/tslib/modules/package.json +0 -3
  250. package/node_modules/mdream/node_modules/tslib/package.json +0 -47
  251. package/node_modules/mdream/node_modules/tslib/tslib.d.ts +0 -460
  252. package/node_modules/mdream/node_modules/tslib/tslib.es6.html +0 -1
  253. package/node_modules/mdream/node_modules/tslib/tslib.es6.js +0 -402
  254. package/node_modules/mdream/node_modules/tslib/tslib.es6.mjs +0 -401
  255. package/node_modules/mdream/node_modules/tslib/tslib.html +0 -1
  256. package/node_modules/mdream/node_modules/tslib/tslib.js +0 -484
  257. package/node_modules/mdream/package.json +0 -110
  258. package/node_modules/mdream/skills/mdream/SKILL.md +0 -124
  259. package/node_modules/mdream/skills/mdream/references/runtimes.md +0 -49
  260. package/node_modules/mdream/wasm/mdream_edge.d.ts +0 -90
  261. package/node_modules/mdream/wasm/mdream_edge.js +0 -517
  262. package/node_modules/mdream/wasm/mdream_edge_bg.wasm +0 -0
  263. package/node_modules/mdream/wasm/mdream_edge_bg.wasm.d.ts +0 -20
  264. package/node_modules/mdream/wasm/package.json +0 -17
  265. package/node_modules/mdream/wasm-bundler/mdream_edge.d.ts +0 -45
  266. package/node_modules/mdream/wasm-bundler/mdream_edge.js +0 -13
  267. package/node_modules/mdream/wasm-bundler/mdream_edge_bg.js +0 -413
  268. package/node_modules/mdream/wasm-bundler/mdream_edge_bg.wasm +0 -0
  269. package/node_modules/mdream/wasm-bundler/mdream_edge_bg.wasm.d.ts +0 -20
  270. package/node_modules/mdream/wasm-bundler/package.json +0 -19
  271. package/node_modules/pathe/LICENSE +0 -70
  272. package/node_modules/pathe/README.md +0 -73
  273. package/node_modules/pathe/dist/index.cjs +0 -39
  274. package/node_modules/pathe/dist/index.d.cts +0 -47
  275. package/node_modules/pathe/dist/index.d.mts +0 -47
  276. package/node_modules/pathe/dist/index.d.ts +0 -47
  277. package/node_modules/pathe/dist/index.mjs +0 -19
  278. package/node_modules/pathe/dist/shared/pathe.BSlhyZSM.cjs +0 -266
  279. package/node_modules/pathe/dist/shared/pathe.M-eThtNZ.mjs +0 -249
  280. package/node_modules/pathe/dist/utils.cjs +0 -82
  281. package/node_modules/pathe/dist/utils.d.cts +0 -32
  282. package/node_modules/pathe/dist/utils.d.mts +0 -32
  283. package/node_modules/pathe/dist/utils.d.ts +0 -32
  284. package/node_modules/pathe/dist/utils.mjs +0 -77
  285. package/node_modules/pathe/package.json +0 -61
  286. package/node_modules/pathe/utils.d.ts +0 -1
@@ -1,82 +0,0 @@
1
- 'use strict';
2
-
3
- const _path = require('./shared/pathe.BSlhyZSM.cjs');
4
-
5
- const pathSeparators = /* @__PURE__ */ new Set(["/", "\\", void 0]);
6
- const normalizedAliasSymbol = Symbol.for("pathe:normalizedAlias");
7
- const SLASH_RE = /[/\\]/;
8
- function normalizeAliases(_aliases) {
9
- if (_aliases[normalizedAliasSymbol]) {
10
- return _aliases;
11
- }
12
- const aliases = Object.fromEntries(
13
- Object.entries(_aliases).sort(([a], [b]) => _compareAliases(a, b))
14
- );
15
- for (const key in aliases) {
16
- for (const alias in aliases) {
17
- if (alias === key || key.startsWith(alias)) {
18
- continue;
19
- }
20
- if (aliases[key]?.startsWith(alias) && pathSeparators.has(aliases[key][alias.length])) {
21
- aliases[key] = aliases[alias] + aliases[key].slice(alias.length);
22
- }
23
- }
24
- }
25
- Object.defineProperty(aliases, normalizedAliasSymbol, {
26
- value: true,
27
- enumerable: false
28
- });
29
- return aliases;
30
- }
31
- function resolveAlias(path, aliases) {
32
- const _path$1 = _path.normalizeWindowsPath(path);
33
- aliases = normalizeAliases(aliases);
34
- for (const [alias, to] of Object.entries(aliases)) {
35
- if (!_path$1.startsWith(alias)) {
36
- continue;
37
- }
38
- const _alias = hasTrailingSlash(alias) ? alias.slice(0, -1) : alias;
39
- if (hasTrailingSlash(_path$1[_alias.length])) {
40
- return _path.join(to, _path$1.slice(alias.length));
41
- }
42
- }
43
- return _path$1;
44
- }
45
- function reverseResolveAlias(path, aliases) {
46
- const _path$1 = _path.normalizeWindowsPath(path);
47
- aliases = normalizeAliases(aliases);
48
- const matches = [];
49
- for (const [to, alias] of Object.entries(aliases)) {
50
- if (!_path$1.startsWith(alias)) {
51
- continue;
52
- }
53
- const _alias = hasTrailingSlash(alias) ? alias.slice(0, -1) : alias;
54
- if (hasTrailingSlash(_path$1[_alias.length])) {
55
- matches.push(_path.join(to, _path$1.slice(alias.length)));
56
- }
57
- }
58
- return matches.sort((a, b) => b.length - a.length);
59
- }
60
- function filename(path) {
61
- const base = path.split(SLASH_RE).pop();
62
- if (!base) {
63
- return void 0;
64
- }
65
- const separatorIndex = base.lastIndexOf(".");
66
- if (separatorIndex <= 0) {
67
- return base;
68
- }
69
- return base.slice(0, separatorIndex);
70
- }
71
- function _compareAliases(a, b) {
72
- return b.split("/").length - a.split("/").length;
73
- }
74
- function hasTrailingSlash(path = "/") {
75
- const lastChar = path[path.length - 1];
76
- return lastChar === "/" || lastChar === "\\";
77
- }
78
-
79
- exports.filename = filename;
80
- exports.normalizeAliases = normalizeAliases;
81
- exports.resolveAlias = resolveAlias;
82
- exports.reverseResolveAlias = reverseResolveAlias;
@@ -1,32 +0,0 @@
1
- /**
2
- * Normalises alias mappings, ensuring that more specific aliases are resolved before less specific ones.
3
- * This function also ensures that aliases do not resolve to themselves cyclically.
4
- *
5
- * @param _aliases - A set of alias mappings where each key is an alias and its value is the actual path it points to.
6
- * @returns a set of normalised alias mappings.
7
- */
8
- declare function normalizeAliases(_aliases: Record<string, string>): Record<string, string>;
9
- /**
10
- * Resolves a path string to its alias if applicable, otherwise returns the original path.
11
- * This function normalises the path, resolves the alias and then joins it to the alias target if necessary.
12
- *
13
- * @param path - The path string to resolve.
14
- * @param aliases - A set of alias mappings to use for resolution.
15
- * @returns the resolved path as a string.
16
- */
17
- declare function resolveAlias(path: string, aliases: Record<string, string>): string;
18
- /**
19
- * Resolves a path string to its possible alias.
20
- *
21
- * Returns an array of possible alias resolutions (could be empty), sorted by specificity (longest first).
22
- */
23
- declare function reverseResolveAlias(path: string, aliases: Record<string, string>): string[];
24
- /**
25
- * Extracts the filename from a given path, excluding any directory paths and the file extension.
26
- *
27
- * @param path - The full path of the file from which to extract the filename.
28
- * @returns the filename without the extension, or `undefined` if the filename cannot be extracted.
29
- */
30
- declare function filename(path: string): string | undefined;
31
-
32
- export { filename, normalizeAliases, resolveAlias, reverseResolveAlias };
@@ -1,32 +0,0 @@
1
- /**
2
- * Normalises alias mappings, ensuring that more specific aliases are resolved before less specific ones.
3
- * This function also ensures that aliases do not resolve to themselves cyclically.
4
- *
5
- * @param _aliases - A set of alias mappings where each key is an alias and its value is the actual path it points to.
6
- * @returns a set of normalised alias mappings.
7
- */
8
- declare function normalizeAliases(_aliases: Record<string, string>): Record<string, string>;
9
- /**
10
- * Resolves a path string to its alias if applicable, otherwise returns the original path.
11
- * This function normalises the path, resolves the alias and then joins it to the alias target if necessary.
12
- *
13
- * @param path - The path string to resolve.
14
- * @param aliases - A set of alias mappings to use for resolution.
15
- * @returns the resolved path as a string.
16
- */
17
- declare function resolveAlias(path: string, aliases: Record<string, string>): string;
18
- /**
19
- * Resolves a path string to its possible alias.
20
- *
21
- * Returns an array of possible alias resolutions (could be empty), sorted by specificity (longest first).
22
- */
23
- declare function reverseResolveAlias(path: string, aliases: Record<string, string>): string[];
24
- /**
25
- * Extracts the filename from a given path, excluding any directory paths and the file extension.
26
- *
27
- * @param path - The full path of the file from which to extract the filename.
28
- * @returns the filename without the extension, or `undefined` if the filename cannot be extracted.
29
- */
30
- declare function filename(path: string): string | undefined;
31
-
32
- export { filename, normalizeAliases, resolveAlias, reverseResolveAlias };
@@ -1,32 +0,0 @@
1
- /**
2
- * Normalises alias mappings, ensuring that more specific aliases are resolved before less specific ones.
3
- * This function also ensures that aliases do not resolve to themselves cyclically.
4
- *
5
- * @param _aliases - A set of alias mappings where each key is an alias and its value is the actual path it points to.
6
- * @returns a set of normalised alias mappings.
7
- */
8
- declare function normalizeAliases(_aliases: Record<string, string>): Record<string, string>;
9
- /**
10
- * Resolves a path string to its alias if applicable, otherwise returns the original path.
11
- * This function normalises the path, resolves the alias and then joins it to the alias target if necessary.
12
- *
13
- * @param path - The path string to resolve.
14
- * @param aliases - A set of alias mappings to use for resolution.
15
- * @returns the resolved path as a string.
16
- */
17
- declare function resolveAlias(path: string, aliases: Record<string, string>): string;
18
- /**
19
- * Resolves a path string to its possible alias.
20
- *
21
- * Returns an array of possible alias resolutions (could be empty), sorted by specificity (longest first).
22
- */
23
- declare function reverseResolveAlias(path: string, aliases: Record<string, string>): string[];
24
- /**
25
- * Extracts the filename from a given path, excluding any directory paths and the file extension.
26
- *
27
- * @param path - The full path of the file from which to extract the filename.
28
- * @returns the filename without the extension, or `undefined` if the filename cannot be extracted.
29
- */
30
- declare function filename(path: string): string | undefined;
31
-
32
- export { filename, normalizeAliases, resolveAlias, reverseResolveAlias };
@@ -1,77 +0,0 @@
1
- import { g as normalizeWindowsPath, j as join } from './shared/pathe.M-eThtNZ.mjs';
2
-
3
- const pathSeparators = /* @__PURE__ */ new Set(["/", "\\", void 0]);
4
- const normalizedAliasSymbol = Symbol.for("pathe:normalizedAlias");
5
- const SLASH_RE = /[/\\]/;
6
- function normalizeAliases(_aliases) {
7
- if (_aliases[normalizedAliasSymbol]) {
8
- return _aliases;
9
- }
10
- const aliases = Object.fromEntries(
11
- Object.entries(_aliases).sort(([a], [b]) => _compareAliases(a, b))
12
- );
13
- for (const key in aliases) {
14
- for (const alias in aliases) {
15
- if (alias === key || key.startsWith(alias)) {
16
- continue;
17
- }
18
- if (aliases[key]?.startsWith(alias) && pathSeparators.has(aliases[key][alias.length])) {
19
- aliases[key] = aliases[alias] + aliases[key].slice(alias.length);
20
- }
21
- }
22
- }
23
- Object.defineProperty(aliases, normalizedAliasSymbol, {
24
- value: true,
25
- enumerable: false
26
- });
27
- return aliases;
28
- }
29
- function resolveAlias(path, aliases) {
30
- const _path = normalizeWindowsPath(path);
31
- aliases = normalizeAliases(aliases);
32
- for (const [alias, to] of Object.entries(aliases)) {
33
- if (!_path.startsWith(alias)) {
34
- continue;
35
- }
36
- const _alias = hasTrailingSlash(alias) ? alias.slice(0, -1) : alias;
37
- if (hasTrailingSlash(_path[_alias.length])) {
38
- return join(to, _path.slice(alias.length));
39
- }
40
- }
41
- return _path;
42
- }
43
- function reverseResolveAlias(path, aliases) {
44
- const _path = normalizeWindowsPath(path);
45
- aliases = normalizeAliases(aliases);
46
- const matches = [];
47
- for (const [to, alias] of Object.entries(aliases)) {
48
- if (!_path.startsWith(alias)) {
49
- continue;
50
- }
51
- const _alias = hasTrailingSlash(alias) ? alias.slice(0, -1) : alias;
52
- if (hasTrailingSlash(_path[_alias.length])) {
53
- matches.push(join(to, _path.slice(alias.length)));
54
- }
55
- }
56
- return matches.sort((a, b) => b.length - a.length);
57
- }
58
- function filename(path) {
59
- const base = path.split(SLASH_RE).pop();
60
- if (!base) {
61
- return void 0;
62
- }
63
- const separatorIndex = base.lastIndexOf(".");
64
- if (separatorIndex <= 0) {
65
- return base;
66
- }
67
- return base.slice(0, separatorIndex);
68
- }
69
- function _compareAliases(a, b) {
70
- return b.split("/").length - a.split("/").length;
71
- }
72
- function hasTrailingSlash(path = "/") {
73
- const lastChar = path[path.length - 1];
74
- return lastChar === "/" || lastChar === "\\";
75
- }
76
-
77
- export { filename, normalizeAliases, resolveAlias, reverseResolveAlias };
@@ -1,61 +0,0 @@
1
- {
2
- "name": "pathe",
3
- "version": "2.0.3",
4
- "description": "Universal filesystem path utils",
5
- "repository": "unjs/pathe",
6
- "license": "MIT",
7
- "sideEffects": false,
8
- "type": "module",
9
- "exports": {
10
- ".": {
11
- "import": {
12
- "types": "./dist/index.d.mts",
13
- "default": "./dist/index.mjs"
14
- },
15
- "require": {
16
- "types": "./dist/index.d.cts",
17
- "default": "./dist/index.cjs"
18
- }
19
- },
20
- "./utils": {
21
- "import": {
22
- "types": "./dist/utils.d.mts",
23
- "default": "./dist/utils.mjs"
24
- },
25
- "require": {
26
- "types": "./dist/utils.d.cts",
27
- "default": "./dist/utils.cjs"
28
- }
29
- }
30
- },
31
- "main": "./dist/index.cjs",
32
- "module": "./dist/index.mjs",
33
- "types": "./dist/index.d.ts",
34
- "files": [
35
- "dist",
36
- "utils.d.ts"
37
- ],
38
- "devDependencies": {
39
- "@types/node": "^22.13.1",
40
- "@vitest/coverage-v8": "^3.0.5",
41
- "changelogen": "^0.5.7",
42
- "esbuild": "^0.25.0",
43
- "eslint": "^9.20.1",
44
- "eslint-config-unjs": "^0.4.2",
45
- "jiti": "^2.4.2",
46
- "prettier": "^3.5.0",
47
- "typescript": "^5.7.3",
48
- "unbuild": "^3.3.1",
49
- "vitest": "^3.0.5",
50
- "zeptomatch": "^2.0.0"
51
- },
52
- "scripts": {
53
- "build": "unbuild",
54
- "dev": "vitest",
55
- "lint": "eslint . && prettier -c src test",
56
- "lint:fix": "eslint . --fix && prettier -w src test",
57
- "release": "pnpm test && pnpm build && changelogen --release && pnpm publish && git push --follow-tags",
58
- "test": "pnpm lint && vitest run --coverage",
59
- "test:types": "tsc --noEmit"
60
- }
61
- }
@@ -1 +0,0 @@
1
- export * from "./dist/utils";