@shepai/cli 1.127.3 → 1.129.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/apis/json-schema/EnvironmentConfig.yaml +3 -0
- package/apis/json-schema/FeatureFlags.yaml +5 -0
- package/apis/json-schema/Repository.yaml +3 -0
- package/dist/packages/core/src/application/ports/output/repositories/repository-repository.interface.d.ts +4 -0
- package/dist/packages/core/src/application/ports/output/repositories/repository-repository.interface.d.ts.map +1 -1
- package/dist/packages/core/src/application/ports/output/services/github-repository-service.interface.d.ts +118 -0
- package/dist/packages/core/src/application/ports/output/services/github-repository-service.interface.d.ts.map +1 -0
- package/dist/packages/core/src/application/ports/output/services/github-repository-service.interface.js +58 -0
- package/dist/packages/core/src/application/ports/output/services/index.d.ts +2 -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/index.js +1 -0
- package/dist/packages/core/src/application/use-cases/features/delete-feature.use-case.d.ts +1 -0
- package/dist/packages/core/src/application/use-cases/features/delete-feature.use-case.d.ts.map +1 -1
- package/dist/packages/core/src/application/use-cases/features/delete-feature.use-case.js +46 -15
- package/dist/packages/core/src/application/use-cases/repositories/import-github-repository.use-case.d.ts +31 -0
- package/dist/packages/core/src/application/use-cases/repositories/import-github-repository.use-case.d.ts.map +1 -0
- package/dist/packages/core/src/application/use-cases/repositories/import-github-repository.use-case.js +86 -0
- package/dist/packages/core/src/application/use-cases/repositories/list-github-repositories.use-case.d.ts +13 -0
- package/dist/packages/core/src/application/use-cases/repositories/list-github-repositories.use-case.d.ts.map +1 -0
- package/dist/packages/core/src/application/use-cases/repositories/list-github-repositories.use-case.js +35 -0
- 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 +2 -0
- package/dist/packages/core/src/domain/generated/output.d.ts +12 -0
- package/dist/packages/core/src/domain/generated/output.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/di/container.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/di/container.js +12 -0
- package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/repository.mapper.d.ts +1 -0
- package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/repository.mapper.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/repository.mapper.js +2 -0
- package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/settings.mapper.d.ts +1 -0
- package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/settings.mapper.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/settings.mapper.js +2 -0
- package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/040-add-repository-remote-url.d.ts +12 -0
- package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/040-add-repository-remote-url.d.ts.map +1 -0
- package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/040-add-repository-remote-url.js +29 -0
- package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/041-add-feature-flag-github-import.d.ts +11 -0
- package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/041-add-feature-flag-github-import.d.ts.map +1 -0
- package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/041-add-feature-flag-github-import.js +17 -0
- package/dist/packages/core/src/infrastructure/repositories/sqlite-repository.repository.d.ts +3 -0
- package/dist/packages/core/src/infrastructure/repositories/sqlite-repository.repository.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/repositories/sqlite-repository.repository.js +38 -2
- package/dist/packages/core/src/infrastructure/repositories/sqlite-settings.repository.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/repositories/sqlite-settings.repository.js +3 -2
- package/dist/packages/core/src/infrastructure/services/external/github-repository.service.d.ts +18 -0
- package/dist/packages/core/src/infrastructure/services/external/github-repository.service.d.ts.map +1 -0
- package/dist/packages/core/src/infrastructure/services/external/github-repository.service.js +171 -0
- package/dist/src/presentation/cli/commands/feat/del.command.d.ts +2 -1
- package/dist/src/presentation/cli/commands/feat/del.command.d.ts.map +1 -1
- package/dist/src/presentation/cli/commands/feat/del.command.js +28 -2
- package/dist/src/presentation/cli/commands/repo/add.command.d.ts +13 -0
- package/dist/src/presentation/cli/commands/repo/add.command.d.ts.map +1 -0
- package/dist/src/presentation/cli/commands/repo/add.command.js +82 -0
- package/dist/src/presentation/cli/commands/repo/index.d.ts +1 -0
- package/dist/src/presentation/cli/commands/repo/index.d.ts.map +1 -1
- package/dist/src/presentation/cli/commands/repo/index.js +4 -1
- package/dist/src/presentation/tui/wizards/github-import.wizard.d.ts +33 -0
- package/dist/src/presentation/tui/wizards/github-import.wizard.d.ts.map +1 -0
- package/dist/src/presentation/tui/wizards/github-import.wizard.js +121 -0
- package/dist/src/presentation/web/app/actions/delete-feature.d.ts +1 -1
- package/dist/src/presentation/web/app/actions/delete-feature.d.ts.map +1 -1
- package/dist/src/presentation/web/app/actions/delete-feature.js +3 -1
- package/dist/src/presentation/web/app/actions/import-github-repository.d.ts +11 -0
- package/dist/src/presentation/web/app/actions/import-github-repository.d.ts.map +1 -0
- package/dist/src/presentation/web/app/actions/import-github-repository.js +27 -0
- package/dist/src/presentation/web/app/actions/list-github-repositories.d.ts +11 -0
- package/dist/src/presentation/web/app/actions/list-github-repositories.d.ts.map +1 -0
- package/dist/src/presentation/web/app/actions/list-github-repositories.js +17 -0
- package/dist/src/presentation/web/components/common/add-repository-button/add-repository-button.d.ts +4 -3
- package/dist/src/presentation/web/components/common/add-repository-button/add-repository-button.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/add-repository-button/add-repository-button.js +22 -5
- package/dist/src/presentation/web/components/common/control-center-drawer/feature-drawer-client.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/control-center-drawer/feature-drawer-client.js +3 -3
- package/dist/src/presentation/web/components/common/delete-feature-dialog/delete-feature-dialog-config.d.ts +2 -1
- package/dist/src/presentation/web/components/common/delete-feature-dialog/delete-feature-dialog-config.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/delete-feature-dialog/delete-feature-dialog.d.ts +1 -1
- package/dist/src/presentation/web/components/common/delete-feature-dialog/delete-feature-dialog.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/delete-feature-dialog/delete-feature-dialog.js +12 -2
- package/dist/src/presentation/web/components/common/delete-feature-dialog/delete-feature-dialog.stories.d.ts +3 -0
- package/dist/src/presentation/web/components/common/delete-feature-dialog/delete-feature-dialog.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/delete-feature-dialog/delete-feature-dialog.stories.js +17 -0
- package/dist/src/presentation/web/components/common/feature-node/feature-node-state-config.d.ts +1 -1
- package/dist/src/presentation/web/components/common/feature-node/feature-node-state-config.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/feature-node/feature-node.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/feature-node/feature-node.js +3 -3
- package/dist/src/presentation/web/components/common/github-import-dialog/github-import-dialog.d.ts +8 -0
- package/dist/src/presentation/web/components/common/github-import-dialog/github-import-dialog.d.ts.map +1 -0
- package/dist/src/presentation/web/components/common/github-import-dialog/github-import-dialog.js +33 -0
- package/dist/src/presentation/web/components/common/github-import-dialog/github-import-dialog.stories.d.ts +10 -0
- package/dist/src/presentation/web/components/common/github-import-dialog/github-import-dialog.stories.d.ts.map +1 -0
- package/dist/src/presentation/web/components/common/github-import-dialog/github-import-dialog.stories.js +26 -0
- package/dist/src/presentation/web/components/common/github-import-dialog/github-repo-browser.d.ts +15 -0
- package/dist/src/presentation/web/components/common/github-import-dialog/github-repo-browser.d.ts.map +1 -0
- package/dist/src/presentation/web/components/common/github-import-dialog/github-repo-browser.js +52 -0
- package/dist/src/presentation/web/components/common/github-import-dialog/github-repo-browser.stories.d.ts +10 -0
- package/dist/src/presentation/web/components/common/github-import-dialog/github-repo-browser.stories.d.ts.map +1 -0
- package/dist/src/presentation/web/components/common/github-import-dialog/github-repo-browser.stories.js +78 -0
- package/dist/src/presentation/web/components/common/github-import-dialog/github-url-input.d.ts +7 -0
- package/dist/src/presentation/web/components/common/github-import-dialog/github-url-input.d.ts.map +1 -0
- package/dist/src/presentation/web/components/common/github-import-dialog/github-url-input.js +46 -0
- package/dist/src/presentation/web/components/common/github-import-dialog/github-url-input.stories.d.ts +10 -0
- package/dist/src/presentation/web/components/common/github-import-dialog/github-url-input.stories.d.ts.map +1 -0
- package/dist/src/presentation/web/components/common/github-import-dialog/github-url-input.stories.js +29 -0
- package/dist/src/presentation/web/components/common/github-import-dialog/index.d.ts +4 -0
- package/dist/src/presentation/web/components/common/github-import-dialog/index.d.ts.map +1 -0
- package/dist/src/presentation/web/components/common/github-import-dialog/index.js +3 -0
- package/dist/src/presentation/web/components/features/control-center/control-center-inner.d.ts.map +1 -1
- package/dist/src/presentation/web/components/features/control-center/control-center-inner.js +2 -2
- package/dist/src/presentation/web/components/features/control-center/use-control-center-state.d.ts +1 -1
- package/dist/src/presentation/web/components/features/control-center/use-control-center-state.d.ts.map +1 -1
- package/dist/src/presentation/web/components/features/control-center/use-control-center-state.js +2 -2
- package/dist/src/presentation/web/components/features/settings/feature-flags-settings-section.d.ts.map +1 -1
- package/dist/src/presentation/web/components/features/settings/feature-flags-settings-section.js +9 -1
- package/dist/src/presentation/web/components/features/settings/feature-flags-settings-section.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/features/settings/feature-flags-settings-section.stories.js +3 -0
- 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 +5 -0
- package/dist/src/presentation/web/components/features/settings/settings-page-client.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/features/settings/settings-page-client.stories.js +1 -0
- package/dist/src/presentation/web/components/layouts/app-shell/app-shell.d.ts.map +1 -1
- package/dist/src/presentation/web/components/layouts/app-shell/app-shell.js +56 -27
- package/dist/src/presentation/web/components/layouts/app-sidebar/app-sidebar.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/layouts/app-sidebar/app-sidebar.stories.js +7 -1
- package/dist/src/presentation/web/hooks/feature-flags-context.d.ts.map +1 -1
- package/dist/src/presentation/web/hooks/feature-flags-context.js +1 -0
- package/dist/src/presentation/web/hooks/use-graph-state.d.ts.map +1 -1
- package/dist/src/presentation/web/hooks/use-graph-state.js +1 -1
- package/dist/src/presentation/web/lib/derive-graph.d.ts +1 -1
- package/dist/src/presentation/web/lib/derive-graph.d.ts.map +1 -1
- package/dist/src/presentation/web/lib/feature-flags.d.ts +2 -0
- package/dist/src/presentation/web/lib/feature-flags.d.ts.map +1 -1
- package/dist/src/presentation/web/lib/feature-flags.js +5 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/web/.next/BUILD_ID +1 -1
- package/web/.next/build-manifest.json +2 -2
- package/web/.next/fallback-build-manifest.json +2 -2
- package/web/.next/prerender-manifest.json +3 -3
- package/web/.next/required-server-files.js +2 -2
- package/web/.next/required-server-files.json +2 -2
- package/web/.next/server/app/(dashboard)/@drawer/adopt/page/server-reference-manifest.json +74 -44
- package/web/.next/server/app/(dashboard)/@drawer/adopt/page.js +3 -3
- package/web/.next/server/app/(dashboard)/@drawer/adopt/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/adopt/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/create/page/server-reference-manifest.json +74 -44
- package/web/.next/server/app/(dashboard)/@drawer/create/page.js +3 -3
- package/web/.next/server/app/(dashboard)/@drawer/create/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/create/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page/server-reference-manifest.json +86 -56
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page.js +3 -3
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page/server-reference-manifest.json +86 -56
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page.js +3 -3
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page/server-reference-manifest.json +70 -40
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page.js +3 -3
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/create/page/server-reference-manifest.json +74 -44
- package/web/.next/server/app/(dashboard)/create/page.js +3 -3
- package/web/.next/server/app/(dashboard)/create/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/create/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page/server-reference-manifest.json +86 -56
- package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page.js +3 -3
- package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/feature/[featureId]/page/server-reference-manifest.json +86 -56
- package/web/.next/server/app/(dashboard)/feature/[featureId]/page.js +3 -3
- package/web/.next/server/app/(dashboard)/feature/[featureId]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/feature/[featureId]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/page/server-reference-manifest.json +70 -40
- package/web/.next/server/app/(dashboard)/page.js +3 -3
- package/web/.next/server/app/(dashboard)/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page/server-reference-manifest.json +70 -40
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page.js +3 -3
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/_global-error.html +2 -2
- package/web/.next/server/app/_global-error.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/web/.next/server/app/_not-found/page/server-reference-manifest.json +32 -2
- package/web/.next/server/app/_not-found/page.js +1 -1
- package/web/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/api/attachments/preview/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/settings/page/server-reference-manifest.json +42 -12
- package/web/.next/server/app/settings/page.js +2 -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/server-reference-manifest.json +42 -12
- package/web/.next/server/app/skills/page.js +2 -1
- package/web/.next/server/app/skills/page.js.nft.json +1 -1
- package/web/.next/server/app/skills/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/tools/page/server-reference-manifest.json +42 -12
- package/web/.next/server/app/tools/page.js +2 -1
- package/web/.next/server/app/tools/page.js.nft.json +1 -1
- package/web/.next/server/app/tools/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/version/page/server-reference-manifest.json +32 -2
- package/web/.next/server/app/version/page.js +2 -2
- package/web/.next/server/app/version/page.js.nft.json +1 -1
- package/web/.next/server/app/version/page_client-reference-manifest.js +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__a402b567._.js +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__cd67a84c._.js.map +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__dcd4f847._.js.map +1 -1
- package/web/.next/server/chunks/ssr/744ca_web__next-internal_server_app_(dashboard)_@drawer_adopt_page_actions_4e741df2.js +3 -0
- package/web/.next/server/chunks/ssr/744ca_web__next-internal_server_app_(dashboard)_@drawer_adopt_page_actions_4e741df2.js.map +1 -0
- package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js +1 -1
- package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js.map +1 -1
- package/web/.next/server/chunks/ssr/7f428_lucide-react_dist_esm_icons_8b618f7d._.js +3 -0
- package/web/.next/server/chunks/ssr/7f428_lucide-react_dist_esm_icons_8b618f7d._.js.map +1 -0
- package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_@drawer_repository_[repositoryId]_page_actions_026fdffa.js +3 -0
- package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_@drawer_repository_[repositoryId]_page_actions_026fdffa.js.map +1 -0
- package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_repository_[repositoryId]_page_actions_8b91e197.js +3 -0
- package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_repository_[repositoryId]_page_actions_8b91e197.js.map +1 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__0e842eba._.js +3 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__0e842eba._.js.map +1 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__2f886f77._.js +4 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__2f886f77._.js.map +1 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__357d99f9._.js +3 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__357d99f9._.js.map +1 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__43f51aa6._.js +4 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__43f51aa6._.js.map +1 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__60684242._.js +4 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__60684242._.js.map +1 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__6bb00d90._.js +2 -2
- package/web/.next/server/chunks/ssr/[root-of-the-server]__6bb00d90._.js.map +1 -1
- package/web/.next/server/chunks/ssr/{[root-of-the-server]__6cc70784._.js → [root-of-the-server]__755cfe02._.js} +2 -2
- package/web/.next/server/chunks/ssr/{[root-of-the-server]__430169b6._.js.map → [root-of-the-server]__755cfe02._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__815546bd._.js +4 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__815546bd._.js.map +1 -0
- package/web/.next/server/chunks/ssr/{[root-of-the-server]__34323a67._.js → [root-of-the-server]__a21eef5a._.js} +2 -2
- package/web/.next/server/chunks/ssr/[root-of-the-server]__a21eef5a._.js.map +1 -0
- package/web/.next/server/chunks/ssr/{[root-of-the-server]__1aa034e9._.js → [root-of-the-server]__a628fb91._.js} +2 -2
- package/web/.next/server/chunks/ssr/{[root-of-the-server]__e44ae5ca._.js.map → [root-of-the-server]__a628fb91._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/{[root-of-the-server]__e44ae5ca._.js → [root-of-the-server]__bfba58e6._.js} +2 -2
- package/web/.next/server/chunks/ssr/{[root-of-the-server]__6cc70784._.js.map → [root-of-the-server]__bfba58e6._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/{[root-of-the-server]__430169b6._.js → [root-of-the-server]__c3ab8422._.js} +2 -2
- package/web/.next/server/chunks/ssr/{[root-of-the-server]__1aa034e9._.js.map → [root-of-the-server]__c3ab8422._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__d61bd462._.js +3 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__d61bd462._.js.map +1 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__f4a463ee._.js +4 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__f4a463ee._.js.map +1 -0
- package/web/.next/server/chunks/ssr/{_918887c5._.js → _0020fddd._.js} +2 -2
- package/web/.next/server/chunks/ssr/_0020fddd._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_01046927._.js +9 -0
- package/web/.next/server/chunks/ssr/_01046927._.js.map +1 -0
- package/web/.next/server/chunks/ssr/{_2f6f48b8._.js → _02ec1aea._.js} +2 -2
- package/web/.next/server/chunks/ssr/{_2f6f48b8._.js.map → _02ec1aea._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/_04c9e229._.js +3 -0
- package/web/.next/server/chunks/ssr/_04c9e229._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_67104d9e._.js +3 -0
- package/web/.next/server/chunks/ssr/_67104d9e._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_7dca1882._.js +1 -1
- package/web/.next/server/chunks/ssr/_7dca1882._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_a37f5f18._.js +1 -1
- package/web/.next/server/chunks/ssr/_a37f5f18._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_a9f57758._.js +1 -1
- package/web/.next/server/chunks/ssr/{_4207f708._.js → _ade68272._.js} +2 -2
- package/web/.next/server/chunks/ssr/_ade68272._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_b4b8a636._.js +3 -0
- package/web/.next/server/chunks/ssr/_b4b8a636._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_d4b20e29._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_d8575088._.js +3 -0
- package/web/.next/server/chunks/ssr/_d8575088._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_f39a1adb._.js +1 -1
- package/web/.next/server/chunks/ssr/_f39a1adb._.js.map +1 -1
- package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js +1 -1
- package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js.map +1 -1
- package/web/.next/server/chunks/ssr/node_modules__pnpm_55c7a131._.js +3 -0
- package/web/.next/server/chunks/ssr/node_modules__pnpm_55c7a131._.js.map +1 -0
- package/web/.next/server/chunks/ssr/{src_presentation_web_0f98f202._.js → src_presentation_web_12d7d3c5._.js} +2 -2
- package/web/.next/server/chunks/ssr/{src_presentation_web_0f98f202._.js.map → src_presentation_web_12d7d3c5._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_8e7fe0d1._.js +5 -0
- package/web/.next/server/chunks/ssr/{src_presentation_web_9db47db7._.js.map → src_presentation_web_8e7fe0d1._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_ca051134.js +3 -0
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_ca051134.js.map +1 -0
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_1b176e3c.js +3 -0
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_1b176e3c.js.map +1 -0
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_bd9f0dda.js +3 -0
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_bd9f0dda.js.map +1 -0
- package/web/.next/server/chunks/ssr/src_presentation_web_b9023017._.js +5 -0
- package/web/.next/server/chunks/ssr/{src_presentation_web_ede4a227._.js.map → src_presentation_web_b9023017._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_a5e6c910._.js +3 -0
- package/web/.next/server/chunks/ssr/src_presentation_web_components_a5e6c910._.js.map +1 -0
- package/web/.next/server/chunks/ssr/src_presentation_web_components_e599bb8c._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_e599bb8c._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js.map +1 -1
- package/web/.next/server/pages/500.html +2 -2
- package/web/.next/server/server-reference-manifest.js +1 -1
- package/web/.next/server/server-reference-manifest.json +520 -294
- package/web/.next/static/chunks/114347d98fd69f40.js +1 -0
- package/web/.next/static/chunks/20ff528aadba66aa.js +1 -0
- package/web/.next/static/chunks/278f99f8cc87ab17.js +1 -0
- package/web/.next/static/chunks/29535b9b36889453.js +1 -0
- package/web/.next/static/chunks/314b8314f77d6921.js +1 -0
- package/web/.next/static/chunks/3e1e0f9bde3530d2.js +1 -0
- package/web/.next/static/chunks/601d93593f5f664f.js +1 -0
- package/web/.next/static/chunks/{fa373c6f8139a712.js → 60464e75e7dff8f4.js} +2 -2
- package/web/.next/static/chunks/60fabfee2f9ae935.js +1 -0
- package/web/.next/static/chunks/688971d5bad5dc7c.js +1 -0
- package/web/.next/static/chunks/6c6ab4d42b07fb4b.js +1 -0
- package/web/.next/static/chunks/6cba93f351d29ae4.js +1 -0
- package/web/.next/static/chunks/{41c7cee55ef51fc8.js → 83ae4f574f3dee4d.js} +1 -1
- package/web/.next/static/chunks/{62a58d2f3cd5f35f.js → 98b6ea0af565042f.js} +2 -2
- package/web/.next/static/chunks/98dfbecc5ee30ce1.css +1 -0
- package/web/.next/static/chunks/ab3f7ac1960397d9.js +1 -0
- package/web/.next/static/chunks/c975a20b880c47ea.js +1 -0
- package/web/.next/static/chunks/d34a91958ca566fa.js +13 -0
- package/web/.next/static/chunks/f259386f4875e70c.js +1 -0
- package/web/.next/server/chunks/ssr/744ca_web__next-internal_server_app_(dashboard)_@drawer_adopt_page_actions_fbb88113.js +0 -3
- package/web/.next/server/chunks/ssr/744ca_web__next-internal_server_app_(dashboard)_@drawer_adopt_page_actions_fbb88113.js.map +0 -1
- package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_@drawer_repository_[repositoryId]_page_actions_fdfbf5cc.js +0 -3
- package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_@drawer_repository_[repositoryId]_page_actions_fdfbf5cc.js.map +0 -1
- package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_repository_[repositoryId]_page_actions_d8fa0b5f.js +0 -3
- package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_repository_[repositoryId]_page_actions_d8fa0b5f.js.map +0 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__02c84e6b._.js +0 -3
- package/web/.next/server/chunks/ssr/[root-of-the-server]__02c84e6b._.js.map +0 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__06fef644._.js +0 -3
- package/web/.next/server/chunks/ssr/[root-of-the-server]__06fef644._.js.map +0 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__34323a67._.js.map +0 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__357de47c._.js +0 -4
- package/web/.next/server/chunks/ssr/[root-of-the-server]__357de47c._.js.map +0 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__67fe07fe._.js +0 -4
- package/web/.next/server/chunks/ssr/[root-of-the-server]__67fe07fe._.js.map +0 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__68c2d48e._.js +0 -3
- package/web/.next/server/chunks/ssr/[root-of-the-server]__68c2d48e._.js.map +0 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__6b17a22d._.js +0 -4
- package/web/.next/server/chunks/ssr/[root-of-the-server]__6b17a22d._.js.map +0 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__804c006d._.js +0 -4
- package/web/.next/server/chunks/ssr/[root-of-the-server]__804c006d._.js.map +0 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__8c553503._.js +0 -4
- package/web/.next/server/chunks/ssr/[root-of-the-server]__8c553503._.js.map +0 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__a50a7e39._.js +0 -4
- package/web/.next/server/chunks/ssr/[root-of-the-server]__a50a7e39._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_1bb79fe8._.js +0 -3
- package/web/.next/server/chunks/ssr/_1bb79fe8._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_4207f708._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_583a83fb._.js +0 -3
- package/web/.next/server/chunks/ssr/_583a83fb._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_918887c5._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_9f56cf8f._.js +0 -3
- package/web/.next/server/chunks/ssr/_9f56cf8f._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_a187fd7e._.js +0 -3
- package/web/.next/server/chunks/ssr/_a187fd7e._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_a5aa6371._.js +0 -9
- package/web/.next/server/chunks/ssr/_a5aa6371._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_b730ac57._.js +0 -3
- package/web/.next/server/chunks/ssr/_b730ac57._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_fae9e550._.js +0 -3
- package/web/.next/server/chunks/ssr/_fae9e550._.js.map +0 -1
- package/web/.next/server/chunks/ssr/f7870_sonner_dist_index_mjs_dbf63824._.js +0 -3
- package/web/.next/server/chunks/ssr/f7870_sonner_dist_index_mjs_dbf63824._.js.map +0 -1
- package/web/.next/server/chunks/ssr/node_modules__pnpm_026172d1._.js +0 -3
- package/web/.next/server/chunks/ssr/node_modules__pnpm_026172d1._.js.map +0 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_9db47db7._.js +0 -5
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_f66cd328.js +0 -3
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_f66cd328.js.map +0 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_bdcfba35._.js +0 -3
- package/web/.next/server/chunks/ssr/src_presentation_web_components_bdcfba35._.js.map +0 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_ede4a227._.js +0 -5
- package/web/.next/static/chunks/01ba448cf76c6014.js +0 -1
- package/web/.next/static/chunks/05e9c71e5e4cf531.js +0 -1
- package/web/.next/static/chunks/33d2f67ad4814aba.css +0 -1
- package/web/.next/static/chunks/534e18ee1fbd8452.js +0 -1
- package/web/.next/static/chunks/8080c842b0358904.js +0 -1
- package/web/.next/static/chunks/9b2a23851096f1aa.js +0 -1
- package/web/.next/static/chunks/a67c9c6125c1aa32.js +0 -1
- package/web/.next/static/chunks/a8ba3f3e2b0f87aa.js +0 -1
- package/web/.next/static/chunks/abc3f71a05ccbdfe.js +0 -1
- package/web/.next/static/chunks/c1f3db103c2b226f.js +0 -1
- package/web/.next/static/chunks/cca0f5112a9260d8.js +0 -1
- package/web/.next/static/chunks/cd45aed9c46e1bf5.js +0 -11
- package/web/.next/static/chunks/d04de4be30ab78ca.js +0 -3
- package/web/.next/static/chunks/d47658be0870a4b9.js +0 -1
- package/web/.next/static/chunks/d8e86e8e5bb7cc0a.js +0 -1
- package/web/.next/static/chunks/f9667ee1e5b445b7.js +0 -1
- /package/web/.next/static/{hWrKuop_3FR0syZrFWLvn → _hAwvNHgk12VPT5IIxRV6}/_buildManifest.js +0 -0
- /package/web/.next/static/{hWrKuop_3FR0syZrFWLvn → _hAwvNHgk12VPT5IIxRV6}/_clientMiddlewareManifest.json +0 -0
- /package/web/.next/static/{hWrKuop_3FR0syZrFWLvn → _hAwvNHgk12VPT5IIxRV6}/_ssgManifest.js +0 -0
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GitHub Repository Service Implementation
|
|
3
|
+
*
|
|
4
|
+
* Implements IGitHubRepositoryService using the gh CLI for authentication
|
|
5
|
+
* checks, repository listing, cloning (with progress streaming), and URL parsing.
|
|
6
|
+
*/
|
|
7
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
8
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
10
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
11
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
12
|
+
};
|
|
13
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
14
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
15
|
+
};
|
|
16
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
17
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
18
|
+
};
|
|
19
|
+
import { injectable, inject } from 'tsyringe';
|
|
20
|
+
import { resolve, normalize } from 'node:path';
|
|
21
|
+
import { rm } from 'node:fs/promises';
|
|
22
|
+
import { spawn } from 'node:child_process';
|
|
23
|
+
import { GitHubAuthError, GitHubCloneError, GitHubRepoListError, GitHubUrlParseError, } from '../../../application/ports/output/services/github-repository-service.interface.js';
|
|
24
|
+
// ---------------------------------------------------------------------------
|
|
25
|
+
// URL regex patterns
|
|
26
|
+
// ---------------------------------------------------------------------------
|
|
27
|
+
/** Matches https://github.com/owner/repo or https://github.com/owner/repo.git */
|
|
28
|
+
const HTTPS_PATTERN = /^https:\/\/github\.com\/([^/]+)\/([^/.]+?)(?:\.git)?$/;
|
|
29
|
+
/** Matches git@github.com:owner/repo.git */
|
|
30
|
+
const SSH_PATTERN = /^git@github\.com:([^/]+)\/([^/.]+?)(?:\.git)?$/;
|
|
31
|
+
/** Matches owner/repo shorthand (no slashes except the one separating owner/repo) */
|
|
32
|
+
const SHORTHAND_PATTERN = /^([a-zA-Z0-9_.-]+)\/([a-zA-Z0-9_.-]+)$/;
|
|
33
|
+
/** Default limit for listing repositories */
|
|
34
|
+
const DEFAULT_LIST_LIMIT = 30;
|
|
35
|
+
let GitHubRepositoryService = class GitHubRepositoryService {
|
|
36
|
+
execFile;
|
|
37
|
+
constructor(execFile) {
|
|
38
|
+
this.execFile = execFile;
|
|
39
|
+
}
|
|
40
|
+
async checkAuth() {
|
|
41
|
+
try {
|
|
42
|
+
// Use `gh auth token` instead of `gh auth status` because `gh auth status`
|
|
43
|
+
// exits non-zero when *any* configured account has a stale token, even if
|
|
44
|
+
// the active account is fully authenticated. `gh auth token` only checks the
|
|
45
|
+
// active account and exits 0 as long as it has a valid token.
|
|
46
|
+
await this.execFile('gh', ['auth', 'token']);
|
|
47
|
+
}
|
|
48
|
+
catch (error) {
|
|
49
|
+
const cause = error instanceof Error ? error : undefined;
|
|
50
|
+
const errnoCode = error?.code;
|
|
51
|
+
if (errnoCode === 'ENOENT') {
|
|
52
|
+
throw new GitHubAuthError('GitHub CLI (gh) is not installed. Install it from https://cli.github.com/', cause);
|
|
53
|
+
}
|
|
54
|
+
throw new GitHubAuthError('GitHub CLI is not authenticated. Run `gh auth login` to sign in.', cause);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
async listUserRepositories(options) {
|
|
58
|
+
const limit = options?.limit ?? DEFAULT_LIST_LIMIT;
|
|
59
|
+
const args = [
|
|
60
|
+
'repo',
|
|
61
|
+
'list',
|
|
62
|
+
'--json',
|
|
63
|
+
'name,nameWithOwner,description,isPrivate,pushedAt',
|
|
64
|
+
'--limit',
|
|
65
|
+
String(limit),
|
|
66
|
+
];
|
|
67
|
+
if (options?.search) {
|
|
68
|
+
// gh repo list does not have a --match flag; use jq to filter by name
|
|
69
|
+
const escaped = options.search.replace(/"/g, '\\"');
|
|
70
|
+
args.push('-q', `[.[] | select(.name | test("${escaped}"; "i"))]`);
|
|
71
|
+
}
|
|
72
|
+
try {
|
|
73
|
+
const { stdout } = await this.execFile('gh', args);
|
|
74
|
+
return JSON.parse(stdout);
|
|
75
|
+
}
|
|
76
|
+
catch (error) {
|
|
77
|
+
const cause = error instanceof Error ? error : undefined;
|
|
78
|
+
const errnoCode = error?.code;
|
|
79
|
+
if (errnoCode === 'ENOENT') {
|
|
80
|
+
throw new GitHubRepoListError('GitHub CLI (gh) is not installed. Install it from https://cli.github.com/', cause);
|
|
81
|
+
}
|
|
82
|
+
throw new GitHubRepoListError(`Failed to list GitHub repositories: ${cause?.message ?? String(error)}`, cause);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
async cloneRepository(nameWithOwner, destination, options) {
|
|
86
|
+
// Validate destination path — reject path traversal
|
|
87
|
+
const resolved = resolve(destination);
|
|
88
|
+
const normalized = normalize(resolved);
|
|
89
|
+
if (normalized !== resolved || destination.includes('..')) {
|
|
90
|
+
throw new GitHubCloneError(`Invalid clone destination: path traversal detected in "${destination}"`);
|
|
91
|
+
}
|
|
92
|
+
return new Promise((resolvePromise, reject) => {
|
|
93
|
+
const child = spawn('gh', ['repo', 'clone', nameWithOwner, resolved], {
|
|
94
|
+
stdio: ['ignore', 'pipe', 'pipe'],
|
|
95
|
+
});
|
|
96
|
+
let stderrOutput = '';
|
|
97
|
+
child.stderr?.on('data', (chunk) => {
|
|
98
|
+
const data = chunk.toString();
|
|
99
|
+
stderrOutput += data;
|
|
100
|
+
options?.onProgress?.(data);
|
|
101
|
+
});
|
|
102
|
+
child.stdout?.on('data', (chunk) => {
|
|
103
|
+
const data = chunk.toString();
|
|
104
|
+
options?.onProgress?.(data);
|
|
105
|
+
});
|
|
106
|
+
child.on('error', async (error) => {
|
|
107
|
+
await this.cleanupPartialClone(resolved);
|
|
108
|
+
reject(new GitHubCloneError(`Failed to clone ${nameWithOwner}: ${error.message}`, error));
|
|
109
|
+
});
|
|
110
|
+
child.on('close', async (code) => {
|
|
111
|
+
if (code === 0) {
|
|
112
|
+
resolvePromise();
|
|
113
|
+
}
|
|
114
|
+
else {
|
|
115
|
+
await this.cleanupPartialClone(resolved);
|
|
116
|
+
reject(new GitHubCloneError(`Clone of ${nameWithOwner} failed with exit code ${code}: ${stderrOutput.trim()}`));
|
|
117
|
+
}
|
|
118
|
+
});
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
parseGitHubUrl(url) {
|
|
122
|
+
const trimmed = url.trim();
|
|
123
|
+
if (!trimmed) {
|
|
124
|
+
throw new GitHubUrlParseError('URL cannot be empty');
|
|
125
|
+
}
|
|
126
|
+
// Try HTTPS format
|
|
127
|
+
const httpsMatch = trimmed.match(HTTPS_PATTERN);
|
|
128
|
+
if (httpsMatch) {
|
|
129
|
+
return {
|
|
130
|
+
owner: httpsMatch[1],
|
|
131
|
+
repo: httpsMatch[2],
|
|
132
|
+
nameWithOwner: `${httpsMatch[1]}/${httpsMatch[2]}`,
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
// Try SSH format
|
|
136
|
+
const sshMatch = trimmed.match(SSH_PATTERN);
|
|
137
|
+
if (sshMatch) {
|
|
138
|
+
return {
|
|
139
|
+
owner: sshMatch[1],
|
|
140
|
+
repo: sshMatch[2],
|
|
141
|
+
nameWithOwner: `${sshMatch[1]}/${sshMatch[2]}`,
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
// Try shorthand format (must be last — it's the loosest pattern)
|
|
145
|
+
const shorthandMatch = trimmed.match(SHORTHAND_PATTERN);
|
|
146
|
+
if (shorthandMatch) {
|
|
147
|
+
return {
|
|
148
|
+
owner: shorthandMatch[1],
|
|
149
|
+
repo: shorthandMatch[2],
|
|
150
|
+
nameWithOwner: `${shorthandMatch[1]}/${shorthandMatch[2]}`,
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
throw new GitHubUrlParseError(`Unrecognized GitHub URL format: "${trimmed}". ` +
|
|
154
|
+
'Supported formats: https://github.com/owner/repo, ' +
|
|
155
|
+
'git@github.com:owner/repo.git, or owner/repo shorthand.');
|
|
156
|
+
}
|
|
157
|
+
async cleanupPartialClone(destination) {
|
|
158
|
+
try {
|
|
159
|
+
await rm(destination, { recursive: true, force: true });
|
|
160
|
+
}
|
|
161
|
+
catch {
|
|
162
|
+
// Cleanup is best-effort
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
};
|
|
166
|
+
GitHubRepositoryService = __decorate([
|
|
167
|
+
injectable(),
|
|
168
|
+
__param(0, inject('ExecFunction')),
|
|
169
|
+
__metadata("design:paramtypes", [Function])
|
|
170
|
+
], GitHubRepositoryService);
|
|
171
|
+
export { GitHubRepositoryService };
|
|
@@ -4,12 +4,13 @@
|
|
|
4
4
|
* Deletes a feature, its worktree, and cancels any running agent.
|
|
5
5
|
* Optionally cleans up worktree and branches (local + remote).
|
|
6
6
|
*
|
|
7
|
-
* Usage: shep feat del <id> [--force] [--no-cleanup]
|
|
7
|
+
* Usage: shep feat del <id> [--force] [--no-cleanup] [--no-close-pr]
|
|
8
8
|
*
|
|
9
9
|
* @example
|
|
10
10
|
* $ shep feat del feat-123
|
|
11
11
|
* $ shep feat del feat-123 --force
|
|
12
12
|
* $ shep feat del feat-123 --force --no-cleanup
|
|
13
|
+
* $ shep feat del feat-123 --force --no-close-pr
|
|
13
14
|
*/
|
|
14
15
|
import { Command } from 'commander';
|
|
15
16
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"del.command.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/cli/commands/feat/del.command.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"del.command.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/cli/commands/feat/del.command.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAapC;;GAEG;AACH,wBAAgB,gBAAgB,IAAI,OAAO,CA2E1C"}
|
|
@@ -4,12 +4,13 @@
|
|
|
4
4
|
* Deletes a feature, its worktree, and cancels any running agent.
|
|
5
5
|
* Optionally cleans up worktree and branches (local + remote).
|
|
6
6
|
*
|
|
7
|
-
* Usage: shep feat del <id> [--force] [--no-cleanup]
|
|
7
|
+
* Usage: shep feat del <id> [--force] [--no-cleanup] [--no-close-pr]
|
|
8
8
|
*
|
|
9
9
|
* @example
|
|
10
10
|
* $ shep feat del feat-123
|
|
11
11
|
* $ shep feat del feat-123 --force
|
|
12
12
|
* $ shep feat del feat-123 --force --no-cleanup
|
|
13
|
+
* $ shep feat del feat-123 --force --no-close-pr
|
|
13
14
|
*/
|
|
14
15
|
import { Command } from 'commander';
|
|
15
16
|
import { container } from '../../../../../packages/core/src/infrastructure/di/container.js';
|
|
@@ -26,6 +27,7 @@ export function createDelCommand() {
|
|
|
26
27
|
.argument('<id>', 'Feature ID or prefix')
|
|
27
28
|
.option('-f, --force', 'Skip confirmation prompt')
|
|
28
29
|
.option('--no-cleanup', 'Skip worktree and branch cleanup')
|
|
30
|
+
.option('--no-close-pr', 'Keep the pull request open')
|
|
29
31
|
.action(async (featureId, options) => {
|
|
30
32
|
try {
|
|
31
33
|
// First show what we're about to delete
|
|
@@ -52,8 +54,29 @@ export function createDelCommand() {
|
|
|
52
54
|
default: true,
|
|
53
55
|
});
|
|
54
56
|
}
|
|
57
|
+
// Determine close-PR preference
|
|
58
|
+
const hasOpenPr = feature.pr?.status === 'Open';
|
|
59
|
+
let closePr;
|
|
60
|
+
if (options.closePr === false) {
|
|
61
|
+
closePr = false;
|
|
62
|
+
}
|
|
63
|
+
else if (hasOpenPr && cleanup) {
|
|
64
|
+
if (options.force) {
|
|
65
|
+
closePr = true;
|
|
66
|
+
}
|
|
67
|
+
else {
|
|
68
|
+
closePr = await confirm({
|
|
69
|
+
message: `Also close the pull request? (PR #${feature.pr.number})`,
|
|
70
|
+
default: true,
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
}
|
|
55
74
|
const deleteUseCase = container.resolve(DeleteFeatureUseCase);
|
|
56
|
-
|
|
75
|
+
const executeOptions = { cleanup };
|
|
76
|
+
if (closePr !== undefined) {
|
|
77
|
+
executeOptions.closePr = closePr;
|
|
78
|
+
}
|
|
79
|
+
await deleteUseCase.execute(feature.id, executeOptions);
|
|
57
80
|
messages.newline();
|
|
58
81
|
messages.success('Feature deleted');
|
|
59
82
|
console.log(` ${colors.muted('Name:')} ${feature.name}`);
|
|
@@ -61,6 +84,9 @@ export function createDelCommand() {
|
|
|
61
84
|
if (cleanup) {
|
|
62
85
|
console.log(` ${colors.muted('Cleanup:')} worktree, local branch, remote branch`);
|
|
63
86
|
}
|
|
87
|
+
if (closePr && hasOpenPr) {
|
|
88
|
+
console.log(` ${colors.muted('PR:')} #${feature.pr.number} closed`);
|
|
89
|
+
}
|
|
64
90
|
messages.newline();
|
|
65
91
|
}
|
|
66
92
|
catch (error) {
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Repo Add Command
|
|
3
|
+
*
|
|
4
|
+
* Import a GitHub repository by URL or interactively browse user's repos.
|
|
5
|
+
*
|
|
6
|
+
* Usage:
|
|
7
|
+
* shep repo add # Interactive wizard
|
|
8
|
+
* shep repo add --url owner/repo # Direct import by URL
|
|
9
|
+
* shep repo add --url <url> --dest /path # Override clone destination
|
|
10
|
+
*/
|
|
11
|
+
import { Command } from 'commander';
|
|
12
|
+
export declare function createAddCommand(): Command;
|
|
13
|
+
//# sourceMappingURL=add.command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"add.command.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/cli/commands/repo/add.command.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAcpC,wBAAgB,gBAAgB,IAAI,OAAO,CA0E1C"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Repo Add Command
|
|
3
|
+
*
|
|
4
|
+
* Import a GitHub repository by URL or interactively browse user's repos.
|
|
5
|
+
*
|
|
6
|
+
* Usage:
|
|
7
|
+
* shep repo add # Interactive wizard
|
|
8
|
+
* shep repo add --url owner/repo # Direct import by URL
|
|
9
|
+
* shep repo add --url <url> --dest /path # Override clone destination
|
|
10
|
+
*/
|
|
11
|
+
import { Command } from 'commander';
|
|
12
|
+
import { container } from '../../../../../packages/core/src/infrastructure/di/container.js';
|
|
13
|
+
import { getSettings } from '../../../../../packages/core/src/infrastructure/services/settings.service.js';
|
|
14
|
+
import { ImportGitHubRepositoryUseCase } from '../../../../../packages/core/src/application/use-cases/repositories/import-github-repository.use-case.js';
|
|
15
|
+
import { ListGitHubRepositoriesUseCase } from '../../../../../packages/core/src/application/use-cases/repositories/list-github-repositories.use-case.js';
|
|
16
|
+
import { GitHubAuthError, GitHubCloneError, GitHubUrlParseError, } from '../../../../../packages/core/src/application/ports/output/services/github-repository-service.interface.js';
|
|
17
|
+
import { messages } from '../../ui/index.js';
|
|
18
|
+
import { githubImportWizard } from '../../../tui/wizards/github-import.wizard.js';
|
|
19
|
+
export function createAddCommand() {
|
|
20
|
+
return new Command('add')
|
|
21
|
+
.description('Import a GitHub repository (clone and register)')
|
|
22
|
+
.option('--url <url>', 'GitHub repository URL or owner/repo shorthand')
|
|
23
|
+
.option('--dest <path>', 'Override clone destination directory')
|
|
24
|
+
.action(async (options) => {
|
|
25
|
+
try {
|
|
26
|
+
const importUseCase = container.resolve(ImportGitHubRepositoryUseCase);
|
|
27
|
+
let url;
|
|
28
|
+
let dest = options.dest;
|
|
29
|
+
if (options.url) {
|
|
30
|
+
url = options.url;
|
|
31
|
+
}
|
|
32
|
+
else {
|
|
33
|
+
// Interactive wizard
|
|
34
|
+
const gitHubService = container.resolve('IGitHubRepositoryService');
|
|
35
|
+
const listUseCase = container.resolve(ListGitHubRepositoriesUseCase);
|
|
36
|
+
const wizardResult = await githubImportWizard(gitHubService, listUseCase);
|
|
37
|
+
url = wizardResult.url;
|
|
38
|
+
if (!dest && wizardResult.dest) {
|
|
39
|
+
dest = wizardResult.dest;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
// Read default clone directory from settings
|
|
43
|
+
const settings = getSettings();
|
|
44
|
+
const defaultCloneDir = settings.environment?.defaultCloneDirectory;
|
|
45
|
+
const repository = await importUseCase.execute({
|
|
46
|
+
url,
|
|
47
|
+
dest,
|
|
48
|
+
defaultCloneDir,
|
|
49
|
+
});
|
|
50
|
+
messages.success(`Repository imported: ${repository.name}`);
|
|
51
|
+
messages.info(`Path: ${repository.path}`);
|
|
52
|
+
}
|
|
53
|
+
catch (error) {
|
|
54
|
+
if (error instanceof GitHubAuthError) {
|
|
55
|
+
messages.error('GitHub CLI is not authenticated. Run `gh auth login` to sign in.');
|
|
56
|
+
process.exitCode = 1;
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
if (error instanceof GitHubUrlParseError) {
|
|
60
|
+
messages.error(`Invalid GitHub URL: ${error.message}`);
|
|
61
|
+
messages.info('Supported formats: https://github.com/owner/repo, git@github.com:owner/repo.git, or owner/repo');
|
|
62
|
+
process.exitCode = 1;
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
if (error instanceof GitHubCloneError) {
|
|
66
|
+
messages.error(`Clone failed: ${error.message}`);
|
|
67
|
+
process.exitCode = 1;
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
// Handle Ctrl+C gracefully
|
|
71
|
+
if (error &&
|
|
72
|
+
typeof error === 'object' &&
|
|
73
|
+
'name' in error &&
|
|
74
|
+
error.name === 'ExitPromptError') {
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
const err = error instanceof Error ? error : new Error(String(error));
|
|
78
|
+
messages.error('Failed to import repository', err);
|
|
79
|
+
process.exitCode = 1;
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/cli/commands/repo/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/cli/commands/repo/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAKpC;;GAEG;AACH,wBAAgB,iBAAiB,IAAI,OAAO,CAQ3C"}
|
|
@@ -9,10 +9,12 @@
|
|
|
9
9
|
* Subcommands:
|
|
10
10
|
* shep repo ls List tracked repositories
|
|
11
11
|
* shep repo show <id> Display details of a tracked repository
|
|
12
|
+
* shep repo add Import a GitHub repository
|
|
12
13
|
*/
|
|
13
14
|
import { Command } from 'commander';
|
|
14
15
|
import { createShowCommand } from './show.command.js';
|
|
15
16
|
import { createLsCommand } from './ls.command.js';
|
|
17
|
+
import { createAddCommand } from './add.command.js';
|
|
16
18
|
/**
|
|
17
19
|
* Create the repo command with all subcommands
|
|
18
20
|
*/
|
|
@@ -20,6 +22,7 @@ export function createRepoCommand() {
|
|
|
20
22
|
const repo = new Command('repo')
|
|
21
23
|
.description('Manage tracked repositories')
|
|
22
24
|
.addCommand(createLsCommand())
|
|
23
|
-
.addCommand(createShowCommand())
|
|
25
|
+
.addCommand(createShowCommand())
|
|
26
|
+
.addCommand(createAddCommand());
|
|
24
27
|
return repo;
|
|
25
28
|
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GitHub Import Wizard
|
|
3
|
+
*
|
|
4
|
+
* Interactive TUI wizard that guides users through importing a GitHub repository.
|
|
5
|
+
* Offers two paths: paste a GitHub URL or browse the user's repositories.
|
|
6
|
+
* Returns the selected URL/nameWithOwner and optional destination override.
|
|
7
|
+
*/
|
|
8
|
+
import type { IGitHubRepositoryService } from '../../../../packages/core/src/application/ports/output/services/github-repository-service.interface.js';
|
|
9
|
+
import type { ListGitHubRepositoriesUseCase } from '../../../../packages/core/src/application/use-cases/repositories/list-github-repositories.use-case.js';
|
|
10
|
+
/**
|
|
11
|
+
* Result returned by the GitHub import wizard.
|
|
12
|
+
*/
|
|
13
|
+
export interface GitHubImportWizardResult {
|
|
14
|
+
/** GitHub URL or owner/repo shorthand */
|
|
15
|
+
url: string;
|
|
16
|
+
/** Optional override for clone destination directory */
|
|
17
|
+
dest?: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Runs the interactive GitHub import wizard.
|
|
21
|
+
*
|
|
22
|
+
* Steps:
|
|
23
|
+
* 1. Choose import method (URL input or browse repos)
|
|
24
|
+
* 2a. If URL: prompt for URL, validate with parseGitHubUrl
|
|
25
|
+
* 2b. If browse: fetch repos via listUseCase, display select list
|
|
26
|
+
* 3. Optionally prompt for destination directory override
|
|
27
|
+
*
|
|
28
|
+
* @param gitHubService - Service for URL validation
|
|
29
|
+
* @param listUseCase - Use case for listing user repos
|
|
30
|
+
* @returns The selected import target and optional destination
|
|
31
|
+
*/
|
|
32
|
+
export declare function githubImportWizard(gitHubService: IGitHubRepositoryService, listUseCase: ListGitHubRepositoriesUseCase): Promise<GitHubImportWizardResult>;
|
|
33
|
+
//# sourceMappingURL=github-import.wizard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"github-import.wizard.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/tui/wizards/github-import.wizard.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,OAAO,KAAK,EACV,wBAAwB,EAEzB,MAAM,4EAA4E,CAAC;AAEpF,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,2EAA2E,CAAC;AAG/H;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACvC,yCAAyC;IACzC,GAAG,EAAE,MAAM,CAAC;IACZ,wDAAwD;IACxD,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAoBD;;;;;;;;;;;;GAYG;AACH,wBAAsB,kBAAkB,CACtC,aAAa,EAAE,wBAAwB,EACvC,WAAW,EAAE,6BAA6B,GACzC,OAAO,CAAC,wBAAwB,CAAC,CAoCnC"}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GitHub Import Wizard
|
|
3
|
+
*
|
|
4
|
+
* Interactive TUI wizard that guides users through importing a GitHub repository.
|
|
5
|
+
* Offers two paths: paste a GitHub URL or browse the user's repositories.
|
|
6
|
+
* Returns the selected URL/nameWithOwner and optional destination override.
|
|
7
|
+
*/
|
|
8
|
+
import { select, input } from '@inquirer/prompts';
|
|
9
|
+
import { GitHubUrlParseError } from '../../../../packages/core/src/application/ports/output/services/github-repository-service.interface.js';
|
|
10
|
+
import { shepTheme } from '../themes/shep.theme.js';
|
|
11
|
+
/**
|
|
12
|
+
* Format a GitHub repo for display in the select list.
|
|
13
|
+
* Shows name, visibility badge, and truncated description.
|
|
14
|
+
*/
|
|
15
|
+
function formatRepoChoice(repo) {
|
|
16
|
+
const visibility = repo.isPrivate ? ' (private)' : '';
|
|
17
|
+
return {
|
|
18
|
+
name: `${repo.nameWithOwner}${visibility}`,
|
|
19
|
+
value: repo.nameWithOwner,
|
|
20
|
+
description: repo.description || undefined,
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Runs the interactive GitHub import wizard.
|
|
25
|
+
*
|
|
26
|
+
* Steps:
|
|
27
|
+
* 1. Choose import method (URL input or browse repos)
|
|
28
|
+
* 2a. If URL: prompt for URL, validate with parseGitHubUrl
|
|
29
|
+
* 2b. If browse: fetch repos via listUseCase, display select list
|
|
30
|
+
* 3. Optionally prompt for destination directory override
|
|
31
|
+
*
|
|
32
|
+
* @param gitHubService - Service for URL validation
|
|
33
|
+
* @param listUseCase - Use case for listing user repos
|
|
34
|
+
* @returns The selected import target and optional destination
|
|
35
|
+
*/
|
|
36
|
+
export async function githubImportWizard(gitHubService, listUseCase) {
|
|
37
|
+
// Step 1: Choose import method
|
|
38
|
+
const method = await select({
|
|
39
|
+
message: 'How would you like to add a GitHub repository?',
|
|
40
|
+
choices: [
|
|
41
|
+
{
|
|
42
|
+
name: 'Paste a GitHub URL',
|
|
43
|
+
value: 'url',
|
|
44
|
+
description: 'Enter a GitHub repository URL or owner/repo shorthand',
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
name: 'Browse my repositories',
|
|
48
|
+
value: 'browse',
|
|
49
|
+
description: 'Search and select from your GitHub repositories',
|
|
50
|
+
},
|
|
51
|
+
],
|
|
52
|
+
theme: shepTheme,
|
|
53
|
+
});
|
|
54
|
+
let url;
|
|
55
|
+
if (method === 'url') {
|
|
56
|
+
url = await promptForUrl(gitHubService);
|
|
57
|
+
}
|
|
58
|
+
else {
|
|
59
|
+
url = await promptForBrowse(listUseCase);
|
|
60
|
+
}
|
|
61
|
+
// Step 3: Optional destination override
|
|
62
|
+
const dest = await promptForDestination();
|
|
63
|
+
const result = { url };
|
|
64
|
+
if (dest) {
|
|
65
|
+
result.dest = dest;
|
|
66
|
+
}
|
|
67
|
+
return result;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Prompt the user for a GitHub URL and validate it.
|
|
71
|
+
* Re-prompts on invalid input until a valid URL is provided.
|
|
72
|
+
*/
|
|
73
|
+
async function promptForUrl(gitHubService) {
|
|
74
|
+
const url = await input({
|
|
75
|
+
message: 'Enter a GitHub repository URL or owner/repo',
|
|
76
|
+
validate: (value) => {
|
|
77
|
+
if (!value.trim()) {
|
|
78
|
+
return 'URL is required';
|
|
79
|
+
}
|
|
80
|
+
try {
|
|
81
|
+
gitHubService.parseGitHubUrl(value.trim());
|
|
82
|
+
return true;
|
|
83
|
+
}
|
|
84
|
+
catch (error) {
|
|
85
|
+
if (error instanceof GitHubUrlParseError) {
|
|
86
|
+
return error.message;
|
|
87
|
+
}
|
|
88
|
+
return 'Invalid GitHub URL format. Use https://github.com/owner/repo or owner/repo';
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
theme: shepTheme,
|
|
92
|
+
});
|
|
93
|
+
return url.trim();
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Prompt the user to browse and select from their GitHub repositories.
|
|
97
|
+
* Fetches repos via the list use case and displays them in a select prompt.
|
|
98
|
+
*/
|
|
99
|
+
async function promptForBrowse(listUseCase) {
|
|
100
|
+
const repos = await listUseCase.execute({ limit: 30 });
|
|
101
|
+
if (repos.length === 0) {
|
|
102
|
+
throw new Error('No repositories found. Make sure you have repositories on GitHub.');
|
|
103
|
+
}
|
|
104
|
+
const choices = repos.map(formatRepoChoice);
|
|
105
|
+
const selected = await select({
|
|
106
|
+
message: 'Select a repository to import',
|
|
107
|
+
choices,
|
|
108
|
+
theme: shepTheme,
|
|
109
|
+
});
|
|
110
|
+
return selected;
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Optionally prompt for a custom clone destination directory.
|
|
114
|
+
*/
|
|
115
|
+
async function promptForDestination() {
|
|
116
|
+
const dest = await input({
|
|
117
|
+
message: 'Clone destination (leave empty for default)',
|
|
118
|
+
theme: shepTheme,
|
|
119
|
+
});
|
|
120
|
+
return dest.trim() || undefined;
|
|
121
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Feature } from '../../../../../packages/core/src/domain/generated/output.js';
|
|
2
|
-
export declare function deleteFeature(featureId: string, cleanup?: boolean, cascadeDelete?: boolean): Promise<{
|
|
2
|
+
export declare function deleteFeature(featureId: string, cleanup?: boolean, cascadeDelete?: boolean, closePr?: boolean): Promise<{
|
|
3
3
|
feature?: Feature;
|
|
4
4
|
error?: string;
|
|
5
5
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delete-feature.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/web/app/actions/delete-feature.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sCAAsC,CAAC;AAEpE,wBAAsB,aAAa,CACjC,SAAS,EAAE,MAAM,EACjB,OAAO,CAAC,EAAE,OAAO,EACjB,aAAa,CAAC,EAAE,OAAO,
|
|
1
|
+
{"version":3,"file":"delete-feature.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/web/app/actions/delete-feature.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sCAAsC,CAAC;AAEpE,wBAAsB,aAAa,CACjC,SAAS,EAAE,MAAM,EACjB,OAAO,CAAC,EAAE,OAAO,EACjB,aAAa,CAAC,EAAE,OAAO,EACvB,OAAO,CAAC,EAAE,OAAO,GAChB,OAAO,CAAC;IAAE,OAAO,CAAC,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAoBhD"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use server';
|
|
2
2
|
import { resolve } from '../../lib/server-container.js';
|
|
3
|
-
export async function deleteFeature(featureId, cleanup, cascadeDelete) {
|
|
3
|
+
export async function deleteFeature(featureId, cleanup, cascadeDelete, closePr) {
|
|
4
4
|
if (!featureId?.trim()) {
|
|
5
5
|
return { error: 'id is required' };
|
|
6
6
|
}
|
|
@@ -11,6 +11,8 @@ export async function deleteFeature(featureId, cleanup, cascadeDelete) {
|
|
|
11
11
|
options.cleanup = cleanup;
|
|
12
12
|
if (cascadeDelete !== undefined)
|
|
13
13
|
options.cascadeDelete = cascadeDelete;
|
|
14
|
+
if (closePr !== undefined)
|
|
15
|
+
options.closePr = closePr;
|
|
14
16
|
const feature = Object.keys(options).length > 0
|
|
15
17
|
? await deleteFeatureUseCase.execute(featureId, options)
|
|
16
18
|
: await deleteFeatureUseCase.execute(featureId);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Repository } from '../../../../../packages/core/src/domain/generated/output.js';
|
|
2
|
+
interface ImportGitHubRepositoryInput {
|
|
3
|
+
url: string;
|
|
4
|
+
dest?: string;
|
|
5
|
+
}
|
|
6
|
+
export declare function importGitHubRepository(input: ImportGitHubRepositoryInput): Promise<{
|
|
7
|
+
repository?: Repository;
|
|
8
|
+
error?: string;
|
|
9
|
+
}>;
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=import-github-repository.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"import-github-repository.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/web/app/actions/import-github-repository.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sCAAsC,CAAC;AAOvE,UAAU,2BAA2B;IACnC,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,wBAAsB,sBAAsB,CAC1C,KAAK,EAAE,2BAA2B,GACjC,OAAO,CAAC;IAAE,UAAU,CAAC,EAAE,UAAU,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAwBtD"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
'use server';
|
|
2
|
+
import { resolve } from '../../lib/server-container.js';
|
|
3
|
+
import { GitHubAuthError, GitHubUrlParseError, GitHubCloneError, } from '../../../../../packages/core/src/application/ports/output/services/github-repository-service.interface.js';
|
|
4
|
+
export async function importGitHubRepository(input) {
|
|
5
|
+
const { url, dest } = input;
|
|
6
|
+
if (!url?.trim()) {
|
|
7
|
+
return { error: 'GitHub URL is required' };
|
|
8
|
+
}
|
|
9
|
+
try {
|
|
10
|
+
const useCase = resolve('ImportGitHubRepositoryUseCase');
|
|
11
|
+
const repository = await useCase.execute({ url, dest });
|
|
12
|
+
return { repository };
|
|
13
|
+
}
|
|
14
|
+
catch (error) {
|
|
15
|
+
if (error instanceof GitHubAuthError) {
|
|
16
|
+
return { error: 'GitHub CLI is not authenticated. Run `gh auth login` to sign in.' };
|
|
17
|
+
}
|
|
18
|
+
if (error instanceof GitHubUrlParseError) {
|
|
19
|
+
return { error: `Invalid GitHub URL: ${error.message}` };
|
|
20
|
+
}
|
|
21
|
+
if (error instanceof GitHubCloneError) {
|
|
22
|
+
return { error: `Clone failed: ${error.message}` };
|
|
23
|
+
}
|
|
24
|
+
const message = error instanceof Error ? error.message : 'Failed to import repository';
|
|
25
|
+
return { error: message };
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { GitHubRepo } from '../../../../../packages/core/src/application/ports/output/services/github-repository-service.interface.js';
|
|
2
|
+
interface ListGitHubRepositoriesInput {
|
|
3
|
+
search?: string;
|
|
4
|
+
limit?: number;
|
|
5
|
+
}
|
|
6
|
+
export declare function listGitHubRepositories(input?: ListGitHubRepositoriesInput): Promise<{
|
|
7
|
+
repos?: GitHubRepo[];
|
|
8
|
+
error?: string;
|
|
9
|
+
}>;
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=list-github-repositories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-github-repositories.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/web/app/actions/list-github-repositories.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oFAAoF,CAAC;AAGrH,UAAU,2BAA2B;IACnC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,wBAAsB,sBAAsB,CAC1C,KAAK,CAAC,EAAE,2BAA2B,GAClC,OAAO,CAAC;IAAE,KAAK,CAAC,EAAE,UAAU,EAAE,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAYnD"}
|