prime-dev-cli 1.0.1 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (139) hide show
  1. package/bin/cli.mjs +1 -0
  2. package/config/projects.json +84 -5
  3. package/dist/server/.next/BUILD_ID +1 -1
  4. package/dist/server/.next/app-build-manifest.json +60 -53
  5. package/dist/server/.next/app-path-routes-manifest.json +8 -7
  6. package/dist/server/.next/build-manifest.json +3 -3
  7. package/dist/server/.next/cache/.rscinfo +1 -1
  8. package/dist/server/.next/cache/.tsbuildinfo +1 -1
  9. package/dist/server/.next/cache/eslint/.cache_13k185s +1 -0
  10. package/dist/server/.next/cache/eslint/.cache_1qa5vxt +1 -1
  11. package/dist/server/.next/cache/webpack/client-production/0.pack +0 -0
  12. package/dist/server/.next/cache/webpack/client-production/1.pack +0 -0
  13. package/dist/server/.next/cache/webpack/client-production/10.pack +0 -0
  14. package/dist/server/.next/cache/webpack/client-production/11.pack +0 -0
  15. package/dist/server/.next/cache/webpack/client-production/12.pack +0 -0
  16. package/dist/server/.next/cache/webpack/client-production/5.pack +0 -0
  17. package/dist/server/.next/cache/webpack/client-production/8.pack +0 -0
  18. package/dist/server/.next/cache/webpack/client-production/9.pack +0 -0
  19. package/dist/server/.next/cache/webpack/client-production/index.pack +0 -0
  20. package/dist/server/.next/cache/webpack/client-production/index.pack.old +0 -0
  21. package/dist/server/.next/cache/webpack/edge-server-production/index.pack +0 -0
  22. package/dist/server/.next/cache/webpack/server-production/0.pack +0 -0
  23. package/dist/server/.next/cache/webpack/server-production/1.pack +0 -0
  24. package/dist/server/.next/cache/webpack/server-production/2.pack +0 -0
  25. package/dist/server/.next/cache/webpack/server-production/3.pack +0 -0
  26. package/dist/server/.next/cache/webpack/server-production/4.pack +0 -0
  27. package/dist/server/.next/cache/webpack/server-production/5.pack +0 -0
  28. package/dist/server/.next/cache/webpack/server-production/index.pack +0 -0
  29. package/dist/server/.next/cache/webpack/server-production/index.pack.old +0 -0
  30. package/dist/server/.next/next-minimal-server.js.nft.json +1 -1
  31. package/dist/server/.next/next-server.js.nft.json +1 -1
  32. package/dist/server/.next/prerender-manifest.json +20 -20
  33. package/dist/server/.next/required-server-files.json +3 -3
  34. package/dist/server/.next/server/app/_not-found/page.js +1 -1
  35. package/dist/server/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  36. package/dist/server/.next/server/app/_not-found.html +1 -1
  37. package/dist/server/.next/server/app/_not-found.rsc +2 -2
  38. package/dist/server/.next/server/app/api/all-projects-envs/route.js +1 -1
  39. package/dist/server/.next/server/app/api/all-projects-envs/route_client-reference-manifest.js +1 -1
  40. package/dist/server/.next/server/app/api/check-mock-intercept/route.js +1 -1
  41. package/dist/server/.next/server/app/api/check-mock-intercept/route_client-reference-manifest.js +1 -1
  42. package/dist/server/.next/server/app/api/check-workspace/route.js +14 -1
  43. package/dist/server/.next/server/app/api/check-workspace/route_client-reference-manifest.js +1 -1
  44. package/dist/server/.next/server/app/api/cleanup-project/route.js +1 -0
  45. package/dist/server/.next/server/app/api/cleanup-project/route.js.nft.json +1 -0
  46. package/dist/server/.next/server/app/api/cleanup-project/route_client-reference-manifest.js +1 -0
  47. package/dist/server/.next/server/app/api/get-mock-data/route.js +1 -1
  48. package/dist/server/.next/server/app/api/get-mock-data/route_client-reference-manifest.js +1 -1
  49. package/dist/server/.next/server/app/api/initialize-workspace/route.js +16 -3
  50. package/dist/server/.next/server/app/api/initialize-workspace/route_client-reference-manifest.js +1 -1
  51. package/dist/server/.next/server/app/api/microapp-proxy-change-stream/route.js +3 -3
  52. package/dist/server/.next/server/app/api/microapp-proxy-change-stream/route_client-reference-manifest.js +1 -1
  53. package/dist/server/.next/server/app/api/microapp-proxy-config/route.js +2 -2
  54. package/dist/server/.next/server/app/api/microapp-proxy-config/route_client-reference-manifest.js +1 -1
  55. package/dist/server/.next/server/app/api/mock-file/route.js +2 -2
  56. package/dist/server/.next/server/app/api/mock-file/route_client-reference-manifest.js +1 -1
  57. package/dist/server/.next/server/app/api/mock-file-content/route.js +1 -1
  58. package/dist/server/.next/server/app/api/mock-file-content/route_client-reference-manifest.js +1 -1
  59. package/dist/server/.next/server/app/api/mock-open-status/route.js +3 -3
  60. package/dist/server/.next/server/app/api/mock-open-status/route_client-reference-manifest.js +1 -1
  61. package/dist/server/.next/server/app/api/mock-setting/route.js +1 -1
  62. package/dist/server/.next/server/app/api/mock-setting/route_client-reference-manifest.js +1 -1
  63. package/dist/server/.next/server/app/api/open-project/route.js +14 -1
  64. package/dist/server/.next/server/app/api/open-project/route_client-reference-manifest.js +1 -1
  65. package/dist/server/.next/server/app/api/project-config/route.js +1 -1
  66. package/dist/server/.next/server/app/api/project-config/route_client-reference-manifest.js +1 -1
  67. package/dist/server/.next/server/app/api/retry-project/route.js +14 -1
  68. package/dist/server/.next/server/app/api/retry-project/route_client-reference-manifest.js +1 -1
  69. package/dist/server/.next/server/app/configuration/page.js +3 -3
  70. package/dist/server/.next/server/app/configuration/page_client-reference-manifest.js +1 -1
  71. package/dist/server/.next/server/app/configuration.html +1 -1
  72. package/dist/server/.next/server/app/configuration.rsc +3 -3
  73. package/dist/server/.next/server/app/favicon.ico/route.js +1 -1
  74. package/dist/server/.next/server/app/index.html +1 -1
  75. package/dist/server/.next/server/app/index.rsc +2 -2
  76. package/dist/server/.next/server/app/initialization/page.js +1 -1
  77. package/dist/server/.next/server/app/initialization/page_client-reference-manifest.js +1 -1
  78. package/dist/server/.next/server/app/initialization.html +1 -1
  79. package/dist/server/.next/server/app/initialization.rsc +3 -3
  80. package/dist/server/.next/server/app/page.js +1 -1
  81. package/dist/server/.next/server/app/page_client-reference-manifest.js +1 -1
  82. package/dist/server/.next/server/app-paths-manifest.json +8 -7
  83. package/dist/server/.next/server/chunks/131.js +4 -4
  84. package/dist/server/.next/server/chunks/967.js +3 -3
  85. package/dist/server/.next/server/middleware-build-manifest.js +1 -1
  86. package/dist/server/.next/server/next-font-manifest.js +1 -1
  87. package/dist/server/.next/server/next-font-manifest.json +1 -1
  88. package/dist/server/.next/server/pages/404.html +1 -1
  89. package/dist/server/.next/server/pages/500.html +1 -1
  90. package/dist/server/.next/server/pages-manifest.json +1 -1
  91. package/dist/server/.next/server/server-reference-manifest.json +1 -1
  92. package/dist/server/.next/static/W9gpINx4oQDxDFLMkCJQL/_buildManifest.js +1 -0
  93. package/dist/server/.next/static/W9gpINx4oQDxDFLMkCJQL/_ssgManifest.js +1 -0
  94. package/dist/server/.next/static/chunks/770-17268e5a9d004dae.js +1 -0
  95. package/dist/server/.next/static/chunks/app/api/all-projects-envs/route-70d14c8af28994db.js +1 -0
  96. package/dist/server/.next/static/chunks/app/api/check-mock-intercept/route-207d5b6627adc282.js +1 -0
  97. package/dist/server/.next/static/chunks/app/api/check-workspace/route-29f5d718929ea780.js +1 -0
  98. package/dist/server/.next/static/chunks/app/api/cleanup-project/route-3bf856128b701bac.js +1 -0
  99. package/dist/server/.next/static/chunks/app/api/get-mock-data/route-dc1cc7e42c23cc90.js +1 -0
  100. package/dist/server/.next/static/chunks/app/api/initialize-workspace/route-736e54e6ee59e3ce.js +1 -0
  101. package/dist/server/.next/static/chunks/app/api/microapp-proxy-change-stream/route-219fff48736f39a4.js +1 -0
  102. package/dist/server/.next/static/chunks/app/api/microapp-proxy-config/route-e535c24ff110bccf.js +1 -0
  103. package/dist/server/.next/static/chunks/app/api/mock-file/route-457801bb0f6a76f5.js +1 -0
  104. package/dist/server/.next/static/chunks/app/api/mock-file-content/route-4abdd46a628dfa45.js +1 -0
  105. package/dist/server/.next/static/chunks/app/api/mock-open-status/route-7e4d9c8f09b286c3.js +1 -0
  106. package/dist/server/.next/static/chunks/app/api/mock-setting/route-2f57558f61602b8d.js +1 -0
  107. package/dist/server/.next/static/chunks/app/api/open-project/route-dbd2412a4a395d57.js +1 -0
  108. package/dist/server/.next/static/chunks/app/api/project-config/route-52a76cdb81639dcd.js +1 -0
  109. package/dist/server/.next/static/chunks/app/api/retry-project/route-1672c3841762e7a2.js +1 -0
  110. package/dist/server/.next/static/chunks/app/configuration/page-68644ad1d0dbda4f.js +1 -0
  111. package/dist/server/.next/static/chunks/app/initialization/page-9c8eb31c4b362777.js +1 -0
  112. package/dist/server/.next/static/chunks/app/initialization/page-d107335a70a6aa9a.js +1 -0
  113. package/dist/server/.next/static/chunks/app/layout-2c381be4c1bb73ed.js +1 -0
  114. package/dist/server/.next/static/chunks/app/page-9ce2b4651df441b0.js +1 -0
  115. package/dist/server/.next/static/chunks/main-app-0672b5550b5e5a29.js +1 -0
  116. package/dist/server/.next/static/css/b10a602544a179de.css +3 -0
  117. package/dist/server/.next/static/ctEn8UHYZESgGhsRFLpGu/_buildManifest.js +1 -0
  118. package/dist/server/.next/static/ctEn8UHYZESgGhsRFLpGu/_ssgManifest.js +1 -0
  119. package/dist/server/.next/trace +12 -3
  120. package/dist/server/.next/types/app/api/all-projects-envs/route.ts +1 -1
  121. package/dist/server/.next/types/app/api/check-mock-intercept/route.ts +1 -1
  122. package/dist/server/.next/types/app/api/check-workspace/route.ts +1 -1
  123. package/dist/server/.next/types/app/api/cleanup-project/route.ts +347 -0
  124. package/dist/server/.next/types/app/api/get-mock-data/route.ts +1 -1
  125. package/dist/server/.next/types/app/api/initialize-workspace/route.ts +1 -1
  126. package/dist/server/.next/types/app/api/microapp-proxy-change-stream/route.ts +1 -1
  127. package/dist/server/.next/types/app/api/microapp-proxy-config/route.ts +1 -1
  128. package/dist/server/.next/types/app/api/mock-file/route.ts +1 -1
  129. package/dist/server/.next/types/app/api/mock-file-content/route.ts +1 -1
  130. package/dist/server/.next/types/app/api/mock-open-status/route.ts +1 -1
  131. package/dist/server/.next/types/app/api/mock-setting/route.ts +1 -1
  132. package/dist/server/.next/types/app/api/open-project/route.ts +1 -1
  133. package/dist/server/.next/types/app/api/project-config/route.ts +1 -1
  134. package/dist/server/.next/types/app/api/retry-project/route.ts +1 -1
  135. package/dist/server/.next/types/app/configuration/page.ts +1 -1
  136. package/dist/server/.next/types/app/initialization/page.ts +1 -1
  137. package/dist/server/.next/types/app/layout.ts +1 -1
  138. package/dist/server/.next/types/app/page.ts +1 -1
  139. package/package.json +3 -2
