vite-plus 0.1.1 → 0.1.3

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 (43) hide show
  1. package/binding/index.cjs +2 -0
  2. package/binding/index.d.cts +32 -0
  3. package/dist/global/{prompts-CAIahN1u.js → agent-BE4Xze8Q.js} +380 -1280
  4. package/dist/global/{browser-CY4NBwxR.js → browser-CBapUTD0.js} +579 -1023
  5. package/dist/global/{browser-DFpJ6sKb.js → browser-EZnNDcaO.js} +2 -3
  6. package/dist/global/{chunk-CtfvYSle.js → chunk-CgnkrU7a.js} +13 -22
  7. package/dist/global/{cli-truncate-BxinOqz5.js → cli-truncate-Da6Y8aM8.js} +25 -74
  8. package/dist/global/config.js +95 -165
  9. package/dist/global/create.js +353 -496
  10. package/dist/global/{terminal-Cb-NuRkb.js → help-BAGHa8fD.js} +22 -54
  11. package/dist/global/{json-Bfvtp2rL.js → json-BRdVJ52a.js} +24 -58
  12. package/dist/global/{lib-CibYHP32.js → lib-DxappLRQ.js} +19 -43
  13. package/dist/global/{log-update-DdU6_LCN.js → log-update-C8WCYCbc.js} +102 -281
  14. package/dist/global/mcp.js +97 -169
  15. package/dist/global/migrate.js +223 -72
  16. package/dist/global/{package-Pq2biU7_.js → package-YAMvX5PJ.js} +6 -13
  17. package/dist/global/{slice-ansi-BhwAwMdF.js → slice-ansi-Fap0ehe9.js} +21 -52
  18. package/dist/global/{src-C6aLHRsS.js → src-DwSJ0s0I.js} +28 -110
  19. package/dist/global/staged.js +654 -1521
  20. package/dist/global/{strip-ansi-BL-dgd7n.js → strip-ansi-CE-VDMdw.js} +20 -67
  21. package/dist/global/version.js +16 -37
  22. package/dist/global/{workspace-De4OKHV7.js → workspace-lRm8huz4.js} +1645 -2806
  23. package/dist/global/wrap-ansi-Ou9oAs-a.js +3 -0
  24. package/dist/global/{wrap-ansi-Iww6Ak1s.js → wrap-ansi-eywLlPVQ.js} +29 -80
  25. package/dist/index.d.ts +1 -1
  26. package/dist/init-config.js +10 -2
  27. package/dist/run-config.d.ts +17 -0
  28. package/dist/utils/agent.d.ts +15 -1
  29. package/dist/utils/agent.js +104 -20
  30. package/dist/utils/constants.d.ts +1 -0
  31. package/dist/utils/constants.js +2 -0
  32. package/dist/utils/editor.d.ts +16 -3
  33. package/dist/utils/editor.js +55 -17
  34. package/dist/utils/prompts.d.ts +32 -3
  35. package/dist/utils/prompts.js +32 -8
  36. package/dist/utils/skills.js +18 -2
  37. package/dist/utils/tsconfig.d.ts +6 -0
  38. package/dist/utils/tsconfig.js +16 -0
  39. package/package.json +13 -13
  40. package/templates/monorepo/package.json +1 -1
  41. package/dist/global/wrap-ansi-BJxjUEQR.js +0 -4
  42. package/dist/oxlint-config.d.ts +0 -498
  43. package/dist/oxlint-config.js +0 -309
@@ -0,0 +1,3 @@
1
+ import "./strip-ansi-CE-VDMdw.js";
2
+ import { t as wrapAnsi } from "./wrap-ansi-eywLlPVQ.js";
3
+ export { wrapAnsi as default };
@@ -1,47 +1,27 @@
1
- import { a as ansiStyles, n as eastAsianWidth, t as stripAnsi } from "./strip-ansi-BL-dgd7n.js";
2
-
1
+ import { a as ansiStyles, n as eastAsianWidth, t as stripAnsi } from "./strip-ansi-CE-VDMdw.js";
3
2
  //#region ../../node_modules/.pnpm/emoji-regex@10.6.0/node_modules/emoji-regex/index.mjs
