@vention/vention-cli 0.11.1 → 0.11.2
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/cli.esm.js +9 -7
- package/package.json +1 -1
package/cli.esm.js
CHANGED
|
@@ -386,7 +386,7 @@ const createFileSystemFromJson = async (fileSystemNode, targetDirectory) => {
|
|
|
386
386
|
const decodedContent = Buffer.from(contentOrNode, "base64");
|
|
387
387
|
const fileHandle = await fs.promises.open(fullPath, "w");
|
|
388
388
|
try {
|
|
389
|
-
await fileHandle.writeFile(decodedContent);
|
|
389
|
+
await fileHandle.writeFile(new Uint8Array(decodedContent));
|
|
390
390
|
await fileHandle.sync();
|
|
391
391
|
}
|
|
392
392
|
finally {
|
|
@@ -400,12 +400,14 @@ const createFileSystemFromJson = async (fileSystemNode, targetDirectory) => {
|
|
|
400
400
|
}
|
|
401
401
|
};
|
|
402
402
|
await writeFiles(fileSystemNode, targetDirectory);
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
403
|
+
if (process.platform !== "win32") {
|
|
404
|
+
const dirHandle = await fs.promises.open(targetDirectory, "r");
|
|
405
|
+
try {
|
|
406
|
+
await dirHandle.sync();
|
|
407
|
+
}
|
|
408
|
+
finally {
|
|
409
|
+
await dirHandle.close();
|
|
410
|
+
}
|
|
409
411
|
}
|
|
410
412
|
};
|
|
411
413
|
const ensureDirectoryExists = async (directory) => {
|