nuxt-link-checker 3.0.2 → 3.1.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 (379) hide show
  1. package/dist/client/200.html +207 -198
  2. package/dist/client/404.html +207 -198
  3. package/dist/client/_nuxt/16u1w-DC.js +1 -0
  4. package/dist/client/_nuxt/4JG6XROL.js +1 -0
  5. package/dist/client/_nuxt/6bkCFmAg.js +1 -0
  6. package/dist/client/_nuxt/{DZqG9GXz.js → 8R90CSQj.js} +1 -31
  7. package/dist/client/_nuxt/{CsYA0RN7.js → A4Fa72hX.js} +1 -1
  8. package/dist/client/_nuxt/{CJQrLysU.js → AoxqhCl0.js} +1 -1
  9. package/dist/client/_nuxt/B2Zkg-Ae.js +5 -0
  10. package/dist/client/_nuxt/B3a86pAO.js +1 -0
  11. package/dist/client/_nuxt/B3yJX9Qu.js +1 -0
  12. package/dist/client/_nuxt/B5--Xptx.js +1 -0
  13. package/dist/client/_nuxt/B5La0Eyp.js +1 -0
  14. package/dist/client/_nuxt/{Bj0fF4lQ.js → B5USdwzW.js} +1 -1
  15. package/dist/client/_nuxt/B5v32tNS.js +3 -0
  16. package/dist/client/_nuxt/B7wwdegY.js +1 -0
  17. package/dist/client/_nuxt/{BMHPAh1U.js → B7zm8LFH.js} +1 -1
  18. package/dist/client/_nuxt/{9ZOzOPqN.js → B8yeR86s.js} +1 -1
  19. package/dist/client/_nuxt/B9MAV_WH.js +1 -0
  20. package/dist/client/_nuxt/{C2TBxDwV.js → B9afuS00.js} +1 -1
  21. package/dist/client/_nuxt/BC7ivatP.js +1 -0
  22. package/dist/client/_nuxt/BD3t3nJY.js +1 -0
  23. package/dist/client/_nuxt/BDJ7po1j.js +1 -0
  24. package/dist/client/_nuxt/BDUkJJFZ.js +1 -0
  25. package/dist/client/_nuxt/BEIEqD7s.js +1 -0
  26. package/dist/client/_nuxt/{DKb4lQY2.js → BEPTDMGr.js} +1 -1
  27. package/dist/client/_nuxt/BESheOyt.js +1 -0
  28. package/dist/client/_nuxt/BFO9THtE.js +1 -0
  29. package/dist/client/_nuxt/BICcMyTi.js +1 -0
  30. package/dist/client/_nuxt/{DR5YgmI2.js → BIboXAcp.js} +1 -1
  31. package/dist/client/_nuxt/BLmvGqlk.js +1 -0
  32. package/dist/client/_nuxt/BMRpS3Xo.js +1 -0
  33. package/dist/client/_nuxt/BMkdSFOr.js +1 -0
  34. package/dist/client/_nuxt/BNuYtHxo.js +1 -0
  35. package/dist/client/_nuxt/{BaNxgKSR.js → BOCDpWc1.js} +1 -1
  36. package/dist/client/_nuxt/BOtZLFcM.js +3 -0
  37. package/dist/client/_nuxt/BPhJoBd6.js +1 -0
  38. package/dist/client/_nuxt/BQgbS7Yt.js +1 -0
  39. package/dist/client/_nuxt/BSSAUge4.js +1 -0
  40. package/dist/client/_nuxt/BTO_K1fm.js +1 -0
  41. package/dist/client/_nuxt/{D7us1Eal.js → BUHxxkk0.js} +1 -1
  42. package/dist/client/_nuxt/BUQ2FcJX.js +1 -0
  43. package/dist/client/_nuxt/BVsCzzYp.js +1 -0
  44. package/dist/client/_nuxt/BXP-NDAE.js +1 -0
  45. package/dist/client/_nuxt/BY8_eel9.js +1 -0
  46. package/dist/client/_nuxt/BYelj_cE.js +1 -0
  47. package/dist/client/_nuxt/B_Sdu6N9.js +1 -0
  48. package/dist/client/_nuxt/BbPU79SD.js +165 -0
  49. package/dist/client/_nuxt/BccEf5hb.js +1 -0
  50. package/dist/client/_nuxt/{DsfXcHUZ.js → Bcn1f5Rp.js} +1 -27
  51. package/dist/client/_nuxt/{CqYeW6XZ.js → BeqgMazi.js} +1 -1
  52. package/dist/client/_nuxt/{D33OKbkv.js → BfBkfEDj.js} +1 -1
  53. package/dist/client/_nuxt/BiU8-mv6.js +1 -0
  54. package/dist/client/_nuxt/{CdedUr_-.js → BiVAY1KT.js} +1 -1
  55. package/dist/client/_nuxt/BltGI4TE.js +1 -0
  56. package/dist/client/_nuxt/BpDWT_aG.js +1 -0
  57. package/dist/client/_nuxt/BqpV9M7Y.js +16 -0
  58. package/dist/client/_nuxt/BrHEiNXv.js +1 -0
  59. package/dist/client/_nuxt/BspO9hSn.js +1 -0
  60. package/dist/client/_nuxt/Bszlo9K_.js +1 -0
  61. package/dist/client/_nuxt/BuqjW-Uc.js +1 -0
  62. package/dist/client/_nuxt/ByGMIDPY.js +1 -0
  63. package/dist/client/_nuxt/BzeF2RWN.js +1 -0
  64. package/dist/client/_nuxt/{BeX7Iu5M.js → C17JnZbq.js} +1 -90
  65. package/dist/client/_nuxt/C31OBGbl.js +1 -0
  66. package/dist/client/_nuxt/C3NvtN4M.js +1 -0
  67. package/dist/client/_nuxt/{BXfENWL6.js → C46DigdT.js} +1 -1
  68. package/dist/client/_nuxt/C5QX-GgJ.js +1 -0
  69. package/dist/client/_nuxt/{DXT9h7v2.js → C6F4YvHi.js} +1 -1
  70. package/dist/client/_nuxt/C6pBAdyX.js +1 -0
  71. package/dist/client/_nuxt/C7O_L2NY.js +1 -0
  72. package/dist/client/_nuxt/C7n-thn-.js +1 -0
  73. package/dist/client/_nuxt/C8DXlOXe.js +1 -0
  74. package/dist/client/_nuxt/C8KGJGmD.js +1 -0
  75. package/dist/client/_nuxt/{DVC_qXWv.js → C9X_x5J1.js} +1 -1
  76. package/dist/client/_nuxt/{DhFF74a2.js → CAkjjYd_.js} +1 -1
  77. package/dist/client/_nuxt/CBoehFVA.js +29 -0
  78. package/dist/client/_nuxt/CD1ynQRS.js +1 -0
  79. package/dist/client/_nuxt/CDLXdqou.js +6 -0
  80. package/dist/client/_nuxt/CDNnVXJ3.js +1 -0
  81. package/dist/client/_nuxt/{CrhH3_Og.js → CDzo4tzE.js} +1 -1
  82. package/dist/client/_nuxt/{sQpxpyUs.js → CEuqc8ZQ.js} +1 -1
  83. package/dist/client/_nuxt/{Cq0wM8KE.js → CIJNX9QL.js} +1 -1
  84. package/dist/client/_nuxt/CIlkkgNU.js +4 -0
  85. package/dist/client/_nuxt/{6Kuza3Wr.js → CJ21IjBY.js} +1 -1
  86. package/dist/client/_nuxt/{DGEpfOTx.js → CJYoS41Z.js} +1 -1
  87. package/dist/client/_nuxt/CKpfY2P2.js +1 -0
  88. package/dist/client/_nuxt/{C_8Fx7bH.js → CMiaevpY.js} +1 -1
  89. package/dist/client/_nuxt/CPw9RxLe.js +1 -0
  90. package/dist/client/_nuxt/{BN4LRXf6.js → CT9A9Qiu.js} +1 -1
  91. package/dist/client/_nuxt/{BwXNTs7T.js → CTjLfFPV.js} +1 -1
  92. package/dist/client/_nuxt/CV8JdvfZ.js +1 -0
  93. package/dist/client/_nuxt/{B1nm99XP.js → CXYaz1c9.js} +1 -1
  94. package/dist/client/_nuxt/CYoXbaPV.js +39 -0
  95. package/dist/client/_nuxt/C_D4IvTY.js +1 -0
  96. package/dist/client/_nuxt/C_g069vW.js +1 -0
  97. package/dist/client/_nuxt/CbFpZgCV.js +1 -0
  98. package/dist/client/_nuxt/CbjS_D4a.js +1 -0
  99. package/dist/client/_nuxt/{Ksn5IXup.js → CeUooOMz.js} +1 -1
  100. package/dist/client/_nuxt/{CThH5sBG.js → ChVe37jp.js} +1 -1
  101. package/dist/client/_nuxt/{B9CT-1u6.js → CidHYXz9.js} +1 -7
  102. package/dist/client/_nuxt/CkoJTUbt.js +25 -0
  103. package/dist/client/_nuxt/Clnf9f06.js +1 -0
  104. package/dist/client/_nuxt/{DSsji4Hu.js → CmHkUvIV.js} +1 -1
  105. package/dist/client/_nuxt/{CFF2d1j6.js → CmonagEV.js} +1 -1
  106. package/dist/client/_nuxt/Crs1WKlG.js +1 -0
  107. package/dist/client/_nuxt/{KPqz0Sb3.js → CsW3I34-.js} +1 -1
  108. package/dist/client/_nuxt/CsuMf1xJ.js +1 -0
  109. package/dist/client/_nuxt/Ctb_e1-I.js +1 -0
  110. package/dist/client/_nuxt/{DM4HHECw.js → CwZIVF5c.js} +1 -1
  111. package/dist/client/_nuxt/Cwv93qcC.js +4 -0
  112. package/dist/client/_nuxt/CzrtbdtR.js +1 -0
  113. package/dist/client/_nuxt/D1i8Vxii.js +1 -0
  114. package/dist/client/_nuxt/D46m5Xd3.js +1 -0
  115. package/dist/client/_nuxt/D4LJwL2b.js +1 -0
  116. package/dist/client/_nuxt/D5lQfeOG.js +1 -0
  117. package/dist/client/_nuxt/{8t4jSAMm.js → D6SwP_ef.js} +1 -1
  118. package/dist/client/_nuxt/D7Nx8OLD.js +1 -0
  119. package/dist/client/_nuxt/D85lwgPO.js +1 -0
  120. package/dist/client/_nuxt/D8V69RRQ.js +1 -0
  121. package/dist/client/_nuxt/{BBJYjQ0k.js → D8YTaFMU.js} +1 -1
  122. package/dist/client/_nuxt/D8ecWW_g.js +1 -0
  123. package/dist/client/_nuxt/D9s3Eyz8.js +11 -0
  124. package/dist/client/_nuxt/DA288kE2.js +3 -0
  125. package/dist/client/_nuxt/{CX_FIdg1.js → DDK5Hw8n.js} +1 -1
  126. package/dist/client/_nuxt/DFQMbhFG.js +1 -0
  127. package/dist/client/_nuxt/DFRYOy8B.js +1 -0
  128. package/dist/client/_nuxt/DFaziNDp.js +1 -0
  129. package/dist/client/_nuxt/{CarfVElc.js → DGTPbQyx.js} +1 -54
  130. package/dist/client/_nuxt/{0ooBkv16.js → DHCC4-m4.js} +1 -1
  131. package/dist/client/_nuxt/DIC-ECB_.js +1 -0
  132. package/dist/client/_nuxt/DKgh9jPU.js +20 -0
  133. package/dist/client/_nuxt/DKluMpTE.js +1 -0
  134. package/dist/client/_nuxt/{BZfs-ost.js → DKrjeWrU.js} +1 -1
  135. package/dist/client/_nuxt/{Bh8mriwU.js → DLpTrZod.js} +1 -17
  136. package/dist/client/_nuxt/DOt8O2FJ.js +1 -0
  137. package/dist/client/_nuxt/DOwv4Xrr.js +1 -0
  138. package/dist/client/_nuxt/DQ-rpzxz.js +1 -0
  139. package/dist/client/_nuxt/DQdnirlo.js +1 -0
  140. package/dist/client/_nuxt/DRgydeCt.js +1 -0
  141. package/dist/client/_nuxt/DSPtUMMI.js +1 -0
  142. package/dist/client/_nuxt/DSmiUmWA.js +1 -0
  143. package/dist/client/_nuxt/{ChMCFiS0.js → DT2db06B.js} +1 -1
  144. package/dist/client/_nuxt/DV9_Ze0W.js +1 -0
  145. package/dist/client/_nuxt/{BVLuctcA.js → DWE3vCE5.js} +1 -1
  146. package/dist/client/_nuxt/DYQagCV4.js +1 -0
  147. package/dist/client/_nuxt/DZwJH60W.js +1 -0
  148. package/dist/client/_nuxt/D_nC6SfZ.js +1 -0
  149. package/dist/client/_nuxt/{DGDuLtS6.js → DaDGU6kf.js} +1 -8
  150. package/dist/client/_nuxt/{CMDmr8et.js → DanM9F4-.js} +1 -1
  151. package/dist/client/_nuxt/DfqM7apN.js +1 -0
  152. package/dist/client/_nuxt/{DouzTJIq.js → DgraCSOE.js} +1 -1
  153. package/dist/client/_nuxt/{BR6CMsBL.js → DhldU3XI.js} +1 -1
  154. package/dist/client/_nuxt/Dm9yFT8Y.js +2 -0
  155. package/dist/client/_nuxt/DmAvib0Y.js +1 -0
  156. package/dist/client/_nuxt/DoDCNZ2x.js +1 -0
  157. package/dist/client/_nuxt/{Bgpqy2XC.js → DoQu802G.js} +1 -1
  158. package/dist/client/_nuxt/DoY4Dbtn.js +1 -0
  159. package/dist/client/_nuxt/DqvgqZmm.js +16 -0
  160. package/dist/client/_nuxt/Dtv2yyrc.js +1 -0
  161. package/dist/client/_nuxt/{DJZWsvj0.js → DvreHBtf.js} +1 -1
  162. package/dist/client/_nuxt/DxX6t7GH.js +1 -0
  163. package/dist/client/_nuxt/E1IWMS2c.js +1 -0
  164. package/dist/client/_nuxt/H2A8RXvM.js +1 -0
  165. package/dist/client/_nuxt/{CiRxTSAc.js → I-_ljZ1M.js} +1 -1
  166. package/dist/client/_nuxt/KCgU82S2.js +1 -0
  167. package/dist/client/_nuxt/KN-DOLVO.js +1 -0
  168. package/dist/client/_nuxt/{JgH_6NEN.js → LrshOcZ2.js} +1 -1
  169. package/dist/client/_nuxt/MJ0gDQnJ.js +9 -0
  170. package/dist/client/_nuxt/NboNzovp.js +1 -0
  171. package/dist/client/_nuxt/P3XzCKkX.js +1 -0
  172. package/dist/client/_nuxt/PBlC1IT3.js +1 -0
  173. package/dist/client/_nuxt/PSVKygaU.js +16 -0
  174. package/dist/client/_nuxt/PYrcYqZ1.js +1 -0
  175. package/dist/client/_nuxt/SXuYmi6B.js +1 -0
  176. package/dist/client/_nuxt/Sm_sVxcW.js +14 -0
  177. package/dist/client/_nuxt/TDVTyJvX.js +16 -0
  178. package/dist/client/_nuxt/VVtMly4c.js +3 -0
  179. package/dist/client/_nuxt/{BH1M7C1g.js → VntNkNt1.js} +1 -1
  180. package/dist/client/_nuxt/Wkyh6-uf.js +1 -0
  181. package/dist/client/_nuxt/{I4qd5QHW.js → XP2_9bVu.js} +4 -4
  182. package/dist/client/_nuxt/XrZDCB4K.js +1 -0
  183. package/dist/client/_nuxt/_fwBhpzY.js +1 -0
  184. package/dist/client/_nuxt/a0z0KVy-.js +5 -0
  185. package/dist/client/_nuxt/bEygH-WE.js +3 -0
  186. package/dist/client/_nuxt/bPMpiWut.js +1 -0
  187. package/dist/client/_nuxt/builds/latest.json +1 -1
  188. package/dist/client/_nuxt/builds/meta/9d16464b-977c-4176-975e-a1421ef46ccd.json +1 -0
  189. package/dist/client/_nuxt/{beD-FUib.js → coyhVBVA.js} +1 -1
  190. package/dist/client/_nuxt/{wChcbJ1V.js → d2PdAb0u.js} +1 -36
  191. package/dist/client/_nuxt/entry.BPVwhKGg.css +1 -0
  192. package/dist/client/_nuxt/error-404.BSf4PhTE.css +1 -0
  193. package/dist/client/_nuxt/error-500.hvB5EbC7.css +1 -0
  194. package/dist/client/_nuxt/g4vhSHS2.js +1 -0
  195. package/dist/client/_nuxt/gwSZkKbG.js +1 -0
  196. package/dist/client/_nuxt/iYrPSY0y.js +1 -0
  197. package/dist/client/_nuxt/{Dwo2i-71.js → kZiYIjIU.js} +1 -1
  198. package/dist/client/_nuxt/lOwNZ7_V.js +1 -0
  199. package/dist/client/_nuxt/{BmCW-tYz.js → nc-bU77P.js} +4 -78
  200. package/dist/client/_nuxt/nfCtBF4F.js +1 -0
  201. package/dist/client/_nuxt/pit2X7C0.js +1 -0
  202. package/dist/client/_nuxt/r5D-aIjp.js +1 -0
  203. package/dist/client/_nuxt/rh45RTDP.js +1 -0
  204. package/dist/client/_nuxt/tgs8ujlj.js +1 -0
  205. package/dist/client/_nuxt/v_4dTNAb.js +1 -0
  206. package/dist/client/_nuxt/vvK2q8Zt.js +1 -0
  207. package/dist/client/_nuxt/{Bj5xdiaE.js → xuIuMB9j.js} +1 -1
  208. package/dist/client/_nuxt/yOCz8xPT.js +1 -0
  209. package/dist/client/_nuxt/zt9m_cFA.js +8 -0
  210. package/dist/client/index.html +207 -198
  211. package/dist/module.d.mts +16 -4
  212. package/dist/module.d.ts +16 -4
  213. package/dist/module.json +2 -2
  214. package/dist/module.mjs +50 -16
  215. package/dist/runtime/nitro/composables/content-mock.d.ts +1 -0
  216. package/dist/runtime/nitro/composables/content-mock.js +3 -0
  217. package/dist/runtime/nitro/routes/__link-checker__/inspect.d.ts +1 -1
  218. package/dist/runtime/nitro/routes/__link-checker__/inspect.js +13 -9
  219. package/dist/runtime/nitro/routes/__link-checker__/links.d.ts +1 -1
  220. package/dist/runtime/nitro/routes/__link-checker__/links.js +32 -6
  221. package/dist/runtime/nuxt/plugin/ui.client.js +3 -1
  222. package/dist/runtime/nuxt/plugin/view/Main.vue +2 -2
  223. package/dist/runtime/nuxt/plugin/view/client.d.ts +3 -1
  224. package/dist/runtime/nuxt/plugin/view/client.js +9 -10
  225. package/dist/runtime/pure/index.d.ts +5 -0
  226. package/dist/runtime/pure/index.js +12 -0
  227. package/dist/runtime/pure/inspect.d.ts +2 -20
  228. package/dist/runtime/pure/inspect.js +12 -11
  229. package/dist/runtime/pure/inspections/absolute-site-urls.js +3 -4
  230. package/dist/runtime/pure/inspections/descriptive-link-text.js +1 -0
  231. package/dist/runtime/pure/inspections/missing-hash.js +1 -0
  232. package/dist/runtime/pure/inspections/no-baseless.js +1 -0
  233. package/dist/runtime/pure/inspections/no-error-response-status.js +5 -4
  234. package/dist/runtime/pure/inspections/no-javascript.js +1 -0
  235. package/dist/runtime/pure/inspections/trailing-slash.js +1 -0
  236. package/dist/runtime/pure/redirects.js +1 -0
  237. package/dist/runtime/types.d.ts +6 -3
  238. package/package.json +33 -27
  239. package/dist/client/_nuxt/-7WWnkdy.js +0 -517
  240. package/dist/client/_nuxt/1Je9_Reo.js +0 -136
  241. package/dist/client/_nuxt/1rqFXsGc.js +0 -666
  242. package/dist/client/_nuxt/37ic6j3l.js +0 -1
  243. package/dist/client/_nuxt/3ghuYFLd.js +0 -1
  244. package/dist/client/_nuxt/9B1nZgL-.js +0 -1
  245. package/dist/client/_nuxt/AgnqFTPX.js +0 -13
  246. package/dist/client/_nuxt/B3g-KkBK.js +0 -1
  247. package/dist/client/_nuxt/B4yE-MfL.js +0 -38
  248. package/dist/client/_nuxt/B6bHXiXE.js +0 -25
  249. package/dist/client/_nuxt/B7rNE5kf.js +0 -1
  250. package/dist/client/_nuxt/BB42E8aY.js +0 -186
  251. package/dist/client/_nuxt/BBBqETUW.js +0 -1
  252. package/dist/client/_nuxt/BEjL32p1.js +0 -5754
  253. package/dist/client/_nuxt/BF6G6X0H.js +0 -1
  254. package/dist/client/_nuxt/BH_RS3WO.js +0 -1
  255. package/dist/client/_nuxt/BICIrM8O.js +0 -1
  256. package/dist/client/_nuxt/BIxS-Weu.js +0 -1
  257. package/dist/client/_nuxt/BLluXI4E.js +0 -1
  258. package/dist/client/_nuxt/BOpLLL-w.js +0 -1
  259. package/dist/client/_nuxt/BT9ZzGyQ.js +0 -69
  260. package/dist/client/_nuxt/BUpeXbsf.js +0 -25
  261. package/dist/client/_nuxt/BVGdgKAv.js +0 -1
  262. package/dist/client/_nuxt/BVkeqZ59.js +0 -1
  263. package/dist/client/_nuxt/BWKJ1FCf.js +0 -239
  264. package/dist/client/_nuxt/BXR915QZ.js +0 -32
  265. package/dist/client/_nuxt/BYdKNJ10.js +0 -1
  266. package/dist/client/_nuxt/BZz1Hhek.js +0 -1
  267. package/dist/client/_nuxt/BacI6-DX.js +0 -40
  268. package/dist/client/_nuxt/Bbv8ARUV.js +0 -13
  269. package/dist/client/_nuxt/Bdt_eLrj.js +0 -756
  270. package/dist/client/_nuxt/BeJnKnI_.js +0 -544
  271. package/dist/client/_nuxt/Bg0wAK5a.js +0 -100
  272. package/dist/client/_nuxt/Bi43K_FX.js +0 -6
  273. package/dist/client/_nuxt/BiDE021q.js +0 -1
  274. package/dist/client/_nuxt/BigF1UXR.js +0 -1
  275. package/dist/client/_nuxt/BlxWTfDV.js +0 -699
  276. package/dist/client/_nuxt/BnyYJeap.js +0 -129
  277. package/dist/client/_nuxt/Br6ll-O0.js +0 -1
  278. package/dist/client/_nuxt/BscxmKrE.js +0 -8
  279. package/dist/client/_nuxt/Btshr8M_.js +0 -70
  280. package/dist/client/_nuxt/Bxkoe-BC.js +0 -1
  281. package/dist/client/_nuxt/C15OxdQ5.js +0 -1
  282. package/dist/client/_nuxt/C1DVX8_8.js +0 -831
  283. package/dist/client/_nuxt/C1yTBzia.js +0 -1
  284. package/dist/client/_nuxt/C3qJFuQy.js +0 -3
  285. package/dist/client/_nuxt/C3qUB5O8.js +0 -301
  286. package/dist/client/_nuxt/C6Aznpr-.js +0 -1
  287. package/dist/client/_nuxt/CApMHEaB.js +0 -1
  288. package/dist/client/_nuxt/CBPJd_fO.js +0 -1
  289. package/dist/client/_nuxt/CBWrHyXe.js +0 -580
  290. package/dist/client/_nuxt/CCqFro8U.js +0 -3
  291. package/dist/client/_nuxt/CETtcHRa.js +0 -1
  292. package/dist/client/_nuxt/CEfge3mM.js +0 -1
  293. package/dist/client/_nuxt/CG4fK2Nq.js +0 -21
  294. package/dist/client/_nuxt/CJGKC1_q.js +0 -40
  295. package/dist/client/_nuxt/CJIaz0BQ.js +0 -76
  296. package/dist/client/_nuxt/CO5hpdkB.js +0 -1
  297. package/dist/client/_nuxt/CQUCfALx.js +0 -13
  298. package/dist/client/_nuxt/CSPeAESR.js +0 -1
  299. package/dist/client/_nuxt/C_ZPRiAj.js +0 -26
  300. package/dist/client/_nuxt/Cb-F_BZP.js +0 -1
  301. package/dist/client/_nuxt/CbViG2Xw.js +0 -74
  302. package/dist/client/_nuxt/CbYhyuC0.js +0 -505
  303. package/dist/client/_nuxt/CfPQhs6g.js +0 -7
  304. package/dist/client/_nuxt/Cgl53LJQ.js +0 -1
  305. package/dist/client/_nuxt/ChJ1dFAn.js +0 -39
  306. package/dist/client/_nuxt/Cicx_DS6.js +0 -1
  307. package/dist/client/_nuxt/ClXEvkw9.js +0 -68
  308. package/dist/client/_nuxt/Cp2HGa90.js +0 -353
  309. package/dist/client/_nuxt/CpAANOdC.js +0 -1
  310. package/dist/client/_nuxt/CrgTADc5.js +0 -1
  311. package/dist/client/_nuxt/CsyrCbsw.js +0 -699
  312. package/dist/client/_nuxt/Cthz8VOO.js +0 -771
  313. package/dist/client/_nuxt/CupVZNk8.js +0 -25
  314. package/dist/client/_nuxt/CxrokwfH.js +0 -1
  315. package/dist/client/_nuxt/D4LaosRr.js +0 -1
  316. package/dist/client/_nuxt/D6pmzCqS.js +0 -1
  317. package/dist/client/_nuxt/D7WeZTai.js +0 -1
  318. package/dist/client/_nuxt/DAGYewaG.js +0 -559
  319. package/dist/client/_nuxt/DAP_O-zg.js +0 -1
  320. package/dist/client/_nuxt/DAfrLhwG.js +0 -1
  321. package/dist/client/_nuxt/DBeuZS66.js +0 -1
  322. package/dist/client/_nuxt/DC4hdoM9.js +0 -87
  323. package/dist/client/_nuxt/DC8MraHL.js +0 -666
  324. package/dist/client/_nuxt/DGO8GyiP.js +0 -1
  325. package/dist/client/_nuxt/DGxQkqYo.js +0 -1
  326. package/dist/client/_nuxt/DHmGyzbM.js +0 -109
  327. package/dist/client/_nuxt/DJubGRtk.js +0 -1
  328. package/dist/client/_nuxt/DK4oFTHQ.js +0 -200
  329. package/dist/client/_nuxt/DLP9ZvWb.js +0 -3
  330. package/dist/client/_nuxt/DOHBU7tp.js +0 -1
  331. package/dist/client/_nuxt/DOtRmeXT.js +0 -1
  332. package/dist/client/_nuxt/DSrLtGYv.js +0 -15
  333. package/dist/client/_nuxt/DV9JwLIa.js +0 -1
  334. package/dist/client/_nuxt/DVLwECkk.js +0 -1
  335. package/dist/client/_nuxt/DVfdqzEq.js +0 -1
  336. package/dist/client/_nuxt/DXFkqnOI.js +0 -816
  337. package/dist/client/_nuxt/DY7_9Ga-.js +0 -1
  338. package/dist/client/_nuxt/DYI1rfmx.js +0 -25
  339. package/dist/client/_nuxt/DZLoTQm4.js +0 -1
  340. package/dist/client/_nuxt/DbK06e1c.js +0 -21
  341. package/dist/client/_nuxt/Dble9ECP.js +0 -1
  342. package/dist/client/_nuxt/Dch3xQiY.js +0 -699
  343. package/dist/client/_nuxt/Dd6f7Z5P.js +0 -1
  344. package/dist/client/_nuxt/DfeQjIbs.js +0 -5
  345. package/dist/client/_nuxt/Dg0DGYq4.js +0 -14
  346. package/dist/client/_nuxt/Dit6kIrv.js +0 -11
  347. package/dist/client/_nuxt/DmDrTTlz.js +0 -1
  348. package/dist/client/_nuxt/DrnZp123.js +0 -40
  349. package/dist/client/_nuxt/Du6_OKDb.js +0 -159
  350. package/dist/client/_nuxt/DwuVtWc2.js +0 -518
  351. package/dist/client/_nuxt/DzwdaLuO.js +0 -223
  352. package/dist/client/_nuxt/ECt0lbkd.js +0 -16
  353. package/dist/client/_nuxt/Eh5U-gDp.js +0 -52
  354. package/dist/client/_nuxt/PWN5J14X.js +0 -1
  355. package/dist/client/_nuxt/PifQWv0n.js +0 -1
  356. package/dist/client/_nuxt/QZ3jNtnE.js +0 -515
  357. package/dist/client/_nuxt/RCJZWN-0.js +0 -81
  358. package/dist/client/_nuxt/RE3ujT-k.js +0 -1
  359. package/dist/client/_nuxt/RqY_Nz63.js +0 -1
  360. package/dist/client/_nuxt/Sfo2eW0G.js +0 -274
  361. package/dist/client/_nuxt/T9ysyp6P.js +0 -62
  362. package/dist/client/_nuxt/Urb1RsFe.js +0 -1
  363. package/dist/client/_nuxt/VQMr7AbF.js +0 -1
  364. package/dist/client/_nuxt/builds/meta/7bcc0ccc-7abc-4c7a-a38f-10c82bc8da01.json +0 -1
  365. package/dist/client/_nuxt/cw46T5ID.js +0 -61
  366. package/dist/client/_nuxt/dIHJ9UdL.js +0 -1
  367. package/dist/client/_nuxt/eJfcURhx.js +0 -1
  368. package/dist/client/_nuxt/entry.BNQn0MkB.css +0 -1
  369. package/dist/client/_nuxt/error-404.CUS9EMVV.css +0 -1
  370. package/dist/client/_nuxt/error-500.CMkLgjP3.css +0 -1
  371. package/dist/client/_nuxt/i0IPvypD.js +0 -1
  372. package/dist/client/_nuxt/kuh6G-Sk.js +0 -9
  373. package/dist/client/_nuxt/nclm9rTJ.js +0 -266
  374. package/dist/client/_nuxt/vMsNTMhM.js +0 -5
  375. package/dist/client/_nuxt/yX2IItqj.js +0 -1
  376. package/dist/runtime/nitro/util.d.ts +0 -1
  377. package/dist/runtime/nitro/util.js +0 -4
  378. package/dist/runtime/nuxt/plugin/search.nitro.d.ts +0 -2
  379. package/dist/runtime/nuxt/plugin/search.nitro.js +0 -11
