@leanspec/ui 0.2.5-dev.20251119022856 → 0.2.5-dev.20251119032109

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 (142) hide show
  1. package/.next/standalone/packages/ui/.next/BUILD_ID +1 -1
  2. package/.next/standalone/packages/ui/.next/app-path-routes-manifest.json +0 -1
  3. package/.next/standalone/packages/ui/.next/build-manifest.json +4 -5
  4. package/.next/standalone/packages/ui/.next/prerender-manifest.json +3 -28
  5. package/.next/standalone/packages/ui/.next/routes-manifest.json +0 -6
  6. package/.next/standalone/packages/ui/.next/server/app/_global-error/page/build-manifest.json +2 -3
  7. package/.next/standalone/packages/ui/.next/server/app/_global-error/page.js +1 -1
  8. package/.next/standalone/packages/ui/.next/server/app/_global-error/page.js.nft.json +1 -1
  9. package/.next/standalone/packages/ui/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  10. package/.next/standalone/packages/ui/.next/server/app/_global-error.html +2 -2
  11. package/.next/standalone/packages/ui/.next/server/app/_global-error.rsc +1 -1
  12. package/.next/standalone/packages/ui/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  13. package/.next/standalone/packages/ui/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  14. package/.next/standalone/packages/ui/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  15. package/.next/standalone/packages/ui/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  16. package/.next/standalone/packages/ui/.next/server/app/_not-found/page/build-manifest.json +2 -3
  17. package/.next/standalone/packages/ui/.next/server/app/_not-found/page.js +2 -2
  18. package/.next/standalone/packages/ui/.next/server/app/_not-found/page.js.nft.json +1 -1
  19. package/.next/standalone/packages/ui/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  20. package/.next/standalone/packages/ui/.next/server/app/_not-found.html +2 -2
  21. package/.next/standalone/packages/ui/.next/server/app/_not-found.rsc +16 -16
  22. package/.next/standalone/packages/ui/.next/server/app/_not-found.segments/_full.segment.rsc +16 -16
  23. package/.next/standalone/packages/ui/.next/server/app/_not-found.segments/_index.segment.rsc +10 -10
  24. package/.next/standalone/packages/ui/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +3 -3
  25. package/.next/standalone/packages/ui/.next/server/app/_not-found.segments/_not-found.segment.rsc +3 -3
  26. package/.next/standalone/packages/ui/.next/server/app/_not-found.segments/_tree.segment.rsc +5 -5
  27. package/.next/standalone/packages/ui/.next/server/app/api/projects/[id]/specs/route.js +1 -1
  28. package/.next/standalone/packages/ui/.next/server/app/api/projects/[id]/specs/route.js.nft.json +1 -1
  29. package/.next/standalone/packages/ui/.next/server/app/api/projects/route.js +1 -1
  30. package/.next/standalone/packages/ui/.next/server/app/api/projects/route.js.nft.json +1 -1
  31. package/.next/standalone/packages/ui/.next/server/app/api/specs/[id]/dependency-graph/route.js +1 -1
  32. package/.next/standalone/packages/ui/.next/server/app/api/specs/[id]/dependency-graph/route.js.nft.json +1 -1
  33. package/.next/standalone/packages/ui/.next/server/app/api/specs/[id]/route.js +1 -1
  34. package/.next/standalone/packages/ui/.next/server/app/api/specs/[id]/route.js.nft.json +1 -1
  35. package/.next/standalone/packages/ui/.next/server/app/api/specs/[id]/subspecs/[file]/route.js +1 -1
  36. package/.next/standalone/packages/ui/.next/server/app/api/specs/[id]/subspecs/[file]/route.js.nft.json +1 -1
  37. package/.next/standalone/packages/ui/.next/server/app/api/stats/route.js +1 -1
  38. package/.next/standalone/packages/ui/.next/server/app/api/stats/route.js.nft.json +1 -1
  39. package/.next/standalone/packages/ui/.next/server/app/page/build-manifest.json +2 -3
  40. package/.next/standalone/packages/ui/.next/server/app/page.js +2 -2
  41. package/.next/standalone/packages/ui/.next/server/app/page.js.nft.json +1 -1
  42. package/.next/standalone/packages/ui/.next/server/app/page_client-reference-manifest.js +1 -1
  43. package/.next/standalone/packages/ui/.next/server/app/specs/[id]/page/build-manifest.json +2 -3
  44. package/.next/standalone/packages/ui/.next/server/app/specs/[id]/page.js +2 -2
  45. package/.next/standalone/packages/ui/.next/server/app/specs/[id]/page.js.nft.json +1 -1
  46. package/.next/standalone/packages/ui/.next/server/app/specs/[id]/page_client-reference-manifest.js +1 -1
  47. package/.next/standalone/packages/ui/.next/server/app/specs/page/build-manifest.json +2 -3
  48. package/.next/standalone/packages/ui/.next/server/app/specs/page.js +2 -2
  49. package/.next/standalone/packages/ui/.next/server/app/specs/page.js.nft.json +1 -1
  50. package/.next/standalone/packages/ui/.next/server/app/specs/page_client-reference-manifest.js +1 -1
  51. package/.next/standalone/packages/ui/.next/server/app/stats/page/build-manifest.json +2 -3
  52. package/.next/standalone/packages/ui/.next/server/app/stats/page.js +2 -2
  53. package/.next/standalone/packages/ui/.next/server/app/stats/page.js.nft.json +1 -1
  54. package/.next/standalone/packages/ui/.next/server/app/stats/page_client-reference-manifest.js +1 -1
  55. package/.next/standalone/packages/ui/.next/server/app-paths-manifest.json +0 -1
  56. package/.next/standalone/packages/ui/.next/server/chunks/{[root-of-the-server]__003ee184._.js → [root-of-the-server]__15e8a946._.js} +2 -2
  57. package/.next/standalone/packages/ui/.next/server/chunks/{[root-of-the-server]__21119265._.js → [root-of-the-server]__47b8cab4._.js} +2 -2
  58. package/.next/standalone/packages/ui/.next/server/chunks/{[root-of-the-server]__6ec5cafb._.js → [root-of-the-server]__9fda1bdb._.js} +2 -2
  59. package/.next/standalone/packages/ui/.next/server/chunks/{[root-of-the-server]__d169fe70._.js → [root-of-the-server]__d1d92c7c._.js} +2 -2
  60. package/.next/standalone/packages/ui/.next/server/chunks/{[root-of-the-server]__7acaa6ec._.js → [root-of-the-server]__d4193584._.js} +2 -2
  61. package/.next/standalone/packages/ui/.next/server/chunks/{[root-of-the-server]__f4ea2112._.js → [root-of-the-server]__e09ce4bf._.js} +2 -2
  62. package/.next/standalone/packages/ui/.next/server/chunks/ssr/[root-of-the-server]__6e89d129._.js +7 -0
  63. package/.next/standalone/packages/ui/.next/server/chunks/ssr/[root-of-the-server]__8ae28367._.js +7 -0
  64. package/.next/standalone/packages/ui/.next/server/chunks/ssr/{[root-of-the-server]__eefaabd3._.js → [root-of-the-server]__a9d7fd42._.js} +2 -2
  65. package/.next/standalone/packages/ui/.next/server/chunks/ssr/{[root-of-the-server]__3fffdda5._.js → [root-of-the-server]__b3633d6e._.js} +2 -2
  66. package/.next/standalone/packages/ui/.next/server/chunks/ssr/{[root-of-the-server]__e5891e5a._.js → [root-of-the-server]__cbbbfb5d._.js} +2 -2
  67. package/.next/standalone/packages/ui/.next/server/chunks/ssr/_f8b2190a._.js +1 -1
  68. package/.next/standalone/packages/ui/.next/server/chunks/ssr/node_modules__pnpm_9710705b._.js +3 -0
  69. package/.next/standalone/packages/ui/.next/server/chunks/ssr/packages_ui_src_app_loading_tsx_9304a706._.js +3 -0
  70. package/.next/standalone/packages/ui/.next/server/middleware-build-manifest.js +2 -3
  71. package/.next/standalone/packages/ui/.next/server/pages/404.html +2 -2
  72. package/.next/standalone/packages/ui/.next/server/pages/500.html +2 -2
  73. package/.next/standalone/packages/ui/.next/server/server-reference-manifest.js +1 -1
  74. package/.next/standalone/packages/ui/.next/server/server-reference-manifest.json +1 -1
  75. package/.next/standalone/packages/ui/.next/static/chunks/16b2f4261d3a374a.css +1 -0
  76. package/.next/standalone/packages/ui/.next/static/chunks/3385e291c49e782d.js +1 -0
  77. package/.next/standalone/packages/ui/.next/static/chunks/c0fe4c94c7282ac0.js +4 -0
  78. package/.next/standalone/packages/ui/.next/static/chunks/dde5d8bddd7fbfcf.js +1 -0
  79. package/.next/standalone/packages/ui/.next/static/chunks/ee4245fe6ba3d6d3.js +5 -0
  80. package/.next/standalone/packages/ui/.next/static/chunks/turbopack-9cc79aa1b34ffcbe.js +3 -0
  81. package/.next/standalone/packages/ui/package.json +1 -1
  82. package/.next/standalone/packages/ui/src/app/specs/specs-client.tsx +5 -13
  83. package/.next/standalone/packages/ui/tsconfig.tsbuildinfo +1 -1
  84. package/.next/static/chunks/16b2f4261d3a374a.css +1 -0
  85. package/.next/static/chunks/3385e291c49e782d.js +1 -0
  86. package/.next/static/chunks/c0fe4c94c7282ac0.js +4 -0
  87. package/.next/static/chunks/dde5d8bddd7fbfcf.js +1 -0
  88. package/.next/static/chunks/ee4245fe6ba3d6d3.js +5 -0
  89. package/.next/static/chunks/turbopack-9cc79aa1b34ffcbe.js +3 -0
  90. package/package.json +1 -1
  91. package/.next/standalone/packages/ui/.next/server/app/board/page/app-paths-manifest.json +0 -3
  92. package/.next/standalone/packages/ui/.next/server/app/board/page/build-manifest.json +0 -18
  93. package/.next/standalone/packages/ui/.next/server/app/board/page/next-font-manifest.json +0 -6
  94. package/.next/standalone/packages/ui/.next/server/app/board/page/react-loadable-manifest.json +0 -1
  95. package/.next/standalone/packages/ui/.next/server/app/board/page/server-reference-manifest.json +0 -4
  96. package/.next/standalone/packages/ui/.next/server/app/board/page.js +0 -20
  97. package/.next/standalone/packages/ui/.next/server/app/board/page.js.map +0 -5
  98. package/.next/standalone/packages/ui/.next/server/app/board/page.js.nft.json +0 -1
  99. package/.next/standalone/packages/ui/.next/server/app/board/page_client-reference-manifest.js +0 -2
  100. package/.next/standalone/packages/ui/.next/server/app/board.html +0 -1
  101. package/.next/standalone/packages/ui/.next/server/app/board.meta +0 -14
  102. package/.next/standalone/packages/ui/.next/server/app/board.rsc +0 -41
  103. package/.next/standalone/packages/ui/.next/server/app/board.segments/_full.segment.rsc +0 -41
  104. package/.next/standalone/packages/ui/.next/server/app/board.segments/_index.segment.rsc +0 -26
  105. package/.next/standalone/packages/ui/.next/server/app/board.segments/_tree.segment.rsc +0 -9
  106. package/.next/standalone/packages/ui/.next/server/app/board.segments/board/__PAGE__.segment.rsc +0 -9
  107. package/.next/standalone/packages/ui/.next/server/app/board.segments/board.segment.rsc +0 -8
  108. package/.next/standalone/packages/ui/.next/server/chunks/ssr/6e9bd_next_dist_7af75658._.js +0 -3
  109. package/.next/standalone/packages/ui/.next/server/chunks/ssr/[root-of-the-server]__4b343655._.js +0 -3
  110. package/.next/standalone/packages/ui/.next/server/chunks/ssr/[root-of-the-server]__b161f033._.js +0 -7
  111. package/.next/standalone/packages/ui/.next/server/chunks/ssr/[root-of-the-server]__b50fa24c._.js +0 -7
  112. package/.next/standalone/packages/ui/.next/server/chunks/ssr/_4f2c4868._.js +0 -4
  113. package/.next/standalone/packages/ui/.next/server/chunks/ssr/_64a39e38._.js +0 -3
  114. package/.next/standalone/packages/ui/.next/server/chunks/ssr/packages_ui__next-internal_server_app_board_page_actions_c5a3cb3c.js +0 -3
  115. package/.next/standalone/packages/ui/.next/server/chunks/ssr/packages_ui_src_app_board_loading_tsx_03dfd70d._.js +0 -3
  116. package/.next/standalone/packages/ui/.next/server/chunks/ssr/packages_ui_src_app_board_page_tsx_9415dc46._.js +0 -3
  117. package/.next/standalone/packages/ui/.next/server/chunks/ssr/packages_ui_src_d725c10c._.js +0 -3
  118. package/.next/standalone/packages/ui/.next/static/chunks/107411d1a2f4b31d.js +0 -1
  119. package/.next/standalone/packages/ui/.next/static/chunks/212881511f73fc12.js +0 -5
  120. package/.next/standalone/packages/ui/.next/static/chunks/5c2072ad938de8ed.js +0 -1
  121. package/.next/standalone/packages/ui/.next/static/chunks/5d646f493d4c6928.js +0 -1
  122. package/.next/standalone/packages/ui/.next/static/chunks/c210559fdfe60fef.js +0 -1
  123. package/.next/standalone/packages/ui/.next/static/chunks/df1731c03abf1aee.css +0 -1
  124. package/.next/standalone/packages/ui/.next/static/chunks/ebd89051637b9a47.js +0 -4
  125. package/.next/standalone/packages/ui/.next/static/chunks/turbopack-7450632b40b2e378.js +0 -3
  126. package/.next/standalone/packages/ui/src/app/board/board-client.tsx +0 -162
  127. package/.next/standalone/packages/ui/src/app/board/loading.tsx +0 -43
  128. package/.next/standalone/packages/ui/src/app/board/page.tsx +0 -18
  129. package/.next/static/chunks/107411d1a2f4b31d.js +0 -1
  130. package/.next/static/chunks/212881511f73fc12.js +0 -5
  131. package/.next/static/chunks/5c2072ad938de8ed.js +0 -1
  132. package/.next/static/chunks/5d646f493d4c6928.js +0 -1
  133. package/.next/static/chunks/c210559fdfe60fef.js +0 -1
  134. package/.next/static/chunks/df1731c03abf1aee.css +0 -1
  135. package/.next/static/chunks/ebd89051637b9a47.js +0 -4
  136. package/.next/static/chunks/turbopack-7450632b40b2e378.js +0 -3
  137. /package/.next/standalone/packages/ui/.next/static/{6wF-7zKTjItGb66gR0rMR → uj2-H8ytNCFa611gjl5uE}/_buildManifest.js +0 -0
  138. /package/.next/standalone/packages/ui/.next/static/{6wF-7zKTjItGb66gR0rMR → uj2-H8ytNCFa611gjl5uE}/_clientMiddlewareManifest.json +0 -0
  139. /package/.next/standalone/packages/ui/.next/static/{6wF-7zKTjItGb66gR0rMR → uj2-H8ytNCFa611gjl5uE}/_ssgManifest.js +0 -0
  140. /package/.next/static/{6wF-7zKTjItGb66gR0rMR → uj2-H8ytNCFa611gjl5uE}/_buildManifest.js +0 -0
  141. /package/.next/static/{6wF-7zKTjItGb66gR0rMR → uj2-H8ytNCFa611gjl5uE}/_clientMiddlewareManifest.json +0 -0
  142. /package/.next/static/{6wF-7zKTjItGb66gR0rMR → uj2-H8ytNCFa611gjl5uE}/_ssgManifest.js +0 -0
@@ -1,2 +1,2 @@
1
1
  globalThis.__RSC_MANIFEST = globalThis.__RSC_MANIFEST || {};
