@context-forge/cli 0.8.4 → 0.8.5
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/package.json +2 -2
- package/dist/commands/arch.d.ts +0 -7
- package/dist/commands/arch.d.ts.map +0 -1
- package/dist/commands/arch.js +0 -160
- package/dist/commands/arch.js.map +0 -1
- package/dist/commands/backup.d.ts +0 -3
- package/dist/commands/backup.d.ts.map +0 -1
- package/dist/commands/backup.js +0 -27
- package/dist/commands/backup.js.map +0 -1
- package/dist/commands/build.d.ts +0 -24
- package/dist/commands/build.d.ts.map +0 -1
- package/dist/commands/build.js +0 -146
- package/dist/commands/build.js.map +0 -1
- package/dist/commands/check.d.ts +0 -3
- package/dist/commands/check.d.ts.map +0 -1
- package/dist/commands/check.js +0 -211
- package/dist/commands/check.js.map +0 -1
- package/dist/commands/commandInstaller.d.ts +0 -28
- package/dist/commands/commandInstaller.d.ts.map +0 -1
- package/dist/commands/commandInstaller.js +0 -136
- package/dist/commands/commandInstaller.js.map +0 -1
- package/dist/commands/config.d.ts +0 -3
- package/dist/commands/config.d.ts.map +0 -1
- package/dist/commands/config.js +0 -69
- package/dist/commands/config.js.map +0 -1
- package/dist/commands/future.d.ts +0 -3
- package/dist/commands/future.d.ts.map +0 -1
- package/dist/commands/future.js +0 -96
- package/dist/commands/future.js.map +0 -1
- package/dist/commands/guides.d.ts +0 -9
- package/dist/commands/guides.d.ts.map +0 -1
- package/dist/commands/guides.js +0 -156
- package/dist/commands/guides.js.map +0 -1
- package/dist/commands/init.d.ts +0 -3
- package/dist/commands/init.d.ts.map +0 -1
- package/dist/commands/init.js +0 -124
- package/dist/commands/init.js.map +0 -1
- package/dist/commands/list.d.ts +0 -3
- package/dist/commands/list.d.ts.map +0 -1
- package/dist/commands/list.js +0 -93
- package/dist/commands/list.js.map +0 -1
- package/dist/commands/next.d.ts +0 -3
- package/dist/commands/next.d.ts.map +0 -1
- package/dist/commands/next.js +0 -51
- package/dist/commands/next.js.map +0 -1
- package/dist/commands/plan.d.ts +0 -7
- package/dist/commands/plan.d.ts.map +0 -1
- package/dist/commands/plan.js +0 -102
- package/dist/commands/plan.js.map +0 -1
- package/dist/commands/project.d.ts +0 -25
- package/dist/commands/project.d.ts.map +0 -1
- package/dist/commands/project.js +0 -550
- package/dist/commands/project.js.map +0 -1
- package/dist/commands/prompt.d.ts +0 -3
- package/dist/commands/prompt.d.ts.map +0 -1
- package/dist/commands/prompt.js +0 -112
- package/dist/commands/prompt.js.map +0 -1
- package/dist/commands/setup-ide.d.ts +0 -15
- package/dist/commands/setup-ide.d.ts.map +0 -1
- package/dist/commands/setup-ide.js +0 -250
- package/dist/commands/setup-ide.js.map +0 -1
- package/dist/commands/slice.d.ts +0 -6
- package/dist/commands/slice.d.ts.map +0 -1
- package/dist/commands/slice.js +0 -100
- package/dist/commands/slice.js.map +0 -1
- package/dist/commands/status.d.ts +0 -3
- package/dist/commands/status.d.ts.map +0 -1
- package/dist/commands/status.js +0 -209
- package/dist/commands/status.js.map +0 -1
- package/dist/commands/task.d.ts +0 -12
- package/dist/commands/task.d.ts.map +0 -1
- package/dist/commands/task.js +0 -185
- package/dist/commands/task.js.map +0 -1
- package/dist/commands/update.d.ts +0 -27
- package/dist/commands/update.d.ts.map +0 -1
- package/dist/commands/update.js +0 -172
- package/dist/commands/update.js.map +0 -1
- package/dist/commands/workflow.d.ts +0 -3
- package/dist/commands/workflow.d.ts.map +0 -1
- package/dist/commands/workflow.js +0 -204
- package/dist/commands/workflow.js.map +0 -1
- package/dist/commands/worktree.d.ts +0 -3
- package/dist/commands/worktree.d.ts.map +0 -1
- package/dist/commands/worktree.js +0 -371
- package/dist/commands/worktree.js.map +0 -1
- package/dist/index.d.ts +0 -3
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -167
- package/dist/index.js.map +0 -1
- package/dist/options.d.ts +0 -16
- package/dist/options.d.ts.map +0 -1
- package/dist/options.js +0 -29
- package/dist/options.js.map +0 -1
- package/dist/output/formatter.d.ts +0 -6
- package/dist/output/formatter.d.ts.map +0 -1
- package/dist/output/formatter.js +0 -9
- package/dist/output/formatter.js.map +0 -1
- package/dist/output/styles.d.ts +0 -15
- package/dist/output/styles.d.ts.map +0 -1
- package/dist/output/styles.js +0 -16
- package/dist/output/styles.js.map +0 -1
- package/dist/output/tables.d.ts +0 -6
- package/dist/output/tables.d.ts.map +0 -1
- package/dist/output/tables.js +0 -45
- package/dist/output/tables.js.map +0 -1
- package/dist/utils/breaking-changes.d.ts +0 -14
- package/dist/utils/breaking-changes.d.ts.map +0 -1
- package/dist/utils/breaking-changes.js +0 -11
- package/dist/utils/breaking-changes.js.map +0 -1
- package/dist/utils/commandCatalog.d.ts +0 -25
- package/dist/utils/commandCatalog.d.ts.map +0 -1
- package/dist/utils/commandCatalog.js +0 -32
- package/dist/utils/commandCatalog.js.map +0 -1
- package/dist/utils/confirm.d.ts +0 -3
- package/dist/utils/confirm.d.ts.map +0 -1
- package/dist/utils/confirm.js +0 -12
- package/dist/utils/confirm.js.map +0 -1
- package/dist/utils/errors.d.ts +0 -22
- package/dist/utils/errors.d.ts.map +0 -1
- package/dist/utils/errors.js +0 -63
- package/dist/utils/errors.js.map +0 -1
- package/dist/utils/phaseShorthand.d.ts +0 -23
- package/dist/utils/phaseShorthand.d.ts.map +0 -1
- package/dist/utils/phaseShorthand.js +0 -68
- package/dist/utils/phaseShorthand.js.map +0 -1
- package/dist/utils/project.d.ts +0 -60
- package/dist/utils/project.d.ts.map +0 -1
- package/dist/utils/project.js +0 -140
- package/dist/utils/project.js.map +0 -1
- package/dist/utils/worktree-overlay.d.ts +0 -31
- package/dist/utils/worktree-overlay.d.ts.map +0 -1
- package/dist/utils/worktree-overlay.js +0 -63
- package/dist/utils/worktree-overlay.js.map +0 -1
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import * as fs from 'node:fs/promises';
|
|
2
|
-
import * as path from 'node:path';
|
|
3
|
-
import { PROMPT_FILE_RELATIVE_PATH } from '@context-forge/core';
|
|
4
|
-
/**
|
|
5
|
-
* Phase shorthand map: P1 → phase name, derived at runtime from the prompt asset.
|
|
6
|
-
* Cached after first parse.
|
|
7
|
-
*/
|
|
8
|
-
let cachedShorthands = null;
|
|
9
|
-
/**
|
|
10
|
-
* Parse phase shorthands from the system prompt file.
|
|
11
|
-
*
|
|
12
|
-
* Extracts headings matching `(Phase n)` or `(Phase n.m)` and builds
|
|
13
|
-
* a map: { P1: 'Concept', P2: 'Architecture', ... }
|
|
14
|
-
*
|
|
15
|
-
* The prompt file is resolved from the project path.
|
|
16
|
-
*/
|
|
17
|
-
export async function getPhaseShorthands(projectPath) {
|
|
18
|
-
if (cachedShorthands)
|
|
19
|
-
return cachedShorthands;
|
|
20
|
-
const promptFilePath = path.join(projectPath, PROMPT_FILE_RELATIVE_PATH);
|
|
21
|
-
const content = await fs.readFile(promptFilePath, 'utf-8');
|
|
22
|
-
const map = new Map();
|
|
23
|
-
// Match headings like "##### Concept (Phase 1)" or "##### Implementation (Phase 6)"
|
|
24
|
-
const pattern = /^#{1,6}\s+(.+?)\s+\(Phase\s+(\d+(?:\.\d+)?)\)\s*$/gm;
|
|
25
|
-
let match;
|
|
26
|
-
while ((match = pattern.exec(content)) !== null) {
|
|
27
|
-
const name = match[1].trim();
|
|
28
|
-
const number = match[2];
|
|
29
|
-
// Only use the integer part for shorthand (P1, P2, etc.)
|
|
30
|
-
const intPart = number.split('.')[0];
|
|
31
|
-
const shorthand = `P${intPart}`;
|
|
32
|
-
// First match for each integer wins (e.g. P2 = Architecture, not P2.1)
|
|
33
|
-
if (!map.has(shorthand)) {
|
|
34
|
-
map.set(shorthand, name);
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
cachedShorthands = map;
|
|
38
|
-
return map;
|
|
39
|
-
}
|
|
40
|
-
/** Clear the cached shorthands (for testing). */
|
|
41
|
-
export function clearPhaseShorthandCache() {
|
|
42
|
-
cachedShorthands = null;
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* Resolve a phase input (name, shorthand, or key) to a prompt key suitable
|
|
46
|
-
* for SystemPromptParser.getPromptForInstruction().
|
|
47
|
-
*
|
|
48
|
-
* Resolution order:
|
|
49
|
-
* 1. Phase shorthand (P1–P7) → resolved name
|
|
50
|
-
* 2. Otherwise: return as-is (case-insensitive matching handled by parser)
|
|
51
|
-
*
|
|
52
|
-
* Hyphens and spaces are interchangeable.
|
|
53
|
-
*/
|
|
54
|
-
export async function resolvePhaseInput(input, projectPath) {
|
|
55
|
-
// Check if input is a shorthand like P1, p5, etc.
|
|
56
|
-
const shorthandMatch = input.match(/^[Pp](\d+)$/);
|
|
57
|
-
if (shorthandMatch) {
|
|
58
|
-
const shorthands = await getPhaseShorthands(projectPath);
|
|
59
|
-
const key = `P${shorthandMatch[1]}`;
|
|
60
|
-
const name = shorthands.get(key);
|
|
61
|
-
if (name)
|
|
62
|
-
return name;
|
|
63
|
-
// Fall through — return as-is and let the parser handle it
|
|
64
|
-
}
|
|
65
|
-
// Normalize: hyphens ↔ spaces
|
|
66
|
-
return input.replace(/-/g, ' ');
|
|
67
|
-
}
|
|
68
|
-
//# sourceMappingURL=phaseShorthand.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"phaseShorthand.js","sourceRoot":"","sources":["../../src/utils/phaseShorthand.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACvC,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AAEhE;;;GAGG;AACH,IAAI,gBAAgB,GAA+B,IAAI,CAAC;AAExD;;;;;;;GAOG;AACH,MAAM,CAAC,KAAK,UAAU,kBAAkB,CAAC,WAAmB;IAC1D,IAAI,gBAAgB;QAAE,OAAO,gBAAgB,CAAC;IAE9C,MAAM,cAAc,GAAG,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,yBAAyB,CAAC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C,MAAM,IAAI,GAAG,UAAU,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QACjC,IAAI,IAAI;YAAE,OAAO,IAAI,CAAC;QACtB,2DAA2D;IAC7D,CAAC;IAED,8BAA8B;IAC9B,OAAO,KAAK,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;AAClC,CAAC"}
|
package/dist/utils/project.d.ts
DELETED
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { FileProjectStore } from '@context-forge/core/node';
|
|
2
|
-
import type { ProjectData } from '@context-forge/core';
|
|
3
|
-
/**
|
|
4
|
-
* Find a project by exact ID or case-insensitive name.
|
|
5
|
-
* ID match takes priority over name match.
|
|
6
|
-
*/
|
|
7
|
-
export declare function findByNameOrId(nameOrId: string, store: FileProjectStore): Promise<ProjectData | null>;
|
|
8
|
-
/** Result of a CWD-based project match, including optional worktree context. */
|
|
9
|
-
export interface CwdMatch {
|
|
10
|
-
project: ProjectData;
|
|
11
|
-
/** Set when the match was via a worktree's worktreePath rather than projectPath. */
|
|
12
|
-
worktreeId?: string;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Find the project whose projectPath or worktreePath best matches the current
|
|
16
|
-
* working directory. When multiple paths match (nested paths), the longest wins.
|
|
17
|
-
* Projects without a projectPath are skipped; worktrees without a worktreePath
|
|
18
|
-
* are also skipped.
|
|
19
|
-
*/
|
|
20
|
-
export declare function findProjectByCwd(store: FileProjectStore): Promise<CwdMatch | null>;
|
|
21
|
-
export type ResolutionSource = 'flag' | 'cwd' | 'worktree' | 'default' | 'none';
|
|
22
|
-
export interface ResolvedProject {
|
|
23
|
-
id: string;
|
|
24
|
-
source: ResolutionSource;
|
|
25
|
-
}
|
|
26
|
-
export interface ResolvedProjectWorktree {
|
|
27
|
-
id: string;
|
|
28
|
-
source: ResolutionSource;
|
|
29
|
-
/** Set when CWD matched a worktree's worktreePath. */
|
|
30
|
-
worktreeId?: string;
|
|
31
|
-
}
|
|
32
|
-
/** Options for resolveProjectWorktree. */
|
|
33
|
-
export interface ResolveProjectWorktreeOptions {
|
|
34
|
-
/** Explicit --project flag value (name or id). */
|
|
35
|
-
project?: string;
|
|
36
|
-
/** Explicit --worktree flag value (name or id) — overrides CWD-derived worktreeId. */
|
|
37
|
-
worktree?: string;
|
|
38
|
-
}
|
|
39
|
-
/**
|
|
40
|
-
* Resolves which project and (optionally) worktree to use via a three-step chain:
|
|
41
|
-
*
|
|
42
|
-
* 1. explicit --project flag → findByNameOrId
|
|
43
|
-
* 2. CWD detection → findProjectByCwd (worktree-aware)
|
|
44
|
-
* 3. Throw UserError with guidance
|
|
45
|
-
*
|
|
46
|
-
* When opts.worktree is provided and a project was resolved, also resolves the
|
|
47
|
-
* worktreeId via findWorktreeByNameOrId.
|
|
48
|
-
*/
|
|
49
|
-
export declare function resolveProjectWorktree(opts: ResolveProjectWorktreeOptions, store: FileProjectStore): Promise<ResolvedProjectWorktree>;
|
|
50
|
-
/**
|
|
51
|
-
* Resolves which project to use via a three-step chain.
|
|
52
|
-
* Backwards-compatible wrapper around resolveProjectWorktree — drops worktreeId.
|
|
53
|
-
*/
|
|
54
|
-
export declare function resolveProjectId(explicit: string | undefined, store: FileProjectStore): Promise<ResolvedProject>;
|
|
55
|
-
/**
|
|
56
|
-
* Find a worktree within a project by exact ID or case-insensitive name.
|
|
57
|
-
* ID match takes priority over name match. Returns undefined if not found.
|
|
58
|
-
*/
|
|
59
|
-
export declare function findWorktreeByNameOrId(projectId: string, nameOrId: string, store: FileProjectStore): Promise<import('@context-forge/core').WorktreeContext | undefined>;
|
|
60
|
-
//# sourceMappingURL=project.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"project.d.ts","sourceRoot":"","sources":["../../src/utils/project.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAwB,MAAM,0BAA0B,CAAC;AAClF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AA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gBAAgB,GACtB,OAAO,CAAC,OAAO,qBAAqB,EAAE,eAAe,GAAG,SAAS,CAAC,CAapE"}
|
package/dist/utils/project.js
DELETED
|
@@ -1,140 +0,0 @@
|
|
|
1
|
-
import { GitWorktreeDiscovery } from '@context-forge/core/node';
|
|
2
|
-
import { UserError } from './errors.js';
|
|
3
|
-
/**
|
|
4
|
-
* Find a project by exact ID or case-insensitive name.
|
|
5
|
-
* ID match takes priority over name match.
|
|
6
|
-
*/
|
|
7
|
-
export async function findByNameOrId(nameOrId, store) {
|
|
8
|
-
const projects = await store.getAll();
|
|
9
|
-
// Exact ID match first
|
|
10
|
-
const byId = projects.find((p) => p.id === nameOrId);
|
|
11
|
-
if (byId)
|
|
12
|
-
return byId;
|
|
13
|
-
// Case-insensitive name match
|
|
14
|
-
const lower = nameOrId.toLowerCase();
|
|
15
|
-
const byName = projects.find((p) => p.name?.toLowerCase() === lower);
|
|
16
|
-
return byName ?? null;
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* Find the project whose projectPath or worktreePath best matches the current
|
|
20
|
-
* working directory. When multiple paths match (nested paths), the longest wins.
|
|
21
|
-
* Projects without a projectPath are skipped; worktrees without a worktreePath
|
|
22
|
-
* are also skipped.
|
|
23
|
-
*/
|
|
24
|
-
export async function findProjectByCwd(store) {
|
|
25
|
-
const projects = await store.getAll();
|
|
26
|
-
const cwd = process.cwd();
|
|
27
|
-
const candidates = [];
|
|
28
|
-
for (const p of projects) {
|
|
29
|
-
// Existing: project root path
|
|
30
|
-
if (p.projectPath) {
|
|
31
|
-
candidates.push({ project: p, path: p.projectPath });
|
|
32
|
-
}
|
|
33
|
-
// New: worktree paths
|
|
34
|
-
for (const wt of p.worktrees ?? []) {
|
|
35
|
-
if (wt.worktreePath) {
|
|
36
|
-
candidates.push({ project: p, path: wt.worktreePath, worktreeId: wt.id });
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
const matches = candidates
|
|
41
|
-
.filter((c) => {
|
|
42
|
-
const path = c.path.endsWith('/') ? c.path.slice(0, -1) : c.path;
|
|
43
|
-
return cwd === path || cwd.startsWith(path + '/');
|
|
44
|
-
})
|
|
45
|
-
.sort((a, b) => {
|
|
46
|
-
// Longest path wins; on tie, prefer worktree match over project root
|
|
47
|
-
const lenDiff = b.path.length - a.path.length;
|
|
48
|
-
if (lenDiff !== 0)
|
|
49
|
-
return lenDiff;
|
|
50
|
-
if (a.worktreeId && !b.worktreeId)
|
|
51
|
-
return -1;
|
|
52
|
-
if (!a.worktreeId && b.worktreeId)
|
|
53
|
-
return 1;
|
|
54
|
-
return 0;
|
|
55
|
-
});
|
|
56
|
-
if (matches.length === 0)
|
|
57
|
-
return null;
|
|
58
|
-
return { project: matches[0].project, worktreeId: matches[0].worktreeId };
|
|
59
|
-
}
|
|
60
|
-
/**
|
|
61
|
-
* Resolves which project and (optionally) worktree to use via a three-step chain:
|
|
62
|
-
*
|
|
63
|
-
* 1. explicit --project flag → findByNameOrId
|
|
64
|
-
* 2. CWD detection → findProjectByCwd (worktree-aware)
|
|
65
|
-
* 3. Throw UserError with guidance
|
|
66
|
-
*
|
|
67
|
-
* When opts.worktree is provided and a project was resolved, also resolves the
|
|
68
|
-
* worktreeId via findWorktreeByNameOrId.
|
|
69
|
-
*/
|
|
70
|
-
export async function resolveProjectWorktree(opts, store) {
|
|
71
|
-
const explicit = opts.project;
|
|
72
|
-
// Step 1: explicit --project flag
|
|
73
|
-
if (explicit) {
|
|
74
|
-
const project = await findByNameOrId(explicit, store);
|
|
75
|
-
if (!project) {
|
|
76
|
-
throw new UserError(`Project '${explicit}' not found.`, 'PROJECT_NOT_FOUND', `Check the spelling, or run cf project list to see available projects.`);
|
|
77
|
-
}
|
|
78
|
-
const resolved = { id: project.id, source: 'flag' };
|
|
79
|
-
if (opts.worktree) {
|
|
80
|
-
const wt = await findWorktreeByNameOrId(project.id, opts.worktree, store);
|
|
81
|
-
if (wt)
|
|
82
|
-
resolved.worktreeId = wt.id;
|
|
83
|
-
}
|
|
84
|
-
return resolved;
|
|
85
|
-
}
|
|
86
|
-
// Step 2: CWD detection (worktree-aware)
|
|
87
|
-
const cwdMatch = await findProjectByCwd(store);
|
|
88
|
-
if (cwdMatch) {
|
|
89
|
-
if (cwdMatch.worktreeId) {
|
|
90
|
-
return { id: cwdMatch.project.id, worktreeId: cwdMatch.worktreeId, source: 'worktree' };
|
|
91
|
-
}
|
|
92
|
-
return { id: cwdMatch.project.id, source: 'cwd' };
|
|
93
|
-
}
|
|
94
|
-
// Step 2b: CWD is a git worktree of a known project (not yet registered as a cf worktree)
|
|
95
|
-
try {
|
|
96
|
-
const discovery = new GitWorktreeDiscovery();
|
|
97
|
-
const gitWorktrees = await discovery.listWorktrees(process.cwd());
|
|
98
|
-
if (gitWorktrees.length > 0) {
|
|
99
|
-
const mainWorktreePath = gitWorktrees[0].path;
|
|
100
|
-
const projects = await store.getAll();
|
|
101
|
-
const matchingProject = projects.find((p) => p.projectPath === mainWorktreePath);
|
|
102
|
-
if (matchingProject) {
|
|
103
|
-
return { id: matchingProject.id, source: 'cwd' };
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
catch {
|
|
108
|
-
// Git unavailable or not a git repo — fall through
|
|
109
|
-
}
|
|
110
|
-
// Step 3: no resolution
|
|
111
|
-
throw new UserError('No project specified and no registered project found at current path.', 'PROJECT_NOT_FOUND', `cf init # register current directory as a project\n` +
|
|
112
|
-
` --project <name> # specify a project explicitly\n` +
|
|
113
|
-
` cf project list # see registered projects`);
|
|
114
|
-
}
|
|
115
|
-
/**
|
|
116
|
-
* Resolves which project to use via a three-step chain.
|
|
117
|
-
* Backwards-compatible wrapper around resolveProjectWorktree — drops worktreeId.
|
|
118
|
-
*/
|
|
119
|
-
export async function resolveProjectId(explicit, store) {
|
|
120
|
-
const result = await resolveProjectWorktree({ project: explicit }, store);
|
|
121
|
-
return { id: result.id, source: result.source };
|
|
122
|
-
}
|
|
123
|
-
/**
|
|
124
|
-
* Find a worktree within a project by exact ID or case-insensitive name.
|
|
125
|
-
* ID match takes priority over name match. Returns undefined if not found.
|
|
126
|
-
*/
|
|
127
|
-
export async function findWorktreeByNameOrId(projectId, nameOrId, store) {
|
|
128
|
-
const project = await store.getById(projectId);
|
|
129
|
-
if (!project)
|
|
130
|
-
return undefined;
|
|
131
|
-
const worktrees = project.worktrees ?? [];
|
|
132
|
-
// Exact ID match first
|
|
133
|
-
const byId = worktrees.find((wt) => wt.id === nameOrId);
|
|
134
|
-
if (byId)
|
|
135
|
-
return byId;
|
|
136
|
-
// Case-insensitive name match
|
|
137
|
-
const lower = nameOrId.toLowerCase();
|
|
138
|
-
return worktrees.find((wt) => wt.name.toLowerCase() === lower);
|
|
139
|
-
}
|
|
140
|
-
//# sourceMappingURL=project.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"project.js","sourceRoot":"","sources":["../../src/utils/project.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAElF,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,cAAc,CAClC,QAAgB,EAChB,KAAuB;IAEvB,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,MAAM,EAAE,CAAC;IAEtC,uBAAuB;IACvB,MAAM,IAAI,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,QAAQ,CAAC,CAAC;IACrD,IAAI,IAAI;QAAE,OAAO,IAAI,CAAC;IAEtB,8BAA8B;IAC9B,MAAM,KAAK,GAAG,QAAQ,CAAC,WAAW,EAAE,CAAC;IACrC,MAAM,MAAM,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,WAAW,EAAE,KAAK,KAAK,CAAC,CAAC;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esystem path for file operations.
|
|
5
|
-
* Returns worktreePath when a worktree is resolved and has a path,
|
|
6
|
-
* otherwise returns projectPath.
|
|
7
|
-
*/
|
|
8
|
-
export declare function resolveOperationPath(project: ProjectData, worktreeId?: string): string | undefined;
|
|
9
|
-
/**
|
|
10
|
-
* Get the index range for filtering, if applicable.
|
|
11
|
-
* Returns the worktree's indexRange for ALL worktrees (including default).
|
|
12
|
-
* Returns undefined only when no worktreeId, no worktrees array, or
|
|
13
|
-
* worktree not found (projects without worktrees — no filtering).
|
|
14
|
-
*/
|
|
15
|
-
export declare function getWorktreeIndexRange(project: ProjectData, worktreeId?: string): [number, number] | undefined;
|
|
16
|
-
/**
|
|
17
|
-
* Get all unique filesystem paths for cross-worktree aggregation (--all mode).
|
|
18
|
-
* Collects projectPath + all worktreePath values into a deduplicated set.
|
|
19
|
-
*/
|
|
20
|
-
export declare function resolveAllOperationPaths(project: ProjectData): string[];
|
|
21
|
-
/**
|
|
22
|
-
* Check if a worktree has rangeOverride enabled.
|
|
23
|
-
* Returns false when no worktreeId, no worktrees, or worktree not found.
|
|
24
|
-
*/
|
|
25
|
-
export declare function getWorktreeRangeOverride(project: ProjectData, worktreeId?: string): boolean;
|
|
26
|
-
/**
|
|
27
|
-
* Check if a numeric index falls within an optional range.
|
|
28
|
-
* Returns true if no range is specified (no filtering).
|
|
29
|
-
*/
|
|
30
|
-
export declare function isInIndexRange(index: number, range?: [number, number]): boolean;
|
|
31
|
-
//# sourceMappingURL=worktree-overlay.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"worktree-overlay.d.ts","sourceRoot":"","sources":["../../src/utils/worktree-overlay.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAE3D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAEvD;;;;GAIG;AACH,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,WAAW,EACpB,UAAU,CAAC,EAAE,MAAM,GAClB,MAAM,GAAG,SAAS,CAMpB;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,WAAW,EACpB,UAAU,CAAC,EAAE,MAAM,GAClB,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,CAK9B;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CACtC,OAAO,EAAE,WAAW,GACnB,MAAM,EAAE,CAOV;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CACtC,OAAO,EAAE,WAAW,EACpB,UAAU,CAAC,EAAE,MAAM,GAClB,OAAO,CAIT;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAC5B,KAAK,EAAE,MAAM,EACb,KAAK,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,GACvB,OAAO,CAGT"}
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
// Re-export from core — canonical implementation lives in @context-forge/core
|
|
2
|
-
export { applyWorktreeOverlay } from '@context-forge/core';
|
|
3
|
-
/**
|
|
4
|
-
* Resolve the filesystem path for file operations.
|
|
5
|
-
* Returns worktreePath when a worktree is resolved and has a path,
|
|
6
|
-
* otherwise returns projectPath.
|
|
7
|
-
*/
|
|
8
|
-
export function resolveOperationPath(project, worktreeId) {
|
|
9
|
-
if (worktreeId && project.worktrees) {
|
|
10
|
-
const wt = project.worktrees.find((w) => w.id === worktreeId);
|
|
11
|
-
if (wt?.worktreePath)
|
|
12
|
-
return wt.worktreePath;
|
|
13
|
-
}
|
|
14
|
-
return project.projectPath;
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* Get the index range for filtering, if applicable.
|
|
18
|
-
* Returns the worktree's indexRange for ALL worktrees (including default).
|
|
19
|
-
* Returns undefined only when no worktreeId, no worktrees array, or
|
|
20
|
-
* worktree not found (projects without worktrees — no filtering).
|
|
21
|
-
*/
|
|
22
|
-
export function getWorktreeIndexRange(project, worktreeId) {
|
|
23
|
-
if (!worktreeId || !project.worktrees)
|
|
24
|
-
return undefined;
|
|
25
|
-
const wt = project.worktrees.find((w) => w.id === worktreeId);
|
|
26
|
-
if (!wt)
|
|
27
|
-
return undefined;
|
|
28
|
-
return wt.indexRange;
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* Get all unique filesystem paths for cross-worktree aggregation (--all mode).
|
|
32
|
-
* Collects projectPath + all worktreePath values into a deduplicated set.
|
|
33
|
-
*/
|
|
34
|
-
export function resolveAllOperationPaths(project) {
|
|
35
|
-
const paths = new Set();
|
|
36
|
-
if (project.projectPath)
|
|
37
|
-
paths.add(project.projectPath);
|
|
38
|
-
for (const wt of project.worktrees ?? []) {
|
|
39
|
-
if (wt.worktreePath)
|
|
40
|
-
paths.add(wt.worktreePath);
|
|
41
|
-
}
|
|
42
|
-
return [...paths];
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* Check if a worktree has rangeOverride enabled.
|
|
46
|
-
* Returns false when no worktreeId, no worktrees, or worktree not found.
|
|
47
|
-
*/
|
|
48
|
-
export function getWorktreeRangeOverride(project, worktreeId) {
|
|
49
|
-
if (!worktreeId || !project.worktrees)
|
|
50
|
-
return false;
|
|
51
|
-
const wt = project.worktrees.find((w) => w.id === worktreeId);
|
|
52
|
-
return wt?.rangeOverride === true;
|
|
53
|
-
}
|
|
54
|
-
/**
|
|
55
|
-
* Check if a numeric index falls within an optional range.
|
|
56
|
-
* Returns true if no range is specified (no filtering).
|
|
57
|
-
*/
|
|
58
|
-
export function isInIndexRange(index, range) {
|
|
59
|
-
if (!range)
|
|
60
|
-
return true;
|
|
61
|
-
return index >= range[0] && index <= range[1];
|
|
62
|
-
}
|
|
63
|
-
//# sourceMappingURL=worktree-overlay.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"worktree-overlay.js","sourceRoot":"","sources":["../../src/utils/worktree-overlay.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,OAAO,EAAE,oBAAoB,EAAE,MA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