package/dist/module.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as _nuxt_schema from '@nuxt/schema';
2
- import { DefaultInspections } from '../dist/runtime/pure/inspect.js';
2
+ import { CreateStorageOptions } from 'unstorage';
3
3
 
4
4
  interface ModuleOptions {
5
5
  /**
@@ -9,7 +9,7 @@ interface ModuleOptions {
9
9
  /**
10
10
  * Skip specific inspections from running.
11
11
  */
12
- skipInspections: (Partial<keyof typeof DefaultInspections>)[];
12
+ skipInspections: string[];
13
13
  /**
14
14
  * The timeout for fetching a URL.
15
15
  *
@@ -32,6 +32,18 @@ interface ModuleOptions {
32
32
  * Whether to output a JSON report.
33
33
  */
34
34
  markdown?: boolean;
35
+ /**
36
+ * Whether to output a JSON report.
37
+ */
38
+ json?: boolean;
39
+ /**
40
+ * Where to store the files.
41
+ *
42
+ * Either provide a path relative to the nuxt root or an object with options for `unstorage`.
43
+ *
44
+ * By default, they'll be in your .output directory.
45
+ */
46
+ storage?: string | CreateStorageOptions;
35
47
  };
36
48
  /**
37
49
  * Whether to show live inspections in your Nuxt app.
@@ -44,7 +56,7 @@ interface ModuleOptions {
44
56
  /**
45
57
  * Should remote URLs be fetched.
46
58
  *
47
- * @default true (disabled in stackblitz)
59
+ * @default false
48
60
  */
