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.
- package/config/projects.json +33 -17
- package/dist/server/.next/BUILD_ID +1 -1
- package/dist/server/.next/app-build-manifest.json +81 -53
- package/dist/server/.next/app-path-routes-manifest.json +14 -10
- package/dist/server/.next/build-manifest.json +3 -3
- package/dist/server/.next/cache/.rscinfo +1 -1
- package/dist/server/.next/cache/.tsbuildinfo +1 -1
- package/dist/server/.next/cache/eslint/.cache_1qa5vxt +1 -1
- package/dist/server/.next/cache/webpack/client-production/0.pack +0 -0
- package/dist/server/.next/cache/webpack/client-production/1.pack +0 -0
- package/dist/server/.next/cache/webpack/client-production/11.pack +0 -0
- package/dist/server/.next/cache/webpack/client-production/13.pack +0 -0
- package/dist/server/.next/cache/webpack/client-production/14.pack +0 -0
- package/dist/server/.next/cache/webpack/client-production/15.pack +0 -0
- package/dist/server/.next/cache/webpack/client-production/16.pack +0 -0
- package/dist/server/.next/cache/webpack/client-production/17.pack +0 -0
- package/dist/server/.next/cache/webpack/client-production/18.pack +0 -0
- package/dist/server/.next/cache/webpack/client-production/2.pack +0 -0
- package/dist/server/.next/cache/webpack/client-production/3.pack +0 -0
- package/dist/server/.next/cache/webpack/client-production/4.pack +0 -0
- package/dist/server/.next/cache/webpack/client-production/5.pack +0 -0
- package/dist/server/.next/cache/webpack/client-production/6.pack +0 -0
- package/dist/server/.next/cache/webpack/client-production/7.pack +0 -0
- package/dist/server/.next/cache/webpack/client-production/8.pack +0 -0
- package/dist/server/.next/cache/webpack/client-production/index.pack +0 -0
- package/dist/server/.next/cache/webpack/client-production/index.pack.old +0 -0
- package/dist/server/.next/cache/webpack/edge-server-production/index.pack +0 -0
- package/dist/server/.next/cache/webpack/server-production/0.pack +0 -0
- package/dist/server/.next/cache/webpack/server-production/1.pack +0 -0
- package/dist/server/.next/cache/webpack/server-production/2.pack +0 -0
- package/dist/server/.next/cache/webpack/server-production/3.pack +0 -0
- package/dist/server/.next/cache/webpack/server-production/4.pack +0 -0
- package/dist/server/.next/cache/webpack/server-production/6.pack +0 -0
- package/dist/server/.next/cache/webpack/server-production/7.pack +0 -0
- package/dist/server/.next/cache/webpack/server-production/8.pack +0 -0
- package/dist/server/.next/cache/webpack/server-production/9.pack +0 -0
- package/dist/server/.next/cache/webpack/server-production/index.pack +0 -0
- package/dist/server/.next/cache/webpack/server-production/index.pack.old +0 -0
- package/dist/server/.next/next-minimal-server.js.nft.json +1 -1
- package/dist/server/.next/next-server.js.nft.json +1 -1
- package/dist/server/.next/prerender-manifest.json +9 -9
- package/dist/server/.next/required-server-files.json +3 -3
- package/dist/server/.next/server/app/_not-found/page.js +1 -1
- package/dist/server/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/dist/server/.next/server/app/_not-found.html +1 -1
- package/dist/server/.next/server/app/_not-found.rsc +2 -2
- package/dist/server/.next/server/app/api/all-projects-envs/route.js +1 -1
- package/dist/server/.next/server/app/api/all-projects-envs/route_client-reference-manifest.js +1 -1
- package/dist/server/.next/server/app/api/check-mock-intercept/route.js +1 -1
- package/dist/server/.next/server/app/api/check-mock-intercept/route_client-reference-manifest.js +1 -1
- package/dist/server/.next/server/app/api/check-workspace/route.js +2 -2
- package/dist/server/.next/server/app/api/check-workspace/route_client-reference-manifest.js +1 -1
- package/dist/server/.next/server/app/api/cleanup-project/route.js +1 -1
- package/dist/server/.next/server/app/api/cleanup-project/route_client-reference-manifest.js +1 -1
- package/dist/server/.next/server/app/api/get-mock-data/route.js +1 -1
- package/dist/server/.next/server/app/api/get-mock-data/route_client-reference-manifest.js +1 -1
- package/dist/server/.next/server/app/api/initialize-workspace/route.js +6 -6
- package/dist/server/.next/server/app/api/initialize-workspace/route_client-reference-manifest.js +1 -1
- package/dist/server/.next/server/app/api/microapp-proxy-change-stream/route.js +3 -3
- package/dist/server/.next/server/app/api/microapp-proxy-change-stream/route_client-reference-manifest.js +1 -1
- package/dist/server/.next/server/app/api/microapp-proxy-config/route.js +2 -2
- package/dist/server/.next/server/app/api/microapp-proxy-config/route_client-reference-manifest.js +1 -1
- package/dist/server/.next/server/app/api/mock-file/route.js +2 -2
- package/dist/server/.next/server/app/api/mock-file/route_client-reference-manifest.js +1 -1
- package/dist/server/.next/server/app/api/mock-file-content/route.js +1 -1
- package/dist/server/.next/server/app/api/mock-file-content/route_client-reference-manifest.js +1 -1
- package/dist/server/.next/server/app/api/mock-open-status/route.js +3 -3
- package/dist/server/.next/server/app/api/mock-open-status/route_client-reference-manifest.js +1 -1
- package/dist/server/.next/server/app/api/mock-setting/route.js +1 -1
- package/dist/server/.next/server/app/api/mock-setting/route_client-reference-manifest.js +1 -1
- package/dist/server/.next/server/app/api/open-project/route.js +2 -2
- package/dist/server/.next/server/app/api/open-project/route_client-reference-manifest.js +1 -1
- package/dist/server/.next/server/app/api/process/logs/route.js +1 -0
- package/dist/server/.next/server/app/api/process/logs/route.js.nft.json +1 -0
- package/dist/server/.next/server/app/api/process/logs/route_client-reference-manifest.js +1 -0
- package/dist/server/.next/server/app/api/process/logs/stream/route.js +9 -0
- package/dist/server/.next/server/app/api/process/logs/stream/route.js.nft.json +1 -0
- package/dist/server/.next/server/app/api/process/logs/stream/route_client-reference-manifest.js +1 -0
- package/dist/server/.next/server/app/api/process/start/route.js +1 -0
- package/dist/server/.next/server/app/api/process/start/route.js.nft.json +1 -0
- package/dist/server/.next/server/app/api/process/start/route_client-reference-manifest.js +1 -0
- package/dist/server/.next/server/app/api/process/status/route.js +1 -0
- package/dist/server/.next/server/app/api/process/status/route.js.nft.json +1 -0
- package/dist/server/.next/server/app/api/process/status/route_client-reference-manifest.js +1 -0
- package/dist/server/.next/server/app/api/project-config/route.js +1 -1
- package/dist/server/.next/server/app/api/project-config/route_client-reference-manifest.js +1 -1
- package/dist/server/.next/server/app/api/retry-project/route.js +9 -9
- package/dist/server/.next/server/app/api/retry-project/route_client-reference-manifest.js +1 -1
- package/dist/server/.next/server/app/configuration/page.js +7 -7
- package/dist/server/.next/server/app/configuration/page_client-reference-manifest.js +1 -1
- package/dist/server/.next/server/app/configuration.html +1 -1
- package/dist/server/.next/server/app/configuration.rsc +3 -3
- package/dist/server/.next/server/app/favicon.ico/route.js +1 -1
- package/dist/server/.next/server/app/index.html +1 -1
- package/dist/server/.next/server/app/index.rsc +2 -2
- package/dist/server/.next/server/app/initialization/page.js +1 -1
- package/dist/server/.next/server/app/initialization/page_client-reference-manifest.js +1 -1
- package/dist/server/.next/server/app/initialization.html +1 -1
- package/dist/server/.next/server/app/initialization.rsc +3 -3
- package/dist/server/.next/server/app/page.js +1 -1
- package/dist/server/.next/server/app/page_client-reference-manifest.js +1 -1
- package/dist/server/.next/server/app-paths-manifest.json +14 -10
- package/dist/server/.next/server/chunks/967.js +3 -3
- package/dist/server/.next/server/middleware-build-manifest.js +1 -1
- package/dist/server/.next/server/next-font-manifest.js +1 -1
- package/dist/server/.next/server/next-font-manifest.json +1 -1
- package/dist/server/.next/server/pages/404.html +1 -1
- package/dist/server/.next/server/pages/500.html +1 -1
- package/dist/server/.next/server/pages-manifest.json +1 -1
- package/dist/server/.next/server/server-reference-manifest.json +1 -1
- package/dist/server/.next/static/0YG3L7wZtbtQp2XameODj/_buildManifest.js +1 -0
- package/dist/server/.next/static/0YG3L7wZtbtQp2XameODj/_ssgManifest.js +1 -0
- package/dist/server/.next/static/Mmn2KHpe4Btd9UFvAkzbC/_buildManifest.js +1 -0
- package/dist/server/.next/static/Mmn2KHpe4Btd9UFvAkzbC/_ssgManifest.js +1 -0
- package/dist/server/.next/static/MwYZh9prxBMJtf26zAtTY/_buildManifest.js +1 -0
- package/dist/server/.next/static/MwYZh9prxBMJtf26zAtTY/_ssgManifest.js +1 -0
- package/dist/server/.next/static/chunks/495-1a64c3075b5b8ac4.js +1 -0
- package/dist/server/.next/static/chunks/app/api/all-projects-envs/route-4a1691275c5ae416.js +1 -0
- package/dist/server/.next/static/chunks/app/api/check-mock-intercept/route-f2e048a9d229f7e7.js +1 -0
- package/dist/server/.next/static/chunks/app/api/check-workspace/route-3569564cd2b09683.js +1 -0
- package/dist/server/.next/static/chunks/app/api/cleanup-project/route-a6c005b8a485a192.js +1 -0
- package/dist/server/.next/static/chunks/app/api/get-mock-data/route-0ff137f28b0bbfd4.js +1 -0
- package/dist/server/.next/static/chunks/app/api/initialize-workspace/route-7faec0a7a2e6383d.js +1 -0
- package/dist/server/.next/static/chunks/app/api/microapp-proxy-change-stream/route-81a2d573a6a5b3d9.js +1 -0
- package/dist/server/.next/static/chunks/app/api/microapp-proxy-config/route-05c8c2aae5088b98.js +1 -0
- package/dist/server/.next/static/chunks/app/api/mock-file/route-606d825407e0fd4c.js +1 -0
- package/dist/server/.next/static/chunks/app/api/mock-file-content/route-4bc78ec0cbed800a.js +1 -0
- package/dist/server/.next/static/chunks/app/api/mock-open-status/route-a9410ab77572cb9e.js +1 -0
- package/dist/server/.next/static/chunks/app/api/mock-setting/route-48cfb30a284d746d.js +1 -0
- package/dist/server/.next/static/chunks/app/api/open-project/route-b6e6fca6c827640d.js +1 -0
- package/dist/server/.next/static/chunks/app/api/process/logs/route-3d9ee52d7c8aacef.js +1 -0
- package/dist/server/.next/static/chunks/app/api/process/logs/stream/route-e9633e0e72dfb31b.js +1 -0
- package/dist/server/.next/static/chunks/app/api/process/start/route-54c553f9e551d14b.js +1 -0
- package/dist/server/.next/static/chunks/app/api/process/status/route-06151b6ca21ffd52.js +1 -0
- package/dist/server/.next/static/chunks/app/api/project-config/route-ebe1c2ee41dedc74.js +1 -0
- package/dist/server/.next/static/chunks/app/api/retry-project/route-c25d253b5eacedef.js +1 -0
- package/dist/server/.next/static/chunks/app/configuration/page-978351fa7fe07983.js +1 -0
- package/dist/server/.next/static/chunks/app/page-9e7caf746eefeed4.js +1 -0
- package/dist/server/.next/static/css/1c3633790ce12b77.css +3 -0
- package/dist/server/.next/trace +3 -12
- package/dist/server/.next/types/app/api/all-projects-envs/route.ts +1 -1
- package/dist/server/.next/types/app/api/check-mock-intercept/route.ts +1 -1
- package/dist/server/.next/types/app/api/check-workspace/route.ts +1 -1
- package/dist/server/.next/types/app/api/cleanup-project/route.ts +1 -1
- package/dist/server/.next/types/app/api/get-mock-data/route.ts +1 -1
- package/dist/server/.next/types/app/api/initialize-workspace/route.ts +1 -1
- package/dist/server/.next/types/app/api/microapp-proxy-change-stream/route.ts +1 -1
- package/dist/server/.next/types/app/api/microapp-proxy-config/route.ts +1 -1
- package/dist/server/.next/types/app/api/mock-file/route.ts +1 -1
- package/dist/server/.next/types/app/api/mock-file-content/route.ts +1 -1
- package/dist/server/.next/types/app/api/mock-open-status/route.ts +1 -1
- package/dist/server/.next/types/app/api/mock-setting/route.ts +1 -1
- package/dist/server/.next/types/app/api/open-project/route.ts +1 -1
- package/dist/server/.next/types/app/api/process/logs/route.ts +347 -0
- package/dist/server/.next/types/app/api/process/logs/stream/route.ts +347 -0
- package/dist/server/.next/types/app/api/process/start/route.ts +347 -0
- package/dist/server/.next/types/app/api/process/status/route.ts +347 -0
- package/dist/server/.next/types/app/api/project-config/route.ts +1 -1
- package/dist/server/.next/types/app/api/retry-project/route.ts +1 -1
- package/dist/server/.next/types/app/configuration/page.ts +1 -1
- package/dist/server/.next/types/app/initialization/page.ts +1 -1
- package/dist/server/.next/types/app/layout.ts +1 -1
- package/dist/server/.next/types/app/page.ts +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
(()=>{var e={};e.id=540,e.ids=[540],e.modules={483:()=>{},846:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},1402:(e,t,r)=>{"use strict";r.r(t),r.d(t,{patchFetch:()=>v,routeModule:()=>m,serverHooks:()=>y,workAsyncStorage:()=>f,workUnitAsyncStorage:()=>x});var s={};r.r(s),r.d(s,{GET:()=>g});var n=r(9227),a=r(9044),i=r(1131),o=r(3873),u=r.n(o),p=r(9748),c=r.n(p),l=r(1820),d=r.n(l);async function g(e){let{searchParams:t}=new URL(e.url),r=t.get("projectName"),s=t.get("envName");if(!r||!s)return new Response("缺少必要参数",{status:400});let n=function(e,t){let r=`${e}-${t}`;return u().join(d().homedir(),".prime-process-logs",`${r}.log`)}(r,s);return new Response(new ReadableStream({async start(t){let r=new TextEncoder;t.enqueue(r.encode(": ping\n\n"));try{for(let e of(await c().readFile(n,"utf-8")).split("\n").filter(e=>e.trim()).slice(-100)){let s=`data: ${JSON.stringify({type:"log",content:e})}
|
|
2
|
+
|
|
3
|
+
`;t.enqueue(r.encode(s))}}catch{let e=`data: ${JSON.stringify({type:"init",message:"等待日志..."})}
|
|
4
|
+
|
|
5
|
+
`;t.enqueue(r.encode(e))}let s=0;try{s=(await c().stat(n)).size}catch{}let a=setInterval(async()=>{try{let e=await c().stat(n);if(e.size>s){let a=await c().open(n,"r"),i=Buffer.alloc(e.size-s);for(let e of(await a.read(i,0,i.length,s),await a.close(),i.toString("utf-8").split("\n").filter(e=>e.trim()))){let s=`data: ${JSON.stringify({type:"log",content:e})}
|
|
6
|
+
|
|
7
|
+
`;t.enqueue(r.encode(s))}s=e.size}}catch{if(s>0){let e=`data: ${JSON.stringify({type:"end",message:"进程已结束"})}
|
|
8
|
+
|
|
9
|
+
`;t.enqueue(r.encode(e)),s=0}}t.enqueue(r.encode(": ping\n\n"))},1e3);e.signal.addEventListener("abort",()=>{clearInterval(a),t.close()})}}),{headers:{"Content-Type":"text/event-stream","Cache-Control":"no-cache",Connection:"keep-alive"}})}let m=new n.AppRouteRouteModule({definition:{kind:a.RouteKind.APP_ROUTE,page:"/api/process/logs/stream/route",pathname:"/api/process/logs/stream",filename:"route",bundlePath:"app/api/process/logs/stream/route"},resolvedPagePath:"/Users/edy/Documents/Coding/prime-dev-cli/packages/server/src/app/api/process/logs/stream/route.ts",nextConfigOutput:"",userland:s}),{workAsyncStorage:f,workUnitAsyncStorage:x,serverHooks:y}=m;function v(){return(0,i.patchFetch)({workAsyncStorage:f,workUnitAsyncStorage:x})}},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:()=>{},9227:(e,t,r)=>{"use strict";e.exports=r(4870)},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],()=>r(1402));module.exports=s})();
|
|
@@ -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","../../../../../../../node_modules/next","../../../../../../../package.json","../../../../../../package.json","../../../../../chunks/131.js","../../../../../webpack-runtime.js","route_client-reference-manifest.js"]}
|
package/dist/server/.next/server/app/api/process/logs/stream/route_client-reference-manifest.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/api/process/logs/stream/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":[],"/Users/edy/Documents/Coding/prime-dev-cli/packages/server/src/app/api/process/logs/stream/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=172,e.ids=[172],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:()=>o,sF:()=>n});var s=r(9748),i=r(4946);async function o(){try{await (0,s.access)(i.lq,s.constants.F_OK)}catch{return await n({}),{}}try{let e=await (0,s.readFile)(i.lq,"utf-8");if(!e)return{};return JSON.parse(e)}catch(e){throw console.error("读取或解析项目配置文件失败:",e),Error("无法加载项目配置")}}async function n(e){let t=i.lq+".tmp";try{await (0,s.writeFile)(t,JSON.stringify(e,null,2),"utf-8"),await (0,s.rename)(t,i.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:()=>o});var s=r(1820),i=r(3873);let o={WORKSPACE_ROOT:(0,i.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,i.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}({})},6145:(e,t,r)=>{"use strict";r.r(t),r.d(t,{patchFetch:()=>C,routeModule:()=>I,serverHooks:()=>A,workAsyncStorage:()=>q,workUnitAsyncStorage:()=>$});var s={};r.r(s),r.d(s,{DELETE:()=>k,POST:()=>O});var i=r(9227),o=r(9044),n=r(1131),a=r(7642),c=r(9646),p=r(3873),l=r.n(p),u=r(9748),d=r.n(u),m=r(1820),w=r.n(m);let f=(0,r(8354).promisify)(c.exec);function h(){return l().join(w().homedir(),".prime-processes.json")}async function g(e){try{if("win32"!==process.platform)return process.kill(e,0),!0;{let{stdout:t}=await f(`tasklist /FI "PID eq ${e}"`);return t.includes(e.toString())}}catch{return!1}}async function x(){try{let e=await d().readFile(h(),"utf-8"),t=JSON.parse(e),r=[];for(let e of t)await g(e.pid)&&r.push(e);return r.length!==t.length&&await d().writeFile(h(),JSON.stringify(r,null,2)),r}catch{return[]}}var y=r(2601),N=r(4946);let j=new Map;function R(e){return l().join(w().homedir(),".prime-process-logs",`${e}.log`)}async function S(e,t){let r=l().join(w().homedir(),".prime-process-logs"),s=R(e);try{await d().mkdir(r,{recursive:!0}),await d().writeFile(s,t.join("\n"),"utf-8")}catch(e){console.error("保存进程日志失败:",e)}}async function v(){let e=[];j.forEach((t,r)=>{e.push({key:r,projectName:t.projectName,envName:t.envName,startTime:t.startTime,port:t.port,pid:t.process.pid})});try{await d().writeFile(l().join(w().homedir(),".prime-processes.json"),JSON.stringify(e,null,2))}catch(e){console.error("保存进程信息失败:",e)}}let E=!1;async function T(){if(!E){for(let e of(await x())){let t=[];try{let r=R(e.key),s=await d().readFile(r,"utf-8");t.push(...s.split("\n").filter(e=>e.trim()))}catch{}j.set(e.key,{process:{pid:e.pid,killed:!1},projectName:e.projectName,envName:e.envName,startTime:new Date(e.startTime),port:e.port,logs:t,maxLogLines:1e3})}E=!0}}async function O(e){await T();try{let{projectName:t,envName:r,startCommand:s}=await e.json();if(!t||!r||!s)return a.NextResponse.json({success:!1,error:"缺少必要参数"},{status:400});let i=`${t}-${r}`;if(j.has(i)){let e=j.get(i);if(e&&e.process&&!e.process.killed)return a.NextResponse.json({success:!1,error:"该环境已经在运行中"},{status:400})}let o=await (0,y.ZR)(),n=N.tu.WORKSPACE_ROOT,p=l().join(n,t);try{await d().access(p)}catch{return a.NextResponse.json({success:!1,error:"项目目录不存在"},{status:404})}let[u,...m]=s.split(" "),w=(0,c.spawn)(u,m,{cwd:p,shell:!0,detached:!1,stdio:["ignore","pipe","pipe"],env:{...process.env,FORCE_COLOR:"1"}}),f=o[t],h=f?.envs?.[r],g=h?.host?.split(":").pop()||"",x=[],R={process:{pid:w.pid||0,killed:!1,kill:()=>w.kill(),on:(e,t)=>{w.on(e,t)}},projectName:t,envName:r,startTime:new Date,port:g,logs:x,maxLogLines:1e3};j.set(i,R),w.stdout&&w.stdout.on("data",e=>{e.toString().split("\n").forEach(e=>{if(e.replace(/\x1b\[[0-9;]*m/g,"").replace(/\x1b\[[0-9]*[A-Z]/g,"").replace(/\[\d+[A-Z]/g,"").trim()){let t=`[${new Date().toISOString()}] [STDOUT] ${e}`;x.push(t),x.length>1e3&&x.shift()}})}),w.stderr&&w.stderr.on("data",e=>{e.toString().split("\n").forEach(e=>{if(e.replace(/\x1b\[[0-9;]*m/g,"").replace(/\x1b\[[0-9]*[A-Z]/g,"").replace(/\[\d+[A-Z]/g,"").trim()){let t=`[${new Date().toISOString()}] [STDERR] ${e}`;x.push(t),x.length>1e3&&x.shift()}})}),await v(),await S(i,x);let E=function(e){let t=setInterval(async()=>{let r=j.get(e);r?await S(e,r.logs):clearInterval(t)},5e3);return t}(i);if(w.on("exit",async e=>{console.log(`进程 ${i} 退出,退出码: ${e}`);let t=`[${new Date().toISOString()}] [SYSTEM] 进程退出,退出码: ${e}`;x.push(t),await S(i,x),clearInterval(E),j.delete(i),await v()}),w.on("error",e=>{console.error(`进程 ${i} 错误:`,e),j.delete(i),v()}),await new Promise(e=>setTimeout(e,2e3)),w.killed)return j.delete(i),await v(),a.NextResponse.json({success:!1,error:"进程启动失败"},{status:500});return a.NextResponse.json({success:!0,data:{pid:w.pid,startTime:new Date,port:g}})}catch(e){return console.error("启动进程失败:",e),a.NextResponse.json({success:!1,error:e instanceof Error?e.message:"启动进程失败"},{status:500})}}async function k(e){await T();try{let{searchParams:t}=new URL(e.url),r=t.get("projectName"),s=t.get("envName");if(!r||!s)return a.NextResponse.json({success:!1,error:"缺少必要参数"},{status:400});let i=`${r}-${s}`,o=j.get(i);if(!o)return a.NextResponse.json({success:!1,error:"进程未找到"},{status:404});try{process.kill(o.process.pid,"SIGTERM"),await new Promise(e=>setTimeout(e,1e3));try{process.kill(o.process.pid,0),process.kill(o.process.pid,"SIGKILL")}catch{}}catch(e){console.error("终止进程失败:",e)}j.delete(i),await v();try{let e=R(i);await d().unlink(e)}catch{}return a.NextResponse.json({success:!0,message:"进程已停止"})}catch(e){return console.error("停止进程失败:",e),a.NextResponse.json({success:!1,error:e instanceof Error?e.message:"停止进程失败"},{status:500})}}let I=new i.AppRouteRouteModule({definition:{kind:o.RouteKind.APP_ROUTE,page:"/api/process/start/route",pathname:"/api/process/start",filename:"route",bundlePath:"app/api/process/start/route"},resolvedPagePath:"/Users/edy/Documents/Coding/prime-dev-cli/packages/server/src/app/api/process/start/route.ts",nextConfigOutput:"",userland:s}),{workAsyncStorage:q,workUnitAsyncStorage:$,serverHooks:A}=I;function C(){return(0,n.patchFetch)({workAsyncStorage:q,workUnitAsyncStorage:$})}},8354:e=>{"use strict";e.exports=require("util")},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")},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(6145));module.exports=s})();
|
|
@@ -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/start/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/start/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=998,e.ids=[998],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:()=>a});var s=r(9748),n=r(4946);async function i(){try{await (0,s.access)(n.lq,s.constants.F_OK)}catch{return await a({}),{}}try{let e=await (0,s.readFile)(n.lq,"utf-8");if(!e)return{};return JSON.parse(e)}catch(e){throw console.error("读取或解析项目配置文件失败:",e),Error("无法加载项目配置")}}async function a(e){let t=n.lq+".tmp";try{await (0,s.writeFile)(t,JSON.stringify(e,null,2),"utf-8"),await (0,s.rename)(t,n.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")},3676:(e,t,r)=>{"use strict";r.r(t),r.d(t,{patchFetch:()=>q,routeModule:()=>j,serverHooks:()=>T,workAsyncStorage:()=>R,workUnitAsyncStorage:()=>E});var s={};r.r(s),r.d(s,{GET:()=>v});var n=r(9227),i=r(9044),a=r(1131),o=r(7642),c=r(3873),u=r.n(c),p=r(9748),l=r.n(p),d=r(1820),m=r.n(d),f=r(9646),h=r(8354),x=r(2601);let w=(0,h.promisify)(f.exec);function y(){return u().join(m().homedir(),".prime-processes.json")}async function N(e){try{if("win32"!==process.platform)return process.kill(e,0),!0;{let{stdout:t}=await w(`tasklist /FI "PID eq ${e}"`);return t.includes(e.toString())}}catch{return!1}}async function g(e){try{let t=parseInt(e);if(isNaN(t))return!1;if("win32"!==process.platform)try{let{stdout:t}=await w(`lsof -i :${e} -t`);return t.trim().length>0}catch{return!1}{let{stdout:t}=await w(`netstat -ano | findstr :${e}`);return t.includes(`:${e}`)}}catch{return!1}}async function v(e){try{let{searchParams:t}=new URL(e.url),r=t.get("projectName"),s=t.get("envName");if(r&&s){let e=`${r}-${s}`;try{let t=await l().readFile(y(),"utf-8"),r=JSON.parse(t).find(t=>t.key===e);if(r){let e=await N(r.pid),t=!!r.port&&await g(r.port);return o.NextResponse.json({success:!0,data:{running:e,pid:r.pid,startTime:r.startTime,port:r.port,portInUse:t}})}}catch{}try{let e=(await (0,x.ZR)())[r];if(e&&e.envs&&e.envs[s]){let t=e.envs[s].host?.split(":").pop();if(t){let e=await g(t);return o.NextResponse.json({success:!0,data:{running:e,portInUse:e,port:t}})}}}catch{}return o.NextResponse.json({success:!0,data:{running:!1}})}let n=[];try{let e=await l().readFile(y(),"utf-8");for(let t of JSON.parse(e)){let e=await N(t.pid),r=!!t.port&&await g(t.port);n.push({key:t.key,projectName:t.projectName,envName:t.envName,running:e,pid:t.pid,startTime:t.startTime,port:t.port,portInUse:r})}}catch{}return o.NextResponse.json({success:!0,data:n})}catch(e){return console.error("获取进程状态失败:",e),o.NextResponse.json({success:!1,error:e instanceof Error?e.message:"获取进程状态失败"},{status:500})}}let j=new n.AppRouteRouteModule({definition:{kind:i.RouteKind.APP_ROUTE,page:"/api/process/status/route",pathname:"/api/process/status",filename:"route",bundlePath:"app/api/process/status/route"},resolvedPagePath:"/Users/edy/Documents/Coding/prime-dev-cli/packages/server/src/app/api/process/status/route.ts",nextConfigOutput:"",userland:s}),{workAsyncStorage:R,workUnitAsyncStorage:E,serverHooks:T}=j;function q(){return(0,a.patchFetch)({workAsyncStorage:R,workUnitAsyncStorage:E})}},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:()=>o,lq:()=>a,tu:()=>i});var s=r(1820),n=r(3873);let i={WORKSPACE_ROOT:(0,n.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,n.join)((0,s.homedir)(),".prime-projects.json");var o=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}({})},8354:e=>{"use strict";e.exports=require("util")},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")},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(3676));module.exports=s})();
|
|
@@ -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/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/process/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=404,e.ids=[404],e.modules={
|
|
1
|
+
(()=>{var e={};e.id=404,e.ids=[404],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,r,s)=>{"use strict";s.d(r,{ZR:()=>o,sF:()=>c});var t=s(9748),n=s(4946);async function o(){try{await (0,t.access)(n.lq,t.constants.F_OK)}catch{return await c({}),{}}try{let e=await (0,t.readFile)(n.lq,"utf-8");if(!e)return{};return JSON.parse(e)}catch(e){throw console.error("读取或解析项目配置文件失败:",e),Error("无法加载项目配置")}}async function c(e){let r=n.lq+".tmp";try{await (0,t.writeFile)(r,JSON.stringify(e,null,2),"utf-8"),await (0,t.rename)(r,n.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")},4314:(e,r,s)=>{"use strict";s.d(r,{DA:()=>c,OU:()=>o,mn:()=>i});var t=s(9021),n=s(3873);async function o(e,r,s){let o=(0,n.join)(s,e),c=[],i=[];try{let e=r.envs||{};for(let r in e){let s=e[r];if(s.envFileName&&s.proxyKey){let e=(0,n.join)(o,s.envFileName);try{await t.promises.access(e),i.push(s.envFileName)}catch{let r=s.proxyEnv[s.currentProxy]||"",n=`${s.proxyKey}=${r}`;await t.promises.writeFile(e,n,"utf-8"),c.push(s.envFileName)}}}return{success:!0,createdFiles:c,skippedFiles:i}}catch(s){let r=s instanceof Error?s.message:String(s);return console.error(`在为项目 ${e} 创建环境文件时出错:`,s),{success:!1,createdFiles:c,skippedFiles:i,error:r}}}async function c(e,r){let s=(0,n.join)(r,e),o=(0,n.join)(s,".mock"),c=[],i=[];try{try{await t.promises.access(o),i.push(".mock")}catch{await t.promises.mkdir(o,{recursive:!0}),c.push(".mock")}return{success:!0,createdDirectories:c,skippedDirectories:i}}catch(s){let r=s instanceof Error?s.message:String(s);return console.error(`在为项目 ${e} 创建Mock目录时出错:`,s),{success:!1,createdDirectories:c,skippedDirectories:i,error:r}}}async function i(e,r,s,o){try{let c=s.envs[r];if(!c)return{success:!1,error:`环境 ${r} 不存在于项目 ${e} 配置中`};if(!c.envFileName||!c.proxyKey)return{success:!1,error:`环境 ${r} 缺少 envFileName 或 proxyKey 配置`};let i=(0,n.join)(o,e),a=(0,n.join)(i,c.envFileName),u=c.proxyEnv[c.currentProxy]||c.currentProxy,p=`${c.proxyKey}=${u}`;return await t.promises.writeFile(a,p,"utf-8"),console.log(`已更新环境文件: ${a}, 内容: ${p}`),{success:!0,updatedFile:c.envFileName}}catch(t){let s=t instanceof Error?t.message:String(t);return console.error(`更新项目 ${e} 环境 ${r} 的环境文件时出错:`,t),{success:!1,error:s}}}},4870:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},4907:()=>{},4946:(e,r,s)=>{"use strict";s.d(r,{Ks:()=>i,lq:()=>c,tu:()=>o});var t=s(1820),n=s(3873);let o={WORKSPACE_ROOT:(0,n.join)((0,t.homedir)(),"Documents","prime-workspace"),GIT_TIMEOUT:3e5,MAX_CONCURRENT_CLONES:Math.max(2,Math.min((0,t.cpus)().length,8)),MAX_RETRY_ATTEMPTS:3},c=(0,n.join)((0,t.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}({})},7977:(e,r,s)=>{"use strict";s.r(r),s.d(r,{patchFetch:()=>v,routeModule:()=>x,serverHooks:()=>f,workAsyncStorage:()=>d,workUnitAsyncStorage:()=>y});var t={};s.r(t),s.d(t,{GET:()=>l,PUT:()=>m});var n=s(9227),o=s(9044),c=s(1131),i=s(7642),a=s(2601),u=s(4314),p=s(4946);async function l(e){try{let{searchParams:r}=new URL(e.url),s=r.get("project");if(!s)return i.NextResponse.json({success:!1,error:"项目名称参数缺失"},{status:400});let t=await (0,a.ZR)();if(!t[s])return i.NextResponse.json({success:!1,error:`项目 ${s} 不存在`},{status:404});let n=t[s];return i.NextResponse.json({success:!0,data:{projectName:s,repo:n.repo,mockingIntercept:n.mockingIntercept,mockOpen:n.mockOpen,envs:n.envs}})}catch(r){let e=r instanceof Error?r.message:"获取项目配置失败";return console.error("获取项目配置失败:",r),i.NextResponse.json({success:!1,error:e},{status:500})}}async function m(e){try{let{projectName:r,envName:s,newProxy:t,customProxyUrl:n,projectConfig:o}=await e.json();if(!r)return i.NextResponse.json({success:!1,error:"缺少必要参数:projectName"},{status:400});if(o){let e=await (0,a.ZR)();if(!e[r])return i.NextResponse.json({success:!1,error:`项目 ${r} 不存在`},{status:404});return void 0!==o.mockingIntercept&&(e[r].mockingIntercept=o.mockingIntercept),void 0!==o.mockOpen&&(e[r].mockOpen=o.mockOpen),await (0,a.sF)(e),i.NextResponse.json({success:!0,message:"项目配置更新成功",data:{projectName:r,mockingIntercept:e[r].mockingIntercept,mockOpen:e[r].mockOpen}})}if(!s||!t)return i.NextResponse.json({success:!1,error:"缺少必要参数:envName, newProxy"},{status:400});let c=await (0,a.ZR)();if(!c[r])return i.NextResponse.json({success:!1,error:`项目 ${r} 不存在`},{status:404});if(!c[r].envs[s])return i.NextResponse.json({success:!1,error:`项目 ${r} 中不存在环境 ${s}`},{status:404});let l=c[r].envs[s];if("custom"===t){if(!n||""===n.trim())return i.NextResponse.json({success:!1,error:"选择 custom 时必须提供自定义代理地址"},{status:400})}else if(!l.proxyEnv[t])return i.NextResponse.json({success:!1,error:`代理环境 ${t} 不在可选范围内`},{status:400});c[r].envs[s].currentProxy=t,"custom"===t&&void 0!==n&&(c[r].envs[s].proxyEnv.custom=n),await (0,a.sF)(c);let m=await (0,u.mn)(r,s,c[r],p.tu.WORKSPACE_ROOT),x={projectName:r,envName:s,currentProxy:c[r].envs[s].currentProxy,currentProxyUrl:"custom"===t?n:l.proxyEnv[t]};if(!m.success)return console.warn(`环境文件更新失败: ${m.error}`),i.NextResponse.json({success:!0,message:"代理环境更新成功,但环境文件更新失败",warning:`环境文件更新失败: ${m.error}`,data:x});return i.NextResponse.json({success:!0,message:"代理环境更新成功",data:{...x,updatedEnvFile:m.updatedFile}})}catch(r){let e=r instanceof Error?r.message:"更新项目配置失败";return console.error("更新项目配置失败:",r),i.NextResponse.json({success:!1,error:e},{status:500})}}let x=new n.AppRouteRouteModule({definition:{kind:o.RouteKind.APP_ROUTE,page:"/api/project-config/route",pathname:"/api/project-config",filename:"route",bundlePath:"app/api/project-config/route"},resolvedPagePath:"/Users/edy/Documents/Coding/prime-dev-cli/packages/server/src/app/api/project-config/route.ts",nextConfigOutput:"",userland:t}),{workAsyncStorage:d,workUnitAsyncStorage:y,serverHooks:f}=x;function v(){return(0,c.patchFetch)({workAsyncStorage:d,workUnitAsyncStorage:y})}},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 r=require("../../../webpack-runtime.js");r.C(e);var s=e=>r(r.s=e),t=r.X(0,[131,426],()=>s(7977));module.exports=t})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/api/project-config/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}},"
|
|
1
|
+
globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/api/project-config/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/project-config/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,14 +1,14 @@
|
|
|
1
|
-
(()=>{var e={};e.id=23,e.ids=[23],e.modules={483:()=>{},846:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},
|
|
2
|
-
`),c?.(l,"stdout",`[目标目录] ${
|
|
1
|
+
(()=>{var e={};e.id=23,e.ids=[23],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,s)=>{"use strict";s.d(t,{ZR:()=>i,sF:()=>o});var r=s(9748),n=s(4946);async function i(){try{await (0,r.access)(n.lq,r.constants.F_OK)}catch{return await o({}),{}}try{let e=await (0,r.readFile)(n.lq,"utf-8");if(!e)return{};return JSON.parse(e)}catch(e){throw console.error("读取或解析项目配置文件失败:",e),Error("无法加载项目配置")}}async function o(e){let t=n.lq+".tmp";try{await (0,r.writeFile)(t,JSON.stringify(e,null,2),"utf-8"),await (0,r.rename)(t,n.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")},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,s)=>{"use strict";s.d(t,{Ks:()=>a,lq:()=>o,tu:()=>i});var r=s(1820),n=s(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 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}({})},6193:(e,t,s)=>{"use strict";s.d(t,{DR:()=>a,YK:()=>l,eR:()=>u,e_:()=>c,kf:()=>g,x9:()=>m});var r=s(9646),n=s(9021),i=s(3873),o=s(4946);async function a(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 u(e){let{repoUrl:t,targetDir:s,timeout:n,onProgress:a,onError:u,onLog:c}=e,l=(0,i.basename)(t,".git");return new Promise(e=>{let d=Date.now(),p={projectName:l,status:o.Ks.CLONING,progress:0,message:"开始克隆项目...",startTime:d};a?.(0,"开始克隆项目...");let g=(0,i.join)(s,l),m=["clone","--progress","--verbose",t,g];c?.(l,"stdout",`[开始克隆] 执行命令: git ${m.join(" ")}
|
|
2
|
+
`),c?.(l,"stdout",`[目标目录] ${g}
|
|
3
3
|
`),c?.(l,"stdout",`[仓库地址] ${t}
|
|
4
|
-
`);let f=(0,r.spawn)("git",
|
|
4
|
+
`);let f=(0,r.spawn)("git",m,{cwd:s,stdio:["pipe","pipe","pipe"]}),y="",w=0;c?.(l,"stdout",`[进程启动] Git 进程 PID: ${f.pid}
|
|
5
5
|
`);let T=setTimeout(()=>{c?.(l,"stderr",`[超时警告] Git 进程运行超过 ${n/1e3}s,即将终止
|
|
6
|
-
`),f.kill("SIGTERM");let t={...
|
|
7
|
-
`),u?.(`${l}: 克隆操作超时`),e(t)},n);f.stdout?.on("data",e=>{let t=e.toString();c?.(l,"stdout",t),w=Math.min(w+10,80),a?.(w,"正在克隆代码...")}),f.stderr?.on("data",e=>{let t=e.toString();y+=t,t.includes("remote:")||t.includes("Receiving objects")||t.includes("Resolving deltas")||t.includes("Counting objects")||t.includes("Enumerating objects")||t.includes("Compressing objects")||t.includes("upload-pack")||t.includes("POST git-")||t.includes("正克隆到")||t.includes("Cloning into")?c?.(l,"progress",t):c?.(l,"stderr",t),t.includes("Receiving objects")||t.includes("Resolving deltas")?(w=Math.min(w+5,90),a?.(w,"正在接收对象...")):t.includes("Counting objects")?(w=Math.min(w+2,70),a?.(w,"正在计算对象...")):t.includes("Enumerating objects")&&(w=Math.min(w+2,50),a?.(w,"正在枚举对象..."))}),f.on("close",t=>{clearTimeout(T);let s=Date.now(),r=s-
|
|
8
|
-
`),0===t){c?.(l,"stdout",`[克隆成功] 项目已成功克隆到: ${
|
|
9
|
-
`);let t={...
|
|
6
|
+
`),f.kill("SIGTERM");let t={...p,status:o.Ks.FAILED,progress:w,message:"克隆操作超时",error:`克隆操作超时 (${n/1e3}s)`,endTime:Date.now()};c?.(l,"stderr",`[进程终止] 克隆操作超时
|
|
7
|
+
`),u?.(`${l}: 克隆操作超时`),e(t)},n);f.stdout?.on("data",e=>{let t=e.toString();c?.(l,"stdout",t),w=Math.min(w+10,80),a?.(w,"正在克隆代码...")}),f.stderr?.on("data",e=>{let t=e.toString();y+=t,t.includes("remote:")||t.includes("Receiving objects")||t.includes("Resolving deltas")||t.includes("Counting objects")||t.includes("Enumerating objects")||t.includes("Compressing objects")||t.includes("upload-pack")||t.includes("POST git-")||t.includes("正克隆到")||t.includes("Cloning into")?c?.(l,"progress",t):c?.(l,"stderr",t),t.includes("Receiving objects")||t.includes("Resolving deltas")?(w=Math.min(w+5,90),a?.(w,"正在接收对象...")):t.includes("Counting objects")?(w=Math.min(w+2,70),a?.(w,"正在计算对象...")):t.includes("Enumerating objects")&&(w=Math.min(w+2,50),a?.(w,"正在枚举对象..."))}),f.on("close",t=>{clearTimeout(T);let s=Date.now(),r=s-d;if(c?.(l,"stdout",`[进程结束] Git 进程退出,代码: ${t},耗时: ${Math.round(r/1e3)}s
|
|
8
|
+
`),0===t){c?.(l,"stdout",`[克隆成功] 项目已成功克隆到: ${g}
|
|
9
|
+
`);let t={...p,status:o.Ks.SUCCESS,progress:100,message:"克隆完成",endTime:s};a?.(100,"克隆完成"),e(t)}else{let r=function(e){let t=e.toLowerCase();return t.includes("authentication failed")||t.includes("access denied")?"身份验证失败,请检查仓库访问权限":t.includes("repository not found")||t.includes("not found")?"仓库不存在或无法访问":t.includes("network")||t.includes("connection")?"网络连接问题,请检查网络设置":t.includes("timeout")?"网络超时,请重试":t.includes("permission denied")?"权限被拒绝,请检查文件系统权限":t.includes("already exists")?"目标目录已存在":e.slice(0,200)+(e.length>200?"...":"")}(y);c?.(l,"stderr",`[克隆失败] 错误信息: ${r}
|
|
10
10
|
`),c?.(l,"stderr",`[完整错误输出]
|
|
11
11
|
${y}
|
|
12
|
-
`);let n={...
|
|
12
|
+
`);let n={...p,status:o.Ks.FAILED,progress:w,message:"克隆失败",error:r||`Git 进程退出,代码: ${t}`,endTime:s};u?.(`${l}: ${n.error}`),e(n)}}),f.on("error",t=>{clearTimeout(T),c?.(l,"stderr",`[进程错误] Git 进程启动失败: ${t.message}
|
|
13
13
|
`),c?.(l,"stderr",`[错误详情] ${t.stack||"No stack trace"}
|
|
14
|
-
`);let s={...
|
|
14
|
+
`);let s={...p,status:o.Ks.FAILED,progress:w,message:"进程启动失败",error:`进程启动失败: ${t.message}`,endTime:Date.now()};u?.(`${l}: ${t.message}`),e(s)})})}function c(e){return e.replace(/[^a-zA-Z0-9\-_]/g,"")}async function l(e,t){try{let s=(0,i.join)(e,t);if(!(0,n.existsSync)(s))return{exists:!1,status:"not_exists",needsCleanup:!1};let r=(0,i.join)(s,".git");if(!(0,n.existsSync)(r))return{exists:!0,status:"incomplete",needsCleanup:!0};if(!await p(s))return console.log(`检测到不完整的Git仓库: ${s}`),{exists:!0,status:"incomplete",needsCleanup:!0};return{exists:!0,status:"complete",needsCleanup:!1}}catch(e){return console.error(`检查项目 ${t} 状态时出错:`,e),{exists:!1,status:"not_exists",needsCleanup:!1}}}async function d(e,t){return"complete"===(await l(e,t)).status}async function p(e){try{let t=(0,i.join)(e,".git");for(let e of["HEAD","config","refs"]){let s=(0,i.join)(t,e);if(!(0,n.existsSync)(s))return!1}let s=(await n.promises.readdir(e)).filter(e=>".git"!==e);if(0===s.length)return!1;let r=(0,i.join)(t,"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,t){let s={},r=t.map(async t=>{let r=await d(e,t);s[t]=r});return await Promise.all(r),s}async function m(e){return new Promise(t=>{if(!(0,n.existsSync)(e))return void t({success:!1,error:`项目路径不存在: ${e}`});let s=(0,r.spawn)("cursor",[e],{stdio:["ignore","pipe","pipe"],detached:!0}),i="",o=setTimeout(()=>{s.kill("SIGTERM"),t({success:!1,error:"Cursor 命令执行超时"})},1e4);s.stderr?.on("data",e=>{i+=e.toString()}),s.on("exit",e=>{clearTimeout(o),0===e?t({success:!0}):t({success:!1,error:`Cursor 退出代码: ${e}${i?`, 错误: ${i}`:""}`})}),s.on("error",e=>{clearTimeout(o),e.message.includes("ENOENT")?t({success:!1,error:"Cursor 命令未找到,请确保 Cursor CLI 已正确安装并在 PATH 中"}):t({success:!1,error:`启动 Cursor 失败: ${e.message}`})}),s.unref()})}},7870:(e,t,s)=>{"use strict";s.r(t),s.d(t,{patchFetch:()=>f,routeModule:()=>d,serverHooks:()=>m,workAsyncStorage:()=>p,workUnitAsyncStorage:()=>g});var r={};s.r(r),s.d(r,{POST:()=>l});var n=s(9227),i=s(9044),o=s(1131),a=s(4946),u=s(2601),c=s(6193);async function l(e){try{let{projectName:t}=await e.json();if(!t||"string"!=typeof t)return new Response(JSON.stringify({success:!1,error:"项目名称是必需的"}),{status:400,headers:{"Content-Type":"application/json"}});let s=await (0,u.ZR)();if(!(t in s))return new Response(JSON.stringify({success:!1,error:`项目 ${t} 不存在于配置中`}),{status:404,headers:{"Content-Type":"application/json"}});let r=s[t],n=a.tu.WORKSPACE_ROOT,i=await (0,c.eR)({repoUrl:r.repo,targetDir:n,timeout:a.tu.GIT_TIMEOUT}),o={success:i.status===a.Ks.SUCCESS,projectName:t,status:i.status,message:i.message,error:i.error,progress:i.progress,duration:i.endTime&&i.startTime?i.endTime-i.startTime:0};return new Response(JSON.stringify(o),{status:200,headers:{"Content-Type":"application/json"}})}catch(t){let e=t instanceof Error?t.message:String(t);return console.error("重试项目克隆失败:",t),new Response(JSON.stringify({success:!1,error:`重试失败: ${e}`}),{status:500,headers:{"Content-Type":"application/json"}})}}let d=new n.AppRouteRouteModule({definition:{kind:i.RouteKind.APP_ROUTE,page:"/api/retry-project/route",pathname:"/api/retry-project",filename:"route",bundlePath:"app/api/retry-project/route"},resolvedPagePath:"/Users/edy/Documents/Coding/prime-dev-cli/packages/server/src/app/api/retry-project/route.ts",nextConfigOutput:"",userland:r}),{workAsyncStorage:p,workUnitAsyncStorage:g,serverHooks:m}=d;function f(){return(0,o.patchFetch)({workAsyncStorage:p,workUnitAsyncStorage:g})}},9021:e=>{"use strict";e.exports=require("fs")},9227:(e,t,s)=>{"use strict";e.exports=s(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")},9748:e=>{"use strict";e.exports=require("fs/promises")}};var t=require("../../../webpack-runtime.js");t.C(e);var s=e=>t(t.s=e),r=t.X(0,[131],()=>s(7870));module.exports=r})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/api/retry-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}},"
|
|
1
|
+
globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/api/retry-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/retry-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}}}}
|