owndesign 0.3.0 → 0.4.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 (152) hide show
  1. package/dist/index.js +1 -1
  2. package/dist/server/index.js +524 -563
  3. package/dist/web/assets/{angular-html-lxSCvhwL.js → angular-html-Dt-3HpmA.js} +1 -1
  4. package/dist/web/assets/{angular-ts-9o8VjWJ-.js → angular-ts--R7ZuJTc.js} +1 -1
  5. package/dist/web/assets/{apl-DuLaPdsd.js → apl-CWMGU86F.js} +1 -1
  6. package/dist/web/assets/{arc-CjGPEYrp.js → arc-Cjzdh6W0.js} +1 -1
  7. package/dist/web/assets/architecture-7EHR7CIX-BGSmP16y.js +1 -0
  8. package/dist/web/assets/{architectureDiagram-3BPJPVTR-DXUCjZTp.js → architectureDiagram-3BPJPVTR-Cnqfpv7r.js} +1 -1
  9. package/dist/web/assets/{astro-BLEByV-M.js → astro-C-dDEebc.js} +1 -1
  10. package/dist/web/assets/{blade-r5Qq9yG3.js → blade-D5QonKud.js} +1 -1
  11. package/dist/web/assets/{blockDiagram-GPEHLZMM-szUpP9rJ.js → blockDiagram-GPEHLZMM-CnMhZu_2.js} +1 -1
  12. package/dist/web/assets/{c-CzQsHsw4.js → c-CqpS4SLy.js} +1 -1
  13. package/dist/web/assets/{c4Diagram-AAUBKEIU-sGWxqwi0.js → c4Diagram-AAUBKEIU-BiIEJRTR.js} +1 -1
  14. package/dist/web/assets/channel-oWivUzZs.js +1 -0
  15. package/dist/web/assets/{chunk-2J33WTMH-CqdFceta.js → chunk-2J33WTMH-C7sf9u29.js} +1 -1
  16. package/dist/web/assets/{chunk-4BX2VUAB-I1UxlQnz.js → chunk-4BX2VUAB-DJa-ta3_.js} +1 -1
  17. package/dist/web/assets/{chunk-55IACEB6-CwvstDc-.js → chunk-55IACEB6-IuYkBg6Z.js} +1 -1
  18. package/dist/web/assets/{chunk-727SXJPM-0_NekkrO.js → chunk-727SXJPM-DRe0RztT.js} +1 -1
  19. package/dist/web/assets/{chunk-AQP2D5EJ-BiHMFa1g.js → chunk-AQP2D5EJ-C9dDxbg-.js} +1 -1
  20. package/dist/web/assets/{chunk-FMBD7UC4-js8HpZNA.js → chunk-FMBD7UC4-DUtDHCn6.js} +1 -1
  21. package/dist/web/assets/{chunk-ND2GUHAM-Czpg14g1.js → chunk-ND2GUHAM-LB_Sxczr.js} +1 -1
  22. package/dist/web/assets/chunk-QZHKN3VN-XqSWMCuK.js +1 -0
  23. package/dist/web/assets/classDiagram-4FO5ZUOK-BGKpAm2f.js +1 -0
  24. package/dist/web/assets/classDiagram-v2-Q7XG4LA2-BGKpAm2f.js +1 -0
  25. package/dist/web/assets/{cobol-CO945rlT.js → cobol-BeTgfKZA.js} +1 -1
  26. package/dist/web/assets/{coffee-DR5URqlg.js → coffee-Dt9wgCya.js} +1 -1
  27. package/dist/web/assets/{cose-bilkent-S5V4N54A-DSZLYll7.js → cose-bilkent-S5V4N54A-CRuR2FiM.js} +1 -1
  28. package/dist/web/assets/{cpp-DJsg-1jS.js → cpp-Czm9Mgzy.js} +1 -1
  29. package/dist/web/assets/{crystal-Cpiu5DT-.js → crystal-XKuDCEnE.js} +1 -1
  30. package/dist/web/assets/{css-BvfiII1w.js → css-B2hJ7nfb.js} +1 -1
  31. package/dist/web/assets/{dagre-BM42HDAG-CjJdbFCi.js → dagre-BM42HDAG-C-snB-JZ.js} +1 -1
  32. package/dist/web/assets/{diagram-2AECGRRQ-JYvMW6LE.js → diagram-2AECGRRQ-CWcC35LG.js} +1 -1
  33. package/dist/web/assets/{diagram-5GNKFQAL-6XKjuAuS.js → diagram-5GNKFQAL-Bp4r0qod.js} +1 -1
  34. package/dist/web/assets/{diagram-KO2AKTUF-BK3rNdGB.js → diagram-KO2AKTUF-hzdZTHQQ.js} +1 -1
  35. package/dist/web/assets/{diagram-LMA3HP47-DlPAqEVU.js → diagram-LMA3HP47-g3eVYV6c.js} +1 -1
  36. package/dist/web/assets/{diagram-OG6HWLK6-0Pced80T.js → diagram-OG6HWLK6-DU6YCKh8.js} +1 -1
  37. package/dist/web/assets/{edge-p1gAtDPm.js → edge-Cf4-IuU2.js} +1 -1
  38. package/dist/web/assets/{elixir-BT6-A55A.js → elixir-BhP-LvoP.js} +1 -1
  39. package/dist/web/assets/{elm-C0lI6FJm.js → elm-CXafMjPq.js} +1 -1
  40. package/dist/web/assets/{erDiagram-TEJ5UH35-BpVBPFfw.js → erDiagram-TEJ5UH35-YoAR2lGO.js} +1 -1
  41. package/dist/web/assets/{erb-kUlX6b6S.js → erb-BVT3AhdM.js} +1 -1
  42. package/dist/web/assets/eventmodeling-FCH6USID-CyaiCiqo.js +1 -0
  43. package/dist/web/assets/{flowDiagram-I6XJVG4X-CatDP1yZ.js → flowDiagram-I6XJVG4X-7URF-P1c.js} +1 -1
  44. package/dist/web/assets/{ganttDiagram-6RSMTGT7-OvSsoSR1.js → ganttDiagram-6RSMTGT7-AhzOLDvp.js} +1 -1
  45. package/dist/web/assets/{git-rebase-yqFdSVIN.js → git-rebase-Du6nkvTe.js} +1 -1
  46. package/dist/web/assets/gitGraph-WXDBUCRP-BM-DYSID.js +1 -0
  47. package/dist/web/assets/{gitGraphDiagram-PVQCEYII-DOWtAnoh.js → gitGraphDiagram-PVQCEYII-Bz7fdMUs.js} +1 -1
  48. package/dist/web/assets/{glimmer-js-D0UD9rcE.js → glimmer-js-eiDlOXb3.js} +1 -1
  49. package/dist/web/assets/{glimmer-ts-DUheOO_R.js → glimmer-ts-C9hrMeAe.js} +1 -1
  50. package/dist/web/assets/{glsl-CKLYL0E0.js → glsl-BNZcc-CU.js} +1 -1
  51. package/dist/web/assets/{graphql-WoIjRaKW.js → graphql-We1GMJ9V.js} +1 -1
  52. package/dist/web/assets/{hack-B81_I6v1.js → hack-Cbdgfg30.js} +1 -1
  53. package/dist/web/assets/{haml-BGP9aNzI.js → haml-D12vEbfD.js} +1 -1
  54. package/dist/web/assets/{handlebars-COAB2Q5J.js → handlebars-B7ymO2a2.js} +1 -1
  55. package/dist/web/assets/{highlighted-body-OFNGDK62-BJGO2ESA.js → highlighted-body-OFNGDK62-C5RKt5TK.js} +1 -1
  56. package/dist/web/assets/{html-DOBY_OMj.js → html-BjHqhvb3.js} +1 -1
  57. package/dist/web/assets/{html-derivative-BS49r9Go.js → html-derivative-Cfxz_9AH.js} +1 -1
  58. package/dist/web/assets/{http-DeF9uCGR.js → http-CIDl6bKJ.js} +1 -1
  59. package/dist/web/assets/{hurl-TEKOd5S2.js → hurl-CxNOxlaR.js} +1 -1
  60. package/dist/web/assets/index-BPW7AO85.js +977 -0
  61. package/dist/web/assets/index-qzT4Spui.css +2 -0
  62. package/dist/web/assets/info-J43DQDTF-DMHBhHEc.js +1 -0
  63. package/dist/web/assets/{infoDiagram-5YYISTIA-A6NZdqqr.js → infoDiagram-5YYISTIA-CW2k0pQb.js} +1 -1
  64. package/dist/web/assets/{ishikawaDiagram-YF4QCWOH-DSGUVJWc.js → ishikawaDiagram-YF4QCWOH-DYFe2lnZ.js} +1 -1
  65. package/dist/web/assets/{java-BLrckjg2.js → java-CjjCHMQP.js} +1 -1
  66. package/dist/web/assets/{javascript-ssJ9SNc3.js → javascript-BKyaVUvf.js} +1 -1
  67. package/dist/web/assets/{jinja-DF3ACZGF.js → jinja-B8Y04orJ.js} +1 -1
  68. package/dist/web/assets/{jison-9yBqOy3u.js → jison-CMFF7oG3.js} +1 -1
  69. package/dist/web/assets/{journeyDiagram-JHISSGLW-DmKkMGZ2.js → journeyDiagram-JHISSGLW-ByrQEQ4F.js} +1 -1
  70. package/dist/web/assets/{json-DfJ4qO82.js → json-hq-29_wH.js} +1 -1
  71. package/dist/web/assets/{jsx-CK-Q2qYF.js → jsx-DNiQ6Hw2.js} +1 -1
  72. package/dist/web/assets/{julia-BmFjT6_n.js → julia-CqLWCdul.js} +1 -1
  73. package/dist/web/assets/{just-CiOlx5Ph.js → just-DVcFjJbX.js} +1 -1
  74. package/dist/web/assets/{kanban-definition-UN3LZRKU-DQWJpaEQ.js → kanban-definition-UN3LZRKU-XTvvg_8A.js} +1 -1
  75. package/dist/web/assets/{latex-CMdEB67N.js → latex-P09NZ8wm.js} +1 -1
  76. package/dist/web/assets/{linear-CbdXFXyj.js → linear-CcPFy4lQ.js} +1 -1
  77. package/dist/web/assets/{liquid-DKqpNl0q.js → liquid-zF9mu1hg.js} +1 -1
  78. package/dist/web/assets/{lua-Baadel1U.js → lua-iTwm_wcO.js} +1 -1
  79. package/dist/web/assets/{marko-Q6JAVvxB.js → marko-BLVWAxsp.js} +1 -1
  80. package/dist/web/assets/{mdc-BghotbDO.js → mdc-B75TTk3c.js} +1 -1
  81. package/dist/web/assets/mermaid-GHXKKRXX-DJ4qcPa4.js +1 -0
  82. package/dist/web/assets/{mermaid-parser.core-CmFBgrUR.js → mermaid-parser.core-5xwt1UvS.js} +2 -2
  83. package/dist/web/assets/{mindmap-definition-RKZ34NQL-DwyFXWnl.js → mindmap-definition-RKZ34NQL-CeBioqMG.js} +1 -1
  84. package/dist/web/assets/{nginx-olXc_Opl.js → nginx-CD0vHVBs.js} +1 -1
  85. package/dist/web/assets/{nim-BdObeQj2.js → nim-DvOqbSaR.js} +1 -1
  86. package/dist/web/assets/packet-YPE3B663-DLGxmT9W.js +1 -0
  87. package/dist/web/assets/{perl-BDeQ9lt1.js → perl-DjuV6ilb.js} +1 -1
  88. package/dist/web/assets/{php-BXbyZSzy.js → php-nzo1x2wJ.js} +1 -1
  89. package/dist/web/assets/pie-LRSECV5Y-Db74JZ7J.js +1 -0
  90. package/dist/web/assets/{pieDiagram-4H26LBE5-DvZXSYlE.js → pieDiagram-4H26LBE5-D0aCJAZp.js} +1 -1
  91. package/dist/web/assets/{pug-BS3j9KKR.js → pug-NLTVTGwh.js} +1 -1
  92. package/dist/web/assets/{qml-CGzTxrPg.js → qml-Ba_lfW8D.js} +1 -1
  93. package/dist/web/assets/{quadrantDiagram-W4KKPZXB-DHSOfQDh.js → quadrantDiagram-W4KKPZXB-CN825OKg.js} +1 -1
  94. package/dist/web/assets/{r-FBfLPkFQ.js → r-fxZAcHht.js} +1 -1
  95. package/dist/web/assets/radar-GUYGQ44K-BOanNhTV.js +1 -0
  96. package/dist/web/assets/{razor-CNrTMVrl.js → razor-Dyqmt-9k.js} +1 -1
  97. package/dist/web/assets/{regexp-CzgXjeSd.js → regexp-BrVcJQP3.js} +1 -1
  98. package/dist/web/assets/{requirementDiagram-4Y6WPE33-B5wcv6Wh.js → requirementDiagram-4Y6WPE33-BtMFyw8M.js} +1 -1
  99. package/dist/web/assets/{rst-CkjxTdXx.js → rst-Cc0xN4JL.js} +1 -1
  100. package/dist/web/assets/{ruby-By72S_XS.js → ruby-BP1mU4jT.js} +1 -1
  101. package/dist/web/assets/{sankeyDiagram-5OEKKPKP-Dyg9t31Q.js → sankeyDiagram-5OEKKPKP-0nSEWoqE.js} +1 -1
  102. package/dist/web/assets/{sas-CrLLYGxO.js → sas-CSjhY03w.js} +1 -1
  103. package/dist/web/assets/{scss-DXUucmC3.js → scss-CeOQOIe5.js} +1 -1
  104. package/dist/web/assets/{sequenceDiagram-3UESZ5HK-D0oklOHI.js → sequenceDiagram-3UESZ5HK-CCy6573d.js} +1 -1
  105. package/dist/web/assets/{shellscript-BLhatR0O.js → shellscript-CzkwO60i.js} +1 -1
  106. package/dist/web/assets/{shellsession-C3Grq5vB.js → shellsession-BoxW722T.js} +1 -1
  107. package/dist/web/assets/{soy-BvIYKLmE.js → soy-D0dLAaTh.js} +1 -1
  108. package/dist/web/assets/{sql-C-6VgHu3.js → sql-CQKU4uEx.js} +1 -1
  109. package/dist/web/assets/{stata-Lq9YpmVS.js → stata-DIn52ZW5.js} +1 -1
  110. package/dist/web/assets/{stateDiagram-AJRCARHV-CbPfq-ek.js → stateDiagram-AJRCARHV-rcYsa8_O.js} +1 -1
  111. package/dist/web/assets/stateDiagram-v2-BHNVJYJU-Cc8VusY-.js +1 -0
  112. package/dist/web/assets/{surrealql-CUpfqFyA.js → surrealql-DGq56tDM.js} +1 -1
  113. package/dist/web/assets/{svelte-aaHw--ao.js → svelte-CF7ewJNy.js} +1 -1
  114. package/dist/web/assets/{templ-B6ttvTvV.js → templ-BVhwZIdn.js} +1 -1
  115. package/dist/web/assets/{tex-IjkKlmjr.js → tex-12BK788i.js} +1 -1
  116. package/dist/web/assets/{timeline-definition-PNZ67QCA-b_m82sMF.js → timeline-definition-PNZ67QCA-DV5_kYSS.js} +1 -1
  117. package/dist/web/assets/treeView-BLDUP644-Bl3Gi2mD.js +1 -0
  118. package/dist/web/assets/treemap-LRROVOQU-BSnWy9LK.js +1 -0
  119. package/dist/web/assets/{ts-tags-DiNwcqaK.js → ts-tags-CwsNqdEU.js} +1 -1
  120. package/dist/web/assets/{tsx-DNvcRt2N.js → tsx-DUnh4qf7.js} +1 -1
  121. package/dist/web/assets/{twig-BiWBTrZ5.js → twig-CR3njBNT.js} +1 -1
  122. package/dist/web/assets/{typescript-B2a9v7eN.js → typescript-BLZeG0o6.js} +1 -1
  123. package/dist/web/assets/{vennDiagram-CIIHVFJN-DBWygoiI.js → vennDiagram-CIIHVFJN-Boo0gNvX.js} +1 -1
  124. package/dist/web/assets/{vue-DQABsf--.js → vue--RPaUu44.js} +1 -1
  125. package/dist/web/assets/{vue-html-ft-vQ2lC.js → vue-html-COVfRgkP.js} +1 -1
  126. package/dist/web/assets/{vue-vine-CdovOaJw.js → vue-vine-BJ8mkWrF.js} +1 -1
  127. package/dist/web/assets/wardley-L42UT6IY-B9gzGpm1.js +1 -0
  128. package/dist/web/assets/{wardleyDiagram-YWT4CUSO-CaXIM5p_.js → wardleyDiagram-YWT4CUSO-B8amSsPy.js} +1 -1
  129. package/dist/web/assets/{xml-BF0Lyn0J.js → xml-BvE4JeBo.js} +1 -1
  130. package/dist/web/assets/{xsl-CYDKiNV0.js → xsl-BLmQgj55.js} +1 -1
  131. package/dist/web/assets/{xychartDiagram-2RQKCTM6-DM4HA_fE.js → xychartDiagram-2RQKCTM6-CHu2uWGI.js} +1 -1
  132. package/dist/web/assets/{yaml-BzwVxm9L.js → yaml-CfFZORgQ.js} +1 -1
  133. package/dist/web/index.html +2 -2
  134. package/package.json +1 -1
  135. package/dist/web/assets/architecture-7EHR7CIX-BDvFsvWB.js +0 -1
  136. package/dist/web/assets/channel-yL53-SgV.js +0 -1
  137. package/dist/web/assets/chunk-QZHKN3VN-CkNcXM2b.js +0 -1
  138. package/dist/web/assets/classDiagram-4FO5ZUOK-C_kxQ6P_.js +0 -1
  139. package/dist/web/assets/classDiagram-v2-Q7XG4LA2-C_kxQ6P_.js +0 -1
  140. package/dist/web/assets/eventmodeling-FCH6USID-DvBFFU4g.js +0 -1
  141. package/dist/web/assets/gitGraph-WXDBUCRP-8ssz__QZ.js +0 -1
  142. package/dist/web/assets/index-Cq__lNgb.js +0 -977
  143. package/dist/web/assets/index-qc4m8KkF.css +0 -2
  144. package/dist/web/assets/info-J43DQDTF-Bk2BMRfI.js +0 -1
  145. package/dist/web/assets/mermaid-GHXKKRXX-DX2Vms3c.js +0 -1
  146. package/dist/web/assets/packet-YPE3B663-BYyg9wJW.js +0 -1
  147. package/dist/web/assets/pie-LRSECV5Y-DYk0KvX0.js +0 -1
  148. package/dist/web/assets/radar-GUYGQ44K-wSXHBdlE.js +0 -1
  149. package/dist/web/assets/stateDiagram-v2-BHNVJYJU-DYjRcQ9g.js +0 -1
  150. package/dist/web/assets/treeView-BLDUP644-CIwaftey.js +0 -1
  151. package/dist/web/assets/treemap-LRROVOQU-ix98cTe2.js +0 -1
  152. package/dist/web/assets/wardley-L42UT6IY-2IOBMKyh.js +0 -1
@@ -12,10 +12,10 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require
12
12
  if (typeof require !== "undefined") return require.apply(this, arguments);
13
13
  throw Error('Dynamic require of "' + x + '" is not supported');
14
14
  });
