@shipit-ai/cli 1.164.2 → 1.165.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -7
- package/dist/packages/core/src/application/ports/output/services/environment-detector.service.d.ts +54 -0
- package/dist/packages/core/src/application/ports/output/services/environment-detector.service.d.ts.map +1 -0
- package/dist/packages/core/src/application/ports/output/services/environment-detector.service.js +8 -0
- package/dist/packages/core/src/application/ports/output/services/index.d.ts +1 -0
- package/dist/packages/core/src/application/ports/output/services/index.d.ts.map +1 -1
- package/dist/packages/core/src/application/ports/output/services/tool-metadata-service.interface.d.ts +5 -1
- package/dist/packages/core/src/application/ports/output/services/tool-metadata-service.interface.d.ts.map +1 -1
- package/dist/packages/core/src/application/use-cases/agents/configure-agent.use-case.d.ts +1 -1
- package/dist/packages/core/src/application/use-cases/agents/configure-agent.use-case.js +1 -1
- package/dist/packages/core/src/application/use-cases/agents/stop-agent-run.use-case.d.ts +1 -1
- package/dist/packages/core/src/application/use-cases/agents/stop-agent-run.use-case.js +1 -1
- package/dist/packages/core/src/application/use-cases/features/adopt-branch.use-case.d.ts +1 -1
- package/dist/packages/core/src/application/use-cases/features/adopt-branch.use-case.js +1 -1
- package/dist/packages/core/src/application/use-cases/settings/detect-environment-defaults.use-case.d.ts +18 -0
- package/dist/packages/core/src/application/use-cases/settings/detect-environment-defaults.use-case.d.ts.map +1 -0
- package/dist/packages/core/src/application/use-cases/settings/detect-environment-defaults.use-case.js +40 -0
- package/dist/packages/core/src/application/use-cases/settings/index.d.ts +1 -0
- package/dist/packages/core/src/application/use-cases/settings/index.d.ts.map +1 -1
- package/dist/packages/core/src/application/use-cases/settings/index.js +1 -0
- package/dist/packages/core/src/application/use-cases/settings/initialize-settings.use-case.d.ts +10 -4
- package/dist/packages/core/src/application/use-cases/settings/initialize-settings.use-case.d.ts.map +1 -1
- package/dist/packages/core/src/application/use-cases/settings/initialize-settings.use-case.js +34 -7
- package/dist/packages/core/src/application/use-cases/tools/list-tools.use-case.d.ts +1 -1
- package/dist/packages/core/src/application/use-cases/tools/list-tools.use-case.d.ts.map +1 -1
- package/dist/packages/core/src/domain/factories/settings-defaults.factory.d.ts +18 -2
- package/dist/packages/core/src/domain/factories/settings-defaults.factory.d.ts.map +1 -1
- package/dist/packages/core/src/domain/factories/settings-defaults.factory.js +16 -5
- package/dist/packages/core/src/index.d.ts +2 -2
- package/dist/packages/core/src/index.js +2 -2
- package/dist/packages/core/src/infrastructure/di/modules/services.module.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/di/modules/services.module.js +2 -0
- package/dist/packages/core/src/infrastructure/di/modules/use-cases.module.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/di/modules/use-cases.module.js +2 -0
- package/dist/packages/core/src/infrastructure/di/modules/web-tokens.module.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/di/modules/web-tokens.module.js +4 -0
- package/dist/packages/core/src/infrastructure/services/agents/common/executors/fixtures/plan.fixture.d.ts +1 -1
- package/dist/packages/core/src/infrastructure/services/agents/common/executors/fixtures/plan.fixture.js +1 -1
- package/dist/packages/core/src/infrastructure/services/agents/common/executors/fixtures/research.fixture.d.ts +1 -1
- package/dist/packages/core/src/infrastructure/services/agents/common/executors/fixtures/research.fixture.js +1 -1
- package/dist/packages/core/src/infrastructure/services/agents/common/executors/fixtures/spec-analyze.fixture.d.ts +2 -2
- package/dist/packages/core/src/infrastructure/services/agents/common/executors/fixtures/spec-analyze.fixture.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/services/agents/common/executors/fixtures/spec-analyze.fixture.js +5 -5
- package/dist/packages/core/src/infrastructure/services/agents/common/executors/fixtures/spec-requirements.fixture.d.ts +2 -2
- package/dist/packages/core/src/infrastructure/services/agents/common/executors/fixtures/spec-requirements.fixture.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/services/agents/common/executors/fixtures/spec-requirements.fixture.js +6 -6
- package/dist/packages/core/src/infrastructure/services/agents/common/executors/fixtures/tasks.fixture.d.ts +1 -1
- package/dist/packages/core/src/infrastructure/services/agents/common/executors/fixtures/tasks.fixture.js +1 -1
- package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/prompts/evidence-prompts.js +1 -1
- package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/prompts/merge-prompts.js +1 -1
- package/dist/packages/core/src/infrastructure/services/environment-detector.service.d.ts +38 -0
- package/dist/packages/core/src/infrastructure/services/environment-detector.service.d.ts.map +1 -0
- package/dist/packages/core/src/infrastructure/services/environment-detector.service.js +196 -0
- package/dist/packages/core/src/infrastructure/services/filesystem/shipit-ai-directory.service.d.ts +2 -2
- package/dist/packages/core/src/infrastructure/services/filesystem/shipit-ai-directory.service.js +4 -4
- package/dist/packages/core/src/infrastructure/services/git/pr-branding.d.ts +4 -4
- package/dist/packages/core/src/infrastructure/services/git/pr-branding.js +4 -4
- package/dist/packages/core/src/infrastructure/services/interactive/feature-context.builder.d.ts +1 -1
- package/dist/packages/core/src/infrastructure/services/interactive/feature-context.builder.js +7 -7
- package/dist/packages/core/src/infrastructure/services/port.service.d.ts +1 -1
- package/dist/packages/core/src/infrastructure/services/port.service.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/services/port.service.js +1 -1
- package/dist/packages/core/src/infrastructure/services/tool-installer/tool-metadata.d.ts +6 -1
- package/dist/packages/core/src/infrastructure/services/tool-installer/tool-metadata.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/services/tool-installer/tool-metadata.js +7 -0
- package/dist/packages/core/src/infrastructure/services/tool-installer/tool-metadata.service.d.ts +1 -0
- package/dist/packages/core/src/infrastructure/services/tool-installer/tool-metadata.service.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/services/tool-installer/tool-metadata.service.js +4 -1
- package/dist/packages/core/src/infrastructure/services/tool-installer/tools/CLAUDE.md +2 -1
- package/dist/packages/core/src/infrastructure/services/tool-installer/tools/bash.json +20 -0
- package/dist/packages/core/src/infrastructure/services/tool-installer/tools/codex-cli.json +31 -0
- package/dist/packages/core/src/infrastructure/services/tool-installer/tools/fish.json +19 -0
- package/dist/packages/core/src/infrastructure/services/tool-installer/tools/powershell.json +24 -0
- package/dist/packages/core/src/infrastructure/services/tool-installer/tools/zsh.json +19 -0
- package/dist/src/presentation/cli/commands/agent/approve.command.d.ts +1 -1
- package/dist/src/presentation/cli/commands/agent/approve.command.js +1 -1
- package/dist/src/presentation/cli/commands/agent/delete.command.d.ts +1 -1
- package/dist/src/presentation/cli/commands/agent/delete.command.js +1 -1
- package/dist/src/presentation/cli/commands/agent/index.d.ts +6 -6
- package/dist/src/presentation/cli/commands/agent/index.js +6 -6
- package/dist/src/presentation/cli/commands/agent/logs.command.d.ts +3 -3
- package/dist/src/presentation/cli/commands/agent/logs.command.js +3 -3
- package/dist/src/presentation/cli/commands/agent/ls.command.d.ts +1 -1
- package/dist/src/presentation/cli/commands/agent/ls.command.js +1 -1
- package/dist/src/presentation/cli/commands/agent/reject.command.d.ts +1 -1
- package/dist/src/presentation/cli/commands/agent/reject.command.js +1 -1
- package/dist/src/presentation/cli/commands/agent/show.command.d.ts +1 -1
- package/dist/src/presentation/cli/commands/agent/show.command.js +1 -1
- package/dist/src/presentation/cli/commands/agent/stop.command.d.ts +1 -1
- package/dist/src/presentation/cli/commands/agent/stop.command.js +1 -1
- package/dist/src/presentation/cli/commands/daemon/start-daemon.d.ts +4 -4
- package/dist/src/presentation/cli/commands/daemon/start-daemon.js +4 -4
- package/dist/src/presentation/cli/commands/daemon/stop-daemon.d.ts +5 -5
- package/dist/src/presentation/cli/commands/daemon/stop-daemon.js +5 -5
- package/dist/src/presentation/cli/commands/feat/adopt.command.d.ts +3 -3
- package/dist/src/presentation/cli/commands/feat/adopt.command.js +3 -3
- package/dist/src/presentation/cli/commands/feat/approve.command.d.ts +1 -1
- package/dist/src/presentation/cli/commands/feat/approve.command.js +1 -1
- package/dist/src/presentation/cli/commands/feat/archive.command.d.ts +3 -3
- package/dist/src/presentation/cli/commands/feat/archive.command.js +3 -3
- package/dist/src/presentation/cli/commands/feat/del.command.d.ts +5 -5
- package/dist/src/presentation/cli/commands/feat/del.command.js +5 -5
- package/dist/src/presentation/cli/commands/feat/index.d.ts +4 -4
- package/dist/src/presentation/cli/commands/feat/index.js +4 -4
- package/dist/src/presentation/cli/commands/feat/logs.command.d.ts +3 -3
- package/dist/src/presentation/cli/commands/feat/logs.command.js +3 -3
- package/dist/src/presentation/cli/commands/feat/ls.command.d.ts +3 -3
- package/dist/src/presentation/cli/commands/feat/ls.command.js +3 -3
- package/dist/src/presentation/cli/commands/feat/new.command.d.ts +3 -3
- package/dist/src/presentation/cli/commands/feat/new.command.js +4 -4
- package/dist/src/presentation/cli/commands/feat/reject.command.d.ts +1 -1
- package/dist/src/presentation/cli/commands/feat/reject.command.js +1 -1
- package/dist/src/presentation/cli/commands/feat/resume.command.d.ts +1 -1
- package/dist/src/presentation/cli/commands/feat/resume.command.js +1 -1
- package/dist/src/presentation/cli/commands/feat/review.command.d.ts +1 -1
- package/dist/src/presentation/cli/commands/feat/review.command.js +1 -1
- package/dist/src/presentation/cli/commands/feat/show.command.d.ts +1 -1
- package/dist/src/presentation/cli/commands/feat/show.command.d.ts.map +1 -1
- package/dist/src/presentation/cli/commands/feat/show.command.js +4 -3
- package/dist/src/presentation/cli/commands/feat/start.command.d.ts +1 -1
- package/dist/src/presentation/cli/commands/feat/start.command.js +1 -1
- package/dist/src/presentation/cli/commands/feat/unarchive.command.d.ts +2 -2
- package/dist/src/presentation/cli/commands/feat/unarchive.command.js +2 -2
- package/dist/src/presentation/cli/commands/ide-open.command.d.ts +1 -1
- package/dist/src/presentation/cli/commands/ide-open.command.js +1 -1
- package/dist/src/presentation/cli/commands/log-viewer.d.ts +1 -1
- package/dist/src/presentation/cli/commands/log-viewer.js +1 -1
- package/dist/src/presentation/cli/commands/repo/add.command.d.ts +3 -3
- package/dist/src/presentation/cli/commands/repo/add.command.js +3 -3
- package/dist/src/presentation/cli/commands/repo/index.d.ts +4 -4
- package/dist/src/presentation/cli/commands/repo/index.js +4 -4
- package/dist/src/presentation/cli/commands/repo/ls.command.d.ts +1 -1
- package/dist/src/presentation/cli/commands/repo/ls.command.js +1 -1
- package/dist/src/presentation/cli/commands/repo/show.command.d.ts +1 -1
- package/dist/src/presentation/cli/commands/repo/show.command.js +1 -1
- package/dist/src/presentation/cli/commands/restart.command.d.ts +3 -3
- package/dist/src/presentation/cli/commands/restart.command.js +5 -5
- package/dist/src/presentation/cli/commands/run.command.d.ts +5 -5
- package/dist/src/presentation/cli/commands/run.command.js +5 -5
- package/dist/src/presentation/cli/commands/session/index.d.ts +3 -3
- package/dist/src/presentation/cli/commands/session/index.js +3 -3
- package/dist/src/presentation/cli/commands/session/ls.command.d.ts +6 -6
- package/dist/src/presentation/cli/commands/session/ls.command.js +6 -6
- package/dist/src/presentation/cli/commands/session/show.command.d.ts +3 -3
- package/dist/src/presentation/cli/commands/session/show.command.js +3 -3
- package/dist/src/presentation/cli/commands/settings/agent.command.d.ts +4 -4
- package/dist/src/presentation/cli/commands/settings/agent.command.js +7 -7
- package/dist/src/presentation/cli/commands/settings/ide.command.d.ts +3 -3
- package/dist/src/presentation/cli/commands/settings/ide.command.js +6 -6
- package/dist/src/presentation/cli/commands/settings/index.d.ts +10 -10
- package/dist/src/presentation/cli/commands/settings/index.js +10 -10
- package/dist/src/presentation/cli/commands/settings/init.command.d.ts +3 -3
- package/dist/src/presentation/cli/commands/settings/init.command.js +6 -6
- package/dist/src/presentation/cli/commands/settings/language.command.d.ts +2 -2
- package/dist/src/presentation/cli/commands/settings/language.command.js +3 -3
- package/dist/src/presentation/cli/commands/settings/model.command.d.ts +2 -2
- package/dist/src/presentation/cli/commands/settings/model.command.js +3 -3
- package/dist/src/presentation/cli/commands/settings/show.command.d.ts +4 -4
- package/dist/src/presentation/cli/commands/settings/show.command.js +7 -7
- package/dist/src/presentation/cli/commands/settings/workflow.command.d.ts +3 -3
- package/dist/src/presentation/cli/commands/settings/workflow.command.js +6 -6
- package/dist/src/presentation/cli/commands/start.command.d.ts +3 -3
- package/dist/src/presentation/cli/commands/start.command.js +5 -5
- package/dist/src/presentation/cli/commands/status.command.d.ts +4 -4
- package/dist/src/presentation/cli/commands/status.command.js +4 -4
- package/dist/src/presentation/cli/commands/stop.command.d.ts +2 -2
- package/dist/src/presentation/cli/commands/stop.command.js +2 -2
- package/dist/src/presentation/cli/commands/tools.command.d.ts +1 -1
- package/dist/src/presentation/cli/commands/tools.command.js +1 -1
- package/dist/src/presentation/cli/commands/ui.command.d.ts +4 -4
- package/dist/src/presentation/cli/commands/ui.command.js +7 -7
- package/dist/src/presentation/cli/commands/upgrade.command.d.ts +2 -2
- package/dist/src/presentation/cli/commands/upgrade.command.js +2 -2
- package/dist/src/presentation/cli/commands/version.command.d.ts +2 -2
- package/dist/src/presentation/cli/commands/version.command.js +2 -2
- package/dist/src/presentation/cli/index.d.ts +3 -3
- package/dist/src/presentation/cli/index.js +4 -4
- package/dist/src/presentation/cli/ui/index.d.ts +1 -1
- package/dist/src/presentation/cli/ui/index.js +1 -1
- package/dist/src/presentation/tui/themes/shipit-ai.theme.d.ts +4 -4
- package/dist/src/presentation/tui/themes/shipit-ai.theme.js +4 -4
- package/dist/src/presentation/web/app/actions/check-agent-auth.d.ts.map +1 -1
- package/dist/src/presentation/web/app/actions/check-agent-auth.js +69 -24
- package/dist/src/presentation/web/app/actions/deploy-feature.js +2 -2
- package/dist/src/presentation/web/app/actions/deploy-repository.js +2 -2
- package/dist/src/presentation/web/app/actions/get-all-agent-models.d.ts +1 -0
- package/dist/src/presentation/web/app/actions/get-all-agent-models.d.ts.map +1 -1
- package/dist/src/presentation/web/app/actions/get-all-agent-models.js +28 -3
- package/dist/src/presentation/web/app/actions/get-available-editors.d.ts +14 -0
- package/dist/src/presentation/web/app/actions/get-available-editors.d.ts.map +1 -0
- package/dist/src/presentation/web/app/actions/get-available-editors.js +24 -0
- package/dist/src/presentation/web/app/actions/get-available-shells.d.ts +14 -0
- package/dist/src/presentation/web/app/actions/get-available-shells.d.ts.map +1 -0
- package/dist/src/presentation/web/app/actions/get-available-shells.js +22 -0
- package/dist/src/presentation/web/app/actions/get-merge-review-data.js +3 -3
- package/dist/src/presentation/web/app/layout.d.ts.map +1 -1
- package/dist/src/presentation/web/app/layout.js +4 -13
- package/dist/src/presentation/web/app/settings/page.d.ts.map +1 -1
- package/dist/src/presentation/web/app/settings/page.js +6 -2
- package/dist/src/presentation/web/components/common/control-center-drawer/adopt-branch-drawer.js +1 -1
- package/dist/src/presentation/web/components/common/control-center-drawer/adopt-branch-drawer.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/common/control-center-drawer/adopt-branch-drawer.stories.js +1 -1
- package/dist/src/presentation/web/components/common/control-center-drawer/global-chat-drawer-client.js +1 -1
- package/dist/src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.stories.js +1 -1
- package/dist/src/presentation/web/components/common/feature-drawer-tabs/overview-tab.stories.js +2 -2
- package/dist/src/presentation/web/components/common/feature-node/feature-node.stories.js +8 -8
- package/dist/src/presentation/web/components/common/github-import-dialog/github-import-dialog.js +1 -1
- package/dist/src/presentation/web/components/common/inline-attachments/inline-attachments.stories.js +5 -5
- package/dist/src/presentation/web/components/common/merge-review/merge-review.stories.js +8 -8
- package/dist/src/presentation/web/components/common/prd-questionnaire/prd-questionnaire.stories.js +1 -1
- package/dist/src/presentation/web/components/common/shipit-ai-logo/index.d.ts +2 -2
- package/dist/src/presentation/web/components/common/shipit-ai-logo/index.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/shipit-ai-logo/index.js +1 -1
- package/dist/src/presentation/web/components/common/shipit-ai-logo/{shep-logo.d.ts → shipit-ai-logo.d.ts} +1 -1
- package/dist/src/presentation/web/components/common/shipit-ai-logo/shipit-ai-logo.d.ts.map +1 -0
- package/dist/src/presentation/web/components/common/shipit-ai-logo/shipit-ai-logo.js +8 -0
- package/dist/src/presentation/web/components/common/shipit-ai-logo/{shep-logo.stories.d.ts → shipit-ai-logo.stories.d.ts} +2 -2
- package/dist/src/presentation/web/components/common/shipit-ai-logo/shipit-ai-logo.stories.d.ts.map +1 -0
- package/dist/src/presentation/web/components/common/shipit-ai-logo/{shep-logo.stories.js → shipit-ai-logo.stories.js} +1 -1
- package/dist/src/presentation/web/components/common/version-badge/version-badge.stories.js +2 -2
- package/dist/src/presentation/web/components/features/chat/ChatSheet.js +1 -1
- package/dist/src/presentation/web/components/features/control-center/control-center-empty-state.js +1 -1
- package/dist/src/presentation/web/components/features/control-center/welcome-agent-setup.d.ts.map +1 -1
- package/dist/src/presentation/web/components/features/control-center/welcome-agent-setup.js +6 -1
- package/dist/src/presentation/web/components/features/features-canvas/features-canvas.stories.js +19 -19
- package/dist/src/presentation/web/components/features/settings/AgentModelPicker/index.d.ts.map +1 -1
- package/dist/src/presentation/web/components/features/settings/AgentModelPicker/index.js +13 -2
- package/dist/src/presentation/web/components/features/settings/database-settings-section.js +1 -1
- package/dist/src/presentation/web/components/features/settings/settings-page-client.d.ts +5 -1
- package/dist/src/presentation/web/components/features/settings/settings-page-client.d.ts.map +1 -1
- package/dist/src/presentation/web/components/features/settings/settings-page-client.js +33 -27
- package/dist/src/presentation/web/components/features/tools/tool-card.js +1 -1
- package/dist/src/presentation/web/components/features/version/version-page-client.js +1 -1
- package/dist/src/presentation/web/components/layouts/app-sidebar/app-sidebar.d.ts.map +1 -1
- package/dist/src/presentation/web/components/layouts/app-sidebar/app-sidebar.js +3 -3
- package/dist/src/presentation/web/components/ui/sidebar.stories.js +1 -1
- package/dist/src/presentation/web/lib/session-scanner.js +2 -2
- package/dist/src/presentation/web/lib/version.d.ts +1 -1
- package/dist/src/presentation/web/lib/version.js +1 -1
- package/dist/src/presentation/web/{middleware.d.ts → proxy.d.ts} +4 -4
- package/dist/src/presentation/web/proxy.d.ts.map +1 -0
- package/dist/src/presentation/web/{middleware.js → proxy.js} +3 -3
- package/dist/src/presentation/web/types/theme.d.ts +1 -1
- package/dist/src/presentation/web/types/theme.js +1 -1
- package/dist/translations/ar/cli.json +17 -17
- package/dist/translations/ar/tui.json +2 -2
- package/dist/translations/ar/web.json +7 -5
- package/dist/translations/de/cli.json +17 -17
- package/dist/translations/de/tui.json +2 -2
- package/dist/translations/de/web.json +7 -5
- package/dist/translations/en/cli.json +17 -17
- package/dist/translations/en/tui.json +2 -2
- package/dist/translations/en/web.json +7 -5
- package/dist/translations/es/cli.json +17 -17
- package/dist/translations/es/tui.json +2 -2
- package/dist/translations/es/web.json +7 -5
- package/dist/translations/fr/cli.json +17 -17
- package/dist/translations/fr/tui.json +2 -2
- package/dist/translations/fr/web.json +7 -5
- package/dist/translations/he/cli.json +17 -17
- package/dist/translations/he/tui.json +2 -2
- package/dist/translations/he/web.json +7 -5
- package/dist/translations/pt/cli.json +17 -17
- package/dist/translations/pt/tui.json +2 -2
- package/dist/translations/pt/web.json +7 -5
- package/dist/translations/ru/cli.json +17 -17
- package/dist/translations/ru/tui.json +2 -2
- package/dist/translations/ru/web.json +7 -5
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/web/.next/BUILD_ID +1 -1
- package/web/.next/build-manifest.json +5 -5
- package/web/.next/fallback-build-manifest.json +3 -3
- package/web/.next/prerender-manifest.json +3 -3
- package/web/.next/required-server-files.js +2 -2
- package/web/.next/required-server-files.json +2 -2
- package/web/.next/server/app/(dashboard)/@drawer/adopt/page/build-manifest.json +2 -2
- package/web/.next/server/app/(dashboard)/@drawer/adopt/page/server-reference-manifest.json +29 -29
- package/web/.next/server/app/(dashboard)/@drawer/adopt/page.js +2 -1
- package/web/.next/server/app/(dashboard)/@drawer/adopt/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/adopt/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/chat/page/build-manifest.json +2 -2
- package/web/.next/server/app/(dashboard)/@drawer/chat/page/server-reference-manifest.json +27 -27
- package/web/.next/server/app/(dashboard)/@drawer/chat/page.js +2 -1
- package/web/.next/server/app/(dashboard)/@drawer/chat/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/chat/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/create/page/build-manifest.json +2 -2
- package/web/.next/server/app/(dashboard)/@drawer/create/page/server-reference-manifest.json +30 -30
- package/web/.next/server/app/(dashboard)/@drawer/create/page.js +2 -1
- package/web/.next/server/app/(dashboard)/@drawer/create/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/create/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page/build-manifest.json +2 -2
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page/server-reference-manifest.json +37 -37
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page.js +2 -1
- 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/build-manifest.json +2 -2
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page/server-reference-manifest.json +37 -37
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page.js +2 -1
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page/build-manifest.json +2 -2
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page/server-reference-manifest.json +28 -28
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page.js +2 -1
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page/build-manifest.json +2 -2
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page/server-reference-manifest.json +28 -28
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page.js +2 -1
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/chat/page/build-manifest.json +2 -2
- package/web/.next/server/app/(dashboard)/chat/page/server-reference-manifest.json +27 -27
- package/web/.next/server/app/(dashboard)/chat/page.js +2 -1
- package/web/.next/server/app/(dashboard)/chat/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/chat/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/create/page/build-manifest.json +2 -2
- package/web/.next/server/app/(dashboard)/create/page/server-reference-manifest.json +30 -30
- package/web/.next/server/app/(dashboard)/create/page.js +2 -1
- package/web/.next/server/app/(dashboard)/create/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/create/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page/build-manifest.json +2 -2
- package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page/server-reference-manifest.json +37 -37
- package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page.js +2 -1
- 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/build-manifest.json +2 -2
- package/web/.next/server/app/(dashboard)/feature/[featureId]/page/server-reference-manifest.json +37 -37
- package/web/.next/server/app/(dashboard)/feature/[featureId]/page.js +2 -1
- 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/build-manifest.json +2 -2
- package/web/.next/server/app/(dashboard)/page/server-reference-manifest.json +27 -27
- package/web/.next/server/app/(dashboard)/page.js +2 -1
- package/web/.next/server/app/(dashboard)/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page/build-manifest.json +2 -2
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page/server-reference-manifest.json +28 -28
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page.js +2 -1
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page/build-manifest.json +2 -2
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page/server-reference-manifest.json +28 -28
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page.js +2 -1
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/_global-error/page/build-manifest.json +2 -2
- package/web/.next/server/app/_global-error.html +1 -1
- package/web/.next/server/app/_global-error.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/web/.next/server/app/_not-found/page/build-manifest.json +2 -2
- package/web/.next/server/app/_not-found/page/server-reference-manifest.json +6 -6
- package/web/.next/server/app/_not-found/page.js +2 -1
- package/web/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/api/attachments/preview/route.js.nft.json +1 -1
- package/web/.next/server/app/api/attachments/upload-from-path/route.js +1 -1
- package/web/.next/server/app/api/attachments/upload-from-path/route.js.nft.json +1 -1
- package/web/.next/server/app/api/dialog/pick-files/route.js.nft.json +1 -1
- package/web/.next/server/app/api/evidence/route.js.nft.json +1 -1
- package/web/.next/server/app/api/graph-data/route.js.nft.json +1 -1
- package/web/.next/server/app/api/interactive/chat/[featureId]/messages/route.js.nft.json +1 -1
- package/web/.next/server/app/settings/page/build-manifest.json +2 -2
- package/web/.next/server/app/settings/page/server-reference-manifest.json +42 -18
- package/web/.next/server/app/settings/page.js +3 -2
- 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/build-manifest.json +2 -2
- package/web/.next/server/app/skills/page/server-reference-manifest.json +11 -11
- package/web/.next/server/app/skills/page.js +2 -2
- package/web/.next/server/app/skills/page.js.nft.json +1 -1
- package/web/.next/server/app/skills/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/tools/page/build-manifest.json +2 -2
- package/web/.next/server/app/tools/page/server-reference-manifest.json +11 -11
- package/web/.next/server/app/tools/page.js +2 -2
- package/web/.next/server/app/tools/page.js.nft.json +1 -1
- package/web/.next/server/app/tools/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/version/page/build-manifest.json +2 -2
- package/web/.next/server/app/version/page/server-reference-manifest.json +6 -6
- package/web/.next/server/app/version/page.js +2 -1
- package/web/.next/server/app/version/page.js.nft.json +1 -1
- package/web/.next/server/app/version/page_client-reference-manifest.js +1 -1
- package/web/.next/server/chunks/[externals]__11vad82._.js +3 -0
- package/web/.next/server/chunks/[externals]__11vad82._.js.map +1 -0
- package/web/.next/server/chunks/[root-of-the-server]__0.2exzi._.js.map +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__02xmnal._.js.map +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__04jjtl_._.js.map +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__07suer1._.js.map +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__09118p2._.js.map +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__0_.w-eb._.js.map +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__0ip_e1x._.js.map +1 -1
- package/web/.next/server/chunks/{[root-of-the-server]__0ob3z53._.js → [root-of-the-server]__0l1p8bx._.js} +2 -2
- package/web/.next/server/chunks/{[root-of-the-server]__0ob3z53._.js.map → [root-of-the-server]__0l1p8bx._.js.map} +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__0tb~wwk._.js +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__13ni_ow._.js +20 -0
- package/web/.next/server/chunks/[root-of-the-server]__13ni_ow._.js.map +1 -0
- package/web/.next/server/chunks/ssr/0j.8_web__next-internal_server_app_(dashboard)_@drawer_adopt_page_actions_00~eq5i.js +3 -0
- package/web/.next/server/chunks/ssr/0j.8_web__next-internal_server_app_(dashboard)_@drawer_adopt_page_actions_00~eq5i.js.map +1 -0
- package/web/.next/server/chunks/ssr/0j.8_web__next-internal_server_app_(dashboard)_@drawer_chat_page_actions_0979_c..js +3 -0
- package/web/.next/server/chunks/ssr/0j.8_web__next-internal_server_app_(dashboard)_@drawer_chat_page_actions_0979_c..js.map +1 -0
- package/web/.next/server/chunks/ssr/0j.8_web__next-internal_server_app_(dashboard)_chat_page_actions_0dqll_1.js +3 -0
- package/web/.next/server/chunks/ssr/0j.8_web__next-internal_server_app_(dashboard)_chat_page_actions_0dqll_1.js.map +1 -0
- package/web/.next/server/chunks/ssr/0j.8_web_components_common_control-center-drawer_create-drawer-client_tsx_0g70fc5._.js +1 -1
- package/web/.next/server/chunks/ssr/0j.8_web_components_common_control-center-drawer_create-drawer-client_tsx_0g70fc5._.js.map +1 -1
- package/web/.next/server/chunks/ssr/0j.8_web_components_common_control-center-drawer_feature-drawer-client_tsx_104cna.._.js +2 -2
- package/web/.next/server/chunks/ssr/0j.8_web_components_common_control-center-drawer_feature-drawer-client_tsx_104cna.._.js.map +1 -1
- package/web/.next/server/chunks/ssr/0ukq_presentation_web_components_features_settings_settings-page-client_tsx_0j1uius._.js +1 -1
- package/web/.next/server/chunks/ssr/0ukq_presentation_web_components_features_settings_settings-page-client_tsx_0j1uius._.js.map +1 -1
- package/web/.next/server/chunks/ssr/11es_next_dist_0e36~wi._.js +1 -1
- package/web/.next/server/chunks/ssr/11y9_components_common_control-center-drawer_global-chat-drawer-client_tsx_03s32.q._.js +1 -1
- package/web/.next/server/chunks/ssr/11y9_components_common_control-center-drawer_global-chat-drawer-client_tsx_03s32.q._.js.map +1 -1
- package/web/.next/server/chunks/ssr/11y9_components_common_control-center-drawer_repository-drawer-client_tsx_09z.znp._.js +1 -1
- package/web/.next/server/chunks/ssr/11y9_components_common_control-center-drawer_repository-drawer-client_tsx_09z.znp._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__01~y8wi._.js +3 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__01~y8wi._.js.map +1 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__0np51e2._.js +3 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__0np51e2._.js.map +1 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__0qh.wn.._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__0rv1gci._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__0rv1gci._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__0uxn6-j._.js +3 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__0uxn6-j._.js.map +1 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__0~h382a._.js +3 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__0~h382a._.js.map +1 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__11-~i9u._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__11-~i9u._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__12g8h3_._.js +4 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__12g8h3_._.js.map +1 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__12qqi.~._.js +3 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__12qqi.~._.js.map +1 -0
- package/web/.next/server/chunks/ssr/{_13e1_1b._.js → _0.gy.n8._.js} +2 -2
- package/web/.next/server/chunks/ssr/{_13e1_1b._.js.map → _0.gy.n8._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/{_0sgeiju._.js → _01mq~sm._.js} +2 -2
- package/web/.next/server/chunks/ssr/{_0sgeiju._.js.map → _01mq~sm._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/_0e5cv3q._.js +1 -1
- package/web/.next/server/chunks/ssr/_0e5cv3q._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_0ez.1o4._.js +1 -1
- package/web/.next/server/chunks/ssr/_0ez.1o4._.js.map +1 -1
- package/web/.next/server/chunks/ssr/{_05h68we._.js → _0jk5q_z._.js} +2 -2
- package/web/.next/server/chunks/ssr/{_05h68we._.js.map → _0jk5q_z._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/_0jpbsh_._.js +4 -0
- package/web/.next/server/chunks/ssr/_0jpbsh_._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_0n.xy38._.js +3 -0
- package/web/.next/server/chunks/ssr/_0n.xy38._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_0rvaoj4._.js +3 -0
- package/web/.next/server/chunks/ssr/_0rvaoj4._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_0v.yfmg._.js +1 -1
- package/web/.next/server/chunks/ssr/_0v.yfmg._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_0w-_hww._.js +1 -1
- package/web/.next/server/chunks/ssr/_0w-_hww._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_11kuznh._.js +1 -1
- package/web/.next/server/chunks/ssr/_11kuznh._.js.map +1 -1
- package/web/.next/server/chunks/ssr/{_0ts70ov._.js → _13bl-l1._.js} +2 -2
- package/web/.next/server/chunks/ssr/{_0ts70ov._.js.map → _13bl-l1._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/_13euo-f._.js +1 -1
- package/web/.next/server/chunks/ssr/_13euo-f._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_0.e4~xc._.js +3 -0
- package/web/.next/server/chunks/ssr/src_presentation_web_0.e4~xc._.js.map +1 -0
- package/web/.next/server/chunks/ssr/src_presentation_web_00dvh.m._.js +3 -0
- package/web/.next/server/chunks/ssr/src_presentation_web_00dvh.m._.js.map +1 -0
- package/web/.next/server/chunks/ssr/src_presentation_web_06b6~lt._.js +5 -0
- package/web/.next/server/chunks/ssr/src_presentation_web_06b6~lt._.js.map +1 -0
- package/web/.next/server/chunks/ssr/src_presentation_web_08fy2mf._.js +3 -0
- package/web/.next/server/chunks/ssr/src_presentation_web_08fy2mf._.js.map +1 -0
- package/web/.next/server/chunks/ssr/src_presentation_web_0f~udu1._.js +3 -0
- package/web/.next/server/chunks/ssr/src_presentation_web_0f~udu1._.js.map +1 -0
- package/web/.next/server/chunks/ssr/src_presentation_web_0qys821._.js +5 -0
- package/web/.next/server/chunks/ssr/src_presentation_web_0qys821._.js.map +1 -0
- package/web/.next/server/chunks/ssr/src_presentation_web_0q~dt0o._.js +3 -0
- package/web/.next/server/chunks/ssr/src_presentation_web_0q~dt0o._.js.map +1 -0
- package/web/.next/server/chunks/ssr/src_presentation_web_11jrkxt._.js +3 -0
- package/web/.next/server/chunks/ssr/src_presentation_web_11jrkxt._.js.map +1 -0
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_1199d3x.js +3 -0
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_1199d3x.js.map +1 -0
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app__not-found_page_actions_0m2jqxx.js +3 -0
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app__not-found_page_actions_0m2jqxx.js.map +1 -0
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_version_page_actions_0krkh_0.js +3 -0
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_version_page_actions_0krkh_0.js.map +1 -0
- package/web/.next/server/chunks/ssr/src_presentation_web_app_actions_load-settings_ts_0b8f3pf._.js +3 -0
- package/web/.next/server/chunks/ssr/src_presentation_web_app_actions_load-settings_ts_0b8f3pf._.js.map +1 -0
- package/web/.next/server/chunks/ssr/src_presentation_web_app_actions_open-ide_ts_0w2wqvu._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_app_actions_open-ide_ts_0w2wqvu._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_0sk2qdt._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_0sk2qdt._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_0l3oxx9._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_0l3oxx9._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_features_tools_tools-page-client_tsx_0aji.op._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_features_tools_tools-page-client_tsx_0aji.op._.js.map +1 -1
- package/web/.next/server/functions-config-manifest.json +11 -1
- package/web/.next/server/middleware/middleware-manifest.json +1 -27
- package/web/.next/server/middleware-build-manifest.js +5 -5
- package/web/.next/server/middleware-manifest.json +2 -32
- package/web/.next/server/middleware.js +5 -0
- package/web/.next/server/middleware.js.map +5 -0
- package/web/.next/server/middleware.js.nft.json +1 -0
- package/web/.next/server/pages/500.html +1 -1
- package/web/.next/server/server-reference-manifest.js +1 -1
- package/web/.next/server/server-reference-manifest.json +80 -56
- package/web/.next/static/chunks/00racug7sobut.js +1 -0
- package/web/.next/static/chunks/06sdx5zm71_u5.js +1 -0
- package/web/.next/static/chunks/{122mzkbtrj4-k.js → 071_2_.sfp-im.js} +2 -2
- package/web/.next/static/chunks/{0g-so1fagegtp.js → 08iq.j3rbmhbm.js} +1 -1
- package/web/.next/static/chunks/{0bdtgeoys8bq..js → 08iuksm8rvb09.js} +1 -1
- package/web/.next/static/chunks/{01~tm1-qp0baa.js → 08se-_opmk~.7.js} +1 -1
- package/web/.next/static/chunks/{17jsatqy81xc..js → 0icjwdqytqa_8.js} +2 -2
- package/web/.next/static/chunks/0r5dju6f1-i38.css +1 -0
- package/web/.next/static/chunks/{13xg0bjtuso~r.js → 0riti1bs-erm~.js} +1 -1
- package/web/.next/static/chunks/{0.2owry_sk_ak.js → 0s-e-ekdbgoqa.js} +1 -1
- package/web/.next/static/chunks/0t_48qc0x7bhs.js +3 -0
- package/web/.next/static/chunks/{0qz02~wj25f-f.js → 0u5.s.lv2bae5.js} +1 -1
- package/web/.next/static/chunks/{12pwrbjphv3z7.js → 0vgbvqu82ac1x.js} +1 -1
- package/web/.next/static/chunks/{0vlx6s5d1~d-w.js → 0wmckrtphfa12.js} +1 -1
- package/web/.next/static/chunks/0w~84g7r9307~.js +1 -0
- package/web/.next/static/chunks/0y1nwnouroh6k.js +1 -0
- package/web/.next/static/chunks/{07lrq10rx0tp1.js → 0~er~22zwvx0i.js} +1 -1
- package/web/.next/static/chunks/{0xs4~af3nc_15.js → 15lcx-697j_3z.js} +2 -2
- package/web/.next/static/chunks/{0rnvcu2blaow4.js → 15m2wfd5k_7fj.js} +1 -1
- package/web/.next/static/chunks/{turbopack-10upsk2jydmq4.js → turbopack-0ve8f54_veg.u.js} +1 -1
- package/web/.next/static/{CJ4Fr1ggL4xWEe_fapYLv → xP_-L4TLYvd3i_sEmljLs}/_clientMiddlewareManifest.js +1 -1
- package/web/public/apple-touch-icon.png +0 -0
- package/web/public/favicon-32x32.png +0 -0
- package/web/public/icon-192.png +0 -0
- package/web/public/icon-512.png +0 -0
- package/web/public/icons/agents/openai.svg +1 -1
- package/web/public/shipit-brain.png +0 -0
- package/web/public/shipit-icon.svg +68 -0
- package/web/public/shipit-logo.png +0 -0
- package/dist/src/presentation/web/components/common/shipit-ai-logo/shep-logo.d.ts.map +0 -1
- package/dist/src/presentation/web/components/common/shipit-ai-logo/shep-logo.js +0 -5
- package/dist/src/presentation/web/components/common/shipit-ai-logo/shep-logo.stories.d.ts.map +0 -1
- package/dist/src/presentation/web/middleware.d.ts.map +0 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__0.j0ktf._.js +0 -4
- package/web/.next/server/chunks/ssr/[root-of-the-server]__0.j0ktf._.js.map +0 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__07m44ax._.js +0 -3
- package/web/.next/server/chunks/ssr/[root-of-the-server]__07m44ax._.js.map +0 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__0frgz11._.js +0 -4
- package/web/.next/server/chunks/ssr/[root-of-the-server]__0frgz11._.js.map +0 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__0oi7r67._.js +0 -4
- package/web/.next/server/chunks/ssr/[root-of-the-server]__0oi7r67._.js.map +0 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__0pti1a3._.js +0 -4
- package/web/.next/server/chunks/ssr/[root-of-the-server]__0pti1a3._.js.map +0 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__0s9k_s3._.js +0 -4
- package/web/.next/server/chunks/ssr/[root-of-the-server]__0s9k_s3._.js.map +0 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__0v-vmgt._.js +0 -4
- package/web/.next/server/chunks/ssr/[root-of-the-server]__0v-vmgt._.js.map +0 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__0yky~xo._.js +0 -4
- package/web/.next/server/chunks/ssr/[root-of-the-server]__0yky~xo._.js.map +0 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__11dc42t._.js +0 -4
- package/web/.next/server/chunks/ssr/[root-of-the-server]__11dc42t._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_0__4si~._.js +0 -4
- package/web/.next/server/chunks/ssr/_0__4si~._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_0_m17kl._.js +0 -4
- package/web/.next/server/chunks/ssr/_0_m17kl._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_0d4miu.._.js +0 -4
- package/web/.next/server/chunks/ssr/_0d4miu.._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_0e8ern9._.js +0 -4
- package/web/.next/server/chunks/ssr/_0e8ern9._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_0hovej-._.js +0 -6
- package/web/.next/server/chunks/ssr/_0hovej-._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_0p3zs6p._.js +0 -3
- package/web/.next/server/chunks/ssr/_0p3zs6p._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_0qpq3xl._.js +0 -3
- package/web/.next/server/chunks/ssr/_0qpq3xl._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_0r.3n~3._.js +0 -4
- package/web/.next/server/chunks/ssr/_0r.3n~3._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_0t59q8r._.js +0 -4
- package/web/.next/server/chunks/ssr/_0t59q8r._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_0zk-h5w._.js +0 -4
- package/web/.next/server/chunks/ssr/_0zk-h5w._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_0~ev6dw._.js +0 -6
- package/web/.next/server/chunks/ssr/_0~ev6dw._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_1161g9x._.js +0 -4
- package/web/.next/server/chunks/ssr/_1161g9x._.js.map +0 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_05m2q~u.js +0 -3
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_05m2q~u.js.map +0 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_0.6zk.t.js +0 -3
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_0.6zk.t.js.map +0 -1
- package/web/.next/server/edge/chunks/0pax_next_dist_esm_build_templates_edge-wrapper_0atr6ca.js +0 -3
- package/web/.next/server/edge/chunks/11es_next_dist_esm_build_templates_edge-wrapper_0atr6ca.js.map +0 -1
- package/web/.next/server/edge/chunks/11es_next_dist_esm_build_templates_edge-wrapper_0xg0zx-.js +0 -3
- package/web/.next/server/edge/chunks/11es_next_dist_esm_build_templates_edge-wrapper_0xg0zx-.js.map +0 -1
- package/web/.next/server/edge/chunks/[root-of-the-server]__0m078x4._.js +0 -11
- package/web/.next/server/edge/chunks/[root-of-the-server]__0m078x4._.js.map +0 -1
- package/web/.next/static/chunks/0_9hv9_f66hur.js +0 -1
- package/web/.next/static/chunks/0dr6q94jmx86b.css +0 -1
- package/web/.next/static/chunks/0in40lx7y7f8o.js +0 -1
- package/web/.next/static/chunks/0rv6fo9ui94r9.js +0 -1
- package/web/.next/static/chunks/0t82zfhqgor5r.js +0 -1
- package/web/.next/static/chunks/0whetjaoa5y.l.js +0 -3
- package/web/public/favicon-dark.svg +0 -6
- package/web/public/favicon-light.svg +0 -6
- /package/web/.next/static/{CJ4Fr1ggL4xWEe_fapYLv → xP_-L4TLYvd3i_sEmljLs}/_buildManifest.js +0 -0
- /package/web/.next/static/{CJ4Fr1ggL4xWEe_fapYLv → xP_-L4TLYvd3i_sEmljLs}/_ssgManifest.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../packages/core/src/infrastructure/services/ide-launchers/compute-worktree-path.ts","../../../../../../packages/core/src/infrastructure/services/filesystem/shipit-ai-directory.service.ts","../../../../../../packages/core/src/infrastructure/services/folder-dialog.service.ts","../../../../../../packages/core/src/infrastructure/services/file-dialog.service.ts","../../../../../../src/presentation/web/app/api/dialog/pick-files/route.ts","../../../../../../node_modules/.pnpm/next%4016.2.2_%40babel%2Bcore%407.29.0_%40playwright%2Btest%401.59.1_react-dom%4019.2.4_react%4019.2.4__react%4019.2.4/node_modules/next/dist/esm/build/templates/app-route.js"],"sourcesContent":["/**\n * Compute Worktree Path\n *\n * Pure utility that computes the filesystem path for a feature's git worktree\n * given a repository path and branch name.\n *\n * Path format: ~/.shipit-ai/repos/<sha256-hash-prefix>/wt/<branch-slug>\n */\n\nimport { createHash } from 'node:crypto';\nimport { join } from 'node:path';\nimport { getShipitAiHomeDir } from '../filesystem/shipit-ai-directory.service';\n\n/**\n * Compute the worktree path for a given repository and branch.\n *\n * @param repoPath - Absolute path to the repository\n * @param branch - Git branch name (slashes are replaced with hyphens)\n * @returns Absolute path to the worktree directory under ~/.shipit-ai/repos/\n */\nexport function computeWorktreePath(repoPath: string, branch: string): string {\n // Normalize separators before hashing so C:\\foo and C:/foo produce the same hash\n const normalizedRepoPath = repoPath.replace(/\\\\/g, '/');\n const repoHash = createHash('sha256').update(normalizedRepoPath).digest('hex').slice(0, 16);\n const slug = branch.replace(/\\//g, '-');\n return join(getShipitAiHomeDir(), 'repos', repoHash, 'wt', slug).replace(/\\\\/g, '/');\n}\n","/**\n * Shipit AI Directory Service\n *\n * Manages the ~/.shipit-ai/ directory for global settings and data storage.\n * Ensures directory exists with correct permissions before database operations.\n *\n * Supports SHIPIT_AI_HOME env var for test isolation (overrides default ~/.shipit-ai/).\n */\n\nimport { mkdir } from 'node:fs/promises';\nimport { homedir } from 'node:os';\nimport { join } from 'node:path';\nimport { existsSync } from 'node:fs';\n\n/**\n * Resolves the Shipit AI home directory.\n * Respects SHIPIT_AI_HOME env var for test isolation, falls back to ~/.shipit-ai/\n */\nfunction resolveShipitAiHomeDir(): string {\n return process.env.SHIPIT_AI_HOME ?? join(homedir(), '.shipit-ai');\n}\n\n/**\n * Gets the path to the Shipit AI home directory.\n * Uses SHIPIT_AI_HOME env var if set, otherwise ~/.shipit-ai/\n *\n * @returns Path to shipit-ai home directory\n */\nexport function getShipitAiHomeDir(): string {\n return resolveShipitAiHomeDir();\n}\n\n/**\n * Gets the path to the SQLite database file.\n *\n * @returns Path to the database file\n */\nexport function getShipitAiDbPath(): string {\n return join(resolveShipitAiHomeDir(), 'data');\n}\n\n/**\n * Gets the path to the daemon state file.\n * Uses SHIPIT_AI_HOME env var if set (for test isolation), otherwise ~/.shipit-ai/daemon.json\n *\n * @returns Path to daemon.json\n */\nexport function getDaemonStatePath(): string {\n return join(resolveShipitAiHomeDir(), 'daemon.json');\n}\n\n/**\n * Gets the path to the daemon log file.\n * Uses SHIPIT_AI_HOME env var if set (for test isolation), otherwise ~/.shipit-ai/daemon.log\n *\n * @returns Path to daemon.log\n */\nexport function getDaemonLogPath(): string {\n return join(resolveShipitAiHomeDir(), 'daemon.log');\n}\n\n/**\n * Ensures the shipit-ai home directory exists with correct permissions.\n * Creates the directory if it doesn't exist.\n * Safe to call multiple times (idempotent).\n *\n * Permissions: 700 (rwx------) - only owner can read/write/execute\n *\n * @throws Error if directory cannot be created (permissions, disk space, etc.)\n */\nexport async function ensureShipitAiDirectory(): Promise<void> {\n const shipitAiDir = resolveShipitAiHomeDir();\n\n if (existsSync(shipitAiDir)) {\n return;\n }\n\n try {\n await mkdir(shipitAiDir, {\n recursive: true,\n mode: 0o700,\n });\n } catch (error) {\n throw new Error(\n `Failed to create Shipit AI directory at ${shipitAiDir}: ${error instanceof Error ? error.message : String(error)}`\n );\n }\n}\n","import { execSync } from 'node:child_process';\n\nexport interface FolderDialogDeps {\n platform: NodeJS.Platform;\n exec: (cmd: string, opts?: { encoding: BufferEncoding; timeout?: number }) => string;\n}\n\nconst defaultDeps: FolderDialogDeps = {\n platform: process.platform,\n exec: (cmd, opts) => execSync(cmd, opts) as unknown as string,\n};\n\n/**\n * Platform-specific commands that open a native OS folder picker dialog.\n * Each returns the chosen absolute folder path on stdout, or exits non-zero / returns empty on cancel.\n */\nconst PLATFORM_COMMANDS: Record<string, string> = {\n darwin: `osascript -e 'POSIX path of (choose folder with prompt \"Select a repository folder\")'`,\n linux: `zenity --file-selection --directory --title=\"Select a repository folder\" 2>/dev/null`,\n win32: `powershell -NoProfile -Command \"Add-Type -AssemblyName System.Windows.Forms; $f = New-Object System.Windows.Forms.FolderBrowserDialog; $f.Description = 'Select a repository folder'; if ($f.ShowDialog() -eq 'OK') { $f.SelectedPath } else { exit 1 }\"`,\n};\n\nexport class FolderDialogService {\n private deps: FolderDialogDeps;\n\n constructor(deps: Partial<FolderDialogDeps> = {}) {\n this.deps = { ...defaultDeps, ...deps };\n }\n\n /** Returns the OS-specific command string, or null if the platform is unsupported. */\n getCommand(): string | null {\n return PLATFORM_COMMANDS[this.deps.platform] ?? null;\n }\n\n /**\n * Opens a native folder picker dialog and returns the selected absolute path.\n * Returns `null` if the user cancels the dialog.\n * Throws if the platform is unsupported or the command fails unexpectedly.\n */\n pickFolder(): string | null {\n const command = this.getCommand();\n if (!command) {\n throw new Error(`Unsupported platform: ${this.deps.platform}`);\n }\n\n try {\n const result = this.deps.exec(command, { encoding: 'utf-8', timeout: 60_000 });\n const trimmed = result.trim();\n return trimmed.length > 0 ? trimmed : null;\n } catch (error: unknown) {\n // User cancelled the dialog — exit code 1 from osascript/zenity/powershell\n if (isExecError(error) && error.status === 1) {\n return null;\n }\n throw error;\n }\n }\n}\n\nfunction isExecError(error: unknown): error is { status: number } {\n return typeof error === 'object' && error !== null && 'status' in error;\n}\n","import { execSync } from 'node:child_process';\nimport { statSync } from 'node:fs';\n\nexport interface FileAttachment {\n path: string;\n name: string;\n size: number;\n}\n\nexport interface FileDialogDeps {\n platform: NodeJS.Platform;\n exec: (cmd: string, opts?: { encoding: BufferEncoding; timeout?: number }) => string;\n stat: (filePath: string) => { size: number };\n}\n\nconst defaultDeps: FileDialogDeps = {\n platform: process.platform,\n exec: (cmd, opts) => execSync(cmd, opts) as unknown as string,\n stat: (filePath) => statSync(filePath),\n};\n\n/**\n * Platform-specific commands that open a native OS file picker dialog.\n * Each returns newline-separated absolute file paths on stdout, or exits non-zero on cancel.\n */\nconst PLATFORM_COMMANDS: Record<string, string> = {\n darwin: `osascript -e 'set f to (choose file with prompt \"Select files\" with multiple selections allowed)' -e 'set paths to {}' -e 'repeat with i in f' -e 'copy POSIX path of i to end of paths' -e 'end repeat' -e 'set text item delimiters to \"\\n\"' -e 'paths as text'`,\n linux: `zenity --file-selection --multiple --separator=\"\\\\n\" --title=\"Select files\" 2>/dev/null`,\n win32: `powershell -NoProfile -Command \"Add-Type -AssemblyName System.Windows.Forms; $d = New-Object System.Windows.Forms.OpenFileDialog; $d.Multiselect = $true; $d.Title = 'Select files'; if ($d.ShowDialog() -eq 'OK') { $d.FileNames -join [char]10 } else { exit 1 }\"`,\n};\n\nexport class FileDialogService {\n private deps: FileDialogDeps;\n\n constructor(deps: Partial<FileDialogDeps> = {}) {\n this.deps = { ...defaultDeps, ...deps };\n }\n\n /** Returns the OS-specific command string, or null if the platform is unsupported. */\n getCommand(): string | null {\n return PLATFORM_COMMANDS[this.deps.platform] ?? null;\n }\n\n /**\n * Opens a native file picker dialog and returns metadata for each selected file.\n * Returns `null` if the user cancels the dialog.\n * Throws if the platform is unsupported or the command fails unexpectedly.\n */\n pickFiles(): FileAttachment[] | null {\n const command = this.getCommand();\n if (!command) {\n throw new Error(`Unsupported platform: ${this.deps.platform}`);\n }\n\n try {\n const result = this.deps.exec(command, { encoding: 'utf-8', timeout: 60_000 });\n const paths = result\n .split('\\n')\n .map((line) => line.trim())\n .filter((line) => line.length > 0);\n\n if (paths.length === 0) return null;\n\n return paths.map((filePath) => {\n const stats = this.deps.stat(filePath);\n return {\n path: filePath,\n name: filePath.split(/[/\\\\]/).pop()!,\n size: stats.size,\n };\n });\n } catch (error: unknown) {\n if (isExecError(error) && error.status === 1) {\n return null;\n }\n throw error;\n }\n }\n}\n\nfunction isExecError(error: unknown): error is { status: number } {\n return typeof error === 'object' && error !== null && 'status' in error;\n}\n","import { NextResponse } from 'next/server';\nimport { FileDialogService } from '@/lib/core-utils';\nimport type { FileAttachment } from '@shipit-ai/core/infrastructure/services/file-dialog.service';\n\nexport async function POST(): Promise<NextResponse> {\n const service = new FileDialogService();\n\n try {\n const files: FileAttachment[] | null = service.pickFiles();\n return NextResponse.json({ files, cancelled: files === null });\n } catch (error: unknown) {\n const message = error instanceof Error ? error.message : 'Failed to open file dialog';\n return NextResponse.json({ files: null, cancelled: false, error: message }, { status: 500 });\n }\n}\n","import { AppRouteRouteModule } from \"next/dist/esm/server/route-modules/app-route/module.compiled\";\nimport { RouteKind } from \"next/dist/esm/server/route-kind\";\nimport { patchFetch as _patchFetch } from \"next/dist/esm/server/lib/patch-fetch\";\nimport { addRequestMeta, getRequestMeta, setRequestMeta } from \"next/dist/esm/server/request-meta\";\nimport { getTracer, SpanKind } from \"next/dist/esm/server/lib/trace/tracer\";\nimport { setManifestsSingleton } from \"next/dist/esm/server/app-render/manifests-singleton\";\nimport { normalizeAppPath } from \"next/dist/esm/shared/lib/router/utils/app-paths\";\nimport { NodeNextRequest, NodeNextResponse } from \"next/dist/esm/server/base-http/node\";\nimport { NextRequestAdapter, signalFromNodeResponse } from \"next/dist/esm/server/web/spec-extension/adapters/next-request\";\nimport { BaseServerSpan } from \"next/dist/esm/server/lib/trace/constants\";\nimport { getRevalidateReason } from \"next/dist/esm/server/instrumentation/utils\";\nimport { sendResponse } from \"next/dist/esm/server/send-response\";\nimport { fromNodeOutgoingHttpHeaders, toNodeOutgoingHttpHeaders } from \"next/dist/esm/server/web/utils\";\nimport { getCacheControlHeader } from \"next/dist/esm/server/lib/cache-control\";\nimport { INFINITE_CACHE, NEXT_CACHE_TAGS_HEADER } from \"next/dist/esm/lib/constants\";\nimport { NoFallbackError } from \"next/dist/esm/shared/lib/no-fallback-error.external\";\nimport { CachedRouteKind } from \"next/dist/esm/server/response-cache\";\nimport * as userland from \"INNER_APP_ROUTE\";\n// We inject the nextConfigOutput here so that we can use them in the route\n// module.\nconst nextConfigOutput = \"\"\nconst routeModule = new AppRouteRouteModule({\n definition: {\n kind: RouteKind.APP_ROUTE,\n page: \"/api/dialog/pick-files/route\",\n pathname: \"/api/dialog/pick-files\",\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/dialog/pick-files/route.ts\",\n nextConfigOutput,\n // The static import is used for initialization (methods, dynamic, etc.).\n userland: userland,\n // In Turbopack dev mode, also provide a getter that calls require() on every\n // request. This re-reads from devModuleCache so HMR updates are picked up,\n // and the async wrapper unwraps async-module Promises (ESM-only\n // serverExternalPackages) automatically.\n ...process.env.TURBOPACK && process.env.__NEXT_DEV_SERVER ? {\n getUserland: ()=>import(\"INNER_APP_ROUTE\")\n } : {}\n});\n// Pull out the exports that we need to expose from the module. This should\n// be eliminated when we've moved the other routes to the new format. These\n// are used to hook into the route.\nconst { workAsyncStorage, workUnitAsyncStorage, serverHooks } = routeModule;\nfunction patchFetch() {\n return _patchFetch({\n workAsyncStorage,\n workUnitAsyncStorage\n });\n}\nexport { routeModule, workAsyncStorage, workUnitAsyncStorage, serverHooks, patchFetch, };\nexport async function handler(req, res, ctx) {\n if (ctx.requestMeta) {\n setRequestMeta(req, ctx.requestMeta);\n }\n if (routeModule.isDev) {\n addRequestMeta(req, 'devRequestTimingInternalsEnd', process.hrtime.bigint());\n }\n let srcPage = \"/api/dialog/pick-files/route\";\n // turbopack doesn't normalize `/index` in the page name\n // so we need to to process dynamic routes properly\n // TODO: fix turbopack providing differing value from webpack\n if (process.env.TURBOPACK) {\n srcPage = srcPage.replace(/\\/index$/, '') || '/';\n } else if (srcPage === '/index') {\n // we always normalize /index specifically\n srcPage = '/';\n }\n const multiZoneDraftMode = process.env.__NEXT_MULTI_ZONE_DRAFT_MODE;\n const prepareResult = await routeModule.prepare(req, res, {\n srcPage,\n multiZoneDraftMode\n });\n if (!prepareResult) {\n res.statusCode = 400;\n res.end('Bad Request');\n ctx.waitUntil == null ? void 0 : ctx.waitUntil.call(ctx, Promise.resolve());\n return null;\n }\n const { buildId, params, nextConfig, parsedUrl, isDraftMode, prerenderManifest, routerServerContext, isOnDemandRevalidate, revalidateOnlyGenerated, resolvedPathname, clientReferenceManifest, serverActionsManifest } = prepareResult;\n const normalizedSrcPage = normalizeAppPath(srcPage);\n let isIsr = Boolean(prerenderManifest.dynamicRoutes[normalizedSrcPage] || prerenderManifest.routes[resolvedPathname]);\n const render404 = async ()=>{\n // TODO: should route-module itself handle rendering the 404\n if (routerServerContext == null ? void 0 : routerServerContext.render404) {\n await routerServerContext.render404(req, res, parsedUrl, false);\n } else {\n res.end('This page could not be found');\n }\n return null;\n };\n if (isIsr && !isDraftMode) {\n const isPrerendered = Boolean(prerenderManifest.routes[resolvedPathname]);\n const prerenderInfo = prerenderManifest.dynamicRoutes[normalizedSrcPage];\n if (prerenderInfo) {\n if (prerenderInfo.fallback === false && !isPrerendered) {\n if (nextConfig.adapterPath) {\n return await render404();\n }\n throw new NoFallbackError();\n }\n }\n }\n let cacheKey = null;\n if (isIsr && !routeModule.isDev && !isDraftMode) {\n cacheKey = resolvedPathname;\n // ensure /index and / is normalized to one key\n cacheKey = cacheKey === '/index' ? '/' : cacheKey;\n }\n const supportsDynamicResponse = // If we're in development, we always support dynamic HTML\n routeModule.isDev === true || // If this is not SSG or does not have static paths, then it supports\n // dynamic HTML.\n !isIsr;\n // This is a revalidation request if the request is for a static\n // page and it is not being resumed from a postponed render and\n // it is not a dynamic RSC request then it is a revalidation\n // request.\n const isStaticGeneration = isIsr && !supportsDynamicResponse;\n // Before rendering (which initializes component tree modules), we have to\n // set the reference manifests to our global store so Server Action's\n // encryption util can access to them at the top level of the page module.\n if (serverActionsManifest && clientReferenceManifest) {\n setManifestsSingleton({\n page: srcPage,\n clientReferenceManifest,\n serverActionsManifest\n });\n }\n const method = req.method || 'GET';\n const tracer = getTracer();\n const activeSpan = tracer.getActiveScopeSpan();\n const isWrappedByNextServer = Boolean(routerServerContext == null ? void 0 : routerServerContext.isWrappedByNextServer);\n const isMinimalMode = Boolean(getRequestMeta(req, 'minimalMode'));\n const incrementalCache = getRequestMeta(req, 'incrementalCache') || await routeModule.getIncrementalCache(req, nextConfig, prerenderManifest, isMinimalMode);\n incrementalCache == null ? void 0 : incrementalCache.resetRequestCache();\n globalThis.__incrementalCache = incrementalCache;\n const context = {\n params,\n previewProps: prerenderManifest.preview,\n renderOpts: {\n experimental: {\n authInterrupts: Boolean(nextConfig.experimental.authInterrupts)\n },\n cacheComponents: Boolean(nextConfig.cacheComponents),\n supportsDynamicResponse,\n incrementalCache,\n cacheLifeProfiles: nextConfig.cacheLife,\n waitUntil: ctx.waitUntil,\n onClose: (cb)=>{\n res.on('close', cb);\n },\n onAfterTaskError: undefined,\n onInstrumentationRequestError: (error, _request, errorContext, silenceLog)=>routeModule.onRequestError(req, error, errorContext, silenceLog, routerServerContext)\n },\n sharedContext: {\n buildId\n }\n };\n const nodeNextReq = new NodeNextRequest(req);\n const nodeNextRes = new NodeNextResponse(res);\n const nextReq = NextRequestAdapter.fromNodeNextRequest(nodeNextReq, signalFromNodeResponse(res));\n try {\n let parentSpan;\n const invokeRouteModule = async (span)=>{\n return routeModule.handle(nextReq, context).finally(()=>{\n if (!span) return;\n span.setAttributes({\n 'http.status_code': res.statusCode,\n 'next.rsc': false\n });\n const rootSpanAttributes = tracer.getRootSpanAttributes();\n // We were unable to get attributes, probably OTEL is not enabled\n if (!rootSpanAttributes) {\n return;\n }\n if (rootSpanAttributes.get('next.span_type') !== BaseServerSpan.handleRequest) {\n console.warn(`Unexpected root span type '${rootSpanAttributes.get('next.span_type')}'. Please report this Next.js issue https://github.com/vercel/next.js`);\n return;\n }\n const route = rootSpanAttributes.get('next.route');\n if (route) {\n const name = `${method} ${route}`;\n span.setAttributes({\n 'next.route': route,\n 'http.route': route,\n 'next.span_name': name\n });\n span.updateName(name);\n // Propagate http.route to the parent span if one exists (e.g.\n // a platform-created HTTP span in adapter deployments).\n if (parentSpan && parentSpan !== span) {\n parentSpan.setAttribute('http.route', route);\n parentSpan.updateName(name);\n }\n } else {\n span.updateName(`${method} ${srcPage}`);\n }\n });\n };\n const handleResponse = async (currentSpan)=>{\n var _cacheEntry_value;\n const responseGenerator = async ({ previousCacheEntry })=>{\n try {\n if (!isMinimalMode && isOnDemandRevalidate && revalidateOnlyGenerated && !previousCacheEntry) {\n res.statusCode = 404;\n // on-demand revalidate always sets this header\n res.setHeader('x-nextjs-cache', 'REVALIDATED');\n res.end('This page could not be found');\n return null;\n }\n const response = await invokeRouteModule(currentSpan);\n req.fetchMetrics = context.renderOpts.fetchMetrics;\n let pendingWaitUntil = context.renderOpts.pendingWaitUntil;\n // Attempt using provided waitUntil if available\n // if it's not we fallback to sendResponse's handling\n if (pendingWaitUntil) {\n if (ctx.waitUntil) {\n ctx.waitUntil(pendingWaitUntil);\n pendingWaitUntil = undefined;\n }\n }\n const cacheTags = context.renderOpts.collectedTags;\n // If the request is for a static response, we can cache it so long\n // as it's not edge.\n if (isIsr) {\n const blob = await response.blob();\n // Copy the headers from the response.\n const headers = toNodeOutgoingHttpHeaders(response.headers);\n if (cacheTags) {\n headers[NEXT_CACHE_TAGS_HEADER] = cacheTags;\n }\n if (!headers['content-type'] && blob.type) {\n headers['content-type'] = blob.type;\n }\n const revalidate = typeof context.renderOpts.collectedRevalidate === 'undefined' || context.renderOpts.collectedRevalidate >= INFINITE_CACHE ? false : context.renderOpts.collectedRevalidate;\n const expire = typeof context.renderOpts.collectedExpire === 'undefined' || context.renderOpts.collectedExpire >= INFINITE_CACHE ? undefined : context.renderOpts.collectedExpire;\n // Create the cache entry for the response.\n const cacheEntry = {\n value: {\n kind: CachedRouteKind.APP_ROUTE,\n status: response.status,\n body: Buffer.from(await blob.arrayBuffer()),\n headers\n },\n cacheControl: {\n revalidate,\n expire\n }\n };\n return cacheEntry;\n } else {\n // send response without caching if not ISR\n await sendResponse(nodeNextReq, nodeNextRes, response, context.renderOpts.pendingWaitUntil);\n return null;\n }\n } catch (err) {\n // if this is a background revalidate we need to report\n // the request error here as it won't be bubbled\n if (previousCacheEntry == null ? void 0 : previousCacheEntry.isStale) {\n const silenceLog = false;\n await routeModule.onRequestError(req, err, {\n routerKind: 'App Router',\n routePath: srcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isStaticGeneration,\n isOnDemandRevalidate\n })\n }, silenceLog, routerServerContext);\n }\n throw err;\n }\n };\n const cacheEntry = await routeModule.handleResponse({\n req,\n nextConfig,\n cacheKey,\n routeKind: RouteKind.APP_ROUTE,\n isFallback: false,\n prerenderManifest,\n isRoutePPREnabled: false,\n isOnDemandRevalidate,\n revalidateOnlyGenerated,\n responseGenerator,\n waitUntil: ctx.waitUntil,\n isMinimalMode\n });\n // we don't create a cacheEntry for ISR\n if (!isIsr) {\n return null;\n }\n if ((cacheEntry == null ? void 0 : (_cacheEntry_value = cacheEntry.value) == null ? void 0 : _cacheEntry_value.kind) !== CachedRouteKind.APP_ROUTE) {\n var _cacheEntry_value1;\n throw Object.defineProperty(new Error(`Invariant: app-route received invalid cache entry ${cacheEntry == null ? void 0 : (_cacheEntry_value1 = cacheEntry.value) == null ? void 0 : _cacheEntry_value1.kind}`), \"__NEXT_ERROR_CODE\", {\n value: \"E701\",\n enumerable: false,\n configurable: true\n });\n }\n if (!isMinimalMode) {\n res.setHeader('x-nextjs-cache', isOnDemandRevalidate ? 'REVALIDATED' : cacheEntry.isMiss ? 'MISS' : cacheEntry.isStale ? 'STALE' : 'HIT');\n }\n // Draft mode should never be cached\n if (isDraftMode) {\n res.setHeader('Cache-Control', 'private, no-cache, no-store, max-age=0, must-revalidate');\n }\n const headers = fromNodeOutgoingHttpHeaders(cacheEntry.value.headers);\n if (!(isMinimalMode && isIsr)) {\n headers.delete(NEXT_CACHE_TAGS_HEADER);\n }\n // If cache control is already set on the response we don't\n // override it to allow users to customize it via next.config\n if (cacheEntry.cacheControl && !res.getHeader('Cache-Control') && !headers.get('Cache-Control')) {\n headers.set('Cache-Control', getCacheControlHeader(cacheEntry.cacheControl));\n }\n await sendResponse(nodeNextReq, nodeNextRes, // @ts-expect-error - Argument of type 'Buffer<ArrayBufferLike>' is not assignable to parameter of type 'BodyInit | null | undefined'.\n new Response(cacheEntry.value.body, {\n headers,\n status: cacheEntry.value.status || 200\n }));\n return null;\n };\n // TODO: activeSpan code path is for when wrapped by\n // next-server can be removed when this is no longer used\n if (isWrappedByNextServer && activeSpan) {\n await handleResponse(activeSpan);\n } else {\n parentSpan = tracer.getActiveScopeSpan();\n await tracer.withPropagatedContext(req.headers, ()=>tracer.trace(BaseServerSpan.handleRequest, {\n spanName: `${method} ${srcPage}`,\n kind: SpanKind.SERVER,\n attributes: {\n 'http.method': method,\n 'http.target': req.url\n }\n }, handleResponse), undefined, !isWrappedByNextServer);\n }\n } catch (err) {\n if (!(err instanceof NoFallbackError)) {\n const silenceLog = false;\n await routeModule.onRequestError(req, err, {\n routerKind: 'App Router',\n routePath: normalizedSrcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isStaticGeneration,\n isOnDemandRevalidate\n })\n }, silenceLog, routerServerContext);\n }\n // rethrow so that we can handle serving error page\n // If this is during static generation, throw the error again.\n if (isIsr) throw err;\n // Otherwise, send a 500 response.\n await sendResponse(nodeNextReq, nodeNextRes, new Response(null, {\n status: 500\n }));\n return null;\n }\n}\n\n//# sourceMappingURL=app-route.js.map\n"],"names":["resolveShipitAiHomeDir","process","env","SHIPIT_AI_HOME","getShipitAiHomeDir","getShipitAiDbPath","getDaemonStatePath","getDaemonLogPath","ensureShipitAiDirectory","shipitAiDir","recursive","mode","error","Error","message","String","POST","service","files","pickFiles","json","cancelled","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AAC,aAAa,CAAE,CACvF,SAAU,CAAA,EAAG,EAAO,CAAC,EAAE,EAAA,CAAS,CAChC,KAAM,EAAA,QAAQ,CAAC,MAAM,CACrB,WAAY,CACR,cAAe,EACf,cAAe,EAAI,GAAG,AAC1B,CACJ,EAAG,QAAiB,EAAW,CAAC,GAE5C,CAAE,MAAO,EAAK,CAeV,GAdM,aAAe,EAAA,eAAe,EAEhC,CAFmC,KAE7B,EAAY,cAAc,CAAC,EAAK,EAAK,CACvC,WAAY,aACZ,UAAW,EACX,UAAW,QACX,iBAAkB,CAAA,EAAA,EAAA,mBAAA,AAAmB,EAAC,oBAClC,uBACA,CACJ,EACJ,EATmB,CAShB,EAAY,GAIf,EAAO,MAAM,EAKjB,OAHA,MAAM,CAAA,EAAA,EAAA,YAAA,AAAY,EAAC,EAAa,EAAa,IAAI,SAAS,KAAM,CAC5D,OAAQ,GACZ,IACO,IACX,CACJ,mCA3TA,SAAS,EACL,MAAO,CAAA,EAAA,EAAA,UAAA,AAAW,EAAC,kBACf,uBACA,CACJ,EACJ","ignoreList":[5]}
|
|
1
|
+
{"version":3,"sources":["../../../../../../packages/core/src/infrastructure/services/ide-launchers/compute-worktree-path.ts","../../../../../../packages/core/src/infrastructure/services/filesystem/shipit-ai-directory.service.ts","../../../../../../packages/core/src/infrastructure/services/folder-dialog.service.ts","../../../../../../packages/core/src/infrastructure/services/file-dialog.service.ts","../../../../../../src/presentation/web/app/api/dialog/pick-files/route.ts","../../../../../../node_modules/.pnpm/next%4016.2.2_%40babel%2Bcore%407.29.0_%40playwright%2Btest%401.59.1_react-dom%4019.2.4_react%4019.2.4__react%4019.2.4/node_modules/next/dist/esm/build/templates/app-route.js"],"sourcesContent":["/**\n * Compute Worktree Path\n *\n * Pure utility that computes the filesystem path for a feature's git worktree\n * given a repository path and branch name.\n *\n * Path format: ~/.shipit-ai/repos/<sha256-hash-prefix>/wt/<branch-slug>\n */\n\nimport { createHash } from 'node:crypto';\nimport { join } from 'node:path';\nimport { getShipitAiHomeDir } from '../filesystem/shipit-ai-directory.service';\n\n/**\n * Compute the worktree path for a given repository and branch.\n *\n * @param repoPath - Absolute path to the repository\n * @param branch - Git branch name (slashes are replaced with hyphens)\n * @returns Absolute path to the worktree directory under ~/.shipit-ai/repos/\n */\nexport function computeWorktreePath(repoPath: string, branch: string): string {\n // Normalize separators before hashing so C:\\foo and C:/foo produce the same hash\n const normalizedRepoPath = repoPath.replace(/\\\\/g, '/');\n const repoHash = createHash('sha256').update(normalizedRepoPath).digest('hex').slice(0, 16);\n const slug = branch.replace(/\\//g, '-');\n return join(getShipitAiHomeDir(), 'repos', repoHash, 'wt', slug).replace(/\\\\/g, '/');\n}\n","/**\n * ShipIT AI Directory Service\n *\n * Manages the ~/.shipit-ai/ directory for global settings and data storage.\n * Ensures directory exists with correct permissions before database operations.\n *\n * Supports SHIPIT_AI_HOME env var for test isolation (overrides default ~/.shipit-ai/).\n */\n\nimport { mkdir } from 'node:fs/promises';\nimport { homedir } from 'node:os';\nimport { join } from 'node:path';\nimport { existsSync } from 'node:fs';\n\n/**\n * Resolves the ShipIT AI home directory.\n * Respects SHIPIT_AI_HOME env var for test isolation, falls back to ~/.shipit-ai/\n */\nfunction resolveShipitAiHomeDir(): string {\n return process.env.SHIPIT_AI_HOME ?? join(homedir(), '.shipit-ai');\n}\n\n/**\n * Gets the path to the ShipIT AI home directory.\n * Uses SHIPIT_AI_HOME env var if set, otherwise ~/.shipit-ai/\n *\n * @returns Path to shipit-ai home directory\n */\nexport function getShipitAiHomeDir(): string {\n return resolveShipitAiHomeDir();\n}\n\n/**\n * Gets the path to the SQLite database file.\n *\n * @returns Path to the database file\n */\nexport function getShipitAiDbPath(): string {\n return join(resolveShipitAiHomeDir(), 'data');\n}\n\n/**\n * Gets the path to the daemon state file.\n * Uses SHIPIT_AI_HOME env var if set (for test isolation), otherwise ~/.shipit-ai/daemon.json\n *\n * @returns Path to daemon.json\n */\nexport function getDaemonStatePath(): string {\n return join(resolveShipitAiHomeDir(), 'daemon.json');\n}\n\n/**\n * Gets the path to the daemon log file.\n * Uses SHIPIT_AI_HOME env var if set (for test isolation), otherwise ~/.shipit-ai/daemon.log\n *\n * @returns Path to daemon.log\n */\nexport function getDaemonLogPath(): string {\n return join(resolveShipitAiHomeDir(), 'daemon.log');\n}\n\n/**\n * Ensures the shipit-ai home directory exists with correct permissions.\n * Creates the directory if it doesn't exist.\n * Safe to call multiple times (idempotent).\n *\n * Permissions: 700 (rwx------) - only owner can read/write/execute\n *\n * @throws Error if directory cannot be created (permissions, disk space, etc.)\n */\nexport async function ensureShipitAiDirectory(): Promise<void> {\n const shipitAiDir = resolveShipitAiHomeDir();\n\n if (existsSync(shipitAiDir)) {\n return;\n }\n\n try {\n await mkdir(shipitAiDir, {\n recursive: true,\n mode: 0o700,\n });\n } catch (error) {\n throw new Error(\n `Failed to create ShipIT AI directory at ${shipitAiDir}: ${error instanceof Error ? error.message : String(error)}`\n );\n }\n}\n","import { execSync } from 'node:child_process';\n\nexport interface FolderDialogDeps {\n platform: NodeJS.Platform;\n exec: (cmd: string, opts?: { encoding: BufferEncoding; timeout?: number }) => string;\n}\n\nconst defaultDeps: FolderDialogDeps = {\n platform: process.platform,\n exec: (cmd, opts) => execSync(cmd, opts) as unknown as string,\n};\n\n/**\n * Platform-specific commands that open a native OS folder picker dialog.\n * Each returns the chosen absolute folder path on stdout, or exits non-zero / returns empty on cancel.\n */\nconst PLATFORM_COMMANDS: Record<string, string> = {\n darwin: `osascript -e 'POSIX path of (choose folder with prompt \"Select a repository folder\")'`,\n linux: `zenity --file-selection --directory --title=\"Select a repository folder\" 2>/dev/null`,\n win32: `powershell -NoProfile -Command \"Add-Type -AssemblyName System.Windows.Forms; $f = New-Object System.Windows.Forms.FolderBrowserDialog; $f.Description = 'Select a repository folder'; if ($f.ShowDialog() -eq 'OK') { $f.SelectedPath } else { exit 1 }\"`,\n};\n\nexport class FolderDialogService {\n private deps: FolderDialogDeps;\n\n constructor(deps: Partial<FolderDialogDeps> = {}) {\n this.deps = { ...defaultDeps, ...deps };\n }\n\n /** Returns the OS-specific command string, or null if the platform is unsupported. */\n getCommand(): string | null {\n return PLATFORM_COMMANDS[this.deps.platform] ?? null;\n }\n\n /**\n * Opens a native folder picker dialog and returns the selected absolute path.\n * Returns `null` if the user cancels the dialog.\n * Throws if the platform is unsupported or the command fails unexpectedly.\n */\n pickFolder(): string | null {\n const command = this.getCommand();\n if (!command) {\n throw new Error(`Unsupported platform: ${this.deps.platform}`);\n }\n\n try {\n const result = this.deps.exec(command, { encoding: 'utf-8', timeout: 60_000 });\n const trimmed = result.trim();\n return trimmed.length > 0 ? trimmed : null;\n } catch (error: unknown) {\n // User cancelled the dialog — exit code 1 from osascript/zenity/powershell\n if (isExecError(error) && error.status === 1) {\n return null;\n }\n throw error;\n }\n }\n}\n\nfunction isExecError(error: unknown): error is { status: number } {\n return typeof error === 'object' && error !== null && 'status' in error;\n}\n","import { execSync } from 'node:child_process';\nimport { statSync } from 'node:fs';\n\nexport interface FileAttachment {\n path: string;\n name: string;\n size: number;\n}\n\nexport interface FileDialogDeps {\n platform: NodeJS.Platform;\n exec: (cmd: string, opts?: { encoding: BufferEncoding; timeout?: number }) => string;\n stat: (filePath: string) => { size: number };\n}\n\nconst defaultDeps: FileDialogDeps = {\n platform: process.platform,\n exec: (cmd, opts) => execSync(cmd, opts) as unknown as string,\n stat: (filePath) => statSync(filePath),\n};\n\n/**\n * Platform-specific commands that open a native OS file picker dialog.\n * Each returns newline-separated absolute file paths on stdout, or exits non-zero on cancel.\n */\nconst PLATFORM_COMMANDS: Record<string, string> = {\n darwin: `osascript -e 'set f to (choose file with prompt \"Select files\" with multiple selections allowed)' -e 'set paths to {}' -e 'repeat with i in f' -e 'copy POSIX path of i to end of paths' -e 'end repeat' -e 'set text item delimiters to \"\\n\"' -e 'paths as text'`,\n linux: `zenity --file-selection --multiple --separator=\"\\\\n\" --title=\"Select files\" 2>/dev/null`,\n win32: `powershell -NoProfile -Command \"Add-Type -AssemblyName System.Windows.Forms; $d = New-Object System.Windows.Forms.OpenFileDialog; $d.Multiselect = $true; $d.Title = 'Select files'; if ($d.ShowDialog() -eq 'OK') { $d.FileNames -join [char]10 } else { exit 1 }\"`,\n};\n\nexport class FileDialogService {\n private deps: FileDialogDeps;\n\n constructor(deps: Partial<FileDialogDeps> = {}) {\n this.deps = { ...defaultDeps, ...deps };\n }\n\n /** Returns the OS-specific command string, or null if the platform is unsupported. */\n getCommand(): string | null {\n return PLATFORM_COMMANDS[this.deps.platform] ?? null;\n }\n\n /**\n * Opens a native file picker dialog and returns metadata for each selected file.\n * Returns `null` if the user cancels the dialog.\n * Throws if the platform is unsupported or the command fails unexpectedly.\n */\n pickFiles(): FileAttachment[] | null {\n const command = this.getCommand();\n if (!command) {\n throw new Error(`Unsupported platform: ${this.deps.platform}`);\n }\n\n try {\n const result = this.deps.exec(command, { encoding: 'utf-8', timeout: 60_000 });\n const paths = result\n .split('\\n')\n .map((line) => line.trim())\n .filter((line) => line.length > 0);\n\n if (paths.length === 0) return null;\n\n return paths.map((filePath) => {\n const stats = this.deps.stat(filePath);\n return {\n path: filePath,\n name: filePath.split(/[/\\\\]/).pop()!,\n size: stats.size,\n };\n });\n } catch (error: unknown) {\n if (isExecError(error) && error.status === 1) {\n return null;\n }\n throw error;\n }\n }\n}\n\nfunction isExecError(error: unknown): error is { status: number } {\n return typeof error === 'object' && error !== null && 'status' in error;\n}\n","import { NextResponse } from 'next/server';\nimport { FileDialogService } from '@/lib/core-utils';\nimport type { FileAttachment } from '@shipit-ai/core/infrastructure/services/file-dialog.service';\n\nexport async function POST(): Promise<NextResponse> {\n const service = new FileDialogService();\n\n try {\n const files: FileAttachment[] | null = service.pickFiles();\n return NextResponse.json({ files, cancelled: files === null });\n } catch (error: unknown) {\n const message = error instanceof Error ? error.message : 'Failed to open file dialog';\n return NextResponse.json({ files: null, cancelled: false, error: message }, { status: 500 });\n }\n}\n","import { AppRouteRouteModule } from \"next/dist/esm/server/route-modules/app-route/module.compiled\";\nimport { RouteKind } from \"next/dist/esm/server/route-kind\";\nimport { patchFetch as _patchFetch } from \"next/dist/esm/server/lib/patch-fetch\";\nimport { addRequestMeta, getRequestMeta, setRequestMeta } from \"next/dist/esm/server/request-meta\";\nimport { getTracer, SpanKind } from \"next/dist/esm/server/lib/trace/tracer\";\nimport { setManifestsSingleton } from \"next/dist/esm/server/app-render/manifests-singleton\";\nimport { normalizeAppPath } from \"next/dist/esm/shared/lib/router/utils/app-paths\";\nimport { NodeNextRequest, NodeNextResponse } from \"next/dist/esm/server/base-http/node\";\nimport { NextRequestAdapter, signalFromNodeResponse } from \"next/dist/esm/server/web/spec-extension/adapters/next-request\";\nimport { BaseServerSpan } from \"next/dist/esm/server/lib/trace/constants\";\nimport { getRevalidateReason } from \"next/dist/esm/server/instrumentation/utils\";\nimport { sendResponse } from \"next/dist/esm/server/send-response\";\nimport { fromNodeOutgoingHttpHeaders, toNodeOutgoingHttpHeaders } from \"next/dist/esm/server/web/utils\";\nimport { getCacheControlHeader } from \"next/dist/esm/server/lib/cache-control\";\nimport { INFINITE_CACHE, NEXT_CACHE_TAGS_HEADER } from \"next/dist/esm/lib/constants\";\nimport { NoFallbackError } from \"next/dist/esm/shared/lib/no-fallback-error.external\";\nimport { CachedRouteKind } from \"next/dist/esm/server/response-cache\";\nimport * as userland from \"INNER_APP_ROUTE\";\n// We inject the nextConfigOutput here so that we can use them in the route\n// module.\nconst nextConfigOutput = \"\"\nconst routeModule = new AppRouteRouteModule({\n definition: {\n kind: RouteKind.APP_ROUTE,\n page: \"/api/dialog/pick-files/route\",\n pathname: \"/api/dialog/pick-files\",\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/dialog/pick-files/route.ts\",\n nextConfigOutput,\n // The static import is used for initialization (methods, dynamic, etc.).\n userland: userland,\n // In Turbopack dev mode, also provide a getter that calls require() on every\n // request. This re-reads from devModuleCache so HMR updates are picked up,\n // and the async wrapper unwraps async-module Promises (ESM-only\n // serverExternalPackages) automatically.\n ...process.env.TURBOPACK && process.env.__NEXT_DEV_SERVER ? {\n getUserland: ()=>import(\"INNER_APP_ROUTE\")\n } : {}\n});\n// Pull out the exports that we need to expose from the module. This should\n// be eliminated when we've moved the other routes to the new format. These\n// are used to hook into the route.\nconst { workAsyncStorage, workUnitAsyncStorage, serverHooks } = routeModule;\nfunction patchFetch() {\n return _patchFetch({\n workAsyncStorage,\n workUnitAsyncStorage\n });\n}\nexport { routeModule, workAsyncStorage, workUnitAsyncStorage, serverHooks, patchFetch, };\nexport async function handler(req, res, ctx) {\n if (ctx.requestMeta) {\n setRequestMeta(req, ctx.requestMeta);\n }\n if (routeModule.isDev) {\n addRequestMeta(req, 'devRequestTimingInternalsEnd', process.hrtime.bigint());\n }\n let srcPage = \"/api/dialog/pick-files/route\";\n // turbopack doesn't normalize `/index` in the page name\n // so we need to to process dynamic routes properly\n // TODO: fix turbopack providing differing value from webpack\n if (process.env.TURBOPACK) {\n srcPage = srcPage.replace(/\\/index$/, '') || '/';\n } else if (srcPage === '/index') {\n // we always normalize /index specifically\n srcPage = '/';\n }\n const multiZoneDraftMode = process.env.__NEXT_MULTI_ZONE_DRAFT_MODE;\n const prepareResult = await routeModule.prepare(req, res, {\n srcPage,\n multiZoneDraftMode\n });\n if (!prepareResult) {\n res.statusCode = 400;\n res.end('Bad Request');\n ctx.waitUntil == null ? void 0 : ctx.waitUntil.call(ctx, Promise.resolve());\n return null;\n }\n const { buildId, params, nextConfig, parsedUrl, isDraftMode, prerenderManifest, routerServerContext, isOnDemandRevalidate, revalidateOnlyGenerated, resolvedPathname, clientReferenceManifest, serverActionsManifest } = prepareResult;\n const normalizedSrcPage = normalizeAppPath(srcPage);\n let isIsr = Boolean(prerenderManifest.dynamicRoutes[normalizedSrcPage] || prerenderManifest.routes[resolvedPathname]);\n const render404 = async ()=>{\n // TODO: should route-module itself handle rendering the 404\n if (routerServerContext == null ? void 0 : routerServerContext.render404) {\n await routerServerContext.render404(req, res, parsedUrl, false);\n } else {\n res.end('This page could not be found');\n }\n return null;\n };\n if (isIsr && !isDraftMode) {\n const isPrerendered = Boolean(prerenderManifest.routes[resolvedPathname]);\n const prerenderInfo = prerenderManifest.dynamicRoutes[normalizedSrcPage];\n if (prerenderInfo) {\n if (prerenderInfo.fallback === false && !isPrerendered) {\n if (nextConfig.adapterPath) {\n return await render404();\n }\n throw new NoFallbackError();\n }\n }\n }\n let cacheKey = null;\n if (isIsr && !routeModule.isDev && !isDraftMode) {\n cacheKey = resolvedPathname;\n // ensure /index and / is normalized to one key\n cacheKey = cacheKey === '/index' ? '/' : cacheKey;\n }\n const supportsDynamicResponse = // If we're in development, we always support dynamic HTML\n routeModule.isDev === true || // If this is not SSG or does not have static paths, then it supports\n // dynamic HTML.\n !isIsr;\n // This is a revalidation request if the request is for a static\n // page and it is not being resumed from a postponed render and\n // it is not a dynamic RSC request then it is a revalidation\n // request.\n const isStaticGeneration = isIsr && !supportsDynamicResponse;\n // Before rendering (which initializes component tree modules), we have to\n // set the reference manifests to our global store so Server Action's\n // encryption util can access to them at the top level of the page module.\n if (serverActionsManifest && clientReferenceManifest) {\n setManifestsSingleton({\n page: srcPage,\n clientReferenceManifest,\n serverActionsManifest\n });\n }\n const method = req.method || 'GET';\n const tracer = getTracer();\n const activeSpan = tracer.getActiveScopeSpan();\n const isWrappedByNextServer = Boolean(routerServerContext == null ? void 0 : routerServerContext.isWrappedByNextServer);\n const isMinimalMode = Boolean(getRequestMeta(req, 'minimalMode'));\n const incrementalCache = getRequestMeta(req, 'incrementalCache') || await routeModule.getIncrementalCache(req, nextConfig, prerenderManifest, isMinimalMode);\n incrementalCache == null ? void 0 : incrementalCache.resetRequestCache();\n globalThis.__incrementalCache = incrementalCache;\n const context = {\n params,\n previewProps: prerenderManifest.preview,\n renderOpts: {\n experimental: {\n authInterrupts: Boolean(nextConfig.experimental.authInterrupts)\n },\n cacheComponents: Boolean(nextConfig.cacheComponents),\n supportsDynamicResponse,\n incrementalCache,\n cacheLifeProfiles: nextConfig.cacheLife,\n waitUntil: ctx.waitUntil,\n onClose: (cb)=>{\n res.on('close', cb);\n },\n onAfterTaskError: undefined,\n onInstrumentationRequestError: (error, _request, errorContext, silenceLog)=>routeModule.onRequestError(req, error, errorContext, silenceLog, routerServerContext)\n },\n sharedContext: {\n buildId\n }\n };\n const nodeNextReq = new NodeNextRequest(req);\n const nodeNextRes = new NodeNextResponse(res);\n const nextReq = NextRequestAdapter.fromNodeNextRequest(nodeNextReq, signalFromNodeResponse(res));\n try {\n let parentSpan;\n const invokeRouteModule = async (span)=>{\n return routeModule.handle(nextReq, context).finally(()=>{\n if (!span) return;\n span.setAttributes({\n 'http.status_code': res.statusCode,\n 'next.rsc': false\n });\n const rootSpanAttributes = tracer.getRootSpanAttributes();\n // We were unable to get attributes, probably OTEL is not enabled\n if (!rootSpanAttributes) {\n return;\n }\n if (rootSpanAttributes.get('next.span_type') !== BaseServerSpan.handleRequest) {\n console.warn(`Unexpected root span type '${rootSpanAttributes.get('next.span_type')}'. Please report this Next.js issue https://github.com/vercel/next.js`);\n return;\n }\n const route = rootSpanAttributes.get('next.route');\n if (route) {\n const name = `${method} ${route}`;\n span.setAttributes({\n 'next.route': route,\n 'http.route': route,\n 'next.span_name': name\n });\n span.updateName(name);\n // Propagate http.route to the parent span if one exists (e.g.\n // a platform-created HTTP span in adapter deployments).\n if (parentSpan && parentSpan !== span) {\n parentSpan.setAttribute('http.route', route);\n parentSpan.updateName(name);\n }\n } else {\n span.updateName(`${method} ${srcPage}`);\n }\n });\n };\n const handleResponse = async (currentSpan)=>{\n var _cacheEntry_value;\n const responseGenerator = async ({ previousCacheEntry })=>{\n try {\n if (!isMinimalMode && isOnDemandRevalidate && revalidateOnlyGenerated && !previousCacheEntry) {\n res.statusCode = 404;\n // on-demand revalidate always sets this header\n res.setHeader('x-nextjs-cache', 'REVALIDATED');\n res.end('This page could not be found');\n return null;\n }\n const response = await invokeRouteModule(currentSpan);\n req.fetchMetrics = context.renderOpts.fetchMetrics;\n let pendingWaitUntil = context.renderOpts.pendingWaitUntil;\n // Attempt using provided waitUntil if available\n // if it's not we fallback to sendResponse's handling\n if (pendingWaitUntil) {\n if (ctx.waitUntil) {\n ctx.waitUntil(pendingWaitUntil);\n pendingWaitUntil = undefined;\n }\n }\n const cacheTags = context.renderOpts.collectedTags;\n // If the request is for a static response, we can cache it so long\n // as it's not edge.\n if (isIsr) {\n const blob = await response.blob();\n // Copy the headers from the response.\n const headers = toNodeOutgoingHttpHeaders(response.headers);\n if (cacheTags) {\n headers[NEXT_CACHE_TAGS_HEADER] = cacheTags;\n }\n if (!headers['content-type'] && blob.type) {\n headers['content-type'] = blob.type;\n }\n const revalidate = typeof context.renderOpts.collectedRevalidate === 'undefined' || context.renderOpts.collectedRevalidate >= INFINITE_CACHE ? false : context.renderOpts.collectedRevalidate;\n const expire = typeof context.renderOpts.collectedExpire === 'undefined' || context.renderOpts.collectedExpire >= INFINITE_CACHE ? undefined : context.renderOpts.collectedExpire;\n // Create the cache entry for the response.\n const cacheEntry = {\n value: {\n kind: CachedRouteKind.APP_ROUTE,\n status: response.status,\n body: Buffer.from(await blob.arrayBuffer()),\n headers\n },\n cacheControl: {\n revalidate,\n expire\n }\n };\n return cacheEntry;\n } else {\n // send response without caching if not ISR\n await sendResponse(nodeNextReq, nodeNextRes, response, context.renderOpts.pendingWaitUntil);\n return null;\n }\n } catch (err) {\n // if this is a background revalidate we need to report\n // the request error here as it won't be bubbled\n if (previousCacheEntry == null ? void 0 : previousCacheEntry.isStale) {\n const silenceLog = false;\n await routeModule.onRequestError(req, err, {\n routerKind: 'App Router',\n routePath: srcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isStaticGeneration,\n isOnDemandRevalidate\n })\n }, silenceLog, routerServerContext);\n }\n throw err;\n }\n };\n const cacheEntry = await routeModule.handleResponse({\n req,\n nextConfig,\n cacheKey,\n routeKind: RouteKind.APP_ROUTE,\n isFallback: false,\n prerenderManifest,\n isRoutePPREnabled: false,\n isOnDemandRevalidate,\n revalidateOnlyGenerated,\n responseGenerator,\n waitUntil: ctx.waitUntil,\n isMinimalMode\n });\n // we don't create a cacheEntry for ISR\n if (!isIsr) {\n return null;\n }\n if ((cacheEntry == null ? void 0 : (_cacheEntry_value = cacheEntry.value) == null ? void 0 : _cacheEntry_value.kind) !== CachedRouteKind.APP_ROUTE) {\n var _cacheEntry_value1;\n throw Object.defineProperty(new Error(`Invariant: app-route received invalid cache entry ${cacheEntry == null ? void 0 : (_cacheEntry_value1 = cacheEntry.value) == null ? void 0 : _cacheEntry_value1.kind}`), \"__NEXT_ERROR_CODE\", {\n value: \"E701\",\n enumerable: false,\n configurable: true\n });\n }\n if (!isMinimalMode) {\n res.setHeader('x-nextjs-cache', isOnDemandRevalidate ? 'REVALIDATED' : cacheEntry.isMiss ? 'MISS' : cacheEntry.isStale ? 'STALE' : 'HIT');\n }\n // Draft mode should never be cached\n if (isDraftMode) {\n res.setHeader('Cache-Control', 'private, no-cache, no-store, max-age=0, must-revalidate');\n }\n const headers = fromNodeOutgoingHttpHeaders(cacheEntry.value.headers);\n if (!(isMinimalMode && isIsr)) {\n headers.delete(NEXT_CACHE_TAGS_HEADER);\n }\n // If cache control is already set on the response we don't\n // override it to allow users to customize it via next.config\n if (cacheEntry.cacheControl && !res.getHeader('Cache-Control') && !headers.get('Cache-Control')) {\n headers.set('Cache-Control', getCacheControlHeader(cacheEntry.cacheControl));\n }\n await sendResponse(nodeNextReq, nodeNextRes, // @ts-expect-error - Argument of type 'Buffer<ArrayBufferLike>' is not assignable to parameter of type 'BodyInit | null | undefined'.\n new Response(cacheEntry.value.body, {\n headers,\n status: cacheEntry.value.status || 200\n }));\n return null;\n };\n // TODO: activeSpan code path is for when wrapped by\n // next-server can be removed when this is no longer used\n if (isWrappedByNextServer && activeSpan) {\n await handleResponse(activeSpan);\n } else {\n parentSpan = tracer.getActiveScopeSpan();\n await tracer.withPropagatedContext(req.headers, ()=>tracer.trace(BaseServerSpan.handleRequest, {\n spanName: `${method} ${srcPage}`,\n kind: SpanKind.SERVER,\n attributes: {\n 'http.method': method,\n 'http.target': req.url\n }\n }, handleResponse), undefined, !isWrappedByNextServer);\n }\n } catch (err) {\n if (!(err instanceof NoFallbackError)) {\n const silenceLog = false;\n await routeModule.onRequestError(req, err, {\n routerKind: 'App Router',\n routePath: normalizedSrcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isStaticGeneration,\n isOnDemandRevalidate\n })\n }, silenceLog, routerServerContext);\n }\n // rethrow so that we can handle serving error page\n // If this is during static generation, throw the error again.\n if (isIsr) throw err;\n // Otherwise, send a 500 response.\n await sendResponse(nodeNextReq, nodeNextRes, new Response(null, {\n status: 500\n }));\n return null;\n }\n}\n\n//# sourceMappingURL=app-route.js.map\n"],"names":["resolveShipitAiHomeDir","process","env","SHIPIT_AI_HOME","getShipitAiHomeDir","getShipitAiDbPath","getDaemonStatePath","getDaemonLogPath","ensureShipitAiDirectory","shipitAiDir","recursive","mode","error","Error","message","String","POST","service","files","pickFiles","json","cancelled","status"],"mappings":"87CASA,IAAA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OCDA,EAAA,CAAA,CAAA,OACA,IAAA,EAAA,EAAA,CAAA,CAAA,OAEA,EAAA,EAAA,CAAA,CAAA,MAgBO,SAASI,IACd,OAVOH,AAUAD,QAVQE,GAAG,CAACC,cAAc,EAAI,CAAA,EAAA,EAAA,IAAA,AAAI,EAAC,CAAA,EAAA,EAAA,OAAA,AAAO,IAAI,aAWvD,oEDVO,SAA6B,AAApB,CAAoC,CAAE,CAAc,EAElE,IAAM,EAAqB,EAAS,OAAO,CAAC,MAAO,KAC7C,EAAW,CAAA,EAAA,EAAA,UAAA,AAAU,EAAC,UAAU,MAAM,CAAC,GAAoB,MAAM,CAAC,OAAO,KAAK,C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AAAY,EAAC,EAAa,EAAa,IAAI,SAAS,KAAM,CAC5D,OAAQ,GACZ,IACO,IACX,CACJ,mCA3TA,SAAS,EACL,MAAO,CAAA,EAAA,EAAA,UAAA,AAAW,EAAC,kBACf,uBACA,CACJ,EACJ","ignoreList":[5]}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
module.exports=[60526,(e,t,r)=>{t.exports=e.x("node:os",()=>require("node:os"))},
|
|
1
|
+
module.exports=[60526,(e,t,r)=>{t.exports=e.x("node:os",()=>require("node:os"))},18622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},32319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},56704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},24725,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/after-task-async-storage.external.js",()=>require("next/dist/server/app-render/after-task-async-storage.external.js"))},70406,(e,t,r)=>{t.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},14747,(e,t,r)=>{t.exports=e.x("path",()=>require("path"))},93695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},40060,e=>{"use strict";e.s(["resolve",0,function(e){let t=globalThis.__shipitAiContainer;if(!t)throw Error("DI container not available. Ensure the CLI bootstrap or dev-server has initialized it.");return t.resolve(e)}])},24868,(e,t,r)=>{t.exports=e.x("fs/promises",()=>require("fs/promises"))},40915,e=>{"use strict";var t=e.i(29932),r=e.i(88797),a=e.i(78439),s=e.i(21387),n=e.i(351),o=e.i(1286),i=e.i(31060),l=e.i(67760),p=e.i(13435),d=e.i(60316),u=e.i(37130),c=e.i(31516),h=e.i(63144),x=e.i(3719),m=e.i(66941),g=e.i(93695);e.i(76574);var v=e.i(45014),f=e.i(25716),R=e.i(24868),w=e.i(14747),y=e.i(60526),b=e.i(40060);let E=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",".zip",".tar",".gz",".log"]),C={".png":"image/png",".jpg":"image/jpeg",".jpeg":"image/jpeg",".gif":"image/gif",".webp":"image/webp",".svg":"image/svg+xml",".bmp":"image/bmp",".ico":"image/x-icon",".pdf":"application/pdf",".txt":"text/plain",".md":"text/markdown",".json":"application/json",".yaml":"text/yaml",".yml":"text/yaml"};async function j(e){try{let t,r,{path:a,sessionId:s}=await e.json();if(!a||!s)return f.NextResponse.json({error:"Missing required fields: path, sessionId"},{status:400});let n=(0,w.extname)(a).toLowerCase();if(!n||!E.has(n))return f.NextResponse.json({error:n?`File type "${n}" is not allowed`:"Files without an extension are not allowed"},{status:400});try{t=await (0,R.realpath)((0,w.resolve)(a))}catch{return f.NextResponse.json({error:"File not found or unreadable"},{status:404})}if(![await (0,R.realpath)(process.cwd()).catch(()=>process.cwd()),await (0,R.realpath)((0,y.homedir)()).catch(()=>(0,y.homedir)())].some(e=>t===e||t.startsWith(e+w.sep)))return f.NextResponse.json({error:"Access denied"},{status:403});try{r=await (0,R.readFile)((0,w.resolve)(a))}catch{return f.NextResponse.json({error:"File not found or unreadable"},{status:404})}if(r.length>0xa00000)return f.NextResponse.json({error:`File exceeds 10 MB limit (${(r.length/1024/1024).toFixed(1)} MB)`},{status:413});let o=(0,w.basename)(a),i=C[n]??"application/octet-stream",l=(0,b.resolve)("AttachmentStorageService").store(r,o,i,s);return f.NextResponse.json({id:l.id,name:l.name,size:Number(l.size),mimeType:l.mimeType,path:l.path,createdAt:l.createdAt})}catch(t){let e=t instanceof Error?t.message:"Upload failed";return f.NextResponse.json({error:e},{status:500})}}e.s(["POST",0,j],28686);var A=e.i(28686);let N=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/attachments/upload-from-path/route",pathname:"/api/attachments/upload-from-path",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/src/presentation/web/app/api/attachments/upload-from-path/route.ts",nextConfigOutput:"",userland:A,...{}}),{workAsyncStorage:T,workUnitAsyncStorage:q,serverHooks:S}=N;async function P(e,t,a){a.requestMeta&&(0,s.setRequestMeta)(e,a.requestMeta),N.isDev&&(0,s.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let f="/api/attachments/upload-from-path/route";f=f.replace(/\/index$/,"")||"/";let R=await N.prepare(e,t,{srcPage:f,multiZoneDraftMode:!1});if(!R)return t.statusCode=400,t.end("Bad Request"),null==a.waitUntil||a.waitUntil.call(a,Promise.resolve()),null;let{buildId:w,params:y,nextConfig:b,parsedUrl:E,isDraftMode:C,prerenderManifest:j,routerServerContext:A,isOnDemandRevalidate:T,revalidateOnlyGenerated:q,resolvedPathname:S,clientReferenceManifest:P,serverActionsManifest:_}=R,k=(0,i.normalizeAppPath)(f),O=!!(j.dynamicRoutes[k]||j.routes[S]),I=async()=>((null==A?void 0:A.render404)?await A.render404(e,t,E,!1):t.end("This page could not be found"),null);if(O&&!C){let e=!!j.routes[S],t=j.dynamicRoutes[k];if(t&&!1===t.fallback&&!e){if(b.adapterPath)return await I();throw new g.NoFallbackError}}let M=null;!O||N.isDev||C||(M="/index"===(M=S)?"/":M);let H=!0===N.isDev||!O,U=O&&!H;_&&P&&(0,o.setManifestsSingleton)({page:f,clientReferenceManifest:P,serverActionsManifest:_});let F=e.method||"GET",D=(0,n.getTracer)(),$=D.getActiveScopeSpan(),B=!!(null==A?void 0:A.isWrappedByNextServer),K=!!(0,s.getRequestMeta)(e,"minimalMode"),z=(0,s.getRequestMeta)(e,"incrementalCache")||await N.getIncrementalCache(e,b,j,K);null==z||z.resetRequestCache(),globalThis.__incrementalCache=z;let L={params:y,previewProps:j.preview,renderOpts:{experimental:{authInterrupts:!!b.experimental.authInterrupts},cacheComponents:!!b.cacheComponents,supportsDynamicResponse:H,incrementalCache:z,cacheLifeProfiles:b.cacheLife,waitUntil:a.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,a,s)=>N.onRequestError(e,t,a,s,A)},sharedContext:{buildId:w}},W=new l.NodeNextRequest(e),G=new l.NodeNextResponse(t),V=p.NextRequestAdapter.fromNodeNextRequest(W,(0,p.signalFromNodeResponse)(t));try{let s,o=async e=>N.handle(V,L).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let r=D.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==d.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${r.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let a=r.get("next.route");if(a){let t=`${F} ${a}`;e.setAttributes({"next.route":a,"http.route":a,"next.span_name":t}),e.updateName(t),s&&s!==e&&(s.setAttribute("http.route",a),s.updateName(t))}else e.updateName(`${F} ${f}`)}),i=async s=>{var n,i;let l=async({previousCacheEntry:r})=>{try{if(!K&&T&&q&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let n=await o(s);e.fetchMetrics=L.renderOpts.fetchMetrics;let i=L.renderOpts.pendingWaitUntil;i&&a.waitUntil&&(a.waitUntil(i),i=void 0);let l=L.renderOpts.collectedTags;if(!O)return await (0,c.sendResponse)(W,G,n,L.renderOpts.pendingWaitUntil),null;{let e=await n.blob(),t=(0,h.toNodeOutgoingHttpHeaders)(n.headers);l&&(t[m.NEXT_CACHE_TAGS_HEADER]=l),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==L.renderOpts.collectedRevalidate&&!(L.renderOpts.collectedRevalidate>=m.INFINITE_CACHE)&&L.renderOpts.collectedRevalidate,a=void 0===L.renderOpts.collectedExpire||L.renderOpts.collectedExpire>=m.INFINITE_CACHE?void 0:L.renderOpts.collectedExpire;return{value:{kind:v.CachedRouteKind.APP_ROUTE,status:n.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:a}}}}catch(t){throw(null==r?void 0:r.isStale)&&await N.onRequestError(e,t,{routerKind:"App Router",routePath:f,routeType:"route",revalidateReason:(0,u.getRevalidateReason)({isStaticGeneration:U,isOnDemandRevalidate:T})},!1,A),t}},p=await N.handleResponse({req:e,nextConfig:b,cacheKey:M,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:j,isRoutePPREnabled:!1,isOnDemandRevalidate:T,revalidateOnlyGenerated:q,responseGenerator:l,waitUntil:a.waitUntil,isMinimalMode:K});if(!O)return null;if((null==p||null==(n=p.value)?void 0:n.kind)!==v.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==p||null==(i=p.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});K||t.setHeader("x-nextjs-cache",T?"REVALIDATED":p.isMiss?"MISS":p.isStale?"STALE":"HIT"),C&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let d=(0,h.fromNodeOutgoingHttpHeaders)(p.value.headers);return K&&O||d.delete(m.NEXT_CACHE_TAGS_HEADER),!p.cacheControl||t.getHeader("Cache-Control")||d.get("Cache-Control")||d.set("Cache-Control",(0,x.getCacheControlHeader)(p.cacheControl)),await (0,c.sendResponse)(W,G,new Response(p.value.body,{headers:d,status:p.value.status||200})),null};B&&$?await i($):(s=D.getActiveScopeSpan(),await D.withPropagatedContext(e.headers,()=>D.trace(d.BaseServerSpan.handleRequest,{spanName:`${F} ${f}`,kind:n.SpanKind.SERVER,attributes:{"http.method":F,"http.target":e.url}},i),void 0,!B))}catch(t){if(t instanceof g.NoFallbackError||await N.onRequestError(e,t,{routerKind:"App Router",routePath:k,routeType:"route",revalidateReason:(0,u.getRevalidateReason)({isStaticGeneration:U,isOnDemandRevalidate:T})},!1,A),O)throw t;return await (0,c.sendResponse)(W,G,new Response(null,{status:500})),null}}e.s(["handler",0,P,"patchFetch",0,function(){return(0,a.patchFetch)({workAsyncStorage:T,workUnitAsyncStorage:q})},"routeModule",0,N,"serverHooks",0,S,"workAsyncStorage",0,T,"workUnitAsyncStorage",0,q],40915)}];
|
|
2
2
|
|
|
3
|
-
//# sourceMappingURL=%5Broot-of-the-server%
|
|
3
|
+
//# sourceMappingURL=%5Broot-of-the-server%5D__0l1p8bx._.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../src/presentation/web/lib/server-container.ts","../../../../../../src/presentation/web/app/api/attachments/upload-from-path/route.ts","../../../../../../node_modules/.pnpm/next%4016.2.2_%40babel%2Bcore%407.29.0_%40playwright%2Btest%401.59.1_react-dom%4019.2.4_react%4019.2.4__react%4019.2.4/node_modules/next/dist/esm/build/templates/app-route.js"],"sourcesContent":["/**\n * Server Container Accessor\n *\n * Provides a `resolve()` helper for server components and API routes to\n * obtain DI-managed instances. The tsyringe container is placed on globalThis\n * by the CLI bootstrap (`shipit-ai ui`) or the dev-server (`pnpm dev:web`).\n */\n\nimport type { DependencyContainer, InjectionToken } from 'tsyringe';\n\nconst CONTAINER_KEY = '__shipitAiContainer';\n\n/**\n * Resolve a dependency from the DI container.\n *\n * Usage in server components / API routes:\n * ```ts\n * import { resolve } from '@/lib/server-container';\n * import { ListFeaturesUseCase } from '@shipit-ai/core/application/use-cases/features/list-features.use-case';\n *\n * const features = await resolve(ListFeaturesUseCase).execute();\n * ```\n */\nexport function resolve<T>(token: InjectionToken<T>): T {\n const container = (globalThis as Record<string, unknown>)[CONTAINER_KEY] as\n | DependencyContainer\n | undefined;\n\n if (!container) {\n throw new Error(\n 'DI container not available. Ensure the CLI bootstrap or dev-server has initialized it.'\n );\n }\n\n return container.resolve(token);\n}\n","import { NextResponse } from 'next/server';\nimport { readFile, realpath } from 'fs/promises';\nimport { extname, basename, resolve as resolvePath, sep } from 'path';\nimport { homedir } from 'node:os';\nimport { resolve } from '@/lib/server-container';\nimport type { AttachmentStorageService } from '@shipit-ai/core/infrastructure/services/attachment-storage.service';\n\nconst MAX_FILE_SIZE = 10 * 1024 * 1024; // 10 MB\n\nconst ALLOWED_EXTENSIONS = new Set([\n '.png',\n '.jpg',\n '.jpeg',\n '.gif',\n '.webp',\n '.svg',\n '.bmp',\n '.ico',\n '.pdf',\n '.doc',\n '.docx',\n '.xls',\n '.xlsx',\n '.ppt',\n '.pptx',\n '.txt',\n '.md',\n '.csv',\n '.json',\n '.yaml',\n '.yml',\n '.xml',\n '.ts',\n '.tsx',\n '.js',\n '.jsx',\n '.py',\n '.rb',\n '.go',\n '.rs',\n '.java',\n '.c',\n '.cpp',\n '.h',\n '.hpp',\n '.cs',\n '.swift',\n '.kt',\n '.html',\n '.css',\n '.scss',\n '.less',\n '.sh',\n '.bash',\n '.zsh',\n '.fish',\n '.toml',\n '.ini',\n '.cfg',\n '.conf',\n '.zip',\n '.tar',\n '.gz',\n '.log',\n]);\n\nconst MIME_MAP: Record<string, string> = {\n '.png': 'image/png',\n '.jpg': 'image/jpeg',\n '.jpeg': 'image/jpeg',\n '.gif': 'image/gif',\n '.webp': 'image/webp',\n '.svg': 'image/svg+xml',\n '.bmp': 'image/bmp',\n '.ico': 'image/x-icon',\n '.pdf': 'application/pdf',\n '.txt': 'text/plain',\n '.md': 'text/markdown',\n '.json': 'application/json',\n '.yaml': 'text/yaml',\n '.yml': 'text/yaml',\n};\n\nexport async function POST(request: Request): Promise<NextResponse> {\n try {\n const body = await request.json();\n const { path, sessionId } = body as { path?: string; sessionId?: string };\n\n if (!path || !sessionId) {\n return NextResponse.json(\n { error: 'Missing required fields: path, sessionId' },\n { status: 400 }\n );\n }\n\n const ext = extname(path).toLowerCase();\n if (!ext || !ALLOWED_EXTENSIONS.has(ext)) {\n return NextResponse.json(\n {\n error: ext\n ? `File type \"${ext}\" is not allowed`\n : 'Files without an extension are not allowed',\n },\n { status: 400 }\n );\n }\n\n // Path containment: resolve symlinks then verify within allowed roots\n let physicalPath: string;\n try {\n physicalPath = await realpath(resolvePath(path));\n } catch {\n return NextResponse.json({ error: 'File not found or unreadable' }, { status: 404 });\n }\n const allowedRoots = [\n await realpath(process.cwd()).catch(() => process.cwd()),\n await realpath(homedir()).catch(() => homedir()),\n ];\n const isAllowed = allowedRoots.some(\n (root) => physicalPath === root || physicalPath.startsWith(root + sep)\n );\n if (!isAllowed) {\n return NextResponse.json({ error: 'Access denied' }, { status: 403 });\n }\n\n let buffer: Buffer;\n try {\n buffer = await readFile(resolvePath(path));\n } catch {\n return NextResponse.json({ error: 'File not found or unreadable' }, { status: 404 });\n }\n\n if (buffer.length > MAX_FILE_SIZE) {\n return NextResponse.json(\n {\n error: `File exceeds 10 MB limit (${(buffer.length / 1024 / 1024).toFixed(1)} MB)`,\n },\n { status: 413 }\n );\n }\n\n const filename = basename(path);\n const mimeType = MIME_MAP[ext] ?? 'application/octet-stream';\n\n const service = resolve<AttachmentStorageService>('AttachmentStorageService');\n const attachment = service.store(buffer, filename, mimeType, sessionId);\n\n return NextResponse.json({\n id: attachment.id,\n name: attachment.name,\n size: Number(attachment.size),\n mimeType: attachment.mimeType,\n path: attachment.path,\n createdAt: attachment.createdAt,\n });\n } catch (error: unknown) {\n const message = error instanceof Error ? error.message : 'Upload failed';\n return NextResponse.json({ error: message }, { status: 500 });\n }\n}\n","import { AppRouteRouteModule } from \"next/dist/esm/server/route-modules/app-route/module.compiled\";\nimport { RouteKind } from \"next/dist/esm/server/route-kind\";\nimport { patchFetch as _patchFetch } from \"next/dist/esm/server/lib/patch-fetch\";\nimport { addRequestMeta, getRequestMeta, setRequestMeta } from \"next/dist/esm/server/request-meta\";\nimport { getTracer, SpanKind } from \"next/dist/esm/server/lib/trace/tracer\";\nimport { setManifestsSingleton } from \"next/dist/esm/server/app-render/manifests-singleton\";\nimport { normalizeAppPath } from \"next/dist/esm/shared/lib/router/utils/app-paths\";\nimport { NodeNextRequest, NodeNextResponse } from \"next/dist/esm/server/base-http/node\";\nimport { NextRequestAdapter, signalFromNodeResponse } from \"next/dist/esm/server/web/spec-extension/adapters/next-request\";\nimport { BaseServerSpan } from \"next/dist/esm/server/lib/trace/constants\";\nimport { getRevalidateReason } from \"next/dist/esm/server/instrumentation/utils\";\nimport { sendResponse } from \"next/dist/esm/server/send-response\";\nimport { fromNodeOutgoingHttpHeaders, toNodeOutgoingHttpHeaders } from \"next/dist/esm/server/web/utils\";\nimport { getCacheControlHeader } from \"next/dist/esm/server/lib/cache-control\";\nimport { INFINITE_CACHE, NEXT_CACHE_TAGS_HEADER } from \"next/dist/esm/lib/constants\";\nimport { NoFallbackError } from \"next/dist/esm/shared/lib/no-fallback-error.external\";\nimport { CachedRouteKind } from \"next/dist/esm/server/response-cache\";\nimport * as userland from \"INNER_APP_ROUTE\";\n// We inject the nextConfigOutput here so that we can use them in the route\n// module.\nconst nextConfigOutput = \"\"\nconst routeModule = new AppRouteRouteModule({\n definition: {\n kind: RouteKind.APP_ROUTE,\n page: \"/api/attachments/upload-from-path/route\",\n pathname: \"/api/attachments/upload-from-path\",\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/attachments/upload-from-path/route.ts\",\n nextConfigOutput,\n // The static import is used for initialization (methods, dynamic, etc.).\n userland: userland,\n // In Turbopack dev mode, also provide a getter that calls require() on every\n // request. This re-reads from devModuleCache so HMR updates are picked up,\n // and the async wrapper unwraps async-module Promises (ESM-only\n // serverExternalPackages) automatically.\n ...process.env.TURBOPACK && process.env.__NEXT_DEV_SERVER ? {\n getUserland: ()=>import(\"INNER_APP_ROUTE\")\n } : {}\n});\n// Pull out the exports that we need to expose from the module. This should\n// be eliminated when we've moved the other routes to the new format. These\n// are used to hook into the route.\nconst { workAsyncStorage, workUnitAsyncStorage, serverHooks } = routeModule;\nfunction patchFetch() {\n return _patchFetch({\n workAsyncStorage,\n workUnitAsyncStorage\n });\n}\nexport { routeModule, workAsyncStorage, workUnitAsyncStorage, serverHooks, patchFetch, };\nexport async function handler(req, res, ctx) {\n if (ctx.requestMeta) {\n setRequestMeta(req, ctx.requestMeta);\n }\n if (routeModule.isDev) {\n addRequestMeta(req, 'devRequestTimingInternalsEnd', process.hrtime.bigint());\n }\n let srcPage = \"/api/attachments/upload-from-path/route\";\n // turbopack doesn't normalize `/index` in the page name\n // so we need to to process dynamic routes properly\n // TODO: fix turbopack providing differing value from webpack\n if (process.env.TURBOPACK) {\n srcPage = srcPage.replace(/\\/index$/, '') || '/';\n } else if (srcPage === '/index') {\n // we always normalize /index specifically\n srcPage = '/';\n }\n const multiZoneDraftMode = process.env.__NEXT_MULTI_ZONE_DRAFT_MODE;\n const prepareResult = await routeModule.prepare(req, res, {\n srcPage,\n multiZoneDraftMode\n });\n if (!prepareResult) {\n res.statusCode = 400;\n res.end('Bad Request');\n ctx.waitUntil == null ? void 0 : ctx.waitUntil.call(ctx, Promise.resolve());\n return null;\n }\n const { buildId, params, nextConfig, parsedUrl, isDraftMode, prerenderManifest, routerServerContext, isOnDemandRevalidate, revalidateOnlyGenerated, resolvedPathname, clientReferenceManifest, serverActionsManifest } = prepareResult;\n const normalizedSrcPage = normalizeAppPath(srcPage);\n let isIsr = Boolean(prerenderManifest.dynamicRoutes[normalizedSrcPage] || prerenderManifest.routes[resolvedPathname]);\n const render404 = async ()=>{\n // TODO: should route-module itself handle rendering the 404\n if (routerServerContext == null ? void 0 : routerServerContext.render404) {\n await routerServerContext.render404(req, res, parsedUrl, false);\n } else {\n res.end('This page could not be found');\n }\n return null;\n };\n if (isIsr && !isDraftMode) {\n const isPrerendered = Boolean(prerenderManifest.routes[resolvedPathname]);\n const prerenderInfo = prerenderManifest.dynamicRoutes[normalizedSrcPage];\n if (prerenderInfo) {\n if (prerenderInfo.fallback === false && !isPrerendered) {\n if (nextConfig.adapterPath) {\n return await render404();\n }\n throw new NoFallbackError();\n }\n }\n }\n let cacheKey = null;\n if (isIsr && !routeModule.isDev && !isDraftMode) {\n cacheKey = resolvedPathname;\n // ensure /index and / is normalized to one key\n cacheKey = cacheKey === '/index' ? '/' : cacheKey;\n }\n const supportsDynamicResponse = // If we're in development, we always support dynamic HTML\n routeModule.isDev === true || // If this is not SSG or does not have static paths, then it supports\n // dynamic HTML.\n !isIsr;\n // This is a revalidation request if the request is for a static\n // page and it is not being resumed from a postponed render and\n // it is not a dynamic RSC request then it is a revalidation\n // request.\n const isStaticGeneration = isIsr && !supportsDynamicResponse;\n // Before rendering (which initializes component tree modules), we have to\n // set the reference manifests to our global store so Server Action's\n // encryption util can access to them at the top level of the page module.\n if (serverActionsManifest && clientReferenceManifest) {\n setManifestsSingleton({\n page: srcPage,\n clientReferenceManifest,\n serverActionsManifest\n });\n }\n const method = req.method || 'GET';\n const tracer = getTracer();\n const activeSpan = tracer.getActiveScopeSpan();\n const isWrappedByNextServer = Boolean(routerServerContext == null ? void 0 : routerServerContext.isWrappedByNextServer);\n const isMinimalMode = Boolean(getRequestMeta(req, 'minimalMode'));\n const incrementalCache = getRequestMeta(req, 'incrementalCache') || await routeModule.getIncrementalCache(req, nextConfig, prerenderManifest, isMinimalMode);\n incrementalCache == null ? void 0 : incrementalCache.resetRequestCache();\n globalThis.__incrementalCache = incrementalCache;\n const context = {\n params,\n previewProps: prerenderManifest.preview,\n renderOpts: {\n experimental: {\n authInterrupts: Boolean(nextConfig.experimental.authInterrupts)\n },\n cacheComponents: Boolean(nextConfig.cacheComponents),\n supportsDynamicResponse,\n incrementalCache,\n cacheLifeProfiles: nextConfig.cacheLife,\n waitUntil: ctx.waitUntil,\n onClose: (cb)=>{\n res.on('close', cb);\n },\n onAfterTaskError: undefined,\n onInstrumentationRequestError: (error, _request, errorContext, silenceLog)=>routeModule.onRequestError(req, error, errorContext, silenceLog, routerServerContext)\n },\n sharedContext: {\n buildId\n }\n };\n const nodeNextReq = new NodeNextRequest(req);\n const nodeNextRes = new NodeNextResponse(res);\n const nextReq = NextRequestAdapter.fromNodeNextRequest(nodeNextReq, signalFromNodeResponse(res));\n try {\n let parentSpan;\n const invokeRouteModule = async (span)=>{\n return routeModule.handle(nextReq, context).finally(()=>{\n if (!span) return;\n span.setAttributes({\n 'http.status_code': res.statusCode,\n 'next.rsc': false\n });\n const rootSpanAttributes = tracer.getRootSpanAttributes();\n // We were unable to get attributes, probably OTEL is not enabled\n if (!rootSpanAttributes) {\n return;\n }\n if (rootSpanAttributes.get('next.span_type') !== BaseServerSpan.handleRequest) {\n console.warn(`Unexpected root span type '${rootSpanAttributes.get('next.span_type')}'. Please report this Next.js issue https://github.com/vercel/next.js`);\n return;\n }\n const route = rootSpanAttributes.get('next.route');\n if (route) {\n const name = `${method} ${route}`;\n span.setAttributes({\n 'next.route': route,\n 'http.route': route,\n 'next.span_name': name\n });\n span.updateName(name);\n // Propagate http.route to the parent span if one exists (e.g.\n // a platform-created HTTP span in adapter deployments).\n if (parentSpan && parentSpan !== span) {\n parentSpan.setAttribute('http.route', route);\n parentSpan.updateName(name);\n }\n } else {\n span.updateName(`${method} ${srcPage}`);\n }\n });\n };\n const handleResponse = async (currentSpan)=>{\n var _cacheEntry_value;\n const responseGenerator = async ({ previousCacheEntry })=>{\n try {\n if (!isMinimalMode && isOnDemandRevalidate && revalidateOnlyGenerated && !previousCacheEntry) {\n res.statusCode = 404;\n // on-demand revalidate always sets this header\n res.setHeader('x-nextjs-cache', 'REVALIDATED');\n res.end('This page could not be found');\n return null;\n }\n const response = await invokeRouteModule(currentSpan);\n req.fetchMetrics = context.renderOpts.fetchMetrics;\n let pendingWaitUntil = context.renderOpts.pendingWaitUntil;\n // Attempt using provided waitUntil if available\n // if it's not we fallback to sendResponse's handling\n if (pendingWaitUntil) {\n if (ctx.waitUntil) {\n ctx.waitUntil(pendingWaitUntil);\n pendingWaitUntil = undefined;\n }\n }\n const cacheTags = context.renderOpts.collectedTags;\n // If the request is for a static response, we can cache it so long\n // as it's not edge.\n if (isIsr) {\n const blob = await response.blob();\n // Copy the headers from the response.\n const headers = toNodeOutgoingHttpHeaders(response.headers);\n if (cacheTags) {\n headers[NEXT_CACHE_TAGS_HEADER] = cacheTags;\n }\n if (!headers['content-type'] && blob.type) {\n headers['content-type'] = blob.type;\n }\n const revalidate = typeof context.renderOpts.collectedRevalidate === 'undefined' || context.renderOpts.collectedRevalidate >= INFINITE_CACHE ? false : context.renderOpts.collectedRevalidate;\n const expire = typeof context.renderOpts.collectedExpire === 'undefined' || context.renderOpts.collectedExpire >= INFINITE_CACHE ? undefined : context.renderOpts.collectedExpire;\n // Create the cache entry for the response.\n const cacheEntry = {\n value: {\n kind: CachedRouteKind.APP_ROUTE,\n status: response.status,\n body: Buffer.from(await blob.arrayBuffer()),\n headers\n },\n cacheControl: {\n revalidate,\n expire\n }\n };\n return cacheEntry;\n } else {\n // send response without caching if not ISR\n await sendResponse(nodeNextReq, nodeNextRes, response, context.renderOpts.pendingWaitUntil);\n return null;\n }\n } catch (err) {\n // if this is a background revalidate we need to report\n // the request error here as it won't be bubbled\n if (previousCacheEntry == null ? void 0 : previousCacheEntry.isStale) {\n const silenceLog = false;\n await routeModule.onRequestError(req, err, {\n routerKind: 'App Router',\n routePath: srcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isStaticGeneration,\n isOnDemandRevalidate\n })\n }, silenceLog, routerServerContext);\n }\n throw err;\n }\n };\n const cacheEntry = await routeModule.handleResponse({\n req,\n nextConfig,\n cacheKey,\n routeKind: RouteKind.APP_ROUTE,\n isFallback: false,\n prerenderManifest,\n isRoutePPREnabled: false,\n isOnDemandRevalidate,\n revalidateOnlyGenerated,\n responseGenerator,\n waitUntil: ctx.waitUntil,\n isMinimalMode\n });\n // we don't create a cacheEntry for ISR\n if (!isIsr) {\n return null;\n }\n if ((cacheEntry == null ? void 0 : (_cacheEntry_value = cacheEntry.value) == null ? void 0 : _cacheEntry_value.kind) !== CachedRouteKind.APP_ROUTE) {\n var _cacheEntry_value1;\n throw Object.defineProperty(new Error(`Invariant: app-route received invalid cache entry ${cacheEntry == null ? void 0 : (_cacheEntry_value1 = cacheEntry.value) == null ? void 0 : _cacheEntry_value1.kind}`), \"__NEXT_ERROR_CODE\", {\n value: \"E701\",\n enumerable: false,\n configurable: true\n });\n }\n if (!isMinimalMode) {\n res.setHeader('x-nextjs-cache', isOnDemandRevalidate ? 'REVALIDATED' : cacheEntry.isMiss ? 'MISS' : cacheEntry.isStale ? 'STALE' : 'HIT');\n }\n // Draft mode should never be cached\n if (isDraftMode) {\n res.setHeader('Cache-Control', 'private, no-cache, no-store, max-age=0, must-revalidate');\n }\n const headers = fromNodeOutgoingHttpHeaders(cacheEntry.value.headers);\n if (!(isMinimalMode && isIsr)) {\n headers.delete(NEXT_CACHE_TAGS_HEADER);\n }\n // If cache control is already set on the response we don't\n // override it to allow users to customize it via next.config\n if (cacheEntry.cacheControl && !res.getHeader('Cache-Control') && !headers.get('Cache-Control')) {\n headers.set('Cache-Control', getCacheControlHeader(cacheEntry.cacheControl));\n }\n await sendResponse(nodeNextReq, nodeNextRes, // @ts-expect-error - Argument of type 'Buffer<ArrayBufferLike>' is not assignable to parameter of type 'BodyInit | null | undefined'.\n new Response(cacheEntry.value.body, {\n headers,\n status: cacheEntry.value.status || 200\n }));\n return null;\n };\n // TODO: activeSpan code path is for when wrapped by\n // next-server can be removed when this is no longer used\n if (isWrappedByNextServer && activeSpan) {\n await handleResponse(activeSpan);\n } else {\n parentSpan = tracer.getActiveScopeSpan();\n await tracer.withPropagatedContext(req.headers, ()=>tracer.trace(BaseServerSpan.handleRequest, {\n spanName: `${method} ${srcPage}`,\n kind: SpanKind.SERVER,\n attributes: {\n 'http.method': method,\n 'http.target': req.url\n }\n }, handleResponse), undefined, !isWrappedByNextServer);\n }\n } catch (err) {\n if (!(err instanceof NoFallbackError)) {\n const silenceLog = false;\n await routeModule.onRequestError(req, err, {\n routerKind: 'App Router',\n routePath: normalizedSrcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isStaticGeneration,\n isOnDemandRevalidate\n })\n }, silenceLog, routerServerContext);\n }\n // rethrow so that we can handle serving error page\n // If this is during static generation, throw the error again.\n if (isIsr) throw err;\n // Otherwise, send a 500 response.\n await sendResponse(nodeNextReq, nodeNextRes, new Response(null, {\n status: 500\n }));\n return null;\n }\n}\n\n//# sourceMappingURL=app-route.js.map\n"],"names":["CONTAINER_KEY","resolve","token","container","globalThis","Error","MAX_FILE_SIZE","ALLOWED_EXTENSIONS","Set","buffer","mimeType","ext","MIME_MAP","POST","request","body","json","path","sessionId","error","status","toLowerCase","has","physicalPath","allowedRoots","process","cwd","catch","isAllowed","some","root","startsWith","length","toFixed","filename","service","attachment","store","id","name","size","Number","createdAt","message"],"mappings":"gRAuBO,SAAoBE,AAAXD,CAAmC,EACjD,IAAME,EAAaC,UAAsC,CAACJ,AAdtC,mBAcoD,CAIxE,GAAI,CAACG,EACH,MAAM,AAAIE,GADI,GAEZ,0FAIJ,OAAOF,EAAUF,OAAO,CAACC,EAC3B,q9BEnCA,IAAA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,KACA,EAAA,EAAA,CAAA,CAAA,MACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,E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B,GACtC,MAAM,EAAO,qBAAqB,CAAC,EAAI,OAAO,CAAE,IAAI,EAAO,KAAK,CAAC,EAAA,cAAc,CAAC,aAAa,CAAE,CACvF,SAAU,CAAA,EAAG,EAAO,CAAC,EAAE,EAAA,CAAS,CAChC,KAAM,EAAA,QAAQ,CAAC,MAAM,CACrB,WAAY,CACR,cAAe,EACf,cAAe,EAAI,GAAG,AAC1B,CACJ,EAAG,QAAiB,EAAW,CAAC,GAE5C,CAAE,MAAO,EAAK,CAeV,GAdM,aAAe,EAAA,eAAe,EAEhC,CAFmC,KAE7B,EAAY,cAAc,CAAC,EAAK,EAAK,CACvC,WAAY,aACZ,UAAW,EACX,UAAW,QACX,iBAAkB,CAAA,EAAA,EAAA,mBAAA,AAAmB,EAAC,oBAClC,uBACA,CACJ,EACJ,GAAG,AATgB,EASJ,GAIf,EAAO,MAAM,EAKjB,OAHA,MAAM,CAAA,EAAA,EAAA,YAAA,AAAY,EAAC,EAAa,EAAa,IAAI,SAAS,KAAM,CAC5D,OAAQ,GACZ,IACO,IACX,CACJ,mCA3TA,SAAS,EACL,MAAOF,CAAAA,EAAAA,EAAAA,UAAAA,AAAW,EAAC,kBACf,uBACA,CACJ,EACJ","ignoreList":[2]}
|
|
1
|
+
{"version":3,"sources":["../../../../../../src/presentation/web/lib/server-container.ts","../../../../../../src/presentation/web/app/api/attachments/upload-from-path/route.ts","../../../../../../node_modules/.pnpm/next%4016.2.2_%40babel%2Bcore%407.29.0_%40playwright%2Btest%401.59.1_react-dom%4019.2.4_react%4019.2.4__react%4019.2.4/node_modules/next/dist/esm/build/templates/app-route.js"],"sourcesContent":["/**\n * Server Container Accessor\n *\n * Provides a `resolve()` helper for server components and API routes to\n * obtain DI-managed instances. The tsyringe container is placed on globalThis\n * by the CLI bootstrap (`shipit-ai ui`) or the dev-server (`pnpm dev:web`).\n */\n\nimport type { DependencyContainer, InjectionToken } from 'tsyringe';\n\nconst CONTAINER_KEY = '__shipitAiContainer';\n\n/**\n * Resolve a dependency from the DI container.\n *\n * Usage in server components / API routes:\n * ```ts\n * import { resolve } from '@/lib/server-container';\n * import { ListFeaturesUseCase } from '@shipit-ai/core/application/use-cases/features/list-features.use-case';\n *\n * const features = await resolve(ListFeaturesUseCase).execute();\n * ```\n */\nexport function resolve<T>(token: InjectionToken<T>): T {\n const container = (globalThis as Record<string, unknown>)[CONTAINER_KEY] as\n | DependencyContainer\n | undefined;\n\n if (!container) {\n throw new Error(\n 'DI container not available. Ensure the CLI bootstrap or dev-server has initialized it.'\n );\n }\n\n return container.resolve(token);\n}\n","import { NextResponse } from 'next/server';\nimport { readFile, realpath } from 'fs/promises';\nimport { extname, basename, resolve as resolvePath, sep } from 'path';\nimport { homedir } from 'node:os';\nimport { resolve } from '@/lib/server-container';\nimport type { AttachmentStorageService } from '@shipit-ai/core/infrastructure/services/attachment-storage.service';\n\nconst MAX_FILE_SIZE = 10 * 1024 * 1024; // 10 MB\n\nconst ALLOWED_EXTENSIONS = new Set([\n '.png',\n '.jpg',\n '.jpeg',\n '.gif',\n '.webp',\n '.svg',\n '.bmp',\n '.ico',\n '.pdf',\n '.doc',\n '.docx',\n '.xls',\n '.xlsx',\n '.ppt',\n '.pptx',\n '.txt',\n '.md',\n '.csv',\n '.json',\n '.yaml',\n '.yml',\n '.xml',\n '.ts',\n '.tsx',\n '.js',\n '.jsx',\n '.py',\n '.rb',\n '.go',\n '.rs',\n '.java',\n '.c',\n '.cpp',\n '.h',\n '.hpp',\n '.cs',\n '.swift',\n '.kt',\n '.html',\n '.css',\n '.scss',\n '.less',\n '.sh',\n '.bash',\n '.zsh',\n '.fish',\n '.toml',\n '.ini',\n '.cfg',\n '.conf',\n '.zip',\n '.tar',\n '.gz',\n '.log',\n]);\n\nconst MIME_MAP: Record<string, string> = {\n '.png': 'image/png',\n '.jpg': 'image/jpeg',\n '.jpeg': 'image/jpeg',\n '.gif': 'image/gif',\n '.webp': 'image/webp',\n '.svg': 'image/svg+xml',\n '.bmp': 'image/bmp',\n '.ico': 'image/x-icon',\n '.pdf': 'application/pdf',\n '.txt': 'text/plain',\n '.md': 'text/markdown',\n '.json': 'application/json',\n '.yaml': 'text/yaml',\n '.yml': 'text/yaml',\n};\n\nexport async function POST(request: Request): Promise<NextResponse> {\n try {\n const body = await request.json();\n const { path, sessionId } = body as { path?: string; sessionId?: string };\n\n if (!path || !sessionId) {\n return NextResponse.json(\n { error: 'Missing required fields: path, sessionId' },\n { status: 400 }\n );\n }\n\n const ext = extname(path).toLowerCase();\n if (!ext || !ALLOWED_EXTENSIONS.has(ext)) {\n return NextResponse.json(\n {\n error: ext\n ? `File type \"${ext}\" is not allowed`\n : 'Files without an extension are not allowed',\n },\n { status: 400 }\n );\n }\n\n // Path containment: resolve symlinks then verify within allowed roots\n let physicalPath: string;\n try {\n physicalPath = await realpath(resolvePath(path));\n } catch {\n return NextResponse.json({ error: 'File not found or unreadable' }, { status: 404 });\n }\n const allowedRoots = [\n await realpath(process.cwd()).catch(() => process.cwd()),\n await realpath(homedir()).catch(() => homedir()),\n ];\n const isAllowed = allowedRoots.some(\n (root) => physicalPath === root || physicalPath.startsWith(root + sep)\n );\n if (!isAllowed) {\n return NextResponse.json({ error: 'Access denied' }, { status: 403 });\n }\n\n let buffer: Buffer;\n try {\n buffer = await readFile(resolvePath(path));\n } catch {\n return NextResponse.json({ error: 'File not found or unreadable' }, { status: 404 });\n }\n\n if (buffer.length > MAX_FILE_SIZE) {\n return NextResponse.json(\n {\n error: `File exceeds 10 MB limit (${(buffer.length / 1024 / 1024).toFixed(1)} MB)`,\n },\n { status: 413 }\n );\n }\n\n const filename = basename(path);\n const mimeType = MIME_MAP[ext] ?? 'application/octet-stream';\n\n const service = resolve<AttachmentStorageService>('AttachmentStorageService');\n const attachment = service.store(buffer, filename, mimeType, sessionId);\n\n return NextResponse.json({\n id: attachment.id,\n name: attachment.name,\n size: Number(attachment.size),\n mimeType: attachment.mimeType,\n path: attachment.path,\n createdAt: attachment.createdAt,\n });\n } catch (error: unknown) {\n const message = error instanceof Error ? error.message : 'Upload failed';\n return NextResponse.json({ error: message }, { status: 500 });\n }\n}\n","import { AppRouteRouteModule } from \"next/dist/esm/server/route-modules/app-route/module.compiled\";\nimport { RouteKind } from \"next/dist/esm/server/route-kind\";\nimport { patchFetch as _patchFetch } from \"next/dist/esm/server/lib/patch-fetch\";\nimport { addRequestMeta, getRequestMeta, setRequestMeta } from \"next/dist/esm/server/request-meta\";\nimport { getTracer, SpanKind } from \"next/dist/esm/server/lib/trace/tracer\";\nimport { setManifestsSingleton } from \"next/dist/esm/server/app-render/manifests-singleton\";\nimport { normalizeAppPath } from \"next/dist/esm/shared/lib/router/utils/app-paths\";\nimport { NodeNextRequest, NodeNextResponse } from \"next/dist/esm/server/base-http/node\";\nimport { NextRequestAdapter, signalFromNodeResponse } from \"next/dist/esm/server/web/spec-extension/adapters/next-request\";\nimport { BaseServerSpan } from \"next/dist/esm/server/lib/trace/constants\";\nimport { getRevalidateReason } from \"next/dist/esm/server/instrumentation/utils\";\nimport { sendResponse } from \"next/dist/esm/server/send-response\";\nimport { fromNodeOutgoingHttpHeaders, toNodeOutgoingHttpHeaders } from \"next/dist/esm/server/web/utils\";\nimport { getCacheControlHeader } from \"next/dist/esm/server/lib/cache-control\";\nimport { INFINITE_CACHE, NEXT_CACHE_TAGS_HEADER } from \"next/dist/esm/lib/constants\";\nimport { NoFallbackError } from \"next/dist/esm/shared/lib/no-fallback-error.external\";\nimport { CachedRouteKind } from \"next/dist/esm/server/response-cache\";\nimport * as userland from \"INNER_APP_ROUTE\";\n// We inject the nextConfigOutput here so that we can use them in the route\n// module.\nconst nextConfigOutput = \"\"\nconst routeModule = new AppRouteRouteModule({\n definition: {\n kind: RouteKind.APP_ROUTE,\n page: \"/api/attachments/upload-from-path/route\",\n pathname: \"/api/attachments/upload-from-path\",\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/attachments/upload-from-path/route.ts\",\n nextConfigOutput,\n // The static import is used for initialization (methods, dynamic, etc.).\n userland: userland,\n // In Turbopack dev mode, also provide a getter that calls require() on every\n // request. This re-reads from devModuleCache so HMR updates are picked up,\n // and the async wrapper unwraps async-module Promises (ESM-only\n // serverExternalPackages) automatically.\n ...process.env.TURBOPACK && process.env.__NEXT_DEV_SERVER ? {\n getUserland: ()=>import(\"INNER_APP_ROUTE\")\n } : {}\n});\n// Pull out the exports that we need to expose from the module. This should\n// be eliminated when we've moved the other routes to the new format. These\n// are used to hook into the route.\nconst { workAsyncStorage, workUnitAsyncStorage, serverHooks } = routeModule;\nfunction patchFetch() {\n return _patchFetch({\n workAsyncStorage,\n workUnitAsyncStorage\n });\n}\nexport { routeModule, workAsyncStorage, workUnitAsyncStorage, serverHooks, patchFetch, };\nexport async function handler(req, res, ctx) {\n if (ctx.requestMeta) {\n setRequestMeta(req, ctx.requestMeta);\n }\n if (routeModule.isDev) {\n addRequestMeta(req, 'devRequestTimingInternalsEnd', process.hrtime.bigint());\n }\n let srcPage = \"/api/attachments/upload-from-path/route\";\n // turbopack doesn't normalize `/index` in the page name\n // so we need to to process dynamic routes properly\n // TODO: fix turbopack providing differing value from webpack\n if (process.env.TURBOPACK) {\n srcPage = srcPage.replace(/\\/index$/, '') || '/';\n } else if (srcPage === '/index') {\n // we always normalize /index specifically\n srcPage = '/';\n }\n const multiZoneDraftMode = process.env.__NEXT_MULTI_ZONE_DRAFT_MODE;\n const prepareResult = await routeModule.prepare(req, res, {\n srcPage,\n multiZoneDraftMode\n });\n if (!prepareResult) {\n res.statusCode = 400;\n res.end('Bad Request');\n ctx.waitUntil == null ? void 0 : ctx.waitUntil.call(ctx, Promise.resolve());\n return null;\n }\n const { buildId, params, nextConfig, parsedUrl, isDraftMode, prerenderManifest, routerServerContext, isOnDemandRevalidate, revalidateOnlyGenerated, resolvedPathname, clientReferenceManifest, serverActionsManifest } = prepareResult;\n const normalizedSrcPage = normalizeAppPath(srcPage);\n let isIsr = Boolean(prerenderManifest.dynamicRoutes[normalizedSrcPage] || prerenderManifest.routes[resolvedPathname]);\n const render404 = async ()=>{\n // TODO: should route-module itself handle rendering the 404\n if (routerServerContext == null ? void 0 : routerServerContext.render404) {\n await routerServerContext.render404(req, res, parsedUrl, false);\n } else {\n res.end('This page could not be found');\n }\n return null;\n };\n if (isIsr && !isDraftMode) {\n const isPrerendered = Boolean(prerenderManifest.routes[resolvedPathname]);\n const prerenderInfo = prerenderManifest.dynamicRoutes[normalizedSrcPage];\n if (prerenderInfo) {\n if (prerenderInfo.fallback === false && !isPrerendered) {\n if (nextConfig.adapterPath) {\n return await render404();\n }\n throw new NoFallbackError();\n }\n }\n }\n let cacheKey = null;\n if (isIsr && !routeModule.isDev && !isDraftMode) {\n cacheKey = resolvedPathname;\n // ensure /index and / is normalized to one key\n cacheKey = cacheKey === '/index' ? '/' : cacheKey;\n }\n const supportsDynamicResponse = // If we're in development, we always support dynamic HTML\n routeModule.isDev === true || // If this is not SSG or does not have static paths, then it supports\n // dynamic HTML.\n !isIsr;\n // This is a revalidation request if the request is for a static\n // page and it is not being resumed from a postponed render and\n // it is not a dynamic RSC request then it is a revalidation\n // request.\n const isStaticGeneration = isIsr && !supportsDynamicResponse;\n // Before rendering (which initializes component tree modules), we have to\n // set the reference manifests to our global store so Server Action's\n // encryption util can access to them at the top level of the page module.\n if (serverActionsManifest && clientReferenceManifest) {\n setManifestsSingleton({\n page: srcPage,\n clientReferenceManifest,\n serverActionsManifest\n });\n }\n const method = req.method || 'GET';\n const tracer = getTracer();\n const activeSpan = tracer.getActiveScopeSpan();\n const isWrappedByNextServer = Boolean(routerServerContext == null ? void 0 : routerServerContext.isWrappedByNextServer);\n const isMinimalMode = Boolean(getRequestMeta(req, 'minimalMode'));\n const incrementalCache = getRequestMeta(req, 'incrementalCache') || await routeModule.getIncrementalCache(req, nextConfig, prerenderManifest, isMinimalMode);\n incrementalCache == null ? void 0 : incrementalCache.resetRequestCache();\n globalThis.__incrementalCache = incrementalCache;\n const context = {\n params,\n previewProps: prerenderManifest.preview,\n renderOpts: {\n experimental: {\n authInterrupts: Boolean(nextConfig.experimental.authInterrupts)\n },\n cacheComponents: Boolean(nextConfig.cacheComponents),\n supportsDynamicResponse,\n incrementalCache,\n cacheLifeProfiles: nextConfig.cacheLife,\n waitUntil: ctx.waitUntil,\n onClose: (cb)=>{\n res.on('close', cb);\n },\n onAfterTaskError: undefined,\n onInstrumentationRequestError: (error, _request, errorContext, silenceLog)=>routeModule.onRequestError(req, error, errorContext, silenceLog, routerServerContext)\n },\n sharedContext: {\n buildId\n }\n };\n const nodeNextReq = new NodeNextRequest(req);\n const nodeNextRes = new NodeNextResponse(res);\n const nextReq = NextRequestAdapter.fromNodeNextRequest(nodeNextReq, signalFromNodeResponse(res));\n try {\n let parentSpan;\n const invokeRouteModule = async (span)=>{\n return routeModule.handle(nextReq, context).finally(()=>{\n if (!span) return;\n span.setAttributes({\n 'http.status_code': res.statusCode,\n 'next.rsc': false\n });\n const rootSpanAttributes = tracer.getRootSpanAttributes();\n // We were unable to get attributes, probably OTEL is not enabled\n if (!rootSpanAttributes) {\n return;\n }\n if (rootSpanAttributes.get('next.span_type') !== BaseServerSpan.handleRequest) {\n console.warn(`Unexpected root span type '${rootSpanAttributes.get('next.span_type')}'. Please report this Next.js issue https://github.com/vercel/next.js`);\n return;\n }\n const route = rootSpanAttributes.get('next.route');\n if (route) {\n const name = `${method} ${route}`;\n span.setAttributes({\n 'next.route': route,\n 'http.route': route,\n 'next.span_name': name\n });\n span.updateName(name);\n // Propagate http.route to the parent span if one exists (e.g.\n // a platform-created HTTP span in adapter deployments).\n if (parentSpan && parentSpan !== span) {\n parentSpan.setAttribute('http.route', route);\n parentSpan.updateName(name);\n }\n } else {\n span.updateName(`${method} ${srcPage}`);\n }\n });\n };\n const handleResponse = async (currentSpan)=>{\n var _cacheEntry_value;\n const responseGenerator = async ({ previousCacheEntry })=>{\n try {\n if (!isMinimalMode && isOnDemandRevalidate && revalidateOnlyGenerated && !previousCacheEntry) {\n res.statusCode = 404;\n // on-demand revalidate always sets this header\n res.setHeader('x-nextjs-cache', 'REVALIDATED');\n res.end('This page could not be found');\n return null;\n }\n const response = await invokeRouteModule(currentSpan);\n req.fetchMetrics = context.renderOpts.fetchMetrics;\n let pendingWaitUntil = context.renderOpts.pendingWaitUntil;\n // Attempt using provided waitUntil if available\n // if it's not we fallback to sendResponse's handling\n if (pendingWaitUntil) {\n if (ctx.waitUntil) {\n ctx.waitUntil(pendingWaitUntil);\n pendingWaitUntil = undefined;\n }\n }\n const cacheTags = context.renderOpts.collectedTags;\n // If the request is for a static response, we can cache it so long\n // as it's not edge.\n if (isIsr) {\n const blob = await response.blob();\n // Copy the headers from the response.\n const headers = toNodeOutgoingHttpHeaders(response.headers);\n if (cacheTags) {\n headers[NEXT_CACHE_TAGS_HEADER] = cacheTags;\n }\n if (!headers['content-type'] && blob.type) {\n headers['content-type'] = blob.type;\n }\n const revalidate = typeof context.renderOpts.collectedRevalidate === 'undefined' || context.renderOpts.collectedRevalidate >= INFINITE_CACHE ? false : context.renderOpts.collectedRevalidate;\n const expire = typeof context.renderOpts.collectedExpire === 'undefined' || context.renderOpts.collectedExpire >= INFINITE_CACHE ? undefined : context.renderOpts.collectedExpire;\n // Create the cache entry for the response.\n const cacheEntry = {\n value: {\n kind: CachedRouteKind.APP_ROUTE,\n status: response.status,\n body: Buffer.from(await blob.arrayBuffer()),\n headers\n },\n cacheControl: {\n revalidate,\n expire\n }\n };\n return cacheEntry;\n } else {\n // send response without caching if not ISR\n await sendResponse(nodeNextReq, nodeNextRes, response, context.renderOpts.pendingWaitUntil);\n return null;\n }\n } catch (err) {\n // if this is a background revalidate we need to report\n // the request error here as it won't be bubbled\n if (previousCacheEntry == null ? void 0 : previousCacheEntry.isStale) {\n const silenceLog = false;\n await routeModule.onRequestError(req, err, {\n routerKind: 'App Router',\n routePath: srcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isStaticGeneration,\n isOnDemandRevalidate\n })\n }, silenceLog, routerServerContext);\n }\n throw err;\n }\n };\n const cacheEntry = await routeModule.handleResponse({\n req,\n nextConfig,\n cacheKey,\n routeKind: RouteKind.APP_ROUTE,\n isFallback: false,\n prerenderManifest,\n isRoutePPREnabled: false,\n isOnDemandRevalidate,\n revalidateOnlyGenerated,\n responseGenerator,\n waitUntil: ctx.waitUntil,\n isMinimalMode\n });\n // we don't create a cacheEntry for ISR\n if (!isIsr) {\n return null;\n }\n if ((cacheEntry == null ? void 0 : (_cacheEntry_value = cacheEntry.value) == null ? void 0 : _cacheEntry_value.kind) !== CachedRouteKind.APP_ROUTE) {\n var _cacheEntry_value1;\n throw Object.defineProperty(new Error(`Invariant: app-route received invalid cache entry ${cacheEntry == null ? void 0 : (_cacheEntry_value1 = cacheEntry.value) == null ? void 0 : _cacheEntry_value1.kind}`), \"__NEXT_ERROR_CODE\", {\n value: \"E701\",\n enumerable: false,\n configurable: true\n });\n }\n if (!isMinimalMode) {\n res.setHeader('x-nextjs-cache', isOnDemandRevalidate ? 'REVALIDATED' : cacheEntry.isMiss ? 'MISS' : cacheEntry.isStale ? 'STALE' : 'HIT');\n }\n // Draft mode should never be cached\n if (isDraftMode) {\n res.setHeader('Cache-Control', 'private, no-cache, no-store, max-age=0, must-revalidate');\n }\n const headers = fromNodeOutgoingHttpHeaders(cacheEntry.value.headers);\n if (!(isMinimalMode && isIsr)) {\n headers.delete(NEXT_CACHE_TAGS_HEADER);\n }\n // If cache control is already set on the response we don't\n // override it to allow users to customize it via next.config\n if (cacheEntry.cacheControl && !res.getHeader('Cache-Control') && !headers.get('Cache-Control')) {\n headers.set('Cache-Control', getCacheControlHeader(cacheEntry.cacheControl));\n }\n await sendResponse(nodeNextReq, nodeNextRes, // @ts-expect-error - Argument of type 'Buffer<ArrayBufferLike>' is not assignable to parameter of type 'BodyInit | null | undefined'.\n new Response(cacheEntry.value.body, {\n headers,\n status: cacheEntry.value.status || 200\n }));\n return null;\n };\n // TODO: activeSpan code path is for when wrapped by\n // next-server can be removed when this is no longer used\n if (isWrappedByNextServer && activeSpan) {\n await handleResponse(activeSpan);\n } else {\n parentSpan = tracer.getActiveScopeSpan();\n await tracer.withPropagatedContext(req.headers, ()=>tracer.trace(BaseServerSpan.handleRequest, {\n spanName: `${method} ${srcPage}`,\n kind: SpanKind.SERVER,\n attributes: {\n 'http.method': method,\n 'http.target': req.url\n }\n }, handleResponse), undefined, !isWrappedByNextServer);\n }\n } catch (err) {\n if (!(err instanceof NoFallbackError)) {\n const silenceLog = false;\n await routeModule.onRequestError(req, err, {\n routerKind: 'App Router',\n routePath: normalizedSrcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isStaticGeneration,\n isOnDemandRevalidate\n })\n }, silenceLog, routerServerContext);\n }\n // rethrow so that we can handle serving error page\n // If this is during static generation, throw the error again.\n if (isIsr) throw err;\n // Otherwise, send a 500 response.\n await sendResponse(nodeNextReq, nodeNextRes, new Response(null, {\n status: 500\n }));\n return null;\n }\n}\n\n//# sourceMappingURL=app-route.js.map\n"],"names":["CONTAINER_KEY","resolve","token","container","globalThis","Error","MAX_FILE_SIZE","ALLOWED_EXTENSIONS","Set","buffer","mimeType","ext","MIME_MAP","POST","request","body","json","path","sessionId","error","status","toLowerCase","has","physicalPath","allowedRoots","process","cwd","catch","isAllowed","some","root","startsWith","length","toFixed","filename","service","attachment","store","id","name","size","Number","createdAt","message"],"mappings":"goCAuBO,SAAoBE,AAAXD,CAAmC,EACjD,IAAME,EAAaC,UAAsC,CAACJ,AAdtC,mBAcoD,CAIxE,GAAI,CAACG,EACH,MAAM,AAAIE,GADI,GAEZ,0FAIJ,OAAOF,EAAUF,OAAO,CAACC,EAC3B,qGEnCA,IAAA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,E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,GAE9E,MAAM,CAAA,EAAA,EAAA,YAAA,AAAY,EAAC,EAAa,EAChC,IAAI,SAAS,EAAW,KAAK,CAAC,IAAI,CAAE,SAChC,EACA,OAAQ,EAAW,KAAK,CAAC,MAAM,EAAI,GACvC,IACO,IACX,EAGI,GAAyB,EACzB,MAAM,EAAe,EADgB,EAGrC,EAAa,EAAO,kBAAkB,GACtC,MAAM,EAAO,qBAAqB,CAAC,EAAI,OAAO,CAAE,IAAI,EAAO,KAAK,CAAC,EAAA,cAAc,CAAC,aAAa,CAAE,CACvF,SAAU,CAAA,EAAG,EAAO,CAAC,EAAE,EAAA,CAAS,CAChC,KAAM,EAAA,QAAQ,CAAC,MAAM,CACrB,WAAY,CACR,cAAe,EACf,cAAe,EAAI,GAAG,AAC1B,CACJ,EAAG,QAAiB,EAAW,CAAC,GAE5C,CAAE,MAAO,EAAK,CAeV,GAdM,aAAe,EAAA,eAAe,EAEhC,CAFmC,KAE7B,EAAY,cAAc,CAAC,EAAK,EAAK,CACvC,WAAY,aACZ,UAAW,EACX,UAAW,QACX,iBAAkB,CAAA,EAAA,EAAA,mBAAA,AAAmB,EAAC,oBAClC,uBACA,CACJ,EACJ,GAAG,AATgB,EASJ,GAIf,EAAO,MAAM,EAKjB,OAHA,MAAM,CAAA,EAAA,EAAA,YAAA,AAAY,EAAC,EAAa,EAAa,IAAI,SAAS,KAAM,CAC5D,OAAQ,GACZ,IACO,IACX,CACJ,mCA3TA,SAAS,EACL,MAAOF,CAAAA,EAAAA,EAAAA,UAAAA,AAAW,EAAC,kBACf,uBACA,CACJ,EACJ","ignoreList":[2]}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
module.exports=[18622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},32319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},56704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},24725,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/after-task-async-storage.external.js",()=>require("next/dist/server/app-render/after-task-async-storage.external.js"))},70406,(e,t,r)=>{t.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},93695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},40060,e=>{"use strict";e.s(["resolve",0,function(e){let t=globalThis.__shipitAiContainer;if(!t)throw Error("DI container not available. Ensure the CLI bootstrap or dev-server has initialized it.");return t.resolve(e)}])},68367,e=>{"use strict";var t=e.i(29932),r=e.i(88797),a=e.i(78439),n=e.i(21387),i=e.i(351),s=e.i(1286),o=e.i(31060),l=e.i(67760),d=e.i(13435),u=e.i(60316),p=e.i(37130),c=e.i(31516),h=e.i(63144),v=e.i(3719),x=e.i(66941),R=e.i(93695);e.i(76574);var m=e.i(45014),f=e.i(25716),g=e.i(40060);e.s(["GET",0,function(){try{let{version:e,name:t,description:r}=(0,g.resolve)("IVersionService").getVersion();return f.NextResponse.json({version:e,packageName:t,description:r,branch:"main",commitHash:"
|
|
1
|
+
module.exports=[18622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},32319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},56704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},24725,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/after-task-async-storage.external.js",()=>require("next/dist/server/app-render/after-task-async-storage.external.js"))},70406,(e,t,r)=>{t.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},93695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},40060,e=>{"use strict";e.s(["resolve",0,function(e){let t=globalThis.__shipitAiContainer;if(!t)throw Error("DI container not available. Ensure the CLI bootstrap or dev-server has initialized it.");return t.resolve(e)}])},68367,e=>{"use strict";var t=e.i(29932),r=e.i(88797),a=e.i(78439),n=e.i(21387),i=e.i(351),s=e.i(1286),o=e.i(31060),l=e.i(67760),d=e.i(13435),u=e.i(60316),p=e.i(37130),c=e.i(31516),h=e.i(63144),v=e.i(3719),x=e.i(66941),R=e.i(93695);e.i(76574);var m=e.i(45014),f=e.i(25716),g=e.i(40060);e.s(["GET",0,function(){try{let{version:e,name:t,description:r}=(0,g.resolve)("IVersionService").getVersion();return f.NextResponse.json({version:e,packageName:t,description:r,branch:"main",commitHash:"e2aaafee7996cc95491a3b48cc1d82c92b8c9cbf",instancePath:"/home/runner/work/shipit/shipit/src/presentation/web",isDev:!1})}catch{return f.NextResponse.json({version:"1.164.2",packageName:"@shipit-ai/cli",description:"Autonomous AI Native SDLC Platform - Automate the development cycle from idea to deploy",branch:"main",commitHash:"e2aaafee7996cc95491a3b48cc1d82c92b8c9cbf",instancePath:"/home/runner/work/shipit/shipit/src/presentation/web",isDev:!1})}},"dynamic",0,"force-dynamic"],35003);var w=e.i(35003);let E=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/version/route",pathname:"/api/version",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/src/presentation/web/app/api/version/route.ts",nextConfigOutput:"",userland:w,...{}}),{workAsyncStorage:b,workUnitAsyncStorage:y,serverHooks:C}=E;async function A(e,t,a){a.requestMeta&&(0,n.setRequestMeta)(e,a.requestMeta),E.isDev&&(0,n.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let f="/api/version/route";f=f.replace(/\/index$/,"")||"/";let g=await E.prepare(e,t,{srcPage:f,multiZoneDraftMode:!1});if(!g)return t.statusCode=400,t.end("Bad Request"),null==a.waitUntil||a.waitUntil.call(a,Promise.resolve()),null;let{buildId:w,params:b,nextConfig:y,parsedUrl:C,isDraftMode:A,prerenderManifest:N,routerServerContext:P,isOnDemandRevalidate:T,revalidateOnlyGenerated:k,resolvedPathname:q,clientReferenceManifest:S,serverActionsManifest:_}=g,O=(0,o.normalizeAppPath)(f),I=!!(N.dynamicRoutes[O]||N.routes[q]),j=async()=>((null==P?void 0:P.render404)?await P.render404(e,t,C,!1):t.end("This page could not be found"),null);if(I&&!A){let e=!!N.routes[q],t=N.dynamicRoutes[O];if(t&&!1===t.fallback&&!e){if(y.adapterPath)return await j();throw new R.NoFallbackError}}let H=null;!I||E.isDev||A||(H="/index"===(H=q)?"/":H);let D=!0===E.isDev||!I,U=I&&!D;_&&S&&(0,s.setManifestsSingleton)({page:f,clientReferenceManifest:S,serverActionsManifest:_});let M=e.method||"GET",$=(0,i.getTracer)(),F=$.getActiveScopeSpan(),K=!!(null==P?void 0:P.isWrappedByNextServer),L=!!(0,n.getRequestMeta)(e,"minimalMode"),B=(0,n.getRequestMeta)(e,"incrementalCache")||await E.getIncrementalCache(e,y,N,L);null==B||B.resetRequestCache(),globalThis.__incrementalCache=B;let V={params:b,previewProps:N.preview,renderOpts:{experimental:{authInterrupts:!!y.experimental.authInterrupts},cacheComponents:!!y.cacheComponents,supportsDynamicResponse:D,incrementalCache:B,cacheLifeProfiles:y.cacheLife,waitUntil:a.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,a,n)=>E.onRequestError(e,t,a,n,P)},sharedContext:{buildId:w}},G=new l.NodeNextRequest(e),W=new l.NodeNextResponse(t),X=d.NextRequestAdapter.fromNodeNextRequest(G,(0,d.signalFromNodeResponse)(t));try{let n,s=async e=>E.handle(X,V).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let r=$.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==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),n&&n!==e&&(n.setAttribute("http.route",a),n.updateName(t))}else e.updateName(`${M} ${f}`)}),o=async n=>{var i,o;let l=async({previousCacheEntry:r})=>{try{if(!L&&T&&k&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let i=await s(n);e.fetchMetrics=V.renderOpts.fetchMetrics;let o=V.renderOpts.pendingWaitUntil;o&&a.waitUntil&&(a.waitUntil(o),o=void 0);let l=V.renderOpts.collectedTags;if(!I)return await (0,c.sendResponse)(G,W,i,V.renderOpts.pendingWaitUntil),null;{let e=await i.blob(),t=(0,h.toNodeOutgoingHttpHeaders)(i.headers);l&&(t[x.NEXT_CACHE_TAGS_HEADER]=l),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==V.renderOpts.collectedRevalidate&&!(V.renderOpts.collectedRevalidate>=x.INFINITE_CACHE)&&V.renderOpts.collectedRevalidate,a=void 0===V.renderOpts.collectedExpire||V.renderOpts.collectedExpire>=x.INFINITE_CACHE?void 0:V.renderOpts.collectedExpire;return{value:{kind:m.CachedRouteKind.APP_ROUTE,status:i.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:a}}}}catch(t){throw(null==r?void 0:r.isStale)&&await E.onRequestError(e,t,{routerKind:"App Router",routePath:f,routeType:"route",revalidateReason:(0,p.getRevalidateReason)({isStaticGeneration:U,isOnDemandRevalidate:T})},!1,P),t}},d=await E.handleResponse({req:e,nextConfig:y,cacheKey:H,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:N,isRoutePPREnabled:!1,isOnDemandRevalidate:T,revalidateOnlyGenerated:k,responseGenerator:l,waitUntil:a.waitUntil,isMinimalMode:L});if(!I)return null;if((null==d||null==(i=d.value)?void 0:i.kind)!==m.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(o=d.value)?void 0:o.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});L||t.setHeader("x-nextjs-cache",T?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),A&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let u=(0,h.fromNodeOutgoingHttpHeaders)(d.value.headers);return L&&I||u.delete(x.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||t.getHeader("Cache-Control")||u.get("Cache-Control")||u.set("Cache-Control",(0,v.getCacheControlHeader)(d.cacheControl)),await (0,c.sendResponse)(G,W,new Response(d.value.body,{headers:u,status:d.value.status||200})),null};K&&F?await o(F):(n=$.getActiveScopeSpan(),await $.withPropagatedContext(e.headers,()=>$.trace(u.BaseServerSpan.handleRequest,{spanName:`${M} ${f}`,kind:i.SpanKind.SERVER,attributes:{"http.method":M,"http.target":e.url}},o),void 0,!K))}catch(t){if(t instanceof R.NoFallbackError||await E.onRequestError(e,t,{routerKind:"App Router",routePath:O,routeType:"route",revalidateReason:(0,p.getRevalidateReason)({isStaticGeneration:U,isOnDemandRevalidate:T})},!1,P),I)throw t;return await (0,c.sendResponse)(G,W,new Response(null,{status:500})),null}}e.s(["handler",0,A,"patchFetch",0,function(){return(0,a.patchFetch)({workAsyncStorage:b,workUnitAsyncStorage:y})},"routeModule",0,E,"serverHooks",0,C,"workAsyncStorage",0,b,"workUnitAsyncStorage",0,y],68367)}];
|
|
2
2
|
|
|
3
3
|
//# sourceMappingURL=%5Broot-of-the-server%5D__0tb~wwk._.js.map
|