2
- globalThis.__RSC_MANIFEST["/stats/page"] = {"moduleLoading":{"prefix":"","crossOrigin":null},"clientModules":{"[project]/node_modules/.pnpm/next@16.0.1_@babel+core@7.28.5_@opentelemetry+api@1.9.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/next/dist/esm/client/components/layout-router.js <module evaluation>":{"id":24050,"name":"*","chunks":["/_next/static/chunks/6a05a93ec8fa7b83.js","/_next/static/chunks/a02c1f50ff00204f.js"],"async":false},"[project]/node_modules/.pnpm/next@16.0.1_@babel+core@7.28.5_@opentelemetry+api@1.9.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/next/dist/esm/client/components/layout-router.js":{"id":24050,"name":"*","chunks":["/_next/static/chunks/6a05a93ec8fa7b83.js","/_next/static/chunks/a02c1f50ff00204f.js"],"async":false},"[project]/node_modules/.pnpm/next@16.0.1_@babel+core@7.28.5_@opentelemetry+api@1.9.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/next/dist/esm/client/components/render-from-template-context.js <module evaluation>":{"id":70127,"name":"*","chunks":["/_next/static/chunks/6a05a93ec8fa7b83.js","/_next/static/chunks/a02c1f50ff00204f.js"],"async":false},"[project]/node_modules/.pnpm/next@16.0.1_@babel+core@7.28.5_@opentelemetry+api@1.9.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/next/dist/esm/client/components/render-from-template-context.js":{"id":70127,"name":"*","chunks":["/_next/static/chunks/6a05a93ec8fa7b83.js","/_next/static/chunks/a02c1f50ff00204f.js"],"async":false},"[project]/node_modules/.pnpm/next@16.0.1_@babel+core@7.28.5_@opentelemetry+api@1.9.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/next/dist/esm/client/components/client-page.js <module evaluation>":{"id":5451,"name":"*","chunks":["/_next/static/chunks/6a05a93ec8fa7b83.js","/_next/static/chunks/a02c1f50ff00204f.js"],"async":false},"[project]/node_modules/.pnpm/next@16.0.1_@babel+core@7.28.5_@opentelemetry+api@1.9.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/next/dist/esm/client/components/client-page.js":{"id":5451,"name":"*","chunks":["/_next/static/chunks/6a05a93ec8fa7b83.js","/_next/static/chunks/a02c1f50ff00204f.js"],"async":false},"[project]/node_modules/.pnpm/next@16.0.1_@babel+core@7.28.5_@opentelemetry+api@1.9.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/next/dist/esm/client/components/client-segment.js <module evaluation>":{"id":99833,"name":"*","chunks":["/_next/static/chunks/6a05a93ec8fa7b83.js","/_next/static/chunks/a02c1f50ff00204f.js"],"async":false},"[project]/node_modules/.pnpm/next@16.0.1_@babel+core@7.28.5_@opentelemetry+api@1.9.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/next/dist/esm/client/components/client-segment.js":{"id":99833,"name":"*","chunks":["/_next/static/chunks/6a05a93ec8fa7b83.js","/_next/static/chunks/a02c1f50ff00204f.js"],"async":false},"[project]/node_modules/.pnpm/next@16.0.1_@babel+core@7.28.5_@opentelemetry+api@1.9.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/next/dist/esm/client/components/http-access-fallback/error-boundary.js <module evaluation>":{"id":13832,"name":"*","chunks":["/_next/static/chunks/6a05a93ec8fa7b83.js","/_next/static/chunks/a02c1f50ff00204f.js"],"async":false},"[project]/node_modules/.pnpm/next@16.0.1_@babel+core@7.28.5_@opentelemetry+api@1.9.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/next/dist/esm/client/components/http-access-fallback/error-boundary.js":{"id":13832,"name":"*","chunks":["/_next/static/chunks/6a05a93ec8fa7b83.js","/_next/static/chunks/a02c1f50ff00204f.js"],"async":false},"[project]/node_modules/.pnpm/next@16.0.1_@babel+core@7.28.5_@opentelemetry+api@1.9.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/next/dist/esm/lib/metadata/generate/icon-mark.js <module evaluation>":{"id":90269,"name":"*","chunks":["/_next/static/chunks/6a05a93ec8fa7b83.js","/_next/static/chunks/a02c1f50ff00204f.js"],"async":false},"[project]/node_modules/.pnpm/next@16.0.1_@babel+core@7.28.5_@opentelemetry+api@1.9.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/next/dist/esm/lib/metadata/generate/icon-mark.js":{"id":90269,"name":"*","chunks":["/_next/static/chunks/6a05a93ec8fa7b83.js","/_next/static/chunks/a02c1f50ff00204f.js"],"async":false},"[project]/node_modules/.pnpm/next@16.0.1_@babel+core@7.28.5_@opentelemetry+api@1.9.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/next/dist/esm/lib/framework/boundary-components.js <module evaluation>":{"id":45442,"name":"*","chunks":["/_next/static/chunks/6a05a93ec8fa7b83.js","/_next/static/chunks/a02c1f50ff00204f.js"],"async":false},"[project]/node_modules/.pnpm/next@16.0.1_@babel+core@7.28.5_@opentelemetry+api@1.9.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/next/dist/esm/lib/framework/boundary-components.js":{"id":45442,"name":"*","chunks":["/_next/static/chunks/6a05a93ec8fa7b83.js","/_next/static/chunks/a02c1f50ff00204f.js"],"async":false},"[project]/node_modules/.pnpm/next@16.0.1_@babel+core@7.28.5_@opentelemetry+api@1.9.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/next/dist/client/components/builtin/global-error.js <module evaluation>":{"id":65393,"name":"*","chunks":["/_next/static/chunks/6a05a93ec8fa7b83.js","/_next/static/chunks/a02c1f50ff00204f.js"],"async":false},"[project]/node_modules/.pnpm/next@16.0.1_@babel+core@7.28.5_@opentelemetry+api@1.9.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/next/dist/client/components/builtin/global-error.js":{"id":65393,"name":"*","chunks":["/_next/static/chunks/6a05a93ec8fa7b83.js","/_next/static/chunks/a02c1f50ff00204f.js"],"async":false},"[project]/packages/ui/src/components/navigation.tsx <module evaluation>":{"id":26160,"name":"*","chunks":["/_next/static/chunks/212881511f73fc12.js","/_next/static/chunks/5d646f493d4c6928.js","/_next/static/chunks/e237e00fd3a84178.js","/_next/static/chunks/ae04dcd433be6dab.js","/_next/static/chunks/b9b9d7565bc2c2ad.js"],"async":false},"[project]/packages/ui/src/components/navigation.tsx":{"id":26160,"name":"*","chunks":["/_next/static/chunks/212881511f73fc12.js","/_next/static/chunks/5d646f493d4c6928.js","/_next/static/chunks/e237e00fd3a84178.js","/_next/static/chunks/ae04dcd433be6dab.js","/_next/static/chunks/b9b9d7565bc2c2ad.js"],"async":false},"[project]/packages/ui/src/components/main-sidebar.tsx <module evaluation>":{"id":42634,"name":"*","chunks":["/_next/static/chunks/212881511f73fc12.js","/_next/static/chunks/5d646f493d4c6928.js","/_next/static/chunks/e237e00fd3a84178.js","/_next/static/chunks/ae04dcd433be6dab.js","/_next/static/chunks/b9b9d7565bc2c2ad.js"],"async":false},"[project]/packages/ui/src/components/main-sidebar.tsx":{"id":42634,"name":"*","chunks":["/_next/static/chunks/212881511f73fc12.js","/_next/static/chunks/5d646f493d4c6928.js","/_next/static/chunks/e237e00fd3a84178.js","/_next/static/chunks/ae04dcd433be6dab.js","/_next/static/chunks/b9b9d7565bc2c2ad.js"],"async":false},"[project]/packages/ui/src/components/theme-provider.tsx <module evaluation>":{"id":14636,"name":"*","chunks":["/_next/static/chunks/212881511f73fc12.js","/_next/static/chunks/5d646f493d4c6928.js","/_next/static/chunks/e237e00fd3a84178.js","/_next/static/chunks/ae04dcd433be6dab.js","/_next/static/chunks/b9b9d7565bc2c2ad.js"],"async":false},"[project]/packages/ui/src/components/theme-provider.tsx":{"id":14636,"name":"*","chunks":["/_next/static/chunks/212881511f73fc12.js","/_next/static/chunks/5d646f493d4c6928.js","/_next/static/chunks/e237e00fd3a84178.js","/_next/static/chunks/ae04dcd433be6dab.js","/_next/static/chunks/b9b9d7565bc2c2ad.js"],"async":false},"[project]/packages/ui/src/components/ui/toast.tsx <module evaluation>":{"id":74916,"name":"*","chunks":["/_next/static/chunks/212881511f73fc12.js","/_next/static/chunks/5d646f493d4c6928.js","/_next/static/chunks/e237e00fd3a84178.js","/_next/static/chunks/ae04dcd433be6dab.js","/_next/static/chunks/b9b9d7565bc2c2ad.js"],"async":false},"[project]/packages/ui/src/components/ui/toast.tsx":{"id":74916,"name":"*","chunks":["/_next/static/chunks/212881511f73fc12.js","/_next/static/chunks/5d646f493d4c6928.js","/_next/static/chunks/e237e00fd3a84178.js","/_next/static/chunks/ae04dcd433be6dab.js","/_next/static/chunks/b9b9d7565bc2c2ad.js"],"async":false},"[project]/packages/ui/src/app/error.tsx <module evaluation>":{"id":68399,"name":"*","chunks":["/_next/static/chunks/212881511f73fc12.js","/_next/static/chunks/5d646f493d4c6928.js","/_next/static/chunks/e237e00fd3a84178.js","/_next/static/chunks/ae04dcd433be6dab.js","/_next/static/chunks/b9b9d7565bc2c2ad.js","/_next/static/chunks/4a7396c9a77e64d5.js"],"async":false},"[project]/packages/ui/src/app/error.tsx":{"id":68399,"name":"*","chunks":["/_next/static/chunks/212881511f73fc12.js","/_next/static/chunks/5d646f493d4c6928.js","/_next/static/chunks/e237e00fd3a84178.js","/_next/static/chunks/ae04dcd433be6dab.js","/_next/static/chunks/b9b9d7565bc2c2ad.js","/_next/static/chunks/4a7396c9a77e64d5.js"],"async":false},"[project]/node_modules/.pnpm/next@16.0.1_@babel+core@7.28.5_@opentelemetry+api@1.9.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/next/dist/client/app-dir/link.js <module evaluation>":{"id":87985,"name":"*","chunks":["/_next/static/chunks/212881511f73fc12.js","/_next/static/chunks/5d646f493d4c6928.js","/_next/static/chunks/e237e00fd3a84178.js","/_next/static/chunks/ae04dcd433be6dab.js","/_next/static/chunks/b9b9d7565bc2c2ad.js"],"async":false},"[project]/node_modules/.pnpm/next@16.0.1_@babel+core@7.28.5_@opentelemetry+api@1.9.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/next/dist/client/app-dir/link.js":{"id":87985,"name":"*","chunks":["/_next/static/chunks/212881511f73fc12.js","/_next/static/chunks/5d646f493d4c6928.js","/_next/static/chunks/e237e00fd3a84178.js","/_next/static/chunks/ae04dcd433be6dab.js","/_next/static/chunks/b9b9d7565bc2c2ad.js"],"async":false},"[project]/packages/ui/src/app/stats/stats-client.tsx <module evaluation>":{"id":25740,"name":"*","chunks":["/_next/static/chunks/212881511f73fc12.js","/_next/static/chunks/5d646f493d4c6928.js","/_next/static/chunks/e237e00fd3a84178.js","/_next/static/chunks/ae04dcd433be6dab.js","/_next/static/chunks/b9b9d7565bc2c2ad.js","/_next/static/chunks/50aead33b660f05c.js","/_next/static/chunks/db281fdc89c063c5.js"],"async":false},"[project]/packages/ui/src/app/stats/stats-client.tsx":{"id":25740,"name":"*","chunks":["/_next/static/chunks/212881511f73fc12.js","/_next/static/chunks/5d646f493d4c6928.js","/_next/static/chunks/e237e00fd3a84178.js","/_next/static/chunks/ae04dcd433be6dab.js","/_next/static/chunks/b9b9d7565bc2c2ad.js","/_next/static/chunks/50aead33b660f05c.js","/_next/static/chunks/db281fdc89c063c5.js"],"async":false}},"ssrModuleMapping":{"24050":{"*":{"id":5507,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__e5891e5a._.js","server/chunks/ssr/6e9bd_next_dist_esm_25672c28._.js"],"async":false}},"70127":{"*":{"id":29555,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__e5891e5a._.js","server/chunks/ssr/6e9bd_next_dist_esm_25672c28._.js"],"async":false}},"5451":{"*":{"id":44063,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__e5891e5a._.js","server/chunks/ssr/6e9bd_next_dist_esm_25672c28._.js"],"async":false}},"99833":{"*":{"id":4160,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__e5891e5a._.js","server/chunks/ssr/6e9bd_next_dist_esm_25672c28._.js"],"async":false}},"13832":{"*":{"id":52382,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__e5891e5a._.js","server/chunks/ssr/6e9bd_next_dist_esm_25672c28._.js"],"async":false}},"90269":{"*":{"id":35607,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__e5891e5a._.js","server/chunks/ssr/6e9bd_next_dist_esm_25672c28._.js"],"async":false}},"45442":{"*":{"id":29109,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__e5891e5a._.js","server/chunks/ssr/6e9bd_next_dist_esm_25672c28._.js"],"async":false}},"65393":{"*":{"id":61860,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__e5891e5a._.js","server/chunks/ssr/6e9bd_next_dist_esm_25672c28._.js"],"async":false}},"26160":{"*":{"id":10660,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__b50fa24c._.js","server/chunks/ssr/_64a39e38._.js","server/chunks/ssr/_66209e84._.js","server/chunks/ssr/packages_ui_src_lib_utils_ts_259f88e4._.js","server/chunks/ssr/6e9bd_next_dist_7af75658._.js","server/chunks/ssr/_d7e4bd50._.js","server/chunks/ssr/6e9bd_next_40720940._.js","server/chunks/ssr/node_modules__pnpm_b8ff10b9._.js"],"async":false}},"42634":{"*":{"id":50338,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__b50fa24c._.js","server/chunks/ssr/_64a39e38._.js","server/chunks/ssr/_66209e84._.js","server/chunks/ssr/packages_ui_src_lib_utils_ts_259f88e4._.js","server/chunks/ssr/6e9bd_next_dist_7af75658._.js","server/chunks/ssr/_d7e4bd50._.js","server/chunks/ssr/6e9bd_next_40720940._.js","server/chunks/ssr/node_modules__pnpm_b8ff10b9._.js"],"async":false}},"14636":{"*":{"id":25726,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__b50fa24c._.js","server/chunks/ssr/_64a39e38._.js","server/chunks/ssr/_66209e84._.js","server/chunks/ssr/packages_ui_src_lib_utils_ts_259f88e4._.js","server/chunks/ssr/6e9bd_next_dist_7af75658._.js","server/chunks/ssr/_d7e4bd50._.js","server/chunks/ssr/6e9bd_next_40720940._.js","server/chunks/ssr/node_modules__pnpm_b8ff10b9._.js"],"async":false}},"74916":{"*":{"id":68607,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__b50fa24c._.js","server/chunks/ssr/_64a39e38._.js","server/chunks/ssr/_66209e84._.js","server/chunks/ssr/packages_ui_src_lib_utils_ts_259f88e4._.js","server/chunks/ssr/6e9bd_next_dist_7af75658._.js","server/chunks/ssr/_d7e4bd50._.js","server/chunks/ssr/6e9bd_next_40720940._.js","server/chunks/ssr/node_modules__pnpm_b8ff10b9._.js"],"async":false}},"68399":{"*":{"id":83166,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__b50fa24c._.js","server/chunks/ssr/_64a39e38._.js","server/chunks/ssr/_66209e84._.js","server/chunks/ssr/packages_ui_src_lib_utils_ts_259f88e4._.js","server/chunks/ssr/6e9bd_next_dist_7af75658._.js","server/chunks/ssr/_d7e4bd50._.js","server/chunks/ssr/6e9bd_next_40720940._.js","server/chunks/ssr/node_modules__pnpm_b8ff10b9._.js","server/chunks/ssr/packages_ui_src_app_error_tsx_d8203bfe._.js"],"async":false}},"87985":{"*":{"id":1926,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__b50fa24c._.js","server/chunks/ssr/_64a39e38._.js","server/chunks/ssr/_66209e84._.js","server/chunks/ssr/packages_ui_src_lib_utils_ts_259f88e4._.js","server/chunks/ssr/6e9bd_next_dist_7af75658._.js","server/chunks/ssr/_d7e4bd50._.js","server/chunks/ssr/6e9bd_next_40720940._.js","server/chunks/ssr/node_modules__pnpm_b8ff10b9._.js"],"async":false}},"25740":{"*":{"id":69950,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__b50fa24c._.js","server/chunks/ssr/_64a39e38._.js","server/chunks/ssr/_66209e84._.js","server/chunks/ssr/packages_ui_src_lib_utils_ts_259f88e4._.js","server/chunks/ssr/6e9bd_next_dist_7af75658._.js","server/chunks/ssr/_d7e4bd50._.js","server/chunks/ssr/6e9bd_next_40720940._.js","server/chunks/ssr/node_modules__pnpm_b8ff10b9._.js","server/chunks/ssr/_7fa1d4b1._.js","server/chunks/ssr/_3fac7eca._.js"],"async":false}}},"edgeSSRModuleMapping":{},"rscModuleMapping":{"24050":{"*":{"id":88712,"name":"*","chunks":[],"async":false}},"70127":{"*":{"id":21527,"name":"*","chunks":[],"async":false}},"5451":{"*":{"id":87484,"name":"*","chunks":[],"async":false}},"99833":{"*":{"id":20169,"name":"*","chunks":[],"async":false}},"13832":{"*":{"id":18951,"name":"*","chunks":[],"async":false}},"90269":{"*":{"id":87992,"name":"*","chunks":[],"async":false}},"45442":{"*":{"id":18077,"name":"*","chunks":[],"async":false}},"65393":{"*":{"id":86896,"name":"*","chunks":[],"async":false}},"26160":{"*":{"id":4480,"name":"*","chunks":[],"async":false}},"42634":{"*":{"id":18100,"name":"*","chunks":[],"async":false}},"14636":{"*":{"id":64731,"name":"*","chunks":[],"async":false}},"74916":{"*":{"id":93515,"name":"*","chunks":[],"async":false}},"68399":{"*":{"id":57869,"name":"*","chunks":[],"async":false}},"87985":{"*":{"id":3594,"name":"*","chunks":[],"async":false}},"25740":{"*":{"id":92833,"name":"*","chunks":[],"async":false}}},"edgeRscModuleMapping":{},"entryCSSFiles":{"[project]/node_modules/.pnpm/next@16.0.1_@babel+core@7.28.5_@opentelemetry+api@1.9.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/next/dist/client/components/builtin/global-error":[],"[project]/packages/ui/src/app/layout":[{"path":"static/chunks/df1731c03abf1aee.css","inlined":false}],"[project]/packages/ui/src/app/error":[{"path":"static/chunks/df1731c03abf1aee.css","inlined":false}],"[project]/packages/ui/src/app/not-found":[{"path":"static/chunks/df1731c03abf1aee.css","inlined":false}],"[project]/packages/ui/src/app/stats/page":[{"path":"static/chunks/df1731c03abf1aee.css","inlined":false}]},"entryJSFiles":{"[project]/node_modules/.pnpm/next@16.0.1_@babel+core@7.28.5_@opentelemetry+api@1.9.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/next/dist/client/components/builtin/global-error":["static/chunks/6a05a93ec8fa7b83.js","static/chunks/a02c1f50ff00204f.js"],"[project]/packages/ui/src/app/layout":["static/chunks/212881511f73fc12.js","static/chunks/5d646f493d4c6928.js","static/chunks/e237e00fd3a84178.js","static/chunks/ae04dcd433be6dab.js","static/chunks/b9b9d7565bc2c2ad.js"],"[project]/packages/ui/src/app/error":["static/chunks/212881511f73fc12.js","static/chunks/5d646f493d4c6928.js","static/chunks/e237e00fd3a84178.js","static/chunks/ae04dcd433be6dab.js","static/chunks/b9b9d7565bc2c2ad.js","static/chunks/4a7396c9a77e64d5.js"],"[project]/packages/ui/src/app/not-found":["static/chunks/212881511f73fc12.js","static/chunks/5d646f493d4c6928.js","static/chunks/e237e00fd3a84178.js","static/chunks/ae04dcd433be6dab.js","static/chunks/b9b9d7565bc2c2ad.js"],"[project]/packages/ui/src/app/stats/page":["static/chunks/212881511f73fc12.js","static/chunks/5d646f493d4c6928.js","static/chunks/e237e00fd3a84178.js","static/chunks/ae04dcd433be6dab.js","static/chunks/b9b9d7565bc2c2ad.js","static/chunks/50aead33b660f05c.js","static/chunks/db281fdc89c063c5.js"]}}
2
+ globalThis.__RSC_MANIFEST["/stats/page"] = {"moduleLoading":{"prefix":"","crossOrigin":null},"clientModules":{"[project]/node_modules/.pnpm/next@16.0.1_@babel+core@7.28.5_@opentelemetry+api@1.9.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/next/dist/esm/client/components/layout-router.js <module evaluation>":{"id":24050,"name":"*","chunks":["/_next/static/chunks/6a05a93ec8fa7b83.js","/_next/static/chunks/a02c1f50ff00204f.js"],"async":false},"[project]/node_modules/.pnpm/next@16.0.1_@babel+core@7.28.5_@opentelemetry+api@1.9.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/next/dist/esm/client/components/layout-router.js":{"id":24050,"name":"*","chunks":["/_next/static/chunks/6a05a93ec8fa7b83.js","/_next/static/chunks/a02c1f50ff00204f.js"],"async":false},"[project]/node_modules/.pnpm/next@16.0.1_@babel+core@7.28.5_@opentelemetry+api@1.9.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/next/dist/esm/client/components/render-from-template-context.js <module evaluation>":{"id":70127,"name":"*","chunks":["/_next/static/chunks/6a05a93ec8fa7b83.js","/_next/static/chunks/a02c1f50ff00204f.js"],"async":false},"[project]/node_modules/.pnpm/next@16.0.1_@babel+core@7.28.5_@opentelemetry+api@1.9.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/next/dist/esm/client/components/render-from-template-context.js":{"id":70127,"name":"*","chunks":["/_next/static/chunks/6a05a93ec8fa7b83.js","/_next/static/chunks/a02c1f50ff00204f.js"],"async":false},"[project]/node_modules/.pnpm/next@16.0.1_@babel+core@7.28.5_@opentelemetry+api@1.9.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/next/dist/esm/client/components/client-page.js <module evaluation>":{"id":5451,"name":"*","chunks":["/_next/static/chunks/6a05a93ec8fa7b83.js","/_next/static/chunks/a02c1f50ff00204f.js"],"async":false},"[project]/node_modules/.pnpm/next@16.0.1_@babel+core@7.28.5_@opentelemetry+api@1.9.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/next/dist/esm/client/components/client-page.js":{"id":5451,"name":"*","chunks":["/_next/static/chunks/6a05a93ec8fa7b83.js","/_next/static/chunks/a02c1f50ff00204f.js"],"async":false},"[project]/node_modules/.pnpm/next@16.0.1_@babel+core@7.28.5_@opentelemetry+api@1.9.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/next/dist/esm/client/components/client-segment.js <module evaluation>":{"id":99833,"name":"*","chunks":["/_next/static/chunks/6a05a93ec8fa7b83.js","/_next/static/chunks/a02c1f50ff00204f.js"],"async":false},"[project]/node_modules/.pnpm/next@16.0.1_@babel+core@7.28.5_@opentelemetry+api@1.9.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/next/dist/esm/client/components/client-segment.js":{"id":99833,"name":"*","chunks":["/_next/static/chunks/6a05a93ec8fa7b83.js","/_next/static/chunks/a02c1f50ff00204f.js"],"async":false},"[project]/node_modules/.pnpm/next@16.0.1_@babel+core@7.28.5_@opentelemetry+api@1.9.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/next/dist/esm/client/components/http-access-fallback/error-boundary.js <module evaluation>":{"id":13832,"name":"*","chunks":["/_next/static/chunks/6a05a93ec8fa7b83.js","/_next/static/chunks/a02c1f50ff00204f.js"],"async":false},"[project]/node_modules/.pnpm/next@16.0.1_@babel+core@7.28.5_@opentelemetry+api@1.9.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/next/dist/esm/client/components/http-access-fallback/error-boundary.js":{"id":13832,"name":"*","chunks":["/_next/static/chunks/6a05a93ec8fa7b83.js","/_next/static/chunks/a02c1f50ff00204f.js"],"async":false},"[project]/node_modules/.pnpm/next@16.0.1_@babel+core@7.28.5_@opentelemetry+api@1.9.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/next/dist/esm/lib/metadata/generate/icon-mark.js <module evaluation>":{"id":90269,"name":"*","chunks":["/_next/static/chunks/6a05a93ec8fa7b83.js","/_next/static/chunks/a02c1f50ff00204f.js"],"async":false},"[project]/node_modules/.pnpm/next@16.0.1_@babel+core@7.28.5_@opentelemetry+api@1.9.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/next/dist/esm/lib/metadata/generate/icon-mark.js":{"id":90269,"name":"*","chunks":["/_next/static/chunks/6a05a93ec8fa7b83.js","/_next/static/chunks/a02c1f50ff00204f.js"],"async":false},"[project]/node_modules/.pnpm/next@16.0.1_@babel+core@7.28.5_@opentelemetry+api@1.9.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/next/dist/esm/lib/framework/boundary-components.js <module evaluation>":{"id":45442,"name":"*","chunks":["/_next/static/chunks/6a05a93ec8fa7b83.js","/_next/static/chunks/a02c1f50ff00204f.js"],"async":false},"[project]/node_modules/.pnpm/next@16.0.1_@babel+core@7.28.5_@opentelemetry+api@1.9.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/next/dist/esm/lib/framework/boundary-components.js":{"id":45442,"name":"*","chunks":["/_next/static/chunks/6a05a93ec8fa7b83.js","/_next/static/chunks/a02c1f50ff00204f.js"],"async":false},"[project]/node_modules/.pnpm/next@16.0.1_@babel+core@7.28.5_@opentelemetry+api@1.9.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/next/dist/client/components/builtin/global-error.js <module evaluation>":{"id":65393,"name":"*","chunks":["/_next/static/chunks/6a05a93ec8fa7b83.js","/_next/static/chunks/a02c1f50ff00204f.js"],"async":false},"[project]/node_modules/.pnpm/next@16.0.1_@babel+core@7.28.5_@opentelemetry+api@1.9.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/next/dist/client/components/builtin/global-error.js":{"id":65393,"name":"*","chunks":["/_next/static/chunks/6a05a93ec8fa7b83.js","/_next/static/chunks/a02c1f50ff00204f.js"],"async":false},"[project]/packages/ui/src/components/navigation.tsx <module evaluation>":{"id":26160,"name":"*","chunks":["/_next/static/chunks/dde5d8bddd7fbfcf.js","/_next/static/chunks/b9b9d7565bc2c2ad.js","/_next/static/chunks/e237e00fd3a84178.js","/_next/static/chunks/ae04dcd433be6dab.js","/_next/static/chunks/ee4245fe6ba3d6d3.js"],"async":false},"[project]/packages/ui/src/components/navigation.tsx":{"id":26160,"name":"*","chunks":["/_next/static/chunks/dde5d8bddd7fbfcf.js","/_next/static/chunks/b9b9d7565bc2c2ad.js","/_next/static/chunks/e237e00fd3a84178.js","/_next/static/chunks/ae04dcd433be6dab.js","/_next/static/chunks/ee4245fe6ba3d6d3.js"],"async":false},"[project]/packages/ui/src/components/main-sidebar.tsx <module evaluation>":{"id":42634,"name":"*","chunks":["/_next/static/chunks/dde5d8bddd7fbfcf.js","/_next/static/chunks/b9b9d7565bc2c2ad.js","/_next/static/chunks/e237e00fd3a84178.js","/_next/static/chunks/ae04dcd433be6dab.js","/_next/static/chunks/ee4245fe6ba3d6d3.js"],"async":false},"[project]/packages/ui/src/components/main-sidebar.tsx":{"id":42634,"name":"*","chunks":["/_next/static/chunks/dde5d8bddd7fbfcf.js","/_next/static/chunks/b9b9d7565bc2c2ad.js","/_next/static/chunks/e237e00fd3a84178.js","/_next/static/chunks/ae04dcd433be6dab.js","/_next/static/chunks/ee4245fe6ba3d6d3.js"],"async":false},"[project]/packages/ui/src/components/theme-provider.tsx <module evaluation>":{"id":14636,"name":"*","chunks":["/_next/static/chunks/dde5d8bddd7fbfcf.js","/_next/static/chunks/b9b9d7565bc2c2ad.js","/_next/static/chunks/e237e00fd3a84178.js","/_next/static/chunks/ae04dcd433be6dab.js","/_next/static/chunks/ee4245fe6ba3d6d3.js"],"async":false},"[project]/packages/ui/src/components/theme-provider.tsx":{"id":14636,"name":"*","chunks":["/_next/static/chunks/dde5d8bddd7fbfcf.js","/_next/static/chunks/b9b9d7565bc2c2ad.js","/_next/static/chunks/e237e00fd3a84178.js","/_next/static/chunks/ae04dcd433be6dab.js","/_next/static/chunks/ee4245fe6ba3d6d3.js"],"async":false},"[project]/packages/ui/src/components/ui/toast.tsx <module evaluation>":{"id":74916,"name":"*","chunks":["/_next/static/chunks/dde5d8bddd7fbfcf.js","/_next/static/chunks/b9b9d7565bc2c2ad.js","/_next/static/chunks/e237e00fd3a84178.js","/_next/static/chunks/ae04dcd433be6dab.js","/_next/static/chunks/ee4245fe6ba3d6d3.js"],"async":false},"[project]/packages/ui/src/components/ui/toast.tsx":{"id":74916,"name":"*","chunks":["/_next/static/chunks/dde5d8bddd7fbfcf.js","/_next/static/chunks/b9b9d7565bc2c2ad.js","/_next/static/chunks/e237e00fd3a84178.js","/_next/static/chunks/ae04dcd433be6dab.js","/_next/static/chunks/ee4245fe6ba3d6d3.js"],"async":false},"[project]/packages/ui/src/app/error.tsx <module evaluation>":{"id":68399,"name":"*","chunks":["/_next/static/chunks/dde5d8bddd7fbfcf.js","/_next/static/chunks/b9b9d7565bc2c2ad.js","/_next/static/chunks/e237e00fd3a84178.js","/_next/static/chunks/ae04dcd433be6dab.js","/_next/static/chunks/ee4245fe6ba3d6d3.js","/_next/static/chunks/4a7396c9a77e64d5.js"],"async":false},"[project]/packages/ui/src/app/error.tsx":{"id":68399,"name":"*","chunks":["/_next/static/chunks/dde5d8bddd7fbfcf.js","/_next/static/chunks/b9b9d7565bc2c2ad.js","/_next/static/chunks/e237e00fd3a84178.js","/_next/static/chunks/ae04dcd433be6dab.js","/_next/static/chunks/ee4245fe6ba3d6d3.js","/_next/static/chunks/4a7396c9a77e64d5.js"],"async":false},"[project]/node_modules/.pnpm/next@16.0.1_@babel+core@7.28.5_@opentelemetry+api@1.9.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/next/dist/client/app-dir/link.js <module evaluation>":{"id":87985,"name":"*","chunks":["/_next/static/chunks/dde5d8bddd7fbfcf.js","/_next/static/chunks/b9b9d7565bc2c2ad.js","/_next/static/chunks/e237e00fd3a84178.js","/_next/static/chunks/ae04dcd433be6dab.js","/_next/static/chunks/ee4245fe6ba3d6d3.js"],"async":false},"[project]/node_modules/.pnpm/next@16.0.1_@babel+core@7.28.5_@opentelemetry+api@1.9.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/next/dist/client/app-dir/link.js":{"id":87985,"name":"*","chunks":["/_next/static/chunks/dde5d8bddd7fbfcf.js","/_next/static/chunks/b9b9d7565bc2c2ad.js","/_next/static/chunks/e237e00fd3a84178.js","/_next/static/chunks/ae04dcd433be6dab.js","/_next/static/chunks/ee4245fe6ba3d6d3.js"],"async":false},"[project]/packages/ui/src/app/stats/stats-client.tsx <module evaluation>":{"id":25740,"name":"*","chunks":["/_next/static/chunks/dde5d8bddd7fbfcf.js","/_next/static/chunks/b9b9d7565bc2c2ad.js","/_next/static/chunks/e237e00fd3a84178.js","/_next/static/chunks/ae04dcd433be6dab.js","/_next/static/chunks/ee4245fe6ba3d6d3.js","/_next/static/chunks/50aead33b660f05c.js","/_next/static/chunks/db281fdc89c063c5.js"],"async":false},"[project]/packages/ui/src/app/stats/stats-client.tsx":{"id":25740,"name":"*","chunks":["/_next/static/chunks/dde5d8bddd7fbfcf.js","/_next/static/chunks/b9b9d7565bc2c2ad.js","/_next/static/chunks/e237e00fd3a84178.js","/_next/static/chunks/ae04dcd433be6dab.js","/_next/static/chunks/ee4245fe6ba3d6d3.js","/_next/static/chunks/50aead33b660f05c.js","/_next/static/chunks/db281fdc89c063c5.js"],"async":false}},"ssrModuleMapping":{"24050":{"*":{"id":5507,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__cbbbfb5d._.js","server/chunks/ssr/6e9bd_next_dist_esm_25672c28._.js"],"async":false}},"70127":{"*":{"id":29555,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__cbbbfb5d._.js","server/chunks/ssr/6e9bd_next_dist_esm_25672c28._.js"],"async":false}},"5451":{"*":{"id":44063,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__cbbbfb5d._.js","server/chunks/ssr/6e9bd_next_dist_esm_25672c28._.js"],"async":false}},"99833":{"*":{"id":4160,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__cbbbfb5d._.js","server/chunks/ssr/6e9bd_next_dist_esm_25672c28._.js"],"async":false}},"13832":{"*":{"id":52382,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__cbbbfb5d._.js","server/chunks/ssr/6e9bd_next_dist_esm_25672c28._.js"],"async":false}},"90269":{"*":{"id":35607,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__cbbbfb5d._.js","server/chunks/ssr/6e9bd_next_dist_esm_25672c28._.js"],"async":false}},"45442":{"*":{"id":29109,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__cbbbfb5d._.js","server/chunks/ssr/6e9bd_next_dist_esm_25672c28._.js"],"async":false}},"65393":{"*":{"id":61860,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__cbbbfb5d._.js","server/chunks/ssr/6e9bd_next_dist_esm_25672c28._.js"],"async":false}},"26160":{"*":{"id":10660,"name":"*","chunks":["server/chunks/ssr/_66209e84._.js","server/chunks/ssr/6e9bd_next_40720940._.js","server/chunks/ssr/[root-of-the-server]__8ae28367._.js","server/chunks/ssr/packages_ui_src_lib_utils_ts_259f88e4._.js","server/chunks/ssr/_d7e4bd50._.js","server/chunks/ssr/node_modules__pnpm_9710705b._.js","server/chunks/ssr/node_modules__pnpm_b8ff10b9._.js"],"async":false}},"42634":{"*":{"id":50338,"name":"*","chunks":["server/chunks/ssr/_66209e84._.js","server/chunks/ssr/6e9bd_next_40720940._.js","server/chunks/ssr/[root-of-the-server]__8ae28367._.js","server/chunks/ssr/packages_ui_src_lib_utils_ts_259f88e4._.js","server/chunks/ssr/_d7e4bd50._.js","server/chunks/ssr/node_modules__pnpm_9710705b._.js","server/chunks/ssr/node_modules__pnpm_b8ff10b9._.js"],"async":false}},"14636":{"*":{"id":25726,"name":"*","chunks":["server/chunks/ssr/_66209e84._.js","server/chunks/ssr/6e9bd_next_40720940._.js","server/chunks/ssr/[root-of-the-server]__8ae28367._.js","server/chunks/ssr/packages_ui_src_lib_utils_ts_259f88e4._.js","server/chunks/ssr/_d7e4bd50._.js","server/chunks/ssr/node_modules__pnpm_9710705b._.js","server/chunks/ssr/node_modules__pnpm_b8ff10b9._.js"],"async":false}},"74916":{"*":{"id":68607,"name":"*","chunks":["server/chunks/ssr/_66209e84._.js","server/chunks/ssr/6e9bd_next_40720940._.js","server/chunks/ssr/[root-of-the-server]__8ae28367._.js","server/chunks/ssr/packages_ui_src_lib_utils_ts_259f88e4._.js","server/chunks/ssr/_d7e4bd50._.js","server/chunks/ssr/node_modules__pnpm_9710705b._.js","server/chunks/ssr/node_modules__pnpm_b8ff10b9._.js"],"async":false}},"68399":{"*":{"id":83166,"name":"*","chunks":["server/chunks/ssr/_66209e84._.js","server/chunks/ssr/6e9bd_next_40720940._.js","server/chunks/ssr/[root-of-the-server]__8ae28367._.js","server/chunks/ssr/packages_ui_src_lib_utils_ts_259f88e4._.js","server/chunks/ssr/_d7e4bd50._.js","server/chunks/ssr/node_modules__pnpm_9710705b._.js","server/chunks/ssr/node_modules__pnpm_b8ff10b9._.js","server/chunks/ssr/packages_ui_src_app_error_tsx_d8203bfe._.js"],"async":false}},"87985":{"*":{"id":1926,"name":"*","chunks":["server/chunks/ssr/_66209e84._.js","server/chunks/ssr/6e9bd_next_40720940._.js","server/chunks/ssr/[root-of-the-server]__8ae28367._.js","server/chunks/ssr/packages_ui_src_lib_utils_ts_259f88e4._.js","server/chunks/ssr/_d7e4bd50._.js","server/chunks/ssr/node_modules__pnpm_9710705b._.js","server/chunks/ssr/node_modules__pnpm_b8ff10b9._.js"],"async":false}},"25740":{"*":{"id":69950,"name":"*","chunks":["server/chunks/ssr/_66209e84._.js","server/chunks/ssr/6e9bd_next_40720940._.js","server/chunks/ssr/[root-of-the-server]__8ae28367._.js","server/chunks/ssr/packages_ui_src_lib_utils_ts_259f88e4._.js","server/chunks/ssr/_d7e4bd50._.js","server/chunks/ssr/node_modules__pnpm_9710705b._.js","server/chunks/ssr/node_modules__pnpm_b8ff10b9._.js","server/chunks/ssr/_7fa1d4b1._.js","server/chunks/ssr/_3fac7eca._.js"],"async":false}}},"edgeSSRModuleMapping":{},"rscModuleMapping":{"24050":{"*":{"id":88712,"name":"*","chunks":[],"async":false}},"70127":{"*":{"id":21527,"name":"*","chunks":[],"async":false}},"5451":{"*":{"id":87484,"name":"*","chunks":[],"async":false}},"99833":{"*":{"id":20169,"name":"*","chunks":[],"async":false}},"13832":{"*":{"id":18951,"name":"*","chunks":[],"async":false}},"90269":{"*":{"id":87992,"name":"*","chunks":[],"async":false}},"45442":{"*":{"id":18077,"name":"*","chunks":[],"async":false}},"65393":{"*":{"id":86896,"name":"*","chunks":[],"async":false}},"26160":{"*":{"id":4480,"name":"*","chunks":[],"async":false}},"42634":{"*":{"id":18100,"name":"*","chunks":[],"async":false}},"14636":{"*":{"id":64731,"name":"*","chunks":[],"async":false}},"74916":{"*":{"id":93515,"name":"*","chunks":[],"async":false}},"68399":{"*":{"id":57869,"name":"*","chunks":[],"async":false}},"87985":{"*":{"id":3594,"name":"*","chunks":[],"async":false}},"25740":{"*":{"id":92833,"name":"*","chunks":[],"async":false}}},"edgeRscModuleMapping":{},"entryCSSFiles":{"[project]/node_modules/.pnpm/next@16.0.1_@babel+core@7.28.5_@opentelemetry+api@1.9.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/next/dist/client/components/builtin/global-error":[],"[project]/packages/ui/src/app/layout":[{"path":"static/chunks/16b2f4261d3a374a.css","inlined":false}],"[project]/packages/ui/src/app/error":[{"path":"static/chunks/16b2f4261d3a374a.css","inlined":false}],"[project]/packages/ui/src/app/not-found":[{"path":"static/chunks/16b2f4261d3a374a.css","inlined":false}],"[project]/packages/ui/src/app/stats/page":[{"path":"static/chunks/16b2f4261d3a374a.css","inlined":false}]},"entryJSFiles":{"[project]/node_modules/.pnpm/next@16.0.1_@babel+core@7.28.5_@opentelemetry+api@1.9.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/next/dist/client/components/builtin/global-error":["static/chunks/6a05a93ec8fa7b83.js","static/chunks/a02c1f50ff00204f.js"],"[project]/packages/ui/src/app/layout":["static/chunks/dde5d8bddd7fbfcf.js","static/chunks/b9b9d7565bc2c2ad.js","static/chunks/e237e00fd3a84178.js","static/chunks/ae04dcd433be6dab.js","static/chunks/ee4245fe6ba3d6d3.js"],"[project]/packages/ui/src/app/error":["static/chunks/dde5d8bddd7fbfcf.js","static/chunks/b9b9d7565bc2c2ad.js","static/chunks/e237e00fd3a84178.js","static/chunks/ae04dcd433be6dab.js","static/chunks/ee4245fe6ba3d6d3.js","static/chunks/4a7396c9a77e64d5.js"],"[project]/packages/ui/src/app/not-found":["static/chunks/dde5d8bddd7fbfcf.js","static/chunks/b9b9d7565bc2c2ad.js","static/chunks/e237e00fd3a84178.js","static/chunks/ae04dcd433be6dab.js","static/chunks/ee4245fe6ba3d6d3.js"],"[project]/packages/ui/src/app/stats/page":["static/chunks/dde5d8bddd7fbfcf.js","static/chunks/b9b9d7565bc2c2ad.js","static/chunks/e237e00fd3a84178.js","static/chunks/ae04dcd433be6dab.js","static/chunks/ee4245fe6ba3d6d3.js","static/chunks/50aead33b660f05c.js","static/chunks/db281fdc89c063c5.js"]}}
@@ -8,7 +8,6 @@
8
8
  "/api/specs/[id]/route": "app/api/specs/[id]/route.js",
