@lvce-editor/file-system-process 3.1.0 → 3.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/index.js +2 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import { existsSync } from 'node:fs';
|
|
1
2
|
import * as fs from 'node:fs/promises';
|
|
2
3
|
import * as os from 'node:os';
|
|
3
4
|
import { fileURLToPath } from 'node:url';
|
|
4
5
|
import { join } from 'node:path';
|
|
5
|
-
import { existsSync } from 'node:fs';
|
|
6
6
|
import _trash from 'trash';
|
|
7
7
|
import { Buffer } from 'node:buffer';
|
|
8
8
|
|
|
@@ -365,7 +365,6 @@ const trash = async path => {
|
|
|
365
365
|
}
|
|
366
366
|
};
|
|
367
367
|
|
|
368
|
-
// TODO lazyload chokidar and trash (but doesn't work currently because of bug with jest)
|
|
369
368
|
const assertUri = uri => {
|
|
370
369
|
if (!uri.startsWith('file://')) {
|
|
371
370
|
throw new Error(`path must be a valid file uri`);
|
|
@@ -1836,6 +1835,7 @@ const initialize = async () => {
|
|
|
1836
1835
|
const commandMap = {
|
|
1837
1836
|
'FileSystem.chmod': chmod,
|
|
1838
1837
|
'FileSystem.copy': copy,
|
|
1838
|
+
'FileSystem.exists': rename,
|
|
1839
1839
|
'FileSystem.getFolderSize': getFolderSize,
|
|
1840
1840
|
'FileSystem.getPathSeparator': getPathSeparator,
|
|
1841
1841
|
'FileSystem.mkdir': mkdir,
|