15
- var __glob = (map2) => (path15) => {
16
- var fn = map2[path15];
15
+ var __glob = (map2) => (path16) => {
16
+ var fn = map2[path16];
17
17
  if (fn) return fn();
18
- throw new Error("Module not found in bundle: " + path15);
18
+ throw new Error("Module not found in bundle: " + path16);
19
19
  };
20
20
  var __esm = (fn, res) => function __init() {
21
21
  return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
@@ -1187,7 +1187,7 @@ var require_auth_config = __commonJS({
1187
1187
  });
1188
1188
  module.exports = __toCommonJS(auth_config_exports);
1189
1189
  var fs12 = __toESM2(__require("fs"));
1190
- var path15 = __toESM2(__require("path"));
1190
+ var path16 = __toESM2(__require("path"));
1191
1191
  var import_token_util = require_token_util();
1192
1192
  function getAuthConfigPath() {
1193
1193
  const dataDir = (0, import_token_util.getVercelDataDir)();
@@ -1196,7 +1196,7 @@ var require_auth_config = __commonJS({
1196
1196
  `Unable to find Vercel CLI data directory. Your platform: ${process.platform}. Supported: darwin, linux, win32.`
1197
1197
  );
1198
1198
  }
1199
- return path15.join(dataDir, "auth.json");
1199
+ return path16.join(dataDir, "auth.json");
1200
1200
  }
1201
1201
  function readAuthConfig() {
1202
1202
  try {
@@ -1215,7 +1215,7 @@ var require_auth_config = __commonJS({
1215
1215
  }
1216
1216
  function writeAuthConfig(config2) {
1217
1217
  const authPath = getAuthConfigPath();
1218
- const authDir = path15.dirname(authPath);
1218
+ const authDir = path16.dirname(authPath);
1219
1219
  if (!fs12.existsSync(authDir)) {
1220
1220
  fs12.mkdirSync(authDir, { mode: 504, recursive: true });
1221
1221
  }
@@ -1410,7 +1410,7 @@ var require_token_util = __commonJS({
1410
1410
  saveToken: () => saveToken
1411
1411
  });
1412
1412
  module.exports = __toCommonJS(token_util_exports);
1413
- var path15 = __toESM2(__require("path"));
1413
+ var path16 = __toESM2(__require("path"));
1414
1414
  var fs12 = __toESM2(__require("fs"));
1415
1415
  var import_token_error = require_token_error();
1416
1416
  var import_token_io = require_token_io();
@@ -1423,7 +1423,7 @@ var require_token_util = __commonJS({
1423
1423
  if (!dataDir) {
1424
1424
  return null;
1425
1425
  }
1426
- return path15.join(dataDir, vercelFolder);
1426
+ return path16.join(dataDir, vercelFolder);
1427
1427
  }
1428
1428
  async function getVercelToken2(options) {
1429
1429
  const authConfig = (0, import_auth_config.readAuthConfig)();
@@ -1499,7 +1499,7 @@ var require_token_util = __commonJS({
1499
1499
  "Unable to find project root directory. Have you linked your project with `vc link?`"
1500
1500
  );
1501
1501
  }
1502
- const prjPath = path15.join(dir, ".vercel", "project.json");
1502
+ const prjPath = path16.join(dir, ".vercel", "project.json");
1503
1503
  if (!fs12.existsSync(prjPath)) {
1504
1504
  throw new import_token_error.VercelOidcTokenError(
1505
1505
  "project.json not found, have you linked your project with `vc link?`"
@@ -1520,9 +1520,9 @@ var require_token_util = __commonJS({
1520
1520
  "Unable to find user data directory. Please reach out to Vercel support."
1521
1521
  );
1522
1522
  }
1523
- const tokenPath = path15.join(dir, "com.vercel.token", `${projectId}.json`);
1523
+ const tokenPath = path16.join(dir, "com.vercel.token", `${projectId}.json`);
1524
1524
  const tokenJson = JSON.stringify(token);
1525
- fs12.mkdirSync(path15.dirname(tokenPath), { mode: 504, recursive: true });
1525
+ fs12.mkdirSync(path16.dirname(tokenPath), { mode: 504, recursive: true });
1526
1526
  fs12.writeFileSync(tokenPath, tokenJson);
1527
1527
  fs12.chmodSync(tokenPath, 432);
1528
1528
  return;
@@ -1534,7 +1534,7 @@ var require_token_util = __commonJS({
1534
1534
  "Unable to find user data directory. Please reach out to Vercel support."
1535
1535
  );
1536
1536
  }
1537
- const tokenPath = path15.join(dir, "com.vercel.token", `${projectId}.json`);
1537
+ const tokenPath = path16.join(dir, "com.vercel.token", `${projectId}.json`);
1538
1538
  if (!fs12.existsSync(tokenPath)) {
1539
1539
  return null;
1540
1540
  }
@@ -1805,7 +1805,7 @@ var require_path = __commonJS({
1805
1805
  Object.defineProperty(exports, "__esModule", { value: true });
1806
1806
  exports.convertPosixPathToPattern = exports.convertWindowsPathToPattern = exports.convertPathToPattern = exports.escapePosixPath = exports.escapeWindowsPath = exports.escape = exports.removeLeadingDotSegment = exports.makeAbsolute = exports.unixify = void 0;
1807
1807
  var os7 = __require("os");
1808
- var path15 = __require("path");
1808
+ var path16 = __require("path");
1809
1809
  var IS_WINDOWS_PLATFORM = os7.platform() === "win32";
1810
1810
  var LEADING_DOT_SEGMENT_CHARACTERS_COUNT = 2;
1811
1811
  var POSIX_UNESCAPED_GLOB_SYMBOLS_RE = /(\\?)([()*?[\]{|}]|^!|[!+@](?=\()|\\(?![!()*+?@[\]{|}]))/g;
@@ -1817,7 +1817,7 @@ var require_path = __commonJS({
1817
1817
  }
1818
1818
  exports.unixify = unixify;
1819
1819
  function makeAbsolute(cwd, filepath) {
1820
- return path15.resolve(cwd, filepath);
1820
+ return path16.resolve(cwd, filepath);
1821
1821
  }
1822
1822
  exports.makeAbsolute = makeAbsolute;
1823
1823
  function removeLeadingDotSegment(entry) {
@@ -3114,7 +3114,7 @@ var require_braces = __commonJS({
3114
3114
  var require_constants2 = __commonJS({
3115
3115
  "../../node_modules/.pnpm/picomatch@2.3.2/node_modules/picomatch/lib/constants.js"(exports, module) {
3116
3116
  "use strict";
3117
- var path15 = __require("path");
3117
+ var path16 = __require("path");
3118
3118
  var WIN_SLASH = "\\\\/";
3119
3119
  var WIN_NO_SLASH = `[^${WIN_SLASH}]`;
3120
3120
  var DEFAULT_MAX_EXTGLOB_RECURSION = 0;
@@ -3288,7 +3288,7 @@ var require_constants2 = __commonJS({
3288
3288
  /* | */
3289
3289
  CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279,
3290
3290
  /* \uFEFF */
3291
- SEP: path15.sep,
3291
+ SEP: path16.sep,
3292
3292
  /**
3293
3293
  * Create EXTGLOB_CHARS
3294
3294
  */
@@ -3315,7 +3315,7 @@ var require_constants2 = __commonJS({
3315
3315
  var require_utils2 = __commonJS({
3316
3316
  "../../node_modules/.pnpm/picomatch@2.3.2/node_modules/picomatch/lib/utils.js"(exports) {
3317
3317
  "use strict";
3318
- var path15 = __require("path");
3318
+ var path16 = __require("path");
3319
3319
  var win32 = process.platform === "win32";
3320
3320
  var {
3321
3321
  REGEX_BACKSLASH,
@@ -3344,7 +3344,7 @@ var require_utils2 = __commonJS({
3344
3344
  if (options && typeof options.windows === "boolean") {
3345
3345
  return options.windows;
3346
3346
  }
3347
- return win32 === true || path15.sep === "\\";
3347
+ return win32 === true || path16.sep === "\\";
3348
3348
  };
3349
3349
  exports.escapeLast = (input, char, lastIdx) => {
3350
3350
  const idx = input.lastIndexOf(char, lastIdx);
@@ -4708,7 +4708,7 @@ var require_parse2 = __commonJS({
4708
4708
  var require_picomatch = __commonJS({
4709
4709
  "../../node_modules/.pnpm/picomatch@2.3.2/node_modules/picomatch/lib/picomatch.js"(exports, module) {
4710
4710
  "use strict";
4711
- var path15 = __require("path");
4711
+ var path16 = __require("path");
4712
4712
  var scan = require_scan();
4713
4713
  var parse3 = require_parse2();
4714
4714
  var utils = require_utils2();
@@ -4793,7 +4793,7 @@ var require_picomatch = __commonJS({
4793
4793
  };
4794
4794
  picomatch.matchBase = (input, glob, options, posix = utils.isWindows(options)) => {
4795
4795
  const regex = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options);
4796
- return regex.test(path15.basename(input));
4796
+ return regex.test(path16.basename(input));
4797
4797
  };
4798
4798
  picomatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str);
4799
4799
  picomatch.parse = (pattern, options) => {
@@ -5020,7 +5020,7 @@ var require_pattern = __commonJS({
5020
5020
  "use strict";
5021
5021
  Object.defineProperty(exports, "__esModule", { value: true });
5022
5022
  exports.isAbsolute = exports.partitionAbsoluteAndRelative = exports.removeDuplicateSlashes = exports.matchAny = exports.convertPatternsToRe = exports.makeRe = exports.getPatternParts = exports.expandBraceExpansion = exports.expandPatternsWithBraceExpansion = exports.isAffectDepthOfReadingPattern = exports.endsWithSlashGlobStar = exports.hasGlobStar = exports.getBaseDirectory = exports.isPatternRelatedToParentDirectory = exports.getPatternsOutsideCurrentDirectory = exports.getPatternsInsideCurrentDirectory = exports.getPositivePatterns = exports.getNegativePatterns = exports.isPositivePattern = exports.isNegativePattern = exports.convertToNegativePattern = exports.convertToPositivePattern = exports.isDynamicPattern = exports.isStaticPattern = void 0;
5023
- var path15 = __require("path");
5023
+ var path16 = __require("path");
5024
5024
  var globParent = require_glob_parent();
5025
5025
  var micromatch = require_micromatch();
5026
5026
  var GLOBSTAR = "**";
@@ -5115,7 +5115,7 @@ var require_pattern = __commonJS({
5115
5115
  }
5116
5116
  exports.endsWithSlashGlobStar = endsWithSlashGlobStar;
5117
5117
  function isAffectDepthOfReadingPattern(pattern) {
5118
- const basename = path15.basename(pattern);
5118
+ const basename = path16.basename(pattern);
5119
5119
  return endsWithSlashGlobStar(pattern) || isStaticPattern(basename);
5120
5120
  }
5121
5121
  exports.isAffectDepthOfReadingPattern = isAffectDepthOfReadingPattern;
@@ -5173,7 +5173,7 @@ var require_pattern = __commonJS({
5173
5173
  }
5174
5174
  exports.partitionAbsoluteAndRelative = partitionAbsoluteAndRelative;
5175
5175
  function isAbsolute(pattern) {
5176
- return path15.isAbsolute(pattern);
5176
+ return path16.isAbsolute(pattern);
5177
5177
  }
5178
5178
  exports.isAbsolute = isAbsolute;
5179
5179
  }
@@ -5350,8 +5350,8 @@ var require_utils3 = __commonJS({
5350
5350
  exports.errno = errno;
5351
5351
  var fs12 = require_fs();
5352
5352
  exports.fs = fs12;
5353
- var path15 = require_path();
5354
- exports.path = path15;
5353
+ var path16 = require_path();
5354
+ exports.path = path16;
5355
5355
  var pattern = require_pattern();
5356
5356
  exports.pattern = pattern;
5357
5357
  var stream2 = require_stream();
@@ -5463,8 +5463,8 @@ var require_async = __commonJS({
5463
5463
  "use strict";
5464
5464
  Object.defineProperty(exports, "__esModule", { value: true });
5465
5465
  exports.read = void 0;
5466
- function read(path15, settings, callback) {
5467
- settings.fs.lstat(path15, (lstatError, lstat2) => {
5466
+ function read(path16, settings, callback) {
5467
+ settings.fs.lstat(path16, (lstatError, lstat2) => {
5468
5468
  if (lstatError !== null) {
5469
5469
  callFailureCallback(callback, lstatError);
5470
5470
  return;
@@ -5473,7 +5473,7 @@ var require_async = __commonJS({
5473
5473
  callSuccessCallback(callback, lstat2);
5474
5474
  return;
5475
5475
  }
5476
- settings.fs.stat(path15, (statError, stat5) => {
5476
+ settings.fs.stat(path16, (statError, stat5) => {
5477
5477
  if (statError !== null) {
5478
5478
  if (settings.throwErrorOnBrokenSymbolicLink) {
5479
5479
  callFailureCallback(callback, statError);
@@ -5505,13 +5505,13 @@ var require_sync = __commonJS({
5505
5505
  "use strict";
5506
5506
  Object.defineProperty(exports, "__esModule", { value: true });
5507
5507
  exports.read = void 0;
5508
- function read(path15, settings) {
5509
- const lstat2 = settings.fs.lstatSync(path15);
5508
+ function read(path16, settings) {
5509
+ const lstat2 = settings.fs.lstatSync(path16);
5510
5510
  if (!lstat2.isSymbolicLink() || !settings.followSymbolicLink) {
5511
5511
  return lstat2;
5512
5512
  }
5513
5513
  try {
5514
- const stat5 = settings.fs.statSync(path15);
5514
+ const stat5 = settings.fs.statSync(path16);
5515
5515
  if (settings.markSymbolicLink) {
5516
5516
  stat5.isSymbolicLink = () => true;
5517
5517
  }
@@ -5582,17 +5582,17 @@ var require_out = __commonJS({
5582
5582
  var sync = require_sync();
5583
5583
  var settings_1 = require_settings();
5584
5584
  exports.Settings = settings_1.default;
5585
- function stat5(path15, optionsOrSettingsOrCallback, callback) {
5585
+ function stat5(path16, optionsOrSettingsOrCallback, callback) {
5586
5586
  if (typeof optionsOrSettingsOrCallback === "function") {
5587
- async.read(path15, getSettings(), optionsOrSettingsOrCallback);
5587
+ async.read(path16, getSettings(), optionsOrSettingsOrCallback);
5588
5588
  return;
5589
5589
  }
5590
- async.read(path15, getSettings(optionsOrSettingsOrCallback), callback);
5590
+ async.read(path16, getSettings(optionsOrSettingsOrCallback), callback);
5591
5591
  }
5592
5592
  exports.stat = stat5;
5593
- function statSync3(path15, optionsOrSettings) {
5593
+ function statSync3(path16, optionsOrSettings) {
5594
5594
  const settings = getSettings(optionsOrSettings);
5595
- return sync.read(path15, settings);
5595
+ return sync.read(path16, settings);
5596
5596
  }
5597
5597
  exports.statSync = statSync3;
5598
5598
  function getSettings(settingsOrOptions = {}) {
@@ -5808,16 +5808,16 @@ var require_async2 = __commonJS({
5808
5808
  return;
5809
5809
  }
5810
5810
  const tasks = names.map((name21) => {
5811
- const path15 = common.joinPathSegments(directory, name21, settings.pathSegmentSeparator);
5811
+ const path16 = common.joinPathSegments(directory, name21, settings.pathSegmentSeparator);
5812
5812
  return (done) => {
5813
- fsStat.stat(path15, settings.fsStatSettings, (error51, stats) => {
5813
+ fsStat.stat(path16, settings.fsStatSettings, (error51, stats) => {
5814
5814
  if (error51 !== null) {
5815
5815
  done(error51);
5816
5816
  return;
5817
5817
  }
5818
5818
  const entry = {
5819
5819
  name: name21,
5820
- path: path15,
5820
+ path: path16,
5821
5821
  dirent: utils.fs.createDirentFromStats(name21, stats)
5822
5822
  };
5823
5823
  if (settings.stats) {
@@ -5935,7 +5935,7 @@ var require_settings2 = __commonJS({
5935
5935
  "../../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/settings.js"(exports) {
5936
5936
  "use strict";
5937
5937
  Object.defineProperty(exports, "__esModule", { value: true });
5938
- var path15 = __require("path");
5938
+ var path16 = __require("path");
5939
5939
  var fsStat = require_out();
5940
5940
  var fs12 = require_fs4();
5941
5941
  var Settings = class {
@@ -5943,7 +5943,7 @@ var require_settings2 = __commonJS({
5943
5943
  this._options = _options;
5944
5944
  this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, false);
5945
5945
  this.fs = fs12.createFileSystemAdapter(this._options.fs);
5946
- this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path15.sep);
5946
+ this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path16.sep);
5947
5947
  this.stats = this._getValue(this._options.stats, false);
5948
5948
  this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true);
5949
5949
  this.fsStatSettings = new fsStat.Settings({
@@ -5970,17 +5970,17 @@ var require_out2 = __commonJS({
5970
5970
  var sync = require_sync2();
5971
5971
  var settings_1 = require_settings2();
5972
5972
  exports.Settings = settings_1.default;
5973
- function scandir(path15, optionsOrSettingsOrCallback, callback) {
5973
+ function scandir(path16, optionsOrSettingsOrCallback, callback) {
5974
5974
  if (typeof optionsOrSettingsOrCallback === "function") {
5975
- async.read(path15, getSettings(), optionsOrSettingsOrCallback);
5975
+ async.read(path16, getSettings(), optionsOrSettingsOrCallback);
5976
5976
  return;
5977
5977
  }
5978
- async.read(path15, getSettings(optionsOrSettingsOrCallback), callback);
5978
+ async.read(path16, getSettings(optionsOrSettingsOrCallback), callback);
5979
5979
  }
5980
5980
  exports.scandir = scandir;
5981
- function scandirSync(path15, optionsOrSettings) {
5981
+ function scandirSync(path16, optionsOrSettings) {
5982
5982
  const settings = getSettings(optionsOrSettings);
5983
- return sync.read(path15, settings);
5983
+ return sync.read(path16, settings);
5984
5984
  }
5985
5985
  exports.scandirSync = scandirSync;
5986
5986
  function getSettings(settingsOrOptions = {}) {
@@ -6627,7 +6627,7 @@ var require_settings3 = __commonJS({
6627
6627
  "../../node_modules/.pnpm/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/settings.js"(exports) {
6628
6628
  "use strict";
6629
6629
  Object.defineProperty(exports, "__esModule", { value: true });
6630
- var path15 = __require("path");
6630
+ var path16 = __require("path");
6631
6631
  var fsScandir = require_out2();
6632
6632
  var Settings = class {
6633
6633
  constructor(_options = {}) {
@@ -6637,7 +6637,7 @@ var require_settings3 = __commonJS({
6637
6637
  this.deepFilter = this._getValue(this._options.deepFilter, null);
6638
6638
  this.entryFilter = this._getValue(this._options.entryFilter, null);
6639
6639
  this.errorFilter = this._getValue(this._options.errorFilter, null);
6640
- this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path15.sep);
6640
+ this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path16.sep);
6641
6641
  this.fsScandirSettings = new fsScandir.Settings({
6642
6642
  followSymbolicLinks: this._options.followSymbolicLinks,
6643
6643
  fs: this._options.fs,
@@ -6699,7 +6699,7 @@ var require_reader2 = __commonJS({
6699
6699
  "../../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/readers/reader.js"(exports) {
6700
6700
  "use strict";
6701
6701
  Object.defineProperty(exports, "__esModule", { value: true });
6702
- var path15 = __require("path");
6702
+ var path16 = __require("path");
6703
6703
  var fsStat = require_out();
6704
6704
  var utils = require_utils3();
6705
6705
  var Reader = class {
@@ -6712,7 +6712,7 @@ var require_reader2 = __commonJS({
6712
6712
  });
6713
6713
  }
6714
6714
  _getFullEntryPath(filepath) {
6715
- return path15.resolve(this._settings.cwd, filepath);
6715
+ return path16.resolve(this._settings.cwd, filepath);
6716
6716
  }
6717
6717
  _makeEntry(stats, pattern) {
6718
6718
  const entry = {
@@ -7128,7 +7128,7 @@ var require_provider = __commonJS({
7128
7128
  "../../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/providers/provider.js"(exports) {
7129
7129
  "use strict";
7130
7130
  Object.defineProperty(exports, "__esModule", { value: true });
7131
- var path15 = __require("path");
7131
+ var path16 = __require("path");
7132
7132
  var deep_1 = require_deep();
7133
7133
  var entry_1 = require_entry();
7134
7134
  var error_1 = require_error();
@@ -7142,7 +7142,7 @@ var require_provider = __commonJS({
7142
7142
  this.entryTransformer = new entry_2.default(this._settings);
7143
7143
  }
7144
7144
  _getRootDirectory(task) {
7145
- return path15.resolve(this._settings.cwd, task.base);
7145
+ return path16.resolve(this._settings.cwd, task.base);
7146
7146
  }
7147
7147
  _getReaderOptions(task) {
7148
7148
  const basePath = task.base === "." ? "" : task.base;
@@ -7775,7 +7775,7 @@ var require_ignore = __commonJS({
7775
7775
  // path matching.
7776
7776
  // - check `string` either `MODE_IGNORE` or `MODE_CHECK_IGNORE`
7777
7777
  // @returns {TestResult} true if a file is ignored
7778
- test(path15, checkUnignored, mode) {
7778
+ test(path16, checkUnignored, mode) {
7779
7779
  let ignored = false;
7780
7780
  let unignored = false;
7781
7781
  let matchedRule;
@@ -7784,7 +7784,7 @@ var require_ignore = __commonJS({
7784
7784
  if (unignored === negative && ignored !== unignored || negative && !ignored && !unignored && !checkUnignored) {
7785
7785
  return;
7786
7786
  }
7787
- const matched = rule[mode].test(path15);
7787
+ const matched = rule[mode].test(path16);
7788
7788
  if (!matched) {
7789
7789
  return;
7790
7790
  }
@@ -7805,17 +7805,17 @@ var require_ignore = __commonJS({
7805
7805
  var throwError = (message, Ctor) => {
7806
7806
  throw new Ctor(message);
7807
7807
  };
7808
- var checkPath = (path15, originalPath, doThrow) => {
7809
- if (!isString(path15)) {
7808
+ var checkPath = (path16, originalPath, doThrow) => {
7809
+ if (!isString(path16)) {
7810
7810
  return doThrow(
7811
7811
  `path must be a string, but got \`${originalPath}\``,
7812
7812
  TypeError
7813
7813
  );
7814
7814
  }
7815
- if (!path15) {
7815
+ if (!path16) {
7816
7816
  return doThrow(`path must not be empty`, TypeError);
7817
7817
  }
7818
- if (checkPath.isNotRelative(path15)) {
7818
+ if (checkPath.isNotRelative(path16)) {
7819
7819
  const r = "`path.relative()`d";
7820
7820
  return doThrow(
7821
7821
  `path should be a ${r} string, but got "${originalPath}"`,
@@ -7824,7 +7824,7 @@ var require_ignore = __commonJS({
7824
7824
  }
7825
7825
  return true;
7826
7826
  };
7827
- var isNotRelative = (path15) => REGEX_TEST_INVALID_PATH.test(path15);
7827
+ var isNotRelative = (path16) => REGEX_TEST_INVALID_PATH.test(path16);
7828
7828
  checkPath.isNotRelative = isNotRelative;
7829
7829
  checkPath.convert = (p) => p;
7830
7830
  var Ignore = class {
@@ -7854,19 +7854,19 @@ var require_ignore = __commonJS({
7854
7854
  }
7855
7855
  // @returns {TestResult}
7856
7856
  _test(originalPath, cache, checkUnignored, slices) {
7857
- const path15 = originalPath && checkPath.convert(originalPath);
7857
+ const path16 = originalPath && checkPath.convert(originalPath);
7858
7858
  checkPath(
7859
- path15,
7859
+ path16,
7860
7860
  originalPath,
7861
7861
  this._strictPathCheck ? throwError : RETURN_FALSE
7862
7862
  );
7863
- return this._t(path15, cache, checkUnignored, slices);
7863
+ return this._t(path16, cache, checkUnignored, slices);
7864
7864
  }
7865
- checkIgnore(path15) {
7866
- if (!REGEX_TEST_TRAILING_SLASH.test(path15)) {
7867
- return this.test(path15);
7865
+ checkIgnore(path16) {
7866
+ if (!REGEX_TEST_TRAILING_SLASH.test(path16)) {
7867
+ return this.test(path16);
7868
7868
  }
7869
- const slices = path15.split(SLASH).filter(Boolean);
7869
+ const slices = path16.split(SLASH).filter(Boolean);
7870
7870
  slices.pop();
7871
7871
  if (slices.length) {
7872
7872
  const parent = this._t(
@@ -7879,18 +7879,18 @@ var require_ignore = __commonJS({
7879
7879
  return parent;
7880
7880
  }
7881
7881
  }
7882
- return this._rules.test(path15, false, MODE_CHECK_IGNORE);
7882
+ return this._rules.test(path16, false, MODE_CHECK_IGNORE);
7883
7883
  }
7884
- _t(path15, cache, checkUnignored, slices) {
7885
- if (path15 in cache) {
7886
- return cache[path15];
7884
+ _t(path16, cache, checkUnignored, slices) {
7885
+ if (path16 in cache) {
7886
+ return cache[path16];
7887
7887
  }
7888
7888
  if (!slices) {
7889
- slices = path15.split(SLASH).filter(Boolean);
7889
+ slices = path16.split(SLASH).filter(Boolean);
7890
7890
  }
7891
7891
  slices.pop();
7892
7892
  if (!slices.length) {
7893
- return cache[path15] = this._rules.test(path15, checkUnignored, MODE_IGNORE);
7893
+ return cache[path16] = this._rules.test(path16, checkUnignored, MODE_IGNORE);
7894
7894
  }
7895
7895
  const parent = this._t(
7896
7896
  slices.join(SLASH) + SLASH,
@@ -7898,29 +7898,29 @@ var require_ignore = __commonJS({
7898
7898
  checkUnignored,
7899
7899
  slices
7900
7900
  );
7901
- return cache[path15] = parent.ignored ? parent : this._rules.test(path15, checkUnignored, MODE_IGNORE);
7901
+ return cache[path16] = parent.ignored ? parent : this._rules.test(path16, checkUnignored, MODE_IGNORE);
7902
7902
  }
7903
- ignores(path15) {
7904
- return this._test(path15, this._ignoreCache, false).ignored;
7903
+ ignores(path16) {
7904
+ return this._test(path16, this._ignoreCache, false).ignored;
7905
7905
  }
7906
7906
  createFilter() {
7907
- return (path15) => !this.ignores(path15);
7907
+ return (path16) => !this.ignores(path16);
7908
7908
  }
7909
7909
  filter(paths) {
7910
7910
  return makeArray(paths).filter(this.createFilter());
7911
7911
  }
7912
7912
  // @returns {TestResult}
7913
- test(path15) {
7914
- return this._test(path15, this._testCache, true);
7913
+ test(path16) {
7914
+ return this._test(path16, this._testCache, true);
7915
7915
  }
7916
7916
  };
7917
7917
  var factory12 = (options) => new Ignore(options);
7918
- var isPathValid = (path15) => checkPath(path15 && checkPath.convert(path15), path15, RETURN_FALSE);
7918
+ var isPathValid = (path16) => checkPath(path16 && checkPath.convert(path16), path16, RETURN_FALSE);
7919
7919
  var setupWindows = () => {
7920
7920
  const makePosix = (str) => /^\\\\\?\\/.test(str) || /["<>|\u0000-\u001F]+/u.test(str) ? str : str.replace(/\\/g, "/");
7921
7921
  checkPath.convert = makePosix;
7922
7922
  const REGEX_TEST_WINDOWS_PATH_ABSOLUTE = /^[a-z]:\//i;
7923
- checkPath.isNotRelative = (path15) => REGEX_TEST_WINDOWS_PATH_ABSOLUTE.test(path15) || isNotRelative(path15);
7923
+ checkPath.isNotRelative = (path16) => REGEX_TEST_WINDOWS_PATH_ABSOLUTE.test(path16) || isNotRelative(path16);
7924
7924
  };
7925
7925
  if (
7926
7926
  // Detect `process` so that it can run in browsers.
@@ -7937,7 +7937,7 @@ var require_ignore = __commonJS({
7937
7937
 
7938
7938
  // ../../node_modules/.pnpm/move-file@4.1.0/node_modules/move-file/index.js
7939
7939
  import process5 from "node:process";
7940
- import path8 from "node:path";
7940
+ import path9 from "node:path";
7941
7941
  import fs4, { promises as fsPromises3 } from "node:fs";
7942
7942
  async function moveFile(sourcePath, destinationPath, options) {
7943
7943
  validatePathsExist(sourcePath, destinationPath);
@@ -7947,8 +7947,8 @@ var resolvePath, validatePathsExist, validateSameDirectory, _moveFile;
7947
7947
  var init_move_file = __esm({
7948
7948
  "../../node_modules/.pnpm/move-file@4.1.0/node_modules/move-file/index.js"() {
7949
7949
  resolvePath = (cwd, sourcePath, destinationPath) => {
7950
- sourcePath = path8.resolve(cwd, sourcePath);
7951
- destinationPath = path8.resolve(cwd, destinationPath);
7950
+ sourcePath = path9.resolve(cwd, sourcePath);
7951
+ destinationPath = path9.resolve(cwd, destinationPath);
7952
7952
  return {
7953
7953
  sourcePath,
7954
7954
  destinationPath
@@ -7960,7 +7960,7 @@ var init_move_file = __esm({
7960
7960
  }
7961
7961
  };
7962
7962
  validateSameDirectory = (source, destination) => {
7963
- if (path8.dirname(source) !== path8.dirname(destination)) {
7963
+ if (path9.dirname(source) !== path9.dirname(destination)) {
7964
7964
  throw new Error("`source` and `destination` must be in the same directory");
7965
7965
  }
7966
7966
  };
@@ -7974,7 +7974,7 @@ var init_move_file = __esm({
7974
7974
  if (!overwrite && fs4.existsSync(destinationPath)) {
7975
7975
  throw new Error(`The destination file exists: ${destinationPath}`);
7976
7976
  }
7977
- await fsPromises3.mkdir(path8.dirname(destinationPath), {
7977
+ await fsPromises3.mkdir(path9.dirname(destinationPath), {
7978
7978
  recursive: true,
7979
7979
  mode: directoryMode
7980
7980
  });
@@ -8058,7 +8058,7 @@ __export(macos_exports, {
8058
8058
  });
8059
8059
  import os2 from "node:os";
8060
8060
  import fs5 from "node:fs";
8061
- import path9 from "node:path";
8061
+ import path10 from "node:path";
8062
8062
  import process6 from "node:process";
8063
8063
  async function macOS(paths) {
8064
8064
  if (isOlderThanMountainLion) {
@@ -8073,19 +8073,19 @@ async function macOS(paths) {
8073
8073
  throw error51;
8074
8074
  }
8075
8075
  const trashDirectories = [
8076
- path9.join(os2.homedir(), ".Trash"),
8077
- path9.join(process6.cwd(), ".Trash")
8076
+ path10.join(os2.homedir(), ".Trash"),
8077
+ path10.join(process6.cwd(), ".Trash")
8078
8078
  ];
8079
8079
  await Promise.all(paths.map(async (filePath) => {
8080
- const base = path9.basename(filePath);
8080
+ const base = path10.basename(filePath);
8081
8081
  let lastError;
8082
8082
  for (const dir of trashDirectories) {
8083
8083
  try {
8084
8084
  await fs5.promises.mkdir(dir, { recursive: true });
8085
- let destination = path9.join(dir, base);
8085
+ let destination = path10.join(dir, base);
8086
8086
  let counter = 1;
8087
8087
  while (fs5.existsSync(destination)) {
8088
- destination = path9.join(dir, `${base} ${counter++}`);
8088
+ destination = path10.join(dir, `${base} ${counter++}`);
8089
8089
  }
8090
8090
  await moveFile(filePath, destination, { overwrite: false });
8091
8091
  return;
@@ -8343,16 +8343,16 @@ var init_wsl_utils = __esm({
8343
8343
  const { stdout } = await executePowerShell(command, { powerShellPath: psPath });
8344
8344
  return stdout.trim();
8345
8345
  };
8346
- isUrl = (path15) => /^[a-z]+:\/\//i.test(path15);
8346
+ isUrl = (path16) => /^[a-z]+:\/\//i.test(path16);
8347
8347
  convertWslPathToWindows = async (paths) => {
8348
8348
  const isBatch = Array.isArray(paths);
8349
8349
  const pathArray = isBatch ? paths : [paths];
8350
8350
  const indicesToConvert = [];
8351
8351
  const pathsToConvert = [];
8352
- for (const [index, path15] of pathArray.entries()) {
8353
- if (!isUrl(path15)) {
8352
+ for (const [index, path16] of pathArray.entries()) {
8353
+ if (!isUrl(path16)) {
8354
8354
  indicesToConvert.push(index);
8355
- pathsToConvert.push(path15);
8355
+ pathsToConvert.push(path16);
8356
8356
  }
8357
8357
  }
8358
8358
  const results = [...pathArray];
@@ -8368,9 +8368,9 @@ var init_wsl_utils = __esm({
8368
8368
  }
8369
8369
  return isBatch ? results : results[0];
8370
8370
  };
8371
- isUncPath = (path15) => /^\\\\/u.test(path15);
8372
- isPathOnWindowsFilesystem = async (path15) => {
8373
- const windowsPath = await convertWslPathToWindows(path15);
8371
+ isUncPath = (path16) => /^\\\\/u.test(path16);
8372
+ isPathOnWindowsFilesystem = async (path16) => {
8373
+ const windowsPath = await convertWslPathToWindows(path16);
8374
8374
  return !isUncPath(windowsPath);
8375
8375
  };
8376
8376
  convertWindowsPathToWsl = async (paths) => {
@@ -8435,7 +8435,7 @@ var require_windows = __commonJS({
8435
8435
  module.exports = isexe;
8436
8436
  isexe.sync = sync;
8437
8437
  var fs12 = __require("fs");
8438
- function checkPathExt(path15, options) {
8438
+ function checkPathExt(path16, options) {
8439
8439
  var pathext = options.pathExt !== void 0 ? options.pathExt : process.env.PATHEXT;
8440
8440
  if (!pathext) {
8441
8441
  return true;
@@ -8446,25 +8446,25 @@ var require_windows = __commonJS({
8446
8446
  }
8447
8447
  for (var i = 0; i < pathext.length; i++) {
8448
8448
  var p = pathext[i].toLowerCase();
8449
- if (p && path15.substr(-p.length).toLowerCase() === p) {
8449
+ if (p && path16.substr(-p.length).toLowerCase() === p) {
8450
8450
  return true;
8451
8451
  }
8452
8452
  }
8453
8453
  return false;
8454
8454
  }
8455
- function checkStat(stat5, path15, options) {
8455
+ function checkStat(stat5, path16, options) {
8456
8456
  if (!stat5.isSymbolicLink() && !stat5.isFile()) {
8457
8457
  return false;
8458
8458
  }
8459
- return checkPathExt(path15, options);
8459
+ return checkPathExt(path16, options);
8460
8460
  }
8461
- function isexe(path15, options, cb) {
8462
- fs12.stat(path15, function(er, stat5) {
8463
- cb(er, er ? false : checkStat(stat5, path15, options));
8461
+ function isexe(path16, options, cb) {
8462
+ fs12.stat(path16, function(er, stat5) {
8463
+ cb(er, er ? false : checkStat(stat5, path16, options));
8464
8464
  });
8465
8465
  }
8466
- function sync(path15, options) {
8467
- return checkStat(fs12.statSync(path15), path15, options);
8466
+ function sync(path16, options) {
8467
+ return checkStat(fs12.statSync(path16), path16, options);
8468
8468
  }
8469
8469
  }
8470
8470
  });
@@ -8475,13 +8475,13 @@ var require_mode = __commonJS({
8475
8475
  module.exports = isexe;
8476
8476
  isexe.sync = sync;
8477
8477
  var fs12 = __require("fs");
8478
- function isexe(path15, options, cb) {
8479
- fs12.stat(path15, function(er, stat5) {
8478
+ function isexe(path16, options, cb) {
8479
+ fs12.stat(path16, function(er, stat5) {
8480
8480
  cb(er, er ? false : checkStat(stat5, options));
8481
8481
  });
8482
8482
  }
8483
- function sync(path15, options) {
8484
- return checkStat(fs12.statSync(path15), options);
8483
+ function sync(path16, options) {
8484
+ return checkStat(fs12.statSync(path16), options);
8485
8485
  }
8486
8486
  function checkStat(stat5, options) {
8487
8487
  return stat5.isFile() && checkMode(stat5, options);
@@ -8514,7 +8514,7 @@ var require_isexe = __commonJS({
8514
8514
  }
8515
8515
  module.exports = isexe;
8516
8516
  isexe.sync = sync;
8517
- function isexe(path15, options, cb) {
8517
+ function isexe(path16, options, cb) {
8518
8518
  if (typeof options === "function") {
8519
8519
  cb = options;
8520
8520
  options = {};
@@ -8524,7 +8524,7 @@ var require_isexe = __commonJS({
8524
8524
  throw new TypeError("callback not provided");
8525
8525
  }
8526
8526
  return new Promise(function(resolve2, reject) {
8527
- isexe(path15, options || {}, function(er, is) {
8527
+ isexe(path16, options || {}, function(er, is) {
8528
8528
  if (er) {
8529
8529
  reject(er);
8530
8530
  } else {
@@ -8533,7 +8533,7 @@ var require_isexe = __commonJS({
8533
8533
  });
8534
8534
  });
8535
8535
  }
8536
- core(path15, options || {}, function(er, is) {
8536
+ core(path16, options || {}, function(er, is) {
8537
8537
  if (er) {
8538
8538
  if (er.code === "EACCES" || options && options.ignoreErrors) {
8539
8539
  er = null;
@@ -8543,9 +8543,9 @@ var require_isexe = __commonJS({
8543
8543
  cb(er, is);
8544
8544
  });
8545
8545
  }
8546
- function sync(path15, options) {
8546
+ function sync(path16, options) {
8547
8547
  try {
8548
- return core.sync(path15, options || {});
8548
+ return core.sync(path16, options || {});
8549
8549
  } catch (er) {
8550
8550
  if (options && options.ignoreErrors || er.code === "EACCES") {
8551
8551
  return false;
@@ -8561,7 +8561,7 @@ var require_isexe = __commonJS({
8561
8561
  var require_which = __commonJS({
8562
8562
  "../../node_modules/.pnpm/which@2.0.2/node_modules/which/which.js"(exports, module) {
8563
8563
  var isWindows = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys";
8564
- var path15 = __require("path");
8564
+ var path16 = __require("path");
8565
8565
  var COLON = isWindows ? ";" : ":";
8566
8566
  var isexe = require_isexe();
8567
8567
  var getNotFoundError = (cmd) => Object.assign(new Error(`not found: ${cmd}`), { code: "ENOENT" });
@@ -8599,7 +8599,7 @@ var require_which = __commonJS({
8599
8599
  return opt.all && found.length ? resolve2(found) : reject(getNotFoundError(cmd));
8600
8600
  const ppRaw = pathEnv[i];
8601
8601
  const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
8602
- const pCmd = path15.join(pathPart, cmd);
8602
+ const pCmd = path16.join(pathPart, cmd);
8603
8603
  const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
8604
8604
  resolve2(subStep(p, i, 0));
8605
8605
  });
@@ -8626,7 +8626,7 @@ var require_which = __commonJS({
8626
8626
  for (let i = 0; i < pathEnv.length; i++) {
8627
8627
  const ppRaw = pathEnv[i];
8628
8628
  const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
8629
- const pCmd = path15.join(pathPart, cmd);
8629
+ const pCmd = path16.join(pathPart, cmd);
8630
8630
  const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
8631
8631
  for (let j = 0; j < pathExt.length; j++) {
8632
8632
  const cur = p + pathExt[j];
@@ -8674,7 +8674,7 @@ var require_path_key = __commonJS({
8674
8674
  var require_resolveCommand = __commonJS({
8675
8675
  "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/resolveCommand.js"(exports, module) {
8676
8676
  "use strict";
8677
- var path15 = __require("path");
8677
+ var path16 = __require("path");
8678
8678
  var which = require_which();
8679
8679
  var getPathKey = require_path_key();
8680
8680
  function resolveCommandAttempt(parsed, withoutPathExt) {
@@ -8692,7 +8692,7 @@ var require_resolveCommand = __commonJS({
8692
8692
  try {
8693
8693
  resolved = which.sync(parsed.command, {
8694
8694
  path: env[getPathKey({ env })],
8695
- pathExt: withoutPathExt ? path15.delimiter : void 0
8695
+ pathExt: withoutPathExt ? path16.delimiter : void 0
8696
8696
  });
8697
8697
  } catch (e) {
8698
8698
  } finally {
@@ -8701,7 +8701,7 @@ var require_resolveCommand = __commonJS({
8701
8701
  }
8702
8702
  }
8703
8703
  if (resolved) {
8704
- resolved = path15.resolve(hasCustomCwd ? parsed.options.cwd : "", resolved);
8704
+ resolved = path16.resolve(hasCustomCwd ? parsed.options.cwd : "", resolved);
8705
8705
  }
8706
8706
  return resolved;
8707
8707
  }
@@ -8755,8 +8755,8 @@ var require_shebang_command = __commonJS({
8755
8755
  if (!match2) {
8756
8756
  return null;
8757
8757
  }
8758
- const [path15, argument] = match2[0].replace(/#! ?/, "").split(" ");
8759
- const binary3 = path15.split("/").pop();
8758
+ const [path16, argument] = match2[0].replace(/#! ?/, "").split(" ");
8759
+ const binary3 = path16.split("/").pop();
8760
8760
  if (binary3 === "env") {
8761
8761
  return argument;
8762
8762
  }
@@ -8791,7 +8791,7 @@ var require_readShebang = __commonJS({
8791
8791
  var require_parse3 = __commonJS({
8792
8792
  "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/parse.js"(exports, module) {
8793
8793
  "use strict";
8794
- var path15 = __require("path");
8794
+ var path16 = __require("path");
8795
8795
  var resolveCommand = require_resolveCommand();
8796
8796
  var escape = require_escape();
8797
8797
  var readShebang = require_readShebang();
@@ -8816,7 +8816,7 @@ var require_parse3 = __commonJS({
8816
8816
  const needsShell = !isExecutableRegExp.test(commandFile);
8817
8817
  if (parsed.options.forceShell || needsShell) {
8818
8818
  const needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile);
8819
- parsed.command = path15.normalize(parsed.command);
8819
+ parsed.command = path16.normalize(parsed.command);
8820
8820
  parsed.command = escape.command(parsed.command);
8821
8821
  parsed.args = parsed.args.map((arg) => escape.argument(arg, needsDoubleEscapeMetaChars));
8822
8822
  const shellCommand = [parsed.command].concat(parsed.args).join(" ");
@@ -8948,7 +8948,7 @@ var require_strip_final_newline = __commonJS({
8948
8948
  var require_npm_run_path = __commonJS({
8949
8949
  "../../node_modules/.pnpm/npm-run-path@3.1.0/node_modules/npm-run-path/index.js"(exports, module) {
8950
8950
  "use strict";
8951
- var path15 = __require("path");
8951
+ var path16 = __require("path");
8952
8952
  var pathKey = require_path_key();
8953
8953
  var npmRunPath = (options) => {
8954
8954
  options = {
@@ -8957,15 +8957,15 @@ var require_npm_run_path = __commonJS({
8957
8957
  ...options
8958
8958
  };
8959
8959
  let previous;
8960
- let cwdPath = path15.resolve(options.cwd);
8960
+ let cwdPath = path16.resolve(options.cwd);
8961
8961
  const result = [];
8962
8962
  while (previous !== cwdPath) {
8963
- result.push(path15.join(cwdPath, "node_modules/.bin"));
8963
+ result.push(path16.join(cwdPath, "node_modules/.bin"));
8964
8964
  previous = cwdPath;
8965
- cwdPath = path15.resolve(cwdPath, "..");
8965
+ cwdPath = path16.resolve(cwdPath, "..");
8966
8966
  }
8967
- result.push(path15.dirname(process.execPath));
8968
- return result.concat(options.path).join(path15.delimiter);
8967
+ result.push(path16.dirname(process.execPath));
8968
+ return result.concat(options.path).join(path16.delimiter);
8969
8969
  };
8970
8970
  module.exports = npmRunPath;
8971
8971
  module.exports.default = npmRunPath;
@@ -8975,9 +8975,9 @@ var require_npm_run_path = __commonJS({
8975
8975
  ...options
8976
8976
  };
8977
8977
  const env = { ...options.env };
8978
- const path16 = pathKey({ env });
8979
- options.path = env[path16];
8980
- env[path16] = module.exports(options);
8978
+ const path17 = pathKey({ env });
8979
+ options.path = env[path17];
8980
+ env[path17] = module.exports(options);
8981
8981
  return env;
8982
8982
  };
8983
8983
  }
@@ -9998,7 +9998,7 @@ var require_command = __commonJS({
9998
9998
  var require_execa = __commonJS({
9999
9999
  "../../node_modules/.pnpm/execa@2.1.0/node_modules/execa/index.js"(exports, module) {
10000
10000
  "use strict";
10001
- var path15 = __require("path");
10001
+ var path16 = __require("path");
10002
10002
  var childProcess4 = __require("child_process");
10003
10003
  var crossSpawn = require_cross_spawn();
10004
10004
  var stripFinalNewline = require_strip_final_newline();
@@ -10038,7 +10038,7 @@ var require_execa = __commonJS({
10038
10038
  };
10039
10039
  options.env = getEnv(options);
10040
10040
  options.stdio = normalizeStdio(options);
10041
- if (process.platform === "win32" && path15.basename(file2, ".exe") === "cmd") {
10041
+ if (process.platform === "win32" && path16.basename(file2, ".exe") === "cmd") {
10042
10042
  args.unshift("/q");
10043
10043
  }
10044
10044
  return { file: file2, args, options, parsed };
@@ -10695,12 +10695,12 @@ var require_xdg_basedir = __commonJS({
10695
10695
  "../../node_modules/.pnpm/xdg-basedir@4.0.0/node_modules/xdg-basedir/index.js"(exports) {
10696
10696
  "use strict";
10697
10697
  var os7 = __require("os");
10698
- var path15 = __require("path");
10698
+ var path16 = __require("path");
10699
10699
  var homeDirectory = os7.homedir();
10700
10700
  var { env } = process;
10701
- exports.data = env.XDG_DATA_HOME || (homeDirectory ? path15.join(homeDirectory, ".local", "share") : void 0);
10702
- exports.config = env.XDG_CONFIG_HOME || (homeDirectory ? path15.join(homeDirectory, ".config") : void 0);
10703
- exports.cache = env.XDG_CACHE_HOME || (homeDirectory ? path15.join(homeDirectory, ".cache") : void 0);
10701
+ exports.data = env.XDG_DATA_HOME || (homeDirectory ? path16.join(homeDirectory, ".local", "share") : void 0);
10702
+ exports.config = env.XDG_CONFIG_HOME || (homeDirectory ? path16.join(homeDirectory, ".config") : void 0);
10703
+ exports.cache = env.XDG_CACHE_HOME || (homeDirectory ? path16.join(homeDirectory, ".cache") : void 0);
10704
10704
  exports.runtime = env.XDG_RUNTIME_DIR || void 0;
10705
10705
  exports.dataDirs = (env.XDG_DATA_DIRS || "/usr/local/share/:/usr/share/").split(":");
10706
10706
  if (exports.data) {
@@ -10718,7 +10718,7 @@ var require_xdg_trashdir = __commonJS({
10718
10718
  "../../node_modules/.pnpm/xdg-trashdir@3.1.0/node_modules/xdg-trashdir/index.js"(exports, module) {
10719
10719
  "use strict";
10720
10720
  var fs12 = __require("fs").promises;
10721
- var path15 = __require("path");
10721
+ var path16 = __require("path");
10722
10722
  var df = require_df();
10723
10723
  var mountPoint = require_mount_point();
10724
10724
  var userHome = require_user_home();
@@ -10731,12 +10731,12 @@ var require_xdg_trashdir = __commonJS({
10731
10731
  if (stats.isSymbolicLink() || stats.mode !== stickyBitMode) {
10732
10732
  return topuid;
10733
10733
  }
10734
- return path15.join(filePath, String(process.getuid()));
10734
+ return path16.join(filePath, String(process.getuid()));
10735
10735
  } catch (error51) {
10736
10736
  if (error51.code === "ENOENT") {
10737
10737
  return topuid;
10738
10738
  }
10739
- return path15.join(xdgBasedir.data, "Trash");
10739
+ return path16.join(xdgBasedir.data, "Trash");
10740
10740
  }
10741
10741
  };
10742
10742
  module.exports = async (filePath) => {
@@ -10744,7 +10744,7 @@ var require_xdg_trashdir = __commonJS({
10744
10744
  return Promise.reject(new Error("Only Linux systems are supported"));
10745
10745
  }
10746
10746
  if (!filePath) {
10747
- return Promise.resolve(path15.join(xdgBasedir.data, "Trash"));
10747
+ return Promise.resolve(path16.join(xdgBasedir.data, "Trash"));
10748
10748
  }
10749
10749
  const [homeMountPoint, fileMountPoint] = await Promise.all([
10750
10750
  mountPoint(userHome),
@@ -10753,9 +10753,9 @@ var require_xdg_trashdir = __commonJS({
10753
10753
  })
10754
10754
  ]);
10755
10755
  if (!fileMountPoint || fileMountPoint === homeMountPoint) {
10756
- return path15.join(xdgBasedir.data, "Trash");
10756
+ return path16.join(xdgBasedir.data, "Trash");
10757
10757
  }
10758
- return check2(path15.join(fileMountPoint, ".Trash"));
10758
+ return check2(path16.join(fileMountPoint, ".Trash"));
10759
10759
  };
10760
10760
  module.exports.all = async () => {
10761
10761
  if (process.platform !== "linux") {
@@ -10763,9 +10763,9 @@ var require_xdg_trashdir = __commonJS({
10763
10763
  }
10764
10764
  return Promise.all((await df()).map((fileSystem) => {
10765
10765
  if (fileSystem.mountpoint === "/") {
10766
- return path15.join(xdgBasedir.data, "Trash");
10766
+ return path16.join(xdgBasedir.data, "Trash");
10767
10767
  }
10768
- return check2(path15.join(fileSystem.mountpoint, ".Trash"));
10768
+ return check2(path16.join(fileSystem.mountpoint, ".Trash"));
10769
10769
  }));
10770
10770
  };
10771
10771
  }
@@ -11139,8 +11139,8 @@ var require_utils6 = __commonJS({
11139
11139
  var tmpBufMinLen = 4096 * 2;
11140
11140
  var tmpBufMaxLen = 4096 * 8;
11141
11141
  var tmpBuf = Buffer.allocUnsafeSlow(tmpBufMinLen);
11142
- var read = (path15) => {
11143
- const fd = openSync(path15, "r", 438);
11142
+ var read = (path16) => {
11143
+ const fd = openSync(path16, "r", 438);
11144
11144
  let pos = 0;
11145
11145
  let bytesRead;
11146
11146
  let buf = tmpBuf;
@@ -11161,8 +11161,8 @@ var require_utils6 = __commonJS({
11161
11161
  closeSync(fd);
11162
11162
  return buf.toString("utf8", 0, pos);
11163
11163
  };
11164
- var readIdList = (path15) => {
11165
- let ls = readdirSync(path15);
11164
+ var readIdList = (path16) => {
11165
+ let ls = readdirSync(path16);
11166
11166
  for (let i = 0; i < ls.length; i++) {
11167
11167
  ls[i] = parseInt(ls[i]);
11168
11168
  }
@@ -12329,7 +12329,7 @@ var require_procfs = __commonJS({
12329
12329
  Procfs.prototype.devIdGetMinor = devIdGetMinor;
12330
12330
  Procfs.prototype.devIdGetMajor = devIdGetMajor;
12331
12331
  Procfs.prototype.devIdFromMajorMinor = devIdFromMajorMinor;
12332
- for (let [name21, path15] of [
12332
+ for (let [name21, path16] of [
12333
12333
  ["processExe", "/exe"],
12334
12334
  ["processCwd", "/cwd"]
12335
12335
  ]) {
@@ -12338,13 +12338,13 @@ var require_procfs = __commonJS({
12338
12338
  throw new TypeError("pid");
12339
12339
  }
12340
12340
  try {
12341
- return parsers[name21](readLink(`${this.rootSlash}${pid === void 0 ? "self" : pid}${path15}`));
12341
+ return parsers[name21](readLink(`${this.rootSlash}${pid === void 0 ? "self" : pid}${path16}`));
12342
12342
  } catch (error51) {
12343
12343
  throw ProcfsError.generic(error51);
12344
12344
  }
12345
12345
  };
12346
12346
  }
12347
- for (let [name21, path15] of [
12347
+ for (let [name21, path16] of [
12348
12348
  ["processMountinfo", "/mountinfo"],
12349
12349
  ["processIo", "/io"],
12350
12350
  ["processUidMap", "/uid_map"],
@@ -12375,7 +12375,7 @@ var require_procfs = __commonJS({
12375
12375
  throw new TypeError("pid");
12376
12376
  }
12377
12377
  try {
12378
- return parsers[name21](read(`${this.rootSlash}${pid === void 0 ? "self" : pid}${path15}`));
12378
+ return parsers[name21](read(`${this.rootSlash}${pid === void 0 ? "self" : pid}${path16}`));
12379
12379
  } catch (error51) {
12380
12380
  throw ProcfsError.generic(error51);
12381
12381
  }
@@ -12404,7 +12404,7 @@ var require_procfs = __commonJS({
12404
12404
  }
12405
12405
  };
12406
12406
  }
12407
- for (let [name21, parser, path15] of [
12407
+ for (let [name21, parser, path16] of [
12408
12408
  ["netDev", "processNetDev", "net/dev"],
12409
12409
  ["netWireless", "processNetWireless", "net/wireless"],
12410
12410
  ["netUnix", "processNetUnix", "net/unix"],
@@ -12415,7 +12415,7 @@ var require_procfs = __commonJS({
12415
12415
  ]) {
12416
12416
  Procfs.prototype[name21] = function() {
12417
12417
  try {
12418
- return parsers[parser](read(this.rootSlash + path15));
12418
+ return parsers[parser](read(this.rootSlash + path16));
12419
12419
  } catch (error51) {
12420
12420
  throw ProcfsError.generic(error51);
12421
12421
  }
@@ -12436,7 +12436,7 @@ __export(linux_exports, {
12436
12436
  default: () => linux
12437
12437
  });
12438
12438
  import os4 from "node:os";
12439
- import path10 from "node:path";
12439
+ import path11 from "node:path";
12440
12440
  import fs10 from "node:fs";
12441
12441
  import { randomUUID as randomUUID2 } from "node:crypto";
12442
12442
  async function linux(paths) {
@@ -12459,8 +12459,8 @@ async function linux(paths) {
12459
12459
  const mountPoint = deviceId === homeDevId ? void 0 : mountPointMap.get(deviceId);
12460
12460
  const trashPath = await (0, import_xdg_trashdir.default)(mountPoint);
12461
12461
  const paths2 = {
12462
- filesPath: path10.join(trashPath, "files"),
12463
- infoPath: path10.join(trashPath, "info")
12462
+ filesPath: path11.join(trashPath, "files"),
12463
+ infoPath: path11.join(trashPath, "info")
12464
12464
  };
12465
12465
  await fs10.promises.mkdir(paths2.filesPath, { mode: 448, recursive: true });
12466
12466
  await fs10.promises.mkdir(paths2.infoPath, { mode: 448, recursive: true });
@@ -12500,8 +12500,8 @@ var init_linux = __esm({
12500
12500
  };
12501
12501
  trash = async (filePath, { filesPath, infoPath }) => {
12502
12502
  const name21 = randomUUID2();
12503
- const destination = path10.join(filesPath, name21);
12504
- const trashInfoPath = path10.join(infoPath, `${name21}.trashinfo`);
12503
+ const destination = path11.join(filesPath, name21);
12504
+ const trashInfoPath = path11.join(infoPath, `${name21}.trashinfo`);
12505
12505
  const trashInfo = [
12506
12506
  "[Trash Info]",
12507
12507
  `Path=${encodeFilePath(filePath)}`,
@@ -13629,14 +13629,14 @@ var serve = (options, listeningListener) => {
13629
13629
  };
13630
13630
 
13631
13631
  // src/index.ts
13632
- import path14 from "node:path";
13632
+ import path15 from "node:path";
13633
13633
 
13634
13634
  // src/app.ts
13635
13635
  import { createWriteStream, statSync as statSync2 } from "node:fs";
13636
13636
  import { mkdtemp, readFile as readFile5, rm as rm2, stat as stat4 } from "node:fs/promises";
13637
13637
  import { randomUUID as randomUUID3 } from "node:crypto";
13638
13638
  import os6 from "node:os";
13639
- import path13 from "node:path";
13639
+ import path14 from "node:path";
13640
13640
 
13641
13641
  // ../../node_modules/.pnpm/@hono+node-server@2.0.4_hono@4.12.23/node_modules/@hono/node-server/dist/utils/stream.mjs
13642
13642
  import { Readable as Readable2 } from "node:stream";
@@ -13779,10 +13779,10 @@ var ENCODINGS = {
13779
13779
  gzip: ".gz"
13780
13780
  };
13781
13781
  var ENCODINGS_ORDERED_KEYS = Object.keys(ENCODINGS);
13782
- var getStats = (path15) => {
13782
+ var getStats = (path16) => {
13783
13783
  let stats;
13784
13784
  try {
13785
- stats = statSync(path15);
13785
+ stats = statSync(path16);
13786
13786
  } catch {
13787
13787
  }
13788
13788
  return stats;
@@ -13816,29 +13816,29 @@ var serveStatic = (options = { root: "" }) => {
13816
13816
  await options.onNotFound?.(c.req.path, c);
13817
13817
  return next();
13818
13818
  }
13819
- let path15 = join(root, !optionPath && options.rewriteRequestPath ? options.rewriteRequestPath(filename, c) : filename);
13820
- let stats = getStats(path15);
13819
+ let path16 = join(root, !optionPath && options.rewriteRequestPath ? options.rewriteRequestPath(filename, c) : filename);
13820
+ let stats = getStats(path16);
13821
13821
  if (stats && stats.isDirectory()) {
13822
13822
  const indexFile = options.index ?? "index.html";
13823
- path15 = join(path15, indexFile);
13824
- stats = getStats(path15);
13823
+ path16 = join(path16, indexFile);
13824
+ stats = getStats(path16);
13825
13825
  }
13826
13826
  if (!stats) {
13827
- await options.onNotFound?.(path15, c);
13827
+ await options.onNotFound?.(path16, c);
13828
13828
  return next();
13829
13829
  }
13830
- const mimeType = getMimeType(path15);
13830
+ const mimeType = getMimeType(path16);
13831
13831
  c.header("Content-Type", mimeType || "application/octet-stream");
13832
13832
  if (options.precompressed && (!mimeType || COMPRESSIBLE_CONTENT_TYPE_REGEX.test(mimeType))) {
13833
13833
  const acceptEncodingSet = new Set(c.req.header("Accept-Encoding")?.split(",").map((encoding) => encoding.trim()));
13834
13834
  for (const encoding of ENCODINGS_ORDERED_KEYS) {
13835
13835
  if (!acceptEncodingSet.has(encoding)) continue;
13836
- const precompressedStats = getStats(path15 + ENCODINGS[encoding]);
13836
+ const precompressedStats = getStats(path16 + ENCODINGS[encoding]);
13837
13837
  if (precompressedStats) {
13838
13838
  c.header("Content-Encoding", encoding);
13839
13839
  c.header("Vary", "Accept-Encoding", { append: true });
13840
13840
  stats = precompressedStats;
13841
- path15 = path15 + ENCODINGS[encoding];
13841
+ path16 = path16 + ENCODINGS[encoding];
13842
13842
  break;
13843
13843
  }
13844
13844
  }
@@ -13853,7 +13853,7 @@ var serveStatic = (options = { root: "" }) => {
13853
13853
  result = c.body(null);
13854
13854
  } else if (!range) {
13855
13855
  c.header("Content-Length", size.toString());
13856
- result = c.body(createStreamBody(createReadStream(path15)), 200);
13856
+ result = c.body(createStreamBody(createReadStream(path16)), 200);
13857
13857
  } else {
13858
13858
  c.header("Accept-Ranges", "bytes");
13859
13859
  const parts = range.replace(/bytes=/, "").split("-", 2);
@@ -13861,7 +13861,7 @@ var serveStatic = (options = { root: "" }) => {
13861
13861
  let end = parseInt(parts[1], 10) || size - 1;
13862
13862
  if (size < end - start + 1) end = size - 1;
13863
13863
  const chunksize = end - start + 1;
13864
- const stream2 = createReadStream(path15, {
13864
+ const stream2 = createReadStream(path16, {
13865
13865
  start,
13866
13866
  end
13867
13867
  });
@@ -13869,7 +13869,7 @@ var serveStatic = (options = { root: "" }) => {
13869
13869
  c.header("Content-Range", `bytes ${start}-${end}/${stats.size}`);
13870
13870
  result = c.body(createStreamBody(stream2), 206);
13871
13871
  }
13872
- await options.onFound?.(path15, c);
13872
+ await options.onFound?.(path16, c);
13873
13873
  return result;
13874
13874
  };
13875
13875
  };
@@ -14197,26 +14197,26 @@ var handleParsingNestedValues = (form, key, value) => {
14197
14197
  };
14198
14198
 
14199
14199
  // ../../node_modules/.pnpm/hono@4.12.23/node_modules/hono/dist/utils/url.js
14200
- var splitPath = (path15) => {
14201
- const paths = path15.split("/");
14200
+ var splitPath = (path16) => {
14201
+ const paths = path16.split("/");
14202
14202
  if (paths[0] === "") {
14203
14203
  paths.shift();
14204
14204
  }
14205
14205
  return paths;
14206
14206
  };
14207
14207
  var splitRoutingPath = (routePath) => {
14208
- const { groups, path: path15 } = extractGroupsFromPath(routePath);
14209
- const paths = splitPath(path15);
14208
+ const { groups, path: path16 } = extractGroupsFromPath(routePath);
14209
+ const paths = splitPath(path16);
14210
14210
  return replaceGroupMarks(paths, groups);
14211
14211
  };
14212
- var extractGroupsFromPath = (path15) => {
14212
+ var extractGroupsFromPath = (path16) => {
14213
14213
  const groups = [];
14214
- path15 = path15.replace(/\{[^}]+\}/g, (match2, index) => {
14214
+ path16 = path16.replace(/\{[^}]+\}/g, (match2, index) => {
14215
14215
  const mark = `@${index}`;
14216
14216
  groups.push([mark, match2]);
14217
14217
  return mark;
14218
14218
  });
14219
- return { groups, path: path15 };
14219
+ return { groups, path: path16 };
14220
14220
  };
14221
14221
  var replaceGroupMarks = (paths, groups) => {
14222
14222
  for (let i = groups.length - 1; i >= 0; i--) {
@@ -14273,8 +14273,8 @@ var getPath = (request) => {
14273
14273
  const queryIndex = url2.indexOf("?", i);
14274
14274
  const hashIndex = url2.indexOf("#", i);
14275
14275
  const end = queryIndex === -1 ? hashIndex === -1 ? void 0 : hashIndex : hashIndex === -1 ? queryIndex : Math.min(queryIndex, hashIndex);
14276
- const path15 = url2.slice(start, end);
14277
- return tryDecodeURI2(path15.includes("%25") ? path15.replace(/%25/g, "%2525") : path15);
14276
+ const path16 = url2.slice(start, end);
14277
+ return tryDecodeURI2(path16.includes("%25") ? path16.replace(/%25/g, "%2525") : path16);
14278
14278
  } else if (charCode === 63 || charCode === 35) {
14279
14279
  break;
14280
14280
  }
@@ -14291,11 +14291,11 @@ var mergePath = (base, sub, ...rest) => {
14291
14291
  }
14292
14292
  return `${base?.[0] === "/" ? "" : "/"}${base}${sub === "/" ? "" : `${base?.at(-1) === "/" ? "" : "/"}${sub?.[0] === "/" ? sub.slice(1) : sub}`}`;
14293
14293
  };
14294
- var checkOptionalParameter = (path15) => {
14295
- if (path15.charCodeAt(path15.length - 1) !== 63 || !path15.includes(":")) {
14294
+ var checkOptionalParameter = (path16) => {
14295
+ if (path16.charCodeAt(path16.length - 1) !== 63 || !path16.includes(":")) {
14296
14296
  return null;
14297
14297
  }
14298
- const segments = path15.split("/");
14298
+ const segments = path16.split("/");
14299
14299
  const results = [];
14300
14300
  let basePath = "";
14301
14301
  segments.forEach((segment) => {
@@ -14436,9 +14436,9 @@ var HonoRequest = class {
14436
14436
  */
14437
14437
  path;
14438
14438
  bodyCache = {};
14439
- constructor(request, path15 = "/", matchResult = [[]]) {
14439
+ constructor(request, path16 = "/", matchResult = [[]]) {
14440
14440
  this.raw = request;
14441
- this.path = path15;
14441
+ this.path = path16;
14442
14442
  this.#matchResult = matchResult;
14443
14443
  this.#validatedData = {};
14444
14444
  }
@@ -15192,8 +15192,8 @@ var Hono = class _Hono {
15192
15192
  return this;
15193
15193
  };
15194
15194
  });
15195
- this.on = (method, path15, ...handlers) => {
15196
- for (const p of [path15].flat()) {
15195
+ this.on = (method, path16, ...handlers) => {
15196
+ for (const p of [path16].flat()) {
15197
15197
  this.#path = p;
15198
15198
  for (const m of [method].flat()) {
15199
15199
  handlers.map((handler) => {
@@ -15250,8 +15250,8 @@ var Hono = class _Hono {
15250
15250
  * app.route("/api", app2) // GET /api/user
15251
15251
  * ```
15252
15252
  */
15253
- route(path15, app2) {
15254
- const subApp = this.basePath(path15);
15253
+ route(path16, app2) {
15254
+ const subApp = this.basePath(path16);
15255
15255
  app2.routes.map((r) => {
15256
15256
  let handler;
15257
15257
  if (app2.errorHandler === errorHandler) {
@@ -15277,9 +15277,9 @@ var Hono = class _Hono {
15277
15277
  * const api = new Hono().basePath('/api')
15278
15278
  * ```
15279
15279
  */
15280
- basePath(path15) {
15280
+ basePath(path16) {
15281
15281
  const subApp = this.#clone();
15282
- subApp._basePath = mergePath(this._basePath, path15);
15282
+ subApp._basePath = mergePath(this._basePath, path16);
15283
15283
  return subApp;
15284
15284
  }
15285
15285
  /**
@@ -15353,7 +15353,7 @@ var Hono = class _Hono {
15353
15353
  * })
15354
15354
  * ```
15355
15355
  */
15356
- mount(path15, applicationHandler, options) {
15356
+ mount(path16, applicationHandler, options) {
15357
15357
  let replaceRequest;
15358
15358
  let optionHandler;
15359
15359
  if (options) {
@@ -15380,7 +15380,7 @@ var Hono = class _Hono {
15380
15380
  return [c.env, executionContext];
15381
15381
  };
15382
15382
  replaceRequest ||= (() => {
15383
- const mergedPath = mergePath(this._basePath, path15);
15383
+ const mergedPath = mergePath(this._basePath, path16);
15384
15384
  const pathPrefixLength = mergedPath === "/" ? 0 : mergedPath.length;
15385
15385
  return (request) => {
15386
15386
  const url2 = new URL(request.url);
@@ -15395,19 +15395,19 @@ var Hono = class _Hono {
15395
15395
  }
15396
15396
  await next();
15397
15397
  };
15398
- this.#addRoute(METHOD_NAME_ALL, mergePath(path15, "*"), handler);
15398
+ this.#addRoute(METHOD_NAME_ALL, mergePath(path16, "*"), handler);
15399
15399
  return this;
15400
15400
  }
15401
- #addRoute(method, path15, handler, baseRoutePath) {
15401
+ #addRoute(method, path16, handler, baseRoutePath) {
15402
15402
  method = method.toUpperCase();
15403
- path15 = mergePath(this._basePath, path15);
15403
+ path16 = mergePath(this._basePath, path16);
15404
15404
  const r = {
15405
15405
  basePath: baseRoutePath !== void 0 ? mergePath(this._basePath, baseRoutePath) : this._basePath,
15406
- path: path15,
15406
+ path: path16,
15407
15407
  method,
15408
15408
  handler
15409
15409
  };
15410
- this.router.add(method, path15, [handler, r]);
15410
+ this.router.add(method, path16, [handler, r]);
15411
15411
  this.routes.push(r);
15412
15412
  }
15413
15413
  #handleError(err, c) {
@@ -15420,10 +15420,10 @@ var Hono = class _Hono {
15420
15420
  if (method === "HEAD") {
15421
15421
  return (async () => new Response(null, await this.#dispatch(request, executionCtx, env, "GET")))();
15422
15422
  }
15423
- const path15 = this.getPath(request, { env });
15424
- const matchResult = this.router.match(method, path15);
15423
+ const path16 = this.getPath(request, { env });
15424
+ const matchResult = this.router.match(method, path16);
15425
15425
  const c = new Context(request, {
15426
- path: path15,
15426
+ path: path16,
15427
15427
  matchResult,
15428
15428
  env,
15429
15429
  executionCtx,
@@ -15523,7 +15523,7 @@ var Hono = class _Hono {
15523
15523
 
15524
15524
  // ../../node_modules/.pnpm/hono@4.12.23/node_modules/hono/dist/router/reg-exp-router/matcher.js
15525
15525
  var emptyParam = [];
15526
- function match(method, path15) {
15526
+ function match(method, path16) {
15527
15527
  const matchers = this.buildAllMatchers();
15528
15528
  const match2 = ((method2, path22) => {
15529
15529
  const matcher = matchers[method2] || matchers[METHOD_NAME_ALL];
@@ -15539,7 +15539,7 @@ function match(method, path15) {
15539
15539
  return [matcher[1][index], match3];
15540
15540
  });
15541
15541
  this.match = match2;
15542
- return match2(method, path15);
15542
+ return match2(method, path16);
15543
15543
  }
15544
15544
 
15545
15545
  // ../../node_modules/.pnpm/hono@4.12.23/node_modules/hono/dist/router/reg-exp-router/node.js
@@ -15654,12 +15654,12 @@ var Node = class _Node {
15654
15654
  var Trie = class {
15655
15655
  #context = { varIndex: 0 };
15656
15656
  #root = new Node();
15657
- insert(path15, index, pathErrorCheckOnly) {
15657
+ insert(path16, index, pathErrorCheckOnly) {
15658
15658
  const paramAssoc = [];
15659
15659
  const groups = [];
15660
15660
  for (let i = 0; ; ) {
15661
15661
  let replaced = false;
15662
- path15 = path15.replace(/\{[^}]+\}/g, (m) => {
15662
+ path16 = path16.replace(/\{[^}]+\}/g, (m) => {
15663
15663
  const mark = `@\\${i}`;
15664
15664
  groups[i] = [mark, m];
15665
15665
  i++;
@@ -15670,7 +15670,7 @@ var Trie = class {
15670
15670
  break;
15671
15671
  }
15672
15672
  }
15673
- const tokens = path15.match(/(?::[^\/]+)|(?:\/\*$)|./g) || [];
15673
+ const tokens = path16.match(/(?::[^\/]+)|(?:\/\*$)|./g) || [];
15674
15674
  for (let i = groups.length - 1; i >= 0; i--) {
15675
15675
  const [mark] = groups[i];
15676
15676
  for (let j = tokens.length - 1; j >= 0; j--) {
@@ -15709,9 +15709,9 @@ var Trie = class {
15709
15709
  // ../../node_modules/.pnpm/hono@4.12.23/node_modules/hono/dist/router/reg-exp-router/router.js
15710
15710
  var nullMatcher = [/^$/, [], /* @__PURE__ */ Object.create(null)];
15711
15711
  var wildcardRegExpCache = /* @__PURE__ */ Object.create(null);
15712
- function buildWildcardRegExp(path15) {
15713
- return wildcardRegExpCache[path15] ??= new RegExp(
15714
- path15 === "*" ? "" : `^${path15.replace(
15712
+ function buildWildcardRegExp(path16) {
15713
+ return wildcardRegExpCache[path16] ??= new RegExp(
15714
+ path16 === "*" ? "" : `^${path16.replace(
15715
15715
  /\/\*$|([.\\+*[^\]$()])/g,
15716
15716
  (_, metaChar) => metaChar ? `\\${metaChar}` : "(?:|/.*)"
15717
15717
  )}$`
@@ -15733,17 +15733,17 @@ function buildMatcherFromPreprocessedRoutes(routes) {
15733
15733
  );
15734
15734
  const staticMap = /* @__PURE__ */ Object.create(null);
15735
15735
  for (let i = 0, j = -1, len = routesWithStaticPathFlag.length; i < len; i++) {
15736
- const [pathErrorCheckOnly, path15, handlers] = routesWithStaticPathFlag[i];
15736
+ const [pathErrorCheckOnly, path16, handlers] = routesWithStaticPathFlag[i];
15737
15737
  if (pathErrorCheckOnly) {
15738
- staticMap[path15] = [handlers.map(([h]) => [h, /* @__PURE__ */ Object.create(null)]), emptyParam];
15738
+ staticMap[path16] = [handlers.map(([h]) => [h, /* @__PURE__ */ Object.create(null)]), emptyParam];
15739
15739
  } else {
15740
15740
  j++;
15741
15741
  }
15742
15742
  let paramAssoc;
15743
15743
  try {
15744
- paramAssoc = trie.insert(path15, j, pathErrorCheckOnly);
15744
+ paramAssoc = trie.insert(path16, j, pathErrorCheckOnly);
15745
15745
  } catch (e) {
15746
- throw e === PATH_ERROR ? new UnsupportedPathError(path15) : e;
15746
+ throw e === PATH_ERROR ? new UnsupportedPathError(path16) : e;
15747
15747
  }
15748
15748
  if (pathErrorCheckOnly) {
15749
15749
  continue;
@@ -15777,12 +15777,12 @@ function buildMatcherFromPreprocessedRoutes(routes) {
15777
15777
  }
15778
15778
  return [regexp, handlerMap, staticMap];
15779
15779
  }
15780
- function findMiddleware(middleware, path15) {
15780
+ function findMiddleware(middleware, path16) {
15781
15781
  if (!middleware) {
15782
15782
  return void 0;
15783
15783
  }
15784
15784
  for (const k of Object.keys(middleware).sort((a, b) => b.length - a.length)) {
15785
- if (buildWildcardRegExp(k).test(path15)) {
15785
+ if (buildWildcardRegExp(k).test(path16)) {
15786
15786
  return [...middleware[k]];
15787
15787
  }
15788
15788
  }
@@ -15796,7 +15796,7 @@ var RegExpRouter = class {
15796
15796
  this.#middleware = { [METHOD_NAME_ALL]: /* @__PURE__ */ Object.create(null) };
15797
15797
  this.#routes = { [METHOD_NAME_ALL]: /* @__PURE__ */ Object.create(null) };
15798
15798
  }
15799
- add(method, path15, handler) {
15799
+ add(method, path16, handler) {
15800
15800
  const middleware = this.#middleware;
15801
15801
  const routes = this.#routes;
15802
15802
  if (!middleware || !routes) {
@@ -15811,18 +15811,18 @@ var RegExpRouter = class {
15811
15811
  });
15812
15812
  });
15813
15813
  }
15814
- if (path15 === "/*") {
15815
- path15 = "*";
15814
+ if (path16 === "/*") {
15815
+ path16 = "*";
15816
15816
  }
15817
- const paramCount = (path15.match(/\/:/g) || []).length;
15818
- if (/\*$/.test(path15)) {
15819
- const re2 = buildWildcardRegExp(path15);
15817
+ const paramCount = (path16.match(/\/:/g) || []).length;
15818
+ if (/\*$/.test(path16)) {
15819
+ const re2 = buildWildcardRegExp(path16);
15820
15820
  if (method === METHOD_NAME_ALL) {
15821
15821
  Object.keys(middleware).forEach((m) => {
15822
- middleware[m][path15] ||= findMiddleware(middleware[m], path15) || findMiddleware(middleware[METHOD_NAME_ALL], path15) || [];
15822
+ middleware[m][path16] ||= findMiddleware(middleware[m], path16) || findMiddleware(middleware[METHOD_NAME_ALL], path16) || [];
15823
15823
  });
15824
15824
  } else {
15825
- middleware[method][path15] ||= findMiddleware(middleware[method], path15) || findMiddleware(middleware[METHOD_NAME_ALL], path15) || [];
15825
+ middleware[method][path16] ||= findMiddleware(middleware[method], path16) || findMiddleware(middleware[METHOD_NAME_ALL], path16) || [];
15826
15826
  }
15827
15827
  Object.keys(middleware).forEach((m) => {
15828
15828
  if (method === METHOD_NAME_ALL || method === m) {
@@ -15840,7 +15840,7 @@ var RegExpRouter = class {
15840
15840
  });
15841
15841
  return;
15842
15842
  }
15843
- const paths = checkOptionalParameter(path15) || [path15];
15843
+ const paths = checkOptionalParameter(path16) || [path16];
15844
15844
  for (let i = 0, len = paths.length; i < len; i++) {
15845
15845
  const path22 = paths[i];
15846
15846
  Object.keys(routes).forEach((m) => {
@@ -15867,13 +15867,13 @@ var RegExpRouter = class {
15867
15867
  const routes = [];
15868
15868
  let hasOwnRoute = method === METHOD_NAME_ALL;
15869
15869
  [this.#middleware, this.#routes].forEach((r) => {
15870
- const ownRoute = r[method] ? Object.keys(r[method]).map((path15) => [path15, r[method][path15]]) : [];
15870
+ const ownRoute = r[method] ? Object.keys(r[method]).map((path16) => [path16, r[method][path16]]) : [];
15871
15871
  if (ownRoute.length !== 0) {
15872
15872
  hasOwnRoute ||= true;
15873
15873
  routes.push(...ownRoute);
15874
15874
  } else if (method !== METHOD_NAME_ALL) {
15875
15875
  routes.push(
15876
- ...Object.keys(r[METHOD_NAME_ALL]).map((path15) => [path15, r[METHOD_NAME_ALL][path15]])
15876
+ ...Object.keys(r[METHOD_NAME_ALL]).map((path16) => [path16, r[METHOD_NAME_ALL][path16]])
15877
15877
  );
15878
15878
  }
15879
15879
  });
@@ -15893,13 +15893,13 @@ var SmartRouter = class {
15893
15893
  constructor(init) {
15894
15894
  this.#routers = init.routers;
15895
15895
  }
15896
- add(method, path15, handler) {
15896
+ add(method, path16, handler) {
15897
15897
  if (!this.#routes) {
15898
15898
  throw new Error(MESSAGE_MATCHER_IS_ALREADY_BUILT);
15899
15899
  }
15900
- this.#routes.push([method, path15, handler]);
15900
+ this.#routes.push([method, path16, handler]);
15901
15901
  }
15902
- match(method, path15) {
15902
+ match(method, path16) {
15903
15903
  if (!this.#routes) {
15904
15904
  throw new Error("Fatal error");
15905
15905
  }
@@ -15914,7 +15914,7 @@ var SmartRouter = class {
15914
15914
  for (let i2 = 0, len2 = routes.length; i2 < len2; i2++) {
15915
15915
  router.add(...routes[i2]);
15916
15916
  }
15917
- res = router.match(method, path15);
15917
+ res = router.match(method, path16);
15918
15918
  } catch (e) {
15919
15919
  if (e instanceof UnsupportedPathError) {
15920
15920
  continue;
@@ -15964,10 +15964,10 @@ var Node2 = class _Node2 {
15964
15964
  }
15965
15965
  this.#patterns = [];
15966
15966
  }
15967
- insert(method, path15, handler) {
15967
+ insert(method, path16, handler) {
15968
15968
  this.#order = ++this.#order;
15969
15969
  let curNode = this;
15970
- const parts = splitRoutingPath(path15);
15970
+ const parts = splitRoutingPath(path16);
15971
15971
  const possibleKeys = [];
15972
15972
  for (let i = 0, len = parts.length; i < len; i++) {
15973
15973
  const p = parts[i];
@@ -16016,12 +16016,12 @@ var Node2 = class _Node2 {
16016
16016
  }
16017
16017
  }
16018
16018
  }
16019
- search(method, path15) {
16019
+ search(method, path16) {
16020
16020
  const handlerSets = [];
16021
16021
  this.#params = emptyParams;
16022
16022
  const curNode = this;
16023
16023
  let curNodes = [curNode];
16024
- const parts = splitPath(path15);
16024
+ const parts = splitPath(path16);
16025
16025
  const curNodesQueue = [];
16026
16026
  const len = parts.length;
16027
16027
  let partOffsets = null;
@@ -16063,13 +16063,13 @@ var Node2 = class _Node2 {
16063
16063
  if (matcher instanceof RegExp) {
16064
16064
  if (partOffsets === null) {
16065
16065
  partOffsets = new Array(len);
16066
- let offset = path15[0] === "/" ? 1 : 0;
16066
+ let offset = path16[0] === "/" ? 1 : 0;
16067
16067
  for (let p = 0; p < len; p++) {
16068
16068
  partOffsets[p] = offset;
16069
16069
  offset += parts[p].length + 1;
16070
16070
  }
16071
16071
  }
16072
- const restPathString = path15.substring(partOffsets[i]);
16072
+ const restPathString = path16.substring(partOffsets[i]);
16073
16073
  const m = matcher.exec(restPathString);
16074
16074
  if (m) {
16075
16075
  params[name21] = m[0];
@@ -16122,18 +16122,18 @@ var TrieRouter = class {
16122
16122
  constructor() {
16123
16123
  this.#node = new Node2();
16124
16124
  }
16125
- add(method, path15, handler) {
16126
- const results = checkOptionalParameter(path15);
16125
+ add(method, path16, handler) {
16126
+ const results = checkOptionalParameter(path16);
16127
16127
  if (results) {
16128
16128
  for (let i = 0, len = results.length; i < len; i++) {
16129
16129
  this.#node.insert(method, results[i], handler);
16130
16130
  }
16131
16131
  return;
16132
16132
  }
16133
- this.#node.insert(method, path15, handler);
16133
+ this.#node.insert(method, path16, handler);
16134
16134
  }
16135
- match(method, path15) {
16136
- return this.#node.search(method, path15);
16135
+ match(method, path16) {
16136
+ return this.#node.search(method, path16);
16137
16137
  }
16138
16138
  };
16139
16139
 
@@ -17267,10 +17267,10 @@ function mergeDefs(...defs) {
17267
17267
  function cloneDef(schema) {
17268
17268
  return mergeDefs(schema._zod.def);
17269
17269
  }
17270
- function getElementAtPath(obj, path15) {
17271
- if (!path15)
17270
+ function getElementAtPath(obj, path16) {
17271
+ if (!path16)
17272
17272
  return obj;
17273
- return path15.reduce((acc, key) => acc?.[key], obj);
17273
+ return path16.reduce((acc, key) => acc?.[key], obj);
17274
17274
  }
17275
17275
  function promiseAllObject(promisesObj) {
17276
17276
  const keys = Object.keys(promisesObj);
@@ -17679,11 +17679,11 @@ function explicitlyAborted(x, startIndex = 0) {
17679
17679
  }
17680
17680
  return false;
17681
17681
  }
17682
- function prefixIssues(path15, issues) {
17682
+ function prefixIssues(path16, issues) {
17683
17683
  return issues.map((iss) => {
17684
17684
  var _a21;
17685
17685
  (_a21 = iss).path ?? (_a21.path = []);
17686
- iss.path.unshift(path15);
17686
+ iss.path.unshift(path16);
17687
17687
  return iss;
17688
17688
  });
17689
17689
  }
@@ -17830,16 +17830,16 @@ function flattenError(error51, mapper = (issue2) => issue2.message) {
17830
17830
  }
17831
17831
  function formatError(error51, mapper = (issue2) => issue2.message) {
17832
17832
  const fieldErrors = { _errors: [] };
17833
- const processError = (error52, path15 = []) => {
17833
+ const processError = (error52, path16 = []) => {
17834
17834
  for (const issue2 of error52.issues) {
17835
17835
  if (issue2.code === "invalid_union" && issue2.errors.length) {
17836
- issue2.errors.map((issues) => processError({ issues }, [...path15, ...issue2.path]));
17836
+ issue2.errors.map((issues) => processError({ issues }, [...path16, ...issue2.path]));
17837
17837
  } else if (issue2.code === "invalid_key") {
17838
- processError({ issues: issue2.issues }, [...path15, ...issue2.path]);
17838
+ processError({ issues: issue2.issues }, [...path16, ...issue2.path]);
17839
17839
  } else if (issue2.code === "invalid_element") {
17840
- processError({ issues: issue2.issues }, [...path15, ...issue2.path]);
17840
+ processError({ issues: issue2.issues }, [...path16, ...issue2.path]);
17841
17841
  } else {
17842
- const fullpath = [...path15, ...issue2.path];
17842
+ const fullpath = [...path16, ...issue2.path];
17843
17843
  if (fullpath.length === 0) {
17844
17844
  fieldErrors._errors.push(mapper(issue2));
17845
17845
  } else {
@@ -17866,17 +17866,17 @@ function formatError(error51, mapper = (issue2) => issue2.message) {
17866
17866
  }
17867
17867
  function treeifyError(error51, mapper = (issue2) => issue2.message) {
17868
17868
  const result = { errors: [] };
17869
- const processError = (error52, path15 = []) => {
17869
+ const processError = (error52, path16 = []) => {
17870
17870
  var _a21, _b17;
17871
17871
  for (const issue2 of error52.issues) {
17872
17872
  if (issue2.code === "invalid_union" && issue2.errors.length) {
17873
- issue2.errors.map((issues) => processError({ issues }, [...path15, ...issue2.path]));
17873
+ issue2.errors.map((issues) => processError({ issues }, [...path16, ...issue2.path]));
17874
17874
  } else if (issue2.code === "invalid_key") {
17875
- processError({ issues: issue2.issues }, [...path15, ...issue2.path]);
17875
+ processError({ issues: issue2.issues }, [...path16, ...issue2.path]);
17876
17876
  } else if (issue2.code === "invalid_element") {
17877
- processError({ issues: issue2.issues }, [...path15, ...issue2.path]);
17877
+ processError({ issues: issue2.issues }, [...path16, ...issue2.path]);
17878
17878
  } else {
17879
- const fullpath = [...path15, ...issue2.path];
17879
+ const fullpath = [...path16, ...issue2.path];
17880
17880
  if (fullpath.length === 0) {
17881
17881
  result.errors.push(mapper(issue2));
17882
17882
  continue;
@@ -17908,8 +17908,8 @@ function treeifyError(error51, mapper = (issue2) => issue2.message) {
17908
17908
  }
17909
17909
  function toDotPath(_path) {
17910
17910
  const segs = [];
17911
- const path15 = _path.map((seg) => typeof seg === "object" ? seg.key : seg);
17912
- for (const seg of path15) {
17911
+ const path16 = _path.map((seg) => typeof seg === "object" ? seg.key : seg);
17912
+ for (const seg of path16) {
17913
17913
  if (typeof seg === "number")
17914
17914
  segs.push(`[${seg}]`);
17915
17915
  else if (typeof seg === "symbol")
@@ -30601,13 +30601,13 @@ function resolveRef(ref, ctx) {
30601
30601
  if (!ref.startsWith("#")) {
30602
30602
  throw new Error("External $ref is not supported, only local refs (#/...) are allowed");
30603
30603
  }
30604
- const path15 = ref.slice(1).split("/").filter(Boolean);
30605
- if (path15.length === 0) {
30604
+ const path16 = ref.slice(1).split("/").filter(Boolean);
30605
+ if (path16.length === 0) {
30606
30606
  return ctx.rootSchema;
30607
30607
  }
30608
30608
  const defsKey = ctx.version === "draft-2020-12" ? "$defs" : "definitions";
30609
- if (path15[0] === defsKey) {
30610
- const key = path15[1];
30609
+ if (path16[0] === defsKey) {
30610
+ const key = path16[1];
30611
30611
  if (!key || !ctx.defs[key]) {
30612
30612
  throw new Error(`Reference not found: ${ref}`);
30613
30613
  }
@@ -31374,8 +31374,8 @@ function getErrorMap2() {
31374
31374
 
31375
31375
  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v3/helpers/parseUtil.js
31376
31376
  var makeIssue = (params) => {
31377
- const { data, path: path15, errorMaps, issueData } = params;
31378
- const fullPath = [...path15, ...issueData.path || []];
31377
+ const { data, path: path16, errorMaps, issueData } = params;
31378
+ const fullPath = [...path16, ...issueData.path || []];
31379
31379
  const fullIssue = {
31380
31380
  ...issueData,
31381
31381
  path: fullPath
@@ -31490,11 +31490,11 @@ var errorUtil;
31490
31490
 
31491
31491
  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v3/types.js
31492
31492
  var ParseInputLazyPath = class {
31493
- constructor(parent, value, path15, key) {
31493
+ constructor(parent, value, path16, key) {
31494
31494
  this._cachedPath = [];
31495
31495
  this.parent = parent;
31496
31496
  this.data = value;
31497
- this._path = path15;
31497
+ this._path = path16;
31498
31498
  this._key = key;
31499
31499
  }
31500
31500
  get path() {
@@ -54580,7 +54580,7 @@ function createDeepSeek(options = {}) {
54580
54580
  const createLanguageModel = (modelId) => {
54581
54581
  return new DeepSeekChatLanguageModel(modelId, {
54582
54582
  provider: `deepseek.chat`,
54583
- url: ({ path: path15 }) => `${baseURL}${path15}`,
54583
+ url: ({ path: path16 }) => `${baseURL}${path16}`,
54584
54584
  headers: getHeaders,
54585
54585
  fetch: options.fetch
54586
54586
  });
@@ -56217,8 +56217,8 @@ function createOpenAICompatible(options) {
56217
56217
  const getHeaders = () => withUserAgentSuffix(headers, `ai-sdk/openai-compatible/${VERSION7}`);
56218
56218
  const getCommonModelConfig = (modelType) => ({
56219
56219
  provider: `${providerName}.${modelType}`,
56220
- url: ({ path: path15 }) => {
56221
- const url2 = new URL(`${baseURL}${path15}`);
56220
+ url: ({ path: path16 }) => {
56221
+ const url2 = new URL(`${baseURL}${path16}`);
56222
56222
  if (options.queryParams) {
56223
56223
  url2.search = new URLSearchParams(options.queryParams).toString();
56224
56224
  }
@@ -56676,6 +56676,32 @@ function elapsedWallTime(startedAt) {
56676
56676
  return Math.max(0, Math.round((performance.now() - startedAt) * 100) / 100);
56677
56677
  }
56678
56678
 
56679
+ // ../core/src/agent/tools/protected-paths.ts
56680
+ import path3 from "node:path";
56681
+
56682
+ // ../core/src/workspace-store/paths.ts
56683
+ import path2 from "node:path";
56684
+ function isMissingPathError2(error51) {
56685
+ return error51 instanceof Error && "code" in error51 && error51.code === "ENOENT";
56686
+ }
56687
+ function normalizeWorkspaceRelativePath(relativePath) {
56688
+ return relativePath.split(path2.sep).join("/");
56689
+ }
56690
+
56691
+ // ../core/src/agent/tools/protected-paths.ts
56692
+ var PROTECTED_ROOT_DESIGN_DOCUMENT_PATH = "design.md";
56693
+ function assertAgentWorkspaceMutationPathAllowed(relativePath) {
56694
+ const normalizedPath = normalizeAgentWorkspaceMutationPath(relativePath);
56695
+ if (normalizedPath.toLowerCase() === PROTECTED_ROOT_DESIGN_DOCUMENT_PATH) {
56696
+ throw new Error("Agent workspace mutation tools cannot modify root-level DESIGN.md.");
56697
+ }
56698
+ }
56699
+ function normalizeAgentWorkspaceMutationPath(relativePath) {
56700
+ const slashNormalizedPath = normalizeWorkspaceRelativePath(relativePath);
56701
+ const normalizedPath = path3.posix.normalize(slashNormalizedPath);
56702
+ return normalizedPath === "." ? "" : normalizedPath.replace(/^\.\//, "");
56703
+ }
56704
+
56679
56705
  // ../core/src/workspace-store/text.ts
56680
56706
  var MAX_LINE_LENGTH = 2e3;
56681
56707
  function normalizePositiveInteger(value, fallback, name21) {
@@ -56782,15 +56808,6 @@ function buildUnifiedDiff(oldContent, newContent, relativePath) {
56782
56808
  return lines.join("\n");
56783
56809
  }
56784
56810
 
56785
- // ../core/src/workspace-store/paths.ts
56786
- import path2 from "node:path";
56787
- function isMissingPathError2(error51) {
56788
- return error51 instanceof Error && "code" in error51 && error51.code === "ENOENT";
56789
- }
56790
- function normalizeWorkspaceRelativePath(relativePath) {
56791
- return relativePath.split(path2.sep).join("/");
56792
- }
56793
-
56794
56811
  // ../core/src/templates/owndesign-runtime.ts
56795
56812
  var OWNDESIGN_RUNTIME_ATTRIBUTE = 'data-owndesign-runtime="preview-route-bridge"';
56796
56813
  var OWNDESIGN_RUNTIME_SCRIPT_TAG = `<script ${OWNDESIGN_RUNTIME_ATTRIBUTE}>
@@ -56939,22 +56956,23 @@ function createEditToolDefinition() {
56939
56956
  }).strict(),
56940
56957
  name: "edit",
56941
56958
  parallelSafe: false,
56942
- execute: async ({ newString, oldString, path: path15, replaceAll }, { projectId, workspaceStore }) => {
56943
- const content = await workspaceStore.readProjectWorkspaceFile(projectId, path15);
56959
+ execute: async ({ newString, oldString, path: path16, replaceAll }, { projectId, workspaceStore }) => {
56960
+ assertAgentWorkspaceMutationPathAllowed(path16);
56961
+ const content = await workspaceStore.readProjectWorkspaceFile(projectId, path16);
56944
56962
  const { content: updatedContent, replacements } = applyTextEdit(
56945
56963
  content,
56946
56964
  oldString,
56947
56965
  newString,
56948
56966
  replaceAll,
56949
- path15
56967
+ path16
56950
56968
  );
56951
- if (isProtectedSingleHtmlPath(path15)) {
56969
+ if (isProtectedSingleHtmlPath(path16)) {
56952
56970
  assertOwnDesignRuntimeScript(updatedContent);
56953
56971
  }
56954
- await workspaceStore.writeProjectWorkspaceFile(projectId, path15, updatedContent);
56972
+ await workspaceStore.writeProjectWorkspaceFile(projectId, path16, updatedContent);
56955
56973
  return {
56956
- diff: buildUnifiedDiff(content, updatedContent, normalizeWorkspaceRelativePath(path15)),
56957
- path: normalizeWorkspaceRelativePath(path15),
56974
+ diff: buildUnifiedDiff(content, updatedContent, normalizeWorkspaceRelativePath(path16)),
56975
+ path: normalizeWorkspaceRelativePath(path16),
56958
56976
  replacements: replaceAll ? replacements : 1
56959
56977
  };
56960
56978
  }
@@ -56983,8 +57001,8 @@ function createGlobToolDefinition() {
56983
57001
  }).strict(),
56984
57002
  name: "glob",
56985
57003
  parallelSafe: true,
56986
- execute: async ({ path: path15, pattern }, { projectId, workspaceStore }) => {
56987
- return workspaceStore.globProjectWorkspace(projectId, pattern, path15);
57004
+ execute: async ({ path: path16, pattern }, { projectId, workspaceStore }) => {
57005
+ return workspaceStore.globProjectWorkspace(projectId, pattern, path16);
56988
57006
  }
56989
57007
  };
56990
57008
  }
@@ -57013,10 +57031,10 @@ function createGrepToolDefinition() {
57013
57031
  }).strict(),
57014
57032
  name: "grep",
57015
57033
  parallelSafe: true,
57016
- execute: async ({ include, path: path15, pattern }, { projectId, workspaceStore }) => {
57034
+ execute: async ({ include, path: path16, pattern }, { projectId, workspaceStore }) => {
57017
57035
  return workspaceStore.grepProjectWorkspace(projectId, pattern, {
57018
57036
  include,
57019
- path: path15
57037
+ path: path16
57020
57038
  });
57021
57039
  }
57022
57040
  };
@@ -57192,8 +57210,8 @@ function createReadToolDefinition() {
57192
57210
  }).strict(),
57193
57211
  name: "read",
57194
57212
  parallelSafe: true,
57195
- execute: async ({ limit, offset, path: path15 }, { projectId, workspaceStore }) => {
57196
- return workspaceStore.readProjectWorkspaceEntry(projectId, path15, {
57213
+ execute: async ({ limit, offset, path: path16 }, { projectId, workspaceStore }) => {
57214
+ return workspaceStore.readProjectWorkspaceEntry(projectId, path16, {
57197
57215
  limit,
57198
57216
  offset
57199
57217
  });
@@ -57224,11 +57242,12 @@ function createWriteToolDefinition() {
57224
57242
  }).strict(),
57225
57243
  name: "write",
57226
57244
  parallelSafe: false,
57227
- execute: async ({ content, path: path15 }, { projectId, workspaceStore }) => {
57228
- if (isProtectedSingleHtmlPath(path15)) {
57245
+ execute: async ({ content, path: path16 }, { projectId, workspaceStore }) => {
57246
+ assertAgentWorkspaceMutationPathAllowed(path16);
57247
+ if (isProtectedSingleHtmlPath(path16)) {
57229
57248
  assertOwnDesignRuntimeScript(content);
57230
57249
  }
57231
- return workspaceStore.writeProjectWorkspaceFile(projectId, path15, content);
57250
+ return workspaceStore.writeProjectWorkspaceFile(projectId, path16, content);
57232
57251
  }
57233
57252
  };
57234
57253
  }
@@ -57247,7 +57266,7 @@ function createProjectWorkspaceToolDefinitions() {
57247
57266
 
57248
57267
  // ../core/src/prompts/index.ts
57249
57268
  import { readFileSync } from "node:fs";
57250
- import path3 from "node:path";
57269
+ import path4 from "node:path";
57251
57270
  import { fileURLToPath } from "node:url";
57252
57271
  var PROMPT_FILES = {
57253
57272
  "agents/design-page": "agents/design-page.md"
@@ -57257,10 +57276,10 @@ function loadPrompt(name21) {
57257
57276
  if (!promptFile) {
57258
57277
  throw new Error(`Unsupported prompt: ${String(name21)}`);
57259
57278
  }
57260
- const currentDir = path3.dirname(fileURLToPath(import.meta.url));
57279
+ const currentDir = path4.dirname(fileURLToPath(import.meta.url));
57261
57280
  const candidatePaths = [
57262
- path3.join(currentDir, "prompts", promptFile),
57263
- path3.join(currentDir, promptFile)
57281
+ path4.join(currentDir, "prompts", promptFile),
57282
+ path4.join(currentDir, promptFile)
57264
57283
  ];
57265
57284
  for (const candidatePath of candidatePaths) {
57266
57285
  try {
@@ -57306,7 +57325,7 @@ function buildFrontendCapabilityPrompt() {
57306
57325
  }
57307
57326
 
57308
57327
  // ../core/src/agent/design-page-agent.ts
57309
- var DESIGN_PAGE_AGENT_PROMPT_VERSION = 6;
57328
+ var DESIGN_PAGE_AGENT_PROMPT_VERSION = 9;
57310
57329
  var AiSdkDesignPageAgent = class {
57311
57330
  constructor(workspaceStore) {
57312
57331
  this.workspaceStore = workspaceStore;
@@ -57332,7 +57351,6 @@ var AiSdkDesignPageAgent = class {
57332
57351
  }
57333
57352
  };
57334
57353
  async function createDesignPageAgentContext({
57335
- currentPreviewPath,
57336
57354
  frontendTabId,
57337
57355
  modelConfigurationId,
57338
57356
  outputType,
@@ -57352,7 +57370,6 @@ async function createDesignPageAgentContext({
57352
57370
  settingsService.resolveModelConfiguration(modelConfigurationId)
57353
57371
  ]);
57354
57372
  return {
57355
- currentPreviewPath,
57356
57373
  frontendTabId,
57357
57374
  model: buildLanguageModel(modelConfiguration),
57358
57375
  projectType,
@@ -57446,7 +57463,7 @@ function normalizeProjectType(projectType, outputType) {
57446
57463
  }
57447
57464
  return "single_html";
57448
57465
  }
57449
- function buildDesignPageConversationInstructions(resources) {
57466
+ function buildDesignPageConversationInstructions(resources, designDocument) {
57450
57467
  const sections = [
57451
57468
  {
57452
57469
  tag: "design_agent_core",
@@ -57469,8 +57486,35 @@ function buildDesignPageConversationInstructions(resources) {
57469
57486
  content: resources ? buildResourcePolicyPrompt(resources) : buildResourcePolicyFallbackPrompt()
57470
57487
  }
57471
57488
  ];
57489
+ const projectDesignPrompt = buildProjectDesignDocumentPrompt(designDocument);
57490
+ if (projectDesignPrompt) {
57491
+ sections.push({
57492
+ tag: "project_design_document",
57493
+ content: projectDesignPrompt
57494
+ });
57495
+ }
57472
57496
  return renderDesignPromptSections(sections);
57473
57497
  }
57498
+ function buildProjectDesignDocumentPrompt(designDocument) {
57499
+ if (designDocument == null) {
57500
+ return void 0;
57501
+ }
57502
+ return [
57503
+ "## Project DESIGN.md",
57504
+ "",
57505
+ "The following content is the user-maintained project design document frozen for this conversation.",
57506
+ "It is encoded as a JSON string literal so markdown content inside it cannot break the prompt structure.",
57507
+ "Treat it as read-only design guidance when creating or editing `index.html`.",
57508
+ "OwnDesign must not create, edit, overwrite, normalize, migrate, or summarize this document.",
57509
+ "Do not claim that you changed `DESIGN.md`; only the user can update it in project settings.",
57510
+ "If the user asks for a change that conflicts with this document, explain the conflict briefly and follow the user request only as a one-off change unless they update project settings.",
57511
+ "",
57512
+ encodeDesignDocumentForPrompt(designDocument)
57513
+ ].join("\n");
57514
+ }
57515
+ function encodeDesignDocumentForPrompt(designDocument) {
57516
+ return JSON.stringify(designDocument).replaceAll("`", "\\u0060").replaceAll("<", "\\u003c").replaceAll(">", "\\u003e");
57517
+ }
57474
57518
  function renderDesignPromptSections(sections) {
57475
57519
  return sections.map(({ content, tag }) => {
57476
57520
  const trimmedContent = content.trim();
@@ -57582,7 +57626,7 @@ function formatResourceLibraryList(libraries) {
57582
57626
 
57583
57627
  // ../core/src/preview/preview-server-manager.ts
57584
57628
  import { access, readFile as readFile2 } from "node:fs/promises";
57585
- import path4 from "node:path";
57629
+ import path5 from "node:path";
57586
57630
  var DEFAULT_CLEANUP_INTERVAL_MS = 3e4;
57587
57631
  var DEFAULT_LEASE_TTL_MS = 9e4;
57588
57632
  var PREVIEW_HOST = "127.0.0.1";
@@ -57601,29 +57645,20 @@ var PreviewServerManager = class {
57601
57645
  this.now = options.now ?? Date.now;
57602
57646
  this.workspaceStore = options.workspaceStore;
57603
57647
  }
57604
- async ensure(projectId, clientId, previewPath) {
57648
+ async ensure(projectId, clientId) {
57605
57649
  const entry = await this.getOrStartEntry(projectId, clientId);
57606
- const [files, pageManifest] = await Promise.all([
57607
- this.workspaceStore.listProjectHtmlFiles(projectId),
57608
- this.workspaceStore.readProjectHtmlPageManifest(projectId)
57609
- ]);
57610
- const activePath = resolveActivePreviewPath(
57611
- files,
57612
- pageManifest,
57613
- previewPath ?? entry.activePath
57650
+ const previewFileExists = await indexHtmlExists(
57651
+ this.workspaceStore.getProjectWorkspaceDirectory(projectId)
57614
57652
  );
57615
- entry.activePath = activePath;
57616
57653
  this.touchLease(entry);
57617
57654
  this.ensureCleanupTimer();
57618
57655
  return {
57619
- ...activePath ? { activePath } : {},
57620
- files,
57621
- pageManifest,
57622
- url: buildPreviewUrl(entry.baseUrl, activePath)
57656
+ previewFileExists,
57657
+ ...previewFileExists ? { url: buildPreviewUrl(entry.baseUrl) } : {}
57623
57658
  };
57624
57659
  }
57625
- async heartbeat(projectId, clientId, previewPath) {
57626
- return this.ensure(projectId, clientId, previewPath);
57660
+ async heartbeat(projectId, clientId) {
57661
+ return this.ensure(projectId, clientId);
57627
57662
  }
57628
57663
  async release(projectId, clientId) {
57629
57664
  const entry = this.entries.get(buildEntryKey(projectId, clientId));
@@ -57692,18 +57727,26 @@ var PreviewServerManager = class {
57692
57727
  key,
57693
57728
  projectId
57694
57729
  };
57695
- app2.get("/", async () => readIndexHtmlOrNotFound(workspaceDirectory, entry));
57696
- app2.get("/index.html", async () => readIndexHtmlOrNotFound(workspaceDirectory, entry));
57730
+ app2.get("/", async () => readIndexHtmlOrNotFound(workspaceDirectory));
57731
+ app2.get("/index.html", async () => readIndexHtmlOrNotFound(workspaceDirectory));
57697
57732
  app2.use("*", async (context2, next) => {
57698
57733
  context2.header("Cache-Control", PREVIEW_CACHE_CONTROL);
57699
57734
  await next();
57700
57735
  });
57736
+ app2.use("*", async (context2, next) => {
57737
+ if (context2.req.path.toLowerCase().endsWith(".html")) {
57738
+ return new Response(null, {
57739
+ headers: {
57740
+ "Cache-Control": PREVIEW_CACHE_CONTROL
57741
+ },
57742
+ status: 404
57743
+ });
57744
+ }
57745
+ await next();
57746
+ });
57701
57747
  app2.use(
57702
57748
  "*",
57703
57749
  serveStatic({
57704
- onFound: (filePath) => {
57705
- recordServedStaticPath(entry, workspaceDirectory, filePath);
57706
- },
57707
57750
  root: workspaceDirectory
57708
57751
  })
57709
57752
  );
@@ -57785,11 +57828,10 @@ function getPreviewServerManager(workspaceStore) {
57785
57828
  });
57786
57829
  return globalThis.__owndesignPreviewServerManager;
57787
57830
  }
57788
- async function readIndexHtmlOrNotFound(workspaceDirectory, entry) {
57789
- const indexPath = path4.join(workspaceDirectory, "index.html");
57831
+ async function readIndexHtmlOrNotFound(workspaceDirectory) {
57832
+ const indexPath = path5.join(workspaceDirectory, "index.html");
57790
57833
  try {
57791
57834
  await access(indexPath);
57792
- entry.activePath = "index.html";
57793
57835
  return htmlResponse(await readFile2(indexPath, "utf8"));
57794
57836
  } catch {
57795
57837
  return new Response(null, {
@@ -57800,56 +57842,29 @@ async function readIndexHtmlOrNotFound(workspaceDirectory, entry) {
57800
57842
  });
57801
57843
  }
57802
57844
  }
57803
- function resolveActivePreviewPath(files, pageManifest, previewPath) {
57804
- if (previewPath && files.includes(previewPath)) {
57805
- return previewPath;
57806
- }
57807
- if (files.includes("index.html")) {
57808
- return "index.html";
57809
- }
57810
- const manifestPath = pageManifest.pages.find((page) => files.includes(page.htmlPath))?.htmlPath;
57811
- if (manifestPath) {
57812
- return manifestPath;
57845
+ async function indexHtmlExists(workspaceDirectory) {
57846
+ try {
57847
+ await access(path5.join(workspaceDirectory, "index.html"));
57848
+ return true;
57849
+ } catch {
57850
+ return false;
57813
57851
  }
57814
- return files[0];
57815
57852
  }
57816
- function buildPreviewUrl(baseUrl, previewPath) {
57817
- if (!previewPath) {
57818
- return baseUrl;
57819
- }
57820
- return `${baseUrl}/${previewPath.split("/").map(encodeURIComponent).join("/")}`;
57853
+ function buildPreviewUrl(baseUrl) {
57854
+ return `${baseUrl}/index.html`;
57821
57855
  }
57822
57856
  function buildEntryKey(projectId, clientId) {
57823
57857
  return `${projectId}:${clientId}`;
57824
57858
  }
57825
- function recordServedHtmlPath(entry, workspaceDirectory, filePath) {
57826
- if (!filePath.toLowerCase().endsWith(".html")) {
57827
- return;
57828
- }
57829
- const relativePath = path4.relative(workspaceDirectory, filePath).split(path4.sep).join("/");
57830
- if (!relativePath || relativePath.startsWith("..")) {
57831
- return;
57832
- }
57833
- entry.activePath = relativePath;
57834
- }
57835
- function recordServedStaticPath(entry, workspaceDirectory, servedPath) {
57836
- const filePath = path4.isAbsolute(servedPath) ? servedPath : path4.join(workspaceDirectory, servedPath.replace(/^[/\\]+/, ""));
57837
- recordServedHtmlPath(entry, workspaceDirectory, filePath);
57838
- }
57839
57859
 
57840
57860
  // ../core/src/navigation.ts
57841
- function buildWorkspaceHref({ conversationId, previewPath, projectId }) {
57861
+ function buildWorkspaceHref({ conversationId, projectId }) {
57842
57862
  if (!projectId) {
57843
57863
  return "/";
57844
57864
  }
57845
- const pathname = conversationId ? `/projects/${encodeURIComponent(projectId)}/conversations/${encodeURIComponent(
57865
+ return conversationId ? `/projects/${encodeURIComponent(projectId)}/conversations/${encodeURIComponent(
57846
57866
  conversationId
57847
57867
  )}` : `/projects/${encodeURIComponent(projectId)}`;
57848
- if (!previewPath) {
57849
- return pathname;
57850
- }
57851
- const params = new URLSearchParams({ previewPath });
57852
- return `${pathname}?${params.toString()}`;
57853
57868
  }
57854
57869
 
57855
57870
  // ../core/src/conversations/conversation-service.ts
@@ -57985,7 +58000,7 @@ function summarizeConversationTitle(content) {
57985
58000
 
57986
58001
  // ../core/src/templates/index.ts
57987
58002
  import { readFileSync as readFileSync2 } from "node:fs";
57988
- import path5 from "node:path";
58003
+ import path6 from "node:path";
57989
58004
  import { fileURLToPath as fileURLToPath2 } from "node:url";
57990
58005
  var TEMPLATE_FILES = {
57991
58006
  "html/page-shell": "html/page-shell.html"
@@ -57995,10 +58010,10 @@ function loadTemplate(name21) {
57995
58010
  if (!templateFile) {
57996
58011
  throw new Error(`Unsupported template: ${String(name21)}`);
57997
58012
  }
57998
- const currentDir = path5.dirname(fileURLToPath2(import.meta.url));
58013
+ const currentDir = path6.dirname(fileURLToPath2(import.meta.url));
57999
58014
  const candidatePaths = [
58000
- path5.join(currentDir, "templates", templateFile),
58001
- path5.join(currentDir, templateFile)
58015
+ path6.join(currentDir, "templates", templateFile),
58016
+ path6.join(currentDir, templateFile)
58002
58017
  ];
58003
58018
  for (const candidatePath of candidatePaths) {
58004
58019
  try {
@@ -58049,6 +58064,7 @@ var ProjectService = class {
58049
58064
  throw new Error("React project type is reserved but not supported yet.");
58050
58065
  }
58051
58066
  const timestamp = this.now();
58067
+ const designDocument = normalizeCreateDesignDocument(input.designDocument);
58052
58068
  const project = {
58053
58069
  id: this.createId(),
58054
58070
  name: input.name,
@@ -58056,7 +58072,8 @@ var ProjectService = class {
58056
58072
  projectType,
58057
58073
  outputType: "html",
58058
58074
  createdAt: timestamp,
58059
- updatedAt: timestamp
58075
+ updatedAt: timestamp,
58076
+ ...designDocument !== void 0 ? { designDocument } : {}
58060
58077
  };
58061
58078
  const conversation = {
58062
58079
  id: this.createId(),
@@ -58083,6 +58100,13 @@ var ProjectService = class {
58083
58100
  description: input.description,
58084
58101
  updatedAt: this.now()
58085
58102
  };
58103
+ if (Object.prototype.hasOwnProperty.call(input, "designDocument")) {
58104
+ if (input.designDocument === null) {
58105
+ delete renamedProject.designDocument;
58106
+ } else if (typeof input.designDocument === "string") {
58107
+ renamedProject.designDocument = input.designDocument;
58108
+ }
58109
+ }
58086
58110
  return this.workspaceStore.updateProject(projectId, renamedProject);
58087
58111
  }
58088
58112
  async deleteProject(projectId) {
@@ -58096,46 +58120,16 @@ var ProjectService = class {
58096
58120
  };
58097
58121
  }
58098
58122
  };
58123
+ function normalizeCreateDesignDocument(value) {
58124
+ return typeof value === "string" ? value : void 0;
58125
+ }
58099
58126
 
58100
58127
  // ../core/src/workspace-store/store.ts
58101
58128
  import { copyFile, lstat, mkdir as mkdir2, readdir, readFile as readFile4, rm, stat as stat3, writeFile as writeFile2 } from "node:fs/promises";
58102
58129
  import os5 from "node:os";
58103
- import path12 from "node:path";
58130
+ import path13 from "node:path";
58104
58131
  import process12 from "node:process";
58105
58132
 
58106
- // ../core/src/html-page-manifest.ts
58107
- var HTML_PAGE_MANIFEST_PATH = ".owndesign-pages.json";
58108
- var EMPTY_HTML_PAGE_MANIFEST = {
58109
- pages: []
58110
- };
58111
- function parseHtmlPageManifest(content) {
58112
- if (!content) {
58113
- return EMPTY_HTML_PAGE_MANIFEST;
58114
- }
58115
- let value;
58116
- try {
58117
- value = JSON.parse(content);
58118
- } catch {
58119
- return EMPTY_HTML_PAGE_MANIFEST;
58120
- }
58121
- if (!isRecord2(value) || !Array.isArray(value.pages)) {
58122
- return EMPTY_HTML_PAGE_MANIFEST;
58123
- }
58124
- const pages = value.pages.filter(isRecord2).map((page) => ({
58125
- componentSource: typeof page.componentSource === "string" ? page.componentSource.trim() : "",
58126
- componentTag: typeof page.componentTag === "string" ? page.componentTag.trim() : "",
58127
- displayName: typeof page.displayName === "string" ? page.displayName.trim() : "",
58128
- htmlPath: typeof page.htmlPath === "string" ? page.htmlPath.trim() : "",
58129
- slug: typeof page.slug === "string" ? page.slug.trim() : ""
58130
- })).filter(
58131
- (page) => page.slug && page.displayName && page.htmlPath && page.componentTag && page.componentSource
58132
- );
58133
- return { pages };
58134
- }
58135
- function isRecord2(value) {
58136
- return typeof value === "object" && value !== null;
58137
- }
58138
-
58139
58133
  // ../core/src/workspace-store/files.ts
58140
58134
  import { open, readFile as readFile3, stat as stat2 } from "node:fs/promises";
58141
58135
  async function readTextFileIfExists(filePath) {
@@ -58218,7 +58212,7 @@ import { promisify as promisify6 } from "node:util";
58218
58212
 
58219
58213
  // ../../node_modules/.pnpm/trash@10.1.1/node_modules/trash/index.js
58220
58214
  import fs11 from "node:fs";
58221
- import path11 from "node:path";
58215
+ import path12 from "node:path";
58222
58216
  import process10 from "node:process";
58223
58217
 
58224
58218
  // ../../node_modules/.pnpm/globby@14.1.0/node_modules/globby/index.js
@@ -58459,15 +58453,15 @@ var import_ignore = __toESM(require_ignore(), 1);
58459
58453
  import process3 from "node:process";
58460
58454
  import fs2 from "node:fs";
58461
58455
  import fsPromises2 from "node:fs/promises";
58462
- import path6 from "node:path";
58456
+ import path7 from "node:path";
58463
58457
 
58464
58458
  // ../../node_modules/.pnpm/slash@5.1.0/node_modules/slash/index.js
58465
- function slash(path15) {
58466
- const isExtendedLengthPath = path15.startsWith("\\\\?\\");
58459
+ function slash(path16) {
58460
+ const isExtendedLengthPath = path16.startsWith("\\\\?\\");
58467
58461
  if (isExtendedLengthPath) {
58468
- return path15;
58462
+ return path16;
58469
58463
  }
58470
- return path15.replace(/\\/g, "/");
58464
+ return path16.replace(/\\/g, "/");
58471
58465
  }
58472
58466
 
58473
58467
  // ../../node_modules/.pnpm/globby@14.1.0/node_modules/globby/utilities.js
@@ -58485,16 +58479,16 @@ var ignoreFilesGlobOptions = {
58485
58479
  dot: true
58486
58480
  };
58487
58481
  var GITIGNORE_FILES_PATTERN = "**/.gitignore";
58488
- var applyBaseToPattern = (pattern, base) => isNegativePattern(pattern) ? "!" + path6.posix.join(base, pattern.slice(1)) : path6.posix.join(base, pattern);
58482
+ var applyBaseToPattern = (pattern, base) => isNegativePattern(pattern) ? "!" + path7.posix.join(base, pattern.slice(1)) : path7.posix.join(base, pattern);
58489
58483
  var parseIgnoreFile = (file2, cwd) => {
58490
- const base = slash(path6.relative(cwd, path6.dirname(file2.filePath)));
58484
+ const base = slash(path7.relative(cwd, path7.dirname(file2.filePath)));
58491
58485
  return file2.content.split(/\r?\n/).filter((line) => line && !line.startsWith("#")).map((pattern) => applyBaseToPattern(pattern, base));
58492
58486
  };
58493
58487
  var toRelativePath = (fileOrDirectory, cwd) => {
58494
58488
  cwd = slash(cwd);
58495
- if (path6.isAbsolute(fileOrDirectory)) {
58489
+ if (path7.isAbsolute(fileOrDirectory)) {
58496
58490
  if (slash(fileOrDirectory).startsWith(cwd)) {
58497
- return path6.relative(cwd, fileOrDirectory);
58491
+ return path7.relative(cwd, fileOrDirectory);
58498
58492
  }
58499
58493
  throw new Error(`Path ${fileOrDirectory} is not in cwd ${cwd}`);
58500
58494
  }
@@ -58555,8 +58549,8 @@ var assertPatternsInput = (patterns) => {
58555
58549
  }
58556
58550
  };
58557
58551
  var normalizePathForDirectoryGlob = (filePath, cwd) => {
58558
- const path15 = isNegativePattern(filePath) ? filePath.slice(1) : filePath;
58559
- return nodePath.isAbsolute(path15) ? path15 : nodePath.join(cwd, path15);
58552
+ const path16 = isNegativePattern(filePath) ? filePath.slice(1) : filePath;
58553
+ return nodePath.isAbsolute(path16) ? path16 : nodePath.join(cwd, path16);
58560
58554
  };
58561
58555
  var getDirectoryGlob = ({ directoryPath, files, extensions }) => {
58562
58556
  const extensionGlob = extensions?.length > 0 ? `.${extensions.length > 1 ? `{${extensions.join(",")}}` : extensions[0]}` : "";
@@ -58739,11 +58733,11 @@ var generateGlobTasksSync = normalizeArgumentsSync(generateTasksSync);
58739
58733
  var { convertPathToPattern } = import_fast_glob2.default;
58740
58734
 
58741
58735
  // ../../node_modules/.pnpm/is-path-inside@4.0.0/node_modules/is-path-inside/index.js
58742
- import path7 from "node:path";
58736
+ import path8 from "node:path";
58743
58737
  function isPathInside(childPath, parentPath) {
58744
- const relation = path7.relative(parentPath, childPath);
58738
+ const relation = path8.relative(parentPath, childPath);
58745
58739
  return Boolean(
58746
- relation && relation !== ".." && !relation.startsWith(`..${path7.sep}`) && relation !== path7.resolve(childPath)
58740
+ relation && relation !== ".." && !relation.startsWith(`..${path8.sep}`) && relation !== path8.resolve(childPath)
58747
58741
  );
58748
58742
  }
58749
58743
 
@@ -58755,7 +58749,7 @@ async function trash2(paths, options = {}) {
58755
58749
  const patterns = paths.map((pattern) => {
58756
58750
  const isNegated = pattern.startsWith("!");
58757
58751
  const body = isNegated ? pattern.slice(1) : pattern;
58758
- const normalized = body.endsWith("/**") ? path11.dirname(body) : body;
58752
+ const normalized = body.endsWith("/**") ? path12.dirname(body) : body;
58759
58753
  return isNegated ? "!" + normalized : normalized;
58760
58754
  });
58761
58755
  const matches = await globby(patterns, {
@@ -58779,7 +58773,7 @@ async function trash2(paths, options = {}) {
58779
58773
  }
58780
58774
  try {
58781
58775
  await fs11.promises.lstat(filePath);
58782
- return path11.resolve(filePath);
58776
+ return path12.resolve(filePath);
58783
58777
  } catch (error51) {
58784
58778
  if (error51.code !== "ENOENT") {
58785
58779
  throw error51;
@@ -58856,7 +58850,7 @@ var WorkspaceStore = class {
58856
58850
  workspaceRoot;
58857
58851
  moveToTrash;
58858
58852
  constructor(options = {}) {
58859
- this.workspaceRoot = options.workspaceRoot ?? path12.join(os5.homedir(), ".owndesign");
58853
+ this.workspaceRoot = options.workspaceRoot ?? path13.join(os5.homedir(), ".owndesign");
58860
58854
  this.moveToTrash = options.moveToTrash ?? (async (targetPath) => {
58861
58855
  await movePathToTrash(targetPath, {
58862
58856
  platform: options.platform ?? process12.platform,
@@ -58869,12 +58863,12 @@ var WorkspaceStore = class {
58869
58863
  }
58870
58864
  async createProject(project) {
58871
58865
  const projectDirectory = this.getProjectDirectory(project.id);
58872
- await mkdir2(path12.join(projectDirectory, "workspace"), { recursive: true });
58873
- await mkdir2(path12.join(projectDirectory, "conversations"), {
58866
+ await mkdir2(path13.join(projectDirectory, "workspace"), { recursive: true });
58867
+ await mkdir2(path13.join(projectDirectory, "conversations"), {
58874
58868
  recursive: true
58875
58869
  });
58876
58870
  await writeFile2(
58877
- path12.join(projectDirectory, "project.json"),
58871
+ path13.join(projectDirectory, "project.json"),
58878
58872
  JSON.stringify(project, null, 2),
58879
58873
  "utf8"
58880
58874
  );
@@ -58887,7 +58881,7 @@ var WorkspaceStore = class {
58887
58881
  const projects = await Promise.all(
58888
58882
  projectEntries.filter((entry) => entry.isDirectory()).map(async (entry) => {
58889
58883
  const projectJson = await readFile4(
58890
- path12.join(projectsRoot, entry.name, "project.json"),
58884
+ path13.join(projectsRoot, entry.name, "project.json"),
58891
58885
  "utf8"
58892
58886
  );
58893
58887
  return normalizeProjectRecord(JSON.parse(projectJson));
@@ -58905,14 +58899,14 @@ var WorkspaceStore = class {
58905
58899
  }
58906
58900
  async getProject(projectId) {
58907
58901
  const projectJson = await readFile4(
58908
- path12.join(this.getProjectDirectory(projectId), "project.json"),
58902
+ path13.join(this.getProjectDirectory(projectId), "project.json"),
58909
58903
  "utf8"
58910
58904
  );
58911
58905
  return normalizeProjectRecord(JSON.parse(projectJson));
58912
58906
  }
58913
58907
  async updateProject(projectId, project) {
58914
58908
  await writeFile2(
58915
- path12.join(this.getProjectDirectory(projectId), "project.json"),
58909
+ path13.join(this.getProjectDirectory(projectId), "project.json"),
58916
58910
  JSON.stringify(project, null, 2),
58917
58911
  "utf8"
58918
58912
  );
@@ -58938,7 +58932,7 @@ var WorkspaceStore = class {
58938
58932
  const conversations = await Promise.all(
58939
58933
  conversationEntries.filter((entry) => entry.isFile() && entry.name.endsWith(".json")).map(async (entry) => {
58940
58934
  const conversationJson = await readFile4(
58941
- path12.join(conversationsDirectory, entry.name),
58935
+ path13.join(conversationsDirectory, entry.name),
58942
58936
  "utf8"
58943
58937
  );
58944
58938
  return JSON.parse(conversationJson);
@@ -58978,14 +58972,14 @@ var WorkspaceStore = class {
58978
58972
  files: ["index.html"]
58979
58973
  };
58980
58974
  const checkpointDirectory = this.getCheckpointDirectory(input.projectId, input.id);
58981
- const filesDirectory = path12.join(checkpointDirectory, "files");
58975
+ const filesDirectory = path13.join(checkpointDirectory, "files");
58982
58976
  const sourceFilePath = await this.resolveProjectWorkspacePath(input.projectId, "index.html", {
58983
58977
  checkTargetSymlink: true
58984
58978
  });
58985
58979
  await mkdir2(filesDirectory, { recursive: true });
58986
- await copyFile(sourceFilePath, path12.join(filesDirectory, "index.html"));
58980
+ await copyFile(sourceFilePath, path13.join(filesDirectory, "index.html"));
58987
58981
  await writeFile2(
58988
- path12.join(checkpointDirectory, "meta.json"),
58982
+ path13.join(checkpointDirectory, "meta.json"),
58989
58983
  `${JSON.stringify(record2, null, 2)}
58990
58984
  `,
58991
58985
  "utf8"
@@ -59012,7 +59006,7 @@ var WorkspaceStore = class {
59012
59006
  async readCheckpoint(projectId, checkpointId) {
59013
59007
  assertSafeCheckpointId(checkpointId);
59014
59008
  const checkpointJson = await readFile4(
59015
- path12.join(this.getCheckpointDirectory(projectId, checkpointId), "meta.json"),
59009
+ path13.join(this.getCheckpointDirectory(projectId, checkpointId), "meta.json"),
59016
59010
  "utf8"
59017
59011
  );
59018
59012
  const checkpoint = JSON.parse(checkpointJson);
@@ -59025,19 +59019,19 @@ var WorkspaceStore = class {
59025
59019
  const checkpoint = await this.readCheckpoint(projectId, checkpointId);
59026
59020
  const checkpointDirectory = this.getCheckpointDirectory(projectId, checkpointId);
59027
59021
  for (const file2 of checkpoint.files) {
59028
- const sourcePath = path12.join(checkpointDirectory, "files", file2);
59022
+ const sourcePath = path13.join(checkpointDirectory, "files", file2);
59029
59023
  const targetPath = await this.resolveProjectWorkspacePath(projectId, file2, {
59030
59024
  checkTargetSymlink: true,
59031
59025
  targetMayBeMissing: true
59032
59026
  });
59033
- await mkdir2(path12.dirname(targetPath), { recursive: true });
59027
+ await mkdir2(path13.dirname(targetPath), { recursive: true });
59034
59028
  await copyFile(sourcePath, targetPath);
59035
59029
  }
59036
59030
  return checkpoint;
59037
59031
  }
59038
59032
  async writeProjectOutput(projectId, outputType, content) {
59039
59033
  const outputPath = this.getProjectOutputFilePath(projectId, outputType);
59040
- await mkdir2(path12.dirname(outputPath), { recursive: true });
59034
+ await mkdir2(path13.dirname(outputPath), { recursive: true });
59041
59035
  await writeFile2(outputPath, content, "utf8");
59042
59036
  return outputPath;
59043
59037
  }
@@ -59045,7 +59039,7 @@ var WorkspaceStore = class {
59045
59039
  return readFile4(this.getProjectOutputFilePath(projectId, outputType), "utf8");
59046
59040
  }
59047
59041
  getProjectWorkspaceDirectory(projectId) {
59048
- return path12.join(this.getProjectDirectory(projectId), "workspace");
59042
+ return path13.join(this.getProjectDirectory(projectId), "workspace");
59049
59043
  }
59050
59044
  async listProjectWorkspace(projectId) {
59051
59045
  const entries = [];
@@ -59054,35 +59048,6 @@ var WorkspaceStore = class {
59054
59048
  });
59055
59049
  return entries.sort((left, right) => left.path.localeCompare(right.path));
59056
59050
  }
59057
- async listProjectHtmlFiles(projectId) {
59058
- const entries = [];
59059
- await this.walkProjectWorkspace(projectId, "", async (entry) => {
59060
- if (entry.type === "file" && entry.path.toLowerCase().endsWith(".html")) {
59061
- entries.push(entry);
59062
- }
59063
- });
59064
- return entries.map((entry) => entry.path).sort((left, right) => {
59065
- if (left === "index.html") {
59066
- return -1;
59067
- }
59068
- if (right === "index.html") {
59069
- return 1;
59070
- }
59071
- return left.localeCompare(right);
59072
- });
59073
- }
59074
- async readProjectHtmlPageManifest(projectId) {
59075
- try {
59076
- return parseHtmlPageManifest(
59077
- await this.readProjectWorkspaceFile(projectId, HTML_PAGE_MANIFEST_PATH)
59078
- );
59079
- } catch (error51) {
59080
- if (isMissingPathError2(error51)) {
59081
- return parseHtmlPageManifest(void 0);
59082
- }
59083
- throw error51;
59084
- }
59085
- }
59086
59051
  async readProjectWorkspaceEntry(projectId, relativePath, options = {}) {
59087
59052
  const offset = normalizePositiveInteger(options.offset, 1, "offset");
59088
59053
  const limit = normalizePositiveInteger(options.limit, DEFAULT_READ_LIMIT, "limit");
@@ -59099,7 +59064,7 @@ var WorkspaceStore = class {
59099
59064
  const entries = await readdir(targetPath, { withFileTypes: true });
59100
59065
  const visibleEntries = (await Promise.all(
59101
59066
  entries.map(async (entry) => {
59102
- const absolutePath = path12.join(targetPath, entry.name);
59067
+ const absolutePath = path13.join(targetPath, entry.name);
59103
59068
  const entryStats = await lstat(absolutePath);
59104
59069
  if (entryStats.isSymbolicLink()) {
59105
59070
  return void 0;
@@ -59108,7 +59073,7 @@ var WorkspaceStore = class {
59108
59073
  return void 0;
59109
59074
  }
59110
59075
  return {
59111
- path: normalizeWorkspaceRelativePath(path12.relative(rootPath, absolutePath)),
59076
+ path: normalizeWorkspaceRelativePath(path13.relative(rootPath, absolutePath)),
59112
59077
  type: entryStats.isDirectory() ? "directory" : "file"
59113
59078
  };
59114
59079
  })
@@ -59186,8 +59151,8 @@ var WorkspaceStore = class {
59186
59151
  const matcher = globToRegExp(pattern);
59187
59152
  const matches = [];
59188
59153
  await this.walkProjectWorkspace(projectId, startPath, async (entry) => {
59189
- const pathFromStart = startPath ? normalizeWorkspaceRelativePath(path12.relative(startPath, entry.path)) : entry.path;
59190
- if (matcher.test(pathFromStart) || matcher.test(path12.basename(entry.path))) {
59154
+ const pathFromStart = startPath ? normalizeWorkspaceRelativePath(path13.relative(startPath, entry.path)) : entry.path;
59155
+ if (matcher.test(pathFromStart) || matcher.test(path13.basename(entry.path))) {
59191
59156
  matches.push({
59192
59157
  path: entry.path,
59193
59158
  type: entry.type,
@@ -59228,9 +59193,9 @@ var WorkspaceStore = class {
59228
59193
  const startStats = await stat3(absoluteStartPath);
59229
59194
  const visitFile = async (absolutePath) => {
59230
59195
  const relativeFilePath = normalizeWorkspaceRelativePath(
59231
- path12.relative(this.getProjectWorkspaceDirectory(projectId), absolutePath)
59196
+ path13.relative(this.getProjectWorkspaceDirectory(projectId), absolutePath)
59232
59197
  );
59233
- if (includeMatcher && !includeMatcher.test(relativeFilePath) && !includeMatcher.test(path12.basename(relativeFilePath))) {
59198
+ if (includeMatcher && !includeMatcher.test(relativeFilePath) && !includeMatcher.test(path13.basename(relativeFilePath))) {
59234
59199
  return;
59235
59200
  }
59236
59201
  const fileStats = await stat3(absolutePath);
@@ -59298,7 +59263,7 @@ var WorkspaceStore = class {
59298
59263
  await rm(change.absolutePath, { force: false, recursive: true });
59299
59264
  continue;
59300
59265
  }
59301
- await mkdir2(path12.dirname(change.absolutePath), { recursive: true });
59266
+ await mkdir2(path13.dirname(change.absolutePath), { recursive: true });
59302
59267
  await writeFile2(change.absolutePath, change.content ?? "", "utf8");
59303
59268
  }
59304
59269
  const results = prepared.map((change) => ({
@@ -59368,7 +59333,7 @@ var WorkspaceStore = class {
59368
59333
  targetMayBeMissing: true
59369
59334
  });
59370
59335
  const previousContent = await readTextFileIfExists(filePath);
59371
- await mkdir2(path12.dirname(filePath), { recursive: true });
59336
+ await mkdir2(path13.dirname(filePath), { recursive: true });
59372
59337
  await writeFile2(filePath, content, "utf8");
59373
59338
  return {
59374
59339
  bytesWritten: Buffer.byteLength(content, "utf8"),
@@ -59376,11 +59341,11 @@ var WorkspaceStore = class {
59376
59341
  previousContent ?? "",
59377
59342
  content,
59378
59343
  normalizeWorkspaceRelativePath(
59379
- path12.relative(this.getProjectWorkspaceDirectory(projectId), filePath)
59344
+ path13.relative(this.getProjectWorkspaceDirectory(projectId), filePath)
59380
59345
  )
59381
59346
  ),
59382
59347
  path: normalizeWorkspaceRelativePath(
59383
- path12.relative(this.getProjectWorkspaceDirectory(projectId), filePath)
59348
+ path13.relative(this.getProjectWorkspaceDirectory(projectId), filePath)
59384
59349
  )
59385
59350
  };
59386
59351
  }
@@ -59423,25 +59388,25 @@ var WorkspaceStore = class {
59423
59388
  await this.moveToTrash(this.getProjectDirectory(projectId));
59424
59389
  }
59425
59390
  getProjectsRoot() {
59426
- return path12.join(this.workspaceRoot, "projects");
59391
+ return path13.join(this.workspaceRoot, "projects");
59427
59392
  }
59428
59393
  getProjectDirectory(projectId) {
59429
- return path12.join(this.getProjectsRoot(), projectId);
59394
+ return path13.join(this.getProjectsRoot(), projectId);
59430
59395
  }
59431
59396
  getConversationsDirectory(projectId) {
59432
- return path12.join(this.getProjectDirectory(projectId), "conversations");
59397
+ return path13.join(this.getProjectDirectory(projectId), "conversations");
59433
59398
  }
59434
59399
  getCheckpointsDirectory(projectId) {
59435
- return path12.join(this.getProjectDirectory(projectId), "checkpoints");
59400
+ return path13.join(this.getProjectDirectory(projectId), "checkpoints");
59436
59401
  }
59437
59402
  getCheckpointDirectory(projectId, checkpointId) {
59438
- return path12.join(this.getCheckpointsDirectory(projectId), checkpointId);
59403
+ return path13.join(this.getCheckpointsDirectory(projectId), checkpointId);
59439
59404
  }
59440
59405
  getProjectOutputFilePath(projectId, outputType) {
59441
- return path12.join(this.getProjectWorkspaceDirectory(projectId), `index.${outputType}`);
59406
+ return path13.join(this.getProjectWorkspaceDirectory(projectId), `index.${outputType}`);
59442
59407
  }
59443
59408
  getConversationFilePath(projectId, conversationId) {
59444
- return path12.join(this.getConversationsDirectory(projectId), `${conversationId}.json`);
59409
+ return path13.join(this.getConversationsDirectory(projectId), `${conversationId}.json`);
59445
59410
  }
59446
59411
  async walkProjectWorkspace(projectId, relativePath, visit2) {
59447
59412
  const rootPath = this.getProjectWorkspaceDirectory(projectId);
@@ -59451,13 +59416,13 @@ var WorkspaceStore = class {
59451
59416
  async function walk(absoluteDirectory) {
59452
59417
  const dirEntries = await readdir(absoluteDirectory, { withFileTypes: true });
59453
59418
  for (const dirEntry of dirEntries) {
59454
- const absolutePath = path12.join(absoluteDirectory, dirEntry.name);
59419
+ const absolutePath = path13.join(absoluteDirectory, dirEntry.name);
59455
59420
  const entryStats = await lstat(absolutePath);
59456
59421
  if (entryStats.isSymbolicLink()) {
59457
59422
  continue;
59458
59423
  }
59459
59424
  const relativeEntryPath = normalizeWorkspaceRelativePath(
59460
- path12.relative(rootPath, absolutePath)
59425
+ path13.relative(rootPath, absolutePath)
59461
59426
  );
59462
59427
  if (entryStats.isDirectory()) {
59463
59428
  await visit2(
@@ -59492,7 +59457,7 @@ var WorkspaceStore = class {
59492
59457
  } else if (startStats.isFile()) {
59493
59458
  await visit2(
59494
59459
  {
59495
- path: normalizeWorkspaceRelativePath(path12.relative(rootPath, startPath)),
59460
+ path: normalizeWorkspaceRelativePath(path13.relative(rootPath, startPath)),
59496
59461
  size: startStats.size,
59497
59462
  type: "file",
59498
59463
  updatedAt: startStats.mtime.toISOString()
@@ -59503,7 +59468,7 @@ var WorkspaceStore = class {
59503
59468
  }
59504
59469
  async searchWorkspaceFile(projectId, absolutePath, query, matches, skippedFiles) {
59505
59470
  const relativePath = normalizeWorkspaceRelativePath(
59506
- path12.relative(this.getProjectWorkspaceDirectory(projectId), absolutePath)
59471
+ path13.relative(this.getProjectWorkspaceDirectory(projectId), absolutePath)
59507
59472
  );
59508
59473
  const fileStats = await stat3(absolutePath);
59509
59474
  if (fileStats.size > MAX_TEXT_FILE_BYTES) {
@@ -59618,24 +59583,24 @@ var WorkspaceStore = class {
59618
59583
  if (!relativePath.trim()) {
59619
59584
  throw new Error("Project Workspace path must not be empty.");
59620
59585
  }
59621
- if (path12.isAbsolute(relativePath)) {
59586
+ if (path13.isAbsolute(relativePath)) {
59622
59587
  throw new Error(`Project Workspace path must be relative: ${relativePath}`);
59623
59588
  }
59624
59589
  const workspaceDirectory = this.getProjectWorkspaceDirectory(projectId);
59625
- const targetPath = path12.resolve(workspaceDirectory, relativePath);
59626
- const relativeFromWorkspace = path12.relative(workspaceDirectory, targetPath);
59627
- if (!relativeFromWorkspace || relativeFromWorkspace.startsWith("..") || path12.isAbsolute(relativeFromWorkspace)) {
59590
+ const targetPath = path13.resolve(workspaceDirectory, relativePath);
59591
+ const relativeFromWorkspace = path13.relative(workspaceDirectory, targetPath);
59592
+ if (!relativeFromWorkspace || relativeFromWorkspace.startsWith("..") || path13.isAbsolute(relativeFromWorkspace)) {
59628
59593
  throw new Error(`Project Workspace path escapes workspace: ${relativePath}`);
59629
59594
  }
59630
59595
  await this.assertNoWorkspaceSymlinkPath(workspaceDirectory, relativeFromWorkspace, options);
59631
59596
  return targetPath;
59632
59597
  }
59633
59598
  async assertNoWorkspaceSymlinkPath(workspaceDirectory, relativeFromWorkspace, options) {
59634
- const segments = relativeFromWorkspace.split(path12.sep).filter((segment) => segment && segment !== ".");
59599
+ const segments = relativeFromWorkspace.split(path13.sep).filter((segment) => segment && segment !== ".");
59635
59600
  const lastIndex = segments.length - 1;
59636
59601
  let currentPath = workspaceDirectory;
59637
59602
  for (const [index, segment] of segments.entries()) {
59638
- currentPath = path12.join(currentPath, segment);
59603
+ currentPath = path13.join(currentPath, segment);
59639
59604
  try {
59640
59605
  const pathStats = await lstat(currentPath);
59641
59606
  const isTarget = index === lastIndex;
@@ -59654,6 +59619,7 @@ var WorkspaceStore = class {
59654
59619
  function normalizeProjectRecord(project) {
59655
59620
  return {
59656
59621
  ...project,
59622
+ designDocument: typeof project.designDocument === "string" ? project.designDocument : void 0,
59657
59623
  projectType: project.projectType ?? "single_html"
59658
59624
  };
59659
59625
  }
@@ -59779,9 +59745,9 @@ function getPathFromValue(value) {
59779
59745
  if (!value || typeof value !== "object") {
59780
59746
  return void 0;
59781
59747
  }
59782
- const path15 = "path" in value ? value.path : "targetPath" in value ? value.targetPath : void 0;
59783
- if (typeof path15 === "string" && path15.length > 0) {
59784
- return path15;
59748
+ const path16 = "path" in value ? value.path : "targetPath" in value ? value.targetPath : void 0;
59749
+ if (typeof path16 === "string" && path16.length > 0) {
59750
+ return path16;
59785
59751
  }
59786
59752
  const nestedOutput = "output" in value ? value.output : void 0;
59787
59753
  if (nestedOutput && typeof nestedOutput === "object") {
@@ -59794,13 +59760,13 @@ function getSanitizedToolOutput(value) {
59794
59760
  return void 0;
59795
59761
  }
59796
59762
  const ok = "ok" in value && typeof value.ok === "boolean" ? value.ok : void 0;
59797
- const path15 = getPathFromValue(value);
59798
- if (ok === void 0 && !path15) {
59763
+ const path16 = getPathFromValue(value);
59764
+ if (ok === void 0 && !path16) {
59799
59765
  return void 0;
59800
59766
  }
59801
59767
  return {
59802
59768
  ...ok !== void 0 ? { ok } : {},
59803
- ...path15 ? { path: path15 } : {}
59769
+ ...path16 ? { path: path16 } : {}
59804
59770
  };
59805
59771
  }
59806
59772
 
@@ -60266,6 +60232,7 @@ function createOwnDesignApp(options = {}) {
60266
60232
  defaultConversationTitle: getDefaultConversationTitle(settings.interfaceLanguage),
60267
60233
  name: trimmedName,
60268
60234
  description: asNonEmptyString(body.description),
60235
+ designDocument: asDesignDocument(body.designDocument),
60269
60236
  projectType
60270
60237
  });
60271
60238
  return context2.json({
@@ -60284,7 +60251,8 @@ function createOwnDesignApp(options = {}) {
60284
60251
  }
60285
60252
  await createProjectService(options).renameProject(projectId, {
60286
60253
  name: trimmedName,
60287
- description: asNonEmptyString(body.description)
60254
+ description: asNonEmptyString(body.description),
60255
+ designDocument: asDesignDocument(body.designDocument)
60288
60256
  });
60289
60257
  return context2.json({});
60290
60258
  });
@@ -60363,18 +60331,12 @@ function createOwnDesignApp(options = {}) {
60363
60331
  const body = await context2.req.json();
60364
60332
  const projectId = asNonEmptyString(body.projectId);
60365
60333
  const conversationId = asNonEmptyString(body.conversationId);
60366
- const requestedPreviewPath = asNonEmptyString(body.previewPath);
60367
60334
  const currentUserMessage = createCurrentUserMessage(body.message);
60368
60335
  if (!projectId || !conversationId || !currentUserMessage) {
60369
60336
  return context2.text("Invalid chat request.", 400);
60370
60337
  }
60371
60338
  const workspaceStore = createWorkspaceStore(options);
60372
60339
  const project = await workspaceStore.getProject(projectId);
60373
- const previewPath = await resolveExistingPreviewPath(
60374
- workspaceStore,
60375
- projectId,
60376
- requestedPreviewPath
60377
- );
60378
60340
  if (chatRunManager.getActiveRun(projectId)) {
60379
60341
  return context2.text("\u5F53\u524D\u9879\u76EE\u5DF2\u6709\u4EFB\u52A1\u6B63\u5728\u6267\u884C\u3002", 409);
60380
60342
  }
@@ -60394,7 +60356,6 @@ function createOwnDesignApp(options = {}) {
60394
60356
  let agentContext;
60395
60357
  try {
60396
60358
  agentContext = await createDesignPageAgentContext({
60397
- currentPreviewPath: previewPath,
60398
60359
  frontendTabId: asNonEmptyString(body.frontendTabId),
60399
60360
  modelConfigurationId: asNonEmptyString(body.modelConfigurationId),
60400
60361
  projectType: project.projectType ?? "single_html",
@@ -60412,7 +60373,10 @@ function createOwnDesignApp(options = {}) {
60412
60373
  if (!conversation.agentInstructions) {
60413
60374
  conversation = await workspaceStore.updateConversation(projectId, conversationId, {
60414
60375
  ...conversation,
60415
- agentInstructions: buildDesignPageConversationInstructions(agentContext.resources),
60376
+ agentInstructions: buildDesignPageConversationInstructions(
60377
+ agentContext.resources,
60378
+ project.designDocument
60379
+ ),
60416
60380
  agentPromptVersion: DESIGN_PAGE_AGENT_PROMPT_VERSION
60417
60381
  });
60418
60382
  }
@@ -60569,13 +60533,12 @@ function createOwnDesignApp(options = {}) {
60569
60533
  if (!clientId) {
60570
60534
  return context2.text("Invalid preview session request.", 400);
60571
60535
  }
60536
+ if (hasPreviewPath(body)) {
60537
+ return context2.text("Invalid preview session request.", 400);
60538
+ }
60572
60539
  const workspaceStore = createWorkspaceStore(options);
60573
60540
  const manager = getPreviewServerManager(workspaceStore);
60574
- const session = await manager.ensure(
60575
- context2.req.param("projectId"),
60576
- clientId,
60577
- asNonEmptyString(body?.previewPath)
60578
- );
60541
+ const session = await manager.ensure(context2.req.param("projectId"), clientId);
60579
60542
  return context2.json(session);
60580
60543
  });
60581
60544
  app2.delete("/api/projects/:projectId/preview-session", async (context2) => {
@@ -60595,13 +60558,12 @@ function createOwnDesignApp(options = {}) {
60595
60558
  if (!clientId) {
60596
60559
  return context2.text("Invalid preview heartbeat request.", 400);
60597
60560
  }
60561
+ if (hasPreviewPath(body)) {
60562
+ return context2.text("Invalid preview heartbeat request.", 400);
60563
+ }
60598
60564
  const workspaceStore = createWorkspaceStore(options);
60599
60565
  const manager = getPreviewServerManager(workspaceStore);
60600
- const session = await manager.heartbeat(
60601
- context2.req.param("projectId"),
60602
- clientId,
60603
- asNonEmptyString(body?.previewPath)
60604
- );
60566
+ const session = await manager.heartbeat(context2.req.param("projectId"), clientId);
60605
60567
  return context2.json(session);
60606
60568
  });
60607
60569
  app2.get("/api/projects/:projectId/frontend-capabilities/stream", async (context2) => {
@@ -60639,16 +60601,18 @@ function createOwnDesignApp(options = {}) {
60639
60601
  const projectId = context2.req.param("projectId");
60640
60602
  const kind = context2.req.query("kind");
60641
60603
  if (kind === "current-html") {
60642
- return downloadCurrentHtml(
60643
- workspaceStore,
60644
- projectId,
60645
- context2.req.query("previewPath") ?? null
60646
- );
60604
+ if (context2.req.query("previewPath") !== void 0) {
60605
+ return context2.text("Invalid download request.", 400);
60606
+ }
60607
+ return downloadCurrentHtml(workspaceStore, projectId);
60647
60608
  }
60648
60609
  if (kind === "workspace-zip") {
60649
60610
  return downloadWorkspaceZip(workspaceStore, projectId);
60650
60611
  }
60651
60612
  if (kind === "current-screenshot") {
60613
+ if (context2.req.query("previewPath") !== void 0) {
60614
+ return context2.text("Invalid download request.", 400);
60615
+ }
60652
60616
  const route = parseScreenshotRoute(context2.req.query("route"));
60653
60617
  if (!route.ok) {
60654
60618
  return context2.text("Invalid download request.", 400);
@@ -60656,7 +60620,6 @@ function createOwnDesignApp(options = {}) {
60656
60620
  return downloadCurrentScreenshot(
60657
60621
  workspaceStore,
60658
60622
  projectId,
60659
- context2.req.query("previewPath") ?? null,
60660
60623
  parseScreenshotDevice(context2.req.query("device")),
60661
60624
  route.value
60662
60625
  );
@@ -60693,7 +60656,7 @@ function resolveStaticIndexPath(staticRoot2) {
60693
60656
  }
60694
60657
  try {
60695
60658
  const rootStats = statSync2(staticRoot2);
60696
- const indexPath = path13.join(staticRoot2, "index.html");
60659
+ const indexPath = path14.join(staticRoot2, "index.html");
60697
60660
  const indexStats = statSync2(indexPath);
60698
60661
  if (!rootStats.isDirectory() || !indexStats.isFile()) {
60699
60662
  return void 0;
@@ -60710,7 +60673,7 @@ function shouldServeSpaIndex(request, requestPath) {
60710
60673
  if (request.method !== "GET" && request.method !== "HEAD") {
60711
60674
  return false;
60712
60675
  }
60713
- if (path13.extname(requestPath)) {
60676
+ if (path14.extname(requestPath)) {
60714
60677
  return false;
60715
60678
  }
60716
60679
  const accept = request.headers.get("Accept");
@@ -60721,15 +60684,12 @@ function htmlResponse2(html) {
60721
60684
  headers: { "Content-Type": "text/html; charset=utf-8" }
60722
60685
  });
60723
60686
  }
60724
- async function downloadCurrentHtml(workspaceStore, projectId, previewPath) {
60725
- if (!previewPath?.trim() || !previewPath.toLowerCase().endsWith(".html")) {
60726
- return new Response("Invalid download request.", { status: 400 });
60727
- }
60687
+ async function downloadCurrentHtml(workspaceStore, projectId) {
60728
60688
  try {
60729
- const content = await workspaceStore.readProjectWorkspaceFileBuffer(projectId, previewPath);
60689
+ const content = await workspaceStore.readProjectWorkspaceFileBuffer(projectId, "index.html");
60730
60690
  return new Response(new Uint8Array(content), {
60731
60691
  headers: {
60732
- "Content-Disposition": createAttachmentDisposition(path13.basename(previewPath)),
60692
+ "Content-Disposition": createAttachmentDisposition("index.html"),
60733
60693
  "Content-Type": "text/html; charset=utf-8"
60734
60694
  },
60735
60695
  status: 200
@@ -60742,8 +60702,8 @@ async function downloadWorkspaceZip(workspaceStore, projectId) {
60742
60702
  let tempDirectory;
60743
60703
  try {
60744
60704
  const project = await workspaceStore.getProject(projectId);
60745
- tempDirectory = await mkdtemp(path13.join(os6.tmpdir(), "owndesign-project-download-"));
60746
- const zipPath = path13.join(tempDirectory, "workspace.zip");
60705
+ tempDirectory = await mkdtemp(path14.join(os6.tmpdir(), "owndesign-project-download-"));
60706
+ const zipPath = path14.join(tempDirectory, "workspace.zip");
60747
60707
  await writeWorkspaceZip(workspaceStore, projectId, zipPath);
60748
60708
  const [zipStats, zipBuffer] = await Promise.all([stat4(zipPath), readFile5(zipPath)]);
60749
60709
  await rm2(tempDirectory, { force: true, recursive: true });
@@ -60766,16 +60726,16 @@ async function downloadWorkspaceZip(workspaceStore, projectId) {
60766
60726
  return mapWorkspaceErrorToResponse(error51);
60767
60727
  }
60768
60728
  }
60769
- async function downloadCurrentScreenshot(workspaceStore, projectId, previewPath, device, route) {
60770
- if (!previewPath?.trim() || !previewPath.toLowerCase().endsWith(".html") || !device) {
60729
+ async function downloadCurrentScreenshot(workspaceStore, projectId, device, route) {
60730
+ if (!device) {
60771
60731
  return new Response("Invalid download request.", { status: 400 });
60772
60732
  }
60773
60733
  const clientId = `screenshot-${randomUUID3()}`;
60774
60734
  const previewManager = getPreviewServerManager(workspaceStore);
60775
60735
  try {
60776
- await workspaceStore.readProjectWorkspaceFileBuffer(projectId, previewPath);
60777
- const session = await previewManager.ensure(projectId, clientId, previewPath);
60778
- if (!session.activePath || session.activePath !== previewPath) {
60736
+ await workspaceStore.readProjectWorkspaceFileBuffer(projectId, "index.html");
60737
+ const session = await previewManager.ensure(projectId, clientId);
60738
+ if (!session.previewFileExists || !session.url) {
60779
60739
  return new Response("Project file not found.", { status: 404 });
60780
60740
  }
60781
60741
  const content = await captureProjectScreenshot({
@@ -60785,7 +60745,7 @@ async function downloadCurrentScreenshot(workspaceStore, projectId, previewPath,
60785
60745
  return new Response(new Uint8Array(content), {
60786
60746
  headers: {
60787
60747
  "Content-Disposition": createAttachmentDisposition(
60788
- createScreenshotDownloadFilename(previewPath, route)
60748
+ createScreenshotDownloadFilename(route)
60789
60749
  ),
60790
60750
  "Content-Type": "image/png"
60791
60751
  },
@@ -60859,9 +60819,8 @@ function buildScreenshotUrl(url2, route) {
60859
60819
  screenshotUrl.hash = route;
60860
60820
  return screenshotUrl.toString();
60861
60821
  }
60862
- function createScreenshotDownloadFilename(previewPath, route) {
60863
- const extension = path13.extname(previewPath);
60864
- const basename = path13.basename(previewPath, extension) || "screenshot";
60822
+ function createScreenshotDownloadFilename(route) {
60823
+ const basename = "index";
60865
60824
  if (!route) {
60866
60825
  return `${basename}.png`;
60867
60826
  }
@@ -60872,7 +60831,7 @@ function sanitizeDownloadFilename(value) {
60872
60831
  return value?.replace(/[<>:"/\\|?*\u0000-\u001F]/g, "-").replace(/[.\s]+$/g, "").trim();
60873
60832
  }
60874
60833
  function createAsciiFilenameFallback(filename) {
60875
- const extension = path13.extname(filename);
60834
+ const extension = path14.extname(filename);
60876
60835
  const basename = extension ? filename.slice(0, -extension.length) : filename;
60877
60836
  const safeBasename = basename.normalize("NFKD").replace(/[^\x20-\x7E]/g, "-").replace(/["\\]/g, "").replace(/\s+/g, "-").replace(/-+/g, "-").replace(/^[.-]+|[.-]+$/g, "");
60878
60837
  const safeExtension = extension.replace(/[^\x20-\x7E]/g, "");
@@ -60911,7 +60870,7 @@ async function readJson(request) {
60911
60870
  }
60912
60871
  }
60913
60872
  function createCurrentUserMessage(value) {
60914
- if (!isRecord3(value)) {
60873
+ if (!isRecord2(value)) {
60915
60874
  return void 0;
60916
60875
  }
60917
60876
  const id = asNonEmptyString(value.id);
@@ -60928,21 +60887,23 @@ function createCurrentUserMessage(value) {
60928
60887
  };
60929
60888
  }
60930
60889
  function isFileUIPart2(value) {
60931
- return isRecord3(value) && value.type === "file";
60890
+ return isRecord2(value) && value.type === "file";
60932
60891
  }
60933
- function isRecord3(value) {
60892
+ function isRecord2(value) {
60934
60893
  return typeof value === "object" && value !== null;
60935
60894
  }
60936
- async function resolveExistingPreviewPath(workspaceStore, projectId, previewPath) {
60937
- if (!previewPath) {
60938
- return void 0;
60939
- }
60940
- const htmlFiles = await workspaceStore.listProjectHtmlFiles(projectId);
60941
- return htmlFiles.includes(previewPath) ? previewPath : void 0;
60942
- }
60943
60895
  function asNonEmptyString(value) {
60944
60896
  return typeof value === "string" && value.trim() ? value.trim() : void 0;
60945
60897
  }
60898
+ function asDesignDocument(value) {
60899
+ if (typeof value === "string") {
60900
+ return value;
60901
+ }
60902
+ return value === null ? null : void 0;
60903
+ }
60904
+ function hasPreviewPath(value) {
60905
+ return isRecord2(value) && Object.hasOwn(value, "previewPath");
60906
+ }
60946
60907
  function parseProjectType(value) {
60947
60908
  if (value === void 0 || value === null || value === "") {
60948
60909
  return "single_html";
@@ -60956,7 +60917,7 @@ function parseCheckpointRestoreMode(value) {
60956
60917
  return value === "files" || value === "conversation" || value === "both" ? value : void 0;
60957
60918
  }
60958
60919
  function parseProviderOptionsSelection(value) {
60959
- if (!isRecord3(value)) {
60920
+ if (!isRecord2(value)) {
60960
60921
  return void 0;
60961
60922
  }
60962
60923
  const deepseek2 = parseDeepSeekThinkingMode(value.deepseek);
@@ -61005,7 +60966,7 @@ var DEFAULT_HOST = "127.0.0.1";
61005
60966
  var DEFAULT_PORT = 3711;
61006
60967
  var host = process.env.OWNDESIGN_SERVER_HOST ?? DEFAULT_HOST;
61007
60968
  var port = parsePort(process.env.OWNDESIGN_SERVER_PORT ?? String(DEFAULT_PORT));
61008
- var staticRoot = process.env.OWNDESIGN_WEB_ROOT ?? path14.resolve(process.cwd(), "web");
60969
+ var staticRoot = process.env.OWNDESIGN_WEB_ROOT ?? path15.resolve(process.cwd(), "web");
61009
60970
  var app = createOwnDesignApp({
61010
60971
  staticRoot
61011
60972
  });