prime-dev-cli 1.0.3 → 1.0.5

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 (164) hide show
  1. package/config/projects.json +33 -17
  2. package/dist/server/.next/BUILD_ID +1 -1
  3. package/dist/server/.next/app-build-manifest.json +81 -53
  4. package/dist/server/.next/app-path-routes-manifest.json +14 -10
  5. package/dist/server/.next/build-manifest.json +3 -3
  6. package/dist/server/.next/cache/.rscinfo +1 -1
  7. package/dist/server/.next/cache/.tsbuildinfo +1 -1
  8. package/dist/server/.next/cache/eslint/.cache_1qa5vxt +1 -1
  9. package/dist/server/.next/cache/webpack/client-production/0.pack +0 -0
  10. package/dist/server/.next/cache/webpack/client-production/1.pack +0 -0
  11. package/dist/server/.next/cache/webpack/client-production/11.pack +0 -0
  12. package/dist/server/.next/cache/webpack/client-production/13.pack +0 -0
  13. package/dist/server/.next/cache/webpack/client-production/14.pack +0 -0
  14. package/dist/server/.next/cache/webpack/client-production/15.pack +0 -0
  15. package/dist/server/.next/cache/webpack/client-production/16.pack +0 -0
  16. package/dist/server/.next/cache/webpack/client-production/17.pack +0 -0
  17. package/dist/server/.next/cache/webpack/client-production/18.pack +0 -0
  18. package/dist/server/.next/cache/webpack/client-production/2.pack +0 -0
  19. package/dist/server/.next/cache/webpack/client-production/3.pack +0 -0
  20. package/dist/server/.next/cache/webpack/client-production/4.pack +0 -0
  21. package/dist/server/.next/cache/webpack/client-production/5.pack +0 -0
  22. package/dist/server/.next/cache/webpack/client-production/6.pack +0 -0
  23. package/dist/server/.next/cache/webpack/client-production/7.pack +0 -0
  24. package/dist/server/.next/cache/webpack/client-production/8.pack +0 -0
  25. package/dist/server/.next/cache/webpack/client-production/index.pack +0 -0
  26. package/dist/server/.next/cache/webpack/client-production/index.pack.old +0 -0
  27. package/dist/server/.next/cache/webpack/edge-server-production/index.pack +0 -0
  28. package/dist/server/.next/cache/webpack/server-production/0.pack +0 -0
  29. package/dist/server/.next/cache/webpack/server-production/1.pack +0 -0
  30. package/dist/server/.next/cache/webpack/server-production/2.pack +0 -0
  31. package/dist/server/.next/cache/webpack/server-production/3.pack +0 -0
  32. package/dist/server/.next/cache/webpack/server-production/4.pack +0 -0
  33. package/dist/server/.next/cache/webpack/server-production/6.pack +0 -0
  34. package/dist/server/.next/cache/webpack/server-production/7.pack +0 -0
  35. package/dist/server/.next/cache/webpack/server-production/8.pack +0 -0
  36. package/dist/server/.next/cache/webpack/server-production/9.pack +0 -0
  37. package/dist/server/.next/cache/webpack/server-production/index.pack +0 -0
  38. package/dist/server/.next/cache/webpack/server-production/index.pack.old +0 -0
  39. package/dist/server/.next/next-minimal-server.js.nft.json +1 -1
  40. package/dist/server/.next/next-server.js.nft.json +1 -1
  41. package/dist/server/.next/prerender-manifest.json +9 -9
  42. package/dist/server/.next/required-server-files.json +3 -3
  43. package/dist/server/.next/server/app/_not-found/page.js +1 -1
  44. package/dist/server/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  45. package/dist/server/.next/server/app/_not-found.html +1 -1
  46. package/dist/server/.next/server/app/_not-found.rsc +2 -2
  47. package/dist/server/.next/server/app/api/all-projects-envs/route.js +1 -1
  48. package/dist/server/.next/server/app/api/all-projects-envs/route_client-reference-manifest.js +1 -1
  49. package/dist/server/.next/server/app/api/check-mock-intercept/route.js +1 -1
  50. package/dist/server/.next/server/app/api/check-mock-intercept/route_client-reference-manifest.js +1 -1
  51. package/dist/server/.next/server/app/api/check-workspace/route.js +2 -2
  52. package/dist/server/.next/server/app/api/check-workspace/route_client-reference-manifest.js +1 -1
  53. package/dist/server/.next/server/app/api/cleanup-project/route.js +1 -1
  54. package/dist/server/.next/server/app/api/cleanup-project/route_client-reference-manifest.js +1 -1
  55. package/dist/server/.next/server/app/api/get-mock-data/route.js +1 -1
  56. package/dist/server/.next/server/app/api/get-mock-data/route_client-reference-manifest.js +1 -1
  57. package/dist/server/.next/server/app/api/initialize-workspace/route.js +6 -6
  58. package/dist/server/.next/server/app/api/initialize-workspace/route_client-reference-manifest.js +1 -1
  59. package/dist/server/.next/server/app/api/microapp-proxy-change-stream/route.js +3 -3
  60. package/dist/server/.next/server/app/api/microapp-proxy-change-stream/route_client-reference-manifest.js +1 -1
  61. package/dist/server/.next/server/app/api/microapp-proxy-config/route.js +2 -2
  62. package/dist/server/.next/server/app/api/microapp-proxy-config/route_client-reference-manifest.js +1 -1
  63. package/dist/server/.next/server/app/api/mock-file/route.js +2 -2
  64. package/dist/server/.next/server/app/api/mock-file/route_client-reference-manifest.js +1 -1
  65. package/dist/server/.next/server/app/api/mock-file-content/route.js +1 -1
  66. package/dist/server/.next/server/app/api/mock-file-content/route_client-reference-manifest.js +1 -1
  67. package/dist/server/.next/server/app/api/mock-open-status/route.js +3 -3
  68. package/dist/server/.next/server/app/api/mock-open-status/route_client-reference-manifest.js +1 -1
  69. package/dist/server/.next/server/app/api/mock-setting/route.js +1 -1
  70. package/dist/server/.next/server/app/api/mock-setting/route_client-reference-manifest.js +1 -1
  71. package/dist/server/.next/server/app/api/open-project/route.js +2 -2
  72. package/dist/server/.next/server/app/api/open-project/route_client-reference-manifest.js +1 -1
  73. package/dist/server/.next/server/app/api/process/logs/route.js +1 -0
  74. package/dist/server/.next/server/app/api/process/logs/route.js.nft.json +1 -0
  75. package/dist/server/.next/server/app/api/process/logs/route_client-reference-manifest.js +1 -0
  76. package/dist/server/.next/server/app/api/process/logs/stream/route.js +9 -0
  77. package/dist/server/.next/server/app/api/process/logs/stream/route.js.nft.json +1 -0
  78. package/dist/server/.next/server/app/api/process/logs/stream/route_client-reference-manifest.js +1 -0
  79. package/dist/server/.next/server/app/api/process/start/route.js +1 -0
  80. package/dist/server/.next/server/app/api/process/start/route.js.nft.json +1 -0
  81. package/dist/server/.next/server/app/api/process/start/route_client-reference-manifest.js +1 -0
  82. package/dist/server/.next/server/app/api/process/status/route.js +1 -0
  83. package/dist/server/.next/server/app/api/process/status/route.js.nft.json +1 -0
  84. package/dist/server/.next/server/app/api/process/status/route_client-reference-manifest.js +1 -0
  85. package/dist/server/.next/server/app/api/project-config/route.js +1 -1
  86. package/dist/server/.next/server/app/api/project-config/route_client-reference-manifest.js +1 -1
  87. package/dist/server/.next/server/app/api/retry-project/route.js +9 -9
  88. package/dist/server/.next/server/app/api/retry-project/route_client-reference-manifest.js +1 -1
  89. package/dist/server/.next/server/app/configuration/page.js +7 -7
  90. package/dist/server/.next/server/app/configuration/page_client-reference-manifest.js +1 -1
  91. package/dist/server/.next/server/app/configuration.html +1 -1
  92. package/dist/server/.next/server/app/configuration.rsc +3 -3
  93. package/dist/server/.next/server/app/favicon.ico/route.js +1 -1
  94. package/dist/server/.next/server/app/index.html +1 -1
  95. package/dist/server/.next/server/app/index.rsc +2 -2
  96. package/dist/server/.next/server/app/initialization/page.js +1 -1
  97. package/dist/server/.next/server/app/initialization/page_client-reference-manifest.js +1 -1
  98. package/dist/server/.next/server/app/initialization.html +1 -1
  99. package/dist/server/.next/server/app/initialization.rsc +3 -3
  100. package/dist/server/.next/server/app/page.js +1 -1
  101. package/dist/server/.next/server/app/page_client-reference-manifest.js +1 -1
  102. package/dist/server/.next/server/app-paths-manifest.json +14 -10
  103. package/dist/server/.next/server/chunks/967.js +3 -3
  104. package/dist/server/.next/server/middleware-build-manifest.js +1 -1
  105. package/dist/server/.next/server/next-font-manifest.js +1 -1
  106. package/dist/server/.next/server/next-font-manifest.json +1 -1
  107. package/dist/server/.next/server/pages/404.html +1 -1
  108. package/dist/server/.next/server/pages/500.html +1 -1
  109. package/dist/server/.next/server/pages-manifest.json +1 -1
  110. package/dist/server/.next/server/server-reference-manifest.json +1 -1
  111. package/dist/server/.next/static/0YG3L7wZtbtQp2XameODj/_buildManifest.js +1 -0
  112. package/dist/server/.next/static/0YG3L7wZtbtQp2XameODj/_ssgManifest.js +1 -0
  113. package/dist/server/.next/static/Mmn2KHpe4Btd9UFvAkzbC/_buildManifest.js +1 -0
  114. package/dist/server/.next/static/Mmn2KHpe4Btd9UFvAkzbC/_ssgManifest.js +1 -0
  115. package/dist/server/.next/static/MwYZh9prxBMJtf26zAtTY/_buildManifest.js +1 -0
  116. package/dist/server/.next/static/MwYZh9prxBMJtf26zAtTY/_ssgManifest.js +1 -0
  117. package/dist/server/.next/static/chunks/495-1a64c3075b5b8ac4.js +1 -0
  118. package/dist/server/.next/static/chunks/app/api/all-projects-envs/route-4a1691275c5ae416.js +1 -0
  119. package/dist/server/.next/static/chunks/app/api/check-mock-intercept/route-f2e048a9d229f7e7.js +1 -0
  120. package/dist/server/.next/static/chunks/app/api/check-workspace/route-3569564cd2b09683.js +1 -0
  121. package/dist/server/.next/static/chunks/app/api/cleanup-project/route-a6c005b8a485a192.js +1 -0
  122. package/dist/server/.next/static/chunks/app/api/get-mock-data/route-0ff137f28b0bbfd4.js +1 -0
  123. package/dist/server/.next/static/chunks/app/api/initialize-workspace/route-7faec0a7a2e6383d.js +1 -0
  124. package/dist/server/.next/static/chunks/app/api/microapp-proxy-change-stream/route-81a2d573a6a5b3d9.js +1 -0
  125. package/dist/server/.next/static/chunks/app/api/microapp-proxy-config/route-05c8c2aae5088b98.js +1 -0
  126. package/dist/server/.next/static/chunks/app/api/mock-file/route-606d825407e0fd4c.js +1 -0
  127. package/dist/server/.next/static/chunks/app/api/mock-file-content/route-4bc78ec0cbed800a.js +1 -0
  128. package/dist/server/.next/static/chunks/app/api/mock-open-status/route-a9410ab77572cb9e.js +1 -0
  129. package/dist/server/.next/static/chunks/app/api/mock-setting/route-48cfb30a284d746d.js +1 -0
  130. package/dist/server/.next/static/chunks/app/api/open-project/route-b6e6fca6c827640d.js +1 -0
  131. package/dist/server/.next/static/chunks/app/api/process/logs/route-3d9ee52d7c8aacef.js +1 -0
  132. package/dist/server/.next/static/chunks/app/api/process/logs/stream/route-e9633e0e72dfb31b.js +1 -0
  133. package/dist/server/.next/static/chunks/app/api/process/start/route-54c553f9e551d14b.js +1 -0
  134. package/dist/server/.next/static/chunks/app/api/process/status/route-06151b6ca21ffd52.js +1 -0
  135. package/dist/server/.next/static/chunks/app/api/project-config/route-ebe1c2ee41dedc74.js +1 -0
  136. package/dist/server/.next/static/chunks/app/api/retry-project/route-c25d253b5eacedef.js +1 -0
  137. package/dist/server/.next/static/chunks/app/configuration/page-978351fa7fe07983.js +1 -0
  138. package/dist/server/.next/static/chunks/app/page-9e7caf746eefeed4.js +1 -0
  139. package/dist/server/.next/static/css/1c3633790ce12b77.css +3 -0
  140. package/dist/server/.next/trace +3 -12
  141. package/dist/server/.next/types/app/api/all-projects-envs/route.ts +1 -1
  142. package/dist/server/.next/types/app/api/check-mock-intercept/route.ts +1 -1
  143. package/dist/server/.next/types/app/api/check-workspace/route.ts +1 -1
  144. package/dist/server/.next/types/app/api/cleanup-project/route.ts +1 -1
  145. package/dist/server/.next/types/app/api/get-mock-data/route.ts +1 -1
  146. package/dist/server/.next/types/app/api/initialize-workspace/route.ts +1 -1
  147. package/dist/server/.next/types/app/api/microapp-proxy-change-stream/route.ts +1 -1
  148. package/dist/server/.next/types/app/api/microapp-proxy-config/route.ts +1 -1
  149. package/dist/server/.next/types/app/api/mock-file/route.ts +1 -1
  150. package/dist/server/.next/types/app/api/mock-file-content/route.ts +1 -1
  151. package/dist/server/.next/types/app/api/mock-open-status/route.ts +1 -1
  152. package/dist/server/.next/types/app/api/mock-setting/route.ts +1 -1
  153. package/dist/server/.next/types/app/api/open-project/route.ts +1 -1
  154. package/dist/server/.next/types/app/api/process/logs/route.ts +347 -0
  155. package/dist/server/.next/types/app/api/process/logs/stream/route.ts +347 -0
  156. package/dist/server/.next/types/app/api/process/start/route.ts +347 -0
  157. package/dist/server/.next/types/app/api/process/status/route.ts +347 -0
  158. package/dist/server/.next/types/app/api/project-config/route.ts +1 -1
  159. package/dist/server/.next/types/app/api/retry-project/route.ts +1 -1
  160. package/dist/server/.next/types/app/configuration/page.ts +1 -1
  161. package/dist/server/.next/types/app/initialization/page.ts +1 -1
  162. package/dist/server/.next/types/app/layout.ts +1 -1
  163. package/dist/server/.next/types/app/page.ts +1 -1
  164. package/package.json +1 -1
