@stagewise/agent-runtime-node 0.2.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/LICENSE +661 -0
- package/dist/__tests__/file-operations.test.d.ts +2 -0
- package/dist/__tests__/fixtures/sample-project/src/components/Button.d.ts +10 -0
- package/dist/__tests__/fixtures/sample-project/src/components/Input.d.ts +9 -0
- package/dist/__tests__/fixtures/sample-project/src/index.d.ts +5 -0
- package/dist/__tests__/fixtures/sample-project/src/lib/helpers.d.ts +13 -0
- package/dist/__tests__/fixtures/sample-project/src/lib/utils.d.ts +13 -0
- package/dist/__tests__/fixtures/sample-project/src/types.d.ts +20 -0
- package/dist/__tests__/fixtures/sample-project/tests/utils.test.d.ts +2 -0
- package/dist/__tests__/glob-node-fallback.test.d.ts +2 -0
- package/dist/__tests__/glob-ripgrep.test.d.ts +2 -0
- package/dist/__tests__/glob-searchreplace.test.d.ts +2 -0
- package/dist/__tests__/grep-fallback.test.d.ts +2 -0
- package/dist/__tests__/grep-node-fallback.test.d.ts +2 -0
- package/dist/__tests__/grep-ripgrep.test.d.ts +2 -0
- package/dist/__tests__/grep.test.d.ts +2 -0
- package/dist/__tests__/search-replace.test.d.ts +2 -0
- package/dist/__tests__/shared/glob-test-suite.d.ts +10 -0
- package/dist/__tests__/shared/grep-test-suite.d.ts +10 -0
- package/dist/__tests__/utils/assertions.d.ts +50 -0
- package/dist/__tests__/utils/cleanup.d.ts +12 -0
- package/dist/__tests__/utils/test-fixtures.d.ts +47 -0
- package/dist/glob/glob-node-fallback.d.ts +3 -0
- package/dist/glob/glob-ripgrep.d.ts +17 -0
- package/dist/glob/index.d.ts +3 -0
- package/dist/glob/utils.d.ts +6 -0
- package/dist/glob.d.ts +26 -0
- package/dist/grep/grep-node-fallback.d.ts +3 -0
- package/dist/grep/grep-ripgrep.d.ts +32 -0
- package/dist/grep/index.d.ts +3 -0
- package/dist/grep.d.ts +12 -0
- package/dist/index.d.ts +155 -0
- package/dist/index.js +11 -0
- package/dist/ripgrep/binary-resolver.d.ts +10 -0
- package/dist/ripgrep/executor.d.ts +33 -0
- package/dist/ripgrep/index.d.ts +25 -0
- package/dist/ripgrep/output-parser.d.ts +17 -0
- package/dist/ripgrep/platform.d.ts +21 -0
- package/dist/shared.d.ts +11 -0
- package/dist/types.d.ts +128 -0
- package/dist/vscode-ripgrep/download.d.ts +10 -0
- package/dist/vscode-ripgrep/ensure-ripgrep.d.ts +21 -0
- package/dist/vscode-ripgrep/get-path.d.ts +22 -0
- package/package.json +52 -0
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
interface InputProps {
|
|
2
|
+
value: string;
|
|
3
|
+
onChange: (value: string) => void;
|
|
4
|
+
placeholder?: string;
|
|
5
|
+
type?: 'text' | 'email' | 'password';
|
|
6
|
+
}
|
|
7
|
+
export declare const Input: ({ value, onChange, placeholder, type, }: InputProps) => any;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=Input.d.ts.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Capitalizes the first letter of a string
|
|
3
|
+
*/
|
|
4
|
+
export declare function capitalize(str: string): string;
|
|
5
|
+
/**
|
|
6
|
+
* Truncates a string to a specified length
|
|
7
|
+
*/
|
|
8
|
+
export declare function truncate(str: string, maxLength: number): string;
|
|
9
|
+
/**
|
|
10
|
+
* Formats a date to a readable string
|
|
11
|
+
*/
|
|
12
|
+
export declare function formatDate(date: Date): string;
|
|
13
|
+
//# sourceMappingURL=helpers.d.ts.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Validates an email address
|
|
3
|
+
*/
|
|
4
|
+
export declare function isValidEmail(email: string): boolean;
|
|
5
|
+
/**
|
|
6
|
+
* Validates a URL
|
|
7
|
+
*/
|
|
8
|
+
export declare function isValidURL(url: string): boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Error handling utility
|
|
11
|
+
*/
|
|
12
|
+
export declare function handleError(error: unknown): string;
|
|
13
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export interface User {
|
|
2
|
+
id: number;
|
|
3
|
+
name: string;
|
|
4
|
+
email: string;
|
|
5
|
+
createdAt: Date;
|
|
6
|
+
}
|
|
7
|
+
export interface Post {
|
|
8
|
+
id: number;
|
|
9
|
+
title: string;
|
|
10
|
+
content: string;
|
|
11
|
+
authorId: number;
|
|
12
|
+
}
|
|
13
|
+
export type UserRole = 'admin' | 'user' | 'guest';
|
|
14
|
+
export declare class ValidationError extends Error {
|
|
15
|
+
constructor(message: string);
|
|
16
|
+
}
|
|
17
|
+
export declare class NotFoundError extends Error {
|
|
18
|
+
constructor(message: string);
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { NodeFileSystemProvider } from '../../index.js';
|
|
2
|
+
/**
|
|
3
|
+
* Shared glob test suite that can be run with different file system providers.
|
|
4
|
+
* This allows testing both ripgrep and Node.js fallback implementations with the same test cases.
|
|
5
|
+
*
|
|
6
|
+
* @param getFileSystem - Function that returns a configured NodeFileSystemProvider instance
|
|
7
|
+
* @param getTestDir - Function that returns the current test directory
|
|
8
|
+
*/
|
|
9
|
+
export declare function runGlobTestSuite(getFileSystem: () => NodeFileSystemProvider, getTestDir: () => string): void;
|
|
10
|
+
//# sourceMappingURL=glob-test-suite.d.ts.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { NodeFileSystemProvider } from '../../index.js';
|
|
2
|
+
/**
|
|
3
|
+
* Shared grep test suite that can be run with different file system providers.
|
|
4
|
+
* This allows testing both ripgrep and Node.js fallback implementations with the same test cases.
|
|
5
|
+
*
|
|
6
|
+
* @param getFileSystem - Function that returns a configured NodeFileSystemProvider instance
|
|
7
|
+
* @param getTestDir - Function that returns the current test directory
|
|
8
|
+
*/
|
|
9
|
+
export declare function runGrepTestSuite(getFileSystem: () => NodeFileSystemProvider, getTestDir: () => string): void;
|
|
10
|
+
//# sourceMappingURL=grep-test-suite.d.ts.map
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import type { GrepMatch, GrepResult } from '../../types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Asserts that a grep result is successful
|
|
4
|
+
*/
|
|
5
|
+
export declare function expectGrepSuccess(result: GrepResult): asserts result is GrepResult & {
|
|
6
|
+
success: true;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Asserts that a grep result has failed
|
|
10
|
+
*/
|
|
11
|
+
export declare function expectGrepFailure(result: GrepResult): void;
|
|
12
|
+
/**
|
|
13
|
+
* Asserts that a grep result contains a specific number of matches
|
|
14
|
+
*/
|
|
15
|
+
export declare function expectGrepMatchCount(result: GrepResult, count: number): void;
|
|
16
|
+
/**
|
|
17
|
+
* Asserts that a grep match has the expected properties
|
|
18
|
+
*/
|
|
19
|
+
export declare function expectGrepMatch(match: GrepMatch, expected: {
|
|
20
|
+
relativePath?: string;
|
|
21
|
+
line?: number;
|
|
22
|
+
column?: number;
|
|
23
|
+
match?: string;
|
|
24
|
+
preview?: string | RegExp;
|
|
25
|
+
}): void;
|
|
26
|
+
/**
|
|
27
|
+
* Asserts that a grep result contains a match in a specific file
|
|
28
|
+
*/
|
|
29
|
+
export declare function expectGrepMatchInFile(result: GrepResult, relativePath: string): void;
|
|
30
|
+
/**
|
|
31
|
+
* Asserts that a grep result does NOT contain a match in a specific file
|
|
32
|
+
*/
|
|
33
|
+
export declare function expectNoGrepMatchInFile(result: GrepResult, relativePath: string): void;
|
|
34
|
+
/**
|
|
35
|
+
* Asserts that all grep matches are in the allowed files
|
|
36
|
+
*/
|
|
37
|
+
export declare function expectOnlyMatchesInFiles(result: GrepResult, allowedFiles: string[]): void;
|
|
38
|
+
/**
|
|
39
|
+
* Asserts that file content matches the expected content
|
|
40
|
+
*/
|
|
41
|
+
export declare function expectFileContent(actualContent: string, expectedContent: string): void;
|
|
42
|
+
/**
|
|
43
|
+
* Asserts that file content contains the expected substring
|
|
44
|
+
*/
|
|
45
|
+
export declare function expectFileContains(actualContent: string, expectedSubstring: string): void;
|
|
46
|
+
/**
|
|
47
|
+
* Asserts that file content matches a regex
|
|
48
|
+
*/
|
|
49
|
+
export declare function expectFileMatches(actualContent: string, pattern: RegExp): void;
|
|
50
|
+
//# sourceMappingURL=assertions.d.ts.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cleans up a test directory and all its contents
|
|
3
|
+
*/
|
|
4
|
+
export declare function cleanupTestDir(dir: string): void;
|
|
5
|
+
/**
|
|
6
|
+
* Creates a cleanup handler that can be registered with afterEach
|
|
7
|
+
*/
|
|
8
|
+
export declare function createCleanupHandler(): {
|
|
9
|
+
register: (dir: string) => void;
|
|
10
|
+
cleanup: () => void;
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=cleanup.d.ts.map
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import * as fs from 'node:fs';
|
|
2
|
+
/**
|
|
3
|
+
* Creates a temporary test directory with a unique name
|
|
4
|
+
*/
|
|
5
|
+
export declare function createTempDir(prefix?: string): string;
|
|
6
|
+
/**
|
|
7
|
+
* Creates a file with the given content
|
|
8
|
+
*/
|
|
9
|
+
export declare function createFile(basePath: string, relativePath: string, content: string): string;
|
|
10
|
+
/**
|
|
11
|
+
* Creates a directory structure from a nested object
|
|
12
|
+
* Example: { 'src': { 'index.ts': 'content', 'lib': { 'utils.ts': 'content' } } }
|
|
13
|
+
*/
|
|
14
|
+
export declare function createFileTree(basePath: string, structure: Record<string, string | Record<string, unknown>>): void;
|
|
15
|
+
/**
|
|
16
|
+
* Creates a binary file (with NUL bytes)
|
|
17
|
+
*/
|
|
18
|
+
export declare function createBinaryFile(basePath: string, relativePath: string, sizeInBytes?: number): string;
|
|
19
|
+
/**
|
|
20
|
+
* Creates a large file with the specified number of lines
|
|
21
|
+
*/
|
|
22
|
+
export declare function createLargeFile(basePath: string, relativePath: string, numLines: number, lineTemplate?: string): string;
|
|
23
|
+
/**
|
|
24
|
+
* Creates a .gitignore file with the given patterns
|
|
25
|
+
*/
|
|
26
|
+
export declare function createGitignore(basePath: string, patterns: string[]): string;
|
|
27
|
+
/**
|
|
28
|
+
* Creates a realistic project structure with common patterns
|
|
29
|
+
*/
|
|
30
|
+
export declare function createRealisticProject(basePath: string): void;
|
|
31
|
+
/**
|
|
32
|
+
* Removes a directory and all its contents recursively
|
|
33
|
+
*/
|
|
34
|
+
export declare function removeDir(dir: string): void;
|
|
35
|
+
/**
|
|
36
|
+
* Reads the contents of a file
|
|
37
|
+
*/
|
|
38
|
+
export declare function readFile(filePath: string): string;
|
|
39
|
+
/**
|
|
40
|
+
* Checks if a file exists
|
|
41
|
+
*/
|
|
42
|
+
export declare function fileExists(filePath: string): boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Gets the file stats
|
|
45
|
+
*/
|
|
46
|
+
export declare function getFileStats(filePath: string): fs.Stats | null;
|
|
47
|
+
//# sourceMappingURL=test-fixtures.d.ts.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { FileSystemOperations, GlobResult, GlobOptions } from '../types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Executes glob using ripgrep binary for improved performance.
|
|
4
|
+
* Follows VS Code's pattern: uses `rg --files` with glob filters.
|
|
5
|
+
*
|
|
6
|
+
* This function attempts to use the platform-specific ripgrep binary for
|
|
7
|
+
* file enumeration. If ripgrep is not available or fails, it returns null to
|
|
8
|
+
* allow fallback to the Node.js implementation.
|
|
9
|
+
*
|
|
10
|
+
* @param fileSystem - File system provider for path resolution
|
|
11
|
+
* @param pattern - Glob pattern (e.g., "src/*.ts" or recursive patterns)
|
|
12
|
+
* @param rgBinaryBasePath - Base directory where ripgrep binary is installed
|
|
13
|
+
* @param options - Glob options
|
|
14
|
+
* @returns GlobResult if successful, null if ripgrep unavailable/failed
|
|
15
|
+
*/
|
|
16
|
+
export declare function globWithRipgrep(fileSystem: FileSystemOperations, pattern: string, rgBinaryBasePath: string, options?: GlobOptions, onError?: (error: Error) => void): Promise<GlobResult | null>;
|
|
17
|
+
//# sourceMappingURL=glob-ripgrep.d.ts.map
|
package/dist/glob.d.ts
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { BaseFileSystemProvider, GlobResult } from '@stagewise/agent-runtime-interface';
|
|
2
|
+
/**
|
|
3
|
+
* Options for executing ripgrep glob, matching the glob function's options
|
|
4
|
+
*/
|
|
5
|
+
export interface RipgrepGlobOptions {
|
|
6
|
+
cwd?: string;
|
|
7
|
+
absolute?: boolean;
|
|
8
|
+
includeDirectories?: boolean;
|
|
9
|
+
excludePatterns?: string[];
|
|
10
|
+
respectGitignore?: boolean;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Executes glob using ripgrep binary for improved performance.
|
|
14
|
+
* Follows VS Code's pattern: uses `rg --files` with glob filters.
|
|
15
|
+
*
|
|
16
|
+
* This function attempts to use the platform-specific ripgrep binary for
|
|
17
|
+
* file enumeration. If ripgrep is not available or fails, it returns null to
|
|
18
|
+
* allow fallback to the Node.js implementation.
|
|
19
|
+
*
|
|
20
|
+
* @param fileSystem - File system provider for path resolution
|
|
21
|
+
* @param pattern - Glob pattern (e.g., "src/*.ts" or recursive patterns)
|
|
22
|
+
* @param options - Glob options
|
|
23
|
+
* @returns GlobResult if successful, null if ripgrep unavailable/failed
|
|
24
|
+
*/
|
|
25
|
+
export declare function globWithRipgrep(fileSystem: BaseFileSystemProvider, pattern: string, options?: RipgrepGlobOptions): Promise<GlobResult | null>;
|
|
26
|
+
//# sourceMappingURL=glob.d.ts.map
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { FileSystemOperations, GrepResult, GrepOptions } from '../types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Options for executing ripgrep, matching the grep function's options
|
|
4
|
+
*/
|
|
5
|
+
export interface RipgrepGrepOptions {
|
|
6
|
+
recursive?: boolean;
|
|
7
|
+
maxDepth?: number;
|
|
8
|
+
filePattern?: string;
|
|
9
|
+
absoluteSearchPath?: string;
|
|
10
|
+
caseSensitive?: boolean;
|
|
11
|
+
maxMatches?: number;
|
|
12
|
+
excludePatterns?: string[];
|
|
13
|
+
respectGitignore?: boolean;
|
|
14
|
+
searchBinaryFiles?: boolean;
|
|
15
|
+
absoluteSearchResults?: boolean;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Executes grep using ripgrep binary for improved performance.
|
|
19
|
+
*
|
|
20
|
+
* This function attempts to use the platform-specific ripgrep binary for
|
|
21
|
+
* searching. If ripgrep is not available or fails, it returns null to
|
|
22
|
+
* allow fallback to the Node.js implementation.
|
|
23
|
+
*
|
|
24
|
+
* @param fileSystem - File system provider for path resolution
|
|
25
|
+
* @param searchPath - Path to search (file or directory)
|
|
26
|
+
* @param pattern - Search pattern (regex)
|
|
27
|
+
* @param rgBinaryBasePath - Base directory where ripgrep binary is installed
|
|
28
|
+
* @param options - Search options
|
|
29
|
+
* @returns GrepResult if successful, null if ripgrep unavailable/failed
|
|
30
|
+
*/
|
|
31
|
+
export declare function grepWithRipgrep(fileSystem: FileSystemOperations, pattern: string, rgBinaryBasePath: string, options?: GrepOptions, onError?: (error: Error) => void): Promise<GrepResult | null>;
|
|
32
|
+
//# sourceMappingURL=grep-ripgrep.d.ts.map
|
package/dist/grep.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { BaseFileSystemProvider, GrepResult } from '@stagewise/agent-runtime-interface';
|
|
2
|
+
export declare function grep(fileSystem: BaseFileSystemProvider, relativePath: string, pattern: string, options?: {
|
|
3
|
+
recursive?: boolean;
|
|
4
|
+
maxDepth?: number;
|
|
5
|
+
filePattern?: string;
|
|
6
|
+
caseSensitive?: boolean;
|
|
7
|
+
maxMatches?: number;
|
|
8
|
+
excludePatterns?: string[];
|
|
9
|
+
respectGitignore?: boolean;
|
|
10
|
+
searchBinaryFiles?: boolean;
|
|
11
|
+
}): Promise<GrepResult>;
|
|
12
|
+
//# sourceMappingURL=grep.d.ts.map
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
import type { FileSystemProviderConfig, FileChangeEvent, GrepResult, GlobResult, GrepOptions, GlobOptions, SearchReplaceResult } from './types.js';
|
|
2
|
+
export type { FileSystemProviderConfig, FileSystemOperations, FileChangeEvent, FileOperationResult, FileContentResult, DirectoryEntry, DirectoryListResult, GrepOptions, GrepMatch, GrepResult, GlobOptions, GlobResult, SearchReplaceMatch, SearchReplaceResult, } from './types.js';
|
|
3
|
+
export declare class NodeFileSystemProvider {
|
|
4
|
+
private config;
|
|
5
|
+
private gitignoreMap;
|
|
6
|
+
private gitignoreInitialized;
|
|
7
|
+
/** Hot-path cache: gitignore entries sorted by directory depth (deep → shallow) */
|
|
8
|
+
private sortedGitignoreEntries;
|
|
9
|
+
constructor(config: FileSystemProviderConfig);
|
|
10
|
+
getCurrentWorkingDirectory(): string;
|
|
11
|
+
setCurrentWorkingDirectory(dir: string): void;
|
|
12
|
+
readFile(relativePath: string, options?: {
|
|
13
|
+
startLine?: number;
|
|
14
|
+
endLine?: number;
|
|
15
|
+
}): Promise<{
|
|
16
|
+
success: boolean;
|
|
17
|
+
message: string;
|
|
18
|
+
error: string;
|
|
19
|
+
content?: undefined;
|
|
20
|
+
totalLines?: undefined;
|
|
21
|
+
} | {
|
|
22
|
+
success: boolean;
|
|
23
|
+
content: string;
|
|
24
|
+
totalLines: number;
|
|
25
|
+
message?: undefined;
|
|
26
|
+
error?: undefined;
|
|
27
|
+
}>;
|
|
28
|
+
writeFile(relativePath: string, content: string): Promise<{
|
|
29
|
+
success: boolean;
|
|
30
|
+
message: string;
|
|
31
|
+
error?: undefined;
|
|
32
|
+
} | {
|
|
33
|
+
success: boolean;
|
|
34
|
+
message: string;
|
|
35
|
+
error: string;
|
|
36
|
+
}>;
|
|
37
|
+
editFile(relativePath: string, content: string, startLine: number, endLine: number): Promise<{
|
|
38
|
+
success: boolean;
|
|
39
|
+
message: string;
|
|
40
|
+
error: string;
|
|
41
|
+
} | {
|
|
42
|
+
success: boolean;
|
|
43
|
+
message: string;
|
|
44
|
+
error?: undefined;
|
|
45
|
+
}>;
|
|
46
|
+
createDirectory(relativePath: string): Promise<{
|
|
47
|
+
success: boolean;
|
|
48
|
+
message: string;
|
|
49
|
+
error?: undefined;
|
|
50
|
+
} | {
|
|
51
|
+
success: boolean;
|
|
52
|
+
message: string;
|
|
53
|
+
error: string;
|
|
54
|
+
}>;
|
|
55
|
+
listDirectory(relativePath: string, options?: {
|
|
56
|
+
recursive?: boolean;
|
|
57
|
+
maxDepth?: number;
|
|
58
|
+
pattern?: string;
|
|
59
|
+
includeDirectories?: boolean;
|
|
60
|
+
includeFiles?: boolean;
|
|
61
|
+
respectGitignore?: boolean;
|
|
62
|
+
}): Promise<{
|
|
63
|
+
success: boolean;
|
|
64
|
+
message: string;
|
|
65
|
+
files: {
|
|
66
|
+
relativePath: string;
|
|
67
|
+
name: string;
|
|
68
|
+
type: "file" | "directory";
|
|
69
|
+
size?: number;
|
|
70
|
+
depth: number;
|
|
71
|
+
}[];
|
|
72
|
+
totalFiles: number;
|
|
73
|
+
totalDirectories: number;
|
|
74
|
+
error?: undefined;
|
|
75
|
+
} | {
|
|
76
|
+
success: boolean;
|
|
77
|
+
message: string;
|
|
78
|
+
error: string;
|
|
79
|
+
files?: undefined;
|
|
80
|
+
totalFiles?: undefined;
|
|
81
|
+
totalDirectories?: undefined;
|
|
82
|
+
}>;
|
|
83
|
+
grep(pattern: string, options?: GrepOptions): Promise<GrepResult>;
|
|
84
|
+
glob(pattern: string, options?: GlobOptions): Promise<GlobResult>;
|
|
85
|
+
searchAndReplace(relativePath: string, searchString: string, replaceString: string, options?: {
|
|
86
|
+
caseSensitive?: boolean;
|
|
87
|
+
wholeWord?: boolean;
|
|
88
|
+
regex?: boolean;
|
|
89
|
+
preserveCase?: boolean;
|
|
90
|
+
maxReplacements?: number;
|
|
91
|
+
dryRun?: boolean;
|
|
92
|
+
}): Promise<SearchReplaceResult>;
|
|
93
|
+
private preserveCase;
|
|
94
|
+
deleteFile(relativePath: string): Promise<{
|
|
95
|
+
success: boolean;
|
|
96
|
+
message: string;
|
|
97
|
+
error?: undefined;
|
|
98
|
+
} | {
|
|
99
|
+
success: boolean;
|
|
100
|
+
message: string;
|
|
101
|
+
error: string;
|
|
102
|
+
}>;
|
|
103
|
+
copyFile(source: string, destination: string): Promise<{
|
|
104
|
+
success: boolean;
|
|
105
|
+
message: string;
|
|
106
|
+
error?: undefined;
|
|
107
|
+
} | {
|
|
108
|
+
success: boolean;
|
|
109
|
+
message: string;
|
|
110
|
+
error: string;
|
|
111
|
+
}>;
|
|
112
|
+
moveFile(source: string, destination: string): Promise<{
|
|
113
|
+
success: boolean;
|
|
114
|
+
message: string;
|
|
115
|
+
error?: undefined;
|
|
116
|
+
} | {
|
|
117
|
+
success: boolean;
|
|
118
|
+
message: string;
|
|
119
|
+
error: string;
|
|
120
|
+
}>;
|
|
121
|
+
fileExists(relativePath: string): Promise<boolean>;
|
|
122
|
+
isDirectory(relativePath: string): Promise<boolean>;
|
|
123
|
+
getFileStats(relativePath: string): Promise<{
|
|
124
|
+
size: number;
|
|
125
|
+
modifiedTime: Date;
|
|
126
|
+
}>;
|
|
127
|
+
resolvePath(relativePath: string): string;
|
|
128
|
+
getDirectoryName(relativePath: string): string;
|
|
129
|
+
joinPaths(...relativePaths: string[]): string;
|
|
130
|
+
getRelativePath(from: string, to: string): string;
|
|
131
|
+
getFileExtension(relativePath: string): string;
|
|
132
|
+
getGitignorePatterns(): Promise<string[]>;
|
|
133
|
+
isIgnored(relativePath: string): Promise<boolean>;
|
|
134
|
+
/**
|
|
135
|
+
* Synchronous ignore check using a pre-sorted array (deepest → shallowest).
|
|
136
|
+
*/
|
|
137
|
+
isIgnoredSync(relativePath: string): boolean;
|
|
138
|
+
isBinary(relativePath: string): Promise<boolean>;
|
|
139
|
+
private ensureGitignoreInitialized;
|
|
140
|
+
private findAndLoadGitignoreFiles;
|
|
141
|
+
private isDirectoryIgnoredByParent;
|
|
142
|
+
watchFiles(relativePath: string, onFileChange: (event: FileChangeEvent) => void): Promise<() => Promise<void>>;
|
|
143
|
+
}
|
|
144
|
+
export interface ClientRuntimeNodeConfig {
|
|
145
|
+
workingDirectory: string;
|
|
146
|
+
rgBinaryBasePath: string;
|
|
147
|
+
}
|
|
148
|
+
export declare class ClientRuntimeNode {
|
|
149
|
+
readonly fileSystem: NodeFileSystemProvider;
|
|
150
|
+
constructor(config: ClientRuntimeNodeConfig);
|
|
151
|
+
}
|
|
152
|
+
export { ensureRipgrepInstalled } from './vscode-ripgrep/ensure-ripgrep.js';
|
|
153
|
+
export type { EnsureRipgrepResult, EnsureRipgrepOptions, } from './vscode-ripgrep/ensure-ripgrep.js';
|
|
154
|
+
export { getRipgrepPath, getRipgrepBinDir } from './vscode-ripgrep/get-path.js';
|
|
155
|
+
//# sourceMappingURL=index.d.ts.map
|