@solaqua/gji 0.10.0 → 0.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +83 -426
- package/dist/back.d.ts +3 -0
- package/dist/back.js +19 -7
- package/dist/bootstrap-output.d.ts +3 -0
- package/dist/bootstrap-output.js +27 -0
- package/dist/bootstrap-preview.d.ts +10 -0
- package/dist/bootstrap-preview.js +21 -0
- package/dist/clean.js +27 -3
- package/dist/cli.d.ts +4 -0
- package/dist/cli.js +140 -22
- package/dist/clone-failure-store.d.ts +18 -0
- package/dist/clone-failure-store.js +230 -0
- package/dist/command-runner.d.ts +6 -0
- package/dist/command-runner.js +38 -0
- package/dist/completion.js +7 -2
- package/dist/config-command.d.ts +1 -0
- package/dist/config-command.js +7 -1
- package/dist/config.d.ts +26 -1
- package/dist/config.js +110 -6
- package/dist/context-card.d.ts +1 -0
- package/dist/context-card.js +25 -0
- package/dist/dependency-bootstrap-prompt.d.ts +24 -0
- package/dist/dependency-bootstrap-prompt.js +103 -0
- package/dist/dependency-bootstrap.d.ts +129 -0
- package/dist/dependency-bootstrap.js +566 -0
- package/dist/dir-clone.d.ts +33 -0
- package/dist/dir-clone.js +505 -0
- package/dist/doctor.js +21 -0
- package/dist/done.d.ts +10 -0
- package/dist/done.js +210 -0
- package/dist/file-sync.js +71 -22
- package/dist/format-bytes.d.ts +1 -0
- package/dist/format-bytes.js +14 -0
- package/dist/fs-utils.d.ts +4 -0
- package/dist/fs-utils.js +26 -0
- package/dist/git.d.ts +5 -0
- package/dist/git.js +50 -0
- package/dist/gji-bundle.mjs +6189 -1313
- package/dist/go-resolver.d.ts +35 -0
- package/dist/go-resolver.js +185 -0
- package/dist/go.d.ts +6 -2
- package/dist/go.js +270 -62
- package/dist/hooks.d.ts +2 -1
- package/dist/hooks.js +20 -8
- package/dist/hub.d.ts +31 -0
- package/dist/hub.js +287 -0
- package/dist/init.js +30 -22
- package/dist/install-prompt.d.ts +1 -0
- package/dist/install-prompt.js +3 -25
- package/dist/ls.js +9 -1
- package/dist/navigation-output.d.ts +11 -0
- package/dist/navigation-output.js +6 -0
- package/dist/new.d.ts +14 -2
- package/dist/new.js +422 -38
- package/dist/pr-open.js +2 -10
- package/dist/pr.d.ts +6 -2
- package/dist/pr.js +135 -30
- package/dist/pull-requests.d.ts +1 -0
- package/dist/pull-requests.js +32 -3
- package/dist/remove.js +22 -0
- package/dist/repo.d.ts +4 -0
- package/dist/repo.js +61 -6
- package/dist/run-hook.js +2 -0
- package/dist/safe-destination.d.ts +15 -0
- package/dist/safe-destination.js +166 -0
- package/dist/shell-completion.js +52 -13
- package/dist/slots.d.ts +8 -0
- package/dist/slots.js +61 -0
- package/dist/status.d.ts +2 -0
- package/dist/status.js +9 -1
- package/dist/sync-directories.d.ts +33 -0
- package/dist/sync-directories.js +97 -0
- package/dist/sync-plan.d.ts +16 -0
- package/dist/sync-plan.js +128 -0
- package/dist/sync.js +7 -13
- package/dist/task-command.d.ts +9 -0
- package/dist/task-command.js +29 -0
- package/dist/task.d.ts +9 -0
- package/dist/task.js +37 -0
- package/dist/terminal-text.d.ts +4 -0
- package/dist/terminal-text.js +72 -0
- package/dist/undo.d.ts +36 -0
- package/dist/undo.js +392 -0
- package/dist/warp.d.ts +3 -1
- package/dist/warp.js +32 -125
- package/dist/worktree-bootstrap.d.ts +35 -0
- package/dist/worktree-bootstrap.js +96 -0
- package/dist/worktree-info.d.ts +6 -1
- package/dist/worktree-info.js +14 -4
- package/dist/worktree-management.d.ts +1 -0
- package/dist/worktree-management.js +23 -4
- package/dist/worktree-picker.d.ts +24 -11
- package/dist/worktree-picker.js +176 -95
- package/dist/worktree-prompts.js +1 -1
- package/dist/worktree-source.d.ts +6 -0
- package/dist/worktree-source.js +1 -0
- package/dist/worktree-sources.d.ts +4 -0
- package/dist/worktree-sources.js +77 -0
- package/man/man1/gji-back.1 +1 -1
- package/man/man1/gji-clean.1 +1 -1
- package/man/man1/gji-completion.1 +1 -1
- package/man/man1/gji-config.1 +1 -1
- package/man/man1/gji-doctor.1 +1 -1
- package/man/man1/gji-done.1 +19 -0
- package/man/man1/gji-go.1 +12 -3
- package/man/man1/gji-history.1 +1 -1
- package/man/man1/gji-init.1 +1 -1
- package/man/man1/gji-ls.1 +1 -1
- package/man/man1/gji-new.1 +21 -3
- package/man/man1/gji-open.1 +1 -1
- package/man/man1/gji-pr.1 +7 -1
- package/man/man1/gji-remove.1 +3 -3
- package/man/man1/gji-root.1 +1 -1
- package/man/man1/gji-run-hook.1 +1 -1
- package/man/man1/gji-status.1 +1 -1
- package/man/man1/gji-sync-files.1 +1 -1
- package/man/man1/gji-sync.1 +1 -1
- package/man/man1/gji-task.1 +16 -0
- package/man/man1/gji-undo.1 +16 -0
- package/man/man1/gji-warp.1 +3 -6
- package/man/man1/gji.1 +17 -5
- package/package.json +3 -1
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { basename } from "node:path";
|
|
2
|
+
import { executeDependencyBootstrap, prepareDependencyBootstrap, } from "./dependency-bootstrap.js";
|
|
3
|
+
import { cloneDir } from "./dir-clone.js";
|
|
4
|
+
import { syncFiles } from "./file-sync.js";
|
|
5
|
+
import { extractHooks, runHook } from "./hooks.js";
|
|
6
|
+
import { maybeRunInstallPrompt, } from "./install-prompt.js";
|
|
7
|
+
import { assignWorktreeSlot } from "./slots.js";
|
|
8
|
+
import { executeSyncDirectoryPlan, } from "./sync-directories.js";
|
|
9
|
+
import { prepareSyncDirectoryPlan } from "./sync-plan.js";
|
|
10
|
+
export async function bootstrapWorktree(options) {
|
|
11
|
+
const dependencyMode = options.config.dependencyBootstrap ?? "off";
|
|
12
|
+
const dependencyPlan = await prepareDependencyBootstrap(dependencyMode, {
|
|
13
|
+
currentRoot: options.currentRoot,
|
|
14
|
+
detectionRoot: options.dependencyDetectionRoot,
|
|
15
|
+
repoRoot: options.repoRoot,
|
|
16
|
+
cargoBuildCommand: options.config.dependencyBuildCommand,
|
|
17
|
+
worktreePath: options.worktreePath,
|
|
18
|
+
});
|
|
19
|
+
const syncPlan = await prepareSyncDirectoryPlan(options.repoRoot, options.worktreePath, options.config.syncDirs ?? []);
|
|
20
|
+
const outcomes = await executeSyncDirectoryPlan(syncPlan, {
|
|
21
|
+
cloneDirectory: options.cloneDirectory ?? cloneDir,
|
|
22
|
+
repoRoot: options.repoRoot,
|
|
23
|
+
reporter: options.reporter,
|
|
24
|
+
});
|
|
25
|
+
const clonedDirs = outcomes.flatMap((outcome) => outcome.kind === "cloned" ? [outcome.directory] : []);
|
|
26
|
+
const skippedDirs = outcomes.flatMap((outcome) => outcome.kind === "skipped"
|
|
27
|
+
? [{ dir: outcome.dir, reason: outcome.reason }]
|
|
28
|
+
: []);
|
|
29
|
+
const syncFileFailures = [];
|
|
30
|
+
for (const pattern of options.config.syncFiles ?? []) {
|
|
31
|
+
try {
|
|
32
|
+
await syncFiles(options.repoRoot, options.worktreePath, [pattern]);
|
|
33
|
+
}
|
|
34
|
+
catch (error) {
|
|
35
|
+
const message = `failed to sync file "${pattern}": ${toErrorMessage(error)}`;
|
|
36
|
+
if (!options.json)
|
|
37
|
+
options.reporter.write(`Warning: ${message}\n`);
|
|
38
|
+
syncFileFailures.push({
|
|
39
|
+
adapter: "syncFiles",
|
|
40
|
+
kind: "sync-file",
|
|
41
|
+
reason: "sync-file-failed",
|
|
42
|
+
state: "failed",
|
|
43
|
+
target: pattern,
|
|
44
|
+
message,
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
if (syncFileFailures.length > 0) {
|
|
49
|
+
for (const event of syncFileFailures)
|
|
50
|
+
options.reporter.dependency(event);
|
|
51
|
+
}
|
|
52
|
+
const dependencyBootstrap = syncFileFailures.length > 0
|
|
53
|
+
? { mode: dependencyMode, ready: false, events: [] }
|
|
54
|
+
: await executeDependencyBootstrap(dependencyPlan, {
|
|
55
|
+
cloneDirectory: options.cloneDirectory,
|
|
56
|
+
repoRoot: options.repoRoot,
|
|
57
|
+
reporter: options.reporter,
|
|
58
|
+
stderr: options.commandStderr ?? options.reporter.write,
|
|
59
|
+
stdout: options.commandStdout,
|
|
60
|
+
seededDirectories: clonedDirs.map(({ dir }) => dir),
|
|
61
|
+
runCommand: options.runCommand,
|
|
62
|
+
});
|
|
63
|
+
if (!dependencyBootstrap.ready) {
|
|
64
|
+
return {
|
|
65
|
+
clonedDirs,
|
|
66
|
+
dependencyBootstrap,
|
|
67
|
+
ready: false,
|
|
68
|
+
syncFileFailures,
|
|
69
|
+
skippedDirs,
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
if (dependencyMode === "off" &&
|
|
73
|
+
["default", "legacy"].includes(options.dependencyBootstrapPolicy?.source ?? "default")) {
|
|
74
|
+
await maybeRunInstallPrompt(options.worktreePath, options.repoRoot, options.config, options.reporter.write, options.installDependencies, options.nonInteractive);
|
|
75
|
+
}
|
|
76
|
+
const hooks = extractHooks(options.config);
|
|
77
|
+
const slot = await assignWorktreeSlot(options.repoRoot, options.worktreePath);
|
|
78
|
+
await runHook(hooks["after-create"], options.worktreePath, {
|
|
79
|
+
branch: options.branch,
|
|
80
|
+
path: options.worktreePath,
|
|
81
|
+
repo: basename(options.repoRoot),
|
|
82
|
+
slot,
|
|
83
|
+
}, options.reporter.write, options.json
|
|
84
|
+
? () => undefined
|
|
85
|
+
: (options.commandStdout ?? ((chunk) => process.stdout.write(chunk))));
|
|
86
|
+
return {
|
|
87
|
+
clonedDirs,
|
|
88
|
+
dependencyBootstrap,
|
|
89
|
+
ready: true,
|
|
90
|
+
syncFileFailures: [],
|
|
91
|
+
skippedDirs,
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
function toErrorMessage(error) {
|
|
95
|
+
return error instanceof Error ? error.message : String(error);
|
|
96
|
+
}
|
package/dist/worktree-info.d.ts
CHANGED
|
@@ -2,14 +2,18 @@ import { type WorktreeHealth } from "./git.js";
|
|
|
2
2
|
import type { WorktreeEntry } from "./repo.js";
|
|
3
3
|
export interface WorktreeInfo extends WorktreeEntry {
|
|
4
4
|
lastCommitTimestamp: number | null;
|
|
5
|
+
slot: number | null;
|
|
5
6
|
status: WorktreeHealth["status"] | "unknown";
|
|
7
|
+
task: string | null;
|
|
6
8
|
upstream: UpstreamState;
|
|
7
9
|
}
|
|
8
10
|
export interface SerializedWorktreeInfo {
|
|
9
11
|
branch: string | null;
|
|
10
12
|
lastCommitTimestamp: number | null;
|
|
11
13
|
path: string;
|
|
14
|
+
slot: number | null;
|
|
12
15
|
status: WorktreeInfo["status"];
|
|
16
|
+
task: string | null;
|
|
13
17
|
upstream: UpstreamState;
|
|
14
18
|
}
|
|
15
19
|
export type UpstreamState = {
|
|
@@ -26,7 +30,8 @@ export type UpstreamState = {
|
|
|
26
30
|
kind: "unknown";
|
|
27
31
|
};
|
|
28
32
|
export declare function readWorktreeInfos(worktrees: WorktreeEntry[]): Promise<WorktreeInfo[]>;
|
|
33
|
+
export declare function readWorktreeInfo(worktree: WorktreeEntry): Promise<WorktreeInfo>;
|
|
29
34
|
export declare function serializeWorktreeInfo(info: WorktreeInfo): SerializedWorktreeInfo;
|
|
30
35
|
export declare function formatUpstreamState(upstream: UpstreamState): string;
|
|
31
36
|
export declare function formatLastCommit(timestampSeconds: number | null): string;
|
|
32
|
-
export declare function formatRelativeAge(timestampSeconds: number): string;
|
|
37
|
+
export declare function formatRelativeAge(timestampSeconds: number, nowSeconds?: number): string;
|
package/dist/worktree-info.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { readBranchLastCommitTimestamp, readWorktreeHealth, } from "./git.js";
|
|
2
|
+
import { getWorktreeSlot } from "./slots.js";
|
|
3
|
+
import { readTask } from "./task.js";
|
|
2
4
|
const MAX_WORKTREE_INFO_READ_CONCURRENCY = 8;
|
|
3
5
|
export async function readWorktreeInfos(worktrees) {
|
|
4
6
|
return mapWithConcurrency(worktrees, MAX_WORKTREE_INFO_READ_CONCURRENCY, readWorktreeInfo);
|
|
@@ -18,19 +20,25 @@ async function mapWithConcurrency(items, limit, mapper) {
|
|
|
18
20
|
await Promise.all(Array.from({ length: Math.min(limit, items.length) }, () => readNext()));
|
|
19
21
|
return results;
|
|
20
22
|
}
|
|
21
|
-
async function readWorktreeInfo(worktree) {
|
|
22
|
-
const [healthResult, lastCommitResult] = await Promise.allSettled([
|
|
23
|
+
export async function readWorktreeInfo(worktree) {
|
|
24
|
+
const [healthResult, lastCommitResult, slotResult, taskResult] = await Promise.allSettled([
|
|
23
25
|
readWorktreeHealth(worktree.path),
|
|
24
26
|
worktree.branch === null
|
|
25
27
|
? null
|
|
26
28
|
: readBranchLastCommitTimestamp(worktree.path, worktree.branch),
|
|
29
|
+
getWorktreeSlot(worktree.path),
|
|
30
|
+
readTask(worktree.path),
|
|
27
31
|
]);
|
|
28
32
|
const health = healthResult.status === "fulfilled" ? healthResult.value : null;
|
|
29
33
|
const lastCommitTimestamp = lastCommitResult.status === "fulfilled" ? lastCommitResult.value : null;
|
|
34
|
+
const slot = slotResult.status === "fulfilled" ? slotResult.value : null;
|
|
35
|
+
const task = taskResult.status === "fulfilled" ? (taskResult.value?.task ?? null) : null;
|
|
30
36
|
return {
|
|
31
37
|
...worktree,
|
|
32
38
|
lastCommitTimestamp,
|
|
39
|
+
slot,
|
|
33
40
|
status: health?.status ?? "unknown",
|
|
41
|
+
task,
|
|
34
42
|
upstream: buildUpstreamState(worktree.branch, health),
|
|
35
43
|
};
|
|
36
44
|
}
|
|
@@ -58,7 +66,9 @@ export function serializeWorktreeInfo(info) {
|
|
|
58
66
|
branch: info.branch,
|
|
59
67
|
lastCommitTimestamp: info.lastCommitTimestamp,
|
|
60
68
|
path: info.path,
|
|
69
|
+
slot: info.slot,
|
|
61
70
|
status: info.status,
|
|
71
|
+
task: info.task,
|
|
62
72
|
upstream: info.upstream,
|
|
63
73
|
};
|
|
64
74
|
}
|
|
@@ -94,8 +104,8 @@ export function formatLastCommit(timestampSeconds) {
|
|
|
94
104
|
? "n/a"
|
|
95
105
|
: formatRelativeAge(timestampSeconds);
|
|
96
106
|
}
|
|
97
|
-
export function formatRelativeAge(timestampSeconds) {
|
|
98
|
-
const ageSeconds = Math.max(0,
|
|
107
|
+
export function formatRelativeAge(timestampSeconds, nowSeconds = Math.floor(Date.now() / 1000)) {
|
|
108
|
+
const ageSeconds = Math.max(0, nowSeconds - timestampSeconds);
|
|
99
109
|
const units = [
|
|
100
110
|
{ label: "y", seconds: 365 * 24 * 60 * 60 },
|
|
101
111
|
{ label: "mo", seconds: 30 * 24 * 60 * 60 },
|
|
@@ -9,5 +9,6 @@ export declare function forceRemoveWorktree(repoRoot: string, worktreePath: stri
|
|
|
9
9
|
export declare function deleteBranch(repoRoot: string, branch: string): Promise<void>;
|
|
10
10
|
export declare function forceDeleteBranch(repoRoot: string, branch: string): Promise<void>;
|
|
11
11
|
export declare function isWorktreeForceRemovalError(error: unknown): boolean;
|
|
12
|
+
export declare function isSubmoduleWorktreeRemovalError(error: unknown): boolean;
|
|
12
13
|
export declare function isWorktreeDeletionError(error: unknown): boolean;
|
|
13
14
|
export declare function isBranchUnmergedError(error: unknown): boolean;
|
|
@@ -21,12 +21,14 @@ export async function removeWorktree(repoRoot, worktreePath) {
|
|
|
21
21
|
}
|
|
22
22
|
export async function forceRemoveWorktree(repoRoot, worktreePath) {
|
|
23
23
|
try {
|
|
24
|
-
await
|
|
25
|
-
cwd: repoRoot,
|
|
26
|
-
env: GIT_ENV,
|
|
27
|
-
});
|
|
24
|
+
await removeWorktreeWithForce(repoRoot, worktreePath);
|
|
28
25
|
}
|
|
29
26
|
catch (error) {
|
|
27
|
+
if (isSubmoduleWorktreeRemovalError(error)) {
|
|
28
|
+
await deinitializeSubmodules(worktreePath);
|
|
29
|
+
await removeWorktreeWithForce(repoRoot, worktreePath);
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
30
32
|
const worktreeIsStillRegistered = (await listWorktrees(repoRoot)).some((worktree) => worktree.path === worktreePath);
|
|
31
33
|
if (worktreeIsStillRegistered) {
|
|
32
34
|
throw error;
|
|
@@ -34,6 +36,18 @@ export async function forceRemoveWorktree(repoRoot, worktreePath) {
|
|
|
34
36
|
await rm(worktreePath, { force: true, recursive: true });
|
|
35
37
|
}
|
|
36
38
|
}
|
|
39
|
+
async function removeWorktreeWithForce(repoRoot, worktreePath) {
|
|
40
|
+
await execFileAsync("git", ["worktree", "remove", "--force", worktreePath], {
|
|
41
|
+
cwd: repoRoot,
|
|
42
|
+
env: GIT_ENV,
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
async function deinitializeSubmodules(worktreePath) {
|
|
46
|
+
await execFileAsync("git", ["submodule", "deinit", "--force", "--all"], {
|
|
47
|
+
cwd: worktreePath,
|
|
48
|
+
env: GIT_ENV,
|
|
49
|
+
});
|
|
50
|
+
}
|
|
37
51
|
export async function deleteBranch(repoRoot, branch) {
|
|
38
52
|
await execFileAsync("git", ["branch", "-d", branch], {
|
|
39
53
|
cwd: repoRoot,
|
|
@@ -51,8 +65,13 @@ export function isWorktreeForceRemovalError(error) {
|
|
|
51
65
|
return false;
|
|
52
66
|
}
|
|
53
67
|
return (error.stderr.includes("contains modified or untracked files") ||
|
|
68
|
+
isSubmoduleWorktreeRemovalError(error) ||
|
|
54
69
|
isWorktreeDeletionError(error));
|
|
55
70
|
}
|
|
71
|
+
export function isSubmoduleWorktreeRemovalError(error) {
|
|
72
|
+
return (hasStderr(error) &&
|
|
73
|
+
error.stderr.includes("working trees containing submodules cannot be moved or removed"));
|
|
74
|
+
}
|
|
56
75
|
export function isWorktreeDeletionError(error) {
|
|
57
76
|
return hasStderr(error) && error.stderr.includes("failed to delete");
|
|
58
77
|
}
|
|
@@ -1,25 +1,24 @@
|
|
|
1
1
|
import type { Readable, Writable } from "node:stream";
|
|
2
2
|
import { type PullRequestInfo } from "./pull-requests.js";
|
|
3
3
|
import type { WorktreeEntry } from "./repo.js";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
repoName: string;
|
|
7
|
-
worktree: WorktreeEntry;
|
|
8
|
-
}
|
|
4
|
+
import type { WorktreeSource } from "./worktree-source.js";
|
|
5
|
+
export type WorktreePromptSource = WorktreeSource;
|
|
9
6
|
export interface WorktreePromptEntry extends WorktreeEntry {
|
|
10
7
|
group: "recent" | "other";
|
|
11
8
|
label: string;
|
|
12
9
|
metadata?: string | null;
|
|
13
|
-
|
|
14
|
-
pullRequestUrls?: string[];
|
|
10
|
+
pullRequests?: PullRequestInfo[];
|
|
15
11
|
repoName: string;
|
|
12
|
+
task?: string | null;
|
|
16
13
|
}
|
|
17
14
|
export type QueryWorktreePullRequests = (repoRoot: string, sourceBranch: string) => Promise<PullRequestInfo[]>;
|
|
18
15
|
export type QueryRepositoryPullRequests = (repoRoot: string) => Promise<PullRequestInfo[]>;
|
|
19
16
|
export interface BuildWorktreePromptEntriesDependencies {
|
|
17
|
+
metadata?: WorktreeMetadataMode;
|
|
20
18
|
queryPullRequests?: QueryWorktreePullRequests;
|
|
21
19
|
queryRepositoryPullRequests?: QueryRepositoryPullRequests;
|
|
22
20
|
}
|
|
21
|
+
export type WorktreeMetadataMode = "full" | "fast";
|
|
23
22
|
export interface WorktreePickerIO {
|
|
24
23
|
input?: Readable & {
|
|
25
24
|
isTTY?: boolean;
|
|
@@ -30,8 +29,22 @@ export interface WorktreePickerIO {
|
|
|
30
29
|
rows?: number;
|
|
31
30
|
};
|
|
32
31
|
}
|
|
33
|
-
export
|
|
34
|
-
|
|
35
|
-
|
|
32
|
+
export interface WorktreePromptScope {
|
|
33
|
+
label: string;
|
|
34
|
+
toggle: () => Promise<WorktreePromptScopeResult>;
|
|
35
|
+
toggleLabel: string;
|
|
36
|
+
}
|
|
37
|
+
export interface WorktreePromptScopeResult {
|
|
38
|
+
entries: WorktreePromptEntry[];
|
|
39
|
+
label: string;
|
|
40
|
+
toggleLabel: string;
|
|
41
|
+
}
|
|
42
|
+
export declare function buildWorktreePromptEntries(sources: WorktreeSource[], dependencies?: BuildWorktreePromptEntriesDependencies): Promise<WorktreePromptEntry[]>;
|
|
43
|
+
export declare function resolveWorktreeQuery(sources: WorktreeSource[], query: string): WorktreeSource | null;
|
|
44
|
+
export declare function resolveWorktreeQueryMatches(sources: WorktreeSource[], query: string): WorktreeSource[];
|
|
45
|
+
export declare function resolveExactWorktreeQueryMatches(sources: WorktreeSource[], query: string): WorktreeSource[];
|
|
46
|
+
export declare function promptForSingleWorktree(message: string, worktrees: WorktreePromptEntry[], io?: WorktreePickerIO & {
|
|
47
|
+
scope?: WorktreePromptScope;
|
|
48
|
+
}): Promise<string | null>;
|
|
36
49
|
export declare function promptForMultipleWorktrees(message: string, worktrees: WorktreePromptEntry[], io?: WorktreePickerIO): Promise<string[] | null>;
|
|
37
|
-
export declare function formatWorktreeBranchLabel(branch: string | null,
|
|
50
|
+
export declare function formatWorktreeBranchLabel(branch: string | null, pullRequests?: PullRequestInfo[]): string;
|