prime-dev-cli 1.0.2 → 1.0.4
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/bin/cli.mjs +3 -3
- package/config/projects.json +84 -5
- package/dist/server/.next/BUILD_ID +1 -1
- package/dist/server/.next/app-build-manifest.json +54 -54
- package/dist/server/.next/app-path-routes-manifest.json +12 -12
- 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_13k185s +1 -0
- package/dist/server/.next/cache/webpack/client-production/0.pack +0 -0
- package/dist/server/.next/cache/webpack/client-production/index.pack +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/index.pack +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 +1 -1
- 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 +1 -1
- 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 +2 -2
- 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 +7 -7
- package/dist/server/.next/server/app/api/open-project/route_client-reference-manifest.js +1 -1
- 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 +3 -3
- 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 +2 -2
- 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 +1 -1
- 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 +2 -2
- 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 +12 -12
- package/dist/server/.next/server/chunks/131.js +4 -4
- 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/chunks/770-17268e5a9d004dae.js +1 -0
- package/dist/server/.next/static/chunks/app/configuration/page-68644ad1d0dbda4f.js +1 -0
- package/dist/server/.next/static/chunks/app/initialization/page-d107335a70a6aa9a.js +1 -0
- package/dist/server/.next/static/chunks/app/layout-2c381be4c1bb73ed.js +1 -0
- package/dist/server/.next/static/chunks/main-app-0672b5550b5e5a29.js +1 -0
- package/dist/server/.next/static/ctEn8UHYZESgGhsRFLpGu/_buildManifest.js +1 -0
- package/dist/server/.next/static/ctEn8UHYZESgGhsRFLpGu/_ssgManifest.js +1 -0
- package/dist/server/.next/trace +12 -3
- 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/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 +3 -2
|
@@ -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}},"6665":{"*":{"id":"1681","name":"*","chunks":[],"async":false}},"7472":{"*":{"id":"1249","name":"*","chunks":[],"async":false}},"9203":{"*":{"id":"8751","name":"*","chunks":[],"async":false}},"9510":{"*":{"id":"
|
|
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}},"6665":{"*":{"id":"1681","name":"*","chunks":[],"async":false}},"7472":{"*":{"id":"1249","name":"*","chunks":[],"async":false}},"9203":{"*":{"id":"8751","name":"*","chunks":[],"async":false}},"9510":{"*":{"id":"8843","name":"*","chunks":[],"async":false}}},"edgeSSRModuleMapping":{},"clientModules":{"/Users/edy/Documents/prime-workspace/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/client/components/client-page.js":{"id":3636,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/esm/client/components/client-page.js":{"id":3636,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/client/components/client-segment.js":{"id":1020,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/esm/client/components/client-segment.js":{"id":1020,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/client/components/error-boundary.js":{"id":3604,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/esm/client/components/error-boundary.js":{"id":3604,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/client/components/http-access-fallback/error-boundary.js":{"id":3053,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/esm/client/components/http-access-fallback/error-boundary.js":{"id":3053,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/client/components/layout-router.js":{"id":317,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/esm/client/components/layout-router.js":{"id":317,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/client/components/metadata/async-metadata.js":{"id":3561,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/esm/client/components/metadata/async-metadata.js":{"id":3561,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/client/components/metadata/metadata-boundary.js":{"id":9203,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/esm/client/components/metadata/metadata-boundary.js":{"id":9203,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/client/components/render-from-template-context.js":{"id":6665,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/esm/client/components/render-from-template-context.js":{"id":6665,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/font/google/target.css?{\"path\":\"src/app/layout.tsx\",\"import\":\"Geist\",\"arguments\":[{\"variable\":\"--font-geist-sans\",\"subsets\":[\"latin\"]}],\"variableName\":\"geistSans\"}":{"id":6521,"name":"*","chunks":["177","static/chunks/app/layout-2c381be4c1bb73ed.js"],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/font/google/target.css?{\"path\":\"src/app/layout.tsx\",\"import\":\"Geist_Mono\",\"arguments\":[{\"variable\":\"--font-geist-mono\",\"subsets\":[\"latin\"]}],\"variableName\":\"geistMono\"}":{"id":8947,"name":"*","chunks":["177","static/chunks/app/layout-2c381be4c1bb73ed.js"],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/packages/server/src/app/globals.css":{"id":141,"name":"*","chunks":["177","static/chunks/app/layout-2c381be4c1bb73ed.js"],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/packages/server/src/app/configuration/page.tsx":{"id":9510,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/packages/server/src/components/project-initializer.tsx":{"id":7472,"name":"*","chunks":[],"async":false}},"entryCSSFiles":{"/Users/edy/Documents/prime-workspace/prime-dev-cli/packages/server/src/":[],"/Users/edy/Documents/prime-workspace/prime-dev-cli/packages/server/src/app/layout":[{"inlined":false,"path":"static/css/b10a602544a179de.css"}],"/Users/edy/Documents/prime-workspace/prime-dev-cli/packages/server/src/app/page":[],"/Users/edy/Documents/prime-workspace/prime-dev-cli/packages/server/src/app/api/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}},"6665":{"*":{"id":"9687","name":"*","chunks":[],"async":false}},"7472":{"*":{"id":"9624","name":"*","chunks":[],"async":false}},"9203":{"*":{"id":"8757","name":"*","chunks":[],"async":false}},"9510":{"*":{"id":"4761","name":"*","chunks":[],"async":false}}},"edgeRscModuleMapping":{"317":{"*":{"id":"5207","name":"*","chunks":[],"async":false}},"1020":{"*":{"id":"9136","name":"*","chunks":[],"async":false}},"3053":{"*":{"id":"767","name":"*","chunks":[],"async":false}},"3561":{"*":{"id":"9855","name":"*","chunks":[],"async":false}},"3604":{"*":{"id":"6996","name":"*","chunks":[],"async":false}},"3636":{"*":{"id":"7774","name":"*","chunks":[],"async":false}},"6665":{"*":{"id":"1681","name":"*","chunks":[],"async":false}},"9203":{"*":{"id":"8751","name":"*","chunks":[],"async":false}}}}
|
|
@@ -1,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")},1804:(e,t,s)=>{"use strict";s.d(t,{kf:()=>
|
|
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")},1804:(e,t,s)=>{"use strict";s.d(t,{kf:()=>m,YK:()=>l,eR:()=>u,DR:()=>a,x9:()=>g,e_:()=>c});let r=require("child_process");var 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 p=Date.now(),d={projectName:l,status:o.Ks.CLONING,progress:0,message:"开始克隆项目...",startTime:p};a?.(0,"开始克隆项目...");let m=(0,i.join)(s,l),g=["clone","--progress","--verbose",t,m];c?.(l,"stdout",`[开始克隆] 执行命令: git ${g.join(" ")}
|
|
2
|
+
`),c?.(l,"stdout",`[目标目录] ${m}
|
|
3
3
|
`),c?.(l,"stdout",`[仓库地址] ${t}
|
|
4
|
-
`);let f=(0,r.spawn)("git",
|
|
4
|
+
`);let f=(0,r.spawn)("git",g,{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={...d,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-p;if(c?.(l,"stdout",`[进程结束] Git 进程退出,代码: ${t},耗时: ${Math.round(r/1e3)}s
|
|
8
|
+
`),0===t){c?.(l,"stdout",`[克隆成功] 项目已成功克隆到: ${m}
|
|
9
|
+
`);let t={...d,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={...d,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={...d,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 d(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 p(e,t){return"complete"===(await l(e,t)).status}async function d(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 m(e,t){let s={},r=t.map(async t=>{let r=await p(e,t);s[t]=r});return await Promise.all(r),s}async function g(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()})}},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}({})},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")},9748:e=>{"use strict";e.exports=require("fs/promises")},9904:(e,t,s)=>{"use strict";s.r(t),s.d(t,{patchFetch:()=>f,routeModule:()=>p,serverHooks:()=>g,workAsyncStorage:()=>d,workUnitAsyncStorage:()=>m});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(1804);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 p=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/prime-workspace/prime-dev-cli/packages/server/src/app/api/retry-project/route.ts",nextConfigOutput:"",userland:r}),{workAsyncStorage:d,workUnitAsyncStorage:m,serverHooks:g}=p;function f(){return(0,o.patchFetch)({workAsyncStorage:d,workUnitAsyncStorage:m})}}};var t=require("../../../webpack-runtime.js");t.C(e);var s=e=>t(t.s=e),r=t.X(0,[131],()=>s(9904));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}},"6665":{"*":{"id":"1681","name":"*","chunks":[],"async":false}},"7472":{"*":{"id":"1249","name":"*","chunks":[],"async":false}},"9203":{"*":{"id":"8751","name":"*","chunks":[],"async":false}},"9510":{"*":{"id":"
|
|
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}},"6665":{"*":{"id":"1681","name":"*","chunks":[],"async":false}},"7472":{"*":{"id":"1249","name":"*","chunks":[],"async":false}},"9203":{"*":{"id":"8751","name":"*","chunks":[],"async":false}},"9510":{"*":{"id":"8843","name":"*","chunks":[],"async":false}}},"edgeSSRModuleMapping":{},"clientModules":{"/Users/edy/Documents/prime-workspace/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/client/components/client-page.js":{"id":3636,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/esm/client/components/client-page.js":{"id":3636,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/client/components/client-segment.js":{"id":1020,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/esm/client/components/client-segment.js":{"id":1020,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/client/components/error-boundary.js":{"id":3604,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/esm/client/components/error-boundary.js":{"id":3604,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/client/components/http-access-fallback/error-boundary.js":{"id":3053,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/esm/client/components/http-access-fallback/error-boundary.js":{"id":3053,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/client/components/layout-router.js":{"id":317,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/esm/client/components/layout-router.js":{"id":317,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/client/components/metadata/async-metadata.js":{"id":3561,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/esm/client/components/metadata/async-metadata.js":{"id":3561,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/client/components/metadata/metadata-boundary.js":{"id":9203,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/esm/client/components/metadata/metadata-boundary.js":{"id":9203,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/client/components/render-from-template-context.js":{"id":6665,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/esm/client/components/render-from-template-context.js":{"id":6665,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/font/google/target.css?{\"path\":\"src/app/layout.tsx\",\"import\":\"Geist\",\"arguments\":[{\"variable\":\"--font-geist-sans\",\"subsets\":[\"latin\"]}],\"variableName\":\"geistSans\"}":{"id":6521,"name":"*","chunks":["177","static/chunks/app/layout-2c381be4c1bb73ed.js"],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/font/google/target.css?{\"path\":\"src/app/layout.tsx\",\"import\":\"Geist_Mono\",\"arguments\":[{\"variable\":\"--font-geist-mono\",\"subsets\":[\"latin\"]}],\"variableName\":\"geistMono\"}":{"id":8947,"name":"*","chunks":["177","static/chunks/app/layout-2c381be4c1bb73ed.js"],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/packages/server/src/app/globals.css":{"id":141,"name":"*","chunks":["177","static/chunks/app/layout-2c381be4c1bb73ed.js"],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/packages/server/src/app/configuration/page.tsx":{"id":9510,"name":"*","chunks":[],"async":false},"/Users/edy/Documents/prime-workspace/prime-dev-cli/packages/server/src/components/project-initializer.tsx":{"id":7472,"name":"*","chunks":[],"async":false}},"entryCSSFiles":{"/Users/edy/Documents/prime-workspace/prime-dev-cli/packages/server/src/":[],"/Users/edy/Documents/prime-workspace/prime-dev-cli/packages/server/src/app/layout":[{"inlined":false,"path":"static/css/b10a602544a179de.css"}],"/Users/edy/Documents/prime-workspace/prime-dev-cli/packages/server/src/app/page":[],"/Users/edy/Documents/prime-workspace/prime-dev-cli/packages/server/src/app/api/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}},"6665":{"*":{"id":"9687","name":"*","chunks":[],"async":false}},"7472":{"*":{"id":"9624","name":"*","chunks":[],"async":false}},"9203":{"*":{"id":"8757","name":"*","chunks":[],"async":false}},"9510":{"*":{"id":"4761","name":"*","chunks":[],"async":false}}},"edgeRscModuleMapping":{"317":{"*":{"id":"5207","name":"*","chunks":[],"async":false}},"1020":{"*":{"id":"9136","name":"*","chunks":[],"async":false}},"3053":{"*":{"id":"767","name":"*","chunks":[],"async":false}},"3561":{"*":{"id":"9855","name":"*","chunks":[],"async":false}},"3604":{"*":{"id":"6996","name":"*","chunks":[],"async":false}},"3636":{"*":{"id":"7774","name":"*","chunks":[],"async":false}},"6665":{"*":{"id":"1681","name":"*","chunks":[],"async":false}},"9203":{"*":{"id":"8751","name":"*","chunks":[],"async":false}}}}
|