@lvce-editor/file-system-process 1.1.0 → 1.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.
Files changed (2) hide show
  1. package/dist/index.js +13 -2
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as fs from 'node:fs/promises';
2
2
  import * as os from 'node:os';
3
3
  import { fileURLToPath } from 'node:url';
4
- import { string } from '@lvce-editor/assert';
4
+ import { string, object } from '@lvce-editor/assert';
5
5
  import { VError } from '@lvce-editor/verror';
6
6
  import { join } from 'node:path';
7
7
  import { existsSync } from 'node:fs';
@@ -416,9 +416,20 @@ const getFolderSize = async uri => {
416
416
  return total;
417
417
  };
418
418
 
419
+ const handleWebSocket = async (handle, request) => {
420
+ object(handle);
421
+ object(request);
422
+ await listen$1({
423
+ method: WebSocket,
424
+ request,
425
+ handle
426
+ });
427
+ };
428
+
419
429
  const commandMap = {
420
430
  'FileSystem.chmod': chmod,
421
431
  'FileSystem.copy': copy,
432
+ 'FileSystem.getFolderSize': getFolderSize,
422
433
  'FileSystem.getPathSeparator': getPathSeparator,
423
434
  'FileSystem.mkdir': mkdir,
424
435
  'FileSystem.readDirWithFileTypes': readDirWithFileTypes,
@@ -428,7 +439,7 @@ const commandMap = {
428
439
  'FileSystem.rename': rename,
429
440
  'FileSystem.stat': stat,
430
441
  'FileSystem.writeFile': writeFile,
431
- 'FileSystem.getFolderSize': getFolderSize
442
+ 'HandleWebSocket.handleWebSocket': handleWebSocket
432
443
  };
433
444
 
434
445
  const listen = async argv => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/file-system-process",
3
- "version": "1.1.0",
3
+ "version": "1.2.0",
4
4
  "description": "File System Process",
5
5
  "keywords": [
6
6
  "Lvce Editor",