@@ -1,6 +1,6 @@
1
- (()=>{var e={};e.id=979,e.ids=[979],e.modules={483:()=>{},846:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},1820:e=>{"use strict";e.exports=require("os")},2601:(e,s,t)=>{"use strict";t.d(s,{ZR:()=>a,sF:()=>i});var r=t(9748),o=t(4946);async function a(){try{await (0,r.access)(o.lq,r.constants.F_OK)}catch{return await i({}),{}}try{let e=await (0,r.readFile)(o.lq,"utf-8");if(!e)return{};return JSON.parse(e)}catch(e){throw console.error("读取或解析项目配置文件失败:",e),Error("无法加载项目配置")}}async function i(e){let s=o.lq+".tmp";try{await (0,r.writeFile)(s,JSON.stringify(e,null,2),"utf-8"),await (0,r.rename)(s,o.lq)}catch(e){throw console.error("保存项目配置文件失败:",e),Error("无法保存项目配置")}}},3033:e=>{"use strict";e.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},3295:e=>{"use strict";e.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},3873:e=>{"use strict";e.exports=require("path")},4870:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},4907:()=>{},4946:(e,s,t)=>{"use strict";t.d(s,{Ks:()=>n,lq:()=>i,tu:()=>a});var r=t(1820),o=t(3873);let a={WORKSPACE_ROOT:(0,o.join)((0,r.homedir)(),"Documents","prime-workspace"),GIT_TIMEOUT:3e5,MAX_CONCURRENT_CLONES:Math.max(2,Math.min((0,r.cpus)().length,8)),MAX_RETRY_ATTEMPTS:3},i=(0,o.join)((0,r.homedir)(),".prime-projects.json");var n=function(e){return e.PENDING="pending",e.EXISTING="existing",e.CLONING="cloning",e.SUCCESS="success",e.FAILED="failed",e.RETRYING="retrying",e.INCOMPLETE="incomplete",e}({})},8844:(e,s,t)=>{"use strict";t.r(s),t.d(s,{patchFetch:()=>k,routeModule:()=>w,serverHooks:()=>g,workAsyncStorage:()=>h,workUnitAsyncStorage:()=>f});var r={};t.r(r),t.d(r,{DELETE:()=>j,GET:()=>d,POST:()=>l});var o=t(9227),a=t(9044),i=t(1131),n=t(7642),c=t(9021),u=t(3873),p=t(2601),m=t(4946);async function l(e){try{let{projectName:s,apiName:t,method:r,siteName:o,content:a}=await e.json();if(!s||!t||!r||!o||void 0===a)return n.NextResponse.json({success:!1,error:"缺少必要参数:projectName, apiName, method, siteName, content"},{status:400});if(!(await (0,p.ZR)())[s])return n.NextResponse.json({success:!1,error:`项目 ${s} 不存在`},{status:404});let i=(0,u.join)(m.tu.WORKSPACE_ROOT,s),l=(0,u.join)(i,".mock"),d=(0,u.join)(l,t),j=(0,u.join)(d,r.toLowerCase()),w=(0,u.join)(j,`${o}.js`);try{await c.promises.access(i)}catch{return n.NextResponse.json({success:!1,error:`项目目录 ${s} 不存在`},{status:404})}try{await c.promises.access(l)}catch{await c.promises.mkdir(l,{recursive:!0})}try{await c.promises.access(d)}catch{await c.promises.mkdir(d,{recursive:!0})}try{await c.promises.access(j)}catch{await c.promises.mkdir(j,{recursive:!0})}let h=(0,u.join)(j,"setting.js"),f=!1;try{await c.promises.access(h),console.log(`setting.js文件已存在: ${h}`)}catch{let e=`module.exports = {
1
+ (()=>{var e={};e.id=979,e.ids=[979],e.modules={417:(e,s,t)=>{"use strict";t.r(s),t.d(s,{patchFetch:()=>x,routeModule:()=>w,serverHooks:()=>g,workAsyncStorage:()=>h,workUnitAsyncStorage:()=>f});var r={};t.r(r),t.d(r,{DELETE:()=>j,GET:()=>d,POST:()=>l});var o=t(9227),a=t(9044),i=t(1131),n=t(7642),c=t(9021),u=t(3873),p=t(2601),m=t(4946);async function l(e){try{let{projectName:s,apiName:t,method:r,siteName:o,content:a}=await e.json();if(!s||!t||!r||!o||void 0===a)return n.NextResponse.json({success:!1,error:"缺少必要参数:projectName, apiName, method, siteName, content"},{status:400});if(!(await (0,p.ZR)())[s])return n.NextResponse.json({success:!1,error:`项目 ${s} 不存在`},{status:404});let i=(0,u.join)(m.tu.WORKSPACE_ROOT,s),l=(0,u.join)(i,".mock"),d=(0,u.join)(l,t),j=(0,u.join)(d,r.toLowerCase()),w=(0,u.join)(j,`${o}.js`);try{await c.promises.access(i)}catch{return n.NextResponse.json({success:!1,error:`项目目录 ${s} 不存在`},{status:404})}try{await c.promises.access(l)}catch{await c.promises.mkdir(l,{recursive:!0})}try{await c.promises.access(d)}catch{await c.promises.mkdir(d,{recursive:!0})}try{await c.promises.access(j)}catch{await c.promises.mkdir(j,{recursive:!0})}let h=(0,u.join)(j,"setting.js"),f=!1;try{await c.promises.access(h),console.log(`setting.js文件已存在: ${h}`)}catch{let e=`module.exports = {
2
2
  // 当前场景名称
3
3
  currentSite: '${o}',
4
4
  // 开启Mock的场景列表
5
5
  open: ['${o}']
6
- };`;await c.promises.writeFile(h,e,"utf-8"),f=!0,console.log(`setting.js文件创建成功: ${h}`)}return await c.promises.writeFile(w,a,"utf-8"),n.NextResponse.json({success:!0,message:"Mock文件创建成功",data:{projectName:s,apiName:t,method:r.toLowerCase(),siteName:o,filePath:(0,u.join)(".mock",t,r.toLowerCase(),`${o}.js`),settingCreated:f,createdAt:new Date().toISOString()}})}catch(s){let e=s instanceof Error?s.message:"创建Mock文件失败";return console.error("创建Mock文件失败:",s),n.NextResponse.json({success:!1,error:e},{status:500})}}async function d(e){try{let{searchParams:s}=new URL(e.url),t=s.get("project");if(!t)return n.NextResponse.json({success:!1,error:"项目名称参数缺失"},{status:400});if(!(await (0,p.ZR)())[t])return n.NextResponse.json({success:!1,error:`项目 ${t} 不存在`},{status:404});let r=(0,u.join)(m.tu.WORKSPACE_ROOT,t),o=(0,u.join)(r,".mock");try{await c.promises.access(o)}catch{return n.NextResponse.json({success:!0,data:{projectName:t,mockFiles:[]},message:"Mock目录不存在,返回空列表"})}let a=[];for(let e of(await c.promises.readdir(o,{withFileTypes:!0})))if(e.isDirectory()){let s=(0,u.join)(o,e.name),t=await c.promises.readdir(s,{withFileTypes:!0}),r=[];for(let o of t)if(o.isDirectory()){let t,a=(0,u.join)(s,o.name),i=await c.promises.readdir(a,{withFileTypes:!0}),n=(0,u.join)(a,"setting.js");try{await c.promises.access(n);let e=(await c.promises.readFile(n,"utf-8")).match(/module\.exports\s*=\s*({[\s\S]*?});?\s*$/);if(e)try{t=Function("return "+e[1])()}catch(e){console.warn(`解析setting.js失败: ${n}`,e)}}catch(e){console.warn(`读取setting.js失败: ${n}`,e)}let p=i.filter(e=>e.isFile()&&e.name.endsWith(".js")&&"setting.js"!==e.name).map(s=>({siteName:s.name.replace(".js",""),fileName:s.name,filePath:(0,u.join)(".mock",e.name,o.name,s.name)}));p.length>0&&r.push({method:o.name,setting:t,files:p})}r.length>0&&a.push({apiName:e.name,methods:r})}return n.NextResponse.json({success:!0,data:{projectName:t,mockFiles:a},message:"获取Mock文件列表成功"})}catch(s){let e=s instanceof Error?s.message:"获取Mock文件列表失败";return console.error("获取Mock文件列表失败:",s),n.NextResponse.json({success:!1,error:e},{status:500})}}async function j(e){try{let{searchParams:s}=new URL(e.url),t=s.get("project"),r=s.get("apiName"),o=s.get("method"),a=s.get("siteName");if(!t||!r||!o||!a)return n.NextResponse.json({success:!1,error:"缺少必要参数:project, apiName, method, siteName"},{status:400});if(!(await (0,p.ZR)())[t])return n.NextResponse.json({success:!1,error:`项目 ${t} 不存在`},{status:404});let i=(0,u.join)(m.tu.WORKSPACE_ROOT,t),l=(0,u.join)(i,".mock",r,o.toLowerCase(),`${a}.js`);try{await c.promises.access(l)}catch{return n.NextResponse.json({success:!1,error:"Mock文件不存在"},{status:404})}await c.promises.unlink(l);let d=(0,u.join)(i,".mock",r,o.toLowerCase());try{let e=await c.promises.readdir(d);if(0===e.length){await c.promises.rmdir(d);let e=(0,u.join)(i,".mock",r);try{let s=await c.promises.readdir(e);0===s.length&&await c.promises.rmdir(e)}catch{}}}catch{}return n.NextResponse.json({success:!0,message:"Mock文件删除成功",data:{projectName:t,apiName:r,method:o.toLowerCase(),siteName:a,deletedFile:(0,u.join)(".mock",r,o.toLowerCase(),`${a}.js`)}})}catch(s){let e=s instanceof Error?s.message:"删除Mock文件失败";return console.error("删除Mock文件失败:",s),n.NextResponse.json({success:!1,error:e},{status:500})}}let w=new o.AppRouteRouteModule({definition:{kind:a.RouteKind.APP_ROUTE,page:"/api/mock-file/route",pathname:"/api/mock-file",filename:"route",bundlePath:"app/api/mock-file/route"},resolvedPagePath:"/Users/edy/Documents/prime-workspace/prime-dev-cli/packages/server/src/app/api/mock-file/route.ts",nextConfigOutput:"",userland:r}),{workAsyncStorage:h,workUnitAsyncStorage:f,serverHooks:g}=w;function k(){return(0,i.patchFetch)({workAsyncStorage:h,workUnitAsyncStorage:f})}},9021:e=>{"use strict";e.exports=require("fs")},9294:e=>{"use strict";e.exports=require("next/dist/server/app-render/work-async-storage.external.js")},9748:e=>{"use strict";e.exports=require("fs/promises")}};var s=require("../../../webpack-runtime.js");s.C(e);var t=e=>s(s.s=e),r=s.X(0,[131,426],()=>t(8844));module.exports=r})();
6
+ };`;await c.promises.writeFile(h,e,"utf-8"),f=!0,console.log(`setting.js文件创建成功: ${h}`)}return await c.promises.writeFile(w,a,"utf-8"),n.NextResponse.json({success:!0,message:"Mock文件创建成功",data:{projectName:s,apiName:t,method:r.toLowerCase(),siteName:o,filePath:(0,u.join)(".mock",t,r.toLowerCase(),`${o}.js`),settingCreated:f,createdAt:new Date().toISOString()}})}catch(s){let e=s instanceof Error?s.message:"创建Mock文件失败";return console.error("创建Mock文件失败:",s),n.NextResponse.json({success:!1,error:e},{status:500})}}async function d(e){try{let{searchParams:s}=new URL(e.url),t=s.get("project");if(!t)return n.NextResponse.json({success:!1,error:"项目名称参数缺失"},{status:400});if(!(await (0,p.ZR)())[t])return n.NextResponse.json({success:!1,error:`项目 ${t} 不存在`},{status:404});let r=(0,u.join)(m.tu.WORKSPACE_ROOT,t),o=(0,u.join)(r,".mock");try{await c.promises.access(o)}catch{return n.NextResponse.json({success:!0,data:{projectName:t,mockFiles:[]},message:"Mock目录不存在,返回空列表"})}let a=[];for(let e of(await c.promises.readdir(o,{withFileTypes:!0})))if(e.isDirectory()){let s=(0,u.join)(o,e.name),t=await c.promises.readdir(s,{withFileTypes:!0}),r=[];for(let o of t)if(o.isDirectory()){let t,a=(0,u.join)(s,o.name),i=await c.promises.readdir(a,{withFileTypes:!0}),n=(0,u.join)(a,"setting.js");try{await c.promises.access(n);let e=(await c.promises.readFile(n,"utf-8")).match(/module\.exports\s*=\s*({[\s\S]*?});?\s*$/);if(e)try{t=Function("return "+e[1])()}catch(e){console.warn(`解析setting.js失败: ${n}`,e)}}catch(e){console.warn(`读取setting.js失败: ${n}`,e)}let p=i.filter(e=>e.isFile()&&e.name.endsWith(".js")&&"setting.js"!==e.name).map(s=>({siteName:s.name.replace(".js",""),fileName:s.name,filePath:(0,u.join)(".mock",e.name,o.name,s.name)}));p.length>0&&r.push({method:o.name,setting:t,files:p})}r.length>0&&a.push({apiName:e.name,methods:r})}return n.NextResponse.json({success:!0,data:{projectName:t,mockFiles:a},message:"获取Mock文件列表成功"})}catch(s){let e=s instanceof Error?s.message:"获取Mock文件列表失败";return console.error("获取Mock文件列表失败:",s),n.NextResponse.json({success:!1,error:e},{status:500})}}async function j(e){try{let{searchParams:s}=new URL(e.url),t=s.get("project"),r=s.get("apiName"),o=s.get("method"),a=s.get("siteName");if(!t||!r||!o||!a)return n.NextResponse.json({success:!1,error:"缺少必要参数:project, apiName, method, siteName"},{status:400});if(!(await (0,p.ZR)())[t])return n.NextResponse.json({success:!1,error:`项目 ${t} 不存在`},{status:404});let i=(0,u.join)(m.tu.WORKSPACE_ROOT,t),l=(0,u.join)(i,".mock",r,o.toLowerCase(),`${a}.js`);try{await c.promises.access(l)}catch{return n.NextResponse.json({success:!1,error:"Mock文件不存在"},{status:404})}await c.promises.unlink(l);let d=(0,u.join)(i,".mock",r,o.toLowerCase());try{let e=await c.promises.readdir(d);if(0===e.length){await c.promises.rmdir(d);let e=(0,u.join)(i,".mock",r);try{let s=await c.promises.readdir(e);0===s.length&&await c.promises.rmdir(e)}catch{}}}catch{}return n.NextResponse.json({success:!0,message:"Mock文件删除成功",data:{projectName:t,apiName:r,method:o.toLowerCase(),siteName:a,deletedFile:(0,u.join)(".mock",r,o.toLowerCase(),`${a}.js`)}})}catch(s){let e=s instanceof Error?s.message:"删除Mock文件失败";return console.error("删除Mock文件失败:",s),n.NextResponse.json({success:!1,error:e},{status:500})}}let w=new o.AppRouteRouteModule({definition:{kind:a.RouteKind.APP_ROUTE,page:"/api/mock-file/route",pathname:"/api/mock-file",filename:"route",bundlePath:"app/api/mock-file/route"},resolvedPagePath:"/Users/edy/Documents/Coding/prime-dev-cli/packages/server/src/app/api/mock-file/route.ts",nextConfigOutput:"",userland:r}),{workAsyncStorage:h,workUnitAsyncStorage:f,serverHooks:g}=w;function x(){return(0,i.patchFetch)({workAsyncStorage:h,workUnitAsyncStorage:f})}},483:()=>{},846:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},1820:e=>{"use strict";e.exports=require("os")},2601:(e,s,t)=>{"use strict";t.d(s,{ZR:()=>a,sF:()=>i});var r=t(9748),o=t(4946);async function a(){try{await (0,r.access)(o.lq,r.constants.F_OK)}catch{return await i({}),{}}try{let e=await (0,r.readFile)(o.lq,"utf-8");if(!e)return{};return JSON.parse(e)}catch(e){throw console.error("读取或解析项目配置文件失败:",e),Error("无法加载项目配置")}}async function i(e){let s=o.lq+".tmp";try{await (0,r.writeFile)(s,JSON.stringify(e,null,2),"utf-8"),await (0,r.rename)(s,o.lq)}catch(e){throw console.error("保存项目配置文件失败:",e),Error("无法保存项目配置")}}},3033:e=>{"use strict";e.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},3295:e=>{"use strict";e.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},3873:e=>{"use strict";e.exports=require("path")},4870:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},4907:()=>{},4946:(e,s,t)=>{"use strict";t.d(s,{Ks:()=>n,lq:()=>i,tu:()=>a});var r=t(1820),o=t(3873);let a={WORKSPACE_ROOT:(0,o.join)((0,r.homedir)(),"Documents","prime-workspace"),GIT_TIMEOUT:3e5,MAX_CONCURRENT_CLONES:Math.max(2,Math.min((0,r.cpus)().length,8)),MAX_RETRY_ATTEMPTS:3},i=(0,o.join)((0,r.homedir)(),".prime-projects.json");var n=function(e){return e.PENDING="pending",e.EXISTING="existing",e.CLONING="cloning",e.SUCCESS="success",e.FAILED="failed",e.RETRYING="retrying",e.INCOMPLETE="incomplete",e}({})},9021:e=>{"use strict";e.exports=require("fs")},9294:e=>{"use strict";e.exports=require("next/dist/server/app-render/work-async-storage.external.js")},9748:e=>{"use strict";e.exports=require("fs/promises")}};var s=require("../../../webpack-runtime.js");s.C(e);var t=e=>s(s.s=e),r=s.X(0,[131,426],()=>t(417));module.exports=r})();
@@ -1 +1 @@
1
- globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/api/mock-file/route"]={"moduleLoading":{"prefix":"/_next/"},"ssrModuleMapping":{"317":{"*":{"id":"5207","name":"*","chunks":[],"async":false}},"1020":{"*":{"id":"9136","name":"*","chunks":[],"async":false}},"3053":{"*":{"id":"767","name":"*","chunks":[],"async":false}},"3561":{"*":{"id":"9855","name":"*","chunks":[],"async":false}},"3604":{"*":{"id":"6996","name":"*","chunks":[],"async":false}},"3636":{"*":{"id":"7774","name":"*","chunks":[],"async":false}},"6665":{"*":{"id":"1681","name":"*","chunks":[],"async":false}},"7472":{"*":{"id":"1249","name":"*","chunks":[],"async":false}},"9203":{"*":{"id":"8751","name":"*","chunks":[],"async":false}},"9510":{"*":{"id":"8843","name":"*","chunks":[],"async":false}}},"edgeSSRModuleMapping":{},"clientModules":{"/Users/edy/Documents/prime-workspace/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/client/components/client-page.js":{"id":3636,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/esm/client/components/client-page.js":{"id":3636,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/client/components/client-segment.js":{"id":1020,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/esm/client/components/client-segment.js":{"id":1020,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/client/components/error-boundary.js":{"id":3604,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/esm/client/components/error-boundary.js":{"id":3604,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/client/components/http-access-fallback/error-boundary.js":{"id":3053,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/esm/client/components/http-access-fallback/error-boundary.js":{"id":3053,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/client/components/layout-router.js":{"id":317,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/esm/client/components/layout-router.js":{"id":317,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/client/components/metadata/async-metadata.js":{"id":3561,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/esm/client/components/metadata/async-metadata.js":{"id":3561,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/client/components/metadata/metadata-boundary.js":{"id":9203,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/esm/client/components/metadata/metadata-boundary.js":{"id":9203,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/client/components/render-from-template-context.js":{"id":6665,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/esm/client/components/render-from-template-context.js":{"id":6665,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/font/google/target.css?{\"path\":\"src/app/layout.tsx\",\"import\":\"Geist\",\"arguments\":[{\"variable\":\"--font-geist-sans\",\"subsets\":[\"latin\"]}],\"variableName\":\"geistSans\"}":{"id":6521,"name":"*","chunks":["177","static/chunks/app/layout-2c381be4c1bb73ed.js"],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/font/google/target.css?{\"path\":\"src/app/layout.tsx\",\"import\":\"Geist_Mono\",\"arguments\":[{\"variable\":\"--font-geist-mono\",\"subsets\":[\"latin\"]}],\"variableName\":\"geistMono\"}":{"id":8947,"name":"*","chunks":["177","static/chunks/app/layout-2c381be4c1bb73ed.js"],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/packages/server/src/app/globals.css":{"id":141,"name":"*","chunks":["177","static/chunks/app/layout-2c381be4c1bb73ed.js"],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/packages/server/src/app/configuration/page.tsx":{"id":9510,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/packages/server/src/components/project-initializer.tsx":{"id":7472,"name":"*","chunks":[],"async":false}},"entryCSSFiles":{"/Users/edy/Documents/prime-workspace/prime-dev-cli/packages/server/src/":[],"/Users/edy/Documents/prime-workspace/prime-dev-cli/packages/server/src/app/layout":[{"inlined":false,"path":"static/css/b10a602544a179de.css"}],"/Users/edy/Documents/prime-workspace/prime-dev-cli/packages/server/src/app/page":[],"/Users/edy/Documents/prime-workspace/prime-dev-cli/packages/server/src/app/api/mock-file/route":[]},"rscModuleMapping":{"141":{"*":{"id":"3019","name":"*","chunks":[],"async":false}},"317":{"*":{"id":"7429","name":"*","chunks":[],"async":false}},"1020":{"*":{"id":"9670","name":"*","chunks":[],"async":false}},"3053":{"*":{"id":"5473","name":"*","chunks":[],"async":false}},"3561":{"*":{"id":"8653","name":"*","chunks":[],"async":false}},"3604":{"*":{"id":"1382","name":"*","chunks":[],"async":false}},"3636":{"*":{"id":"4928","name":"*","chunks":[],"async":false}},"6665":{"*":{"id":"9687","name":"*","chunks":[],"async":false}},"7472":{"*":{"id":"9624","name":"*","chunks":[],"async":false}},"9203":{"*":{"id":"8757","name":"*","chunks":[],"async":false}},"9510":{"*":{"id":"4761","name":"*","chunks":[],"async":false}}},"edgeRscModuleMapping":{"317":{"*":{"id":"5207","name":"*","chunks":[],"async":false}},"1020":{"*":{"id":"9136","name":"*","chunks":[],"async":false}},"3053":{"*":{"id":"767","name":"*","chunks":[],"async":false}},"3561":{"*":{"id":"9855","name":"*","chunks":[],"async":false}},"3604":{"*":{"id":"6996","name":"*","chunks":[],"async":false}},"3636":{"*":{"id":"7774","name":"*","chunks":[],"async":false}},"6665":{"*":{"id":"1681","name":"*","chunks":[],"async":false}},"9203":{"*":{"id":"8751","name":"*","chunks":[],"async":false}}}}
1
+ globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/api/mock-file/route"]={"moduleLoading":{"prefix":"/_next/"},"ssrModuleMapping":{"317":{"*":{"id":"5207","name":"*","chunks":[],"async":false}},"1020":{"*":{"id":"9136","name":"*","chunks":[],"async":false}},"3053":{"*":{"id":"767","name":"*","chunks":[],"async":false}},"3561":{"*":{"id":"9855","name":"*","chunks":[],"async":false}},"3604":{"*":{"id":"6996","name":"*","chunks":[],"async":false}},"3636":{"*":{"id":"7774","name":"*","chunks":[],"async":false}},"6175":{"*":{"id":"8786","name":"*","chunks":[],"async":false}},"6665":{"*":{"id":"1681","name":"*","chunks":[],"async":false}},"7472":{"*":{"id":"1249","name":"*","chunks":[],"async":false}},"9203":{"*":{"id":"8751","name":"*","chunks":[],"async":false}}},"edgeSSRModuleMapping":{},"clientModules":{"/Users/edy/Documents/Coding/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/client/components/client-page.js":{"id":3636,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/Coding/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/esm/client/components/client-page.js":{"id":3636,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/Coding/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/client/components/client-segment.js":{"id":1020,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/Coding/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/esm/client/components/client-segment.js":{"id":1020,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/Coding/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/client/components/error-boundary.js":{"id":3604,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/Coding/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/esm/client/components/error-boundary.js":{"id":3604,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/Coding/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/client/components/http-access-fallback/error-boundary.js":{"id":3053,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/Coding/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/esm/client/components/http-access-fallback/error-boundary.js":{"id":3053,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/Coding/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/client/components/layout-router.js":{"id":317,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/Coding/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/esm/client/components/layout-router.js":{"id":317,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/Coding/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/client/components/metadata/async-metadata.js":{"id":3561,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/Coding/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/esm/client/components/metadata/async-metadata.js":{"id":3561,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/Coding/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/client/components/metadata/metadata-boundary.js":{"id":9203,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/Coding/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/esm/client/components/metadata/metadata-boundary.js":{"id":9203,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/Coding/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/client/components/render-from-template-context.js":{"id":6665,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/Coding/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/esm/client/components/render-from-template-context.js":{"id":6665,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/Coding/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/font/google/target.css?{\"path\":\"src/app/layout.tsx\",\"import\":\"Geist\",\"arguments\":[{\"variable\":\"--font-geist-sans\",\"subsets\":[\"latin\"]}],\"variableName\":\"geistSans\"}":{"id":6521,"name":"*","chunks":["177","static/chunks/app/layout-84c22b799284e008.js"],"async":false},"/Users/edy/Documents/Coding/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/font/google/target.css?{\"path\":\"src/app/layout.tsx\",\"import\":\"Geist_Mono\",\"arguments\":[{\"variable\":\"--font-geist-mono\",\"subsets\":[\"latin\"]}],\"variableName\":\"geistMono\"}":{"id":8947,"name":"*","chunks":["177","static/chunks/app/layout-84c22b799284e008.js"],"async":false},"/Users/edy/Documents/Coding/prime-dev-cli/packages/server/src/app/globals.css":{"id":141,"name":"*","chunks":["177","static/chunks/app/layout-84c22b799284e008.js"],"async":false},"/Users/edy/Documents/Coding/prime-dev-cli/packages/server/src/app/configuration/page.tsx":{"id":6175,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/Coding/prime-dev-cli/packages/server/src/components/project-initializer.tsx":{"id":7472,"name":"*","chunks":[],"async":false}},"entryCSSFiles":{"/Users/edy/Documents/Coding/prime-dev-cli/packages/server/src/":[],"/Users/edy/Documents/Coding/prime-dev-cli/packages/server/src/app/layout":[{"inlined":false,"path":"static/css/1c3633790ce12b77.css"}],"/Users/edy/Documents/Coding/prime-dev-cli/packages/server/src/app/page":[],"/Users/edy/Documents/Coding/prime-dev-cli/packages/server/src/app/api/mock-file/route":[]},"rscModuleMapping":{"141":{"*":{"id":"3019","name":"*","chunks":[],"async":false}},"317":{"*":{"id":"7429","name":"*","chunks":[],"async":false}},"1020":{"*":{"id":"9670","name":"*","chunks":[],"async":false}},"3053":{"*":{"id":"5473","name":"*","chunks":[],"async":false}},"3561":{"*":{"id":"8653","name":"*","chunks":[],"async":false}},"3604":{"*":{"id":"1382","name":"*","chunks":[],"async":false}},"3636":{"*":{"id":"4928","name":"*","chunks":[],"async":false}},"6175":{"*":{"id":"4761","name":"*","chunks":[],"async":false}},"6665":{"*":{"id":"9687","name":"*","chunks":[],"async":false}},"7472":{"*":{"id":"9624","name":"*","chunks":[],"async":false}},"9203":{"*":{"id":"8757","name":"*","chunks":[],"async":false}}},"edgeRscModuleMapping":{"317":{"*":{"id":"5207","name":"*","chunks":[],"async":false}},"1020":{"*":{"id":"9136","name":"*","chunks":[],"async":false}},"3053":{"*":{"id":"767","name":"*","chunks":[],"async":false}},"3561":{"*":{"id":"9855","name":"*","chunks":[],"async":false}},"3604":{"*":{"id":"6996","name":"*","chunks":[],"async":false}},"3636":{"*":{"id":"7774","name":"*","chunks":[],"async":false}},"6665":{"*":{"id":"1681","name":"*","chunks":[],"async":false}},"9203":{"*":{"id":"8751","name":"*","chunks":[],"async":false}}}}
@@ -1 +1 @@
1
- (()=>{var e={};e.id=403,e.ids=[403],e.modules={483:()=>{},846:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},1820:e=>{"use strict";e.exports=require("os")},2601:(e,t,r)=>{"use strict";r.d(t,{ZR:()=>a,sF:()=>n});var s=r(9748),o=r(4946);async function a(){try{await (0,s.access)(o.lq,s.constants.F_OK)}catch{return await n({}),{}}try{let e=await (0,s.readFile)(o.lq,"utf-8");if(!e)return{};return JSON.parse(e)}catch(e){throw console.error("读取或解析项目配置文件失败:",e),Error("无法加载项目配置")}}async function n(e){let t=o.lq+".tmp";try{await (0,s.writeFile)(t,JSON.stringify(e,null,2),"utf-8"),await (0,s.rename)(t,o.lq)}catch(e){throw console.error("保存项目配置文件失败:",e),Error("无法保存项目配置")}}},3033:e=>{"use strict";e.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},3295:e=>{"use strict";e.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},3873:e=>{"use strict";e.exports=require("path")},4870:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},4907:()=>{},4946:(e,t,r)=>{"use strict";r.d(t,{Ks:()=>i,lq:()=>n,tu:()=>a});var s=r(1820),o=r(3873);let a={WORKSPACE_ROOT:(0,o.join)((0,s.homedir)(),"Documents","prime-workspace"),GIT_TIMEOUT:3e5,MAX_CONCURRENT_CLONES:Math.max(2,Math.min((0,s.cpus)().length,8)),MAX_RETRY_ATTEMPTS:3},n=(0,o.join)((0,s.homedir)(),".prime-projects.json");var i=function(e){return e.PENDING="pending",e.EXISTING="existing",e.CLONING="cloning",e.SUCCESS="success",e.FAILED="failed",e.RETRYING="retrying",e.INCOMPLETE="incomplete",e}({})},4960:(e,t,r)=>{"use strict";r.r(t),r.d(t,{patchFetch:()=>R,routeModule:()=>j,serverHooks:()=>f,workAsyncStorage:()=>x,workUnitAsyncStorage:()=>w});var s={};r.r(s),r.d(s,{GET:()=>m,PUT:()=>d});var o=r(9227),a=r(9044),n=r(1131),i=r(7642),c=r(9021),u=r(3873),p=r(2601),l=r(4946);async function m(e){try{let{searchParams:t}=new URL(e.url),r=t.get("project"),s=t.get("apiName"),o=t.get("method"),a=t.get("siteName");if(!r||!s||!o||!a)return i.NextResponse.json({success:!1,error:"缺少必要参数:project, apiName, method, siteName"},{status:400});if(!(await (0,p.ZR)())[r])return i.NextResponse.json({success:!1,error:`项目 ${r} 不存在`},{status:404});let n=(0,u.join)(l.tu.WORKSPACE_ROOT,r),m=(0,u.join)(n,".mock",s,o.toLowerCase(),`${a}.js`);try{await c.promises.access(m)}catch{return i.NextResponse.json({success:!1,error:"Mock文件不存在"},{status:404})}let d=await c.promises.readFile(m,"utf-8");return i.NextResponse.json({success:!0,data:{projectName:r,apiName:s,method:o.toLowerCase(),siteName:a,content:d,filePath:(0,u.join)(".mock",s,o.toLowerCase(),`${a}.js`)},message:"获取Mock文件内容成功"})}catch(t){let e=t instanceof Error?t.message:"获取Mock文件内容失败";return console.error("获取Mock文件内容失败:",t),i.NextResponse.json({success:!1,error:e},{status:500})}}async function d(e){try{let{projectName:t,apiName:r,method:s,siteName:o,content:a}=await e.json();if(!t||!r||!s||!o||void 0===a)return i.NextResponse.json({success:!1,error:"缺少必要参数:projectName, apiName, method, siteName, content"},{status:400});if(!(await (0,p.ZR)())[t])return i.NextResponse.json({success:!1,error:`项目 ${t} 不存在`},{status:404});let n=(0,u.join)(l.tu.WORKSPACE_ROOT,t),m=(0,u.join)(n,".mock",r,s.toLowerCase(),`${o}.js`);try{await c.promises.access(m)}catch{return i.NextResponse.json({success:!1,error:"Mock文件不存在"},{status:404})}return await c.promises.writeFile(m,a,"utf-8"),i.NextResponse.json({success:!0,message:"Mock文件内容更新成功",data:{projectName:t,apiName:r,method:s.toLowerCase(),siteName:o,filePath:(0,u.join)(".mock",r,s.toLowerCase(),`${o}.js`),updatedAt:new Date().toISOString()}})}catch(t){let e=t instanceof Error?t.message:"更新Mock文件内容失败";return console.error("更新Mock文件内容失败:",t),i.NextResponse.json({success:!1,error:e},{status:500})}}let j=new o.AppRouteRouteModule({definition:{kind:a.RouteKind.APP_ROUTE,page:"/api/mock-file-content/route",pathname:"/api/mock-file-content",filename:"route",bundlePath:"app/api/mock-file-content/route"},resolvedPagePath:"/Users/edy/Documents/prime-workspace/prime-dev-cli/packages/server/src/app/api/mock-file-content/route.ts",nextConfigOutput:"",userland:s}),{workAsyncStorage:x,workUnitAsyncStorage:w,serverHooks:f}=j;function R(){return(0,n.patchFetch)({workAsyncStorage:x,workUnitAsyncStorage:w})}},9021:e=>{"use strict";e.exports=require("fs")},9294:e=>{"use strict";e.exports=require("next/dist/server/app-render/work-async-storage.external.js")},9748:e=>{"use strict";e.exports=require("fs/promises")}};var t=require("../../../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),s=t.X(0,[131,426],()=>r(4960));module.exports=s})();
1
+ (()=>{var e={};e.id=403,e.ids=[403],e.modules={483:()=>{},846:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},1682:(e,t,r)=>{"use strict";r.r(t),r.d(t,{patchFetch:()=>R,routeModule:()=>j,serverHooks:()=>w,workAsyncStorage:()=>x,workUnitAsyncStorage:()=>f});var s={};r.r(s),r.d(s,{GET:()=>m,PUT:()=>d});var o=r(9227),a=r(9044),n=r(1131),i=r(7642),c=r(9021),u=r(3873),p=r(2601),l=r(4946);async function m(e){try{let{searchParams:t}=new URL(e.url),r=t.get("project"),s=t.get("apiName"),o=t.get("method"),a=t.get("siteName");if(!r||!s||!o||!a)return i.NextResponse.json({success:!1,error:"缺少必要参数:project, apiName, method, siteName"},{status:400});if(!(await (0,p.ZR)())[r])return i.NextResponse.json({success:!1,error:`项目 ${r} 不存在`},{status:404});let n=(0,u.join)(l.tu.WORKSPACE_ROOT,r),m=(0,u.join)(n,".mock",s,o.toLowerCase(),`${a}.js`);try{await c.promises.access(m)}catch{return i.NextResponse.json({success:!1,error:"Mock文件不存在"},{status:404})}let d=await c.promises.readFile(m,"utf-8");return i.NextResponse.json({success:!0,data:{projectName:r,apiName:s,method:o.toLowerCase(),siteName:a,content:d,filePath:(0,u.join)(".mock",s,o.toLowerCase(),`${a}.js`)},message:"获取Mock文件内容成功"})}catch(t){let e=t instanceof Error?t.message:"获取Mock文件内容失败";return console.error("获取Mock文件内容失败:",t),i.NextResponse.json({success:!1,error:e},{status:500})}}async function d(e){try{let{projectName:t,apiName:r,method:s,siteName:o,content:a}=await e.json();if(!t||!r||!s||!o||void 0===a)return i.NextResponse.json({success:!1,error:"缺少必要参数:projectName, apiName, method, siteName, content"},{status:400});if(!(await (0,p.ZR)())[t])return i.NextResponse.json({success:!1,error:`项目 ${t} 不存在`},{status:404});let n=(0,u.join)(l.tu.WORKSPACE_ROOT,t),m=(0,u.join)(n,".mock",r,s.toLowerCase(),`${o}.js`);try{await c.promises.access(m)}catch{return i.NextResponse.json({success:!1,error:"Mock文件不存在"},{status:404})}return await c.promises.writeFile(m,a,"utf-8"),i.NextResponse.json({success:!0,message:"Mock文件内容更新成功",data:{projectName:t,apiName:r,method:s.toLowerCase(),siteName:o,filePath:(0,u.join)(".mock",r,s.toLowerCase(),`${o}.js`),updatedAt:new Date().toISOString()}})}catch(t){let e=t instanceof Error?t.message:"更新Mock文件内容失败";return console.error("更新Mock文件内容失败:",t),i.NextResponse.json({success:!1,error:e},{status:500})}}let j=new o.AppRouteRouteModule({definition:{kind:a.RouteKind.APP_ROUTE,page:"/api/mock-file-content/route",pathname:"/api/mock-file-content",filename:"route",bundlePath:"app/api/mock-file-content/route"},resolvedPagePath:"/Users/edy/Documents/Coding/prime-dev-cli/packages/server/src/app/api/mock-file-content/route.ts",nextConfigOutput:"",userland:s}),{workAsyncStorage:x,workUnitAsyncStorage:f,serverHooks:w}=j;function R(){return(0,n.patchFetch)({workAsyncStorage:x,workUnitAsyncStorage:f})}},1820:e=>{"use strict";e.exports=require("os")},2601:(e,t,r)=>{"use strict";r.d(t,{ZR:()=>a,sF:()=>n});var s=r(9748),o=r(4946);async function a(){try{await (0,s.access)(o.lq,s.constants.F_OK)}catch{return await n({}),{}}try{let e=await (0,s.readFile)(o.lq,"utf-8");if(!e)return{};return JSON.parse(e)}catch(e){throw console.error("读取或解析项目配置文件失败:",e),Error("无法加载项目配置")}}async function n(e){let t=o.lq+".tmp";try{await (0,s.writeFile)(t,JSON.stringify(e,null,2),"utf-8"),await (0,s.rename)(t,o.lq)}catch(e){throw console.error("保存项目配置文件失败:",e),Error("无法保存项目配置")}}},3033:e=>{"use strict";e.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},3295:e=>{"use strict";e.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},3873:e=>{"use strict";e.exports=require("path")},4870:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},4907:()=>{},4946:(e,t,r)=>{"use strict";r.d(t,{Ks:()=>i,lq:()=>n,tu:()=>a});var s=r(1820),o=r(3873);let a={WORKSPACE_ROOT:(0,o.join)((0,s.homedir)(),"Documents","prime-workspace"),GIT_TIMEOUT:3e5,MAX_CONCURRENT_CLONES:Math.max(2,Math.min((0,s.cpus)().length,8)),MAX_RETRY_ATTEMPTS:3},n=(0,o.join)((0,s.homedir)(),".prime-projects.json");var i=function(e){return e.PENDING="pending",e.EXISTING="existing",e.CLONING="cloning",e.SUCCESS="success",e.FAILED="failed",e.RETRYING="retrying",e.INCOMPLETE="incomplete",e}({})},9021:e=>{"use strict";e.exports=require("fs")},9294:e=>{"use strict";e.exports=require("next/dist/server/app-render/work-async-storage.external.js")},9748:e=>{"use strict";e.exports=require("fs/promises")}};var t=require("../../../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),s=t.X(0,[131,426],()=>r(1682));module.exports=s})();
@@ -1 +1 @@
1
- globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/api/mock-file-content/route"]={"moduleLoading":{"prefix":"/_next/"},"ssrModuleMapping":{"317":{"*":{"id":"5207","name":"*","chunks":[],"async":false}},"1020":{"*":{"id":"9136","name":"*","chunks":[],"async":false}},"3053":{"*":{"id":"767","name":"*","chunks":[],"async":false}},"3561":{"*":{"id":"9855","name":"*","chunks":[],"async":false}},"3604":{"*":{"id":"6996","name":"*","chunks":[],"async":false}},"3636":{"*":{"id":"7774","name":"*","chunks":[],"async":false}},"6665":{"*":{"id":"1681","name":"*","chunks":[],"async":false}},"7472":{"*":{"id":"1249","name":"*","chunks":[],"async":false}},"9203":{"*":{"id":"8751","name":"*","chunks":[],"async":false}},"9510":{"*":{"id":"8843","name":"*","chunks":[],"async":false}}},"edgeSSRModuleMapping":{},"clientModules":{"/Users/edy/Documents/prime-workspace/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/client/components/client-page.js":{"id":3636,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/esm/client/components/client-page.js":{"id":3636,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/client/components/client-segment.js":{"id":1020,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/esm/client/components/client-segment.js":{"id":1020,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/client/components/error-boundary.js":{"id":3604,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/esm/client/components/error-boundary.js":{"id":3604,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/client/components/http-access-fallback/error-boundary.js":{"id":3053,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/esm/client/components/http-access-fallback/error-boundary.js":{"id":3053,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/client/components/layout-router.js":{"id":317,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/esm/client/components/layout-router.js":{"id":317,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/client/components/metadata/async-metadata.js":{"id":3561,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/esm/client/components/metadata/async-metadata.js":{"id":3561,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/client/components/metadata/metadata-boundary.js":{"id":9203,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/esm/client/components/metadata/metadata-boundary.js":{"id":9203,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/client/components/render-from-template-context.js":{"id":6665,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/esm/client/components/render-from-template-context.js":{"id":6665,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/font/google/target.css?{\"path\":\"src/app/layout.tsx\",\"import\":\"Geist\",\"arguments\":[{\"variable\":\"--font-geist-sans\",\"subsets\":[\"latin\"]}],\"variableName\":\"geistSans\"}":{"id":6521,"name":"*","chunks":["177","static/chunks/app/layout-2c381be4c1bb73ed.js"],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/font/google/target.css?{\"path\":\"src/app/layout.tsx\",\"import\":\"Geist_Mono\",\"arguments\":[{\"variable\":\"--font-geist-mono\",\"subsets\":[\"latin\"]}],\"variableName\":\"geistMono\"}":{"id":8947,"name":"*","chunks":["177","static/chunks/app/layout-2c381be4c1bb73ed.js"],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/packages/server/src/app/globals.css":{"id":141,"name":"*","chunks":["177","static/chunks/app/layout-2c381be4c1bb73ed.js"],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/packages/server/src/app/configuration/page.tsx":{"id":9510,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/packages/server/src/components/project-initializer.tsx":{"id":7472,"name":"*","chunks":[],"async":false}},"entryCSSFiles":{"/Users/edy/Documents/prime-workspace/prime-dev-cli/packages/server/src/":[],"/Users/edy/Documents/prime-workspace/prime-dev-cli/packages/server/src/app/layout":[{"inlined":false,"path":"static/css/b10a602544a179de.css"}],"/Users/edy/Documents/prime-workspace/prime-dev-cli/packages/server/src/app/page":[],"/Users/edy/Documents/prime-workspace/prime-dev-cli/packages/server/src/app/api/mock-file-content/route":[]},"rscModuleMapping":{"141":{"*":{"id":"3019","name":"*","chunks":[],"async":false}},"317":{"*":{"id":"7429","name":"*","chunks":[],"async":false}},"1020":{"*":{"id":"9670","name":"*","chunks":[],"async":false}},"3053":{"*":{"id":"5473","name":"*","chunks":[],"async":false}},"3561":{"*":{"id":"8653","name":"*","chunks":[],"async":false}},"3604":{"*":{"id":"1382","name":"*","chunks":[],"async":false}},"3636":{"*":{"id":"4928","name":"*","chunks":[],"async":false}},"6665":{"*":{"id":"9687","name":"*","chunks":[],"async":false}},"7472":{"*":{"id":"9624","name":"*","chunks":[],"async":false}},"9203":{"*":{"id":"8757","name":"*","chunks":[],"async":false}},"9510":{"*":{"id":"4761","name":"*","chunks":[],"async":false}}},"edgeRscModuleMapping":{"317":{"*":{"id":"5207","name":"*","chunks":[],"async":false}},"1020":{"*":{"id":"9136","name":"*","chunks":[],"async":false}},"3053":{"*":{"id":"767","name":"*","chunks":[],"async":false}},"3561":{"*":{"id":"9855","name":"*","chunks":[],"async":false}},"3604":{"*":{"id":"6996","name":"*","chunks":[],"async":false}},"3636":{"*":{"id":"7774","name":"*","chunks":[],"async":false}},"6665":{"*":{"id":"1681","name":"*","chunks":[],"async":false}},"9203":{"*":{"id":"8751","name":"*","chunks":[],"async":false}}}}
1
+ globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/api/mock-file-content/route"]={"moduleLoading":{"prefix":"/_next/"},"ssrModuleMapping":{"317":{"*":{"id":"5207","name":"*","chunks":[],"async":false}},"1020":{"*":{"id":"9136","name":"*","chunks":[],"async":false}},"3053":{"*":{"id":"767","name":"*","chunks":[],"async":false}},"3561":{"*":{"id":"9855","name":"*","chunks":[],"async":false}},"3604":{"*":{"id":"6996","name":"*","chunks":[],"async":false}},"3636":{"*":{"id":"7774","name":"*","chunks":[],"async":false}},"6175":{"*":{"id":"8786","name":"*","chunks":[],"async":false}},"6665":{"*":{"id":"1681","name":"*","chunks":[],"async":false}},"7472":{"*":{"id":"1249","name":"*","chunks":[],"async":false}},"9203":{"*":{"id":"8751","name":"*","chunks":[],"async":false}}},"edgeSSRModuleMapping":{},"clientModules":{"/Users/edy/Documents/Coding/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/client/components/client-page.js":{"id":3636,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/Coding/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/esm/client/components/client-page.js":{"id":3636,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/Coding/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/client/components/client-segment.js":{"id":1020,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/Coding/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/esm/client/components/client-segment.js":{"id":1020,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/Coding/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/client/components/error-boundary.js":{"id":3604,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/Coding/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/esm/client/components/error-boundary.js":{"id":3604,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/Coding/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/client/components/http-access-fallback/error-boundary.js":{"id":3053,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/Coding/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/esm/client/components/http-access-fallback/error-boundary.js":{"id":3053,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/Coding/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/client/components/layout-router.js":{"id":317,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/Coding/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/esm/client/components/layout-router.js":{"id":317,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/Coding/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/client/components/metadata/async-metadata.js":{"id":3561,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/Coding/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/esm/client/components/metadata/async-metadata.js":{"id":3561,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/Coding/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/client/components/metadata/metadata-boundary.js":{"id":9203,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/Coding/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/esm/client/components/metadata/metadata-boundary.js":{"id":9203,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/Coding/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/client/components/render-from-template-context.js":{"id":6665,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/Coding/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/esm/client/components/render-from-template-context.js":{"id":6665,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/Coding/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/font/google/target.css?{\"path\":\"src/app/layout.tsx\",\"import\":\"Geist\",\"arguments\":[{\"variable\":\"--font-geist-sans\",\"subsets\":[\"latin\"]}],\"variableName\":\"geistSans\"}":{"id":6521,"name":"*","chunks":["177","static/chunks/app/layout-84c22b799284e008.js"],"async":false},"/Users/edy/Documents/Coding/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/font/google/target.css?{\"path\":\"src/app/layout.tsx\",\"import\":\"Geist_Mono\",\"arguments\":[{\"variable\":\"--font-geist-mono\",\"subsets\":[\"latin\"]}],\"variableName\":\"geistMono\"}":{"id":8947,"name":"*","chunks":["177","static/chunks/app/layout-84c22b799284e008.js"],"async":false},"/Users/edy/Documents/Coding/prime-dev-cli/packages/server/src/app/globals.css":{"id":141,"name":"*","chunks":["177","static/chunks/app/layout-84c22b799284e008.js"],"async":false},"/Users/edy/Documents/Coding/prime-dev-cli/packages/server/src/app/configuration/page.tsx":{"id":6175,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/Coding/prime-dev-cli/packages/server/src/components/project-initializer.tsx":{"id":7472,"name":"*","chunks":[],"async":false}},"entryCSSFiles":{"/Users/edy/Documents/Coding/prime-dev-cli/packages/server/src/":[],"/Users/edy/Documents/Coding/prime-dev-cli/packages/server/src/app/layout":[{"inlined":false,"path":"static/css/1c3633790ce12b77.css"}],"/Users/edy/Documents/Coding/prime-dev-cli/packages/server/src/app/page":[],"/Users/edy/Documents/Coding/prime-dev-cli/packages/server/src/app/api/mock-file-content/route":[]},"rscModuleMapping":{"141":{"*":{"id":"3019","name":"*","chunks":[],"async":false}},"317":{"*":{"id":"7429","name":"*","chunks":[],"async":false}},"1020":{"*":{"id":"9670","name":"*","chunks":[],"async":false}},"3053":{"*":{"id":"5473","name":"*","chunks":[],"async":false}},"3561":{"*":{"id":"8653","name":"*","chunks":[],"async":false}},"3604":{"*":{"id":"1382","name":"*","chunks":[],"async":false}},"3636":{"*":{"id":"4928","name":"*","chunks":[],"async":false}},"6175":{"*":{"id":"4761","name":"*","chunks":[],"async":false}},"6665":{"*":{"id":"9687","name":"*","chunks":[],"async":false}},"7472":{"*":{"id":"9624","name":"*","chunks":[],"async":false}},"9203":{"*":{"id":"8757","name":"*","chunks":[],"async":false}}},"edgeRscModuleMapping":{"317":{"*":{"id":"5207","name":"*","chunks":[],"async":false}},"1020":{"*":{"id":"9136","name":"*","chunks":[],"async":false}},"3053":{"*":{"id":"767","name":"*","chunks":[],"async":false}},"3561":{"*":{"id":"9855","name":"*","chunks":[],"async":false}},"3604":{"*":{"id":"6996","name":"*","chunks":[],"async":false}},"3636":{"*":{"id":"7774","name":"*","chunks":[],"async":false}},"6665":{"*":{"id":"1681","name":"*","chunks":[],"async":false}},"9203":{"*":{"id":"8751","name":"*","chunks":[],"async":false}}}}
@@ -1,6 +1,6 @@
1
- (()=>{var e={};e.id=552,e.ids=[552],e.modules={483:()=>{},495:(e,t,r)=>{"use strict";r.r(t),r.d(t,{patchFetch:()=>h,routeModule:()=>m,serverHooks:()=>f,workAsyncStorage:()=>x,workUnitAsyncStorage:()=>w});var s={};r.r(s),r.d(s,{PUT:()=>d});var o=r(9227),n=r(9044),a=r(1131),i=r(7642),c=r(9021),u=r(3873),p=r(2601),l=r(4946);async function d(e){try{let{projectName:t,apiName:r,method:s,siteName:o,isOpen:n}=await e.json();if(!t||!r||!s||!o||"boolean"!=typeof n)return i.NextResponse.json({success:!1,error:"缺少必要参数:projectName, apiName, method, siteName, isOpen"},{status:400});if(!(await (0,p.ZR)())[t])return i.NextResponse.json({success:!1,error:`项目 ${t} 不存在`},{status:404});let a=(0,u.join)(l.tu.WORKSPACE_ROOT,t),d=(0,u.join)(a,".mock",r,s.toLowerCase(),"setting.js");try{await c.promises.access(d)}catch{return i.NextResponse.json({success:!1,error:"setting.js文件不存在"},{status:404})}let m=(await c.promises.readFile(d,"utf-8")).match(/module\.exports\s*=\s*({[\s\S]*?});?\s*$/),x={};if(m)try{x=Function("return "+m[1])()}catch(e){console.warn(`解析setting.js失败: ${d}`,e)}Array.isArray(x.open)||(x.open=[]);let w=x.open,f=w.indexOf(o);n?-1===f&&w.push(o):-1!==f&&w.splice(f,1);let h=`module.exports = {
1
+ (()=>{var e={};e.id=552,e.ids=[552],e.modules={483:()=>{},846:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},1820:e=>{"use strict";e.exports=require("os")},2601:(e,t,r)=>{"use strict";r.d(t,{ZR:()=>n,sF:()=>i});var s=r(9748),o=r(4946);async function n(){try{await (0,s.access)(o.lq,s.constants.F_OK)}catch{return await i({}),{}}try{let e=await (0,s.readFile)(o.lq,"utf-8");if(!e)return{};return JSON.parse(e)}catch(e){throw console.error("读取或解析项目配置文件失败:",e),Error("无法加载项目配置")}}async function i(e){let t=o.lq+".tmp";try{await (0,s.writeFile)(t,JSON.stringify(e,null,2),"utf-8"),await (0,s.rename)(t,o.lq)}catch(e){throw console.error("保存项目配置文件失败:",e),Error("无法保存项目配置")}}},3033:e=>{"use strict";e.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},3295:e=>{"use strict";e.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},3873:e=>{"use strict";e.exports=require("path")},4870:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},4907:()=>{},4946:(e,t,r)=>{"use strict";r.d(t,{Ks:()=>a,lq:()=>i,tu:()=>n});var s=r(1820),o=r(3873);let n={WORKSPACE_ROOT:(0,o.join)((0,s.homedir)(),"Documents","prime-workspace"),GIT_TIMEOUT:3e5,MAX_CONCURRENT_CLONES:Math.max(2,Math.min((0,s.cpus)().length,8)),MAX_RETRY_ATTEMPTS:3},i=(0,o.join)((0,s.homedir)(),".prime-projects.json");var a=function(e){return e.PENDING="pending",e.EXISTING="existing",e.CLONING="cloning",e.SUCCESS="success",e.FAILED="failed",e.RETRYING="retrying",e.INCOMPLETE="incomplete",e}({})},8403:(e,t,r)=>{"use strict";r.r(t),r.d(t,{patchFetch:()=>w,routeModule:()=>m,serverHooks:()=>h,workAsyncStorage:()=>x,workUnitAsyncStorage:()=>f});var s={};r.r(s),r.d(s,{PUT:()=>d});var o=r(9227),n=r(9044),i=r(1131),a=r(7642),c=r(9021),u=r(3873),p=r(2601),l=r(4946);async function d(e){try{let{projectName:t,apiName:r,method:s,siteName:o,isOpen:n}=await e.json();if(!t||!r||!s||!o||"boolean"!=typeof n)return a.NextResponse.json({success:!1,error:"缺少必要参数:projectName, apiName, method, siteName, isOpen"},{status:400});if(!(await (0,p.ZR)())[t])return a.NextResponse.json({success:!1,error:`项目 ${t} 不存在`},{status:404});let i=(0,u.join)(l.tu.WORKSPACE_ROOT,t),d=(0,u.join)(i,".mock",r,s.toLowerCase(),"setting.js");try{await c.promises.access(d)}catch{return a.NextResponse.json({success:!1,error:"setting.js文件不存在"},{status:404})}let m=(await c.promises.readFile(d,"utf-8")).match(/module\.exports\s*=\s*({[\s\S]*?});?\s*$/),x={};if(m)try{x=Function("return "+m[1])()}catch(e){console.warn(`解析setting.js失败: ${d}`,e)}Array.isArray(x.open)||(x.open=[]);let f=x.open,h=f.indexOf(o);n?-1===h&&f.push(o):-1!==h&&f.splice(h,1);let w=`module.exports = {
2
2
  // 当前场景名称
3
3
  currentSite: '${x.currentSite||o}',
4
4
  // 开启Mock的场景列表
5
- open: ${JSON.stringify(w)}
6
- };`;return await c.promises.writeFile(d,h,"utf-8"),i.NextResponse.json({success:!0,message:"Mock开启状态更新成功",data:{projectName:t,apiName:r,method:s.toLowerCase(),siteName:o,isOpen:n,openSites:w,filePath:(0,u.join)(".mock",r,s.toLowerCase(),"setting.js"),updatedAt:new Date().toISOString()}})}catch(t){let e=t instanceof Error?t.message:"更新Mock开启状态失败";return console.error("更新Mock开启状态失败:",t),i.NextResponse.json({success:!1,error:e},{status:500})}}let m=new o.AppRouteRouteModule({definition:{kind:n.RouteKind.APP_ROUTE,page:"/api/mock-open-status/route",pathname:"/api/mock-open-status",filename:"route",bundlePath:"app/api/mock-open-status/route"},resolvedPagePath:"/Users/edy/Documents/prime-workspace/prime-dev-cli/packages/server/src/app/api/mock-open-status/route.ts",nextConfigOutput:"",userland:s}),{workAsyncStorage:x,workUnitAsyncStorage:w,serverHooks:f}=m;function h(){return(0,a.patchFetch)({workAsyncStorage:x,workUnitAsyncStorage:w})}},846:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},1820:e=>{"use strict";e.exports=require("os")},2601:(e,t,r)=>{"use strict";r.d(t,{ZR:()=>n,sF:()=>a});var s=r(9748),o=r(4946);async function n(){try{await (0,s.access)(o.lq,s.constants.F_OK)}catch{return await a({}),{}}try{let e=await (0,s.readFile)(o.lq,"utf-8");if(!e)return{};return JSON.parse(e)}catch(e){throw console.error("读取或解析项目配置文件失败:",e),Error("无法加载项目配置")}}async function a(e){let t=o.lq+".tmp";try{await (0,s.writeFile)(t,JSON.stringify(e,null,2),"utf-8"),await (0,s.rename)(t,o.lq)}catch(e){throw console.error("保存项目配置文件失败:",e),Error("无法保存项目配置")}}},3033:e=>{"use strict";e.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},3295:e=>{"use strict";e.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},3873:e=>{"use strict";e.exports=require("path")},4870:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},4907:()=>{},4946:(e,t,r)=>{"use strict";r.d(t,{Ks:()=>i,lq:()=>a,tu:()=>n});var s=r(1820),o=r(3873);let n={WORKSPACE_ROOT:(0,o.join)((0,s.homedir)(),"Documents","prime-workspace"),GIT_TIMEOUT:3e5,MAX_CONCURRENT_CLONES:Math.max(2,Math.min((0,s.cpus)().length,8)),MAX_RETRY_ATTEMPTS:3},a=(0,o.join)((0,s.homedir)(),".prime-projects.json");var i=function(e){return e.PENDING="pending",e.EXISTING="existing",e.CLONING="cloning",e.SUCCESS="success",e.FAILED="failed",e.RETRYING="retrying",e.INCOMPLETE="incomplete",e}({})},9021:e=>{"use strict";e.exports=require("fs")},9294:e=>{"use strict";e.exports=require("next/dist/server/app-render/work-async-storage.external.js")},9748:e=>{"use strict";e.exports=require("fs/promises")}};var t=require("../../../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),s=t.X(0,[131,426],()=>r(495));module.exports=s})();
5
+ open: ${JSON.stringify(f)}
6
+ };`;return await c.promises.writeFile(d,w,"utf-8"),a.NextResponse.json({success:!0,message:"Mock开启状态更新成功",data:{projectName:t,apiName:r,method:s.toLowerCase(),siteName:o,isOpen:n,openSites:f,filePath:(0,u.join)(".mock",r,s.toLowerCase(),"setting.js"),updatedAt:new Date().toISOString()}})}catch(t){let e=t instanceof Error?t.message:"更新Mock开启状态失败";return console.error("更新Mock开启状态失败:",t),a.NextResponse.json({success:!1,error:e},{status:500})}}let m=new o.AppRouteRouteModule({definition:{kind:n.RouteKind.APP_ROUTE,page:"/api/mock-open-status/route",pathname:"/api/mock-open-status",filename:"route",bundlePath:"app/api/mock-open-status/route"},resolvedPagePath:"/Users/edy/Documents/Coding/prime-dev-cli/packages/server/src/app/api/mock-open-status/route.ts",nextConfigOutput:"",userland:s}),{workAsyncStorage:x,workUnitAsyncStorage:f,serverHooks:h}=m;function w(){return(0,i.patchFetch)({workAsyncStorage:x,workUnitAsyncStorage:f})}},9021:e=>{"use strict";e.exports=require("fs")},9294:e=>{"use strict";e.exports=require("next/dist/server/app-render/work-async-storage.external.js")},9748:e=>{"use strict";e.exports=require("fs/promises")}};var t=require("../../../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),s=t.X(0,[131,426],()=>r(8403));module.exports=s})();
@@ -1 +1 @@
1
- globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/api/mock-open-status/route"]={"moduleLoading":{"prefix":"/_next/"},"ssrModuleMapping":{"317":{"*":{"id":"5207","name":"*","chunks":[],"async":false}},"1020":{"*":{"id":"9136","name":"*","chunks":[],"async":false}},"3053":{"*":{"id":"767","name":"*","chunks":[],"async":false}},"3561":{"*":{"id":"9855","name":"*","chunks":[],"async":false}},"3604":{"*":{"id":"6996","name":"*","chunks":[],"async":false}},"3636":{"*":{"id":"7774","name":"*","chunks":[],"async":false}},"6665":{"*":{"id":"1681","name":"*","chunks":[],"async":false}},"7472":{"*":{"id":"1249","name":"*","chunks":[],"async":false}},"9203":{"*":{"id":"8751","name":"*","chunks":[],"async":false}},"9510":{"*":{"id":"8843","name":"*","chunks":[],"async":false}}},"edgeSSRModuleMapping":{},"clientModules":{"/Users/edy/Documents/prime-workspace/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/client/components/client-page.js":{"id":3636,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/esm/client/components/client-page.js":{"id":3636,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/client/components/client-segment.js":{"id":1020,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/esm/client/components/client-segment.js":{"id":1020,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/client/components/error-boundary.js":{"id":3604,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/esm/client/components/error-boundary.js":{"id":3604,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/client/components/http-access-fallback/error-boundary.js":{"id":3053,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/esm/client/components/http-access-fallback/error-boundary.js":{"id":3053,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/client/components/layout-router.js":{"id":317,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/esm/client/components/layout-router.js":{"id":317,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/client/components/metadata/async-metadata.js":{"id":3561,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/esm/client/components/metadata/async-metadata.js":{"id":3561,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/client/components/metadata/metadata-boundary.js":{"id":9203,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/esm/client/components/metadata/metadata-boundary.js":{"id":9203,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/client/components/render-from-template-context.js":{"id":6665,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/esm/client/components/render-from-template-context.js":{"id":6665,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/font/google/target.css?{\"path\":\"src/app/layout.tsx\",\"import\":\"Geist\",\"arguments\":[{\"variable\":\"--font-geist-sans\",\"subsets\":[\"latin\"]}],\"variableName\":\"geistSans\"}":{"id":6521,"name":"*","chunks":["177","static/chunks/app/layout-2c381be4c1bb73ed.js"],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/font/google/target.css?{\"path\":\"src/app/layout.tsx\",\"import\":\"Geist_Mono\",\"arguments\":[{\"variable\":\"--font-geist-mono\",\"subsets\":[\"latin\"]}],\"variableName\":\"geistMono\"}":{"id":8947,"name":"*","chunks":["177","static/chunks/app/layout-2c381be4c1bb73ed.js"],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/packages/server/src/app/globals.css":{"id":141,"name":"*","chunks":["177","static/chunks/app/layout-2c381be4c1bb73ed.js"],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/packages/server/src/app/configuration/page.tsx":{"id":9510,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/packages/server/src/components/project-initializer.tsx":{"id":7472,"name":"*","chunks":[],"async":false}},"entryCSSFiles":{"/Users/edy/Documents/prime-workspace/prime-dev-cli/packages/server/src/":[],"/Users/edy/Documents/prime-workspace/prime-dev-cli/packages/server/src/app/layout":[{"inlined":false,"path":"static/css/b10a602544a179de.css"}],"/Users/edy/Documents/prime-workspace/prime-dev-cli/packages/server/src/app/page":[],"/Users/edy/Documents/prime-workspace/prime-dev-cli/packages/server/src/app/api/mock-open-status/route":[]},"rscModuleMapping":{"141":{"*":{"id":"3019","name":"*","chunks":[],"async":false}},"317":{"*":{"id":"7429","name":"*","chunks":[],"async":false}},"1020":{"*":{"id":"9670","name":"*","chunks":[],"async":false}},"3053":{"*":{"id":"5473","name":"*","chunks":[],"async":false}},"3561":{"*":{"id":"8653","name":"*","chunks":[],"async":false}},"3604":{"*":{"id":"1382","name":"*","chunks":[],"async":false}},"3636":{"*":{"id":"4928","name":"*","chunks":[],"async":false}},"6665":{"*":{"id":"9687","name":"*","chunks":[],"async":false}},"7472":{"*":{"id":"9624","name":"*","chunks":[],"async":false}},"9203":{"*":{"id":"8757","name":"*","chunks":[],"async":false}},"9510":{"*":{"id":"4761","name":"*","chunks":[],"async":false}}},"edgeRscModuleMapping":{"317":{"*":{"id":"5207","name":"*","chunks":[],"async":false}},"1020":{"*":{"id":"9136","name":"*","chunks":[],"async":false}},"3053":{"*":{"id":"767","name":"*","chunks":[],"async":false}},"3561":{"*":{"id":"9855","name":"*","chunks":[],"async":false}},"3604":{"*":{"id":"6996","name":"*","chunks":[],"async":false}},"3636":{"*":{"id":"7774","name":"*","chunks":[],"async":false}},"6665":{"*":{"id":"1681","name":"*","chunks":[],"async":false}},"9203":{"*":{"id":"8751","name":"*","chunks":[],"async":false}}}}
1
+ globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/api/mock-open-status/route"]={"moduleLoading":{"prefix":"/_next/"},"ssrModuleMapping":{"317":{"*":{"id":"5207","name":"*","chunks":[],"async":false}},"1020":{"*":{"id":"9136","name":"*","chunks":[],"async":false}},"3053":{"*":{"id":"767","name":"*","chunks":[],"async":false}},"3561":{"*":{"id":"9855","name":"*","chunks":[],"async":false}},"3604":{"*":{"id":"6996","name":"*","chunks":[],"async":false}},"3636":{"*":{"id":"7774","name":"*","chunks":[],"async":false}},"6175":{"*":{"id":"8786","name":"*","chunks":[],"async":false}},"6665":{"*":{"id":"1681","name":"*","chunks":[],"async":false}},"7472":{"*":{"id":"1249","name":"*","chunks":[],"async":false}},"9203":{"*":{"id":"8751","name":"*","chunks":[],"async":false}}},"edgeSSRModuleMapping":{},"clientModules":{"/Users/edy/Documents/Coding/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/client/components/client-page.js":{"id":3636,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/Coding/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/esm/client/components/client-page.js":{"id":3636,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/Coding/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/client/components/client-segment.js":{"id":1020,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/Coding/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/esm/client/components/client-segment.js":{"id":1020,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/Coding/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/client/components/error-boundary.js":{"id":3604,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/Coding/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/esm/client/components/error-boundary.js":{"id":3604,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/Coding/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/client/components/http-access-fallback/error-boundary.js":{"id":3053,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/Coding/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/esm/client/components/http-access-fallback/error-boundary.js":{"id":3053,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/Coding/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/client/components/layout-router.js":{"id":317,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/Coding/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/esm/client/components/layout-router.js":{"id":317,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/Coding/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/client/components/metadata/async-metadata.js":{"id":3561,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/Coding/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/esm/client/components/metadata/async-metadata.js":{"id":3561,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/Coding/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/client/components/metadata/metadata-boundary.js":{"id":9203,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/Coding/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/esm/client/components/metadata/metadata-boundary.js":{"id":9203,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/Coding/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/client/components/render-from-template-context.js":{"id":6665,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/Coding/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/esm/client/components/render-from-template-context.js":{"id":6665,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/Coding/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/font/google/target.css?{\"path\":\"src/app/layout.tsx\",\"import\":\"Geist\",\"arguments\":[{\"variable\":\"--font-geist-sans\",\"subsets\":[\"latin\"]}],\"variableName\":\"geistSans\"}":{"id":6521,"name":"*","chunks":["177","static/chunks/app/layout-84c22b799284e008.js"],"async":false},"/Users/edy/Documents/Coding/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/font/google/target.css?{\"path\":\"src/app/layout.tsx\",\"import\":\"Geist_Mono\",\"arguments\":[{\"variable\":\"--font-geist-mono\",\"subsets\":[\"latin\"]}],\"variableName\":\"geistMono\"}":{"id":8947,"name":"*","chunks":["177","static/chunks/app/layout-84c22b799284e008.js"],"async":false},"/Users/edy/Documents/Coding/prime-dev-cli/packages/server/src/app/globals.css":{"id":141,"name":"*","chunks":["177","static/chunks/app/layout-84c22b799284e008.js"],"async":false},"/Users/edy/Documents/Coding/prime-dev-cli/packages/server/src/app/configuration/page.tsx":{"id":6175,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/Coding/prime-dev-cli/packages/server/src/components/project-initializer.tsx":{"id":7472,"name":"*","chunks":[],"async":false}},"entryCSSFiles":{"/Users/edy/Documents/Coding/prime-dev-cli/packages/server/src/":[],"/Users/edy/Documents/Coding/prime-dev-cli/packages/server/src/app/layout":[{"inlined":false,"path":"static/css/1c3633790ce12b77.css"}],"/Users/edy/Documents/Coding/prime-dev-cli/packages/server/src/app/page":[],"/Users/edy/Documents/Coding/prime-dev-cli/packages/server/src/app/api/mock-open-status/route":[]},"rscModuleMapping":{"141":{"*":{"id":"3019","name":"*","chunks":[],"async":false}},"317":{"*":{"id":"7429","name":"*","chunks":[],"async":false}},"1020":{"*":{"id":"9670","name":"*","chunks":[],"async":false}},"3053":{"*":{"id":"5473","name":"*","chunks":[],"async":false}},"3561":{"*":{"id":"8653","name":"*","chunks":[],"async":false}},"3604":{"*":{"id":"1382","name":"*","chunks":[],"async":false}},"3636":{"*":{"id":"4928","name":"*","chunks":[],"async":false}},"6175":{"*":{"id":"4761","name":"*","chunks":[],"async":false}},"6665":{"*":{"id":"9687","name":"*","chunks":[],"async":false}},"7472":{"*":{"id":"9624","name":"*","chunks":[],"async":false}},"9203":{"*":{"id":"8757","name":"*","chunks":[],"async":false}}},"edgeRscModuleMapping":{"317":{"*":{"id":"5207","name":"*","chunks":[],"async":false}},"1020":{"*":{"id":"9136","name":"*","chunks":[],"async":false}},"3053":{"*":{"id":"767","name":"*","chunks":[],"async":false}},"3561":{"*":{"id":"9855","name":"*","chunks":[],"async":false}},"3604":{"*":{"id":"6996","name":"*","chunks":[],"async":false}},"3636":{"*":{"id":"7774","name":"*","chunks":[],"async":false}},"6665":{"*":{"id":"1681","name":"*","chunks":[],"async":false}},"9203":{"*":{"id":"8751","name":"*","chunks":[],"async":false}}}}
@@ -1 +1 @@
1
- (()=>{var e={};e.id=139,e.ids=[139],e.modules={25:(e,t,r)=>{"use strict";r.r(t),r.d(t,{patchFetch:()=>h,routeModule:()=>m,serverHooks:()=>w,workAsyncStorage:()=>x,workUnitAsyncStorage:()=>g});var s={};r.r(s),r.d(s,{PUT:()=>d});var o=r(9227),i=r(9044),n=r(1131),a=r(7642),c=r(9021),u=r(3873),p=r(2601),l=r(4946);async function d(e){try{let{projectName:t,apiName:r,method:s,currentSite:o}=await e.json();if(!t||!r||!s||!o)return a.NextResponse.json({success:!1,error:"缺少必要参数:projectName, apiName, method, currentSite"},{status:400});if(!(await (0,p.ZR)())[t])return a.NextResponse.json({success:!1,error:`项目 ${t} 不存在`},{status:404});let i=(0,u.join)(l.tu.WORKSPACE_ROOT,t),n=(0,u.join)(i,".mock",r,s.toLowerCase(),"setting.js");try{await c.promises.access(n)}catch{return a.NextResponse.json({success:!1,error:"setting.js文件不存在"},{status:404})}let d=(await c.promises.readFile(n,"utf-8")).match(/module\.exports\s*=\s*({[\s\S]*?});?\s*$/),m={};if(d)try{m=Function("return "+d[1])()}catch(e){console.warn(`解析setting.js失败: ${n}`,e)}m.currentSite=o;let x=`module.exports = ${JSON.stringify(m,null,2).replace(/"([^"]+)":/g,"$1:")};`;return await c.promises.writeFile(n,x,"utf-8"),a.NextResponse.json({success:!0,message:"Mock设置更新成功",data:{projectName:t,apiName:r,method:s.toLowerCase(),currentSite:o,filePath:(0,u.join)(".mock",r,s.toLowerCase(),"setting.js"),updatedAt:new Date().toISOString()}})}catch(t){let e=t instanceof Error?t.message:"更新Mock设置失败";return console.error("更新Mock设置失败:",t),a.NextResponse.json({success:!1,error:e},{status:500})}}let m=new o.AppRouteRouteModule({definition:{kind:i.RouteKind.APP_ROUTE,page:"/api/mock-setting/route",pathname:"/api/mock-setting",filename:"route",bundlePath:"app/api/mock-setting/route"},resolvedPagePath:"/Users/edy/Documents/prime-workspace/prime-dev-cli/packages/server/src/app/api/mock-setting/route.ts",nextConfigOutput:"",userland:s}),{workAsyncStorage:x,workUnitAsyncStorage:g,serverHooks:w}=m;function h(){return(0,n.patchFetch)({workAsyncStorage:x,workUnitAsyncStorage:g})}},483:()=>{},846:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},1820:e=>{"use strict";e.exports=require("os")},2601:(e,t,r)=>{"use strict";r.d(t,{ZR:()=>i,sF:()=>n});var s=r(9748),o=r(4946);async function i(){try{await (0,s.access)(o.lq,s.constants.F_OK)}catch{return await n({}),{}}try{let e=await (0,s.readFile)(o.lq,"utf-8");if(!e)return{};return JSON.parse(e)}catch(e){throw console.error("读取或解析项目配置文件失败:",e),Error("无法加载项目配置")}}async function n(e){let t=o.lq+".tmp";try{await (0,s.writeFile)(t,JSON.stringify(e,null,2),"utf-8"),await (0,s.rename)(t,o.lq)}catch(e){throw console.error("保存项目配置文件失败:",e),Error("无法保存项目配置")}}},3033:e=>{"use strict";e.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},3295:e=>{"use strict";e.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},3873:e=>{"use strict";e.exports=require("path")},4870:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},4907:()=>{},4946:(e,t,r)=>{"use strict";r.d(t,{Ks:()=>a,lq:()=>n,tu:()=>i});var s=r(1820),o=r(3873);let i={WORKSPACE_ROOT:(0,o.join)((0,s.homedir)(),"Documents","prime-workspace"),GIT_TIMEOUT:3e5,MAX_CONCURRENT_CLONES:Math.max(2,Math.min((0,s.cpus)().length,8)),MAX_RETRY_ATTEMPTS:3},n=(0,o.join)((0,s.homedir)(),".prime-projects.json");var a=function(e){return e.PENDING="pending",e.EXISTING="existing",e.CLONING="cloning",e.SUCCESS="success",e.FAILED="failed",e.RETRYING="retrying",e.INCOMPLETE="incomplete",e}({})},9021:e=>{"use strict";e.exports=require("fs")},9294:e=>{"use strict";e.exports=require("next/dist/server/app-render/work-async-storage.external.js")},9748:e=>{"use strict";e.exports=require("fs/promises")}};var t=require("../../../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),s=t.X(0,[131,426],()=>r(25));module.exports=s})();
1
+ (()=>{var e={};e.id=139,e.ids=[139],e.modules={483:()=>{},846:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},1820:e=>{"use strict";e.exports=require("os")},2601:(e,t,r)=>{"use strict";r.d(t,{ZR:()=>i,sF:()=>n});var s=r(9748),o=r(4946);async function i(){try{await (0,s.access)(o.lq,s.constants.F_OK)}catch{return await n({}),{}}try{let e=await (0,s.readFile)(o.lq,"utf-8");if(!e)return{};return JSON.parse(e)}catch(e){throw console.error("读取或解析项目配置文件失败:",e),Error("无法加载项目配置")}}async function n(e){let t=o.lq+".tmp";try{await (0,s.writeFile)(t,JSON.stringify(e,null,2),"utf-8"),await (0,s.rename)(t,o.lq)}catch(e){throw console.error("保存项目配置文件失败:",e),Error("无法保存项目配置")}}},3033:e=>{"use strict";e.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},3295:e=>{"use strict";e.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},3873:e=>{"use strict";e.exports=require("path")},4870:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},4907:()=>{},4946:(e,t,r)=>{"use strict";r.d(t,{Ks:()=>a,lq:()=>n,tu:()=>i});var s=r(1820),o=r(3873);let i={WORKSPACE_ROOT:(0,o.join)((0,s.homedir)(),"Documents","prime-workspace"),GIT_TIMEOUT:3e5,MAX_CONCURRENT_CLONES:Math.max(2,Math.min((0,s.cpus)().length,8)),MAX_RETRY_ATTEMPTS:3},n=(0,o.join)((0,s.homedir)(),".prime-projects.json");var a=function(e){return e.PENDING="pending",e.EXISTING="existing",e.CLONING="cloning",e.SUCCESS="success",e.FAILED="failed",e.RETRYING="retrying",e.INCOMPLETE="incomplete",e}({})},8648:(e,t,r)=>{"use strict";r.r(t),r.d(t,{patchFetch:()=>h,routeModule:()=>m,serverHooks:()=>w,workAsyncStorage:()=>g,workUnitAsyncStorage:()=>x});var s={};r.r(s),r.d(s,{PUT:()=>d});var o=r(9227),i=r(9044),n=r(1131),a=r(7642),c=r(9021),u=r(3873),p=r(2601),l=r(4946);async function d(e){try{let{projectName:t,apiName:r,method:s,currentSite:o}=await e.json();if(!t||!r||!s||!o)return a.NextResponse.json({success:!1,error:"缺少必要参数:projectName, apiName, method, currentSite"},{status:400});if(!(await (0,p.ZR)())[t])return a.NextResponse.json({success:!1,error:`项目 ${t} 不存在`},{status:404});let i=(0,u.join)(l.tu.WORKSPACE_ROOT,t),n=(0,u.join)(i,".mock",r,s.toLowerCase(),"setting.js");try{await c.promises.access(n)}catch{return a.NextResponse.json({success:!1,error:"setting.js文件不存在"},{status:404})}let d=(await c.promises.readFile(n,"utf-8")).match(/module\.exports\s*=\s*({[\s\S]*?});?\s*$/),m={};if(d)try{m=Function("return "+d[1])()}catch(e){console.warn(`解析setting.js失败: ${n}`,e)}m.currentSite=o;let g=`module.exports = ${JSON.stringify(m,null,2).replace(/"([^"]+)":/g,"$1:")};`;return await c.promises.writeFile(n,g,"utf-8"),a.NextResponse.json({success:!0,message:"Mock设置更新成功",data:{projectName:t,apiName:r,method:s.toLowerCase(),currentSite:o,filePath:(0,u.join)(".mock",r,s.toLowerCase(),"setting.js"),updatedAt:new Date().toISOString()}})}catch(t){let e=t instanceof Error?t.message:"更新Mock设置失败";return console.error("更新Mock设置失败:",t),a.NextResponse.json({success:!1,error:e},{status:500})}}let m=new o.AppRouteRouteModule({definition:{kind:i.RouteKind.APP_ROUTE,page:"/api/mock-setting/route",pathname:"/api/mock-setting",filename:"route",bundlePath:"app/api/mock-setting/route"},resolvedPagePath:"/Users/edy/Documents/Coding/prime-dev-cli/packages/server/src/app/api/mock-setting/route.ts",nextConfigOutput:"",userland:s}),{workAsyncStorage:g,workUnitAsyncStorage:x,serverHooks:w}=m;function h(){return(0,n.patchFetch)({workAsyncStorage:g,workUnitAsyncStorage:x})}},9021:e=>{"use strict";e.exports=require("fs")},9294:e=>{"use strict";e.exports=require("next/dist/server/app-render/work-async-storage.external.js")},9748:e=>{"use strict";e.exports=require("fs/promises")}};var t=require("../../../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),s=t.X(0,[131,426],()=>r(8648));module.exports=s})();
@@ -1 +1 @@
1
- globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/api/mock-setting/route"]={"moduleLoading":{"prefix":"/_next/"},"ssrModuleMapping":{"317":{"*":{"id":"5207","name":"*","chunks":[],"async":false}},"1020":{"*":{"id":"9136","name":"*","chunks":[],"async":false}},"3053":{"*":{"id":"767","name":"*","chunks":[],"async":false}},"3561":{"*":{"id":"9855","name":"*","chunks":[],"async":false}},"3604":{"*":{"id":"6996","name":"*","chunks":[],"async":false}},"3636":{"*":{"id":"7774","name":"*","chunks":[],"async":false}},"6665":{"*":{"id":"1681","name":"*","chunks":[],"async":false}},"7472":{"*":{"id":"1249","name":"*","chunks":[],"async":false}},"9203":{"*":{"id":"8751","name":"*","chunks":[],"async":false}},"9510":{"*":{"id":"8843","name":"*","chunks":[],"async":false}}},"edgeSSRModuleMapping":{},"clientModules":{"/Users/edy/Documents/prime-workspace/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/client/components/client-page.js":{"id":3636,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/esm/client/components/client-page.js":{"id":3636,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/client/components/client-segment.js":{"id":1020,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/esm/client/components/client-segment.js":{"id":1020,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/client/components/error-boundary.js":{"id":3604,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/esm/client/components/error-boundary.js":{"id":3604,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/client/components/http-access-fallback/error-boundary.js":{"id":3053,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/esm/client/components/http-access-fallback/error-boundary.js":{"id":3053,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/client/components/layout-router.js":{"id":317,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/esm/client/components/layout-router.js":{"id":317,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/client/components/metadata/async-metadata.js":{"id":3561,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/esm/client/components/metadata/async-metadata.js":{"id":3561,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/client/components/metadata/metadata-boundary.js":{"id":9203,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/esm/client/components/metadata/metadata-boundary.js":{"id":9203,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/client/components/render-from-template-context.js":{"id":6665,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/esm/client/components/render-from-template-context.js":{"id":6665,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/font/google/target.css?{\"path\":\"src/app/layout.tsx\",\"import\":\"Geist\",\"arguments\":[{\"variable\":\"--font-geist-sans\",\"subsets\":[\"latin\"]}],\"variableName\":\"geistSans\"}":{"id":6521,"name":"*","chunks":["177","static/chunks/app/layout-2c381be4c1bb73ed.js"],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/font/google/target.css?{\"path\":\"src/app/layout.tsx\",\"import\":\"Geist_Mono\",\"arguments\":[{\"variable\":\"--font-geist-mono\",\"subsets\":[\"latin\"]}],\"variableName\":\"geistMono\"}":{"id":8947,"name":"*","chunks":["177","static/chunks/app/layout-2c381be4c1bb73ed.js"],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/packages/server/src/app/globals.css":{"id":141,"name":"*","chunks":["177","static/chunks/app/layout-2c381be4c1bb73ed.js"],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/packages/server/src/app/configuration/page.tsx":{"id":9510,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/packages/server/src/components/project-initializer.tsx":{"id":7472,"name":"*","chunks":[],"async":false}},"entryCSSFiles":{"/Users/edy/Documents/prime-workspace/prime-dev-cli/packages/server/src/":[],"/Users/edy/Documents/prime-workspace/prime-dev-cli/packages/server/src/app/layout":[{"inlined":false,"path":"static/css/b10a602544a179de.css"}],"/Users/edy/Documents/prime-workspace/prime-dev-cli/packages/server/src/app/page":[],"/Users/edy/Documents/prime-workspace/prime-dev-cli/packages/server/src/app/api/mock-setting/route":[]},"rscModuleMapping":{"141":{"*":{"id":"3019","name":"*","chunks":[],"async":false}},"317":{"*":{"id":"7429","name":"*","chunks":[],"async":false}},"1020":{"*":{"id":"9670","name":"*","chunks":[],"async":false}},"3053":{"*":{"id":"5473","name":"*","chunks":[],"async":false}},"3561":{"*":{"id":"8653","name":"*","chunks":[],"async":false}},"3604":{"*":{"id":"1382","name":"*","chunks":[],"async":false}},"3636":{"*":{"id":"4928","name":"*","chunks":[],"async":false}},"6665":{"*":{"id":"9687","name":"*","chunks":[],"async":false}},"7472":{"*":{"id":"9624","name":"*","chunks":[],"async":false}},"9203":{"*":{"id":"8757","name":"*","chunks":[],"async":false}},"9510":{"*":{"id":"4761","name":"*","chunks":[],"async":false}}},"edgeRscModuleMapping":{"317":{"*":{"id":"5207","name":"*","chunks":[],"async":false}},"1020":{"*":{"id":"9136","name":"*","chunks":[],"async":false}},"3053":{"*":{"id":"767","name":"*","chunks":[],"async":false}},"3561":{"*":{"id":"9855","name":"*","chunks":[],"async":false}},"3604":{"*":{"id":"6996","name":"*","chunks":[],"async":false}},"3636":{"*":{"id":"7774","name":"*","chunks":[],"async":false}},"6665":{"*":{"id":"1681","name":"*","chunks":[],"async":false}},"9203":{"*":{"id":"8751","name":"*","chunks":[],"async":false}}}}
1
+ globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/api/mock-setting/route"]={"moduleLoading":{"prefix":"/_next/"},"ssrModuleMapping":{"317":{"*":{"id":"5207","name":"*","chunks":[],"async":false}},"1020":{"*":{"id":"9136","name":"*","chunks":[],"async":false}},"3053":{"*":{"id":"767","name":"*","chunks":[],"async":false}},"3561":{"*":{"id":"9855","name":"*","chunks":[],"async":false}},"3604":{"*":{"id":"6996","name":"*","chunks":[],"async":false}},"3636":{"*":{"id":"7774","name":"*","chunks":[],"async":false}},"6175":{"*":{"id":"8786","name":"*","chunks":[],"async":false}},"6665":{"*":{"id":"1681","name":"*","chunks":[],"async":false}},"7472":{"*":{"id":"1249","name":"*","chunks":[],"async":false}},"9203":{"*":{"id":"8751","name":"*","chunks":[],"async":false}}},"edgeSSRModuleMapping":{},"clientModules":{"/Users/edy/Documents/Coding/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/client/components/client-page.js":{"id":3636,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/Coding/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/esm/client/components/client-page.js":{"id":3636,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/Coding/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/client/components/client-segment.js":{"id":1020,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/Coding/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/esm/client/components/client-segment.js":{"id":1020,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/Coding/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/client/components/error-boundary.js":{"id":3604,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/Coding/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/esm/client/components/error-boundary.js":{"id":3604,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/Coding/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/client/components/http-access-fallback/error-boundary.js":{"id":3053,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/Coding/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/esm/client/components/http-access-fallback/error-boundary.js":{"id":3053,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/Coding/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/client/components/layout-router.js":{"id":317,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/Coding/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/esm/client/components/layout-router.js":{"id":317,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/Coding/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/client/components/metadata/async-metadata.js":{"id":3561,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/Coding/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/esm/client/components/metadata/async-metadata.js":{"id":3561,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/Coding/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/client/components/metadata/metadata-boundary.js":{"id":9203,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/Coding/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/esm/client/components/metadata/metadata-boundary.js":{"id":9203,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/Coding/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/client/components/render-from-template-context.js":{"id":6665,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/Coding/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/esm/client/components/render-from-template-context.js":{"id":6665,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/Coding/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/font/google/target.css?{\"path\":\"src/app/layout.tsx\",\"import\":\"Geist\",\"arguments\":[{\"variable\":\"--font-geist-sans\",\"subsets\":[\"latin\"]}],\"variableName\":\"geistSans\"}":{"id":6521,"name":"*","chunks":["177","static/chunks/app/layout-84c22b799284e008.js"],"async":false},"/Users/edy/Documents/Coding/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/font/google/target.css?{\"path\":\"src/app/layout.tsx\",\"import\":\"Geist_Mono\",\"arguments\":[{\"variable\":\"--font-geist-mono\",\"subsets\":[\"latin\"]}],\"variableName\":\"geistMono\"}":{"id":8947,"name":"*","chunks":["177","static/chunks/app/layout-84c22b799284e008.js"],"async":false},"/Users/edy/Documents/Coding/prime-dev-cli/packages/server/src/app/globals.css":{"id":141,"name":"*","chunks":["177","static/chunks/app/layout-84c22b799284e008.js"],"async":false},"/Users/edy/Documents/Coding/prime-dev-cli/packages/server/src/app/configuration/page.tsx":{"id":6175,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/Coding/prime-dev-cli/packages/server/src/components/project-initializer.tsx":{"id":7472,"name":"*","chunks":[],"async":false}},"entryCSSFiles":{"/Users/edy/Documents/Coding/prime-dev-cli/packages/server/src/":[],"/Users/edy/Documents/Coding/prime-dev-cli/packages/server/src/app/layout":[{"inlined":false,"path":"static/css/1c3633790ce12b77.css"}],"/Users/edy/Documents/Coding/prime-dev-cli/packages/server/src/app/page":[],"/Users/edy/Documents/Coding/prime-dev-cli/packages/server/src/app/api/mock-setting/route":[]},"rscModuleMapping":{"141":{"*":{"id":"3019","name":"*","chunks":[],"async":false}},"317":{"*":{"id":"7429","name":"*","chunks":[],"async":false}},"1020":{"*":{"id":"9670","name":"*","chunks":[],"async":false}},"3053":{"*":{"id":"5473","name":"*","chunks":[],"async":false}},"3561":{"*":{"id":"8653","name":"*","chunks":[],"async":false}},"3604":{"*":{"id":"1382","name":"*","chunks":[],"async":false}},"3636":{"*":{"id":"4928","name":"*","chunks":[],"async":false}},"6175":{"*":{"id":"4761","name":"*","chunks":[],"async":false}},"6665":{"*":{"id":"9687","name":"*","chunks":[],"async":false}},"7472":{"*":{"id":"9624","name":"*","chunks":[],"async":false}},"9203":{"*":{"id":"8757","name":"*","chunks":[],"async":false}}},"edgeRscModuleMapping":{"317":{"*":{"id":"5207","name":"*","chunks":[],"async":false}},"1020":{"*":{"id":"9136","name":"*","chunks":[],"async":false}},"3053":{"*":{"id":"767","name":"*","chunks":[],"async":false}},"3561":{"*":{"id":"9855","name":"*","chunks":[],"async":false}},"3604":{"*":{"id":"6996","name":"*","chunks":[],"async":false}},"3636":{"*":{"id":"7774","name":"*","chunks":[],"async":false}},"6665":{"*":{"id":"1681","name":"*","chunks":[],"async":false}},"9203":{"*":{"id":"8751","name":"*","chunks":[],"async":false}}}}
@@ -1,4 +1,4 @@
1
- (()=>{var e={};e.id=522,e.ids=[522],e.modules={483:()=>{},846:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},1804:(e,s,t)=>{"use strict";t.d(s,{kf:()=>g,YK:()=>l,eR:()=>c,DR:()=>u,x9:()=>m,e_:()=>a});let r=require("child_process");var n=t(9021),i=t(3873),o=t(4946);async function u(e){try{return(0,n.existsSync)(e)||(0,n.mkdirSync)(e,{recursive:!0}),{success:!0}}catch(e){return{success:!1,error:`创建工作空间目录失败: ${e instanceof Error?e.message:String(e)}`}}}async function c(e){let{repoUrl:s,targetDir:t,timeout:n,onProgress:u,onError:c,onLog:a}=e,l=(0,i.basename)(s,".git");return new Promise(e=>{let p=Date.now(),d={projectName:l,status:o.Ks.CLONING,progress:0,message:"开始克隆项目...",startTime:p};u?.(0,"开始克隆项目...");let g=(0,i.join)(t,l),m=["clone","--progress","--verbose",s,g];a?.(l,"stdout",`[开始克隆] 执行命令: git ${m.join(" ")}
1
+ (()=>{var e={};e.id=522,e.ids=[522],e.modules={135:(e,s,t)=>{"use strict";t.r(s),t.d(s,{patchFetch:()=>f,routeModule:()=>p,serverHooks:()=>m,workAsyncStorage:()=>d,workUnitAsyncStorage:()=>g});var r={};t.r(r),t.d(r,{POST:()=>l});var n=t(9227),i=t(9044),o=t(1131),u=t(4946),c=t(6193),a=t(3873);async function l(e){try{let{projectName:s}=await e.json();if(!s||"string"!=typeof s)return new Response(JSON.stringify({success:!1,error:"项目名称是必需的"}),{status:400,headers:{"Content-Type":"application/json"}});if((0,c.e_)(s)!==s)return new Response(JSON.stringify({success:!1,error:"项目名称包含无效字符"}),{status:400,headers:{"Content-Type":"application/json"}});let t=u.tu.WORKSPACE_ROOT,r=(0,a.join)(t,s),n=await (0,c.x9)(r);if(n.success)return new Response(JSON.stringify({success:!0,message:`项目 ${s} 已在 Cursor 中打开`,projectPath:r}),{status:200,headers:{"Content-Type":"application/json"}});return new Response(JSON.stringify({success:!1,error:n.error,projectName:s,projectPath:r}),{status:500,headers:{"Content-Type":"application/json"}})}catch(s){let e=s instanceof Error?s.message:String(s);return console.error("打开项目失败:",s),new Response(JSON.stringify({success:!1,error:`打开项目失败: ${e}`}),{status:500,headers:{"Content-Type":"application/json"}})}}let p=new n.AppRouteRouteModule({definition:{kind:i.RouteKind.APP_ROUTE,page:"/api/open-project/route",pathname:"/api/open-project",filename:"route",bundlePath:"app/api/open-project/route"},resolvedPagePath:"/Users/edy/Documents/Coding/prime-dev-cli/packages/server/src/app/api/open-project/route.ts",nextConfigOutput:"",userland:r}),{workAsyncStorage:d,workUnitAsyncStorage:g,serverHooks:m}=p;function f(){return(0,o.patchFetch)({workAsyncStorage:d,workUnitAsyncStorage:g})}},483:()=>{},846:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},1820:e=>{"use strict";e.exports=require("os")},3033:e=>{"use strict";e.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},3873:e=>{"use strict";e.exports=require("path")},4870:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},4907:()=>{},4946:(e,s,t)=>{"use strict";t.d(s,{Ks:()=>u,lq:()=>o,tu:()=>i});var r=t(1820),n=t(3873);let i={WORKSPACE_ROOT:(0,n.join)((0,r.homedir)(),"Documents","prime-workspace"),GIT_TIMEOUT:3e5,MAX_CONCURRENT_CLONES:Math.max(2,Math.min((0,r.cpus)().length,8)),MAX_RETRY_ATTEMPTS:3},o=(0,n.join)((0,r.homedir)(),".prime-projects.json");var u=function(e){return e.PENDING="pending",e.EXISTING="existing",e.CLONING="cloning",e.SUCCESS="success",e.FAILED="failed",e.RETRYING="retrying",e.INCOMPLETE="incomplete",e}({})},6193:(e,s,t)=>{"use strict";t.d(s,{DR:()=>u,YK:()=>l,eR:()=>c,e_:()=>a,kf:()=>g,x9:()=>m});var r=t(9646),n=t(9021),i=t(3873),o=t(4946);async function u(e){try{return(0,n.existsSync)(e)||(0,n.mkdirSync)(e,{recursive:!0}),{success:!0}}catch(e){return{success:!1,error:`创建工作空间目录失败: ${e instanceof Error?e.message:String(e)}`}}}async function c(e){let{repoUrl:s,targetDir:t,timeout:n,onProgress:u,onError:c,onLog:a}=e,l=(0,i.basename)(s,".git");return new Promise(e=>{let p=Date.now(),d={projectName:l,status:o.Ks.CLONING,progress:0,message:"开始克隆项目...",startTime:p};u?.(0,"开始克隆项目...");let g=(0,i.join)(t,l),m=["clone","--progress","--verbose",s,g];a?.(l,"stdout",`[开始克隆] 执行命令: git ${m.join(" ")}
2
2
  `),a?.(l,"stdout",`[目标目录] ${g}
3
3
  `),a?.(l,"stdout",`[仓库地址] ${s}
4
4
  `);let f=(0,r.spawn)("git",m,{cwd:t,stdio:["pipe","pipe","pipe"]}),y="",x=0;a?.(l,"stdout",`[进程启动] Git 进程 PID: ${f.pid}
@@ -11,4 +11,4 @@
11
11
  ${y}
12
12
  `);let n={...d,status:o.Ks.FAILED,progress:x,message:"克隆失败",error:r||`Git 进程退出,代码: ${s}`,endTime:t};c?.(`${l}: ${n.error}`),e(n)}}),f.on("error",s=>{clearTimeout(C),a?.(l,"stderr",`[进程错误] Git 进程启动失败: ${s.message}
13
13
  `),a?.(l,"stderr",`[错误详情] ${s.stack||"No stack trace"}
14
- `);let t={...d,status:o.Ks.FAILED,progress:x,message:"进程启动失败",error:`进程启动失败: ${s.message}`,endTime:Date.now()};c?.(`${l}: ${s.message}`),e(t)})})}function a(e){return e.replace(/[^a-zA-Z0-9\-_]/g,"")}async function l(e,s){try{let t=(0,i.join)(e,s);if(!(0,n.existsSync)(t))return{exists:!1,status:"not_exists",needsCleanup:!1};let r=(0,i.join)(t,".git");if(!(0,n.existsSync)(r))return{exists:!0,status:"incomplete",needsCleanup:!0};if(!await d(t))return console.log(`检测到不完整的Git仓库: ${t}`),{exists:!0,status:"incomplete",needsCleanup:!0};return{exists:!0,status:"complete",needsCleanup:!1}}catch(e){return console.error(`检查项目 ${s} 状态时出错:`,e),{exists:!1,status:"not_exists",needsCleanup:!1}}}async function p(e,s){return"complete"===(await l(e,s)).status}async function d(e){try{let s=(0,i.join)(e,".git");for(let e of["HEAD","config","refs"]){let t=(0,i.join)(s,e);if(!(0,n.existsSync)(t))return!1}let t=(await n.promises.readdir(e)).filter(e=>".git"!==e);if(0===t.length)return!1;let r=(0,i.join)(s,"HEAD"),o=await n.promises.readFile(r,"utf-8");if(!o.trim()||o.includes("unborn"))return!1;return!0}catch(e){return console.error("检查Git仓库完整性时出错:",e),!1}}async function g(e,s){let t={},r=s.map(async s=>{let r=await p(e,s);t[s]=r});return await Promise.all(r),t}async function m(e){return new Promise(s=>{if(!(0,n.existsSync)(e))return void s({success:!1,error:`项目路径不存在: ${e}`});let t=(0,r.spawn)("cursor",[e],{stdio:["ignore","pipe","pipe"],detached:!0}),i="",o=setTimeout(()=>{t.kill("SIGTERM"),s({success:!1,error:"Cursor 命令执行超时"})},1e4);t.stderr?.on("data",e=>{i+=e.toString()}),t.on("exit",e=>{clearTimeout(o),0===e?s({success:!0}):s({success:!1,error:`Cursor 退出代码: ${e}${i?`, 错误: ${i}`:""}`})}),t.on("error",e=>{clearTimeout(o),e.message.includes("ENOENT")?s({success:!1,error:"Cursor 命令未找到,请确保 Cursor CLI 已正确安装并在 PATH 中"}):s({success:!1,error:`启动 Cursor 失败: ${e.message}`})}),t.unref()})}},1820:e=>{"use strict";e.exports=require("os")},3033:e=>{"use strict";e.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},3873:e=>{"use strict";e.exports=require("path")},4870:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},4907:()=>{},4946:(e,s,t)=>{"use strict";t.d(s,{Ks:()=>u,lq:()=>o,tu:()=>i});var r=t(1820),n=t(3873);let i={WORKSPACE_ROOT:(0,n.join)((0,r.homedir)(),"Documents","prime-workspace"),GIT_TIMEOUT:3e5,MAX_CONCURRENT_CLONES:Math.max(2,Math.min((0,r.cpus)().length,8)),MAX_RETRY_ATTEMPTS:3},o=(0,n.join)((0,r.homedir)(),".prime-projects.json");var u=function(e){return e.PENDING="pending",e.EXISTING="existing",e.CLONING="cloning",e.SUCCESS="success",e.FAILED="failed",e.RETRYING="retrying",e.INCOMPLETE="incomplete",e}({})},7144:(e,s,t)=>{"use strict";t.r(s),t.d(s,{patchFetch:()=>f,routeModule:()=>p,serverHooks:()=>m,workAsyncStorage:()=>d,workUnitAsyncStorage:()=>g});var r={};t.r(r),t.d(r,{POST:()=>l});var n=t(9227),i=t(9044),o=t(1131),u=t(4946),c=t(1804),a=t(3873);async function l(e){try{let{projectName:s}=await e.json();if(!s||"string"!=typeof s)return new Response(JSON.stringify({success:!1,error:"项目名称是必需的"}),{status:400,headers:{"Content-Type":"application/json"}});if((0,c.e_)(s)!==s)return new Response(JSON.stringify({success:!1,error:"项目名称包含无效字符"}),{status:400,headers:{"Content-Type":"application/json"}});let t=u.tu.WORKSPACE_ROOT,r=(0,a.join)(t,s),n=await (0,c.x9)(r);if(n.success)return new Response(JSON.stringify({success:!0,message:`项目 ${s} 已在 Cursor 中打开`,projectPath:r}),{status:200,headers:{"Content-Type":"application/json"}});return new Response(JSON.stringify({success:!1,error:n.error,projectName:s,projectPath:r}),{status:500,headers:{"Content-Type":"application/json"}})}catch(s){let e=s instanceof Error?s.message:String(s);return console.error("打开项目失败:",s),new Response(JSON.stringify({success:!1,error:`打开项目失败: ${e}`}),{status:500,headers:{"Content-Type":"application/json"}})}}let p=new n.AppRouteRouteModule({definition:{kind:i.RouteKind.APP_ROUTE,page:"/api/open-project/route",pathname:"/api/open-project",filename:"route",bundlePath:"app/api/open-project/route"},resolvedPagePath:"/Users/edy/Documents/prime-workspace/prime-dev-cli/packages/server/src/app/api/open-project/route.ts",nextConfigOutput:"",userland:r}),{workAsyncStorage:d,workUnitAsyncStorage:g,serverHooks:m}=p;function f(){return(0,o.patchFetch)({workAsyncStorage:d,workUnitAsyncStorage:g})}},9021:e=>{"use strict";e.exports=require("fs")},9227:(e,s,t)=>{"use strict";e.exports=t(4870)},9294:e=>{"use strict";e.exports=require("next/dist/server/app-render/work-async-storage.external.js")}};var s=require("../../../webpack-runtime.js");s.C(e);var t=e=>s(s.s=e),r=s.X(0,[131],()=>t(7144));module.exports=r})();
14
+ `);let t={...d,status:o.Ks.FAILED,progress:x,message:"进程启动失败",error:`进程启动失败: ${s.message}`,endTime:Date.now()};c?.(`${l}: ${s.message}`),e(t)})})}function a(e){return e.replace(/[^a-zA-Z0-9\-_]/g,"")}async function l(e,s){try{let t=(0,i.join)(e,s);if(!(0,n.existsSync)(t))return{exists:!1,status:"not_exists",needsCleanup:!1};let r=(0,i.join)(t,".git");if(!(0,n.existsSync)(r))return{exists:!0,status:"incomplete",needsCleanup:!0};if(!await d(t))return console.log(`检测到不完整的Git仓库: ${t}`),{exists:!0,status:"incomplete",needsCleanup:!0};return{exists:!0,status:"complete",needsCleanup:!1}}catch(e){return console.error(`检查项目 ${s} 状态时出错:`,e),{exists:!1,status:"not_exists",needsCleanup:!1}}}async function p(e,s){return"complete"===(await l(e,s)).status}async function d(e){try{let s=(0,i.join)(e,".git");for(let e of["HEAD","config","refs"]){let t=(0,i.join)(s,e);if(!(0,n.existsSync)(t))return!1}let t=(await n.promises.readdir(e)).filter(e=>".git"!==e);if(0===t.length)return!1;let r=(0,i.join)(s,"HEAD"),o=await n.promises.readFile(r,"utf-8");if(!o.trim()||o.includes("unborn"))return!1;return!0}catch(e){return console.error("检查Git仓库完整性时出错:",e),!1}}async function g(e,s){let t={},r=s.map(async s=>{let r=await p(e,s);t[s]=r});return await Promise.all(r),t}async function m(e){return new Promise(s=>{if(!(0,n.existsSync)(e))return void s({success:!1,error:`项目路径不存在: ${e}`});let t=(0,r.spawn)("cursor",[e],{stdio:["ignore","pipe","pipe"],detached:!0}),i="",o=setTimeout(()=>{t.kill("SIGTERM"),s({success:!1,error:"Cursor 命令执行超时"})},1e4);t.stderr?.on("data",e=>{i+=e.toString()}),t.on("exit",e=>{clearTimeout(o),0===e?s({success:!0}):s({success:!1,error:`Cursor 退出代码: ${e}${i?`, 错误: ${i}`:""}`})}),t.on("error",e=>{clearTimeout(o),e.message.includes("ENOENT")?s({success:!1,error:"Cursor 命令未找到,请确保 Cursor CLI 已正确安装并在 PATH 中"}):s({success:!1,error:`启动 Cursor 失败: ${e.message}`})}),t.unref()})}},9021:e=>{"use strict";e.exports=require("fs")},9227:(e,s,t)=>{"use strict";e.exports=t(4870)},9294:e=>{"use strict";e.exports=require("next/dist/server/app-render/work-async-storage.external.js")},9646:e=>{"use strict";e.exports=require("child_process")}};var s=require("../../../webpack-runtime.js");s.C(e);var t=e=>s(s.s=e),r=s.X(0,[131],()=>t(135));module.exports=r})();
@@ -1 +1 @@
1
- globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/api/open-project/route"]={"moduleLoading":{"prefix":"/_next/"},"ssrModuleMapping":{"317":{"*":{"id":"5207","name":"*","chunks":[],"async":false}},"1020":{"*":{"id":"9136","name":"*","chunks":[],"async":false}},"3053":{"*":{"id":"767","name":"*","chunks":[],"async":false}},"3561":{"*":{"id":"9855","name":"*","chunks":[],"async":false}},"3604":{"*":{"id":"6996","name":"*","chunks":[],"async":false}},"3636":{"*":{"id":"7774","name":"*","chunks":[],"async":false}},"6665":{"*":{"id":"1681","name":"*","chunks":[],"async":false}},"7472":{"*":{"id":"1249","name":"*","chunks":[],"async":false}},"9203":{"*":{"id":"8751","name":"*","chunks":[],"async":false}},"9510":{"*":{"id":"8843","name":"*","chunks":[],"async":false}}},"edgeSSRModuleMapping":{},"clientModules":{"/Users/edy/Documents/prime-workspace/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/client/components/client-page.js":{"id":3636,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/esm/client/components/client-page.js":{"id":3636,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/client/components/client-segment.js":{"id":1020,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/esm/client/components/client-segment.js":{"id":1020,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/client/components/error-boundary.js":{"id":3604,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/esm/client/components/error-boundary.js":{"id":3604,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/client/components/http-access-fallback/error-boundary.js":{"id":3053,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/esm/client/components/http-access-fallback/error-boundary.js":{"id":3053,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/client/components/layout-router.js":{"id":317,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/esm/client/components/layout-router.js":{"id":317,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/client/components/metadata/async-metadata.js":{"id":3561,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/esm/client/components/metadata/async-metadata.js":{"id":3561,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/client/components/metadata/metadata-boundary.js":{"id":9203,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/esm/client/components/metadata/metadata-boundary.js":{"id":9203,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/client/components/render-from-template-context.js":{"id":6665,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/esm/client/components/render-from-template-context.js":{"id":6665,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/font/google/target.css?{\"path\":\"src/app/layout.tsx\",\"import\":\"Geist\",\"arguments\":[{\"variable\":\"--font-geist-sans\",\"subsets\":[\"latin\"]}],\"variableName\":\"geistSans\"}":{"id":6521,"name":"*","chunks":["177","static/chunks/app/layout-2c381be4c1bb73ed.js"],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/font/google/target.css?{\"path\":\"src/app/layout.tsx\",\"import\":\"Geist_Mono\",\"arguments\":[{\"variable\":\"--font-geist-mono\",\"subsets\":[\"latin\"]}],\"variableName\":\"geistMono\"}":{"id":8947,"name":"*","chunks":["177","static/chunks/app/layout-2c381be4c1bb73ed.js"],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/packages/server/src/app/globals.css":{"id":141,"name":"*","chunks":["177","static/chunks/app/layout-2c381be4c1bb73ed.js"],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/packages/server/src/app/configuration/page.tsx":{"id":9510,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/packages/server/src/components/project-initializer.tsx":{"id":7472,"name":"*","chunks":[],"async":false}},"entryCSSFiles":{"/Users/edy/Documents/prime-workspace/prime-dev-cli/packages/server/src/":[],"/Users/edy/Documents/prime-workspace/prime-dev-cli/packages/server/src/app/layout":[{"inlined":false,"path":"static/css/b10a602544a179de.css"}],"/Users/edy/Documents/prime-workspace/prime-dev-cli/packages/server/src/app/page":[],"/Users/edy/Documents/prime-workspace/prime-dev-cli/packages/server/src/app/api/open-project/route":[]},"rscModuleMapping":{"141":{"*":{"id":"3019","name":"*","chunks":[],"async":false}},"317":{"*":{"id":"7429","name":"*","chunks":[],"async":false}},"1020":{"*":{"id":"9670","name":"*","chunks":[],"async":false}},"3053":{"*":{"id":"5473","name":"*","chunks":[],"async":false}},"3561":{"*":{"id":"8653","name":"*","chunks":[],"async":false}},"3604":{"*":{"id":"1382","name":"*","chunks":[],"async":false}},"3636":{"*":{"id":"4928","name":"*","chunks":[],"async":false}},"6665":{"*":{"id":"9687","name":"*","chunks":[],"async":false}},"7472":{"*":{"id":"9624","name":"*","chunks":[],"async":false}},"9203":{"*":{"id":"8757","name":"*","chunks":[],"async":false}},"9510":{"*":{"id":"4761","name":"*","chunks":[],"async":false}}},"edgeRscModuleMapping":{"317":{"*":{"id":"5207","name":"*","chunks":[],"async":false}},"1020":{"*":{"id":"9136","name":"*","chunks":[],"async":false}},"3053":{"*":{"id":"767","name":"*","chunks":[],"async":false}},"3561":{"*":{"id":"9855","name":"*","chunks":[],"async":false}},"3604":{"*":{"id":"6996","name":"*","chunks":[],"async":false}},"3636":{"*":{"id":"7774","name":"*","chunks":[],"async":false}},"6665":{"*":{"id":"1681","name":"*","chunks":[],"async":false}},"9203":{"*":{"id":"8751","name":"*","chunks":[],"async":false}}}}
1
+ globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/api/open-project/route"]={"moduleLoading":{"prefix":"/_next/"},"ssrModuleMapping":{"317":{"*":{"id":"5207","name":"*","chunks":[],"async":false}},"1020":{"*":{"id":"9136","name":"*","chunks":[],"async":false}},"3053":{"*":{"id":"767","name":"*","chunks":[],"async":false}},"3561":{"*":{"id":"9855","name":"*","chunks":[],"async":false}},"3604":{"*":{"id":"6996","name":"*","chunks":[],"async":false}},"3636":{"*":{"id":"7774","name":"*","chunks":[],"async":false}},"6175":{"*":{"id":"8786","name":"*","chunks":[],"async":false}},"6665":{"*":{"id":"1681","name":"*","chunks":[],"async":false}},"7472":{"*":{"id":"1249","name":"*","chunks":[],"async":false}},"9203":{"*":{"id":"8751","name":"*","chunks":[],"async":false}}},"edgeSSRModuleMapping":{},"clientModules":{"/Users/edy/Documents/Coding/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/client/components/client-page.js":{"id":3636,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/Coding/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/esm/client/components/client-page.js":{"id":3636,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/Coding/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/client/components/client-segment.js":{"id":1020,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/Coding/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/esm/client/components/client-segment.js":{"id":1020,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/Coding/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/client/components/error-boundary.js":{"id":3604,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/Coding/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/esm/client/components/error-boundary.js":{"id":3604,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/Coding/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/client/components/http-access-fallback/error-boundary.js":{"id":3053,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/Coding/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/esm/client/components/http-access-fallback/error-boundary.js":{"id":3053,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/Coding/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/client/components/layout-router.js":{"id":317,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/Coding/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/esm/client/components/layout-router.js":{"id":317,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/Coding/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/client/components/metadata/async-metadata.js":{"id":3561,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/Coding/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/esm/client/components/metadata/async-metadata.js":{"id":3561,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/Coding/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/client/components/metadata/metadata-boundary.js":{"id":9203,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/Coding/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/esm/client/components/metadata/metadata-boundary.js":{"id":9203,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/Coding/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/client/components/render-from-template-context.js":{"id":6665,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/Coding/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/esm/client/components/render-from-template-context.js":{"id":6665,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/Coding/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/font/google/target.css?{\"path\":\"src/app/layout.tsx\",\"import\":\"Geist\",\"arguments\":[{\"variable\":\"--font-geist-sans\",\"subsets\":[\"latin\"]}],\"variableName\":\"geistSans\"}":{"id":6521,"name":"*","chunks":["177","static/chunks/app/layout-84c22b799284e008.js"],"async":false},"/Users/edy/Documents/Coding/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/font/google/target.css?{\"path\":\"src/app/layout.tsx\",\"import\":\"Geist_Mono\",\"arguments\":[{\"variable\":\"--font-geist-mono\",\"subsets\":[\"latin\"]}],\"variableName\":\"geistMono\"}":{"id":8947,"name":"*","chunks":["177","static/chunks/app/layout-84c22b799284e008.js"],"async":false},"/Users/edy/Documents/Coding/prime-dev-cli/packages/server/src/app/globals.css":{"id":141,"name":"*","chunks":["177","static/chunks/app/layout-84c22b799284e008.js"],"async":false},"/Users/edy/Documents/Coding/prime-dev-cli/packages/server/src/app/configuration/page.tsx":{"id":6175,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/Coding/prime-dev-cli/packages/server/src/components/project-initializer.tsx":{"id":7472,"name":"*","chunks":[],"async":false}},"entryCSSFiles":{"/Users/edy/Documents/Coding/prime-dev-cli/packages/server/src/":[],"/Users/edy/Documents/Coding/prime-dev-cli/packages/server/src/app/layout":[{"inlined":false,"path":"static/css/1c3633790ce12b77.css"}],"/Users/edy/Documents/Coding/prime-dev-cli/packages/server/src/app/page":[],"/Users/edy/Documents/Coding/prime-dev-cli/packages/server/src/app/api/open-project/route":[]},"rscModuleMapping":{"141":{"*":{"id":"3019","name":"*","chunks":[],"async":false}},"317":{"*":{"id":"7429","name":"*","chunks":[],"async":false}},"1020":{"*":{"id":"9670","name":"*","chunks":[],"async":false}},"3053":{"*":{"id":"5473","name":"*","chunks":[],"async":false}},"3561":{"*":{"id":"8653","name":"*","chunks":[],"async":false}},"3604":{"*":{"id":"1382","name":"*","chunks":[],"async":false}},"3636":{"*":{"id":"4928","name":"*","chunks":[],"async":false}},"6175":{"*":{"id":"4761","name":"*","chunks":[],"async":false}},"6665":{"*":{"id":"9687","name":"*","chunks":[],"async":false}},"7472":{"*":{"id":"9624","name":"*","chunks":[],"async":false}},"9203":{"*":{"id":"8757","name":"*","chunks":[],"async":false}}},"edgeRscModuleMapping":{"317":{"*":{"id":"5207","name":"*","chunks":[],"async":false}},"1020":{"*":{"id":"9136","name":"*","chunks":[],"async":false}},"3053":{"*":{"id":"767","name":"*","chunks":[],"async":false}},"3561":{"*":{"id":"9855","name":"*","chunks":[],"async":false}},"3604":{"*":{"id":"6996","name":"*","chunks":[],"async":false}},"3636":{"*":{"id":"7774","name":"*","chunks":[],"async":false}},"6665":{"*":{"id":"1681","name":"*","chunks":[],"async":false}},"9203":{"*":{"id":"8751","name":"*","chunks":[],"async":false}}}}
@@ -0,0 +1 @@
1
+ (()=>{var e={};e.id=73,e.ids=[73],e.modules={483:()=>{},846:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},1820:e=>{"use strict";e.exports=require("os")},3033:e=>{"use strict";e.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},3295:e=>{"use strict";e.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},3514:(e,s,r)=>{"use strict";r.r(s),r.d(s,{patchFetch:()=>y,routeModule:()=>v,serverHooks:()=>R,workAsyncStorage:()=>f,workUnitAsyncStorage:()=>h});var t={};r.r(t),r.d(t,{DELETE:()=>j,GET:()=>m});var o=r(9227),n=r(9044),a=r(1131),u=r(7642),i=r(3873),c=r.n(i),p=r(9748),l=r.n(p),d=r(1820),g=r.n(d);function x(e,s){let r=`${e}-${s}`;return c().join(g().homedir(),".prime-process-logs",`${r}.log`)}async function m(e){try{let{searchParams:s}=new URL(e.url),r=s.get("projectName"),t=s.get("envName"),o=s.get("tail")||"100";if(!r||!t)return u.NextResponse.json({success:!1,error:"缺少必要参数"},{status:400});let n=x(r,t);try{let e=(await l().readFile(n,"utf-8")).split("\n").filter(e=>e.trim()),s=parseInt(o),r=e.slice(-s);return u.NextResponse.json({success:!0,data:{logs:r,totalLines:e.length,tailCount:r.length}})}catch{return u.NextResponse.json({success:!0,data:{logs:[],totalLines:0,tailCount:0}})}}catch(e){return console.error("获取进程日志失败:",e),u.NextResponse.json({success:!1,error:e instanceof Error?e.message:"获取进程日志失败"},{status:500})}}async function j(e){try{let{searchParams:s}=new URL(e.url),r=s.get("projectName"),t=s.get("envName");if(!r||!t)return u.NextResponse.json({success:!1,error:"缺少必要参数"},{status:400});let o=x(r,t);try{return await l().unlink(o),u.NextResponse.json({success:!0,message:"日志已清除"})}catch{return u.NextResponse.json({success:!0,message:"日志文件不存在"})}}catch(e){return console.error("清除进程日志失败:",e),u.NextResponse.json({success:!1,error:e instanceof Error?e.message:"清除进程日志失败"},{status:500})}}let v=new o.AppRouteRouteModule({definition:{kind:n.RouteKind.APP_ROUTE,page:"/api/process/logs/route",pathname:"/api/process/logs",filename:"route",bundlePath:"app/api/process/logs/route"},resolvedPagePath:"/Users/edy/Documents/Coding/prime-dev-cli/packages/server/src/app/api/process/logs/route.ts",nextConfigOutput:"",userland:t}),{workAsyncStorage:f,workUnitAsyncStorage:h,serverHooks:R}=v;function y(){return(0,a.patchFetch)({workAsyncStorage:f,workUnitAsyncStorage:h})}},3873:e=>{"use strict";e.exports=require("path")},4870:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},4907:()=>{},9294:e=>{"use strict";e.exports=require("next/dist/server/app-render/work-async-storage.external.js")},9748:e=>{"use strict";e.exports=require("fs/promises")}};var s=require("../../../../webpack-runtime.js");s.C(e);var r=e=>s(s.s=e),t=s.X(0,[131,426],()=>r(3514));module.exports=t})();
@@ -0,0 +1 @@
1
+ {"version":1,"files":["../../../../../../../../node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/client/components/app-router-headers.js","../../../../../../../../node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../../../../node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../../../node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js","../../../../../../../../node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/compiled/next-server/app-route.runtime.prod.js","../../../../../../../../node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/server/app-render/action-async-storage-instance.js","../../../../../../../../node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/server/app-render/action-async-storage.external.js","../../../../../../../../node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/server/app-render/after-task-async-storage-instance.js","../../../../../../../../node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/server/app-render/after-task-async-storage.external.js","../../../../../../../../node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/server/app-render/async-local-storage.js","../../../../../../../../node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/server/app-render/clean-async-snapshot-instance.js","../../../../../../../../node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/server/app-render/clean-async-snapshot.external.js","../../../../../../../../node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/server/app-render/work-async-storage-instance.js","../../../../../../../../node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/server/app-render/work-async-storage.external.js","../../../../../../../../node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/server/app-render/work-unit-async-storage-instance.js","../../../../../../../../node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/server/app-render/work-unit-async-storage.external.js","../../../../../../../../node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/server/lib/incremental-cache/tags-manifest.external.js","../../../../../../../../node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/server/lib/trace/constants.js","../../../../../../../../node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/server/lib/trace/tracer.js","../../../../../../../../node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/shared/lib/is-thenable.js","../../../../../../../../node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/package.json","../../../../../../../../package.json","../../../../../../node_modules/next","../../../../../../package.json","../../../../../package.json","../../../../chunks/131.js","../../../../chunks/426.js","../../../../webpack-runtime.js","route_client-reference-manifest.js"]}
@@ -0,0 +1 @@
1
+ globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/api/process/logs/route"]={"moduleLoading":{"prefix":"/_next/"},"ssrModuleMapping":{"317":{"*":{"id":"5207","name":"*","chunks":[],"async":false}},"1020":{"*":{"id":"9136","name":"*","chunks":[],"async":false}},"3053":{"*":{"id":"767","name":"*","chunks":[],"async":false}},"3561":{"*":{"id":"9855","name":"*","chunks":[],"async":false}},"3604":{"*":{"id":"6996","name":"*","chunks":[],"async":false}},"3636":{"*":{"id":"7774","name":"*","chunks":[],"async":false}},"6175":{"*":{"id":"8786","name":"*","chunks":[],"async":false}},"6665":{"*":{"id":"1681","name":"*","chunks":[],"async":false}},"7472":{"*":{"id":"1249","name":"*","chunks":[],"async":false}},"9203":{"*":{"id":"8751","name":"*","chunks":[],"async":false}}},"edgeSSRModuleMapping":{},"clientModules":{"/Users/edy/Documents/Coding/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/client/components/client-page.js":{"id":3636,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/Coding/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/esm/client/components/client-page.js":{"id":3636,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/Coding/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/client/components/client-segment.js":{"id":1020,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/Coding/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/esm/client/components/client-segment.js":{"id":1020,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/Coding/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/client/components/error-boundary.js":{"id":3604,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/Coding/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/esm/client/components/error-boundary.js":{"id":3604,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/Coding/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/client/components/http-access-fallback/error-boundary.js":{"id":3053,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/Coding/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/esm/client/components/http-access-fallback/error-boundary.js":{"id":3053,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/Coding/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/client/components/layout-router.js":{"id":317,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/Coding/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/esm/client/components/layout-router.js":{"id":317,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/Coding/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/client/components/metadata/async-metadata.js":{"id":3561,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/Coding/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/esm/client/components/metadata/async-metadata.js":{"id":3561,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/Coding/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/client/components/metadata/metadata-boundary.js":{"id":9203,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/Coding/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/esm/client/components/metadata/metadata-boundary.js":{"id":9203,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/Coding/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/client/components/render-from-template-context.js":{"id":6665,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/Coding/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/esm/client/components/render-from-template-context.js":{"id":6665,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/Coding/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/font/google/target.css?{\"path\":\"src/app/layout.tsx\",\"import\":\"Geist\",\"arguments\":[{\"variable\":\"--font-geist-sans\",\"subsets\":[\"latin\"]}],\"variableName\":\"geistSans\"}":{"id":6521,"name":"*","chunks":["177","static/chunks/app/layout-84c22b799284e008.js"],"async":false},"/Users/edy/Documents/Coding/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/font/google/target.css?{\"path\":\"src/app/layout.tsx\",\"import\":\"Geist_Mono\",\"arguments\":[{\"variable\":\"--font-geist-mono\",\"subsets\":[\"latin\"]}],\"variableName\":\"geistMono\"}":{"id":8947,"name":"*","chunks":["177","static/chunks/app/layout-84c22b799284e008.js"],"async":false},"/Users/edy/Documents/Coding/prime-dev-cli/packages/server/src/app/globals.css":{"id":141,"name":"*","chunks":["177","static/chunks/app/layout-84c22b799284e008.js"],"async":false},"/Users/edy/Documents/Coding/prime-dev-cli/packages/server/src/app/configuration/page.tsx":{"id":6175,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/Coding/prime-dev-cli/packages/server/src/components/project-initializer.tsx":{"id":7472,"name":"*","chunks":[],"async":false}},"entryCSSFiles":{"/Users/edy/Documents/Coding/prime-dev-cli/packages/server/src/":[],"/Users/edy/Documents/Coding/prime-dev-cli/packages/server/src/app/layout":[{"inlined":false,"path":"static/css/1c3633790ce12b77.css"}],"/Users/edy/Documents/Coding/prime-dev-cli/packages/server/src/app/page":[],"/Users/edy/Documents/Coding/prime-dev-cli/packages/server/src/app/api/process/logs/route":[]},"rscModuleMapping":{"141":{"*":{"id":"3019","name":"*","chunks":[],"async":false}},"317":{"*":{"id":"7429","name":"*","chunks":[],"async":false}},"1020":{"*":{"id":"9670","name":"*","chunks":[],"async":false}},"3053":{"*":{"id":"5473","name":"*","chunks":[],"async":false}},"3561":{"*":{"id":"8653","name":"*","chunks":[],"async":false}},"3604":{"*":{"id":"1382","name":"*","chunks":[],"async":false}},"3636":{"*":{"id":"4928","name":"*","chunks":[],"async":false}},"6175":{"*":{"id":"4761","name":"*","chunks":[],"async":false}},"6665":{"*":{"id":"9687","name":"*","chunks":[],"async":false}},"7472":{"*":{"id":"9624","name":"*","chunks":[],"async":false}},"9203":{"*":{"id":"8757","name":"*","chunks":[],"async":false}}},"edgeRscModuleMapping":{"317":{"*":{"id":"5207","name":"*","chunks":[],"async":false}},"1020":{"*":{"id":"9136","name":"*","chunks":[],"async":false}},"3053":{"*":{"id":"767","name":"*","chunks":[],"async":false}},"3561":{"*":{"id":"9855","name":"*","chunks":[],"async":false}},"3604":{"*":{"id":"6996","name":"*","chunks":[],"async":false}},"3636":{"*":{"id":"7774","name":"*","chunks":[],"async":false}},"6665":{"*":{"id":"1681","name":"*","chunks":[],"async":false}},"9203":{"*":{"id":"8751","name":"*","chunks":[],"async":false}}}}