@legit-sdk/core 0.2.2 → 0.2.4
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/dist/index.d.ts +16 -2
- package/dist/index.js +81 -80
- package/dist/server.d.ts +4 -0
- package/dist/server.js +7 -6
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -198,7 +198,14 @@ declare class CompositeFs {
|
|
|
198
198
|
access: (filePath: string, mode?: number) => Promise<void>;
|
|
199
199
|
opendir: (dirPath: nodeFs.PathLike, options?: nodeFs.OpenDirOptions) => Promise<CompositeFsDir>;
|
|
200
200
|
mkdir: (dirPath: string, options?: any) => Promise<void>;
|
|
201
|
-
readdir:
|
|
201
|
+
readdir: {
|
|
202
|
+
(dirPath: nodeFs.PathLike, options?: string | {
|
|
203
|
+
withFileTypes?: false;
|
|
204
|
+
}): Promise<string[]>;
|
|
205
|
+
(dirPath: nodeFs.PathLike, options: {
|
|
206
|
+
withFileTypes: true;
|
|
207
|
+
}): Promise<nodeFs.Dirent[]>;
|
|
208
|
+
};
|
|
202
209
|
open: (filePath: string, flags: string, mode?: number) => Promise<CompositFsFileHandle>;
|
|
203
210
|
stat: (path: nodeFs.PathLike, opts?: {
|
|
204
211
|
bigint?: boolean;
|
|
@@ -595,7 +602,7 @@ type VirtualFile = {
|
|
|
595
602
|
size?: number;
|
|
596
603
|
} | {
|
|
597
604
|
type: 'directory';
|
|
598
|
-
content:
|
|
605
|
+
content: nodeFs.Dirent[];
|
|
599
606
|
oid?: string | undefined;
|
|
600
607
|
mode?: number;
|
|
601
608
|
};
|
|
@@ -614,6 +621,7 @@ interface VirtualFileArgs {
|
|
|
614
621
|
}
|
|
615
622
|
type VirtualFileDefinition = {
|
|
616
623
|
type: string;
|
|
624
|
+
rootType: 'folder' | 'file';
|
|
617
625
|
getFile: (args: VirtualFileArgs) => Promise<VirtualFile | undefined>;
|
|
618
626
|
getStats: (args: VirtualFileArgs) => Promise<nodeFs.Stats>;
|
|
619
627
|
onFileChanged?: (args: VirtualFileArgs) => Promise<void>;
|
|
@@ -732,6 +740,12 @@ Context: the hole thing is a non published poc so no need to migrate - just an i
|
|
|
732
740
|
*/
|
|
733
741
|
declare class GitSubFs extends BaseCompositeSubFs implements CompositeSubFs {
|
|
734
742
|
private static readonly LEGIT_DIR;
|
|
743
|
+
/**
|
|
744
|
+
* how to handle branches with slashes in them?
|
|
745
|
+
*
|
|
746
|
+
* Lets say i have a branch called my/branch/name
|
|
747
|
+
* this means i am not allowed to have a branch called my because this would conflict with
|
|
748
|
+
*/
|
|
735
749
|
private static pathRouter;
|
|
736
750
|
private memFs;
|
|
737
751
|
private openFh;
|