shfs 0.1.4 → 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/dist/execute-Ul7LFccp.mjs +2303 -0
- package/dist/execute-Ul7LFccp.mjs.map +1 -0
- package/dist/{fs-CKSi_43x.d.mts → fs-Cp2fBYOe.d.mts} +7 -1
- package/dist/fs.d.mts +12 -2
- package/dist/fs.mjs +137 -5
- package/dist/fs.mjs.map +1 -1
- package/dist/index.d.mts +3 -1
- package/dist/index.mjs +3 -3594
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -1
package/dist/fs.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fs.mjs","names":[],"sources":["../src/fs/memory.ts"],"sourcesContent":["import picomatch from 'picomatch';\nimport type { Stream } from '../stream';\nimport { normalizePath } from '../util/path';\nimport type { FS } from './fs';\n\nexport type { FS } from './fs';\n\nexport class MemoryFS implements FS {\n\tprivate readonly files = new Map<string, Uint8Array>();\n\tprivate readonly directories = new Set<string>();\n\tprivate readonly fileMetadata = new Map<\n\t\tstring,\n\t\t{ mtime: Date; isDirectory: boolean }\n\t>();\n\n\tconstructor() {\n\t\t// Initialize root directory\n\t\tthis.directories.add('/');\n\t\tthis.fileMetadata.set('/', { mtime: new Date(), isDirectory: true });\n\t}\n\n\tsetFile(path: string, content: string | Uint8Array): void {\n\t\tconst normalizedPath = normalizePath(path);\n\t\tconst encoded =\n\t\t\ttypeof content === 'string'\n\t\t\t\t? new TextEncoder().encode(content)\n\t\t\t\t: content;\n\t\tthis.files.set(normalizedPath, encoded);\n\t\tthis.fileMetadata.set(normalizedPath, {\n\t\t\tmtime: new Date(),\n\t\t\tisDirectory: false,\n\t\t});\n\t}\n\n\tasync readFile(path: string): Promise<Uint8Array> {\n\t\tconst normalizedPath = normalizePath(path);\n\t\tconst content = this.files.get(normalizedPath);\n\t\tif (!content) {\n\t\t\tthrow new Error(`File not found: ${path}`);\n\t\t}\n\t\treturn content;\n\t}\n\n\tasync *readLines(path: string): Stream<string> {\n\t\tconst normalizedPath = normalizePath(path);\n\t\tconst content = this.files.get(normalizedPath);\n\t\tif (!content) {\n\t\t\tthrow new Error(`File not found: ${path}`);\n\t\t}\n\t\tconst text = new TextDecoder().decode(content);\n\t\tconst lines = text\n\t\t\t.split('\\n')\n\t\t\t.filter((_, i, arr) => !(i === arr.length - 1 && arr[i] === ''));\n\t\tyield* lines;\n\t}\n\n\tasync writeFile(path: string, content: Uint8Array): Promise<void> {\n\t\tconst normalizedPath = normalizePath(path);\n\t\tthis.files.set(normalizedPath, content);\n\t\tthis.fileMetadata.set(normalizedPath, {\n\t\t\tmtime: new Date(),\n\t\t\tisDirectory: false,\n\t\t});\n\t}\n\n\tasync deleteFile(path: string): Promise<void> {\n\t\tconst normalizedPath = normalizePath(path);\n\t\tif (!this.files.has(normalizedPath)) {\n\t\t\tthrow new Error(`File not found: ${path}`);\n\t\t}\n\t\tthis.files.delete(normalizedPath);\n\t\tthis.fileMetadata.delete(normalizedPath);\n\t}\n\n\tasync deleteDirectory(path: string, recursive = false): Promise<void> {\n\t\tconst normalizedPath = normalizePath(path);\n\t\tif (normalizedPath === '/') {\n\t\t\tthrow new Error(\"rm: cannot remove '/'\");\n\t\t}\n\t\tif (!this.directories.has(normalizedPath)) {\n\t\t\tthrow new Error(`No such file or directory: ${path}`);\n\t\t}\n\n\t\tconst childPrefix = `${normalizedPath}/`;\n\t\tconst hasChildDirectories = Array.from(this.directories).some(\n\t\t\t(directory) =>\n\t\t\t\tdirectory !== normalizedPath &&\n\t\t\t\tdirectory.startsWith(childPrefix)\n\t\t);\n\t\tconst hasChildFiles = Array.from(this.files.keys()).some((filePath) =>\n\t\t\tfilePath.startsWith(childPrefix)\n\t\t);\n\n\t\tif (!recursive && (hasChildDirectories || hasChildFiles)) {\n\t\t\tthrow new Error(`Directory not empty: ${path}`);\n\t\t}\n\n\t\tfor (const filePath of Array.from(this.files.keys())) {\n\t\t\tif (filePath.startsWith(childPrefix)) {\n\t\t\t\tthis.files.delete(filePath);\n\t\t\t\tthis.fileMetadata.delete(filePath);\n\t\t\t}\n\t\t}\n\n\t\tconst directoriesToDelete = Array.from(this.directories)\n\t\t\t.filter(\n\t\t\t\t(directory) =>\n\t\t\t\t\tdirectory === normalizedPath ||\n\t\t\t\t\tdirectory.startsWith(childPrefix)\n\t\t\t)\n\t\t\t.sort((a, b) => b.length - a.length);\n\t\tfor (const directory of directoriesToDelete) {\n\t\t\tif (directory === '/') {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tthis.directories.delete(directory);\n\t\t\tthis.fileMetadata.delete(directory);\n\t\t}\n\t}\n\n\tasync *readdir(glob: string): Stream<string> {\n\t\tconst isMatch = picomatch(glob, { dot: true });\n\n\t\tconst allPaths = [\n\t\t\t...Array.from(this.directories.keys()),\n\t\t\t...Array.from(this.files.keys()),\n\t\t];\n\t\tconst paths = allPaths.filter((path) => isMatch(path)).sort();\n\n\t\tfor (const path of paths) {\n\t\t\tyield path;\n\t\t}\n\t}\n\n\tasync mkdir(path: string, recursive = false): Promise<void> {\n\t\tconst normalizedPath = normalizePath(path);\n\t\tif (\n\t\t\tthis.directories.has(normalizedPath) ||\n\t\t\tthis.files.has(normalizedPath)\n\t\t) {\n\t\t\tthrow new Error(`Directory already exists: ${path}`);\n\t\t}\n\n\t\tif (recursive) {\n\t\t\t// Create all parent directories\n\t\t\tconst parts = normalizedPath.split('/').filter(Boolean);\n\t\t\tlet current = '';\n\t\t\tfor (const part of parts) {\n\t\t\t\tcurrent += `/${part}`;\n\t\t\t\tif (\n\t\t\t\t\t!(this.directories.has(current) || this.files.has(current))\n\t\t\t\t) {\n\t\t\t\t\tthis.directories.add(current);\n\t\t\t\t\tthis.fileMetadata.set(current, {\n\t\t\t\t\t\tmtime: new Date(),\n\t\t\t\t\t\tisDirectory: true,\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t// Check if parent directory exists\n\t\t\tconst parentPath =\n\t\t\t\tnormalizedPath.substring(0, normalizedPath.lastIndexOf('/')) ||\n\t\t\t\t'/';\n\t\t\tif (\n\t\t\t\tparentPath !== '/' &&\n\t\t\t\t!this.directories.has(parentPath) &&\n\t\t\t\t!this.files.has(parentPath)\n\t\t\t) {\n\t\t\t\tthrow new Error(`No such file or directory: ${parentPath}`);\n\t\t\t}\n\t\t\tthis.directories.add(normalizedPath);\n\t\t\tthis.fileMetadata.set(normalizedPath, {\n\t\t\t\tmtime: new Date(),\n\t\t\t\tisDirectory: true,\n\t\t\t});\n\t\t}\n\t}\n\n\tasync stat(\n\t\tpath: string\n\t): Promise<{ isDirectory: boolean; size: number; mtime: Date }> {\n\t\t// Normalize path by removing trailing slash\n\t\tconst normalizedPath = normalizePath(path);\n\n\t\tif (this.directories.has(normalizedPath)) {\n\t\t\treturn {\n\t\t\t\tisDirectory: true,\n\t\t\t\tsize: 0,\n\t\t\t\tmtime:\n\t\t\t\t\tthis.fileMetadata.get(normalizedPath)?.mtime || new Date(),\n\t\t\t};\n\t\t}\n\n\t\tif (this.files.has(normalizedPath)) {\n\t\t\tconst content = this.files.get(normalizedPath);\n\t\t\tif (content === undefined) {\n\t\t\t\tthrow new Error(`No such file or directory: ${path}`);\n\t\t\t}\n\t\t\treturn {\n\t\t\t\tisDirectory: false,\n\t\t\t\tsize: content.byteLength,\n\t\t\t\tmtime:\n\t\t\t\t\tthis.fileMetadata.get(normalizedPath)?.mtime || new Date(),\n\t\t\t};\n\t\t}\n\n\t\tthrow new Error(`No such file or directory: ${path}`);\n\t}\n\n\tasync exists(path: string): Promise<boolean> {\n\t\tconst normalizedPath = normalizePath(path);\n\t\treturn (\n\t\t\tthis.files.has(normalizedPath) ||\n\t\t\tthis.directories.has(normalizedPath)\n\t\t);\n\t}\n}\n"],"mappings":";;;;AAOA,IAAa,WAAb,MAAoC;CACnC,AAAiB,wBAAQ,IAAI,KAAyB;CACtD,AAAiB,8BAAc,IAAI,KAAa;C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,QAAQ;IACd,OACC,KAAK,aAAa,IAAI,eAAe,EAAE,yBAAS,IAAI,MAAM;IAC3D;;AAGF,QAAM,IAAI,MAAM,8BAA8B,OAAO;;CAGtD,MAAM,OAAO,MAAgC;EAC5C,MAAM,iBAAiB,cAAc,KAAK;AAC1C,SACC,KAAK,MAAM,IAAI,eAAe,IAC9B,KAAK,YAAY,IAAI,eAAe"}
|
|
1
|
+
{"version":3,"file":"fs.mjs","names":[],"sources":["../src/fs/memory.ts"],"sourcesContent":["import type { Stream } from '../stream';\nimport { normalizePath } from '../util/path';\nimport type { FS } from './fs';\n\nexport type { FS } from './fs';\n\nexport class MemoryFS implements FS {\n\tprivate readonly files = new Map<string, Uint8Array>();\n\tprivate readonly directories = new Set<string>();\n\tprivate readonly fileMetadata = new Map<\n\t\tstring,\n\t\t{ mtime: Date; isDirectory: boolean }\n\t>();\n\n\tconstructor() {\n\t\t// Initialize root directory\n\t\tthis.directories.add('/');\n\t\tthis.fileMetadata.set('/', { mtime: new Date(), isDirectory: true });\n\t}\n\n\tsetFile(path: string, content: string | Uint8Array): void {\n\t\tconst normalizedPath = normalizePath(path);\n\t\tif (this.directories.has(normalizedPath)) {\n\t\t\tthrow new Error(`Is a directory: ${path}`);\n\t\t}\n\t\tthis.ensureParentDirectories(normalizedPath);\n\t\tconst encoded =\n\t\t\ttypeof content === 'string'\n\t\t\t\t? new TextEncoder().encode(content)\n\t\t\t\t: content;\n\t\tthis.files.set(normalizedPath, encoded);\n\t\tthis.fileMetadata.set(normalizedPath, {\n\t\t\tmtime: new Date(),\n\t\t\tisDirectory: false,\n\t\t});\n\t}\n\n\tasync readFile(path: string): Promise<Uint8Array> {\n\t\tconst normalizedPath = normalizePath(path);\n\t\tconst content = this.files.get(normalizedPath);\n\t\tif (!content) {\n\t\t\tthrow new Error(`File not found: ${path}`);\n\t\t}\n\t\treturn content;\n\t}\n\n\tasync *readLines(path: string): Stream<string> {\n\t\tconst normalizedPath = normalizePath(path);\n\t\tconst content = this.files.get(normalizedPath);\n\t\tif (!content) {\n\t\t\tthrow new Error(`File not found: ${path}`);\n\t\t}\n\t\tconst text = new TextDecoder().decode(content);\n\t\tconst lines = text\n\t\t\t.split('\\n')\n\t\t\t.filter((_, i, arr) => !(i === arr.length - 1 && arr[i] === ''));\n\t\tyield* lines;\n\t}\n\n\tasync writeFile(path: string, content: Uint8Array): Promise<void> {\n\t\tconst normalizedPath = normalizePath(path);\n\t\tif (this.directories.has(normalizedPath)) {\n\t\t\tthrow new Error(`Is a directory: ${path}`);\n\t\t}\n\t\tthis.ensureParentDirectories(normalizedPath);\n\t\tthis.files.set(normalizedPath, content);\n\t\tthis.fileMetadata.set(normalizedPath, {\n\t\t\tmtime: new Date(),\n\t\t\tisDirectory: false,\n\t\t});\n\t}\n\n\tasync rename(src: string, dest: string): Promise<void> {\n\t\tconst normalizedSourcePath = normalizePath(src);\n\t\tconst normalizedDestinationPath = normalizePath(dest);\n\n\t\tif (normalizedSourcePath === '/' || normalizedDestinationPath === '/') {\n\t\t\tthrow new Error('Cannot rename the root path');\n\t\t}\n\n\t\tconst sourceIsDirectory = this.directories.has(normalizedSourcePath);\n\t\tconst sourceIsFile = this.files.has(normalizedSourcePath);\n\t\tif (!(sourceIsDirectory || sourceIsFile)) {\n\t\t\tthrow new Error(`No such file or directory: ${src}`);\n\t\t}\n\n\t\tif (normalizedSourcePath === normalizedDestinationPath) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst destinationParentPath = this.getParentPath(\n\t\t\tnormalizedDestinationPath\n\t\t);\n\t\tthis.assertDirectoryExists(destinationParentPath);\n\n\t\tif (\n\t\t\tsourceIsDirectory &&\n\t\t\tnormalizedDestinationPath.startsWith(`${normalizedSourcePath}/`)\n\t\t) {\n\t\t\tthrow new Error(`Cannot rename a directory into itself: ${dest}`);\n\t\t}\n\n\t\tthis.assertDestinationCanBeReplaced(\n\t\t\tnormalizedDestinationPath,\n\t\t\tsourceIsDirectory\n\t\t);\n\n\t\tif (sourceIsDirectory) {\n\t\t\tthis.renameDirectory(\n\t\t\t\tnormalizedSourcePath,\n\t\t\t\tnormalizedDestinationPath\n\t\t\t);\n\t\t\treturn;\n\t\t}\n\n\t\tthis.renameFile(normalizedSourcePath, normalizedDestinationPath);\n\t}\n\n\tasync deleteFile(path: string): Promise<void> {\n\t\tconst normalizedPath = normalizePath(path);\n\t\tif (!this.files.has(normalizedPath)) {\n\t\t\tthrow new Error(`File not found: ${path}`);\n\t\t}\n\t\tthis.files.delete(normalizedPath);\n\t\tthis.fileMetadata.delete(normalizedPath);\n\t}\n\n\tasync deleteDirectory(path: string, recursive = false): Promise<void> {\n\t\tconst normalizedPath = normalizePath(path);\n\t\tif (normalizedPath === '/') {\n\t\t\tthrow new Error(\"rm: cannot remove '/'\");\n\t\t}\n\t\tif (!this.directories.has(normalizedPath)) {\n\t\t\tthrow new Error(`No such file or directory: ${path}`);\n\t\t}\n\n\t\tconst childPrefix = `${normalizedPath}/`;\n\t\tconst hasChildDirectories = Array.from(this.directories).some(\n\t\t\t(directory) =>\n\t\t\t\tdirectory !== normalizedPath &&\n\t\t\t\tdirectory.startsWith(childPrefix)\n\t\t);\n\t\tconst hasChildFiles = Array.from(this.files.keys()).some((filePath) =>\n\t\t\tfilePath.startsWith(childPrefix)\n\t\t);\n\n\t\tif (!recursive && (hasChildDirectories || hasChildFiles)) {\n\t\t\tthrow new Error(`Directory not empty: ${path}`);\n\t\t}\n\n\t\tfor (const filePath of Array.from(this.files.keys())) {\n\t\t\tif (filePath.startsWith(childPrefix)) {\n\t\t\t\tthis.files.delete(filePath);\n\t\t\t\tthis.fileMetadata.delete(filePath);\n\t\t\t}\n\t\t}\n\n\t\tconst directoriesToDelete = Array.from(this.directories)\n\t\t\t.filter(\n\t\t\t\t(directory) =>\n\t\t\t\t\tdirectory === normalizedPath ||\n\t\t\t\t\tdirectory.startsWith(childPrefix)\n\t\t\t)\n\t\t\t.sort((a, b) => b.length - a.length);\n\t\tfor (const directory of directoriesToDelete) {\n\t\t\tif (directory === '/') {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tthis.directories.delete(directory);\n\t\t\tthis.fileMetadata.delete(directory);\n\t\t}\n\t}\n\n\tasync *readdir(path: string): Stream<string> {\n\t\tconst normalizedDirectoryPath = normalizePath(path);\n\t\tif (this.files.has(normalizedDirectoryPath)) {\n\t\t\tthrow new Error(`Not a directory: ${path}`);\n\t\t}\n\t\tif (!this.directories.has(normalizedDirectoryPath)) {\n\t\t\tthrow new Error(`No such file or directory: ${path}`);\n\t\t}\n\n\t\tconst immediateChildren = this.listImmediateChildren(\n\t\t\tnormalizedDirectoryPath\n\t\t);\n\t\tfor (const childPath of immediateChildren) {\n\t\t\tyield childPath;\n\t\t}\n\t}\n\n\tasync mkdir(path: string, recursive = false): Promise<void> {\n\t\tconst normalizedPath = normalizePath(path);\n\t\tif (\n\t\t\tthis.directories.has(normalizedPath) ||\n\t\t\tthis.files.has(normalizedPath)\n\t\t) {\n\t\t\tthrow new Error(`Directory already exists: ${path}`);\n\t\t}\n\n\t\tif (recursive) {\n\t\t\t// Create all parent directories\n\t\t\tconst parts = normalizedPath.split('/').filter(Boolean);\n\t\t\tlet current = '';\n\t\t\tfor (const part of parts) {\n\t\t\t\tcurrent += `/${part}`;\n\t\t\t\tif (\n\t\t\t\t\t!(this.directories.has(current) || this.files.has(current))\n\t\t\t\t) {\n\t\t\t\t\tthis.directories.add(current);\n\t\t\t\t\tthis.fileMetadata.set(current, {\n\t\t\t\t\t\tmtime: new Date(),\n\t\t\t\t\t\tisDirectory: true,\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t// Check if parent directory exists\n\t\t\tconst parentPath =\n\t\t\t\tnormalizedPath.substring(0, normalizedPath.lastIndexOf('/')) ||\n\t\t\t\t'/';\n\t\t\tif (\n\t\t\t\tparentPath !== '/' &&\n\t\t\t\t!this.directories.has(parentPath) &&\n\t\t\t\t!this.files.has(parentPath)\n\t\t\t) {\n\t\t\t\tthrow new Error(`No such file or directory: ${parentPath}`);\n\t\t\t}\n\t\t\tthis.directories.add(normalizedPath);\n\t\t\tthis.fileMetadata.set(normalizedPath, {\n\t\t\t\tmtime: new Date(),\n\t\t\t\tisDirectory: true,\n\t\t\t});\n\t\t}\n\t}\n\n\tasync stat(\n\t\tpath: string\n\t): Promise<{ isDirectory: boolean; size: number; mtime: Date }> {\n\t\t// Normalize path by removing trailing slash\n\t\tconst normalizedPath = normalizePath(path);\n\n\t\tif (this.directories.has(normalizedPath)) {\n\t\t\treturn {\n\t\t\t\tisDirectory: true,\n\t\t\t\tsize: 0,\n\t\t\t\tmtime:\n\t\t\t\t\tthis.fileMetadata.get(normalizedPath)?.mtime || new Date(),\n\t\t\t};\n\t\t}\n\n\t\tif (this.files.has(normalizedPath)) {\n\t\t\tconst content = this.files.get(normalizedPath);\n\t\t\tif (content === undefined) {\n\t\t\t\tthrow new Error(`No such file or directory: ${path}`);\n\t\t\t}\n\t\t\treturn {\n\t\t\t\tisDirectory: false,\n\t\t\t\tsize: content.byteLength,\n\t\t\t\tmtime:\n\t\t\t\t\tthis.fileMetadata.get(normalizedPath)?.mtime || new Date(),\n\t\t\t};\n\t\t}\n\n\t\tthrow new Error(`No such file or directory: ${path}`);\n\t}\n\n\tasync exists(path: string): Promise<boolean> {\n\t\tconst normalizedPath = normalizePath(path);\n\t\treturn (\n\t\t\tthis.files.has(normalizedPath) ||\n\t\t\tthis.directories.has(normalizedPath)\n\t\t);\n\t}\n\n\tprivate ensureParentDirectories(path: string): void {\n\t\tconst parentDirectories = this.getParentDirectories(path);\n\t\tfor (const directoryPath of parentDirectories) {\n\t\t\tif (this.directories.has(directoryPath)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (this.files.has(directoryPath)) {\n\t\t\t\tthrow new Error(\n\t\t\t\t\t`Parent path is not a directory: ${directoryPath}`\n\t\t\t\t);\n\t\t\t}\n\t\t\tthis.directories.add(directoryPath);\n\t\t\tthis.fileMetadata.set(directoryPath, {\n\t\t\t\tmtime: new Date(),\n\t\t\t\tisDirectory: true,\n\t\t\t});\n\t\t}\n\t}\n\n\tprivate renameFile(sourcePath: string, destinationPath: string): void {\n\t\tconst content = this.files.get(sourcePath);\n\t\tconst metadata = this.fileMetadata.get(sourcePath);\n\t\tif (!(content && metadata)) {\n\t\t\tthrow new Error(`No such file or directory: ${sourcePath}`);\n\t\t}\n\n\t\tthis.files.delete(sourcePath);\n\t\tthis.fileMetadata.delete(sourcePath);\n\n\t\tif (this.files.has(destinationPath)) {\n\t\t\tthis.files.delete(destinationPath);\n\t\t\tthis.fileMetadata.delete(destinationPath);\n\t\t}\n\n\t\tthis.files.set(destinationPath, content);\n\t\tthis.fileMetadata.set(destinationPath, metadata);\n\t}\n\n\tprivate renameDirectory(sourcePath: string, destinationPath: string): void {\n\t\tconst directoryEntries = Array.from(this.directories)\n\t\t\t.filter(\n\t\t\t\t(directoryPath) =>\n\t\t\t\t\tdirectoryPath === sourcePath ||\n\t\t\t\t\tdirectoryPath.startsWith(`${sourcePath}/`)\n\t\t\t)\n\t\t\t.sort((left, right) => left.length - right.length)\n\t\t\t.map((directoryPath) => ({\n\t\t\t\tpath: directoryPath,\n\t\t\t\tmetadata: this.fileMetadata.get(directoryPath) ?? {\n\t\t\t\t\tmtime: new Date(),\n\t\t\t\t\tisDirectory: true,\n\t\t\t\t},\n\t\t\t}));\n\t\tconst fileEntries = Array.from(this.files.keys())\n\t\t\t.filter((filePath) => filePath.startsWith(`${sourcePath}/`))\n\t\t\t.sort((left, right) => left.length - right.length)\n\t\t\t.map((filePath) => {\n\t\t\t\tconst content = this.files.get(filePath);\n\t\t\t\tconst metadata = this.fileMetadata.get(filePath);\n\t\t\t\tif (!(content && metadata)) {\n\t\t\t\t\tthrow new Error(`No such file or directory: ${filePath}`);\n\t\t\t\t}\n\t\t\t\treturn {\n\t\t\t\t\tpath: filePath,\n\t\t\t\t\tcontent,\n\t\t\t\t\tmetadata,\n\t\t\t\t};\n\t\t\t});\n\n\t\tfor (const directoryEntry of directoryEntries) {\n\t\t\tthis.directories.delete(directoryEntry.path);\n\t\t\tthis.fileMetadata.delete(directoryEntry.path);\n\t\t}\n\n\t\tfor (const fileEntry of fileEntries) {\n\t\t\tthis.files.delete(fileEntry.path);\n\t\t\tthis.fileMetadata.delete(fileEntry.path);\n\t\t}\n\n\t\tfor (const directoryEntry of directoryEntries) {\n\t\t\tconst nextDirectoryPath = this.replacePathPrefix(\n\t\t\t\tdirectoryEntry.path,\n\t\t\t\tsourcePath,\n\t\t\t\tdestinationPath\n\t\t\t);\n\t\t\tthis.directories.add(nextDirectoryPath);\n\t\t\tthis.fileMetadata.set(nextDirectoryPath, directoryEntry.metadata);\n\t\t}\n\n\t\tfor (const fileEntry of fileEntries) {\n\t\t\tconst nextFilePath = this.replacePathPrefix(\n\t\t\t\tfileEntry.path,\n\t\t\t\tsourcePath,\n\t\t\t\tdestinationPath\n\t\t\t);\n\t\t\tthis.files.set(nextFilePath, fileEntry.content);\n\t\t\tthis.fileMetadata.set(nextFilePath, fileEntry.metadata);\n\t\t}\n\t}\n\n\tprivate assertDirectoryExists(directoryPath: string): void {\n\t\tif (this.directories.has(directoryPath)) {\n\t\t\treturn;\n\t\t}\n\t\tif (this.files.has(directoryPath)) {\n\t\t\tthrow new Error(`Parent path is not a directory: ${directoryPath}`);\n\t\t}\n\t\tthrow new Error(`No such file or directory: ${directoryPath}`);\n\t}\n\n\tprivate assertDestinationCanBeReplaced(\n\t\tdestinationPath: string,\n\t\tsourceIsDirectory: boolean\n\t): void {\n\t\tif (this.files.has(destinationPath)) {\n\t\t\tif (!sourceIsDirectory) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthrow new Error(\n\t\t\t\t`Cannot replace file with directory: ${destinationPath}`\n\t\t\t);\n\t\t}\n\n\t\tif (this.directories.has(destinationPath)) {\n\t\t\tthrow new Error(`Cannot replace directory: ${destinationPath}`);\n\t\t}\n\t}\n\n\tprivate getParentDirectories(path: string): string[] {\n\t\tconst parentPath = path.slice(0, path.lastIndexOf('/')) || '/';\n\t\tif (parentPath === '/') {\n\t\t\treturn ['/'];\n\t\t}\n\t\tconst segments = parentPath.split('/').filter(Boolean);\n\t\tconst parentDirectories: string[] = ['/'];\n\t\tlet currentPath = '';\n\t\tfor (const segment of segments) {\n\t\t\tcurrentPath += `/${segment}`;\n\t\t\tparentDirectories.push(currentPath);\n\t\t}\n\t\treturn parentDirectories;\n\t}\n\n\tprivate getParentPath(path: string): string {\n\t\treturn path.slice(0, path.lastIndexOf('/')) || '/';\n\t}\n\n\tprivate listImmediateChildren(directoryPath: string): string[] {\n\t\tconst directoryPrefix =\n\t\t\tdirectoryPath === '/' ? '/' : `${directoryPath}/`;\n\t\tconst children = new Set<string>();\n\t\tconst allPaths = [\n\t\t\t...Array.from(this.directories.values()),\n\t\t\t...Array.from(this.files.keys()),\n\t\t];\n\t\tfor (const candidatePath of allPaths) {\n\t\t\tif (candidatePath === directoryPath) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (!candidatePath.startsWith(directoryPrefix)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst relativePath = candidatePath.slice(directoryPrefix.length);\n\t\t\tif (relativePath === '') {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst [firstSegment] = relativePath.split('/');\n\t\t\tif (!firstSegment) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst childPath =\n\t\t\t\tdirectoryPath === '/'\n\t\t\t\t\t? `/${firstSegment}`\n\t\t\t\t\t: `${directoryPath}/${firstSegment}`;\n\t\t\tchildren.add(childPath);\n\t\t}\n\t\treturn Array.from(children).sort((left, right) =>\n\t\t\tleft.localeCompare(right)\n\t\t);\n\t}\n\n\tprivate replacePathPrefix(\n\t\tpath: string,\n\t\tsourcePrefix: string,\n\t\tdestinationPrefix: string\n\t): string {\n\t\tif (path === sourcePrefix) {\n\t\t\treturn destinationPrefix;\n\t\t}\n\t\treturn `${destinationPrefix}${path.slice(sour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|
1
|
+
import { t as FS } from "./fs-Cp2fBYOe.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/record.d.ts
|
|
4
4
|
interface FileRecord {
|
|
5
5
|
kind: 'file';
|
|
6
|
+
isDirectory?: boolean;
|
|
6
7
|
path: string;
|
|
8
|
+
displayPath?: string;
|
|
7
9
|
}
|
|
8
10
|
interface LineRecord {
|
|
9
11
|
kind: 'line';
|