@@ -1 +1 @@
1
- globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/api/check-workspace/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":"5844","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":9510,"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/6393282fdcf30b00.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/check-workspace/route":[]},"rscModuleMapping":{"141":{"*":{"id":"3019","name":"*","chunks":[],"async":false}},"317":{"*":{"id":"7429","name":"*","chunks":[],"async":false}},"1020":{"*":{"id":"9670","name":"*","chunks":[],"async":false}},"3053":{"*":{"id":"5473","name":"*","chunks":[],"async":false}},"3561":{"*":{"id":"8653","name":"*","chunks":[],"async":false}},"3604":{"*":{"id":"1382","name":"*","chunks":[],"async":false}},"3636":{"*":{"id":"4928","name":"*","chunks":[],"async":false}},"6665":{"*":{"id":"9687","name":"*","chunks":[],"async":false}},"7472":{"*":{"id":"9624","name":"*","chunks":[],"async":false}},"9203":{"*":{"id":"8757","name":"*","chunks":[],"async":false}},"9510":{"*":{"id":"4761","name":"*","chunks":[],"async":false}}},"edgeRscModuleMapping":{"317":{"*":{"id":"5207","name":"*","chunks":[],"async":false}},"1020":{"*":{"id":"9136","name":"*","chunks":[],"async":false}},"3053":{"*":{"id":"767","name":"*","chunks":[],"async":false}},"3561":{"*":{"id":"9855","name":"*","chunks":[],"async":false}},"3604":{"*":{"id":"6996","name":"*","chunks":[],"async":false}},"3636":{"*":{"id":"7774","name":"*","chunks":[],"async":false}},"6665":{"*":{"id":"1681","name":"*","chunks":[],"async":false}},"9203":{"*":{"id":"8751","name":"*","chunks":[],"async":false}}}}
1
+ globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/api/check-workspace/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/check-workspace/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}}}}
@@ -0,0 +1 @@
1
+ (()=>{var e={};e.id=814,e.ids=[814],e.modules={483:()=>{},846:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},1820:e=>{"use strict";e.exports=require("os")},3033:e=>{"use strict";e.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},3295:e=>{"use strict";e.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},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,r,s)=>{"use strict";s.d(r,{Ks:()=>a,lq:()=>i,tu:()=>n});var t=s(1820),o=s(3873);let n={WORKSPACE_ROOT:(0,o.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},i=(0,o.join)((0,t.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}({})},5255:(e,r,s)=>{"use strict";s.r(r),s.d(r,{patchFetch:()=>g,routeModule:()=>l,serverHooks:()=>j,workAsyncStorage:()=>x,workUnitAsyncStorage:()=>m});var t={};s.r(t),s.d(t,{POST:()=>d});var o=s(9227),n=s(9044),i=s(1131),a=s(7642),c=s(9021),u=s(3873),p=s(4946);async function d(e){try{let{projectName:r}=await e.json();if(!r||"string"!=typeof r)return a.NextResponse.json({success:!1,error:"项目名称不能为空"},{status:400});let s=p.tu.WORKSPACE_ROOT,t=(0,u.join)(s,r);try{await c.promises.access(t)}catch{return a.NextResponse.json({success:!1,error:"项目目录不存在"},{status:404})}try{return await c.promises.rm(t,{recursive:!0,force:!0}),console.log(`手动清理项目成功: ${t}`),a.NextResponse.json({success:!0,message:`项目 ${r} 已成功清理`})}catch(e){return console.error(`清理项目失败 ${t}:`,e),a.NextResponse.json({success:!1,error:`清理项目失败: ${e instanceof Error?e.message:String(e)}`},{status:500})}}catch(e){return console.error("清理项目请求处理失败:",e),a.NextResponse.json({success:!1,error:"服务器内部错误"},{status:500})}}let l=new o.AppRouteRouteModule({definition:{kind:n.RouteKind.APP_ROUTE,page:"/api/cleanup-project/route",pathname:"/api/cleanup-project",filename:"route",bundlePath:"app/api/cleanup-project/route"},resolvedPagePath:"/Users/edy/Documents/prime-workspace/prime-dev-cli/packages/server/src/app/api/cleanup-project/route.ts",nextConfigOutput:"",userland:t}),{workAsyncStorage:x,workUnitAsyncStorage:m,serverHooks:j}=l;function g(){return(0,i.patchFetch)({workAsyncStorage:x,workUnitAsyncStorage:m})}},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")}};var r=require("../../../webpack-runtime.js");r.C(e);var s=e=>r(r.s=e),t=r.X(0,[131,426],()=>s(5255));module.exports=t})();
@@ -0,0 +1 @@
1
+ {"version":1,"files":["../../../../../../../node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/client/components/app-router-headers.js","../../../../../../../node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../../../node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../../node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js","../../../../../../../node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/compiled/next-server/app-route.runtime.prod.js","../../../../../../../node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/server/app-render/action-async-storage-instance.js","../../../../../../../node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/server/app-render/action-async-storage.external.js","../../../../../../../node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/server/app-render/after-task-async-storage-instance.js","../../../../../../../node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/server/app-render/after-task-async-storage.external.js","../../../../../../../node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/server/app-render/async-local-storage.js","../../../../../../../node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/server/app-render/clean-async-snapshot-instance.js","../../../../../../../node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/server/app-render/clean-async-snapshot.external.js","../../../../../../../node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/server/app-render/work-async-storage-instance.js","../../../../../../../node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/server/app-render/work-async-storage.external.js","../../../../../../../node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/server/app-render/work-unit-async-storage-instance.js","../../../../../../../node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/server/app-render/work-unit-async-storage.external.js","../../../../../../../node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/server/lib/incremental-cache/tags-manifest.external.js","../../../../../../../node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/server/lib/trace/constants.js","../../../../../../../node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/server/lib/trace/tracer.js","../../../../../../../node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/shared/lib/is-thenable.js","../../../../../../../node_modules/.pnpm/next@15.3.4_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/package.json","../../../../../../../package.json","../../../../../node_modules/next","../../../../../package.json","../../../../package.json","../../../chunks/131.js","../../../chunks/426.js","../../../webpack-runtime.js","route_client-reference-manifest.js"]}
@@ -0,0 +1 @@
1
+ globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/api/cleanup-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/cleanup-project/route":[]},"rscModuleMapping":{"141":{"*":{"id":"3019","name":"*","chunks":[],"async":false}},"317":{"*":{"id":"7429","name":"*","chunks":[],"async":false}},"1020":{"*":{"id":"9670","name":"*","chunks":[],"async":false}},"3053":{"*":{"id":"5473","name":"*","chunks":[],"async":false}},"3561":{"*":{"id":"8653","name":"*","chunks":[],"async":false}},"3604":{"*":{"id":"1382","name":"*","chunks":[],"async":false}},"3636":{"*":{"id":"4928","name":"*","chunks":[],"async":false}},"6665":{"*":{"id":"9687","name":"*","chunks":[],"async":false}},"7472":{"*":{"id":"9624","name":"*","chunks":[],"async":false}},"9203":{"*":{"id":"8757","name":"*","chunks":[],"async":false}},"9510":{"*":{"id":"4761","name":"*","chunks":[],"async":false}}},"edgeRscModuleMapping":{"317":{"*":{"id":"5207","name":"*","chunks":[],"async":false}},"1020":{"*":{"id":"9136","name":"*","chunks":[],"async":false}},"3053":{"*":{"id":"767","name":"*","chunks":[],"async":false}},"3561":{"*":{"id":"9855","name":"*","chunks":[],"async":false}},"3604":{"*":{"id":"6996","name":"*","chunks":[],"async":false}},"3636":{"*":{"id":"7774","name":"*","chunks":[],"async":false}},"6665":{"*":{"id":"1681","name":"*","chunks":[],"async":false}},"9203":{"*":{"id":"8751","name":"*","chunks":[],"async":false}}}}
@@ -1 +1 @@
1
- (()=>{var e={};e.id=710,e.ids=[710],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:()=>n,sF:()=>c});var t=s(9748),o=s(4946);async function n(){try{await (0,t.access)(o.lq,t.constants.F_OK)}catch{return await c({}),{}}try{let e=await (0,t.readFile)(o.lq,"utf-8");if(!e)return{};return JSON.parse(e)}catch(e){throw console.error("读取或解析项目配置文件失败:",e),Error("无法加载项目配置")}}async function c(e){let r=o.lq+".tmp";try{await (0,t.writeFile)(r,JSON.stringify(e,null,2),"utf-8"),await (0,t.rename)(r,o.lq)}catch(e){throw console.error("保存项目配置文件失败:",e),Error("无法保存项目配置")}}},3033:e=>{"use strict";e.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},3295:e=>{"use strict";e.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},3873:e=>{"use strict";e.exports=require("path")},4540:(e,r,s)=>{"use strict";s.r(r),s.d(r,{patchFetch:()=>g,routeModule:()=>j,serverHooks:()=>k,workAsyncStorage:()=>m,workUnitAsyncStorage:()=>x});var t={};s.r(t),s.d(t,{GET:()=>d});var o=s(9227),n=s(9044),c=s(1131),a=s(7642),i=s(9021),u=s(3873),p=s(2601),l=s(4946);async function d(e){try{let r,s,{searchParams:t}=new URL(e.url),o=t.get("project"),n=t.get("url"),c=t.get("method");if(!o||!n||!c)return a.NextResponse.json({success:!1,error:"缺少必要参数:project, url, method"},{status:400});let d=await (0,p.ZR)();if(!d[o])return a.NextResponse.json({success:!1,error:`项目 ${o} 不存在`},{status:404});if(!d[o].mockOpen)return a.NextResponse.json({success:!1,error:"Mock功能未开启"},{status:400});let j=n.split("?")[0].replace(/^\//,"").replace(/\//g,"_")||"root",m=(0,u.join)(l.tu.WORKSPACE_ROOT,o),x=(0,u.join)(m,".mock"),k=(0,u.join)(x,j),g=(0,u.join)(k,c.toLowerCase()),R=(0,u.join)(g,"setting.js");try{await i.promises.access(R)}catch{return a.NextResponse.json({success:!1,error:`Mock配置文件不存在: ${j}/${c.toLowerCase()}/setting.js`},{status:404})}let h=[];try{let e=(await i.promises.readFile(R,"utf-8")).match(/module\.exports\s*=\s*({[\s\S]*?});?\s*$/);if(e)try{let s=Function("return "+e[1])();r=s.currentSite,h=Array.isArray(s.open)?s.open:[]}catch(e){console.warn(`解析setting.js失败: ${R}`,e)}}catch(e){return console.error(`读取setting.js失败: ${R}`,e),a.NextResponse.json({success:!1,error:"读取Mock配置失败"},{status:500})}if(!r)return a.NextResponse.json({success:!1,error:"未找到当前选中的Mock场景"},{status:404});if(!h.includes(r))return a.NextResponse.json({success:!1,error:`当前场景 "${r}" 未开启Mock功能`},{status:400});let w=(0,u.join)(g,`${r}.js`);try{await i.promises.access(w)}catch{return a.NextResponse.json({success:!1,error:`Mock场景文件不存在: ${j}/${c.toLowerCase()}/${r}.js`},{status:404})}try{let e=(await i.promises.readFile(w,"utf-8")).match(/module\.exports\s*=\s*([\s\S]+);?\s*$/);if(!e)return a.NextResponse.json({success:!1,error:"Mock文件格式不正确"},{status:500});try{s=Function("return "+e[1])()}catch(e){return console.warn(`解析Mock文件失败: ${w}`,e),a.NextResponse.json({success:!1,error:"解析Mock数据失败"},{status:500})}}catch(e){return console.error(`读取Mock文件失败: ${w}`,e),a.NextResponse.json({success:!1,error:"读取Mock数据失败"},{status:500})}return a.NextResponse.json({success:!0,data:{projectName:o,apiName:j,method:c.toLowerCase(),currentSite:r,mockData:s,filePath:(0,u.join)(".mock",j,c.toLowerCase(),`${r}.js`)},message:"Mock数据获取成功"})}catch(r){let e=r instanceof Error?r.message:"获取Mock数据失败";return console.error("获取Mock数据失败:",r),a.NextResponse.json({success:!1,error:e},{status:500})}}let j=new o.AppRouteRouteModule({definition:{kind:n.RouteKind.APP_ROUTE,page:"/api/get-mock-data/route",pathname:"/api/get-mock-data",filename:"route",bundlePath:"app/api/get-mock-data/route"},resolvedPagePath:"/Users/edy/Documents/Coding/prime-dev-cli/packages/server/src/app/api/get-mock-data/route.ts",nextConfigOutput:"",userland:t}),{workAsyncStorage:m,workUnitAsyncStorage:x,serverHooks:k}=j;function g(){return(0,c.patchFetch)({workAsyncStorage:m,workUnitAsyncStorage:x})}},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:()=>a,lq:()=>c,tu:()=>n});var t=s(1820),o=s(3873);let n={WORKSPACE_ROOT:(0,o.join)((0,t.homedir)(),"Documents","prime-workspace"),GIT_TIMEOUT:3e5,MAX_CONCURRENT_CLONES:3,MAX_RETRY_ATTEMPTS:3},c=(0,o.join)((0,t.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}({})},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(4540));module.exports=t})();
1
+ (()=>{var e={};e.id=710,e.ids=[710],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:()=>n,sF:()=>c});var t=s(9748),o=s(4946);async function n(){try{await (0,t.access)(o.lq,t.constants.F_OK)}catch{return await c({}),{}}try{let e=await (0,t.readFile)(o.lq,"utf-8");if(!e)return{};return JSON.parse(e)}catch(e){throw console.error("读取或解析项目配置文件失败:",e),Error("无法加载项目配置")}}async function c(e){let r=o.lq+".tmp";try{await (0,t.writeFile)(r,JSON.stringify(e,null,2),"utf-8"),await (0,t.rename)(r,o.lq)}catch(e){throw console.error("保存项目配置文件失败:",e),Error("无法保存项目配置")}}},3033:e=>{"use strict";e.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},3295:e=>{"use strict";e.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},3873:e=>{"use strict";e.exports=require("path")},4870:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},4907:()=>{},4946:(e,r,s)=>{"use strict";s.d(r,{Ks:()=>a,lq:()=>c,tu:()=>n});var t=s(1820),o=s(3873);let n={WORKSPACE_ROOT:(0,o.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,o.join)((0,t.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}({})},5331:(e,r,s)=>{"use strict";s.r(r),s.d(r,{patchFetch:()=>h,routeModule:()=>m,serverHooks:()=>k,workAsyncStorage:()=>j,workUnitAsyncStorage:()=>x});var t={};s.r(t),s.d(t,{GET:()=>d});var o=s(9227),n=s(9044),c=s(1131),a=s(7642),i=s(9021),u=s(3873),p=s(2601),l=s(4946);async function d(e){try{let r,s,{searchParams:t}=new URL(e.url),o=t.get("project"),n=t.get("url"),c=t.get("method");if(!o||!n||!c)return a.NextResponse.json({success:!1,error:"缺少必要参数:project, url, method"},{status:400});let d=await (0,p.ZR)();if(!d[o])return a.NextResponse.json({success:!1,error:`项目 ${o} 不存在`},{status:404});if(!d[o].mockOpen)return a.NextResponse.json({success:!1,error:"Mock功能未开启"},{status:400});let m=n.split("?")[0].replace(/^\//,"").replace(/\//g,"_")||"root",j=(0,u.join)(l.tu.WORKSPACE_ROOT,o),x=(0,u.join)(j,".mock"),k=(0,u.join)(x,m),h=(0,u.join)(k,c.toLowerCase()),g=(0,u.join)(h,"setting.js");try{await i.promises.access(g)}catch{return a.NextResponse.json({success:!1,error:`Mock配置文件不存在: ${m}/${c.toLowerCase()}/setting.js`},{status:404})}let R=[];try{let e=(await i.promises.readFile(g,"utf-8")).match(/module\.exports\s*=\s*({[\s\S]*?});?\s*$/);if(e)try{let s=Function("return "+e[1])();r=s.currentSite,R=Array.isArray(s.open)?s.open:[]}catch(e){console.warn(`解析setting.js失败: ${g}`,e)}}catch(e){return console.error(`读取setting.js失败: ${g}`,e),a.NextResponse.json({success:!1,error:"读取Mock配置失败"},{status:500})}if(!r)return a.NextResponse.json({success:!1,error:"未找到当前选中的Mock场景"},{status:404});if(!R.includes(r))return a.NextResponse.json({success:!1,error:`当前场景 "${r}" 未开启Mock功能`},{status:400});let w=(0,u.join)(h,`${r}.js`);try{await i.promises.access(w)}catch{return a.NextResponse.json({success:!1,error:`Mock场景文件不存在: ${m}/${c.toLowerCase()}/${r}.js`},{status:404})}try{let e=(await i.promises.readFile(w,"utf-8")).match(/module\.exports\s*=\s*([\s\S]+);?\s*$/);if(!e)return a.NextResponse.json({success:!1,error:"Mock文件格式不正确"},{status:500});try{s=Function("return "+e[1])()}catch(e){return console.warn(`解析Mock文件失败: ${w}`,e),a.NextResponse.json({success:!1,error:"解析Mock数据失败"},{status:500})}}catch(e){return console.error(`读取Mock文件失败: ${w}`,e),a.NextResponse.json({success:!1,error:"读取Mock数据失败"},{status:500})}return a.NextResponse.json({success:!0,data:{projectName:o,apiName:m,method:c.toLowerCase(),currentSite:r,mockData:s,filePath:(0,u.join)(".mock",m,c.toLowerCase(),`${r}.js`)},message:"Mock数据获取成功"})}catch(r){let e=r instanceof Error?r.message:"获取Mock数据失败";return console.error("获取Mock数据失败:",r),a.NextResponse.json({success:!1,error:e},{status:500})}}let m=new o.AppRouteRouteModule({definition:{kind:n.RouteKind.APP_ROUTE,page:"/api/get-mock-data/route",pathname:"/api/get-mock-data",filename:"route",bundlePath:"app/api/get-mock-data/route"},resolvedPagePath:"/Users/edy/Documents/prime-workspace/prime-dev-cli/packages/server/src/app/api/get-mock-data/route.ts",nextConfigOutput:"",userland:t}),{workAsyncStorage:j,workUnitAsyncStorage:x,serverHooks:k}=m;function h(){return(0,c.patchFetch)({workAsyncStorage:j,workUnitAsyncStorage:x})}},9021:e=>{"use strict";e.exports=require("fs")},9294:e=>{"use strict";e.exports=require("next/dist/server/app-render/work-async-storage.external.js")},9748:e=>{"use strict";e.exports=require("fs/promises")}};var r=require("../../../webpack-runtime.js");r.C(e);var s=e=>r(r.s=e),t=r.X(0,[131,426],()=>s(5331));module.exports=t})();
@@ -1 +1 @@
1
- globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/api/get-mock-data/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":"5844","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":9510,"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/6393282fdcf30b00.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/get-mock-data/route":[]},"rscModuleMapping":{"141":{"*":{"id":"3019","name":"*","chunks":[],"async":false}},"317":{"*":{"id":"7429","name":"*","chunks":[],"async":false}},"1020":{"*":{"id":"9670","name":"*","chunks":[],"async":false}},"3053":{"*":{"id":"5473","name":"*","chunks":[],"async":false}},"3561":{"*":{"id":"8653","name":"*","chunks":[],"async":false}},"3604":{"*":{"id":"1382","name":"*","chunks":[],"async":false}},"3636":{"*":{"id":"4928","name":"*","chunks":[],"async":false}},"6665":{"*":{"id":"9687","name":"*","chunks":[],"async":false}},"7472":{"*":{"id":"9624","name":"*","chunks":[],"async":false}},"9203":{"*":{"id":"8757","name":"*","chunks":[],"async":false}},"9510":{"*":{"id":"4761","name":"*","chunks":[],"async":false}}},"edgeRscModuleMapping":{"317":{"*":{"id":"5207","name":"*","chunks":[],"async":false}},"1020":{"*":{"id":"9136","name":"*","chunks":[],"async":false}},"3053":{"*":{"id":"767","name":"*","chunks":[],"async":false}},"3561":{"*":{"id":"9855","name":"*","chunks":[],"async":false}},"3604":{"*":{"id":"6996","name":"*","chunks":[],"async":false}},"3636":{"*":{"id":"7774","name":"*","chunks":[],"async":false}},"6665":{"*":{"id":"1681","name":"*","chunks":[],"async":false}},"9203":{"*":{"id":"8751","name":"*","chunks":[],"async":false}}}}
1
+ globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/api/get-mock-data/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/get-mock-data/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,5 +1,18 @@
1
- (()=>{var e={};e.id=752,e.ids=[752],e.modules={483:()=>{},846:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},1804:(e,r,s)=>{"use strict";s.d(r,{kf:()=>p,eR:()=>a,DR:()=>c,x9:()=>d,e_:()=>u});let t=require("child_process");var o=s(9021),n=s(3873),i=s(4946);async function c(e){try{return(0,o.existsSync)(e)||(0,o.mkdirSync)(e,{recursive:!0}),{success:!0}}catch(e){return{success:!1,error:`创建工作空间目录失败: ${e instanceof Error?e.message:String(e)}`}}}async function a(e){let{repoUrl:r,targetDir:s,timeout:o,onProgress:c,onError:a}=e,u=(0,n.basename)(r,".git");return new Promise(e=>{let l=Date.now(),p={projectName:u,status:i.Ks.CLONING,progress:0,message:"开始克隆项目...",startTime:l};c?.(0,"开始克隆项目...");let d=(0,t.spawn)("git",["clone",r,(0,n.join)(s,u)],{cwd:s,stdio:["pipe","pipe","pipe"]}),g="",m=0,y=setTimeout(()=>{d.kill("SIGTERM");let r={...p,status:i.Ks.FAILED,progress:m,message:"克隆操作超时",error:`克隆操作超时 (${o/1e3}s)`,endTime:Date.now()};a?.(`${u}: 克隆操作超时`),e(r)},o);d.stdout?.on("data",()=>{m=Math.min(m+10,80),c?.(m,"正在克隆代码...")}),d.stderr?.on("data",e=>{let r=e.toString();g+=r,(r.includes("Receiving objects")||r.includes("Resolving deltas"))&&(m=Math.min(m+5,90),c?.(m,"正在接收对象..."))}),d.on("close",r=>{clearTimeout(y);let s=Date.now();if(0===r){let r={...p,status:i.Ks.SUCCESS,progress:100,message:"克隆完成",endTime:s};c?.(100,"克隆完成"),e(r)}else{let t={...p,status:i.Ks.FAILED,progress:m,message:"克隆失败",error:function(e){let r=e.toLowerCase();return r.includes("authentication failed")||r.includes("access denied")?"身份验证失败,请检查仓库访问权限":r.includes("repository not found")||r.includes("not found")?"仓库不存在或无法访问":r.includes("network")||r.includes("connection")?"网络连接问题,请检查网络设置":r.includes("timeout")?"网络超时,请重试":r.includes("permission denied")?"权限被拒绝,请检查文件系统权限":r.includes("already exists")?"目标目录已存在":e.slice(0,200)+(e.length>200?"...":"")}(g)||`Git 进程退出,代码: ${r}`,endTime:s};a?.(`${u}: ${t.error}`),e(t)}}),d.on("error",r=>{clearTimeout(y);let s={...p,status:i.Ks.FAILED,progress:m,message:"进程启动失败",error:`进程启动失败: ${r.message}`,endTime:Date.now()};a?.(`${u}: ${r.message}`),e(s)})})}function u(e){return e.replace(/[^a-zA-Z0-9\-_]/g,"")}async function l(e,r){try{let s=(0,n.join)(e,r);if(!(0,o.existsSync)(s))return!1;let t=(0,n.join)(s,".git");if(!(0,o.existsSync)(t))return!1;return!0}catch(e){return console.error(`检查项目 ${r} 存在性时出错:`,e),!1}}async function p(e,r){let s={},t=r.map(async r=>{let t=await l(e,r);s[r]=t});return await Promise.all(t),s}async function d(e){return new Promise(r=>{if(!(0,o.existsSync)(e))return void r({success:!1,error:`项目路径不存在: ${e}`});let s=(0,t.spawn)("cursor",[e],{stdio:["ignore","pipe","pipe"],detached:!0}),n="",i=setTimeout(()=>{s.kill("SIGTERM"),r({success:!1,error:"Cursor 命令执行超时"})},1e4);s.stderr?.on("data",e=>{n+=e.toString()}),s.on("exit",e=>{clearTimeout(i),0===e?r({success:!0}):r({success:!1,error:`Cursor 退出代码: ${e}${n?`, 错误: ${n}`:""}`})}),s.on("error",e=>{clearTimeout(i),e.message.includes("ENOENT")?r({success:!1,error:"Cursor 命令未找到,请确保 Cursor CLI 已正确安装并在 PATH 中"}):r({success:!1,error:`启动 Cursor 失败: ${e.message}`})}),s.unref()})}},1820:e=>{"use strict";e.exports=require("os")},2601:(e,r,s)=>{"use strict";s.d(r,{ZR:()=>n,sF:()=>i});var t=s(9748),o=s(4946);async function n(){try{await (0,t.access)(o.lq,t.constants.F_OK)}catch{return await i({}),{}}try{let e=await (0,t.readFile)(o.lq,"utf-8");if(!e)return{};return JSON.parse(e)}catch(e){throw console.error("读取或解析项目配置文件失败:",e),Error("无法加载项目配置")}}async function i(e){let r=o.lq+".tmp";try{await (0,t.writeFile)(r,JSON.stringify(e,null,2),"utf-8"),await (0,t.rename)(r,o.lq)}catch(e){throw console.error("保存项目配置文件失败:",e),Error("无法保存项目配置")}}},3033:e=>{"use strict";e.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},3873:e=>{"use strict";e.exports=require("path")},4314:(e,r,s)=>{"use strict";s.d(r,{DA:()=>i,OU:()=>n,mn:()=>c});var t=s(9021),o=s(3873);async function n(e,r,s){let n=(0,o.join)(s,e),i=[],c=[];try{let e=r.envs||{};for(let r in e){let s=e[r];if(s.envFileName&&s.proxyKey){let e=(0,o.join)(n,s.envFileName);try{await t.promises.access(e),c.push(s.envFileName)}catch{let r=s.proxyEnv[s.currentProxy]||"",o=`${s.proxyKey}=${r}`;await t.promises.writeFile(e,o,"utf-8"),i.push(s.envFileName)}}}return{success:!0,createdFiles:i,skippedFiles:c}}catch(s){let r=s instanceof Error?s.message:String(s);return console.error(`在为项目 ${e} 创建环境文件时出错:`,s),{success:!1,createdFiles:i,skippedFiles:c,error:r}}}async function i(e,r){let s=(0,o.join)(r,e),n=(0,o.join)(s,".mock"),i=[],c=[];try{try{await t.promises.access(n),c.push(".mock")}catch{await t.promises.mkdir(n,{recursive:!0}),i.push(".mock")}return{success:!0,createdDirectories:i,skippedDirectories:c}}catch(s){let r=s instanceof Error?s.message:String(s);return console.error(`在为项目 ${e} 创建Mock目录时出错:`,s),{success:!1,createdDirectories:i,skippedDirectories:c,error:r}}}async function c(e,r,s,n){try{let i=s.envs[r];if(!i)return{success:!1,error:`环境 ${r} 不存在于项目 ${e} 配置中`};if(!i.envFileName||!i.proxyKey)return{success:!1,error:`环境 ${r} 缺少 envFileName 或 proxyKey 配置`};let c=(0,o.join)(n,e),a=(0,o.join)(c,i.envFileName),u=i.proxyEnv[i.currentProxy]||i.currentProxy,l=`${i.proxyKey}=${u}`;return await t.promises.writeFile(a,l,"utf-8"),console.log(`已更新环境文件: ${a}, 内容: ${l}`),{success:!0,updatedFile:i.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:()=>c,lq:()=>i,tu:()=>n});var t=s(1820),o=s(3873);let n={WORKSPACE_ROOT:(0,o.join)((0,t.homedir)(),"Documents","prime-workspace"),GIT_TIMEOUT:3e5,MAX_CONCURRENT_CLONES:3,MAX_RETRY_ATTEMPTS:3},i=(0,o.join)((0,t.homedir)(),".prime-projects.json");var c=function(e){return e.PENDING="pending",e.EXISTING="existing",e.CLONING="cloning",e.SUCCESS="success",e.FAILED="failed",e.RETRYING="retrying",e}({})},8620:(e,r,s)=>{"use strict";s.r(r),s.d(r,{patchFetch:()=>f,routeModule:()=>d,serverHooks:()=>y,workAsyncStorage:()=>g,workUnitAsyncStorage:()=>m});var t={};s.r(t),s.d(t,{GET:()=>p});var o=s(9227),n=s(9044),i=s(1131),c=s(4946),a=s(2601),u=s(1804),l=s(4314);async function p(){let e=new TextEncoder;return new Response(new ReadableStream({async start(r){try{let s=s=>{let t=`data: ${JSON.stringify(s)}
1
+ (()=>{var e={};e.id=752,e.ids=[752],e.modules={483:()=>{},846:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},1804:(e,t,r)=>{"use strict";r.d(t,{kf:()=>g,YK:()=>l,eR:()=>a,DR:()=>c,x9:()=>m,e_:()=>u});let s=require("child_process");var n=r(9021),o=r(3873),i=r(4946);async function c(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 a(e){let{repoUrl:t,targetDir:r,timeout:n,onProgress:c,onError:a,onLog:u}=e,l=(0,o.basename)(t,".git");return new Promise(e=>{let p=Date.now(),d={projectName:l,status:i.Ks.CLONING,progress:0,message:"开始克隆项目...",startTime:p};c?.(0,"开始克隆项目...");let g=(0,o.join)(r,l),m=["clone","--progress","--verbose",t,g];u?.(l,"stdout",`[开始克隆] 执行命令: git ${m.join(" ")}
2
+ `),u?.(l,"stdout",`[目标目录] ${g}
3
+ `),u?.(l,"stdout",`[仓库地址] ${t}
4
+ `);let h=(0,s.spawn)("git",m,{cwd:r,stdio:["pipe","pipe","pipe"]}),y="",f=0;u?.(l,"stdout",`[进程启动] Git 进程 PID: ${h.pid}
5
+ `);let $=setTimeout(()=>{u?.(l,"stderr",`[超时警告] Git 进程运行超过 ${n/1e3}s,即将终止
6
+ `),h.kill("SIGTERM");let t={...d,status:i.Ks.FAILED,progress:f,message:"克隆操作超时",error:`克隆操作超时 (${n/1e3}s)`,endTime:Date.now()};u?.(l,"stderr",`[进程终止] 克隆操作超时
7
+ `),a?.(`${l}: 克隆操作超时`),e(t)},n);h.stdout?.on("data",e=>{let t=e.toString();u?.(l,"stdout",t),f=Math.min(f+10,80),c?.(f,"正在克隆代码...")}),h.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")?u?.(l,"progress",t):u?.(l,"stderr",t),t.includes("Receiving objects")||t.includes("Resolving deltas")?(f=Math.min(f+5,90),c?.(f,"正在接收对象...")):t.includes("Counting objects")?(f=Math.min(f+2,70),c?.(f,"正在计算对象...")):t.includes("Enumerating objects")&&(f=Math.min(f+2,50),c?.(f,"正在枚举对象..."))}),h.on("close",t=>{clearTimeout($);let r=Date.now(),s=r-p;if(u?.(l,"stdout",`[进程结束] Git 进程退出,代码: ${t},耗时: ${Math.round(s/1e3)}s
8
+ `),0===t){u?.(l,"stdout",`[克隆成功] 项目已成功克隆到: ${g}
9
+ `);let t={...d,status:i.Ks.SUCCESS,progress:100,message:"克隆完成",endTime:r};c?.(100,"克隆完成"),e(t)}else{let s=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);u?.(l,"stderr",`[克隆失败] 错误信息: ${s}
10
+ `),u?.(l,"stderr",`[完整错误输出]
11
+ ${y}
12
+ `);let n={...d,status:i.Ks.FAILED,progress:f,message:"克隆失败",error:s||`Git 进程退出,代码: ${t}`,endTime:r};a?.(`${l}: ${n.error}`),e(n)}}),h.on("error",t=>{clearTimeout($),u?.(l,"stderr",`[进程错误] Git 进程启动失败: ${t.message}
13
+ `),u?.(l,"stderr",`[错误详情] ${t.stack||"No stack trace"}
14
+ `);let r={...d,status:i.Ks.FAILED,progress:f,message:"进程启动失败",error:`进程启动失败: ${t.message}`,endTime:Date.now()};a?.(`${l}: ${t.message}`),e(r)})})}function u(e){return e.replace(/[^a-zA-Z0-9\-_]/g,"")}async function l(e,t){try{let r=(0,o.join)(e,t);if(!(0,n.existsSync)(r))return{exists:!1,status:"not_exists",needsCleanup:!1};let s=(0,o.join)(r,".git");if(!(0,n.existsSync)(s))return{exists:!0,status:"incomplete",needsCleanup:!0};if(!await d(r))return console.log(`检测到不完整的Git仓库: ${r}`),{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,o.join)(e,".git");for(let e of["HEAD","config","refs"]){let r=(0,o.join)(t,e);if(!(0,n.existsSync)(r))return!1}let r=(await n.promises.readdir(e)).filter(e=>".git"!==e);if(0===r.length)return!1;let s=(0,o.join)(t,"HEAD"),i=await n.promises.readFile(s,"utf-8");if(!i.trim()||i.includes("unborn"))return!1;return!0}catch(e){return console.error("检查Git仓库完整性时出错:",e),!1}}async function g(e,t){let r={},s=t.map(async t=>{let s=await p(e,t);r[t]=s});return await Promise.all(s),r}async function m(e){return new Promise(t=>{if(!(0,n.existsSync)(e))return void t({success:!1,error:`项目路径不存在: ${e}`});let r=(0,s.spawn)("cursor",[e],{stdio:["ignore","pipe","pipe"],detached:!0}),o="",i=setTimeout(()=>{r.kill("SIGTERM"),t({success:!1,error:"Cursor 命令执行超时"})},1e4);r.stderr?.on("data",e=>{o+=e.toString()}),r.on("exit",e=>{clearTimeout(i),0===e?t({success:!0}):t({success:!1,error:`Cursor 退出代码: ${e}${o?`, 错误: ${o}`:""}`})}),r.on("error",e=>{clearTimeout(i),e.message.includes("ENOENT")?t({success:!1,error:"Cursor 命令未找到,请确保 Cursor CLI 已正确安装并在 PATH 中"}):t({success:!1,error:`启动 Cursor 失败: ${e.message}`})}),r.unref()})}},1820:e=>{"use strict";e.exports=require("os")},2601:(e,t,r)=>{"use strict";r.d(t,{ZR:()=>o,sF:()=>i});var s=r(9748),n=r(4946);async function o(){try{await (0,s.access)(n.lq,s.constants.F_OK)}catch{return await i({}),{}}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 i(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")},3045:(e,t,r)=>{"use strict";r.r(t),r.d(t,{patchFetch:()=>f,routeModule:()=>g,serverHooks:()=>y,workAsyncStorage:()=>m,workUnitAsyncStorage:()=>h});var s={};r.r(s),r.d(s,{GET:()=>d});var n=r(9227),o=r(9044),i=r(1131),c=r(4946),a=r(2601),u=r(1804),l=r(4314);class p{constructor(e){this.running=new Set,this.queue=[],this.maxConcurrent=e}async add(e){return new Promise((t,r)=>{this.queue.push(async()=>{try{let r=await e();return t(r),r}catch(e){throw r(e),e}}),this.process()})}async process(){if(this.running.size>=this.maxConcurrent||0===this.queue.length)return;let e=this.queue.shift();if(!e)return;let t=e().finally(()=>{this.running.delete(t),this.process()});this.running.add(t)}async waitForAll(){for(;this.running.size>0||this.queue.length>0;)this.running.size>0&&await Promise.race(this.running),this.process()}getStatus(){return{running:this.running.size,queued:this.queue.length,maxConcurrent:this.maxConcurrent}}}async function d(){let e=new TextEncoder,t=new ReadableStream({async start(t){try{let r=r=>{"command_log"===r.type&&"string"==typeof r.content&&r.content.length>8192&&(r.content=r.content.slice(0,8192)+"\n[...日志内容已截断...]");let s=`data: ${JSON.stringify(r)}
2
15
 
3
- `;r.enqueue(e.encode(t))},t=async(e,r,t=25)=>{s({type:"project_env_creation",projectName:e,message:`为项目 ${e} 检查/创建环境文件...`,progress:t});let n=await (0,l.OU)(e,r,o);if(!n.success)return void s({type:"project_env_failed",projectName:e,message:`为项目 ${e} 创建环境文件失败: ${n.error}`,error:n.error,progress:t+2});{let r=`项目 ${e} 环境文件处理完成。`;n.createdFiles.length>0&&(r+=` 新建: ${n.createdFiles.join(", ")}.`),n.skippedFiles.length>0&&(r+=` 已存在,跳过: ${n.skippedFiles.join(", ")}.`),s({type:"project_env_success",projectName:e,message:r,progress:t+2})}s({type:"project_mock_creation",projectName:e,message:`为项目 ${e} 创建Mock目录结构...`,progress:t+3});let i=await (0,l.DA)(e,o);if(i.success){let r=`项目 ${e} Mock目录结构处理完成。`;i.createdDirectories.length>0&&(r+=` 新建: ${i.createdDirectories.join(", ")}.`),i.skippedDirectories.length>0&&(r+=` 已存在,跳过: ${i.skippedDirectories.join(", ")}.`),s({type:"project_mock_success",projectName:e,message:r,progress:t+5})}else s({type:"project_mock_failed",projectName:e,message:`为项目 ${e} 创建Mock目录失败: ${i.error}`,error:i.error,progress:t+5})};s({type:"initialization",message:"开始初始化工作空间...",progress:0});let o=c.tu.WORKSPACE_ROOT,n=await (0,u.DR)(o);if(!n.success){s({type:"error",message:n.error,progress:0}),r.close();return}s({type:"workspace_created",message:`工作空间已创建: ${o}`,progress:10});let i=await (0,a.ZR)(),p=Object.entries(i),d=p.length;if(0===d){s({type:"error",message:"没有找到需要克隆的项目",progress:10}),r.close();return}s({type:"projects_loaded",message:`找到 ${d} 个项目准备克隆`,projects:p.map(([e])=>e),progress:20});let g={success:!0,totalProjects:d,successCount:0,failedCount:0,failedProjects:[],workspacePath:o,duration:0},m=Date.now(),y=await (0,u.kf)(o,p.map(([e])=>e)),f=p.filter(([e])=>y[e]),h=p.filter(([e])=>!y[e]);for(let[e,r]of f)s({type:"project_existing",projectName:e,message:`项目 ${e} 已存在,跳过克隆`}),await t(e,r,25);if(g.successCount=f.length,0===h.length){s({type:"completion",message:`所有 ${d} 个项目都已存在,无需克隆`,progress:100,result:{success:!0,totalProjects:d,successCount:d,failedCount:0,failedProjects:[],workspacePath:o,duration:Date.now()-m}}),r.close();return}s({type:"projects_filtered",message:`发现 ${f.length} 个项目已存在,${h.length} 个项目需要克隆`,totalProjects:d,projectsToClone:h.length,existingProjects:f.length,progress:25});for(let e=0;e<h.length;e++){let[r,n]=h[e],i=25+70*e/(h.length||1);s({type:"project_start",projectName:r,message:`开始克隆项目: ${r}`,progress:Math.round(i)});try{let e=await (0,u.eR)({repoUrl:n.repo,targetDir:o,timeout:c.tu.GIT_TIMEOUT,onProgress:(e,t)=>{let o=Math.round(i+70*e/(100*(h.length||1)));s({type:"project_progress",projectName:r,progress:Math.min(o,90),message:t})},onError:e=>{s({type:"project_error",projectName:r,error:e,progress:Math.round(i+70/(h.length||1))})}});e.status===c.Ks.SUCCESS?(g.successCount++,s({type:"project_success",projectName:r,message:`项目 ${r} 克隆成功`,progress:Math.round(i+60/(h.length||1)),result:e}),await t(r,n,Math.round(i+65/(h.length||1)))):(g.failedCount++,g.failedProjects.push(r),s({type:"project_failed",projectName:r,message:`项目 ${r} 克隆失败: ${e.error}`,progress:Math.round(i+70/(h.length||1)),result:e}))}catch(t){g.failedCount++,g.failedProjects.push(r);let e=t instanceof Error?t.message:String(t);s({type:"project_failed",projectName:r,message:`项目 ${r} 克隆异常: ${e}`,error:e,progress:Math.round(i+70/(h.length||1))})}}g.duration=Date.now()-m,g.success=0===g.failedCount,s({type:"completion",message:g.success?`所有项目克隆完成!成功 ${g.successCount} 个,耗时 ${Math.round(g.duration/1e3)}s`:`克隆完成,部分失败。成功 ${g.successCount} 个,失败 ${g.failedCount} 个,耗时 ${Math.round(g.duration/1e3)}s`,progress:100,result:g}),r.close()}catch(o){let s=o instanceof Error?o.message:String(o);console.error("工作空间初始化失败:",o);let t=`data: ${JSON.stringify({type:"error",message:`工作空间初始化失败: ${s}`,error:s,progress:0})}
16
+ `;t.enqueue(e.encode(s))},s=async(e,t,s=25)=>{r({type:"project_env_creation",projectName:e,message:`为项目 ${e} 检查/创建环境文件...`,progress:s});let o=await (0,l.OU)(e,t,n);if(!o.success)return void r({type:"project_env_failed",projectName:e,message:`为项目 ${e} 创建环境文件失败: ${o.error}`,error:o.error,progress:s+2});{let t=`项目 ${e} 环境文件处理完成。`;o.createdFiles.length>0&&(t+=` 新建: ${o.createdFiles.join(", ")}.`),o.skippedFiles.length>0&&(t+=` 已存在,跳过: ${o.skippedFiles.join(", ")}.`),r({type:"project_env_success",projectName:e,message:t,progress:s+2})}r({type:"project_mock_creation",projectName:e,message:`为项目 ${e} 创建Mock目录结构...`,progress:s+3});let i=await (0,l.DA)(e,n);if(i.success){let t=`项目 ${e} Mock目录结构处理完成。`;i.createdDirectories.length>0&&(t+=` 新建: ${i.createdDirectories.join(", ")}.`),i.skippedDirectories.length>0&&(t+=` 已存在,跳过: ${i.skippedDirectories.join(", ")}.`),r({type:"project_mock_success",projectName:e,message:t,progress:s+5})}else r({type:"project_mock_failed",projectName:e,message:`为项目 ${e} 创建Mock目录失败: ${i.error}`,error:i.error,progress:s+5})};r({type:"initialization",message:"开始初始化工作空间...",progress:0});let n=c.tu.WORKSPACE_ROOT,o=await (0,u.DR)(n);if(!o.success){r({type:"error",message:o.error,progress:0}),t.close();return}r({type:"workspace_created",message:`工作空间已创建: ${n}`,progress:10});let i=await (0,a.ZR)(),d=Object.entries(i),g=d.length;if(0===g){r({type:"error",message:"没有找到需要克隆的项目",progress:10}),t.close();return}r({type:"projects_loaded",message:`找到 ${g} 个项目准备克隆`,projects:d.map(([e])=>e),progress:20});let m={success:!0,totalProjects:g,successCount:0,failedCount:0,failedProjects:[],workspacePath:n,duration:0},h=Date.now(),y=await (0,u.kf)(n,d.map(([e])=>e)),f=d.filter(([e])=>y[e]),$=d.filter(([e])=>!y[e]);for(let[e,t]of f)r({type:"project_existing",projectName:e,message:`项目 ${e} 已存在,跳过克隆`}),await s(e,t,25);if(m.successCount=f.length,0===$.length){r({type:"completion",message:`所有 ${g} 个项目都已存在,无需克隆`,progress:100,result:{success:!0,totalProjects:g,successCount:g,failedCount:0,failedProjects:[],workspacePath:n,duration:Date.now()-h}}),t.close();return}let w=c.tu.MAX_CONCURRENT_CLONES;r({type:"projects_filtered",message:`发现 ${f.length} 个项目已存在,${$.length} 个项目需要克隆(并发数: ${w})`,totalProjects:g,projectsToClone:$.length,existingProjects:f.length,progress:25});let C=new p(w),j=new Map,x=$.map(([e,t],o)=>C.add(async()=>{let i=25+70*o/($.length||1);r({type:"project_start",projectName:e,message:`开始克隆项目: ${e} (${o+1}/${$.length})`,progress:Math.round(i)});try{let o=await (0,u.eR)({repoUrl:t.repo,targetDir:n,timeout:c.tu.GIT_TIMEOUT,onProgress:(t,s)=>{let n=Math.round(i+50*t/(100*($.length||1)));r({type:"project_progress",projectName:e,progress:Math.min(n,85),message:s})},onError:t=>{r({type:"project_error",projectName:e,error:t,progress:Math.round(i+50/($.length||1))})},onLog:(e,t,s)=>{r({type:"command_log",projectName:e,logType:t,content:s,timestamp:Date.now()})}});o.status===c.Ks.SUCCESS?(j.set(e,{status:c.Ks.SUCCESS,result:o}),r({type:"project_success",projectName:e,message:`项目 ${e} 克隆成功`,progress:Math.round(i+55/($.length||1)),result:o}),await s(e,t,Math.round(i+60/($.length||1)))):(j.set(e,{status:c.Ks.FAILED,error:o.error,result:o}),r({type:"project_failed",projectName:e,message:`项目 ${e} 克隆失败: ${o.error}`,progress:Math.round(i+70/($.length||1)),result:o}))}catch(s){let t=s instanceof Error?s.message:String(s);j.set(e,{status:c.Ks.FAILED,error:t}),r({type:"project_failed",projectName:e,message:`项目 ${e} 克隆异常: ${t}`,error:t,progress:Math.round(i+70/($.length||1))})}}));for(let[e,t]of(await Promise.all(x),j))t.status===c.Ks.SUCCESS?m.successCount++:(m.failedCount++,m.failedProjects.push(e));m.duration=Date.now()-h,m.success=0===m.failedCount,r({type:"completion",message:m.success?`所有项目克隆完成!成功 ${m.successCount} 个,耗时 ${Math.round(m.duration/1e3)}s`:`克隆完成,部分失败。成功 ${m.successCount} 个,失败 ${m.failedCount} 个,耗时 ${Math.round(m.duration/1e3)}s`,progress:100,result:m}),t.close()}catch(n){let r=n instanceof Error?n.message:String(n);console.error("工作空间初始化失败:",n);let s=`data: ${JSON.stringify({type:"error",message:`工作空间初始化失败: ${r}`,error:r,progress:0})}
4
17
 
5
- `;r.enqueue(e.encode(t)),r.close()}}}),{headers:{"Content-Type":"text/event-stream","Cache-Control":"no-cache",Connection:"keep-alive","Access-Control-Allow-Origin":"*","Access-Control-Allow-Headers":"Cache-Control"}})}let d=new o.AppRouteRouteModule({definition:{kind:n.RouteKind.APP_ROUTE,page:"/api/initialize-workspace/route",pathname:"/api/initialize-workspace",filename:"route",bundlePath:"app/api/initialize-workspace/route"},resolvedPagePath:"/Users/edy/Documents/Coding/prime-dev-cli/packages/server/src/app/api/initialize-workspace/route.ts",nextConfigOutput:"",userland:t}),{workAsyncStorage:g,workUnitAsyncStorage:m,serverHooks:y}=d;function f(){return(0,i.patchFetch)({workAsyncStorage:g,workUnitAsyncStorage:m})}},9021:e=>{"use strict";e.exports=require("fs")},9227:(e,r,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")}};var r=require("../../../webpack-runtime.js");r.C(e);var s=e=>r(r.s=e),t=r.X(0,[131],()=>s(8620));module.exports=t})();
18
+ `;t.enqueue(e.encode(s)),t.close()}}});return new Response(t,{headers:{"Content-Type":"text/event-stream","Cache-Control":"no-cache",Connection:"keep-alive","Access-Control-Allow-Origin":"*","Access-Control-Allow-Headers":"Cache-Control"}})}let g=new n.AppRouteRouteModule({definition:{kind:o.RouteKind.APP_ROUTE,page:"/api/initialize-workspace/route",pathname:"/api/initialize-workspace",filename:"route",bundlePath:"app/api/initialize-workspace/route"},resolvedPagePath:"/Users/edy/Documents/prime-workspace/prime-dev-cli/packages/server/src/app/api/initialize-workspace/route.ts",nextConfigOutput:"",userland:s}),{workAsyncStorage:m,workUnitAsyncStorage:h,serverHooks:y}=g;function f(){return(0,i.patchFetch)({workAsyncStorage:m,workUnitAsyncStorage:h})}},3873:e=>{"use strict";e.exports=require("path")},4314:(e,t,r)=>{"use strict";r.d(t,{DA:()=>i,OU:()=>o,mn:()=>c});var s=r(9021),n=r(3873);async function o(e,t,r){let o=(0,n.join)(r,e),i=[],c=[];try{let e=t.envs||{};for(let t in e){let r=e[t];if(r.envFileName&&r.proxyKey){let e=(0,n.join)(o,r.envFileName);try{await s.promises.access(e),c.push(r.envFileName)}catch{let t=r.proxyEnv[r.currentProxy]||"",n=`${r.proxyKey}=${t}`;await s.promises.writeFile(e,n,"utf-8"),i.push(r.envFileName)}}}return{success:!0,createdFiles:i,skippedFiles:c}}catch(r){let t=r instanceof Error?r.message:String(r);return console.error(`在为项目 ${e} 创建环境文件时出错:`,r),{success:!1,createdFiles:i,skippedFiles:c,error:t}}}async function i(e,t){let r=(0,n.join)(t,e),o=(0,n.join)(r,".mock"),i=[],c=[];try{try{await s.promises.access(o),c.push(".mock")}catch{await s.promises.mkdir(o,{recursive:!0}),i.push(".mock")}return{success:!0,createdDirectories:i,skippedDirectories:c}}catch(r){let t=r instanceof Error?r.message:String(r);return console.error(`在为项目 ${e} 创建Mock目录时出错:`,r),{success:!1,createdDirectories:i,skippedDirectories:c,error:t}}}async function c(e,t,r,o){try{let i=r.envs[t];if(!i)return{success:!1,error:`环境 ${t} 不存在于项目 ${e} 配置中`};if(!i.envFileName||!i.proxyKey)return{success:!1,error:`环境 ${t} 缺少 envFileName 或 proxyKey 配置`};let c=(0,n.join)(o,e),a=(0,n.join)(c,i.envFileName),u=i.proxyEnv[i.currentProxy]||i.currentProxy,l=`${i.proxyKey}=${u}`;return await s.promises.writeFile(a,l,"utf-8"),console.log(`已更新环境文件: ${a}, 内容: ${l}`),{success:!0,updatedFile:i.envFileName}}catch(s){let r=s instanceof Error?s.message:String(s);return console.error(`更新项目 ${e} 环境 ${t} 的环境文件时出错:`,s),{success:!1,error:r}}}},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:()=>c,lq:()=>i,tu:()=>o});var s=r(1820),n=r(3873);let o={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},i=(0,n.join)((0,s.homedir)(),".prime-projects.json");var c=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,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(3045));module.exports=s})();
@@ -1 +1 @@
1
- globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/api/initialize-workspace/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":"5844","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":9510,"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/6393282fdcf30b00.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/initialize-workspace/route":[]},"rscModuleMapping":{"141":{"*":{"id":"3019","name":"*","chunks":[],"async":false}},"317":{"*":{"id":"7429","name":"*","chunks":[],"async":false}},"1020":{"*":{"id":"9670","name":"*","chunks":[],"async":false}},"3053":{"*":{"id":"5473","name":"*","chunks":[],"async":false}},"3561":{"*":{"id":"8653","name":"*","chunks":[],"async":false}},"3604":{"*":{"id":"1382","name":"*","chunks":[],"async":false}},"3636":{"*":{"id":"4928","name":"*","chunks":[],"async":false}},"6665":{"*":{"id":"9687","name":"*","chunks":[],"async":false}},"7472":{"*":{"id":"9624","name":"*","chunks":[],"async":false}},"9203":{"*":{"id":"8757","name":"*","chunks":[],"async":false}},"9510":{"*":{"id":"4761","name":"*","chunks":[],"async":false}}},"edgeRscModuleMapping":{"317":{"*":{"id":"5207","name":"*","chunks":[],"async":false}},"1020":{"*":{"id":"9136","name":"*","chunks":[],"async":false}},"3053":{"*":{"id":"767","name":"*","chunks":[],"async":false}},"3561":{"*":{"id":"9855","name":"*","chunks":[],"async":false}},"3604":{"*":{"id":"6996","name":"*","chunks":[],"async":false}},"3636":{"*":{"id":"7774","name":"*","chunks":[],"async":false}},"6665":{"*":{"id":"1681","name":"*","chunks":[],"async":false}},"9203":{"*":{"id":"8751","name":"*","chunks":[],"async":false}}}}
1
+ globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/api/initialize-workspace/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/initialize-workspace/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,5 +1,5 @@
1
- (()=>{var e={};e.id=934,e.ids=[934],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,o)=>{"use strict";o.d(t,{ZR:()=>r,sF:()=>c});var n=o(9748),s=o(4946);async function r(){try{await (0,n.access)(s.lq,n.constants.F_OK)}catch{return await c({}),{}}try{let e=await (0,n.readFile)(s.lq,"utf-8");if(!e)return{};return JSON.parse(e)}catch(e){throw console.error("读取或解析项目配置文件失败:",e),Error("无法加载项目配置")}}async function c(e){let t=s.lq+".tmp";try{await (0,n.writeFile)(t,JSON.stringify(e,null,2),"utf-8"),await (0,n.rename)(t,s.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")},3114:(e,t,o)=>{"use strict";o.r(t),o.d(t,{patchFetch:()=>g,routeModule:()=>u,serverHooks:()=>E,workAsyncStorage:()=>d,workUnitAsyncStorage:()=>S});var n={};o.r(n),o.d(n,{GET:()=>p,OPTIONS:()=>h});var s=o(9227),r=o(9044),c=o(1131),a=o(7642),i=o(7785),l=o(2601);async function p(e){let{searchParams:t}=new URL(e.url),o=t.get("env"),n=t.get("clientId")||`client-${Date.now()}-${Math.random().toString(36).substr(2,9)}`;if(!o)return a.NextResponse.json({success:!1,error:"缺少必要参数:env(环境名称)"},{status:400});try{let e=await (0,l.ZR)(),t=!1;for(let[,n]of Object.entries(e))if(n.envs&&n.envs[o]){t=!0;break}if(!t)return a.NextResponse.json({success:!1,error:`环境 "${o}" 不存在于任何项目中`},{status:404});console.log(`[SSE] 新的连接请求: 环境=${o}, 客户端=${n}`);let s=new TextEncoder,r=new ReadableStream({start(e){i.z.addConnection(o,e,n);let t={type:"connection-established",envName:o,clientId:n,timestamp:Date.now(),message:`已连接到环境 ${o} 的配置变化推送流`},r=`data: ${JSON.stringify(t)}
1
+ (()=>{var e={};e.id=934,e.ids=[934],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,o)=>{"use strict";o.d(t,{ZR:()=>r,sF:()=>c});var n=o(9748),s=o(4946);async function r(){try{await (0,n.access)(s.lq,n.constants.F_OK)}catch{return await c({}),{}}try{let e=await (0,n.readFile)(s.lq,"utf-8");if(!e)return{};return JSON.parse(e)}catch(e){throw console.error("读取或解析项目配置文件失败:",e),Error("无法加载项目配置")}}async function c(e){let t=s.lq+".tmp";try{await (0,n.writeFile)(t,JSON.stringify(e,null,2),"utf-8"),await (0,n.rename)(t,s.lq)}catch(e){throw console.error("保存项目配置文件失败:",e),Error("无法保存项目配置")}}},2928:(e,t,o)=>{"use strict";o.r(t),o.d(t,{patchFetch:()=>g,routeModule:()=>u,serverHooks:()=>S,workAsyncStorage:()=>d,workUnitAsyncStorage:()=>E});var n={};o.r(n),o.d(n,{GET:()=>p,OPTIONS:()=>h});var s=o(9227),r=o(9044),c=o(1131),a=o(7642),i=o(7785),l=o(2601);async function p(e){let{searchParams:t}=new URL(e.url),o=t.get("env"),n=t.get("clientId")||`client-${Date.now()}-${Math.random().toString(36).substr(2,9)}`;if(!o)return a.NextResponse.json({success:!1,error:"缺少必要参数:env(环境名称)"},{status:400});try{let e=await (0,l.ZR)(),t=!1;for(let[,n]of Object.entries(e))if(n.envs&&n.envs[o]){t=!0;break}if(!t)return a.NextResponse.json({success:!1,error:`环境 "${o}" 不存在于任何项目中`},{status:404});console.log(`[SSE] 新的连接请求: 环境=${o}, 客户端=${n}`);let s=new TextEncoder,r=new ReadableStream({start(e){i.z.addConnection(o,e,n);let t={type:"connection-established",envName:o,clientId:n,timestamp:Date.now(),message:`已连接到环境 ${o} 的配置变化推送流`},r=`data: ${JSON.stringify(t)}
2
2
 
3
- `;e.enqueue(s.encode(r))},cancel(){console.log(`[SSE] 连接取消: 环境=${o}, 客户端=${n}`),i.z.removeConnection(o,n)}});return new Response(r,{status:200,headers:{"Content-Type":"text/event-stream","Cache-Control":"no-cache",Connection:"keep-alive","Access-Control-Allow-Origin":"*","Access-Control-Allow-Methods":"GET","Access-Control-Allow-Headers":"Cache-Control, Content-Type"}})}catch(t){let e=t instanceof Error?t.message:"SSE连接建立失败";return console.error(`[SSE] 连接建立失败: 环境=${o}, 客户端=${n}`,t),a.NextResponse.json({success:!1,error:e},{status:500})}}async function h(){return new Response(null,{status:200,headers:{"Access-Control-Allow-Origin":"*","Access-Control-Allow-Methods":"GET, OPTIONS","Access-Control-Allow-Headers":"Content-Type, Cache-Control","Access-Control-Max-Age":"86400"}})}let u=new s.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/microapp-proxy-change-stream/route",pathname:"/api/microapp-proxy-change-stream",filename:"route",bundlePath:"app/api/microapp-proxy-change-stream/route"},resolvedPagePath:"/Users/edy/Documents/Coding/prime-dev-cli/packages/server/src/app/api/microapp-proxy-change-stream/route.ts",nextConfigOutput:"",userland:n}),{workAsyncStorage:d,workUnitAsyncStorage:S,serverHooks:E}=u;function g(){return(0,c.patchFetch)({workAsyncStorage:d,workUnitAsyncStorage:S})}},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,o)=>{"use strict";o.d(t,{Ks:()=>a,lq:()=>c,tu:()=>r});var n=o(1820),s=o(3873);let r={WORKSPACE_ROOT:(0,s.join)((0,n.homedir)(),"Documents","prime-workspace"),GIT_TIMEOUT:3e5,MAX_CONCURRENT_CLONES:3,MAX_RETRY_ATTEMPTS:3},c=(0,s.join)((0,n.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}({})},7785:(e,t,o)=>{"use strict";o.d(t,{z:()=>s});class n{constructor(){this.connections=new Map,this.encoder=new TextEncoder,this.heartbeatInterval=null,this.HEARTBEAT_INTERVAL=3e4,this.CONNECTION_TIMEOUT=12e4,this.startHeartbeat()}addConnection(e,t,o){console.log(`[SSE] 添加连接: 环境=${e}, 客户端=${o}`);let n={controller:t,timestamp:Date.now(),clientId:o,envName:e};this.connections.has(e)||this.connections.set(e,new Set),this.connections.get(e).add(n),this.sendToConnection(n,{type:"heartbeat",timestamp:Date.now()}),console.log(`[SSE] 当前连接统计: ${this.getConnectionStats()}`)}removeConnection(e,t){console.log(`[SSE] 移除连接: 环境=${e}, 客户端=${t}`);let o=this.connections.get(e);if(o){let n=Array.from(o).find(e=>e.clientId===t);n&&(o.delete(n),0===o.size&&this.connections.delete(e))}console.log(`[SSE] 当前连接统计: ${this.getConnectionStats()}`)}broadcastToEnv(e,t){console.log(`[SSE] 向环境 ${e} 广播配置变化消息`);let o=this.connections.get(e);if(!o||0===o.size)return void console.log(`[SSE] 环境 ${e} 没有活跃连接,跳过广播`);let n=[];o.forEach(e=>{try{this.sendToConnection(e,t)}catch(t){console.error(`[SSE] 发送消息到客户端 ${e.clientId} 失败:`,t),n.push(e)}}),n.forEach(e=>{o.delete(e),console.log(`[SSE] 清理无效连接: 客户端=${e.clientId}`)}),console.log(`[SSE] 成功发送给 ${o.size} 个连接`)}sendToConnection(e,t){let o=`data: ${JSON.stringify(t)}
3
+ `;e.enqueue(s.encode(r))},cancel(){console.log(`[SSE] 连接取消: 环境=${o}, 客户端=${n}`),i.z.removeConnection(o,n)}});return new Response(r,{status:200,headers:{"Content-Type":"text/event-stream","Cache-Control":"no-cache",Connection:"keep-alive","Access-Control-Allow-Origin":"*","Access-Control-Allow-Methods":"GET","Access-Control-Allow-Headers":"Cache-Control, Content-Type"}})}catch(t){let e=t instanceof Error?t.message:"SSE连接建立失败";return console.error(`[SSE] 连接建立失败: 环境=${o}, 客户端=${n}`,t),a.NextResponse.json({success:!1,error:e},{status:500})}}async function h(){return new Response(null,{status:200,headers:{"Access-Control-Allow-Origin":"*","Access-Control-Allow-Methods":"GET, OPTIONS","Access-Control-Allow-Headers":"Content-Type, Cache-Control","Access-Control-Max-Age":"86400"}})}let u=new s.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/microapp-proxy-change-stream/route",pathname:"/api/microapp-proxy-change-stream",filename:"route",bundlePath:"app/api/microapp-proxy-change-stream/route"},resolvedPagePath:"/Users/edy/Documents/prime-workspace/prime-dev-cli/packages/server/src/app/api/microapp-proxy-change-stream/route.ts",nextConfigOutput:"",userland:n}),{workAsyncStorage:d,workUnitAsyncStorage:E,serverHooks:S}=u;function g(){return(0,c.patchFetch)({workAsyncStorage:d,workUnitAsyncStorage:E})}},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,o)=>{"use strict";o.d(t,{Ks:()=>a,lq:()=>c,tu:()=>r});var n=o(1820),s=o(3873);let r={WORKSPACE_ROOT:(0,s.join)((0,n.homedir)(),"Documents","prime-workspace"),GIT_TIMEOUT:3e5,MAX_CONCURRENT_CLONES:Math.max(2,Math.min((0,n.cpus)().length,8)),MAX_RETRY_ATTEMPTS:3},c=(0,s.join)((0,n.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}({})},7785:(e,t,o)=>{"use strict";o.d(t,{z:()=>s});class n{constructor(){this.connections=new Map,this.encoder=new TextEncoder,this.heartbeatInterval=null,this.HEARTBEAT_INTERVAL=3e4,this.CONNECTION_TIMEOUT=12e4,this.startHeartbeat()}addConnection(e,t,o){console.log(`[SSE] 添加连接: 环境=${e}, 客户端=${o}`);let n={controller:t,timestamp:Date.now(),clientId:o,envName:e};this.connections.has(e)||this.connections.set(e,new Set),this.connections.get(e).add(n),this.sendToConnection(n,{type:"heartbeat",timestamp:Date.now()}),console.log(`[SSE] 当前连接统计: ${this.getConnectionStats()}`)}removeConnection(e,t){console.log(`[SSE] 移除连接: 环境=${e}, 客户端=${t}`);let o=this.connections.get(e);if(o){let n=Array.from(o).find(e=>e.clientId===t);n&&(o.delete(n),0===o.size&&this.connections.delete(e))}console.log(`[SSE] 当前连接统计: ${this.getConnectionStats()}`)}broadcastToEnv(e,t){console.log(`[SSE] 向环境 ${e} 广播配置变化消息`);let o=this.connections.get(e);if(!o||0===o.size)return void console.log(`[SSE] 环境 ${e} 没有活跃连接,跳过广播`);let n=[];o.forEach(e=>{try{this.sendToConnection(e,t)}catch(t){console.error(`[SSE] 发送消息到客户端 ${e.clientId} 失败:`,t),n.push(e)}}),n.forEach(e=>{o.delete(e),console.log(`[SSE] 清理无效连接: 客户端=${e.clientId}`)}),console.log(`[SSE] 成功发送给 ${o.size} 个连接`)}sendToConnection(e,t){let o=`data: ${JSON.stringify(t)}
4
4
 
5
- `,n=this.encoder.encode(o);try{e.controller.enqueue(n),e.timestamp=Date.now()}catch(e){throw console.error(`[SSE] 发送消息失败:`,e),e}}startHeartbeat(){this.heartbeatInterval=setInterval(()=>{this.sendHeartbeat(),this.cleanupStaleConnections()},this.HEARTBEAT_INTERVAL),console.log(`[SSE] 心跳机制已启动,间隔: ${this.HEARTBEAT_INTERVAL}ms`)}sendHeartbeat(){let e={type:"heartbeat",timestamp:Date.now()},t=0;this.connections.forEach(o=>{t+=o.size;let n=[];o.forEach(t=>{try{this.sendToConnection(t,e)}catch{n.push(t)}}),n.forEach(e=>o.delete(e))}),t>0&&console.log(`[SSE] 心跳发送完成,活跃连接数: ${t}`)}cleanupStaleConnections(){let e=Date.now(),t=0;this.connections.forEach((o,n)=>{let s=[];o.forEach(t=>{e-t.timestamp>this.CONNECTION_TIMEOUT&&s.push(t)}),s.forEach(e=>{o.delete(e),t++,console.log(`[SSE] 清理过期连接: 环境=${n}, 客户端=${e.clientId}`)}),0===o.size&&this.connections.delete(n)}),t>0&&console.log(`[SSE] 连接清理完成,清理数量: ${t}`)}getConnectionStats(){let e=[],t=0;return this.connections.forEach((o,n)=>{let s=o.size;t+=s,e.push(`${n}: ${s}`)}),`总计 ${t} 个连接 (${e.join(", ")})`}stop(){this.heartbeatInterval&&(clearInterval(this.heartbeatInterval),this.heartbeatInterval=null,console.log(`[SSE] 心跳机制已停止`)),this.connections.forEach(e=>{e.forEach(e=>{try{e.controller.close()}catch(e){console.error(`[SSE] 关闭连接失败:`,e)}})}),this.connections.clear(),console.log(`[SSE] 所有连接已关闭`)}}let s=new n;process.on("SIGINT",()=>{console.log("[SSE] 收到退出信号,正在清理连接..."),s.stop(),process.exit(0)}),process.on("SIGTERM",()=>{console.log("[SSE] 收到终止信号,正在清理连接..."),s.stop(),process.exit(0)})},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 o=e=>t(t.s=e),n=t.X(0,[131,426],()=>o(3114));module.exports=n})();
5
+ `,n=this.encoder.encode(o);try{e.controller.enqueue(n),e.timestamp=Date.now()}catch(e){throw console.error(`[SSE] 发送消息失败:`,e),e}}startHeartbeat(){this.heartbeatInterval=setInterval(()=>{this.sendHeartbeat(),this.cleanupStaleConnections()},this.HEARTBEAT_INTERVAL),console.log(`[SSE] 心跳机制已启动,间隔: ${this.HEARTBEAT_INTERVAL}ms`)}sendHeartbeat(){let e={type:"heartbeat",timestamp:Date.now()},t=0;this.connections.forEach(o=>{t+=o.size;let n=[];o.forEach(t=>{try{this.sendToConnection(t,e)}catch{n.push(t)}}),n.forEach(e=>o.delete(e))}),t>0&&console.log(`[SSE] 心跳发送完成,活跃连接数: ${t}`)}cleanupStaleConnections(){let e=Date.now(),t=0;this.connections.forEach((o,n)=>{let s=[];o.forEach(t=>{e-t.timestamp>this.CONNECTION_TIMEOUT&&s.push(t)}),s.forEach(e=>{o.delete(e),t++,console.log(`[SSE] 清理过期连接: 环境=${n}, 客户端=${e.clientId}`)}),0===o.size&&this.connections.delete(n)}),t>0&&console.log(`[SSE] 连接清理完成,清理数量: ${t}`)}getConnectionStats(){let e=[],t=0;return this.connections.forEach((o,n)=>{let s=o.size;t+=s,e.push(`${n}: ${s}`)}),`总计 ${t} 个连接 (${e.join(", ")})`}stop(){this.heartbeatInterval&&(clearInterval(this.heartbeatInterval),this.heartbeatInterval=null,console.log(`[SSE] 心跳机制已停止`)),this.connections.forEach(e=>{e.forEach(e=>{try{e.controller.close()}catch(e){console.error(`[SSE] 关闭连接失败:`,e)}})}),this.connections.clear(),console.log(`[SSE] 所有连接已关闭`)}}let s=new n;process.on("SIGINT",()=>{console.log("[SSE] 收到退出信号,正在清理连接..."),s.stop(),process.exit(0)}),process.on("SIGTERM",()=>{console.log("[SSE] 收到终止信号,正在清理连接..."),s.stop(),process.exit(0)})},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 o=e=>t(t.s=e),n=t.X(0,[131,426],()=>o(2928));module.exports=n})();
@@ -1 +1 @@
1
- globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/api/microapp-proxy-change-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}},"6665":{"*":{"id":"1681","name":"*","chunks":[],"async":false}},"7472":{"*":{"id":"1249","name":"*","chunks":[],"async":false}},"9203":{"*":{"id":"8751","name":"*","chunks":[],"async":false}},"9510":{"*":{"id":"5844","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":9510,"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/6393282fdcf30b00.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/microapp-proxy-change-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}},"6665":{"*":{"id":"9687","name":"*","chunks":[],"async":false}},"7472":{"*":{"id":"9624","name":"*","chunks":[],"async":false}},"9203":{"*":{"id":"8757","name":"*","chunks":[],"async":false}},"9510":{"*":{"id":"4761","name":"*","chunks":[],"async":false}}},"edgeRscModuleMapping":{"317":{"*":{"id":"5207","name":"*","chunks":[],"async":false}},"1020":{"*":{"id":"9136","name":"*","chunks":[],"async":false}},"3053":{"*":{"id":"767","name":"*","chunks":[],"async":false}},"3561":{"*":{"id":"9855","name":"*","chunks":[],"async":false}},"3604":{"*":{"id":"6996","name":"*","chunks":[],"async":false}},"3636":{"*":{"id":"7774","name":"*","chunks":[],"async":false}},"6665":{"*":{"id":"1681","name":"*","chunks":[],"async":false}},"9203":{"*":{"id":"8751","name":"*","chunks":[],"async":false}}}}
1
+ globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/api/microapp-proxy-change-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}},"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/microapp-proxy-change-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}},"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,3 +1,3 @@
1
- (()=>{var e={};e.id=123,e.ids=[123],e.modules={483:()=>{},846:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},1820:e=>{"use strict";e.exports=require("os")},2601:(e,t,r)=>{"use strict";r.d(t,{ZR:()=>n,sF:()=>c});var s=r(9748),o=r(4946);async function n(){try{await (0,s.access)(o.lq,s.constants.F_OK)}catch{return await c({}),{}}try{let e=await (0,s.readFile)(o.lq,"utf-8");if(!e)return{};return JSON.parse(e)}catch(e){throw console.error("读取或解析项目配置文件失败:",e),Error("无法加载项目配置")}}async function c(e){let t=o.lq+".tmp";try{await (0,s.writeFile)(t,JSON.stringify(e,null,2),"utf-8"),await (0,s.rename)(t,o.lq)}catch(e){throw console.error("保存项目配置文件失败:",e),Error("无法保存项目配置")}}},3033:e=>{"use strict";e.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},3295:e=>{"use strict";e.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},3873:e=>{"use strict";e.exports=require("path")},4314:(e,t,r)=>{"use strict";r.d(t,{DA:()=>c,OU:()=>n,mn:()=>i});var s=r(9021),o=r(3873);async function n(e,t,r){let n=(0,o.join)(r,e),c=[],i=[];try{let e=t.envs||{};for(let t in e){let r=e[t];if(r.envFileName&&r.proxyKey){let e=(0,o.join)(n,r.envFileName);try{await s.promises.access(e),i.push(r.envFileName)}catch{let t=r.proxyEnv[r.currentProxy]||"",o=`${r.proxyKey}=${t}`;await s.promises.writeFile(e,o,"utf-8"),c.push(r.envFileName)}}}return{success:!0,createdFiles:c,skippedFiles:i}}catch(r){let t=r instanceof Error?r.message:String(r);return console.error(`在为项目 ${e} 创建环境文件时出错:`,r),{success:!1,createdFiles:c,skippedFiles:i,error:t}}}async function c(e,t){let r=(0,o.join)(t,e),n=(0,o.join)(r,".mock"),c=[],i=[];try{try{await s.promises.access(n),i.push(".mock")}catch{await s.promises.mkdir(n,{recursive:!0}),c.push(".mock")}return{success:!0,createdDirectories:c,skippedDirectories:i}}catch(r){let t=r instanceof Error?r.message:String(r);return console.error(`在为项目 ${e} 创建Mock目录时出错:`,r),{success:!1,createdDirectories:c,skippedDirectories:i,error:t}}}async function i(e,t,r,n){try{let c=r.envs[t];if(!c)return{success:!1,error:`环境 ${t} 不存在于项目 ${e} 配置中`};if(!c.envFileName||!c.proxyKey)return{success:!1,error:`环境 ${t} 缺少 envFileName 或 proxyKey 配置`};let i=(0,o.join)(n,e),a=(0,o.join)(i,c.envFileName),l=c.proxyEnv[c.currentProxy]||c.currentProxy,p=`${c.proxyKey}=${l}`;return await s.promises.writeFile(a,p,"utf-8"),console.log(`已更新环境文件: ${a}, 内容: ${p}`),{success:!0,updatedFile:c.envFileName}}catch(s){let r=s instanceof Error?s.message:String(s);return console.error(`更新项目 ${e} 环境 ${t} 的环境文件时出错:`,s),{success:!1,error:r}}}},4461:(e,t,r)=>{"use strict";r.r(t),r.d(t,{patchFetch:()=>f,routeModule:()=>d,serverHooks:()=>S,workAsyncStorage:()=>m,workUnitAsyncStorage:()=>E});var s={};r.r(s),r.d(s,{PUT:()=>h});var o=r(9227),n=r(9044),c=r(1131),i=r(7642),a=r(2601),l=r(4314),p=r(4946),u=r(7785);async function h(e){try{let{envName:t,projectName:r,selectedItems:s}=await e.json();if(!t||!r||!Array.isArray(s))return i.NextResponse.json({success:!1,error:"缺少必要参数:envName, projectName, selectedItems"},{status:400});let o=await (0,a.ZR)();if(!o[r])return i.NextResponse.json({success:!1,error:`项目 ${r} 不存在`},{status:404});if(!o[r].envs[t])return i.NextResponse.json({success:!1,error:`项目 ${r} 中不存在环境 ${t}`},{status:404});let n=o[r].envs[t].host,c=o[r].envs[t].subApps||[];o[r].envs[t].subApps=s;let h=[];if(s.forEach(e=>{Object.keys(o).forEach(t=>{if(o[t].envs[e]){let r=o[t].envs[e];r.currentProxy="custom",r.proxyEnv.custom=n,h.push({projectName:t,envName:e})}})}),await (0,a.sF)(o),JSON.stringify(c.sort())!==JSON.stringify(s.sort())){console.log(`[配置变化] 环境 ${t} 的 MicroApp 代理配置发生变化`),console.log(`[配置变化] 变化前: ${JSON.stringify(c)}`),console.log(`[配置变化] 变化后: ${JSON.stringify(s)}`);let e=new Set(c),o=new Set(s),n=s.filter(t=>!e.has(t)),i=c.filter(e=>!o.has(e)),a={type:"microapp-proxy-config-change",envName:t,timestamp:Date.now(),changes:{before:c,after:s,added:n,removed:i},projectName:r,message:`环境 ${t} 的 MicroApp 代理配置已更新`};try{u.z.broadcastToEnv(t,a),console.log(`[推送成功] 已向环境 ${t} 推送配置变化通知`)}catch(e){console.error(`[推送失败] 向环境 ${t} 推送通知失败:`,e)}}else console.log(`[配置未变化] 环境 ${t} 的 MicroApp 代理配置无变化,跳过推送`);let d=(await Promise.allSettled(h.map(async({projectName:e,envName:t})=>(0,l.mn)(e,t,o[e],p.tu.WORKSPACE_ROOT)))).map((e,t)=>({result:e,project:h[t]})).filter(({result:e})=>"rejected"===e.status||"fulfilled"===e.status&&!e.value.success),m="MicroApp代理配置保存成功,已更新选中环境的代理地址";return d.length>0&&(m+=`,但有 ${d.length} 个环境文件更新失败`),i.NextResponse.json({success:!0,message:m,data:{projectName:r,envName:t,subApps:s,currentHost:n,updatedProjects:h.length,envFileUpdateFailures:d.length}})}catch(t){let e=t instanceof Error?t.message:"保存MicroApp代理配置失败";return console.error("保存MicroApp代理配置失败:",t),i.NextResponse.json({success:!1,error:e},{status:500})}}let d=new o.AppRouteRouteModule({definition:{kind:n.RouteKind.APP_ROUTE,page:"/api/microapp-proxy-config/route",pathname:"/api/microapp-proxy-config",filename:"route",bundlePath:"app/api/microapp-proxy-config/route"},resolvedPagePath:"/Users/edy/Documents/Coding/prime-dev-cli/packages/server/src/app/api/microapp-proxy-config/route.ts",nextConfigOutput:"",userland:s}),{workAsyncStorage:m,workUnitAsyncStorage:E,serverHooks:S}=d;function f(){return(0,c.patchFetch)({workAsyncStorage:m,workUnitAsyncStorage:E})}},4870:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},4907:()=>{},4946:(e,t,r)=>{"use strict";r.d(t,{Ks:()=>i,lq:()=>c,tu:()=>n});var s=r(1820),o=r(3873);let n={WORKSPACE_ROOT:(0,o.join)((0,s.homedir)(),"Documents","prime-workspace"),GIT_TIMEOUT:3e5,MAX_CONCURRENT_CLONES:3,MAX_RETRY_ATTEMPTS:3},c=(0,o.join)((0,s.homedir)(),".prime-projects.json");var i=function(e){return e.PENDING="pending",e.EXISTING="existing",e.CLONING="cloning",e.SUCCESS="success",e.FAILED="failed",e.RETRYING="retrying",e}({})},7785:(e,t,r)=>{"use strict";r.d(t,{z:()=>o});class s{constructor(){this.connections=new Map,this.encoder=new TextEncoder,this.heartbeatInterval=null,this.HEARTBEAT_INTERVAL=3e4,this.CONNECTION_TIMEOUT=12e4,this.startHeartbeat()}addConnection(e,t,r){console.log(`[SSE] 添加连接: 环境=${e}, 客户端=${r}`);let s={controller:t,timestamp:Date.now(),clientId:r,envName:e};this.connections.has(e)||this.connections.set(e,new Set),this.connections.get(e).add(s),this.sendToConnection(s,{type:"heartbeat",timestamp:Date.now()}),console.log(`[SSE] 当前连接统计: ${this.getConnectionStats()}`)}removeConnection(e,t){console.log(`[SSE] 移除连接: 环境=${e}, 客户端=${t}`);let r=this.connections.get(e);if(r){let s=Array.from(r).find(e=>e.clientId===t);s&&(r.delete(s),0===r.size&&this.connections.delete(e))}console.log(`[SSE] 当前连接统计: ${this.getConnectionStats()}`)}broadcastToEnv(e,t){console.log(`[SSE] 向环境 ${e} 广播配置变化消息`);let r=this.connections.get(e);if(!r||0===r.size)return void console.log(`[SSE] 环境 ${e} 没有活跃连接,跳过广播`);let s=[];r.forEach(e=>{try{this.sendToConnection(e,t)}catch(t){console.error(`[SSE] 发送消息到客户端 ${e.clientId} 失败:`,t),s.push(e)}}),s.forEach(e=>{r.delete(e),console.log(`[SSE] 清理无效连接: 客户端=${e.clientId}`)}),console.log(`[SSE] 成功发送给 ${r.size} 个连接`)}sendToConnection(e,t){let r=`data: ${JSON.stringify(t)}
1
+ (()=>{var e={};e.id=123,e.ids=[123],e.modules={483:()=>{},846:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},1820:e=>{"use strict";e.exports=require("os")},2601:(e,t,r)=>{"use strict";r.d(t,{ZR:()=>n,sF:()=>c});var s=r(9748),o=r(4946);async function n(){try{await (0,s.access)(o.lq,s.constants.F_OK)}catch{return await c({}),{}}try{let e=await (0,s.readFile)(o.lq,"utf-8");if(!e)return{};return JSON.parse(e)}catch(e){throw console.error("读取或解析项目配置文件失败:",e),Error("无法加载项目配置")}}async function c(e){let t=o.lq+".tmp";try{await (0,s.writeFile)(t,JSON.stringify(e,null,2),"utf-8"),await (0,s.rename)(t,o.lq)}catch(e){throw console.error("保存项目配置文件失败:",e),Error("无法保存项目配置")}}},3033:e=>{"use strict";e.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},3295:e=>{"use strict";e.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},3873:e=>{"use strict";e.exports=require("path")},4314:(e,t,r)=>{"use strict";r.d(t,{DA:()=>c,OU:()=>n,mn:()=>i});var s=r(9021),o=r(3873);async function n(e,t,r){let n=(0,o.join)(r,e),c=[],i=[];try{let e=t.envs||{};for(let t in e){let r=e[t];if(r.envFileName&&r.proxyKey){let e=(0,o.join)(n,r.envFileName);try{await s.promises.access(e),i.push(r.envFileName)}catch{let t=r.proxyEnv[r.currentProxy]||"",o=`${r.proxyKey}=${t}`;await s.promises.writeFile(e,o,"utf-8"),c.push(r.envFileName)}}}return{success:!0,createdFiles:c,skippedFiles:i}}catch(r){let t=r instanceof Error?r.message:String(r);return console.error(`在为项目 ${e} 创建环境文件时出错:`,r),{success:!1,createdFiles:c,skippedFiles:i,error:t}}}async function c(e,t){let r=(0,o.join)(t,e),n=(0,o.join)(r,".mock"),c=[],i=[];try{try{await s.promises.access(n),i.push(".mock")}catch{await s.promises.mkdir(n,{recursive:!0}),c.push(".mock")}return{success:!0,createdDirectories:c,skippedDirectories:i}}catch(r){let t=r instanceof Error?r.message:String(r);return console.error(`在为项目 ${e} 创建Mock目录时出错:`,r),{success:!1,createdDirectories:c,skippedDirectories:i,error:t}}}async function i(e,t,r,n){try{let c=r.envs[t];if(!c)return{success:!1,error:`环境 ${t} 不存在于项目 ${e} 配置中`};if(!c.envFileName||!c.proxyKey)return{success:!1,error:`环境 ${t} 缺少 envFileName 或 proxyKey 配置`};let i=(0,o.join)(n,e),a=(0,o.join)(i,c.envFileName),l=c.proxyEnv[c.currentProxy]||c.currentProxy,p=`${c.proxyKey}=${l}`;return await s.promises.writeFile(a,p,"utf-8"),console.log(`已更新环境文件: ${a}, 内容: ${p}`),{success:!0,updatedFile:c.envFileName}}catch(s){let r=s instanceof Error?s.message:String(s);return console.error(`更新项目 ${e} 环境 ${t} 的环境文件时出错:`,s),{success:!1,error:r}}}},4870:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},4907:()=>{},4946:(e,t,r)=>{"use strict";r.d(t,{Ks:()=>i,lq:()=>c,tu:()=>n});var s=r(1820),o=r(3873);let n={WORKSPACE_ROOT:(0,o.join)((0,s.homedir)(),"Documents","prime-workspace"),GIT_TIMEOUT:3e5,MAX_CONCURRENT_CLONES:Math.max(2,Math.min((0,s.cpus)().length,8)),MAX_RETRY_ATTEMPTS:3},c=(0,o.join)((0,s.homedir)(),".prime-projects.json");var i=function(e){return e.PENDING="pending",e.EXISTING="existing",e.CLONING="cloning",e.SUCCESS="success",e.FAILED="failed",e.RETRYING="retrying",e.INCOMPLETE="incomplete",e}({})},6238:(e,t,r)=>{"use strict";r.r(t),r.d(t,{patchFetch:()=>f,routeModule:()=>m,serverHooks:()=>S,workAsyncStorage:()=>d,workUnitAsyncStorage:()=>E});var s={};r.r(s),r.d(s,{PUT:()=>h});var o=r(9227),n=r(9044),c=r(1131),i=r(7642),a=r(2601),l=r(4314),p=r(4946),u=r(7785);async function h(e){try{let{envName:t,projectName:r,selectedItems:s}=await e.json();if(!t||!r||!Array.isArray(s))return i.NextResponse.json({success:!1,error:"缺少必要参数:envName, projectName, selectedItems"},{status:400});let o=await (0,a.ZR)();if(!o[r])return i.NextResponse.json({success:!1,error:`项目 ${r} 不存在`},{status:404});if(!o[r].envs[t])return i.NextResponse.json({success:!1,error:`项目 ${r} 中不存在环境 ${t}`},{status:404});let n=o[r].envs[t].host,c=o[r].envs[t].subApps||[];o[r].envs[t].subApps=s;let h=[];if(s.forEach(e=>{Object.keys(o).forEach(t=>{if(o[t].envs[e]){let r=o[t].envs[e];r.currentProxy="custom",r.proxyEnv.custom=n,h.push({projectName:t,envName:e})}})}),await (0,a.sF)(o),JSON.stringify(c.sort())!==JSON.stringify(s.sort())){console.log(`[配置变化] 环境 ${t} 的 MicroApp 代理配置发生变化`),console.log(`[配置变化] 变化前: ${JSON.stringify(c)}`),console.log(`[配置变化] 变化后: ${JSON.stringify(s)}`);let e=new Set(c),o=new Set(s),n=s.filter(t=>!e.has(t)),i=c.filter(e=>!o.has(e)),a={type:"microapp-proxy-config-change",envName:t,timestamp:Date.now(),changes:{before:c,after:s,added:n,removed:i},projectName:r,message:`环境 ${t} 的 MicroApp 代理配置已更新`};try{u.z.broadcastToEnv(t,a),console.log(`[推送成功] 已向环境 ${t} 推送配置变化通知`)}catch(e){console.error(`[推送失败] 向环境 ${t} 推送通知失败:`,e)}}else console.log(`[配置未变化] 环境 ${t} 的 MicroApp 代理配置无变化,跳过推送`);let m=(await Promise.allSettled(h.map(async({projectName:e,envName:t})=>(0,l.mn)(e,t,o[e],p.tu.WORKSPACE_ROOT)))).map((e,t)=>({result:e,project:h[t]})).filter(({result:e})=>"rejected"===e.status||"fulfilled"===e.status&&!e.value.success),d="MicroApp代理配置保存成功,已更新选中环境的代理地址";return m.length>0&&(d+=`,但有 ${m.length} 个环境文件更新失败`),i.NextResponse.json({success:!0,message:d,data:{projectName:r,envName:t,subApps:s,currentHost:n,updatedProjects:h.length,envFileUpdateFailures:m.length}})}catch(t){let e=t instanceof Error?t.message:"保存MicroApp代理配置失败";return console.error("保存MicroApp代理配置失败:",t),i.NextResponse.json({success:!1,error:e},{status:500})}}let m=new o.AppRouteRouteModule({definition:{kind:n.RouteKind.APP_ROUTE,page:"/api/microapp-proxy-config/route",pathname:"/api/microapp-proxy-config",filename:"route",bundlePath:"app/api/microapp-proxy-config/route"},resolvedPagePath:"/Users/edy/Documents/prime-workspace/prime-dev-cli/packages/server/src/app/api/microapp-proxy-config/route.ts",nextConfigOutput:"",userland:s}),{workAsyncStorage:d,workUnitAsyncStorage:E,serverHooks:S}=m;function f(){return(0,c.patchFetch)({workAsyncStorage:d,workUnitAsyncStorage:E})}},7785:(e,t,r)=>{"use strict";r.d(t,{z:()=>o});class s{constructor(){this.connections=new Map,this.encoder=new TextEncoder,this.heartbeatInterval=null,this.HEARTBEAT_INTERVAL=3e4,this.CONNECTION_TIMEOUT=12e4,this.startHeartbeat()}addConnection(e,t,r){console.log(`[SSE] 添加连接: 环境=${e}, 客户端=${r}`);let s={controller:t,timestamp:Date.now(),clientId:r,envName:e};this.connections.has(e)||this.connections.set(e,new Set),this.connections.get(e).add(s),this.sendToConnection(s,{type:"heartbeat",timestamp:Date.now()}),console.log(`[SSE] 当前连接统计: ${this.getConnectionStats()}`)}removeConnection(e,t){console.log(`[SSE] 移除连接: 环境=${e}, 客户端=${t}`);let r=this.connections.get(e);if(r){let s=Array.from(r).find(e=>e.clientId===t);s&&(r.delete(s),0===r.size&&this.connections.delete(e))}console.log(`[SSE] 当前连接统计: ${this.getConnectionStats()}`)}broadcastToEnv(e,t){console.log(`[SSE] 向环境 ${e} 广播配置变化消息`);let r=this.connections.get(e);if(!r||0===r.size)return void console.log(`[SSE] 环境 ${e} 没有活跃连接,跳过广播`);let s=[];r.forEach(e=>{try{this.sendToConnection(e,t)}catch(t){console.error(`[SSE] 发送消息到客户端 ${e.clientId} 失败:`,t),s.push(e)}}),s.forEach(e=>{r.delete(e),console.log(`[SSE] 清理无效连接: 客户端=${e.clientId}`)}),console.log(`[SSE] 成功发送给 ${r.size} 个连接`)}sendToConnection(e,t){let r=`data: ${JSON.stringify(t)}
2
2
 
3
- `,s=this.encoder.encode(r);try{e.controller.enqueue(s),e.timestamp=Date.now()}catch(e){throw console.error(`[SSE] 发送消息失败:`,e),e}}startHeartbeat(){this.heartbeatInterval=setInterval(()=>{this.sendHeartbeat(),this.cleanupStaleConnections()},this.HEARTBEAT_INTERVAL),console.log(`[SSE] 心跳机制已启动,间隔: ${this.HEARTBEAT_INTERVAL}ms`)}sendHeartbeat(){let e={type:"heartbeat",timestamp:Date.now()},t=0;this.connections.forEach(r=>{t+=r.size;let s=[];r.forEach(t=>{try{this.sendToConnection(t,e)}catch{s.push(t)}}),s.forEach(e=>r.delete(e))}),t>0&&console.log(`[SSE] 心跳发送完成,活跃连接数: ${t}`)}cleanupStaleConnections(){let e=Date.now(),t=0;this.connections.forEach((r,s)=>{let o=[];r.forEach(t=>{e-t.timestamp>this.CONNECTION_TIMEOUT&&o.push(t)}),o.forEach(e=>{r.delete(e),t++,console.log(`[SSE] 清理过期连接: 环境=${s}, 客户端=${e.clientId}`)}),0===r.size&&this.connections.delete(s)}),t>0&&console.log(`[SSE] 连接清理完成,清理数量: ${t}`)}getConnectionStats(){let e=[],t=0;return this.connections.forEach((r,s)=>{let o=r.size;t+=o,e.push(`${s}: ${o}`)}),`总计 ${t} 个连接 (${e.join(", ")})`}stop(){this.heartbeatInterval&&(clearInterval(this.heartbeatInterval),this.heartbeatInterval=null,console.log(`[SSE] 心跳机制已停止`)),this.connections.forEach(e=>{e.forEach(e=>{try{e.controller.close()}catch(e){console.error(`[SSE] 关闭连接失败:`,e)}})}),this.connections.clear(),console.log(`[SSE] 所有连接已关闭`)}}let o=new s;process.on("SIGINT",()=>{console.log("[SSE] 收到退出信号,正在清理连接..."),o.stop(),process.exit(0)}),process.on("SIGTERM",()=>{console.log("[SSE] 收到终止信号,正在清理连接..."),o.stop(),process.exit(0)})},9021:e=>{"use strict";e.exports=require("fs")},9294:e=>{"use strict";e.exports=require("next/dist/server/app-render/work-async-storage.external.js")},9748:e=>{"use strict";e.exports=require("fs/promises")}};var t=require("../../../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),s=t.X(0,[131,426],()=>r(4461));module.exports=s})();
3
+ `,s=this.encoder.encode(r);try{e.controller.enqueue(s),e.timestamp=Date.now()}catch(e){throw console.error(`[SSE] 发送消息失败:`,e),e}}startHeartbeat(){this.heartbeatInterval=setInterval(()=>{this.sendHeartbeat(),this.cleanupStaleConnections()},this.HEARTBEAT_INTERVAL),console.log(`[SSE] 心跳机制已启动,间隔: ${this.HEARTBEAT_INTERVAL}ms`)}sendHeartbeat(){let e={type:"heartbeat",timestamp:Date.now()},t=0;this.connections.forEach(r=>{t+=r.size;let s=[];r.forEach(t=>{try{this.sendToConnection(t,e)}catch{s.push(t)}}),s.forEach(e=>r.delete(e))}),t>0&&console.log(`[SSE] 心跳发送完成,活跃连接数: ${t}`)}cleanupStaleConnections(){let e=Date.now(),t=0;this.connections.forEach((r,s)=>{let o=[];r.forEach(t=>{e-t.timestamp>this.CONNECTION_TIMEOUT&&o.push(t)}),o.forEach(e=>{r.delete(e),t++,console.log(`[SSE] 清理过期连接: 环境=${s}, 客户端=${e.clientId}`)}),0===r.size&&this.connections.delete(s)}),t>0&&console.log(`[SSE] 连接清理完成,清理数量: ${t}`)}getConnectionStats(){let e=[],t=0;return this.connections.forEach((r,s)=>{let o=r.size;t+=o,e.push(`${s}: ${o}`)}),`总计 ${t} 个连接 (${e.join(", ")})`}stop(){this.heartbeatInterval&&(clearInterval(this.heartbeatInterval),this.heartbeatInterval=null,console.log(`[SSE] 心跳机制已停止`)),this.connections.forEach(e=>{e.forEach(e=>{try{e.controller.close()}catch(e){console.error(`[SSE] 关闭连接失败:`,e)}})}),this.connections.clear(),console.log(`[SSE] 所有连接已关闭`)}}let o=new s;process.on("SIGINT",()=>{console.log("[SSE] 收到退出信号,正在清理连接..."),o.stop(),process.exit(0)}),process.on("SIGTERM",()=>{console.log("[SSE] 收到终止信号,正在清理连接..."),o.stop(),process.exit(0)})},9021:e=>{"use strict";e.exports=require("fs")},9294:e=>{"use strict";e.exports=require("next/dist/server/app-render/work-async-storage.external.js")},9748:e=>{"use strict";e.exports=require("fs/promises")}};var t=require("../../../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),s=t.X(0,[131,426],()=>r(6238));module.exports=s})();