@shipit-ai/cli 1.166.1 → 1.166.2
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/dist/packages/core/src/application/use-cases/features/create/create-feature.use-case.d.ts.map +1 -1
- package/dist/packages/core/src/application/use-cases/features/create/create-feature.use-case.js +19 -2
- package/dist/packages/core/src/infrastructure/services/external/github-repository.service.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/services/external/github-repository.service.js +14 -3
- package/dist/src/presentation/web/app/actions/deploy-repository.d.ts.map +1 -1
- package/dist/src/presentation/web/app/actions/deploy-repository.js +14 -7
- package/dist/src/presentation/web/app/actions/get-merge-review-data.d.ts.map +1 -1
- package/dist/src/presentation/web/app/actions/get-merge-review-data.js +66 -23
- package/dist/src/presentation/web/app/actions/open-folder.d.ts.map +1 -1
- package/dist/src/presentation/web/app/actions/open-folder.js +12 -4
- package/dist/src/presentation/web/app/actions/open-shell.d.ts.map +1 -1
- package/dist/src/presentation/web/app/actions/open-shell.js +46 -7
- package/dist/src/presentation/web/app/api/agent-events/route.d.ts.map +1 -1
- package/dist/src/presentation/web/app/api/agent-events/route.js +2 -6
- package/dist/src/presentation/web/app/api/attachments/upload-from-path/route.d.ts.map +1 -1
- package/dist/src/presentation/web/app/api/attachments/upload-from-path/route.js +21 -17
- package/dist/src/presentation/web/app/api/deployment-logs/route.d.ts.map +1 -1
- package/dist/src/presentation/web/app/api/deployment-logs/route.js +2 -6
- package/dist/src/presentation/web/app/api/directory/list/route.d.ts.map +1 -1
- package/dist/src/presentation/web/app/api/directory/list/route.js +39 -24
- package/dist/src/presentation/web/app/api/interactive/chat/[featureId]/stream/route.d.ts.map +1 -1
- package/dist/src/presentation/web/app/api/interactive/chat/[featureId]/stream/route.js +2 -6
- package/dist/src/presentation/web/app/api/interactive/sessions/[id]/stream/route.d.ts.map +1 -1
- package/dist/src/presentation/web/app/api/interactive/sessions/[id]/stream/route.js +2 -6
- package/dist/src/presentation/web/lib/path-sanitizers.d.ts +50 -0
- package/dist/src/presentation/web/lib/path-sanitizers.d.ts.map +1 -0
- package/dist/src/presentation/web/lib/path-sanitizers.js +136 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +6 -6
- package/web/.next/BUILD_ID +1 -1
- package/web/.next/build-manifest.json +3 -3
- package/web/.next/fallback-build-manifest.json +3 -3
- package/web/.next/prerender-manifest.json +3 -3
- package/web/.next/required-server-files.js +2 -2
- package/web/.next/required-server-files.json +2 -2
- package/web/.next/server/app/(dashboard)/@drawer/adopt/page/server-reference-manifest.json +29 -29
- package/web/.next/server/app/(dashboard)/@drawer/adopt/page.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/adopt/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/adopt/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/chat/page/server-reference-manifest.json +27 -27
- package/web/.next/server/app/(dashboard)/@drawer/chat/page.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/chat/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/chat/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/create/page/server-reference-manifest.json +30 -30
- package/web/.next/server/app/(dashboard)/@drawer/create/page.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/create/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/create/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page/server-reference-manifest.json +37 -37
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page.js +3 -2
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page/server-reference-manifest.json +37 -37
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page.js +3 -2
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page/server-reference-manifest.json +28 -28
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page/server-reference-manifest.json +28 -28
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/chat/page/server-reference-manifest.json +27 -27
- package/web/.next/server/app/(dashboard)/chat/page.js +1 -1
- package/web/.next/server/app/(dashboard)/chat/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/chat/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/create/page/server-reference-manifest.json +30 -30
- package/web/.next/server/app/(dashboard)/create/page.js +1 -1
- package/web/.next/server/app/(dashboard)/create/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/create/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page/server-reference-manifest.json +37 -37
- package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page.js +3 -2
- package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/feature/[featureId]/page/server-reference-manifest.json +37 -37
- package/web/.next/server/app/(dashboard)/feature/[featureId]/page.js +3 -2
- package/web/.next/server/app/(dashboard)/feature/[featureId]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/feature/[featureId]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/page/server-reference-manifest.json +27 -27
- package/web/.next/server/app/(dashboard)/page.js +1 -1
- package/web/.next/server/app/(dashboard)/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page/server-reference-manifest.json +28 -28
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page.js +1 -1
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page/server-reference-manifest.json +28 -28
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page.js +1 -1
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/_global-error.html +1 -1
- package/web/.next/server/app/_global-error.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/web/.next/server/app/_not-found/page/server-reference-manifest.json +6 -6
- package/web/.next/server/app/_not-found/page.js +1 -1
- package/web/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/api/agent-events/route.js +2 -1
- package/web/.next/server/app/api/agent-events/route.js.nft.json +1 -1
- package/web/.next/server/app/api/attachments/preview/route.js +1 -1
- package/web/.next/server/app/api/attachments/preview/route.js.nft.json +1 -1
- package/web/.next/server/app/api/attachments/upload-from-path/route.js +1 -1
- package/web/.next/server/app/api/attachments/upload-from-path/route.js.nft.json +1 -1
- package/web/.next/server/app/api/deployment-logs/route.js +2 -1
- package/web/.next/server/app/api/deployment-logs/route.js.nft.json +1 -1
- package/web/.next/server/app/api/dialog/pick-files/route.js +1 -1
- package/web/.next/server/app/api/dialog/pick-files/route.js.nft.json +1 -1
- package/web/.next/server/app/api/directory/list/route.js +1 -1
- package/web/.next/server/app/api/directory/list/route.js.nft.json +1 -1
- package/web/.next/server/app/api/evidence/route.js +1 -1
- package/web/.next/server/app/api/evidence/route.js.nft.json +1 -1
- package/web/.next/server/app/api/graph-data/route.js +1 -1
- package/web/.next/server/app/api/graph-data/route.js.nft.json +1 -1
- package/web/.next/server/app/api/interactive/chat/[featureId]/messages/route.js +1 -1
- package/web/.next/server/app/api/interactive/chat/[featureId]/messages/route.js.nft.json +1 -1
- package/web/.next/server/app/api/interactive/chat/[featureId]/stream/route.js +2 -1
- package/web/.next/server/app/api/interactive/chat/[featureId]/stream/route.js.nft.json +1 -1
- package/web/.next/server/app/api/interactive/sessions/[id]/stream/route.js +2 -1
- package/web/.next/server/app/api/interactive/sessions/[id]/stream/route.js.nft.json +1 -1
- package/web/.next/server/app/api/sessions-batch/route.js +1 -1
- package/web/.next/server/app/api/sessions-batch/route.js.nft.json +1 -1
- package/web/.next/server/app/settings/page/server-reference-manifest.json +11 -11
- package/web/.next/server/app/settings/page.js +1 -1
- package/web/.next/server/app/settings/page.js.nft.json +1 -1
- package/web/.next/server/app/settings/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/skills/page/server-reference-manifest.json +11 -11
- package/web/.next/server/app/skills/page.js +1 -1
- package/web/.next/server/app/skills/page.js.nft.json +1 -1
- package/web/.next/server/app/skills/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/tools/page/server-reference-manifest.json +11 -11
- package/web/.next/server/app/tools/page.js +1 -1
- package/web/.next/server/app/tools/page.js.nft.json +1 -1
- package/web/.next/server/app/tools/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/version/page/server-reference-manifest.json +6 -6
- package/web/.next/server/app/version/page.js +1 -1
- package/web/.next/server/app/version/page.js.nft.json +1 -1
- package/web/.next/server/app/version/page_client-reference-manifest.js +1 -1
- package/web/.next/server/chunks/{[root-of-the-server]__02xmnal._.js → [root-of-the-server]__08cpfre._.js} +2 -2
- package/web/.next/server/chunks/[root-of-the-server]__0_-chcy._.js +3 -0
- package/web/.next/server/chunks/[root-of-the-server]__0_-chcy._.js.map +1 -0
- package/web/.next/server/chunks/[root-of-the-server]__0aft8l4._.js +9 -0
- package/web/.next/server/chunks/{[root-of-the-server]__0_6fhza._.js.map → [root-of-the-server]__0aft8l4._.js.map} +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__0e9p7em._.js +3 -0
- package/web/.next/server/chunks/[root-of-the-server]__0e9p7em._.js.map +1 -0
- package/web/.next/server/chunks/{[root-of-the-server]__0.2exzi._.js → [root-of-the-server]__0gfvkg8._.js} +2 -2
- package/web/.next/server/chunks/{[root-of-the-server]__0ip_e1x._.js → [root-of-the-server]__0hcp97v._.js} +2 -2
- package/web/.next/server/chunks/{[root-of-the-server]__09118p2._.js → [root-of-the-server]__0iel39d._.js} +2 -2
- package/web/.next/server/chunks/[root-of-the-server]__0kc8ify._.js +12 -0
- package/web/.next/server/chunks/[root-of-the-server]__0kc8ify._.js.map +1 -0
- package/web/.next/server/chunks/[root-of-the-server]__0r5uk_8._.js +9 -0
- package/web/.next/server/chunks/[root-of-the-server]__0r5uk_8._.js.map +1 -0
- package/web/.next/server/chunks/[root-of-the-server]__0tb~wwk._.js +1 -1
- package/web/.next/server/chunks/{[root-of-the-server]__04jjtl_._.js → [root-of-the-server]__0u1jyv9._.js} +2 -2
- package/web/.next/server/chunks/{[root-of-the-server]__07suer1._.js → [root-of-the-server]__0zu_byw._.js} +2 -2
- package/web/.next/server/chunks/[root-of-the-server]__13e2_kk._.js +18 -0
- package/web/.next/server/chunks/[root-of-the-server]__13e2_kk._.js.map +1 -0
- package/web/.next/server/chunks/ssr/0j.8_web__next-internal_server_app_(dashboard)_@drawer_adopt_page_actions_00~eq5i.js +1 -1
- package/web/.next/server/chunks/ssr/0j.8_web__next-internal_server_app_(dashboard)_@drawer_adopt_page_actions_00~eq5i.js.map +1 -1
- package/web/.next/server/chunks/ssr/0j.8_web__next-internal_server_app_(dashboard)_@drawer_chat_page_actions_0979_c..js +1 -1
- package/web/.next/server/chunks/ssr/0j.8_web__next-internal_server_app_(dashboard)_@drawer_chat_page_actions_0979_c..js.map +1 -1
- package/web/.next/server/chunks/ssr/0j.8_web__next-internal_server_app_(dashboard)_chat_page_actions_0dqll_1.js +1 -1
- package/web/.next/server/chunks/ssr/0j.8_web__next-internal_server_app_(dashboard)_chat_page_actions_0dqll_1.js.map +1 -1
- package/web/.next/server/chunks/ssr/0j.8_web_components_common_control-center-drawer_create-drawer-client_tsx_0g70fc5._.js +1 -1
- package/web/.next/server/chunks/ssr/0j.8_web_components_common_control-center-drawer_create-drawer-client_tsx_0g70fc5._.js.map +1 -1
- package/web/.next/server/chunks/ssr/0j.8_web_components_common_control-center-drawer_feature-drawer-client_tsx_104cna.._.js +2 -2
- package/web/.next/server/chunks/ssr/0j.8_web_components_common_control-center-drawer_feature-drawer-client_tsx_104cna.._.js.map +1 -1
- package/web/.next/server/chunks/ssr/0ukq_presentation_web_components_features_settings_settings-page-client_tsx_0j1uius._.js +1 -1
- package/web/.next/server/chunks/ssr/0ukq_presentation_web_components_features_settings_settings-page-client_tsx_0j1uius._.js.map +1 -1
- package/web/.next/server/chunks/ssr/11y9_components_common_control-center-drawer_repository-drawer-client_tsx_09z.znp._.js +1 -1
- package/web/.next/server/chunks/ssr/11y9_components_common_control-center-drawer_repository-drawer-client_tsx_09z.znp._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__04nnbmc._.js +3 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__04nnbmc._.js.map +1 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__07740t6._.js +3 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__07740t6._.js.map +1 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__0l~puw4._.js +3 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__0l~puw4._.js.map +1 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__0o3qggc._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__0o3qggc._.js.map +1 -1
- package/web/.next/server/chunks/ssr/{[root-of-the-server]__0qh.wn.._.js → [root-of-the-server]__0q3-gz.._.js} +2 -2
- package/web/.next/server/chunks/ssr/[root-of-the-server]__0rv1gci._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__0vwjc_m._.js +3 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__0vwjc_m._.js.map +1 -0
- package/web/.next/server/chunks/ssr/{[root-of-the-server]__12g8h3_._.js → [root-of-the-server]__0w4__yd._.js} +3 -3
- package/web/.next/server/chunks/ssr/_01mq~sm._.js +1 -1
- package/web/.next/server/chunks/ssr/_01mq~sm._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_01sesw0._.js +1 -1
- package/web/.next/server/chunks/ssr/_01sesw0._.js.map +1 -1
- package/web/.next/server/chunks/ssr/{_0e4npv~._.js → _04rrcmm._.js} +2 -2
- package/web/.next/server/chunks/ssr/{_0e4npv~._.js.map → _04rrcmm._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/{_0nvrqsj._.js → _0c497sr._.js} +2 -2
- package/web/.next/server/chunks/ssr/{_0nvrqsj._.js.map → _0c497sr._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/{_0a-ddx-._.js → _0c741v_._.js} +2 -2
- package/web/.next/server/chunks/ssr/{_0a-ddx-._.js.map → _0c741v_._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/_0jpbsh_._.js +1 -1
- package/web/.next/server/chunks/ssr/_0jpbsh_._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_0vyfc4b._.js +1 -1
- package/web/.next/server/chunks/ssr/_0vyfc4b._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_0w-_hww._.js +1 -1
- package/web/.next/server/chunks/ssr/_0w-_hww._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_0~7lwu_._.js +1 -1
- package/web/.next/server/chunks/ssr/_0~7lwu_._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_109n-y4._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_0.e4~xc._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_0.e4~xc._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_00dvh.m._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_00dvh.m._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_06b6~lt._.js +2 -2
- package/web/.next/server/chunks/ssr/src_presentation_web_06b6~lt._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_08fy2mf._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_08fy2mf._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_0f~udu1._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_0f~udu1._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_0qys821._.js +2 -2
- package/web/.next/server/chunks/ssr/src_presentation_web_0qys821._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_0q~dt0o._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_0q~dt0o._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_11jrkxt._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_11jrkxt._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_1199d3x.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_1199d3x.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app__not-found_page_actions_0m2jqxx.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app__not-found_page_actions_0m2jqxx.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_version_page_actions_0krkh_0.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_version_page_actions_0krkh_0.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_app_actions_approve-feature_ts_0pjb_re._.js +3 -0
- package/web/.next/server/chunks/ssr/src_presentation_web_app_actions_approve-feature_ts_0pjb_re._.js.map +1 -0
- package/web/.next/server/chunks/ssr/src_presentation_web_app_actions_load-settings_ts_0b8f3pf._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_app_actions_open-ide_ts_0w2wqvu._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_app_actions_open-ide_ts_0w2wqvu._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_0l3oxx9._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_0l3oxx9._.js.map +1 -1
- package/web/.next/server/middleware-build-manifest.js +3 -3
- package/web/.next/server/pages/500.html +1 -1
- package/web/.next/server/server-reference-manifest.js +1 -1
- package/web/.next/server/server-reference-manifest.json +49 -49
- package/web/.next/static/chunks/{0t.pzrmeoq6th.js → 0-fy~80ui.5os.js} +1 -1
- package/web/.next/static/chunks/{00dg6gti40.3i.js → 039ic1ygq-to3.js} +1 -1
- package/web/.next/static/chunks/{0ntgq3d_.m5el.js → 04xk1iouwcfcq.js} +3 -3
- package/web/.next/static/chunks/{0njrgvmyafrod.js → 07a4jt64wdipb.js} +1 -1
- package/web/.next/static/chunks/{14g1l3~6i5251.js → 07gx-h_y91lay.js} +1 -1
- package/web/.next/static/chunks/{0ist7260j__0m.js → 0_imq4rg3q.fe.js} +2 -2
- package/web/.next/static/chunks/{09dqgshddfxff.js → 0c_bi0dck80dt.js} +1 -1
- package/web/.next/static/chunks/{0awttldb-.7m..js → 0ex35-_jtxyjc.js} +1 -1
- package/web/.next/static/chunks/{0_c5~n__lz4ks.js → 0i084mozx131g.js} +1 -1
- package/web/.next/static/chunks/{0_--5mgqukm__.js → 0k~55i.ofbdeb.js} +1 -1
- package/web/.next/static/chunks/{0t8zwgaz.d1s5.js → 0oq-cvtg8rjjp.js} +1 -1
- package/web/.next/static/chunks/{0d-2jp.f._l2e.js → 0t_6hx6ul7umb.js} +1 -1
- package/web/.next/static/chunks/{0nk2r-18.7g6r.js → 0whez3wju~9ok.js} +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__0-3b27b._.js +0 -9
- package/web/.next/server/chunks/[root-of-the-server]__0-3b27b._.js.map +0 -1
- package/web/.next/server/chunks/[root-of-the-server]__0_6fhza._.js +0 -9
- package/web/.next/server/chunks/[root-of-the-server]__0esdmru._.js +0 -12
- package/web/.next/server/chunks/[root-of-the-server]__0esdmru._.js.map +0 -1
- package/web/.next/server/chunks/[root-of-the-server]__0l1p8bx._.js +0 -3
- package/web/.next/server/chunks/[root-of-the-server]__0l1p8bx._.js.map +0 -1
- package/web/.next/server/chunks/[root-of-the-server]__0p~owgt._.js +0 -18
- package/web/.next/server/chunks/[root-of-the-server]__0p~owgt._.js.map +0 -1
- package/web/.next/server/chunks/[root-of-the-server]__0rru~m.._.js +0 -3
- package/web/.next/server/chunks/[root-of-the-server]__0rru~m.._.js.map +0 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__045sv4b._.js +0 -3
- package/web/.next/server/chunks/ssr/[root-of-the-server]__045sv4b._.js.map +0 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__0d_0_fp._.js +0 -3
- package/web/.next/server/chunks/ssr/[root-of-the-server]__0d_0_fp._.js.map +0 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__0l4d7e.._.js +0 -3
- package/web/.next/server/chunks/ssr/[root-of-the-server]__0l4d7e.._.js.map +0 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__0r32z03._.js +0 -3
- package/web/.next/server/chunks/ssr/[root-of-the-server]__0r32z03._.js.map +0 -1
- /package/web/.next/server/chunks/{[root-of-the-server]__02xmnal._.js.map → [root-of-the-server]__08cpfre._.js.map} +0 -0
- /package/web/.next/server/chunks/{[root-of-the-server]__0.2exzi._.js.map → [root-of-the-server]__0gfvkg8._.js.map} +0 -0
- /package/web/.next/server/chunks/{[root-of-the-server]__0ip_e1x._.js.map → [root-of-the-server]__0hcp97v._.js.map} +0 -0
- /package/web/.next/server/chunks/{[root-of-the-server]__09118p2._.js.map → [root-of-the-server]__0iel39d._.js.map} +0 -0
- /package/web/.next/server/chunks/{[root-of-the-server]__04jjtl_._.js.map → [root-of-the-server]__0u1jyv9._.js.map} +0 -0
- /package/web/.next/server/chunks/{[root-of-the-server]__07suer1._.js.map → [root-of-the-server]__0zu_byw._.js.map} +0 -0
- /package/web/.next/server/chunks/ssr/{[root-of-the-server]__0qh.wn.._.js.map → [root-of-the-server]__0q3-gz.._.js.map} +0 -0
- /package/web/.next/server/chunks/ssr/{[root-of-the-server]__12g8h3_._.js.map → [root-of-the-server]__0w4__yd._.js.map} +0 -0
- /package/web/.next/static/{ZpPnD_b687G9xVr2nzrds → ynyh_sSxbFA995FRvBUxs}/_buildManifest.js +0 -0
- /package/web/.next/static/{ZpPnD_b687G9xVr2nzrds → ynyh_sSxbFA995FRvBUxs}/_clientMiddlewareManifest.js +0 -0
- /package/web/.next/static/{ZpPnD_b687G9xVr2nzrds → ynyh_sSxbFA995FRvBUxs}/_ssgManifest.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../src/presentation/web/lib/server-container.ts","../../../../../../src/presentation/web/app/api/deployment-logs/route.ts","../../../../../../node_modules/.pnpm/next%4016.2.2_%40babel%2Bcore%407.29.0_%40playwright%2Btest%401.59.1_react-dom%4019.2.4_react%4019.2.4__react%4019.2.4/node_modules/next/dist/esm/build/templates/app-route.js"],"sourcesContent":["/**\n * Server Container Accessor\n *\n * Provides a `resolve()` helper for server components and API routes to\n * obtain DI-managed instances. The tsyringe container is placed on globalThis\n * by the CLI bootstrap (`shipit-ai ui`) or the dev-server (`pnpm dev:web`).\n */\n\nimport type { DependencyContainer, InjectionToken } from 'tsyringe';\n\nconst CONTAINER_KEY = '__shipitAiContainer';\n\n/**\n * Resolve a dependency from the DI container.\n *\n * Usage in server components / API routes:\n * ```ts\n * import { resolve } from '@/lib/server-container';\n * import { ListFeaturesUseCase } from '@shipit-ai/core/application/use-cases/features/list-features.use-case';\n *\n * const features = await resolve(ListFeaturesUseCase).execute();\n * ```\n */\nexport function resolve<T>(token: InjectionToken<T>): T {\n const container = (globalThis as Record<string, unknown>)[CONTAINER_KEY] as\n | DependencyContainer\n | undefined;\n\n if (!container) {\n throw new Error(\n 'DI container not available. Ensure the CLI bootstrap or dev-server has initialized it.'\n );\n }\n\n return container.resolve(token);\n}\n","/**\n * SSE API Route: GET /api/deployment-logs\n *\n * Streams deployment log events to the client via Server-Sent Events.\n * Subscribes to the DeploymentService EventEmitter for real-time log\n * entries, filtered by targetId.\n *\n * - Accepts ?targetId query parameter (required)\n * - Sends log entries as SSE \"log\" events\n * - Sends heartbeat comments every 30 seconds to keep connection alive\n * - Cleans up EventEmitter subscription on client disconnect\n */\n\nimport { resolve } from '@/lib/server-container';\nimport type {\n IDeploymentService,\n LogEntry,\n} from '@shipit-ai/core/application/ports/output/services/deployment-service.interface';\n\n// Force dynamic — SSE streams must never be statically optimized or cached\nexport const dynamic = 'force-dynamic';\n\nconst HEARTBEAT_INTERVAL_MS = 30_000;\n\nexport function GET(request: Request): Response {\n try {\n const url = new URL(request.url);\n const targetId = url.searchParams.get('targetId');\n\n if (!targetId?.trim()) {\n const errorStream = new ReadableStream<Uint8Array>({\n start(controller) {\n const encoder = new TextEncoder();\n controller.enqueue(\n encoder.encode(\n `event: error\\ndata: ${JSON.stringify({ error: 'targetId is required' })}\\n\\n`\n )\n );\n controller.close();\n },\n });\n\n return new Response(errorStream, {\n headers: {\n 'Content-Type': 'text/event-stream',\n 'Cache-Control': 'no-cache',\n Connection: 'keep-alive',\n },\n });\n }\n\n const stream = new ReadableStream<Uint8Array>({\n start(controller) {\n const encoder = new TextEncoder();\n let stopped = false;\n\n function enqueue(text: string) {\n if (stopped) return;\n try {\n controller.enqueue(encoder.encode(text));\n } catch {\n // Stream may be closed\n }\n }\n\n const deploymentService = resolve<IDeploymentService>('IDeploymentService');\n\n // Subscribe to log events, filtering by targetId\n const logHandler = (entry: LogEntry) => {\n if (entry.targetId !== targetId) return;\n enqueue(`event: log\\ndata: ${JSON.stringify(entry)}\\n\\n`);\n };\n\n deploymentService.on('log', logHandler);\n\n // Heartbeat to keep connection alive\n const heartbeatInterval = setInterval(() => {\n enqueue(': heartbeat\\n\\n');\n }, HEARTBEAT_INTERVAL_MS);\n\n // Cleanup on client disconnect\n const cleanup = () => {\n stopped = true;\n deploymentService.off('log', logHandler);\n clearInterval(heartbeatInterval);\n try {\n controller.close();\n } catch {\n // Stream may already be closed\n }\n };\n\n request.signal.addEventListener('abort', cleanup, { once: true });\n },\n });\n\n return new Response(stream, {\n headers: {\n 'Content-Type': 'text/event-stream',\n 'Cache-Control': 'no-cache',\n Connection: 'keep-alive',\n },\n });\n } catch (error) {\n // eslint-disable-next-line no-console\n console.error('[SSE route] GET /api/deployment-logs error:', error);\n return new Response(JSON.stringify({ error: String(error) }), {\n status: 500,\n headers: { 'Content-Type': 'application/json' },\n });\n }\n}\n","import { AppRouteRouteModule } from \"next/dist/esm/server/route-modules/app-route/module.compiled\";\nimport { RouteKind } from \"next/dist/esm/server/route-kind\";\nimport { patchFetch as _patchFetch } from \"next/dist/esm/server/lib/patch-fetch\";\nimport { addRequestMeta, getRequestMeta, setRequestMeta } from \"next/dist/esm/server/request-meta\";\nimport { getTracer, SpanKind } from \"next/dist/esm/server/lib/trace/tracer\";\nimport { setManifestsSingleton } from \"next/dist/esm/server/app-render/manifests-singleton\";\nimport { normalizeAppPath } from \"next/dist/esm/shared/lib/router/utils/app-paths\";\nimport { NodeNextRequest, NodeNextResponse } from \"next/dist/esm/server/base-http/node\";\nimport { NextRequestAdapter, signalFromNodeResponse } from \"next/dist/esm/server/web/spec-extension/adapters/next-request\";\nimport { BaseServerSpan } from \"next/dist/esm/server/lib/trace/constants\";\nimport { getRevalidateReason } from \"next/dist/esm/server/instrumentation/utils\";\nimport { sendResponse } from \"next/dist/esm/server/send-response\";\nimport { fromNodeOutgoingHttpHeaders, toNodeOutgoingHttpHeaders } from \"next/dist/esm/server/web/utils\";\nimport { getCacheControlHeader } from \"next/dist/esm/server/lib/cache-control\";\nimport { INFINITE_CACHE, NEXT_CACHE_TAGS_HEADER } from \"next/dist/esm/lib/constants\";\nimport { NoFallbackError } from \"next/dist/esm/shared/lib/no-fallback-error.external\";\nimport { CachedRouteKind } from \"next/dist/esm/server/response-cache\";\nimport * as userland from \"INNER_APP_ROUTE\";\n// We inject the nextConfigOutput here so that we can use them in the route\n// module.\nconst nextConfigOutput = \"\"\nconst routeModule = new AppRouteRouteModule({\n definition: {\n kind: RouteKind.APP_ROUTE,\n page: \"/api/deployment-logs/route\",\n pathname: \"/api/deployment-logs\",\n filename: \"route\",\n bundlePath: \"\"\n },\n distDir: process.env.__NEXT_RELATIVE_DIST_DIR || '',\n relativeProjectDir: process.env.__NEXT_RELATIVE_PROJECT_DIR || '',\n resolvedPagePath: \"[project]/src/presentation/web/app/api/deployment-logs/route.ts\",\n nextConfigOutput,\n // The static import is used for initialization (methods, dynamic, etc.).\n userland: userland,\n // In Turbopack dev mode, also provide a getter that calls require() on every\n // request. This re-reads from devModuleCache so HMR updates are picked up,\n // and the async wrapper unwraps async-module Promises (ESM-only\n // serverExternalPackages) automatically.\n ...process.env.TURBOPACK && process.env.__NEXT_DEV_SERVER ? {\n getUserland: ()=>import(\"INNER_APP_ROUTE\")\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;\nfunction patchFetch() {\n return _patchFetch({\n workAsyncStorage,\n workUnitAsyncStorage\n });\n}\nexport { routeModule, workAsyncStorage, workUnitAsyncStorage, serverHooks, patchFetch, };\nexport async function handler(req, res, ctx) {\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 = \"/api/deployment-logs/route\";\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.__NEXT_MULTI_ZONE_DRAFT_MODE;\n const prepareResult = await routeModule.prepare(req, res, {\n srcPage,\n multiZoneDraftMode\n });\n if (!prepareResult) {\n res.statusCode = 400;\n res.end('Bad Request');\n ctx.waitUntil == null ? void 0 : ctx.waitUntil.call(ctx, Promise.resolve());\n return null;\n }\n const { buildId, params, nextConfig, parsedUrl, isDraftMode, prerenderManifest, routerServerContext, isOnDemandRevalidate, revalidateOnlyGenerated, resolvedPathname, clientReferenceManifest, serverActionsManifest } = prepareResult;\n const normalizedSrcPage = normalizeAppPath(srcPage);\n let isIsr = Boolean(prerenderManifest.dynamicRoutes[normalizedSrcPage] || prerenderManifest.routes[resolvedPathname]);\n const render404 = async ()=>{\n // TODO: should route-module itself handle rendering the 404\n if (routerServerContext == null ? void 0 : 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 if (isIsr && !isDraftMode) {\n const isPrerendered = Boolean(prerenderManifest.routes[resolvedPathname]);\n const prerenderInfo = prerenderManifest.dynamicRoutes[normalizedSrcPage];\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 let cacheKey = null;\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 const supportsDynamicResponse = // If we're in development, we always support dynamic HTML\n routeModule.isDev === true || // If this is not SSG or does not have static paths, then it supports\n // dynamic HTML.\n !isIsr;\n // This is a revalidation request if the request is for a static\n // page and it is not being resumed from a postponed render and\n // it is not a dynamic RSC request then it is a revalidation\n // request.\n const isStaticGeneration = isIsr && !supportsDynamicResponse;\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 const method = req.method || 'GET';\n const tracer = getTracer();\n const activeSpan = tracer.getActiveScopeSpan();\n const isWrappedByNextServer = Boolean(routerServerContext == null ? void 0 : routerServerContext.isWrappedByNextServer);\n const isMinimalMode = Boolean(getRequestMeta(req, 'minimalMode'));\n const incrementalCache = getRequestMeta(req, 'incrementalCache') || await routeModule.getIncrementalCache(req, nextConfig, prerenderManifest, isMinimalMode);\n incrementalCache == null ? void 0 : incrementalCache.resetRequestCache();\n globalThis.__incrementalCache = incrementalCache;\n const context = {\n params,\n previewProps: prerenderManifest.preview,\n renderOpts: {\n experimental: {\n authInterrupts: Boolean(nextConfig.experimental.authInterrupts)\n },\n cacheComponents: Boolean(nextConfig.cacheComponents),\n supportsDynamicResponse,\n incrementalCache,\n cacheLifeProfiles: nextConfig.cacheLife,\n waitUntil: ctx.waitUntil,\n onClose: (cb)=>{\n res.on('close', cb);\n },\n onAfterTaskError: undefined,\n onInstrumentationRequestError: (error, _request, errorContext, silenceLog)=>routeModule.onRequestError(req, error, errorContext, silenceLog, routerServerContext)\n },\n sharedContext: {\n buildId\n }\n };\n const nodeNextReq = new NodeNextRequest(req);\n const nodeNextRes = new NodeNextResponse(res);\n const nextReq = NextRequestAdapter.fromNodeNextRequest(nodeNextReq, signalFromNodeResponse(res));\n try {\n let parentSpan;\n const invokeRouteModule = async (span)=>{\n return routeModule.handle(nextReq, context).finally(()=>{\n if (!span) return;\n span.setAttributes({\n 'http.status_code': res.statusCode,\n 'next.rsc': false\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 if (rootSpanAttributes.get('next.span_type') !== BaseServerSpan.handleRequest) {\n console.warn(`Unexpected root span type '${rootSpanAttributes.get('next.span_type')}'. Please report this Next.js issue https://github.com/vercel/next.js`);\n return;\n }\n const route = rootSpanAttributes.get('next.route');\n if (route) {\n const name = `${method} ${route}`;\n span.setAttributes({\n 'next.route': route,\n 'http.route': route,\n 'next.span_name': name\n });\n span.updateName(name);\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 !== span) {\n parentSpan.setAttribute('http.route', route);\n parentSpan.updateName(name);\n }\n } else {\n span.updateName(`${method} ${srcPage}`);\n }\n });\n };\n const handleResponse = async (currentSpan)=>{\n var _cacheEntry_value;\n const responseGenerator = async ({ previousCacheEntry })=>{\n try {\n if (!isMinimalMode && isOnDemandRevalidate && revalidateOnlyGenerated && !previousCacheEntry) {\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 const response = await invokeRouteModule(currentSpan);\n req.fetchMetrics = context.renderOpts.fetchMetrics;\n let pendingWaitUntil = context.renderOpts.pendingWaitUntil;\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 // 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 // Copy the headers from the response.\n const headers = toNodeOutgoingHttpHeaders(response.headers);\n if (cacheTags) {\n headers[NEXT_CACHE_TAGS_HEADER] = cacheTags;\n }\n if (!headers['content-type'] && blob.type) {\n headers['content-type'] = blob.type;\n }\n const revalidate = typeof context.renderOpts.collectedRevalidate === 'undefined' || context.renderOpts.collectedRevalidate >= INFINITE_CACHE ? false : context.renderOpts.collectedRevalidate;\n const expire = typeof context.renderOpts.collectedExpire === 'undefined' || context.renderOpts.collectedExpire >= INFINITE_CACHE ? undefined : context.renderOpts.collectedExpire;\n // Create the cache entry for the response.\n const cacheEntry = {\n value: {\n kind: CachedRouteKind.APP_ROUTE,\n status: response.status,\n body: Buffer.from(await blob.arrayBuffer()),\n headers\n },\n cacheControl: {\n revalidate,\n expire\n }\n };\n return cacheEntry;\n } else {\n // send response without caching if not ISR\n await sendResponse(nodeNextReq, nodeNextRes, response, context.renderOpts.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 == null ? void 0 : previousCacheEntry.isStale) {\n const silenceLog = false;\n await routeModule.onRequestError(req, err, {\n routerKind: 'App Router',\n routePath: srcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isStaticGeneration,\n isOnDemandRevalidate\n })\n }, silenceLog, routerServerContext);\n }\n throw err;\n }\n };\n const cacheEntry = await routeModule.handleResponse({\n req,\n nextConfig,\n cacheKey,\n routeKind: RouteKind.APP_ROUTE,\n isFallback: false,\n prerenderManifest,\n isRoutePPREnabled: false,\n isOnDemandRevalidate,\n revalidateOnlyGenerated,\n responseGenerator,\n waitUntil: ctx.waitUntil,\n isMinimalMode\n });\n // we don't create a cacheEntry for ISR\n if (!isIsr) {\n return null;\n }\n if ((cacheEntry == null ? void 0 : (_cacheEntry_value = cacheEntry.value) == null ? void 0 : _cacheEntry_value.kind) !== CachedRouteKind.APP_ROUTE) {\n var _cacheEntry_value1;\n throw Object.defineProperty(new Error(`Invariant: app-route received invalid cache entry ${cacheEntry == null ? void 0 : (_cacheEntry_value1 = cacheEntry.value) == null ? void 0 : _cacheEntry_value1.kind}`), \"__NEXT_ERROR_CODE\", {\n value: \"E701\",\n enumerable: false,\n configurable: true\n });\n }\n if (!isMinimalMode) {\n res.setHeader('x-nextjs-cache', isOnDemandRevalidate ? 'REVALIDATED' : cacheEntry.isMiss ? 'MISS' : cacheEntry.isStale ? 'STALE' : 'HIT');\n }\n // Draft mode should never be cached\n if (isDraftMode) {\n res.setHeader('Cache-Control', 'private, no-cache, no-store, max-age=0, must-revalidate');\n }\n const headers = fromNodeOutgoingHttpHeaders(cacheEntry.value.headers);\n if (!(isMinimalMode && isIsr)) {\n headers.delete(NEXT_CACHE_TAGS_HEADER);\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 (cacheEntry.cacheControl && !res.getHeader('Cache-Control') && !headers.get('Cache-Control')) {\n headers.set('Cache-Control', getCacheControlHeader(cacheEntry.cacheControl));\n }\n await sendResponse(nodeNextReq, nodeNextRes, // @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 return null;\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);\n } else {\n parentSpan = tracer.getActiveScopeSpan();\n await tracer.withPropagatedContext(req.headers, ()=>tracer.trace(BaseServerSpan.handleRequest, {\n spanName: `${method} ${srcPage}`,\n kind: SpanKind.SERVER,\n attributes: {\n 'http.method': method,\n 'http.target': req.url\n }\n }, handleResponse), undefined, !isWrappedByNextServer);\n }\n } catch (err) {\n if (!(err instanceof NoFallbackError)) {\n const silenceLog = false;\n await routeModule.onRequestError(req, err, {\n routerKind: 'App Router',\n routePath: normalizedSrcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isStaticGeneration,\n isOnDemandRevalidate\n })\n }, silenceLog, routerServerContext);\n }\n // rethrow so that we can handle serving error page\n // If this is during static generation, throw the error again.\n if (isIsr) throw err;\n // Otherwise, send a 500 response.\n await sendResponse(nodeNextReq, nodeNextRes, new Response(null, {\n status: 500\n }));\n return null;\n }\n}\n\n//# sourceMappingURL=app-route.js.map\n"],"names":["CONTAINER_KEY","resolve","token","container","globalThis","Error","targetId","stringify","dynamic","controller","HEARTBEAT_INTERVAL_MS","GET","request","url","URL","searchParams","get","trim","errorStream","ReadableStream","start","encoder","TextEncoder","enqueue","encode","JSON","error","heartbeatInterval","close","Response","headers","Connection","signal","stream","stopped","console","text","deploymentService","logHandler","entry","on","setInterval","cleanup","off","clearInterval","addEventListener","once","String","status"],"mappings":"i1BAuBO,SAAoBE,AAAXD,CAAmC,EACjD,IAAME,EAAaC,UAAsC,CAACJ,AAdtC,mBAcoD,CAIxE,GAAI,CAACG,EACH,MAAM,AAAIE,GADI,GAEZ,0FAIJ,OAAOF,EAAUF,OAAO,CAACC,EAC3B,4BEnCA,IAAA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,KACA,EAAA,EAAA,CAAA,CAAA,MACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA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EAAe,EADgB,EAGrC,EAAa,EAAO,kBAAkB,GACtC,MAAM,EAAO,qBAAqB,CAAC,EAAI,OAAO,CAAE,IAAI,EAAO,KAAK,CAAC,EAAA,cAAc,CAAC,aAAa,CAAE,CACvF,SAAU,CAAA,EAAG,EAAO,CAAC,EAAE,EAAA,CAAS,CAChC,KAAM,EAAA,QAAQ,CAAC,MAAM,CACrB,WAAY,CACR,cAAe,EACf,cAAe,EAAI,GAAG,AAC1B,CACJ,EAAG,QAAiB,EAAW,CAAC,GAE5C,CAAE,MAAO,EAAK,CAeV,GAdM,aAAe,EAAA,eAAe,EAEhC,CAFmC,KAE7B,EAAY,cAAc,CAAC,EAAK,EAAK,CACvC,WAAY,aACZ,UAAW,EACX,UAAW,QACX,iBAAkB,CAAA,EAAA,EAAA,mBAAA,AAAmB,EAAC,oBAClC,uBACA,CACJ,EACJ,GAAG,AATgB,EASJ,GAIf,EAAO,MAAM,EAKjB,OAHA,MAAM,CAAA,EAAA,EAAA,YAAA,AAAY,EAAC,EAAa,EAAa,IAAI,SAAS,KAAM,CAC5D,OAAQ,GACZ,IACO,IACX,CACJ,mCA3TA,SAAS,EACL,MAAO,CAAA,EAAA,EAAA,UAAW,AAAX,EAAY,kBACf,uBACA,CACJ,EACJ","ignoreList":[2]}
|
|
1
|
+
{"version":3,"sources":["../../../../../../src/presentation/web/lib/server-container.ts","../../../../../../src/presentation/web/lib/api-helpers.ts","../../../../../../src/presentation/web/app/api/deployment-logs/route.ts","../../../../../../node_modules/.pnpm/next%4016.2.2_%40babel%2Bcore%407.29.0_%40playwright%2Btest%401.59.1_react-dom%4019.2.4_react%4019.2.4__react%4019.2.4/node_modules/next/dist/esm/build/templates/app-route.js"],"sourcesContent":["/**\n * Server Container Accessor\n *\n * Provides a `resolve()` helper for server components and API routes to\n * obtain DI-managed instances. The tsyringe container is placed on globalThis\n * by the CLI bootstrap (`shipit-ai ui`) or the dev-server (`pnpm dev:web`).\n */\n\nimport type { DependencyContainer, InjectionToken } from 'tsyringe';\n\nconst CONTAINER_KEY = '__shipitAiContainer';\n\n/**\n * Resolve a dependency from the DI container.\n *\n * Usage in server components / API routes:\n * ```ts\n * import { resolve } from '@/lib/server-container';\n * import { ListFeaturesUseCase } from '@shipit-ai/core/application/use-cases/features/list-features.use-case';\n *\n * const features = await resolve(ListFeaturesUseCase).execute();\n * ```\n */\nexport function resolve<T>(token: InjectionToken<T>): T {\n const container = (globalThis as Record<string, unknown>)[CONTAINER_KEY] as\n | DependencyContainer\n | undefined;\n\n if (!container) {\n throw new Error(\n 'DI container not available. Ensure the CLI bootstrap or dev-server has initialized it.'\n );\n }\n\n return container.resolve(token);\n}\n","import { NextResponse } from 'next/server';\n\n/**\n * Create a JSON error response. For 500-level errors, always uses a generic\n * message to prevent internal detail leakage. The actual error is logged\n * server-side for debugging.\n */\nexport function apiError(\n status: number,\n publicMessage: string,\n internalError?: unknown\n): NextResponse {\n if (internalError) {\n const detail = internalError instanceof Error ? internalError.message : String(internalError);\n // eslint-disable-next-line no-console\n console.error(`[API ${status}] ${publicMessage}: ${detail}`);\n }\n return NextResponse.json({ error: publicMessage }, { status });\n}\n\n/**\n * Validate a required query parameter. Returns the trimmed value or an\n * error response.\n */\nexport function validateParam(value: string | null, paramName: string): string | NextResponse {\n if (!value?.trim()) {\n return apiError(400, `${paramName} is required`);\n }\n return value.trim();\n}\n","/**\n * SSE API Route: GET /api/deployment-logs\n *\n * Streams deployment log events to the client via Server-Sent Events.\n * Subscribes to the DeploymentService EventEmitter for real-time log\n * entries, filtered by targetId.\n *\n * - Accepts ?targetId query parameter (required)\n * - Sends log entries as SSE \"log\" events\n * - Sends heartbeat comments every 30 seconds to keep connection alive\n * - Cleans up EventEmitter subscription on client disconnect\n */\n\nimport { resolve } from '@/lib/server-container';\nimport { apiError } from '@/lib/api-helpers';\nimport type {\n IDeploymentService,\n LogEntry,\n} from '@shipit-ai/core/application/ports/output/services/deployment-service.interface';\n\n// Force dynamic — SSE streams must never be statically optimized or cached\nexport const dynamic = 'force-dynamic';\n\nconst HEARTBEAT_INTERVAL_MS = 30_000;\n\nexport function GET(request: Request): Response {\n try {\n const url = new URL(request.url);\n const targetId = url.searchParams.get('targetId');\n\n if (!targetId?.trim()) {\n const errorStream = new ReadableStream<Uint8Array>({\n start(controller) {\n const encoder = new TextEncoder();\n controller.enqueue(\n encoder.encode(\n `event: error\\ndata: ${JSON.stringify({ error: 'targetId is required' })}\\n\\n`\n )\n );\n controller.close();\n },\n });\n\n return new Response(errorStream, {\n headers: {\n 'Content-Type': 'text/event-stream',\n 'Cache-Control': 'no-cache',\n Connection: 'keep-alive',\n },\n });\n }\n\n const stream = new ReadableStream<Uint8Array>({\n start(controller) {\n const encoder = new TextEncoder();\n let stopped = false;\n\n function enqueue(text: string) {\n if (stopped) return;\n try {\n controller.enqueue(encoder.encode(text));\n } catch {\n // Stream may be closed\n }\n }\n\n const deploymentService = resolve<IDeploymentService>('IDeploymentService');\n\n // Subscribe to log events, filtering by targetId\n const logHandler = (entry: LogEntry) => {\n if (entry.targetId !== targetId) return;\n enqueue(`event: log\\ndata: ${JSON.stringify(entry)}\\n\\n`);\n };\n\n deploymentService.on('log', logHandler);\n\n // Heartbeat to keep connection alive\n const heartbeatInterval = setInterval(() => {\n enqueue(': heartbeat\\n\\n');\n }, HEARTBEAT_INTERVAL_MS);\n\n // Cleanup on client disconnect\n const cleanup = () => {\n stopped = true;\n deploymentService.off('log', logHandler);\n clearInterval(heartbeatInterval);\n try {\n controller.close();\n } catch {\n // Stream may already be closed\n }\n };\n\n request.signal.addEventListener('abort', cleanup, { once: true });\n },\n });\n\n return new Response(stream, {\n headers: {\n 'Content-Type': 'text/event-stream',\n 'Cache-Control': 'no-cache',\n Connection: 'keep-alive',\n },\n });\n } catch (error) {\n return apiError(500, 'Failed to open deployment logs stream', error);\n }\n}\n","import { AppRouteRouteModule } from \"next/dist/esm/server/route-modules/app-route/module.compiled\";\nimport { RouteKind } from \"next/dist/esm/server/route-kind\";\nimport { patchFetch as _patchFetch } from \"next/dist/esm/server/lib/patch-fetch\";\nimport { addRequestMeta, getRequestMeta, setRequestMeta } from \"next/dist/esm/server/request-meta\";\nimport { getTracer, SpanKind } from \"next/dist/esm/server/lib/trace/tracer\";\nimport { setManifestsSingleton } from \"next/dist/esm/server/app-render/manifests-singleton\";\nimport { normalizeAppPath } from \"next/dist/esm/shared/lib/router/utils/app-paths\";\nimport { NodeNextRequest, NodeNextResponse } from \"next/dist/esm/server/base-http/node\";\nimport { NextRequestAdapter, signalFromNodeResponse } from \"next/dist/esm/server/web/spec-extension/adapters/next-request\";\nimport { BaseServerSpan } from \"next/dist/esm/server/lib/trace/constants\";\nimport { getRevalidateReason } from \"next/dist/esm/server/instrumentation/utils\";\nimport { sendResponse } from \"next/dist/esm/server/send-response\";\nimport { fromNodeOutgoingHttpHeaders, toNodeOutgoingHttpHeaders } from \"next/dist/esm/server/web/utils\";\nimport { getCacheControlHeader } from \"next/dist/esm/server/lib/cache-control\";\nimport { INFINITE_CACHE, NEXT_CACHE_TAGS_HEADER } from \"next/dist/esm/lib/constants\";\nimport { NoFallbackError } from \"next/dist/esm/shared/lib/no-fallback-error.external\";\nimport { CachedRouteKind } from \"next/dist/esm/server/response-cache\";\nimport * as userland from \"INNER_APP_ROUTE\";\n// We inject the nextConfigOutput here so that we can use them in the route\n// module.\nconst nextConfigOutput = \"\"\nconst routeModule = new AppRouteRouteModule({\n definition: {\n kind: RouteKind.APP_ROUTE,\n page: \"/api/deployment-logs/route\",\n pathname: \"/api/deployment-logs\",\n filename: \"route\",\n bundlePath: \"\"\n },\n distDir: process.env.__NEXT_RELATIVE_DIST_DIR || '',\n relativeProjectDir: process.env.__NEXT_RELATIVE_PROJECT_DIR || '',\n resolvedPagePath: \"[project]/src/presentation/web/app/api/deployment-logs/route.ts\",\n nextConfigOutput,\n // The static import is used for initialization (methods, dynamic, etc.).\n userland: userland,\n // In Turbopack dev mode, also provide a getter that calls require() on every\n // request. This re-reads from devModuleCache so HMR updates are picked up,\n // and the async wrapper unwraps async-module Promises (ESM-only\n // serverExternalPackages) automatically.\n ...process.env.TURBOPACK && process.env.__NEXT_DEV_SERVER ? {\n getUserland: ()=>import(\"INNER_APP_ROUTE\")\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;\nfunction patchFetch() {\n return _patchFetch({\n workAsyncStorage,\n workUnitAsyncStorage\n });\n}\nexport { routeModule, workAsyncStorage, workUnitAsyncStorage, serverHooks, patchFetch, };\nexport async function handler(req, res, ctx) {\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 = \"/api/deployment-logs/route\";\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.__NEXT_MULTI_ZONE_DRAFT_MODE;\n const prepareResult = await routeModule.prepare(req, res, {\n srcPage,\n multiZoneDraftMode\n });\n if (!prepareResult) {\n res.statusCode = 400;\n res.end('Bad Request');\n ctx.waitUntil == null ? void 0 : ctx.waitUntil.call(ctx, Promise.resolve());\n return null;\n }\n const { buildId, params, nextConfig, parsedUrl, isDraftMode, prerenderManifest, routerServerContext, isOnDemandRevalidate, revalidateOnlyGenerated, resolvedPathname, clientReferenceManifest, serverActionsManifest } = prepareResult;\n const normalizedSrcPage = normalizeAppPath(srcPage);\n let isIsr = Boolean(prerenderManifest.dynamicRoutes[normalizedSrcPage] || prerenderManifest.routes[resolvedPathname]);\n const render404 = async ()=>{\n // TODO: should route-module itself handle rendering the 404\n if (routerServerContext == null ? void 0 : 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 if (isIsr && !isDraftMode) {\n const isPrerendered = Boolean(prerenderManifest.routes[resolvedPathname]);\n const prerenderInfo = prerenderManifest.dynamicRoutes[normalizedSrcPage];\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 let cacheKey = null;\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 const supportsDynamicResponse = // If we're in development, we always support dynamic HTML\n routeModule.isDev === true || // If this is not SSG or does not have static paths, then it supports\n // dynamic HTML.\n !isIsr;\n // This is a revalidation request if the request is for a static\n // page and it is not being resumed from a postponed render and\n // it is not a dynamic RSC request then it is a revalidation\n // request.\n const isStaticGeneration = isIsr && !supportsDynamicResponse;\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 const method = req.method || 'GET';\n const tracer = getTracer();\n const activeSpan = tracer.getActiveScopeSpan();\n const isWrappedByNextServer = Boolean(routerServerContext == null ? void 0 : routerServerContext.isWrappedByNextServer);\n const isMinimalMode = Boolean(getRequestMeta(req, 'minimalMode'));\n const incrementalCache = getRequestMeta(req, 'incrementalCache') || await routeModule.getIncrementalCache(req, nextConfig, prerenderManifest, isMinimalMode);\n incrementalCache == null ? void 0 : incrementalCache.resetRequestCache();\n globalThis.__incrementalCache = incrementalCache;\n const context = {\n params,\n previewProps: prerenderManifest.preview,\n renderOpts: {\n experimental: {\n authInterrupts: Boolean(nextConfig.experimental.authInterrupts)\n },\n cacheComponents: Boolean(nextConfig.cacheComponents),\n supportsDynamicResponse,\n incrementalCache,\n cacheLifeProfiles: nextConfig.cacheLife,\n waitUntil: ctx.waitUntil,\n onClose: (cb)=>{\n res.on('close', cb);\n },\n onAfterTaskError: undefined,\n onInstrumentationRequestError: (error, _request, errorContext, silenceLog)=>routeModule.onRequestError(req, error, errorContext, silenceLog, routerServerContext)\n },\n sharedContext: {\n buildId\n }\n };\n const nodeNextReq = new NodeNextRequest(req);\n const nodeNextRes = new NodeNextResponse(res);\n const nextReq = NextRequestAdapter.fromNodeNextRequest(nodeNextReq, signalFromNodeResponse(res));\n try {\n let parentSpan;\n const invokeRouteModule = async (span)=>{\n return routeModule.handle(nextReq, context).finally(()=>{\n if (!span) return;\n span.setAttributes({\n 'http.status_code': res.statusCode,\n 'next.rsc': false\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 if (rootSpanAttributes.get('next.span_type') !== BaseServerSpan.handleRequest) {\n console.warn(`Unexpected root span type '${rootSpanAttributes.get('next.span_type')}'. Please report this Next.js issue https://github.com/vercel/next.js`);\n return;\n }\n const route = rootSpanAttributes.get('next.route');\n if (route) {\n const name = `${method} ${route}`;\n span.setAttributes({\n 'next.route': route,\n 'http.route': route,\n 'next.span_name': name\n });\n span.updateName(name);\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 !== span) {\n parentSpan.setAttribute('http.route', route);\n parentSpan.updateName(name);\n }\n } else {\n span.updateName(`${method} ${srcPage}`);\n }\n });\n };\n const handleResponse = async (currentSpan)=>{\n var _cacheEntry_value;\n const responseGenerator = async ({ previousCacheEntry })=>{\n try {\n if (!isMinimalMode && isOnDemandRevalidate && revalidateOnlyGenerated && !previousCacheEntry) {\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 const response = await invokeRouteModule(currentSpan);\n req.fetchMetrics = context.renderOpts.fetchMetrics;\n let pendingWaitUntil = context.renderOpts.pendingWaitUntil;\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 // 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 // Copy the headers from the response.\n const headers = toNodeOutgoingHttpHeaders(response.headers);\n if (cacheTags) {\n headers[NEXT_CACHE_TAGS_HEADER] = cacheTags;\n }\n if (!headers['content-type'] && blob.type) {\n headers['content-type'] = blob.type;\n }\n const revalidate = typeof context.renderOpts.collectedRevalidate === 'undefined' || context.renderOpts.collectedRevalidate >= INFINITE_CACHE ? false : context.renderOpts.collectedRevalidate;\n const expire = typeof context.renderOpts.collectedExpire === 'undefined' || context.renderOpts.collectedExpire >= INFINITE_CACHE ? undefined : context.renderOpts.collectedExpire;\n // Create the cache entry for the response.\n const cacheEntry = {\n value: {\n kind: CachedRouteKind.APP_ROUTE,\n status: response.status,\n body: Buffer.from(await blob.arrayBuffer()),\n headers\n },\n cacheControl: {\n revalidate,\n expire\n }\n };\n return cacheEntry;\n } else {\n // send response without caching if not ISR\n await sendResponse(nodeNextReq, nodeNextRes, response, context.renderOpts.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 == null ? void 0 : previousCacheEntry.isStale) {\n const silenceLog = false;\n await routeModule.onRequestError(req, err, {\n routerKind: 'App Router',\n routePath: srcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isStaticGeneration,\n isOnDemandRevalidate\n })\n }, silenceLog, routerServerContext);\n }\n throw err;\n }\n };\n const cacheEntry = await routeModule.handleResponse({\n req,\n nextConfig,\n cacheKey,\n routeKind: RouteKind.APP_ROUTE,\n isFallback: false,\n prerenderManifest,\n isRoutePPREnabled: false,\n isOnDemandRevalidate,\n revalidateOnlyGenerated,\n responseGenerator,\n waitUntil: ctx.waitUntil,\n isMinimalMode\n });\n // we don't create a cacheEntry for ISR\n if (!isIsr) {\n return null;\n }\n if ((cacheEntry == null ? void 0 : (_cacheEntry_value = cacheEntry.value) == null ? void 0 : _cacheEntry_value.kind) !== CachedRouteKind.APP_ROUTE) {\n var _cacheEntry_value1;\n throw Object.defineProperty(new Error(`Invariant: app-route received invalid cache entry ${cacheEntry == null ? void 0 : (_cacheEntry_value1 = cacheEntry.value) == null ? void 0 : _cacheEntry_value1.kind}`), \"__NEXT_ERROR_CODE\", {\n value: \"E701\",\n enumerable: false,\n configurable: true\n });\n }\n if (!isMinimalMode) {\n res.setHeader('x-nextjs-cache', isOnDemandRevalidate ? 'REVALIDATED' : cacheEntry.isMiss ? 'MISS' : cacheEntry.isStale ? 'STALE' : 'HIT');\n }\n // Draft mode should never be cached\n if (isDraftMode) {\n res.setHeader('Cache-Control', 'private, no-cache, no-store, max-age=0, must-revalidate');\n }\n const headers = fromNodeOutgoingHttpHeaders(cacheEntry.value.headers);\n if (!(isMinimalMode && isIsr)) {\n headers.delete(NEXT_CACHE_TAGS_HEADER);\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 (cacheEntry.cacheControl && !res.getHeader('Cache-Control') && !headers.get('Cache-Control')) {\n headers.set('Cache-Control', getCacheControlHeader(cacheEntry.cacheControl));\n }\n await sendResponse(nodeNextReq, nodeNextRes, // @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 return null;\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);\n } else {\n parentSpan = tracer.getActiveScopeSpan();\n await tracer.withPropagatedContext(req.headers, ()=>tracer.trace(BaseServerSpan.handleRequest, {\n spanName: `${method} ${srcPage}`,\n kind: SpanKind.SERVER,\n attributes: {\n 'http.method': method,\n 'http.target': req.url\n }\n }, handleResponse), undefined, !isWrappedByNextServer);\n }\n } catch (err) {\n if (!(err instanceof NoFallbackError)) {\n const silenceLog = false;\n await routeModule.onRequestError(req, err, {\n routerKind: 'App Router',\n routePath: normalizedSrcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isStaticGeneration,\n isOnDemandRevalidate\n })\n }, silenceLog, routerServerContext);\n }\n // rethrow so that we can handle serving error page\n // If this is during static generation, throw the error again.\n if (isIsr) throw err;\n // Otherwise, send a 500 response.\n await sendResponse(nodeNextReq, nodeNextRes, new Response(null, {\n status: 500\n }));\n return null;\n }\n}\n\n//# sourceMappingURL=app-route.js.map\n"],"names":["CONTAINER_KEY","resolve","token","container","globalThis","Error","apiError","status","publicMessage","internalError","detail","message","String","console","error","json","validateParam","value","paramName","trim","dynamic","HEARTBEAT_INTERVAL_MS","TextEncoder","GET","request","url","URL","targetId","searchParams","get","errorStream","ReadableStream","start","controller","encoder","enqueue","encode","JSON","stringify","close","stopped","Response","headers","addEventListener","Connection","stream","text","deploymentService","logHandler","entry","on","heartbeatInterval","setInterval","cleanup","off","clearInterval","signal","once"],"mappings":"ogCAuBO,SAAoBE,AAAXD,CAAmC,EACjD,IAAME,EAAaC,UAAsC,CAACJ,AAdtC,mBAcoD,CAIxE,GAAI,CAACG,EACH,MAAM,AAAIE,GADI,GAEZ,0FAIJ,OAAOF,EAAUF,OAAO,CAACC,EAC3B,4BCnCA,IAAA,EAAA,EAAA,CAAA,CAAA,yBAOO,SAASI,AACdC,CAAc,CACdC,CAAqB,CACrBC,CAAuB,EAEvB,GAAIA,EAAe,CACjB,IAAMC,EAASD,aAAyBJ,MAAQI,EAAcE,OAAO,CAAGC,OAAOH,GAE/EI,QAAQC,KAAK,CAAC,CAAC,KAAK,EAAEP,EAAO,EAAE,EAAEC,EAAc,EAAE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,EAAA,qBAAA,AAAqB,EAAC,EAAW,YAAY,GAE9E,MAAM,CAAA,EAAA,EAAA,YAAA,AAAY,EAAC,EAAa,EAChC,IAAI,SAAS,EAAW,KAAK,CAAC,IAAI,CAAE,SAChC,EACA,OAAQ,EAAW,KAAK,CAAC,MAAM,EAAI,GACvC,IACO,IACX,EAGI,GAAyB,EACzB,MAAM,EAAe,EADgB,EAGrC,EAAa,EAAO,kBAAkB,GACtC,MAAM,EAAO,qBAAqB,CAAC,EAAI,OAAO,CAAE,IAAI,EAAO,KAAK,CAAC,EAAA,cAAc,CAAC,aAAa,CAAE,CACvF,SAAU,CAAA,EAAG,EAAO,CAAC,EAAE,EAAA,CAAS,CAChC,KAAM,EAAA,QAAQ,CAAC,MAAM,CACrB,WAAY,CACR,cAAe,EACf,cAAe,EAAI,GAAG,AAC1B,CACJ,EAAG,QAAiB,EAAW,CAAC,GAE5C,CAAE,MAAO,EAAK,CAeV,GAdM,aAAe,EAAA,eAAe,EAEhC,CAFmC,KAE7B,EAAY,cAAc,CAAC,EAAK,EAAK,CACvC,WAAY,aACZ,UAAW,EACX,UAAW,QACX,iBAAkB,CAAA,EAAA,EAAA,mBAAA,AAAmB,EAAC,oBAClC,uBACA,CACJ,EACJ,GAAG,AATgB,EASJ,GAIf,EAAO,MAAM,EAKjB,OAHA,MAAM,CAAA,EAAA,EAAA,YAAA,AAAY,EAAC,EAAa,EAAa,IAAI,SAAS,KAAM,CAC5D,OAAQ,GACZ,IACO,IACX,CACJ,mCA3TAG,SAAS,EACL,MAAO,CAAA,EAAA,EAAA,UAAW,AAAX,EAAY,kBACf,uBACA,CACJ,EACJ","ignoreList":[3]}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
module.exports=[93695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},18622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},32319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},56704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},24725,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/after-task-async-storage.external.js",()=>require("next/dist/server/app-render/after-task-async-storage.external.js"))},70406,(e,t,r)=>{t.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},50227,(e,t,r)=>{t.exports=e.x("node:path",()=>require("node:path"))},60526,(e,t,r)=>{t.exports=e.x("node:os",()=>require("node:os"))},12714,(e,t,r)=>{t.exports=e.x("node:fs/promises",()=>require("node:fs/promises"))},2157,(e,t,r)=>{t.exports=e.x("node:fs",()=>require("node:fs"))},24934,e=>{"use strict";var t=e.i(25716);e.s(["apiError",0,function(e,r,a){if(a){let t=a instanceof Error?a.message:String(a);console.error(`[API ${e}] ${r}: ${t}`)}return t.NextResponse.json({error:r},{status:e})}])},31762,e=>{"use strict";e.i(2157);var t=e.i(12714);async function r(e){try{return await (0,t.realpath)(e)}catch{return null}}async function a(e,t){let[a,...n]=await Promise.all([r(e),...t.map(e=>r(e))]);if(!a)return null;for(let e=0;e<n.length;e++)if(function(e,t){let r=t.replace(/\\/g,"/"),a=e.replace(/\\/g,"/");return a===r||a.startsWith(`${r}/`)}(a,n[e]??t[e]))return a;return null}e.s(["realpathWithinAllowedRootsAsync",0,a])},92039,e=>{"use strict";var t=e.i(29932),r=e.i(88797),a=e.i(78439),n=e.i(21387),s=e.i(351),i=e.i(1286),o=e.i(31060),l=e.i(67760),u=e.i(13435),d=e.i(60316),p=e.i(37130),c=e.i(31516),h=e.i(63144),x=e.i(3719),f=e.i(66941),R=e.i(93695);e.i(76574);var m=e.i(45014),v=e.i(25716),y=e.i(12714),w=e.i(60526),g=e.i(50227),E=e.i(24934),A=e.i(31762);async function C(e){let t=new URL(e.url),r=t.searchParams.get("path")??(0,w.homedir)(),a="true"===t.searchParams.get("showHidden");if(!g.default.isAbsolute(r))return v.NextResponse.json({error:"Path must be absolute"},{status:400});let n=g.default.resolve(r),s=await (0,A.realpathWithinAllowedRootsAsync)(n,[process.cwd(),(0,w.homedir)()]);if(!s)return v.NextResponse.json({error:"Directory not found"},{status:404});try{if(!(await (0,y.stat)(s)).isDirectory())return v.NextResponse.json({error:"Path is not a directory"},{status:400})}catch(e){var i;if((i=e)instanceof Error&&"code"in i&&"ENOENT"===e.code)return v.NextResponse.json({error:"Directory not found"},{status:404});return(0,E.apiError)(500,"Failed to access directory",e)}try{let e=await (0,y.readdir)(s,{withFileTypes:!0}),t=[],r=e.map(async e=>{if(!a&&e.name.startsWith("."))return null;let t=g.default.join(s,e.name),r=g.default.join(n,e.name);try{if(e.isDirectory()){let a=await (0,y.stat)(t);return{name:e.name,path:r,isDirectory:!0,updatedAt:a.mtime.toISOString()}}if(e.isSymbolicLink()){let a=await (0,y.stat)(t);if(a.isDirectory())return{name:e.name,path:r,isDirectory:!0,updatedAt:a.mtime.toISOString()}}}catch{}return null});for(let e of(await Promise.all(r)))null!==e&&t.push(e);return v.NextResponse.json({entries:t,currentPath:n})}catch(e){return(0,E.apiError)(500,"Failed to read directory",e)}}e.s(["GET",0,C],47661);var b=e.i(47661);let N=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/directory/list/route",pathname:"/api/directory/list",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/src/presentation/web/app/api/directory/list/route.ts",nextConfigOutput:"",userland:b,...{}}),{workAsyncStorage:P,workUnitAsyncStorage:q,serverHooks:S}=N;async function T(e,t,a){a.requestMeta&&(0,n.setRequestMeta)(e,a.requestMeta),N.isDev&&(0,n.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let v="/api/directory/list/route";v=v.replace(/\/index$/,"")||"/";let y=await N.prepare(e,t,{srcPage:v,multiZoneDraftMode:!1});if(!y)return t.statusCode=400,t.end("Bad Request"),null==a.waitUntil||a.waitUntil.call(a,Promise.resolve()),null;let{buildId:w,params:g,nextConfig:E,parsedUrl:A,isDraftMode:C,prerenderManifest:b,routerServerContext:P,isOnDemandRevalidate:q,revalidateOnlyGenerated:S,resolvedPathname:T,clientReferenceManifest:j,serverActionsManifest:O}=y,k=(0,o.normalizeAppPath)(v),_=!!(b.dynamicRoutes[k]||b.routes[T]),D=async()=>((null==P?void 0:P.render404)?await P.render404(e,t,A,!1):t.end("This page could not be found"),null);if(_&&!C){let e=!!b.routes[T],t=b.dynamicRoutes[k];if(t&&!1===t.fallback&&!e){if(E.adapterPath)return await D();throw new R.NoFallbackError}}let I=null;!_||N.isDev||C||(I="/index"===(I=T)?"/":I);let H=!0===N.isDev||!_,U=_&&!H;O&&j&&(0,i.setManifestsSingleton)({page:v,clientReferenceManifest:j,serverActionsManifest:O});let M=e.method||"GET",$=(0,s.getTracer)(),F=$.getActiveScopeSpan(),K=!!(null==P?void 0:P.isWrappedByNextServer),L=!!(0,n.getRequestMeta)(e,"minimalMode"),W=(0,n.getRequestMeta)(e,"incrementalCache")||await N.getIncrementalCache(e,E,b,L);null==W||W.resetRequestCache(),globalThis.__incrementalCache=W;let B={params:g,previewProps:b.preview,renderOpts:{experimental:{authInterrupts:!!E.experimental.authInterrupts},cacheComponents:!!E.cacheComponents,supportsDynamicResponse:H,incrementalCache:W,cacheLifeProfiles:E.cacheLife,waitUntil:a.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,a,n)=>N.onRequestError(e,t,a,n,P)},sharedContext:{buildId:w}},G=new l.NodeNextRequest(e),V=new l.NodeNextResponse(t),X=u.NextRequestAdapter.fromNodeNextRequest(G,(0,u.signalFromNodeResponse)(t));try{let n,i=async e=>N.handle(X,B).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let r=$.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==d.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${r.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let a=r.get("next.route");if(a){let t=`${M} ${a}`;e.setAttributes({"next.route":a,"http.route":a,"next.span_name":t}),e.updateName(t),n&&n!==e&&(n.setAttribute("http.route",a),n.updateName(t))}else e.updateName(`${M} ${v}`)}),o=async n=>{var s,o;let l=async({previousCacheEntry:r})=>{try{if(!L&&q&&S&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let s=await i(n);e.fetchMetrics=B.renderOpts.fetchMetrics;let o=B.renderOpts.pendingWaitUntil;o&&a.waitUntil&&(a.waitUntil(o),o=void 0);let l=B.renderOpts.collectedTags;if(!_)return await (0,c.sendResponse)(G,V,s,B.renderOpts.pendingWaitUntil),null;{let e=await s.blob(),t=(0,h.toNodeOutgoingHttpHeaders)(s.headers);l&&(t[f.NEXT_CACHE_TAGS_HEADER]=l),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==B.renderOpts.collectedRevalidate&&!(B.renderOpts.collectedRevalidate>=f.INFINITE_CACHE)&&B.renderOpts.collectedRevalidate,a=void 0===B.renderOpts.collectedExpire||B.renderOpts.collectedExpire>=f.INFINITE_CACHE?void 0:B.renderOpts.collectedExpire;return{value:{kind:m.CachedRouteKind.APP_ROUTE,status:s.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:a}}}}catch(t){throw(null==r?void 0:r.isStale)&&await N.onRequestError(e,t,{routerKind:"App Router",routePath:v,routeType:"route",revalidateReason:(0,p.getRevalidateReason)({isStaticGeneration:U,isOnDemandRevalidate:q})},!1,P),t}},u=await N.handleResponse({req:e,nextConfig:E,cacheKey:I,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:b,isRoutePPREnabled:!1,isOnDemandRevalidate:q,revalidateOnlyGenerated:S,responseGenerator:l,waitUntil:a.waitUntil,isMinimalMode:L});if(!_)return null;if((null==u||null==(s=u.value)?void 0:s.kind)!==m.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==u||null==(o=u.value)?void 0:o.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});L||t.setHeader("x-nextjs-cache",q?"REVALIDATED":u.isMiss?"MISS":u.isStale?"STALE":"HIT"),C&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let d=(0,h.fromNodeOutgoingHttpHeaders)(u.value.headers);return L&&_||d.delete(f.NEXT_CACHE_TAGS_HEADER),!u.cacheControl||t.getHeader("Cache-Control")||d.get("Cache-Control")||d.set("Cache-Control",(0,x.getCacheControlHeader)(u.cacheControl)),await (0,c.sendResponse)(G,V,new Response(u.value.body,{headers:d,status:u.value.status||200})),null};K&&F?await o(F):(n=$.getActiveScopeSpan(),await $.withPropagatedContext(e.headers,()=>$.trace(d.BaseServerSpan.handleRequest,{spanName:`${M} ${v}`,kind:s.SpanKind.SERVER,attributes:{"http.method":M,"http.target":e.url}},o),void 0,!K))}catch(t){if(t instanceof R.NoFallbackError||await N.onRequestError(e,t,{routerKind:"App Router",routePath:k,routeType:"route",revalidateReason:(0,p.getRevalidateReason)({isStaticGeneration:U,isOnDemandRevalidate:q})},!1,P),_)throw t;return await (0,c.sendResponse)(G,V,new Response(null,{status:500})),null}}e.s(["handler",0,T,"patchFetch",0,function(){return(0,a.patchFetch)({workAsyncStorage:P,workUnitAsyncStorage:q})},"routeModule",0,N,"serverHooks",0,S,"workAsyncStorage",0,P,"workUnitAsyncStorage",0,q],92039)}];
|
|
2
|
+
|
|
3
|
+
//# sourceMappingURL=%5Broot-of-the-server%5D__0e9p7em._.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../src/presentation/web/lib/api-helpers.ts","../../../../../../src/presentation/web/lib/path-sanitizers.ts","../../../../../../node_modules/.pnpm/next%4016.2.2_%40babel%2Bcore%407.29.0_%40playwright%2Btest%401.59.1_react-dom%4019.2.4_react%4019.2.4__react%4019.2.4/node_modules/next/dist/esm/build/templates/app-route.js","../../../../../../src/presentation/web/app/api/directory/list/route.ts"],"sourcesContent":["import { NextResponse } from 'next/server';\n\n/**\n * Create a JSON error response. For 500-level errors, always uses a generic\n * message to prevent internal detail leakage. The actual error is logged\n * server-side for debugging.\n */\nexport function apiError(\n status: number,\n publicMessage: string,\n internalError?: unknown\n): NextResponse {\n if (internalError) {\n const detail = internalError instanceof Error ? internalError.message : String(internalError);\n // eslint-disable-next-line no-console\n console.error(`[API ${status}] ${publicMessage}: ${detail}`);\n }\n return NextResponse.json({ error: publicMessage }, { status });\n}\n\n/**\n * Validate a required query parameter. Returns the trimmed value or an\n * error response.\n */\nexport function validateParam(value: string | null, paramName: string): string | NextResponse {\n if (!value?.trim()) {\n return apiError(400, `${paramName} is required`);\n }\n return value.trim();\n}\n","/**\n * Path sanitization helpers for the web presentation layer.\n *\n * Provides the small set of primitives used by every route and server\n * action that touches a user-influenced filesystem path. Each helper\n * does one thing, is recognized by CodeQL's js/path-injection taint\n * analysis as a sanitizer, and is portable across macOS/Linux/Windows.\n *\n * Design principles:\n *\n * - `realpathOrNull(p)` resolves a path through `realpath` and returns\n * `null` on any error (missing file, permission denied, broken symlink).\n * Callers never have to care about the thrown error variants.\n *\n * - `isWithinRoot(candidate, root)` is a pure string containment check\n * that expects both arguments to already be realpath-resolved. It\n * normalizes backslash separators to forward slashes before comparing,\n * so Windows realpath output matches the forward-slash roots that\n * shipit uses throughout the codebase for persistence and comparison.\n *\n * - `realpathWithinAllowedRoots(candidate, roots)` combines the two:\n * resolves the candidate once, resolves each root once (with graceful\n * fallback to the unresolved form for the roots), then checks\n * containment. Returns the resolved candidate on success, `null` on\n * failure. Use this when a value must live under one of several\n * permitted directories (e.g. cwd OR home-dir for the uploads API).\n *\n * These helpers intentionally do NOT compose realpath with the\n * containment check into a single `realpathWithinRoot(candidate, root)`\n * function, because that composition re-resolves an already-resolved\n * root on every nested call and opens a TOCTOU window where filesystem\n * state can change between the resolve and the containment check. Keep\n * realpath and containment separate so the caller can resolve once and\n * validate many.\n */\nimport { realpathSync } from 'node:fs';\nimport { realpath } from 'node:fs/promises';\n\n/**\n * Resolve a path through `realpath` and return the resolved absolute path,\n * or `null` if the path is missing, unreadable, or cannot be canonicalized\n * for any other reason. Never throws.\n *\n * CodeQL recognizes `realpathSync` output as a sanitizer for\n * `js/path-injection`, so the returned value is safe to flow into `stat`,\n * `readFile`, `readdir`, `spawn`, and other filesystem sinks.\n */\nexport function realpathOrNull(p: string): string | null {\n try {\n return realpathSync(p);\n } catch {\n return null;\n }\n}\n\n/**\n * Pure string containment check: does `resolvedCandidate` live at or\n * beneath `resolvedRoot`? BOTH arguments are expected to already be\n * realpath-resolved absolute paths — this helper does NOT resolve them.\n * Separate the resolve step from the containment check so the caller can\n * resolve once and validate many times without redundant syscalls or\n * TOCTOU windows.\n *\n * Uses forward-slash normalization on both sides before comparing, which\n * is lossless on POSIX (separator is already `/`) and lossless on Windows\n * (where `/` cannot appear inside a path component). This makes the\n * helper safe to use across all three platforms.\n */\nexport function isWithinRoot(resolvedCandidate: string, resolvedRoot: string): boolean {\n const normRoot = resolvedRoot.replace(/\\\\/g, '/');\n const normCandidate = resolvedCandidate.replace(/\\\\/g, '/');\n return normCandidate === normRoot || normCandidate.startsWith(`${normRoot}/`);\n}\n\n/**\n * Resolve `candidate` through realpath and assert the result lives under\n * at least one of the provided `allowedRoots`. Returns the resolved\n * candidate path on success, or `null` if the candidate cannot be resolved\n * or does not fall under any allowed root.\n *\n * The roots are resolved once, up-front, with graceful fallback to the\n * unresolved form on failure (so a root that does not yet exist on disk\n * is still honored as a literal prefix — this matches the existing\n * behavior of the upload and directory-list routes). If the caller wants\n * strict resolution of the roots too, pre-resolve them with\n * `realpathOrNull` and filter out `null`s before calling this helper.\n */\nexport function realpathWithinAllowedRoots(\n candidate: string,\n allowedRoots: readonly string[]\n): string | null {\n const resolvedCandidate = realpathOrNull(candidate);\n if (!resolvedCandidate) return null;\n\n for (const root of allowedRoots) {\n const resolvedRoot = realpathOrNull(root) ?? root;\n if (isWithinRoot(resolvedCandidate, resolvedRoot)) {\n return resolvedCandidate;\n }\n }\n return null;\n}\n\n// ─── Async variants ─────────────────────────────────────────────────────\n//\n// Route handlers that already use async fs APIs should use these rather\n// than the sync variants so they don't block the event loop under\n// concurrent load. The async helpers mirror the sync ones exactly in\n// semantics — same null-on-error contract, same normalization, same\n// containment rules.\n\n/**\n * Async variant of `realpathOrNull`. See the sync version for semantics.\n */\nexport async function realpathOrNullAsync(p: string): Promise<string | null> {\n try {\n return await realpath(p);\n } catch {\n return null;\n }\n}\n\n/**\n * Async variant of `realpathWithinAllowedRoots`. See the sync version for\n * semantics. Resolves the candidate and each root concurrently via\n * `Promise.all` so the worst-case wall-clock time is a single realpath,\n * not N of them serialized.\n */\nexport async function realpathWithinAllowedRootsAsync(\n candidate: string,\n allowedRoots: readonly string[]\n): Promise<string | null> {\n const [resolvedCandidate, ...resolvedRoots] = await Promise.all([\n realpathOrNullAsync(candidate),\n ...allowedRoots.map((r) => realpathOrNullAsync(r)),\n ]);\n if (!resolvedCandidate) return null;\n\n for (let i = 0; i < resolvedRoots.length; i++) {\n const resolvedRoot = resolvedRoots[i] ?? allowedRoots[i];\n if (isWithinRoot(resolvedCandidate, resolvedRoot)) {\n return resolvedCandidate;\n }\n }\n return null;\n}\n","import { AppRouteRouteModule } from \"next/dist/esm/server/route-modules/app-route/module.compiled\";\nimport { RouteKind } from \"next/dist/esm/server/route-kind\";\nimport { patchFetch as _patchFetch } from \"next/dist/esm/server/lib/patch-fetch\";\nimport { addRequestMeta, getRequestMeta, setRequestMeta } from \"next/dist/esm/server/request-meta\";\nimport { getTracer, SpanKind } from \"next/dist/esm/server/lib/trace/tracer\";\nimport { setManifestsSingleton } from \"next/dist/esm/server/app-render/manifests-singleton\";\nimport { normalizeAppPath } from \"next/dist/esm/shared/lib/router/utils/app-paths\";\nimport { NodeNextRequest, NodeNextResponse } from \"next/dist/esm/server/base-http/node\";\nimport { NextRequestAdapter, signalFromNodeResponse } from \"next/dist/esm/server/web/spec-extension/adapters/next-request\";\nimport { BaseServerSpan } from \"next/dist/esm/server/lib/trace/constants\";\nimport { getRevalidateReason } from \"next/dist/esm/server/instrumentation/utils\";\nimport { sendResponse } from \"next/dist/esm/server/send-response\";\nimport { fromNodeOutgoingHttpHeaders, toNodeOutgoingHttpHeaders } from \"next/dist/esm/server/web/utils\";\nimport { getCacheControlHeader } from \"next/dist/esm/server/lib/cache-control\";\nimport { INFINITE_CACHE, NEXT_CACHE_TAGS_HEADER } from \"next/dist/esm/lib/constants\";\nimport { NoFallbackError } from \"next/dist/esm/shared/lib/no-fallback-error.external\";\nimport { CachedRouteKind } from \"next/dist/esm/server/response-cache\";\nimport * as userland from \"INNER_APP_ROUTE\";\n// We inject the nextConfigOutput here so that we can use them in the route\n// module.\nconst nextConfigOutput = \"\"\nconst routeModule = new AppRouteRouteModule({\n definition: {\n kind: RouteKind.APP_ROUTE,\n page: \"/api/directory/list/route\",\n pathname: \"/api/directory/list\",\n filename: \"route\",\n bundlePath: \"\"\n },\n distDir: process.env.__NEXT_RELATIVE_DIST_DIR || '',\n relativeProjectDir: process.env.__NEXT_RELATIVE_PROJECT_DIR || '',\n resolvedPagePath: \"[project]/src/presentation/web/app/api/directory/list/route.ts\",\n nextConfigOutput,\n // The static import is used for initialization (methods, dynamic, etc.).\n userland: userland,\n // In Turbopack dev mode, also provide a getter that calls require() on every\n // request. This re-reads from devModuleCache so HMR updates are picked up,\n // and the async wrapper unwraps async-module Promises (ESM-only\n // serverExternalPackages) automatically.\n ...process.env.TURBOPACK && process.env.__NEXT_DEV_SERVER ? {\n getUserland: ()=>import(\"INNER_APP_ROUTE\")\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;\nfunction patchFetch() {\n return _patchFetch({\n workAsyncStorage,\n workUnitAsyncStorage\n });\n}\nexport { routeModule, workAsyncStorage, workUnitAsyncStorage, serverHooks, patchFetch, };\nexport async function handler(req, res, ctx) {\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 = \"/api/directory/list/route\";\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.__NEXT_MULTI_ZONE_DRAFT_MODE;\n const prepareResult = await routeModule.prepare(req, res, {\n srcPage,\n multiZoneDraftMode\n });\n if (!prepareResult) {\n res.statusCode = 400;\n res.end('Bad Request');\n ctx.waitUntil == null ? void 0 : ctx.waitUntil.call(ctx, Promise.resolve());\n return null;\n }\n const { buildId, params, nextConfig, parsedUrl, isDraftMode, prerenderManifest, routerServerContext, isOnDemandRevalidate, revalidateOnlyGenerated, resolvedPathname, clientReferenceManifest, serverActionsManifest } = prepareResult;\n const normalizedSrcPage = normalizeAppPath(srcPage);\n let isIsr = Boolean(prerenderManifest.dynamicRoutes[normalizedSrcPage] || prerenderManifest.routes[resolvedPathname]);\n const render404 = async ()=>{\n // TODO: should route-module itself handle rendering the 404\n if (routerServerContext == null ? void 0 : 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 if (isIsr && !isDraftMode) {\n const isPrerendered = Boolean(prerenderManifest.routes[resolvedPathname]);\n const prerenderInfo = prerenderManifest.dynamicRoutes[normalizedSrcPage];\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 let cacheKey = null;\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 const supportsDynamicResponse = // If we're in development, we always support dynamic HTML\n routeModule.isDev === true || // If this is not SSG or does not have static paths, then it supports\n // dynamic HTML.\n !isIsr;\n // This is a revalidation request if the request is for a static\n // page and it is not being resumed from a postponed render and\n // it is not a dynamic RSC request then it is a revalidation\n // request.\n const isStaticGeneration = isIsr && !supportsDynamicResponse;\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 const method = req.method || 'GET';\n const tracer = getTracer();\n const activeSpan = tracer.getActiveScopeSpan();\n const isWrappedByNextServer = Boolean(routerServerContext == null ? void 0 : routerServerContext.isWrappedByNextServer);\n const isMinimalMode = Boolean(getRequestMeta(req, 'minimalMode'));\n const incrementalCache = getRequestMeta(req, 'incrementalCache') || await routeModule.getIncrementalCache(req, nextConfig, prerenderManifest, isMinimalMode);\n incrementalCache == null ? void 0 : incrementalCache.resetRequestCache();\n globalThis.__incrementalCache = incrementalCache;\n const context = {\n params,\n previewProps: prerenderManifest.preview,\n renderOpts: {\n experimental: {\n authInterrupts: Boolean(nextConfig.experimental.authInterrupts)\n },\n cacheComponents: Boolean(nextConfig.cacheComponents),\n supportsDynamicResponse,\n incrementalCache,\n cacheLifeProfiles: nextConfig.cacheLife,\n waitUntil: ctx.waitUntil,\n onClose: (cb)=>{\n res.on('close', cb);\n },\n onAfterTaskError: undefined,\n onInstrumentationRequestError: (error, _request, errorContext, silenceLog)=>routeModule.onRequestError(req, error, errorContext, silenceLog, routerServerContext)\n },\n sharedContext: {\n buildId\n }\n };\n const nodeNextReq = new NodeNextRequest(req);\n const nodeNextRes = new NodeNextResponse(res);\n const nextReq = NextRequestAdapter.fromNodeNextRequest(nodeNextReq, signalFromNodeResponse(res));\n try {\n let parentSpan;\n const invokeRouteModule = async (span)=>{\n return routeModule.handle(nextReq, context).finally(()=>{\n if (!span) return;\n span.setAttributes({\n 'http.status_code': res.statusCode,\n 'next.rsc': false\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 if (rootSpanAttributes.get('next.span_type') !== BaseServerSpan.handleRequest) {\n console.warn(`Unexpected root span type '${rootSpanAttributes.get('next.span_type')}'. Please report this Next.js issue https://github.com/vercel/next.js`);\n return;\n }\n const route = rootSpanAttributes.get('next.route');\n if (route) {\n const name = `${method} ${route}`;\n span.setAttributes({\n 'next.route': route,\n 'http.route': route,\n 'next.span_name': name\n });\n span.updateName(name);\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 !== span) {\n parentSpan.setAttribute('http.route', route);\n parentSpan.updateName(name);\n }\n } else {\n span.updateName(`${method} ${srcPage}`);\n }\n });\n };\n const handleResponse = async (currentSpan)=>{\n var _cacheEntry_value;\n const responseGenerator = async ({ previousCacheEntry })=>{\n try {\n if (!isMinimalMode && isOnDemandRevalidate && revalidateOnlyGenerated && !previousCacheEntry) {\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 const response = await invokeRouteModule(currentSpan);\n req.fetchMetrics = context.renderOpts.fetchMetrics;\n let pendingWaitUntil = context.renderOpts.pendingWaitUntil;\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 // 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 // Copy the headers from the response.\n const headers = toNodeOutgoingHttpHeaders(response.headers);\n if (cacheTags) {\n headers[NEXT_CACHE_TAGS_HEADER] = cacheTags;\n }\n if (!headers['content-type'] && blob.type) {\n headers['content-type'] = blob.type;\n }\n const revalidate = typeof context.renderOpts.collectedRevalidate === 'undefined' || context.renderOpts.collectedRevalidate >= INFINITE_CACHE ? false : context.renderOpts.collectedRevalidate;\n const expire = typeof context.renderOpts.collectedExpire === 'undefined' || context.renderOpts.collectedExpire >= INFINITE_CACHE ? undefined : context.renderOpts.collectedExpire;\n // Create the cache entry for the response.\n const cacheEntry = {\n value: {\n kind: CachedRouteKind.APP_ROUTE,\n status: response.status,\n body: Buffer.from(await blob.arrayBuffer()),\n headers\n },\n cacheControl: {\n revalidate,\n expire\n }\n };\n return cacheEntry;\n } else {\n // send response without caching if not ISR\n await sendResponse(nodeNextReq, nodeNextRes, response, context.renderOpts.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 == null ? void 0 : previousCacheEntry.isStale) {\n const silenceLog = false;\n await routeModule.onRequestError(req, err, {\n routerKind: 'App Router',\n routePath: srcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isStaticGeneration,\n isOnDemandRevalidate\n })\n }, silenceLog, routerServerContext);\n }\n throw err;\n }\n };\n const cacheEntry = await routeModule.handleResponse({\n req,\n nextConfig,\n cacheKey,\n routeKind: RouteKind.APP_ROUTE,\n isFallback: false,\n prerenderManifest,\n isRoutePPREnabled: false,\n isOnDemandRevalidate,\n revalidateOnlyGenerated,\n responseGenerator,\n waitUntil: ctx.waitUntil,\n isMinimalMode\n });\n // we don't create a cacheEntry for ISR\n if (!isIsr) {\n return null;\n }\n if ((cacheEntry == null ? void 0 : (_cacheEntry_value = cacheEntry.value) == null ? void 0 : _cacheEntry_value.kind) !== CachedRouteKind.APP_ROUTE) {\n var _cacheEntry_value1;\n throw Object.defineProperty(new Error(`Invariant: app-route received invalid cache entry ${cacheEntry == null ? void 0 : (_cacheEntry_value1 = cacheEntry.value) == null ? void 0 : _cacheEntry_value1.kind}`), \"__NEXT_ERROR_CODE\", {\n value: \"E701\",\n enumerable: false,\n configurable: true\n });\n }\n if (!isMinimalMode) {\n res.setHeader('x-nextjs-cache', isOnDemandRevalidate ? 'REVALIDATED' : cacheEntry.isMiss ? 'MISS' : cacheEntry.isStale ? 'STALE' : 'HIT');\n }\n // Draft mode should never be cached\n if (isDraftMode) {\n res.setHeader('Cache-Control', 'private, no-cache, no-store, max-age=0, must-revalidate');\n }\n const headers = fromNodeOutgoingHttpHeaders(cacheEntry.value.headers);\n if (!(isMinimalMode && isIsr)) {\n headers.delete(NEXT_CACHE_TAGS_HEADER);\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 (cacheEntry.cacheControl && !res.getHeader('Cache-Control') && !headers.get('Cache-Control')) {\n headers.set('Cache-Control', getCacheControlHeader(cacheEntry.cacheControl));\n }\n await sendResponse(nodeNextReq, nodeNextRes, // @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 return null;\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);\n } else {\n parentSpan = tracer.getActiveScopeSpan();\n await tracer.withPropagatedContext(req.headers, ()=>tracer.trace(BaseServerSpan.handleRequest, {\n spanName: `${method} ${srcPage}`,\n kind: SpanKind.SERVER,\n attributes: {\n 'http.method': method,\n 'http.target': req.url\n }\n }, handleResponse), undefined, !isWrappedByNextServer);\n }\n } catch (err) {\n if (!(err instanceof NoFallbackError)) {\n const silenceLog = false;\n await routeModule.onRequestError(req, err, {\n routerKind: 'App Router',\n routePath: normalizedSrcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isStaticGeneration,\n isOnDemandRevalidate\n })\n }, silenceLog, routerServerContext);\n }\n // rethrow so that we can handle serving error page\n // If this is during static generation, throw the error again.\n if (isIsr) throw err;\n // Otherwise, send a 500 response.\n await sendResponse(nodeNextReq, nodeNextRes, new Response(null, {\n status: 500\n }));\n return null;\n }\n}\n\n//# sourceMappingURL=app-route.js.map\n","import { NextResponse } from 'next/server';\nimport { readdir, stat } from 'node:fs/promises';\nimport { homedir } from 'node:os';\nimport path from 'node:path';\nimport { apiError } from '@/lib/api-helpers';\nimport { realpathWithinAllowedRootsAsync } from '@/lib/path-sanitizers';\n\ninterface DirectoryEntry {\n name: string;\n path: string;\n isDirectory: true;\n updatedAt: string;\n}\n\nexport async function GET(request: Request): Promise<NextResponse> {\n const url = new URL(request.url);\n const rawPath = url.searchParams.get('path') ?? homedir();\n const showHidden = url.searchParams.get('showHidden') === 'true';\n\n if (!path.isAbsolute(rawPath)) {\n return NextResponse.json({ error: 'Path must be absolute' }, { status: 400 });\n }\n\n // Keep two names for the same directory:\n //\n // - `displayPath` is what the client originally asked for (after\n // path.resolve normalization). It's what the UI shows in the\n // breadcrumb and what we echo back as `currentPath`. This matches\n // user expectation — e.g. on macOS the user sees /tmp/foo, not the\n // realpath'd /private/tmp/foo.\n //\n // - `physicalPath` is the realpath'd absolute path produced by the\n // path-containment sanitizer. Every FILESYSTEM operation (stat,\n // readdir, per-entry joins) uses this value, NEVER the display\n // path. That gives CodeQL a clean sanitizer→sink flow for\n // js/path-injection and closes the TOCTOU window where a symlink\n // could be swapped between the containment check and the read.\n const displayPath = path.resolve(rawPath);\n const physicalPath = await realpathWithinAllowedRootsAsync(displayPath, [\n process.cwd(),\n homedir(),\n ]);\n if (!physicalPath) {\n // Could be a missing directory OR a path outside the allowed roots.\n // Return a uniform 404 either way so we don't leak existence of\n // arbitrary paths on the host.\n return NextResponse.json({ error: 'Directory not found' }, { status: 404 });\n }\n\n try {\n const dirStat = await stat(physicalPath);\n if (!dirStat.isDirectory()) {\n return NextResponse.json({ error: 'Path is not a directory' }, { status: 400 });\n }\n } catch (error: unknown) {\n if (isErrnoException(error) && error.code === 'ENOENT') {\n return NextResponse.json({ error: 'Directory not found' }, { status: 404 });\n }\n return apiError(500, 'Failed to access directory', error);\n }\n\n try {\n const dirents = await readdir(physicalPath, { withFileTypes: true });\n\n const entries: DirectoryEntry[] = [];\n\n const entryPromises = dirents.map(async (dirent) => {\n if (!showHidden && dirent.name.startsWith('.')) {\n return null;\n }\n\n // Build two path forms per entry: a physical path for stat() and a\n // display path for the response payload. The client navigates using\n // the display path on subsequent requests, so it must match the\n // user-visible form of the parent directory — never the realpath'd\n // form, which would surprise the user with /private/tmp on macOS.\n const physicalEntry = path.join(physicalPath, dirent.name);\n const displayEntry = path.join(displayPath, dirent.name);\n\n try {\n if (dirent.isDirectory()) {\n const entryStat = await stat(physicalEntry);\n return {\n name: dirent.name,\n path: displayEntry,\n isDirectory: true as const,\n updatedAt: entryStat.mtime.toISOString(),\n };\n }\n\n if (dirent.isSymbolicLink()) {\n const entryStat = await stat(physicalEntry);\n if (entryStat.isDirectory()) {\n return {\n name: dirent.name,\n path: displayEntry,\n isDirectory: true as const,\n updatedAt: entryStat.mtime.toISOString(),\n };\n }\n }\n } catch {\n // Skip inaccessible entries (permission denied, broken symlinks)\n }\n\n return null;\n });\n\n const results = await Promise.all(entryPromises);\n for (const result of results) {\n if (result !== null) {\n entries.push(result);\n }\n }\n\n return NextResponse.json({ entries, currentPath: displayPath });\n } catch (error: unknown) {\n return apiError(500, 'Failed to read directory', error);\n }\n}\n\nfunction isErrnoException(error: unknown): error is NodeJS.ErrnoException {\n return error instanceof Error && 'code' in error;\n}\n"],"names":["apiError","status","publicMessage","internalError","detail","Error","message","String","console","error","json","validateParam","value","paramName","trim","realpathOrNull","p","isWithinRoot","resolvedCandidate","resolvedRoot","normRoot","replace","normCandidate","startsWith","realpathWithinAllowedRoots","candidate","allowedRoots","root","realpathOrNullAsync","realpathWithinAllowedRootsAsync","resolvedRoots","Promise","all","map","r","i","length","GET","request","url","URL","rawPath","searchParams","get","showHidden","isAbsolute","physicalPath","process","displayPath","resolve","cwd","dirStat","isDirectory","name","isErrnoException","code","dirents","withFileTypes","entries","entryStat","entryPromises","dirent","physicalEntry","join","displayEntry","path","updatedAt","mtime","toISOString","isSymbolicLink","results","result","push","currentPath"],"mappings":"4wCAAA,IAAA,EAAA,EAAA,CAAA,CAAA,yBAOO,SAASA,AACdC,CAAc,CACdC,CAAqB,CACrBC,CAAuB,EAEvB,GAAIA,EAAe,CACjB,IAAMC,EAASD,aAAyBE,MAAQF,EAAcG,OAAO,CAAGC,OAAOJ,GAE/EK,QAAQC,KAAK,CAAC,CAAC,KAAK,EAAER,EAAO,EAAE,EAAEC,EAAc,EAAE,EAAEE,EAAAA,CAAQ,CAC7D,CACA,OAAO,EAAA,YAAY,CAACM,IAAI,CAAC,CAAED,MAAOP,CAAc,EAAG,QAAED,CAAO,EAC9D,4BCiBA,EAAA,CAAA,CAAA,MACA,IAAA,EAAA,EAAA,CAAA,CAAA,OA8EO,eAAe2B,EAAoBZ,CAAS,EACjD,GAAI,CACF,OAAO,MAAM,CAAA,EAAA,EAAA,QAAQ,AAAR,EAASA,EACxB,CAAE,KAAM,CACN,OAAO,IACT,CACF,CAQO,eAAea,EACpBJ,CAAiB,CACjBC,CAA+B,EAE/B,GAAM,CAACR,EAAmB,GAAGY,EAAc,CAAG,MAAMC,QAAQC,GAAG,CAAC,CAC9DJ,EAAoBH,MACjBC,EAAaO,GAAG,CAAC,AAACC,GAAMN,EAAoBM,IAChD,EACD,GAAI,CAAChB,EAAmB,OAAO,KAE/B,IAAK,IAAIiB,EAAI,EAAGA,EAAIL,EAAcM,MAAM,CAAED,IAAK,AAE7C,GAxEG,AAwEClB,SAxE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9E,MAAM,CAAA,EAAA,EAAA,YAAA,AAAY,EAAC,EAAa,EAChC,IAAI,SAAS,EAAW,KAAK,CAAC,IAAI,CAAE,SAChC,EACA,OAAQ,EAAW,KAAK,CAAC,MAAM,EAAI,GACvC,IACO,IACX,EAGI,GAAyB,EACzB,MAAM,EAAe,EADgB,EAGrC,EAAa,EAAO,kBAAkB,GACtC,MAAM,EAAO,qBAAqB,CAAC,EAAI,OAAO,CAAE,IAAI,EAAO,KAAK,CAAC,EAAA,cAAc,CAAC,aAAa,CAAE,CACvF,SAAU,CAAA,EAAG,EAAO,CAAC,EAAE,EAAA,CAAS,CAChC,KAAM,EAAA,QAAQ,CAAC,MAAM,CACrB,WAAY,CACR,cAAe,EACf,cAAe,EAAI,GAAG,AAC1B,CACJ,EAAG,QAAiB,EAAW,CAAC,GAE5C,CAAE,MAAO,EAAK,CAeV,GAdM,aAAe,EAAA,eAAe,EAEhC,CAFmC,KAE7B,EAAY,cAAc,CAAC,EAAK,EAAK,CACvC,WAAY,aACZ,UAAW,EACX,UAAW,QACX,iBAAkB,CAAA,EAAA,EAAA,mBAAA,AAAmB,EAAC,oBAClC,uBACA,CACJ,EACJ,GAAG,AATgB,EASJ,GAIf,EAAO,MAAM,EAKjB,OAHA,MAAM,CAAA,EAAA,EAAA,YAAA,AAAY,EAAC,EAAa,EAAa,IAAI,SAAS,KAAM,CAC5D,OAAQ,GACZ,IACO,IACX,CACJ,mCA3TA,SAAS,EACL,MAAO,CAAA,EAAA,EAAA,UAAW,AAAX,EAAY,kBACf,uBACA,CACJ,EACJ","ignoreList":[2]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
module.exports=[93695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},
|
|
1
|
+
module.exports=[93695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},2157,(e,t,r)=>{t.exports=e.x("node:fs",()=>require("node:fs"))},50227,(e,t,r)=>{t.exports=e.x("node:path",()=>require("node:path"))},60526,(e,t,r)=>{t.exports=e.x("node:os",()=>require("node:os"))},12714,(e,t,r)=>{t.exports=e.x("node:fs/promises",()=>require("node:fs/promises"))},66680,(e,t,r)=>{t.exports=e.x("node:crypto",()=>require("node:crypto"))},74533,(e,t,r)=>{t.exports=e.x("node:child_process",()=>require("node:child_process"))},18622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},32319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},56704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},24725,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/after-task-async-storage.external.js",()=>require("next/dist/server/app-render/after-task-async-storage.external.js"))},70406,(e,t,r)=>{t.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},14747,(e,t,r)=>{t.exports=e.x("path",()=>require("path"))},85893,35755,19087,58585,e=>{"use strict";var t=e.i(66680),r=e.i(50227);e.i(12714);var a=e.i(60526),s=e.i(2157);function i(){return process.env.SHIPIT_AI_HOME??(0,r.join)((0,a.homedir)(),".shipit-ai")}e.s(["getShipitAiHomeDir",0,i],35755),e.s(["computeWorktreePath",0,function(e,a){let s=e.replace(/\\/g,"/"),n=(0,t.createHash)("sha256").update(s).digest("hex").slice(0,16),o=a.replace(/\//g,"-");return(0,r.join)(i(),"repos",n,"wt",o).replace(/\\/g,"/")}],19087);var n=e.i(74533);process.platform;let o={platform:process.platform,exec:(e,t)=>(0,n.execSync)(e,t),stat:e=>(0,s.statSync)(e)},l={darwin:`osascript -e 'set f to (choose file with prompt "Select files" with multiple selections allowed)' -e 'set paths to {}' -e 'repeat with i in f' -e 'copy POSIX path of i to end of paths' -e 'end repeat' -e 'set text item delimiters to "
|
|
2
2
|
"' -e 'paths as text'`,linux:'zenity --file-selection --multiple --separator="\\n" --title="Select files" 2>/dev/null',win32:"powershell -NoProfile -Command \"Add-Type -AssemblyName System.Windows.Forms; $d = New-Object System.Windows.Forms.OpenFileDialog; $d.Multiselect = $true; $d.Title = 'Select files'; if ($d.ShowDialog() -eq 'OK') { $d.FileNames -join [char]10 } else { exit 1 }\""};e.s(["FileDialogService",0,class{deps;constructor(e={}){this.deps={...o,...e}}getCommand(){return l[this.deps.platform]??null}pickFiles(){let e=this.getCommand();if(!e)throw Error(`Unsupported platform: ${this.deps.platform}`);try{let t=this.deps.exec(e,{encoding:"utf-8",timeout:6e4}).split("\n").map(e=>e.trim()).filter(e=>e.length>0);if(0===t.length)return null;return t.map(e=>{let t=this.deps.stat(e);return{path:e,name:e.split(/[/\\]/).pop(),size:t.size}})}catch(e){var t;if("object"==typeof(t=e)&&null!==t&&"status"in t&&1===e.status)return null;throw e}}}],58585),e.s([],85893)},24868,(e,t,r)=>{t.exports=e.x("fs/promises",()=>require("fs/promises"))},57113,e=>{"use strict";var t=e.i(29932),r=e.i(88797),a=e.i(78439),s=e.i(21387),i=e.i(351),n=e.i(1286),o=e.i(31060),l=e.i(67760),p=e.i(13435),d=e.i(60316),u=e.i(37130),c=e.i(31516),h=e.i(63144),m=e.i(3719),x=e.i(66941),g=e.i(93695);e.i(76574);var f=e.i(45014),v=e.i(25716),w=e.i(24868),R=e.i(14747);e.i(85893);var y=e.i(35755);let C={".png":"image/png",".jpg":"image/jpeg",".jpeg":"image/jpeg",".gif":"image/gif",".webp":"image/webp",".svg":"image/svg+xml",".bmp":"image/bmp",".mp4":"video/mp4",".webm":"video/webm",".mov":"video/quicktime",".txt":"text/plain",".log":"text/plain",".json":"application/json",".cast":"application/json"};async function E(e){let t=e.nextUrl.searchParams.get("path");if(!t)return v.NextResponse.json({error:"Missing path parameter"},{status:400});let r=(0,R.resolve)(t),a=(0,R.resolve)((0,y.getShipitAiHomeDir)(),"repos");if(!r.startsWith(a))return v.NextResponse.json({error:"Access denied"},{status:403});try{await (0,w.stat)(r);let e=await (0,w.readFile)(r),t=C[(0,R.extname)(r).toLowerCase()]??"application/octet-stream";return new v.NextResponse(e,{headers:{"Content-Type":t,"Cache-Control":"private, max-age=3600"}})}catch{return v.NextResponse.json({error:"File not found"},{status:404})}}e.s(["GET",0,E],79095);var b=e.i(79095);let A=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/evidence/route",pathname:"/api/evidence",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/src/presentation/web/app/api/evidence/route.ts",nextConfigOutput:"",userland:b,...{}}),{workAsyncStorage:S,workUnitAsyncStorage:q,serverHooks:N}=A;async function j(e,t,a){a.requestMeta&&(0,s.setRequestMeta)(e,a.requestMeta),A.isDev&&(0,s.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let v="/api/evidence/route";v=v.replace(/\/index$/,"")||"/";let w=await A.prepare(e,t,{srcPage:v,multiZoneDraftMode:!1});if(!w)return t.statusCode=400,t.end("Bad Request"),null==a.waitUntil||a.waitUntil.call(a,Promise.resolve()),null;let{buildId:R,params:y,nextConfig:C,parsedUrl:E,isDraftMode:b,prerenderManifest:S,routerServerContext:q,isOnDemandRevalidate:N,revalidateOnlyGenerated:j,resolvedPathname:T,clientReferenceManifest:P,serverActionsManifest:O}=w,_=(0,o.normalizeAppPath)(v),k=!!(S.dynamicRoutes[_]||S.routes[T]),H=async()=>((null==q?void 0:q.render404)?await q.render404(e,t,E,!1):t.end("This page could not be found"),null);if(k&&!b){let e=!!S.routes[T],t=S.dynamicRoutes[_];if(t&&!1===t.fallback&&!e){if(C.adapterPath)return await H();throw new g.NoFallbackError}}let I=null;!k||A.isDev||b||(I="/index"===(I=T)?"/":I);let D=!0===A.isDev||!k,M=k&&!D;O&&P&&(0,n.setManifestsSingleton)({page:v,clientReferenceManifest:P,serverActionsManifest:O});let U=e.method||"GET",F=(0,i.getTracer)(),$=F.getActiveScopeSpan(),K=!!(null==q?void 0:q.isWrappedByNextServer),W=!!(0,s.getRequestMeta)(e,"minimalMode"),B=(0,s.getRequestMeta)(e,"incrementalCache")||await A.getIncrementalCache(e,C,S,W);null==B||B.resetRequestCache(),globalThis.__incrementalCache=B;let L={params:y,previewProps:S.preview,renderOpts:{experimental:{authInterrupts:!!C.experimental.authInterrupts},cacheComponents:!!C.cacheComponents,supportsDynamicResponse:D,incrementalCache:B,cacheLifeProfiles:C.cacheLife,waitUntil:a.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,a,s)=>A.onRequestError(e,t,a,s,q)},sharedContext:{buildId:R}},z=new l.NodeNextRequest(e),G=new l.NodeNextResponse(t),X=p.NextRequestAdapter.fromNodeNextRequest(z,(0,p.signalFromNodeResponse)(t));try{let s,n=async e=>A.handle(X,L).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let r=F.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==d.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${r.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let a=r.get("next.route");if(a){let t=`${U} ${a}`;e.setAttributes({"next.route":a,"http.route":a,"next.span_name":t}),e.updateName(t),s&&s!==e&&(s.setAttribute("http.route",a),s.updateName(t))}else e.updateName(`${U} ${v}`)}),o=async s=>{var i,o;let l=async({previousCacheEntry:r})=>{try{if(!W&&N&&j&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let i=await n(s);e.fetchMetrics=L.renderOpts.fetchMetrics;let o=L.renderOpts.pendingWaitUntil;o&&a.waitUntil&&(a.waitUntil(o),o=void 0);let l=L.renderOpts.collectedTags;if(!k)return await (0,c.sendResponse)(z,G,i,L.renderOpts.pendingWaitUntil),null;{let e=await i.blob(),t=(0,h.toNodeOutgoingHttpHeaders)(i.headers);l&&(t[x.NEXT_CACHE_TAGS_HEADER]=l),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==L.renderOpts.collectedRevalidate&&!(L.renderOpts.collectedRevalidate>=x.INFINITE_CACHE)&&L.renderOpts.collectedRevalidate,a=void 0===L.renderOpts.collectedExpire||L.renderOpts.collectedExpire>=x.INFINITE_CACHE?void 0:L.renderOpts.collectedExpire;return{value:{kind:f.CachedRouteKind.APP_ROUTE,status:i.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:a}}}}catch(t){throw(null==r?void 0:r.isStale)&&await A.onRequestError(e,t,{routerKind:"App Router",routePath:v,routeType:"route",revalidateReason:(0,u.getRevalidateReason)({isStaticGeneration:M,isOnDemandRevalidate:N})},!1,q),t}},p=await A.handleResponse({req:e,nextConfig:C,cacheKey:I,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:S,isRoutePPREnabled:!1,isOnDemandRevalidate:N,revalidateOnlyGenerated:j,responseGenerator:l,waitUntil:a.waitUntil,isMinimalMode:W});if(!k)return null;if((null==p||null==(i=p.value)?void 0:i.kind)!==f.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==p||null==(o=p.value)?void 0:o.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});W||t.setHeader("x-nextjs-cache",N?"REVALIDATED":p.isMiss?"MISS":p.isStale?"STALE":"HIT"),b&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let d=(0,h.fromNodeOutgoingHttpHeaders)(p.value.headers);return W&&k||d.delete(x.NEXT_CACHE_TAGS_HEADER),!p.cacheControl||t.getHeader("Cache-Control")||d.get("Cache-Control")||d.set("Cache-Control",(0,m.getCacheControlHeader)(p.cacheControl)),await (0,c.sendResponse)(z,G,new Response(p.value.body,{headers:d,status:p.value.status||200})),null};K&&$?await o($):(s=F.getActiveScopeSpan(),await F.withPropagatedContext(e.headers,()=>F.trace(d.BaseServerSpan.handleRequest,{spanName:`${U} ${v}`,kind:i.SpanKind.SERVER,attributes:{"http.method":U,"http.target":e.url}},o),void 0,!K))}catch(t){if(t instanceof g.NoFallbackError||await A.onRequestError(e,t,{routerKind:"App Router",routePath:_,routeType:"route",revalidateReason:(0,u.getRevalidateReason)({isStaticGeneration:M,isOnDemandRevalidate:N})},!1,q),k)throw t;return await (0,c.sendResponse)(z,G,new Response(null,{status:500})),null}}e.s(["handler",0,j,"patchFetch",0,function(){return(0,a.patchFetch)({workAsyncStorage:S,workUnitAsyncStorage:q})},"routeModule",0,A,"serverHooks",0,N,"workAsyncStorage",0,S,"workUnitAsyncStorage",0,q],57113)}];
|
|
3
3
|
|
|
4
|
-
//# sourceMappingURL=%5Broot-of-the-server%
|
|
4
|
+
//# sourceMappingURL=%5Broot-of-the-server%5D__0gfvkg8._.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
module.exports=[93695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},18622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},32319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},56704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},24725,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/after-task-async-storage.external.js",()=>require("next/dist/server/app-render/after-task-async-storage.external.js"))},70406,(e,t,r)=>{t.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},
|
|
1
|
+
module.exports=[93695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},18622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},32319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},56704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},24725,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/after-task-async-storage.external.js",()=>require("next/dist/server/app-render/after-task-async-storage.external.js"))},70406,(e,t,r)=>{t.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},2157,(e,t,r)=>{t.exports=e.x("node:fs",()=>require("node:fs"))},50227,(e,t,r)=>{t.exports=e.x("node:path",()=>require("node:path"))},60526,(e,t,r)=>{t.exports=e.x("node:os",()=>require("node:os"))},12714,(e,t,r)=>{t.exports=e.x("node:fs/promises",()=>require("node:fs/promises"))},66680,(e,t,r)=>{t.exports=e.x("node:crypto",()=>require("node:crypto"))},74533,(e,t,r)=>{t.exports=e.x("node:child_process",()=>require("node:child_process"))},85893,35755,19087,58585,e=>{"use strict";var t=e.i(66680),r=e.i(50227);e.i(12714);var a=e.i(60526),n=e.i(2157);function s(){return process.env.SHIPIT_AI_HOME??(0,r.join)((0,a.homedir)(),".shipit-ai")}e.s(["getShipitAiHomeDir",0,s],35755),e.s(["computeWorktreePath",0,function(e,a){let n=e.replace(/\\/g,"/"),i=(0,t.createHash)("sha256").update(n).digest("hex").slice(0,16),o=a.replace(/\//g,"-");return(0,r.join)(s(),"repos",i,"wt",o).replace(/\\/g,"/")}],19087);var i=e.i(74533);process.platform;let o={platform:process.platform,exec:(e,t)=>(0,i.execSync)(e,t),stat:e=>(0,n.statSync)(e)},l={darwin:`osascript -e 'set f to (choose file with prompt "Select files" with multiple selections allowed)' -e 'set paths to {}' -e 'repeat with i in f' -e 'copy POSIX path of i to end of paths' -e 'end repeat' -e 'set text item delimiters to "
|
|
2
2
|
"' -e 'paths as text'`,linux:'zenity --file-selection --multiple --separator="\\n" --title="Select files" 2>/dev/null',win32:"powershell -NoProfile -Command \"Add-Type -AssemblyName System.Windows.Forms; $d = New-Object System.Windows.Forms.OpenFileDialog; $d.Multiselect = $true; $d.Title = 'Select files'; if ($d.ShowDialog() -eq 'OK') { $d.FileNames -join [char]10 } else { exit 1 }\""};e.s(["FileDialogService",0,class{deps;constructor(e={}){this.deps={...o,...e}}getCommand(){return l[this.deps.platform]??null}pickFiles(){let e=this.getCommand();if(!e)throw Error(`Unsupported platform: ${this.deps.platform}`);try{let t=this.deps.exec(e,{encoding:"utf-8",timeout:6e4}).split("\n").map(e=>e.trim()).filter(e=>e.length>0);if(0===t.length)return null;return t.map(e=>{let t=this.deps.stat(e);return{path:e,name:e.split(/[/\\]/).pop(),size:t.size}})}catch(e){var t;if("object"==typeof(t=e)&&null!==t&&"status"in t&&1===e.status)return null;throw e}}}],58585),e.s([],85893)},34194,e=>{"use strict";var t=e.i(29932),r=e.i(88797),a=e.i(78439),n=e.i(21387),s=e.i(351),i=e.i(1286),o=e.i(31060),l=e.i(67760),p=e.i(13435),d=e.i(60316),u=e.i(37130),c=e.i(31516),h=e.i(63144),x=e.i(3719),f=e.i(66941),m=e.i(93695);e.i(76574);var g=e.i(45014),v=e.i(25716);e.i(85893);var R=e.i(58585);async function w(){let e=new R.FileDialogService;try{let t=e.pickFiles();return v.NextResponse.json({files:t,cancelled:null===t})}catch(t){let e=t instanceof Error?t.message:"Failed to open file dialog";return v.NextResponse.json({files:null,cancelled:!1,error:e},{status:500})}}e.s(["POST",0,w],322);var y=e.i(322);let E=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/dialog/pick-files/route",pathname:"/api/dialog/pick-files",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/src/presentation/web/app/api/dialog/pick-files/route.ts",nextConfigOutput:"",userland:y,...{}}),{workAsyncStorage:C,workUnitAsyncStorage:S,serverHooks:A}=E;async function b(e,t,a){a.requestMeta&&(0,n.setRequestMeta)(e,a.requestMeta),E.isDev&&(0,n.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let v="/api/dialog/pick-files/route";v=v.replace(/\/index$/,"")||"/";let R=await E.prepare(e,t,{srcPage:v,multiZoneDraftMode:!1});if(!R)return t.statusCode=400,t.end("Bad Request"),null==a.waitUntil||a.waitUntil.call(a,Promise.resolve()),null;let{buildId:w,params:y,nextConfig:C,parsedUrl:S,isDraftMode:A,prerenderManifest:b,routerServerContext:q,isOnDemandRevalidate:N,revalidateOnlyGenerated:P,resolvedPathname:T,clientReferenceManifest:k,serverActionsManifest:O}=R,_=(0,o.normalizeAppPath)(v),j=!!(b.dynamicRoutes[_]||b.routes[T]),H=async()=>((null==q?void 0:q.render404)?await q.render404(e,t,S,!1):t.end("This page could not be found"),null);if(j&&!A){let e=!!b.routes[T],t=b.dynamicRoutes[_];if(t&&!1===t.fallback&&!e){if(C.adapterPath)return await H();throw new m.NoFallbackError}}let I=null;!j||E.isDev||A||(I="/index"===(I=T)?"/":I);let D=!0===E.isDev||!j,F=j&&!D;O&&k&&(0,i.setManifestsSingleton)({page:v,clientReferenceManifest:k,serverActionsManifest:O});let M=e.method||"GET",U=(0,s.getTracer)(),$=U.getActiveScopeSpan(),K=!!(null==q?void 0:q.isWrappedByNextServer),B=!!(0,n.getRequestMeta)(e,"minimalMode"),W=(0,n.getRequestMeta)(e,"incrementalCache")||await E.getIncrementalCache(e,C,b,B);null==W||W.resetRequestCache(),globalThis.__incrementalCache=W;let L={params:y,previewProps:b.preview,renderOpts:{experimental:{authInterrupts:!!C.experimental.authInterrupts},cacheComponents:!!C.cacheComponents,supportsDynamicResponse:D,incrementalCache:W,cacheLifeProfiles:C.cacheLife,waitUntil:a.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,a,n)=>E.onRequestError(e,t,a,n,q)},sharedContext:{buildId:w}},z=new l.NodeNextRequest(e),X=new l.NodeNextResponse(t),G=p.NextRequestAdapter.fromNodeNextRequest(z,(0,p.signalFromNodeResponse)(t));try{let n,i=async e=>E.handle(G,L).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let r=U.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==d.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${r.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let a=r.get("next.route");if(a){let t=`${M} ${a}`;e.setAttributes({"next.route":a,"http.route":a,"next.span_name":t}),e.updateName(t),n&&n!==e&&(n.setAttribute("http.route",a),n.updateName(t))}else e.updateName(`${M} ${v}`)}),o=async n=>{var s,o;let l=async({previousCacheEntry:r})=>{try{if(!B&&N&&P&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let s=await i(n);e.fetchMetrics=L.renderOpts.fetchMetrics;let o=L.renderOpts.pendingWaitUntil;o&&a.waitUntil&&(a.waitUntil(o),o=void 0);let l=L.renderOpts.collectedTags;if(!j)return await (0,c.sendResponse)(z,X,s,L.renderOpts.pendingWaitUntil),null;{let e=await s.blob(),t=(0,h.toNodeOutgoingHttpHeaders)(s.headers);l&&(t[f.NEXT_CACHE_TAGS_HEADER]=l),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==L.renderOpts.collectedRevalidate&&!(L.renderOpts.collectedRevalidate>=f.INFINITE_CACHE)&&L.renderOpts.collectedRevalidate,a=void 0===L.renderOpts.collectedExpire||L.renderOpts.collectedExpire>=f.INFINITE_CACHE?void 0:L.renderOpts.collectedExpire;return{value:{kind:g.CachedRouteKind.APP_ROUTE,status:s.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:a}}}}catch(t){throw(null==r?void 0:r.isStale)&&await E.onRequestError(e,t,{routerKind:"App Router",routePath:v,routeType:"route",revalidateReason:(0,u.getRevalidateReason)({isStaticGeneration:F,isOnDemandRevalidate:N})},!1,q),t}},p=await E.handleResponse({req:e,nextConfig:C,cacheKey:I,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:b,isRoutePPREnabled:!1,isOnDemandRevalidate:N,revalidateOnlyGenerated:P,responseGenerator:l,waitUntil:a.waitUntil,isMinimalMode:B});if(!j)return null;if((null==p||null==(s=p.value)?void 0:s.kind)!==g.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==p||null==(o=p.value)?void 0:o.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});B||t.setHeader("x-nextjs-cache",N?"REVALIDATED":p.isMiss?"MISS":p.isStale?"STALE":"HIT"),A&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let d=(0,h.fromNodeOutgoingHttpHeaders)(p.value.headers);return B&&j||d.delete(f.NEXT_CACHE_TAGS_HEADER),!p.cacheControl||t.getHeader("Cache-Control")||d.get("Cache-Control")||d.set("Cache-Control",(0,x.getCacheControlHeader)(p.cacheControl)),await (0,c.sendResponse)(z,X,new Response(p.value.body,{headers:d,status:p.value.status||200})),null};K&&$?await o($):(n=U.getActiveScopeSpan(),await U.withPropagatedContext(e.headers,()=>U.trace(d.BaseServerSpan.handleRequest,{spanName:`${M} ${v}`,kind:s.SpanKind.SERVER,attributes:{"http.method":M,"http.target":e.url}},o),void 0,!K))}catch(t){if(t instanceof m.NoFallbackError||await E.onRequestError(e,t,{routerKind:"App Router",routePath:_,routeType:"route",revalidateReason:(0,u.getRevalidateReason)({isStaticGeneration:F,isOnDemandRevalidate:N})},!1,q),j)throw t;return await (0,c.sendResponse)(z,X,new Response(null,{status:500})),null}}e.s(["handler",0,b,"patchFetch",0,function(){return(0,a.patchFetch)({workAsyncStorage:C,workUnitAsyncStorage:S})},"routeModule",0,E,"serverHooks",0,A,"workAsyncStorage",0,C,"workUnitAsyncStorage",0,S],34194)}];
|
|
3
3
|
|
|
4
|
-
//# sourceMappingURL=%5Broot-of-the-server%
|
|
4
|
+
//# sourceMappingURL=%5Broot-of-the-server%5D__0hcp97v._.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
module.exports=[93695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},
|
|
1
|
+
module.exports=[93695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},2157,(e,t,r)=>{t.exports=e.x("node:fs",()=>require("node:fs"))},50227,(e,t,r)=>{t.exports=e.x("node:path",()=>require("node:path"))},60526,(e,t,r)=>{t.exports=e.x("node:os",()=>require("node:os"))},12714,(e,t,r)=>{t.exports=e.x("node:fs/promises",()=>require("node:fs/promises"))},66680,(e,t,r)=>{t.exports=e.x("node:crypto",()=>require("node:crypto"))},74533,(e,t,r)=>{t.exports=e.x("node:child_process",()=>require("node:child_process"))},18622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},32319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},56704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},24725,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/after-task-async-storage.external.js",()=>require("next/dist/server/app-render/after-task-async-storage.external.js"))},70406,(e,t,r)=>{t.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},14747,(e,t,r)=>{t.exports=e.x("path",()=>require("path"))},85893,35755,19087,58585,e=>{"use strict";var t=e.i(66680),r=e.i(50227);e.i(12714);var a=e.i(60526),n=e.i(2157);function s(){return process.env.SHIPIT_AI_HOME??(0,r.join)((0,a.homedir)(),".shipit-ai")}e.s(["getShipitAiHomeDir",0,s],35755),e.s(["computeWorktreePath",0,function(e,a){let n=e.replace(/\\/g,"/"),i=(0,t.createHash)("sha256").update(n).digest("hex").slice(0,16),o=a.replace(/\//g,"-");return(0,r.join)(s(),"repos",i,"wt",o).replace(/\\/g,"/")}],19087);var i=e.i(74533);process.platform;let o={platform:process.platform,exec:(e,t)=>(0,i.execSync)(e,t),stat:e=>(0,n.statSync)(e)},l={darwin:`osascript -e 'set f to (choose file with prompt "Select files" with multiple selections allowed)' -e 'set paths to {}' -e 'repeat with i in f' -e 'copy POSIX path of i to end of paths' -e 'end repeat' -e 'set text item delimiters to "
|
|
2
2
|
"' -e 'paths as text'`,linux:'zenity --file-selection --multiple --separator="\\n" --title="Select files" 2>/dev/null',win32:"powershell -NoProfile -Command \"Add-Type -AssemblyName System.Windows.Forms; $d = New-Object System.Windows.Forms.OpenFileDialog; $d.Multiselect = $true; $d.Title = 'Select files'; if ($d.ShowDialog() -eq 'OK') { $d.FileNames -join [char]10 } else { exit 1 }\""};e.s(["FileDialogService",0,class{deps;constructor(e={}){this.deps={...o,...e}}getCommand(){return l[this.deps.platform]??null}pickFiles(){let e=this.getCommand();if(!e)throw Error(`Unsupported platform: ${this.deps.platform}`);try{let t=this.deps.exec(e,{encoding:"utf-8",timeout:6e4}).split("\n").map(e=>e.trim()).filter(e=>e.length>0);if(0===t.length)return null;return t.map(e=>{let t=this.deps.stat(e);return{path:e,name:e.split(/[/\\]/).pop(),size:t.size}})}catch(e){var t;if("object"==typeof(t=e)&&null!==t&&"status"in t&&1===e.status)return null;throw e}}}],58585),e.s([],85893)},24868,(e,t,r)=>{t.exports=e.x("fs/promises",()=>require("fs/promises"))},54556,e=>{"use strict";var t=e.i(29932),r=e.i(88797),a=e.i(78439),n=e.i(21387),s=e.i(351),i=e.i(1286),o=e.i(31060),l=e.i(67760),p=e.i(13435),d=e.i(60316),u=e.i(37130),c=e.i(31516),h=e.i(63144),m=e.i(3719),x=e.i(66941),f=e.i(93695);e.i(76574);var g=e.i(45014),v=e.i(25716),w=e.i(24868),R=e.i(14747);e.i(85893);var y=e.i(35755);let C={".png":"image/png",".jpg":"image/jpeg",".jpeg":"image/jpeg",".gif":"image/gif",".webp":"image/webp",".svg":"image/svg+xml",".bmp":"image/bmp",".ico":"image/x-icon",".pdf":"application/pdf",".txt":"text/plain",".md":"text/markdown",".json":"application/json",".yaml":"text/yaml",".yml":"text/yaml"};async function E(e,t){let r=(0,R.basename)(e);try{for(let e of(await (0,w.readdir)(t,{withFileTypes:!0}))){if(!e.isDirectory())continue;let a=(0,R.join)(t,e.name,r);try{return await (0,w.stat)(a),a}catch{}}}catch{}return null}function b(e,t){return(0,w.readFile)(e).then(r=>{let a=C[(0,R.extname)(e).toLowerCase()]??t??"application/octet-stream";return new v.NextResponse(r,{headers:{"Content-Type":a,"Cache-Control":"private, max-age=3600"}})})}async function A(e){let t=e.nextUrl.searchParams.get("path"),r=e.nextUrl.searchParams.get("mimeType");if(!t)return v.NextResponse.json({error:"Missing path parameter"},{status:400});let a=(0,R.resolve)((0,y.getShipitAiHomeDir)(),"attachments");if(!(0,R.resolve)(t).startsWith(a))return v.NextResponse.json({error:"Access denied"},{status:403});try{return await (0,w.stat)(t),await b(t,r)}catch{let e=await E(t,a);if(e)return await b(e,r);return v.NextResponse.json({error:"File not found"},{status:404})}}e.s(["GET",0,A],1195);var S=e.i(1195);let q=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/attachments/preview/route",pathname:"/api/attachments/preview",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/src/presentation/web/app/api/attachments/preview/route.ts",nextConfigOutput:"",userland:S,...{}}),{workAsyncStorage:N,workUnitAsyncStorage:j,serverHooks:T}=q;async function P(e,t,a){a.requestMeta&&(0,n.setRequestMeta)(e,a.requestMeta),q.isDev&&(0,n.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let v="/api/attachments/preview/route";v=v.replace(/\/index$/,"")||"/";let w=await q.prepare(e,t,{srcPage:v,multiZoneDraftMode:!1});if(!w)return t.statusCode=400,t.end("Bad Request"),null==a.waitUntil||a.waitUntil.call(a,Promise.resolve()),null;let{buildId:R,params:y,nextConfig:C,parsedUrl:E,isDraftMode:b,prerenderManifest:A,routerServerContext:S,isOnDemandRevalidate:N,revalidateOnlyGenerated:j,resolvedPathname:T,clientReferenceManifest:P,serverActionsManifest:O}=w,_=(0,o.normalizeAppPath)(v),k=!!(A.dynamicRoutes[_]||A.routes[T]),H=async()=>((null==S?void 0:S.render404)?await S.render404(e,t,E,!1):t.end("This page could not be found"),null);if(k&&!b){let e=!!A.routes[T],t=A.dynamicRoutes[_];if(t&&!1===t.fallback&&!e){if(C.adapterPath)return await H();throw new f.NoFallbackError}}let I=null;!k||q.isDev||b||(I="/index"===(I=T)?"/":I);let D=!0===q.isDev||!k,U=k&&!D;O&&P&&(0,i.setManifestsSingleton)({page:v,clientReferenceManifest:P,serverActionsManifest:O});let M=e.method||"GET",F=(0,s.getTracer)(),$=F.getActiveScopeSpan(),K=!!(null==S?void 0:S.isWrappedByNextServer),W=!!(0,n.getRequestMeta)(e,"minimalMode"),B=(0,n.getRequestMeta)(e,"incrementalCache")||await q.getIncrementalCache(e,C,A,W);null==B||B.resetRequestCache(),globalThis.__incrementalCache=B;let L={params:y,previewProps:A.preview,renderOpts:{experimental:{authInterrupts:!!C.experimental.authInterrupts},cacheComponents:!!C.cacheComponents,supportsDynamicResponse:D,incrementalCache:B,cacheLifeProfiles:C.cacheLife,waitUntil:a.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,a,n)=>q.onRequestError(e,t,a,n,S)},sharedContext:{buildId:R}},z=new l.NodeNextRequest(e),G=new l.NodeNextResponse(t),X=p.NextRequestAdapter.fromNodeNextRequest(z,(0,p.signalFromNodeResponse)(t));try{let n,i=async e=>q.handle(X,L).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let r=F.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==d.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${r.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let a=r.get("next.route");if(a){let t=`${M} ${a}`;e.setAttributes({"next.route":a,"http.route":a,"next.span_name":t}),e.updateName(t),n&&n!==e&&(n.setAttribute("http.route",a),n.updateName(t))}else e.updateName(`${M} ${v}`)}),o=async n=>{var s,o;let l=async({previousCacheEntry:r})=>{try{if(!W&&N&&j&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let s=await i(n);e.fetchMetrics=L.renderOpts.fetchMetrics;let o=L.renderOpts.pendingWaitUntil;o&&a.waitUntil&&(a.waitUntil(o),o=void 0);let l=L.renderOpts.collectedTags;if(!k)return await (0,c.sendResponse)(z,G,s,L.renderOpts.pendingWaitUntil),null;{let e=await s.blob(),t=(0,h.toNodeOutgoingHttpHeaders)(s.headers);l&&(t[x.NEXT_CACHE_TAGS_HEADER]=l),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==L.renderOpts.collectedRevalidate&&!(L.renderOpts.collectedRevalidate>=x.INFINITE_CACHE)&&L.renderOpts.collectedRevalidate,a=void 0===L.renderOpts.collectedExpire||L.renderOpts.collectedExpire>=x.INFINITE_CACHE?void 0:L.renderOpts.collectedExpire;return{value:{kind:g.CachedRouteKind.APP_ROUTE,status:s.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:a}}}}catch(t){throw(null==r?void 0:r.isStale)&&await q.onRequestError(e,t,{routerKind:"App Router",routePath:v,routeType:"route",revalidateReason:(0,u.getRevalidateReason)({isStaticGeneration:U,isOnDemandRevalidate:N})},!1,S),t}},p=await q.handleResponse({req:e,nextConfig:C,cacheKey:I,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:A,isRoutePPREnabled:!1,isOnDemandRevalidate:N,revalidateOnlyGenerated:j,responseGenerator:l,waitUntil:a.waitUntil,isMinimalMode:W});if(!k)return null;if((null==p||null==(s=p.value)?void 0:s.kind)!==g.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==p||null==(o=p.value)?void 0:o.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});W||t.setHeader("x-nextjs-cache",N?"REVALIDATED":p.isMiss?"MISS":p.isStale?"STALE":"HIT"),b&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let d=(0,h.fromNodeOutgoingHttpHeaders)(p.value.headers);return W&&k||d.delete(x.NEXT_CACHE_TAGS_HEADER),!p.cacheControl||t.getHeader("Cache-Control")||d.get("Cache-Control")||d.set("Cache-Control",(0,m.getCacheControlHeader)(p.cacheControl)),await (0,c.sendResponse)(z,G,new Response(p.value.body,{headers:d,status:p.value.status||200})),null};K&&$?await o($):(n=F.getActiveScopeSpan(),await F.withPropagatedContext(e.headers,()=>F.trace(d.BaseServerSpan.handleRequest,{spanName:`${M} ${v}`,kind:s.SpanKind.SERVER,attributes:{"http.method":M,"http.target":e.url}},o),void 0,!K))}catch(t){if(t instanceof f.NoFallbackError||await q.onRequestError(e,t,{routerKind:"App Router",routePath:_,routeType:"route",revalidateReason:(0,u.getRevalidateReason)({isStaticGeneration:U,isOnDemandRevalidate:N})},!1,S),k)throw t;return await (0,c.sendResponse)(z,G,new Response(null,{status:500})),null}}e.s(["handler",0,P,"patchFetch",0,function(){return(0,a.patchFetch)({workAsyncStorage:N,workUnitAsyncStorage:j})},"routeModule",0,q,"serverHooks",0,T,"workAsyncStorage",0,N,"workUnitAsyncStorage",0,j],54556)}];
|
|
3
3
|
|
|
4
|
-
//# sourceMappingURL=%5Broot-of-the-server%
|
|
4
|
+
//# sourceMappingURL=%5Broot-of-the-server%5D__0iel39d._.js.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
module.exports=[18622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},32319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},56704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},24725,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/after-task-async-storage.external.js",()=>require("next/dist/server/app-render/after-task-async-storage.external.js"))},70406,(e,t,r)=>{t.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},93695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},40060,e=>{"use strict";e.s(["resolve",0,function(e){let t=globalThis.__shipitAiContainer;if(!t)throw Error("DI container not available. Ensure the CLI bootstrap or dev-server has initialized it.");return t.resolve(e)}])},24934,e=>{"use strict";var t=e.i(25716);e.s(["apiError",0,function(e,r,n){if(n){let t=n instanceof Error?n.message:String(n);console.error(`[API ${e}] ${r}: ${t}`)}return t.NextResponse.json({error:r},{status:e})}])},15665,e=>{"use strict";var t=e.i(29932),r=e.i(88797),n=e.i(78439),a=e.i(21387),s=e.i(351),i=e.i(1286),o=e.i(31060),l=e.i(67760),d=e.i(13435),u=e.i(60316),c=e.i(37130),p=e.i(31516),h=e.i(63144),v=e.i(3719),x=e.i(66941),f=e.i(93695);e.i(76574);var R=e.i(45014),g=e.i(40060),m=e.i(24934);async function w(e,{params:t}){let{id:r}=await t;try{let t=(0,g.resolve)("IInteractiveSessionService");if(!await t.getSession(r))return new Response(JSON.stringify({error:"Session not found"}),{status:404,headers:{"Content-Type":"application/json"}});let n=new TextEncoder,a=new ReadableStream({start(a){let s=!1;function i(e){if(!s)try{a.enqueue(n.encode(e))}catch{}}i(": connected\n\n");let o=setInterval(()=>{i(": heartbeat\n\n")},15e3),l=t.subscribe(r,e=>{if(e.done)i(`event: done
|
|
2
|
+
data: ${JSON.stringify({done:!0,sessionId:r})}
|
|
3
|
+
|
|
4
|
+
`);else if(e.log){let t={log:e.log,sessionId:r};i(`event: log
|
|
5
|
+
data: ${JSON.stringify(t)}
|
|
6
|
+
|
|
7
|
+
`)}else if(e.delta){let t={delta:e.delta,sessionId:r};i(`event: delta
|
|
8
|
+
data: ${JSON.stringify(t)}
|
|
9
|
+
|
|
10
|
+
`)}});e.signal.addEventListener("abort",function(){if(!s){s=!0,clearInterval(o),l();try{a.close()}catch{}}},{once:!0})}});return new Response(a,{headers:{"Content-Type":"text/event-stream","Cache-Control":"no-cache",Connection:"keep-alive"}})}catch(e){return(0,m.apiError)(500,"Failed to open interactive session stream",e)}}e.s(["GET",0,w,"dynamic",0,"force-dynamic"],95949);var E=e.i(95949);let y=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/interactive/sessions/[id]/stream/route",pathname:"/api/interactive/sessions/[id]/stream",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/src/presentation/web/app/api/interactive/sessions/[id]/stream/route.ts",nextConfigOutput:"",userland:E,...{}}),{workAsyncStorage:C,workUnitAsyncStorage:b,serverHooks:A}=y;async function S(e,t,n){n.requestMeta&&(0,a.setRequestMeta)(e,n.requestMeta),y.isDev&&(0,a.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let g="/api/interactive/sessions/[id]/stream/route";g=g.replace(/\/index$/,"")||"/";let m=await y.prepare(e,t,{srcPage:g,multiZoneDraftMode:!1});if(!m)return t.statusCode=400,t.end("Bad Request"),null==n.waitUntil||n.waitUntil.call(n,Promise.resolve()),null;let{buildId:w,params:E,nextConfig:C,parsedUrl:b,isDraftMode:A,prerenderManifest:S,routerServerContext:N,isOnDemandRevalidate:T,revalidateOnlyGenerated:q,resolvedPathname:O,clientReferenceManifest:P,serverActionsManifest:_}=m,I=(0,o.normalizeAppPath)(g),k=!!(S.dynamicRoutes[I]||S.routes[O]),j=async()=>((null==N?void 0:N.render404)?await N.render404(e,t,b,!1):t.end("This page could not be found"),null);if(k&&!A){let e=!!S.routes[O],t=S.dynamicRoutes[I];if(t&&!1===t.fallback&&!e){if(C.adapterPath)return await j();throw new f.NoFallbackError}}let H=null;!k||y.isDev||A||(H="/index"===(H=O)?"/":H);let U=!0===y.isDev||!k,M=k&&!U;_&&P&&(0,i.setManifestsSingleton)({page:g,clientReferenceManifest:P,serverActionsManifest:_});let $=e.method||"GET",D=(0,s.getTracer)(),F=D.getActiveScopeSpan(),K=!!(null==N?void 0:N.isWrappedByNextServer),L=!!(0,a.getRequestMeta)(e,"minimalMode"),B=(0,a.getRequestMeta)(e,"incrementalCache")||await y.getIncrementalCache(e,C,S,L);null==B||B.resetRequestCache(),globalThis.__incrementalCache=B;let G={params:E,previewProps:S.preview,renderOpts:{experimental:{authInterrupts:!!C.experimental.authInterrupts},cacheComponents:!!C.cacheComponents,supportsDynamicResponse:U,incrementalCache:B,cacheLifeProfiles:C.cacheLife,waitUntil:n.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,n,a)=>y.onRequestError(e,t,n,a,N)},sharedContext:{buildId:w}},J=new l.NodeNextRequest(e),V=new l.NodeNextResponse(t),W=d.NextRequestAdapter.fromNodeNextRequest(J,(0,d.signalFromNodeResponse)(t));try{let a,i=async e=>y.handle(W,G).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let r=D.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==u.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${r.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let n=r.get("next.route");if(n){let t=`${$} ${n}`;e.setAttributes({"next.route":n,"http.route":n,"next.span_name":t}),e.updateName(t),a&&a!==e&&(a.setAttribute("http.route",n),a.updateName(t))}else e.updateName(`${$} ${g}`)}),o=async a=>{var s,o;let l=async({previousCacheEntry:r})=>{try{if(!L&&T&&q&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let s=await i(a);e.fetchMetrics=G.renderOpts.fetchMetrics;let o=G.renderOpts.pendingWaitUntil;o&&n.waitUntil&&(n.waitUntil(o),o=void 0);let l=G.renderOpts.collectedTags;if(!k)return await (0,p.sendResponse)(J,V,s,G.renderOpts.pendingWaitUntil),null;{let e=await s.blob(),t=(0,h.toNodeOutgoingHttpHeaders)(s.headers);l&&(t[x.NEXT_CACHE_TAGS_HEADER]=l),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==G.renderOpts.collectedRevalidate&&!(G.renderOpts.collectedRevalidate>=x.INFINITE_CACHE)&&G.renderOpts.collectedRevalidate,n=void 0===G.renderOpts.collectedExpire||G.renderOpts.collectedExpire>=x.INFINITE_CACHE?void 0:G.renderOpts.collectedExpire;return{value:{kind:R.CachedRouteKind.APP_ROUTE,status:s.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:n}}}}catch(t){throw(null==r?void 0:r.isStale)&&await y.onRequestError(e,t,{routerKind:"App Router",routePath:g,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:M,isOnDemandRevalidate:T})},!1,N),t}},d=await y.handleResponse({req:e,nextConfig:C,cacheKey:H,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:S,isRoutePPREnabled:!1,isOnDemandRevalidate:T,revalidateOnlyGenerated:q,responseGenerator:l,waitUntil:n.waitUntil,isMinimalMode:L});if(!k)return null;if((null==d||null==(s=d.value)?void 0:s.kind)!==R.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(o=d.value)?void 0:o.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});L||t.setHeader("x-nextjs-cache",T?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),A&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let u=(0,h.fromNodeOutgoingHttpHeaders)(d.value.headers);return L&&k||u.delete(x.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||t.getHeader("Cache-Control")||u.get("Cache-Control")||u.set("Cache-Control",(0,v.getCacheControlHeader)(d.cacheControl)),await (0,p.sendResponse)(J,V,new Response(d.value.body,{headers:u,status:d.value.status||200})),null};K&&F?await o(F):(a=D.getActiveScopeSpan(),await D.withPropagatedContext(e.headers,()=>D.trace(u.BaseServerSpan.handleRequest,{spanName:`${$} ${g}`,kind:s.SpanKind.SERVER,attributes:{"http.method":$,"http.target":e.url}},o),void 0,!K))}catch(t){if(t instanceof f.NoFallbackError||await y.onRequestError(e,t,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:M,isOnDemandRevalidate:T})},!1,N),k)throw t;return await (0,p.sendResponse)(J,V,new Response(null,{status:500})),null}}e.s(["handler",0,S,"patchFetch",0,function(){return(0,n.patchFetch)({workAsyncStorage:C,workUnitAsyncStorage:b})},"routeModule",0,y,"serverHooks",0,A,"workAsyncStorage",0,C,"workUnitAsyncStorage",0,b],15665)}];
|
|
11
|
+
|
|
12
|
+
//# sourceMappingURL=%5Broot-of-the-server%5D__0kc8ify._.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../src/presentation/web/lib/server-container.ts","../../../../../../src/presentation/web/lib/api-helpers.ts","../../../../../../node_modules/.pnpm/next%4016.2.2_%40babel%2Bcore%407.29.0_%40playwright%2Btest%401.59.1_react-dom%4019.2.4_react%4019.2.4__react%4019.2.4/node_modules/next/dist/esm/build/templates/app-route.js","../../../../../../src/presentation/web/app/api/interactive/sessions/%5Bid%5D/stream/route.ts"],"sourcesContent":["/**\n * Server Container Accessor\n *\n * Provides a `resolve()` helper for server components and API routes to\n * obtain DI-managed instances. The tsyringe container is placed on globalThis\n * by the CLI bootstrap (`shipit-ai ui`) or the dev-server (`pnpm dev:web`).\n */\n\nimport type { DependencyContainer, InjectionToken } from 'tsyringe';\n\nconst CONTAINER_KEY = '__shipitAiContainer';\n\n/**\n * Resolve a dependency from the DI container.\n *\n * Usage in server components / API routes:\n * ```ts\n * import { resolve } from '@/lib/server-container';\n * import { ListFeaturesUseCase } from '@shipit-ai/core/application/use-cases/features/list-features.use-case';\n *\n * const features = await resolve(ListFeaturesUseCase).execute();\n * ```\n */\nexport function resolve<T>(token: InjectionToken<T>): T {\n const container = (globalThis as Record<string, unknown>)[CONTAINER_KEY] as\n | DependencyContainer\n | undefined;\n\n if (!container) {\n throw new Error(\n 'DI container not available. Ensure the CLI bootstrap or dev-server has initialized it.'\n );\n }\n\n return container.resolve(token);\n}\n","import { NextResponse } from 'next/server';\n\n/**\n * Create a JSON error response. For 500-level errors, always uses a generic\n * message to prevent internal detail leakage. The actual error is logged\n * server-side for debugging.\n */\nexport function apiError(\n status: number,\n publicMessage: string,\n internalError?: unknown\n): NextResponse {\n if (internalError) {\n const detail = internalError instanceof Error ? internalError.message : String(internalError);\n // eslint-disable-next-line no-console\n console.error(`[API ${status}] ${publicMessage}: ${detail}`);\n }\n return NextResponse.json({ error: publicMessage }, { status });\n}\n\n/**\n * Validate a required query parameter. Returns the trimmed value or an\n * error response.\n */\nexport function validateParam(value: string | null, paramName: string): string | NextResponse {\n if (!value?.trim()) {\n return apiError(400, `${paramName} is required`);\n }\n return value.trim();\n}\n","import { AppRouteRouteModule } from \"next/dist/esm/server/route-modules/app-route/module.compiled\";\nimport { RouteKind } from \"next/dist/esm/server/route-kind\";\nimport { patchFetch as _patchFetch } from \"next/dist/esm/server/lib/patch-fetch\";\nimport { addRequestMeta, getRequestMeta, setRequestMeta } from \"next/dist/esm/server/request-meta\";\nimport { getTracer, SpanKind } from \"next/dist/esm/server/lib/trace/tracer\";\nimport { setManifestsSingleton } from \"next/dist/esm/server/app-render/manifests-singleton\";\nimport { normalizeAppPath } from \"next/dist/esm/shared/lib/router/utils/app-paths\";\nimport { NodeNextRequest, NodeNextResponse } from \"next/dist/esm/server/base-http/node\";\nimport { NextRequestAdapter, signalFromNodeResponse } from \"next/dist/esm/server/web/spec-extension/adapters/next-request\";\nimport { BaseServerSpan } from \"next/dist/esm/server/lib/trace/constants\";\nimport { getRevalidateReason } from \"next/dist/esm/server/instrumentation/utils\";\nimport { sendResponse } from \"next/dist/esm/server/send-response\";\nimport { fromNodeOutgoingHttpHeaders, toNodeOutgoingHttpHeaders } from \"next/dist/esm/server/web/utils\";\nimport { getCacheControlHeader } from \"next/dist/esm/server/lib/cache-control\";\nimport { INFINITE_CACHE, NEXT_CACHE_TAGS_HEADER } from \"next/dist/esm/lib/constants\";\nimport { NoFallbackError } from \"next/dist/esm/shared/lib/no-fallback-error.external\";\nimport { CachedRouteKind } from \"next/dist/esm/server/response-cache\";\nimport * as userland from \"INNER_APP_ROUTE\";\n// We inject the nextConfigOutput here so that we can use them in the route\n// module.\nconst nextConfigOutput = \"\"\nconst routeModule = new AppRouteRouteModule({\n definition: {\n kind: RouteKind.APP_ROUTE,\n page: \"/api/interactive/sessions/[id]/stream/route\",\n pathname: \"/api/interactive/sessions/[id]/stream\",\n filename: \"route\",\n bundlePath: \"\"\n },\n distDir: process.env.__NEXT_RELATIVE_DIST_DIR || '',\n relativeProjectDir: process.env.__NEXT_RELATIVE_PROJECT_DIR || '',\n resolvedPagePath: \"[project]/src/presentation/web/app/api/interactive/sessions/[id]/stream/route.ts\",\n nextConfigOutput,\n // The static import is used for initialization (methods, dynamic, etc.).\n userland: userland,\n // In Turbopack dev mode, also provide a getter that calls require() on every\n // request. This re-reads from devModuleCache so HMR updates are picked up,\n // and the async wrapper unwraps async-module Promises (ESM-only\n // serverExternalPackages) automatically.\n ...process.env.TURBOPACK && process.env.__NEXT_DEV_SERVER ? {\n getUserland: ()=>import(\"INNER_APP_ROUTE\")\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;\nfunction patchFetch() {\n return _patchFetch({\n workAsyncStorage,\n workUnitAsyncStorage\n });\n}\nexport { routeModule, workAsyncStorage, workUnitAsyncStorage, serverHooks, patchFetch, };\nexport async function handler(req, res, ctx) {\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 = \"/api/interactive/sessions/[id]/stream/route\";\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.__NEXT_MULTI_ZONE_DRAFT_MODE;\n const prepareResult = await routeModule.prepare(req, res, {\n srcPage,\n multiZoneDraftMode\n });\n if (!prepareResult) {\n res.statusCode = 400;\n res.end('Bad Request');\n ctx.waitUntil == null ? void 0 : ctx.waitUntil.call(ctx, Promise.resolve());\n return null;\n }\n const { buildId, params, nextConfig, parsedUrl, isDraftMode, prerenderManifest, routerServerContext, isOnDemandRevalidate, revalidateOnlyGenerated, resolvedPathname, clientReferenceManifest, serverActionsManifest } = prepareResult;\n const normalizedSrcPage = normalizeAppPath(srcPage);\n let isIsr = Boolean(prerenderManifest.dynamicRoutes[normalizedSrcPage] || prerenderManifest.routes[resolvedPathname]);\n const render404 = async ()=>{\n // TODO: should route-module itself handle rendering the 404\n if (routerServerContext == null ? void 0 : 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 if (isIsr && !isDraftMode) {\n const isPrerendered = Boolean(prerenderManifest.routes[resolvedPathname]);\n const prerenderInfo = prerenderManifest.dynamicRoutes[normalizedSrcPage];\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 let cacheKey = null;\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 const supportsDynamicResponse = // If we're in development, we always support dynamic HTML\n routeModule.isDev === true || // If this is not SSG or does not have static paths, then it supports\n // dynamic HTML.\n !isIsr;\n // This is a revalidation request if the request is for a static\n // page and it is not being resumed from a postponed render and\n // it is not a dynamic RSC request then it is a revalidation\n // request.\n const isStaticGeneration = isIsr && !supportsDynamicResponse;\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 const method = req.method || 'GET';\n const tracer = getTracer();\n const activeSpan = tracer.getActiveScopeSpan();\n const isWrappedByNextServer = Boolean(routerServerContext == null ? void 0 : routerServerContext.isWrappedByNextServer);\n const isMinimalMode = Boolean(getRequestMeta(req, 'minimalMode'));\n const incrementalCache = getRequestMeta(req, 'incrementalCache') || await routeModule.getIncrementalCache(req, nextConfig, prerenderManifest, isMinimalMode);\n incrementalCache == null ? void 0 : incrementalCache.resetRequestCache();\n globalThis.__incrementalCache = incrementalCache;\n const context = {\n params,\n previewProps: prerenderManifest.preview,\n renderOpts: {\n experimental: {\n authInterrupts: Boolean(nextConfig.experimental.authInterrupts)\n },\n cacheComponents: Boolean(nextConfig.cacheComponents),\n supportsDynamicResponse,\n incrementalCache,\n cacheLifeProfiles: nextConfig.cacheLife,\n waitUntil: ctx.waitUntil,\n onClose: (cb)=>{\n res.on('close', cb);\n },\n onAfterTaskError: undefined,\n onInstrumentationRequestError: (error, _request, errorContext, silenceLog)=>routeModule.onRequestError(req, error, errorContext, silenceLog, routerServerContext)\n },\n sharedContext: {\n buildId\n }\n };\n const nodeNextReq = new NodeNextRequest(req);\n const nodeNextRes = new NodeNextResponse(res);\n const nextReq = NextRequestAdapter.fromNodeNextRequest(nodeNextReq, signalFromNodeResponse(res));\n try {\n let parentSpan;\n const invokeRouteModule = async (span)=>{\n return routeModule.handle(nextReq, context).finally(()=>{\n if (!span) return;\n span.setAttributes({\n 'http.status_code': res.statusCode,\n 'next.rsc': false\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 if (rootSpanAttributes.get('next.span_type') !== BaseServerSpan.handleRequest) {\n console.warn(`Unexpected root span type '${rootSpanAttributes.get('next.span_type')}'. Please report this Next.js issue https://github.com/vercel/next.js`);\n return;\n }\n const route = rootSpanAttributes.get('next.route');\n if (route) {\n const name = `${method} ${route}`;\n span.setAttributes({\n 'next.route': route,\n 'http.route': route,\n 'next.span_name': name\n });\n span.updateName(name);\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 !== span) {\n parentSpan.setAttribute('http.route', route);\n parentSpan.updateName(name);\n }\n } else {\n span.updateName(`${method} ${srcPage}`);\n }\n });\n };\n const handleResponse = async (currentSpan)=>{\n var _cacheEntry_value;\n const responseGenerator = async ({ previousCacheEntry })=>{\n try {\n if (!isMinimalMode && isOnDemandRevalidate && revalidateOnlyGenerated && !previousCacheEntry) {\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 const response = await invokeRouteModule(currentSpan);\n req.fetchMetrics = context.renderOpts.fetchMetrics;\n let pendingWaitUntil = context.renderOpts.pendingWaitUntil;\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 // 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 // Copy the headers from the response.\n const headers = toNodeOutgoingHttpHeaders(response.headers);\n if (cacheTags) {\n headers[NEXT_CACHE_TAGS_HEADER] = cacheTags;\n }\n if (!headers['content-type'] && blob.type) {\n headers['content-type'] = blob.type;\n }\n const revalidate = typeof context.renderOpts.collectedRevalidate === 'undefined' || context.renderOpts.collectedRevalidate >= INFINITE_CACHE ? false : context.renderOpts.collectedRevalidate;\n const expire = typeof context.renderOpts.collectedExpire === 'undefined' || context.renderOpts.collectedExpire >= INFINITE_CACHE ? undefined : context.renderOpts.collectedExpire;\n // Create the cache entry for the response.\n const cacheEntry = {\n value: {\n kind: CachedRouteKind.APP_ROUTE,\n status: response.status,\n body: Buffer.from(await blob.arrayBuffer()),\n headers\n },\n cacheControl: {\n revalidate,\n expire\n }\n };\n return cacheEntry;\n } else {\n // send response without caching if not ISR\n await sendResponse(nodeNextReq, nodeNextRes, response, context.renderOpts.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 == null ? void 0 : previousCacheEntry.isStale) {\n const silenceLog = false;\n await routeModule.onRequestError(req, err, {\n routerKind: 'App Router',\n routePath: srcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isStaticGeneration,\n isOnDemandRevalidate\n })\n }, silenceLog, routerServerContext);\n }\n throw err;\n }\n };\n const cacheEntry = await routeModule.handleResponse({\n req,\n nextConfig,\n cacheKey,\n routeKind: RouteKind.APP_ROUTE,\n isFallback: false,\n prerenderManifest,\n isRoutePPREnabled: false,\n isOnDemandRevalidate,\n revalidateOnlyGenerated,\n responseGenerator,\n waitUntil: ctx.waitUntil,\n isMinimalMode\n });\n // we don't create a cacheEntry for ISR\n if (!isIsr) {\n return null;\n }\n if ((cacheEntry == null ? void 0 : (_cacheEntry_value = cacheEntry.value) == null ? void 0 : _cacheEntry_value.kind) !== CachedRouteKind.APP_ROUTE) {\n var _cacheEntry_value1;\n throw Object.defineProperty(new Error(`Invariant: app-route received invalid cache entry ${cacheEntry == null ? void 0 : (_cacheEntry_value1 = cacheEntry.value) == null ? void 0 : _cacheEntry_value1.kind}`), \"__NEXT_ERROR_CODE\", {\n value: \"E701\",\n enumerable: false,\n configurable: true\n });\n }\n if (!isMinimalMode) {\n res.setHeader('x-nextjs-cache', isOnDemandRevalidate ? 'REVALIDATED' : cacheEntry.isMiss ? 'MISS' : cacheEntry.isStale ? 'STALE' : 'HIT');\n }\n // Draft mode should never be cached\n if (isDraftMode) {\n res.setHeader('Cache-Control', 'private, no-cache, no-store, max-age=0, must-revalidate');\n }\n const headers = fromNodeOutgoingHttpHeaders(cacheEntry.value.headers);\n if (!(isMinimalMode && isIsr)) {\n headers.delete(NEXT_CACHE_TAGS_HEADER);\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 (cacheEntry.cacheControl && !res.getHeader('Cache-Control') && !headers.get('Cache-Control')) {\n headers.set('Cache-Control', getCacheControlHeader(cacheEntry.cacheControl));\n }\n await sendResponse(nodeNextReq, nodeNextRes, // @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 return null;\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);\n } else {\n parentSpan = tracer.getActiveScopeSpan();\n await tracer.withPropagatedContext(req.headers, ()=>tracer.trace(BaseServerSpan.handleRequest, {\n spanName: `${method} ${srcPage}`,\n kind: SpanKind.SERVER,\n attributes: {\n 'http.method': method,\n 'http.target': req.url\n }\n }, handleResponse), undefined, !isWrappedByNextServer);\n }\n } catch (err) {\n if (!(err instanceof NoFallbackError)) {\n const silenceLog = false;\n await routeModule.onRequestError(req, err, {\n routerKind: 'App Router',\n routePath: normalizedSrcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isStaticGeneration,\n isOnDemandRevalidate\n })\n }, silenceLog, routerServerContext);\n }\n // rethrow so that we can handle serving error page\n // If this is during static generation, throw the error again.\n if (isIsr) throw err;\n // Otherwise, send a 500 response.\n await sendResponse(nodeNextReq, nodeNextRes, new Response(null, {\n status: 500\n }));\n return null;\n }\n}\n\n//# sourceMappingURL=app-route.js.map\n","/**\n * GET /api/interactive/sessions/[id]/stream\n *\n * Per-session SSE stream delivering real-time agent stdout chunks to the browser.\n * - Subscribes to InteractiveSessionService stdout events\n * - Emits `delta` events with each token chunk\n * - Emits `done` events at end-of-turn\n * - Cleans up listener when the client disconnects\n */\n\nimport type { NextRequest } from 'next/server';\nimport { resolve } from '@/lib/server-container';\nimport { apiError } from '@/lib/api-helpers';\nimport type { IInteractiveSessionService } from '@shipit-ai/core/application/ports/output/services/interactive-session-service.interface';\n\nexport const dynamic = 'force-dynamic';\n\ninterface RouteParams {\n params: Promise<{ id: string }>;\n}\n\nexport async function GET(request: NextRequest, { params }: RouteParams): Promise<Response> {\n const { id: sessionId } = await params;\n\n try {\n const service = resolve<IInteractiveSessionService>('IInteractiveSessionService');\n\n // Verify session exists\n const session = await service.getSession(sessionId);\n if (!session) {\n return new Response(JSON.stringify({ error: 'Session not found' }), {\n status: 404,\n headers: { 'Content-Type': 'application/json' },\n });\n }\n\n const encoder = new TextEncoder();\n\n const stream = new ReadableStream<Uint8Array>({\n start(controller) {\n let closed = false;\n\n function enqueue(text: string) {\n if (closed) return;\n try {\n controller.enqueue(encoder.encode(text));\n } catch {\n // Stream may already be closed\n }\n }\n\n // Send initial comment so the browser knows the stream is alive\n enqueue(': connected\\n\\n');\n\n // Keep-alive heartbeat every 15s to prevent browser/proxy timeouts\n const heartbeat = setInterval(() => {\n enqueue(': heartbeat\\n\\n');\n }, 15_000);\n\n // Subscribe to real-time stdout chunks from the session service\n const unsubscribe = service.subscribe(sessionId, (chunk) => {\n if (chunk.done) {\n const payload = { done: true, sessionId };\n enqueue(`event: done\\ndata: ${JSON.stringify(payload)}\\n\\n`);\n } else if (chunk.log) {\n const payload = { log: chunk.log, sessionId };\n enqueue(`event: log\\ndata: ${JSON.stringify(payload)}\\n\\n`);\n } else if (chunk.delta) {\n const payload = { delta: chunk.delta, sessionId };\n enqueue(`event: delta\\ndata: ${JSON.stringify(payload)}\\n\\n`);\n }\n });\n\n // Cleanup on client disconnect\n function cleanup() {\n if (closed) return;\n closed = true;\n clearInterval(heartbeat);\n unsubscribe();\n try {\n controller.close();\n } catch {\n // Stream may already be closed\n }\n }\n\n request.signal.addEventListener('abort', cleanup, { once: true });\n },\n });\n\n return new Response(stream, {\n headers: {\n 'Content-Type': 'text/event-stream',\n 'Cache-Control': 'no-cache',\n Connection: 'keep-alive',\n },\n });\n } catch (error) {\n return apiError(500, 'Failed to open interactive session stream', error);\n }\n}\n"],"names":["CONTAINER_KEY","resolve","token","container","globalThis","Error","apiError","status","publicMessage","internalError","detail","message","String","console","error","json","validateParam","value","paramName","trim","dynamic","GET","request","params","id","sessionId","service","session","getSession","Response","JSON","stringify","headers","encoder","TextEncoder","stream","ReadableStream","start","controller","closed","enqueue","text","encode","heartbeat","setInterval","unsubscribe","subscribe","chunk","done","payload","log","delta","cleanup","clearInterval","close","signal","addEventListener","once","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