49
61
  fetchRemoteUrls: boolean;
50
62
  /**
@@ -69,6 +81,6 @@ interface ModuleOptions {
69
81
  }
70
82
  interface ModuleHooks {
71
83
  }
72
- declare const _default: _nuxt_schema.NuxtModule<ModuleOptions>;
84
+ declare const _default: _nuxt_schema.NuxtModule<ModuleOptions, ModuleOptions, false>;
73
85
 
74
86
  export { type ModuleHooks, type ModuleOptions, _default as default };
package/dist/module.json CHANGED
@@ -5,9 +5,9 @@
5
5
  "bridge": false
6
6
  },
7
7
  "configKey": "linkChecker",
8
- "version": "3.0.1",
8
+ "version": "3.1.0",
9
9
  "builder": {
10
- "@nuxt/module-builder": "0.8.1",
10
+ "@nuxt/module-builder": "0.8.3",
11
11
  "unbuild": "2.0.0"
12
12
  }
13
13
  }
package/dist/module.mjs CHANGED
@@ -1,16 +1,18 @@
1
- import { useNuxt, extendPages, defineNuxtModule, createResolver, useLogger, addPlugin, addServerHandler, addServerPlugin, hasNuxtModule, hasNuxtModuleCompatibility } from '@nuxt/kit';
1
+ import { useNuxt, extendPages, defineNuxtModule, createResolver, useLogger, addPlugin, addServerHandler, hasNuxtModule, hasNuxtModuleCompatibility } from '@nuxt/kit';
2
2
  import { useSiteConfig, installNuxtSiteConfig } from 'nuxt-site-config-kit';
3
3
  import { readPackageJSON } from 'pkg-types';
4
- import fs, { readFile, writeFile } from 'node:fs/promises';
5
4
  import { existsSync } from 'node:fs';
6
5
  import chalk from 'chalk';
7
6
  import Fuse from 'fuse.js';
8
7
  import { resolve, relative } from 'pathe';
9
8
  import { load } from 'cheerio';
10
9
  import { withoutLeadingSlash, joinURL } from 'ufo';
10
+ import { createStorage } from 'unstorage';
11
+ import fsDriver from 'unstorage/drivers/fs';
11
12
  import { inspect } from '../dist/runtime/pure/inspect.js';
12
13
  import { createFilter } from '../dist/runtime/pure/sharedUtils.js';
13
14
  import { setLinkResponse, getLinkResponse, crawlFetch } from '../dist/runtime/pure/crawl.js';
15
+ import { readFile, writeFile } from 'node:fs/promises';
14
16
  import { onDevToolsInitialized, extendServerRpc } from '@nuxt/devtools-kit';
15
17
  import { diffArrays } from 'diff';
16
18
  import { generateLinkDiff } from '../dist/runtime/pure/diff.js';
@@ -19,13 +21,14 @@ const linkMap = {};
19
21
  function extractPayload(html) {
20
22
  const $ = load(html);
21
23
  const ids = $("#__nuxt [id]").map((i, el) => $(el).attr("id")).get();
24
+ const title = $("title").text();
22
25
  const links = $("#__nuxt a[href]").map((i, el) => {
23
26
  return {
24
- link: $(el).attr("href"),
27
+ link: $(el).attr("href") || "",
25
28
  textContent: ($(el).attr("aria-label") || $(el).attr("title") || $(el).text()).trim() || ""
26
29
  };
27
30
  }).get().filter((l) => !!l.link);
28
- return { ids, links };
31
+ return { title, ids, links };
29
32
  }
30
33
  function isNuxtGenerate(nuxt = useNuxt()) {
31
34
  return nuxt.options._generate || nuxt.options.nitro.static || nuxt.options.nitro.preset === "static";
@@ -46,8 +49,20 @@ function prerender(config, nuxt = useNuxt()) {
46
49
  const payloads = Object.entries(linkMap);
47
50
  if (!payloads.length)
48
51
  return;
49
- const links = payloads.map(([, payloads2]) => payloads2.links).flat();
52
+ const storageFilepath = typeof config.report?.storage === "string" ? resolve(nuxt.options.rootDir, config.report?.storage) : nitro.options.output.dir;
53
+ const storage = createStorage(config.report?.storage && typeof config.report.storage !== "string" ? config.report?.storage : {
54
+ driver: fsDriver({
55
+ base: storageFilepath
56
+ })
57
+ });
58
+ const links = payloads.map(([route, payload]) => {
59
+ return {
60
+ path: route,
61
+ title: payload.title
62
+ };
63
+ }).flat();
50
64
  const pageSearcher = new Fuse(links, {
65
+ keys: ["path", "title"],
51
66
  threshold: 0.5
52
67
  });
53
68
  nitro.logger.info("Running link inspections...");
@@ -55,7 +70,7 @@ function prerender(config, nuxt = useNuxt()) {
55
70
  let errorCount = 0;
56
71
  const allReports = (await Promise.all(payloads.map(async ([route, payload]) => {
57
72
  const reports = await Promise.all(payload.links.map(async ({ link, textContent }) => {
58
- if (!urlFilter(link))
73
+ if (!urlFilter(link) || !link)
59
74
  return { error: [], warning: [], link };
60
75
  const response = await getLinkResponse({
61
76
  link,
@@ -92,17 +107,22 @@ function prerender(config, nuxt = useNuxt()) {
92
107
  nitro.logger.log(chalk.dim(` ${report.textContent} ${report.link}`));
93
108
  report.error?.forEach((error) => {
94
109
  nitro.logger.log(chalk.red(` \u2716 ${error.message}`) + chalk.gray(` (${error.name})`));
110
+ if (error.fix)
111
+ nitro.logger.log(chalk.gray(` ${error.fixDescription}`));
95
112
  });
96
113
  report.warning?.forEach((warning) => {
97
114
  nitro.logger.log(chalk.yellow(` \u26A0 ${warning.message}`) + chalk.gray(` (${warning.name})`));
115
+ if (warning.fix)
116
+ nitro.logger.log(chalk.gray(` ${warning.fixDescription}`));
98
117
  });
99
118
  }
100
119
  });
101
120
  }
102
121
  return { route, reports };
103
122
  }))).flat();
123
+ const reportsWithContent = allReports.filter(({ reports }) => reports.some((r) => r.error?.length || r.warning?.length));
104
124
  if (config.report?.html) {
105
- const reportHtml = allReports.map(({ route, reports }) => {
125
+ const reportHtml = reportsWithContent.map(({ route, reports }) => {
106
126
  const reportsHtml = reports.map((r) => {
107
127
  const errors2 = r.error?.map((error) => {
108
128
  return `<li class="error">${error.message} (${error.name})</li>`;
@@ -154,11 +174,13 @@ function prerender(config, nuxt = useNuxt()) {
154
174
  </body>
155
175
  </html>
156
176
  `;
157
- await fs.writeFile(resolve(nitro.options.output.dir, "link-checker-report.html"), html);
158
- nitro.logger.info(`Nuxt Link Checker HTML report written to ${relative(nuxt.options.rootDir, resolve(nitro.options.output.dir, "link-checker-report.html"))}`);
177
+ await storage.setItem("link-checker-report.html", html);
178
+ if (storageFilepath) {
179
+ nitro.logger.info(`Nuxt Link Checker HTML report written to ./${relative(nuxt.options.rootDir, resolve(storageFilepath, "link-checker-report.html"))}`);
180
+ }
159
181
  }
160
182
  if (config.report?.markdown) {
161
- const reportMarkdown = allReports.map(({ route, reports }) => {
183
+ const reportMarkdown = reportsWithContent.map(({ route, reports }) => {
162
184
  const reportsMarkdown = reports.map((r) => {
163
185
  const errors2 = r.error?.map((error) => {
164
186
  return `| ${r.link} | ${error.message} (${error.name}) |`;
@@ -187,8 +209,17 @@ function prerender(config, nuxt = useNuxt()) {
187
209
  "",
188
210
  reportMarkdown
189
211
  ].join("\n");
190
- await fs.writeFile(resolve(nitro.options.output.dir, "link-checker-report.md"), markdown);
191
- nitro.logger.info(`Nuxt Link Checker Markdown report written to ${relative(nuxt.options.rootDir, resolve(nitro.options.output.dir, "link-checker-report.md"))}`);
212
+ await storage.setItem("link-checker-report.md", markdown);
213
+ if (storageFilepath) {
214
+ nitro.logger.info(`Nuxt Link Checker Markdown report written to ./${relative(nuxt.options.rootDir, resolve(storageFilepath, "link-checker-report.md"))}`);
215
+ }
216
+ }
217
+ if (config.report?.json) {
218
+ const json = JSON.stringify(reportsWithContent, null, 2);
219
+ await storage.setItem("link-checker-report.json", json);
220
+ if (storageFilepath) {
221
+ nitro.logger.info(`Nuxt Link Checker JSON report written to ./${relative(nuxt.options.rootDir, resolve(storageFilepath, "link-checker-report.json"))}`);
222
+ }
192
223
  }
193
224
  if (errorCount > 0 && config.failOnError) {
194
225
  nitro.logger.error(`Nuxt Link Checker found ${errorCount} errors, failing build.`);
@@ -207,7 +238,10 @@ function convertNuxtPagesToPaths(pages) {
207
238
  page: child
208
239
  };
209
240
  }) : { page, path: page.path };
210
- }).flat().filter((p) => !p.path.includes(":")).map((p) => p.path);
241
+ }).flat().filter((p) => !p.path.includes(":")).map((p) => ({
242
+ title: p.page?.meta?.title || "",
243
+ link: p.path
244
+ }));
211
245
  }
212
246
  function useViteWebSocket(nuxt = useNuxt()) {
213
247
  return new Promise((_resolve) => {
@@ -369,7 +403,7 @@ const module = defineNuxtModule({
369
403
  if (config.fetchRemoteUrls) {
370
404
  config.fetchRemoteUrls = (await crawlFetch("https://google.com")).status === 200;
371
405
  if (!config.fetchRemoteUrls)
372
- logger.warn("Remote URL fetching is disabled because https://google.com could not be fetched.");
406
+ logger.warn("Remote URL fetching is disabled because you appear to be offline.");
373
407
  }
374
408
  const isDevToolsEnabled = typeof nuxt.options.devtools === "boolean" ? nuxt.options.devtools : nuxt.options.devtools.enabled;
375
409
  if (nuxt.options.dev && isDevToolsEnabled) {
@@ -389,7 +423,6 @@ const module = defineNuxtModule({
389
423
  route: "/__link-checker__/debug.json",
390
424
  handler: resolve("./runtime/nitro/routes/__link-checker__/debug")
391
425
  });
392
- addServerPlugin(resolve("./runtime/nuxt/plugin/search.nitro"));
393
426
  const pagePromise = new Promise((_resolve) => {
394
427
  extendPages((pages) => {
395
428
  _resolve(pages);
@@ -402,10 +435,11 @@ const module = defineNuxtModule({
402
435
  };
403
436
  });
404
437
  const hasSitemapModule = (hasNuxtModule("@nuxtjs/sitemap") || hasNuxtModule("nuxt-simple-sitemap") && await hasNuxtModuleCompatibility("nuxt-simple-sitemap", ">=4")) && nuxt.options.sitemap?.enabled !== false;
438
+ nuxt.options.nitro.alias = nuxt.options.nitro.alias || {};
405
439
  if (!hasNuxtModule("@nuxt/content")) {
406
- nuxt.options.nitro.alias = nuxt.options.nitro.alias || {};
407
440
  nuxt.options.nitro.alias["#content/server"] = resolve("./runtime/nitro/composables/content-mock");
408
441
  }
442
+ nuxt.options.nitro.alias["#link-checker/pure"] = resolve("./runtime/pure");
409
443
  nuxt.options.runtimeConfig.public["nuxt-link-checker"] = {
410
444
  version,
411
445
  hasSitemapModule,
@@ -1,3 +1,4 @@
1
1
  export declare function serverQueryContent(): {
2
2
  findOne(): Promise<boolean>;
3
+ find(): Promise<never[]>;
3
4
  };
@@ -2,6 +2,9 @@ export function serverQueryContent() {
2
2
  return {
3
3
  async findOne() {
4
4
  return false;
5
+ },
6
+ async find() {
7
+ return [];
5
8
  }
6
9
  };
7
10
  }
@@ -1,2 +1,2 @@
1
- declare const _default: import("h3").EventHandler<import("h3").EventHandlerRequest, Promise<Partial<import("../../../types").LinkInspectionResult>[]>>;
1
+ declare const _default: import("h3").EventHandler<import("h3").EventHandlerRequest, Promise<any>>;
2
2
  export default _default;
@@ -2,16 +2,17 @@ import { defineEventHandler, getHeader, readBody } from "h3";
2
2
  import { fixSlashes } from "site-config-stack/urls";
3
3
  import { parseURL } from "ufo";
4
4
  import { resolve } from "pathe";
5
- import { inspect } from "../../../pure/inspect.js";
6
- import { generateFileLinkDiff, generateFileLinkPreviews, lruFsCache } from "../../../pure/diff.js";
7
- import { getLinkResponse } from "../../../pure/crawl.js";
8
- import { isNonFetchableLink } from "../../../pure/inspections/util.js";
9
- import { isInternalRoute } from "../../util.js";
10
- import { useNitroApp, useNitroOrigin, useRuntimeConfig, useSiteConfig } from "#imports";
5
+ import Fuse from "fuse.js";
6
+ import { generateFileLinkDiff, generateFileLinkPreviews, getLinkResponse, inspect, isNonFetchableLink, lruFsCache } from "#link-checker/pure";
7
+ import { useNitroOrigin, useRuntimeConfig, useSiteConfig } from "#imports";
11
8
  import { serverQueryContent } from "#content/server";
9
+ function isInternalRoute(path) {
10
+ const lastSegment = path.split("/").pop() || path;
11
+ return lastSegment.includes(".") || path.startsWith("/__") || path.startsWith("@");
12
+ }
12
13
  export default defineEventHandler(async (e) => {
13
14
  const { tasks, ids } = await readBody(e);
14
- const runtimeConfig = useRuntimeConfig().public["nuxt-link-checker"];
15
+ const runtimeConfig = useRuntimeConfig().public["nuxt-link-checker"] || {};
15
16
  const partialCtx = {
16
17
  ids,
17
18
  fromPath: fixSlashes(false, parseURL(getHeader(e, "referer") || "/").pathname),
@@ -24,7 +25,7 @@ export default defineEventHandler(async (e) => {
24
25
  extraPaths.push(resolve(runtimeConfig.rootDir, "content", contentDocument._file));
25
26
  }
26
27
  lruFsCache.clear();
27
- const pageSearch = useNitroApp()._linkCheckerPageSearch;
28
+ const links = await $fetch("/__link-checker__/links");
28
29
  return Promise.all(
29
30
  tasks.map(async ({ link, paths, textContent }) => {
30
31
  if (isNonFetchableLink(link) || isInternalRoute(link))
@@ -42,7 +43,10 @@ export default defineEventHandler(async (e) => {
42
43
  ...partialCtx,
43
44
  link,
44
45
  textContent,
45
- pageSearch,
46
+ pageSearch: new Fuse(links, {
47
+ keys: ["path", "title"],
48
+ threshold: 0.5
49
+ }),
46
50
  response,
47
51
  skipInspections: runtimeConfig.skipInspections
48
52
  });
@@ -1,2 +1,2 @@
1
- declare const _default: import("h3").EventHandler<import("h3").EventHandlerRequest, Promise<any[]>>;
1
+ declare const _default: any;
2
2
  export default _default;
@@ -1,15 +1,41 @@
1
- import { defineEventHandler } from "h3";
2
- import { useRuntimeConfig } from "#imports";
1
+ import { createDefu } from "defu";
2
+ import { defineCachedEventHandler, useRuntimeConfig } from "#imports";
3
3
  import pagePaths from "#nuxt-link-checker-sitemap/pages.mjs";
4
- export default defineEventHandler(async () => {
5
- const runtimeConfig = useRuntimeConfig().public["nuxt-link-checker"];
4
+ import { serverQueryContent } from "#content/server";
5
+ const merger = createDefu((obj, key, value) => {
6
+ if (Array.isArray(obj[key]) && Array.isArray(value))
7
+ obj[key] = Array.from(/* @__PURE__ */ new Set([...obj[key], ...value]));
8
+ return obj[key];
9
+ });
10
+ function mergeOnKey(arr, key) {
11
+ const res = {};
12
+ arr.forEach((item) => {
13
+ const k = item[key];
14
+ res[k] = merger(item, res[k] || {});
15
+ });
16
+ return Object.values(res);
17
+ }
18
+ export default defineCachedEventHandler(async (e) => {
19
+ const runtimeConfig = useRuntimeConfig().public["nuxt-link-checker"] || {};
6
20
  const linkDb = [
7
21
  ...pagePaths
8
22
  ];
9
23
  if (runtimeConfig.hasSitemapModule) {
10
24
  const sitemapDebug = await $fetch("/__sitemap__/debug.json");
11
25
  const entries = sitemapDebug.globalSources.map((source) => source.urls).flat();
12
- linkDb.push(...entries.map((s) => s.loc));
26
+ linkDb.push(...entries.map((s) => ({ path: s.loc, title: "" })));
27
+ }
28
+ if (serverQueryContent) {
29
+ const contentDocuments = await serverQueryContent(e).find();
30
+ if (contentDocuments) {
31
+ linkDb.push(...contentDocuments.map((doc) => ({
32
+ path: doc._path,
33
+ title: doc.title
34
+ })));
35
+ }
13
36
  }
14
- return [.../* @__PURE__ */ new Set([...linkDb])];
37
+ return mergeOnKey(linkDb, "link");
38
+ }, {
39
+ maxAge: 10
40
+ // avoid thrashing
15
41
  });