9
9
  "/api/specs/[id]/subspecs/[file]/route": "app/api/specs/[id]/subspecs/[file]/route.js",
10
10
  "/api/stats/route": "app/api/stats/route.js",
11
- "/board/page": "app/board/page.js",
12
11
  "/page": "app/page.js",
13
12
  "/specs/[id]/page": "app/specs/[id]/page.js",
14
13
  "/specs/page": "app/specs/page.js",
@@ -1,3 +1,3 @@
1
- module.exports=[12714,(e,t,r)=>{t.exports=e.x("node:fs/promises",()=>require("node:fs/promises"))},22734,(e,t,r)=>{t.exports=e.x("fs",()=>require("fs"))},874,(e,t,r)=>{t.exports=e.x("buffer",()=>require("buffer"))},50227,(e,t,r)=>{t.exports=e.x("node:path",()=>require("node:path"))},2157,(e,t,r)=>{t.exports=e.x("node:fs",()=>require("node:fs"))},68239,e=>{"use strict";var t=e.i(44271),r=e.i(67708),a=e.i(14747),s=e.i(2157),n=e.i(92194);let i=(0,a.resolve)(process.cwd(),"../../specs");function o(e){return e?Array.isArray(e)?e.map(e=>String(e)):"string"==typeof e?[e]:[]:[]}async function c(e,c){let l=await t.specsService.getSpec(e,c);if(!l)return null;let p={...l,tags:l.tags?"string"==typeof l.tags?JSON.parse(l.tags):l.tags:null};if(!c){let e,t,c=(e=l.filePath.replace(/^specs\//,"").replace(/\/README\.md$/,""),(0,a.join)((t=process.env.SPECS_DIR)?t.startsWith("/")?t:(0,a.resolve)(process.cwd(),t):i,e)),u=(0,r.detectSubSpecs)(c),d=function(e){try{let t=(0,a.join)(e,"README.md"),r=(0,s.readFileSync)(t,"utf-8"),{data:i}=(0,n.default)(r),c=o(i?.depends_on??i?.dependsOn),l=o(i?.related);return{dependsOn:c,related:l}}catch(e){return console.warn("Unable to parse spec relationships",e),{dependsOn:[],related:[]}}}(c);return{...p,subSpecs:u,relationships:d}}return p}async function l(e){let r=await t.specsService.getAllSpecs(e),a=new Map,s=new Map;for(let e of r)e.status&&a.set(e.status,(a.get(e.status)||0)+1),e.priority&&s.set(e.priority,(s.get(e.priority)||0)+1);let n=a.get("complete")||0,i=r.length>0?n/r.length*100:0;return{totalProjects:1,totalSpecs:r.length,specsByStatus:Array.from(a.entries()).map(([e,t])=>({status:e,count:t})),specsByPriority:Array.from(s.entries()).map(([e,t])=>({priority:e,count:t})),completionRate:Math.round(10*i)/10}}e.s(["getSpecById",()=>c,"getStats",()=>l])},93695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},18622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},32319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},24725,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/after-task-async-storage.external.js",()=>require("next/dist/server/app-render/after-task-async-storage.external.js"))},14747,(e,t,r)=>{t.exports=e.x("path",()=>require("path"))},67708,e=>{"use strict";var t=e.i(22734),r=e.i(14747),a=e.i(92194);let s=[{pattern:/design|ui|ux|mockup|wireframe|prototype/i,iconName:"Palette",color:"text-purple-600"},{pattern:/architecture|structure|system|diagram/i,iconName:"Map",color:"text-indigo-600"},{pattern:/implementation|code|develop|build/i,iconName:"Code",color:"text-green-600"},{pattern:/api|endpoint|integration|interface/i,iconName:"Code",color:"text-blue-600"},{pattern:/test|qa|quality|validation/i,iconName:"TestTube",color:"text-orange-600"},{pattern:/task|todo|checklist|milestone/i,iconName:"CheckSquare",color:"text-gray-600"},{pattern:/config|setup|settings|environment/i,iconName:"Wrench",color:"text-yellow-600"},{pattern:/deploy|devops|ci|cd|pipeline|release/i,iconName:"Wrench",color:"text-orange-600"},{pattern:/migration|upgrade|refactor|transition/i,iconName:"GitBranch",color:"text-cyan-600"},{pattern:/security|auth|permission|access|encryption/i,iconName:"CheckSquare",color:"text-red-600"},{pattern:/performance|optimization|speed|cache|benchmark/i,iconName:"TrendingUp",color:"text-green-600"},{pattern:/database|data|schema|model|query/i,iconName:"FileText",color:"text-blue-600"},{pattern:/doc|guide|manual|reference/i,iconName:"FileText",color:"text-gray-500"},{pattern:/github|git|vcs|version/i,iconName:"GitBranch",color:"text-pink-600"}],n={iconName:"FileText",color:"text-gray-600"};function i(e){let i=[];if(!(0,t.existsSync)(e))return i;try{for(let o of(0,t.readdirSync)(e)){if("README.md"===o||!o.endsWith(".md"))continue;let c=(0,r.join)(e,o);if((0,t.statSync)(c).isFile())try{let e=(0,t.readFileSync)(c,"utf-8"),{content:r}=(0,a.default)(e),l=function(e){let t=e.replace(/\.md$/i,"");for(let{pattern:e,iconName:r,color:a}of s)if(e.test(t))return{iconName:r,color:a};return n}(o);i.push({name:o.replace(/\.md$/i,"").split(/[-_]/).map(e=>e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()).join(" "),file:o,iconName:l.iconName,color:l.color,content:r})}catch(e){console.error(`Error reading sub-spec ${o}:`,e)}}i.sort((e,t)=>e.file.localeCompare(t.file))}catch(t){console.error(`Error reading spec directory ${e}:`,t)}return i}e.s(["detectSubSpecs",()=>i])},44271,e=>{"use strict";var t=e.i(12714),r=e.i(50227),a=e.i(92194);let s=parseInt(process.env.CACHE_TTL||"60000",10);class n{cache=new Map;specsDir;constructor(e){this.specsDir=e||r.join(process.cwd(),"../../specs")}async getAllSpecs(){let e="__all_specs__",t=this.cache.get(e);if(t&&Date.now()<t.expiresAt)return t.data;let r=await this.loadSpecsFromFilesystem();return this.cache.set(e,{data:r,expiresAt:Date.now()+s}),r}async getSpec(e){let t=`spec:${e}`,r=this.cache.get(t);if(r&&Date.now()<r.expiresAt)return r.data;let a=parseInt(e.split("-")[0],10);if(isNaN(a))return null;let n=await this.loadSpecByNumber(a);return n&&this.cache.set(t,{data:n,expiresAt:Date.now()+s}),n}async getSpecsByStatus(e){return(await this.getAllSpecs()).filter(t=>t.status===e)}async searchSpecs(e){let t=await this.getAllSpecs(),r=e.toLowerCase();return t.filter(e=>e.specName.toLowerCase().includes(r)||e.title?.toLowerCase().includes(r)||e.contentMd.toLowerCase().includes(r))}invalidateCache(e){e?(this.cache.delete(`spec:${e}`),this.cache.delete("__all_specs__")):this.cache.clear()}async loadSpecsFromFilesystem(){let e=[];try{await t.access(this.specsDir)}catch{return[]}let a=/^(\d{2,})-/;for(let s of(await t.readdir(this.specsDir,{withFileTypes:!0})))if(s.isDirectory()&&"archived"!==s.name&&a.test(s.name)){let t=r.join(this.specsDir,s.name),a=await this.loadSpecFromDirectory(t,s.name);a&&e.push(a)}return e.sort((e,t)=>(e.specNumber||0)-(t.specNumber||0))}async loadSpecByNumber(e){try{await t.access(this.specsDir)}catch{return null}let a=await t.readdir(this.specsDir,{withFileTypes:!0}),s=RegExp(`^0*${e}-`);for(let e of a)if(e.isDirectory()&&s.test(e.name)){let t=r.join(this.specsDir,e.name);return await this.loadSpecFromDirectory(t,e.name)}return null}async loadSpecFromDirectory(e,s){let n=r.join(e,"README.md");try{let e=await t.readFile(n,"utf-8"),{data:r,content:i}=(0,a.default)(e);if(!r||!r.status)return null;let o=s.match(/^(\d+)/),c=o?parseInt(o[1],10):null,l=`fs-${s}`,p=r.created_at??r.created,u=r.updated_at??r.updated,d=r.completed_at??r.completed,h=e=>{if(!e)return null;let t=new Date(e);return isNaN(t.getTime())?null:t};return{id:l,projectId:"leanspec",specNumber:c,specName:s,title:this.extractTitle(i),status:r.status||"planned",priority:r.priority||null,tags:r.tags?JSON.stringify(r.tags):null,assignee:r.assignee||null,contentMd:i,contentHtml:null,createdAt:h(p),updatedAt:h(u),completedAt:h(d),filePath:`specs/${s}/README.md`,githubUrl:`https://github.com/codervisor/lean-spec/tree/main/specs/${s}/README.md`,syncedAt:new Date}}catch{return null}}extractTitle(e){for(let t of e.split("\n")){let e=t.match(/^#\s+(.+)$/);if(e)return e[1].trim()}return null}}let i=null,o=new class{filesystemSource;databaseSource;mode;constructor(){if(this.mode=process.env.SPECS_MODE||"filesystem","filesystem"===this.mode||"both"===this.mode){const e=process.env.SPECS_DIR;this.filesystemSource=new n(e)}}async getDatabaseSource(){if(!this.databaseSource){if(!i){let{DatabaseSource:t}=await e.A(14430);i=t}this.databaseSource=new i}return this.databaseSource}async getAllSpecs(e){let t=await this.getSource(e);return await t.getAllSpecs(e)}async getSpec(e,t){let r=await this.getSource(t);return await r.getSpec(e,t)}async getSpecsByStatus(e,t){let r=await this.getSource(t);return await r.getSpecsByStatus(e,t)}async searchSpecs(e,t){let r=await this.getSource(t);return await r.searchSpecs(e,t)}async invalidateCache(e,t){(await this.getSource(t)).invalidateCache(e)}async getSource(e){if(e&&("database"===this.mode||"both"===this.mode))return await this.getDatabaseSource();if(this.filesystemSource)return this.filesystemSource;throw Error("No spec source configured")}};e.s(["specsService",0,o],44271)},81961,e=>{"use strict";var t=e.i(6169),r=e.i(25864),a=e.i(71648),s=e.i(30064),n=e.i(74222),i=e.i(2043),o=e.i(71408),c=e.i(26527),l=e.i(30592),p=e.i(34639),u=e.i(88935),d=e.i(68515),h=e.i(87166),m=e.i(76718),f=e.i(76529),g=e.i(51151),y=e.i(93695);e.i(59704);var x=e.i(8259),w=e.i(31511),S=e.i(68239);async function v(){try{let e=await (0,S.getStats)();return w.NextResponse.json(e)}catch(e){return console.error("Error fetching stats:",e),w.NextResponse.json({error:"Failed to fetch stats"},{status:500})}}e.s(["GET",()=>v],90210);var R=e.i(90210);let E=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/stats/route",pathname:"/api/stats",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/packages/ui/src/app/api/stats/route.ts",nextConfigOutput:"standalone",userland:R}),{workAsyncStorage:b,workUnitAsyncStorage:A,serverHooks:C}=E;function N(){return(0,a.patchFetch)({workAsyncStorage:b,workUnitAsyncStorage:A})}async function _(e,t,a){E.isDev&&(0,s.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let w="/api/stats/route";w=w.replace(/\/index$/,"")||"/";let S=await E.prepare(e,t,{srcPage:w,multiZoneDraftMode:!1});if(!S)return t.statusCode=400,t.end("Bad Request"),null==a.waitUntil||a.waitUntil.call(a,Promise.resolve()),null;let{buildId:v,params:R,nextConfig:b,parsedUrl:A,isDraftMode:C,prerenderManifest:N,routerServerContext:_,isOnDemandRevalidate:D,revalidateOnlyGenerated:T,resolvedPathname:k,clientReferenceManifest:P,serverActionsManifest:j}=S,q=(0,c.normalizeAppPath)(w),M=!!(N.dynamicRoutes[q]||N.routes[k]),O=async()=>((null==_?void 0:_.render404)?await _.render404(e,t,A,!1):t.end("This page could not be found"),null);if(M&&!C){let e=!!N.routes[k],t=N.dynamicRoutes[q];if(t&&!1===t.fallback&&!e){if(b.experimental.adapterPath)return await O();throw new y.NoFallbackError}}let F=null;!M||E.isDev||C||(F="/index"===(F=k)?"/":F);let I=!0===E.isDev||!M,$=M&&!I;j&&P&&(0,i.setReferenceManifestsSingleton)({page:w,clientReferenceManifest:P,serverActionsManifest:j,serverModuleMap:(0,o.createServerModuleMap)({serverActionsManifest:j})});let U=e.method||"GET",H=(0,n.getTracer)(),B=H.getActiveScopeSpan(),L={params:R,prerenderManifest:N,renderOpts:{experimental:{authInterrupts:!!b.experimental.authInterrupts},cacheComponents:!!b.cacheComponents,supportsDynamicResponse:I,incrementalCache:(0,s.getRequestMeta)(e,"incrementalCache"),cacheLifeProfiles:b.cacheLife,waitUntil:a.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,a)=>E.onRequestError(e,t,a,_)},sharedContext:{buildId:v}},K=new l.NodeNextRequest(e),G=new l.NodeNextResponse(t),W=p.NextRequestAdapter.fromNodeNextRequest(K,(0,p.signalFromNodeResponse)(t));try{let i=async e=>E.handle(W,L).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let r=H.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==u.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${r.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let a=r.get("next.route");if(a){let t=`${U} ${a}`;e.setAttributes({"next.route":a,"http.route":a,"next.span_name":t}),e.updateName(t)}else e.updateName(`${U} ${w}`)}),o=!!(0,s.getRequestMeta)(e,"minimalMode"),c=async s=>{var n,c;let l=async({previousCacheEntry:r})=>{try{if(!o&&D&&T&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let n=await i(s);e.fetchMetrics=L.renderOpts.fetchMetrics;let c=L.renderOpts.pendingWaitUntil;c&&a.waitUntil&&(a.waitUntil(c),c=void 0);let l=L.renderOpts.collectedTags;if(!M)return await (0,h.sendResponse)(K,G,n,L.renderOpts.pendingWaitUntil),null;{let e=await n.blob(),t=(0,m.toNodeOutgoingHttpHeaders)(n.headers);l&&(t[g.NEXT_CACHE_TAGS_HEADER]=l),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==L.renderOpts.collectedRevalidate&&!(L.renderOpts.collectedRevalidate>=g.INFINITE_CACHE)&&L.renderOpts.collectedRevalidate,a=void 0===L.renderOpts.collectedExpire||L.renderOpts.collectedExpire>=g.INFINITE_CACHE?void 0:L.renderOpts.collectedExpire;return{value:{kind:x.CachedRouteKind.APP_ROUTE,status:n.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:a}}}}catch(t){throw(null==r?void 0:r.isStale)&&await E.onRequestError(e,t,{routerKind:"App Router",routePath:w,routeType:"route",revalidateReason:(0,d.getRevalidateReason)({isStaticGeneration:$,isOnDemandRevalidate:D})},_),t}},p=await E.handleResponse({req:e,nextConfig:b,cacheKey:F,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:N,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:T,responseGenerator:l,waitUntil:a.waitUntil,isMinimalMode:o});if(!M)return null;if((null==p||null==(n=p.value)?void 0:n.kind)!==x.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==p||null==(c=p.value)?void 0:c.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});o||t.setHeader("x-nextjs-cache",D?"REVALIDATED":p.isMiss?"MISS":p.isStale?"STALE":"HIT"),C&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let u=(0,m.fromNodeOutgoingHttpHeaders)(p.value.headers);return o&&M||u.delete(g.NEXT_CACHE_TAGS_HEADER),!p.cacheControl||t.getHeader("Cache-Control")||u.get("Cache-Control")||u.set("Cache-Control",(0,f.getCacheControlHeader)(p.cacheControl)),await (0,h.sendResponse)(K,G,new Response(p.value.body,{headers:u,status:p.value.status||200})),null};B?await c(B):await H.withPropagatedContext(e.headers,()=>H.trace(u.BaseServerSpan.handleRequest,{spanName:`${U} ${w}`,kind:n.SpanKind.SERVER,attributes:{"http.method":U,"http.target":e.url}},c))}catch(t){if(t instanceof y.NoFallbackError||await E.onRequestError(e,t,{routerKind:"App Router",routePath:q,routeType:"route",revalidateReason:(0,d.getRevalidateReason)({isStaticGeneration:$,isOnDemandRevalidate:D})}),M)throw t;return await (0,h.sendResponse)(K,G,new Response(null,{status:500})),null}}e.s(["handler",()=>_,"patchFetch",()=>N,"routeModule",()=>E,"serverHooks",()=>C,"workAsyncStorage",()=>b,"workUnitAsyncStorage",()=>A],81961)},14430,e=>{e.v(t=>Promise.all(["server/chunks/[root-of-the-server]__ae726e9c._.js","server/chunks/packages_ui_src_lib_db_index_ts_556307fa._.js"].map(t=>e.l(t))).then(()=>t(18146)))}];
1
+ module.exports=[12714,(e,t,r)=>{t.exports=e.x("node:fs/promises",()=>require("node:fs/promises"))},22734,(e,t,r)=>{t.exports=e.x("fs",()=>require("fs"))},874,(e,t,r)=>{t.exports=e.x("buffer",()=>require("buffer"))},50227,(e,t,r)=>{t.exports=e.x("node:path",()=>require("node:path"))},2157,(e,t,r)=>{t.exports=e.x("node:fs",()=>require("node:fs"))},68239,e=>{"use strict";var t=e.i(44271),r=e.i(67708),a=e.i(14747),s=e.i(2157),n=e.i(92194);let i=(0,a.resolve)(process.cwd(),"../../specs");function o(e){return e?Array.isArray(e)?e.map(e=>String(e)):"string"==typeof e?[e]:[]:[]}async function c(e,c){let l=await t.specsService.getSpec(e,c);if(!l)return null;let p={...l,tags:l.tags?"string"==typeof l.tags?JSON.parse(l.tags):l.tags:null};if(!c){let e,t,c=(e=l.filePath.replace(/^specs\//,"").replace(/\/README\.md$/,""),(0,a.join)((t=process.env.SPECS_DIR)?t.startsWith("/")?t:(0,a.resolve)(process.cwd(),t):i,e)),u=(0,r.detectSubSpecs)(c),d=function(e){try{let t=(0,a.join)(e,"README.md"),r=(0,s.readFileSync)(t,"utf-8"),{data:i}=(0,n.default)(r),c=o(i?.depends_on??i?.dependsOn),l=o(i?.related);return{dependsOn:c,related:l}}catch(e){return console.warn("Unable to parse spec relationships",e),{dependsOn:[],related:[]}}}(c);return{...p,subSpecs:u,relationships:d}}return p}async function l(e){let r=await t.specsService.getAllSpecs(e),a=new Map,s=new Map;for(let e of r)e.status&&a.set(e.status,(a.get(e.status)||0)+1),e.priority&&s.set(e.priority,(s.get(e.priority)||0)+1);let n=a.get("complete")||0,i=r.length>0?n/r.length*100:0;return{totalProjects:1,totalSpecs:r.length,specsByStatus:Array.from(a.entries()).map(([e,t])=>({status:e,count:t})),specsByPriority:Array.from(s.entries()).map(([e,t])=>({priority:e,count:t})),completionRate:Math.round(10*i)/10}}e.s(["getSpecById",()=>c,"getStats",()=>l])},93695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},14747,(e,t,r)=>{t.exports=e.x("path",()=>require("path"))},18622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},32319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},24725,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/after-task-async-storage.external.js",()=>require("next/dist/server/app-render/after-task-async-storage.external.js"))},67708,e=>{"use strict";var t=e.i(22734),r=e.i(14747),a=e.i(92194);let s=[{pattern:/design|ui|ux|mockup|wireframe|prototype/i,iconName:"Palette",color:"text-purple-600"},{pattern:/architecture|structure|system|diagram/i,iconName:"Map",color:"text-indigo-600"},{pattern:/implementation|code|develop|build/i,iconName:"Code",color:"text-green-600"},{pattern:/api|endpoint|integration|interface/i,iconName:"Code",color:"text-blue-600"},{pattern:/test|qa|quality|validation/i,iconName:"TestTube",color:"text-orange-600"},{pattern:/task|todo|checklist|milestone/i,iconName:"CheckSquare",color:"text-gray-600"},{pattern:/config|setup|settings|environment/i,iconName:"Wrench",color:"text-yellow-600"},{pattern:/deploy|devops|ci|cd|pipeline|release/i,iconName:"Wrench",color:"text-orange-600"},{pattern:/migration|upgrade|refactor|transition/i,iconName:"GitBranch",color:"text-cyan-600"},{pattern:/security|auth|permission|access|encryption/i,iconName:"CheckSquare",color:"text-red-600"},{pattern:/performance|optimization|speed|cache|benchmark/i,iconName:"TrendingUp",color:"text-green-600"},{pattern:/database|data|schema|model|query/i,iconName:"FileText",color:"text-blue-600"},{pattern:/doc|guide|manual|reference/i,iconName:"FileText",color:"text-gray-500"},{pattern:/github|git|vcs|version/i,iconName:"GitBranch",color:"text-pink-600"}],n={iconName:"FileText",color:"text-gray-600"};function i(e){let i=[];if(!(0,t.existsSync)(e))return i;try{for(let o of(0,t.readdirSync)(e)){if("README.md"===o||!o.endsWith(".md"))continue;let c=(0,r.join)(e,o);if((0,t.statSync)(c).isFile())try{let e=(0,t.readFileSync)(c,"utf-8"),{content:r}=(0,a.default)(e),l=function(e){let t=e.replace(/\.md$/i,"");for(let{pattern:e,iconName:r,color:a}of s)if(e.test(t))return{iconName:r,color:a};return n}(o);i.push({name:o.replace(/\.md$/i,"").split(/[-_]/).map(e=>e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()).join(" "),file:o,iconName:l.iconName,color:l.color,content:r})}catch(e){console.error(`Error reading sub-spec ${o}:`,e)}}i.sort((e,t)=>e.file.localeCompare(t.file))}catch(t){console.error(`Error reading spec directory ${e}:`,t)}return i}e.s(["detectSubSpecs",()=>i])},44271,e=>{"use strict";var t=e.i(12714),r=e.i(50227),a=e.i(92194);let s=parseInt(process.env.CACHE_TTL||"60000",10);class n{cache=new Map;specsDir;constructor(e){this.specsDir=e||r.join(process.cwd(),"../../specs")}async getAllSpecs(){let e="__all_specs__",t=this.cache.get(e);if(t&&Date.now()<t.expiresAt)return t.data;let r=await this.loadSpecsFromFilesystem();return this.cache.set(e,{data:r,expiresAt:Date.now()+s}),r}async getSpec(e){let t=`spec:${e}`,r=this.cache.get(t);if(r&&Date.now()<r.expiresAt)return r.data;let a=parseInt(e.split("-")[0],10);if(isNaN(a))return null;let n=await this.loadSpecByNumber(a);return n&&this.cache.set(t,{data:n,expiresAt:Date.now()+s}),n}async getSpecsByStatus(e){return(await this.getAllSpecs()).filter(t=>t.status===e)}async searchSpecs(e){let t=await this.getAllSpecs(),r=e.toLowerCase();return t.filter(e=>e.specName.toLowerCase().includes(r)||e.title?.toLowerCase().includes(r)||e.contentMd.toLowerCase().includes(r))}invalidateCache(e){e?(this.cache.delete(`spec:${e}`),this.cache.delete("__all_specs__")):this.cache.clear()}async loadSpecsFromFilesystem(){let e=[];try{await t.access(this.specsDir)}catch{return[]}let a=/^(\d{2,})-/;for(let s of(await t.readdir(this.specsDir,{withFileTypes:!0})))if(s.isDirectory()&&"archived"!==s.name&&a.test(s.name)){let t=r.join(this.specsDir,s.name),a=await this.loadSpecFromDirectory(t,s.name);a&&e.push(a)}return e.sort((e,t)=>(e.specNumber||0)-(t.specNumber||0))}async loadSpecByNumber(e){try{await t.access(this.specsDir)}catch{return null}let a=await t.readdir(this.specsDir,{withFileTypes:!0}),s=RegExp(`^0*${e}-`);for(let e of a)if(e.isDirectory()&&s.test(e.name)){let t=r.join(this.specsDir,e.name);return await this.loadSpecFromDirectory(t,e.name)}return null}async loadSpecFromDirectory(e,s){let n=r.join(e,"README.md");try{let e=await t.readFile(n,"utf-8"),{data:r,content:i}=(0,a.default)(e);if(!r||!r.status)return null;let o=s.match(/^(\d+)/),c=o?parseInt(o[1],10):null,l=`fs-${s}`,p=r.created_at??r.created,u=r.updated_at??r.updated,d=r.completed_at??r.completed,h=e=>{if(!e)return null;let t=new Date(e);return isNaN(t.getTime())?null:t};return{id:l,projectId:"leanspec",specNumber:c,specName:s,title:this.extractTitle(i),status:r.status||"planned",priority:r.priority||null,tags:r.tags?JSON.stringify(r.tags):null,assignee:r.assignee||null,contentMd:i,contentHtml:null,createdAt:h(p),updatedAt:h(u),completedAt:h(d),filePath:`specs/${s}/README.md`,githubUrl:`https://github.com/codervisor/lean-spec/tree/main/specs/${s}/README.md`,syncedAt:new Date}}catch{return null}}extractTitle(e){for(let t of e.split("\n")){let e=t.match(/^#\s+(.+)$/);if(e)return e[1].trim()}return null}}let i=null,o=new class{filesystemSource;databaseSource;mode;constructor(){if(this.mode=process.env.SPECS_MODE||"filesystem","filesystem"===this.mode||"both"===this.mode){const e=process.env.SPECS_DIR;this.filesystemSource=new n(e)}}async getDatabaseSource(){if(!this.databaseSource){if(!i){let{DatabaseSource:t}=await e.A(14430);i=t}this.databaseSource=new i}return this.databaseSource}async getAllSpecs(e){let t=await this.getSource(e);return await t.getAllSpecs(e)}async getSpec(e,t){let r=await this.getSource(t);return await r.getSpec(e,t)}async getSpecsByStatus(e,t){let r=await this.getSource(t);return await r.getSpecsByStatus(e,t)}async searchSpecs(e,t){let r=await this.getSource(t);return await r.searchSpecs(e,t)}async invalidateCache(e,t){(await this.getSource(t)).invalidateCache(e)}async getSource(e){if(e&&("database"===this.mode||"both"===this.mode))return await this.getDatabaseSource();if(this.filesystemSource)return this.filesystemSource;throw Error("No spec source configured")}};e.s(["specsService",0,o],44271)},81961,e=>{"use strict";var t=e.i(6169),r=e.i(25864),a=e.i(71648),s=e.i(30064),n=e.i(74222),i=e.i(2043),o=e.i(71408),c=e.i(26527),l=e.i(30592),p=e.i(34639),u=e.i(88935),d=e.i(68515),h=e.i(87166),m=e.i(76718),f=e.i(76529),g=e.i(51151),y=e.i(93695);e.i(59704);var x=e.i(8259),w=e.i(31511),S=e.i(68239);async function v(){try{let e=await (0,S.getStats)();return w.NextResponse.json(e)}catch(e){return console.error("Error fetching stats:",e),w.NextResponse.json({error:"Failed to fetch stats"},{status:500})}}e.s(["GET",()=>v],90210);var R=e.i(90210);let E=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/stats/route",pathname:"/api/stats",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/packages/ui/src/app/api/stats/route.ts",nextConfigOutput:"standalone",userland:R}),{workAsyncStorage:b,workUnitAsyncStorage:A,serverHooks:C}=E;function N(){return(0,a.patchFetch)({workAsyncStorage:b,workUnitAsyncStorage:A})}async function _(e,t,a){E.isDev&&(0,s.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let w="/api/stats/route";w=w.replace(/\/index$/,"")||"/";let S=await E.prepare(e,t,{srcPage:w,multiZoneDraftMode:!1});if(!S)return t.statusCode=400,t.end("Bad Request"),null==a.waitUntil||a.waitUntil.call(a,Promise.resolve()),null;let{buildId:v,params:R,nextConfig:b,parsedUrl:A,isDraftMode:C,prerenderManifest:N,routerServerContext:_,isOnDemandRevalidate:D,revalidateOnlyGenerated:T,resolvedPathname:k,clientReferenceManifest:P,serverActionsManifest:j}=S,q=(0,c.normalizeAppPath)(w),M=!!(N.dynamicRoutes[q]||N.routes[k]),O=async()=>((null==_?void 0:_.render404)?await _.render404(e,t,A,!1):t.end("This page could not be found"),null);if(M&&!C){let e=!!N.routes[k],t=N.dynamicRoutes[q];if(t&&!1===t.fallback&&!e){if(b.experimental.adapterPath)return await O();throw new y.NoFallbackError}}let F=null;!M||E.isDev||C||(F="/index"===(F=k)?"/":F);let I=!0===E.isDev||!M,$=M&&!I;j&&P&&(0,i.setReferenceManifestsSingleton)({page:w,clientReferenceManifest:P,serverActionsManifest:j,serverModuleMap:(0,o.createServerModuleMap)({serverActionsManifest:j})});let U=e.method||"GET",H=(0,n.getTracer)(),B=H.getActiveScopeSpan(),L={params:R,prerenderManifest:N,renderOpts:{experimental:{authInterrupts:!!b.experimental.authInterrupts},cacheComponents:!!b.cacheComponents,supportsDynamicResponse:I,incrementalCache:(0,s.getRequestMeta)(e,"incrementalCache"),cacheLifeProfiles:b.cacheLife,waitUntil:a.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,a)=>E.onRequestError(e,t,a,_)},sharedContext:{buildId:v}},K=new l.NodeNextRequest(e),G=new l.NodeNextResponse(t),W=p.NextRequestAdapter.fromNodeNextRequest(K,(0,p.signalFromNodeResponse)(t));try{let i=async e=>E.handle(W,L).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let r=H.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==u.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${r.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let a=r.get("next.route");if(a){let t=`${U} ${a}`;e.setAttributes({"next.route":a,"http.route":a,"next.span_name":t}),e.updateName(t)}else e.updateName(`${U} ${w}`)}),o=!!(0,s.getRequestMeta)(e,"minimalMode"),c=async s=>{var n,c;let l=async({previousCacheEntry:r})=>{try{if(!o&&D&&T&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let n=await i(s);e.fetchMetrics=L.renderOpts.fetchMetrics;let c=L.renderOpts.pendingWaitUntil;c&&a.waitUntil&&(a.waitUntil(c),c=void 0);let l=L.renderOpts.collectedTags;if(!M)return await (0,h.sendResponse)(K,G,n,L.renderOpts.pendingWaitUntil),null;{let e=await n.blob(),t=(0,m.toNodeOutgoingHttpHeaders)(n.headers);l&&(t[g.NEXT_CACHE_TAGS_HEADER]=l),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==L.renderOpts.collectedRevalidate&&!(L.renderOpts.collectedRevalidate>=g.INFINITE_CACHE)&&L.renderOpts.collectedRevalidate,a=void 0===L.renderOpts.collectedExpire||L.renderOpts.collectedExpire>=g.INFINITE_CACHE?void 0:L.renderOpts.collectedExpire;return{value:{kind:x.CachedRouteKind.APP_ROUTE,status:n.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:a}}}}catch(t){throw(null==r?void 0:r.isStale)&&await E.onRequestError(e,t,{routerKind:"App Router",routePath:w,routeType:"route",revalidateReason:(0,d.getRevalidateReason)({isStaticGeneration:$,isOnDemandRevalidate:D})},_),t}},p=await E.handleResponse({req:e,nextConfig:b,cacheKey:F,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:N,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:T,responseGenerator:l,waitUntil:a.waitUntil,isMinimalMode:o});if(!M)return null;if((null==p||null==(n=p.value)?void 0:n.kind)!==x.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==p||null==(c=p.value)?void 0:c.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});o||t.setHeader("x-nextjs-cache",D?"REVALIDATED":p.isMiss?"MISS":p.isStale?"STALE":"HIT"),C&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let u=(0,m.fromNodeOutgoingHttpHeaders)(p.value.headers);return o&&M||u.delete(g.NEXT_CACHE_TAGS_HEADER),!p.cacheControl||t.getHeader("Cache-Control")||u.get("Cache-Control")||u.set("Cache-Control",(0,f.getCacheControlHeader)(p.cacheControl)),await (0,h.sendResponse)(K,G,new Response(p.value.body,{headers:u,status:p.value.status||200})),null};B?await c(B):await H.withPropagatedContext(e.headers,()=>H.trace(u.BaseServerSpan.handleRequest,{spanName:`${U} ${w}`,kind:n.SpanKind.SERVER,attributes:{"http.method":U,"http.target":e.url}},c))}catch(t){if(t instanceof y.NoFallbackError||await E.onRequestError(e,t,{routerKind:"App Router",routePath:q,routeType:"route",revalidateReason:(0,d.getRevalidateReason)({isStaticGeneration:$,isOnDemandRevalidate:D})}),M)throw t;return await (0,h.sendResponse)(K,G,new Response(null,{status:500})),null}}e.s(["handler",()=>_,"patchFetch",()=>N,"routeModule",()=>E,"serverHooks",()=>C,"workAsyncStorage",()=>b,"workUnitAsyncStorage",()=>A],81961)},14430,e=>{e.v(t=>Promise.all(["server/chunks/[root-of-the-server]__ae726e9c._.js","server/chunks/packages_ui_src_lib_db_index_ts_556307fa._.js"].map(t=>e.l(t))).then(()=>t(18146)))}];
2
2
 
3
- //# sourceMappingURL=%5Broot-of-the-server%5D__003ee184._.js.map
3
+ //# sourceMappingURL=%5Broot-of-the-server%5D__15e8a946._.js.map
@@ -1,3 +1,3 @@
1
- module.exports=[12714,(e,t,r)=>{t.exports=e.x("node:fs/promises",()=>require("node:fs/promises"))},22734,(e,t,r)=>{t.exports=e.x("fs",()=>require("fs"))},874,(e,t,r)=>{t.exports=e.x("buffer",()=>require("buffer"))},50227,(e,t,r)=>{t.exports=e.x("node:path",()=>require("node:path"))},2157,(e,t,r)=>{t.exports=e.x("node:fs",()=>require("node:fs"))},68239,e=>{"use strict";var t=e.i(44271),r=e.i(67708),a=e.i(14747),s=e.i(2157),n=e.i(92194);let i=(0,a.resolve)(process.cwd(),"../../specs");function o(e){return e?Array.isArray(e)?e.map(e=>String(e)):"string"==typeof e?[e]:[]:[]}async function c(e,c){let l=await t.specsService.getSpec(e,c);if(!l)return null;let p={...l,tags:l.tags?"string"==typeof l.tags?JSON.parse(l.tags):l.tags:null};if(!c){let e,t,c=(e=l.filePath.replace(/^specs\//,"").replace(/\/README\.md$/,""),(0,a.join)((t=process.env.SPECS_DIR)?t.startsWith("/")?t:(0,a.resolve)(process.cwd(),t):i,e)),d=(0,r.detectSubSpecs)(c),u=function(e){try{let t=(0,a.join)(e,"README.md"),r=(0,s.readFileSync)(t,"utf-8"),{data:i}=(0,n.default)(r),c=o(i?.depends_on??i?.dependsOn),l=o(i?.related);return{dependsOn:c,related:l}}catch(e){return console.warn("Unable to parse spec relationships",e),{dependsOn:[],related:[]}}}(c);return{...p,subSpecs:d,relationships:u}}return p}async function l(e){let r=await t.specsService.getAllSpecs(e),a=new Map,s=new Map;for(let e of r)e.status&&a.set(e.status,(a.get(e.status)||0)+1),e.priority&&s.set(e.priority,(s.get(e.priority)||0)+1);let n=a.get("complete")||0,i=r.length>0?n/r.length*100:0;return{totalProjects:1,totalSpecs:r.length,specsByStatus:Array.from(a.entries()).map(([e,t])=>({status:e,count:t})),specsByPriority:Array.from(s.entries()).map(([e,t])=>({priority:e,count:t})),completionRate:Math.round(10*i)/10}}e.s(["getSpecById",()=>c,"getStats",()=>l])},93695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},18622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},32319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},24725,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/after-task-async-storage.external.js",()=>require("next/dist/server/app-render/after-task-async-storage.external.js"))},14747,(e,t,r)=>{t.exports=e.x("path",()=>require("path"))},67708,e=>{"use strict";var t=e.i(22734),r=e.i(14747),a=e.i(92194);let s=[{pattern:/design|ui|ux|mockup|wireframe|prototype/i,iconName:"Palette",color:"text-purple-600"},{pattern:/architecture|structure|system|diagram/i,iconName:"Map",color:"text-indigo-600"},{pattern:/implementation|code|develop|build/i,iconName:"Code",color:"text-green-600"},{pattern:/api|endpoint|integration|interface/i,iconName:"Code",color:"text-blue-600"},{pattern:/test|qa|quality|validation/i,iconName:"TestTube",color:"text-orange-600"},{pattern:/task|todo|checklist|milestone/i,iconName:"CheckSquare",color:"text-gray-600"},{pattern:/config|setup|settings|environment/i,iconName:"Wrench",color:"text-yellow-600"},{pattern:/deploy|devops|ci|cd|pipeline|release/i,iconName:"Wrench",color:"text-orange-600"},{pattern:/migration|upgrade|refactor|transition/i,iconName:"GitBranch",color:"text-cyan-600"},{pattern:/security|auth|permission|access|encryption/i,iconName:"CheckSquare",color:"text-red-600"},{pattern:/performance|optimization|speed|cache|benchmark/i,iconName:"TrendingUp",color:"text-green-600"},{pattern:/database|data|schema|model|query/i,iconName:"FileText",color:"text-blue-600"},{pattern:/doc|guide|manual|reference/i,iconName:"FileText",color:"text-gray-500"},{pattern:/github|git|vcs|version/i,iconName:"GitBranch",color:"text-pink-600"}],n={iconName:"FileText",color:"text-gray-600"};function i(e){let i=[];if(!(0,t.existsSync)(e))return i;try{for(let o of(0,t.readdirSync)(e)){if("README.md"===o||!o.endsWith(".md"))continue;let c=(0,r.join)(e,o);if((0,t.statSync)(c).isFile())try{let e=(0,t.readFileSync)(c,"utf-8"),{content:r}=(0,a.default)(e),l=function(e){let t=e.replace(/\.md$/i,"");for(let{pattern:e,iconName:r,color:a}of s)if(e.test(t))return{iconName:r,color:a};return n}(o);i.push({name:o.replace(/\.md$/i,"").split(/[-_]/).map(e=>e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()).join(" "),file:o,iconName:l.iconName,color:l.color,content:r})}catch(e){console.error(`Error reading sub-spec ${o}:`,e)}}i.sort((e,t)=>e.file.localeCompare(t.file))}catch(t){console.error(`Error reading spec directory ${e}:`,t)}return i}e.s(["detectSubSpecs",()=>i])},44271,e=>{"use strict";var t=e.i(12714),r=e.i(50227),a=e.i(92194);let s=parseInt(process.env.CACHE_TTL||"60000",10);class n{cache=new Map;specsDir;constructor(e){this.specsDir=e||r.join(process.cwd(),"../../specs")}async getAllSpecs(){let e="__all_specs__",t=this.cache.get(e);if(t&&Date.now()<t.expiresAt)return t.data;let r=await this.loadSpecsFromFilesystem();return this.cache.set(e,{data:r,expiresAt:Date.now()+s}),r}async getSpec(e){let t=`spec:${e}`,r=this.cache.get(t);if(r&&Date.now()<r.expiresAt)return r.data;let a=parseInt(e.split("-")[0],10);if(isNaN(a))return null;let n=await this.loadSpecByNumber(a);return n&&this.cache.set(t,{data:n,expiresAt:Date.now()+s}),n}async getSpecsByStatus(e){return(await this.getAllSpecs()).filter(t=>t.status===e)}async searchSpecs(e){let t=await this.getAllSpecs(),r=e.toLowerCase();return t.filter(e=>e.specName.toLowerCase().includes(r)||e.title?.toLowerCase().includes(r)||e.contentMd.toLowerCase().includes(r))}invalidateCache(e){e?(this.cache.delete(`spec:${e}`),this.cache.delete("__all_specs__")):this.cache.clear()}async loadSpecsFromFilesystem(){let e=[];try{await t.access(this.specsDir)}catch{return[]}let a=/^(\d{2,})-/;for(let s of(await t.readdir(this.specsDir,{withFileTypes:!0})))if(s.isDirectory()&&"archived"!==s.name&&a.test(s.name)){let t=r.join(this.specsDir,s.name),a=await this.loadSpecFromDirectory(t,s.name);a&&e.push(a)}return e.sort((e,t)=>(e.specNumber||0)-(t.specNumber||0))}async loadSpecByNumber(e){try{await t.access(this.specsDir)}catch{return null}let a=await t.readdir(this.specsDir,{withFileTypes:!0}),s=RegExp(`^0*${e}-`);for(let e of a)if(e.isDirectory()&&s.test(e.name)){let t=r.join(this.specsDir,e.name);return await this.loadSpecFromDirectory(t,e.name)}return null}async loadSpecFromDirectory(e,s){let n=r.join(e,"README.md");try{let e=await t.readFile(n,"utf-8"),{data:r,content:i}=(0,a.default)(e);if(!r||!r.status)return null;let o=s.match(/^(\d+)/),c=o?parseInt(o[1],10):null,l=`fs-${s}`,p=r.created_at??r.created,d=r.updated_at??r.updated,u=r.completed_at??r.completed,h=e=>{if(!e)return null;let t=new Date(e);return isNaN(t.getTime())?null:t};return{id:l,projectId:"leanspec",specNumber:c,specName:s,title:this.extractTitle(i),status:r.status||"planned",priority:r.priority||null,tags:r.tags?JSON.stringify(r.tags):null,assignee:r.assignee||null,contentMd:i,contentHtml:null,createdAt:h(p),updatedAt:h(d),completedAt:h(u),filePath:`specs/${s}/README.md`,githubUrl:`https://github.com/codervisor/lean-spec/tree/main/specs/${s}/README.md`,syncedAt:new Date}}catch{return null}}extractTitle(e){for(let t of e.split("\n")){let e=t.match(/^#\s+(.+)$/);if(e)return e[1].trim()}return null}}let i=null,o=new class{filesystemSource;databaseSource;mode;constructor(){if(this.mode=process.env.SPECS_MODE||"filesystem","filesystem"===this.mode||"both"===this.mode){const e=process.env.SPECS_DIR;this.filesystemSource=new n(e)}}async getDatabaseSource(){if(!this.databaseSource){if(!i){let{DatabaseSource:t}=await e.A(14430);i=t}this.databaseSource=new i}return this.databaseSource}async getAllSpecs(e){let t=await this.getSource(e);return await t.getAllSpecs(e)}async getSpec(e,t){let r=await this.getSource(t);return await r.getSpec(e,t)}async getSpecsByStatus(e,t){let r=await this.getSource(t);return await r.getSpecsByStatus(e,t)}async searchSpecs(e,t){let r=await this.getSource(t);return await r.searchSpecs(e,t)}async invalidateCache(e,t){(await this.getSource(t)).invalidateCache(e)}async getSource(e){if(e&&("database"===this.mode||"both"===this.mode))return await this.getDatabaseSource();if(this.filesystemSource)return this.filesystemSource;throw Error("No spec source configured")}};e.s(["specsService",0,o],44271)},33368,e=>{"use strict";var t=e.i(6169),r=e.i(25864),a=e.i(71648),s=e.i(30064),n=e.i(74222),i=e.i(2043),o=e.i(71408),c=e.i(26527),l=e.i(30592),p=e.i(34639),d=e.i(88935),u=e.i(68515),h=e.i(87166),m=e.i(76718),f=e.i(76529),g=e.i(51151),y=e.i(93695);e.i(59704);var x=e.i(8259),w=e.i(31511),S=e.i(68239);class v{graph;specs;constructor(e){this.graph=new Map,this.specs=new Map,this.buildGraph(e)}buildGraph(e){for(let t of e)this.specs.set(t.path,t),this.graph.set(t.path,{dependsOn:new Set(t.frontmatter.depends_on||[]),requiredBy:new Set,related:new Set(t.frontmatter.related||[])});for(let[e,t]of this.graph.entries()){for(let r of t.dependsOn){let t=this.graph.get(r);t&&t.requiredBy.add(e)}for(let r of t.related){let t=this.graph.get(r);t&&t.related.add(e)}}}getCompleteGraph(e){let t=this.specs.get(e);if(!t)throw Error(`Spec not found: ${e}`);let r=this.graph.get(e);if(!r)throw Error(`Graph node not found: ${e}`);return{current:t,dependsOn:this.getSpecsByPaths(Array.from(r.dependsOn)),requiredBy:this.getSpecsByPaths(Array.from(r.requiredBy)),related:this.getSpecsByPaths(Array.from(r.related))}}getSpecsByPaths(e){return e.map(e=>this.specs.get(e)).filter(e=>void 0!==e)}}var R=e.i(2157),E=e.i(50227),N=e.i(92194);async function b(e,{params:t}){try{let{id:e}=await t,r=await (0,S.getSpecById)(e);if(!r)return w.NextResponse.json({error:"Spec not found"},{status:404});let a=(0,E.join)(process.cwd(),"../../specs"),s=function(e){let t=[];try{for(let r of(0,R.readdirSync)(e)){let a=(0,E.join)(e,r);if((0,R.statSync)(a).isDirectory()&&"archived"!==r&&/^\d{2,}-/.test(r))try{let e=(0,E.join)(a,"README.md"),s=(0,R.readFileSync)(e,"utf-8"),{data:n}=(0,N.default)(s);if(!n||!n.status)continue;let i={status:n.status||"planned",created:n.created_at||n.created||new Date().toISOString().split("T")[0]};n.depends_on?i.depends_on=Array.isArray(n.depends_on)?n.depends_on:[n.depends_on]:i.depends_on=[],n.related?i.related=Array.isArray(n.related)?n.related:[n.related]:i.related=[],n.priority&&(i.priority=n.priority),n.tags&&(i.tags=n.tags),n.assignee&&(i.assignee=n.assignee),t.push({path:r,fullPath:a,filePath:e,name:r,frontmatter:i})}catch(e){console.warn(`Failed to parse spec ${r}:`,e)}}}catch(e){console.error("Failed to load specs:",e)}return t}(a),n=new v(s).getCompleteGraph(r.specName),i=e=>{let t=e.match(/^(\d+)/);return t?parseInt(t[1],10):null},o=e=>{let t=e.split("-");return t.length>1?t.slice(1).join("-").replace(/-/g," "):e},c={current:{id:r.id,specNumber:r.specNumber,specName:r.specName,title:r.title,status:r.status,priority:r.priority},dependsOn:n.dependsOn.map(e=>({specNumber:i(e.name),specName:e.name,title:o(e.name),status:e.frontmatter.status,priority:e.frontmatter.priority})),requiredBy:n.requiredBy.map(e=>({specNumber:i(e.name),specName:e.name,title:o(e.name),status:e.frontmatter.status,priority:e.frontmatter.priority})),related:n.related.map(e=>({specNumber:i(e.name),specName:e.name,title:o(e.name),status:e.frontmatter.status,priority:e.frontmatter.priority}))};return w.NextResponse.json(c,{headers:{"Cache-Control":"public, s-maxage=60, stale-while-revalidate=120"}})}catch(e){return console.error("Error fetching dependency graph:",e),w.NextResponse.json({error:"Failed to fetch dependency graph"},{status:500})}}e.s(["GET",()=>b],15671);var A=e.i(15671);let C=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/specs/[id]/dependency-graph/route",pathname:"/api/specs/[id]/dependency-graph",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/packages/ui/src/app/api/specs/[id]/dependency-graph/route.ts",nextConfigOutput:"standalone",userland:A}),{workAsyncStorage:_,workUnitAsyncStorage:D,serverHooks:T}=C;function P(){return(0,a.patchFetch)({workAsyncStorage:_,workUnitAsyncStorage:D})}async function j(e,t,a){C.isDev&&(0,s.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let w="/api/specs/[id]/dependency-graph/route";w=w.replace(/\/index$/,"")||"/";let S=await C.prepare(e,t,{srcPage:w,multiZoneDraftMode:!1});if(!S)return t.statusCode=400,t.end("Bad Request"),null==a.waitUntil||a.waitUntil.call(a,Promise.resolve()),null;let{buildId:v,params:R,nextConfig:E,parsedUrl:N,isDraftMode:b,prerenderManifest:A,routerServerContext:_,isOnDemandRevalidate:D,revalidateOnlyGenerated:T,resolvedPathname:P,clientReferenceManifest:j,serverActionsManifest:q}=S,M=(0,c.normalizeAppPath)(w),O=!!(A.dynamicRoutes[M]||A.routes[P]),k=async()=>((null==_?void 0:_.render404)?await _.render404(e,t,N,!1):t.end("This page could not be found"),null);if(O&&!b){let e=!!A.routes[P],t=A.dynamicRoutes[M];if(t&&!1===t.fallback&&!e){if(E.experimental.adapterPath)return await k();throw new y.NoFallbackError}}let F=null;!O||C.isDev||b||(F="/index"===(F=P)?"/":F);let B=!0===C.isDev||!O,I=O&&!B;q&&j&&(0,i.setReferenceManifestsSingleton)({page:w,clientReferenceManifest:j,serverActionsManifest:q,serverModuleMap:(0,o.createServerModuleMap)({serverActionsManifest:q})});let $=e.method||"GET",U=(0,n.getTracer)(),H=U.getActiveScopeSpan(),G={params:R,prerenderManifest:A,renderOpts:{experimental:{authInterrupts:!!E.experimental.authInterrupts},cacheComponents:!!E.cacheComponents,supportsDynamicResponse:B,incrementalCache:(0,s.getRequestMeta)(e,"incrementalCache"),cacheLifeProfiles:E.cacheLife,waitUntil:a.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,a)=>C.onRequestError(e,t,a,_)},sharedContext:{buildId:v}},L=new l.NodeNextRequest(e),K=new l.NodeNextResponse(t),W=p.NextRequestAdapter.fromNodeNextRequest(L,(0,p.signalFromNodeResponse)(t));try{let i=async e=>C.handle(W,G).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let r=U.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==d.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${r.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let a=r.get("next.route");if(a){let t=`${$} ${a}`;e.setAttributes({"next.route":a,"http.route":a,"next.span_name":t}),e.updateName(t)}else e.updateName(`${$} ${w}`)}),o=!!(0,s.getRequestMeta)(e,"minimalMode"),c=async s=>{var n,c;let l=async({previousCacheEntry:r})=>{try{if(!o&&D&&T&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let n=await i(s);e.fetchMetrics=G.renderOpts.fetchMetrics;let c=G.renderOpts.pendingWaitUntil;c&&a.waitUntil&&(a.waitUntil(c),c=void 0);let l=G.renderOpts.collectedTags;if(!O)return await (0,h.sendResponse)(L,K,n,G.renderOpts.pendingWaitUntil),null;{let e=await n.blob(),t=(0,m.toNodeOutgoingHttpHeaders)(n.headers);l&&(t[g.NEXT_CACHE_TAGS_HEADER]=l),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==G.renderOpts.collectedRevalidate&&!(G.renderOpts.collectedRevalidate>=g.INFINITE_CACHE)&&G.renderOpts.collectedRevalidate,a=void 0===G.renderOpts.collectedExpire||G.renderOpts.collectedExpire>=g.INFINITE_CACHE?void 0:G.renderOpts.collectedExpire;return{value:{kind:x.CachedRouteKind.APP_ROUTE,status:n.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:a}}}}catch(t){throw(null==r?void 0:r.isStale)&&await C.onRequestError(e,t,{routerKind:"App Router",routePath:w,routeType:"route",revalidateReason:(0,u.getRevalidateReason)({isStaticGeneration:I,isOnDemandRevalidate:D})},_),t}},p=await C.handleResponse({req:e,nextConfig:E,cacheKey:F,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:A,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:T,responseGenerator:l,waitUntil:a.waitUntil,isMinimalMode:o});if(!O)return null;if((null==p||null==(n=p.value)?void 0:n.kind)!==x.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==p||null==(c=p.value)?void 0:c.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});o||t.setHeader("x-nextjs-cache",D?"REVALIDATED":p.isMiss?"MISS":p.isStale?"STALE":"HIT"),b&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let d=(0,m.fromNodeOutgoingHttpHeaders)(p.value.headers);return o&&O||d.delete(g.NEXT_CACHE_TAGS_HEADER),!p.cacheControl||t.getHeader("Cache-Control")||d.get("Cache-Control")||d.set("Cache-Control",(0,f.getCacheControlHeader)(p.cacheControl)),await (0,h.sendResponse)(L,K,new Response(p.value.body,{headers:d,status:p.value.status||200})),null};H?await c(H):await U.withPropagatedContext(e.headers,()=>U.trace(d.BaseServerSpan.handleRequest,{spanName:`${$} ${w}`,kind:n.SpanKind.SERVER,attributes:{"http.method":$,"http.target":e.url}},c))}catch(t){if(t instanceof y.NoFallbackError||await C.onRequestError(e,t,{routerKind:"App Router",routePath:M,routeType:"route",revalidateReason:(0,u.getRevalidateReason)({isStaticGeneration:I,isOnDemandRevalidate:D})}),O)throw t;return await (0,h.sendResponse)(L,K,new Response(null,{status:500})),null}}e.s(["handler",()=>j,"patchFetch",()=>P,"routeModule",()=>C,"serverHooks",()=>T,"workAsyncStorage",()=>_,"workUnitAsyncStorage",()=>D],33368)},14430,e=>{e.v(t=>Promise.all(["server/chunks/[root-of-the-server]__ae726e9c._.js","server/chunks/packages_ui_src_lib_db_index_ts_556307fa._.js"].map(t=>e.l(t))).then(()=>t(18146)))}];
1
+ module.exports=[12714,(e,t,r)=>{t.exports=e.x("node:fs/promises",()=>require("node:fs/promises"))},22734,(e,t,r)=>{t.exports=e.x("fs",()=>require("fs"))},874,(e,t,r)=>{t.exports=e.x("buffer",()=>require("buffer"))},50227,(e,t,r)=>{t.exports=e.x("node:path",()=>require("node:path"))},2157,(e,t,r)=>{t.exports=e.x("node:fs",()=>require("node:fs"))},68239,e=>{"use strict";var t=e.i(44271),r=e.i(67708),a=e.i(14747),s=e.i(2157),n=e.i(92194);let i=(0,a.resolve)(process.cwd(),"../../specs");function o(e){return e?Array.isArray(e)?e.map(e=>String(e)):"string"==typeof e?[e]:[]:[]}async function c(e,c){let l=await t.specsService.getSpec(e,c);if(!l)return null;let p={...l,tags:l.tags?"string"==typeof l.tags?JSON.parse(l.tags):l.tags:null};if(!c){let e,t,c=(e=l.filePath.replace(/^specs\//,"").replace(/\/README\.md$/,""),(0,a.join)((t=process.env.SPECS_DIR)?t.startsWith("/")?t:(0,a.resolve)(process.cwd(),t):i,e)),d=(0,r.detectSubSpecs)(c),u=function(e){try{let t=(0,a.join)(e,"README.md"),r=(0,s.readFileSync)(t,"utf-8"),{data:i}=(0,n.default)(r),c=o(i?.depends_on??i?.dependsOn),l=o(i?.related);return{dependsOn:c,related:l}}catch(e){return console.warn("Unable to parse spec relationships",e),{dependsOn:[],related:[]}}}(c);return{...p,subSpecs:d,relationships:u}}return p}async function l(e){let r=await t.specsService.getAllSpecs(e),a=new Map,s=new Map;for(let e of r)e.status&&a.set(e.status,(a.get(e.status)||0)+1),e.priority&&s.set(e.priority,(s.get(e.priority)||0)+1);let n=a.get("complete")||0,i=r.length>0?n/r.length*100:0;return{totalProjects:1,totalSpecs:r.length,specsByStatus:Array.from(a.entries()).map(([e,t])=>({status:e,count:t})),specsByPriority:Array.from(s.entries()).map(([e,t])=>({priority:e,count:t})),completionRate:Math.round(10*i)/10}}e.s(["getSpecById",()=>c,"getStats",()=>l])},93695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},14747,(e,t,r)=>{t.exports=e.x("path",()=>require("path"))},18622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},32319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},24725,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/after-task-async-storage.external.js",()=>require("next/dist/server/app-render/after-task-async-storage.external.js"))},67708,e=>{"use strict";var t=e.i(22734),r=e.i(14747),a=e.i(92194);let s=[{pattern:/design|ui|ux|mockup|wireframe|prototype/i,iconName:"Palette",color:"text-purple-600"},{pattern:/architecture|structure|system|diagram/i,iconName:"Map",color:"text-indigo-600"},{pattern:/implementation|code|develop|build/i,iconName:"Code",color:"text-green-600"},{pattern:/api|endpoint|integration|interface/i,iconName:"Code",color:"text-blue-600"},{pattern:/test|qa|quality|validation/i,iconName:"TestTube",color:"text-orange-600"},{pattern:/task|todo|checklist|milestone/i,iconName:"CheckSquare",color:"text-gray-600"},{pattern:/config|setup|settings|environment/i,iconName:"Wrench",color:"text-yellow-600"},{pattern:/deploy|devops|ci|cd|pipeline|release/i,iconName:"Wrench",color:"text-orange-600"},{pattern:/migration|upgrade|refactor|transition/i,iconName:"GitBranch",color:"text-cyan-600"},{pattern:/security|auth|permission|access|encryption/i,iconName:"CheckSquare",color:"text-red-600"},{pattern:/performance|optimization|speed|cache|benchmark/i,iconName:"TrendingUp",color:"text-green-600"},{pattern:/database|data|schema|model|query/i,iconName:"FileText",color:"text-blue-600"},{pattern:/doc|guide|manual|reference/i,iconName:"FileText",color:"text-gray-500"},{pattern:/github|git|vcs|version/i,iconName:"GitBranch",color:"text-pink-600"}],n={iconName:"FileText",color:"text-gray-600"};function i(e){let i=[];if(!(0,t.existsSync)(e))return i;try{for(let o of(0,t.readdirSync)(e)){if("README.md"===o||!o.endsWith(".md"))continue;let c=(0,r.join)(e,o);if((0,t.statSync)(c).isFile())try{let e=(0,t.readFileSync)(c,"utf-8"),{content:r}=(0,a.default)(e),l=function(e){let t=e.replace(/\.md$/i,"");for(let{pattern:e,iconName:r,color:a}of s)if(e.test(t))return{iconName:r,color:a};return n}(o);i.push({name:o.replace(/\.md$/i,"").split(/[-_]/).map(e=>e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()).join(" "),file:o,iconName:l.iconName,color:l.color,content:r})}catch(e){console.error(`Error reading sub-spec ${o}:`,e)}}i.sort((e,t)=>e.file.localeCompare(t.file))}catch(t){console.error(`Error reading spec directory ${e}:`,t)}return i}e.s(["detectSubSpecs",()=>i])},44271,e=>{"use strict";var t=e.i(12714),r=e.i(50227),a=e.i(92194);let s=parseInt(process.env.CACHE_TTL||"60000",10);class n{cache=new Map;specsDir;constructor(e){this.specsDir=e||r.join(process.cwd(),"../../specs")}async getAllSpecs(){let e="__all_specs__",t=this.cache.get(e);if(t&&Date.now()<t.expiresAt)return t.data;let r=await this.loadSpecsFromFilesystem();return this.cache.set(e,{data:r,expiresAt:Date.now()+s}),r}async getSpec(e){let t=`spec:${e}`,r=this.cache.get(t);if(r&&Date.now()<r.expiresAt)return r.data;let a=parseInt(e.split("-")[0],10);if(isNaN(a))return null;let n=await this.loadSpecByNumber(a);return n&&this.cache.set(t,{data:n,expiresAt:Date.now()+s}),n}async getSpecsByStatus(e){return(await this.getAllSpecs()).filter(t=>t.status===e)}async searchSpecs(e){let t=await this.getAllSpecs(),r=e.toLowerCase();return t.filter(e=>e.specName.toLowerCase().includes(r)||e.title?.toLowerCase().includes(r)||e.contentMd.toLowerCase().includes(r))}invalidateCache(e){e?(this.cache.delete(`spec:${e}`),this.cache.delete("__all_specs__")):this.cache.clear()}async loadSpecsFromFilesystem(){let e=[];try{await t.access(this.specsDir)}catch{return[]}let a=/^(\d{2,})-/;for(let s of(await t.readdir(this.specsDir,{withFileTypes:!0})))if(s.isDirectory()&&"archived"!==s.name&&a.test(s.name)){let t=r.join(this.specsDir,s.name),a=await this.loadSpecFromDirectory(t,s.name);a&&e.push(a)}return e.sort((e,t)=>(e.specNumber||0)-(t.specNumber||0))}async loadSpecByNumber(e){try{await t.access(this.specsDir)}catch{return null}let a=await t.readdir(this.specsDir,{withFileTypes:!0}),s=RegExp(`^0*${e}-`);for(let e of a)if(e.isDirectory()&&s.test(e.name)){let t=r.join(this.specsDir,e.name);return await this.loadSpecFromDirectory(t,e.name)}return null}async loadSpecFromDirectory(e,s){let n=r.join(e,"README.md");try{let e=await t.readFile(n,"utf-8"),{data:r,content:i}=(0,a.default)(e);if(!r||!r.status)return null;let o=s.match(/^(\d+)/),c=o?parseInt(o[1],10):null,l=`fs-${s}`,p=r.created_at??r.created,d=r.updated_at??r.updated,u=r.completed_at??r.completed,h=e=>{if(!e)return null;let t=new Date(e);return isNaN(t.getTime())?null:t};return{id:l,projectId:"leanspec",specNumber:c,specName:s,title:this.extractTitle(i),status:r.status||"planned",priority:r.priority||null,tags:r.tags?JSON.stringify(r.tags):null,assignee:r.assignee||null,contentMd:i,contentHtml:null,createdAt:h(p),updatedAt:h(d),completedAt:h(u),filePath:`specs/${s}/README.md`,githubUrl:`https://github.com/codervisor/lean-spec/tree/main/specs/${s}/README.md`,syncedAt:new Date}}catch{return null}}extractTitle(e){for(let t of e.split("\n")){let e=t.match(/^#\s+(.+)$/);if(e)return e[1].trim()}return null}}let i=null,o=new class{filesystemSource;databaseSource;mode;constructor(){if(this.mode=process.env.SPECS_MODE||"filesystem","filesystem"===this.mode||"both"===this.mode){const e=process.env.SPECS_DIR;this.filesystemSource=new n(e)}}async getDatabaseSource(){if(!this.databaseSource){if(!i){let{DatabaseSource:t}=await e.A(14430);i=t}this.databaseSource=new i}return this.databaseSource}async getAllSpecs(e){let t=await this.getSource(e);return await t.getAllSpecs(e)}async getSpec(e,t){let r=await this.getSource(t);return await r.getSpec(e,t)}async getSpecsByStatus(e,t){let r=await this.getSource(t);return await r.getSpecsByStatus(e,t)}async searchSpecs(e,t){let r=await this.getSource(t);return await r.searchSpecs(e,t)}async invalidateCache(e,t){(await this.getSource(t)).invalidateCache(e)}async getSource(e){if(e&&("database"===this.mode||"both"===this.mode))return await this.getDatabaseSource();if(this.filesystemSource)return this.filesystemSource;throw Error("No spec source configured")}};e.s(["specsService",0,o],44271)},33368,e=>{"use strict";var t=e.i(6169),r=e.i(25864),a=e.i(71648),s=e.i(30064),n=e.i(74222),i=e.i(2043),o=e.i(71408),c=e.i(26527),l=e.i(30592),p=e.i(34639),d=e.i(88935),u=e.i(68515),h=e.i(87166),m=e.i(76718),f=e.i(76529),g=e.i(51151),y=e.i(93695);e.i(59704);var x=e.i(8259),w=e.i(31511),S=e.i(68239);class v{graph;specs;constructor(e){this.graph=new Map,this.specs=new Map,this.buildGraph(e)}buildGraph(e){for(let t of e)this.specs.set(t.path,t),this.graph.set(t.path,{dependsOn:new Set(t.frontmatter.depends_on||[]),requiredBy:new Set,related:new Set(t.frontmatter.related||[])});for(let[e,t]of this.graph.entries()){for(let r of t.dependsOn){let t=this.graph.get(r);t&&t.requiredBy.add(e)}for(let r of t.related){let t=this.graph.get(r);t&&t.related.add(e)}}}getCompleteGraph(e){let t=this.specs.get(e);if(!t)throw Error(`Spec not found: ${e}`);let r=this.graph.get(e);if(!r)throw Error(`Graph node not found: ${e}`);return{current:t,dependsOn:this.getSpecsByPaths(Array.from(r.dependsOn)),requiredBy:this.getSpecsByPaths(Array.from(r.requiredBy)),related:this.getSpecsByPaths(Array.from(r.related))}}getSpecsByPaths(e){return e.map(e=>this.specs.get(e)).filter(e=>void 0!==e)}}var R=e.i(2157),E=e.i(50227),N=e.i(92194);async function b(e,{params:t}){try{let{id:e}=await t,r=await (0,S.getSpecById)(e);if(!r)return w.NextResponse.json({error:"Spec not found"},{status:404});let a=(0,E.join)(process.cwd(),"../../specs"),s=function(e){let t=[];try{for(let r of(0,R.readdirSync)(e)){let a=(0,E.join)(e,r);if((0,R.statSync)(a).isDirectory()&&"archived"!==r&&/^\d{2,}-/.test(r))try{let e=(0,E.join)(a,"README.md"),s=(0,R.readFileSync)(e,"utf-8"),{data:n}=(0,N.default)(s);if(!n||!n.status)continue;let i={status:n.status||"planned",created:n.created_at||n.created||new Date().toISOString().split("T")[0]};n.depends_on?i.depends_on=Array.isArray(n.depends_on)?n.depends_on:[n.depends_on]:i.depends_on=[],n.related?i.related=Array.isArray(n.related)?n.related:[n.related]:i.related=[],n.priority&&(i.priority=n.priority),n.tags&&(i.tags=n.tags),n.assignee&&(i.assignee=n.assignee),t.push({path:r,fullPath:a,filePath:e,name:r,frontmatter:i})}catch(e){console.warn(`Failed to parse spec ${r}:`,e)}}}catch(e){console.error("Failed to load specs:",e)}return t}(a),n=new v(s).getCompleteGraph(r.specName),i=e=>{let t=e.match(/^(\d+)/);return t?parseInt(t[1],10):null},o=e=>{let t=e.split("-");return t.length>1?t.slice(1).join("-").replace(/-/g," "):e},c={current:{id:r.id,specNumber:r.specNumber,specName:r.specName,title:r.title,status:r.status,priority:r.priority},dependsOn:n.dependsOn.map(e=>({specNumber:i(e.name),specName:e.name,title:o(e.name),status:e.frontmatter.status,priority:e.frontmatter.priority})),requiredBy:n.requiredBy.map(e=>({specNumber:i(e.name),specName:e.name,title:o(e.name),status:e.frontmatter.status,priority:e.frontmatter.priority})),related:n.related.map(e=>({specNumber:i(e.name),specName:e.name,title:o(e.name),status:e.frontmatter.status,priority:e.frontmatter.priority}))};return w.NextResponse.json(c,{headers:{"Cache-Control":"public, s-maxage=60, stale-while-revalidate=120"}})}catch(e){return console.error("Error fetching dependency graph:",e),w.NextResponse.json({error:"Failed to fetch dependency graph"},{status:500})}}e.s(["GET",()=>b],15671);var A=e.i(15671);let C=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/specs/[id]/dependency-graph/route",pathname:"/api/specs/[id]/dependency-graph",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/packages/ui/src/app/api/specs/[id]/dependency-graph/route.ts",nextConfigOutput:"standalone",userland:A}),{workAsyncStorage:_,workUnitAsyncStorage:D,serverHooks:T}=C;function P(){return(0,a.patchFetch)({workAsyncStorage:_,workUnitAsyncStorage:D})}async function j(e,t,a){C.isDev&&(0,s.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let w="/api/specs/[id]/dependency-graph/route";w=w.replace(/\/index$/,"")||"/";let S=await C.prepare(e,t,{srcPage:w,multiZoneDraftMode:!1});if(!S)return t.statusCode=400,t.end("Bad Request"),null==a.waitUntil||a.waitUntil.call(a,Promise.resolve()),null;let{buildId:v,params:R,nextConfig:E,parsedUrl:N,isDraftMode:b,prerenderManifest:A,routerServerContext:_,isOnDemandRevalidate:D,revalidateOnlyGenerated:T,resolvedPathname:P,clientReferenceManifest:j,serverActionsManifest:q}=S,M=(0,c.normalizeAppPath)(w),O=!!(A.dynamicRoutes[M]||A.routes[P]),k=async()=>((null==_?void 0:_.render404)?await _.render404(e,t,N,!1):t.end("This page could not be found"),null);if(O&&!b){let e=!!A.routes[P],t=A.dynamicRoutes[M];if(t&&!1===t.fallback&&!e){if(E.experimental.adapterPath)return await k();throw new y.NoFallbackError}}let F=null;!O||C.isDev||b||(F="/index"===(F=P)?"/":F);let B=!0===C.isDev||!O,I=O&&!B;q&&j&&(0,i.setReferenceManifestsSingleton)({page:w,clientReferenceManifest:j,serverActionsManifest:q,serverModuleMap:(0,o.createServerModuleMap)({serverActionsManifest:q})});let $=e.method||"GET",U=(0,n.getTracer)(),H=U.getActiveScopeSpan(),G={params:R,prerenderManifest:A,renderOpts:{experimental:{authInterrupts:!!E.experimental.authInterrupts},cacheComponents:!!E.cacheComponents,supportsDynamicResponse:B,incrementalCache:(0,s.getRequestMeta)(e,"incrementalCache"),cacheLifeProfiles:E.cacheLife,waitUntil:a.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,a)=>C.onRequestError(e,t,a,_)},sharedContext:{buildId:v}},L=new l.NodeNextRequest(e),K=new l.NodeNextResponse(t),W=p.NextRequestAdapter.fromNodeNextRequest(L,(0,p.signalFromNodeResponse)(t));try{let i=async e=>C.handle(W,G).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let r=U.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==d.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${r.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let a=r.get("next.route");if(a){let t=`${$} ${a}`;e.setAttributes({"next.route":a,"http.route":a,"next.span_name":t}),e.updateName(t)}else e.updateName(`${$} ${w}`)}),o=!!(0,s.getRequestMeta)(e,"minimalMode"),c=async s=>{var n,c;let l=async({previousCacheEntry:r})=>{try{if(!o&&D&&T&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let n=await i(s);e.fetchMetrics=G.renderOpts.fetchMetrics;let c=G.renderOpts.pendingWaitUntil;c&&a.waitUntil&&(a.waitUntil(c),c=void 0);let l=G.renderOpts.collectedTags;if(!O)return await (0,h.sendResponse)(L,K,n,G.renderOpts.pendingWaitUntil),null;{let e=await n.blob(),t=(0,m.toNodeOutgoingHttpHeaders)(n.headers);l&&(t[g.NEXT_CACHE_TAGS_HEADER]=l),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==G.renderOpts.collectedRevalidate&&!(G.renderOpts.collectedRevalidate>=g.INFINITE_CACHE)&&G.renderOpts.collectedRevalidate,a=void 0===G.renderOpts.collectedExpire||G.renderOpts.collectedExpire>=g.INFINITE_CACHE?void 0:G.renderOpts.collectedExpire;return{value:{kind:x.CachedRouteKind.APP_ROUTE,status:n.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:a}}}}catch(t){throw(null==r?void 0:r.isStale)&&await C.onRequestError(e,t,{routerKind:"App Router",routePath:w,routeType:"route",revalidateReason:(0,u.getRevalidateReason)({isStaticGeneration:I,isOnDemandRevalidate:D})},_),t}},p=await C.handleResponse({req:e,nextConfig:E,cacheKey:F,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:A,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:T,responseGenerator:l,waitUntil:a.waitUntil,isMinimalMode:o});if(!O)return null;if((null==p||null==(n=p.value)?void 0:n.kind)!==x.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==p||null==(c=p.value)?void 0:c.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});o||t.setHeader("x-nextjs-cache",D?"REVALIDATED":p.isMiss?"MISS":p.isStale?"STALE":"HIT"),b&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let d=(0,m.fromNodeOutgoingHttpHeaders)(p.value.headers);return o&&O||d.delete(g.NEXT_CACHE_TAGS_HEADER),!p.cacheControl||t.getHeader("Cache-Control")||d.get("Cache-Control")||d.set("Cache-Control",(0,f.getCacheControlHeader)(p.cacheControl)),await (0,h.sendResponse)(L,K,new Response(p.value.body,{headers:d,status:p.value.status||200})),null};H?await c(H):await U.withPropagatedContext(e.headers,()=>U.trace(d.BaseServerSpan.handleRequest,{spanName:`${$} ${w}`,kind:n.SpanKind.SERVER,attributes:{"http.method":$,"http.target":e.url}},c))}catch(t){if(t instanceof y.NoFallbackError||await C.onRequestError(e,t,{routerKind:"App Router",routePath:M,routeType:"route",revalidateReason:(0,u.getRevalidateReason)({isStaticGeneration:I,isOnDemandRevalidate:D})}),O)throw t;return await (0,h.sendResponse)(L,K,new Response(null,{status:500})),null}}e.s(["handler",()=>j,"patchFetch",()=>P,"routeModule",()=>C,"serverHooks",()=>T,"workAsyncStorage",()=>_,"workUnitAsyncStorage",()=>D],33368)},14430,e=>{e.v(t=>Promise.all(["server/chunks/[root-of-the-server]__ae726e9c._.js","server/chunks/packages_ui_src_lib_db_index_ts_556307fa._.js"].map(t=>e.l(t))).then(()=>t(18146)))}];
2
2
 
3
- //# sourceMappingURL=%5Broot-of-the-server%5D__21119265._.js.map
3
+ //# sourceMappingURL=%5Broot-of-the-server%5D__47b8cab4._.js.map
@@ -1,3 +1,3 @@
1
- module.exports=[12714,(e,t,r)=>{t.exports=e.x("node:fs/promises",()=>require("node:fs/promises"))},22734,(e,t,r)=>{t.exports=e.x("fs",()=>require("fs"))},874,(e,t,r)=>{t.exports=e.x("buffer",()=>require("buffer"))},50227,(e,t,r)=>{t.exports=e.x("node:path",()=>require("node:path"))},2157,(e,t,r)=>{t.exports=e.x("node:fs",()=>require("node:fs"))},68239,e=>{"use strict";var t=e.i(44271),r=e.i(67708),a=e.i(14747),s=e.i(2157),n=e.i(92194);let i=(0,a.resolve)(process.cwd(),"../../specs");function o(e){return e?Array.isArray(e)?e.map(e=>String(e)):"string"==typeof e?[e]:[]:[]}async function c(e,c){let l=await t.specsService.getSpec(e,c);if(!l)return null;let p={...l,tags:l.tags?"string"==typeof l.tags?JSON.parse(l.tags):l.tags:null};if(!c){let e,t,c=(e=l.filePath.replace(/^specs\//,"").replace(/\/README\.md$/,""),(0,a.join)((t=process.env.SPECS_DIR)?t.startsWith("/")?t:(0,a.resolve)(process.cwd(),t):i,e)),u=(0,r.detectSubSpecs)(c),d=function(e){try{let t=(0,a.join)(e,"README.md"),r=(0,s.readFileSync)(t,"utf-8"),{data:i}=(0,n.default)(r),c=o(i?.depends_on??i?.dependsOn),l=o(i?.related);return{dependsOn:c,related:l}}catch(e){return console.warn("Unable to parse spec relationships",e),{dependsOn:[],related:[]}}}(c);return{...p,subSpecs:u,relationships:d}}return p}async function l(e){let r=await t.specsService.getAllSpecs(e),a=new Map,s=new Map;for(let e of r)e.status&&a.set(e.status,(a.get(e.status)||0)+1),e.priority&&s.set(e.priority,(s.get(e.priority)||0)+1);let n=a.get("complete")||0,i=r.length>0?n/r.length*100:0;return{totalProjects:1,totalSpecs:r.length,specsByStatus:Array.from(a.entries()).map(([e,t])=>({status:e,count:t})),specsByPriority:Array.from(s.entries()).map(([e,t])=>({priority:e,count:t})),completionRate:Math.round(10*i)/10}}e.s(["getSpecById",()=>c,"getStats",()=>l])},93695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},18622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},32319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},24725,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/after-task-async-storage.external.js",()=>require("next/dist/server/app-render/after-task-async-storage.external.js"))},14747,(e,t,r)=>{t.exports=e.x("path",()=>require("path"))},67708,e=>{"use strict";var t=e.i(22734),r=e.i(14747),a=e.i(92194);let s=[{pattern:/design|ui|ux|mockup|wireframe|prototype/i,iconName:"Palette",color:"text-purple-600"},{pattern:/architecture|structure|system|diagram/i,iconName:"Map",color:"text-indigo-600"},{pattern:/implementation|code|develop|build/i,iconName:"Code",color:"text-green-600"},{pattern:/api|endpoint|integration|interface/i,iconName:"Code",color:"text-blue-600"},{pattern:/test|qa|quality|validation/i,iconName:"TestTube",color:"text-orange-600"},{pattern:/task|todo|checklist|milestone/i,iconName:"CheckSquare",color:"text-gray-600"},{pattern:/config|setup|settings|environment/i,iconName:"Wrench",color:"text-yellow-600"},{pattern:/deploy|devops|ci|cd|pipeline|release/i,iconName:"Wrench",color:"text-orange-600"},{pattern:/migration|upgrade|refactor|transition/i,iconName:"GitBranch",color:"text-cyan-600"},{pattern:/security|auth|permission|access|encryption/i,iconName:"CheckSquare",color:"text-red-600"},{pattern:/performance|optimization|speed|cache|benchmark/i,iconName:"TrendingUp",color:"text-green-600"},{pattern:/database|data|schema|model|query/i,iconName:"FileText",color:"text-blue-600"},{pattern:/doc|guide|manual|reference/i,iconName:"FileText",color:"text-gray-500"},{pattern:/github|git|vcs|version/i,iconName:"GitBranch",color:"text-pink-600"}],n={iconName:"FileText",color:"text-gray-600"};function i(e){let i=[];if(!(0,t.existsSync)(e))return i;try{for(let o of(0,t.readdirSync)(e)){if("README.md"===o||!o.endsWith(".md"))continue;let c=(0,r.join)(e,o);if((0,t.statSync)(c).isFile())try{let e=(0,t.readFileSync)(c,"utf-8"),{content:r}=(0,a.default)(e),l=function(e){let t=e.replace(/\.md$/i,"");for(let{pattern:e,iconName:r,color:a}of s)if(e.test(t))return{iconName:r,color:a};return n}(o);i.push({name:o.replace(/\.md$/i,"").split(/[-_]/).map(e=>e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()).join(" "),file:o,iconName:l.iconName,color:l.color,content:r})}catch(e){console.error(`Error reading sub-spec ${o}:`,e)}}i.sort((e,t)=>e.file.localeCompare(t.file))}catch(t){console.error(`Error reading spec directory ${e}:`,t)}return i}e.s(["detectSubSpecs",()=>i])},44271,e=>{"use strict";var t=e.i(12714),r=e.i(50227),a=e.i(92194);let s=parseInt(process.env.CACHE_TTL||"60000",10);class n{cache=new Map;specsDir;constructor(e){this.specsDir=e||r.join(process.cwd(),"../../specs")}async getAllSpecs(){let e="__all_specs__",t=this.cache.get(e);if(t&&Date.now()<t.expiresAt)return t.data;let r=await this.loadSpecsFromFilesystem();return this.cache.set(e,{data:r,expiresAt:Date.now()+s}),r}async getSpec(e){let t=`spec:${e}`,r=this.cache.get(t);if(r&&Date.now()<r.expiresAt)return r.data;let a=parseInt(e.split("-")[0],10);if(isNaN(a))return null;let n=await this.loadSpecByNumber(a);return n&&this.cache.set(t,{data:n,expiresAt:Date.now()+s}),n}async getSpecsByStatus(e){return(await this.getAllSpecs()).filter(t=>t.status===e)}async searchSpecs(e){let t=await this.getAllSpecs(),r=e.toLowerCase();return t.filter(e=>e.specName.toLowerCase().includes(r)||e.title?.toLowerCase().includes(r)||e.contentMd.toLowerCase().includes(r))}invalidateCache(e){e?(this.cache.delete(`spec:${e}`),this.cache.delete("__all_specs__")):this.cache.clear()}async loadSpecsFromFilesystem(){let e=[];try{await t.access(this.specsDir)}catch{return[]}let a=/^(\d{2,})-/;for(let s of(await t.readdir(this.specsDir,{withFileTypes:!0})))if(s.isDirectory()&&"archived"!==s.name&&a.test(s.name)){let t=r.join(this.specsDir,s.name),a=await this.loadSpecFromDirectory(t,s.name);a&&e.push(a)}return e.sort((e,t)=>(e.specNumber||0)-(t.specNumber||0))}async loadSpecByNumber(e){try{await t.access(this.specsDir)}catch{return null}let a=await t.readdir(this.specsDir,{withFileTypes:!0}),s=RegExp(`^0*${e}-`);for(let e of a)if(e.isDirectory()&&s.test(e.name)){let t=r.join(this.specsDir,e.name);return await this.loadSpecFromDirectory(t,e.name)}return null}async loadSpecFromDirectory(e,s){let n=r.join(e,"README.md");try{let e=await t.readFile(n,"utf-8"),{data:r,content:i}=(0,a.default)(e);if(!r||!r.status)return null;let o=s.match(/^(\d+)/),c=o?parseInt(o[1],10):null,l=`fs-${s}`,p=r.created_at??r.created,u=r.updated_at??r.updated,d=r.completed_at??r.completed,h=e=>{if(!e)return null;let t=new Date(e);return isNaN(t.getTime())?null:t};return{id:l,projectId:"leanspec",specNumber:c,specName:s,title:this.extractTitle(i),status:r.status||"planned",priority:r.priority||null,tags:r.tags?JSON.stringify(r.tags):null,assignee:r.assignee||null,contentMd:i,contentHtml:null,createdAt:h(p),updatedAt:h(u),completedAt:h(d),filePath:`specs/${s}/README.md`,githubUrl:`https://github.com/codervisor/lean-spec/tree/main/specs/${s}/README.md`,syncedAt:new Date}}catch{return null}}extractTitle(e){for(let t of e.split("\n")){let e=t.match(/^#\s+(.+)$/);if(e)return e[1].trim()}return null}}let i=null,o=new class{filesystemSource;databaseSource;mode;constructor(){if(this.mode=process.env.SPECS_MODE||"filesystem","filesystem"===this.mode||"both"===this.mode){const e=process.env.SPECS_DIR;this.filesystemSource=new n(e)}}async getDatabaseSource(){if(!this.databaseSource){if(!i){let{DatabaseSource:t}=await e.A(14430);i=t}this.databaseSource=new i}return this.databaseSource}async getAllSpecs(e){let t=await this.getSource(e);return await t.getAllSpecs(e)}async getSpec(e,t){let r=await this.getSource(t);return await r.getSpec(e,t)}async getSpecsByStatus(e,t){let r=await this.getSource(t);return await r.getSpecsByStatus(e,t)}async searchSpecs(e,t){let r=await this.getSource(t);return await r.searchSpecs(e,t)}async invalidateCache(e,t){(await this.getSource(t)).invalidateCache(e)}async getSource(e){if(e&&("database"===this.mode||"both"===this.mode))return await this.getDatabaseSource();if(this.filesystemSource)return this.filesystemSource;throw Error("No spec source configured")}};e.s(["specsService",0,o],44271)},17664,e=>{"use strict";var t=e.i(6169),r=e.i(25864),a=e.i(71648),s=e.i(30064),n=e.i(74222),i=e.i(2043),o=e.i(71408),c=e.i(26527),l=e.i(30592),p=e.i(34639),u=e.i(88935),d=e.i(68515),h=e.i(87166),m=e.i(76718),f=e.i(76529),g=e.i(51151),y=e.i(93695);e.i(59704);var x=e.i(8259),w=e.i(31511),S=e.i(68239);async function v(e,{params:t}){try{let{id:e}=await t,r=await (0,S.getSpecById)(e);if(!r)return w.NextResponse.json({error:"Spec not found"},{status:404});return w.NextResponse.json({spec:r},{headers:{"Cache-Control":"public, s-maxage=60, stale-while-revalidate=120"}})}catch(e){return console.error("Error fetching spec:",e),w.NextResponse.json({error:"Failed to fetch spec"},{status:500})}}e.s(["GET",()=>v],8728);var R=e.i(8728);let E=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/specs/[id]/route",pathname:"/api/specs/[id]",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/packages/ui/src/app/api/specs/[id]/route.ts",nextConfigOutput:"standalone",userland:R}),{workAsyncStorage:b,workUnitAsyncStorage:A,serverHooks:C}=E;function N(){return(0,a.patchFetch)({workAsyncStorage:b,workUnitAsyncStorage:A})}async function _(e,t,a){E.isDev&&(0,s.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let w="/api/specs/[id]/route";w=w.replace(/\/index$/,"")||"/";let S=await E.prepare(e,t,{srcPage:w,multiZoneDraftMode:!1});if(!S)return t.statusCode=400,t.end("Bad Request"),null==a.waitUntil||a.waitUntil.call(a,Promise.resolve()),null;let{buildId:v,params:R,nextConfig:b,parsedUrl:A,isDraftMode:C,prerenderManifest:N,routerServerContext:_,isOnDemandRevalidate:D,revalidateOnlyGenerated:T,resolvedPathname:j,clientReferenceManifest:k,serverActionsManifest:P}=S,q=(0,c.normalizeAppPath)(w),M=!!(N.dynamicRoutes[q]||N.routes[j]),O=async()=>((null==_?void 0:_.render404)?await _.render404(e,t,A,!1):t.end("This page could not be found"),null);if(M&&!C){let e=!!N.routes[j],t=N.dynamicRoutes[q];if(t&&!1===t.fallback&&!e){if(b.experimental.adapterPath)return await O();throw new y.NoFallbackError}}let F=null;!M||E.isDev||C||(F="/index"===(F=j)?"/":F);let I=!0===E.isDev||!M,$=M&&!I;P&&k&&(0,i.setReferenceManifestsSingleton)({page:w,clientReferenceManifest:k,serverActionsManifest:P,serverModuleMap:(0,o.createServerModuleMap)({serverActionsManifest:P})});let U=e.method||"GET",H=(0,n.getTracer)(),B=H.getActiveScopeSpan(),L={params:R,prerenderManifest:N,renderOpts:{experimental:{authInterrupts:!!b.experimental.authInterrupts},cacheComponents:!!b.cacheComponents,supportsDynamicResponse:I,incrementalCache:(0,s.getRequestMeta)(e,"incrementalCache"),cacheLifeProfiles:b.cacheLife,waitUntil:a.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,a)=>E.onRequestError(e,t,a,_)},sharedContext:{buildId:v}},K=new l.NodeNextRequest(e),G=new l.NodeNextResponse(t),W=p.NextRequestAdapter.fromNodeNextRequest(K,(0,p.signalFromNodeResponse)(t));try{let i=async e=>E.handle(W,L).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let r=H.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==u.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${r.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let a=r.get("next.route");if(a){let t=`${U} ${a}`;e.setAttributes({"next.route":a,"http.route":a,"next.span_name":t}),e.updateName(t)}else e.updateName(`${U} ${w}`)}),o=!!(0,s.getRequestMeta)(e,"minimalMode"),c=async s=>{var n,c;let l=async({previousCacheEntry:r})=>{try{if(!o&&D&&T&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let n=await i(s);e.fetchMetrics=L.renderOpts.fetchMetrics;let c=L.renderOpts.pendingWaitUntil;c&&a.waitUntil&&(a.waitUntil(c),c=void 0);let l=L.renderOpts.collectedTags;if(!M)return await (0,h.sendResponse)(K,G,n,L.renderOpts.pendingWaitUntil),null;{let e=await n.blob(),t=(0,m.toNodeOutgoingHttpHeaders)(n.headers);l&&(t[g.NEXT_CACHE_TAGS_HEADER]=l),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==L.renderOpts.collectedRevalidate&&!(L.renderOpts.collectedRevalidate>=g.INFINITE_CACHE)&&L.renderOpts.collectedRevalidate,a=void 0===L.renderOpts.collectedExpire||L.renderOpts.collectedExpire>=g.INFINITE_CACHE?void 0:L.renderOpts.collectedExpire;return{value:{kind:x.CachedRouteKind.APP_ROUTE,status:n.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:a}}}}catch(t){throw(null==r?void 0:r.isStale)&&await E.onRequestError(e,t,{routerKind:"App Router",routePath:w,routeType:"route",revalidateReason:(0,d.getRevalidateReason)({isStaticGeneration:$,isOnDemandRevalidate:D})},_),t}},p=await E.handleResponse({req:e,nextConfig:b,cacheKey:F,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:N,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:T,responseGenerator:l,waitUntil:a.waitUntil,isMinimalMode:o});if(!M)return null;if((null==p||null==(n=p.value)?void 0:n.kind)!==x.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==p||null==(c=p.value)?void 0:c.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});o||t.setHeader("x-nextjs-cache",D?"REVALIDATED":p.isMiss?"MISS":p.isStale?"STALE":"HIT"),C&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let u=(0,m.fromNodeOutgoingHttpHeaders)(p.value.headers);return o&&M||u.delete(g.NEXT_CACHE_TAGS_HEADER),!p.cacheControl||t.getHeader("Cache-Control")||u.get("Cache-Control")||u.set("Cache-Control",(0,f.getCacheControlHeader)(p.cacheControl)),await (0,h.sendResponse)(K,G,new Response(p.value.body,{headers:u,status:p.value.status||200})),null};B?await c(B):await H.withPropagatedContext(e.headers,()=>H.trace(u.BaseServerSpan.handleRequest,{spanName:`${U} ${w}`,kind:n.SpanKind.SERVER,attributes:{"http.method":U,"http.target":e.url}},c))}catch(t){if(t instanceof y.NoFallbackError||await E.onRequestError(e,t,{routerKind:"App Router",routePath:q,routeType:"route",revalidateReason:(0,d.getRevalidateReason)({isStaticGeneration:$,isOnDemandRevalidate:D})}),M)throw t;return await (0,h.sendResponse)(K,G,new Response(null,{status:500})),null}}e.s(["handler",()=>_,"patchFetch",()=>N,"routeModule",()=>E,"serverHooks",()=>C,"workAsyncStorage",()=>b,"workUnitAsyncStorage",()=>A],17664)},14430,e=>{e.v(t=>Promise.all(["server/chunks/[root-of-the-server]__ae726e9c._.js","server/chunks/packages_ui_src_lib_db_index_ts_556307fa._.js"].map(t=>e.l(t))).then(()=>t(18146)))}];
1
+ module.exports=[12714,(e,t,r)=>{t.exports=e.x("node:fs/promises",()=>require("node:fs/promises"))},22734,(e,t,r)=>{t.exports=e.x("fs",()=>require("fs"))},874,(e,t,r)=>{t.exports=e.x("buffer",()=>require("buffer"))},50227,(e,t,r)=>{t.exports=e.x("node:path",()=>require("node:path"))},2157,(e,t,r)=>{t.exports=e.x("node:fs",()=>require("node:fs"))},68239,e=>{"use strict";var t=e.i(44271),r=e.i(67708),a=e.i(14747),s=e.i(2157),n=e.i(92194);let i=(0,a.resolve)(process.cwd(),"../../specs");function o(e){return e?Array.isArray(e)?e.map(e=>String(e)):"string"==typeof e?[e]:[]:[]}async function c(e,c){let l=await t.specsService.getSpec(e,c);if(!l)return null;let p={...l,tags:l.tags?"string"==typeof l.tags?JSON.parse(l.tags):l.tags:null};if(!c){let e,t,c=(e=l.filePath.replace(/^specs\//,"").replace(/\/README\.md$/,""),(0,a.join)((t=process.env.SPECS_DIR)?t.startsWith("/")?t:(0,a.resolve)(process.cwd(),t):i,e)),u=(0,r.detectSubSpecs)(c),d=function(e){try{let t=(0,a.join)(e,"README.md"),r=(0,s.readFileSync)(t,"utf-8"),{data:i}=(0,n.default)(r),c=o(i?.depends_on??i?.dependsOn),l=o(i?.related);return{dependsOn:c,related:l}}catch(e){return console.warn("Unable to parse spec relationships",e),{dependsOn:[],related:[]}}}(c);return{...p,subSpecs:u,relationships:d}}return p}async function l(e){let r=await t.specsService.getAllSpecs(e),a=new Map,s=new Map;for(let e of r)e.status&&a.set(e.status,(a.get(e.status)||0)+1),e.priority&&s.set(e.priority,(s.get(e.priority)||0)+1);let n=a.get("complete")||0,i=r.length>0?n/r.length*100:0;return{totalProjects:1,totalSpecs:r.length,specsByStatus:Array.from(a.entries()).map(([e,t])=>({status:e,count:t})),specsByPriority:Array.from(s.entries()).map(([e,t])=>({priority:e,count:t})),completionRate:Math.round(10*i)/10}}e.s(["getSpecById",()=>c,"getStats",()=>l])},93695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},14747,(e,t,r)=>{t.exports=e.x("path",()=>require("path"))},18622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},32319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},24725,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/after-task-async-storage.external.js",()=>require("next/dist/server/app-render/after-task-async-storage.external.js"))},67708,e=>{"use strict";var t=e.i(22734),r=e.i(14747),a=e.i(92194);let s=[{pattern:/design|ui|ux|mockup|wireframe|prototype/i,iconName:"Palette",color:"text-purple-600"},{pattern:/architecture|structure|system|diagram/i,iconName:"Map",color:"text-indigo-600"},{pattern:/implementation|code|develop|build/i,iconName:"Code",color:"text-green-600"},{pattern:/api|endpoint|integration|interface/i,iconName:"Code",color:"text-blue-600"},{pattern:/test|qa|quality|validation/i,iconName:"TestTube",color:"text-orange-600"},{pattern:/task|todo|checklist|milestone/i,iconName:"CheckSquare",color:"text-gray-600"},{pattern:/config|setup|settings|environment/i,iconName:"Wrench",color:"text-yellow-600"},{pattern:/deploy|devops|ci|cd|pipeline|release/i,iconName:"Wrench",color:"text-orange-600"},{pattern:/migration|upgrade|refactor|transition/i,iconName:"GitBranch",color:"text-cyan-600"},{pattern:/security|auth|permission|access|encryption/i,iconName:"CheckSquare",color:"text-red-600"},{pattern:/performance|optimization|speed|cache|benchmark/i,iconName:"TrendingUp",color:"text-green-600"},{pattern:/database|data|schema|model|query/i,iconName:"FileText",color:"text-blue-600"},{pattern:/doc|guide|manual|reference/i,iconName:"FileText",color:"text-gray-500"},{pattern:/github|git|vcs|version/i,iconName:"GitBranch",color:"text-pink-600"}],n={iconName:"FileText",color:"text-gray-600"};function i(e){let i=[];if(!(0,t.existsSync)(e))return i;try{for(let o of(0,t.readdirSync)(e)){if("README.md"===o||!o.endsWith(".md"))continue;let c=(0,r.join)(e,o);if((0,t.statSync)(c).isFile())try{let e=(0,t.readFileSync)(c,"utf-8"),{content:r}=(0,a.default)(e),l=function(e){let t=e.replace(/\.md$/i,"");for(let{pattern:e,iconName:r,color:a}of s)if(e.test(t))return{iconName:r,color:a};return n}(o);i.push({name:o.replace(/\.md$/i,"").split(/[-_]/).map(e=>e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()).join(" "),file:o,iconName:l.iconName,color:l.color,content:r})}catch(e){console.error(`Error reading sub-spec ${o}:`,e)}}i.sort((e,t)=>e.file.localeCompare(t.file))}catch(t){console.error(`Error reading spec directory ${e}:`,t)}return i}e.s(["detectSubSpecs",()=>i])},44271,e=>{"use strict";var t=e.i(12714),r=e.i(50227),a=e.i(92194);let s=parseInt(process.env.CACHE_TTL||"60000",10);class n{cache=new Map;specsDir;constructor(e){this.specsDir=e||r.join(process.cwd(),"../../specs")}async getAllSpecs(){let e="__all_specs__",t=this.cache.get(e);if(t&&Date.now()<t.expiresAt)return t.data;let r=await this.loadSpecsFromFilesystem();return this.cache.set(e,{data:r,expiresAt:Date.now()+s}),r}async getSpec(e){let t=`spec:${e}`,r=this.cache.get(t);if(r&&Date.now()<r.expiresAt)return r.data;let a=parseInt(e.split("-")[0],10);if(isNaN(a))return null;let n=await this.loadSpecByNumber(a);return n&&this.cache.set(t,{data:n,expiresAt:Date.now()+s}),n}async getSpecsByStatus(e){return(await this.getAllSpecs()).filter(t=>t.status===e)}async searchSpecs(e){let t=await this.getAllSpecs(),r=e.toLowerCase();return t.filter(e=>e.specName.toLowerCase().includes(r)||e.title?.toLowerCase().includes(r)||e.contentMd.toLowerCase().includes(r))}invalidateCache(e){e?(this.cache.delete(`spec:${e}`),this.cache.delete("__all_specs__")):this.cache.clear()}async loadSpecsFromFilesystem(){let e=[];try{await t.access(this.specsDir)}catch{return[]}let a=/^(\d{2,})-/;for(let s of(await t.readdir(this.specsDir,{withFileTypes:!0})))if(s.isDirectory()&&"archived"!==s.name&&a.test(s.name)){let t=r.join(this.specsDir,s.name),a=await this.loadSpecFromDirectory(t,s.name);a&&e.push(a)}return e.sort((e,t)=>(e.specNumber||0)-(t.specNumber||0))}async loadSpecByNumber(e){try{await t.access(this.specsDir)}catch{return null}let a=await t.readdir(this.specsDir,{withFileTypes:!0}),s=RegExp(`^0*${e}-`);for(let e of a)if(e.isDirectory()&&s.test(e.name)){let t=r.join(this.specsDir,e.name);return await this.loadSpecFromDirectory(t,e.name)}return null}async loadSpecFromDirectory(e,s){let n=r.join(e,"README.md");try{let e=await t.readFile(n,"utf-8"),{data:r,content:i}=(0,a.default)(e);if(!r||!r.status)return null;let o=s.match(/^(\d+)/),c=o?parseInt(o[1],10):null,l=`fs-${s}`,p=r.created_at??r.created,u=r.updated_at??r.updated,d=r.completed_at??r.completed,h=e=>{if(!e)return null;let t=new Date(e);return isNaN(t.getTime())?null:t};return{id:l,projectId:"leanspec",specNumber:c,specName:s,title:this.extractTitle(i),status:r.status||"planned",priority:r.priority||null,tags:r.tags?JSON.stringify(r.tags):null,assignee:r.assignee||null,contentMd:i,contentHtml:null,createdAt:h(p),updatedAt:h(u),completedAt:h(d),filePath:`specs/${s}/README.md`,githubUrl:`https://github.com/codervisor/lean-spec/tree/main/specs/${s}/README.md`,syncedAt:new Date}}catch{return null}}extractTitle(e){for(let t of e.split("\n")){let e=t.match(/^#\s+(.+)$/);if(e)return e[1].trim()}return null}}let i=null,o=new class{filesystemSource;databaseSource;mode;constructor(){if(this.mode=process.env.SPECS_MODE||"filesystem","filesystem"===this.mode||"both"===this.mode){const e=process.env.SPECS_DIR;this.filesystemSource=new n(e)}}async getDatabaseSource(){if(!this.databaseSource){if(!i){let{DatabaseSource:t}=await e.A(14430);i=t}this.databaseSource=new i}return this.databaseSource}async getAllSpecs(e){let t=await this.getSource(e);return await t.getAllSpecs(e)}async getSpec(e,t){let r=await this.getSource(t);return await r.getSpec(e,t)}async getSpecsByStatus(e,t){let r=await this.getSource(t);return await r.getSpecsByStatus(e,t)}async searchSpecs(e,t){let r=await this.getSource(t);return await r.searchSpecs(e,t)}async invalidateCache(e,t){(await this.getSource(t)).invalidateCache(e)}async getSource(e){if(e&&("database"===this.mode||"both"===this.mode))return await this.getDatabaseSource();if(this.filesystemSource)return this.filesystemSource;throw Error("No spec source configured")}};e.s(["specsService",0,o],44271)},17664,e=>{"use strict";var t=e.i(6169),r=e.i(25864),a=e.i(71648),s=e.i(30064),n=e.i(74222),i=e.i(2043),o=e.i(71408),c=e.i(26527),l=e.i(30592),p=e.i(34639),u=e.i(88935),d=e.i(68515),h=e.i(87166),m=e.i(76718),f=e.i(76529),g=e.i(51151),y=e.i(93695);e.i(59704);var x=e.i(8259),w=e.i(31511),S=e.i(68239);async function v(e,{params:t}){try{let{id:e}=await t,r=await (0,S.getSpecById)(e);if(!r)return w.NextResponse.json({error:"Spec not found"},{status:404});return w.NextResponse.json({spec:r},{headers:{"Cache-Control":"public, s-maxage=60, stale-while-revalidate=120"}})}catch(e){return console.error("Error fetching spec:",e),w.NextResponse.json({error:"Failed to fetch spec"},{status:500})}}e.s(["GET",()=>v],8728);var R=e.i(8728);let E=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/specs/[id]/route",pathname:"/api/specs/[id]",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/packages/ui/src/app/api/specs/[id]/route.ts",nextConfigOutput:"standalone",userland:R}),{workAsyncStorage:b,workUnitAsyncStorage:A,serverHooks:C}=E;function N(){return(0,a.patchFetch)({workAsyncStorage:b,workUnitAsyncStorage:A})}async function _(e,t,a){E.isDev&&(0,s.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let w="/api/specs/[id]/route";w=w.replace(/\/index$/,"")||"/";let S=await E.prepare(e,t,{srcPage:w,multiZoneDraftMode:!1});if(!S)return t.statusCode=400,t.end("Bad Request"),null==a.waitUntil||a.waitUntil.call(a,Promise.resolve()),null;let{buildId:v,params:R,nextConfig:b,parsedUrl:A,isDraftMode:C,prerenderManifest:N,routerServerContext:_,isOnDemandRevalidate:D,revalidateOnlyGenerated:T,resolvedPathname:j,clientReferenceManifest:k,serverActionsManifest:P}=S,q=(0,c.normalizeAppPath)(w),M=!!(N.dynamicRoutes[q]||N.routes[j]),O=async()=>((null==_?void 0:_.render404)?await _.render404(e,t,A,!1):t.end("This page could not be found"),null);if(M&&!C){let e=!!N.routes[j],t=N.dynamicRoutes[q];if(t&&!1===t.fallback&&!e){if(b.experimental.adapterPath)return await O();throw new y.NoFallbackError}}let F=null;!M||E.isDev||C||(F="/index"===(F=j)?"/":F);let I=!0===E.isDev||!M,$=M&&!I;P&&k&&(0,i.setReferenceManifestsSingleton)({page:w,clientReferenceManifest:k,serverActionsManifest:P,serverModuleMap:(0,o.createServerModuleMap)({serverActionsManifest:P})});let U=e.method||"GET",H=(0,n.getTracer)(),B=H.getActiveScopeSpan(),L={params:R,prerenderManifest:N,renderOpts:{experimental:{authInterrupts:!!b.experimental.authInterrupts},cacheComponents:!!b.cacheComponents,supportsDynamicResponse:I,incrementalCache:(0,s.getRequestMeta)(e,"incrementalCache"),cacheLifeProfiles:b.cacheLife,waitUntil:a.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,a)=>E.onRequestError(e,t,a,_)},sharedContext:{buildId:v}},K=new l.NodeNextRequest(e),G=new l.NodeNextResponse(t),W=p.NextRequestAdapter.fromNodeNextRequest(K,(0,p.signalFromNodeResponse)(t));try{let i=async e=>E.handle(W,L).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let r=H.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==u.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${r.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let a=r.get("next.route");if(a){let t=`${U} ${a}`;e.setAttributes({"next.route":a,"http.route":a,"next.span_name":t}),e.updateName(t)}else e.updateName(`${U} ${w}`)}),o=!!(0,s.getRequestMeta)(e,"minimalMode"),c=async s=>{var n,c;let l=async({previousCacheEntry:r})=>{try{if(!o&&D&&T&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let n=await i(s);e.fetchMetrics=L.renderOpts.fetchMetrics;let c=L.renderOpts.pendingWaitUntil;c&&a.waitUntil&&(a.waitUntil(c),c=void 0);let l=L.renderOpts.collectedTags;if(!M)return await (0,h.sendResponse)(K,G,n,L.renderOpts.pendingWaitUntil),null;{let e=await n.blob(),t=(0,m.toNodeOutgoingHttpHeaders)(n.headers);l&&(t[g.NEXT_CACHE_TAGS_HEADER]=l),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==L.renderOpts.collectedRevalidate&&!(L.renderOpts.collectedRevalidate>=g.INFINITE_CACHE)&&L.renderOpts.collectedRevalidate,a=void 0===L.renderOpts.collectedExpire||L.renderOpts.collectedExpire>=g.INFINITE_CACHE?void 0:L.renderOpts.collectedExpire;return{value:{kind:x.CachedRouteKind.APP_ROUTE,status:n.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:a}}}}catch(t){throw(null==r?void 0:r.isStale)&&await E.onRequestError(e,t,{routerKind:"App Router",routePath:w,routeType:"route",revalidateReason:(0,d.getRevalidateReason)({isStaticGeneration:$,isOnDemandRevalidate:D})},_),t}},p=await E.handleResponse({req:e,nextConfig:b,cacheKey:F,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:N,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:T,responseGenerator:l,waitUntil:a.waitUntil,isMinimalMode:o});if(!M)return null;if((null==p||null==(n=p.value)?void 0:n.kind)!==x.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==p||null==(c=p.value)?void 0:c.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});o||t.setHeader("x-nextjs-cache",D?"REVALIDATED":p.isMiss?"MISS":p.isStale?"STALE":"HIT"),C&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let u=(0,m.fromNodeOutgoingHttpHeaders)(p.value.headers);return o&&M||u.delete(g.NEXT_CACHE_TAGS_HEADER),!p.cacheControl||t.getHeader("Cache-Control")||u.get("Cache-Control")||u.set("Cache-Control",(0,f.getCacheControlHeader)(p.cacheControl)),await (0,h.sendResponse)(K,G,new Response(p.value.body,{headers:u,status:p.value.status||200})),null};B?await c(B):await H.withPropagatedContext(e.headers,()=>H.trace(u.BaseServerSpan.handleRequest,{spanName:`${U} ${w}`,kind:n.SpanKind.SERVER,attributes:{"http.method":U,"http.target":e.url}},c))}catch(t){if(t instanceof y.NoFallbackError||await E.onRequestError(e,t,{routerKind:"App Router",routePath:q,routeType:"route",revalidateReason:(0,d.getRevalidateReason)({isStaticGeneration:$,isOnDemandRevalidate:D})}),M)throw t;return await (0,h.sendResponse)(K,G,new Response(null,{status:500})),null}}e.s(["handler",()=>_,"patchFetch",()=>N,"routeModule",()=>E,"serverHooks",()=>C,"workAsyncStorage",()=>b,"workUnitAsyncStorage",()=>A],17664)},14430,e=>{e.v(t=>Promise.all(["server/chunks/[root-of-the-server]__ae726e9c._.js","server/chunks/packages_ui_src_lib_db_index_ts_556307fa._.js"].map(t=>e.l(t))).then(()=>t(18146)))}];
2
2
 
3
- //# sourceMappingURL=%5Broot-of-the-server%5D__6ec5cafb._.js.map
3
+ //# sourceMappingURL=%5Broot-of-the-server%5D__9fda1bdb._.js.map
@@ -1,3 +1,3 @@
1
- module.exports=[93695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},18622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},32319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},24725,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/after-task-async-storage.external.js",()=>require("next/dist/server/app-render/after-task-async-storage.external.js"))},14747,(e,t,r)=>{t.exports=e.x("path",()=>require("path"))},22734,(e,t,r)=>{t.exports=e.x("fs",()=>require("fs"))},874,(e,t,r)=>{t.exports=e.x("buffer",()=>require("buffer"))},67708,e=>{"use strict";var t=e.i(22734),r=e.i(14747),a=e.i(92194);let n=[{pattern:/design|ui|ux|mockup|wireframe|prototype/i,iconName:"Palette",color:"text-purple-600"},{pattern:/architecture|structure|system|diagram/i,iconName:"Map",color:"text-indigo-600"},{pattern:/implementation|code|develop|build/i,iconName:"Code",color:"text-green-600"},{pattern:/api|endpoint|integration|interface/i,iconName:"Code",color:"text-blue-600"},{pattern:/test|qa|quality|validation/i,iconName:"TestTube",color:"text-orange-600"},{pattern:/task|todo|checklist|milestone/i,iconName:"CheckSquare",color:"text-gray-600"},{pattern:/config|setup|settings|environment/i,iconName:"Wrench",color:"text-yellow-600"},{pattern:/deploy|devops|ci|cd|pipeline|release/i,iconName:"Wrench",color:"text-orange-600"},{pattern:/migration|upgrade|refactor|transition/i,iconName:"GitBranch",color:"text-cyan-600"},{pattern:/security|auth|permission|access|encryption/i,iconName:"CheckSquare",color:"text-red-600"},{pattern:/performance|optimization|speed|cache|benchmark/i,iconName:"TrendingUp",color:"text-green-600"},{pattern:/database|data|schema|model|query/i,iconName:"FileText",color:"text-blue-600"},{pattern:/doc|guide|manual|reference/i,iconName:"FileText",color:"text-gray-500"},{pattern:/github|git|vcs|version/i,iconName:"GitBranch",color:"text-pink-600"}],o={iconName:"FileText",color:"text-gray-600"};function i(e){let i=[];if(!(0,t.existsSync)(e))return i;try{for(let s of(0,t.readdirSync)(e)){if("README.md"===s||!s.endsWith(".md"))continue;let c=(0,r.join)(e,s);if((0,t.statSync)(c).isFile())try{let e=(0,t.readFileSync)(c,"utf-8"),{content:r}=(0,a.default)(e),l=function(e){let t=e.replace(/\.md$/i,"");for(let{pattern:e,iconName:r,color:a}of n)if(e.test(t))return{iconName:r,color:a};return o}(s);i.push({name:s.replace(/\.md$/i,"").split(/[-_]/).map(e=>e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()).join(" "),file:s,iconName:l.iconName,color:l.color,content:r})}catch(e){console.error(`Error reading sub-spec ${s}:`,e)}}i.sort((e,t)=>e.file.localeCompare(t.file))}catch(t){console.error(`Error reading spec directory ${e}:`,t)}return i}e.s(["detectSubSpecs",()=>i])},25372,(e,t,r)=>{t.exports=e.x("better-sqlite3",()=>require("better-sqlite3"))},50306,e=>{"use strict";var t=e.i(5271),r=e.i(31585),a=e.i(22124),n=e.i(79174);async function o(){return await t.db.select().from(r.schema.projects).orderBy((0,n.desc)(r.schema.projects.isFeatured),r.schema.projects.displayName)}async function i(e){return(await t.db.select().from(r.schema.specs).where((0,a.eq)(r.schema.specs.projectId,e)).orderBy(r.schema.specs.specNumber)).map(e=>({...e,tags:e.tags?JSON.parse(e.tags):null}))}e.i(67708),e.i(14747),e.s(["getProjects",()=>o,"getSpecsByProjectId",()=>i])},90287,e=>{"use strict";var t=e.i(6169),r=e.i(25864),a=e.i(71648),n=e.i(30064),o=e.i(74222),i=e.i(2043),s=e.i(71408),c=e.i(26527),l=e.i(30592),p=e.i(34639),d=e.i(88935),u=e.i(68515),h=e.i(87166),x=e.i(76718),m=e.i(76529),f=e.i(51151),g=e.i(93695);e.i(59704);var v=e.i(8259),R=e.i(31511),y=e.i(50306);async function w(e,{params:t}){try{let{id:e}=await t,r=await (0,y.getSpecsByProjectId)(e);return R.NextResponse.json({specs:r})}catch(e){return console.error("Error fetching specs:",e),R.NextResponse.json({error:"Failed to fetch specs"},{status:500})}}e.s(["GET",()=>w],41264);var E=e.i(41264);let N=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/projects/[id]/specs/route",pathname:"/api/projects/[id]/specs",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/packages/ui/src/app/api/projects/[id]/specs/route.ts",nextConfigOutput:"standalone",userland:E}),{workAsyncStorage:b,workUnitAsyncStorage:C,serverHooks:j}=N;function q(){return(0,a.patchFetch)({workAsyncStorage:b,workUnitAsyncStorage:C})}async function A(e,t,a){N.isDev&&(0,n.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let R="/api/projects/[id]/specs/route";R=R.replace(/\/index$/,"")||"/";let y=await N.prepare(e,t,{srcPage:R,multiZoneDraftMode:!1});if(!y)return t.statusCode=400,t.end("Bad Request"),null==a.waitUntil||a.waitUntil.call(a,Promise.resolve()),null;let{buildId:w,params:E,nextConfig:b,parsedUrl:C,isDraftMode:j,prerenderManifest:q,routerServerContext:A,isOnDemandRevalidate:S,revalidateOnlyGenerated:T,resolvedPathname:k,clientReferenceManifest:P,serverActionsManifest:O}=y,_=(0,c.normalizeAppPath)(R),I=!!(q.dynamicRoutes[_]||q.routes[k]),M=async()=>((null==A?void 0:A.render404)?await A.render404(e,t,C,!1):t.end("This page could not be found"),null);if(I&&!j){let e=!!q.routes[k],t=q.dynamicRoutes[_];if(t&&!1===t.fallback&&!e){if(b.experimental.adapterPath)return await M();throw new g.NoFallbackError}}let U=null;!I||N.isDev||j||(U="/index"===(U=k)?"/":U);let H=!0===N.isDev||!I,F=I&&!H;O&&P&&(0,i.setReferenceManifestsSingleton)({page:R,clientReferenceManifest:P,serverActionsManifest:O,serverModuleMap:(0,s.createServerModuleMap)({serverActionsManifest:O})});let D=e.method||"GET",$=(0,o.getTracer)(),B=$.getActiveScopeSpan(),K={params:E,prerenderManifest:q,renderOpts:{experimental:{authInterrupts:!!b.experimental.authInterrupts},cacheComponents:!!b.cacheComponents,supportsDynamicResponse:H,incrementalCache:(0,n.getRequestMeta)(e,"incrementalCache"),cacheLifeProfiles:b.cacheLife,waitUntil:a.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,a)=>N.onRequestError(e,t,a,A)},sharedContext:{buildId:w}},G=new l.NodeNextRequest(e),L=new l.NodeNextResponse(t),W=p.NextRequestAdapter.fromNodeNextRequest(G,(0,p.signalFromNodeResponse)(t));try{let i=async e=>N.handle(W,K).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let r=$.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==d.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${r.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let a=r.get("next.route");if(a){let t=`${D} ${a}`;e.setAttributes({"next.route":a,"http.route":a,"next.span_name":t}),e.updateName(t)}else e.updateName(`${D} ${R}`)}),s=!!(0,n.getRequestMeta)(e,"minimalMode"),c=async n=>{var o,c;let l=async({previousCacheEntry:r})=>{try{if(!s&&S&&T&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let o=await i(n);e.fetchMetrics=K.renderOpts.fetchMetrics;let c=K.renderOpts.pendingWaitUntil;c&&a.waitUntil&&(a.waitUntil(c),c=void 0);let l=K.renderOpts.collectedTags;if(!I)return await (0,h.sendResponse)(G,L,o,K.renderOpts.pendingWaitUntil),null;{let e=await o.blob(),t=(0,x.toNodeOutgoingHttpHeaders)(o.headers);l&&(t[f.NEXT_CACHE_TAGS_HEADER]=l),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==K.renderOpts.collectedRevalidate&&!(K.renderOpts.collectedRevalidate>=f.INFINITE_CACHE)&&K.renderOpts.collectedRevalidate,a=void 0===K.renderOpts.collectedExpire||K.renderOpts.collectedExpire>=f.INFINITE_CACHE?void 0:K.renderOpts.collectedExpire;return{value:{kind:v.CachedRouteKind.APP_ROUTE,status:o.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:a}}}}catch(t){throw(null==r?void 0:r.isStale)&&await N.onRequestError(e,t,{routerKind:"App Router",routePath:R,routeType:"route",revalidateReason:(0,u.getRevalidateReason)({isStaticGeneration:F,isOnDemandRevalidate:S})},A),t}},p=await N.handleResponse({req:e,nextConfig:b,cacheKey:U,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:q,isRoutePPREnabled:!1,isOnDemandRevalidate:S,revalidateOnlyGenerated:T,responseGenerator:l,waitUntil:a.waitUntil,isMinimalMode:s});if(!I)return null;if((null==p||null==(o=p.value)?void 0:o.kind)!==v.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==p||null==(c=p.value)?void 0:c.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});s||t.setHeader("x-nextjs-cache",S?"REVALIDATED":p.isMiss?"MISS":p.isStale?"STALE":"HIT"),j&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let d=(0,x.fromNodeOutgoingHttpHeaders)(p.value.headers);return s&&I||d.delete(f.NEXT_CACHE_TAGS_HEADER),!p.cacheControl||t.getHeader("Cache-Control")||d.get("Cache-Control")||d.set("Cache-Control",(0,m.getCacheControlHeader)(p.cacheControl)),await (0,h.sendResponse)(G,L,new Response(p.value.body,{headers:d,status:p.value.status||200})),null};B?await c(B):await $.withPropagatedContext(e.headers,()=>$.trace(d.BaseServerSpan.handleRequest,{spanName:`${D} ${R}`,kind:o.SpanKind.SERVER,attributes:{"http.method":D,"http.target":e.url}},c))}catch(t){if(t instanceof g.NoFallbackError||await N.onRequestError(e,t,{routerKind:"App Router",routePath:_,routeType:"route",revalidateReason:(0,u.getRevalidateReason)({isStaticGeneration:F,isOnDemandRevalidate:S})}),I)throw t;return await (0,h.sendResponse)(G,L,new Response(null,{status:500})),null}}e.s(["handler",()=>A,"patchFetch",()=>q,"routeModule",()=>N,"serverHooks",()=>j,"workAsyncStorage",()=>b,"workUnitAsyncStorage",()=>C],90287)}];
1
+ module.exports=[93695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},14747,(e,t,r)=>{t.exports=e.x("path",()=>require("path"))},18622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},32319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},24725,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/after-task-async-storage.external.js",()=>require("next/dist/server/app-render/after-task-async-storage.external.js"))},22734,(e,t,r)=>{t.exports=e.x("fs",()=>require("fs"))},874,(e,t,r)=>{t.exports=e.x("buffer",()=>require("buffer"))},67708,e=>{"use strict";var t=e.i(22734),r=e.i(14747),a=e.i(92194);let n=[{pattern:/design|ui|ux|mockup|wireframe|prototype/i,iconName:"Palette",color:"text-purple-600"},{pattern:/architecture|structure|system|diagram/i,iconName:"Map",color:"text-indigo-600"},{pattern:/implementation|code|develop|build/i,iconName:"Code",color:"text-green-600"},{pattern:/api|endpoint|integration|interface/i,iconName:"Code",color:"text-blue-600"},{pattern:/test|qa|quality|validation/i,iconName:"TestTube",color:"text-orange-600"},{pattern:/task|todo|checklist|milestone/i,iconName:"CheckSquare",color:"text-gray-600"},{pattern:/config|setup|settings|environment/i,iconName:"Wrench",color:"text-yellow-600"},{pattern:/deploy|devops|ci|cd|pipeline|release/i,iconName:"Wrench",color:"text-orange-600"},{pattern:/migration|upgrade|refactor|transition/i,iconName:"GitBranch",color:"text-cyan-600"},{pattern:/security|auth|permission|access|encryption/i,iconName:"CheckSquare",color:"text-red-600"},{pattern:/performance|optimization|speed|cache|benchmark/i,iconName:"TrendingUp",color:"text-green-600"},{pattern:/database|data|schema|model|query/i,iconName:"FileText",color:"text-blue-600"},{pattern:/doc|guide|manual|reference/i,iconName:"FileText",color:"text-gray-500"},{pattern:/github|git|vcs|version/i,iconName:"GitBranch",color:"text-pink-600"}],o={iconName:"FileText",color:"text-gray-600"};function i(e){let i=[];if(!(0,t.existsSync)(e))return i;try{for(let s of(0,t.readdirSync)(e)){if("README.md"===s||!s.endsWith(".md"))continue;let c=(0,r.join)(e,s);if((0,t.statSync)(c).isFile())try{let e=(0,t.readFileSync)(c,"utf-8"),{content:r}=(0,a.default)(e),l=function(e){let t=e.replace(/\.md$/i,"");for(let{pattern:e,iconName:r,color:a}of n)if(e.test(t))return{iconName:r,color:a};return o}(s);i.push({name:s.replace(/\.md$/i,"").split(/[-_]/).map(e=>e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()).join(" "),file:s,iconName:l.iconName,color:l.color,content:r})}catch(e){console.error(`Error reading sub-spec ${s}:`,e)}}i.sort((e,t)=>e.file.localeCompare(t.file))}catch(t){console.error(`Error reading spec directory ${e}:`,t)}return i}e.s(["detectSubSpecs",()=>i])},25372,(e,t,r)=>{t.exports=e.x("better-sqlite3",()=>require("better-sqlite3"))},50306,e=>{"use strict";var t=e.i(5271),r=e.i(31585),a=e.i(22124),n=e.i(79174);async function o(){return await t.db.select().from(r.schema.projects).orderBy((0,n.desc)(r.schema.projects.isFeatured),r.schema.projects.displayName)}async function i(e){return(await t.db.select().from(r.schema.specs).where((0,a.eq)(r.schema.specs.projectId,e)).orderBy(r.schema.specs.specNumber)).map(e=>({...e,tags:e.tags?JSON.parse(e.tags):null}))}e.i(67708),e.i(14747),e.s(["getProjects",()=>o,"getSpecsByProjectId",()=>i])},90287,e=>{"use strict";var t=e.i(6169),r=e.i(25864),a=e.i(71648),n=e.i(30064),o=e.i(74222),i=e.i(2043),s=e.i(71408),c=e.i(26527),l=e.i(30592),p=e.i(34639),d=e.i(88935),u=e.i(68515),h=e.i(87166),x=e.i(76718),m=e.i(76529),f=e.i(51151),g=e.i(93695);e.i(59704);var v=e.i(8259),R=e.i(31511),y=e.i(50306);async function w(e,{params:t}){try{let{id:e}=await t,r=await (0,y.getSpecsByProjectId)(e);return R.NextResponse.json({specs:r})}catch(e){return console.error("Error fetching specs:",e),R.NextResponse.json({error:"Failed to fetch specs"},{status:500})}}e.s(["GET",()=>w],41264);var E=e.i(41264);let N=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/projects/[id]/specs/route",pathname:"/api/projects/[id]/specs",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/packages/ui/src/app/api/projects/[id]/specs/route.ts",nextConfigOutput:"standalone",userland:E}),{workAsyncStorage:b,workUnitAsyncStorage:C,serverHooks:j}=N;function q(){return(0,a.patchFetch)({workAsyncStorage:b,workUnitAsyncStorage:C})}async function A(e,t,a){N.isDev&&(0,n.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let R="/api/projects/[id]/specs/route";R=R.replace(/\/index$/,"")||"/";let y=await N.prepare(e,t,{srcPage:R,multiZoneDraftMode:!1});if(!y)return t.statusCode=400,t.end("Bad Request"),null==a.waitUntil||a.waitUntil.call(a,Promise.resolve()),null;let{buildId:w,params:E,nextConfig:b,parsedUrl:C,isDraftMode:j,prerenderManifest:q,routerServerContext:A,isOnDemandRevalidate:S,revalidateOnlyGenerated:T,resolvedPathname:k,clientReferenceManifest:P,serverActionsManifest:O}=y,_=(0,c.normalizeAppPath)(R),I=!!(q.dynamicRoutes[_]||q.routes[k]),M=async()=>((null==A?void 0:A.render404)?await A.render404(e,t,C,!1):t.end("This page could not be found"),null);if(I&&!j){let e=!!q.routes[k],t=q.dynamicRoutes[_];if(t&&!1===t.fallback&&!e){if(b.experimental.adapterPath)return await M();throw new g.NoFallbackError}}let U=null;!I||N.isDev||j||(U="/index"===(U=k)?"/":U);let H=!0===N.isDev||!I,F=I&&!H;O&&P&&(0,i.setReferenceManifestsSingleton)({page:R,clientReferenceManifest:P,serverActionsManifest:O,serverModuleMap:(0,s.createServerModuleMap)({serverActionsManifest:O})});let D=e.method||"GET",$=(0,o.getTracer)(),B=$.getActiveScopeSpan(),K={params:E,prerenderManifest:q,renderOpts:{experimental:{authInterrupts:!!b.experimental.authInterrupts},cacheComponents:!!b.cacheComponents,supportsDynamicResponse:H,incrementalCache:(0,n.getRequestMeta)(e,"incrementalCache"),cacheLifeProfiles:b.cacheLife,waitUntil:a.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,a)=>N.onRequestError(e,t,a,A)},sharedContext:{buildId:w}},G=new l.NodeNextRequest(e),L=new l.NodeNextResponse(t),W=p.NextRequestAdapter.fromNodeNextRequest(G,(0,p.signalFromNodeResponse)(t));try{let i=async e=>N.handle(W,K).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let r=$.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==d.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${r.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let a=r.get("next.route");if(a){let t=`${D} ${a}`;e.setAttributes({"next.route":a,"http.route":a,"next.span_name":t}),e.updateName(t)}else e.updateName(`${D} ${R}`)}),s=!!(0,n.getRequestMeta)(e,"minimalMode"),c=async n=>{var o,c;let l=async({previousCacheEntry:r})=>{try{if(!s&&S&&T&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let o=await i(n);e.fetchMetrics=K.renderOpts.fetchMetrics;let c=K.renderOpts.pendingWaitUntil;c&&a.waitUntil&&(a.waitUntil(c),c=void 0);let l=K.renderOpts.collectedTags;if(!I)return await (0,h.sendResponse)(G,L,o,K.renderOpts.pendingWaitUntil),null;{let e=await o.blob(),t=(0,x.toNodeOutgoingHttpHeaders)(o.headers);l&&(t[f.NEXT_CACHE_TAGS_HEADER]=l),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==K.renderOpts.collectedRevalidate&&!(K.renderOpts.collectedRevalidate>=f.INFINITE_CACHE)&&K.renderOpts.collectedRevalidate,a=void 0===K.renderOpts.collectedExpire||K.renderOpts.collectedExpire>=f.INFINITE_CACHE?void 0:K.renderOpts.collectedExpire;return{value:{kind:v.CachedRouteKind.APP_ROUTE,status:o.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:a}}}}catch(t){throw(null==r?void 0:r.isStale)&&await N.onRequestError(e,t,{routerKind:"App Router",routePath:R,routeType:"route",revalidateReason:(0,u.getRevalidateReason)({isStaticGeneration:F,isOnDemandRevalidate:S})},A),t}},p=await N.handleResponse({req:e,nextConfig:b,cacheKey:U,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:q,isRoutePPREnabled:!1,isOnDemandRevalidate:S,revalidateOnlyGenerated:T,responseGenerator:l,waitUntil:a.waitUntil,isMinimalMode:s});if(!I)return null;if((null==p||null==(o=p.value)?void 0:o.kind)!==v.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==p||null==(c=p.value)?void 0:c.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});s||t.setHeader("x-nextjs-cache",S?"REVALIDATED":p.isMiss?"MISS":p.isStale?"STALE":"HIT"),j&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let d=(0,x.fromNodeOutgoingHttpHeaders)(p.value.headers);return s&&I||d.delete(f.NEXT_CACHE_TAGS_HEADER),!p.cacheControl||t.getHeader("Cache-Control")||d.get("Cache-Control")||d.set("Cache-Control",(0,m.getCacheControlHeader)(p.cacheControl)),await (0,h.sendResponse)(G,L,new Response(p.value.body,{headers:d,status:p.value.status||200})),null};B?await c(B):await $.withPropagatedContext(e.headers,()=>$.trace(d.BaseServerSpan.handleRequest,{spanName:`${D} ${R}`,kind:o.SpanKind.SERVER,attributes:{"http.method":D,"http.target":e.url}},c))}catch(t){if(t instanceof g.NoFallbackError||await N.onRequestError(e,t,{routerKind:"App Router",routePath:_,routeType:"route",revalidateReason:(0,u.getRevalidateReason)({isStaticGeneration:F,isOnDemandRevalidate:S})}),I)throw t;return await (0,h.sendResponse)(G,L,new Response(null,{status:500})),null}}e.s(["handler",()=>A,"patchFetch",()=>q,"routeModule",()=>N,"serverHooks",()=>j,"workAsyncStorage",()=>b,"workUnitAsyncStorage",()=>C],90287)}];
2
2
 
3
- //# sourceMappingURL=%5Broot-of-the-server%5D__d169fe70._.js.map
3
+ //# sourceMappingURL=%5Broot-of-the-server%5D__d1d92c7c._.js.map
@@ -1,3 +1,3 @@
1
- module.exports=[12714,(e,t,r)=>{t.exports=e.x("node:fs/promises",()=>require("node:fs/promises"))},22734,(e,t,r)=>{t.exports=e.x("fs",()=>require("fs"))},874,(e,t,r)=>{t.exports=e.x("buffer",()=>require("buffer"))},50227,(e,t,r)=>{t.exports=e.x("node:path",()=>require("node:path"))},2157,(e,t,r)=>{t.exports=e.x("node:fs",()=>require("node:fs"))},68239,e=>{"use strict";var t=e.i(44271),r=e.i(67708),a=e.i(14747),s=e.i(2157),n=e.i(92194);let i=(0,a.resolve)(process.cwd(),"../../specs");function o(e){return e?Array.isArray(e)?e.map(e=>String(e)):"string"==typeof e?[e]:[]:[]}async function c(e,c){let l=await t.specsService.getSpec(e,c);if(!l)return null;let p={...l,tags:l.tags?"string"==typeof l.tags?JSON.parse(l.tags):l.tags:null};if(!c){let e,t,c=(e=l.filePath.replace(/^specs\//,"").replace(/\/README\.md$/,""),(0,a.join)((t=process.env.SPECS_DIR)?t.startsWith("/")?t:(0,a.resolve)(process.cwd(),t):i,e)),u=(0,r.detectSubSpecs)(c),d=function(e){try{let t=(0,a.join)(e,"README.md"),r=(0,s.readFileSync)(t,"utf-8"),{data:i}=(0,n.default)(r),c=o(i?.depends_on??i?.dependsOn),l=o(i?.related);return{dependsOn:c,related:l}}catch(e){return console.warn("Unable to parse spec relationships",e),{dependsOn:[],related:[]}}}(c);return{...p,subSpecs:u,relationships:d}}return p}async function l(e){let r=await t.specsService.getAllSpecs(e),a=new Map,s=new Map;for(let e of r)e.status&&a.set(e.status,(a.get(e.status)||0)+1),e.priority&&s.set(e.priority,(s.get(e.priority)||0)+1);let n=a.get("complete")||0,i=r.length>0?n/r.length*100:0;return{totalProjects:1,totalSpecs:r.length,specsByStatus:Array.from(a.entries()).map(([e,t])=>({status:e,count:t})),specsByPriority:Array.from(s.entries()).map(([e,t])=>({priority:e,count:t})),completionRate:Math.round(10*i)/10}}e.s(["getSpecById",()=>c,"getStats",()=>l])},93695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},18622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},32319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},24725,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/after-task-async-storage.external.js",()=>require("next/dist/server/app-render/after-task-async-storage.external.js"))},14747,(e,t,r)=>{t.exports=e.x("path",()=>require("path"))},67708,e=>{"use strict";var t=e.i(22734),r=e.i(14747),a=e.i(92194);let s=[{pattern:/design|ui|ux|mockup|wireframe|prototype/i,iconName:"Palette",color:"text-purple-600"},{pattern:/architecture|structure|system|diagram/i,iconName:"Map",color:"text-indigo-600"},{pattern:/implementation|code|develop|build/i,iconName:"Code",color:"text-green-600"},{pattern:/api|endpoint|integration|interface/i,iconName:"Code",color:"text-blue-600"},{pattern:/test|qa|quality|validation/i,iconName:"TestTube",color:"text-orange-600"},{pattern:/task|todo|checklist|milestone/i,iconName:"CheckSquare",color:"text-gray-600"},{pattern:/config|setup|settings|environment/i,iconName:"Wrench",color:"text-yellow-600"},{pattern:/deploy|devops|ci|cd|pipeline|release/i,iconName:"Wrench",color:"text-orange-600"},{pattern:/migration|upgrade|refactor|transition/i,iconName:"GitBranch",color:"text-cyan-600"},{pattern:/security|auth|permission|access|encryption/i,iconName:"CheckSquare",color:"text-red-600"},{pattern:/performance|optimization|speed|cache|benchmark/i,iconName:"TrendingUp",color:"text-green-600"},{pattern:/database|data|schema|model|query/i,iconName:"FileText",color:"text-blue-600"},{pattern:/doc|guide|manual|reference/i,iconName:"FileText",color:"text-gray-500"},{pattern:/github|git|vcs|version/i,iconName:"GitBranch",color:"text-pink-600"}],n={iconName:"FileText",color:"text-gray-600"};function i(e){let i=[];if(!(0,t.existsSync)(e))return i;try{for(let o of(0,t.readdirSync)(e)){if("README.md"===o||!o.endsWith(".md"))continue;let c=(0,r.join)(e,o);if((0,t.statSync)(c).isFile())try{let e=(0,t.readFileSync)(c,"utf-8"),{content:r}=(0,a.default)(e),l=function(e){let t=e.replace(/\.md$/i,"");for(let{pattern:e,iconName:r,color:a}of s)if(e.test(t))return{iconName:r,color:a};return n}(o);i.push({name:o.replace(/\.md$/i,"").split(/[-_]/).map(e=>e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()).join(" "),file:o,iconName:l.iconName,color:l.color,content:r})}catch(e){console.error(`Error reading sub-spec ${o}:`,e)}}i.sort((e,t)=>e.file.localeCompare(t.file))}catch(t){console.error(`Error reading spec directory ${e}:`,t)}return i}e.s(["detectSubSpecs",()=>i])},44271,e=>{"use strict";var t=e.i(12714),r=e.i(50227),a=e.i(92194);let s=parseInt(process.env.CACHE_TTL||"60000",10);class n{cache=new Map;specsDir;constructor(e){this.specsDir=e||r.join(process.cwd(),"../../specs")}async getAllSpecs(){let e="__all_specs__",t=this.cache.get(e);if(t&&Date.now()<t.expiresAt)return t.data;let r=await this.loadSpecsFromFilesystem();return this.cache.set(e,{data:r,expiresAt:Date.now()+s}),r}async getSpec(e){let t=`spec:${e}`,r=this.cache.get(t);if(r&&Date.now()<r.expiresAt)return r.data;let a=parseInt(e.split("-")[0],10);if(isNaN(a))return null;let n=await this.loadSpecByNumber(a);return n&&this.cache.set(t,{data:n,expiresAt:Date.now()+s}),n}async getSpecsByStatus(e){return(await this.getAllSpecs()).filter(t=>t.status===e)}async searchSpecs(e){let t=await this.getAllSpecs(),r=e.toLowerCase();return t.filter(e=>e.specName.toLowerCase().includes(r)||e.title?.toLowerCase().includes(r)||e.contentMd.toLowerCase().includes(r))}invalidateCache(e){e?(this.cache.delete(`spec:${e}`),this.cache.delete("__all_specs__")):this.cache.clear()}async loadSpecsFromFilesystem(){let e=[];try{await t.access(this.specsDir)}catch{return[]}let a=/^(\d{2,})-/;for(let s of(await t.readdir(this.specsDir,{withFileTypes:!0})))if(s.isDirectory()&&"archived"!==s.name&&a.test(s.name)){let t=r.join(this.specsDir,s.name),a=await this.loadSpecFromDirectory(t,s.name);a&&e.push(a)}return e.sort((e,t)=>(e.specNumber||0)-(t.specNumber||0))}async loadSpecByNumber(e){try{await t.access(this.specsDir)}catch{return null}let a=await t.readdir(this.specsDir,{withFileTypes:!0}),s=RegExp(`^0*${e}-`);for(let e of a)if(e.isDirectory()&&s.test(e.name)){let t=r.join(this.specsDir,e.name);return await this.loadSpecFromDirectory(t,e.name)}return null}async loadSpecFromDirectory(e,s){let n=r.join(e,"README.md");try{let e=await t.readFile(n,"utf-8"),{data:r,content:i}=(0,a.default)(e);if(!r||!r.status)return null;let o=s.match(/^(\d+)/),c=o?parseInt(o[1],10):null,l=`fs-${s}`,p=r.created_at??r.created,u=r.updated_at??r.updated,d=r.completed_at??r.completed,h=e=>{if(!e)return null;let t=new Date(e);return isNaN(t.getTime())?null:t};return{id:l,projectId:"leanspec",specNumber:c,specName:s,title:this.extractTitle(i),status:r.status||"planned",priority:r.priority||null,tags:r.tags?JSON.stringify(r.tags):null,assignee:r.assignee||null,contentMd:i,contentHtml:null,createdAt:h(p),updatedAt:h(u),completedAt:h(d),filePath:`specs/${s}/README.md`,githubUrl:`https://github.com/codervisor/lean-spec/tree/main/specs/${s}/README.md`,syncedAt:new Date}}catch{return null}}extractTitle(e){for(let t of e.split("\n")){let e=t.match(/^#\s+(.+)$/);if(e)return e[1].trim()}return null}}let i=null,o=new class{filesystemSource;databaseSource;mode;constructor(){if(this.mode=process.env.SPECS_MODE||"filesystem","filesystem"===this.mode||"both"===this.mode){const e=process.env.SPECS_DIR;this.filesystemSource=new n(e)}}async getDatabaseSource(){if(!this.databaseSource){if(!i){let{DatabaseSource:t}=await e.A(14430);i=t}this.databaseSource=new i}return this.databaseSource}async getAllSpecs(e){let t=await this.getSource(e);return await t.getAllSpecs(e)}async getSpec(e,t){let r=await this.getSource(t);return await r.getSpec(e,t)}async getSpecsByStatus(e,t){let r=await this.getSource(t);return await r.getSpecsByStatus(e,t)}async searchSpecs(e,t){let r=await this.getSource(t);return await r.searchSpecs(e,t)}async invalidateCache(e,t){(await this.getSource(t)).invalidateCache(e)}async getSource(e){if(e&&("database"===this.mode||"both"===this.mode))return await this.getDatabaseSource();if(this.filesystemSource)return this.filesystemSource;throw Error("No spec source configured")}};e.s(["specsService",0,o],44271)},68853,e=>{"use strict";var t=e.i(6169),r=e.i(25864),a=e.i(71648),s=e.i(30064),n=e.i(74222),i=e.i(2043),o=e.i(71408),c=e.i(26527),l=e.i(30592),p=e.i(34639),u=e.i(88935),d=e.i(68515),h=e.i(87166),f=e.i(76718),m=e.i(76529),g=e.i(51151),y=e.i(93695);e.i(59704);var x=e.i(8259),w=e.i(31511),S=e.i(68239);async function v(e,{params:t}){try{let{id:e,file:r}=await t,a=await (0,S.getSpecById)(e);if(!a)return w.NextResponse.json({error:"Spec not found"},{status:404});let s=a.subSpecs?.find(e=>e.file===r);if(!s)return w.NextResponse.json({error:"Sub-spec not found"},{status:404});return w.NextResponse.json({subSpec:s},{headers:{"Cache-Control":"public, s-maxage=60, stale-while-revalidate=120"}})}catch(e){return console.error("Error fetching sub-spec:",e),w.NextResponse.json({error:"Failed to fetch sub-spec"},{status:500})}}e.s(["GET",()=>v],81681);var R=e.i(81681);let b=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/specs/[id]/subspecs/[file]/route",pathname:"/api/specs/[id]/subspecs/[file]",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/packages/ui/src/app/api/specs/[id]/subspecs/[file]/route.ts",nextConfigOutput:"standalone",userland:R}),{workAsyncStorage:E,workUnitAsyncStorage:A,serverHooks:C}=b;function N(){return(0,a.patchFetch)({workAsyncStorage:E,workUnitAsyncStorage:A})}async function _(e,t,a){b.isDev&&(0,s.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let w="/api/specs/[id]/subspecs/[file]/route";w=w.replace(/\/index$/,"")||"/";let S=await b.prepare(e,t,{srcPage:w,multiZoneDraftMode:!1});if(!S)return t.statusCode=400,t.end("Bad Request"),null==a.waitUntil||a.waitUntil.call(a,Promise.resolve()),null;let{buildId:v,params:R,nextConfig:E,parsedUrl:A,isDraftMode:C,prerenderManifest:N,routerServerContext:_,isOnDemandRevalidate:D,revalidateOnlyGenerated:T,resolvedPathname:j,clientReferenceManifest:k,serverActionsManifest:P}=S,q=(0,c.normalizeAppPath)(w),M=!!(N.dynamicRoutes[q]||N.routes[j]),O=async()=>((null==_?void 0:_.render404)?await _.render404(e,t,A,!1):t.end("This page could not be found"),null);if(M&&!C){let e=!!N.routes[j],t=N.dynamicRoutes[q];if(t&&!1===t.fallback&&!e){if(E.experimental.adapterPath)return await O();throw new y.NoFallbackError}}let F=null;!M||b.isDev||C||(F="/index"===(F=j)?"/":F);let I=!0===b.isDev||!M,$=M&&!I;P&&k&&(0,i.setReferenceManifestsSingleton)({page:w,clientReferenceManifest:k,serverActionsManifest:P,serverModuleMap:(0,o.createServerModuleMap)({serverActionsManifest:P})});let U=e.method||"GET",H=(0,n.getTracer)(),B=H.getActiveScopeSpan(),L={params:R,prerenderManifest:N,renderOpts:{experimental:{authInterrupts:!!E.experimental.authInterrupts},cacheComponents:!!E.cacheComponents,supportsDynamicResponse:I,incrementalCache:(0,s.getRequestMeta)(e,"incrementalCache"),cacheLifeProfiles:E.cacheLife,waitUntil:a.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,a)=>b.onRequestError(e,t,a,_)},sharedContext:{buildId:v}},K=new l.NodeNextRequest(e),G=new l.NodeNextResponse(t),W=p.NextRequestAdapter.fromNodeNextRequest(K,(0,p.signalFromNodeResponse)(t));try{let i=async e=>b.handle(W,L).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let r=H.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==u.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${r.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let a=r.get("next.route");if(a){let t=`${U} ${a}`;e.setAttributes({"next.route":a,"http.route":a,"next.span_name":t}),e.updateName(t)}else e.updateName(`${U} ${w}`)}),o=!!(0,s.getRequestMeta)(e,"minimalMode"),c=async s=>{var n,c;let l=async({previousCacheEntry:r})=>{try{if(!o&&D&&T&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let n=await i(s);e.fetchMetrics=L.renderOpts.fetchMetrics;let c=L.renderOpts.pendingWaitUntil;c&&a.waitUntil&&(a.waitUntil(c),c=void 0);let l=L.renderOpts.collectedTags;if(!M)return await (0,h.sendResponse)(K,G,n,L.renderOpts.pendingWaitUntil),null;{let e=await n.blob(),t=(0,f.toNodeOutgoingHttpHeaders)(n.headers);l&&(t[g.NEXT_CACHE_TAGS_HEADER]=l),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==L.renderOpts.collectedRevalidate&&!(L.renderOpts.collectedRevalidate>=g.INFINITE_CACHE)&&L.renderOpts.collectedRevalidate,a=void 0===L.renderOpts.collectedExpire||L.renderOpts.collectedExpire>=g.INFINITE_CACHE?void 0:L.renderOpts.collectedExpire;return{value:{kind:x.CachedRouteKind.APP_ROUTE,status:n.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:a}}}}catch(t){throw(null==r?void 0:r.isStale)&&await b.onRequestError(e,t,{routerKind:"App Router",routePath:w,routeType:"route",revalidateReason:(0,d.getRevalidateReason)({isStaticGeneration:$,isOnDemandRevalidate:D})},_),t}},p=await b.handleResponse({req:e,nextConfig:E,cacheKey:F,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:N,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:T,responseGenerator:l,waitUntil:a.waitUntil,isMinimalMode:o});if(!M)return null;if((null==p||null==(n=p.value)?void 0:n.kind)!==x.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==p||null==(c=p.value)?void 0:c.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});o||t.setHeader("x-nextjs-cache",D?"REVALIDATED":p.isMiss?"MISS":p.isStale?"STALE":"HIT"),C&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let u=(0,f.fromNodeOutgoingHttpHeaders)(p.value.headers);return o&&M||u.delete(g.NEXT_CACHE_TAGS_HEADER),!p.cacheControl||t.getHeader("Cache-Control")||u.get("Cache-Control")||u.set("Cache-Control",(0,m.getCacheControlHeader)(p.cacheControl)),await (0,h.sendResponse)(K,G,new Response(p.value.body,{headers:u,status:p.value.status||200})),null};B?await c(B):await H.withPropagatedContext(e.headers,()=>H.trace(u.BaseServerSpan.handleRequest,{spanName:`${U} ${w}`,kind:n.SpanKind.SERVER,attributes:{"http.method":U,"http.target":e.url}},c))}catch(t){if(t instanceof y.NoFallbackError||await b.onRequestError(e,t,{routerKind:"App Router",routePath:q,routeType:"route",revalidateReason:(0,d.getRevalidateReason)({isStaticGeneration:$,isOnDemandRevalidate:D})}),M)throw t;return await (0,h.sendResponse)(K,G,new Response(null,{status:500})),null}}e.s(["handler",()=>_,"patchFetch",()=>N,"routeModule",()=>b,"serverHooks",()=>C,"workAsyncStorage",()=>E,"workUnitAsyncStorage",()=>A],68853)},14430,e=>{e.v(t=>Promise.all(["server/chunks/[root-of-the-server]__ae726e9c._.js","server/chunks/packages_ui_src_lib_db_index_ts_556307fa._.js"].map(t=>e.l(t))).then(()=>t(18146)))}];
1
+ module.exports=[12714,(e,t,r)=>{t.exports=e.x("node:fs/promises",()=>require("node:fs/promises"))},22734,(e,t,r)=>{t.exports=e.x("fs",()=>require("fs"))},874,(e,t,r)=>{t.exports=e.x("buffer",()=>require("buffer"))},50227,(e,t,r)=>{t.exports=e.x("node:path",()=>require("node:path"))},2157,(e,t,r)=>{t.exports=e.x("node:fs",()=>require("node:fs"))},68239,e=>{"use strict";var t=e.i(44271),r=e.i(67708),a=e.i(14747),s=e.i(2157),n=e.i(92194);let i=(0,a.resolve)(process.cwd(),"../../specs");function o(e){return e?Array.isArray(e)?e.map(e=>String(e)):"string"==typeof e?[e]:[]:[]}async function c(e,c){let l=await t.specsService.getSpec(e,c);if(!l)return null;let p={...l,tags:l.tags?"string"==typeof l.tags?JSON.parse(l.tags):l.tags:null};if(!c){let e,t,c=(e=l.filePath.replace(/^specs\//,"").replace(/\/README\.md$/,""),(0,a.join)((t=process.env.SPECS_DIR)?t.startsWith("/")?t:(0,a.resolve)(process.cwd(),t):i,e)),u=(0,r.detectSubSpecs)(c),d=function(e){try{let t=(0,a.join)(e,"README.md"),r=(0,s.readFileSync)(t,"utf-8"),{data:i}=(0,n.default)(r),c=o(i?.depends_on??i?.dependsOn),l=o(i?.related);return{dependsOn:c,related:l}}catch(e){return console.warn("Unable to parse spec relationships",e),{dependsOn:[],related:[]}}}(c);return{...p,subSpecs:u,relationships:d}}return p}async function l(e){let r=await t.specsService.getAllSpecs(e),a=new Map,s=new Map;for(let e of r)e.status&&a.set(e.status,(a.get(e.status)||0)+1),e.priority&&s.set(e.priority,(s.get(e.priority)||0)+1);let n=a.get("complete")||0,i=r.length>0?n/r.length*100:0;return{totalProjects:1,totalSpecs:r.length,specsByStatus:Array.from(a.entries()).map(([e,t])=>({status:e,count:t})),specsByPriority:Array.from(s.entries()).map(([e,t])=>({priority:e,count:t})),completionRate:Math.round(10*i)/10}}e.s(["getSpecById",()=>c,"getStats",()=>l])},93695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},14747,(e,t,r)=>{t.exports=e.x("path",()=>require("path"))},18622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},32319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},24725,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/after-task-async-storage.external.js",()=>require("next/dist/server/app-render/after-task-async-storage.external.js"))},67708,e=>{"use strict";var t=e.i(22734),r=e.i(14747),a=e.i(92194);let s=[{pattern:/design|ui|ux|mockup|wireframe|prototype/i,iconName:"Palette",color:"text-purple-600"},{pattern:/architecture|structure|system|diagram/i,iconName:"Map",color:"text-indigo-600"},{pattern:/implementation|code|develop|build/i,iconName:"Code",color:"text-green-600"},{pattern:/api|endpoint|integration|interface/i,iconName:"Code",color:"text-blue-600"},{pattern:/test|qa|quality|validation/i,iconName:"TestTube",color:"text-orange-600"},{pattern:/task|todo|checklist|milestone/i,iconName:"CheckSquare",color:"text-gray-600"},{pattern:/config|setup|settings|environment/i,iconName:"Wrench",color:"text-yellow-600"},{pattern:/deploy|devops|ci|cd|pipeline|release/i,iconName:"Wrench",color:"text-orange-600"},{pattern:/migration|upgrade|refactor|transition/i,iconName:"GitBranch",color:"text-cyan-600"},{pattern:/security|auth|permission|access|encryption/i,iconName:"CheckSquare",color:"text-red-600"},{pattern:/performance|optimization|speed|cache|benchmark/i,iconName:"TrendingUp",color:"text-green-600"},{pattern:/database|data|schema|model|query/i,iconName:"FileText",color:"text-blue-600"},{pattern:/doc|guide|manual|reference/i,iconName:"FileText",color:"text-gray-500"},{pattern:/github|git|vcs|version/i,iconName:"GitBranch",color:"text-pink-600"}],n={iconName:"FileText",color:"text-gray-600"};function i(e){let i=[];if(!(0,t.existsSync)(e))return i;try{for(let o of(0,t.readdirSync)(e)){if("README.md"===o||!o.endsWith(".md"))continue;let c=(0,r.join)(e,o);if((0,t.statSync)(c).isFile())try{let e=(0,t.readFileSync)(c,"utf-8"),{content:r}=(0,a.default)(e),l=function(e){let t=e.replace(/\.md$/i,"");for(let{pattern:e,iconName:r,color:a}of s)if(e.test(t))return{iconName:r,color:a};return n}(o);i.push({name:o.replace(/\.md$/i,"").split(/[-_]/).map(e=>e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()).join(" "),file:o,iconName:l.iconName,color:l.color,content:r})}catch(e){console.error(`Error reading sub-spec ${o}:`,e)}}i.sort((e,t)=>e.file.localeCompare(t.file))}catch(t){console.error(`Error reading spec directory ${e}:`,t)}return i}e.s(["detectSubSpecs",()=>i])},44271,e=>{"use strict";var t=e.i(12714),r=e.i(50227),a=e.i(92194);let s=parseInt(process.env.CACHE_TTL||"60000",10);class n{cache=new Map;specsDir;constructor(e){this.specsDir=e||r.join(process.cwd(),"../../specs")}async getAllSpecs(){let e="__all_specs__",t=this.cache.get(e);if(t&&Date.now()<t.expiresAt)return t.data;let r=await this.loadSpecsFromFilesystem();return this.cache.set(e,{data:r,expiresAt:Date.now()+s}),r}async getSpec(e){let t=`spec:${e}`,r=this.cache.get(t);if(r&&Date.now()<r.expiresAt)return r.data;let a=parseInt(e.split("-")[0],10);if(isNaN(a))return null;let n=await this.loadSpecByNumber(a);return n&&this.cache.set(t,{data:n,expiresAt:Date.now()+s}),n}async getSpecsByStatus(e){return(await this.getAllSpecs()).filter(t=>t.status===e)}async searchSpecs(e){let t=await this.getAllSpecs(),r=e.toLowerCase();return t.filter(e=>e.specName.toLowerCase().includes(r)||e.title?.toLowerCase().includes(r)||e.contentMd.toLowerCase().includes(r))}invalidateCache(e){e?(this.cache.delete(`spec:${e}`),this.cache.delete("__all_specs__")):this.cache.clear()}async loadSpecsFromFilesystem(){let e=[];try{await t.access(this.specsDir)}catch{return[]}let a=/^(\d{2,})-/;for(let s of(await t.readdir(this.specsDir,{withFileTypes:!0})))if(s.isDirectory()&&"archived"!==s.name&&a.test(s.name)){let t=r.join(this.specsDir,s.name),a=await this.loadSpecFromDirectory(t,s.name);a&&e.push(a)}return e.sort((e,t)=>(e.specNumber||0)-(t.specNumber||0))}async loadSpecByNumber(e){try{await t.access(this.specsDir)}catch{return null}let a=await t.readdir(this.specsDir,{withFileTypes:!0}),s=RegExp(`^0*${e}-`);for(let e of a)if(e.isDirectory()&&s.test(e.name)){let t=r.join(this.specsDir,e.name);return await this.loadSpecFromDirectory(t,e.name)}return null}async loadSpecFromDirectory(e,s){let n=r.join(e,"README.md");try{let e=await t.readFile(n,"utf-8"),{data:r,content:i}=(0,a.default)(e);if(!r||!r.status)return null;let o=s.match(/^(\d+)/),c=o?parseInt(o[1],10):null,l=`fs-${s}`,p=r.created_at??r.created,u=r.updated_at??r.updated,d=r.completed_at??r.completed,h=e=>{if(!e)return null;let t=new Date(e);return isNaN(t.getTime())?null:t};return{id:l,projectId:"leanspec",specNumber:c,specName:s,title:this.extractTitle(i),status:r.status||"planned",priority:r.priority||null,tags:r.tags?JSON.stringify(r.tags):null,assignee:r.assignee||null,contentMd:i,contentHtml:null,createdAt:h(p),updatedAt:h(u),completedAt:h(d),filePath:`specs/${s}/README.md`,githubUrl:`https://github.com/codervisor/lean-spec/tree/main/specs/${s}/README.md`,syncedAt:new Date}}catch{return null}}extractTitle(e){for(let t of e.split("\n")){let e=t.match(/^#\s+(.+)$/);if(e)return e[1].trim()}return null}}let i=null,o=new class{filesystemSource;databaseSource;mode;constructor(){if(this.mode=process.env.SPECS_MODE||"filesystem","filesystem"===this.mode||"both"===this.mode){const e=process.env.SPECS_DIR;this.filesystemSource=new n(e)}}async getDatabaseSource(){if(!this.databaseSource){if(!i){let{DatabaseSource:t}=await e.A(14430);i=t}this.databaseSource=new i}return this.databaseSource}async getAllSpecs(e){let t=await this.getSource(e);return await t.getAllSpecs(e)}async getSpec(e,t){let r=await this.getSource(t);return await r.getSpec(e,t)}async getSpecsByStatus(e,t){let r=await this.getSource(t);return await r.getSpecsByStatus(e,t)}async searchSpecs(e,t){let r=await this.getSource(t);return await r.searchSpecs(e,t)}async invalidateCache(e,t){(await this.getSource(t)).invalidateCache(e)}async getSource(e){if(e&&("database"===this.mode||"both"===this.mode))return await this.getDatabaseSource();if(this.filesystemSource)return this.filesystemSource;throw Error("No spec source configured")}};e.s(["specsService",0,o],44271)},68853,e=>{"use strict";var t=e.i(6169),r=e.i(25864),a=e.i(71648),s=e.i(30064),n=e.i(74222),i=e.i(2043),o=e.i(71408),c=e.i(26527),l=e.i(30592),p=e.i(34639),u=e.i(88935),d=e.i(68515),h=e.i(87166),f=e.i(76718),m=e.i(76529),g=e.i(51151),y=e.i(93695);e.i(59704);var x=e.i(8259),w=e.i(31511),S=e.i(68239);async function v(e,{params:t}){try{let{id:e,file:r}=await t,a=await (0,S.getSpecById)(e);if(!a)return w.NextResponse.json({error:"Spec not found"},{status:404});let s=a.subSpecs?.find(e=>e.file===r);if(!s)return w.NextResponse.json({error:"Sub-spec not found"},{status:404});return w.NextResponse.json({subSpec:s},{headers:{"Cache-Control":"public, s-maxage=60, stale-while-revalidate=120"}})}catch(e){return console.error("Error fetching sub-spec:",e),w.NextResponse.json({error:"Failed to fetch sub-spec"},{status:500})}}e.s(["GET",()=>v],81681);var R=e.i(81681);let b=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/specs/[id]/subspecs/[file]/route",pathname:"/api/specs/[id]/subspecs/[file]",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/packages/ui/src/app/api/specs/[id]/subspecs/[file]/route.ts",nextConfigOutput:"standalone",userland:R}),{workAsyncStorage:E,workUnitAsyncStorage:A,serverHooks:C}=b;function N(){return(0,a.patchFetch)({workAsyncStorage:E,workUnitAsyncStorage:A})}async function _(e,t,a){b.isDev&&(0,s.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let w="/api/specs/[id]/subspecs/[file]/route";w=w.replace(/\/index$/,"")||"/";let S=await b.prepare(e,t,{srcPage:w,multiZoneDraftMode:!1});if(!S)return t.statusCode=400,t.end("Bad Request"),null==a.waitUntil||a.waitUntil.call(a,Promise.resolve()),null;let{buildId:v,params:R,nextConfig:E,parsedUrl:A,isDraftMode:C,prerenderManifest:N,routerServerContext:_,isOnDemandRevalidate:D,revalidateOnlyGenerated:T,resolvedPathname:j,clientReferenceManifest:k,serverActionsManifest:P}=S,q=(0,c.normalizeAppPath)(w),M=!!(N.dynamicRoutes[q]||N.routes[j]),O=async()=>((null==_?void 0:_.render404)?await _.render404(e,t,A,!1):t.end("This page could not be found"),null);if(M&&!C){let e=!!N.routes[j],t=N.dynamicRoutes[q];if(t&&!1===t.fallback&&!e){if(E.experimental.adapterPath)return await O();throw new y.NoFallbackError}}let F=null;!M||b.isDev||C||(F="/index"===(F=j)?"/":F);let I=!0===b.isDev||!M,$=M&&!I;P&&k&&(0,i.setReferenceManifestsSingleton)({page:w,clientReferenceManifest:k,serverActionsManifest:P,serverModuleMap:(0,o.createServerModuleMap)({serverActionsManifest:P})});let U=e.method||"GET",H=(0,n.getTracer)(),B=H.getActiveScopeSpan(),L={params:R,prerenderManifest:N,renderOpts:{experimental:{authInterrupts:!!E.experimental.authInterrupts},cacheComponents:!!E.cacheComponents,supportsDynamicResponse:I,incrementalCache:(0,s.getRequestMeta)(e,"incrementalCache"),cacheLifeProfiles:E.cacheLife,waitUntil:a.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,a)=>b.onRequestError(e,t,a,_)},sharedContext:{buildId:v}},K=new l.NodeNextRequest(e),G=new l.NodeNextResponse(t),W=p.NextRequestAdapter.fromNodeNextRequest(K,(0,p.signalFromNodeResponse)(t));try{let i=async e=>b.handle(W,L).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let r=H.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==u.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${r.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let a=r.get("next.route");if(a){let t=`${U} ${a}`;e.setAttributes({"next.route":a,"http.route":a,"next.span_name":t}),e.updateName(t)}else e.updateName(`${U} ${w}`)}),o=!!(0,s.getRequestMeta)(e,"minimalMode"),c=async s=>{var n,c;let l=async({previousCacheEntry:r})=>{try{if(!o&&D&&T&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let n=await i(s);e.fetchMetrics=L.renderOpts.fetchMetrics;let c=L.renderOpts.pendingWaitUntil;c&&a.waitUntil&&(a.waitUntil(c),c=void 0);let l=L.renderOpts.collectedTags;if(!M)return await (0,h.sendResponse)(K,G,n,L.renderOpts.pendingWaitUntil),null;{let e=await n.blob(),t=(0,f.toNodeOutgoingHttpHeaders)(n.headers);l&&(t[g.NEXT_CACHE_TAGS_HEADER]=l),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==L.renderOpts.collectedRevalidate&&!(L.renderOpts.collectedRevalidate>=g.INFINITE_CACHE)&&L.renderOpts.collectedRevalidate,a=void 0===L.renderOpts.collectedExpire||L.renderOpts.collectedExpire>=g.INFINITE_CACHE?void 0:L.renderOpts.collectedExpire;return{value:{kind:x.CachedRouteKind.APP_ROUTE,status:n.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:a}}}}catch(t){throw(null==r?void 0:r.isStale)&&await b.onRequestError(e,t,{routerKind:"App Router",routePath:w,routeType:"route",revalidateReason:(0,d.getRevalidateReason)({isStaticGeneration:$,isOnDemandRevalidate:D})},_),t}},p=await b.handleResponse({req:e,nextConfig:E,cacheKey:F,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:N,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:T,responseGenerator:l,waitUntil:a.waitUntil,isMinimalMode:o});if(!M)return null;if((null==p||null==(n=p.value)?void 0:n.kind)!==x.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==p||null==(c=p.value)?void 0:c.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});o||t.setHeader("x-nextjs-cache",D?"REVALIDATED":p.isMiss?"MISS":p.isStale?"STALE":"HIT"),C&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let u=(0,f.fromNodeOutgoingHttpHeaders)(p.value.headers);return o&&M||u.delete(g.NEXT_CACHE_TAGS_HEADER),!p.cacheControl||t.getHeader("Cache-Control")||u.get("Cache-Control")||u.set("Cache-Control",(0,m.getCacheControlHeader)(p.cacheControl)),await (0,h.sendResponse)(K,G,new Response(p.value.body,{headers:u,status:p.value.status||200})),null};B?await c(B):await H.withPropagatedContext(e.headers,()=>H.trace(u.BaseServerSpan.handleRequest,{spanName:`${U} ${w}`,kind:n.SpanKind.SERVER,attributes:{"http.method":U,"http.target":e.url}},c))}catch(t){if(t instanceof y.NoFallbackError||await b.onRequestError(e,t,{routerKind:"App Router",routePath:q,routeType:"route",revalidateReason:(0,d.getRevalidateReason)({isStaticGeneration:$,isOnDemandRevalidate:D})}),M)throw t;return await (0,h.sendResponse)(K,G,new Response(null,{status:500})),null}}e.s(["handler",()=>_,"patchFetch",()=>N,"routeModule",()=>b,"serverHooks",()=>C,"workAsyncStorage",()=>E,"workUnitAsyncStorage",()=>A],68853)},14430,e=>{e.v(t=>Promise.all(["server/chunks/[root-of-the-server]__ae726e9c._.js","server/chunks/packages_ui_src_lib_db_index_ts_556307fa._.js"].map(t=>e.l(t))).then(()=>t(18146)))}];
2
2
 
3
- //# sourceMappingURL=%5Broot-of-the-server%5D__7acaa6ec._.js.map
3
+ //# sourceMappingURL=%5Broot-of-the-server%5D__d4193584._.js.map