4
3
  var emoji_regex_default = () => {
5
4
  return /[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E-\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED8\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])))?))?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3C-\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE8A\uDE8E-\uDEC2\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF]|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g;
6
5
  };
7
-
8
6
  //#endregion
9
7
  //#region ../../node_modules/.pnpm/string-width@7.2.0/node_modules/string-width/index.js
10
8
  const segmenter = new Intl.Segmenter();
11
9
  const defaultIgnorableCodePointRegex = /^\p{Default_Ignorable_Code_Point}$/u;
12
10
  function stringWidth(string, options = {}) {
13
- if (typeof string !== "string" || string.length === 0) {
14
- return 0;
15
- }
11
+ if (typeof string !== "string" || string.length === 0) return 0;
16
12
  const { ambiguousIsNarrow = true, countAnsiEscapeCodes = false } = options;
17
- if (!countAnsiEscapeCodes) {
18
- string = stripAnsi(string);
19
- }
20
- if (string.length === 0) {
21
- return 0;
22
- }
13
+ if (!countAnsiEscapeCodes) string = stripAnsi(string);
14
+ if (string.length === 0) return 0;
23
15
  let width = 0;
24
16
  const eastAsianWidthOptions = { ambiguousAsWide: !ambiguousIsNarrow };
25
17
  for (const { segment: character } of segmenter.segment(string)) {
26
18
  const codePoint = character.codePointAt(0);
27
- if (codePoint <= 31 || codePoint >= 127 && codePoint <= 159) {
28
- continue;
29
- }
30
- if (codePoint >= 8203 && codePoint <= 8207 || codePoint === 65279) {
31
- continue;
32
- }
33
- if (codePoint >= 768 && codePoint <= 879 || codePoint >= 6832 && codePoint <= 6911 || codePoint >= 7616 && codePoint <= 7679 || codePoint >= 8400 && codePoint <= 8447 || codePoint >= 65056 && codePoint <= 65071) {
34
- continue;
35
- }
36
- if (codePoint >= 55296 && codePoint <= 57343) {
37
- continue;
38
- }
39
- if (codePoint >= 65024 && codePoint <= 65039) {
40
- continue;
41
- }
42
- if (defaultIgnorableCodePointRegex.test(character)) {
43
- continue;
44
- }
19
+ if (codePoint <= 31 || codePoint >= 127 && codePoint <= 159) continue;
20
+ if (codePoint >= 8203 && codePoint <= 8207 || codePoint === 65279) continue;
21
+ if (codePoint >= 768 && codePoint <= 879 || codePoint >= 6832 && codePoint <= 6911 || codePoint >= 7616 && codePoint <= 7679 || codePoint >= 8400 && codePoint <= 8447 || codePoint >= 65056 && codePoint <= 65071) continue;
22
+ if (codePoint >= 55296 && codePoint <= 57343) continue;
23
+ if (codePoint >= 65024 && codePoint <= 65039) continue;
24
+ if (defaultIgnorableCodePointRegex.test(character)) continue;
45
25
  if (emoji_regex_default().test(character)) {
46
26
  width += 2;
47
27
  continue;
@@ -50,7 +30,6 @@ function stringWidth(string, options = {}) {
50
30
  }
51
31
  return width;
52
32
  }
53
-
54
33
  //#endregion
55
34
  //#region ../../node_modules/.pnpm/wrap-ansi@9.0.2/node_modules/wrap-ansi/index.js
56
35
  const ESCAPES = new Set(["\x1B", "›"]);
@@ -70,16 +49,14 @@ const wrapWord = (rows, word, columns) => {
70
49
  let visible = stringWidth(stripAnsi(rows.at(-1)));
71
50
  for (const [index, character] of characters.entries()) {
72
51
  const characterLength = stringWidth(character);
73
- if (visible + characterLength <= columns) {
74
- rows[rows.length - 1] += character;
75
- } else {
52
+ if (visible + characterLength <= columns) rows[rows.length - 1] += character;
53
+ else {
76
54
  rows.push(character);
77
55
  visible = 0;
78
56
  }
79
57
  if (ESCAPES.has(character)) {
80
58
  isInsideEscape = true;
81
- const ansiEscapeLinkCandidate = characters.slice(index + 1, index + 1 + ANSI_ESCAPE_LINK.length).join("");
82
- isInsideLinkEscape = ansiEscapeLinkCandidate === ANSI_ESCAPE_LINK;
59
+ isInsideLinkEscape = characters.slice(index + 1, index + 1 + ANSI_ESCAPE_LINK.length).join("") === ANSI_ESCAPE_LINK;
83
60
  }
84
61
  if (isInsideEscape) {
85
62
  if (isInsideLinkEscape) {
@@ -87,9 +64,7 @@ const wrapWord = (rows, word, columns) => {
87
64
  isInsideEscape = false;
88
65
  isInsideLinkEscape = false;
89
66
  }
90
- } else if (character === ANSI_SGR_TERMINATOR) {
91
- isInsideEscape = false;
92
- }
67
+ } else if (character === ANSI_SGR_TERMINATOR) isInsideEscape = false;
93
68
  continue;
94
69
  }
95
70
  visible += characterLength;
@@ -98,37 +73,27 @@ const wrapWord = (rows, word, columns) => {
98
73
  visible = 0;
99
74
  }
100
75
  }
101
- if (!visible && rows.at(-1).length > 0 && rows.length > 1) {
102
- rows[rows.length - 2] += rows.pop();
103
- }
76
+ if (!visible && rows.at(-1).length > 0 && rows.length > 1) rows[rows.length - 2] += rows.pop();
104
77
  };
105
78
  const stringVisibleTrimSpacesRight = (string) => {
106
79
  const words = string.split(" ");
107
80
  let last = words.length;
108
81
  while (last > 0) {
109
- if (stringWidth(words[last - 1]) > 0) {
110
- break;
111
- }
82
+ if (stringWidth(words[last - 1]) > 0) break;
112
83
  last--;
113
84
  }
114
- if (last === words.length) {
115
- return string;
116
- }
85
+ if (last === words.length) return string;
117
86
  return words.slice(0, last).join(" ") + words.slice(last).join("");
118
87
  };
119
88
  const exec = (string, columns, options = {}) => {
120
- if (options.trim !== false && string.trim() === "") {
121
- return "";
122
- }
89
+ if (options.trim !== false && string.trim() === "") return "";
123
90
  let returnValue = "";
124
91
  let escapeCode;
125
92
  let escapeUrl;
126
93
  const lengths = wordLengths(string);
127
94
  let rows = [""];
128
95
  for (const [index, word] of string.split(" ").entries()) {
129
- if (options.trim !== false) {
130
- rows[rows.length - 1] = rows.at(-1).trimStart();
131
- }
96
+ if (options.trim !== false) rows[rows.length - 1] = rows.at(-1).trimStart();
132
97
  let rowLength = stringWidth(rows.at(-1));
133
98
  if (index !== 0) {
134
99
  if (rowLength >= columns && (options.wordWrap === false || options.trim === false)) {
@@ -143,10 +108,7 @@ const exec = (string, columns, options = {}) => {
143
108
  if (options.hard && lengths[index] > columns) {
144
109
  const remainingColumns = columns - rowLength;
145
110
  const breaksStartingThisLine = 1 + Math.floor((lengths[index] - remainingColumns - 1) / columns);
146
- const breaksStartingNextLine = Math.floor((lengths[index] - 1) / columns);
147
- if (breaksStartingNextLine < breaksStartingThisLine) {
148
- rows.push("");
149
- }
111
+ if (Math.floor((lengths[index] - 1) / columns) < breaksStartingThisLine) rows.push("");
150
112
  wrapWord(rows, word, columns);
151
113
  continue;
152
114
  }
@@ -163,9 +125,7 @@ const exec = (string, columns, options = {}) => {
163
125
  }
164
126
  rows[rows.length - 1] += word;
165
127
  }
166
- if (options.trim !== false) {
167
- rows = rows.map((row) => stringVisibleTrimSpacesRight(row));
168
- }
128
+ if (options.trim !== false) rows = rows.map((row) => stringVisibleTrimSpacesRight(row));
169
129
  const preString = rows.join("\n");
170
130
  const pre = [...preString];
171
131
  let preStringIndex = 0;
@@ -173,28 +133,18 @@ const exec = (string, columns, options = {}) => {
173
133
  returnValue += character;
174
134
  if (ESCAPES.has(character)) {
175
135
  const { groups } = new RegExp(`(?:\\${ANSI_CSI}(?<code>\\d+)m|\\${ANSI_ESCAPE_LINK}(?<uri>.*)${ANSI_ESCAPE_BELL})`).exec(preString.slice(preStringIndex)) || { groups: {} };
176
- if (groups.code !== undefined) {
136
+ if (groups.code !== void 0) {
177
137
  const code = Number.parseFloat(groups.code);
178
- escapeCode = code === END_CODE ? undefined : code;
179
- } else if (groups.uri !== undefined) {
180
- escapeUrl = groups.uri.length === 0 ? undefined : groups.uri;
181
- }
138
+ escapeCode = code === END_CODE ? void 0 : code;
139
+ } else if (groups.uri !== void 0) escapeUrl = groups.uri.length === 0 ? void 0 : groups.uri;
182
140
  }
183
141
  const code = ansiStyles.codes.get(Number(escapeCode));
184
142
  if (pre[index + 1] === "\n") {
185
- if (escapeUrl) {
186
- returnValue += wrapAnsiHyperlink("");
187
- }
188
- if (escapeCode && code) {
189
- returnValue += wrapAnsiCode(code);
190
- }
143
+ if (escapeUrl) returnValue += wrapAnsiHyperlink("");
144
+ if (escapeCode && code) returnValue += wrapAnsiCode(code);
191
145
  } else if (character === "\n") {
192
- if (escapeCode && code) {
193
- returnValue += wrapAnsiCode(escapeCode);
194
- }
195
- if (escapeUrl) {
196
- returnValue += wrapAnsiHyperlink(escapeUrl);
197
- }
146
+ if (escapeCode && code) returnValue += wrapAnsiCode(escapeCode);
147
+ if (escapeUrl) returnValue += wrapAnsiHyperlink(escapeUrl);
198
148
  }
199
149
  preStringIndex += character.length;
200
150
  }
@@ -203,6 +153,5 @@ const exec = (string, columns, options = {}) => {
203
153
  function wrapAnsi(string, columns, options) {
204
154
  return String(string).normalize().replaceAll("\r\n", "\n").split("\n").map((line) => exec(line, columns, options)).join("\n");
205
155
  }
206
-
207
156
  //#endregion
208
- export { wrapAnsi as t };
157
+ export { wrapAnsi as t };
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { type Plugin as VitestPlugin } from '@voidzero-dev/vite-plus-test/config';
2
+ import type { OxlintConfig } from 'oxlint';
2
3
  import { defineConfig } from './define-config.js';
3
4
  import type { FormatOptions } from './oxfmt-config';
4
- import type { OxlintConfig } from './oxlint-config';
5
5
  import type { PackUserConfig } from './pack';
6
6
  import type { RunConfig } from './run-config';
7
7
  import type { StagedConfig } from './staged-config';
@@ -3,7 +3,9 @@ import path from 'node:path';
3
3
  import { mergeJsonConfig } from '../binding/index.js';
4
4
  import { fmt as resolveFmt } from './resolve-fmt.js';
5
5
  import { runCommandSilently } from './utils/command.js';
6
- import { VITE_PLUS_NAME } from './utils/constants.js';
6
+ import { BASEURL_TSCONFIG_WARNING, VITE_PLUS_NAME } from './utils/constants.js';
7
+ import { warnMsg } from './utils/terminal.js';
8
+ import { hasBaseUrlInTsconfig } from './utils/tsconfig.js';
7
9
  const INIT_COMMAND_SPECS = {
8
10
  lint: {
9
11
  configKey: 'lint',
@@ -168,7 +170,13 @@ export async function applyToolInitConfigToViteConfig(command, args, projectPath
168
170
  }
169
171
  if (spec.configKey === 'lint' && hasTriggerFlag(args, ['--init'])) {
170
172
  const lintInitConfigPath = path.join(projectPath, '.vite-plus-lint-init.oxlintrc.json');
171
- fs.writeFileSync(lintInitConfigPath, '{}');
173
+ // Skip typeAware/typeCheck when tsconfig.json has baseUrl (unsupported by tsgolint)
174
+ const hasBaseUrl = hasBaseUrlInTsconfig(projectPath);
175
+ const initOptions = hasBaseUrl ? {} : { typeAware: true, typeCheck: true };
176
+ if (hasBaseUrl) {
177
+ warnMsg(BASEURL_TSCONFIG_WARNING);
178
+ }
179
+ fs.writeFileSync(lintInitConfigPath, JSON.stringify({ options: initOptions }));
172
180
  const mergeResult = mergeJsonConfig(viteConfigPath, lintInitConfigPath, spec.configKey);
173
181
  if (!mergeResult.updated) {
174
182
  throw new Error(`Failed to initialize lint config in ${path.basename(viteConfigPath)}`);
@@ -26,6 +26,23 @@ export type Task = {
26
26
  * Environment variable names to be passed to the task without fingerprinting.
27
27
  */
28
28
  passThroughEnvs?: Array<string>;
29
+ /**
30
+ * Files to include in the cache fingerprint.
31
+ *
32
+ * - Omitted: automatically tracks which files the task reads
33
+ * - `[]` (empty): disables file tracking entirely
34
+ * - Glob patterns (e.g. `"src/**"`) select specific files
35
+ * - `{auto: true}` enables automatic file tracking
36
+ * - Negative patterns (e.g. `"!dist/**"`) exclude matched files
37
+ *
38
+ * Patterns are relative to the package directory.
39
+ */
40
+ inputs?: Array<string | {
41
+ /**
42
+ * Automatically track which files the task reads
43
+ */
44
+ auto: boolean;
45
+ }>;
29
46
  } | {
30
47
  /**
31
48
  * Whether to cache the task
@@ -65,11 +65,25 @@ export declare function detectExistingAgentTargetPaths(projectRoot: string): str
65
65
  export declare function detectExistingAgentTargetPath(projectRoot: string): string | undefined;
66
66
  export declare function resolveAgentTargetPaths(agent?: string | string[]): string[];
67
67
  export declare function resolveAgentTargetPath(agent?: string): string;
68
- export declare function writeAgentInstructions({ projectRoot, targetPath, targetPaths, interactive, }: {
68
+ export interface AgentConflictInfo {
69
+ targetPath: string;
70
+ }
71
+ /**
72
+ * Detect agent instruction files that would conflict (exist without markers).
73
+ * Returns only files that need a user decision (append or skip).
74
+ * Read-only — does not write or modify any files.
75
+ */
76
+ export declare function detectAgentConflicts({ projectRoot, targetPaths, }: {
77
+ projectRoot: string;
78
+ targetPaths?: string[];
79
+ }): Promise<AgentConflictInfo[]>;
80
+ export declare function writeAgentInstructions({ projectRoot, targetPath, targetPaths, interactive, conflictDecisions, silent, }: {
69
81
  projectRoot: string;
70
82
  targetPath?: string;
71
83
  targetPaths?: string[];
72
84
  interactive: boolean;
85
+ conflictDecisions?: Map<string, 'append' | 'skip'>;
86
+ silent?: boolean;
73
87
  }): Promise<void>;
74
88
  export declare function replaceMarkedAgentInstructionsSection(existing: string, incoming: string): string | undefined;
75
89
  export {};
@@ -239,14 +239,73 @@ function resolveSingleAgentTargetPath(agent) {
239
239
  const match = AGENTS.find((option) => normalizeAgentName(option.id) === resolved || normalizeAgentName(option.label) === resolved);
240
240
  return match?.targetPath ?? AGENTS[AGENTS.length - 1].targetPath;
241
241
  }
242
- export async function writeAgentInstructions({ projectRoot, targetPath, targetPaths, interactive, }) {
242
+ /**
243
+ * Detect agent instruction files that would conflict (exist without markers).
244
+ * Returns only files that need a user decision (append or skip).
245
+ * Read-only — does not write or modify any files.
246
+ */
247
+ export async function detectAgentConflicts({ projectRoot, targetPaths, }) {
248
+ if (!targetPaths || targetPaths.length === 0) {
249
+ return [];
250
+ }
251
+ const sourcePath = path.join(pkgRoot, 'AGENTS.md');
252
+ if (!fs.existsSync(sourcePath)) {
253
+ return [];
254
+ }
255
+ const incomingContent = await fsPromises.readFile(sourcePath, 'utf-8');
256
+ const shouldLinkToAgents = targetPaths.includes(AGENT_STANDARD_PATH);
257
+ const orderedPaths = shouldLinkToAgents
258
+ ? [AGENT_STANDARD_PATH, ...targetPaths.filter((p) => p !== AGENT_STANDARD_PATH)]
259
+ : targetPaths;
260
+ const conflicts = [];
261
+ const seenDestinationPaths = new Set();
262
+ const seenRealPaths = new Set();
263
+ for (const targetPathToCheck of orderedPaths) {
264
+ const destinationPath = path.join(projectRoot, targetPathToCheck);
265
+ const destinationKey = path.resolve(destinationPath);
266
+ if (seenDestinationPaths.has(destinationKey)) {
267
+ continue;
268
+ }
269
+ seenDestinationPaths.add(destinationKey);
270
+ // If linking to AGENTS.md, non-AGENTS.md paths that are not regular files get linked
271
+ if (shouldLinkToAgents && targetPathToCheck !== AGENT_STANDARD_PATH) {
272
+ const existing = await getExistingPathKind(destinationPath);
273
+ if (existing !== 'file') {
274
+ continue;
275
+ }
276
+ }
277
+ if (fs.existsSync(destinationPath)) {
278
+ if (fs.lstatSync(destinationPath).isSymbolicLink()) {
279
+ continue;
280
+ }
281
+ const destinationRealPath = await fsPromises.realpath(destinationPath);
282
+ if (seenRealPaths.has(destinationRealPath)) {
283
+ continue;
284
+ }
285
+ const existingContent = await fsPromises.readFile(destinationPath, 'utf-8');
286
+ const updatedContent = replaceMarkedAgentInstructionsSection(existingContent, incomingContent);
287
+ if (updatedContent !== undefined) {
288
+ // Has markers — will auto-update, no conflict
289
+ seenRealPaths.add(destinationRealPath);
290
+ continue;
291
+ }
292
+ // Conflict — needs user decision
293
+ conflicts.push({ targetPath: targetPathToCheck });
294
+ seenRealPaths.add(destinationRealPath);
295
+ }
296
+ }
297
+ return conflicts;
298
+ }
299
+ export async function writeAgentInstructions({ projectRoot, targetPath, targetPaths, interactive, conflictDecisions, silent = false, }) {
243
300
  const paths = [...(targetPaths ?? []), ...(targetPath ? [targetPath] : [])];
244
301
  if (paths.length === 0) {
245
302
  return;
246
303
  }
247
304
  const sourcePath = path.join(pkgRoot, 'AGENTS.md');
248
305
  if (!fs.existsSync(sourcePath)) {
249
- prompts.log.warn('Agent instructions template not found; skipping.');
306
+ if (!silent) {
307
+ prompts.log.warn('Agent instructions template not found; skipping.');
308
+ }
250
309
  return;
251
310
  }
252
311
  const seenDestinationPaths = new Set();
@@ -265,19 +324,23 @@ export async function writeAgentInstructions({ projectRoot, targetPath, targetPa
265
324
  seenDestinationPaths.add(destinationKey);
266
325
  await fsPromises.mkdir(path.dirname(destinationPath), { recursive: true });
267
326
  if (shouldLinkToAgents && targetPathToWrite !== AGENT_STANDARD_PATH) {
268
- const linked = await tryLinkTargetToAgents(projectRoot, targetPathToWrite);
327
+ const linked = await tryLinkTargetToAgents(projectRoot, targetPathToWrite, silent);
269
328
  if (linked) {
270
329
  continue;
271
330
  }
272
331
  }
273
332
  if (fs.existsSync(destinationPath)) {
274
333
  if (fs.lstatSync(destinationPath).isSymbolicLink()) {
275
- prompts.log.info(`Skipped writing ${targetPathToWrite} (symlink)`);
334
+ if (!silent) {
335
+ prompts.log.info(`Skipped writing ${targetPathToWrite} (symlink)`);
336
+ }
276
337
  continue;
277
338
  }
278
339
  const destinationRealPath = await fsPromises.realpath(destinationPath);
279
340
  if (seenRealPaths.has(destinationRealPath)) {
280
- prompts.log.info(`Skipped writing ${targetPathToWrite} (duplicate target)`);
341
+ if (!silent) {
342
+ prompts.log.info(`Skipped writing ${targetPathToWrite} (duplicate target)`);
343
+ }
281
344
  continue;
282
345
  }
283
346
  const existingContent = await fsPromises.readFile(destinationPath, 'utf-8');
@@ -289,7 +352,13 @@ export async function writeAgentInstructions({ projectRoot, targetPath, targetPa
289
352
  seenRealPaths.add(destinationRealPath);
290
353
  continue;
291
354
  }
292
- if (interactive) {
355
+ // Determine conflict action from pre-resolved decisions, interactive prompt, or default
356
+ let conflictAction;
357
+ const preResolved = conflictDecisions?.get(targetPathToWrite);
358
+ if (preResolved) {
359
+ conflictAction = preResolved;
360
+ }
361
+ else if (interactive) {
293
362
  const action = await prompts.select({
294
363
  message: `Agent instructions already exist at ${targetPathToWrite}.`,
295
364
  options: [
@@ -306,26 +375,37 @@ export async function writeAgentInstructions({ projectRoot, targetPath, targetPa
306
375
  ],
307
376
  initialValue: 'skip',
308
377
  });
309
- if (prompts.isCancel(action) || action === 'skip') {
310
- prompts.log.info(`Skipped writing ${targetPathToWrite}`);
311
- seenRealPaths.add(destinationRealPath);
312
- continue;
378
+ conflictAction = prompts.isCancel(action) || action === 'skip' ? 'skip' : 'append';
379
+ }
380
+ else {
381
+ conflictAction = 'skip';
382
+ }
383
+ if (conflictAction === 'append') {
384
+ await appendAgentContent(destinationPath, targetPathToWrite, existingContent, incomingContent, silent);
385
+ }
386
+ else {
387
+ const suffix = !preResolved && !interactive ? ' (already exists)' : '';
388
+ if (!silent) {
389
+ prompts.log.info(`Skipped writing ${targetPathToWrite}${suffix}`);
313
390
  }
314
- const separator = existingContent.endsWith('\n') ? '' : '\n';
315
- await fsPromises.appendFile(destinationPath, `${separator}\n${incomingContent}`);
316
- prompts.log.success(`Appended agent instructions to ${targetPathToWrite}`);
317
- seenRealPaths.add(destinationRealPath);
318
- continue;
319
391
  }
320
- prompts.log.info(`Skipped writing ${targetPathToWrite} (already exists)`);
321
392
  seenRealPaths.add(destinationRealPath);
322
393
  continue;
323
394
  }
324
395
  await fsPromises.writeFile(destinationPath, incomingContent);
325
- prompts.log.success(`Wrote agent instructions to ${targetPathToWrite}`);
396
+ if (!silent) {
397
+ prompts.log.success(`Wrote agent instructions to ${targetPathToWrite}`);
398
+ }
326
399
  seenRealPaths.add(await fsPromises.realpath(destinationPath));
327
400
  }
328
401
  }
402
+ async function appendAgentContent(destinationPath, targetPath, existingContent, incomingContent, silent = false) {
403
+ const separator = existingContent.endsWith('\n') ? '' : '\n';
404
+ await fsPromises.appendFile(destinationPath, `${separator}\n${incomingContent}`);
405
+ if (!silent) {
406
+ prompts.log.success(`Appended agent instructions to ${targetPath}`);
407
+ }
408
+ }
329
409
  function normalizeAgentName(value) {
330
410
  return value
331
411
  .trim()
@@ -343,7 +423,7 @@ export function replaceMarkedAgentInstructionsSection(existing, incoming) {
343
423
  }
344
424
  return `${existing.slice(0, existingRange.start)}${incoming.slice(incomingRange.start, incomingRange.end)}${existing.slice(existingRange.end)}`;
345
425
  }
346
- async function tryLinkTargetToAgents(projectRoot, targetPath) {
426
+ async function tryLinkTargetToAgents(projectRoot, targetPath, silent = false) {
347
427
  const destinationPath = path.join(projectRoot, targetPath);
348
428
  const agentsPath = path.join(projectRoot, AGENT_STANDARD_PATH);
349
429
  const symlinkTarget = path.relative(path.dirname(destinationPath), agentsPath);
@@ -355,13 +435,17 @@ async function tryLinkTargetToAgents(projectRoot, targetPath) {
355
435
  const currentLink = await fsPromises.readlink(destinationPath);
356
436
  const resolvedCurrentLink = path.resolve(path.dirname(destinationPath), currentLink);
357
437
  if (resolvedCurrentLink === agentsPath) {
358
- prompts.log.info(`Skipped linking ${targetPath} (already linked to ${AGENT_STANDARD_PATH})`);
438
+ if (!silent) {
439
+ prompts.log.info(`Skipped linking ${targetPath} (already linked to ${AGENT_STANDARD_PATH})`);
440
+ }
359
441
  return true;
360
442
  }
361
443
  await fsPromises.unlink(destinationPath);
362
444
  }
363
445
  await fsPromises.symlink(symlinkTarget, destinationPath);
364
- prompts.log.success(`Linked ${targetPath} to ${AGENT_STANDARD_PATH}`);
446
+ if (!silent) {
447
+ prompts.log.success(`Linked ${targetPath} to ${AGENT_STANDARD_PATH}`);
448
+ }
365
449
  return true;
366
450
  }
367
451
  async function getExistingPathKind(filePath) {
@@ -2,6 +2,7 @@ export declare const VITE_PLUS_NAME = "vite-plus";
2
2
  export declare const VITE_PLUS_VERSION: string;
3
3
  export declare const VITE_PLUS_OVERRIDE_PACKAGES: Record<string, string>;
4
4
  export declare function resolve(path: string): string;
5
+ export declare const BASEURL_TSCONFIG_WARNING: string;
5
6
  export declare const DEFAULT_ENVS: {
6
7
  readonly JS_RUNTIME_VERSION: string;
7
8
  readonly JS_RUNTIME_NAME: string;
@@ -14,6 +14,8 @@ export function resolve(path) {
14
14
  paths: [process.cwd(), import.meta.dirname],
15
15
  });
16
16
  }
17
+ export const BASEURL_TSCONFIG_WARNING = 'Skipped typeAware/typeCheck: tsconfig.json contains baseUrl which is not yet supported by the oxlint type checker.\n' +
18
+ ' Run `npx @andrewbranch/ts5to6 --fixBaseUrl .` to remove baseUrl from your tsconfig.';
17
19
  export const DEFAULT_ENVS = {
18
20
  // Provide Node.js runtime information for oxfmt's telemetry/compatibility
19
21
  JS_RUNTIME_VERSION: process.versions.node,
@@ -7,16 +7,29 @@ export declare const EDITORS: readonly [{
7
7
  readonly 'extensions.json': Record<string, unknown>;
8
8
  };
9
9
  }];
10
- type EditorId = (typeof EDITORS)[number]['id'];
10
+ export type EditorId = (typeof EDITORS)[number]['id'];
11
11
  export declare function selectEditor({ interactive, editor, onCancel, }: {
12
12
  interactive: boolean;
13
13
  editor?: string | false;
14
14
  onCancel: () => void;
15
15
  }): Promise<EditorId | undefined>;
16
16
  export declare function detectExistingEditor(projectRoot: string): EditorId | undefined;
17
- export declare function writeEditorConfigs({ projectRoot, editorId, interactive, }: {
17
+ export interface EditorConflictInfo {
18
+ fileName: string;
19
+ displayPath: string;
20
+ }
21
+ /**
22
+ * Detect editor config files that would conflict (already exist).
23
+ * Read-only — does not write or modify any files.
24
+ */
25
+ export declare function detectEditorConflicts({ projectRoot, editorId, }: {
26
+ projectRoot: string;
27
+ editorId: EditorId | undefined;
28
+ }): EditorConflictInfo[];
29
+ export declare function writeEditorConfigs({ projectRoot, editorId, interactive, conflictDecisions, silent, }: {
18
30
  projectRoot: string;
19
31
  editorId: EditorId | undefined;
20
32
  interactive: boolean;
33
+ conflictDecisions?: Map<string, 'merge' | 'skip'>;
34
+ silent?: boolean;
21
35
  }): Promise<void>;
22
- export {};