Skip to content

Commit 9706d67

Browse files
update: @dcl/inspector@7.15.0 (#1239)
* update: @dcl/inspector@7.15.0 * add: stat fs fn --------- Co-authored-by: Nicolas Echezarreta <nicoecheza@gmail.com>
1 parent 271785b commit 9706d67

3 files changed

Lines changed: 22 additions & 17 deletions

File tree

packages/@dcl/sdk-commands/package-lock.json

Lines changed: 15 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@dcl/sdk-commands/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"@dcl/ecs": "file:../ecs",
1212
"@dcl/gltf-validator-ts": "1.0.14",
1313
"@dcl/hashing": "1.1.3",
14-
"@dcl/inspector": "7.13.5",
14+
"@dcl/inspector": "7.15.0",
1515
"@dcl/linker-dapp": "^0.14.2",
1616
"@dcl/mini-comms": "1.0.1-20230216163137.commit-a4c75be",
1717
"@dcl/protocol": "1.0.0-18911041883.commit-f4cd080",

packages/@dcl/sdk-commands/src/commands/start/data-layer/fs.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export function createFileSystemInterfaceFromFsComponent(
3838
if (!(await fs.directoryExists(folder))) {
3939
await fs.mkdir(folder, { recursive: true })
4040
}
41-
await fs.writeFile(resolvedPath, content)
41+
await fs.writeFile(resolvedPath, content as Uint8Array)
4242
},
4343
async rm(filePath: string) {
4444
const resolvedPath = path.isAbsolute(filePath) ? filePath : path.resolve(projectWorkingDirectory, filePath)
@@ -62,6 +62,11 @@ export function createFileSystemInterfaceFromFsComponent(
6262
},
6363
cwd(): string {
6464
return pathToPosix(projectWorkingDirectory)
65+
},
66+
async stat(filePath: string): Promise<{ size: number }> {
67+
const resolvedPath = path.isAbsolute(filePath) ? filePath : path.resolve(projectWorkingDirectory, filePath)
68+
const stats = await fs.stat(resolvedPath)
69+
return { size: Number(stats.size) }
6570
}
6671
}
6772
}

0 commit comments

Comments
 (0)