@shepai/cli 1.149.0 → 1.149.1
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/get-branch-sync-status.use-case.d.ts.map +1 -1
- package/dist/packages/core/src/application/use-cases/features/get-branch-sync-status.use-case.js +4 -0
- package/dist/src/presentation/web/components/common/control-center-drawer/feature-drawer-client.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/control-center-drawer/feature-drawer-client.js +6 -3
- package/dist/src/presentation/web/next.config.d.ts.map +1 -1
- package/dist/src/presentation/web/next.config.js +0 -3
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/web/.next/BUILD_ID +1 -1
- package/web/.next/build-manifest.json +2 -2
- package/web/.next/fallback-build-manifest.json +2 -2
- package/web/.next/prerender-manifest.json +3 -3
- package/web/.next/required-server-files.js +2 -3
- package/web/.next/required-server-files.json +2 -3
- package/web/.next/server/app/(dashboard)/@drawer/adopt/page/server-reference-manifest.json +28 -28
- 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/create/page/server-reference-manifest.json +28 -28
- 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 +36 -36
- 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 +36 -36
- 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]/page/server-reference-manifest.json +26 -26
- 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)/create/page/server-reference-manifest.json +28 -28
- 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 +36 -36
- 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 +36 -36
- 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 +26 -26
- 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]/page/server-reference-manifest.json +26 -26
- 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 +2 -2
- 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 +3 -3
- package/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/settings/page/server-reference-manifest.json +8 -8
- 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 +8 -8
- package/web/.next/server/app/skills/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/tools/page/server-reference-manifest.json +8 -8
- package/web/.next/server/app/tools/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/version/page/server-reference-manifest.json +3 -3
- package/web/.next/server/app/version/page_client-reference-manifest.js +1 -1
- package/web/.next/server/chunks/403f9_next_dist_esm_build_templates_app-route_370c43b1.js +1 -1
- package/web/.next/server/chunks/403f9_next_dist_esm_build_templates_app-route_370c43b1.js.map +1 -1
- package/web/.next/server/chunks/403f9_next_dist_esm_build_templates_app-route_4d623b8e.js +1 -1
- package/web/.next/server/chunks/403f9_next_dist_esm_build_templates_app-route_4d623b8e.js.map +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__0866d2b5._.js +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__0866d2b5._.js.map +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__0d33c29e._.js +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__0d33c29e._.js.map +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__25f23d5d._.js +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__25f23d5d._.js.map +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__26565141._.js +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__26565141._.js.map +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__2b1074db._.js +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__2b1074db._.js.map +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__2f61738a._.js +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__2f61738a._.js.map +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__332c8d91._.js +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__332c8d91._.js.map +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__3b72e8b0._.js +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__3b72e8b0._.js.map +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__9191749c._.js +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__9191749c._.js.map +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__9a136c79._.js +3 -3
- package/web/.next/server/chunks/[root-of-the-server]__9a136c79._.js.map +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__a402b567._.js +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__a402b567._.js.map +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__a5879003._.js +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__a5879003._.js.map +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__b2f9a412._.js +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__b2f9a412._.js.map +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__b4102cc7._.js +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__b4102cc7._.js.map +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__d2c18946._.js +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__d2c18946._.js.map +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__d9d410a8._.js +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__d9d410a8._.js.map +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__e247a485._.js +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__e247a485._.js.map +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__fc6fd958._.js +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__fc6fd958._.js.map +1 -1
- package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js +1 -1
- package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__2138fa7e._.js +2 -2
- package/web/.next/server/chunks/ssr/[root-of-the-server]__29580090._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__29580090._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__357d99f9._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__3ef34e4c._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__43f51aa6._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__43f51aa6._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__815546bd._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__815546bd._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__aad040c0._.js +3 -3
- package/web/.next/server/chunks/ssr/[root-of-the-server]__aad040c0._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__c094882b._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__c094882b._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__d48c5b11._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__d48c5b11._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__dac5dbf1._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__dac5dbf1._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__fae8b355._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__fae8b355._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_05c23ad9._.js +1 -1
- package/web/.next/server/chunks/ssr/_05c23ad9._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_0c5f56e3._.js +2 -2
- package/web/.next/server/chunks/ssr/_0c5f56e3._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_16eb4fec._.js +1 -1
- package/web/.next/server/chunks/ssr/_16eb4fec._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_1b719e7f._.js +1 -1
- package/web/.next/server/chunks/ssr/_1b719e7f._.js.map +1 -1
- package/web/.next/server/chunks/ssr/{_5022e2b1._.js → _2b873e3b._.js} +2 -2
- package/web/.next/server/chunks/ssr/{_5022e2b1._.js.map → _2b873e3b._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/_37e8548b._.js +1 -1
- package/web/.next/server/chunks/ssr/_37e8548b._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_55d763e2._.js +1 -1
- package/web/.next/server/chunks/ssr/_55d763e2._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_6256a985._.js +1 -1
- package/web/.next/server/chunks/ssr/_6256a985._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_64bdfc6f._.js +2 -2
- package/web/.next/server/chunks/ssr/_64bdfc6f._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_8fcc39d4._.js +1 -1
- package/web/.next/server/chunks/ssr/_b71645b4._.js +1 -1
- package/web/.next/server/chunks/ssr/_b71645b4._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_d8575088._.js +1 -1
- package/web/.next/server/chunks/ssr/_d8575088._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_ee80b25c._.js +3 -0
- package/web/.next/server/chunks/ssr/{_458e9a64._.js.map → _ee80b25c._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js +1 -1
- package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js.map +1 -1
- package/web/.next/server/chunks/ssr/{src_presentation_web_35159458._.js → src_presentation_web_91545e86._.js} +2 -2
- package/web/.next/server/chunks/ssr/{src_presentation_web_35159458._.js.map → src_presentation_web_91545e86._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_1b176e3c.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_1b176e3c.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_bd9f0dda.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_bd9f0dda.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_app_actions_open-ide_ts_baaca5d5._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_e599bb8c._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_e599bb8c._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js.map +1 -1
- package/web/.next/server/pages/500.html +2 -2
- package/web/.next/server/server-reference-manifest.js +1 -1
- package/web/.next/server/server-reference-manifest.json +44 -44
- package/web/.next/static/chunks/{d3df6e6434e16519.js → 213bc4d2c2c7885a.js} +1 -1
- package/web/.next/static/chunks/42a1e8928c2a8b1e.js +1 -0
- package/web/.next/static/chunks/{75834e430247b325.js → 6b7b66ce14353296.js} +1 -1
- package/web/.next/static/chunks/70917246e2079de0.js +1 -0
- package/web/.next/static/chunks/{fe5d48f8ca483935.js → 932fdc72f19fba16.js} +1 -1
- package/web/.next/static/chunks/{3e7a130816229439.js → 9522b3e38757bf73.js} +1 -1
- package/web/.next/static/chunks/{a6363f73e05ccf47.js → c8c503403d49f600.js} +1 -1
- package/web/.next/static/chunks/{3f1b33498b472b00.js → d3e9784c18cc85e9.js} +1 -1
- package/web/.next/static/chunks/{4ef564fb1174e497.js → e23f0c8da44fe4ca.js} +1 -1
- package/web/.next/static/chunks/{eaca60cc3ab0bf9f.js → ee210d2383098e91.js} +1 -1
- package/web/.next/static/chunks/faf6b0ec1cf9125c.js +5 -0
- package/web/.next/static/chunks/{b7126c0b3a97e77e.js → fbf933fea8dd21f4.js} +1 -1
- package/web/.next/server/chunks/ssr/_458e9a64._.js +0 -3
- package/web/.next/static/chunks/24b1c1e60fd3b7b5.js +0 -5
- package/web/.next/static/chunks/79dc2e2f1c2ff519.js +0 -1
- package/web/.next/static/chunks/a086f8dfef2c3325.js +0 -1
- /package/web/.next/static/{1CQHYZVn3VajyhdvnsCaw → 0-b0NgavBiu5Fo1rzdeX2}/_buildManifest.js +0 -0
- /package/web/.next/static/{1CQHYZVn3VajyhdvnsCaw → 0-b0NgavBiu5Fo1rzdeX2}/_clientMiddlewareManifest.json +0 -0
- /package/web/.next/static/{1CQHYZVn3VajyhdvnsCaw → 0-b0NgavBiu5Fo1rzdeX2}/_ssgManifest.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../src/presentation/web/lib/server-container.ts","../../../../../../src/presentation/web/app/api/tools/%5Bid%5D/install/stream/route.ts","../../../../../../node_modules/.pnpm/next%4016.1.6_%40babel%2Bcore%407.29.0_%40playwright%2Btest%401.58.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 (`shep ui`) or the dev-server (`pnpm dev:web`).\n */\n\nimport type { DependencyContainer, InjectionToken } from 'tsyringe';\n\nconst CONTAINER_KEY = '__shepContainer';\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 '@shepai/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 { resolve } from '@/lib/server-container';\nimport type { InstallToolUseCase } from '@shepai/core/application/use-cases/tools/install-tool.use-case';\n\n// Force dynamic — SSE streams must never be statically optimized or cached\nexport const dynamic = 'force-dynamic';\n\nexport async function GET(\n _request: Request,\n { params }: { params: Promise<{ id: string }> }\n): Promise<Response> {\n const { id } = await params;\n const useCase = resolve<InstallToolUseCase>('InstallToolUseCase');\n\n const encoder = new TextEncoder();\n const stream = new ReadableStream({\n async start(controller) {\n try {\n const status = await useCase.execute(id, (chunk: string) => {\n controller.enqueue(encoder.encode(`data: ${chunk.replace(/\\n/g, '\\ndata: ')}\\n\\n`));\n });\n controller.enqueue(encoder.encode(`event: done\\ndata: ${JSON.stringify(status)}\\n\\n`));\n } catch (error) {\n const message = error instanceof Error ? error.message : 'Installation failed';\n controller.enqueue(\n encoder.encode(\n `event: done\\ndata: ${JSON.stringify({ status: 'error', toolName: id, errorMessage: message })}\\n\\n`\n )\n );\n } finally {\n controller.close();\n }\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}\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 } 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 = \"standalone\"\nconst routeModule = new AppRouteRouteModule({\n definition: {\n kind: RouteKind.APP_ROUTE,\n page: \"/api/tools/[id]/install/stream/route\",\n pathname: \"/api/tools/[id]/install/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/tools/[id]/install/stream/route.ts\",\n nextConfigOutput,\n userland\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 (routeModule.isDev) {\n addRequestMeta(req, 'devRequestTimingInternalsEnd', process.hrtime.bigint());\n }\n let srcPage = \"/api/tools/[id]/install/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.experimental.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 context = {\n params,\n prerenderManifest,\n renderOpts: {\n experimental: {\n authInterrupts: Boolean(nextConfig.experimental.authInterrupts)\n },\n cacheComponents: Boolean(nextConfig.cacheComponents),\n supportsDynamicResponse,\n incrementalCache: getRequestMeta(req, '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 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 } else {\n span.updateName(`${method} ${srcPage}`);\n }\n });\n };\n const isMinimalMode = Boolean(process.env.MINIMAL_MODE || getRequestMeta(req, 'minimalMode'));\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 (activeSpan) {\n await handleResponse(activeSpan);\n } else {\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));\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":[],"mappings":"g0BAuBO,SAAS,EAAW,CAAwB,EACjD,IAAM,EAAa,UAAsC,CAAC,AAdtC,eAcoD,CAIxE,GAAI,CAAC,EACH,MAAM,AAAI,GADI,GAEZ,0FAIJ,OAAO,EAAU,OAAO,CAAC,EAC3B,gDEnCA,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,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CA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AA,YAAA,AAAY,EAAC,EAAa,EAChC,IAAI,SAAS,EAAW,KAAK,CAAC,IAAI,CAAE,SAChC,EACA,OAAQ,EAAW,KAAK,CAAC,MAAM,EAAI,GACvC,IACO,IACX,EAGI,EACA,MAAM,EAAe,EADT,CAGZ,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,GAEf,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,EAEA,qCAAqC","ignoreList":[2]}
|
|
1
|
+
{"version":3,"sources":["../../../../../../src/presentation/web/lib/server-container.ts","../../../../../../src/presentation/web/app/api/tools/%5Bid%5D/install/stream/route.ts","../../../../../../node_modules/.pnpm/next%4016.1.6_%40babel%2Bcore%407.29.0_%40playwright%2Btest%401.58.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 (`shep ui`) or the dev-server (`pnpm dev:web`).\n */\n\nimport type { DependencyContainer, InjectionToken } from 'tsyringe';\n\nconst CONTAINER_KEY = '__shepContainer';\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 '@shepai/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 { resolve } from '@/lib/server-container';\nimport type { InstallToolUseCase } from '@shepai/core/application/use-cases/tools/install-tool.use-case';\n\n// Force dynamic — SSE streams must never be statically optimized or cached\nexport const dynamic = 'force-dynamic';\n\nexport async function GET(\n _request: Request,\n { params }: { params: Promise<{ id: string }> }\n): Promise<Response> {\n const { id } = await params;\n const useCase = resolve<InstallToolUseCase>('InstallToolUseCase');\n\n const encoder = new TextEncoder();\n const stream = new ReadableStream({\n async start(controller) {\n try {\n const status = await useCase.execute(id, (chunk: string) => {\n controller.enqueue(encoder.encode(`data: ${chunk.replace(/\\n/g, '\\ndata: ')}\\n\\n`));\n });\n controller.enqueue(encoder.encode(`event: done\\ndata: ${JSON.stringify(status)}\\n\\n`));\n } catch (error) {\n const message = error instanceof Error ? error.message : 'Installation failed';\n controller.enqueue(\n encoder.encode(\n `event: done\\ndata: ${JSON.stringify({ status: 'error', toolName: id, errorMessage: message })}\\n\\n`\n )\n );\n } finally {\n controller.close();\n }\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}\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 } 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/tools/[id]/install/stream/route\",\n pathname: \"/api/tools/[id]/install/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/tools/[id]/install/stream/route.ts\",\n nextConfigOutput,\n userland\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 (routeModule.isDev) {\n addRequestMeta(req, 'devRequestTimingInternalsEnd', process.hrtime.bigint());\n }\n let srcPage = \"/api/tools/[id]/install/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.experimental.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 context = {\n params,\n prerenderManifest,\n renderOpts: {\n experimental: {\n authInterrupts: Boolean(nextConfig.experimental.authInterrupts)\n },\n cacheComponents: Boolean(nextConfig.cacheComponents),\n supportsDynamicResponse,\n incrementalCache: getRequestMeta(req, '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 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 } else {\n span.updateName(`${method} ${srcPage}`);\n }\n });\n };\n const isMinimalMode = Boolean(process.env.MINIMAL_MODE || getRequestMeta(req, 'minimalMode'));\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 (activeSpan) {\n await handleResponse(activeSpan);\n } else {\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));\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":[],"mappings":"g0BAuBO,SAAS,EAAW,CAAwB,EACjD,IAAM,EAAa,UAAsC,CAAC,AAdtC,eAcoD,CAIxE,GAAI,CAAC,EACH,MAAM,AAAI,GADI,GAEZ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-server/app-page-turbo.runtime.prod.js"))},56704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},32319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},24725,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/after-task-async-storage.external.js",()=>require("next/dist/server/app-render/after-task-async-storage.external.js"))},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"))},12714,(e,t,r)=>{t.exports=e.x("node:fs/promises",()=>require("node:fs/promises"))},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"))},31869,e=>{"use strict";var t=e.i(22925),r=e.i(62995),a=e.i(14112),n=e.i(31716),s=e.i(16340),o=e.i(40522),i=e.i(21994),l=e.i(5802),d=e.i(17171),u=e.i(177),p=e.i(43685),c=e.i(84832),h=e.i(92435),x=e.i(41260),R=e.i(80556),f=e.i(93695);e.i(97230);var m=e.i(35162),v=e.i(27980),y=e.i(12714),g=e.i(60526),w=e.i(50227);async function E(e){let t=new URL(e.url),r=t.searchParams.get("path")??(0,g.homedir)(),a="true"===t.searchParams.get("showHidden");if(!w.default.isAbsolute(r))return v.NextResponse.json({error:"Path must be absolute"},{status:400});let n=w.default.resolve(r);try{if(!(await (0,y.stat)(n)).isDirectory())return v.NextResponse.json({error:"Path is not a directory"},{status:400})}catch(t){var s;if((s=t)instanceof Error&&"code"in s&&"ENOENT"===t.code)return v.NextResponse.json({error:"Directory not found"},{status:404});let e=t instanceof Error?t.message:"Failed to access path";return v.NextResponse.json({error:e},{status:500})}try{let e=await (0,y.readdir)(n,{withFileTypes:!0}),t=[],r=e.map(async e=>{if(!a&&e.name.startsWith("."))return null;let t=w.default.join(n,e.name);try{if(e.isDirectory()){let r=await (0,y.stat)(t);return{name:e.name,path:t,isDirectory:!0,updatedAt:r.mtime.toISOString()}}if(e.isSymbolicLink()){let r=await (0,y.stat)(t);if(r.isDirectory())return{name:e.name,path:t,isDirectory:!0,updatedAt:r.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(t){let e=t instanceof Error?t.message:"Failed to read directory";return v.NextResponse.json({error:e},{status:500})}}e.s(["GET",()=>E],47661);var C=e.i(47661);let b=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:"
|
|
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"))},56704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},32319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},24725,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/after-task-async-storage.external.js",()=>require("next/dist/server/app-render/after-task-async-storage.external.js"))},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"))},12714,(e,t,r)=>{t.exports=e.x("node:fs/promises",()=>require("node:fs/promises"))},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"))},31869,e=>{"use strict";var t=e.i(22925),r=e.i(62995),a=e.i(14112),n=e.i(31716),s=e.i(16340),o=e.i(40522),i=e.i(21994),l=e.i(5802),d=e.i(17171),u=e.i(177),p=e.i(43685),c=e.i(84832),h=e.i(92435),x=e.i(41260),R=e.i(80556),f=e.i(93695);e.i(97230);var m=e.i(35162),v=e.i(27980),y=e.i(12714),g=e.i(60526),w=e.i(50227);async function E(e){let t=new URL(e.url),r=t.searchParams.get("path")??(0,g.homedir)(),a="true"===t.searchParams.get("showHidden");if(!w.default.isAbsolute(r))return v.NextResponse.json({error:"Path must be absolute"},{status:400});let n=w.default.resolve(r);try{if(!(await (0,y.stat)(n)).isDirectory())return v.NextResponse.json({error:"Path is not a directory"},{status:400})}catch(t){var s;if((s=t)instanceof Error&&"code"in s&&"ENOENT"===t.code)return v.NextResponse.json({error:"Directory not found"},{status:404});let e=t instanceof Error?t.message:"Failed to access path";return v.NextResponse.json({error:e},{status:500})}try{let e=await (0,y.readdir)(n,{withFileTypes:!0}),t=[],r=e.map(async e=>{if(!a&&e.name.startsWith("."))return null;let t=w.default.join(n,e.name);try{if(e.isDirectory()){let r=await (0,y.stat)(t);return{name:e.name,path:t,isDirectory:!0,updatedAt:r.mtime.toISOString()}}if(e.isSymbolicLink()){let r=await (0,y.stat)(t);if(r.isDirectory())return{name:e.name,path:t,isDirectory:!0,updatedAt:r.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(t){let e=t instanceof Error?t.message:"Failed to read directory";return v.NextResponse.json({error:e},{status:500})}}e.s(["GET",()=>E],47661);var C=e.i(47661);let b=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:C}),{workAsyncStorage:A,workUnitAsyncStorage:N,serverHooks:P}=b;function T(){return(0,a.patchFetch)({workAsyncStorage:A,workUnitAsyncStorage:N})}async function j(e,t,a){b.isDev&&(0,n.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let v="/api/directory/list/route";v=v.replace(/\/index$/,"")||"/";let y=await b.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:g,params:w,nextConfig:E,parsedUrl:C,isDraftMode:A,prerenderManifest:N,routerServerContext:P,isOnDemandRevalidate:T,revalidateOnlyGenerated:j,resolvedPathname:O,clientReferenceManifest:S,serverActionsManifest:q}=y,k=(0,i.normalizeAppPath)(v),_=!!(N.dynamicRoutes[k]||N.routes[O]),D=async()=>((null==P?void 0:P.render404)?await P.render404(e,t,C,!1):t.end("This page could not be found"),null);if(_&&!A){let e=!!N.routes[O],t=N.dynamicRoutes[k];if(t&&!1===t.fallback&&!e){if(E.experimental.adapterPath)return await D();throw new f.NoFallbackError}}let H=null;!_||b.isDev||A||(H="/index"===(H=O)?"/":H);let I=!0===b.isDev||!_,U=_&&!I;q&&S&&(0,o.setManifestsSingleton)({page:v,clientReferenceManifest:S,serverActionsManifest:q});let M=e.method||"GET",F=(0,s.getTracer)(),$=F.getActiveScopeSpan(),K={params:w,prerenderManifest:N,renderOpts:{experimental:{authInterrupts:!!E.experimental.authInterrupts},cacheComponents:!!E.cacheComponents,supportsDynamicResponse:I,incrementalCache:(0,n.getRequestMeta)(e,"incrementalCache"),cacheLifeProfiles:E.cacheLife,waitUntil:a.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,a,n)=>b.onRequestError(e,t,a,n,P)},sharedContext:{buildId:g}},L=new l.NodeNextRequest(e),B=new l.NodeNextResponse(t),G=d.NextRequestAdapter.fromNodeNextRequest(L,(0,d.signalFromNodeResponse)(t));try{let o=async e=>b.handle(G,K).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")!==u.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${r.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let a=r.get("next.route");if(a){let t=`${M} ${a}`;e.setAttributes({"next.route":a,"http.route":a,"next.span_name":t}),e.updateName(t)}else e.updateName(`${M} ${v}`)}),i=!!(0,n.getRequestMeta)(e,"minimalMode"),l=async n=>{var s,l;let d=async({previousCacheEntry:r})=>{try{if(!i&&T&&j&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let s=await o(n);e.fetchMetrics=K.renderOpts.fetchMetrics;let l=K.renderOpts.pendingWaitUntil;l&&a.waitUntil&&(a.waitUntil(l),l=void 0);let d=K.renderOpts.collectedTags;if(!_)return await (0,c.sendResponse)(L,B,s,K.renderOpts.pendingWaitUntil),null;{let e=await s.blob(),t=(0,h.toNodeOutgoingHttpHeaders)(s.headers);d&&(t[R.NEXT_CACHE_TAGS_HEADER]=d),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==K.renderOpts.collectedRevalidate&&!(K.renderOpts.collectedRevalidate>=R.INFINITE_CACHE)&&K.renderOpts.collectedRevalidate,a=void 0===K.renderOpts.collectedExpire||K.renderOpts.collectedExpire>=R.INFINITE_CACHE?void 0:K.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 b.onRequestError(e,t,{routerKind:"App Router",routePath:v,routeType:"route",revalidateReason:(0,p.getRevalidateReason)({isStaticGeneration:U,isOnDemandRevalidate:T})},!1,P),t}},u=await b.handleResponse({req:e,nextConfig:E,cacheKey:H,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:N,isRoutePPREnabled:!1,isOnDemandRevalidate:T,revalidateOnlyGenerated:j,responseGenerator:d,waitUntil:a.waitUntil,isMinimalMode:i});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==(l=u.value)?void 0:l.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});i||t.setHeader("x-nextjs-cache",T?"REVALIDATED":u.isMiss?"MISS":u.isStale?"STALE":"HIT"),A&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let f=(0,h.fromNodeOutgoingHttpHeaders)(u.value.headers);return i&&_||f.delete(R.NEXT_CACHE_TAGS_HEADER),!u.cacheControl||t.getHeader("Cache-Control")||f.get("Cache-Control")||f.set("Cache-Control",(0,x.getCacheControlHeader)(u.cacheControl)),await (0,c.sendResponse)(L,B,new Response(u.value.body,{headers:f,status:u.value.status||200})),null};$?await l($):await F.withPropagatedContext(e.headers,()=>F.trace(u.BaseServerSpan.handleRequest,{spanName:`${M} ${v}`,kind:s.SpanKind.SERVER,attributes:{"http.method":M,"http.target":e.url}},l))}catch(t){if(t instanceof f.NoFallbackError||await b.onRequestError(e,t,{routerKind:"App Router",routePath:k,routeType:"route",revalidateReason:(0,p.getRevalidateReason)({isStaticGeneration:U,isOnDemandRevalidate:T})},!1,P),_)throw t;return await (0,c.sendResponse)(L,B,new Response(null,{status:500})),null}}e.s(["handler",()=>j,"patchFetch",()=>T,"routeModule",()=>b,"serverHooks",()=>P,"workAsyncStorage",()=>A,"workUnitAsyncStorage",()=>N],31869)}];
|
|
2
2
|
|
|
3
3
|
//# sourceMappingURL=%5Broot-of-the-server%5D__fc6fd958._.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../node_modules/.pnpm/next%4016.1.6_%40babel%2Bcore%407.29.0_%40playwright%2Btest%401.58.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 { 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 } 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 = \"standalone\"\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 userland\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 (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.experimental.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 context = {\n params,\n prerenderManifest,\n renderOpts: {\n experimental: {\n authInterrupts: Boolean(nextConfig.experimental.authInterrupts)\n },\n cacheComponents: Boolean(nextConfig.cacheComponents),\n supportsDynamicResponse,\n incrementalCache: getRequestMeta(req, '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 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 } else {\n span.updateName(`${method} ${srcPage}`);\n }\n });\n };\n const isMinimalMode = Boolean(process.env.MINIMAL_MODE || getRequestMeta(req, 'minimalMode'));\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 (activeSpan) {\n await handleResponse(activeSpan);\n } else {\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));\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';\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 const resolvedPath = path.resolve(rawPath);\n\n try {\n const dirStat = await stat(resolvedPath);\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 const message = error instanceof Error ? error.message : 'Failed to access path';\n return NextResponse.json({ error: message }, { status: 500 });\n }\n\n try {\n const dirents = await readdir(resolvedPath, { 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 const entryPath = path.join(resolvedPath, dirent.name);\n\n try {\n if (dirent.isDirectory()) {\n const entryStat = await stat(entryPath);\n return {\n name: dirent.name,\n path: entryPath,\n isDirectory: true as const,\n updatedAt: entryStat.mtime.toISOString(),\n };\n }\n\n if (dirent.isSymbolicLink()) {\n const entryStat = await stat(entryPath);\n if (entryStat.isDirectory()) {\n return {\n name: dirent.name,\n path: entryPath,\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: resolvedPath });\n } catch (error: unknown) {\n const message = error instanceof Error ? error.message : 'Failed to read directory';\n return NextResponse.json({ error: message }, { status: 500 });\n }\n}\n\nfunction isErrnoException(error: unknown): error is NodeJS.ErrnoException {\n return error instanceof Error && 'code' in error;\n}\n"],"names":[],"mappings":"4sCAAA,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,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,MACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,KACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,CAAA,CAAA,OAAA,IAAA,EAAA,EAAA,CAAA,CAAA,OChBA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OASO,eAAe,EAAI,CAAgB,EACxC,IAAM,EAAM,IAAI,IAAI,EAAQ,GAAG,EACzB,EAAU,EAAI,YAAY,CAAC,GAAG,CAAC,SAAW,CAAA,EAAA,EAAA,OAAA,AAAO,IACjD,EAAoD,SAAvC,EAAI,YAAY,CAAC,GAAG,CAAC,cAExC,GAAI,CAAC,EAAA,OAAI,CAAC,UAAU,CAAC,GACnB,OAD6B,AACtB,EAAA,YAAY,CAAC,IAAI,CAAC,CAAE,MAAO,uBAAwB,EAAG,C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AAA,AAAY,EAAC,EAAa,EAAa,IAAI,SAAS,KAAM,CAC5D,OAAQ,GACZ,IACO,IACX,CACJ,EAEA,qCAAqC","ignoreList":[0]}
|
|
1
|
+
{"version":3,"sources":["../../../../../../node_modules/.pnpm/next%4016.1.6_%40babel%2Bcore%407.29.0_%40playwright%2Btest%401.58.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 { 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 } 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 userland\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 (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.experimental.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 context = {\n params,\n prerenderManifest,\n renderOpts: {\n experimental: {\n authInterrupts: Boolean(nextConfig.experimental.authInterrupts)\n },\n cacheComponents: Boolean(nextConfig.cacheComponents),\n supportsDynamicResponse,\n incrementalCache: getRequestMeta(req, '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 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 } else {\n span.updateName(`${method} ${srcPage}`);\n }\n });\n };\n const isMinimalMode = Boolean(process.env.MINIMAL_MODE || getRequestMeta(req, 'minimalMode'));\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 (activeSpan) {\n await handleResponse(activeSpan);\n } else {\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));\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';\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 const resolvedPath = path.resolve(rawPath);\n\n try {\n const dirStat = await stat(resolvedPath);\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 const message = error instanceof Error ? error.message : 'Failed to access path';\n return NextResponse.json({ error: message }, { status: 500 });\n }\n\n try {\n const dirents = await readdir(resolvedPath, { 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 const entryPath = path.join(resolvedPath, dirent.name);\n\n try {\n if (dirent.isDirectory()) {\n const entryStat = await stat(entryPath);\n return {\n name: dirent.name,\n path: entryPath,\n isDirectory: true as const,\n updatedAt: entryStat.mtime.toISOString(),\n };\n }\n\n if (dirent.isSymbolicLink()) {\n const entryStat = await stat(entryPath);\n if (entryStat.isDirectory()) {\n return {\n name: dirent.name,\n path: entryPath,\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: resolvedPath });\n } catch (error: unknown) {\n const message = error instanceof Error ? error.message : 'Failed to read directory';\n return NextResponse.json({ error: message }, { status: 500 });\n }\n}\n\nfunction isErrnoException(error: unknown): error is NodeJS.ErrnoException {\n return error instanceof Error && 'code' in error;\n}\n"],"names":[],"mappings":"4sCAAA,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,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,MACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,KACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,CAAA,CAAA,OAAA,IAAA,EAAA,EAAA,CAAA,CAAA,OChBA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OASO,eAAe,EAAI,CAAgB,EACxC,IAAM,EAAM,IAAI,IAAI,EAAQ,GAAG,EACzB,EAAU,EAAI,YAAY,CAAC,GAAG,CAAC,SAAW,CAAA,EAAA,EAAA,OAAA,AAAO,IACjD,EAAoD,SAAvC,EAAI,YAAY,CAAC,GAAG,CA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A,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,EAEA,qCAAqC","ignoreList":[0]}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
module.exports=[93995,a=>{"use strict";var b=a.i(10973),c=a.i(96960),d=a.i(69845),e=a.i(52313),f=a.i(25674);let g=(0,f.createServerReference)("40f2cf4383f59edfb3af0abb1a0cad808bfed47561",f.callServer,void 0,f.findSourceMapURL,"createFeature");var h=a.i(45242),i=a.i(14177),j=a.i(10606),k=a.i(3942),l=a.i(46168),m=a.i(42527),n=a.i(88064);let o=(0,a.i(25700).default)("git-fork",[["circle",{cx:"12",cy:"18",r:"3",key:"1mpf1b"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["path",{d:"M18 9v2c0 .6-.4 1-1 1H7c-.6 0-1-.4-1-1V9",key:"1uq4wg"}],["path",{d:"M12 12v3",key:"158kv8"}]]);var p=a.i(62147),q=a.i(85536),r=a.i(19884);a.i(78454);var s=a.i(24255),t=a.i(2824),u=a.i(18948),v=a.i(90920),w=a.i(79620),x=a.i(584),y=a.i(58339),z=a.i(80646),A=a.i(96867),B=a.i(82934),C=a.i(96213);a.i(307);var D=a.i(30931),E=a.i(61781),F=a.i(13126),G=a.i(1377);a.i(21434);var H=a.i(34379),I=a.i(21333),J=a.i(59911),K=a.i(39116);let L=new Set([".png",".jpg",".jpeg",".gif",".webp",".svg",".bmp",".ico",".pdf",".doc",".docx",".xls",".xlsx",".ppt",".pptx",".txt",".md",".csv",".json",".yaml",".yml",".xml",".ts",".tsx",".js",".jsx",".py",".rb",".go",".rs",".java",".c",".cpp",".h",".hpp",".cs",".swift",".kt",".html",".css",".scss",".less",".sh",".bash",".zsh",".fish",".toml",".ini",".cfg",".conf",".env",".zip",".tar",".gz",".log"]),M=[{id:"allowPrd",label:"PRD",description:"Auto-approve requirements move to planning."},{id:"allowPlan",label:"Plan",description:"Auto-approve planning move to implementation."},{id:"allowMerge",label:"Merge",description:"Auto-approve merge move to Done."}],N={allowPrd:!1,allowPlan:!1,allowMerge:!1};function O({open:a,onClose:d,onSubmit:e,repositoryPath:f,isSubmitting:g=!1,workflowDefaults:i,features:j,repositories:m,initialParentId:n,currentAgentType:v,currentModel:z,initialDescription:F}){let G=(0,r.useSoundAction)("create"),H=f&&(!m||0===m.length||m.some(a=>a.path===f))?f:"",I=i?.approvalGates??N,J=i?.push??!1,O=i?.openPr??!1,R=i?.ciWatchEnabled!==!1,S=i?.enableEvidence??!1,T=i?.commitEvidence??!1,[U,V]=(0,c.useState)(F??"");(0,c.useEffect)(()=>{F&&V(F)},[F]);let[W,X]=(0,c.useState)([]),[Y,Z]=(0,c.useState)({...I}),[$,_]=(0,c.useState)(J),[aa,ab]=(0,c.useState)(O),[ac,ad]=(0,c.useState)(i?.ciWatchEnabled!==!1),[ae,af]=(0,c.useState)(S),[ag,ah]=(0,c.useState)(T),[ai,aj]=(0,c.useState)(void 0),[ak,al]=(0,c.useState)(!1),[am,an]=(0,c.useState)(!1),[ao,ap]=(0,c.useState)(!1),[aq,ar]=(0,c.useState)(!0),[as,at]=(0,c.useState)(void 0),[au,av]=(0,c.useState)(void 0),[aw,ax]=(0,c.useState)(H||void 0),[ay,az]=(0,c.useState)(m??[]),[aA,aB]=(0,c.useState)(!1),[aC,aD]=(0,c.useState)(null),[aE,aF]=(0,c.useState)(!1),aG=(0,c.useRef)(crypto.randomUUID()),aH=(0,c.useRef)(0),aI=(0,c.useRef)(null);(0,c.useEffect)(()=>{i&&(Z({...i.approvalGates}),_(i.push),ab(i.openPr),ad(!1!==i.ciWatchEnabled),af(i.enableEvidence),ah(i.commitEvidence))},[i]),(0,c.useEffect)(()=>{az(m??[])},[m]),(0,c.useEffect)(()=>{a&&n&&aj(n)},[a,n]);let aJ=(0,c.useCallback)(()=>{V(""),X([]),Z({...I}),_(J),ab(O),ad(R),af(S),ah(T),aj(void 0),ax(H||void 0),az(m??[]),al(!1),an(!1),ap(!1),ar(!0),at(void 0),av(void 0),aD(null),aH.current=0,aB(!1)},[I,J,O,S,R,T,H,m]),aK=""!==U.trim()||W.length>0,{attemptClose:aL}=(0,C.useGuardedDrawerClose)({open:a,isDirty:aK,onClose:d,onReset:aJ}),aM=(0,c.useCallback)(async a=>{for(let b of(aD(null),a)){if(b.size>0xa00000)return void aD(`"${b.name}" exceeds 10 MB limit`);let a=function(a){let b=a.lastIndexOf(".");return b>=0?a.slice(b).toLowerCase():""}(b.name);if(a&&!L.has(a))return void aD(`File type "${a}" is not allowed`)}for(let b of a){let a=crypto.randomUUID();X(c=>[...c,{id:a,name:b.name,size:b.size,mimeType:b.type||"application/octet-stream",path:"",loading:!0}]);try{let c=new FormData;c.append("file",b),c.append("sessionId",aG.current);let d=await fetch("/api/attachments/upload",{method:"POST",body:c});if(!d.ok){let b=await d.json().catch(()=>({error:"Upload failed"}));X(b=>b.filter(b=>b.id!==a)),aD(b.error??"Upload failed");return}let e=await d.json();X(b=>b.some(b=>b.id!==a&&b.path===e.path)?b.filter(b=>b.id!==a):b.map(b=>b.id===a?{...e,id:a,loading:!1}:b))}catch{X(b=>b.filter(b=>b.id!==a)),aD("Upload failed")}}},[]),aN=(0,c.useCallback)(a=>{a.preventDefault(),a.stopPropagation(),aH.current+=1,1===aH.current&&aB(!0)},[]),aO=(0,c.useCallback)(a=>{a.preventDefault(),a.stopPropagation(),aH.current-=1,0===aH.current&&aB(!1)},[]),aP=(0,c.useCallback)(a=>{a.preventDefault(),a.stopPropagation()},[]),aQ=(0,c.useCallback)(a=>{a.preventDefault(),a.stopPropagation(),aH.current=0,aB(!1);let b=Array.from(a.dataTransfer.files);b.length>0&&aM(b)},[aM]),aR=(0,c.useCallback)(a=>{let b=a.clipboardData?.items;if(!b)return;let c=[];for(let a of Array.from(b))if("file"===a.kind){let b=a.getAsFile();b&&c.push(b)}c.length>0&&(a.preventDefault(),aM(c))},[aM]),aS=(0,c.useCallback)(a=>{if(a.preventDefault(),!U.trim())return;let b=aw??H;b&&(G.play(),e({description:U.trim(),attachments:W.filter(a=>!a.loading),repositoryPath:b,approvalGates:{allowPrd:Y.allowPrd??!1,allowPlan:Y.allowPlan??!1,allowMerge:Y.allowMerge??!1},push:!!ao||$||aa,openPr:!!ao||aa,ciWatchEnabled:ac,enableEvidence:ae,commitEvidence:ag,fast:ak,forkAndPr:ao,commitSpecs:aq,...am?{pending:am}:{},...as?{agentType:as}:{},...au?{model:au}:{},...ai?{parentId:ai}:{},sessionId:aG.current}),aJ())},[U,W,Y,aw,H,e,$,aa,ae,ac,ag,ak,ao,aq,am,as,au,ai,G,aJ]),aT=(0,c.useCallback)(async()=>{try{let a=await (0,K.pickFiles)();if(!a)return;for(let b of a){let a=crypto.randomUUID();X(c=>[...c,{id:a,name:b.name,size:b.size,mimeType:"application/octet-stream",path:"",loading:!0}]);try{let c=await fetch("/api/attachments/upload-from-path",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:b.path,sessionId:aG.current})});if(!c.ok){let b=await c.json().catch(()=>({error:"Upload failed"}));X(b=>b.filter(b=>b.id!==a)),aD(b.error??"Upload failed");return}let d=await c.json();X(b=>b.some(b=>b.id!==a&&b.path===d.path)?b.filter(b=>b.id!==a):b.map(b=>b.id===a?{...d,id:a,loading:!1}:b))}catch{X(b=>b.filter(b=>b.id!==a)),aD("Upload failed")}}}catch{}},[]),aU=(0,c.useCallback)(a=>{X(b=>b.filter(b=>b.id!==a))},[]),aV=(0,c.useCallback)((a,b)=>{X(c=>c.map(c=>c.id===a?{...c,notes:b}:c))},[]),aW=(0,c.useRef)(null),aX=(0,c.useCallback)(a=>{(a.ctrlKey||a.metaKey)&&"Enter"===a.key&&(a.preventDefault(),aW.current?.requestSubmit())},[]),aY=(0,c.useCallback)(()=>{aF(!0)},[]),aZ=(0,c.useCallback)(()=>{setTimeout(()=>{let a=aI.current?.contains(document.activeElement),b=aI.current?.querySelector('[aria-expanded="true"]')!==null;a||b||aF(!1)},0)},[]),a$=j&&j.length>0,a_=!H&&!aw,a0=!H&&void 0!==m;return(0,b.jsx)(s.BaseDrawer,{open:a,onClose:aL,size:"md",modal:!1,dismissOnOutsideClick:!0,"data-testid":"feature-create-drawer",header:(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)("div",{className:"h-2.5 w-2.5 shrink-0 rounded-full bg-blue-500"}),(0,b.jsx)(t.DrawerTitle,{children:"NEW FEATURE"})]}),g?(0,b.jsx)(t.DrawerDescription,{asChild:!0,children:(0,b.jsx)("div",{children:(0,b.jsx)(y.Badge,{variant:"secondary",children:"Creating..."})})}):null]}),footer:(0,b.jsxs)("div",{className:"flex flex-row justify-end gap-2",children:[(0,b.jsx)(u.Button,{variant:"outline",onClick:aL,disabled:g,children:"Cancel"}),(0,b.jsx)(u.Button,{type:"submit",form:"create-feature-form",disabled:!U.trim()||g||a_,children:g?"Creating...":"+ Create Feature"})]}),children:(0,b.jsx)("div",{className:"overflow-y-auto p-4",children:(0,b.jsx)(B.TooltipProvider,{delayDuration:400,children:(0,b.jsxs)("form",{ref:aW,id:"create-feature-form",onSubmit:aS,onKeyDown:aX,className:"flex flex-col gap-4",children:[a0?(0,b.jsxs)("div",{className:"flex flex-col gap-1.5","data-testid":"repo-selector-section",children:[(0,b.jsx)(x.Label,{className:"text-muted-foreground text-xs font-semibold tracking-wider",children:"REPOSITORY"}),(0,b.jsx)(Q,{repositories:ay,value:aw,onChange:ax,onAddRepository:a=>{az(b=>[...b,a]),ax(a.path)},disabled:g})]}):H?(0,b.jsxs)("div",{className:"flex flex-col gap-1.5","data-testid":"repo-readonly-section",children:[(0,b.jsx)(x.Label,{className:"text-muted-foreground text-xs font-semibold tracking-wider",children:"REPOSITORY"}),(0,b.jsx)("p",{className:"text-sm","data-testid":"repo-readonly-label",children:m?.find(a=>a.path===H)?.name??H.split("/").pop()})]}):null,(0,b.jsxs)("div",{role:"region","aria-label":"File drop zone","data-drag-over":aA?"true":"false",onDragEnter:aN,onDragLeave:aO,onDragOver:aP,onDrop:aQ,className:(0,q.cn)("flex flex-col gap-1.5 rounded-md border-2 border-transparent p-1 transition-colors",aA&&"border-primary/50 bg-primary/5"),children:[(0,b.jsx)(x.Label,{htmlFor:"feature-description",className:"text-muted-foreground text-xs font-semibold tracking-wider",children:"DESCRIBE YOUR FEATURE"}),(0,b.jsxs)("div",{ref:aI,onFocus:aY,onBlur:aZ,className:(0,q.cn)("border-input flex h-56 flex-col overflow-hidden rounded-md border shadow-xs transition-[color,box-shadow]",aE&&"ring-ring/50 border-ring ring-[3px]"),children:[(0,b.jsx)(w.Textarea,{id:"feature-description",placeholder:"e.g. Add GitHub OAuth login with callback handling and token refresh...",value:U,onChange:a=>V(a.target.value),onPaste:aR,required:!0,disabled:g,className:"min-h-0 flex-1 resize-none rounded-none border-0 shadow-none focus-visible:ring-0"}),W.length>0&&(0,b.jsx)("div",{className:"flex flex-wrap items-center gap-1.5 px-3 py-2",children:W.map(a=>(0,b.jsx)(D.AttachmentChip,{name:a.name,size:a.size,mimeType:a.mimeType,path:a.path,onRemove:()=>aU(a.id),disabled:g,loading:a.loading,notes:a.notes,onNotesChange:b=>aV(a.id,b)},a.id))}),aC?(0,b.jsx)("p",{className:"text-destructive px-3 pb-2 text-xs",children:aC}):null,(0,b.jsxs)("div",{className:"border-input flex items-center gap-3 border-t px-3 py-1.5",children:[(0,b.jsx)(E.AgentModelPicker,{initialAgentType:as??v??"claude-code",initialModel:au??z??"claude-sonnet-4-6",mode:"override",onAgentModelChange:(a,b)=>{at(a),av(b)},disabled:g,className:"w-55"}),(0,b.jsxs)(B.Tooltip,{children:[(0,b.jsx)(B.TooltipTrigger,{asChild:!0,children:(0,b.jsxs)("div",{className:"ml-auto flex cursor-pointer items-center gap-2",children:[(0,b.jsx)(A.Switch,{id:"pending-mode",checked:am,onCheckedChange:an,disabled:g}),(0,b.jsxs)(x.Label,{htmlFor:"pending-mode",className:"flex cursor-pointer items-center gap-1 text-sm font-medium",children:[(0,b.jsx)(l.Clock,{className:"h-3.5 w-3.5"}),"Pending"]})]})}),(0,b.jsx)(B.TooltipContent,{side:"bottom",children:"Create without starting — start manually later."})]}),(0,b.jsxs)(B.Tooltip,{children:[(0,b.jsx)(B.TooltipTrigger,{asChild:!0,children:(0,b.jsxs)("div",{className:"flex cursor-pointer items-center gap-2",children:[(0,b.jsx)(A.Switch,{id:"fast-mode",checked:ak,onCheckedChange:al,disabled:g}),(0,b.jsxs)(x.Label,{htmlFor:"fast-mode",className:"flex cursor-pointer items-center gap-1 text-sm font-medium",children:[(0,b.jsx)(k.Zap,{className:"h-3.5 w-3.5"}),"Fast Mode"]})]})}),(0,b.jsx)(B.TooltipContent,{side:"bottom",children:"Skip SDLC phases and implement directly from your prompt."})]}),(0,b.jsxs)(B.Tooltip,{children:[(0,b.jsx)(B.TooltipTrigger,{asChild:!0,children:(0,b.jsx)("button",{type:"button",onClick:aT,disabled:g,"aria-label":"Attach files",className:"text-muted-foreground hover:text-foreground cursor-pointer rounded p-1 transition-colors",children:(0,b.jsx)(h.PaperclipIcon,{className:"h-4 w-4"})})}),(0,b.jsx)(B.TooltipContent,{side:"bottom",children:"Attach files"})]})]})]})]}),a$&&void 0!==n?(0,b.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,b.jsx)(x.Label,{htmlFor:"parent-feature",className:"text-muted-foreground text-xs font-semibold tracking-wider",children:"PARENT FEATURE"}),(0,b.jsx)(P,{features:j,value:ai,onChange:aj,disabled:g})]}):null,(0,b.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,b.jsxs)("div",{className:"border-input flex items-center gap-4 rounded-md border px-3 py-2.5",children:[(0,b.jsxs)(B.Tooltip,{children:[(0,b.jsx)(B.TooltipTrigger,{asChild:!0,children:(0,b.jsx)("span",{className:"text-muted-foreground w-16 shrink-0 cursor-default text-xs font-semibold tracking-wider",children:"APPROVE"})}),(0,b.jsx)(B.TooltipContent,{side:"bottom",children:"Auto-approve phase transitions without manual review."})]}),(0,b.jsx)("div",{className:"flex flex-1 items-center gap-4",children:M.map(a=>(0,b.jsxs)(B.Tooltip,{children:[(0,b.jsx)(B.TooltipTrigger,{asChild:!0,children:(0,b.jsxs)("div",{className:"flex cursor-pointer items-center gap-1.5",children:[(0,b.jsx)(A.Switch,{id:`approve-${a.id}`,size:"sm",checked:Y[a.id]??!1,onCheckedChange:b=>Z(c=>({...c,[a.id]:b})),disabled:g||ak&&("allowPrd"===a.id||"allowPlan"===a.id)}),(0,b.jsx)(x.Label,{htmlFor:`approve-${a.id}`,className:"cursor-pointer text-xs font-medium",children:a.label})]})}),(0,b.jsx)(B.TooltipContent,{side:"bottom",children:ak&&("allowPrd"===a.id||"allowPlan"===a.id)?"Skipped in Fast Mode":a.description})]},a.id))}),(0,b.jsxs)(B.Tooltip,{children:[(0,b.jsx)(B.TooltipTrigger,{asChild:!0,children:(0,b.jsx)("button",{type:"button",onClick:()=>{let a=M.every(a=>Y[a.id]),b={};for(let c of M)b[c.id]=!a;Z(b)},disabled:g,className:(0,q.cn)("text-muted-foreground hover:text-foreground cursor-pointer rounded px-1.5 py-0.5 text-[10px] font-semibold tracking-wider uppercase transition-colors",M.every(a=>Y[a.id])&&"text-primary"),children:"All"})}),(0,b.jsx)(B.TooltipContent,{side:"bottom",children:"Toggle all approval gates"})]})]}),(0,b.jsxs)("div",{className:"border-input flex items-center gap-4 rounded-md border px-3 py-2.5",children:[(0,b.jsxs)(B.Tooltip,{children:[(0,b.jsx)(B.TooltipTrigger,{asChild:!0,children:(0,b.jsx)("span",{className:"text-muted-foreground w-16 shrink-0 cursor-default text-xs font-semibold tracking-wider",children:"EVIDENCE"})}),(0,b.jsx)(B.TooltipContent,{side:"bottom",children:"Collect and attach evidence after implementation."})]}),(0,b.jsxs)("div",{className:"flex flex-1 items-center gap-4",children:[(0,b.jsxs)(B.Tooltip,{children:[(0,b.jsx)(B.TooltipTrigger,{asChild:!0,children:(0,b.jsxs)("div",{className:"flex cursor-pointer items-center gap-1.5",children:[(0,b.jsx)(A.Switch,{id:"enable-evidence",size:"sm",checked:ae,onCheckedChange:a=>{af(a),a||ah(!1)},disabled:g}),(0,b.jsx)(x.Label,{htmlFor:"enable-evidence",className:"cursor-pointer text-xs font-medium",children:"Collect"})]})}),(0,b.jsx)(B.TooltipContent,{side:"bottom",children:"Capture screenshots and artifacts after implementation."})]}),(0,b.jsxs)(B.Tooltip,{children:[(0,b.jsx)(B.TooltipTrigger,{asChild:!0,children:(0,b.jsxs)("div",{className:"flex cursor-pointer items-center gap-1.5",children:[(0,b.jsx)(A.Switch,{id:"commit-evidence",size:"sm",checked:ag,onCheckedChange:ah,disabled:g||!ae||!aa&&!ao}),(0,b.jsx)(x.Label,{htmlFor:"commit-evidence",className:(0,q.cn)("cursor-pointer text-xs font-medium",(!ae||!aa&&!ao)&&"opacity-50"),children:"Add to PR"})]})}),(0,b.jsx)(B.TooltipContent,{side:"bottom",children:aa||ao?ae?"Include evidence in the pull request body.":"Requires evidence collection to be enabled":"Requires PR to be enabled"})]})]})]}),(0,b.jsxs)("div",{className:"border-input flex items-start gap-4 rounded-md border px-3 py-2.5",children:[(0,b.jsx)("span",{className:"text-muted-foreground w-16 shrink-0 pt-0.5 text-xs font-semibold tracking-wider",children:"GIT"}),(0,b.jsxs)("div",{className:"flex flex-1 flex-wrap items-center gap-4",children:[(0,b.jsxs)(B.Tooltip,{children:[(0,b.jsx)(B.TooltipTrigger,{asChild:!0,children:(0,b.jsxs)("div",{className:"flex cursor-pointer items-center gap-1.5",children:[(0,b.jsx)(A.Switch,{id:"push",size:"sm",checked:!!ao||$||aa,onCheckedChange:a=>{_(a),!a&&aa&&ab(!1)},disabled:g||ao}),(0,b.jsx)(x.Label,{htmlFor:"push",className:(0,q.cn)("cursor-pointer text-xs font-medium",ao&&"opacity-50"),children:"Push"})]})}),(0,b.jsx)(B.TooltipContent,{side:"bottom",children:ao?"Enabled — contributing to upstream":"Push branch to remote after implementation."})]}),(0,b.jsxs)(B.Tooltip,{children:[(0,b.jsx)(B.TooltipTrigger,{asChild:!0,children:(0,b.jsxs)("div",{className:"flex cursor-pointer items-center gap-1.5",children:[(0,b.jsx)(A.Switch,{id:"open-pr",size:"sm",checked:!!ao||aa,onCheckedChange:a=>{ab(a),a||ah(!1)},disabled:g||ao}),(0,b.jsx)(x.Label,{htmlFor:"open-pr",className:(0,q.cn)("cursor-pointer text-xs font-medium",ao&&"opacity-50"),children:"PR"})]})}),(0,b.jsx)(B.TooltipContent,{side:"bottom",children:ao?"Enabled — contributing to upstream":"Open a pull request after pushing."})]}),(0,b.jsxs)(B.Tooltip,{children:[(0,b.jsx)(B.TooltipTrigger,{asChild:!0,children:(0,b.jsxs)("div",{className:"flex cursor-pointer items-center gap-1.5",children:[(0,b.jsx)(A.Switch,{id:"ci-watch",size:"sm",checked:ac,onCheckedChange:ad,disabled:g}),(0,b.jsx)(x.Label,{htmlFor:"ci-watch",className:"cursor-pointer text-xs font-medium",children:"Watch"})]})}),(0,b.jsx)(B.TooltipContent,{side:"bottom",children:"Watch CI and auto-fix after push."})]}),(0,b.jsx)("div",{className:"bg-border h-4 w-px shrink-0"}),(0,b.jsxs)(B.Tooltip,{children:[(0,b.jsx)(B.TooltipTrigger,{asChild:!0,children:(0,b.jsxs)("div",{className:"flex cursor-pointer items-center gap-1.5",children:[(0,b.jsx)(A.Switch,{id:"commit-specs",size:"sm",checked:aq,onCheckedChange:ar,disabled:g}),(0,b.jsxs)(x.Label,{htmlFor:"commit-specs",className:"flex cursor-pointer items-center gap-1 text-xs font-medium",children:[(0,b.jsx)(p.FileText,{className:"h-3 w-3"}),"Commit Specs"]})]})}),(0,b.jsx)(B.TooltipContent,{side:"bottom",children:"Commit specs to repository."})]}),(0,b.jsxs)(B.Tooltip,{children:[(0,b.jsx)(B.TooltipTrigger,{asChild:!0,children:(0,b.jsxs)("div",{className:"flex cursor-pointer items-center gap-1.5",children:[(0,b.jsx)(A.Switch,{id:"fork-and-pr",size:"sm",checked:ao,onCheckedChange:a=>{ap(a),a&&ar(!1)},disabled:g}),(0,b.jsxs)(x.Label,{htmlFor:"fork-and-pr",className:"flex cursor-pointer items-center gap-1 text-xs font-medium",children:[(0,b.jsx)(o,{className:"h-3 w-3"}),"Fork & PR"]})]})}),(0,b.jsx)(B.TooltipContent,{side:"bottom",children:"Contribute via fork (PR to upstream)."})]})]})]})]})]})})})})}function P({features:a,value:d,onChange:e,disabled:f}){let[g,h]=(0,c.useState)(!1),[k,l]=(0,c.useState)(""),m=(0,c.useRef)(null),n=a.find(a=>a.id===d),o=k.trim()?a.filter(a=>a.name.toLowerCase().includes(k.toLowerCase())||a.id.toLowerCase().includes(k.toLowerCase())):a,p=(0,c.useCallback)(a=>{e(a),h(!1),l("")},[e]);return(0,c.useEffect)(()=>{g?setTimeout(()=>m.current?.focus(),0):l("")},[g]),(0,b.jsxs)(z.Popover,{open:g,onOpenChange:h,children:[(0,b.jsx)(z.PopoverTrigger,{asChild:!0,children:(0,b.jsxs)("button",{id:"parent-feature",type:"button",role:"combobox","aria-expanded":g,"aria-label":"Parent Feature",disabled:f,"data-testid":"parent-feature-combobox",className:(0,q.cn)("border-input bg-background ring-offset-background focus:ring-ring flex h-9 w-full items-center justify-between rounded-md border px-3 py-2 text-sm focus:ring-2 focus:ring-offset-2 focus:outline-none disabled:cursor-not-allowed disabled:opacity-50",!n&&"text-muted-foreground"),children:[(0,b.jsx)("span",{className:"truncate",children:n?`${n.name} (${n.id.slice(0,8)})`:"Select parent feature..."}),(0,b.jsx)(i.ChevronsUpDown,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})}),(0,b.jsx)(z.PopoverContent,{className:"w-80 p-0",align:"start","data-testid":"parent-feature-combobox-content",children:(0,b.jsxs)("div",{className:"flex flex-col",children:[(0,b.jsx)("div",{className:"border-b p-2",children:(0,b.jsx)(v.Input,{ref:m,placeholder:"Search features...",value:k,onChange:a=>l(a.target.value),className:"h-8 border-0 p-0 text-sm shadow-none focus-visible:ring-0","data-testid":"parent-feature-search"})}),(0,b.jsxs)("div",{className:"max-h-48 overflow-y-auto py-1",role:"listbox","aria-label":"Features",children:[(0,b.jsxs)("button",{type:"button",role:"option","aria-selected":void 0===d,onClick:()=>p(void 0),className:(0,q.cn)("hover:bg-accent hover:text-accent-foreground flex w-full items-center gap-2 px-3 py-2 text-sm",void 0===d&&"bg-accent/50"),"data-testid":"parent-feature-option-none",children:[(0,b.jsx)(j.CheckIcon,{className:(0,q.cn)("h-4 w-4 shrink-0",void 0!==d&&"invisible")}),(0,b.jsx)("span",{className:"text-muted-foreground italic",children:"No parent"})]}),0===o.length&&k?(0,b.jsx)("p",{className:"text-muted-foreground px-3 py-2 text-sm",children:"No features found."}):o.map(a=>(0,b.jsxs)("button",{type:"button",role:"option","aria-selected":d===a.id,onClick:()=>p(a.id),className:(0,q.cn)("hover:bg-accent hover:text-accent-foreground flex w-full items-center gap-2 px-3 py-2 text-sm",d===a.id&&"bg-accent/50"),"data-testid":`parent-feature-option-${a.id}`,children:[(0,b.jsx)(j.CheckIcon,{className:(0,q.cn)("h-4 w-4 shrink-0",d!==a.id&&"invisible")}),(0,b.jsxs)("span",{className:"truncate",children:[a.name," ",(0,b.jsxs)("span",{className:"text-muted-foreground font-mono text-xs",children:["(",a.id.slice(0,8),")"]})]})]},a.id))]})]})})]})}function Q({repositories:a,value:d,onChange:e,onAddRepository:f,disabled:g}){let[h,k]=(0,c.useState)(!1),[l,o]=(0,c.useState)(""),[p,r]=(0,c.useState)(!1),[s,t]=(0,c.useState)(null),[u,w]=(0,c.useState)(!1),x=(0,c.useRef)(null),{reactFileManager:y}=(0,I.useFeatureFlags)(),A=a.find(a=>a.path===d),B=l.trim()?a.filter(a=>a.name.toLowerCase().includes(l.toLowerCase())||a.path.toLowerCase().includes(l.toLowerCase())):a,C=(0,c.useCallback)(a=>{e(a),k(!1),o("")},[e]),D=(0,c.useCallback)(async a=>{let b=await (0,J.addRepository)({path:a});if(b.error){t(b.error),r(!1);return}if(b.repository){let a={id:b.repository.id,name:b.repository.name,path:b.repository.path};f?.(a),e(a.path),k(!1),o("")}},[f,e]),E=(0,c.useCallback)(async()=>{if(!p){if(y)return void w(!0);r(!0),t(null);try{let a=await (0,G.pickFolder)();if(!a)return void r(!1);await D(a)}catch{w(!0)}finally{r(!1)}}},[p,y,D]),K=(0,c.useCallback)(async a=>{if(w(!1),a){r(!0),t(null);try{await D(a)}catch(a){t(a instanceof Error?a.message:"Failed to add repository")}finally{r(!1)}}},[D]);return(0,c.useEffect)(()=>{h?setTimeout(()=>x.current?.focus(),0):o("")},[h]),(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)(z.Popover,{open:h,onOpenChange:k,children:[(0,b.jsx)(z.PopoverTrigger,{asChild:!0,children:(0,b.jsxs)("button",{type:"button",role:"combobox","aria-expanded":h,"aria-label":"Repository",disabled:g,"data-testid":"repository-combobox",className:(0,q.cn)("border-input bg-background ring-offset-background focus:ring-ring flex h-9 w-full items-center justify-between rounded-md border px-3 py-2 text-sm focus:ring-2 focus:ring-offset-2 focus:outline-none disabled:cursor-not-allowed disabled:opacity-50",!A&&"text-muted-foreground"),children:[(0,b.jsx)("span",{className:"truncate",children:A?A.name:"Select repository..."}),(0,b.jsx)(i.ChevronsUpDown,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})}),(0,b.jsx)(z.PopoverContent,{className:"w-80 p-0",align:"start","data-testid":"repository-combobox-content",children:(0,b.jsxs)("div",{className:"flex flex-col",children:[(0,b.jsx)("div",{className:"border-b p-2",children:(0,b.jsx)(v.Input,{ref:x,placeholder:"Search repositories...",value:l,onChange:a=>o(a.target.value),className:"h-8 border-0 p-0 text-sm shadow-none focus-visible:ring-0","data-testid":"repository-search"})}),(0,b.jsx)("div",{className:"max-h-48 overflow-y-auto py-1",role:"listbox","aria-label":"Repositories",children:0===B.length?(0,b.jsx)("p",{className:"text-muted-foreground px-3 py-2 text-sm","data-testid":"repository-empty",children:"No repositories found."}):B.map(a=>(0,b.jsxs)("button",{type:"button",role:"option","aria-selected":d===a.path,onClick:()=>C(a.path),className:(0,q.cn)("hover:bg-accent hover:text-accent-foreground flex w-full items-center gap-2 px-3 py-2 text-sm",d===a.path&&"bg-accent/50"),"data-testid":`repository-option-${a.id}`,children:[(0,b.jsx)(j.CheckIcon,{className:(0,q.cn)("h-4 w-4 shrink-0",d!==a.path&&"invisible")}),(0,b.jsxs)("span",{className:"flex flex-col items-start truncate",children:[(0,b.jsx)("span",{className:"truncate",children:a.name}),(0,b.jsx)("span",{className:"text-muted-foreground truncate text-xs",children:a.path})]})]},a.id))}),(0,b.jsx)(F.Separator,{}),(0,b.jsxs)("button",{type:"button",onClick:E,disabled:p,className:"hover:bg-accent hover:text-accent-foreground flex w-full items-center gap-2 px-3 py-2 text-sm","data-testid":"add-repository-item",children:[p?(0,b.jsx)(n.Loader2,{className:"h-4 w-4 shrink-0 animate-spin"}):(0,b.jsx)(m.FolderPlus,{className:"h-4 w-4 shrink-0"}),(0,b.jsx)("span",{children:"Add new repository..."})]}),s?(0,b.jsx)("p",{className:"px-3 pb-2 text-xs text-red-500","data-testid":"add-repository-error",children:s}):null]})})]}),(0,b.jsx)(H.ReactFileManagerDialog,{open:u,onOpenChange:a=>{a||w(!1)},onSelect:K})]})}function R({repositoryPath:a,initialParentId:f,initialDescription:h,features:i,repositories:j,workflowDefaults:k,currentAgentType:l,currentModel:m}){let n=(0,d.useRouter)(),[o,p]=(0,c.useState)(!1),q=(0,d.usePathname)().startsWith("/create"),r=!o&&q;(0,c.useEffect)(()=>{!q&&o&&p(!1)},[q,o]);let s=(0,c.useCallback)(()=>{n.push("/")},[n]),t=(0,c.useCallback)(a=>{p(!0),n.push("/"),g(a).then(b=>{b.error?e.toast.error(b.error):window.dispatchEvent(new CustomEvent("shep:feature-created",{detail:{featureId:b.feature.id,name:b.feature.name,description:b.feature.description,repositoryPath:b.feature.repositoryPath,parentId:a.parentId}}))}).catch(()=>{e.toast.error("Failed to create feature"),p(!1)})},[n]);return(0,b.jsx)(O,{open:r,onClose:s,onSubmit:t,repositoryPath:a,features:i,repositories:j,workflowDefaults:k,initialParentId:f,initialDescription:h,isSubmitting:o,currentAgentType:l,currentModel:m})}a.s(["CreateDrawerClient",()=>R],93995)}];
|
|
1
|
+
module.exports=[93995,a=>{"use strict";var b=a.i(10973),c=a.i(96960),d=a.i(69845),e=a.i(52313),f=a.i(25674);let g=(0,f.createServerReference)("40a98ca83704e53dabc1a11c89f55cc4425dfa5ffa",f.callServer,void 0,f.findSourceMapURL,"createFeature");var h=a.i(45242),i=a.i(14177),j=a.i(10606),k=a.i(3942),l=a.i(46168),m=a.i(42527),n=a.i(88064);let o=(0,a.i(25700).default)("git-fork",[["circle",{cx:"12",cy:"18",r:"3",key:"1mpf1b"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["path",{d:"M18 9v2c0 .6-.4 1-1 1H7c-.6 0-1-.4-1-1V9",key:"1uq4wg"}],["path",{d:"M12 12v3",key:"158kv8"}]]);var p=a.i(62147),q=a.i(85536),r=a.i(19884);a.i(78454);var s=a.i(24255),t=a.i(2824),u=a.i(18948),v=a.i(90920),w=a.i(79620),x=a.i(584),y=a.i(58339),z=a.i(80646),A=a.i(96867),B=a.i(82934),C=a.i(96213);a.i(307);var D=a.i(30931),E=a.i(61781),F=a.i(13126),G=a.i(1377);a.i(21434);var H=a.i(34379),I=a.i(21333),J=a.i(38094),K=a.i(39116);let L=new Set([".png",".jpg",".jpeg",".gif",".webp",".svg",".bmp",".ico",".pdf",".doc",".docx",".xls",".xlsx",".ppt",".pptx",".txt",".md",".csv",".json",".yaml",".yml",".xml",".ts",".tsx",".js",".jsx",".py",".rb",".go",".rs",".java",".c",".cpp",".h",".hpp",".cs",".swift",".kt",".html",".css",".scss",".less",".sh",".bash",".zsh",".fish",".toml",".ini",".cfg",".conf",".env",".zip",".tar",".gz",".log"]),M=[{id:"allowPrd",label:"PRD",description:"Auto-approve requirements move to planning."},{id:"allowPlan",label:"Plan",description:"Auto-approve planning move to implementation."},{id:"allowMerge",label:"Merge",description:"Auto-approve merge move to Done."}],N={allowPrd:!1,allowPlan:!1,allowMerge:!1};function O({open:a,onClose:d,onSubmit:e,repositoryPath:f,isSubmitting:g=!1,workflowDefaults:i,features:j,repositories:m,initialParentId:n,currentAgentType:v,currentModel:z,initialDescription:F}){let G=(0,r.useSoundAction)("create"),H=f&&(!m||0===m.length||m.some(a=>a.path===f))?f:"",I=i?.approvalGates??N,J=i?.push??!1,O=i?.openPr??!1,R=i?.ciWatchEnabled!==!1,S=i?.enableEvidence??!1,T=i?.commitEvidence??!1,[U,V]=(0,c.useState)(F??"");(0,c.useEffect)(()=>{F&&V(F)},[F]);let[W,X]=(0,c.useState)([]),[Y,Z]=(0,c.useState)({...I}),[$,_]=(0,c.useState)(J),[aa,ab]=(0,c.useState)(O),[ac,ad]=(0,c.useState)(i?.ciWatchEnabled!==!1),[ae,af]=(0,c.useState)(S),[ag,ah]=(0,c.useState)(T),[ai,aj]=(0,c.useState)(void 0),[ak,al]=(0,c.useState)(!1),[am,an]=(0,c.useState)(!1),[ao,ap]=(0,c.useState)(!1),[aq,ar]=(0,c.useState)(!0),[as,at]=(0,c.useState)(void 0),[au,av]=(0,c.useState)(void 0),[aw,ax]=(0,c.useState)(H||void 0),[ay,az]=(0,c.useState)(m??[]),[aA,aB]=(0,c.useState)(!1),[aC,aD]=(0,c.useState)(null),[aE,aF]=(0,c.useState)(!1),aG=(0,c.useRef)(crypto.randomUUID()),aH=(0,c.useRef)(0),aI=(0,c.useRef)(null);(0,c.useEffect)(()=>{i&&(Z({...i.approvalGates}),_(i.push),ab(i.openPr),ad(!1!==i.ciWatchEnabled),af(i.enableEvidence),ah(i.commitEvidence))},[i]),(0,c.useEffect)(()=>{az(m??[])},[m]),(0,c.useEffect)(()=>{a&&n&&aj(n)},[a,n]);let aJ=(0,c.useCallback)(()=>{V(""),X([]),Z({...I}),_(J),ab(O),ad(R),af(S),ah(T),aj(void 0),ax(H||void 0),az(m??[]),al(!1),an(!1),ap(!1),ar(!0),at(void 0),av(void 0),aD(null),aH.current=0,aB(!1)},[I,J,O,S,R,T,H,m]),aK=""!==U.trim()||W.length>0,{attemptClose:aL}=(0,C.useGuardedDrawerClose)({open:a,isDirty:aK,onClose:d,onReset:aJ}),aM=(0,c.useCallback)(async a=>{for(let b of(aD(null),a)){if(b.size>0xa00000)return void aD(`"${b.name}" exceeds 10 MB limit`);let a=function(a){let b=a.lastIndexOf(".");return b>=0?a.slice(b).toLowerCase():""}(b.name);if(a&&!L.has(a))return void aD(`File type "${a}" is not allowed`)}for(let b of a){let a=crypto.randomUUID();X(c=>[...c,{id:a,name:b.name,size:b.size,mimeType:b.type||"application/octet-stream",path:"",loading:!0}]);try{let c=new FormData;c.append("file",b),c.append("sessionId",aG.current);let d=await fetch("/api/attachments/upload",{method:"POST",body:c});if(!d.ok){let b=await d.json().catch(()=>({error:"Upload failed"}));X(b=>b.filter(b=>b.id!==a)),aD(b.error??"Upload failed");return}let e=await d.json();X(b=>b.some(b=>b.id!==a&&b.path===e.path)?b.filter(b=>b.id!==a):b.map(b=>b.id===a?{...e,id:a,loading:!1}:b))}catch{X(b=>b.filter(b=>b.id!==a)),aD("Upload failed")}}},[]),aN=(0,c.useCallback)(a=>{a.preventDefault(),a.stopPropagation(),aH.current+=1,1===aH.current&&aB(!0)},[]),aO=(0,c.useCallback)(a=>{a.preventDefault(),a.stopPropagation(),aH.current-=1,0===aH.current&&aB(!1)},[]),aP=(0,c.useCallback)(a=>{a.preventDefault(),a.stopPropagation()},[]),aQ=(0,c.useCallback)(a=>{a.preventDefault(),a.stopPropagation(),aH.current=0,aB(!1);let b=Array.from(a.dataTransfer.files);b.length>0&&aM(b)},[aM]),aR=(0,c.useCallback)(a=>{let b=a.clipboardData?.items;if(!b)return;let c=[];for(let a of Array.from(b))if("file"===a.kind){let b=a.getAsFile();b&&c.push(b)}c.length>0&&(a.preventDefault(),aM(c))},[aM]),aS=(0,c.useCallback)(a=>{if(a.preventDefault(),!U.trim())return;let b=aw??H;b&&(G.play(),e({description:U.trim(),attachments:W.filter(a=>!a.loading),repositoryPath:b,approvalGates:{allowPrd:Y.allowPrd??!1,allowPlan:Y.allowPlan??!1,allowMerge:Y.allowMerge??!1},push:!!ao||$||aa,openPr:!!ao||aa,ciWatchEnabled:ac,enableEvidence:ae,commitEvidence:ag,fast:ak,forkAndPr:ao,commitSpecs:aq,...am?{pending:am}:{},...as?{agentType:as}:{},...au?{model:au}:{},...ai?{parentId:ai}:{},sessionId:aG.current}),aJ())},[U,W,Y,aw,H,e,$,aa,ae,ac,ag,ak,ao,aq,am,as,au,ai,G,aJ]),aT=(0,c.useCallback)(async()=>{try{let a=await (0,K.pickFiles)();if(!a)return;for(let b of a){let a=crypto.randomUUID();X(c=>[...c,{id:a,name:b.name,size:b.size,mimeType:"application/octet-stream",path:"",loading:!0}]);try{let c=await fetch("/api/attachments/upload-from-path",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:b.path,sessionId:aG.current})});if(!c.ok){let b=await c.json().catch(()=>({error:"Upload failed"}));X(b=>b.filter(b=>b.id!==a)),aD(b.error??"Upload failed");return}let d=await c.json();X(b=>b.some(b=>b.id!==a&&b.path===d.path)?b.filter(b=>b.id!==a):b.map(b=>b.id===a?{...d,id:a,loading:!1}:b))}catch{X(b=>b.filter(b=>b.id!==a)),aD("Upload failed")}}}catch{}},[]),aU=(0,c.useCallback)(a=>{X(b=>b.filter(b=>b.id!==a))},[]),aV=(0,c.useCallback)((a,b)=>{X(c=>c.map(c=>c.id===a?{...c,notes:b}:c))},[]),aW=(0,c.useRef)(null),aX=(0,c.useCallback)(a=>{(a.ctrlKey||a.metaKey)&&"Enter"===a.key&&(a.preventDefault(),aW.current?.requestSubmit())},[]),aY=(0,c.useCallback)(()=>{aF(!0)},[]),aZ=(0,c.useCallback)(()=>{setTimeout(()=>{let a=aI.current?.contains(document.activeElement),b=aI.current?.querySelector('[aria-expanded="true"]')!==null;a||b||aF(!1)},0)},[]),a$=j&&j.length>0,a_=!H&&!aw,a0=!H&&void 0!==m;return(0,b.jsx)(s.BaseDrawer,{open:a,onClose:aL,size:"md",modal:!1,dismissOnOutsideClick:!0,"data-testid":"feature-create-drawer",header:(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)("div",{className:"h-2.5 w-2.5 shrink-0 rounded-full bg-blue-500"}),(0,b.jsx)(t.DrawerTitle,{children:"NEW FEATURE"})]}),g?(0,b.jsx)(t.DrawerDescription,{asChild:!0,children:(0,b.jsx)("div",{children:(0,b.jsx)(y.Badge,{variant:"secondary",children:"Creating..."})})}):null]}),footer:(0,b.jsxs)("div",{className:"flex flex-row justify-end gap-2",children:[(0,b.jsx)(u.Button,{variant:"outline",onClick:aL,disabled:g,children:"Cancel"}),(0,b.jsx)(u.Button,{type:"submit",form:"create-feature-form",disabled:!U.trim()||g||a_,children:g?"Creating...":"+ Create Feature"})]}),children:(0,b.jsx)("div",{className:"overflow-y-auto p-4",children:(0,b.jsx)(B.TooltipProvider,{delayDuration:400,children:(0,b.jsxs)("form",{ref:aW,id:"create-feature-form",onSubmit:aS,onKeyDown:aX,className:"flex flex-col gap-4",children:[a0?(0,b.jsxs)("div",{className:"flex flex-col gap-1.5","data-testid":"repo-selector-section",children:[(0,b.jsx)(x.Label,{className:"text-muted-foreground text-xs font-semibold tracking-wider",children:"REPOSITORY"}),(0,b.jsx)(Q,{repositories:ay,value:aw,onChange:ax,onAddRepository:a=>{az(b=>[...b,a]),ax(a.path)},disabled:g})]}):H?(0,b.jsxs)("div",{className:"flex flex-col gap-1.5","data-testid":"repo-readonly-section",children:[(0,b.jsx)(x.Label,{className:"text-muted-foreground text-xs font-semibold tracking-wider",children:"REPOSITORY"}),(0,b.jsx)("p",{className:"text-sm","data-testid":"repo-readonly-label",children:m?.find(a=>a.path===H)?.name??H.split("/").pop()})]}):null,(0,b.jsxs)("div",{role:"region","aria-label":"File drop zone","data-drag-over":aA?"true":"false",onDragEnter:aN,onDragLeave:aO,onDragOver:aP,onDrop:aQ,className:(0,q.cn)("flex flex-col gap-1.5 rounded-md border-2 border-transparent p-1 transition-colors",aA&&"border-primary/50 bg-primary/5"),children:[(0,b.jsx)(x.Label,{htmlFor:"feature-description",className:"text-muted-foreground text-xs font-semibold tracking-wider",children:"DESCRIBE YOUR FEATURE"}),(0,b.jsxs)("div",{ref:aI,onFocus:aY,onBlur:aZ,className:(0,q.cn)("border-input flex h-56 flex-col overflow-hidden rounded-md border shadow-xs transition-[color,box-shadow]",aE&&"ring-ring/50 border-ring ring-[3px]"),children:[(0,b.jsx)(w.Textarea,{id:"feature-description",placeholder:"e.g. Add GitHub OAuth login with callback handling and token refresh...",value:U,onChange:a=>V(a.target.value),onPaste:aR,required:!0,disabled:g,className:"min-h-0 flex-1 resize-none rounded-none border-0 shadow-none focus-visible:ring-0"}),W.length>0&&(0,b.jsx)("div",{className:"flex flex-wrap items-center gap-1.5 px-3 py-2",children:W.map(a=>(0,b.jsx)(D.AttachmentChip,{name:a.name,size:a.size,mimeType:a.mimeType,path:a.path,onRemove:()=>aU(a.id),disabled:g,loading:a.loading,notes:a.notes,onNotesChange:b=>aV(a.id,b)},a.id))}),aC?(0,b.jsx)("p",{className:"text-destructive px-3 pb-2 text-xs",children:aC}):null,(0,b.jsxs)("div",{className:"border-input flex items-center gap-3 border-t px-3 py-1.5",children:[(0,b.jsx)(E.AgentModelPicker,{initialAgentType:as??v??"claude-code",initialModel:au??z??"claude-sonnet-4-6",mode:"override",onAgentModelChange:(a,b)=>{at(a),av(b)},disabled:g,className:"w-55"}),(0,b.jsxs)(B.Tooltip,{children:[(0,b.jsx)(B.TooltipTrigger,{asChild:!0,children:(0,b.jsxs)("div",{className:"ml-auto flex cursor-pointer items-center gap-2",children:[(0,b.jsx)(A.Switch,{id:"pending-mode",checked:am,onCheckedChange:an,disabled:g}),(0,b.jsxs)(x.Label,{htmlFor:"pending-mode",className:"flex cursor-pointer items-center gap-1 text-sm font-medium",children:[(0,b.jsx)(l.Clock,{className:"h-3.5 w-3.5"}),"Pending"]})]})}),(0,b.jsx)(B.TooltipContent,{side:"bottom",children:"Create without starting — start manually later."})]}),(0,b.jsxs)(B.Tooltip,{children:[(0,b.jsx)(B.TooltipTrigger,{asChild:!0,children:(0,b.jsxs)("div",{className:"flex cursor-pointer items-center gap-2",children:[(0,b.jsx)(A.Switch,{id:"fast-mode",checked:ak,onCheckedChange:al,disabled:g}),(0,b.jsxs)(x.Label,{htmlFor:"fast-mode",className:"flex cursor-pointer items-center gap-1 text-sm font-medium",children:[(0,b.jsx)(k.Zap,{className:"h-3.5 w-3.5"}),"Fast Mode"]})]})}),(0,b.jsx)(B.TooltipContent,{side:"bottom",children:"Skip SDLC phases and implement directly from your prompt."})]}),(0,b.jsxs)(B.Tooltip,{children:[(0,b.jsx)(B.TooltipTrigger,{asChild:!0,children:(0,b.jsx)("button",{type:"button",onClick:aT,disabled:g,"aria-label":"Attach files",className:"text-muted-foreground hover:text-foreground cursor-pointer rounded p-1 transition-colors",children:(0,b.jsx)(h.PaperclipIcon,{className:"h-4 w-4"})})}),(0,b.jsx)(B.TooltipContent,{side:"bottom",children:"Attach files"})]})]})]})]}),a$&&void 0!==n?(0,b.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,b.jsx)(x.Label,{htmlFor:"parent-feature",className:"text-muted-foreground text-xs font-semibold tracking-wider",children:"PARENT FEATURE"}),(0,b.jsx)(P,{features:j,value:ai,onChange:aj,disabled:g})]}):null,(0,b.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,b.jsxs)("div",{className:"border-input flex items-center gap-4 rounded-md border px-3 py-2.5",children:[(0,b.jsxs)(B.Tooltip,{children:[(0,b.jsx)(B.TooltipTrigger,{asChild:!0,children:(0,b.jsx)("span",{className:"text-muted-foreground w-16 shrink-0 cursor-default text-xs font-semibold tracking-wider",children:"APPROVE"})}),(0,b.jsx)(B.TooltipContent,{side:"bottom",children:"Auto-approve phase transitions without manual review."})]}),(0,b.jsx)("div",{className:"flex flex-1 items-center gap-4",children:M.map(a=>(0,b.jsxs)(B.Tooltip,{children:[(0,b.jsx)(B.TooltipTrigger,{asChild:!0,children:(0,b.jsxs)("div",{className:"flex cursor-pointer items-center gap-1.5",children:[(0,b.jsx)(A.Switch,{id:`approve-${a.id}`,size:"sm",checked:Y[a.id]??!1,onCheckedChange:b=>Z(c=>({...c,[a.id]:b})),disabled:g||ak&&("allowPrd"===a.id||"allowPlan"===a.id)}),(0,b.jsx)(x.Label,{htmlFor:`approve-${a.id}`,className:"cursor-pointer text-xs font-medium",children:a.label})]})}),(0,b.jsx)(B.TooltipContent,{side:"bottom",children:ak&&("allowPrd"===a.id||"allowPlan"===a.id)?"Skipped in Fast Mode":a.description})]},a.id))}),(0,b.jsxs)(B.Tooltip,{children:[(0,b.jsx)(B.TooltipTrigger,{asChild:!0,children:(0,b.jsx)("button",{type:"button",onClick:()=>{let a=M.every(a=>Y[a.id]),b={};for(let c of M)b[c.id]=!a;Z(b)},disabled:g,className:(0,q.cn)("text-muted-foreground hover:text-foreground cursor-pointer rounded px-1.5 py-0.5 text-[10px] font-semibold tracking-wider uppercase transition-colors",M.every(a=>Y[a.id])&&"text-primary"),children:"All"})}),(0,b.jsx)(B.TooltipContent,{side:"bottom",children:"Toggle all approval gates"})]})]}),(0,b.jsxs)("div",{className:"border-input flex items-center gap-4 rounded-md border px-3 py-2.5",children:[(0,b.jsxs)(B.Tooltip,{children:[(0,b.jsx)(B.TooltipTrigger,{asChild:!0,children:(0,b.jsx)("span",{className:"text-muted-foreground w-16 shrink-0 cursor-default text-xs font-semibold tracking-wider",children:"EVIDENCE"})}),(0,b.jsx)(B.TooltipContent,{side:"bottom",children:"Collect and attach evidence after implementation."})]}),(0,b.jsxs)("div",{className:"flex flex-1 items-center gap-4",children:[(0,b.jsxs)(B.Tooltip,{children:[(0,b.jsx)(B.TooltipTrigger,{asChild:!0,children:(0,b.jsxs)("div",{className:"flex cursor-pointer items-center gap-1.5",children:[(0,b.jsx)(A.Switch,{id:"enable-evidence",size:"sm",checked:ae,onCheckedChange:a=>{af(a),a||ah(!1)},disabled:g}),(0,b.jsx)(x.Label,{htmlFor:"enable-evidence",className:"cursor-pointer text-xs font-medium",children:"Collect"})]})}),(0,b.jsx)(B.TooltipContent,{side:"bottom",children:"Capture screenshots and artifacts after implementation."})]}),(0,b.jsxs)(B.Tooltip,{children:[(0,b.jsx)(B.TooltipTrigger,{asChild:!0,children:(0,b.jsxs)("div",{className:"flex cursor-pointer items-center gap-1.5",children:[(0,b.jsx)(A.Switch,{id:"commit-evidence",size:"sm",checked:ag,onCheckedChange:ah,disabled:g||!ae||!aa&&!ao}),(0,b.jsx)(x.Label,{htmlFor:"commit-evidence",className:(0,q.cn)("cursor-pointer text-xs font-medium",(!ae||!aa&&!ao)&&"opacity-50"),children:"Add to PR"})]})}),(0,b.jsx)(B.TooltipContent,{side:"bottom",children:aa||ao?ae?"Include evidence in the pull request body.":"Requires evidence collection to be enabled":"Requires PR to be enabled"})]})]})]}),(0,b.jsxs)("div",{className:"border-input flex items-start gap-4 rounded-md border px-3 py-2.5",children:[(0,b.jsx)("span",{className:"text-muted-foreground w-16 shrink-0 pt-0.5 text-xs font-semibold tracking-wider",children:"GIT"}),(0,b.jsxs)("div",{className:"flex flex-1 flex-wrap items-center gap-4",children:[(0,b.jsxs)(B.Tooltip,{children:[(0,b.jsx)(B.TooltipTrigger,{asChild:!0,children:(0,b.jsxs)("div",{className:"flex cursor-pointer items-center gap-1.5",children:[(0,b.jsx)(A.Switch,{id:"push",size:"sm",checked:!!ao||$||aa,onCheckedChange:a=>{_(a),!a&&aa&&ab(!1)},disabled:g||ao}),(0,b.jsx)(x.Label,{htmlFor:"push",className:(0,q.cn)("cursor-pointer text-xs font-medium",ao&&"opacity-50"),children:"Push"})]})}),(0,b.jsx)(B.TooltipContent,{side:"bottom",children:ao?"Enabled — contributing to upstream":"Push branch to remote after implementation."})]}),(0,b.jsxs)(B.Tooltip,{children:[(0,b.jsx)(B.TooltipTrigger,{asChild:!0,children:(0,b.jsxs)("div",{className:"flex cursor-pointer items-center gap-1.5",children:[(0,b.jsx)(A.Switch,{id:"open-pr",size:"sm",checked:!!ao||aa,onCheckedChange:a=>{ab(a),a||ah(!1)},disabled:g||ao}),(0,b.jsx)(x.Label,{htmlFor:"open-pr",className:(0,q.cn)("cursor-pointer text-xs font-medium",ao&&"opacity-50"),children:"PR"})]})}),(0,b.jsx)(B.TooltipContent,{side:"bottom",children:ao?"Enabled — contributing to upstream":"Open a pull request after pushing."})]}),(0,b.jsxs)(B.Tooltip,{children:[(0,b.jsx)(B.TooltipTrigger,{asChild:!0,children:(0,b.jsxs)("div",{className:"flex cursor-pointer items-center gap-1.5",children:[(0,b.jsx)(A.Switch,{id:"ci-watch",size:"sm",checked:ac,onCheckedChange:ad,disabled:g}),(0,b.jsx)(x.Label,{htmlFor:"ci-watch",className:"cursor-pointer text-xs font-medium",children:"Watch"})]})}),(0,b.jsx)(B.TooltipContent,{side:"bottom",children:"Watch CI and auto-fix after push."})]}),(0,b.jsx)("div",{className:"bg-border h-4 w-px shrink-0"}),(0,b.jsxs)(B.Tooltip,{children:[(0,b.jsx)(B.TooltipTrigger,{asChild:!0,children:(0,b.jsxs)("div",{className:"flex cursor-pointer items-center gap-1.5",children:[(0,b.jsx)(A.Switch,{id:"commit-specs",size:"sm",checked:aq,onCheckedChange:ar,disabled:g}),(0,b.jsxs)(x.Label,{htmlFor:"commit-specs",className:"flex cursor-pointer items-center gap-1 text-xs font-medium",children:[(0,b.jsx)(p.FileText,{className:"h-3 w-3"}),"Commit Specs"]})]})}),(0,b.jsx)(B.TooltipContent,{side:"bottom",children:"Commit specs to repository."})]}),(0,b.jsxs)(B.Tooltip,{children:[(0,b.jsx)(B.TooltipTrigger,{asChild:!0,children:(0,b.jsxs)("div",{className:"flex cursor-pointer items-center gap-1.5",children:[(0,b.jsx)(A.Switch,{id:"fork-and-pr",size:"sm",checked:ao,onCheckedChange:a=>{ap(a),a&&ar(!1)},disabled:g}),(0,b.jsxs)(x.Label,{htmlFor:"fork-and-pr",className:"flex cursor-pointer items-center gap-1 text-xs font-medium",children:[(0,b.jsx)(o,{className:"h-3 w-3"}),"Fork & PR"]})]})}),(0,b.jsx)(B.TooltipContent,{side:"bottom",children:"Contribute via fork (PR to upstream)."})]})]})]})]})]})})})})}function P({features:a,value:d,onChange:e,disabled:f}){let[g,h]=(0,c.useState)(!1),[k,l]=(0,c.useState)(""),m=(0,c.useRef)(null),n=a.find(a=>a.id===d),o=k.trim()?a.filter(a=>a.name.toLowerCase().includes(k.toLowerCase())||a.id.toLowerCase().includes(k.toLowerCase())):a,p=(0,c.useCallback)(a=>{e(a),h(!1),l("")},[e]);return(0,c.useEffect)(()=>{g?setTimeout(()=>m.current?.focus(),0):l("")},[g]),(0,b.jsxs)(z.Popover,{open:g,onOpenChange:h,children:[(0,b.jsx)(z.PopoverTrigger,{asChild:!0,children:(0,b.jsxs)("button",{id:"parent-feature",type:"button",role:"combobox","aria-expanded":g,"aria-label":"Parent Feature",disabled:f,"data-testid":"parent-feature-combobox",className:(0,q.cn)("border-input bg-background ring-offset-background focus:ring-ring flex h-9 w-full items-center justify-between rounded-md border px-3 py-2 text-sm focus:ring-2 focus:ring-offset-2 focus:outline-none disabled:cursor-not-allowed disabled:opacity-50",!n&&"text-muted-foreground"),children:[(0,b.jsx)("span",{className:"truncate",children:n?`${n.name} (${n.id.slice(0,8)})`:"Select parent feature..."}),(0,b.jsx)(i.ChevronsUpDown,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})}),(0,b.jsx)(z.PopoverContent,{className:"w-80 p-0",align:"start","data-testid":"parent-feature-combobox-content",children:(0,b.jsxs)("div",{className:"flex flex-col",children:[(0,b.jsx)("div",{className:"border-b p-2",children:(0,b.jsx)(v.Input,{ref:m,placeholder:"Search features...",value:k,onChange:a=>l(a.target.value),className:"h-8 border-0 p-0 text-sm shadow-none focus-visible:ring-0","data-testid":"parent-feature-search"})}),(0,b.jsxs)("div",{className:"max-h-48 overflow-y-auto py-1",role:"listbox","aria-label":"Features",children:[(0,b.jsxs)("button",{type:"button",role:"option","aria-selected":void 0===d,onClick:()=>p(void 0),className:(0,q.cn)("hover:bg-accent hover:text-accent-foreground flex w-full items-center gap-2 px-3 py-2 text-sm",void 0===d&&"bg-accent/50"),"data-testid":"parent-feature-option-none",children:[(0,b.jsx)(j.CheckIcon,{className:(0,q.cn)("h-4 w-4 shrink-0",void 0!==d&&"invisible")}),(0,b.jsx)("span",{className:"text-muted-foreground italic",children:"No parent"})]}),0===o.length&&k?(0,b.jsx)("p",{className:"text-muted-foreground px-3 py-2 text-sm",children:"No features found."}):o.map(a=>(0,b.jsxs)("button",{type:"button",role:"option","aria-selected":d===a.id,onClick:()=>p(a.id),className:(0,q.cn)("hover:bg-accent hover:text-accent-foreground flex w-full items-center gap-2 px-3 py-2 text-sm",d===a.id&&"bg-accent/50"),"data-testid":`parent-feature-option-${a.id}`,children:[(0,b.jsx)(j.CheckIcon,{className:(0,q.cn)("h-4 w-4 shrink-0",d!==a.id&&"invisible")}),(0,b.jsxs)("span",{className:"truncate",children:[a.name," ",(0,b.jsxs)("span",{className:"text-muted-foreground font-mono text-xs",children:["(",a.id.slice(0,8),")"]})]})]},a.id))]})]})})]})}function Q({repositories:a,value:d,onChange:e,onAddRepository:f,disabled:g}){let[h,k]=(0,c.useState)(!1),[l,o]=(0,c.useState)(""),[p,r]=(0,c.useState)(!1),[s,t]=(0,c.useState)(null),[u,w]=(0,c.useState)(!1),x=(0,c.useRef)(null),{reactFileManager:y}=(0,I.useFeatureFlags)(),A=a.find(a=>a.path===d),B=l.trim()?a.filter(a=>a.name.toLowerCase().includes(l.toLowerCase())||a.path.toLowerCase().includes(l.toLowerCase())):a,C=(0,c.useCallback)(a=>{e(a),k(!1),o("")},[e]),D=(0,c.useCallback)(async a=>{let b=await (0,J.addRepository)({path:a});if(b.error){t(b.error),r(!1);return}if(b.repository){let a={id:b.repository.id,name:b.repository.name,path:b.repository.path};f?.(a),e(a.path),k(!1),o("")}},[f,e]),E=(0,c.useCallback)(async()=>{if(!p){if(y)return void w(!0);r(!0),t(null);try{let a=await (0,G.pickFolder)();if(!a)return void r(!1);await D(a)}catch{w(!0)}finally{r(!1)}}},[p,y,D]),K=(0,c.useCallback)(async a=>{if(w(!1),a){r(!0),t(null);try{await D(a)}catch(a){t(a instanceof Error?a.message:"Failed to add repository")}finally{r(!1)}}},[D]);return(0,c.useEffect)(()=>{h?setTimeout(()=>x.current?.focus(),0):o("")},[h]),(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)(z.Popover,{open:h,onOpenChange:k,children:[(0,b.jsx)(z.PopoverTrigger,{asChild:!0,children:(0,b.jsxs)("button",{type:"button",role:"combobox","aria-expanded":h,"aria-label":"Repository",disabled:g,"data-testid":"repository-combobox",className:(0,q.cn)("border-input bg-background ring-offset-background focus:ring-ring flex h-9 w-full items-center justify-between rounded-md border px-3 py-2 text-sm focus:ring-2 focus:ring-offset-2 focus:outline-none disabled:cursor-not-allowed disabled:opacity-50",!A&&"text-muted-foreground"),children:[(0,b.jsx)("span",{className:"truncate",children:A?A.name:"Select repository..."}),(0,b.jsx)(i.ChevronsUpDown,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})}),(0,b.jsx)(z.PopoverContent,{className:"w-80 p-0",align:"start","data-testid":"repository-combobox-content",children:(0,b.jsxs)("div",{className:"flex flex-col",children:[(0,b.jsx)("div",{className:"border-b p-2",children:(0,b.jsx)(v.Input,{ref:x,placeholder:"Search repositories...",value:l,onChange:a=>o(a.target.value),className:"h-8 border-0 p-0 text-sm shadow-none focus-visible:ring-0","data-testid":"repository-search"})}),(0,b.jsx)("div",{className:"max-h-48 overflow-y-auto py-1",role:"listbox","aria-label":"Repositories",children:0===B.length?(0,b.jsx)("p",{className:"text-muted-foreground px-3 py-2 text-sm","data-testid":"repository-empty",children:"No repositories found."}):B.map(a=>(0,b.jsxs)("button",{type:"button",role:"option","aria-selected":d===a.path,onClick:()=>C(a.path),className:(0,q.cn)("hover:bg-accent hover:text-accent-foreground flex w-full items-center gap-2 px-3 py-2 text-sm",d===a.path&&"bg-accent/50"),"data-testid":`repository-option-${a.id}`,children:[(0,b.jsx)(j.CheckIcon,{className:(0,q.cn)("h-4 w-4 shrink-0",d!==a.path&&"invisible")}),(0,b.jsxs)("span",{className:"flex flex-col items-start truncate",children:[(0,b.jsx)("span",{className:"truncate",children:a.name}),(0,b.jsx)("span",{className:"text-muted-foreground truncate text-xs",children:a.path})]})]},a.id))}),(0,b.jsx)(F.Separator,{}),(0,b.jsxs)("button",{type:"button",onClick:E,disabled:p,className:"hover:bg-accent hover:text-accent-foreground flex w-full items-center gap-2 px-3 py-2 text-sm","data-testid":"add-repository-item",children:[p?(0,b.jsx)(n.Loader2,{className:"h-4 w-4 shrink-0 animate-spin"}):(0,b.jsx)(m.FolderPlus,{className:"h-4 w-4 shrink-0"}),(0,b.jsx)("span",{children:"Add new repository..."})]}),s?(0,b.jsx)("p",{className:"px-3 pb-2 text-xs text-red-500","data-testid":"add-repository-error",children:s}):null]})})]}),(0,b.jsx)(H.ReactFileManagerDialog,{open:u,onOpenChange:a=>{a||w(!1)},onSelect:K})]})}function R({repositoryPath:a,initialParentId:f,initialDescription:h,features:i,repositories:j,workflowDefaults:k,currentAgentType:l,currentModel:m}){let n=(0,d.useRouter)(),[o,p]=(0,c.useState)(!1),q=(0,d.usePathname)().startsWith("/create"),r=!o&&q;(0,c.useEffect)(()=>{!q&&o&&p(!1)},[q,o]);let s=(0,c.useCallback)(()=>{n.push("/")},[n]),t=(0,c.useCallback)(a=>{p(!0),n.push("/"),g(a).then(b=>{b.error?e.toast.error(b.error):window.dispatchEvent(new CustomEvent("shep:feature-created",{detail:{featureId:b.feature.id,name:b.feature.name,description:b.feature.description,repositoryPath:b.feature.repositoryPath,parentId:a.parentId}}))}).catch(()=>{e.toast.error("Failed to create feature"),p(!1)})},[n]);return(0,b.jsx)(O,{open:r,onClose:s,onSubmit:t,repositoryPath:a,features:i,repositories:j,workflowDefaults:k,initialParentId:f,initialDescription:h,isSubmitting:o,currentAgentType:l,currentModel:m})}a.s(["CreateDrawerClient",()=>R],93995)}];
|
|
2
2
|
|
|
3
3
|
//# sourceMappingURL=744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js.map
|