@shepai/cli 1.122.2-pr395.d35739a → 1.123.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/dist/packages/core/src/application/ports/output/services/git-pr-service.interface.d.ts +1 -55
- package/dist/packages/core/src/application/ports/output/services/git-pr-service.interface.d.ts.map +1 -1
- package/dist/packages/core/src/application/ports/output/services/git-pr-service.interface.js +0 -2
- package/dist/packages/core/src/infrastructure/di/container.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/di/container.js +0 -10
- package/dist/packages/core/src/infrastructure/services/git/git-pr.service.d.ts +0 -9
- package/dist/packages/core/src/infrastructure/services/git/git-pr.service.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/services/git/git-pr.service.js +0 -93
- package/dist/src/presentation/cli/commands/feat/index.d.ts.map +1 -1
- package/dist/src/presentation/cli/commands/feat/index.js +1 -3
- package/dist/src/presentation/cli/commands/repo/index.d.ts.map +1 -1
- package/dist/src/presentation/cli/commands/repo/index.js +1 -3
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/web/.next/BUILD_ID +1 -1
- package/web/.next/build-manifest.json +2 -2
- package/web/.next/fallback-build-manifest.json +2 -2
- package/web/.next/prerender-manifest.json +3 -3
- package/web/.next/required-server-files.js +2 -2
- package/web/.next/required-server-files.json +2 -2
- package/web/.next/server/app/(dashboard)/@drawer/create/page/server-reference-manifest.json +22 -22
- 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 +28 -28
- 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 +28 -28
- 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 +20 -20
- 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 +22 -22
- 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 +28 -28
- 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 +28 -28
- 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 +20 -20
- 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 +20 -20
- 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 +1 -1
- package/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/settings/page/server-reference-manifest.json +6 -6
- 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 +6 -6
- package/web/.next/server/app/skills/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/tools/page/server-reference-manifest.json +6 -6
- package/web/.next/server/app/tools/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/version/page/server-reference-manifest.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/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/8ba4b_server_app_(dashboard)_@drawer_repository_[repositoryId]_page_actions_f30d0343.js +1 -1
- package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_@drawer_repository_[repositoryId]_page_actions_f30d0343.js.map +1 -1
- package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_repository_[repositoryId]_page_actions_9f1775bb.js +1 -1
- package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_repository_[repositoryId]_page_actions_9f1775bb.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__06fef644._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__14664e9b._.js +2 -2
- package/web/.next/server/chunks/ssr/[root-of-the-server]__545792ab._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__545792ab._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__6b17a22d._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__6b17a22d._.js.map +1 -1
- 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]__7cbda1ea._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__7cbda1ea._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__804c006d._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__804c006d._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__8c553503._.js +2 -2
- package/web/.next/server/chunks/ssr/[root-of-the-server]__9e8b25ad._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__9e8b25ad._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__a7de2711._.js +2 -2
- package/web/.next/server/chunks/ssr/[root-of-the-server]__aed1d6f8._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__aed1d6f8._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__ce6057f6._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__ce6057f6._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_135edb9c._.js +1 -1
- package/web/.next/server/chunks/ssr/_135edb9c._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_2f6f48b8._.js +1 -1
- package/web/.next/server/chunks/ssr/_2f6f48b8._.js.map +1 -1
- package/web/.next/server/chunks/ssr/{_59905c6b._.js → _960ceb5d._.js} +2 -2
- package/web/.next/server/chunks/ssr/{_59905c6b._.js.map → _960ceb5d._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/_cc77a143._.js +1 -1
- package/web/.next/server/chunks/ssr/_cc77a143._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_e9703421._.js +1 -1
- package/web/.next/server/chunks/ssr/_e9703421._.js.map +1 -1
- package/web/.next/server/chunks/ssr/{_8042b250._.js → _fd4c574b._.js} +2 -2
- package/web/.next/server/chunks/ssr/{_8042b250._.js.map → _fd4c574b._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js +1 -1
- package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_5f039db1._.js +2 -2
- package/web/.next/server/chunks/ssr/src_presentation_web_5f039db1._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_2a52b697.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_2a52b697.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_1fa8042e.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_1fa8042e.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_24684200.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_24684200.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_c4337169._.js +2 -2
- package/web/.next/server/chunks/ssr/src_presentation_web_c4337169._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_bf50c527._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_de814675._.js +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/chunks/ssr/src_presentation_web_db779ef4._.js +3 -0
- package/web/.next/server/chunks/ssr/{src_presentation_web_7df6451f._.js.map → src_presentation_web_db779ef4._.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 +34 -34
- package/web/.next/static/chunks/{47030173ef438c4c.js → 310be54600c8ce20.js} +2 -2
- package/web/.next/static/chunks/{16c125d4054dae40.js → 373e10090c6410c4.js} +1 -1
- package/web/.next/static/chunks/{4aadcf496c0c45da.js → 3f6c44cbad751310.js} +1 -1
- package/web/.next/static/chunks/{44ec09b4f33c494d.js → 64d063449c3be0ec.js} +1 -1
- package/web/.next/static/chunks/694718e5449b3150.js +1 -0
- package/web/.next/static/chunks/{28882fc716f51419.js → 878643f90bc6360f.js} +2 -2
- package/web/.next/static/chunks/94af5be1ccf8842e.js +1 -0
- package/web/.next/static/chunks/{5738cc053b378225.js → 9821072252ddb89a.js} +1 -1
- package/web/.next/static/chunks/{2d718a04eb97fa9c.js → e418898e8e02f50a.js} +1 -1
- package/web/.next/static/chunks/{3c8f903477aacd29.js → f0dfeedb263eb906.js} +1 -1
- package/dist/packages/core/src/application/use-cases/features/rebase-feature.use-case.d.ts +0 -21
- package/dist/packages/core/src/application/use-cases/features/rebase-feature.use-case.d.ts.map +0 -1
- package/dist/packages/core/src/application/use-cases/features/rebase-feature.use-case.js +0 -58
- package/dist/packages/core/src/application/use-cases/sync-fork-main.use-case.d.ts +0 -18
- package/dist/packages/core/src/application/use-cases/sync-fork-main.use-case.d.ts.map +0 -1
- package/dist/packages/core/src/application/use-cases/sync-fork-main.use-case.js +0 -40
- package/dist/src/presentation/cli/commands/feat/rebase.command.d.ts +0 -13
- package/dist/src/presentation/cli/commands/feat/rebase.command.d.ts.map +0 -1
- package/dist/src/presentation/cli/commands/feat/rebase.command.js +0 -45
- package/dist/src/presentation/cli/commands/repo/sync.command.d.ts +0 -12
- package/dist/src/presentation/cli/commands/repo/sync.command.d.ts.map +0 -1
- package/dist/src/presentation/cli/commands/repo/sync.command.js +0 -38
- package/web/.next/server/chunks/ssr/src_presentation_web_7df6451f._.js +0 -3
- package/web/.next/static/chunks/0b7e384fe33dc5d4.js +0 -1
- package/web/.next/static/chunks/6bc9ac207dab5ad3.js +0 -1
- /package/web/.next/static/{8e_LzmibF0x2F_XwXUjHz → gBTe97SiNDA2hbG9dbfpb}/_buildManifest.js +0 -0
- /package/web/.next/static/{8e_LzmibF0x2F_XwXUjHz → gBTe97SiNDA2hbG9dbfpb}/_clientMiddlewareManifest.json +0 -0
- /package/web/.next/static/{8e_LzmibF0x2F_XwXUjHz → gBTe97SiNDA2hbG9dbfpb}/_ssgManifest.js +0 -0
package/dist/packages/core/src/application/ports/output/services/git-pr-service.interface.d.ts
CHANGED
|
@@ -17,9 +17,7 @@ export declare enum GitPrErrorCode {
|
|
|
17
17
|
BRANCH_NOT_FOUND = "BRANCH_NOT_FOUND",
|
|
18
18
|
GIT_ERROR = "GIT_ERROR",
|
|
19
19
|
MERGE_FAILED = "MERGE_FAILED",
|
|
20
|
-
PR_NOT_FOUND = "PR_NOT_FOUND"
|
|
21
|
-
REBASE_CONFLICT = "REBASE_CONFLICT",
|
|
22
|
-
NOT_A_FORK = "NOT_A_FORK"
|
|
20
|
+
PR_NOT_FOUND = "PR_NOT_FOUND"
|
|
23
21
|
}
|
|
24
22
|
/**
|
|
25
23
|
* Typed error for git PR operations.
|
|
@@ -320,57 +318,5 @@ export interface IGitPrService {
|
|
|
320
318
|
* @throws GitPrError with GH_NOT_FOUND or GIT_ERROR code on failure
|
|
321
319
|
*/
|
|
322
320
|
getFailureLogs(cwd: string, runId: string, branch: string, logMaxChars?: number): Promise<string>;
|
|
323
|
-
/**
|
|
324
|
-
* Detect whether the current repository is a GitHub fork.
|
|
325
|
-
* Calls `gh repo view --json parent` once and returns both the boolean result and the
|
|
326
|
-
* parent clone URL so callers can pass it to ensureUpstreamRemote() without a second
|
|
327
|
-
* gh invocation (NFR-9).
|
|
328
|
-
*
|
|
329
|
-
* @param cwd - Working directory path (inside the git repo)
|
|
330
|
-
* @returns Object with isFork boolean and optional upstreamUrl from parent
|
|
331
|
-
* @throws GitPrError with GIT_ERROR code on unexpected failures
|
|
332
|
-
*/
|
|
333
|
-
isFork(cwd: string): Promise<{
|
|
334
|
-
isFork: boolean;
|
|
335
|
-
upstreamUrl?: string;
|
|
336
|
-
}>;
|
|
337
|
-
/**
|
|
338
|
-
* Ensure a remote named "upstream" exists in the repo.
|
|
339
|
-
* If it does not exist, adds it using the provided upstreamUrl.
|
|
340
|
-
* Idempotent: if the remote already exists, this is a no-op.
|
|
341
|
-
*
|
|
342
|
-
* @param cwd - Working directory path (inside the git repo)
|
|
343
|
-
* @param upstreamUrl - Clone URL of the upstream (parent) repository
|
|
344
|
-
* @throws GitPrError with GIT_ERROR code on failure
|
|
345
|
-
*/
|
|
346
|
-
ensureUpstreamRemote(cwd: string, upstreamUrl: string): Promise<void>;
|
|
347
|
-
/**
|
|
348
|
-
* Fetch the latest refs from the upstream remote.
|
|
349
|
-
*
|
|
350
|
-
* @param cwd - Working directory path (inside the git repo)
|
|
351
|
-
* @throws GitPrError with GIT_ERROR or NETWORK_ERROR code on failure
|
|
352
|
-
*/
|
|
353
|
-
fetchUpstream(cwd: string): Promise<void>;
|
|
354
|
-
/**
|
|
355
|
-
* Sync the local main branch to exactly match upstream/main using
|
|
356
|
-
* `git reset --hard upstream/main`. The upstream remote must already exist.
|
|
357
|
-
* Idempotent: if local main already matches upstream/main, this is a no-op.
|
|
358
|
-
*
|
|
359
|
-
* @param cwd - Working directory path (inside the git repo)
|
|
360
|
-
* @throws GitPrError with GIT_ERROR code on failure
|
|
361
|
-
*/
|
|
362
|
-
syncForkMain(cwd: string): Promise<void>;
|
|
363
|
-
/**
|
|
364
|
-
* Rebase the specified branch onto the target branch (e.g., main).
|
|
365
|
-
* On conflict, automatically runs `git rebase --abort` to keep the worktree clean,
|
|
366
|
-
* then throws GitPrError with REBASE_CONFLICT listing the conflicting files.
|
|
367
|
-
*
|
|
368
|
-
* @param cwd - Working directory of the feature worktree
|
|
369
|
-
* @param branch - The branch to rebase (must be checked out in cwd)
|
|
370
|
-
* @param onto - The target branch to rebase onto (e.g., 'main')
|
|
371
|
-
* @throws GitPrError with REBASE_CONFLICT code (includes conflicting file list)
|
|
372
|
-
* @throws GitPrError with GIT_ERROR code on other failures
|
|
373
|
-
*/
|
|
374
|
-
rebase(cwd: string, branch: string, onto: string): Promise<void>;
|
|
375
321
|
}
|
|
376
322
|
//# sourceMappingURL=git-pr-service.interface.d.ts.map
|
package/dist/packages/core/src/application/ports/output/services/git-pr-service.interface.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"git-pr-service.interface.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/core/src/application/ports/output/services/git-pr-service.interface.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,wCAAwC,CAAC;AAEvE;;GAEG;AACH,oBAAY,cAAc;IACxB,cAAc,mBAAmB;IACjC,YAAY,iBAAiB;IAC7B,YAAY,iBAAiB;IAC7B,aAAa,kBAAkB;IAC/B,UAAU,eAAe;IACzB,gBAAgB,qBAAqB;IACrC,SAAS,cAAc;IACvB,YAAY,iBAAiB;IAC7B,YAAY,iBAAiB;
|
|
1
|
+
{"version":3,"file":"git-pr-service.interface.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/core/src/application/ports/output/services/git-pr-service.interface.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,wCAAwC,CAAC;AAEvE;;GAEG;AACH,oBAAY,cAAc;IACxB,cAAc,mBAAmB;IACjC,YAAY,iBAAiB;IAC7B,YAAY,iBAAiB;IAC7B,aAAa,kBAAkB;IAC/B,UAAU,eAAe;IACzB,gBAAg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UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;IAExE;;;;;;;OAOG;IACH,YAAY,CAAC,GAAG,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;IAEnE;;;;;;OAMG;IACH,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC,CAAC;IAErD;;;;;;;;;;;;OAYG;IACH,WAAW,CACT,GAAG,EAAE,MAAM,EACX,aAAa,EAAE,MAAM,EACrB,UAAU,EAAE,MAAM,EAClB,eAAe,CAAC,EAAE,MAAM,GACvB,OAAO,CAAC,OAAO,CAAC,CAAC;IAEpB;;;;;;;;;;;;OAYG;IACH,gBAAgB,CACd,GAAG,EAAE,MAAM,EACX,aAAa,EAAE,MAAM,EACrB,UAAU,EAAE,MAAM,EAClB,aAAa,EAAE,MAAM,EACrB,SAAS,CAAC,EAAE,OAAO,GAClB,OAAO,CAAC,IAAI,CAAC,CAAC;IAEjB;;;;;;;OAOG;IACH,kBAAkB,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,GAAG,SAAS,CAAC,CAAC;IAEhF;;;;;;;;;;;OAWG;IACH,cAAc,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;CACnG"}
|
package/dist/packages/core/src/application/ports/output/services/git-pr-service.interface.js
CHANGED
|
@@ -18,8 +18,6 @@ export var GitPrErrorCode;
|
|
|
18
18
|
GitPrErrorCode["GIT_ERROR"] = "GIT_ERROR";
|
|
19
19
|
GitPrErrorCode["MERGE_FAILED"] = "MERGE_FAILED";
|
|
20
20
|
GitPrErrorCode["PR_NOT_FOUND"] = "PR_NOT_FOUND";
|
|
21
|
-
GitPrErrorCode["REBASE_CONFLICT"] = "REBASE_CONFLICT";
|
|
22
|
-
GitPrErrorCode["NOT_A_FORK"] = "NOT_A_FORK";
|
|
23
21
|
})(GitPrErrorCode || (GitPrErrorCode = {}));
|
|
24
22
|
/**
|
|
25
23
|
* Typed error for git PR operations.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"container.d.ts","sourceRoot":"","sources":["../../../../../../packages/core/src/infrastructure/di/container.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,kBAAkB,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"container.d.ts","sourceRoot":"","sources":["../../../../../../packages/core/src/infrastructure/di/container.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,kBAAkB,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAoHrC;;;;;;GAMG;AACH,wBAAsB,mBAAmB,IAAI,OAAO,CAAC,OAAO,SAAS,CAAC,CAiUrE;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,IAAI,OAAO,CAEhD;AAED;;;GAGG;AACH,OAAO,EAAE,SAAS,EAAE,CAAC"}
|
|
@@ -80,8 +80,6 @@ import { CheckAndUnblockFeaturesUseCase } from '../../application/use-cases/feat
|
|
|
80
80
|
import { UpdateFeatureLifecycleUseCase } from '../../application/use-cases/features/update/update-feature-lifecycle.use-case.js';
|
|
81
81
|
import { CleanupFeatureWorktreeUseCase } from '../../application/use-cases/features/cleanup-feature-worktree.use-case.js';
|
|
82
82
|
import { UpgradeCliUseCase } from '../../application/use-cases/upgrade/upgrade-cli.use-case.js';
|
|
83
|
-
import { SyncForkMainUseCase } from '../../application/use-cases/sync-fork-main.use-case.js';
|
|
84
|
-
import { RebaseFeatureUseCase } from '../../application/use-cases/features/rebase-feature.use-case.js';
|
|
85
83
|
// Session listing
|
|
86
84
|
import { ClaudeCodeSessionRepository } from '../services/agents/sessions/claude-code-session.repository.js';
|
|
87
85
|
import { StubSessionRepository } from '../services/agents/sessions/stub-session.repository.js';
|
|
@@ -297,8 +295,6 @@ export async function initializeContainer() {
|
|
|
297
295
|
container.registerSingleton(UpdateFeatureLifecycleUseCase);
|
|
298
296
|
container.registerSingleton(CleanupFeatureWorktreeUseCase);
|
|
299
297
|
container.registerSingleton(UpgradeCliUseCase);
|
|
300
|
-
container.registerSingleton(SyncForkMainUseCase);
|
|
301
|
-
container.registerSingleton(RebaseFeatureUseCase);
|
|
302
298
|
// Session repositories (per-AgentType string tokens)
|
|
303
299
|
container.register(`IAgentSessionRepository:${AgentType.ClaudeCode}`, {
|
|
304
300
|
useFactory: () => new ClaudeCodeSessionRepository(),
|
|
@@ -389,12 +385,6 @@ export async function initializeContainer() {
|
|
|
389
385
|
container.register('UpgradeCliUseCase', {
|
|
390
386
|
useFactory: (c) => c.resolve(UpgradeCliUseCase),
|
|
391
387
|
});
|
|
392
|
-
container.register('SyncForkMainUseCase', {
|
|
393
|
-
useFactory: (c) => c.resolve(SyncForkMainUseCase),
|
|
394
|
-
});
|
|
395
|
-
container.register('RebaseFeatureUseCase', {
|
|
396
|
-
useFactory: (c) => c.resolve(RebaseFeatureUseCase),
|
|
397
|
-
});
|
|
398
388
|
_initialized = true;
|
|
399
389
|
return container;
|
|
400
390
|
}
|
|
@@ -45,14 +45,5 @@ export declare class GitPrService implements IGitPrService {
|
|
|
45
45
|
private parseGhError;
|
|
46
46
|
private parsePrNumberFromUrl;
|
|
47
47
|
private parseDiffStat;
|
|
48
|
-
isFork(cwd: string): Promise<{
|
|
49
|
-
isFork: boolean;
|
|
50
|
-
upstreamUrl?: string;
|
|
51
|
-
}>;
|
|
52
|
-
ensureUpstreamRemote(cwd: string, upstreamUrl: string): Promise<void>;
|
|
53
|
-
fetchUpstream(cwd: string): Promise<void>;
|
|
54
|
-
syncForkMain(cwd: string): Promise<void>;
|
|
55
|
-
rebase(cwd: string, branch: string, onto: string): Promise<void>;
|
|
56
|
-
private parseConflictFiles;
|
|
57
48
|
}
|
|
58
49
|
//# sourceMappingURL=git-pr.service.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"git-pr.service.d.ts","sourceRoot":"","sources":["../../../../../../../packages/core/src/infrastructure/services/git/git-pr.service.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wEAAwE,CAAC;AAC5G,OAAO,KAAK,EACV,cAAc,EAGd,WAAW,EACX,QAAQ,EACR,aAAa,EACb,cAAc,EACd,YAAY,EACb,MAAM,wEAAwE,CAAC;AAUhF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAE1D,qBACa,YAAa,YAAW,aAAa;IACZ,OAAO,CAAC,QAAQ,CAAC,QAAQ;gBAAR,QAAQ,EAAE,YAAY;IAErE,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAKxC,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAgBjD,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAgF9C,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAKnD,qBAAqB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAKpD,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAWxD,IAAI,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IAYvE,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,C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AAG,EAAE,MAAM,EACX,aAAa,EAAE,MAAM,EACrB,UAAU,EAAE,MAAM,EAClB,eAAe,CAAC,EAAE,MAAM,GACvB,OAAO,CAAC,OAAO,CAAC;IA6CnB;;;OAGG;YACW,UAAU;IAmBlB,cAAc,CAClB,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,MAAM,EACf,WAAW,SAAS,GACnB,OAAO,CAAC,MAAM,CAAC;IAWlB,OAAO,CAAC,WAAW;IAQnB,OAAO,CAAC,cAAc;IAMtB,OAAO,CAAC,gBAAgB;IAKxB,OAAO,CAAC,aAAa;IAcrB,OAAO,CAAC,YAAY;IAepB,OAAO,CAAC,oBAAoB;IAK5B,OAAO,CAAC,aAAa;
|
|
1
|
+
{"version":3,"file":"git-pr.service.d.ts","sourceRoot":"","sources":["../../../../../../../packages/core/src/infrastructure/services/git/git-pr.service.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wEAAwE,CAAC;AAC5G,OAAO,KAAK,EACV,cAAc,EAGd,WAAW,EACX,QAAQ,EACR,aAAa,EACb,cAAc,EACd,YAAY,EACb,MAAM,wEAAwE,CAAC;AAUhF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAE1D,qBACa,YAAa,YAAW,aAAa;IACZ,OAAO,CAAC,QAAQ,CAAC,QAAQ;gBAAR,QAAQ,EAAE,YAAY;IAErE,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAKxC,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAgBjD,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAgF9C,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAKnD,q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IAevE,YAAY,CAAC,GAAG,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC;IAaxE,OAAO,CAAC,gBAAgB;IAexB,OAAO,CAAC,aAAa;IAmFf,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC;IAoCpD,kBAAkB,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,GAAG,SAAS,CAAC;IAc/E,WAAW,CACf,GAAG,EAAE,MAAM,EACX,aAAa,EAAE,MAAM,EACrB,UAAU,EAAE,MAAM,EAClB,eAAe,CAAC,EAAE,MAAM,GACvB,OAAO,CAAC,OAAO,CAAC;IA6CnB;;;OAGG;YACW,UAAU;IAmBlB,cAAc,CAClB,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,MAAM,EACf,WAAW,SAAS,GACnB,OAAO,CAAC,MAAM,CAAC;IAWlB,OAAO,CAAC,WAAW;IAQnB,OAAO,CAAC,cAAc;IAMtB,OAAO,CAAC,gBAAgB;IAKxB,OAAO,CAAC,aAAa;IAcrB,OAAO,CAAC,YAAY;IAepB,OAAO,CAAC,oBAAoB;IAK5B,OAAO,CAAC,aAAa;CAiBtB"}
|
|
@@ -652,99 +652,6 @@ let GitPrService = class GitPrService {
|
|
|
652
652
|
commitCount,
|
|
653
653
|
};
|
|
654
654
|
}
|
|
655
|
-
async isFork(cwd) {
|
|
656
|
-
try {
|
|
657
|
-
const { stdout } = await this.execFile('gh', ['repo', 'view', '--json', 'parent', '--jq', '.parent.url'], { cwd });
|
|
658
|
-
const url = stdout.trim();
|
|
659
|
-
if (!url || url === 'null') {
|
|
660
|
-
return { isFork: false };
|
|
661
|
-
}
|
|
662
|
-
return { isFork: true, upstreamUrl: url };
|
|
663
|
-
}
|
|
664
|
-
catch {
|
|
665
|
-
return { isFork: false };
|
|
666
|
-
}
|
|
667
|
-
}
|
|
668
|
-
async ensureUpstreamRemote(cwd, upstreamUrl) {
|
|
669
|
-
try {
|
|
670
|
-
await this.execFile('git', ['remote', 'get-url', 'upstream'], { cwd });
|
|
671
|
-
// Remote already exists — no-op
|
|
672
|
-
}
|
|
673
|
-
catch {
|
|
674
|
-
// Remote does not exist — add it
|
|
675
|
-
try {
|
|
676
|
-
await this.execFile('git', ['remote', 'add', 'upstream', upstreamUrl], { cwd });
|
|
677
|
-
}
|
|
678
|
-
catch (error) {
|
|
679
|
-
throw this.parseGitError(error);
|
|
680
|
-
}
|
|
681
|
-
}
|
|
682
|
-
}
|
|
683
|
-
async fetchUpstream(cwd) {
|
|
684
|
-
try {
|
|
685
|
-
await this.execFile('git', ['fetch', 'upstream'], { cwd });
|
|
686
|
-
}
|
|
687
|
-
catch (error) {
|
|
688
|
-
throw this.parseGitError(error);
|
|
689
|
-
}
|
|
690
|
-
}
|
|
691
|
-
async syncForkMain(cwd) {
|
|
692
|
-
// Save current branch to restore after sync
|
|
693
|
-
let currentBranch;
|
|
694
|
-
try {
|
|
695
|
-
const { stdout } = await this.execFile('git', ['symbolic-ref', '--short', 'HEAD'], { cwd });
|
|
696
|
-
currentBranch = stdout.trim();
|
|
697
|
-
}
|
|
698
|
-
catch {
|
|
699
|
-
// Detached HEAD — save commit hash instead
|
|
700
|
-
const { stdout } = await this.execFile('git', ['rev-parse', 'HEAD'], { cwd });
|
|
701
|
-
currentBranch = stdout.trim();
|
|
702
|
-
}
|
|
703
|
-
try {
|
|
704
|
-
await this.fetchUpstream(cwd);
|
|
705
|
-
await this.execFile('git', ['checkout', 'main'], { cwd });
|
|
706
|
-
await this.execFile('git', ['reset', '--hard', 'upstream/main'], { cwd });
|
|
707
|
-
}
|
|
708
|
-
finally {
|
|
709
|
-
// Restore previous branch even if sync partially fails
|
|
710
|
-
try {
|
|
711
|
-
await this.execFile('git', ['checkout', currentBranch], { cwd });
|
|
712
|
-
}
|
|
713
|
-
catch {
|
|
714
|
-
// best effort — ignore restore failure
|
|
715
|
-
}
|
|
716
|
-
}
|
|
717
|
-
}
|
|
718
|
-
async rebase(cwd, branch, onto) {
|
|
719
|
-
try {
|
|
720
|
-
await this.execFile('git', ['rebase', onto], { cwd });
|
|
721
|
-
}
|
|
722
|
-
catch (error) {
|
|
723
|
-
// Extract stdout/stderr from the exec error to find conflict file names
|
|
724
|
-
const stdout = error.stdout ?? '';
|
|
725
|
-
const stderr = error.stderr ?? '';
|
|
726
|
-
const combined = `${stdout}\n${stderr}`;
|
|
727
|
-
const conflictFiles = this.parseConflictFiles(combined);
|
|
728
|
-
// Abort to keep the worktree clean
|
|
729
|
-
try {
|
|
730
|
-
await this.execFile('git', ['rebase', '--abort'], { cwd });
|
|
731
|
-
}
|
|
732
|
-
catch {
|
|
733
|
-
// abort is best-effort — ignore failure
|
|
734
|
-
}
|
|
735
|
-
if (conflictFiles.length > 0) {
|
|
736
|
-
const fileList = conflictFiles.map((f) => ` - ${f}`).join('\n');
|
|
737
|
-
throw new GitPrError(`Rebase of '${branch}' onto '${onto}' failed due to conflicts.\n` +
|
|
738
|
-
`Conflicting files:\n${fileList}\n\n` +
|
|
739
|
-
`Resolve the conflicts manually then re-run the rebase command.`, GitPrErrorCode.REBASE_CONFLICT, error instanceof Error ? error : undefined);
|
|
740
|
-
}
|
|
741
|
-
throw this.parseGitError(error);
|
|
742
|
-
}
|
|
743
|
-
}
|
|
744
|
-
parseConflictFiles(output) {
|
|
745
|
-
const matches = output.matchAll(/CONFLICT \(content\): Merge conflict in (.+)/g);
|
|
746
|
-
return [...matches].map((m) => m[1].trim());
|
|
747
|
-
}
|
|
748
655
|
};
|
|
749
656
|
GitPrService = __decorate([
|
|
750
657
|
injectable(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/cli/commands/feat/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/cli/commands/feat/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAYpC;;GAEG;AACH,wBAAgB,iBAAiB,IAAI,OAAO,CAa3C"}
|
|
@@ -20,7 +20,6 @@ import { createReviewCommand } from './review.command.js';
|
|
|
20
20
|
import { createApproveCommand } from './approve.command.js';
|
|
21
21
|
import { createRejectCommand } from './reject.command.js';
|
|
22
22
|
import { createLogsCommand } from './logs.command.js';
|
|
23
|
-
import { createRebaseCommand } from './rebase.command.js';
|
|
24
23
|
/**
|
|
25
24
|
* Create the feat command group
|
|
26
25
|
*/
|
|
@@ -36,6 +35,5 @@ export function createFeatCommand() {
|
|
|
36
35
|
.addCommand(createReviewCommand())
|
|
37
36
|
.addCommand(createApproveCommand())
|
|
38
37
|
.addCommand(createRejectCommand())
|
|
39
|
-
.addCommand(createLogsCommand())
|
|
40
|
-
.addCommand(createRebaseCommand());
|
|
38
|
+
.addCommand(createLogsCommand());
|
|
41
39
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/cli/commands/repo/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/cli/commands/repo/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIpC;;GAEG;AACH,wBAAgB,iBAAiB,IAAI,OAAO,CAO3C"}
|
|
@@ -13,7 +13,6 @@
|
|
|
13
13
|
import { Command } from 'commander';
|
|
14
14
|
import { createShowCommand } from './show.command.js';
|
|
15
15
|
import { createLsCommand } from './ls.command.js';
|
|
16
|
-
import { createSyncCommand } from './sync.command.js';
|
|
17
16
|
/**
|
|
18
17
|
* Create the repo command with all subcommands
|
|
19
18
|
*/
|
|
@@ -21,7 +20,6 @@ export function createRepoCommand() {
|
|
|
21
20
|
const repo = new Command('repo')
|
|
22
21
|
.description('Manage tracked repositories')
|
|
23
22
|
.addCommand(createLsCommand())
|
|
24
|
-
.addCommand(createShowCommand())
|
|
25
|
-
.addCommand(createSyncCommand());
|
|
23
|
+
.addCommand(createShowCommand());
|
|
26
24
|
return repo;
|
|
27
25
|
}
|