beadscope 0.0.0-stage → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/BUILD_ID +1 -0
- package/.next/app-path-routes-manifest.json +35 -0
- package/.next/build/chunks/[root-of-the-server]__05i36w1t4lzaf._.js +502 -0
- package/.next/build/chunks/[root-of-the-server]__05i36w1t4lzaf._.js.map +11 -0
- package/.next/build/chunks/[root-of-the-server]__1kki86fknkq7y._.js +191 -0
- package/.next/build/chunks/[root-of-the-server]__1kki86fknkq7y._.js.map +8 -0
- package/.next/build/chunks/[turbopack-node]_transforms_postcss_ts_1gfkiq9iz8yb8._.js +13 -0
- package/.next/build/chunks/[turbopack-node]_transforms_postcss_ts_1gfkiq9iz8yb8._.js.map +5 -0
- package/.next/build/chunks/[turbopack]_runtime.js +1056 -0
- package/.next/build/chunks/[turbopack]_runtime.js.map +11 -0
- package/.next/build/chunks/node_modules_20v-8wlfss9m1._.js +7240 -0
- package/.next/build/chunks/node_modules_20v-8wlfss9m1._.js.map +47 -0
- package/.next/build/chunks/pool_entry-[turbopack-node]_transforms_postcss_ts_0tp-k2vy8nj6i._.js +6 -0
- package/.next/build/chunks/pool_entry-[turbopack-node]_transforms_postcss_ts_0tp-k2vy8nj6i._.js.map +5 -0
- package/.next/build/package.json +1 -0
- package/.next/build-manifest.json +69 -0
- package/.next/export-marker.json +6 -0
- package/.next/fallback-build-manifest.json +15 -0
- package/.next/images-manifest.json +68 -0
- package/.next/next-minimal-server.js.nft.json +1 -0
- package/.next/next-server.js.nft.json +1 -0
- package/.next/package.json +1 -0
- package/.next/prerender-manifest.json +193 -0
- package/.next/required-server-files.js +379 -0
- package/.next/required-server-files.json +379 -0
- package/.next/routes-manifest.json +293 -0
- package/.next/server/app/_global-error/page/app-paths-manifest.json +3 -0
- package/.next/server/app/_global-error/page/build-manifest.json +22 -0
- package/.next/server/app/_global-error/page/next-font-manifest.json +6 -0
- package/.next/server/app/_global-error/page/react-loadable-manifest.json +1 -0
- package/.next/server/app/_global-error/page/server-reference-manifest.json +4 -0
- package/.next/server/app/_global-error/page.js +10 -0
- package/.next/server/app/_global-error/page.js.map +5 -0
- package/.next/server/app/_global-error/page.js.nft.json +1 -0
- package/.next/server/app/_global-error/page_client-reference-manifest.js +3 -0
- package/.next/server/app/_global-error.html +1 -0
- package/.next/server/app/_global-error.meta +30 -0
- package/.next/server/app/_global-error.rsc +19 -0
- package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +24 -0
- package/.next/server/app/_global-error.segments/_full.segment.rsc +19 -0
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +2 -0
- package/.next/server/app/_not-found/page/app-paths-manifest.json +3 -0
- package/.next/server/app/_not-found/page/build-manifest.json +22 -0
- package/.next/server/app/_not-found/page/next-font-manifest.json +11 -0
- package/.next/server/app/_not-found/page/react-loadable-manifest.json +1 -0
- package/.next/server/app/_not-found/page/server-reference-manifest.json +4 -0
- package/.next/server/app/_not-found/page.js +13 -0
- package/.next/server/app/_not-found/page.js.map +5 -0
- package/.next/server/app/_not-found/page.js.nft.json +1 -0
- package/.next/server/app/_not-found/page_client-reference-manifest.js +3 -0
- package/.next/server/app/_not-found.html +12 -0
- package/.next/server/app/_not-found.meta +35 -0
- package/.next/server/app/_not-found.rsc +25 -0
- package/.next/server/app/_not-found.segments/_full.segment.rsc +25 -0
- package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +31 -0
- package/.next/server/app/_not-found.segments/_tree.segment.rsc +4 -0
- package/.next/server/app/api/config/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/config/route/build-manifest.json +12 -0
- package/.next/server/app/api/config/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/config/route.js +11 -0
- package/.next/server/app/api/config/route.js.map +5 -0
- package/.next/server/app/api/config/route.js.nft.json +1 -0
- package/.next/server/app/api/config/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/fs/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/fs/route/build-manifest.json +12 -0
- package/.next/server/app/api/fs/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/fs/route.js +10 -0
- package/.next/server/app/api/fs/route.js.map +5 -0
- package/.next/server/app/api/fs/route.js.nft.json +1 -0
- package/.next/server/app/api/fs/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/p/[projectId]/activity/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/p/[projectId]/activity/route/build-manifest.json +12 -0
- package/.next/server/app/api/p/[projectId]/activity/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/p/[projectId]/activity/route.js +11 -0
- package/.next/server/app/api/p/[projectId]/activity/route.js.map +5 -0
- package/.next/server/app/api/p/[projectId]/activity/route.js.nft.json +1 -0
- package/.next/server/app/api/p/[projectId]/activity/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/p/[projectId]/attachments/[...path]/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/p/[projectId]/attachments/[...path]/route/build-manifest.json +12 -0
- package/.next/server/app/api/p/[projectId]/attachments/[...path]/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/p/[projectId]/attachments/[...path]/route.js +10 -0
- package/.next/server/app/api/p/[projectId]/attachments/[...path]/route.js.map +5 -0
- package/.next/server/app/api/p/[projectId]/attachments/[...path]/route.js.nft.json +1 -0
- package/.next/server/app/api/p/[projectId]/attachments/[...path]/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/p/[projectId]/attachments/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/p/[projectId]/attachments/route/build-manifest.json +12 -0
- package/.next/server/app/api/p/[projectId]/attachments/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/p/[projectId]/attachments/route.js +10 -0
- package/.next/server/app/api/p/[projectId]/attachments/route.js.map +5 -0
- package/.next/server/app/api/p/[projectId]/attachments/route.js.nft.json +1 -0
- package/.next/server/app/api/p/[projectId]/attachments/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/p/[projectId]/beads/[id]/archive/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/p/[projectId]/beads/[id]/archive/route/build-manifest.json +12 -0
- package/.next/server/app/api/p/[projectId]/beads/[id]/archive/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/p/[projectId]/beads/[id]/archive/route.js +11 -0
- package/.next/server/app/api/p/[projectId]/beads/[id]/archive/route.js.map +5 -0
- package/.next/server/app/api/p/[projectId]/beads/[id]/archive/route.js.nft.json +1 -0
- package/.next/server/app/api/p/[projectId]/beads/[id]/archive/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/p/[projectId]/beads/[id]/assist/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/p/[projectId]/beads/[id]/assist/route/build-manifest.json +12 -0
- package/.next/server/app/api/p/[projectId]/beads/[id]/assist/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/p/[projectId]/beads/[id]/assist/route.js +11 -0
- package/.next/server/app/api/p/[projectId]/beads/[id]/assist/route.js.map +5 -0
- package/.next/server/app/api/p/[projectId]/beads/[id]/assist/route.js.nft.json +1 -0
- package/.next/server/app/api/p/[projectId]/beads/[id]/assist/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/p/[projectId]/beads/[id]/comments/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/p/[projectId]/beads/[id]/comments/route/build-manifest.json +12 -0
- package/.next/server/app/api/p/[projectId]/beads/[id]/comments/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/p/[projectId]/beads/[id]/comments/route.js +11 -0
- package/.next/server/app/api/p/[projectId]/beads/[id]/comments/route.js.map +5 -0
- package/.next/server/app/api/p/[projectId]/beads/[id]/comments/route.js.nft.json +1 -0
- package/.next/server/app/api/p/[projectId]/beads/[id]/comments/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/p/[projectId]/beads/[id]/deps/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/p/[projectId]/beads/[id]/deps/route/build-manifest.json +12 -0
- package/.next/server/app/api/p/[projectId]/beads/[id]/deps/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/p/[projectId]/beads/[id]/deps/route.js +11 -0
- package/.next/server/app/api/p/[projectId]/beads/[id]/deps/route.js.map +5 -0
- package/.next/server/app/api/p/[projectId]/beads/[id]/deps/route.js.nft.json +1 -0
- package/.next/server/app/api/p/[projectId]/beads/[id]/deps/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/p/[projectId]/beads/[id]/gate/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/p/[projectId]/beads/[id]/gate/route/build-manifest.json +12 -0
- package/.next/server/app/api/p/[projectId]/beads/[id]/gate/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/p/[projectId]/beads/[id]/gate/route.js +11 -0
- package/.next/server/app/api/p/[projectId]/beads/[id]/gate/route.js.map +5 -0
- package/.next/server/app/api/p/[projectId]/beads/[id]/gate/route.js.nft.json +1 -0
- package/.next/server/app/api/p/[projectId]/beads/[id]/gate/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/p/[projectId]/beads/[id]/human/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/p/[projectId]/beads/[id]/human/route/build-manifest.json +12 -0
- package/.next/server/app/api/p/[projectId]/beads/[id]/human/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/p/[projectId]/beads/[id]/human/route.js +11 -0
- package/.next/server/app/api/p/[projectId]/beads/[id]/human/route.js.map +5 -0
- package/.next/server/app/api/p/[projectId]/beads/[id]/human/route.js.nft.json +1 -0
- package/.next/server/app/api/p/[projectId]/beads/[id]/human/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/p/[projectId]/beads/[id]/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/p/[projectId]/beads/[id]/route/build-manifest.json +12 -0
- package/.next/server/app/api/p/[projectId]/beads/[id]/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/p/[projectId]/beads/[id]/route.js +11 -0
- package/.next/server/app/api/p/[projectId]/beads/[id]/route.js.map +5 -0
- package/.next/server/app/api/p/[projectId]/beads/[id]/route.js.nft.json +1 -0
- package/.next/server/app/api/p/[projectId]/beads/[id]/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/p/[projectId]/beads/[id]/status/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/p/[projectId]/beads/[id]/status/route/build-manifest.json +12 -0
- package/.next/server/app/api/p/[projectId]/beads/[id]/status/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/p/[projectId]/beads/[id]/status/route.js +11 -0
- package/.next/server/app/api/p/[projectId]/beads/[id]/status/route.js.map +5 -0
- package/.next/server/app/api/p/[projectId]/beads/[id]/status/route.js.nft.json +1 -0
- package/.next/server/app/api/p/[projectId]/beads/[id]/status/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/p/[projectId]/beads/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/p/[projectId]/beads/route/build-manifest.json +12 -0
- package/.next/server/app/api/p/[projectId]/beads/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/p/[projectId]/beads/route.js +11 -0
- package/.next/server/app/api/p/[projectId]/beads/route.js.map +5 -0
- package/.next/server/app/api/p/[projectId]/beads/route.js.nft.json +1 -0
- package/.next/server/app/api/p/[projectId]/beads/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/p/[projectId]/beads/stream/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/p/[projectId]/beads/stream/route/build-manifest.json +12 -0
- package/.next/server/app/api/p/[projectId]/beads/stream/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/p/[projectId]/beads/stream/route.js +8 -0
- package/.next/server/app/api/p/[projectId]/beads/stream/route.js.map +5 -0
- package/.next/server/app/api/p/[projectId]/beads/stream/route.js.nft.json +1 -0
- package/.next/server/app/api/p/[projectId]/beads/stream/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/p/[projectId]/doctor/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/p/[projectId]/doctor/route/build-manifest.json +12 -0
- package/.next/server/app/api/p/[projectId]/doctor/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/p/[projectId]/doctor/route.js +11 -0
- package/.next/server/app/api/p/[projectId]/doctor/route.js.map +5 -0
- package/.next/server/app/api/p/[projectId]/doctor/route.js.nft.json +1 -0
- package/.next/server/app/api/p/[projectId]/doctor/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/p/[projectId]/gamification/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/p/[projectId]/gamification/route/build-manifest.json +12 -0
- package/.next/server/app/api/p/[projectId]/gamification/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/p/[projectId]/gamification/route.js +12 -0
- package/.next/server/app/api/p/[projectId]/gamification/route.js.map +5 -0
- package/.next/server/app/api/p/[projectId]/gamification/route.js.nft.json +1 -0
- package/.next/server/app/api/p/[projectId]/gamification/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/p/[projectId]/insights/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/p/[projectId]/insights/route/build-manifest.json +12 -0
- package/.next/server/app/api/p/[projectId]/insights/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/p/[projectId]/insights/route.js +12 -0
- package/.next/server/app/api/p/[projectId]/insights/route.js.map +5 -0
- package/.next/server/app/api/p/[projectId]/insights/route.js.nft.json +1 -0
- package/.next/server/app/api/p/[projectId]/insights/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/p/[projectId]/order/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/p/[projectId]/order/route/build-manifest.json +12 -0
- package/.next/server/app/api/p/[projectId]/order/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/p/[projectId]/order/route.js +10 -0
- package/.next/server/app/api/p/[projectId]/order/route.js.map +5 -0
- package/.next/server/app/api/p/[projectId]/order/route.js.nft.json +1 -0
- package/.next/server/app/api/p/[projectId]/order/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/p/[projectId]/publish/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/p/[projectId]/publish/route/build-manifest.json +12 -0
- package/.next/server/app/api/p/[projectId]/publish/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/p/[projectId]/publish/route.js +14 -0
- package/.next/server/app/api/p/[projectId]/publish/route.js.map +5 -0
- package/.next/server/app/api/p/[projectId]/publish/route.js.nft.json +1 -0
- package/.next/server/app/api/p/[projectId]/publish/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/projects/[id]/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/projects/[id]/route/build-manifest.json +12 -0
- package/.next/server/app/api/projects/[id]/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/projects/[id]/route.js +11 -0
- package/.next/server/app/api/projects/[id]/route.js.map +5 -0
- package/.next/server/app/api/projects/[id]/route.js.nft.json +1 -0
- package/.next/server/app/api/projects/[id]/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/projects/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/projects/route/build-manifest.json +12 -0
- package/.next/server/app/api/projects/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/projects/route.js +10 -0
- package/.next/server/app/api/projects/route.js.map +5 -0
- package/.next/server/app/api/projects/route.js.nft.json +1 -0
- package/.next/server/app/api/projects/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/telemetry/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/telemetry/route/build-manifest.json +12 -0
- package/.next/server/app/api/telemetry/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/telemetry/route.js +8 -0
- package/.next/server/app/api/telemetry/route.js.map +5 -0
- package/.next/server/app/api/telemetry/route.js.nft.json +1 -0
- package/.next/server/app/api/telemetry/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/update/check/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/update/check/route/build-manifest.json +12 -0
- package/.next/server/app/api/update/check/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/update/check/route.js +11 -0
- package/.next/server/app/api/update/check/route.js.map +5 -0
- package/.next/server/app/api/update/check/route.js.nft.json +1 -0
- package/.next/server/app/api/update/check/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/update/run/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/update/run/route/build-manifest.json +12 -0
- package/.next/server/app/api/update/run/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/update/run/route.js +11 -0
- package/.next/server/app/api/update/run/route.js.map +5 -0
- package/.next/server/app/api/update/run/route.js.nft.json +1 -0
- package/.next/server/app/api/update/run/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/viewer-mode/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/viewer-mode/route/build-manifest.json +12 -0
- package/.next/server/app/api/viewer-mode/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/viewer-mode/route.js +10 -0
- package/.next/server/app/api/viewer-mode/route.js.map +5 -0
- package/.next/server/app/api/viewer-mode/route.js.nft.json +1 -0
- package/.next/server/app/api/viewer-mode/route_client-reference-manifest.js +3 -0
- package/.next/server/app/apple-icon.png/route/app-paths-manifest.json +3 -0
- package/.next/server/app/apple-icon.png/route/build-manifest.json +12 -0
- package/.next/server/app/apple-icon.png/route.js +8 -0
- package/.next/server/app/apple-icon.png/route.js.map +5 -0
- package/.next/server/app/apple-icon.png/route.js.nft.json +1 -0
- package/.next/server/app/apple-icon.png.body +0 -0
- package/.next/server/app/apple-icon.png.meta +1 -0
- package/.next/server/app/favicon.ico/route/app-paths-manifest.json +3 -0
- package/.next/server/app/favicon.ico/route/build-manifest.json +12 -0
- package/.next/server/app/favicon.ico/route.js +8 -0
- package/.next/server/app/favicon.ico/route.js.map +5 -0
- package/.next/server/app/favicon.ico/route.js.nft.json +1 -0
- package/.next/server/app/favicon.ico.body +0 -0
- package/.next/server/app/favicon.ico.meta +1 -0
- package/.next/server/app/icon.svg/route/app-paths-manifest.json +3 -0
- package/.next/server/app/icon.svg/route/build-manifest.json +12 -0
- package/.next/server/app/icon.svg/route.js +8 -0
- package/.next/server/app/icon.svg/route.js.map +5 -0
- package/.next/server/app/icon.svg/route.js.nft.json +1 -0
- package/.next/server/app/icon.svg.body +1 -0
- package/.next/server/app/icon.svg.meta +1 -0
- package/.next/server/app/index.html +12 -0
- package/.next/server/app/index.meta +29 -0
- package/.next/server/app/index.rsc +27 -0
- package/.next/server/app/index.segments/__PAGE__.segment.rsc +30 -0
- package/.next/server/app/index.segments/_full.segment.rsc +27 -0
- package/.next/server/app/index.segments/_tree.segment.rsc +5 -0
- package/.next/server/app/p/[projectId]/page/app-paths-manifest.json +3 -0
- package/.next/server/app/p/[projectId]/page/build-manifest.json +22 -0
- package/.next/server/app/p/[projectId]/page/next-font-manifest.json +11 -0
- package/.next/server/app/p/[projectId]/page/react-loadable-manifest.json +1 -0
- package/.next/server/app/p/[projectId]/page/server-reference-manifest.json +4 -0
- package/.next/server/app/p/[projectId]/page.js +15 -0
- package/.next/server/app/p/[projectId]/page.js.map +5 -0
- package/.next/server/app/p/[projectId]/page.js.nft.json +1 -0
- package/.next/server/app/p/[projectId]/page_client-reference-manifest.js +3 -0
- package/.next/server/app/page/app-paths-manifest.json +3 -0
- package/.next/server/app/page/build-manifest.json +22 -0
- package/.next/server/app/page/next-font-manifest.json +11 -0
- package/.next/server/app/page/react-loadable-manifest.json +1 -0
- package/.next/server/app/page/server-reference-manifest.json +4 -0
- package/.next/server/app/page.js +14 -0
- package/.next/server/app/page.js.map +5 -0
- package/.next/server/app/page.js.nft.json +1 -0
- package/.next/server/app/page_client-reference-manifest.js +3 -0
- package/.next/server/app-paths-manifest.json +35 -0
- package/.next/server/chunks/1oeh_server_app_api_p_[projectId]_attachments_[___path]_route_actions_1040addoe_3v-.js +3 -0
- package/.next/server/chunks/1oeh_server_app_api_p_[projectId]_attachments_[___path]_route_actions_1040addoe_3v-.js.map +1 -0
- package/.next/server/chunks/1oeh_server_app_api_p_[projectId]_attachments_route_actions_0xbz9ode02i8m.js +3 -0
- package/.next/server/chunks/1oeh_server_app_api_p_[projectId]_attachments_route_actions_0xbz9ode02i8m.js.map +1 -0
- package/.next/server/chunks/1oeh_server_app_api_p_[projectId]_beads_[id]_archive_route_actions_11wcutlx3g3z6.js +3 -0
- package/.next/server/chunks/1oeh_server_app_api_p_[projectId]_beads_[id]_archive_route_actions_11wcutlx3g3z6.js.map +1 -0
- package/.next/server/chunks/1oeh_server_app_api_p_[projectId]_beads_[id]_assist_route_actions_20an4chs-trua.js +3 -0
- package/.next/server/chunks/1oeh_server_app_api_p_[projectId]_beads_[id]_assist_route_actions_20an4chs-trua.js.map +1 -0
- package/.next/server/chunks/1oeh_server_app_api_p_[projectId]_beads_[id]_comments_route_actions_1nfem6pen0k0g.js +3 -0
- package/.next/server/chunks/1oeh_server_app_api_p_[projectId]_beads_[id]_comments_route_actions_1nfem6pen0k0g.js.map +1 -0
- package/.next/server/chunks/1oeh_server_app_api_p_[projectId]_beads_[id]_deps_route_actions_18gjapy3mw4wv.js +3 -0
- package/.next/server/chunks/1oeh_server_app_api_p_[projectId]_beads_[id]_deps_route_actions_18gjapy3mw4wv.js.map +1 -0
- package/.next/server/chunks/1oeh_server_app_api_p_[projectId]_beads_[id]_gate_route_actions_187fh3sknhoaj.js +3 -0
- package/.next/server/chunks/1oeh_server_app_api_p_[projectId]_beads_[id]_gate_route_actions_187fh3sknhoaj.js.map +1 -0
- package/.next/server/chunks/1oeh_server_app_api_p_[projectId]_beads_[id]_human_route_actions_07owr7gyh2_8k.js +3 -0
- package/.next/server/chunks/1oeh_server_app_api_p_[projectId]_beads_[id]_human_route_actions_07owr7gyh2_8k.js.map +1 -0
- package/.next/server/chunks/1oeh_server_app_api_p_[projectId]_beads_[id]_route_actions_1etbw4at9d6k4.js +3 -0
- package/.next/server/chunks/1oeh_server_app_api_p_[projectId]_beads_[id]_route_actions_1etbw4at9d6k4.js.map +1 -0
- package/.next/server/chunks/1oeh_server_app_api_p_[projectId]_beads_[id]_status_route_actions_1umhmm3s8juuu.js +3 -0
- package/.next/server/chunks/1oeh_server_app_api_p_[projectId]_beads_[id]_status_route_actions_1umhmm3s8juuu.js.map +1 -0
- package/.next/server/chunks/1oeh_server_app_api_p_[projectId]_beads_stream_route_actions_175r-6ar5_pmi.js +3 -0
- package/.next/server/chunks/1oeh_server_app_api_p_[projectId]_beads_stream_route_actions_175r-6ar5_pmi.js.map +1 -0
- package/.next/server/chunks/1oeh_server_app_api_p_[projectId]_gamification_route_actions_1ogeffkobnbsr.js +3 -0
- package/.next/server/chunks/1oeh_server_app_api_p_[projectId]_gamification_route_actions_1ogeffkobnbsr.js.map +1 -0
- package/.next/server/chunks/[externals]__0lwlz8xkhksb0._.js +3 -0
- package/.next/server/chunks/[externals]__0lwlz8xkhksb0._.js.map +1 -0
- package/.next/server/chunks/[externals]__1auxgbs1xf3g3._.js +3 -0
- package/.next/server/chunks/[externals]__1auxgbs1xf3g3._.js.map +1 -0
- package/.next/server/chunks/[externals]__1h8nsgzt8l8pm._.js +3 -0
- package/.next/server/chunks/[externals]__1h8nsgzt8l8pm._.js.map +1 -0
- package/.next/server/chunks/[externals]__1p2j9_5g429uh._.js +3 -0
- package/.next/server/chunks/[externals]__1p2j9_5g429uh._.js.map +1 -0
- package/.next/server/chunks/[externals]__1py9g7vq1lv21._.js +3 -0
- package/.next/server/chunks/[externals]__1py9g7vq1lv21._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__0190u3x31o2kc._.js +327 -0
- package/.next/server/chunks/[root-of-the-server]__0190u3x31o2kc._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__035zaj0slqy-4._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__035zaj0slqy-4._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__0bzf8xm20iw7a._.js +57 -0
- package/.next/server/chunks/[root-of-the-server]__0bzf8xm20iw7a._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__0p9qh6g3s0rez._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0p9qh6g3s0rez._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__0v7bhiiq13er3._.js +57 -0
- package/.next/server/chunks/[root-of-the-server]__0v7bhiiq13er3._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__0yiz2szg7yt42._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0yiz2szg7yt42._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__1-f7qk3-8a266._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1-f7qk3-8a266._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__122sebyef7_fq._.js +57 -0
- package/.next/server/chunks/[root-of-the-server]__122sebyef7_fq._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__12b8wltp8nh6j._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__12b8wltp8nh6j._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__15bjnu5yieigz._.js +5 -0
- package/.next/server/chunks/[root-of-the-server]__15bjnu5yieigz._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__15y25z0ilm3d6._.js +57 -0
- package/.next/server/chunks/[root-of-the-server]__15y25z0ilm3d6._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__1egyye6rj7_du._.js +57 -0
- package/.next/server/chunks/[root-of-the-server]__1egyye6rj7_du._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__1gdvsv3omtde3._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1gdvsv3omtde3._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__1zrubp2jc8bi0._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1zrubp2jc8bi0._.js.map +1 -0
- package/.next/server/chunks/[turbopack]_runtime.js +937 -0
- package/.next/server/chunks/[turbopack]_runtime.js.map +10 -0
- package/.next/server/chunks/_004qegokrf7fy._.js +3 -0
- package/.next/server/chunks/_004qegokrf7fy._.js.map +1 -0
- package/.next/server/chunks/_013mswtsyfnoo._.js +3 -0
- package/.next/server/chunks/_013mswtsyfnoo._.js.map +1 -0
- package/.next/server/chunks/_0gij0z-co_3s4._.js +3 -0
- package/.next/server/chunks/_0gij0z-co_3s4._.js.map +1 -0
- package/.next/server/chunks/_0gjygs98zpepc._.js +3 -0
- package/.next/server/chunks/_0gjygs98zpepc._.js.map +1 -0
- package/.next/server/chunks/_0grrkbm3e2o1h._.js +3 -0
- package/.next/server/chunks/_0grrkbm3e2o1h._.js.map +1 -0
- package/.next/server/chunks/_0j2w6pi0oz3ag._.js +3 -0
- package/.next/server/chunks/_0j2w6pi0oz3ag._.js.map +1 -0
- package/.next/server/chunks/_0kd1hwufqyhnn._.js +3 -0
- package/.next/server/chunks/_0kd1hwufqyhnn._.js.map +1 -0
- package/.next/server/chunks/_0sr--n5b--0bk._.js +3 -0
- package/.next/server/chunks/_0sr--n5b--0bk._.js.map +1 -0
- package/.next/server/chunks/_0tuzzupepjznm._.js +3 -0
- package/.next/server/chunks/_0tuzzupepjznm._.js.map +1 -0
- package/.next/server/chunks/_0vx1iev9xu_vx._.js +329 -0
- package/.next/server/chunks/_0vx1iev9xu_vx._.js.map +1 -0
- package/.next/server/chunks/_0wemi40xtpagp._.js +3 -0
- package/.next/server/chunks/_0wemi40xtpagp._.js.map +1 -0
- package/.next/server/chunks/_0wh8igpovqaep._.js +3 -0
- package/.next/server/chunks/_0wh8igpovqaep._.js.map +1 -0
- package/.next/server/chunks/_10s9tyeasgb0i._.js +3 -0
- package/.next/server/chunks/_10s9tyeasgb0i._.js.map +1 -0
- package/.next/server/chunks/_10uu_24l62-_0._.js +3 -0
- package/.next/server/chunks/_10uu_24l62-_0._.js.map +1 -0
- package/.next/server/chunks/_111ja8xkcaayx._.js +3 -0
- package/.next/server/chunks/_111ja8xkcaayx._.js.map +1 -0
- package/.next/server/chunks/_146xyuw6iu78n._.js +3 -0
- package/.next/server/chunks/_146xyuw6iu78n._.js.map +1 -0
- package/.next/server/chunks/_170e1_rlfsf03._.js +3 -0
- package/.next/server/chunks/_170e1_rlfsf03._.js.map +1 -0
- package/.next/server/chunks/_18ktg21m5ffu5._.js +3 -0
- package/.next/server/chunks/_18ktg21m5ffu5._.js.map +1 -0
- package/.next/server/chunks/_19tb4jcjqiyom._.js +3 -0
- package/.next/server/chunks/_19tb4jcjqiyom._.js.map +1 -0
- package/.next/server/chunks/_1ffeeaqyjdqzf._.js +3 -0
- package/.next/server/chunks/_1ffeeaqyjdqzf._.js.map +1 -0
- package/.next/server/chunks/_1k3na_-a86gbn._.js +3 -0
- package/.next/server/chunks/_1k3na_-a86gbn._.js.map +1 -0
- package/.next/server/chunks/_1kwx_epvqg4do._.js +3 -0
- package/.next/server/chunks/_1kwx_epvqg4do._.js.map +1 -0
- package/.next/server/chunks/_1mxn_lbuesj3_._.js +3 -0
- package/.next/server/chunks/_1mxn_lbuesj3_._.js.map +1 -0
- package/.next/server/chunks/_1n-6yntr59hz-._.js +3 -0
- package/.next/server/chunks/_1n-6yntr59hz-._.js.map +1 -0
- package/.next/server/chunks/_1o0e0kk3zhmfk._.js +3 -0
- package/.next/server/chunks/_1o0e0kk3zhmfk._.js.map +1 -0
- package/.next/server/chunks/_1qxheoabqmzqk._.js +3 -0
- package/.next/server/chunks/_1qxheoabqmzqk._.js.map +1 -0
- package/.next/server/chunks/_1tji4d-rsralm._.js +3 -0
- package/.next/server/chunks/_1tji4d-rsralm._.js.map +1 -0
- package/.next/server/chunks/_1w6vul60in-n6._.js +3 -0
- package/.next/server/chunks/_1w6vul60in-n6._.js.map +1 -0
- package/.next/server/chunks/_1yp1pldb73ib4._.js +3 -0
- package/.next/server/chunks/_1yp1pldb73ib4._.js.map +1 -0
- package/.next/server/chunks/_next-internal_server_app_api_config_route_actions_0ep4_f1yut2mt.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_config_route_actions_0ep4_f1yut2mt.js.map +1 -0
- package/.next/server/chunks/_next-internal_server_app_api_fs_route_actions_0bfrr9ckhntty.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_fs_route_actions_0bfrr9ckhntty.js.map +1 -0
- package/.next/server/chunks/_next-internal_server_app_api_p_[projectId]_activity_route_actions_1o0prtv03y3nn.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_p_[projectId]_activity_route_actions_1o0prtv03y3nn.js.map +1 -0
- package/.next/server/chunks/_next-internal_server_app_api_p_[projectId]_beads_route_actions_073r35dma_j8s.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_p_[projectId]_beads_route_actions_073r35dma_j8s.js.map +1 -0
- package/.next/server/chunks/_next-internal_server_app_api_p_[projectId]_doctor_route_actions_1rijqoag5taoa.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_p_[projectId]_doctor_route_actions_1rijqoag5taoa.js.map +1 -0
- package/.next/server/chunks/_next-internal_server_app_api_p_[projectId]_insights_route_actions_0jz8vtlr3le7i.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_p_[projectId]_insights_route_actions_0jz8vtlr3le7i.js.map +1 -0
- package/.next/server/chunks/_next-internal_server_app_api_p_[projectId]_order_route_actions_02ppmkb6_hzeb.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_p_[projectId]_order_route_actions_02ppmkb6_hzeb.js.map +1 -0
- package/.next/server/chunks/_next-internal_server_app_api_p_[projectId]_publish_route_actions_09aeeim6yuy6h.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_p_[projectId]_publish_route_actions_09aeeim6yuy6h.js.map +1 -0
- package/.next/server/chunks/_next-internal_server_app_api_projects_[id]_route_actions_0xth066-5sa64.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_projects_[id]_route_actions_0xth066-5sa64.js.map +1 -0
- package/.next/server/chunks/_next-internal_server_app_api_projects_route_actions_0h5ne2fr_h1tq.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_projects_route_actions_0h5ne2fr_h1tq.js.map +1 -0
- package/.next/server/chunks/_next-internal_server_app_api_telemetry_route_actions_1w3amzmkajq41.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_telemetry_route_actions_1w3amzmkajq41.js.map +1 -0
- package/.next/server/chunks/_next-internal_server_app_api_update_check_route_actions_1i8_z9m5w7fuz.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_update_check_route_actions_1i8_z9m5w7fuz.js.map +1 -0
- package/.next/server/chunks/_next-internal_server_app_api_update_run_route_actions_0hd7t05lf6pu_.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_update_run_route_actions_0hd7t05lf6pu_.js.map +1 -0
- package/.next/server/chunks/_next-internal_server_app_api_viewer-mode_route_actions_1bxw5uknzqmon.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_viewer-mode_route_actions_1bxw5uknzqmon.js.map +1 -0
- package/.next/server/chunks/_next-internal_server_app_apple-icon_png_route_actions_0jcl8aui56a1m.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_apple-icon_png_route_actions_0jcl8aui56a1m.js.map +1 -0
- package/.next/server/chunks/_next-internal_server_app_favicon_ico_route_actions_0g2jjlssn1kss.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_favicon_ico_route_actions_0g2jjlssn1kss.js.map +1 -0
- package/.next/server/chunks/_next-internal_server_app_icon_svg_route_actions_1r2h_ubdhjtcp.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_icon_svg_route_actions_1r2h_ubdhjtcp.js.map +1 -0
- package/.next/server/chunks/instrumentation-node_ts_157o961d03nbm._.js +3 -0
- package/.next/server/chunks/instrumentation-node_ts_157o961d03nbm._.js.map +1 -0
- package/.next/server/chunks/lib_beads-view_ts_1fvxcrevh9zu_._.js +3 -0
- package/.next/server/chunks/lib_beads-view_ts_1fvxcrevh9zu_._.js.map +1 -0
- package/.next/server/chunks/lib_config_ts_0zrjxh_mm8sv8._.js +3 -0
- package/.next/server/chunks/lib_config_ts_0zrjxh_mm8sv8._.js.map +1 -0
- package/.next/server/chunks/lib_gamification_ts_0ojrlsdva9tsn._.js +3 -0
- package/.next/server/chunks/lib_gamification_ts_0ojrlsdva9tsn._.js.map +1 -0
- package/.next/server/chunks/lib_self-update_ts_1s_0im4leryko._.js +3 -0
- package/.next/server/chunks/lib_self-update_ts_1s_0im4leryko._.js.map +1 -0
- package/.next/server/chunks/lib_store_ts_06cg85jmkn83a._.js +5 -0
- package/.next/server/chunks/lib_store_ts_06cg85jmkn83a._.js.map +1 -0
- package/.next/server/chunks/node_modules_next_0sx6ib_cz483a._.js +320 -0
- package/.next/server/chunks/node_modules_next_0sx6ib_cz483a._.js.map +1 -0
- package/.next/server/chunks/ssr/[externals]__05zh3njt6xz3h._.js +3 -0
- package/.next/server/chunks/ssr/[externals]__05zh3njt6xz3h._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0_jjlev4jw3sc._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0_jjlev4jw3sc._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0gttu4_51ori6._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0gttu4_51ori6._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0py1t7q9ntzgc._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0py1t7q9ntzgc._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0uzyn00104lyw._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0uzyn00104lyw._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__10sjsc4ko7y98._.js +14 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__10sjsc4ko7y98._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__10zoxas8t6ikf._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__10zoxas8t6ikf._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__1_1soca8mkipl._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__1_1soca8mkipl._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__1cf6qt9agg_9-._.js +14 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__1cf6qt9agg_9-._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__1kh1tntqbjk8h._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__1kh1tntqbjk8h._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__1oibig2utok9d._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__1oibig2utok9d._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__1xizcyi5hek65._.js +60 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__1xizcyi5hek65._.js.map +1 -0
- package/.next/server/chunks/ssr/[turbopack]_runtime.js +937 -0
- package/.next/server/chunks/ssr/[turbopack]_runtime.js.map +10 -0
- package/.next/server/chunks/ssr/_02mwe4ucwaopu._.js +291 -0
- package/.next/server/chunks/ssr/_02mwe4ucwaopu._.js.map +1 -0
- package/.next/server/chunks/ssr/_0_ky_k50rh6-9._.js +3 -0
- package/.next/server/chunks/ssr/_0_ky_k50rh6-9._.js.map +1 -0
- package/.next/server/chunks/ssr/_1020o02v8ucmf._.js +3 -0
- package/.next/server/chunks/ssr/_1020o02v8ucmf._.js.map +1 -0
- package/.next/server/chunks/ssr/_1i_x4qkev3tax._.js +3 -0
- package/.next/server/chunks/ssr/_1i_x4qkev3tax._.js.map +1 -0
- package/.next/server/chunks/ssr/_1mzldxegsozij._.js +3 -0
- package/.next/server/chunks/ssr/_1mzldxegsozij._.js.map +1 -0
- package/.next/server/chunks/ssr/_next-internal_server_app__global-error_page_actions_0zi5s8-psc_d2.js +3 -0
- package/.next/server/chunks/ssr/_next-internal_server_app__global-error_page_actions_0zi5s8-psc_d2.js.map +1 -0
- package/.next/server/chunks/ssr/_next-internal_server_app__not-found_page_actions_0pt47yrisjoev.js +3 -0
- package/.next/server/chunks/ssr/_next-internal_server_app__not-found_page_actions_0pt47yrisjoev.js.map +1 -0
- package/.next/server/chunks/ssr/_next-internal_server_app_p_[projectId]_page_actions_1v83cl8bzuchz.js +3 -0
- package/.next/server/chunks/ssr/_next-internal_server_app_p_[projectId]_page_actions_1v83cl8bzuchz.js.map +1 -0
- package/.next/server/chunks/ssr/_next-internal_server_app_page_actions_0hhsz1jew5ls7.js +3 -0
- package/.next/server/chunks/ssr/_next-internal_server_app_page_actions_0hhsz1jew5ls7.js.map +1 -0
- package/.next/server/chunks/ssr/components_launcher_tsx_1i40oht1v6miz._.js +3 -0
- package/.next/server/chunks/ssr/components_launcher_tsx_1i40oht1v6miz._.js.map +1 -0
- package/.next/server/chunks/ssr/components_providers_tsx_0thx-xfvr_dtx._.js +3 -0
- package/.next/server/chunks/ssr/components_providers_tsx_0thx-xfvr_dtx._.js.map +1 -0
- package/.next/server/chunks/ssr/node_modules_0gxlxpuufujz9._.js +33 -0
- package/.next/server/chunks/ssr/node_modules_0gxlxpuufujz9._.js.map +1 -0
- package/.next/server/chunks/ssr/node_modules_0h91jdk0pr40d._.js +33 -0
- package/.next/server/chunks/ssr/node_modules_0h91jdk0pr40d._.js.map +1 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_0janj0i6dqko7._.js +6 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_0janj0i6dqko7._.js.map +1 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_1dupwucoqt5qm._.js +3 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_1dupwucoqt5qm._.js.map +1 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_client_components_0wpq8j32_ibz4._.js +3 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_client_components_0wpq8j32_ibz4._.js.map +1 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_client_components_builtin_forbidden_0symwr9mbf-fh.js +3 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_client_components_builtin_forbidden_0symwr9mbf-fh.js.map +1 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_client_components_builtin_global-error_0q-w892nagajq.js +3 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_client_components_builtin_global-error_0q-w892nagajq.js.map +1 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_client_components_builtin_unauthorized_0l_sp0xky89qu.js +3 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_client_components_builtin_unauthorized_0l_sp0xky89qu.js.map +1 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_08w9x0-loejdh.js +3 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_08w9x0-loejdh.js.map +1 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0bpybjk9qyzcp.js +3 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0bpybjk9qyzcp.js.map +1 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0d8m61g-qls74.js +3 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0d8m61g-qls74.js.map +1 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_13q04th-918ib.js +3 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_13q04th-918ib.js.map +1 -0
- package/.next/server/edge/chunks/_0o_tvsklgn-yk._.js +3 -0
- package/.next/server/edge/chunks/_0o_tvsklgn-yk._.js.map +1 -0
- package/.next/server/edge/chunks/node_modules_next_dist_esm_build_templates_edge-wrapper_1oiuqfca5iqka.js.map +1 -0
- package/.next/server/edge/chunks/turbopack-node_modules_next_dist_esm_build_templates_edge-wrapper_1oiuqfca5iqka.js +3 -0
- package/.next/server/functions-config-manifest.json +19 -0
- package/.next/server/instrumentation/middleware-manifest.json +12 -0
- package/.next/server/instrumentation.js +4 -0
- package/.next/server/instrumentation.js.map +5 -0
- package/.next/server/instrumentation.js.nft.json +1 -0
- package/.next/server/interception-route-rewrite-manifest.js +1 -0
- package/.next/server/middleware/middleware-manifest.json +6 -0
- package/.next/server/middleware-build-manifest.js +69 -0
- package/.next/server/middleware-manifest.json +6 -0
- package/.next/server/middleware.js +5 -0
- package/.next/server/middleware.js.map +5 -0
- package/.next/server/middleware.js.nft.json +1 -0
- package/.next/server/next-font-manifest.js +1 -0
- package/.next/server/next-font-manifest.json +19 -0
- package/.next/server/pages/404.html +12 -0
- package/.next/server/pages/500.html +1 -0
- package/.next/server/pages-manifest.json +4 -0
- package/.next/server/prefetch-hints.json +34 -0
- package/.next/server/preview-props.json +5 -0
- package/.next/server/server-reference-manifest.js +1 -0
- package/.next/server/server-reference-manifest.json +5 -0
- package/.next/static/CNwJGIAhEiVMAkf3ebvok/_buildManifest.js +11 -0
- package/.next/static/CNwJGIAhEiVMAkf3ebvok/_clientMiddlewareManifest.js +6 -0
- package/.next/static/CNwJGIAhEiVMAkf3ebvok/_ssgManifest.js +1 -0
- package/.next/static/chunks/04lvtbsumb9l-.js +22 -0
- package/.next/static/chunks/07balm4l-kilq.js +1 -0
- package/.next/static/chunks/0cz1d0mv5g_q7.js +1 -0
- package/.next/static/chunks/0lf_v5uyq3i9q.js +1 -0
- package/.next/static/chunks/1ix59xuhq-q14.css +1 -0
- package/.next/static/chunks/1oizlhl9fdqt_.js +1 -0
- package/.next/static/chunks/21v6r4y8vgqng.css +3 -0
- package/.next/static/chunks/2ca16cvfmb3l3.js +1 -0
- package/.next/static/chunks/2k0ht_txv9ool.js +1 -0
- package/.next/static/chunks/2x0qc_flzv-la.js +31 -0
- package/.next/static/chunks/2xh00k9l33qnb.js +1 -0
- package/.next/static/chunks/3-53rbq2namxd.js +1 -0
- package/.next/static/chunks/3yk880zca6oid.js +58 -0
- package/.next/static/chunks/3yqhmu1hny1_2.js +1 -0
- package/.next/static/chunks/turbopack-3-ry682tkyiqk.js +1 -0
- package/.next/static/media/4fa387ec64143e14-s.2tuy5pz7dlieh.woff2 +0 -0
- package/.next/static/media/53b9e256198e5412-s.390ncx5urfkfu.woff2 +0 -0
- package/.next/static/media/5ce348bf30bf5439-s.31988l_ccedte.woff2 +0 -0
- package/.next/static/media/6306c77e7c8268e4-s.2dbetqa9o8jxf.woff2 +0 -0
- package/.next/static/media/7178b3e590c64307-s.21jp631_3pja2.woff2 +0 -0
- package/.next/static/media/797e433ab948586e-s.p.0r6juujl39pe6.woff2 +0 -0
- package/.next/static/media/7d817b4c03b0c5f1-s.1uyisp29ctx0d.woff2 +0 -0
- package/.next/static/media/8a480f0b521d4e75-s.1qq4vpdcun5oj.woff2 +0 -0
- package/.next/static/media/apple-icon.3wegq_e2im0r7.png +0 -0
- package/.next/static/media/bbc41e54d2fcbd21-s.1rgnod-3esatf.woff2 +0 -0
- package/.next/static/media/caa3a2e1cccd8315-s.p.0wgildi0cnwt9.woff2 +0 -0
- package/.next/static/media/favicon.2zdrk8nf2w92v.ico +0 -0
- package/.next/static/media/fef07dbb0973bf53-s.3p2_lha1f2xer.woff2 +0 -0
- package/.next/static/media/icon.20nhmzpyywyzw.svg +1 -0
- package/.next/turbopack +0 -0
- package/LICENSE +22 -0
- package/README.md +439 -2
- package/bin/beadscope.mjs +724 -0
- package/next.config.ts +43 -0
- package/package.json +105 -4
- package/public/file.svg +1 -0
- package/public/globe.svg +1 -0
- package/public/next.svg +1 -0
- package/public/vercel.svg +1 -0
- package/public/window.svg +1 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../app/api/fs/route.ts","../../../node_modules/next/src/build/templates/app-route.ts"],"sourcesContent":["import fs from \"node:fs\";\nimport path from \"node:path\";\nimport os from \"node:os\";\nimport { ok, fail } from \"@/lib/api\";\n\nexport const dynamic = \"force-dynamic\";\n\n/**\n * Read-only filesystem browser used by the \"add project\" folder picker.\n *\n * SECURITY: this exposes the server's directory tree to anyone who can reach it.\n * That is acceptable for a localhost, single-user dev tool (same trust model as\n * the existing `bd` shell-out) — do NOT expose this app to untrusted networks\n * without auth. Set BEADS_FS_ROOT to clamp browsing to a subtree.\n */\nfunction hasBeads(p: string): boolean {\n try {\n return fs.existsSync(path.join(p, \".beads\"));\n } catch {\n return false;\n }\n}\n\nexport async function GET(req: Request) {\n try {\n const url = new URL(req.url);\n const home = os.homedir();\n const root = process.env.BEADS_FS_ROOT ? path.resolve(process.env.BEADS_FS_ROOT) : null;\n const rawRequested = url.searchParams.get(\"path\");\n // Expand a leading ~ so typed/pasted home-relative paths resolve.\n const requested =\n rawRequested === \"~\"\n ? home\n : rawRequested?.startsWith(\"~/\")\n ? path.join(home, rawRequested.slice(2))\n : rawRequested;\n const target = path.resolve(requested && requested.trim() ? requested : root || home);\n\n if (root && target !== root && !target.startsWith(root + path.sep)) {\n return ok({ error: \"Path is outside the allowed root\", code: \"eacces\" }, 403);\n }\n\n let stat: fs.Stats;\n try {\n stat = fs.statSync(target);\n } catch (e) {\n const code = (e as NodeJS.ErrnoException).code;\n if (code === \"ENOENT\" || code === \"ENOTDIR\") {\n return ok({ error: `Not found: ${target}`, code: \"enoent\" }, 400);\n }\n if (code === \"EACCES\") {\n return ok({ error: `Permission denied: ${target}`, code: \"eacces\" }, 403);\n }\n throw e;\n }\n if (!stat.isDirectory()) {\n return ok({ error: `Not a directory: ${target}`, code: \"enotdir\" }, 400);\n }\n\n let dirents: fs.Dirent[];\n try {\n dirents = fs.readdirSync(target, { withFileTypes: true });\n } catch (e) {\n const code = (e as NodeJS.ErrnoException).code;\n if (code === \"EACCES\") {\n return ok({ error: `Permission denied: ${target}`, code: \"eacces\" }, 403);\n }\n throw e;\n }\n\n const entries = dirents\n .filter((d) => {\n if (d.name.startsWith(\".\")) return false; // hide dotfolders\n if (d.isDirectory()) return true;\n if (d.isSymbolicLink()) {\n try {\n return fs.statSync(path.join(target, d.name)).isDirectory();\n } catch {\n return false;\n }\n }\n return false;\n })\n .map((d) => {\n const full = path.join(target, d.name);\n return { name: d.name, path: full, hasBeads: hasBeads(full) };\n })\n .sort((a, b) => a.name.localeCompare(b.name));\n\n const parent = path.dirname(target);\n const parentAllowed = !root || target !== root;\n\n return ok({\n path: target,\n parent: parent === target || !parentAllowed ? null : parent,\n home: root || home,\n hasBeads: hasBeads(target),\n entries,\n });\n } catch (e) {\n return fail(e);\n }\n}\n","import {\n AppRouteRouteModule,\n type AppRouteRouteHandlerContext,\n type AppRouteRouteModuleOptions,\n} from '../../server/route-modules/app-route/module.compiled'\nimport { RouteKind } from '../../server/route-kind'\nimport { patchFetch as _patchFetch } from '../../server/lib/patch-fetch'\nimport type { IncomingMessage, ServerResponse } from 'node:http'\nimport {\n addRequestMeta,\n getRequestMeta,\n setRequestMeta,\n type RequestMeta,\n} from '../../server/request-meta'\nimport {\n getTracer,\n type Span,\n SpanKind,\n SpanStatusCode,\n} from '../../server/lib/trace/tracer'\nimport { setManifestsSingleton } from '../../server/app-render/manifests-singleton'\nimport { normalizeAppPath } from '../../shared/lib/router/utils/app-paths'\nimport { NodeNextRequest, NodeNextResponse } from '../../server/base-http/node'\nimport {\n NextRequestAdapter,\n signalFromNodeResponse,\n} from '../../server/web/spec-extension/adapters/next-request'\nimport { BaseServerSpan } from '../../server/lib/trace/constants'\nimport { getRevalidateReason } from '../../server/instrumentation/utils'\nimport { sendResponse } from '../../server/send-response'\nimport {\n fromNodeOutgoingHttpHeaders,\n toNodeOutgoingHttpHeaders,\n} from '../../server/web/utils'\nimport { getCacheControlHeader } from '../../server/lib/cache-control'\nimport { INFINITE_CACHE, NEXT_CACHE_TAGS_HEADER } from '../../lib/constants'\nimport { NoFallbackError } from '../../shared/lib/no-fallback-error.external'\nimport { isRouteCacheOwner } from '../../server/lib/route-cache-key'\nimport {\n CachedRouteKind,\n type ResponseCacheEntry,\n type ResponseGenerator,\n} from '../../server/response-cache'\n\n// These are injected by the loader afterwards. This is injected as a variable\n// instead of a replacement because this could also be `undefined` instead of\n// an empty string.\ndeclare const nextConfigOutput: AppRouteRouteModuleOptions['nextConfigOutput']\n\n// We inject the nextConfigOutput here so that we can use them in the route\n// module.\n// INJECT:nextConfigOutput\n\nconst routeModule = new AppRouteRouteModule({\n definition: {\n kind: RouteKind.APP_ROUTE,\n page: 'VAR_DEFINITION_PAGE',\n pathname: 'VAR_DEFINITION_PATHNAME',\n filename: 'VAR_DEFINITION_FILENAME',\n bundlePath: 'VAR_DEFINITION_BUNDLE_PATH',\n },\n distDir: process.env.__NEXT_RELATIVE_DIST_DIR || '',\n relativeProjectDir: process.env.__NEXT_RELATIVE_PROJECT_DIR || '',\n resolvedPagePath: 'VAR_RESOLVED_PAGE_PATH',\n nextConfigOutput,\n // The lazy require factory ensures that:\n // - In dev: devRequestTimingInternalsEnd is set before userland executes,\n // correctly attributing module load time to application-code rather than\n // framework internals.\n // - In all modes: async modules (route files with top-level await) are\n // handled correctly — require() returns a Promise for such modules, which\n // ensureUserland() awaits before the first request is handled.\n userland: () => require('VAR_USERLAND') as typeof import('VAR_USERLAND'),\n // In Turbopack dev mode, also provide a synchronous per-request getter so\n // server HMR updates are picked up without re-executing the entry chunk.\n // Using require() (synchronous) avoids adding async overhead that would be\n // incorrectly attributed to application-code time in devRequestTiming.\n ...(process.env.TURBOPACK && process.env.__NEXT_DEV_SERVER\n ? {\n getUserland: () =>\n require('VAR_USERLAND') as typeof import('VAR_USERLAND'),\n }\n : {}),\n})\n\n// Pull out the exports that we need to expose from the module. This should\n// be eliminated when we've moved the other routes to the new format. These\n// are used to hook into the route.\nconst { workAsyncStorage, workUnitAsyncStorage, serverHooks } = routeModule\n\nfunction patchFetch() {\n return _patchFetch({\n workAsyncStorage,\n workUnitAsyncStorage,\n })\n}\n\nexport {\n routeModule,\n workAsyncStorage,\n workUnitAsyncStorage,\n serverHooks,\n patchFetch,\n}\n\nexport async function handler(\n req: IncomingMessage,\n res: ServerResponse,\n ctx: {\n waitUntil?: (prom: Promise<void>) => void\n requestMeta?: RequestMeta\n }\n) {\n if (ctx.requestMeta) {\n setRequestMeta(req, ctx.requestMeta)\n }\n if (routeModule.isDev) {\n addRequestMeta(req, 'devRequestTimingInternalsEnd', process.hrtime.bigint())\n }\n let srcPage = 'VAR_DEFINITION_PAGE'\n\n // turbopack doesn't normalize `/index` in the page name\n // so we need to to process dynamic routes properly\n // TODO: fix turbopack providing differing value from webpack\n if (process.env.TURBOPACK) {\n srcPage = srcPage.replace(/\\/index$/, '') || '/'\n } else if (srcPage === '/index') {\n // we always normalize /index specifically\n srcPage = '/'\n }\n const multiZoneDraftMode = process.env\n .__NEXT_MULTI_ZONE_DRAFT_MODE as any as boolean\n\n const prepareResult = await routeModule.prepare(req, res, {\n srcPage,\n multiZoneDraftMode,\n })\n\n if (!prepareResult) {\n res.statusCode = 400\n res.end('Bad Request')\n ctx.waitUntil?.(Promise.resolve())\n return null\n }\n\n const {\n buildId,\n deploymentId,\n params,\n nextConfig,\n parsedUrl,\n isDraftMode,\n prerenderManifest,\n routerServerContext,\n isOnDemandRevalidate,\n revalidateOnlyGenerated,\n resolvedPathname,\n clientReferenceManifest,\n serverActionsManifest,\n previewProps,\n } = prepareResult\n\n const normalizedSrcPage = normalizeAppPath(srcPage)\n\n // Only this route's prerenders can establish ISR or admit generated params.\n const isPrerendered =\n Boolean(prerenderManifest.routes[resolvedPathname]) &&\n (routeModule.isDev ||\n isRouteCacheOwner(\n resolvedPathname,\n routeModule.cacheOwner,\n prerenderManifest.routes[resolvedPathname]\n ))\n\n let isIsr = Boolean(\n prerenderManifest.dynamicRoutes[normalizedSrcPage] || isPrerendered\n )\n\n const render404 = async () => {\n // TODO: should route-module itself handle rendering the 404\n if (routerServerContext?.render404) {\n await routerServerContext.render404(req, res, parsedUrl, false)\n } else {\n res.end('This page could not be found')\n }\n return null\n }\n\n if (isIsr && !isDraftMode) {\n const prerenderInfo = prerenderManifest.dynamicRoutes[normalizedSrcPage]\n\n if (prerenderInfo) {\n if (prerenderInfo.fallback === false && !isPrerendered) {\n if (nextConfig.adapterPath) {\n return await render404()\n }\n throw new NoFallbackError()\n }\n }\n }\n\n let cacheKey: string | null = null\n\n if (isIsr && !routeModule.isDev && !isDraftMode) {\n cacheKey = resolvedPathname\n // ensure /index and / is normalized to one key\n cacheKey = cacheKey === '/index' ? '/' : cacheKey\n }\n\n // Before rendering (which initializes component tree modules), we have to\n // set the reference manifests to our global store so Server Action's\n // encryption util can access to them at the top level of the page module.\n if (serverActionsManifest && clientReferenceManifest) {\n setManifestsSingleton({\n page: srcPage,\n clientReferenceManifest,\n serverActionsManifest,\n })\n }\n\n const method = req.method || 'GET'\n const tracer = getTracer()\n const activeSpan = tracer.getActiveScopeSpan()\n const isWrappedByNextServer = Boolean(\n routerServerContext?.isWrappedByNextServer\n )\n const isMinimalMode = Boolean(getRequestMeta(req, 'minimalMode'))\n\n const incrementalCache =\n getRequestMeta(req, 'incrementalCache') ||\n (await routeModule.getIncrementalCache(\n req,\n nextConfig,\n previewProps,\n prerenderManifest,\n isMinimalMode\n ))\n\n incrementalCache?.resetRequestCache()\n ;(globalThis as any).__incrementalCache = incrementalCache\n\n const context: AppRouteRouteHandlerContext = {\n params,\n previewProps,\n renderOpts: {\n experimental: {\n authInterrupts: Boolean(nextConfig.experimental.authInterrupts),\n useCacheTimeout: nextConfig.experimental.useCacheTimeout,\n durableUseCacheEntries: Boolean(\n nextConfig.experimental.durableUseCacheEntries\n ),\n },\n cacheComponents: Boolean(nextConfig.cacheComponents),\n validationLevel: nextConfig.experimental.instantInsights.validationLevel,\n isDraftMode,\n incrementalCache,\n hmrRefreshHash: getRequestMeta(req, 'hmrRefreshHash'),\n cacheLifeProfiles: nextConfig.cacheLife,\n staticPageGenerationTimeout: nextConfig.staticPageGenerationTimeout,\n waitUntil: ctx.waitUntil,\n onClose: (cb) => {\n res.on('close', cb)\n },\n onAfterTaskError: undefined,\n },\n sharedContext: {\n buildId,\n deploymentId,\n },\n }\n const nodeNextReq = new NodeNextRequest(req)\n const nodeNextRes = new NodeNextResponse(res)\n\n const nextReq = NextRequestAdapter.fromNodeNextRequest(\n nodeNextReq,\n signalFromNodeResponse(res)\n )\n\n const responseGenerator: ResponseGenerator = async ({\n previousCacheEntry,\n }) => {\n try {\n if (\n !isMinimalMode &&\n isOnDemandRevalidate &&\n revalidateOnlyGenerated &&\n !previousCacheEntry\n ) {\n res.statusCode = 404\n // on-demand revalidate always sets this header\n res.setHeader('x-nextjs-cache', 'REVALIDATED')\n res.end('This page could not be found')\n return null\n }\n\n const response =\n cacheKey === null\n ? await routeModule.handle(nextReq, context)\n : await routeModule.prerender(nextReq, context)\n\n ;(req as any).fetchMetrics = (context.renderOpts as any).fetchMetrics\n let pendingWaitUntil = context.renderOpts.pendingWaitUntil\n\n // Attempt using provided waitUntil if available\n // if it's not we fallback to sendResponse's handling\n if (pendingWaitUntil) {\n if (ctx.waitUntil) {\n ctx.waitUntil(pendingWaitUntil)\n pendingWaitUntil = undefined\n }\n }\n const cacheTags = context.renderOpts.collectedTags\n\n // If the request is for a static response, we can cache it so long\n // as it's not edge.\n if (isIsr) {\n const blob = await response.blob()\n\n // Copy the headers from the response.\n const headers = toNodeOutgoingHttpHeaders(response.headers)\n\n if (cacheTags) {\n headers[NEXT_CACHE_TAGS_HEADER] = cacheTags\n }\n\n if (!headers['content-type'] && blob.type) {\n headers['content-type'] = blob.type\n }\n\n const revalidate =\n typeof context.renderOpts.collectedRevalidate === 'undefined' ||\n context.renderOpts.collectedRevalidate >= INFINITE_CACHE\n ? false\n : context.renderOpts.collectedRevalidate\n\n const expire =\n typeof context.renderOpts.collectedExpire === 'undefined' ||\n context.renderOpts.collectedExpire >= INFINITE_CACHE\n ? // Fall back to the global `expireTime` config when the\n // route has a numeric `revalidate` but didn't declare an\n // explicit `expire` (e.g. via `cacheLife`). This mirrors the\n // build-time fallback in `build/index.ts` so cache entries\n // and the response Cache-Control header agree on the route's\n // effective expire. Routes that opt out of revalidation\n // (`revalidate: false`) or that are dynamic (`revalidate: 0`)\n // keep `expire: undefined`.\n revalidate !== false && revalidate > 0\n ? nextConfig.expireTime\n : undefined\n : context.renderOpts.collectedExpire\n\n // Create the cache entry for the response.\n const cacheEntry: ResponseCacheEntry = {\n value: {\n kind: CachedRouteKind.APP_ROUTE,\n status: response.status,\n body: Buffer.from(await blob.arrayBuffer()),\n headers,\n },\n cacheControl: { revalidate, expire },\n }\n\n return cacheEntry\n } else {\n // send response without caching if not ISR\n await sendResponse(nodeNextReq, nodeNextRes, response, pendingWaitUntil)\n return null\n }\n } catch (err) {\n // if this is a background revalidate we need to report\n // the request error here as it won't be bubbled\n if (previousCacheEntry?.isStale) {\n const silenceLog = false\n await routeModule.onRequestError(\n req,\n err,\n {\n routerKind: 'App Router',\n routePath: srcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isStaticGeneration: cacheKey !== null,\n isOnDemandRevalidate,\n }),\n },\n silenceLog,\n routerServerContext\n )\n }\n throw err\n }\n }\n\n const handleResponse = async (\n currentSpan: Span | undefined,\n parentSpan: Span | undefined\n ) => {\n try {\n const cacheEntry = await routeModule.handleResponse({\n req,\n nextConfig,\n cacheKey,\n routeKind: RouteKind.APP_ROUTE,\n isFallback: false,\n previewProps,\n prerenderManifest,\n isRoutePPREnabled: false,\n isOnDemandRevalidate,\n revalidateOnlyGenerated,\n responseGenerator,\n waitUntil: ctx.waitUntil,\n isMinimalMode,\n })\n\n if (cacheEntry !== null && 'error' in cacheEntry) {\n throw cacheEntry.error\n }\n\n // we don't create a cacheEntry for ISR\n if (!isIsr) {\n return\n }\n\n if (cacheEntry?.value?.kind !== CachedRouteKind.APP_ROUTE) {\n throw new Error(\n `Invariant: app-route received invalid cache entry ${cacheEntry?.value?.kind}`\n )\n }\n\n if (!isMinimalMode) {\n res.setHeader(\n 'x-nextjs-cache',\n isOnDemandRevalidate\n ? 'REVALIDATED'\n : cacheEntry.isMiss\n ? 'MISS'\n : cacheEntry.isStale\n ? 'STALE'\n : 'HIT'\n )\n }\n\n // Draft mode should never be cached\n if (isDraftMode) {\n res.setHeader(\n 'Cache-Control',\n 'private, no-cache, no-store, max-age=0, must-revalidate'\n )\n }\n\n const headers = fromNodeOutgoingHttpHeaders(cacheEntry.value.headers)\n\n if (!(isMinimalMode && isIsr)) {\n headers.delete(NEXT_CACHE_TAGS_HEADER)\n }\n\n // If cache control is already set on the response we don't\n // override it to allow users to customize it via next.config\n if (\n cacheEntry.cacheControl &&\n !res.getHeader('Cache-Control') &&\n !headers.get('Cache-Control')\n ) {\n headers.set(\n 'Cache-Control',\n getCacheControlHeader(cacheEntry.cacheControl)\n )\n }\n\n await sendResponse(\n nodeNextReq,\n nodeNextRes,\n // @ts-expect-error - Argument of type 'Buffer<ArrayBufferLike>' is not assignable to parameter of type 'BodyInit | null | undefined'.\n new Response(cacheEntry.value.body, {\n headers,\n status: cacheEntry.value.status || 200,\n })\n )\n return\n } catch (err) {\n if (!(err instanceof NoFallbackError)) {\n const silenceLog = false\n await routeModule.onRequestError(\n req,\n err,\n {\n routerKind: 'App Router',\n routePath: normalizedSrcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isStaticGeneration: cacheKey !== null,\n isOnDemandRevalidate,\n }),\n },\n silenceLog,\n routerServerContext\n )\n }\n\n // rethrow so that we can handle serving error page\n\n // If this is during static generation, throw the error again.\n if (isIsr) throw err\n\n // Otherwise, send a 500 response unless the original response has\n // already committed. In that case, preserve its status code for\n // telemetry while still recording the failure and terminating a response\n // that the failed pipeline left open.\n if (res.headersSent) {\n if (currentSpan) {\n const error =\n err instanceof Error ? err : new Error('Unknown app route error')\n currentSpan.recordException(error)\n currentSpan.setStatus({\n code: SpanStatusCode.ERROR,\n message: error.message,\n })\n currentSpan.setAttribute('error.type', error.name)\n }\n if (!res.writableEnded && !res.destroyed) {\n res.end()\n }\n } else {\n await sendResponse(\n nodeNextReq,\n nodeNextRes,\n new Response(null, { status: 500 })\n )\n }\n return\n } finally {\n ;(() => {\n if (!currentSpan) {\n return\n }\n\n let statusCode = res.statusCode\n\n currentSpan.setAttributes({\n 'http.status_code': statusCode,\n 'next.rsc': false,\n })\n\n if (statusCode && statusCode >= 500) {\n // For 5xx status codes: SHOULD be set to 'Error' span status.\n // x-ref: https://opentelemetry.io/docs/specs/semconv/http/http-spans/#status\n currentSpan.setStatus({\n code: SpanStatusCode.ERROR,\n })\n // For span status 'Error', SHOULD set 'error.type' attribute.\n currentSpan.setAttribute('error.type', statusCode.toString())\n }\n\n const rootSpanAttributes = tracer.getRootSpanAttributes()\n // We were unable to get attributes, probably OTEL is not enabled\n if (!rootSpanAttributes) {\n return\n }\n\n if (\n rootSpanAttributes.get('next.span_type') !==\n BaseServerSpan.handleRequest\n ) {\n console.warn(\n `Unexpected root span type '${rootSpanAttributes.get(\n 'next.span_type'\n )}'. Please report this Next.js issue https://github.com/vercel/next.js`\n )\n return\n }\n\n const route = rootSpanAttributes.get('next.route') || normalizedSrcPage\n const name = `${method} ${route}`\n\n currentSpan.setAttributes({\n 'next.route': route,\n 'http.route': route,\n 'next.span_name': name,\n })\n currentSpan.updateName(name)\n\n // Propagate http.route to the parent span if one exists (e.g.\n // a platform-created HTTP span in adapter deployments).\n if (parentSpan && parentSpan !== currentSpan) {\n parentSpan.setAttribute('http.route', route)\n parentSpan.updateName(name)\n }\n })()\n }\n }\n\n // TODO: activeSpan code path is for when wrapped by\n // next-server can be removed when this is no longer used\n if (isWrappedByNextServer && activeSpan) {\n await handleResponse(activeSpan, undefined)\n } else {\n let parentSpan = tracer.getActiveScopeSpan()\n await tracer.withPropagatedContext(\n req.headers,\n () =>\n tracer.trace(\n BaseServerSpan.handleRequest,\n {\n spanName: `${method} ${srcPage}`,\n kind: SpanKind.SERVER,\n attributes: {\n 'http.method': method,\n 'http.target': req.url,\n },\n },\n (span) => handleResponse(span, parentSpan)\n ),\n undefined,\n !isWrappedByNextServer\n )\n }\n}\n"],"names":["dynamic","hasBeads","p","existsSync","join","GET","req","url","URL","home","homedir","root","process","env","BEADS_FS_ROOT","resolve","rawRequested","searchParams","get","requested","startsWith","slice","target","trim","sep","error","code","stat","statSync","e","isDirectory","dirents","readdirSync","withFileTypes","entries","filter","d","name","isSymbolicLink","map","full","path","sort","a","b","localeCompare","parent","dirname","parentAllowed","AppRouteRouteModule","RouteKind","patchFetch","_patchFetch","addRequestMeta","getRequestMeta","setRequestMeta","getTracer","SpanKind","SpanStatusCode","setManifestsSingleton","normalizeAppPath","NodeNextRequest","NodeNextResponse","NextRequestAdapter","signalFromNodeResponse","BaseServerSpan","getRevalidateReason","sendResponse","fromNodeOutgoingHttpHeaders","toNodeOutgoingHttpHeaders","getCacheControlHeader","INFINITE_CACHE","NEXT_CACHE_TAGS_HEADER","NoFallbackError","isRouteCacheOwner","CachedRouteKind","routeModule","definition","kind","APP_ROUTE","page","pathname","filename","bundlePath","distDir","__NEXT_RELATIVE_DIST_DIR","relativeProjectDir","__NEXT_RELATIVE_PROJECT_DIR","resolvedPagePath","nextConfigOutput","userland","require","TURBOPACK","__NEXT_DEV_SERVER","getUserland","workAsyncStorage","workUnitAsyncStorage","serverHooks","handler","res","ctx","requestMeta","isDev","hrtime","bigint","srcPage","replace","multiZoneDraftMode","__NEXT_MULTI_ZONE_DRAFT_MODE","prepareResult","prepare","statusCode","end","waitUntil","Promise","buildId","deploymentId","params","nextConfig","parsedUrl","isDraftMode","prerenderManifest","routerServerContext","isOnDemandRevalidate","revalidateOnlyGenerated","resolvedPathname","clientReferenceManifest","serverActionsManifest","previewProps","normalizedSrcPage","isPrerendered","Boolean","routes","cacheOwner","isIsr","dynamicRoutes","render404","prerenderInfo","fallback","adapterPath","cacheKey","method","tracer","activeSpan","getActiveScopeSpan","isWrappedByNextServer","isMinimalMode","incrementalCache","getIncrementalCache","resetRequestCache","globalThis","__incrementalCache","context","renderOpts","experimental","authInterrupts","useCacheTimeout","durableUseCacheEntries","cacheComponents","validationLevel","instantInsights","hmrRefreshHash","cacheLifeProfiles","cacheLife","staticPageGenerationTimeout","onClose","cb","on","onAfterTaskError","undefined","sharedContext","nodeNextReq","nodeNextRes","nextReq","fromNodeNextRequest","responseGenerator","previousCacheEntry","setHeader","response","handle","prerender","fetchMetrics","pendingWaitUntil","cacheTags","collectedTags","blob","headers","type","revalidate","collectedRevalidate","expire","collectedExpire","expireTime","cacheEntry","value","status","body","Buffer","from","arrayBuffer","cacheControl","err","isStale","silenceLog","onRequestError","routerKind","routePath","routeType","revalidateReason","isStaticGeneration","handleResponse","currentSpan","parentSpan","routeKind","isFallback","isRoutePPREnabled","Error","isMiss","delete","getHeader","set","Response","headersSent","recordException","setStatus","ERROR","message","setAttribute","writableEnded","destroyed","setAttributes","toString","rootSpanAttributes","getRootSpanAttributes","handleRequest","console","warn","route","updateName","withPropagatedContext","trace","spanName","SERVER","attributes","span"],"mappings":"6CAAA,IAAA,EAAA,EAAA,CAAA,CAAA,MACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OAYA,SAASC,EAASC,CAAS,EACzB,GAAI,CACF,OAAO,EAAA,OAAE,CAACC,UAAU,CAAC,EAAA,OAAI,CAACC,IAAI,CAACF,EAAG,UACpC,CAAE,KAAM,CACN,OAAO,CACT,CACF,CAEO,eAAeG,EAAIC,CAAY,EACpC,GAAI,CACF,IAiBIqB,EAiBAI,EAlCExB,EAAM,IAAIC,IAAIF,EAAIC,GAAG,EACrBE,EAAO,EAAA,OAAE,CAACC,OAAO,GACjBC,EAAOC,QAAQC,GAAG,CAACC,aAAa,CAAG,EAAA,OAAI,CAACC,OAAO,CAACH,QAAQC,GAAG,CAACC,aAAa,EAAI,KAC7EE,EAAeT,EAAIU,YAAY,CAACC,GAAG,CAAC,QAEpCC,EACa,MAAjBH,EACIP,EACAO,GAAcI,WAAW,MACvB,EAAA,OAAI,CAAChB,IAAI,CAACK,EAAMO,EAAaK,KAAK,CAAC,IACnCL,EACFM,EAAS,EAAA,OAAI,CAACP,OAAO,CAACI,GAAaA,EAAUI,IAAI,GAAKJ,EAAYR,GAAQF,GAEhF,GAAIE,GAAQW,IAAWX,GAAQ,CAACW,EAAOF,UAAU,CAACT,EAAO,EAAA,OAAI,CAACa,GAAG,EAC/D,CADkE,KAC3D,CAAA,EAAA,EAAA,CAAA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A,EAAY,kBACjB2C,uBACAC,CACF,EACF","ignoreList":[1]}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
(()=>{"use strict";module.exports=[74945,e=>{var t=e.i(83535),a=e.i(73744),r=e.i(74533);let i=(0,e.i(12057).promisify)(r.execFile),n=process.env.CLAUDE_BIN||"claude";class o extends Error{code;constructor(e,t){super(e),this.name="AiError",this.code=t}}async function s(){try{return await i(n,["--version"],{timeout:5e3}),!0}catch{return!1}}async function l(e){var t;let a,i;if(!await s())throw new o(`The Claude CLI ("${n}") was not found on PATH. Install Claude Code or set CLAUDE_BIN.`,"claude_unavailable");let l=await (i=e.others.slice(0,80).map(e=>`- ${e.id}: ${e.title}`).join("\n"),t=["You are refining a software issue (a 'bead') so an engineer can pick it up cold.\nImprove it: rewrite the description into a clear, bounded scope; add acceptance criteria;\npropose a short markdown sub-task checklist; suggest labels; and flag likely duplicates\nfrom the candidate list (only if genuinely similar).\n",`BEAD ${e.id} [type: ${e.type}]`,`Title: ${e.title}`,`Current labels: ${e.labels.join(", ")||"(none)"}`,"Current description:",e.description||"(empty)","\nCandidate beads (for duplicate detection):",i||"(none)",'\nRespond with ONLY a JSON object (no prose, no code fences) of the form:\n{"description": "<refined markdown — include an "## Acceptance criteria" section and a "- [ ]" checklist>",\n"acceptance": "<the acceptance criteria as plain text>",\n"labels": ["label1","label2"],\n"duplicates": [{"id":"<bead id from the candidates>","title":"<its title>","reason":"<why>"}]}\nUse [] for duplicates if none apply. Do not invent bead ids.'].join("\n"),new Promise((e,a)=>{let i,s=(0,r.spawn)(n,["-p",t],{stdio:["ignore","pipe","pipe"],env:((i={...process.env}).ANTHROPIC_API_KEY&&!i.ANTHROPIC_API_KEY.startsWith("sk-ant-")&&delete i.ANTHROPIC_API_KEY,i)}),l="",d="",c=!1,u=e=>{c||(c=!0,clearTimeout(p),e())},p=setTimeout(()=>{s.kill("SIGKILL"),u(()=>a(new o("The Claude CLI timed out.","timeout")))},12e4);s.stdout.on("data",e=>{(l+=e).length>8388608&&(s.kill("SIGKILL"),u(()=>a(new o("The Claude CLI produced too much output.","overflow"))))}),s.stderr.on("data",e=>{d+=e}),s.on("error",e=>u(()=>a(new o(`The Claude CLI ("${n}") could not be run. Install Claude Code or set CLAUDE_BIN. (${e.message})`,"claude_unavailable")))),s.on("close",t=>u(()=>{0===t?e(l):a(new o(d.trim()||`The Claude CLI exited with code ${t}.`,"claude_failed"))}))}));try{a=JSON.parse(function(e){let t=e.indexOf("{"),a=e.lastIndexOf("}");if(-1===t||-1===a||a<=t)throw new o("The model did not return JSON.","bad_output");return e.slice(t,a+1)}(l))}catch(e){if(e instanceof o)throw e;throw new o("Could not parse the model's response as JSON.","bad_output")}let d=new Set(e.others.map(e=>e.id));return{description:"string"==typeof a.description?a.description:e.description,acceptance:"string"==typeof a.acceptance?a.acceptance:"",labels:Array.isArray(a.labels)?a.labels.filter(e=>"string"==typeof e):[],duplicates:Array.isArray(a.duplicates)?a.duplicates.filter(e=>!!e&&"string"==typeof e.id).filter(e=>d.has(e.id)):[]}}async function d(e,{params:r}){try{let{projectId:e,id:i}=await r,n=await (0,t.R)(e),o=await n.list(),s=o.find(e=>e.id===i);if(!s)return(0,a.O)(Error(`Unknown bead: ${i}`));let d=await l({id:s.id,title:s.title,description:s.description??"",type:s.issue_type,labels:s.labels??[],others:o.filter(e=>e.id!==i).map(e=>({id:e.id,title:e.title}))});return(0,a.N)(d)}catch(e){return(0,a.O)(e)}}e.s(["POST",0,d,"dynamic",0,"force-dynamic"],74945)},96878,e=>{var t=e.i(47909),a=e.i(74017),r=e.i(96250),i=e.i(59756),n=e.i(61916),o=e.i(74677),s=e.i(69741),l=e.i(16795),d=e.i(87718),c=e.i(95169),u=e.i(47587),p=e.i(66012),h=e.i(70101),f=e.i(74838),w=e.i(10372),m=e.i(93695),v=e.i(9580);e.i(52474);var y=e.i(220);let b=new t.AppRouteRouteModule({definition:{kind:a.f.APP_ROUTE,page:"/api/p/[projectId]/beads/[id]/assist/route",pathname:"/api/p/[projectId]/beads/[id]/assist",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/app/api/p/[projectId]/beads/[id]/assist/route.ts",nextConfigOutput:"",userland:()=>e.r(74945),...{}}),{workAsyncStorage:C,workUnitAsyncStorage:R,serverHooks:g}=b;async function x(e,t,r){r.requestMeta&&(0,i.R)(e,r.requestMeta),b.isDev&&(0,i.i)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let C="/api/p/[projectId]/beads/[id]/assist/route";C=C.replace(/\/index$/,"")||"/";let R=await b.prepare(e,t,{srcPage:C,multiZoneDraftMode:!1});if(!R)return t.statusCode=400,t.end("Bad Request"),null==r.waitUntil||r.waitUntil.call(r,Promise.resolve()),null;let{buildId:g,deploymentId:x,params:E,nextConfig:A,parsedUrl:I,isDraftMode:T,prerenderManifest:P,routerServerContext:O,isOnDemandRevalidate:S,revalidateOnlyGenerated:k,resolvedPathname:_,clientReferenceManifest:U,serverActionsManifest:N,previewProps:L}=R,$=(0,s.f)(C),D=!!P.routes[_]&&(b.isDev||(0,v.f)(_,b.cacheOwner,P.routes[_])),j=!!(P.dynamicRoutes[$]||D),q=async()=>((null==O?void 0:O.render404)?await O.render404(e,t,I,!1):t.end("This page could not be found"),null);if(j&&!T){let e=P.dynamicRoutes[$];if(e&&!1===e.fallback&&!D){if(A.adapterPath)return await q();throw new m.NoFallbackError}}let H=null;!j||b.isDev||T||(H="/index"===(H=_)?"/":H),N&&U&&(0,o.f)({page:C,clientReferenceManifest:U,serverActionsManifest:N});let M=e.method||"GET",B=(0,n.v)(),G=B.getActiveScopeSpan(),K=!!(null==O?void 0:O.isWrappedByNextServer),J=!!(0,i.w)(e,"minimalMode"),F=(0,i.w)(e,"incrementalCache")||await b.getIncrementalCache(e,A,L,P,J);null==F||F.resetRequestCache(),globalThis.__incrementalCache=F;let Y={params:E,previewProps:L,renderOpts:{experimental:{authInterrupts:!!A.experimental.authInterrupts,useCacheTimeout:A.experimental.useCacheTimeout,durableUseCacheEntries:!!A.experimental.durableUseCacheEntries},cacheComponents:!!A.cacheComponents,validationLevel:A.experimental.instantInsights.validationLevel,isDraftMode:T,incrementalCache:F,hmrRefreshHash:(0,i.w)(e,"hmrRefreshHash"),cacheLifeProfiles:A.cacheLife,staticPageGenerationTimeout:A.staticPageGenerationTimeout,waitUntil:r.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0},sharedContext:{buildId:g,deploymentId:x}},V=new l.x(e),W=new l.e(t),Q=d.k.fromNodeNextRequest(V,(0,d.t)(t)),Z=async({previousCacheEntry:a})=>{try{if(!J&&S&&k&&!a)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let i=null===H?await b.handle(Q,Y):await b.prerender(Q,Y);e.fetchMetrics=Y.renderOpts.fetchMetrics;let n=Y.renderOpts.pendingWaitUntil;n&&r.waitUntil&&(r.waitUntil(n),n=void 0);let o=Y.renderOpts.collectedTags;if(!j)return await (0,p.f)(V,W,i,n),null;{let e=await i.blob(),t=(0,h.S)(i.headers);o&&(t[w.M]=o),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let a=void 0!==Y.renderOpts.collectedRevalidate&&!(Y.renderOpts.collectedRevalidate>=w.Q)&&Y.renderOpts.collectedRevalidate,r=void 0===Y.renderOpts.collectedExpire||Y.renderOpts.collectedExpire>=w.Q?!1!==a&&a>0?A.expireTime:void 0:Y.renderOpts.collectedExpire;return{value:{kind:y.x.APP_ROUTE,status:i.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:a,expire:r}}}}catch(t){throw(null==a?void 0:a.isStale)&&await b.onRequestError(e,t,{routerKind:"App Router",routePath:C,routeType:"route",revalidateReason:(0,u.f)({isStaticGeneration:null!==H,isOnDemandRevalidate:S})},!1,O),t}},z=async(i,o)=>{try{var s,l;let i=await b.handleResponse({req:e,nextConfig:A,cacheKey:H,routeKind:a.f.APP_ROUTE,isFallback:!1,previewProps:L,prerenderManifest:P,isRoutePPREnabled:!1,isOnDemandRevalidate:S,revalidateOnlyGenerated:k,responseGenerator:Z,waitUntil:r.waitUntil,isMinimalMode:J});if(null!==i&&"error"in i)throw i.error;if(!j)return;if((null==i||null==(s=i.value)?void 0:s.kind)!==y.x.APP_ROUTE)throw Error(`Invariant: app-route received invalid cache entry ${null==i||null==(l=i.value)?void 0:l.kind}`);J||t.setHeader("x-nextjs-cache",S?"REVALIDATED":i.isMiss?"MISS":i.isStale?"STALE":"HIT"),T&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let n=(0,h.G)(i.value.headers);J&&j||n.delete(w.M),!i.cacheControl||t.getHeader("Cache-Control")||n.get("Cache-Control")||n.set("Cache-Control",(0,f.f)(i.cacheControl)),await (0,p.f)(V,W,new Response(i.value.body,{headers:n,status:i.value.status||200}));return}catch(a){if(a instanceof m.NoFallbackError||await b.onRequestError(e,a,{routerKind:"App Router",routePath:$,routeType:"route",revalidateReason:(0,u.f)({isStaticGeneration:null!==H,isOnDemandRevalidate:S})},!1,O),j)throw a;if(t.headersSent){if(i){let e=a instanceof Error?a:Error("Unknown app route error");i.recordException(e),i.setStatus({code:n.J.ERROR,message:e.message}),i.setAttribute("error.type",e.name)}t.writableEnded||t.destroyed||t.end()}else await (0,p.f)(V,W,new Response(null,{status:500}));return}finally{(()=>{if(!i)return;let e=t.statusCode;i.setAttributes({"http.status_code":e,"next.rsc":!1}),e&&e>=500&&(i.setStatus({code:n.J.ERROR}),i.setAttribute("error.type",e.toString()));let a=B.getRootSpanAttributes();if(!a)return;if(a.get("next.span_type")!==c.q.handleRequest)return console.warn(`Unexpected root span type '${a.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let r=a.get("next.route")||$,s=`${M} ${r}`;i.setAttributes({"next.route":r,"http.route":r,"next.span_name":s}),i.updateName(s),o&&o!==i&&(o.setAttribute("http.route",r),o.updateName(s))})()}};if(K&&G)await z(G,void 0);else{let t=B.getActiveScopeSpan();await B.withPropagatedContext(e.headers,()=>B.trace(c.q.handleRequest,{spanName:`${M} ${C}`,kind:n.C.SERVER,attributes:{"http.method":M,"http.target":e.url}},e=>z(e,t)),void 0,!K)}}e.s(["handler",0,x,"patchFetch",0,function(){return(0,r.f)({workAsyncStorage:C,workUnitAsyncStorage:R})},"routeModule",0,b,"serverHooks",0,g,"workAsyncStorage",0,C,"workUnitAsyncStorage",0,R])}]})();
|
|
2
|
+
|
|
3
|
+
//# sourceMappingURL=_0grrkbm3e2o1h._.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../app/api/p/%5BprojectId%5D/beads/%5Bid%5D/assist/route.ts","../../../lib/ai.ts","../../../node_modules/next/src/build/templates/app-route.ts"],"sourcesContent":["import { getStore } from \"@/lib/store\";\nimport { ok, fail } from \"@/lib/api\";\nimport { assistBead } from \"@/lib/ai\";\n\nexport const dynamic = \"force-dynamic\";\n\ntype Ctx = { params: Promise<{ projectId: string; id: string }> };\n\n/** Refine/triage a bead with the local Claude CLI. Read-only — returns\n * suggestions; the client applies them only on explicit confirmation. */\nexport async function POST(_req: Request, { params }: Ctx) {\n try {\n const { projectId, id } = await params;\n const store = await getStore(projectId);\n const beads = await store.list();\n const bead = beads.find((b) => b.id === id);\n if (!bead) return fail(new Error(`Unknown bead: ${id}`));\n\n const result = await assistBead({\n id: bead.id,\n title: bead.title,\n description: bead.description ?? \"\",\n type: bead.issue_type,\n labels: bead.labels ?? [],\n others: beads.filter((b) => b.id !== id).map((b) => ({ id: b.id, title: b.title })),\n });\n return ok(result);\n } catch (e) {\n return fail(e);\n }\n}\n","import \"server-only\";\nimport { execFile, spawn } from \"node:child_process\";\nimport { promisify } from \"node:util\";\n\nconst pExecFile = promisify(execFile);\nconst MAX_OUT = 8 * 1024 * 1024;\n\n/**\n * Run the Claude CLI in print mode with the prompt as an argument.\n *\n * Critically, stdin is `/dev/null` (stdio[0] = \"ignore\"). `execFile` would leave\n * an open stdin pipe, so `claude` waits for piped input, prints \"no stdin data\n * received in 3s, proceeding without it\", and can fail. Closing stdin makes it\n * read the prompt from `-p` immediately. We only surface stderr (which includes\n * harmless connector/auth warnings) when the process actually exits non-zero.\n */\nfunction childEnv(): NodeJS.ProcessEnv {\n const env = { ...process.env };\n // A placeholder/invalid ANTHROPIC_API_KEY (e.g. \"your_api_key_here\" left in a\n // shell profile) takes precedence over the Claude Code subscription login and\n // makes the CLI fail with \"Invalid API key\". Real keys start with \"sk-ant-\";\n // drop anything else so we fall back to the existing Claude Code auth.\n if (env.ANTHROPIC_API_KEY && !env.ANTHROPIC_API_KEY.startsWith(\"sk-ant-\")) {\n delete env.ANTHROPIC_API_KEY;\n }\n return env;\n}\n\nfunction runClaude(prompt: string, timeoutMs: number): Promise<string> {\n return new Promise((resolve, reject) => {\n const child = spawn(CLAUDE_BIN, [\"-p\", prompt], { stdio: [\"ignore\", \"pipe\", \"pipe\"], env: childEnv() });\n let stdout = \"\";\n let stderr = \"\";\n let done = false;\n const finish = (fn: () => void) => {\n if (done) return;\n done = true;\n clearTimeout(timer);\n fn();\n };\n const timer = setTimeout(() => {\n child.kill(\"SIGKILL\");\n finish(() => reject(new AiError(\"The Claude CLI timed out.\", \"timeout\")));\n }, timeoutMs);\n child.stdout.on(\"data\", (d: Buffer) => {\n stdout += d;\n if (stdout.length > MAX_OUT) {\n child.kill(\"SIGKILL\");\n finish(() => reject(new AiError(\"The Claude CLI produced too much output.\", \"overflow\")));\n }\n });\n child.stderr.on(\"data\", (d: Buffer) => {\n stderr += d;\n });\n child.on(\"error\", (err) =>\n finish(() =>\n reject(\n new AiError(\n `The Claude CLI (\"${CLAUDE_BIN}\") could not be run. Install Claude Code or set CLAUDE_BIN. (${(err as Error).message})`,\n \"claude_unavailable\",\n ),\n ),\n ),\n );\n child.on(\"close\", (code) =>\n finish(() => {\n if (code === 0) resolve(stdout);\n else reject(new AiError(stderr.trim() || `The Claude CLI exited with code ${code}.`, \"claude_failed\"));\n }),\n );\n });\n}\n// Mirrors the BD_BIN pattern: shell out to the user's local Claude CLI. No API\n// key — it reuses the existing Claude Code / CLI auth on the machine.\nconst CLAUDE_BIN = process.env.CLAUDE_BIN || \"claude\";\n\nexport class AiError extends Error {\n code?: string;\n constructor(message: string, code?: string) {\n super(message);\n this.name = \"AiError\";\n this.code = code;\n }\n}\n\nexport interface AssistInput {\n id: string;\n title: string;\n description: string;\n type: string;\n labels: string[];\n /** Candidate beads for duplicate detection (id + title only). */\n others: { id: string; title: string }[];\n}\nexport interface AssistResult {\n description: string;\n acceptance: string;\n labels: string[];\n duplicates: { id: string; title: string; reason: string }[];\n}\n\nexport async function isClaudeAvailable(): Promise<boolean> {\n try {\n await pExecFile(CLAUDE_BIN, [\"--version\"], { timeout: 5000 });\n return true;\n } catch {\n return false;\n }\n}\n\nfunction buildPrompt(input: AssistInput): string {\n const others = input.others\n .slice(0, 80)\n .map((o) => `- ${o.id}: ${o.title}`)\n .join(\"\\n\");\n return [\n \"You are refining a software issue (a 'bead') so an engineer can pick it up cold.\",\n \"Improve it: rewrite the description into a clear, bounded scope; add acceptance criteria;\",\n \"propose a short markdown sub-task checklist; suggest labels; and flag likely duplicates\",\n \"from the candidate list (only if genuinely similar).\",\n \"\",\n `BEAD ${input.id} [type: ${input.type}]`,\n `Title: ${input.title}`,\n `Current labels: ${input.labels.join(\", \") || \"(none)\"}`,\n \"Current description:\",\n input.description || \"(empty)\",\n \"\",\n \"Candidate beads (for duplicate detection):\",\n others || \"(none)\",\n \"\",\n \"Respond with ONLY a JSON object (no prose, no code fences) of the form:\",\n '{\"description\": \"<refined markdown — include an \"## Acceptance criteria\" section and a \"- [ ]\" checklist>\",',\n '\"acceptance\": \"<the acceptance criteria as plain text>\",',\n '\"labels\": [\"label1\",\"label2\"],',\n '\"duplicates\": [{\"id\":\"<bead id from the candidates>\",\"title\":\"<its title>\",\"reason\":\"<why>\"}]}',\n \"Use [] for duplicates if none apply. Do not invent bead ids.\",\n ].join(\"\\n\");\n}\n\n/** Extract the first balanced JSON object from arbitrary model output. */\nfunction extractJson(out: string): string {\n const start = out.indexOf(\"{\");\n const end = out.lastIndexOf(\"}\");\n if (start === -1 || end === -1 || end <= start) {\n throw new AiError(\"The model did not return JSON.\", \"bad_output\");\n }\n return out.slice(start, end + 1);\n}\n\nexport async function assistBead(input: AssistInput): Promise<AssistResult> {\n if (!(await isClaudeAvailable())) {\n throw new AiError(\n `The Claude CLI (\"${CLAUDE_BIN}\") was not found on PATH. Install Claude Code or set CLAUDE_BIN.`,\n \"claude_unavailable\",\n );\n }\n const stdout = await runClaude(buildPrompt(input), 120_000);\n\n let parsed: Partial<AssistResult>;\n try {\n parsed = JSON.parse(extractJson(stdout)) as Partial<AssistResult>;\n } catch (err) {\n if (err instanceof AiError) throw err;\n throw new AiError(\"Could not parse the model's response as JSON.\", \"bad_output\");\n }\n\n const validIds = new Set(input.others.map((o) => o.id));\n return {\n description: typeof parsed.description === \"string\" ? parsed.description : input.description,\n acceptance: typeof parsed.acceptance === \"string\" ? parsed.acceptance : \"\",\n labels: Array.isArray(parsed.labels) ? parsed.labels.filter((l): l is string => typeof l === \"string\") : [],\n duplicates: Array.isArray(parsed.duplicates)\n ? parsed.duplicates\n .filter((d): d is { id: string; title: string; reason: string } => !!d && typeof d.id === \"string\")\n .filter((d) => validIds.has(d.id))\n : [],\n };\n}\n","import {\n AppRouteRouteModule,\n type AppRouteRouteHandlerContext,\n type AppRouteRouteModuleOptions,\n} from '../../server/route-modules/app-route/module.compiled'\nimport { RouteKind } from '../../server/route-kind'\nimport { patchFetch as _patchFetch } from '../../server/lib/patch-fetch'\nimport type { IncomingMessage, ServerResponse } from 'node:http'\nimport {\n addRequestMeta,\n getRequestMeta,\n setRequestMeta,\n type RequestMeta,\n} from '../../server/request-meta'\nimport {\n getTracer,\n type Span,\n SpanKind,\n SpanStatusCode,\n} from '../../server/lib/trace/tracer'\nimport { setManifestsSingleton } from '../../server/app-render/manifests-singleton'\nimport { normalizeAppPath } from '../../shared/lib/router/utils/app-paths'\nimport { NodeNextRequest, NodeNextResponse } from '../../server/base-http/node'\nimport {\n NextRequestAdapter,\n signalFromNodeResponse,\n} from '../../server/web/spec-extension/adapters/next-request'\nimport { BaseServerSpan } from '../../server/lib/trace/constants'\nimport { getRevalidateReason } from '../../server/instrumentation/utils'\nimport { sendResponse } from '../../server/send-response'\nimport {\n fromNodeOutgoingHttpHeaders,\n toNodeOutgoingHttpHeaders,\n} from '../../server/web/utils'\nimport { getCacheControlHeader } from '../../server/lib/cache-control'\nimport { INFINITE_CACHE, NEXT_CACHE_TAGS_HEADER } from '../../lib/constants'\nimport { NoFallbackError } from '../../shared/lib/no-fallback-error.external'\nimport { isRouteCacheOwner } from '../../server/lib/route-cache-key'\nimport {\n CachedRouteKind,\n type ResponseCacheEntry,\n type ResponseGenerator,\n} from '../../server/response-cache'\n\n// These are injected by the loader afterwards. This is injected as a variable\n// instead of a replacement because this could also be `undefined` instead of\n// an empty string.\ndeclare const nextConfigOutput: AppRouteRouteModuleOptions['nextConfigOutput']\n\n// We inject the nextConfigOutput here so that we can use them in the route\n// module.\n// INJECT:nextConfigOutput\n\nconst routeModule = new AppRouteRouteModule({\n definition: {\n kind: RouteKind.APP_ROUTE,\n page: 'VAR_DEFINITION_PAGE',\n pathname: 'VAR_DEFINITION_PATHNAME',\n filename: 'VAR_DEFINITION_FILENAME',\n bundlePath: 'VAR_DEFINITION_BUNDLE_PATH',\n },\n distDir: process.env.__NEXT_RELATIVE_DIST_DIR || '',\n relativeProjectDir: process.env.__NEXT_RELATIVE_PROJECT_DIR || '',\n resolvedPagePath: 'VAR_RESOLVED_PAGE_PATH',\n nextConfigOutput,\n // The lazy require factory ensures that:\n // - In dev: devRequestTimingInternalsEnd is set before userland executes,\n // correctly attributing module load time to application-code rather than\n // framework internals.\n // - In all modes: async modules (route files with top-level await) are\n // handled correctly — require() returns a Promise for such modules, which\n // ensureUserland() awaits before the first request is handled.\n userland: () => require('VAR_USERLAND') as typeof import('VAR_USERLAND'),\n // In Turbopack dev mode, also provide a synchronous per-request getter so\n // server HMR updates are picked up without re-executing the entry chunk.\n // Using require() (synchronous) avoids adding async overhead that would be\n // incorrectly attributed to application-code time in devRequestTiming.\n ...(process.env.TURBOPACK && process.env.__NEXT_DEV_SERVER\n ? {\n getUserland: () =>\n require('VAR_USERLAND') as typeof import('VAR_USERLAND'),\n }\n : {}),\n})\n\n// Pull out the exports that we need to expose from the module. This should\n// be eliminated when we've moved the other routes to the new format. These\n// are used to hook into the route.\nconst { workAsyncStorage, workUnitAsyncStorage, serverHooks } = routeModule\n\nfunction patchFetch() {\n return _patchFetch({\n workAsyncStorage,\n workUnitAsyncStorage,\n })\n}\n\nexport {\n routeModule,\n workAsyncStorage,\n workUnitAsyncStorage,\n serverHooks,\n patchFetch,\n}\n\nexport async function handler(\n req: IncomingMessage,\n res: ServerResponse,\n ctx: {\n waitUntil?: (prom: Promise<void>) => void\n requestMeta?: RequestMeta\n }\n) {\n if (ctx.requestMeta) {\n setRequestMeta(req, ctx.requestMeta)\n }\n if (routeModule.isDev) {\n addRequestMeta(req, 'devRequestTimingInternalsEnd', process.hrtime.bigint())\n }\n let srcPage = 'VAR_DEFINITION_PAGE'\n\n // turbopack doesn't normalize `/index` in the page name\n // so we need to to process dynamic routes properly\n // TODO: fix turbopack providing differing value from webpack\n if (process.env.TURBOPACK) {\n srcPage = srcPage.replace(/\\/index$/, '') || '/'\n } else if (srcPage === '/index') {\n // we always normalize /index specifically\n srcPage = '/'\n }\n const multiZoneDraftMode = process.env\n .__NEXT_MULTI_ZONE_DRAFT_MODE as any as boolean\n\n const prepareResult = await routeModule.prepare(req, res, {\n srcPage,\n multiZoneDraftMode,\n })\n\n if (!prepareResult) {\n res.statusCode = 400\n res.end('Bad Request')\n ctx.waitUntil?.(Promise.resolve())\n return null\n }\n\n const {\n buildId,\n deploymentId,\n params,\n nextConfig,\n parsedUrl,\n isDraftMode,\n prerenderManifest,\n routerServerContext,\n isOnDemandRevalidate,\n revalidateOnlyGenerated,\n resolvedPathname,\n clientReferenceManifest,\n serverActionsManifest,\n previewProps,\n } = prepareResult\n\n const normalizedSrcPage = normalizeAppPath(srcPage)\n\n // Only this route's prerenders can establish ISR or admit generated params.\n const isPrerendered =\n Boolean(prerenderManifest.routes[resolvedPathname]) &&\n (routeModule.isDev ||\n isRouteCacheOwner(\n resolvedPathname,\n routeModule.cacheOwner,\n prerenderManifest.routes[resolvedPathname]\n ))\n\n let isIsr = Boolean(\n prerenderManifest.dynamicRoutes[normalizedSrcPage] || isPrerendered\n )\n\n const render404 = async () => {\n // TODO: should route-module itself handle rendering the 404\n if (routerServerContext?.render404) {\n await routerServerContext.render404(req, res, parsedUrl, false)\n } else {\n res.end('This page could not be found')\n }\n return null\n }\n\n if (isIsr && !isDraftMode) {\n const prerenderInfo = prerenderManifest.dynamicRoutes[normalizedSrcPage]\n\n if (prerenderInfo) {\n if (prerenderInfo.fallback === false && !isPrerendered) {\n if (nextConfig.adapterPath) {\n return await render404()\n }\n throw new NoFallbackError()\n }\n }\n }\n\n let cacheKey: string | null = null\n\n if (isIsr && !routeModule.isDev && !isDraftMode) {\n cacheKey = resolvedPathname\n // ensure /index and / is normalized to one key\n cacheKey = cacheKey === '/index' ? '/' : cacheKey\n }\n\n // Before rendering (which initializes component tree modules), we have to\n // set the reference manifests to our global store so Server Action's\n // encryption util can access to them at the top level of the page module.\n if (serverActionsManifest && clientReferenceManifest) {\n setManifestsSingleton({\n page: srcPage,\n clientReferenceManifest,\n serverActionsManifest,\n })\n }\n\n const method = req.method || 'GET'\n const tracer = getTracer()\n const activeSpan = tracer.getActiveScopeSpan()\n const isWrappedByNextServer = Boolean(\n routerServerContext?.isWrappedByNextServer\n )\n const isMinimalMode = Boolean(getRequestMeta(req, 'minimalMode'))\n\n const incrementalCache =\n getRequestMeta(req, 'incrementalCache') ||\n (await routeModule.getIncrementalCache(\n req,\n nextConfig,\n previewProps,\n prerenderManifest,\n isMinimalMode\n ))\n\n incrementalCache?.resetRequestCache()\n ;(globalThis as any).__incrementalCache = incrementalCache\n\n const context: AppRouteRouteHandlerContext = {\n params,\n previewProps,\n renderOpts: {\n experimental: {\n authInterrupts: Boolean(nextConfig.experimental.authInterrupts),\n useCacheTimeout: nextConfig.experimental.useCacheTimeout,\n durableUseCacheEntries: Boolean(\n nextConfig.experimental.durableUseCacheEntries\n ),\n },\n cacheComponents: Boolean(nextConfig.cacheComponents),\n validationLevel: nextConfig.experimental.instantInsights.validationLevel,\n isDraftMode,\n incrementalCache,\n hmrRefreshHash: getRequestMeta(req, 'hmrRefreshHash'),\n cacheLifeProfiles: nextConfig.cacheLife,\n staticPageGenerationTimeout: nextConfig.staticPageGenerationTimeout,\n waitUntil: ctx.waitUntil,\n onClose: (cb) => {\n res.on('close', cb)\n },\n onAfterTaskError: undefined,\n },\n sharedContext: {\n buildId,\n deploymentId,\n },\n }\n const nodeNextReq = new NodeNextRequest(req)\n const nodeNextRes = new NodeNextResponse(res)\n\n const nextReq = NextRequestAdapter.fromNodeNextRequest(\n nodeNextReq,\n signalFromNodeResponse(res)\n )\n\n const responseGenerator: ResponseGenerator = async ({\n previousCacheEntry,\n }) => {\n try {\n if (\n !isMinimalMode &&\n isOnDemandRevalidate &&\n revalidateOnlyGenerated &&\n !previousCacheEntry\n ) {\n res.statusCode = 404\n // on-demand revalidate always sets this header\n res.setHeader('x-nextjs-cache', 'REVALIDATED')\n res.end('This page could not be found')\n return null\n }\n\n const response =\n cacheKey === null\n ? await routeModule.handle(nextReq, context)\n : await routeModule.prerender(nextReq, context)\n\n ;(req as any).fetchMetrics = (context.renderOpts as any).fetchMetrics\n let pendingWaitUntil = context.renderOpts.pendingWaitUntil\n\n // Attempt using provided waitUntil if available\n // if it's not we fallback to sendResponse's handling\n if (pendingWaitUntil) {\n if (ctx.waitUntil) {\n ctx.waitUntil(pendingWaitUntil)\n pendingWaitUntil = undefined\n }\n }\n const cacheTags = context.renderOpts.collectedTags\n\n // If the request is for a static response, we can cache it so long\n // as it's not edge.\n if (isIsr) {\n const blob = await response.blob()\n\n // Copy the headers from the response.\n const headers = toNodeOutgoingHttpHeaders(response.headers)\n\n if (cacheTags) {\n headers[NEXT_CACHE_TAGS_HEADER] = cacheTags\n }\n\n if (!headers['content-type'] && blob.type) {\n headers['content-type'] = blob.type\n }\n\n const revalidate =\n typeof context.renderOpts.collectedRevalidate === 'undefined' ||\n context.renderOpts.collectedRevalidate >= INFINITE_CACHE\n ? false\n : context.renderOpts.collectedRevalidate\n\n const expire =\n typeof context.renderOpts.collectedExpire === 'undefined' ||\n context.renderOpts.collectedExpire >= INFINITE_CACHE\n ? // Fall back to the global `expireTime` config when the\n // route has a numeric `revalidate` but didn't declare an\n // explicit `expire` (e.g. via `cacheLife`). This mirrors the\n // build-time fallback in `build/index.ts` so cache entries\n // and the response Cache-Control header agree on the route's\n // effective expire. Routes that opt out of revalidation\n // (`revalidate: false`) or that are dynamic (`revalidate: 0`)\n // keep `expire: undefined`.\n revalidate !== false && revalidate > 0\n ? nextConfig.expireTime\n : undefined\n : context.renderOpts.collectedExpire\n\n // Create the cache entry for the response.\n const cacheEntry: ResponseCacheEntry = {\n value: {\n kind: CachedRouteKind.APP_ROUTE,\n status: response.status,\n body: Buffer.from(await blob.arrayBuffer()),\n headers,\n },\n cacheControl: { revalidate, expire },\n }\n\n return cacheEntry\n } else {\n // send response without caching if not ISR\n await sendResponse(nodeNextReq, nodeNextRes, response, pendingWaitUntil)\n return null\n }\n } catch (err) {\n // if this is a background revalidate we need to report\n // the request error here as it won't be bubbled\n if (previousCacheEntry?.isStale) {\n const silenceLog = false\n await routeModule.onRequestError(\n req,\n err,\n {\n routerKind: 'App Router',\n routePath: srcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isStaticGeneration: cacheKey !== null,\n isOnDemandRevalidate,\n }),\n },\n silenceLog,\n routerServerContext\n )\n }\n throw err\n }\n }\n\n const handleResponse = async (\n currentSpan: Span | undefined,\n parentSpan: Span | undefined\n ) => {\n try {\n const cacheEntry = await routeModule.handleResponse({\n req,\n nextConfig,\n cacheKey,\n routeKind: RouteKind.APP_ROUTE,\n isFallback: false,\n previewProps,\n prerenderManifest,\n isRoutePPREnabled: false,\n isOnDemandRevalidate,\n revalidateOnlyGenerated,\n responseGenerator,\n waitUntil: ctx.waitUntil,\n isMinimalMode,\n })\n\n if (cacheEntry !== null && 'error' in cacheEntry) {\n throw cacheEntry.error\n }\n\n // we don't create a cacheEntry for ISR\n if (!isIsr) {\n return\n }\n\n if (cacheEntry?.value?.kind !== CachedRouteKind.APP_ROUTE) {\n throw new Error(\n `Invariant: app-route received invalid cache entry ${cacheEntry?.value?.kind}`\n )\n }\n\n if (!isMinimalMode) {\n res.setHeader(\n 'x-nextjs-cache',\n isOnDemandRevalidate\n ? 'REVALIDATED'\n : cacheEntry.isMiss\n ? 'MISS'\n : cacheEntry.isStale\n ? 'STALE'\n : 'HIT'\n )\n }\n\n // Draft mode should never be cached\n if (isDraftMode) {\n res.setHeader(\n 'Cache-Control',\n 'private, no-cache, no-store, max-age=0, must-revalidate'\n )\n }\n\n const headers = fromNodeOutgoingHttpHeaders(cacheEntry.value.headers)\n\n if (!(isMinimalMode && isIsr)) {\n headers.delete(NEXT_CACHE_TAGS_HEADER)\n }\n\n // If cache control is already set on the response we don't\n // override it to allow users to customize it via next.config\n if (\n cacheEntry.cacheControl &&\n !res.getHeader('Cache-Control') &&\n !headers.get('Cache-Control')\n ) {\n headers.set(\n 'Cache-Control',\n getCacheControlHeader(cacheEntry.cacheControl)\n )\n }\n\n await sendResponse(\n nodeNextReq,\n nodeNextRes,\n // @ts-expect-error - Argument of type 'Buffer<ArrayBufferLike>' is not assignable to parameter of type 'BodyInit | null | undefined'.\n new Response(cacheEntry.value.body, {\n headers,\n status: cacheEntry.value.status || 200,\n })\n )\n return\n } catch (err) {\n if (!(err instanceof NoFallbackError)) {\n const silenceLog = false\n await routeModule.onRequestError(\n req,\n err,\n {\n routerKind: 'App Router',\n routePath: normalizedSrcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isStaticGeneration: cacheKey !== null,\n isOnDemandRevalidate,\n }),\n },\n silenceLog,\n routerServerContext\n )\n }\n\n // rethrow so that we can handle serving error page\n\n // If this is during static generation, throw the error again.\n if (isIsr) throw err\n\n // Otherwise, send a 500 response unless the original response has\n // already committed. In that case, preserve its status code for\n // telemetry while still recording the failure and terminating a response\n // that the failed pipeline left open.\n if (res.headersSent) {\n if (currentSpan) {\n const error =\n err instanceof Error ? err : new Error('Unknown app route error')\n currentSpan.recordException(error)\n currentSpan.setStatus({\n code: SpanStatusCode.ERROR,\n message: error.message,\n })\n currentSpan.setAttribute('error.type', error.name)\n }\n if (!res.writableEnded && !res.destroyed) {\n res.end()\n }\n } else {\n await sendResponse(\n nodeNextReq,\n nodeNextRes,\n new Response(null, { status: 500 })\n )\n }\n return\n } finally {\n ;(() => {\n if (!currentSpan) {\n return\n }\n\n let statusCode = res.statusCode\n\n currentSpan.setAttributes({\n 'http.status_code': statusCode,\n 'next.rsc': false,\n })\n\n if (statusCode && statusCode >= 500) {\n // For 5xx status codes: SHOULD be set to 'Error' span status.\n // x-ref: https://opentelemetry.io/docs/specs/semconv/http/http-spans/#status\n currentSpan.setStatus({\n code: SpanStatusCode.ERROR,\n })\n // For span status 'Error', SHOULD set 'error.type' attribute.\n currentSpan.setAttribute('error.type', statusCode.toString())\n }\n\n const rootSpanAttributes = tracer.getRootSpanAttributes()\n // We were unable to get attributes, probably OTEL is not enabled\n if (!rootSpanAttributes) {\n return\n }\n\n if (\n rootSpanAttributes.get('next.span_type') !==\n BaseServerSpan.handleRequest\n ) {\n console.warn(\n `Unexpected root span type '${rootSpanAttributes.get(\n 'next.span_type'\n )}'. Please report this Next.js issue https://github.com/vercel/next.js`\n )\n return\n }\n\n const route = rootSpanAttributes.get('next.route') || normalizedSrcPage\n const name = `${method} ${route}`\n\n currentSpan.setAttributes({\n 'next.route': route,\n 'http.route': route,\n 'next.span_name': name,\n })\n currentSpan.updateName(name)\n\n // Propagate http.route to the parent span if one exists (e.g.\n // a platform-created HTTP span in adapter deployments).\n if (parentSpan && parentSpan !== currentSpan) {\n parentSpan.setAttribute('http.route', route)\n parentSpan.updateName(name)\n }\n })()\n }\n }\n\n // TODO: activeSpan code path is for when wrapped by\n // next-server can be removed when this is no longer used\n if (isWrappedByNextServer && activeSpan) {\n await handleResponse(activeSpan, undefined)\n } else {\n let parentSpan = tracer.getActiveScopeSpan()\n await tracer.withPropagatedContext(\n req.headers,\n () =>\n tracer.trace(\n BaseServerSpan.handleRequest,\n {\n spanName: `${method} ${srcPage}`,\n kind: SpanKind.SERVER,\n attributes: {\n 'http.method': method,\n 'http.target': req.url,\n },\n },\n (span) => handleResponse(span, parentSpan)\n ),\n undefined,\n !isWrappedByNextServer\n )\n }\n}\n"],"names":["pExecFile","MAX_OUT","childEnv","env","process","ANTHROPIC_API_KEY","startsWith","runClaude","prompt","timeoutMs","Promise","resolve","reject","child","CLAUDE_BIN","stdio","stdout","stderr","done","finish","fn","clearTimeout","timer","setTimeout","kill","AiError","on","d","length","err","message","code","trim","Error","name","isClaudeAvailable","timeout","buildPrompt","input","others","slice","map","o","id","title","join","type","labels","description","extractJson","out","start","indexOf","end","lastIndexOf","assistBead","parsed","JSON","parse","validIds","Set","acceptance","Array","isArray","filter","l","duplicates","has","AppRouteRouteModule","RouteKind","patchFetch","_patchFetch","addRequestMeta","getRequestMeta","setRequestMeta","getTracer","SpanKind","SpanStatusCode","setManifestsSingleton","normalizeAppPath","NodeNextRequest","NodeNextResponse","NextRequestAdapter","signalFromNodeResponse","BaseServerSpan","getRevalidateReason","sendResponse","fromNodeOutgoingHttpHeaders","toNodeOutgoingHttpHeaders","getCacheControlHeader","INFINITE_CACHE","NEXT_CACHE_TAGS_HEADER","NoFallbackError","isRouteCacheOwner","CachedRouteKind","routeModule","definition","kind","APP_ROUTE","page","pathname","filename","bundlePath","distDir","__NEXT_RELATIVE_DIST_DIR","relativeProjectDir","__NEXT_RELATIVE_PROJECT_DIR","resolvedPagePath","nextConfigOutput","userland","require","TURBOPACK","__NEXT_DEV_SERVER","getUserland","workAsyncStorage","workUnitAsyncStorage","serverHooks","handler","req","res","ctx","requestMeta","isDev","hrtime","bigint","srcPage","replace","multiZoneDraftMode","__NEXT_MULTI_ZONE_DRAFT_MODE","prepareResult","prepare","statusCode","waitUntil","buildId","deploymentId","params","nextConfig","parsedUrl","isDraftMode","prerenderManifest","routerServerContext","isOnDemandRevalidate","revalidateOnlyGenerated","resolvedPathname","clientReferenceManifest","serverActionsManifest","previewProps","normalizedSrcPage","isPrerendered","Boolean","routes","cacheOwner","isIsr","dynamicRoutes","render404","prerenderInfo","fallback","adapterPath","cacheKey","method","tracer","activeSpan","getActiveScopeSpan","isWrappedByNextServer","isMinimalMode","incrementalCache","getIncrementalCache","resetRequestCache","globalThis","__incrementalCache","context","renderOpts","experimental","authInterrupts","useCacheTimeout","durableUseCacheEntries","cacheComponents","validationLevel","instantInsights","hmrRefreshHash","cacheLifeProfiles","cacheLife","staticPageGenerationTimeout","onClose","cb","onAfterTaskError","undefined","sharedContext","nodeNextReq","nodeNextRes","nextReq","fromNodeNextRequest","responseGenerator","previousCacheEntry","setHeader","response","handle","prerender","fetchMetrics","pendingWaitUntil","cacheTags","collectedTags","blob","headers","revalidate","collectedRevalidate","expire","collectedExpire","expireTime","cacheEntry","value","status","body","Buffer","from","arrayBuffer","cacheControl","isStale","silenceLog","onRequestError","routerKind","routePath","routeType","revalidateReason","isStaticGeneration","handleResponse","currentSpan","parentSpan","routeKind","isFallback","isRoutePPREnabled","error","isMiss","delete","getHeader","get","set","Response","headersSent","recordException","setStatus","ERROR","setAttribute","writableEnded","destroyed","setAttributes","toString","rootSpanAttributes","getRootSpanAttributes","handleRequest","console","warn","route","updateName","withPropagatedContext","trace","spanName","SERVER","attributes","url","span"],"mappings":"6CAAA,IAAA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OCAA,EAAA,EAAA,CAAA,CAAA,OAGA,IAAMA,EA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83535),r=e.i(72507),a=e.i(5622),n=e.i(73744);async function i(e,{params:o}){try{let{projectId:i,id:s}=await o,l=await (0,t.R)(i),u=(0,r.L)(),{text:d}=a.C.parse(await e.json()),c=await l.addComment(s,d,u.humanActor);return(0,n.N)(c)}catch(e){return(0,n.O)(e)}}e.s(["POST",0,i,"dynamic",0,"force-dynamic"])},97071,e=>{var t=e.i(47909),r=e.i(74017),a=e.i(96250),n=e.i(59756),i=e.i(61916),o=e.i(74677),s=e.i(69741),l=e.i(16795),u=e.i(87718),d=e.i(95169),c=e.i(47587),p=e.i(66012),h=e.i(70101),f=e.i(74838),m=e.i(10372),v=e.i(93695),w=e.i(9580);e.i(52474);var R=e.i(220);let x=new t.AppRouteRouteModule({definition:{kind:r.f.APP_ROUTE,page:"/api/p/[projectId]/beads/[id]/comments/route",pathname:"/api/p/[projectId]/beads/[id]/comments",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/app/api/p/[projectId]/beads/[id]/comments/route.ts",nextConfigOutput:"",userland:()=>e.r(56432),...{}}),{workAsyncStorage:g,workUnitAsyncStorage:y,serverHooks:C}=x;async function E(e,t,a){a.requestMeta&&(0,n.R)(e,a.requestMeta),x.isDev&&(0,n.i)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let g="/api/p/[projectId]/beads/[id]/comments/route";g=g.replace(/\/index$/,"")||"/";let y=await x.prepare(e,t,{srcPage:g,multiZoneDraftMode:!1});if(!y)return t.statusCode=400,t.end("Bad Request"),null==a.waitUntil||a.waitUntil.call(a,Promise.resolve()),null;let{buildId:C,deploymentId:E,params:b,nextConfig:A,parsedUrl:P,isDraftMode:T,prerenderManifest:S,routerServerContext:O,isOnDemandRevalidate:U,revalidateOnlyGenerated:k,resolvedPathname:I,clientReferenceManifest:q,serverActionsManifest:M,previewProps:j}=y,D=(0,s.f)(g),N=!!S.routes[I]&&(x.isDev||(0,w.f)(I,x.cacheOwner,S.routes[I])),_=!!(S.dynamicRoutes[D]||N),H=async()=>((null==O?void 0:O.render404)?await O.render404(e,t,P,!1):t.end("This page could not be found"),null);if(_&&!T){let e=S.dynamicRoutes[D];if(e&&!1===e.fallback&&!N){if(A.adapterPath)return await H();throw new v.NoFallbackError}}let L=null;!_||x.isDev||T||(L="/index"===(L=I)?"/":L),M&&q&&(0,o.f)({page:g,clientReferenceManifest:q,serverActionsManifest:M});let $=e.method||"GET",G=(0,i.v)(),B=G.getActiveScopeSpan(),F=!!(null==O?void 0:O.isWrappedByNextServer),K=!!(0,n.w)(e,"minimalMode"),V=(0,n.w)(e,"incrementalCache")||await x.getIncrementalCache(e,A,j,S,K);null==V||V.resetRequestCache(),globalThis.__incrementalCache=V;let J={params:b,previewProps:j,renderOpts:{experimental:{authInterrupts:!!A.experimental.authInterrupts,useCacheTimeout:A.experimental.useCacheTimeout,durableUseCacheEntries:!!A.experimental.durableUseCacheEntries},cacheComponents:!!A.cacheComponents,validationLevel:A.experimental.instantInsights.validationLevel,isDraftMode:T,incrementalCache:V,hmrRefreshHash:(0,n.w)(e,"hmrRefreshHash"),cacheLifeProfiles:A.cacheLife,staticPageGenerationTimeout:A.staticPageGenerationTimeout,waitUntil:a.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0},sharedContext:{buildId:C,deploymentId:E}},Q=new l.x(e),W=new l.e(t),Z=u.k.fromNodeNextRequest(Q,(0,u.t)(t)),z=async({previousCacheEntry:r})=>{try{if(!K&&U&&k&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let n=null===L?await x.handle(Z,J):await x.prerender(Z,J);e.fetchMetrics=J.renderOpts.fetchMetrics;let i=J.renderOpts.pendingWaitUntil;i&&a.waitUntil&&(a.waitUntil(i),i=void 0);let o=J.renderOpts.collectedTags;if(!_)return await (0,p.f)(Q,W,n,i),null;{let e=await n.blob(),t=(0,h.S)(n.headers);o&&(t[m.M]=o),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==J.renderOpts.collectedRevalidate&&!(J.renderOpts.collectedRevalidate>=m.Q)&&J.renderOpts.collectedRevalidate,a=void 0===J.renderOpts.collectedExpire||J.renderOpts.collectedExpire>=m.Q?!1!==r&&r>0?A.expireTime:void 0:J.renderOpts.collectedExpire;return{value:{kind:R.x.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 x.onRequestError(e,t,{routerKind:"App Router",routePath:g,routeType:"route",revalidateReason:(0,c.f)({isStaticGeneration:null!==L,isOnDemandRevalidate:U})},!1,O),t}},X=async(n,o)=>{try{var s,l;let n=await x.handleResponse({req:e,nextConfig:A,cacheKey:L,routeKind:r.f.APP_ROUTE,isFallback:!1,previewProps:j,prerenderManifest:S,isRoutePPREnabled:!1,isOnDemandRevalidate:U,revalidateOnlyGenerated:k,responseGenerator:z,waitUntil:a.waitUntil,isMinimalMode:K});if(null!==n&&"error"in n)throw n.error;if(!_)return;if((null==n||null==(s=n.value)?void 0:s.kind)!==R.x.APP_ROUTE)throw Error(`Invariant: app-route received invalid cache entry ${null==n||null==(l=n.value)?void 0:l.kind}`);K||t.setHeader("x-nextjs-cache",U?"REVALIDATED":n.isMiss?"MISS":n.isStale?"STALE":"HIT"),T&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let i=(0,h.G)(n.value.headers);K&&_||i.delete(m.M),!n.cacheControl||t.getHeader("Cache-Control")||i.get("Cache-Control")||i.set("Cache-Control",(0,f.f)(n.cacheControl)),await (0,p.f)(Q,W,new Response(n.value.body,{headers:i,status:n.value.status||200}));return}catch(r){if(r instanceof v.NoFallbackError||await x.onRequestError(e,r,{routerKind:"App Router",routePath:D,routeType:"route",revalidateReason:(0,c.f)({isStaticGeneration:null!==L,isOnDemandRevalidate:U})},!1,O),_)throw r;if(t.headersSent){if(n){let e=r instanceof Error?r:Error("Unknown app route error");n.recordException(e),n.setStatus({code:i.J.ERROR,message:e.message}),n.setAttribute("error.type",e.name)}t.writableEnded||t.destroyed||t.end()}else await (0,p.f)(Q,W,new Response(null,{status:500}));return}finally{(()=>{if(!n)return;let e=t.statusCode;n.setAttributes({"http.status_code":e,"next.rsc":!1}),e&&e>=500&&(n.setStatus({code:i.J.ERROR}),n.setAttribute("error.type",e.toString()));let r=G.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==d.q.handleRequest)return 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")||D,s=`${$} ${a}`;n.setAttributes({"next.route":a,"http.route":a,"next.span_name":s}),n.updateName(s),o&&o!==n&&(o.setAttribute("http.route",a),o.updateName(s))})()}};if(F&&B)await X(B,void 0);else{let t=G.getActiveScopeSpan();await G.withPropagatedContext(e.headers,()=>G.trace(d.q.handleRequest,{spanName:`${$} ${g}`,kind:i.C.SERVER,attributes:{"http.method":$,"http.target":e.url}},e=>X(e,t)),void 0,!F)}}e.s(["handler",0,E,"patchFetch",0,function(){return(0,a.f)({workAsyncStorage:g,workUnitAsyncStorage:y})},"routeModule",0,x,"serverHooks",0,C,"workAsyncStorage",0,g,"workUnitAsyncStorage",0,y])}]})();
|
|
2
|
+
|
|
3
|
+
//# sourceMappingURL=_0j2w6pi0oz3ag._.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../app/api/p/%5BprojectId%5D/beads/%5Bid%5D/comments/route.ts","../../../node_modules/next/src/build/templates/app-route.ts"],"sourcesContent":["import { getStore } from \"@/lib/store\";\nimport { getConfig } from \"@/lib/config\";\nimport { addCommentSchema } from \"@/lib/schema\";\nimport { ok, fail } from \"@/lib/api\";\n\nexport const dynamic = \"force-dynamic\";\n\nexport async function POST(req: Request, { params }: { params: Promise<{ projectId: string; id: string }> }) {\n try {\n const { projectId, id } = await params;\n const store = await getStore(projectId);\n const cfg = getConfig();\n const { text } = addCommentSchema.parse(await req.json());\n const bead = await store.addComment(id, text, cfg.humanActor);\n return ok(bead);\n } catch (e) {\n return fail(e);\n }\n}\n","import {\n AppRouteRouteModule,\n type AppRouteRouteHandlerContext,\n type AppRouteRouteModuleOptions,\n} from '../../server/route-modules/app-route/module.compiled'\nimport { RouteKind } from '../../server/route-kind'\nimport { patchFetch as _patchFetch } from '../../server/lib/patch-fetch'\nimport type { IncomingMessage, ServerResponse } from 'node:http'\nimport {\n addRequestMeta,\n getRequestMeta,\n setRequestMeta,\n type RequestMeta,\n} from '../../server/request-meta'\nimport {\n getTracer,\n type Span,\n SpanKind,\n SpanStatusCode,\n} from '../../server/lib/trace/tracer'\nimport { setManifestsSingleton } from '../../server/app-render/manifests-singleton'\nimport { normalizeAppPath } from '../../shared/lib/router/utils/app-paths'\nimport { NodeNextRequest, NodeNextResponse } from '../../server/base-http/node'\nimport {\n NextRequestAdapter,\n signalFromNodeResponse,\n} from '../../server/web/spec-extension/adapters/next-request'\nimport { BaseServerSpan } from '../../server/lib/trace/constants'\nimport { getRevalidateReason } from '../../server/instrumentation/utils'\nimport { sendResponse } from '../../server/send-response'\nimport {\n fromNodeOutgoingHttpHeaders,\n toNodeOutgoingHttpHeaders,\n} from '../../server/web/utils'\nimport { getCacheControlHeader } from '../../server/lib/cache-control'\nimport { INFINITE_CACHE, NEXT_CACHE_TAGS_HEADER } from '../../lib/constants'\nimport { NoFallbackError } from '../../shared/lib/no-fallback-error.external'\nimport { isRouteCacheOwner } from '../../server/lib/route-cache-key'\nimport {\n CachedRouteKind,\n type ResponseCacheEntry,\n type ResponseGenerator,\n} from '../../server/response-cache'\n\n// These are injected by the loader afterwards. This is injected as a variable\n// instead of a replacement because this could also be `undefined` instead of\n// an empty string.\ndeclare const nextConfigOutput: AppRouteRouteModuleOptions['nextConfigOutput']\n\n// We inject the nextConfigOutput here so that we can use them in the route\n// module.\n// INJECT:nextConfigOutput\n\nconst routeModule = new AppRouteRouteModule({\n definition: {\n kind: RouteKind.APP_ROUTE,\n page: 'VAR_DEFINITION_PAGE',\n pathname: 'VAR_DEFINITION_PATHNAME',\n filename: 'VAR_DEFINITION_FILENAME',\n bundlePath: 'VAR_DEFINITION_BUNDLE_PATH',\n },\n distDir: process.env.__NEXT_RELATIVE_DIST_DIR || '',\n relativeProjectDir: process.env.__NEXT_RELATIVE_PROJECT_DIR || '',\n resolvedPagePath: 'VAR_RESOLVED_PAGE_PATH',\n nextConfigOutput,\n // The lazy require factory ensures that:\n // - In dev: devRequestTimingInternalsEnd is set before userland executes,\n // correctly attributing module load time to application-code rather than\n // framework internals.\n // - In all modes: async modules (route files with top-level await) are\n // handled correctly — require() returns a Promise for such modules, which\n // ensureUserland() awaits before the first request is handled.\n userland: () => require('VAR_USERLAND') as typeof import('VAR_USERLAND'),\n // In Turbopack dev mode, also provide a synchronous per-request getter so\n // server HMR updates are picked up without re-executing the entry chunk.\n // Using require() (synchronous) avoids adding async overhead that would be\n // incorrectly attributed to application-code time in devRequestTiming.\n ...(process.env.TURBOPACK && process.env.__NEXT_DEV_SERVER\n ? {\n getUserland: () =>\n require('VAR_USERLAND') as typeof import('VAR_USERLAND'),\n }\n : {}),\n})\n\n// Pull out the exports that we need to expose from the module. This should\n// be eliminated when we've moved the other routes to the new format. These\n// are used to hook into the route.\nconst { workAsyncStorage, workUnitAsyncStorage, serverHooks } = routeModule\n\nfunction patchFetch() {\n return _patchFetch({\n workAsyncStorage,\n workUnitAsyncStorage,\n })\n}\n\nexport {\n routeModule,\n workAsyncStorage,\n workUnitAsyncStorage,\n serverHooks,\n patchFetch,\n}\n\nexport async function handler(\n req: IncomingMessage,\n res: ServerResponse,\n ctx: {\n waitUntil?: (prom: Promise<void>) => void\n requestMeta?: RequestMeta\n }\n) {\n if (ctx.requestMeta) {\n setRequestMeta(req, ctx.requestMeta)\n }\n if (routeModule.isDev) {\n addRequestMeta(req, 'devRequestTimingInternalsEnd', process.hrtime.bigint())\n }\n let srcPage = 'VAR_DEFINITION_PAGE'\n\n // turbopack doesn't normalize `/index` in the page name\n // so we need to to process dynamic routes properly\n // TODO: fix turbopack providing differing value from webpack\n if (process.env.TURBOPACK) {\n srcPage = srcPage.replace(/\\/index$/, '') || '/'\n } else if (srcPage === '/index') {\n // we always normalize /index specifically\n srcPage = '/'\n }\n const multiZoneDraftMode = process.env\n .__NEXT_MULTI_ZONE_DRAFT_MODE as any as boolean\n\n const prepareResult = await routeModule.prepare(req, res, {\n srcPage,\n multiZoneDraftMode,\n })\n\n if (!prepareResult) {\n res.statusCode = 400\n res.end('Bad Request')\n ctx.waitUntil?.(Promise.resolve())\n return null\n }\n\n const {\n buildId,\n deploymentId,\n params,\n nextConfig,\n parsedUrl,\n isDraftMode,\n prerenderManifest,\n routerServerContext,\n isOnDemandRevalidate,\n revalidateOnlyGenerated,\n resolvedPathname,\n clientReferenceManifest,\n serverActionsManifest,\n previewProps,\n } = prepareResult\n\n const normalizedSrcPage = normalizeAppPath(srcPage)\n\n // Only this route's prerenders can establish ISR or admit generated params.\n const isPrerendered =\n Boolean(prerenderManifest.routes[resolvedPathname]) &&\n (routeModule.isDev ||\n isRouteCacheOwner(\n resolvedPathname,\n routeModule.cacheOwner,\n prerenderManifest.routes[resolvedPathname]\n ))\n\n let isIsr = Boolean(\n prerenderManifest.dynamicRoutes[normalizedSrcPage] || isPrerendered\n )\n\n const render404 = async () => {\n // TODO: should route-module itself handle rendering the 404\n if (routerServerContext?.render404) {\n await routerServerContext.render404(req, res, parsedUrl, false)\n } else {\n res.end('This page could not be found')\n }\n return null\n }\n\n if (isIsr && !isDraftMode) {\n const prerenderInfo = prerenderManifest.dynamicRoutes[normalizedSrcPage]\n\n if (prerenderInfo) {\n if (prerenderInfo.fallback === false && !isPrerendered) {\n if (nextConfig.adapterPath) {\n return await render404()\n }\n throw new NoFallbackError()\n }\n }\n }\n\n let cacheKey: string | null = null\n\n if (isIsr && !routeModule.isDev && !isDraftMode) {\n cacheKey = resolvedPathname\n // ensure /index and / is normalized to one key\n cacheKey = cacheKey === '/index' ? '/' : cacheKey\n }\n\n // Before rendering (which initializes component tree modules), we have to\n // set the reference manifests to our global store so Server Action's\n // encryption util can access to them at the top level of the page module.\n if (serverActionsManifest && clientReferenceManifest) {\n setManifestsSingleton({\n page: srcPage,\n clientReferenceManifest,\n serverActionsManifest,\n })\n }\n\n const method = req.method || 'GET'\n const tracer = getTracer()\n const activeSpan = tracer.getActiveScopeSpan()\n const isWrappedByNextServer = Boolean(\n routerServerContext?.isWrappedByNextServer\n )\n const isMinimalMode = Boolean(getRequestMeta(req, 'minimalMode'))\n\n const incrementalCache =\n getRequestMeta(req, 'incrementalCache') ||\n (await routeModule.getIncrementalCache(\n req,\n nextConfig,\n previewProps,\n prerenderManifest,\n isMinimalMode\n ))\n\n incrementalCache?.resetRequestCache()\n ;(globalThis as any).__incrementalCache = incrementalCache\n\n const context: AppRouteRouteHandlerContext = {\n params,\n previewProps,\n renderOpts: {\n experimental: {\n authInterrupts: Boolean(nextConfig.experimental.authInterrupts),\n useCacheTimeout: nextConfig.experimental.useCacheTimeout,\n durableUseCacheEntries: Boolean(\n nextConfig.experimental.durableUseCacheEntries\n ),\n },\n cacheComponents: Boolean(nextConfig.cacheComponents),\n validationLevel: nextConfig.experimental.instantInsights.validationLevel,\n isDraftMode,\n incrementalCache,\n hmrRefreshHash: getRequestMeta(req, 'hmrRefreshHash'),\n cacheLifeProfiles: nextConfig.cacheLife,\n staticPageGenerationTimeout: nextConfig.staticPageGenerationTimeout,\n waitUntil: ctx.waitUntil,\n onClose: (cb) => {\n res.on('close', cb)\n },\n onAfterTaskError: undefined,\n },\n sharedContext: {\n buildId,\n deploymentId,\n },\n }\n const nodeNextReq = new NodeNextRequest(req)\n const nodeNextRes = new NodeNextResponse(res)\n\n const nextReq = NextRequestAdapter.fromNodeNextRequest(\n nodeNextReq,\n signalFromNodeResponse(res)\n )\n\n const responseGenerator: ResponseGenerator = async ({\n previousCacheEntry,\n }) => {\n try {\n if (\n !isMinimalMode &&\n isOnDemandRevalidate &&\n revalidateOnlyGenerated &&\n !previousCacheEntry\n ) {\n res.statusCode = 404\n // on-demand revalidate always sets this header\n res.setHeader('x-nextjs-cache', 'REVALIDATED')\n res.end('This page could not be found')\n return null\n }\n\n const response =\n cacheKey === null\n ? await routeModule.handle(nextReq, context)\n : await routeModule.prerender(nextReq, context)\n\n ;(req as any).fetchMetrics = (context.renderOpts as any).fetchMetrics\n let pendingWaitUntil = context.renderOpts.pendingWaitUntil\n\n // Attempt using provided waitUntil if available\n // if it's not we fallback to sendResponse's handling\n if (pendingWaitUntil) {\n if (ctx.waitUntil) {\n ctx.waitUntil(pendingWaitUntil)\n pendingWaitUntil = undefined\n }\n }\n const cacheTags = context.renderOpts.collectedTags\n\n // If the request is for a static response, we can cache it so long\n // as it's not edge.\n if (isIsr) {\n const blob = await response.blob()\n\n // Copy the headers from the response.\n const headers = toNodeOutgoingHttpHeaders(response.headers)\n\n if (cacheTags) {\n headers[NEXT_CACHE_TAGS_HEADER] = cacheTags\n }\n\n if (!headers['content-type'] && blob.type) {\n headers['content-type'] = blob.type\n }\n\n const revalidate =\n typeof context.renderOpts.collectedRevalidate === 'undefined' ||\n context.renderOpts.collectedRevalidate >= INFINITE_CACHE\n ? false\n : context.renderOpts.collectedRevalidate\n\n const expire =\n typeof context.renderOpts.collectedExpire === 'undefined' ||\n context.renderOpts.collectedExpire >= INFINITE_CACHE\n ? // Fall back to the global `expireTime` config when the\n // route has a numeric `revalidate` but didn't declare an\n // explicit `expire` (e.g. via `cacheLife`). This mirrors the\n // build-time fallback in `build/index.ts` so cache entries\n // and the response Cache-Control header agree on the route's\n // effective expire. Routes that opt out of revalidation\n // (`revalidate: false`) or that are dynamic (`revalidate: 0`)\n // keep `expire: undefined`.\n revalidate !== false && revalidate > 0\n ? nextConfig.expireTime\n : undefined\n : context.renderOpts.collectedExpire\n\n // Create the cache entry for the response.\n const cacheEntry: ResponseCacheEntry = {\n value: {\n kind: CachedRouteKind.APP_ROUTE,\n status: response.status,\n body: Buffer.from(await blob.arrayBuffer()),\n headers,\n },\n cacheControl: { revalidate, expire },\n }\n\n return cacheEntry\n } else {\n // send response without caching if not ISR\n await sendResponse(nodeNextReq, nodeNextRes, response, pendingWaitUntil)\n return null\n }\n } catch (err) {\n // if this is a background revalidate we need to report\n // the request error here as it won't be bubbled\n if (previousCacheEntry?.isStale) {\n const silenceLog = false\n await routeModule.onRequestError(\n req,\n err,\n {\n routerKind: 'App Router',\n routePath: srcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isStaticGeneration: cacheKey !== null,\n isOnDemandRevalidate,\n }),\n },\n silenceLog,\n routerServerContext\n )\n }\n throw err\n }\n }\n\n const handleResponse = async (\n currentSpan: Span | undefined,\n parentSpan: Span | undefined\n ) => {\n try {\n const cacheEntry = await routeModule.handleResponse({\n req,\n nextConfig,\n cacheKey,\n routeKind: RouteKind.APP_ROUTE,\n isFallback: false,\n previewProps,\n prerenderManifest,\n isRoutePPREnabled: false,\n isOnDemandRevalidate,\n revalidateOnlyGenerated,\n responseGenerator,\n waitUntil: ctx.waitUntil,\n isMinimalMode,\n })\n\n if (cacheEntry !== null && 'error' in cacheEntry) {\n throw cacheEntry.error\n }\n\n // we don't create a cacheEntry for ISR\n if (!isIsr) {\n return\n }\n\n if (cacheEntry?.value?.kind !== CachedRouteKind.APP_ROUTE) {\n throw new Error(\n `Invariant: app-route received invalid cache entry ${cacheEntry?.value?.kind}`\n )\n }\n\n if (!isMinimalMode) {\n res.setHeader(\n 'x-nextjs-cache',\n isOnDemandRevalidate\n ? 'REVALIDATED'\n : cacheEntry.isMiss\n ? 'MISS'\n : cacheEntry.isStale\n ? 'STALE'\n : 'HIT'\n )\n }\n\n // Draft mode should never be cached\n if (isDraftMode) {\n res.setHeader(\n 'Cache-Control',\n 'private, no-cache, no-store, max-age=0, must-revalidate'\n )\n }\n\n const headers = fromNodeOutgoingHttpHeaders(cacheEntry.value.headers)\n\n if (!(isMinimalMode && isIsr)) {\n headers.delete(NEXT_CACHE_TAGS_HEADER)\n }\n\n // If cache control is already set on the response we don't\n // override it to allow users to customize it via next.config\n if (\n cacheEntry.cacheControl &&\n !res.getHeader('Cache-Control') &&\n !headers.get('Cache-Control')\n ) {\n headers.set(\n 'Cache-Control',\n getCacheControlHeader(cacheEntry.cacheControl)\n )\n }\n\n await sendResponse(\n nodeNextReq,\n nodeNextRes,\n // @ts-expect-error - Argument of type 'Buffer<ArrayBufferLike>' is not assignable to parameter of type 'BodyInit | null | undefined'.\n new Response(cacheEntry.value.body, {\n headers,\n status: cacheEntry.value.status || 200,\n })\n )\n return\n } catch (err) {\n if (!(err instanceof NoFallbackError)) {\n const silenceLog = false\n await routeModule.onRequestError(\n req,\n err,\n {\n routerKind: 'App Router',\n routePath: normalizedSrcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isStaticGeneration: cacheKey !== null,\n isOnDemandRevalidate,\n }),\n },\n silenceLog,\n routerServerContext\n )\n }\n\n // rethrow so that we can handle serving error page\n\n // If this is during static generation, throw the error again.\n if (isIsr) throw err\n\n // Otherwise, send a 500 response unless the original response has\n // already committed. In that case, preserve its status code for\n // telemetry while still recording the failure and terminating a response\n // that the failed pipeline left open.\n if (res.headersSent) {\n if (currentSpan) {\n const error =\n err instanceof Error ? err : new Error('Unknown app route error')\n currentSpan.recordException(error)\n currentSpan.setStatus({\n code: SpanStatusCode.ERROR,\n message: error.message,\n })\n currentSpan.setAttribute('error.type', error.name)\n }\n if (!res.writableEnded && !res.destroyed) {\n res.end()\n }\n } else {\n await sendResponse(\n nodeNextReq,\n nodeNextRes,\n new Response(null, { status: 500 })\n )\n }\n return\n } finally {\n ;(() => {\n if (!currentSpan) {\n return\n }\n\n let statusCode = res.statusCode\n\n currentSpan.setAttributes({\n 'http.status_code': statusCode,\n 'next.rsc': false,\n })\n\n if (statusCode && statusCode >= 500) {\n // For 5xx status codes: SHOULD be set to 'Error' span status.\n // x-ref: https://opentelemetry.io/docs/specs/semconv/http/http-spans/#status\n currentSpan.setStatus({\n code: SpanStatusCode.ERROR,\n })\n // For span status 'Error', SHOULD set 'error.type' attribute.\n currentSpan.setAttribute('error.type', statusCode.toString())\n }\n\n const rootSpanAttributes = tracer.getRootSpanAttributes()\n // We were unable to get attributes, probably OTEL is not enabled\n if (!rootSpanAttributes) {\n return\n }\n\n if (\n rootSpanAttributes.get('next.span_type') !==\n BaseServerSpan.handleRequest\n ) {\n console.warn(\n `Unexpected root span type '${rootSpanAttributes.get(\n 'next.span_type'\n )}'. Please report this Next.js issue https://github.com/vercel/next.js`\n )\n return\n }\n\n const route = rootSpanAttributes.get('next.route') || normalizedSrcPage\n const name = `${method} ${route}`\n\n currentSpan.setAttributes({\n 'next.route': route,\n 'http.route': route,\n 'next.span_name': name,\n })\n currentSpan.updateName(name)\n\n // Propagate http.route to the parent span if one exists (e.g.\n // a platform-created HTTP span in adapter deployments).\n if (parentSpan && parentSpan !== currentSpan) {\n parentSpan.setAttribute('http.route', route)\n parentSpan.updateName(name)\n }\n })()\n }\n }\n\n // TODO: activeSpan code path is for when wrapped by\n // next-server can be removed when this is no longer used\n if (isWrappedByNextServer && activeSpan) {\n await handleResponse(activeSpan, undefined)\n } else {\n let parentSpan = tracer.getActiveScopeSpan()\n await tracer.withPropagatedContext(\n req.headers,\n () =>\n tracer.trace(\n BaseServerSpan.handleRequest,\n {\n spanName: `${method} ${srcPage}`,\n kind: SpanKind.SERVER,\n attributes: {\n 'http.method': method,\n 'http.target': req.url,\n },\n },\n (span) => handleResponse(span, parentSpan)\n ),\n undefined,\n !isWrappedByNextServer\n )\n }\n}\n"],"names":["dynamic","POST","req","params","projectId","id","store","cfg","text","parse","json","bead","addComment","humanActor","e","AppRouteRouteModule","RouteKind","patchFetch","_patchFetch","addRequestMeta","getRequestMeta","setRequestMeta","getTracer","SpanKind","SpanStatusCode","setManifestsSingleton","normalizeAppPath","NodeNextRequest","NodeNextResponse","NextRequestAdapter","signalFromNodeResponse","BaseServerSpan","getRevalidateReason","sendResponse","fromNodeOutgoingHttpHeaders","toNodeOutgoingHttpHeaders","getCacheControlHeader","INFINITE_CACHE","NEXT_CACHE_TAGS_HEADER","NoFallbackError","isRouteCacheOwner","CachedRouteKind","routeModule","definition","kind","APP_ROUTE","page","pathname","filename","bundlePath","distDir","process","env","__NEXT_RELATIVE_DIST_DIR","relativeProjectDir","__NEXT_RELATIVE_PROJECT_DIR","resolvedPagePath","nextConfigOutput","userland","require","TURBOPACK","__NEXT_DEV_SERVER","getUserland","workAsyncStorage","workUnitAsyncStorage","serverHooks","handler","res","ctx","requestMeta","isDev","hrtime","bigint","srcPage","replace","multiZoneDraftMode","__NEXT_MULTI_ZONE_DRAFT_MODE","prepareResult","prepare","statusCode","end","waitUntil","Promise","resolve","buildId","deploymentId","nextConfig","parsedUrl","isDraftMode","prerenderManifest","routerServerContext","isOnDemandRevalidate","revalidateOnlyGenerated","resolvedPathname","clientReferenceManifest","serverActionsManifest","previewProps","normalizedSrcPage","isPrerendered","Boolean","routes","cacheOwner","isIsr","dynamicRoutes","render404","prerenderInfo","fallback","adapterPath","cacheKey","method","tracer","activeSpan","getActiveScopeSpan","isWrappedByNextServer","isMinimalMode","incrementalCache","getIncrementalCache","resetRequestCache","globalThis","__incrementalCache","context","renderOpts","experimental","authInterrupts","useCacheTimeout","durableUseCacheEntries","cacheComponents","validationLevel","instantInsights","hmrRefreshHash","cacheLifeProfiles","cacheLife","staticPageGenerationTimeout","onClose","cb","on","onAfterTaskError","undefined","sharedContext","nodeNextReq","nodeNextRes","nextReq","fromNodeNextRequest","responseGenerator","previousCacheEntry","setHeader","response","handle","prerender","fetchMetrics","pendingWaitUntil","cacheTags","collectedTags","blob","headers","type","revalidate","collectedRevalidate","expire","collectedExpire","expireTime","cacheEntry","value","status","body","Buffer","from","arrayBuffer","cacheControl","err","isStale","silenceLog","onRequestError","routerKind","routePath","routeType","revalidateReason","isStaticGeneration","handleResponse","currentSpan","parentSpan","routeKind","isFallback","isRoutePPREnabled","error","Error","isMiss","delete","getHeader","get","set","Response","headersSent","recordException","setStatus","code","ERROR","message","setAttribute","name","writableEnded","destroyed","setAttributes","toString","rootSpanAttributes","getRootSpanAttributes","handleRequest","console","warn","route","updateName","withPropagatedContext","trace","spanName","SERVER","attributes","url","span"],"mappings":"6CAAA,IAAA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,MACA,EAAA,EAAA,CAAA,CAAA,OAIO,eAAeC,EAAKC,CAAY,CAAE,QAAEC,CAAM,CAA0D,EACzG,GAAI,CACF,GAAM,WAAEC,CAAS,IAAEC,CAAE,CAAE,CAAG,MAAMF,EAC1BG,EAAQ,MAAM,CAAA,EAAA,EAAA,CAAA,AAAQ,EAACF,GACvBG,EAAM,CAAA,EAAA,EAAA,CAAA,AAAS,IACf,MAAEC,CAAI,CAAE,CAAG,EAAA,CAAgB,CAACC,KAAK,CAAC,MAAMP,EAAIQ,IAAI,IAChDC,EAAO,MAAML,EAAMM,UAAU,CAACP,EAAIG,EAAMD,EAAIM,UAAU,EAC5D,MAAO,CAAA,EAAA,EAAA,CAAA,AAAE,EAACF,EACZ,CAAE,MAAOG,EAAG,CACV,MAAO,CAAA,EAAA,EAAA,CAAI,AAAJ,EAAKA,EACd,CACF,6BAbuB,6BCLvB,IAAA,EAIO,EAAA,CAHLC,AAGK,CAAA,OACP,EAA0B,EAAyB,CAA1CC,AAA0C,CAAA,GAAA,EAJ9B,EAKrB,CADkB,CACwB,AAFmB,EAEnB,CAAA,AAAjCC,CAAiC,AAFnC,GACmB,CAC8C,GAExE,EAGEI,EAEK,CAJLF,AAIK,CAPgBD,AAOhB,MAFS,CAGhB,EAIgB,EAZkB,AAa3B,CAJLI,AAIK,CAVS,AAUT,CANA,CAHLF,CASK,GAbmC,CAc1C,CALW,CAFuB,AAOI,CAHpCG,CAGoC,CAA7BE,AAA6B,CAAA,EADA,CATtB,EACdJ,AAMQ,EACRG,AAGF,EAAiC,EAAA,CAAA,AAAxBE,CAAwB,EADkD,IACT,CAC1E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EL,CACF,mCA9gBA,SAAShG,EACP,MAAA,CAAA,EAAOC,EAAAA,CAAAA,EAAY,kBACjB6C,uBACAC,CACF,EACF","ignoreList":[1]}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
(()=>{"use strict";module.exports=[61204,e=>{var t=e.i(83535),a=e.i(72507),r=e.i(5622),n=e.i(73744),i=e.i(71724),o=e.i(5954);async function s(e,{params:i}){try{let{projectId:o,id:s}=await i,l=await (0,t.R)(o),d=(0,a.L)(),{depends_on_id:u,type:c}=r.a.parse(await e.json()),p=await l.addDep(s,u,c,d.humanActor);return(0,n.N)(p)}catch(e){return(0,n.O)(e)}}async function l(e,{params:r}){try{let{projectId:s,id:l}=await r,d=await (0,t.R)(s),u=(0,a.L)(),{depends_on_id:c}=i.z.object({depends_on_id:o.z.string()}).parse(await e.json()),p=await d.removeDep(l,c,u.humanActor);return(0,n.N)(p)}catch(e){return(0,n.O)(e)}}e.s(["DELETE",0,l,"POST",0,s,"dynamic",0,"force-dynamic"])},42642,e=>{var t=e.i(47909),a=e.i(74017),r=e.i(96250),n=e.i(59756),i=e.i(61916),o=e.i(74677),s=e.i(69741),l=e.i(16795),d=e.i(87718),u=e.i(95169),c=e.i(47587),p=e.i(66012),h=e.i(70101),f=e.i(74838),w=e.i(10372),v=e.i(93695),m=e.i(9580);e.i(52474);var R=e.i(220);let x=new t.AppRouteRouteModule({definition:{kind:a.f.APP_ROUTE,page:"/api/p/[projectId]/beads/[id]/deps/route",pathname:"/api/p/[projectId]/beads/[id]/deps",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/app/api/p/[projectId]/beads/[id]/deps/route.ts",nextConfigOutput:"",userland:()=>e.r(61204),...{}}),{workAsyncStorage:y,workUnitAsyncStorage:E,serverHooks:g}=x;async function b(e,t,r){r.requestMeta&&(0,n.R)(e,r.requestMeta),x.isDev&&(0,n.i)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let y="/api/p/[projectId]/beads/[id]/deps/route";y=y.replace(/\/index$/,"")||"/";let E=await x.prepare(e,t,{srcPage:y,multiZoneDraftMode:!1});if(!E)return t.statusCode=400,t.end("Bad Request"),null==r.waitUntil||r.waitUntil.call(r,Promise.resolve()),null;let{buildId:g,deploymentId:b,params:C,nextConfig:A,parsedUrl:P,isDraftMode:T,prerenderManifest:S,routerServerContext:O,isOnDemandRevalidate:U,revalidateOnlyGenerated:k,resolvedPathname:I,clientReferenceManifest:j,serverActionsManifest:D,previewProps:q}=E,M=(0,s.f)(y),_=!!S.routes[I]&&(x.isDev||(0,m.f)(I,x.cacheOwner,S.routes[I])),N=!!(S.dynamicRoutes[M]||_),L=async()=>((null==O?void 0:O.render404)?await O.render404(e,t,P,!1):t.end("This page could not be found"),null);if(N&&!T){let e=S.dynamicRoutes[M];if(e&&!1===e.fallback&&!_){if(A.adapterPath)return await L();throw new v.NoFallbackError}}let H=null;!N||x.isDev||T||(H="/index"===(H=I)?"/":H),D&&j&&(0,o.f)({page:y,clientReferenceManifest:j,serverActionsManifest:D});let $=e.method||"GET",G=(0,i.v)(),B=G.getActiveScopeSpan(),F=!!(null==O?void 0:O.isWrappedByNextServer),K=!!(0,n.w)(e,"minimalMode"),V=(0,n.w)(e,"incrementalCache")||await x.getIncrementalCache(e,A,q,S,K);null==V||V.resetRequestCache(),globalThis.__incrementalCache=V;let z={params:C,previewProps:q,renderOpts:{experimental:{authInterrupts:!!A.experimental.authInterrupts,useCacheTimeout:A.experimental.useCacheTimeout,durableUseCacheEntries:!!A.experimental.durableUseCacheEntries},cacheComponents:!!A.cacheComponents,validationLevel:A.experimental.instantInsights.validationLevel,isDraftMode:T,incrementalCache:V,hmrRefreshHash:(0,n.w)(e,"hmrRefreshHash"),cacheLifeProfiles:A.cacheLife,staticPageGenerationTimeout:A.staticPageGenerationTimeout,waitUntil:r.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0},sharedContext:{buildId:g,deploymentId:b}},J=new l.x(e),Q=new l.e(t),W=d.k.fromNodeNextRequest(J,(0,d.t)(t)),Z=async({previousCacheEntry:a})=>{try{if(!K&&U&&k&&!a)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let n=null===H?await x.handle(W,z):await x.prerender(W,z);e.fetchMetrics=z.renderOpts.fetchMetrics;let i=z.renderOpts.pendingWaitUntil;i&&r.waitUntil&&(r.waitUntil(i),i=void 0);let o=z.renderOpts.collectedTags;if(!N)return await (0,p.f)(J,Q,n,i),null;{let e=await n.blob(),t=(0,h.S)(n.headers);o&&(t[w.M]=o),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let a=void 0!==z.renderOpts.collectedRevalidate&&!(z.renderOpts.collectedRevalidate>=w.Q)&&z.renderOpts.collectedRevalidate,r=void 0===z.renderOpts.collectedExpire||z.renderOpts.collectedExpire>=w.Q?!1!==a&&a>0?A.expireTime:void 0:z.renderOpts.collectedExpire;return{value:{kind:R.x.APP_ROUTE,status:n.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:a,expire:r}}}}catch(t){throw(null==a?void 0:a.isStale)&&await x.onRequestError(e,t,{routerKind:"App Router",routePath:y,routeType:"route",revalidateReason:(0,c.f)({isStaticGeneration:null!==H,isOnDemandRevalidate:U})},!1,O),t}},X=async(n,o)=>{try{var s,l;let n=await x.handleResponse({req:e,nextConfig:A,cacheKey:H,routeKind:a.f.APP_ROUTE,isFallback:!1,previewProps:q,prerenderManifest:S,isRoutePPREnabled:!1,isOnDemandRevalidate:U,revalidateOnlyGenerated:k,responseGenerator:Z,waitUntil:r.waitUntil,isMinimalMode:K});if(null!==n&&"error"in n)throw n.error;if(!N)return;if((null==n||null==(s=n.value)?void 0:s.kind)!==R.x.APP_ROUTE)throw Error(`Invariant: app-route received invalid cache entry ${null==n||null==(l=n.value)?void 0:l.kind}`);K||t.setHeader("x-nextjs-cache",U?"REVALIDATED":n.isMiss?"MISS":n.isStale?"STALE":"HIT"),T&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let i=(0,h.G)(n.value.headers);K&&N||i.delete(w.M),!n.cacheControl||t.getHeader("Cache-Control")||i.get("Cache-Control")||i.set("Cache-Control",(0,f.f)(n.cacheControl)),await (0,p.f)(J,Q,new Response(n.value.body,{headers:i,status:n.value.status||200}));return}catch(a){if(a instanceof v.NoFallbackError||await x.onRequestError(e,a,{routerKind:"App Router",routePath:M,routeType:"route",revalidateReason:(0,c.f)({isStaticGeneration:null!==H,isOnDemandRevalidate:U})},!1,O),N)throw a;if(t.headersSent){if(n){let e=a instanceof Error?a:Error("Unknown app route error");n.recordException(e),n.setStatus({code:i.J.ERROR,message:e.message}),n.setAttribute("error.type",e.name)}t.writableEnded||t.destroyed||t.end()}else await (0,p.f)(J,Q,new Response(null,{status:500}));return}finally{(()=>{if(!n)return;let e=t.statusCode;n.setAttributes({"http.status_code":e,"next.rsc":!1}),e&&e>=500&&(n.setStatus({code:i.J.ERROR}),n.setAttribute("error.type",e.toString()));let a=G.getRootSpanAttributes();if(!a)return;if(a.get("next.span_type")!==u.q.handleRequest)return console.warn(`Unexpected root span type '${a.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let r=a.get("next.route")||M,s=`${$} ${r}`;n.setAttributes({"next.route":r,"http.route":r,"next.span_name":s}),n.updateName(s),o&&o!==n&&(o.setAttribute("http.route",r),o.updateName(s))})()}};if(F&&B)await X(B,void 0);else{let t=G.getActiveScopeSpan();await G.withPropagatedContext(e.headers,()=>G.trace(u.q.handleRequest,{spanName:`${$} ${y}`,kind:i.C.SERVER,attributes:{"http.method":$,"http.target":e.url}},e=>X(e,t)),void 0,!F)}}e.s(["handler",0,b,"patchFetch",0,function(){return(0,r.f)({workAsyncStorage:y,workUnitAsyncStorage:E})},"routeModule",0,x,"serverHooks",0,g,"workAsyncStorage",0,y,"workUnitAsyncStorage",0,E])}]})();
|
|
2
|
+
|
|
3
|
+
//# sourceMappingURL=_0kd1hwufqyhnn._.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../app/api/p/%5BprojectId%5D/beads/%5Bid%5D/deps/route.ts","../../../node_modules/next/src/build/templates/app-route.ts"],"sourcesContent":["import { getStore } from \"@/lib/store\";\nimport { getConfig } from \"@/lib/config\";\nimport { addDepSchema } from \"@/lib/schema\";\nimport { ok, fail } from \"@/lib/api\";\nimport { z } from \"zod\";\n\nexport const dynamic = \"force-dynamic\";\n\ntype Ctx = { params: Promise<{ projectId: string; id: string }> };\n\nexport async function POST(req: Request, { params }: Ctx) {\n try {\n const { projectId, id } = await params;\n const store = await getStore(projectId);\n const cfg = getConfig();\n const { depends_on_id, type } = addDepSchema.parse(await req.json());\n const bead = await store.addDep(id, depends_on_id, type, cfg.humanActor);\n return ok(bead);\n } catch (e) {\n return fail(e);\n }\n}\n\nexport async function DELETE(req: Request, { params }: Ctx) {\n try {\n const { projectId, id } = await params;\n const store = await getStore(projectId);\n const cfg = getConfig();\n const { depends_on_id } = z.object({ depends_on_id: z.string() }).parse(await req.json());\n const bead = await store.removeDep(id, depends_on_id, cfg.humanActor);\n return ok(bead);\n } catch (e) {\n return fail(e);\n }\n}\n","import {\n AppRouteRouteModule,\n type AppRouteRouteHandlerContext,\n type AppRouteRouteModuleOptions,\n} from '../../server/route-modules/app-route/module.compiled'\nimport { RouteKind } from '../../server/route-kind'\nimport { patchFetch as _patchFetch } from '../../server/lib/patch-fetch'\nimport type { IncomingMessage, ServerResponse } from 'node:http'\nimport {\n addRequestMeta,\n getRequestMeta,\n setRequestMeta,\n type RequestMeta,\n} from '../../server/request-meta'\nimport {\n getTracer,\n type Span,\n SpanKind,\n SpanStatusCode,\n} from '../../server/lib/trace/tracer'\nimport { setManifestsSingleton } from '../../server/app-render/manifests-singleton'\nimport { normalizeAppPath } from '../../shared/lib/router/utils/app-paths'\nimport { NodeNextRequest, NodeNextResponse } from '../../server/base-http/node'\nimport {\n NextRequestAdapter,\n signalFromNodeResponse,\n} from '../../server/web/spec-extension/adapters/next-request'\nimport { BaseServerSpan } from '../../server/lib/trace/constants'\nimport { getRevalidateReason } from '../../server/instrumentation/utils'\nimport { sendResponse } from '../../server/send-response'\nimport {\n fromNodeOutgoingHttpHeaders,\n toNodeOutgoingHttpHeaders,\n} from '../../server/web/utils'\nimport { getCacheControlHeader } from '../../server/lib/cache-control'\nimport { INFINITE_CACHE, NEXT_CACHE_TAGS_HEADER } from '../../lib/constants'\nimport { NoFallbackError } from '../../shared/lib/no-fallback-error.external'\nimport { isRouteCacheOwner } from '../../server/lib/route-cache-key'\nimport {\n CachedRouteKind,\n type ResponseCacheEntry,\n type ResponseGenerator,\n} from '../../server/response-cache'\n\n// These are injected by the loader afterwards. This is injected as a variable\n// instead of a replacement because this could also be `undefined` instead of\n// an empty string.\ndeclare const nextConfigOutput: AppRouteRouteModuleOptions['nextConfigOutput']\n\n// We inject the nextConfigOutput here so that we can use them in the route\n// module.\n// INJECT:nextConfigOutput\n\nconst routeModule = new AppRouteRouteModule({\n definition: {\n kind: RouteKind.APP_ROUTE,\n page: 'VAR_DEFINITION_PAGE',\n pathname: 'VAR_DEFINITION_PATHNAME',\n filename: 'VAR_DEFINITION_FILENAME',\n bundlePath: 'VAR_DEFINITION_BUNDLE_PATH',\n },\n distDir: process.env.__NEXT_RELATIVE_DIST_DIR || '',\n relativeProjectDir: process.env.__NEXT_RELATIVE_PROJECT_DIR || '',\n resolvedPagePath: 'VAR_RESOLVED_PAGE_PATH',\n nextConfigOutput,\n // The lazy require factory ensures that:\n // - In dev: devRequestTimingInternalsEnd is set before userland executes,\n // correctly attributing module load time to application-code rather than\n // framework internals.\n // - In all modes: async modules (route files with top-level await) are\n // handled correctly — require() returns a Promise for such modules, which\n // ensureUserland() awaits before the first request is handled.\n userland: () => require('VAR_USERLAND') as typeof import('VAR_USERLAND'),\n // In Turbopack dev mode, also provide a synchronous per-request getter so\n // server HMR updates are picked up without re-executing the entry chunk.\n // Using require() (synchronous) avoids adding async overhead that would be\n // incorrectly attributed to application-code time in devRequestTiming.\n ...(process.env.TURBOPACK && process.env.__NEXT_DEV_SERVER\n ? {\n getUserland: () =>\n require('VAR_USERLAND') as typeof import('VAR_USERLAND'),\n }\n : {}),\n})\n\n// Pull out the exports that we need to expose from the module. This should\n// be eliminated when we've moved the other routes to the new format. These\n// are used to hook into the route.\nconst { workAsyncStorage, workUnitAsyncStorage, serverHooks } = routeModule\n\nfunction patchFetch() {\n return _patchFetch({\n workAsyncStorage,\n workUnitAsyncStorage,\n })\n}\n\nexport {\n routeModule,\n workAsyncStorage,\n workUnitAsyncStorage,\n serverHooks,\n patchFetch,\n}\n\nexport async function handler(\n req: IncomingMessage,\n res: ServerResponse,\n ctx: {\n waitUntil?: (prom: Promise<void>) => void\n requestMeta?: RequestMeta\n }\n) {\n if (ctx.requestMeta) {\n setRequestMeta(req, ctx.requestMeta)\n }\n if (routeModule.isDev) {\n addRequestMeta(req, 'devRequestTimingInternalsEnd', process.hrtime.bigint())\n }\n let srcPage = 'VAR_DEFINITION_PAGE'\n\n // turbopack doesn't normalize `/index` in the page name\n // so we need to to process dynamic routes properly\n // TODO: fix turbopack providing differing value from webpack\n if (process.env.TURBOPACK) {\n srcPage = srcPage.replace(/\\/index$/, '') || '/'\n } else if (srcPage === '/index') {\n // we always normalize /index specifically\n srcPage = '/'\n }\n const multiZoneDraftMode = process.env\n .__NEXT_MULTI_ZONE_DRAFT_MODE as any as boolean\n\n const prepareResult = await routeModule.prepare(req, res, {\n srcPage,\n multiZoneDraftMode,\n })\n\n if (!prepareResult) {\n res.statusCode = 400\n res.end('Bad Request')\n ctx.waitUntil?.(Promise.resolve())\n return null\n }\n\n const {\n buildId,\n deploymentId,\n params,\n nextConfig,\n parsedUrl,\n isDraftMode,\n prerenderManifest,\n routerServerContext,\n isOnDemandRevalidate,\n revalidateOnlyGenerated,\n resolvedPathname,\n clientReferenceManifest,\n serverActionsManifest,\n previewProps,\n } = prepareResult\n\n const normalizedSrcPage = normalizeAppPath(srcPage)\n\n // Only this route's prerenders can establish ISR or admit generated params.\n const isPrerendered =\n Boolean(prerenderManifest.routes[resolvedPathname]) &&\n (routeModule.isDev ||\n isRouteCacheOwner(\n resolvedPathname,\n routeModule.cacheOwner,\n prerenderManifest.routes[resolvedPathname]\n ))\n\n let isIsr = Boolean(\n prerenderManifest.dynamicRoutes[normalizedSrcPage] || isPrerendered\n )\n\n const render404 = async () => {\n // TODO: should route-module itself handle rendering the 404\n if (routerServerContext?.render404) {\n await routerServerContext.render404(req, res, parsedUrl, false)\n } else {\n res.end('This page could not be found')\n }\n return null\n }\n\n if (isIsr && !isDraftMode) {\n const prerenderInfo = prerenderManifest.dynamicRoutes[normalizedSrcPage]\n\n if (prerenderInfo) {\n if (prerenderInfo.fallback === false && !isPrerendered) {\n if (nextConfig.adapterPath) {\n return await render404()\n }\n throw new NoFallbackError()\n }\n }\n }\n\n let cacheKey: string | null = null\n\n if (isIsr && !routeModule.isDev && !isDraftMode) {\n cacheKey = resolvedPathname\n // ensure /index and / is normalized to one key\n cacheKey = cacheKey === '/index' ? '/' : cacheKey\n }\n\n // Before rendering (which initializes component tree modules), we have to\n // set the reference manifests to our global store so Server Action's\n // encryption util can access to them at the top level of the page module.\n if (serverActionsManifest && clientReferenceManifest) {\n setManifestsSingleton({\n page: srcPage,\n clientReferenceManifest,\n serverActionsManifest,\n })\n }\n\n const method = req.method || 'GET'\n const tracer = getTracer()\n const activeSpan = tracer.getActiveScopeSpan()\n const isWrappedByNextServer = Boolean(\n routerServerContext?.isWrappedByNextServer\n )\n const isMinimalMode = Boolean(getRequestMeta(req, 'minimalMode'))\n\n const incrementalCache =\n getRequestMeta(req, 'incrementalCache') ||\n (await routeModule.getIncrementalCache(\n req,\n nextConfig,\n previewProps,\n prerenderManifest,\n isMinimalMode\n ))\n\n incrementalCache?.resetRequestCache()\n ;(globalThis as any).__incrementalCache = incrementalCache\n\n const context: AppRouteRouteHandlerContext = {\n params,\n previewProps,\n renderOpts: {\n experimental: {\n authInterrupts: Boolean(nextConfig.experimental.authInterrupts),\n useCacheTimeout: nextConfig.experimental.useCacheTimeout,\n durableUseCacheEntries: Boolean(\n nextConfig.experimental.durableUseCacheEntries\n ),\n },\n cacheComponents: Boolean(nextConfig.cacheComponents),\n validationLevel: nextConfig.experimental.instantInsights.validationLevel,\n isDraftMode,\n incrementalCache,\n hmrRefreshHash: getRequestMeta(req, 'hmrRefreshHash'),\n cacheLifeProfiles: nextConfig.cacheLife,\n staticPageGenerationTimeout: nextConfig.staticPageGenerationTimeout,\n waitUntil: ctx.waitUntil,\n onClose: (cb) => {\n res.on('close', cb)\n },\n onAfterTaskError: undefined,\n },\n sharedContext: {\n buildId,\n deploymentId,\n },\n }\n const nodeNextReq = new NodeNextRequest(req)\n const nodeNextRes = new NodeNextResponse(res)\n\n const nextReq = NextRequestAdapter.fromNodeNextRequest(\n nodeNextReq,\n signalFromNodeResponse(res)\n )\n\n const responseGenerator: ResponseGenerator = async ({\n previousCacheEntry,\n }) => {\n try {\n if (\n !isMinimalMode &&\n isOnDemandRevalidate &&\n revalidateOnlyGenerated &&\n !previousCacheEntry\n ) {\n res.statusCode = 404\n // on-demand revalidate always sets this header\n res.setHeader('x-nextjs-cache', 'REVALIDATED')\n res.end('This page could not be found')\n return null\n }\n\n const response =\n cacheKey === null\n ? await routeModule.handle(nextReq, context)\n : await routeModule.prerender(nextReq, context)\n\n ;(req as any).fetchMetrics = (context.renderOpts as any).fetchMetrics\n let pendingWaitUntil = context.renderOpts.pendingWaitUntil\n\n // Attempt using provided waitUntil if available\n // if it's not we fallback to sendResponse's handling\n if (pendingWaitUntil) {\n if (ctx.waitUntil) {\n ctx.waitUntil(pendingWaitUntil)\n pendingWaitUntil = undefined\n }\n }\n const cacheTags = context.renderOpts.collectedTags\n\n // If the request is for a static response, we can cache it so long\n // as it's not edge.\n if (isIsr) {\n const blob = await response.blob()\n\n // Copy the headers from the response.\n const headers = toNodeOutgoingHttpHeaders(response.headers)\n\n if (cacheTags) {\n headers[NEXT_CACHE_TAGS_HEADER] = cacheTags\n }\n\n if (!headers['content-type'] && blob.type) {\n headers['content-type'] = blob.type\n }\n\n const revalidate =\n typeof context.renderOpts.collectedRevalidate === 'undefined' ||\n context.renderOpts.collectedRevalidate >= INFINITE_CACHE\n ? false\n : context.renderOpts.collectedRevalidate\n\n const expire =\n typeof context.renderOpts.collectedExpire === 'undefined' ||\n context.renderOpts.collectedExpire >= INFINITE_CACHE\n ? // Fall back to the global `expireTime` config when the\n // route has a numeric `revalidate` but didn't declare an\n // explicit `expire` (e.g. via `cacheLife`). This mirrors the\n // build-time fallback in `build/index.ts` so cache entries\n // and the response Cache-Control header agree on the route's\n // effective expire. Routes that opt out of revalidation\n // (`revalidate: false`) or that are dynamic (`revalidate: 0`)\n // keep `expire: undefined`.\n revalidate !== false && revalidate > 0\n ? nextConfig.expireTime\n : undefined\n : context.renderOpts.collectedExpire\n\n // Create the cache entry for the response.\n const cacheEntry: ResponseCacheEntry = {\n value: {\n kind: CachedRouteKind.APP_ROUTE,\n status: response.status,\n body: Buffer.from(await blob.arrayBuffer()),\n headers,\n },\n cacheControl: { revalidate, expire },\n }\n\n return cacheEntry\n } else {\n // send response without caching if not ISR\n await sendResponse(nodeNextReq, nodeNextRes, response, pendingWaitUntil)\n return null\n }\n } catch (err) {\n // if this is a background revalidate we need to report\n // the request error here as it won't be bubbled\n if (previousCacheEntry?.isStale) {\n const silenceLog = false\n await routeModule.onRequestError(\n req,\n err,\n {\n routerKind: 'App Router',\n routePath: srcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isStaticGeneration: cacheKey !== null,\n isOnDemandRevalidate,\n }),\n },\n silenceLog,\n routerServerContext\n )\n }\n throw err\n }\n }\n\n const handleResponse = async (\n currentSpan: Span | undefined,\n parentSpan: Span | undefined\n ) => {\n try {\n const cacheEntry = await routeModule.handleResponse({\n req,\n nextConfig,\n cacheKey,\n routeKind: RouteKind.APP_ROUTE,\n isFallback: false,\n previewProps,\n prerenderManifest,\n isRoutePPREnabled: false,\n isOnDemandRevalidate,\n revalidateOnlyGenerated,\n responseGenerator,\n waitUntil: ctx.waitUntil,\n isMinimalMode,\n })\n\n if (cacheEntry !== null && 'error' in cacheEntry) {\n throw cacheEntry.error\n }\n\n // we don't create a cacheEntry for ISR\n if (!isIsr) {\n return\n }\n\n if (cacheEntry?.value?.kind !== CachedRouteKind.APP_ROUTE) {\n throw new Error(\n `Invariant: app-route received invalid cache entry ${cacheEntry?.value?.kind}`\n )\n }\n\n if (!isMinimalMode) {\n res.setHeader(\n 'x-nextjs-cache',\n isOnDemandRevalidate\n ? 'REVALIDATED'\n : cacheEntry.isMiss\n ? 'MISS'\n : cacheEntry.isStale\n ? 'STALE'\n : 'HIT'\n )\n }\n\n // Draft mode should never be cached\n if (isDraftMode) {\n res.setHeader(\n 'Cache-Control',\n 'private, no-cache, no-store, max-age=0, must-revalidate'\n )\n }\n\n const headers = fromNodeOutgoingHttpHeaders(cacheEntry.value.headers)\n\n if (!(isMinimalMode && isIsr)) {\n headers.delete(NEXT_CACHE_TAGS_HEADER)\n }\n\n // If cache control is already set on the response we don't\n // override it to allow users to customize it via next.config\n if (\n cacheEntry.cacheControl &&\n !res.getHeader('Cache-Control') &&\n !headers.get('Cache-Control')\n ) {\n headers.set(\n 'Cache-Control',\n getCacheControlHeader(cacheEntry.cacheControl)\n )\n }\n\n await sendResponse(\n nodeNextReq,\n nodeNextRes,\n // @ts-expect-error - Argument of type 'Buffer<ArrayBufferLike>' is not assignable to parameter of type 'BodyInit | null | undefined'.\n new Response(cacheEntry.value.body, {\n headers,\n status: cacheEntry.value.status || 200,\n })\n )\n return\n } catch (err) {\n if (!(err instanceof NoFallbackError)) {\n const silenceLog = false\n await routeModule.onRequestError(\n req,\n err,\n {\n routerKind: 'App Router',\n routePath: normalizedSrcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isStaticGeneration: cacheKey !== null,\n isOnDemandRevalidate,\n }),\n },\n silenceLog,\n routerServerContext\n )\n }\n\n // rethrow so that we can handle serving error page\n\n // If this is during static generation, throw the error again.\n if (isIsr) throw err\n\n // Otherwise, send a 500 response unless the original response has\n // already committed. In that case, preserve its status code for\n // telemetry while still recording the failure and terminating a response\n // that the failed pipeline left open.\n if (res.headersSent) {\n if (currentSpan) {\n const error =\n err instanceof Error ? err : new Error('Unknown app route error')\n currentSpan.recordException(error)\n currentSpan.setStatus({\n code: SpanStatusCode.ERROR,\n message: error.message,\n })\n currentSpan.setAttribute('error.type', error.name)\n }\n if (!res.writableEnded && !res.destroyed) {\n res.end()\n }\n } else {\n await sendResponse(\n nodeNextReq,\n nodeNextRes,\n new Response(null, { status: 500 })\n )\n }\n return\n } finally {\n ;(() => {\n if (!currentSpan) {\n return\n }\n\n let statusCode = res.statusCode\n\n currentSpan.setAttributes({\n 'http.status_code': statusCode,\n 'next.rsc': false,\n })\n\n if (statusCode && statusCode >= 500) {\n // For 5xx status codes: SHOULD be set to 'Error' span status.\n // x-ref: https://opentelemetry.io/docs/specs/semconv/http/http-spans/#status\n currentSpan.setStatus({\n code: SpanStatusCode.ERROR,\n })\n // For span status 'Error', SHOULD set 'error.type' attribute.\n currentSpan.setAttribute('error.type', statusCode.toString())\n }\n\n const rootSpanAttributes = tracer.getRootSpanAttributes()\n // We were unable to get attributes, probably OTEL is not enabled\n if (!rootSpanAttributes) {\n return\n }\n\n if (\n rootSpanAttributes.get('next.span_type') !==\n BaseServerSpan.handleRequest\n ) {\n console.warn(\n `Unexpected root span type '${rootSpanAttributes.get(\n 'next.span_type'\n )}'. Please report this Next.js issue https://github.com/vercel/next.js`\n )\n return\n }\n\n const route = rootSpanAttributes.get('next.route') || normalizedSrcPage\n const name = `${method} ${route}`\n\n currentSpan.setAttributes({\n 'next.route': route,\n 'http.route': route,\n 'next.span_name': name,\n })\n currentSpan.updateName(name)\n\n // Propagate http.route to the parent span if one exists (e.g.\n // a platform-created HTTP span in adapter deployments).\n if (parentSpan && parentSpan !== currentSpan) {\n parentSpan.setAttribute('http.route', route)\n parentSpan.updateName(name)\n }\n })()\n }\n }\n\n // TODO: activeSpan code path is for when wrapped by\n // next-server can be removed when this is no longer used\n if (isWrappedByNextServer && activeSpan) {\n await handleResponse(activeSpan, undefined)\n } else {\n let parentSpan = tracer.getActiveScopeSpan()\n await tracer.withPropagatedContext(\n req.headers,\n () =>\n tracer.trace(\n BaseServerSpan.handleRequest,\n {\n spanName: `${method} ${srcPage}`,\n kind: SpanKind.SERVER,\n attributes: {\n 'http.method': method,\n 'http.target': req.url,\n },\n },\n (span) => handleResponse(span, parentSpan)\n ),\n undefined,\n !isWrappedByNextServer\n )\n }\n}\n"],"names":["dynamic","POST","req","params","projectId","id","store","cfg","depends_on_id","type","parse","json","bead","addDep","humanActor","e","DELETE","object","string","removeDep","AppRouteRouteModule","RouteKind","patchFetch","_patchFetch","addRequestMeta","getRequestMeta","setRequestMeta","getTracer","SpanKind","SpanStatusCode","setManifestsSingleton","normalizeAppPath","NodeNextRequest","NodeNextResponse","NextRequestAdapter","signalFromNodeResponse","BaseServerSpan","getRevalidateReason","sendResponse","fromNodeOutgoingHttpHeaders","toNodeOutgoingHttpHeaders","getCacheControlHeader","INFINITE_CACHE","NEXT_CACHE_TAGS_HEADER","NoFallbackError","isRouteCacheOwner","CachedRouteKind","routeModule","definition","kind","APP_ROUTE","page","pathname","filename","bundlePath","distDir","process","env","__NEXT_RELATIVE_DIST_DIR","relativeProjectDir","__NEXT_RELATIVE_PROJECT_DIR","resolvedPagePath","nextConfigOutput","userland","require","TURBOPACK","__NEXT_DEV_SERVER","getUserland","workAsyncStorage","workUnitAsyncStorage","serverHooks","handler","res","ctx","requestMeta","isDev","hrtime","bigint","srcPage","replace","multiZoneDraftMode","__NEXT_MULTI_ZONE_DRAFT_MODE","prepareResult","prepare","statusCode","end","waitUntil","Promise","resolve","buildId","deploymentId","nextConfig","parsedUrl","isDraftMode","prerenderManifest","routerServerContext","isOnDemandRevalidate","revalidateOnlyGenerated","resolvedPathname","clientReferenceManifest","serverActionsManifest","previewProps","normalizedSrcPage","isPrerendered","Boolean","routes","cacheOwner","isIsr","dynamicRoutes","render404","prerenderInfo","fallback","adapterPath","cacheKey","method","tracer","activeSpan","getActiveScopeSpan","isWrappedByNextServer","isMinimalMode","incrementalCache","getIncrementalCache","resetRequestCache","globalThis","__incrementalCache","context","renderOpts","experimental","authInterrupts","useCacheTimeout","durableUseCacheEntries","cacheComponents","validationLevel","instantInsights","hmrRefreshHash","cacheLifeProfiles","cacheLife","staticPageGenerationTimeout","onClose","cb","on","onAfterTaskError","undefined","sharedContext","nodeNextReq","nodeNextRes","nextReq","fromNodeNextRequest","responseGenerator","previousCacheEntry","setHeader","response","handle","prerender","fetchMetrics","pendingWaitUntil","cacheTags","collectedTags","blob","headers","revalidate","collectedRevalidate","expire","collectedExpire","expireTime","cacheEntry","value","status","body","Buffer","from","arrayBuffer","cacheControl","err","isStale","silenceLog","onRequestError","routerKind","routePath","routeType","revalidateReason","isStaticGeneration","handleResponse","currentSpan","parentSpan","routeKind","isFallback","isRoutePPREnabled","error","Error","isMiss","delete","getHeader","get","set","Response","headersSent","recordException","setStatus","code","ERROR","message","setAttribute","name","writableEnded","destroyed","setAttributes","toString","rootSpanAttributes","getRootSpanAttributes","handleRequest","console","warn","route","updateName","withPropagatedContext","trace","spanName","SERVER","attributes","url","span"],"mappings":"6CAAA,IAAA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,MACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OAAA,EAAA,EAAA,CAAA,CAAA,MAMO,eAAeC,EAAKC,CAAY,CAAE,QAAEC,CAAM,CAAO,EACtD,GAAI,CACF,GAAM,WAAEC,CAAS,IAAEC,CAAE,CAAE,CAAG,MAAMF,EAC1BG,EAAQ,MAAM,CAAA,EAAA,EAAA,CAAA,AAAQ,EAACF,GACvBG,EAAM,CAAA,EAAA,EAAA,CAAS,AAAT,IACN,eAAE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ezG,EACf,cAAehH,EAAI0N,GAAG,AACxB,CACF,EACA,AAACC,GAASvC,EAAeuC,EAAMrC,SAEnC1C,EACA,CAACxB,EAEL,CACF,mCA9gBA,SAAShG,EACP,MAAA,CAAA,EAAOC,EAAAA,CAAAA,EAAY,kBACjB6C,uBACAC,CACF,EACF","ignoreList":[1]}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
(()=>{"use strict";module.exports=[2280,e=>{var t=e.i(83535),r=e.i(72507),a=e.i(73744);async function i(e,{params:n}){try{let{projectId:e,id:i}=await n,o=await (0,t.R)(e),s=await o.archive(i,(0,r.T)((await o.get(i))?.assignee));return(0,a.N)(s)}catch(e){return(0,a.O)(e)}}e.s(["POST",0,i,"dynamic",0,"force-dynamic"])},64905,e=>{var t=e.i(47909),r=e.i(74017),a=e.i(96250),i=e.i(59756),n=e.i(61916),o=e.i(74677),s=e.i(69741),l=e.i(16795),u=e.i(87718),d=e.i(95169),c=e.i(47587),p=e.i(66012),h=e.i(70101),f=e.i(74838),v=e.i(10372),w=e.i(93695),m=e.i(9580);e.i(52474);var R=e.i(220);let x=new t.AppRouteRouteModule({definition:{kind:r.f.APP_ROUTE,page:"/api/p/[projectId]/beads/[id]/archive/route",pathname:"/api/p/[projectId]/beads/[id]/archive",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/app/api/p/[projectId]/beads/[id]/archive/route.ts",nextConfigOutput:"",userland:()=>e.r(2280),...{}}),{workAsyncStorage:g,workUnitAsyncStorage:y,serverHooks:E}=x;async function b(e,t,a){a.requestMeta&&(0,i.R)(e,a.requestMeta),x.isDev&&(0,i.i)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let g="/api/p/[projectId]/beads/[id]/archive/route";g=g.replace(/\/index$/,"")||"/";let y=await x.prepare(e,t,{srcPage:g,multiZoneDraftMode:!1});if(!y)return t.statusCode=400,t.end("Bad Request"),null==a.waitUntil||a.waitUntil.call(a,Promise.resolve()),null;let{buildId:E,deploymentId:b,params:C,nextConfig:P,parsedUrl:T,isDraftMode:A,prerenderManifest:S,routerServerContext:O,isOnDemandRevalidate:U,revalidateOnlyGenerated:k,resolvedPathname:I,clientReferenceManifest:q,serverActionsManifest:M,previewProps:j}=y,D=(0,s.f)(g),N=!!S.routes[I]&&(x.isDev||(0,m.f)(I,x.cacheOwner,S.routes[I])),_=!!(S.dynamicRoutes[D]||N),H=async()=>((null==O?void 0:O.render404)?await O.render404(e,t,T,!1):t.end("This page could not be found"),null);if(_&&!A){let e=S.dynamicRoutes[D];if(e&&!1===e.fallback&&!N){if(P.adapterPath)return await H();throw new w.NoFallbackError}}let L=null;!_||x.isDev||A||(L="/index"===(L=I)?"/":L),M&&q&&(0,o.f)({page:g,clientReferenceManifest:q,serverActionsManifest:M});let $=e.method||"GET",G=(0,n.v)(),B=G.getActiveScopeSpan(),F=!!(null==O?void 0:O.isWrappedByNextServer),K=!!(0,i.w)(e,"minimalMode"),V=(0,i.w)(e,"incrementalCache")||await x.getIncrementalCache(e,P,j,S,K);null==V||V.resetRequestCache(),globalThis.__incrementalCache=V;let J={params:C,previewProps:j,renderOpts:{experimental:{authInterrupts:!!P.experimental.authInterrupts,useCacheTimeout:P.experimental.useCacheTimeout,durableUseCacheEntries:!!P.experimental.durableUseCacheEntries},cacheComponents:!!P.cacheComponents,validationLevel:P.experimental.instantInsights.validationLevel,isDraftMode:A,incrementalCache:V,hmrRefreshHash:(0,i.w)(e,"hmrRefreshHash"),cacheLifeProfiles:P.cacheLife,staticPageGenerationTimeout:P.staticPageGenerationTimeout,waitUntil:a.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0},sharedContext:{buildId:E,deploymentId:b}},Q=new l.x(e),W=new l.e(t),Z=u.k.fromNodeNextRequest(Q,(0,u.t)(t)),z=async({previousCacheEntry:r})=>{try{if(!K&&U&&k&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let i=null===L?await x.handle(Z,J):await x.prerender(Z,J);e.fetchMetrics=J.renderOpts.fetchMetrics;let n=J.renderOpts.pendingWaitUntil;n&&a.waitUntil&&(a.waitUntil(n),n=void 0);let o=J.renderOpts.collectedTags;if(!_)return await (0,p.f)(Q,W,i,n),null;{let e=await i.blob(),t=(0,h.S)(i.headers);o&&(t[v.M]=o),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==J.renderOpts.collectedRevalidate&&!(J.renderOpts.collectedRevalidate>=v.Q)&&J.renderOpts.collectedRevalidate,a=void 0===J.renderOpts.collectedExpire||J.renderOpts.collectedExpire>=v.Q?!1!==r&&r>0?P.expireTime:void 0:J.renderOpts.collectedExpire;return{value:{kind:R.x.APP_ROUTE,status:i.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:a}}}}catch(t){throw(null==r?void 0:r.isStale)&&await x.onRequestError(e,t,{routerKind:"App Router",routePath:g,routeType:"route",revalidateReason:(0,c.f)({isStaticGeneration:null!==L,isOnDemandRevalidate:U})},!1,O),t}},X=async(i,o)=>{try{var s,l;let i=await x.handleResponse({req:e,nextConfig:P,cacheKey:L,routeKind:r.f.APP_ROUTE,isFallback:!1,previewProps:j,prerenderManifest:S,isRoutePPREnabled:!1,isOnDemandRevalidate:U,revalidateOnlyGenerated:k,responseGenerator:z,waitUntil:a.waitUntil,isMinimalMode:K});if(null!==i&&"error"in i)throw i.error;if(!_)return;if((null==i||null==(s=i.value)?void 0:s.kind)!==R.x.APP_ROUTE)throw Error(`Invariant: app-route received invalid cache entry ${null==i||null==(l=i.value)?void 0:l.kind}`);K||t.setHeader("x-nextjs-cache",U?"REVALIDATED":i.isMiss?"MISS":i.isStale?"STALE":"HIT"),A&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let n=(0,h.G)(i.value.headers);K&&_||n.delete(v.M),!i.cacheControl||t.getHeader("Cache-Control")||n.get("Cache-Control")||n.set("Cache-Control",(0,f.f)(i.cacheControl)),await (0,p.f)(Q,W,new Response(i.value.body,{headers:n,status:i.value.status||200}));return}catch(r){if(r instanceof w.NoFallbackError||await x.onRequestError(e,r,{routerKind:"App Router",routePath:D,routeType:"route",revalidateReason:(0,c.f)({isStaticGeneration:null!==L,isOnDemandRevalidate:U})},!1,O),_)throw r;if(t.headersSent){if(i){let e=r instanceof Error?r:Error("Unknown app route error");i.recordException(e),i.setStatus({code:n.J.ERROR,message:e.message}),i.setAttribute("error.type",e.name)}t.writableEnded||t.destroyed||t.end()}else await (0,p.f)(Q,W,new Response(null,{status:500}));return}finally{(()=>{if(!i)return;let e=t.statusCode;i.setAttributes({"http.status_code":e,"next.rsc":!1}),e&&e>=500&&(i.setStatus({code:n.J.ERROR}),i.setAttribute("error.type",e.toString()));let r=G.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==d.q.handleRequest)return 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")||D,s=`${$} ${a}`;i.setAttributes({"next.route":a,"http.route":a,"next.span_name":s}),i.updateName(s),o&&o!==i&&(o.setAttribute("http.route",a),o.updateName(s))})()}};if(F&&B)await X(B,void 0);else{let t=G.getActiveScopeSpan();await G.withPropagatedContext(e.headers,()=>G.trace(d.q.handleRequest,{spanName:`${$} ${g}`,kind:n.C.SERVER,attributes:{"http.method":$,"http.target":e.url}},e=>X(e,t)),void 0,!F)}}e.s(["handler",0,b,"patchFetch",0,function(){return(0,a.f)({workAsyncStorage:g,workUnitAsyncStorage:y})},"routeModule",0,x,"serverHooks",0,E,"workAsyncStorage",0,g,"workUnitAsyncStorage",0,y])}]})();
|
|
2
|
+
|
|
3
|
+
//# sourceMappingURL=_0sr--n5b--0bk._.js.map
|