@interactive-inc/docs-client 1.0.19 → 1.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/.env.local +3 -0
- package/build/doc-file-system-BQAOBIO-.d.ts +337 -0
- package/build/file-system-json.d.ts +223 -0
- package/build/file-system-json.js +1043 -0
- package/build/file-system-mock.d.ts +92 -0
- package/build/file-system-mock.js +901 -0
- package/build/file-system-octokit.d.ts +173 -0
- package/build/file-system-octokit.js +1002 -0
- package/build/file-system.d.ts +117 -0
- package/build/file-system.js +537 -0
- package/build/index.d.ts +1006 -1292
- package/build/index.js +3032 -3722
- package/package.json +8 -3
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { D as DocFileSystem, a as DocPathSystem } from './doc-file-system-BQAOBIO-.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* In-memory file system for testing
|
|
5
|
+
*/
|
|
6
|
+
declare class DocFileSystemMock extends DocFileSystem {
|
|
7
|
+
private files;
|
|
8
|
+
private readonly _pathSystem;
|
|
9
|
+
private readonly _basePath;
|
|
10
|
+
constructor(props: {
|
|
11
|
+
basePath: string;
|
|
12
|
+
pathSystem: DocPathSystem;
|
|
13
|
+
skipDefaultFiles?: boolean;
|
|
14
|
+
});
|
|
15
|
+
/**
|
|
16
|
+
* PathSystem accessor (for testing)
|
|
17
|
+
*/
|
|
18
|
+
getPathSystem(): DocPathSystem;
|
|
19
|
+
/**
|
|
20
|
+
* Normalize path using basePath
|
|
21
|
+
*/
|
|
22
|
+
private normalizePath;
|
|
23
|
+
/**
|
|
24
|
+
* Create instance (mock data is automatically loaded)
|
|
25
|
+
*/
|
|
26
|
+
static create(basePath?: string): DocFileSystemMock;
|
|
27
|
+
/**
|
|
28
|
+
* Factory method for testing
|
|
29
|
+
*/
|
|
30
|
+
static createWithFiles(props: {
|
|
31
|
+
basePath?: string;
|
|
32
|
+
fileContents?: Record<string, string>;
|
|
33
|
+
}): DocFileSystemMock;
|
|
34
|
+
readFile(filePath: string): Promise<string | null | Error>;
|
|
35
|
+
writeFile(filePath: string, content: string): Promise<Error | null>;
|
|
36
|
+
deleteFile(filePath: string): Promise<Error | null>;
|
|
37
|
+
exists(filePath: string): Promise<boolean>;
|
|
38
|
+
copyFile(source: string, destination: string): Promise<Error | null>;
|
|
39
|
+
moveFile(source: string, destination: string): Promise<Error | null>;
|
|
40
|
+
readDirectory(directoryPath: string): Promise<string[]>;
|
|
41
|
+
readDirectoryRecursive(directoryPath: string): Promise<string[]>;
|
|
42
|
+
readDirectoryFilePaths(directoryPath: string): Promise<string[] | Error>;
|
|
43
|
+
createDirectory(_directoryPath: string): Promise<Error | null>;
|
|
44
|
+
deleteDirectory(directoryPath: string): Promise<void>;
|
|
45
|
+
getFileSize(filePath: string): Promise<number | Error>;
|
|
46
|
+
getFileModifiedTime(filePath: string): Promise<Date | Error>;
|
|
47
|
+
getFileCreatedTime(filePath: string): Promise<Date | Error>;
|
|
48
|
+
isDirectory(relativePath: string): Promise<boolean>;
|
|
49
|
+
isFile(relativePath: string): Promise<boolean>;
|
|
50
|
+
/**
|
|
51
|
+
* Get list of entries in directory
|
|
52
|
+
*/
|
|
53
|
+
readDirectoryFileNames(directoryPath?: string): Promise<string[] | Error>;
|
|
54
|
+
/**
|
|
55
|
+
* Check if directory exists
|
|
56
|
+
*/
|
|
57
|
+
directoryExists(relativePath: string): Promise<boolean>;
|
|
58
|
+
/**
|
|
59
|
+
* Check if file exists
|
|
60
|
+
*/
|
|
61
|
+
fileExists(relativePath: string): Promise<boolean>;
|
|
62
|
+
/**
|
|
63
|
+
* Create directory if it doesn't exist
|
|
64
|
+
*/
|
|
65
|
+
ensureDirectoryExists(_relativePath: string): Promise<Error | null>;
|
|
66
|
+
/**
|
|
67
|
+
* Clear all files
|
|
68
|
+
*/
|
|
69
|
+
clear(): void;
|
|
70
|
+
/**
|
|
71
|
+
* Check file existence (for testing)
|
|
72
|
+
*/
|
|
73
|
+
hasFile(filePath: string): boolean;
|
|
74
|
+
/**
|
|
75
|
+
* Get file content (sync version, for testing)
|
|
76
|
+
*/
|
|
77
|
+
getFileContent(filePath: string): string | undefined;
|
|
78
|
+
/**
|
|
79
|
+
* Get all file paths (for testing)
|
|
80
|
+
*/
|
|
81
|
+
getAllFilePaths(): string[];
|
|
82
|
+
/**
|
|
83
|
+
* Get file count (for testing)
|
|
84
|
+
*/
|
|
85
|
+
getFileCount(): number;
|
|
86
|
+
/**
|
|
87
|
+
* Setup test data
|
|
88
|
+
*/
|
|
89
|
+
setupTestFiles(files: Record<string, string>): void;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export { DocFileSystemMock };
|