@@ -1,4 +1,4 @@
1
- import { defineNuxtPlugin } from "#imports";
1
+ import { defineNuxtPlugin, useRoute } from "#imports";
2
2
  export default defineNuxtPlugin((nuxt) => {
3
3
  if (typeof document === "undefined" || typeof window === "undefined")
4
4
  return;
@@ -13,8 +13,10 @@ export default defineNuxtPlugin((nuxt) => {
13
13
  console.error("Nuxt DevTools: Failed to check parent window");
14
14
  console.error(e);
15
15
  }
16
+ const route = useRoute();
16
17
  import("./view/client.js").then(({ setupLinkCheckerClient }) => {
17
18
  setupLinkCheckerClient({
19
+ route,
18
20
  nuxt
19
21
  });
20
22
  });
@@ -1,12 +1,12 @@
1
1
  <script setup lang="ts">
2
- import { computed, ref } from 'vue'
2
+ import { type Ref, computed, ref } from 'vue'
3
3
  import type { NuxtLinkCheckerClient } from '../../../types'
4
4
  import Squiggle from './Squiggle.vue'
5
5
  import { useEventListener } from './utils'
6
6
 
7
7
  const props = defineProps<{
8
8
  client: NuxtLinkCheckerClient
9
- highlightedLink: string | null
9
+ highlightedLink: Ref<string | null>
10
10
  inspections: NuxtLinkCheckerClient['inspectionEls']
11
11
  }>()
12
12
 
@@ -1,4 +1,6 @@
1
1
  import type { NuxtApp } from 'nuxt/app';
2
- export declare function setupLinkCheckerClient({ nuxt }: {
2
+ import type { useRoute } from '#imports';
3
+ export declare function setupLinkCheckerClient({ nuxt, route }: {
3
4
  nuxt: NuxtApp;
5
+ route: ReturnType<typeof useRoute>;
4
6
  }): Promise<void>;
@@ -3,9 +3,12 @@ import { useLocalStorage } from "@vueuse/core";
3
3
  import { createFilter } from "../../../pure/sharedUtils.js";
4
4
  import Main from "./Main.vue";
5
5
  import { linkDb } from "./state.js";
6
- import { useRoute, useRuntimeConfig } from "#imports";
6
+ import { useRuntimeConfig } from "#imports";
7
7
  function resolveDevtoolsIframe() {
8
- return document.querySelector("#nuxt-devtools-iframe")?.contentWindow?.__NUXT_DEVTOOLS__;
8
+ const iframe = document.querySelector("#nuxt-devtools-iframe");
9
+ if (!iframe)
10
+ return;
11
+ return iframe?.contentWindow?.__NUXT_DEVTOOLS__;
9
12
  }
10
13
  function resolvePathsForEl(el) {
11
14
  const parents = [];
@@ -20,7 +23,7 @@ function resolvePathsForEl(el) {
20
23
  ...new Set(parents.map((p) => p.getAttribute("data-v-inspector")?.split(":")?.[0] || false))
21
24
  ].filter(Boolean);
22
25
  }
23
- export async function setupLinkCheckerClient({ nuxt }) {
26
+ export async function setupLinkCheckerClient({ nuxt, route }) {
24
27
  let queue = [];
25
28
  let queueWorkerTimer;
26
29
  const inspectionEls = ref([]);
@@ -30,11 +33,10 @@ export async function setupLinkCheckerClient({ nuxt }) {
30
33
  let elMap = {};
31
34
  let devtoolsClient;
32
35
  let isOpeningDevtools = false;
33
- const route = useRoute();
34
36
  let startQueueIdleId;
35
37
  let startQueueTimeoutId;
36
38
  const showInspections = useLocalStorage("nuxt-link-checker:show-inspections", true);
37
- const runtimeConfig = useRuntimeConfig().public["nuxt-link-checker"];
39
+ const runtimeConfig = useRuntimeConfig().public["nuxt-link-checker"] || {};
38
40
  const filter = createFilter({
39
41
  exclude: runtimeConfig.excludeLinks
40
42
  });
@@ -150,10 +152,7 @@ export async function setupLinkCheckerClient({ nuxt }) {
150
152
  }, 250);
151
153
  }
152
154
  } else {
153
- if (typeof devtoolsClient.host.open === "function")
154
- devtoolsClient.host.open();
155
- else
156
- devtoolsClient.host.devtools.open();
155
+ devtoolsClient.host.devtools.open();
157
156
  const srcPath = new URL(devtoolsClient.host.getIframe().src).pathname;
158
157
  if (!srcPath.startsWith("/__nuxt_devtools__/client/modules/custom-nuxt-link-checker")) {
159
158
  devtoolsClient.host.getIframe().src = `/__nuxt_devtools__/client/modules/custom-nuxt-link-checker?link=${encodeURIComponent(link)}`;
@@ -175,7 +174,7 @@ export async function setupLinkCheckerClient({ nuxt }) {
175
174
  startQueueIdleId = requestIdleCallback(() => {
176
175
  client.stopQueueWorker();
177
176
  if (!startQueueTimeoutId) {
178
- startQueueTimeoutId = setTimeout(() => {
177
+ startQueueTimeoutId = window.setTimeout(() => {
179
178
  client.scanLinks();
180
179
  client.startQueueWorker();
181
180
  startQueueTimeoutId = false;
@@ -0,0 +1,5 @@
1
+ import { inspect } from './inspect.js';
2
+ import { generateFileLinkDiff, generateFileLinkPreviews, lruFsCache } from './diff.js';
3
+ import { getLinkResponse } from './crawl.js';
4
+ import { isNonFetchableLink } from './inspections/util.js';
5
+ export { inspect, generateFileLinkDiff, generateFileLinkPreviews, lruFsCache, getLinkResponse, isNonFetchableLink, };
@@ -0,0 +1,12 @@
1
+ import { inspect } from "./inspect.js";
2
+ import { generateFileLinkDiff, generateFileLinkPreviews, lruFsCache } from "./diff.js";
3
+ import { getLinkResponse } from "./crawl.js";
4
+ import { isNonFetchableLink } from "./inspections/util.js";
5
+ export {
6
+ inspect,
7
+ generateFileLinkDiff,
8
+ generateFileLinkPreviews,
9
+ lruFsCache,
10
+ getLinkResponse,
11
+ isNonFetchableLink
12
+ };
@@ -1,21 +1,3 @@
1
1
  import type { LinkInspectionResult, Rule, RuleTestContext } from '../types.js';
2
- export declare const DefaultInspections: {
3
- readonly 'missing-hash': Rule;
4
- readonly 'no-error-response': Rule;
5
- readonly 'no-baseless': Rule;
6
- readonly 'no-javascript': Rule;
7
- readonly 'trailing-slash': Rule;
8
- readonly 'absolute-site-urls': Rule;
9
- readonly redirects: Rule;
10
- readonly 'link-text': Rule;
11
- };
12
- export declare function inspect(ctx: RuleTestContext, rules?: {
13
- readonly 'missing-hash': Rule;
14
- readonly 'no-error-response': Rule;
15
- readonly 'no-baseless': Rule;
16
- readonly 'no-javascript': Rule;
17
- readonly 'trailing-slash': Rule;
18
- readonly 'absolute-site-urls': Rule;
19
- readonly redirects: Rule;
20
- readonly 'link-text': Rule;
21
- }): Partial<LinkInspectionResult>;
2
+ export declare const AllInspections: Rule[];
3
+ export declare function inspect(ctx: Pick<Required<RuleTestContext>, 'link'> & Omit<Partial<RuleTestContext>, 'link'>, rules?: Rule[]): Partial<LinkInspectionResult>;
@@ -8,17 +8,18 @@ import RuleRedirects from "./redirects.js";
8
8
  import RuleNoErrorResponse from "./inspections/no-error-response-status.js";
9
9
  import RuleDescriptiveLinkText from "./inspections/descriptive-link-text.js";
10
10
  import { isNonFetchableLink } from "./inspections/util.js";
11
- export const DefaultInspections = {
12
- "missing-hash": RuleMissingHash(),
13
- "no-error-response": RuleNoErrorResponse(),
14
- "no-baseless": RuleNoBaseLess(),
15
- "no-javascript": RuleNoJavascript(),
16
- "trailing-slash": RuleTrailingSlash(),
17
- "absolute-site-urls": RuleAbsoluteSiteUrls(),
18
- "redirects": RuleRedirects(),
19
- "link-text": RuleDescriptiveLinkText()
20
- };
21
- export function inspect(ctx, rules = DefaultInspections) {
11
+ export const AllInspections = [
12
+ RuleMissingHash(),
13
+ RuleNoErrorResponse(),
14
+ RuleNoBaseLess(),
15
+ RuleNoJavascript(),
16
+ RuleTrailingSlash(),
17
+ RuleAbsoluteSiteUrls(),
18
+ RuleRedirects(),
19
+ RuleDescriptiveLinkText()
20
+ ];
21
+ export function inspect(ctx, rules) {
22
+ rules = rules || AllInspections;
22
23
  const res = { error: [], warning: [], fix: ctx.link, link: ctx.link };
23
24
  let link = ctx.link;
24
25
  const url = parseURL(link);
@@ -1,17 +1,16 @@
1
- import { parseURL } from "ufo";
2
1
  import { defineRule } from "./util.js";
3
2
  export default function RuleAbsoluteSiteUrls() {
4
3
  return defineRule({
5
- test({ report, link, siteConfig }) {
4
+ id: "absolute-site-urls",
5
+ test({ report, link, url, siteConfig }) {
6
6
  if (!link.startsWith(siteConfig.url))
7
7
  return;
8
- const $url = parseURL(link);
9
8
  report({
10
9
  name: "absolute-site-urls",
11
10
  scope: "warning",
12
11
  message: "Internal links should be relative.",
13
12
  tip: "Using internal links that start with / is recommended to avoid issues when deploying your site to different domain names",
14
- fix: $url.pathname,
13
+ fix: url.pathname,
15
14
  fixDescription: `Remove ${siteConfig.url}.`
16
15
  });
17
16
  }
@@ -1,6 +1,7 @@
1
1
  import { defineRule } from "./util.js";
2
2
  export default function RuleDescriptiveLinkText() {
3
3
  return defineRule({
4
+ id: "link-text",
4
5
  test({ textContent, report }) {
5
6
  if (typeof textContent === "undefined")
6
7
  return;
@@ -3,6 +3,7 @@ import { fixSlashes } from "site-config-stack/urls";
3
3
  import { defineRule } from "./util.js";
4
4
  export default function RuleMissingHash() {
5
5
  return defineRule({
6
+ id: "missing-hash",
6
7
  test({ link, report, ids, fromPath }) {
7
8
  const [path, hash] = link.split("#");
8
9
  if (!link.includes("#") || link.endsWith("#top") || fixSlashes(false, path) !== fromPath)
@@ -2,6 +2,7 @@ import { joinURL } from "ufo";
2
2
  import { defineRule, isNonFetchableLink } from "./util.js";
3
3
  export default function RuleNoBaseLess() {
4
4
  return defineRule({
5
+ id: "no-baseless",
5
6
  test({ link, fromPath, report }) {
6
7
  if (link.startsWith("/") || link.startsWith("http") || isNonFetchableLink(link))
7
8
  return;
@@ -1,6 +1,7 @@
1
1
  import { defineRule, isNonFetchableLink } from "./util.js";
2
2
  export default function RuleNoErrorResponse() {
3
3
  return defineRule({
4
+ id: "no-error-response",
4
5
  test({ link, response, report, pageSearch }) {
5
6
  if (!response.status || response.status.toString().startsWith("2") || response.status.toString().startsWith("3") || isNonFetchableLink(link))
6
7
  return;
@@ -10,10 +11,10 @@ export default function RuleNoErrorResponse() {
10
11
  message: `Should not respond with status code ${response.status}${response.statusText ? ` (${response.statusText})` : ""}.`
11
12
  };
12
13
  if (link.startsWith("/") && pageSearch) {
13
- const fix = pageSearch.search(link)?.[0]?.item;
14
- if (fix && fix !== link) {
15
- payload.fix = fix;
16
- payload.fixDescription = `Did you mean ${fix}?`;
14
+ const related = pageSearch.search(link)?.[0]?.item;
15
+ if (related?.path && related.path !== link) {
16
+ payload.fix = related.path;
17
+ payload.fixDescription = `Did you mean ${related.path}?`;
17
18
  }
18
19
  } else {
19
20
  payload.canRetry = true;
@@ -1,6 +1,7 @@
1
1
  import { defineRule } from "./util.js";
2
2
  export default function RuleNoJavascript() {
3
3
  return defineRule({
4
+ id: "no-javascript",
4
5
  test({ link, report }) {
5
6
  if (link.startsWith("javascript:")) {
6
7
  report({
@@ -3,6 +3,7 @@ import { parseURL } from "ufo";
3
3
  import { defineRule } from "./util.js";
4
4
  export default function RuleTrailingSlash() {
5
5
  return defineRule({
6
+ id: "trailing-slash",
6
7
  test({ report, link, siteConfig }) {
7
8
  if (!link.startsWith("/") && !link.startsWith(siteConfig.url))
8
9
  return;
@@ -1,6 +1,7 @@
1
1
  import { defineRule } from "./inspections/util.js";
2
2
  export default function RuleRedirects() {
3
3
  return defineRule({
4
+ id: "redirects",
4
5
  test({ report, response }) {
5
6
  if (response.status !== 301 && response.status !== 302)
6
7
  return;