@principal-ai/codebase-composition 0.1.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 +67 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +23 -0
- package/dist/index.js.map +1 -0
- package/dist/modules/DependencyLayerModule.d.ts +44 -0
- package/dist/modules/DependencyLayerModule.d.ts.map +1 -0
- package/dist/modules/DependencyLayerModule.js +286 -0
- package/dist/modules/DependencyLayerModule.js.map +1 -0
- package/dist/modules/FileSystemModule.d.ts +30 -0
- package/dist/modules/FileSystemModule.d.ts.map +1 -0
- package/dist/modules/FileSystemModule.js +46 -0
- package/dist/modules/FileSystemModule.js.map +1 -0
- package/dist/modules/FileTypeLayerModule.d.ts +34 -0
- package/dist/modules/FileTypeLayerModule.d.ts.map +1 -0
- package/dist/modules/FileTypeLayerModule.js +169 -0
- package/dist/modules/FileTypeLayerModule.js.map +1 -0
- package/dist/modules/FrameworkLayerModule.d.ts +22 -0
- package/dist/modules/FrameworkLayerModule.d.ts.map +1 -0
- package/dist/modules/FrameworkLayerModule.js +388 -0
- package/dist/modules/FrameworkLayerModule.js.map +1 -0
- package/dist/modules/PackageLayerModule.d.ts +23 -0
- package/dist/modules/PackageLayerModule.d.ts.map +1 -0
- package/dist/modules/PackageLayerModule.js +810 -0
- package/dist/modules/PackageLayerModule.js.map +1 -0
- package/dist/modules/TypeExtractionModule.d.ts +37 -0
- package/dist/modules/TypeExtractionModule.d.ts.map +1 -0
- package/dist/modules/TypeExtractionModule.js +180 -0
- package/dist/modules/TypeExtractionModule.js.map +1 -0
- package/dist/modules/VersionControlLayerModule.d.ts +10 -0
- package/dist/modules/VersionControlLayerModule.d.ts.map +1 -0
- package/dist/modules/VersionControlLayerModule.js +32 -0
- package/dist/modules/VersionControlLayerModule.js.map +1 -0
- package/dist/modules/__fixtures__/typescript-packages/complex-types/src/index.d.ts +4 -0
- package/dist/modules/__fixtures__/typescript-packages/complex-types/src/index.d.ts.map +1 -0
- package/dist/modules/__fixtures__/typescript-packages/complex-types/src/index.js +7 -0
- package/dist/modules/__fixtures__/typescript-packages/complex-types/src/index.js.map +1 -0
- package/dist/modules/__fixtures__/typescript-packages/complex-types/src/models/category.d.ts +15 -0
- package/dist/modules/__fixtures__/typescript-packages/complex-types/src/models/category.d.ts.map +1 -0
- package/dist/modules/__fixtures__/typescript-packages/complex-types/src/models/category.js +3 -0
- package/dist/modules/__fixtures__/typescript-packages/complex-types/src/models/category.js.map +1 -0
- package/dist/modules/__fixtures__/typescript-packages/complex-types/src/models/product.d.ts +34 -0
- package/dist/modules/__fixtures__/typescript-packages/complex-types/src/models/product.d.ts.map +1 -0
- package/dist/modules/__fixtures__/typescript-packages/complex-types/src/models/product.js +23 -0
- package/dist/modules/__fixtures__/typescript-packages/complex-types/src/models/product.js.map +1 -0
- package/dist/modules/__fixtures__/typescript-packages/simple-types/index.d.ts +39 -0
- package/dist/modules/__fixtures__/typescript-packages/simple-types/index.d.ts.map +1 -0
- package/dist/modules/__fixtures__/typescript-packages/simple-types/index.js +39 -0
- package/dist/modules/__fixtures__/typescript-packages/simple-types/index.js.map +1 -0
- package/dist/modules/extractors/TypeScriptExtractor.d.ts +18 -0
- package/dist/modules/extractors/TypeScriptExtractor.d.ts.map +1 -0
- package/dist/modules/extractors/TypeScriptExtractor.js +361 -0
- package/dist/modules/extractors/TypeScriptExtractor.js.map +1 -0
- package/dist/modules/index.d.ts +13 -0
- package/dist/modules/index.d.ts.map +1 -0
- package/dist/modules/index.js +21 -0
- package/dist/modules/index.js.map +1 -0
- package/dist/providers/GitVersionControlProvider.d.ts +108 -0
- package/dist/providers/GitVersionControlProvider.d.ts.map +1 -0
- package/dist/providers/GitVersionControlProvider.js +380 -0
- package/dist/providers/GitVersionControlProvider.js.map +1 -0
- package/dist/providers/PackageManagerApiProvider.d.ts +78 -0
- package/dist/providers/PackageManagerApiProvider.d.ts.map +1 -0
- package/dist/providers/PackageManagerApiProvider.js +14 -0
- package/dist/providers/PackageManagerApiProvider.js.map +1 -0
- package/dist/providers/index.d.ts +4 -0
- package/dist/providers/index.d.ts.map +1 -0
- package/dist/providers/index.js +10 -0
- package/dist/providers/index.js.map +1 -0
- package/dist/services/FilesystemService.d.ts +59 -0
- package/dist/services/FilesystemService.d.ts.map +1 -0
- package/dist/services/FilesystemService.js +391 -0
- package/dist/services/FilesystemService.js.map +1 -0
- package/dist/services/index.d.ts +2 -0
- package/dist/services/index.d.ts.map +1 -0
- package/dist/services/index.js +7 -0
- package/dist/services/index.js.map +1 -0
- package/dist/types/file-system.d.ts +7 -0
- package/dist/types/file-system.d.ts.map +1 -0
- package/dist/types/file-system.js +7 -0
- package/dist/types/file-system.js.map +1 -0
- package/dist/types/index.d.ts +4 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +3 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/layer-types.d.ts +187 -0
- package/dist/types/layer-types.d.ts.map +1 -0
- package/dist/types/layer-types.js +7 -0
- package/dist/types/layer-types.js.map +1 -0
- package/dist/types/version-control-layer.d.ts +53 -0
- package/dist/types/version-control-layer.d.ts.map +1 -0
- package/dist/types/version-control-layer.js +3 -0
- package/dist/types/version-control-layer.js.map +1 -0
- package/dist/types/workspace-boundaries.d.ts +17 -0
- package/dist/types/workspace-boundaries.d.ts.map +1 -0
- package/dist/types/workspace-boundaries.js +7 -0
- package/dist/types/workspace-boundaries.js.map +1 -0
- package/package.json +42 -0
- package/src/index.ts +62 -0
- package/src/modules/DependencyLayerModule.ts +329 -0
- package/src/modules/FileSystemModule.ts +65 -0
- package/src/modules/FileTypeLayerModule.ts +199 -0
- package/src/modules/FrameworkLayerModule.ts +437 -0
- package/src/modules/PackageLayerModule.ts +979 -0
- package/src/modules/TypeExtractionModule.test.ts +340 -0
- package/src/modules/TypeExtractionModule.ts +180 -0
- package/src/modules/VersionControlLayerModule.ts +31 -0
- package/src/modules/__fixtures__/typescript-packages/complex-types/package.json +6 -0
- package/src/modules/__fixtures__/typescript-packages/complex-types/src/index.ts +6 -0
- package/src/modules/__fixtures__/typescript-packages/complex-types/src/models/category.ts +15 -0
- package/src/modules/__fixtures__/typescript-packages/complex-types/src/models/product.ts +48 -0
- package/src/modules/__fixtures__/typescript-packages/javascript-only/index.js +18 -0
- package/src/modules/__fixtures__/typescript-packages/javascript-only/package.json +5 -0
- package/src/modules/__fixtures__/typescript-packages/simple-types/index.ts +53 -0
- package/src/modules/__fixtures__/typescript-packages/simple-types/package.json +6 -0
- package/src/modules/extractors/README.md +55 -0
- package/src/modules/extractors/TypeScriptExtractor.ts +409 -0
- package/src/modules/index.ts +13 -0
- package/src/providers/GitVersionControlProvider.ts +500 -0
- package/src/providers/PackageManagerApiProvider.ts +108 -0
- package/src/providers/README.md +88 -0
- package/src/providers/index.ts +17 -0
- package/src/services/FilesystemService.ts +530 -0
- package/src/services/index.ts +2 -0
- package/src/types/file-system.ts +11 -0
- package/src/types/index.ts +24 -0
- package/src/types/layer-types.ts +264 -0
- package/src/types/version-control-layer.ts +87 -0
- package/src/types/workspace-boundaries.ts +17 -0
|
@@ -0,0 +1,264 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Core layer type system
|
|
3
|
+
* Minimal types needed for FileTypeLayerModule
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
// Base file selection types
|
|
7
|
+
export interface FilePattern {
|
|
8
|
+
type: 'glob' | 'regex' | 'exact';
|
|
9
|
+
pattern: string;
|
|
10
|
+
description?: string;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export interface FileSet {
|
|
14
|
+
id: string;
|
|
15
|
+
name: string;
|
|
16
|
+
description?: string;
|
|
17
|
+
patterns: FilePattern[];
|
|
18
|
+
// Results after pattern matching
|
|
19
|
+
matchedFiles?: string[];
|
|
20
|
+
fileCount?: number;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
// Base layer that all other layers extend
|
|
24
|
+
export interface BaseLayer {
|
|
25
|
+
id: string;
|
|
26
|
+
name: string;
|
|
27
|
+
type: string;
|
|
28
|
+
enabled: boolean;
|
|
29
|
+
|
|
30
|
+
// Workspace boundary information
|
|
31
|
+
workspaceId?: string;
|
|
32
|
+
workspaceRoot?: string;
|
|
33
|
+
|
|
34
|
+
// How this layer was derived
|
|
35
|
+
derivedFrom: {
|
|
36
|
+
fileSets: FileSet[];
|
|
37
|
+
derivationType:
|
|
38
|
+
| 'presence'
|
|
39
|
+
| 'content'
|
|
40
|
+
| 'aggregation'
|
|
41
|
+
| 'relationship'
|
|
42
|
+
| 'content+pattern'
|
|
43
|
+
| 'content+presence';
|
|
44
|
+
description: string;
|
|
45
|
+
|
|
46
|
+
// For content-derived layers
|
|
47
|
+
contentExtraction?: {
|
|
48
|
+
method: 'parse' | 'grep' | 'ast' | 'custom';
|
|
49
|
+
|
|
50
|
+
// For parsed content (JSON, YAML, etc)
|
|
51
|
+
parser?: {
|
|
52
|
+
format: 'json' | 'yaml' | 'toml' | 'xml';
|
|
53
|
+
paths?: string[]; // JSONPath, dot notation, etc
|
|
54
|
+
schema?: unknown; // Optional schema validation
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
// For pattern matching (grep)
|
|
58
|
+
patterns?: {
|
|
59
|
+
regex: string;
|
|
60
|
+
captureGroups?: string[];
|
|
61
|
+
multiline?: boolean;
|
|
62
|
+
}[];
|
|
63
|
+
|
|
64
|
+
// For AST-based extraction
|
|
65
|
+
ast?: {
|
|
66
|
+
language: string;
|
|
67
|
+
nodeTypes?: string[];
|
|
68
|
+
visitor?: string; // Function name to visit nodes
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
// Dependencies on other layers
|
|
74
|
+
dependsOn?: string[]; // layer IDs this layer depends on
|
|
75
|
+
enhances?: string; // layer ID this layer enhances/augments
|
|
76
|
+
|
|
77
|
+
// Visual properties
|
|
78
|
+
color?: string;
|
|
79
|
+
icon?: string;
|
|
80
|
+
pillar?: 'validation' | 'dataFlow' | 'foundationHealth' | 'viewLayers';
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
// Package command structure
|
|
84
|
+
export interface PackageCommand {
|
|
85
|
+
name: string; // Display name (e.g., "test", "build")
|
|
86
|
+
command: string; // Full command to run (e.g., "npm run test")
|
|
87
|
+
description?: string; // Optional tooltip
|
|
88
|
+
type?: 'script' | 'standard'; // From manifest vs standard tool command
|
|
89
|
+
workingDirectory?: string; // Where to run the command (package path)
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
// Config file information
|
|
93
|
+
export interface ConfigFile {
|
|
94
|
+
path: string;
|
|
95
|
+
exists: boolean;
|
|
96
|
+
type: 'json' | 'yaml' | 'toml' | 'js' | 'ts' | 'ini' | 'custom';
|
|
97
|
+
isInline?: boolean; // For configs inside package.json
|
|
98
|
+
inlineField?: string; // e.g., "eslintConfig" in package.json
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
// Filter layer - special type for exclusion rules
|
|
102
|
+
export interface FileSystemFilterLayer extends BaseLayer {
|
|
103
|
+
type: 'filter';
|
|
104
|
+
|
|
105
|
+
filterData: {
|
|
106
|
+
purpose: 'performance' | 'security' | 'relevance';
|
|
107
|
+
scope: 'directory' | 'workspace'; // Removed 'global' - everything is directory-scoped
|
|
108
|
+
sourceDirectory: string; // Required: The directory this filter originates from ('' for root)
|
|
109
|
+
|
|
110
|
+
// What to exclude
|
|
111
|
+
excludedPatterns: FilePattern[];
|
|
112
|
+
|
|
113
|
+
// Statistics
|
|
114
|
+
stats?: {
|
|
115
|
+
totalFiltered: number;
|
|
116
|
+
bytesExcluded: number;
|
|
117
|
+
largestExcluded?: string;
|
|
118
|
+
};
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
// Package layer - derived from package.json presence
|
|
123
|
+
export interface PackageLayer extends BaseLayer {
|
|
124
|
+
type: 'package' | 'node' | 'python' | 'cargo' | 'go';
|
|
125
|
+
|
|
126
|
+
// Package-specific data
|
|
127
|
+
packageData: {
|
|
128
|
+
name: string;
|
|
129
|
+
version?: string;
|
|
130
|
+
path: string;
|
|
131
|
+
packageManager: 'npm' | 'yarn' | 'pnpm' | 'pip' | 'poetry' | 'pipenv' | 'cargo' | 'unknown';
|
|
132
|
+
dependencies: Record<string, string>;
|
|
133
|
+
devDependencies: Record<string, string>;
|
|
134
|
+
peerDependencies: Record<string, string>;
|
|
135
|
+
|
|
136
|
+
// Relationships
|
|
137
|
+
isMonorepoRoot: boolean;
|
|
138
|
+
isWorkspace: boolean;
|
|
139
|
+
parentPackage?: string;
|
|
140
|
+
|
|
141
|
+
// Available commands for this package
|
|
142
|
+
availableCommands?: PackageCommand[];
|
|
143
|
+
};
|
|
144
|
+
|
|
145
|
+
// Associated file sets (not part of derivation, but related)
|
|
146
|
+
lockFiles?: FileSet;
|
|
147
|
+
|
|
148
|
+
// Configuration files detected for this package
|
|
149
|
+
configFiles?: {
|
|
150
|
+
// JavaScript/TypeScript tool configs
|
|
151
|
+
knip?: ConfigFile;
|
|
152
|
+
eslint?: ConfigFile;
|
|
153
|
+
prettier?: ConfigFile;
|
|
154
|
+
typescript?: ConfigFile;
|
|
155
|
+
jest?: ConfigFile;
|
|
156
|
+
vitest?: ConfigFile;
|
|
157
|
+
webpack?: ConfigFile;
|
|
158
|
+
vite?: ConfigFile;
|
|
159
|
+
rollup?: ConfigFile;
|
|
160
|
+
babel?: ConfigFile;
|
|
161
|
+
|
|
162
|
+
// Python tool configs
|
|
163
|
+
pytest?: ConfigFile;
|
|
164
|
+
flake8?: ConfigFile;
|
|
165
|
+
mypy?: ConfigFile;
|
|
166
|
+
black?: ConfigFile;
|
|
167
|
+
ruff?: ConfigFile;
|
|
168
|
+
pylint?: ConfigFile;
|
|
169
|
+
|
|
170
|
+
// Rust tool configs
|
|
171
|
+
rustfmt?: ConfigFile;
|
|
172
|
+
clippy?: ConfigFile;
|
|
173
|
+
|
|
174
|
+
// General configs
|
|
175
|
+
dockerfile?: ConfigFile;
|
|
176
|
+
gitignore?: ConfigFile;
|
|
177
|
+
editorconfig?: ConfigFile;
|
|
178
|
+
|
|
179
|
+
// Allow for dynamic tool configs not in the predefined list
|
|
180
|
+
[key: string]: ConfigFile | undefined;
|
|
181
|
+
};
|
|
182
|
+
|
|
183
|
+
// Primary documentation folder detected for this package
|
|
184
|
+
docsFolder?: string;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
// Dependency layer - derived from package dependencies
|
|
188
|
+
export interface DependencyLayer extends BaseLayer {
|
|
189
|
+
type: 'dependency';
|
|
190
|
+
|
|
191
|
+
dependencyData: {
|
|
192
|
+
name: string;
|
|
193
|
+
version: string;
|
|
194
|
+
isDev: boolean;
|
|
195
|
+
isPeer: boolean;
|
|
196
|
+
declaredIn: string[]; // Package layer IDs where this dependency is declared
|
|
197
|
+
sourceFile: FileSet; // Package.json files declaring this dependency
|
|
198
|
+
};
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
// Framework layer - detected from specific dependencies
|
|
202
|
+
export interface FrameworkLayer extends BaseLayer {
|
|
203
|
+
type: 'framework';
|
|
204
|
+
|
|
205
|
+
frameworkData: {
|
|
206
|
+
name: string;
|
|
207
|
+
category: 'ui' | 'backend' | 'testing' | 'build' | 'styling';
|
|
208
|
+
usedBy: string[]; // Package names using this framework
|
|
209
|
+
};
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
// Type extraction types
|
|
213
|
+
export interface ExtractedType {
|
|
214
|
+
name: string;
|
|
215
|
+
kind: 'interface' | 'type' | 'class' | 'enum' | 'function';
|
|
216
|
+
text: string; // Full source text of the declaration
|
|
217
|
+
fileName: string; // Relative path from package root
|
|
218
|
+
isExported: boolean;
|
|
219
|
+
jsDoc?: string; // JSDoc comment if present
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
export interface PackageTypes {
|
|
223
|
+
packagePath: string;
|
|
224
|
+
packageName: string;
|
|
225
|
+
types: ExtractedType[];
|
|
226
|
+
exports: {
|
|
227
|
+
named: string[];
|
|
228
|
+
default?: string;
|
|
229
|
+
};
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
// Type extraction options
|
|
233
|
+
export interface TypeExtractionOptions {
|
|
234
|
+
includeTests?: boolean;
|
|
235
|
+
includeInternal?: boolean;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
// Type extractor abstraction
|
|
239
|
+
export interface TypeExtractor {
|
|
240
|
+
name: string;
|
|
241
|
+
canHandle(packagePath: string, fileExtensions: string[]): boolean;
|
|
242
|
+
extractTypes(packagePath: string, options?: TypeExtractionOptions): Promise<PackageTypes>;
|
|
243
|
+
generateDefinitionFile?(packageTypes: PackageTypes): Promise<string>;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
// Type definition layer - derived from TypeScript analysis
|
|
247
|
+
export interface TypeDefinitionLayer extends BaseLayer {
|
|
248
|
+
type: 'type-definitions';
|
|
249
|
+
|
|
250
|
+
typeData: {
|
|
251
|
+
sourcePackageId: string; // PackageLayer ID this was extracted from
|
|
252
|
+
extractedTypes: ExtractedType[];
|
|
253
|
+
exports: {
|
|
254
|
+
named: string[];
|
|
255
|
+
default?: string;
|
|
256
|
+
};
|
|
257
|
+
hasTypeScript: boolean; // Whether the source package contains TypeScript files
|
|
258
|
+
definitionFile?: string; // Path to generated .d.ts file if created
|
|
259
|
+
extractionOptions?: {
|
|
260
|
+
includeTests: boolean;
|
|
261
|
+
includeInternal: boolean;
|
|
262
|
+
};
|
|
263
|
+
};
|
|
264
|
+
}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { BaseLayer, FilePattern } from './layer-types';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Version Control Layer - provides VCS-specific functionality
|
|
5
|
+
* including ignore patterns, tracked files, and VCS metadata
|
|
6
|
+
*/
|
|
7
|
+
export interface VersionControlLayer extends BaseLayer {
|
|
8
|
+
type: 'version-control';
|
|
9
|
+
|
|
10
|
+
vcsData: {
|
|
11
|
+
// Type of version control system
|
|
12
|
+
system: 'git' | 'svn' | 'mercurial' | 'perforce' | 'unknown';
|
|
13
|
+
|
|
14
|
+
// Root of the repository
|
|
15
|
+
repositoryRoot: string;
|
|
16
|
+
|
|
17
|
+
// Remote repository information
|
|
18
|
+
remotes?: Array<{
|
|
19
|
+
name: string;
|
|
20
|
+
url: string;
|
|
21
|
+
type: 'fetch' | 'push' | 'both';
|
|
22
|
+
}>;
|
|
23
|
+
|
|
24
|
+
// Current branch/revision
|
|
25
|
+
currentBranch?: string;
|
|
26
|
+
currentRevision?: string;
|
|
27
|
+
|
|
28
|
+
// Ignore patterns from VCS ignore files
|
|
29
|
+
ignorePatterns: VersionControlIgnorePattern[];
|
|
30
|
+
|
|
31
|
+
// Status information (optional, can be expensive to compute)
|
|
32
|
+
status?: {
|
|
33
|
+
trackedFiles?: string[];
|
|
34
|
+
untrackedFiles?: string[];
|
|
35
|
+
modifiedFiles?: string[];
|
|
36
|
+
stagedFiles?: string[];
|
|
37
|
+
conflictedFiles?: string[];
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Represents an ignore pattern from version control
|
|
44
|
+
*/
|
|
45
|
+
export interface VersionControlIgnorePattern extends FilePattern {
|
|
46
|
+
// Source of the pattern (which .gitignore file, etc.)
|
|
47
|
+
source: string;
|
|
48
|
+
|
|
49
|
+
// Whether this pattern is negated (! prefix in gitignore)
|
|
50
|
+
negated?: boolean;
|
|
51
|
+
|
|
52
|
+
// Whether this pattern only applies to directories
|
|
53
|
+
directoryOnly?: boolean;
|
|
54
|
+
|
|
55
|
+
// Relative path from repository root where this pattern applies
|
|
56
|
+
scope?: string;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Interface for version control providers
|
|
61
|
+
*/
|
|
62
|
+
export interface VersionControlProvider {
|
|
63
|
+
// Detect if a directory is under version control
|
|
64
|
+
detect(directoryPath: string): Promise<boolean>;
|
|
65
|
+
|
|
66
|
+
// Get the repository root
|
|
67
|
+
getRepositoryRoot(directoryPath: string): Promise<string | null>;
|
|
68
|
+
|
|
69
|
+
// Create a version control layer for the repository
|
|
70
|
+
createLayer(repositoryRoot: string): Promise<VersionControlLayer>;
|
|
71
|
+
|
|
72
|
+
// Extract ignore patterns from the repository
|
|
73
|
+
extractIgnorePatterns(repositoryRoot: string): Promise<VersionControlIgnorePattern[]>;
|
|
74
|
+
|
|
75
|
+
// Get current branch/revision info
|
|
76
|
+
getCurrentBranch(repositoryRoot: string): Promise<string | null>;
|
|
77
|
+
getCurrentRevision(repositoryPath: string): Promise<string | null>;
|
|
78
|
+
|
|
79
|
+
// Get remote information
|
|
80
|
+
getRemotes(repositoryRoot: string): Promise<
|
|
81
|
+
Array<{
|
|
82
|
+
name: string;
|
|
83
|
+
url: string;
|
|
84
|
+
type: 'fetch' | 'push' | 'both';
|
|
85
|
+
}>
|
|
86
|
+
>;
|
|
87
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Minimal workspace boundary type for backwards compatibility
|
|
3
|
+
* This is a stub - the full implementation can be added later if needed
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
export interface WorkspaceBoundary {
|
|
7
|
+
id: string;
|
|
8
|
+
name: string;
|
|
9
|
+
rootPath?: string;
|
|
10
|
+
packageJsonPath: string;
|
|
11
|
+
isRoot: boolean;
|
|
12
|
+
packageData?: {
|
|
13
|
+
name?: string;
|
|
14
|
+
version?: string;
|
|
15
|
+
workspaces?: string[];
|
|
16
|
+
};
|
|
17
|
+
}
|