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/p/%5BprojectId%5D/order/route.ts","../../../node_modules/next/src/build/templates/app-route.ts"],"sourcesContent":["import { z } from \"zod\";\nimport { getColumnOrders, setColumnOrder } from \"@/lib/config\";\nimport { ok, fail } from \"@/lib/api\";\n\nexport const dynamic = \"force-dynamic\";\n\ntype Ctx = { params: Promise<{ projectId: string }> };\n\nconst putSchema = z.object({\n columnId: z.string().min(1),\n ids: z.array(z.string()),\n});\n\nexport async function GET(_req: Request, { params }: Ctx) {\n try {\n const { projectId } = await params;\n return ok({ orders: getColumnOrders(projectId) });\n } catch (e) {\n return fail(e);\n }\n}\n\nexport async function PUT(req: Request, { params }: Ctx) {\n try {\n const { projectId } = await params;\n const { columnId, ids } = putSchema.parse(await req.json());\n return ok({ orders: setColumnOrder(projectId, columnId, ids) });\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","putSchema","object","columnId","string","min","ids","array","GET","_req","params","projectId","orders","e","PUT","req","parse","json","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,OAAA,EAAA,EAAA,CAAA,CAAA,MAAA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OAMA,IAAMC,EAAY,EAAA,CAAC,CAACC,MAAM,CAAC,CACzBC,SAAU,EAAA,CAAC,CAACC,MAAM,GAAGC,GAAG,CAAC,GACzBC,IAAK,EAAA,CAAC,CAACC,KAAK,CAAC,EAAA,CAAC,CAACH,MAAM,GACvB,GAEO,eAAeI,EAAIC,CAAa,CAAE,QAAEC,CAAM,CAAO,EACtD,GAAI,CACF,GAAM,WAAEC,CAAS,CAAE,CAAG,MAAMD,EAC5B,MAAO,CAAA,EAAA,EAAA,CAAA,AAAE,EAAC,CAAEE,OAAQ,CAAA,EAAA,EAAA,CAAe,AAAf,EAAgBD,EAAW,EACjD,CAAE,MAAOE,EAAG,CACV,MAAO,CAAA,EAAA,EAAA,CAAA,AAAI,EAACA,EACd,CACF,CAEO,eAAeC,EAAIC,CAAY,CAAE,QAAEL,CAAM,CAAO,EACrD,GAAI,CACF,GAAM,WAAEC,CAAS,CAAE,CAAG,MAAMD,EACtB,UAAEP,CAAQ,KAAEG,CAAG,CAAE,CAAGL,EAAUe,KAAK,CAAC,MAAMD,EAAIE,IAAI,IACxD,MAAO,CAAA,EAAA,EAAA,CAAE,AAAF,EAAG,CAAEL,OAAQ,CAAA,EAAA,EAAA,CAAA,AAAc,EAACD,EAAWR,EAAUG,EAAK,EAC/D,CAAE,MAAOO,EAAG,CACV,MAAO,CAAA,EAAA,EA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UAAU,CAACX,IAE1B,CAAA,EACF,CACF,EAIA,GAAItF,GAAyBF,EAC3B,MAAMmE,EAAenE,EADkB,KACN0B,OAC5B,CACL,IAAI2C,EAAatE,EAAOE,kBAAkB,EAC1C,OAAMF,EAAOqG,qBAAqB,CAChCvM,EAAI8I,OAAO,CACX,IACE5C,EAAOsG,KAAK,CACVrL,EAAAA,CAAAA,CAAe+K,aAAa,CAC5B,CACEO,SAAU,CAAA,EAAGxG,EAAO,CAAC,EAAEpC,EAAAA,CAAS,CAChC7B,KAAMrB,EAAAA,CAAAA,CAAS+L,MAAM,CACrBC,WAAY,CACV,cAAe1G,EACf,cAAejG,EAAI4M,GAAG,AACxB,CACF,EACA,AAACC,GAASvC,EAAeuC,EAAMrC,SAEnC3C,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=[81038,e=>{var t=e.i(83535),a=e.i(72507),r=e.i(73744),i=e.i(71724),n=e.i(4147),o=e.i(5954),s=e.i(5622);let l=i.z.object({status:n.z.enum(s.M),reason:o.z.string().max(1e4).optional()});async function u(e,{params:i}){try{let{projectId:n,id:o}=await i,s=await (0,t.R)(n),u=(0,a.L)(),{status:d,reason:c}=l.parse(await e.json()),p="closed"===d?(0,a.T)((await s.get(o))?.assignee):u.humanActor,h=await s.setStatus(o,d,p,c);return(0,r.N)(h)}catch(e){return(0,r.O)(e)}}e.s(["POST",0,u,"dynamic",0,"force-dynamic"])},67491,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),u=e.i(87718),d=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]/status/route",pathname:"/api/p/[projectId]/beads/[id]/status",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/app/api/p/[projectId]/beads/[id]/status/route.ts",nextConfigOutput:"",userland:()=>e.r(81038),...{}}),{workAsyncStorage:g,workUnitAsyncStorage:y,serverHooks:E}=x;async function b(e,t,r){r.requestMeta&&(0,i.R)(e,r.requestMeta),x.isDev&&(0,i.i)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let g="/api/p/[projectId]/beads/[id]/status/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==r.waitUntil||r.waitUntil.call(r,Promise.resolve()),null;let{buildId:E,deploymentId:b,params:C,nextConfig:A,parsedUrl:P,isDraftMode:T,prerenderManifest:S,routerServerContext:O,isOnDemandRevalidate:U,revalidateOnlyGenerated:k,resolvedPathname:I,clientReferenceManifest:M,serverActionsManifest:j,previewProps:q}=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,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),j&&M&&(0,o.f)({page:g,clientReferenceManifest:M,serverActionsManifest:j});let $=e.method||"GET",G=(0,n.v)(),B=G.getActiveScopeSpan(),F=!!(null==O?void 0:O.isWrappedByNextServer),z=!!(0,i.w)(e,"minimalMode"),K=(0,i.w)(e,"incrementalCache")||await x.getIncrementalCache(e,A,q,S,z);null==K||K.resetRequestCache(),globalThis.__incrementalCache=K;let V={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:K,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:E,deploymentId:b}},J=new l.x(e),Q=new l.e(t),W=u.k.fromNodeNextRequest(J,(0,u.t)(t)),Z=async({previousCacheEntry:a})=>{try{if(!z&&U&&k&&!a)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(W,V):await x.prerender(W,V);e.fetchMetrics=V.renderOpts.fetchMetrics;let n=V.renderOpts.pendingWaitUntil;n&&r.waitUntil&&(r.waitUntil(n),n=void 0);let o=V.renderOpts.collectedTags;if(!_)return await (0,p.f)(J,Q,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!==V.renderOpts.collectedRevalidate&&!(V.renderOpts.collectedRevalidate>=w.Q)&&V.renderOpts.collectedRevalidate,r=void 0===V.renderOpts.collectedExpire||V.renderOpts.collectedExpire>=w.Q?!1!==a&&a>0?A.expireTime:void 0:V.renderOpts.collectedExpire;return{value:{kind:R.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 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:A,cacheKey:L,routeKind:a.f.APP_ROUTE,isFallback:!1,previewProps:q,prerenderManifest:S,isRoutePPREnabled:!1,isOnDemandRevalidate:U,revalidateOnlyGenerated:k,responseGenerator:Z,waitUntil:r.waitUntil,isMinimalMode:z});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}`);z||t.setHeader("x-nextjs-cache",U?"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);z&&_||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)(J,Q,new Response(i.value.body,{headers:n,status:i.value.status||200}));return}catch(a){if(a instanceof v.NoFallbackError||await x.onRequestError(e,a,{routerKind:"App Router",routePath:D,routeType:"route",revalidateReason:(0,c.f)({isStaticGeneration:null!==L,isOnDemandRevalidate:U})},!1,O),_)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)(J,Q,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=G.getRootSpanAttributes();if(!a)return;if(a.get("next.span_type")!==d.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")||D,s=`${$} ${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(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,r.f)({workAsyncStorage:g,workUnitAsyncStorage:y})},"routeModule",0,x,"serverHooks",0,E,"workAsyncStorage",0,g,"workUnitAsyncStorage",0,y])}]})();
|
|
2
|
+
|
|
3
|
+
//# sourceMappingURL=_1w6vul60in-n6._.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../app/api/p/%5BprojectId%5D/beads/%5Bid%5D/status/route.ts","../../../node_modules/next/src/build/templates/app-route.ts"],"sourcesContent":["import { getStore } from \"@/lib/store\";\nimport { getConfig, closeActor } from \"@/lib/config\";\nimport { ok, fail } from \"@/lib/api\";\nimport { z } from \"zod\";\nimport { BEAD_STATUSES } from \"@/lib/schema\";\n\nexport const dynamic = \"force-dynamic\";\n\nconst bodySchema = z.object({\n status: z.enum(BEAD_STATUSES),\n /** Optional close reason; ignored for every status other than `closed`. */\n reason: z.string().max(10_000).optional(),\n});\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 { status, reason } = bodySchema.parse(await req.json());\n // bd only lets a claimed bead's assignee close it; see closeActor.\n const actor = status === \"closed\" ? closeActor((await store.get(id))?.assignee) : cfg.humanActor;\n const bead = await store.setStatus(id, status, actor, reason);\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","bodySchema","object","status","enum","reason","string","max","optional","POST","req","params","projectId","id","store","cfg","parse","json","actor","get","assignee","humanActor","bead","setStatus","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","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","set","Response","headersSent","recordException","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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,CAC5B,CACEO,SAAU,CAAA,EAAGrG,EAAO,CAAC,EAAEpC,EAAAA,CAAS,CAChC7B,KAAMrB,EAAAA,CAAAA,CAAS4L,MAAM,CACrBC,WAAY,CACV,cAAevG,EACf,cAAe7G,EAAIqN,GAAG,AACxB,CACF,EACA,AAACC,GAASrC,EAAeqC,EAAMnC,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=[89131,e=>{var t=e.i(2157),a=e.i(50227),r=e.i(66680),n=e.i(72507),i=e.i(73744);function o(e){if(e===n.U.id)throw new n.b("Attachments aren't available for the Demo project (it has no folder).","bd_unavailable");let t=(0,n.e)(e);if(!t||null===t.path)throw new n.b(`Unknown project: ${e}`,"unknown_project");return a.default.join(t.path,".beads","attachments")}function l(e,t){return a.default.basename(e).replace(/[^a-zA-Z0-9._-]/g,"_").replace(/^\.+/,"")||t}async function s(e,{params:n}){try{let{projectId:s}=await n,d=o(s),u=await e.formData(),c=u.get("file"),p=String(u.get("beadId")||"").trim();if(!(c instanceof File))return(0,i.N)({error:"No file uploaded",code:"invalid_input"},400);if(!p)return(0,i.N)({error:"Missing beadId",code:"invalid_input"},400);if(!c.type.startsWith("image/"))return(0,i.N)({error:`Only image files are allowed (got ${c.type||"unknown"})`,code:"invalid_input"},400);if(c.size>0xf00000)return(0,i.N)({error:"Image is too large (max 15 MB)",code:"invalid_input"},400);let f=l(p,"draft"),h=l(c.name||"image","image"),m=`${r.default.randomUUID().slice(0,8)}-${h}`,v=a.default.join(d,f);t.default.mkdirSync(v,{recursive:!0});let w=a.default.join(v,m),g=Buffer.from(await c.arrayBuffer());t.default.writeFileSync(w,g);let y=`attachment://${f}/${m}`,R=`/api/p/${encodeURIComponent(s)}/attachments/${encodeURIComponent(f)}/${encodeURIComponent(m)}`,x=c.name?a.default.basename(c.name):h;return(0,i.N)({ref:y,url:R,name:x},201)}catch(e){return(0,i.O)(e)}}async function d(e,{params:r}){try{let{projectId:n}=await r,s=o(n),d=await e.json(),u=l(String(d.draftId||""),""),c=l(String(d.beadId||""),"");if(!u||!c)return(0,i.N)({error:"Missing draftId or beadId",code:"invalid_input"},400);let p=a.default.join(s,u),f=a.default.join(s,c);if(!t.default.existsSync(p))return(0,i.N)({moved:!1});if(t.default.mkdirSync(a.default.dirname(f),{recursive:!0}),t.default.existsSync(f)){for(let e of t.default.readdirSync(p))t.default.renameSync(a.default.join(p,e),a.default.join(f,e));t.default.rmdirSync(p)}else t.default.renameSync(p,f);return(0,i.N)({moved:!0})}catch(e){return(0,i.O)(e)}}e.s(["POST",0,s,"PUT",0,d,"dynamic",0,"force-dynamic"])},85166,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),l=e.i(69741),s=e.i(16795),d=e.i(87718),u=e.i(95169),c=e.i(47587),p=e.i(66012),f=e.i(70101),h=e.i(74838),m=e.i(10372),v=e.i(93695),w=e.i(9580);e.i(52474);var g=e.i(220);let y=new t.AppRouteRouteModule({definition:{kind:a.f.APP_ROUTE,page:"/api/p/[projectId]/attachments/route",pathname:"/api/p/[projectId]/attachments",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/app/api/p/[projectId]/attachments/route.ts",nextConfigOutput:"",userland:()=>e.r(89131),...{}}),{workAsyncStorage:R,workUnitAsyncStorage:x,serverHooks:b}=y;async function S(e,t,r){r.requestMeta&&(0,n.R)(e,r.requestMeta),y.isDev&&(0,n.i)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let R="/api/p/[projectId]/attachments/route";R=R.replace(/\/index$/,"")||"/";let x=await y.prepare(e,t,{srcPage:R,multiZoneDraftMode:!1});if(!x)return t.statusCode=400,t.end("Bad Request"),null==r.waitUntil||r.waitUntil.call(r,Promise.resolve()),null;let{buildId:b,deploymentId:S,params:C,nextConfig:E,parsedUrl:U,isDraftMode:A,prerenderManifest:I,routerServerContext:P,isOnDemandRevalidate:T,revalidateOnlyGenerated:O,resolvedPathname:j,clientReferenceManifest:k,serverActionsManifest:_,previewProps:N}=x,$=(0,l.f)(R),M=!!I.routes[j]&&(y.isDev||(0,w.f)(j,y.cacheOwner,I.routes[j])),D=!!(I.dynamicRoutes[$]||M),q=async()=>((null==P?void 0:P.render404)?await P.render404(e,t,U,!1):t.end("This page could not be found"),null);if(D&&!A){let e=I.dynamicRoutes[$];if(e&&!1===e.fallback&&!M){if(E.adapterPath)return await q();throw new v.NoFallbackError}}let H=null;!D||y.isDev||A||(H="/index"===(H=j)?"/":H),_&&k&&(0,o.f)({page:R,clientReferenceManifest:k,serverActionsManifest:_});let B=e.method||"GET",L=(0,i.v)(),F=L.getActiveScopeSpan(),G=!!(null==P?void 0:P.isWrappedByNextServer),K=!!(0,n.w)(e,"minimalMode"),V=(0,n.w)(e,"incrementalCache")||await y.getIncrementalCache(e,E,N,I,K);null==V||V.resetRequestCache(),globalThis.__incrementalCache=V;let W={params:C,previewProps:N,renderOpts:{experimental:{authInterrupts:!!E.experimental.authInterrupts,useCacheTimeout:E.experimental.useCacheTimeout,durableUseCacheEntries:!!E.experimental.durableUseCacheEntries},cacheComponents:!!E.cacheComponents,validationLevel:E.experimental.instantInsights.validationLevel,isDraftMode:A,incrementalCache:V,hmrRefreshHash:(0,n.w)(e,"hmrRefreshHash"),cacheLifeProfiles:E.cacheLife,staticPageGenerationTimeout:E.staticPageGenerationTimeout,waitUntil:r.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0},sharedContext:{buildId:b,deploymentId:S}},z=new s.x(e),J=new s.e(t),Q=d.k.fromNodeNextRequest(z,(0,d.t)(t)),Z=async({previousCacheEntry:a})=>{try{if(!K&&T&&O&&!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 y.handle(Q,W):await y.prerender(Q,W);e.fetchMetrics=W.renderOpts.fetchMetrics;let i=W.renderOpts.pendingWaitUntil;i&&r.waitUntil&&(r.waitUntil(i),i=void 0);let o=W.renderOpts.collectedTags;if(!D)return await (0,p.f)(z,J,n,i),null;{let e=await n.blob(),t=(0,f.S)(n.headers);o&&(t[m.M]=o),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let a=void 0!==W.renderOpts.collectedRevalidate&&!(W.renderOpts.collectedRevalidate>=m.Q)&&W.renderOpts.collectedRevalidate,r=void 0===W.renderOpts.collectedExpire||W.renderOpts.collectedExpire>=m.Q?!1!==a&&a>0?E.expireTime:void 0:W.renderOpts.collectedExpire;return{value:{kind:g.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 y.onRequestError(e,t,{routerKind:"App Router",routePath:R,routeType:"route",revalidateReason:(0,c.f)({isStaticGeneration:null!==H,isOnDemandRevalidate:T})},!1,P),t}},X=async(n,o)=>{try{var l,s;let n=await y.handleResponse({req:e,nextConfig:E,cacheKey:H,routeKind:a.f.APP_ROUTE,isFallback:!1,previewProps:N,prerenderManifest:I,isRoutePPREnabled:!1,isOnDemandRevalidate:T,revalidateOnlyGenerated:O,responseGenerator:Z,waitUntil:r.waitUntil,isMinimalMode:K});if(null!==n&&"error"in n)throw n.error;if(!D)return;if((null==n||null==(l=n.value)?void 0:l.kind)!==g.x.APP_ROUTE)throw Error(`Invariant: app-route received invalid cache entry ${null==n||null==(s=n.value)?void 0:s.kind}`);K||t.setHeader("x-nextjs-cache",T?"REVALIDATED":n.isMiss?"MISS":n.isStale?"STALE":"HIT"),A&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let i=(0,f.G)(n.value.headers);K&&D||i.delete(m.M),!n.cacheControl||t.getHeader("Cache-Control")||i.get("Cache-Control")||i.set("Cache-Control",(0,h.f)(n.cacheControl)),await (0,p.f)(z,J,new Response(n.value.body,{headers:i,status:n.value.status||200}));return}catch(a){if(a instanceof v.NoFallbackError||await y.onRequestError(e,a,{routerKind:"App Router",routePath:$,routeType:"route",revalidateReason:(0,c.f)({isStaticGeneration:null!==H,isOnDemandRevalidate:T})},!1,P),D)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)(z,J,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=L.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")||$,l=`${B} ${r}`;n.setAttributes({"next.route":r,"http.route":r,"next.span_name":l}),n.updateName(l),o&&o!==n&&(o.setAttribute("http.route",r),o.updateName(l))})()}};if(G&&F)await X(F,void 0);else{let t=L.getActiveScopeSpan();await L.withPropagatedContext(e.headers,()=>L.trace(u.q.handleRequest,{spanName:`${B} ${R}`,kind:i.C.SERVER,attributes:{"http.method":B,"http.target":e.url}},e=>X(e,t)),void 0,!G)}}e.s(["handler",0,S,"patchFetch",0,function(){return(0,r.f)({workAsyncStorage:R,workUnitAsyncStorage:x})},"routeModule",0,y,"serverHooks",0,b,"workAsyncStorage",0,R,"workUnitAsyncStorage",0,x])}]})();
|
|
2
|
+
|
|
3
|
+
//# sourceMappingURL=_1yp1pldb73ib4._.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../app/api/p/%5BprojectId%5D/attachments/route.ts","../../../node_modules/next/src/build/templates/app-route.ts"],"sourcesContent":["import \"server-only\";\nimport fs from \"node:fs\";\nimport path from \"node:path\";\nimport crypto from \"node:crypto\";\nimport { getProject, DEMO_PROJECT, ConfigError } from \"@/lib/config\";\nimport { ok, fail } from \"@/lib/api\";\n\nexport const dynamic = \"force-dynamic\";\n\ntype Ctx = { params: Promise<{ projectId: string }> };\n\nconst MAX_BYTES = 15 * 1024 * 1024; // 15 MB per image\n\n/** Resolve a project's <repo>/.beads/attachments dir, or throw a typed error. */\nfunction attachmentsDir(projectId: string): string {\n if (projectId === DEMO_PROJECT.id) {\n throw new ConfigError(\n \"Attachments aren't available for the Demo project (it has no folder).\",\n \"bd_unavailable\",\n );\n }\n const project = getProject(projectId);\n if (!project || project.path === null) {\n throw new ConfigError(`Unknown project: ${projectId}`, \"unknown_project\");\n }\n return path.join(project.path, \".beads\", \"attachments\");\n}\n\n/** Sanitize a single path segment so it can never escape the attachments dir. */\nfunction safeSegment(s: string, fallback: string): string {\n const cleaned = path.basename(s).replace(/[^a-zA-Z0-9._-]/g, \"_\").replace(/^\\.+/, \"\");\n return cleaned || fallback;\n}\n\n// POST — multipart upload of one image. Fields: file, beadId (real id or draft token).\nexport async function POST(req: Request, { params }: Ctx) {\n try {\n const { projectId } = await params;\n const dir = attachmentsDir(projectId);\n\n const form = await req.formData();\n const file = form.get(\"file\");\n const beadIdRaw = String(form.get(\"beadId\") || \"\").trim();\n if (!(file instanceof File)) {\n return ok({ error: \"No file uploaded\", code: \"invalid_input\" }, 400);\n }\n if (!beadIdRaw) {\n return ok({ error: \"Missing beadId\", code: \"invalid_input\" }, 400);\n }\n if (!file.type.startsWith(\"image/\")) {\n return ok({ error: `Only image files are allowed (got ${file.type || \"unknown\"})`, code: \"invalid_input\" }, 400);\n }\n if (file.size > MAX_BYTES) {\n return ok({ error: `Image is too large (max ${MAX_BYTES / (1024 * 1024)} MB)`, code: \"invalid_input\" }, 400);\n }\n\n const beadId = safeSegment(beadIdRaw, \"draft\");\n const original = safeSegment(file.name || \"image\", \"image\");\n const stored = `${crypto.randomUUID().slice(0, 8)}-${original}`;\n\n const targetDir = path.join(dir, beadId);\n fs.mkdirSync(targetDir, { recursive: true });\n const fullPath = path.join(targetDir, stored);\n const buf = Buffer.from(await file.arrayBuffer());\n fs.writeFileSync(fullPath, buf);\n\n const ref = `attachment://${beadId}/${stored}`;\n const url = `/api/p/${encodeURIComponent(projectId)}/attachments/${encodeURIComponent(beadId)}/${encodeURIComponent(stored)}`;\n const name = file.name ? path.basename(file.name) : original;\n return ok({ ref, url, name }, 201);\n } catch (e) {\n return fail(e);\n }\n}\n\n// PUT — finalize: rename a draft attachment folder to the real bead id once it exists.\nexport async function PUT(req: Request, { params }: Ctx) {\n try {\n const { projectId } = await params;\n const dir = attachmentsDir(projectId);\n const body = (await req.json()) as { draftId?: string; beadId?: string };\n const draftId = safeSegment(String(body.draftId || \"\"), \"\");\n const beadId = safeSegment(String(body.beadId || \"\"), \"\");\n if (!draftId || !beadId) {\n return ok({ error: \"Missing draftId or beadId\", code: \"invalid_input\" }, 400);\n }\n const from = path.join(dir, draftId);\n const to = path.join(dir, beadId);\n if (!fs.existsSync(from)) {\n // Nothing was uploaded under the draft token — a clean no-op.\n return ok({ moved: false });\n }\n fs.mkdirSync(path.dirname(to), { recursive: true });\n if (fs.existsSync(to)) {\n // Merge: move each file individually if the target dir already exists.\n for (const f of fs.readdirSync(from)) {\n fs.renameSync(path.join(from, f), path.join(to, f));\n }\n fs.rmdirSync(from);\n } else {\n fs.renameSync(from, to);\n }\n return ok({ moved: true });\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","MAX_BYTES","attachmentsDir","projectId","id","project","path","join","safeSegment","s","fallback","cleaned","basename","replace","POST","req","params","dir","form","formData","file","get","beadIdRaw","String","trim","File","error","code","type","startsWith","size","beadId","original","name","stored","randomUUID","slice","targetDir","mkdirSync","recursive","fullPath","buf","Buffer","from","arrayBuffer","writeFileSync","ref","url","encodeURIComponent","e","PUT","body","json","draftId","to","existsSync","moved","dirname","f","readdirSync","renameSync","rmdirSync","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","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","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","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":"6CACA,IAAA,EAAA,EAAA,CAAA,CAA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L,GAAcA,IAAeD,IAC/BC,EAAWe,OADiC,KACrB,CAAC,aAAcU,GACtCzB,EAAW0B,UAAU,CAACrN,IAE1B,CAAA,EACF,CACF,EAIA,GAAI6H,GAAyBF,EAC3B,MAAM8D,EAAe9D,EADkB,KACN0B,OAC5B,CACL,IAAIsC,EAAajE,EAAOE,kBAAkB,EAC1C,OAAMF,EAAO4F,qBAAqB,CAChCxO,EAAIwL,OAAO,CACX,IACE5C,EAAO6F,KAAK,CACV1K,EAAAA,CAAAA,CAAeoK,aAAa,CAC5B,CACEO,SAAU,CAAA,EAAG/F,EAAO,CAAC,EAAElC,EAAAA,CAAS,CAChC7B,KAAMrB,EAAAA,CAAAA,CAASoL,MAAM,CACrBC,WAAY,CACV,cAAejG,EACf,cAAe3I,EAAIgC,GAAG,AACxB,CACF,EACA,AAAC6M,GAASlC,EAAekC,EAAMhC,SAEnCtC,EACA,CAACxB,EAEL,CACF,mCA9gBA,SAAS9F,EACP,MAAA,CAAA,EAAOC,EAAAA,CAAAA,EAAY,kBACjB6C,uBACAC,CACF,EACF","ignoreList":[1]}
|
package/.next/server/chunks/_next-internal_server_app_api_config_route_actions_0ep4_f1yut2mt.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":""}
|
package/.next/server/chunks/_next-internal_server_app_api_fs_route_actions_0bfrr9ckhntty.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":""}
|
package/.next/server/chunks/_next-internal_server_app_favicon_ico_route_actions_0g2jjlssn1kss.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":""}
|
package/.next/server/chunks/_next-internal_server_app_icon_svg_route_actions_1r2h_ubdhjtcp.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
module.exports=[82438,e=>{"use strict";let n=Symbol.for("beadscope.sse.openStreams"),o=!1,t=e=>{if(o)return;o=!0;let t=function(){let e=function(){let e=globalThis,o=e[n];if(o)return o;let t=new Set;return e[n]=t,t}(),o=[...e];for(let n of(e.clear(),o))try{n()}catch{}return o.length}();t>0&&console.log(`[instrumentation] ${e}: closed ${t} open SSE stream(s)`)};process.on("SIGINT",()=>t("SIGINT")),process.on("SIGTERM",()=>t("SIGTERM"));let r=e=>{let n=e?.code;return"EPIPE"===n||"ECONNRESET"===n||"ERR_STREAM_DESTROYED"===n};process.on("uncaughtException",e=>{if(r(e))return void console.warn(`[instrumentation] ignored benign network error: ${e.message}`);throw e}),process.on("unhandledRejection",e=>{if(r(e))return void console.warn("[instrumentation] ignored benign network rejection");throw e}),e.s([],82438)}];
|
|
2
|
+
|
|
3
|
+
//# sourceMappingURL=instrumentation-node_ts_157o961d03nbm._.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../lib/sse-registry.ts","../../../instrumentation-node.ts"],"sourcesContent":["/**\n * Registry of open SSE streams, so shutdown can close them.\n *\n * `next start` drains in-flight requests before exiting. An SSE stream never\n * completes on its own, so without this the server hangs on SIGINT/SIGTERM\n * for as long as a browser tab is open. instrumentation-node.ts closes\n * everything registered here when a shutdown signal arrives.\n *\n * Keyed off `globalThis` rather than module scope: route handlers and\n * instrumentation can land in separate bundles, and a plain module-level Set\n * would then give each its own copy.\n */\ntype Closer = () => void;\n\nconst KEY = Symbol.for(\"beadscope.sse.openStreams\");\n\nfunction registry(): Set<Closer> {\n const g = globalThis as unknown as Record<symbol, Set<Closer> | undefined>;\n const existing = g[KEY];\n if (existing) return existing;\n const created = new Set<Closer>();\n g[KEY] = created;\n return created;\n}\n\n/** Register an open stream's close fn. Returns an unregister fn. */\nexport function registerSseStream(close: Closer): () => void {\n const r = registry();\n r.add(close);\n return () => {\n r.delete(close);\n };\n}\n\n/** Close every open stream. Returns how many were closed. */\nexport function closeAllSseStreams(): number {\n const r = registry();\n const closers = [...r];\n r.clear();\n for (const close of closers) {\n try {\n close();\n } catch {\n /* a stream torn down concurrently is fine */\n }\n }\n return closers.length;\n}\n","/**\n * Node-only server hardening (imported by instrumentation.ts under the Node\n * runtime). Top-level side effects install the handlers on import.\n *\n * The SSE change stream (app/api/p/[projectId]/beads/stream) writes to a\n * long-lived socket. When a browser tab closes or reloads mid-write, the\n * runtime's flush to that dead socket can throw EPIPE/ECONNRESET *asynchronously*\n * — outside our try/catch — surfacing as an uncaughtException that takes down the\n * whole dev server. That crash made in-flight requests (e.g. saving a bead edit)\n * appear to silently fail. These are normal network teardowns, not app bugs, so\n * swallow exactly those and let every other error crash as usual.\n */\nimport { closeAllSseStreams } from \"./lib/sse-registry\";\n\n/**\n * `next start` drains in-flight requests on SIGINT/SIGTERM before exiting, and\n * the SSE stream above never completes on its own — so with a browser tab open\n * the server would wait forever and Ctrl+C would appear to do nothing. Close\n * the streams so the drain can finish. We deliberately don't call\n * process.exit(): Next's own handler still owns the actual shutdown.\n */\nlet closing = false;\nconst closeStreams = (sig: string) => {\n if (closing) return;\n closing = true;\n const n = closeAllSseStreams();\n if (n > 0) console.log(`[instrumentation] ${sig}: closed ${n} open SSE stream(s)`);\n};\nprocess.on(\"SIGINT\", () => closeStreams(\"SIGINT\"));\nprocess.on(\"SIGTERM\", () => closeStreams(\"SIGTERM\"));\n\nconst isBenignNetError = (e: unknown): boolean => {\n const code = (e as NodeJS.ErrnoException | undefined)?.code;\n return code === \"EPIPE\" || code === \"ECONNRESET\" || code === \"ERR_STREAM_DESTROYED\";\n};\n\nprocess.on(\"uncaughtException\", (err) => {\n if (isBenignNetError(err)) {\n console.warn(`[instrumentation] ignored benign network error: ${err.message}`);\n return;\n }\n // Not ours to swallow — re-throw to preserve Node's default crash behavior.\n throw err;\n});\n\nprocess.on(\"unhandledRejection\", (reason) => {\n if (isBenignNetError(reason)) {\n console.warn(\"[instrumentation] ignored benign network rejection\");\n return;\n }\n throw reason;\n});\n"],"names":["KEY","Symbol","for","registry","g","globalThis","existing","created","Set","registerSseStream","close","r","add","delete","closeAllSseStreams","closers","clear","length"],"mappings":"uCAcA,IAAMA,EAAMC,OAAOC,GAAG,CAAC,6BCOnB,EAAU,GACR,EAAe,AAAC,IACpB,GAAI,EAAS,OACb,GAAU,EACV,IAAM,EAAIS,ADUL,SAASG,EACd,IAAMH,EAAIR,AApBZ,SAASA,EACP,IAAMC,EAAIC,WACJC,EAAWF,CAAC,CAACJ,EAAI,CACvB,GAAIM,EAAU,OAAOA,EACrB,IAAMC,EAAU,IAAIC,IAEpB,OADAJ,CAAC,CAACJ,EAAI,CAAGO,EACFA,CACT,IAcQQ,EAAU,IAAIJ,EAAE,CAEtB,IAAK,IAAMD,KADXC,EAAEK,KAAK,GACaD,GAClB,GAAI,CACFL,CAFyB,EAG3B,CAAE,KAAM,CAER,CAEF,OAAOK,EAAQE,MAAM,AACvB,ICrBM,EAAI,GAAG,QAAQ,GAAG,CAAC,CAAC,kBAAkB,EAAE,EAAI,SAAS,EAAE,EAAE,mBAAmB,CAAC,CACnF,EACA,QAAQ,EAAE,CAAC,SAAU,IAAM,EAAa,WACxC,QAAQ,EAAE,CAAC,UAAW,IAAM,EAAa,YAEzC,IAAM,EAAmB,AAAC,IACxB,IAAM,EAAQ,GAAyC,KACvD,MAAgB,UAAT,GAA6B,eAAT,GAAkC,yBAAT,CACtD,EAEA,QAAQ,EAAE,CAAC,oBAAqB,AAAC,IAC/B,GAAI,EAAiB,GAAM,YACzB,QAAQ,IAAI,CAAC,CAAC,gDAAgD,EAAE,EAAI,OAAO,CAAA,CAAE,CAI/E,OAAM,CACR,GAEA,QAAQ,EAAE,CAAC,qBAAsB,AAAC,IAChC,GAAI,EAAiB,GAAS,YAC5B,QAAQ,IAAI,CAAC,qDAGf,OAAM,CACR"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
module.exports=[95100,e=>{"use strict";var t=e.i(5622);let n={open:"Open",in_progress:"In progress",blocked:"Blocked",deferred:"Deferred",closed:"Closed",pinned:"Pinned",hooked:"Hooked"},o=["Critical","High","Medium","Low","Backlog"],r=["#6d5ef0","#0ea5e9","#16a34a","#d97706","#db2777","#0891b2","#7c3aed"];e.s(["q",0,function(e){if(!e)return"#9aa0aa";let t=0;for(let n=0;n<e.length;n++)t=31*t+e.charCodeAt(n)>>>0;return r[t%r.length]},"P",0,function(e,t){return t.filter(t=>(t.dependencies??[]).some(t=>"parent-child"===t.type&&t.depends_on_id===e))},"s",0,function(e){return e?new Date(e).toLocaleDateString("en-US",{month:"short",day:"numeric"}):""},"u",0,function(e){if(!e)return"?";let t=e.split(/[-_ .]/).filter(Boolean);return t.length>=2?(t[0][0]+t[1][0]).toUpperCase():e.slice(0,2).toUpperCase()},"V",0,function(e,n){var o,r;return"blocked"===e.status||"open"===e.status&&(o=e,r=n,(o.dependencies??[]).filter(e=>"parent-child"!==e.type&&t.K.includes(e.type)&&(r.get(e.depends_on_id)?.status??"open")!=="closed").map(e=>e.depends_on_id)).length>0},"Y",0,function(e){let t=new Map;for(let n of e)t.set(n.id,n);return t},"v",0,function(e){return o[e]??String(e)},"L",0,function(e,t=new Date){if(!e)return"";let n=(t.getTime()-new Date(e).getTime())/1e3;return n<60?"just now":n<3600?`${Math.floor(n/60)}m ago`:n<86400?`${Math.floor(n/3600)}h ago`:n<2592e3?`${Math.floor(n/86400)}d ago`:`${Math.floor(n/2592e3)}mo ago`},"g",0,function(e){return n[e]??e},"H",0,function(e){return e.charAt(0).toUpperCase()+e.slice(1)}])}];
|
|
2
|
+
|
|
3
|
+
//# sourceMappingURL=lib_beads-view_ts_1fvxcrevh9zu_._.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../lib/beads-view.ts"],"sourcesContent":["import type { Bead } from \"./schema\";\nimport { BLOCKING_DEP_TYPES } from \"./schema\";\n\n/**\n * Pure view-model helpers, ported from the Claude Design export prototype.\n * Framework-agnostic so they can run on the server and the client.\n */\n\n/**\n * A bead needs a human decision when it carries the `human` label (set by\n * `bd human`) and is still actionable (not closed or deferred). Drives the\n * \"Needs You\" inbox and its sidebar count badge.\n */\nexport function needsHuman(b: Bead): boolean {\n return (b.labels ?? []).includes(\"human\") && b.status !== \"closed\" && b.status !== \"deferred\";\n}\n\n/**\n * A human-approval gate: an `issue_type === \"gate\"` bead created by\n * `bd gate create --type human`. Unlike `bd human` (a label on a normal bead),\n * a gate is its own bead whose sub-type lives in `await_type`, so it never\n * carries the `human` label and `needsHuman()` misses it.\n */\nexport function isHumanGate(b: Bead): boolean {\n return b.issue_type === \"gate\" && b.await_type === \"human\";\n}\n\n/**\n * A human-approval gate that is unresolved and not itself blocked — its own\n * blockers (if any) are all closed, so a person can approve/resolve it now.\n * These belong on the \"Needs You\" inbox alongside `needsHuman()` beads\n * (bead 8qc / gh-6). Resolving = closing the gate, which unblocks its dependents.\n */\nexport function readyHumanGate(b: Bead, index: Map<string, Bead>): boolean {\n return isHumanGate(b) && b.status !== \"closed\" && !isBlocked(b, index);\n}\n\n/** Beads that this gate blocks (they depend on it via a blocking dep). */\nexport function gateBlocks(gateId: string, beads: Bead[]): Bead[] {\n return beads.filter((b) =>\n (b.dependencies ?? []).some((d) => d.depends_on_id === gateId && BLOCKING_DEP_TYPES.includes(d.type as never)),\n );\n}\n\n/**\n * GFM task-list (\"- [ ]\" / \"- [x]\") helpers. Checklists live in the bead\n * description text itself (zero new schema), so toggling rewrites the markdown.\n */\nconst TASK_RE = /^(\\s*(?:[-*+]|\\d+\\.)\\s+)\\[([ xX])\\]/gm;\n\nexport function checklistProgress(text?: string | null): { done: number; total: number } {\n if (!text) return { done: 0, total: 0 };\n const re = new RegExp(TASK_RE);\n let done = 0;\n let total = 0;\n let m: RegExpExecArray | null;\n while ((m = re.exec(text)) !== null) {\n total++;\n if (m[2].toLowerCase() === \"x\") done++;\n }\n return { done, total };\n}\n\n/** Flip the Nth task checkbox (0-based, document order) and return the new text. */\nexport function toggleTask(text: string, index: number): string {\n let i = 0;\n return text.replace(TASK_RE, (full, prefix: string, mark: string) => {\n if (i++ !== index) return full;\n return `${prefix}[${mark.toLowerCase() === \"x\" ? \" \" : \"x\"}]`;\n });\n}\n\n/**\n * `bd close` with no `--reason` still records a reason: the literal \"Closed\".\n * That placeholder carries no information, so treat it as absent rather than\n * rendering a \"Close reason\" section that just says \"Closed\".\n */\nexport function closeReasonOf(b: Bead): string {\n const reason = b.close_reason?.trim() ?? \"\";\n return reason.toLowerCase() === \"closed\" ? \"\" : reason;\n}\n\nexport type StatusCategory = \"done\" | \"wip\" | \"blocked\" | \"frozen\" | \"active\";\n\nexport function category(status: string): StatusCategory {\n if (status === \"closed\") return \"done\";\n if (status === \"in_progress\" || status === \"hooked\") return \"wip\";\n if (status === \"blocked\") return \"blocked\";\n if (status === \"deferred\" || status === \"pinned\") return \"frozen\";\n return \"active\";\n}\n\nconst CAT_COLORS: Record<StatusCategory, string> = {\n done: \"#16a34a\",\n wip: \"#d97706\",\n blocked: \"#ef4444\",\n frozen: \"#64748b\",\n active: \"#3b82f6\",\n};\nexport function catColor(status: string): string {\n return CAT_COLORS[category(status)];\n}\n\nconst STATUS_LABELS: Record<string, string> = {\n open: \"Open\",\n in_progress: \"In progress\",\n blocked: \"Blocked\",\n deferred: \"Deferred\",\n closed: \"Closed\",\n pinned: \"Pinned\",\n hooked: \"Hooked\",\n};\nexport function statusLabel(status: string): string {\n return STATUS_LABELS[status] ?? status;\n}\n\nconst PRIO_COLORS = [\"#ef4444\", \"#f97316\", \"#eab308\", \"#0ea5e9\", \"#64748b\"];\nconst PRIO_LABELS = [\"Critical\", \"High\", \"Medium\", \"Low\", \"Backlog\"];\nexport function prioColor(p: number): string {\n return PRIO_COLORS[p] ?? \"#64748b\";\n}\nexport function prioLabel(p: number): string {\n return PRIO_LABELS[p] ?? String(p);\n}\n\nexport function typeColor(t: string): string {\n if (t === \"epic\") return \"var(--brand)\";\n if (t === \"bug\") return \"#ef4444\";\n return \"var(--text-3)\";\n}\nexport function typeLabel(t: string): string {\n return t.charAt(0).toUpperCase() + t.slice(1);\n}\n\nconst AVATARS = [\n \"#6d5ef0\",\n \"#0ea5e9\",\n \"#16a34a\",\n \"#d97706\",\n \"#db2777\",\n \"#0891b2\",\n \"#7c3aed\",\n];\nexport function avatarColor(name: string): string {\n if (!name) return \"#9aa0aa\";\n let h = 0;\n for (let i = 0; i < name.length; i++) h = (h * 31 + name.charCodeAt(i)) >>> 0;\n return AVATARS[h % AVATARS.length];\n}\nexport function initials(name: string): string {\n if (!name) return \"?\";\n const parts = name.split(/[-_ .]/).filter(Boolean);\n if (parts.length >= 2) return (parts[0][0] + parts[1][0]).toUpperCase();\n return name.slice(0, 2).toUpperCase();\n}\n\n// ---- relationship helpers (need the full bead set for lookups) ----\n\nexport function makeIndex(beads: Bead[]): Map<string, Bead> {\n const m = new Map<string, Bead>();\n for (const b of beads) m.set(b.id, b);\n return m;\n}\n\nexport function isBlocked(b: Bead, index: Map<string, Bead>): boolean {\n if (b.status === \"blocked\") return true;\n if (b.status !== \"open\") return false;\n return blockingDeps(b, index).length > 0;\n}\n\n/**\n * The unresolved things actually holding this bead up — for naming blockers on a\n * card, so it must not name something the user doesn't experience as a blocker.\n *\n * `parent-child` is excluded even though bd counts it in BLOCKING_DEP_TYPES for\n * ready-queue purposes: the edge points from a child to its epic, so including\n * it makes every blocked child report its own parent epic alongside the real\n * blocker (\"blocked by <the epic it lives in>\"), which is noise at best and\n * misdirection at worst. Hierarchy is shown as hierarchy elsewhere.\n *\n * Shared by isBlocked so the badge, Focus column, and blocker names agree.\n */\nexport function blockingDeps(b: Bead, index: Map<string, Bead>): string[] {\n return (b.dependencies ?? [])\n .filter(\n (d) =>\n d.type !== \"parent-child\" &&\n BLOCKING_DEP_TYPES.includes(d.type as never) &&\n (index.get(d.depends_on_id)?.status ?? \"open\") !== \"closed\",\n )\n .map((d) => d.depends_on_id);\n}\n\n/**\n * The bead's parent, whatever its type. Resolved from the parent-child\n * dependency EDGE — never `bead.parent`, which `bd export --json` omits, so an\n * edge lookup is the only one correct on board/list data as well as in the\n * drawer.\n *\n * Replaces the former `epicOf`, which returned the same thing but was named as\n * though the parent were always an epic — so a task-parented bead rendered a\n * chip labelled \"epic\" and clicked through to the Epics screen, which renders\n * epics only. Callers now branch on `parent.issue_type` themselves.\n */\nexport function parentOf(b: Bead, index: Map<string, Bead>): Bead | null {\n const d = (b.dependencies ?? []).find((x) => x.type === \"parent-child\");\n return d ? index.get(d.depends_on_id) ?? null : null;\n}\n\n/**\n * Children per parent id, built in ONE pass over all beads. Callers render\n * per-card counts from this rather than calling childrenOf() per card, which\n * would be an O(n²) scan on a large board.\n */\nexport function childrenCountMap(beads: Bead[]): Map<string, number> {\n const m = new Map<string, number>();\n for (const b of beads) {\n for (const d of b.dependencies ?? []) {\n if (d.type === \"parent-child\") m.set(d.depends_on_id, (m.get(d.depends_on_id) ?? 0) + 1);\n }\n }\n return m;\n}\n\nexport function childrenOf(epicId: string, beads: Bead[]): Bead[] {\n return beads.filter((b) =>\n (b.dependencies ?? []).some(\n (d) => d.type === \"parent-child\" && d.depends_on_id === epicId,\n ),\n );\n}\n\nexport function epicProgress(\n epicId: string,\n beads: Bead[],\n): { closed: number; total: number; pct: number } {\n const kids = childrenOf(epicId, beads);\n const total = kids.length;\n const closed = kids.filter((k) => k.status === \"closed\").length;\n return { closed, total, pct: total ? Math.round((closed / total) * 100) : 0 };\n}\n\n// ---- relative time ----\n\nexport function relTime(iso?: string | null, now: Date = new Date()): string {\n if (!iso) return \"\";\n const d = (now.getTime() - new Date(iso).getTime()) / 1000;\n if (d < 60) return \"just now\";\n if (d < 3600) return `${Math.floor(d / 60)}m ago`;\n if (d < 86400) return `${Math.floor(d / 3600)}h ago`;\n if (d < 2592000) return `${Math.floor(d / 86400)}d ago`;\n return `${Math.floor(d / 2592000)}mo ago`;\n}\n\nexport function fmtDate(iso?: string | null): string {\n if (!iso) return \"\";\n return new Date(iso).toLocaleDateString(\"en-US\", {\n month: \"short\",\n day: \"numeric\",\n });\n}\n\n/** Full absolute timestamp, e.g. \"Jun 24, 2026, 2:15 PM\" — used as the hover\n * title behind relative times like \"3d ago\" (bead hl2). */\nexport function fmtDateTime(iso?: string | null): string {\n if (!iso) return \"\";\n const d = new Date(iso);\n if (Number.isNaN(d.getTime())) return \"\";\n return d.toLocaleString(\"en-US\", {\n month: \"short\",\n day: \"numeric\",\n year: \"numeric\",\n hour: \"numeric\",\n minute: \"2-digit\",\n });\n}\n"],"names":["needsHuman","b","labels","includes","status","isHumanGate","issue_type","await_type","readyHumanGate","index","isBlocked","gateBlocks","gateId","beads","filter","dependencies","some","d","depends_on_id","type","TASK_RE","checklistProgress","text","done","total","re","RegExp","m","exec","toLowerCase","toggleTask","i","replace","full","prefix","mark","closeReasonOf","reason","close_reason","trim","category","CAT_COLORS","wip","blocked","frozen","active","catColor","STATUS_LABELS","open","in_progress","deferred","closed","pinned","hooked","statusLabel","PRIO_COLORS","PRIO_LABELS","prioColor","p","prioLabel","String","typeColor","t","typeLabel","charAt","toUpperCase","slice","AVATARS","avatarColor","name","h","length","charCodeAt","initials","parts","split","Boolean","makeIndex","Map","set","id","blockingDeps","get","map","parentOf","find","x","childrenCountMap","childrenOf","epicId","epicProgress","kids","k","pct","Math","round","relTime","iso","now","Date","getTime","floor","fmtDate","toLocaleDateString","month","day","fmtDateTime","Number","isNaN","toLocaleString","year","hour","minute"],"mappings":"uCACA,IAAA,EAAA,EAAA,CAAA,CAAA,MAsGA,IAAM+C,EAAwC,CAC5CC,KAAM,OACNC,YAAa,cACbN,QAAS,UACTO,SAAU,WACVC,OAAQ,SACRC,OAAQ,SACRC,OAAQ,QACV,EAMMG,EAAc,CAAC,WAAY,OAAQ,SAAU,MAAO,UAAU,CAiB9DW,EAAU,CACd,UACA,UACA,UACA,UACA,UACA,UACA,UACD,YACM,SAASC,AAAYC,CAAY,EACtC,GAAI,CAACA,EAAM,MAAO,UAClB,IAAIC,EAAI,EACR,IAAK,IAAIvC,EAAI,EAAGA,EAAIsC,EAAKE,MAAM,CAAExC,IAAKuC,EAAS,GAAJA,EAASD,EAAKG,UAAU,CAACzC,KAAQ,EAC5E,OAAOoC,CAAO,CAACG,EAAIH,EAAQI,MAAM,CAAC,AACpC,QA4EO,SAASiB,AAAWC,CAAc,CAAE5E,CAAa,EACtD,OAAOA,EAAMC,MAAM,CAAC,AAACb,GACnB,AAACA,GAAEc,YAAY,EAAI,EAAA,AAAE,EAAEC,IAAI,CACzB,AAACC,GAAMA,AAAW,mBAATE,IAAI,EAAuBF,EAAEC,aAAa,GAAKuE,GAG9D,QA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jE,GAAI,CAACF,EAAK,MAAO,GACjB,IAAMhF,EAAI,CAACiF,EAAIE,OAAO,GAAK,IAAID,KAAKF,GAAKG,OAAO,EAAA,CAAE,CAAI,WACtD,AAAInF,EAAI,GAAW,CAAP,UACRA,EAAI,KAAa,CAAP,AAAO,EAAG6E,KAAKO,KAAK,CAACpF,EAAI,IAAI,KAAK,CAAC,CAC7CA,EAAI,MAAc,CAAP,AAAO,EAAG6E,KAAKO,KAAK,CAACpF,EAAI,MAAM,KAAK,CAAC,CAChDA,EAAI,OAAgB,CAAA,CAAP,CAAU6E,KAAKO,KAAK,CAACpF,EAAI,OAAO,KAAK,CAAC,CAChD,CAAA,EAAG6E,KAAKO,KAAK,CAACpF,EAAI,QAAS,MAAM,CAAC,AAC3C,QA5IO,SAASqC,AAAYlD,CAAc,EACxC,OAAO2C,CAAa,CAAC3C,EAAO,EAAIA,CAClC,QAgBO,SAAS2D,AAAUD,CAAS,EACjC,OAAOA,EAAEE,MAAM,CAAC,GAAGC,WAAW,GAAKH,EAAEI,KAAK,CAAC,EAC7C"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
module.exports=[72507,e=>{"use strict";var t=e.i(2157),r=e.i(50227),n=e.i(60526),o=e.i(74533);let a={id:"demo",name:"Demo",path:null};class i extends Error{code;constructor(e,t){super(e),this.name="ConfigError",this.code=t}}let u="beadscope-viewer-mode";function l(){let e=process.env.XDG_CONFIG_HOME||r.default.join(n.default.homedir(),".config");return r.default.join(e,"beadscope")}function s(){return r.default.join(l(),"config.json")}function c(){try{return n.default.userInfo().username||"you"}catch{return"you"}}function d(e){try{return t.default.existsSync(r.default.join(e,".beads"))}catch{return!1}}function f(e){try{return t.default.realpathSync(e)}catch{return r.default.resolve(e)}}function p(e,t){let n=r.default.resolve(e),o=new Date().toISOString();return{id:function(e,t){let n=r.default.basename(e).toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")||"project",o=n;for(;t.has(o)||o===a.id;)o=`${n}-${Math.random().toString(36).slice(2,6)}`;return o}(n,t),name:r.default.basename(n)||n,path:n,addedAt:o,lastOpened:o}}let h=null;function m(e){h=e;try{t.default.mkdirSync(l(),{recursive:!0});let r={};try{r=JSON.parse(t.default.readFileSync(s(),"utf8"))}catch{r={}}let n={...r,...e};t.default.writeFileSync(s(),JSON.stringify(n,null,2),"utf8")}catch{}}function A(){let e;if(h)return h;let n={humanActor:e=process.env.BEADS_ACTOR||function(){try{return(0,o.execFileSync)("git",["config","--get","user.name"],{cwd:process.cwd(),encoding:"utf8",timeout:2e3,stdio:["ignore","pipe","ignore"]}).trim()||null}catch{return null}}()||c(),humanAllowlist:[e],pollIntervalMs:3e4,projects:[],orders:{},gamification:!1},i=null;try{i=JSON.parse(t.default.readFileSync(s(),"utf8"))}catch{i=null}let u=!i?.humanActorChosen&&i?.humanActor===c()&&n.humanActor!==i.humanActor,l=i?.humanAllowlist&&i.humanAllowlist.length?i.humanAllowlist:null,A={humanActor:u?n.humanActor:i?.humanActor||n.humanActor,humanAllowlist:l?u&&!l.includes(n.humanActor)?[...l,n.humanActor]:l:n.humanAllowlist,pollIntervalMs:"number"==typeof i?.pollIntervalMs?i.pollIntervalMs:n.pollIntervalMs,projects:function(e){if(!Array.isArray(e))return[];let t=[],n=new Set;for(let o of e){if(o&&"object"==typeof o)"string"==typeof o.id&&"string"==typeof o.path&&(o.id===a.id||n.has(o.id)||(n.add(o.id),t.push({id:o.id,path:o.path,name:"string"==typeof o.name&&o.name?o.name:r.default.basename(o.path)||o.path,addedAt:"string"==typeof o.addedAt?o.addedAt:new Date().toISOString(),lastOpened:"string"==typeof o.lastOpened?o.lastOpened:new Date().toISOString()})))}return t}(i?.projects),orders:i?.orders&&"object"==typeof i.orders&&!Array.isArray(i.orders)?i.orders:{},gamification:"boolean"==typeof i?.gamification?i.gamification:n.gamification,humanActorChosen:i?.humanActorChosen===!0},g=!1;if(!i||void 0===i.projects){let e=i?.repoPath||process.env.BEADS_REPO||process.cwd();e&&d(e)&&!A.projects.some(t=>{var r;return r=t.path,f(r)===f(e)})&&(A.projects.push(p(e,new Set(A.projects.map(e=>e.id)))),g=!0)}return h=A,g&&m(A),h}e.s(["b",0,i,"U",0,a,"a",0,u,"X",0,function(e){let t=A(),n=r.default.resolve(e);if(!d(n))throw new i(`No .beads directory found in ${n}`,"no_beads");let o=t.projects.find(e=>{var t;return t=e.path,f(t)===f(n)});if(o)return o.lastOpened=new Date().toISOString(),m(t),o;let a=p(n,new Set(t.projects.map(e=>e.id)));return t.projects.push(a),m(t),a},"T",0,function(e){let{humanActor:t}=A();return e&&e!==t&&e===c()?e:t},"M",0,l,"d",0,function(e){return A().orders[e]??{}},"L",0,A,"e",0,function(e){return e===a.id?a:A().projects.find(t=>t.id===e)},"g",0,function(e){let t=e?.headers.get("cookie")?.split(";").map(e=>e.trim()).find(e=>e.startsWith(`${u}=`))?.slice(u.length+1);if("read-only"===t)return!0;if("editing"===t)return!1;let r=process.env.BEADSCOPE_READ_ONLY;return"1"===r||"true"===r},"A",0,function(){return process.env.BEADSCOPE_LANE_PREFIX||null},"W",0,function(){return A().projects},"s",0,function(e){let t=A();if(t.projects=t.projects.filter(t=>t.id!==e),t.orders[e]){let r={...t.orders};delete r[e],t.orders=r}m(t)},"Z",0,function(e,t){let r=A(),n=r.projects.find(t=>t.id===e);if(n)return n.name=t,m(r),n},"F",0,function(e){let t={...A(),...e};return void 0!==e.humanActor&&(t.humanActorChosen=!0),m(t),t},"v",0,function(e,t,r){let n=A(),o={...n.orders[e]??{}};return o[t]=r,n.orders={...n.orders,[e]:o},m(n),o},"$",0,function(e){let t=A(),r=t.projects.find(t=>t.id===e);r&&(r.lastOpened=new Date().toISOString(),m(t))}])}];
|
|
2
|
+
|
|
3
|
+
//# sourceMappingURL=lib_config_ts_0zrjxh_mm8sv8._.js.map
|