@lvce-editor/file-system-worker 3.1.0 → 4.0.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.
@@ -54,6 +54,55 @@ class VError extends Error {
54
54
  }
55
55
  }
56
56
 
57
+ class AssertionError extends Error {
58
+ constructor(message) {
59
+ super(message);
60
+ this.name = 'AssertionError';
61
+ }
62
+ }
63
+ const Object$1 = 1;
64
+ const Number$1 = 2;
65
+ const Array$1 = 3;
66
+ const String$1 = 4;
67
+ const Boolean = 5;
68
+ const Function = 6;
69
+ const Null = 7;
70
+ const Unknown = 8;
71
+ const getType = value => {
72
+ switch (typeof value) {
73
+ case 'number':
74
+ return Number$1;
75
+ case 'function':
76
+ return Function;
77
+ case 'string':
78
+ return String$1;
79
+ case 'object':
80
+ if (value === null) {
81
+ return Null;
82
+ }
83
+ if (Array.isArray(value)) {
84
+ return Array$1;
85
+ }
86
+ return Object$1;
87
+ case 'boolean':
88
+ return Boolean;
89
+ default:
90
+ return Unknown;
91
+ }
92
+ };
93
+ const object = value => {
94
+ const type = getType(value);
95
+ if (type !== Object$1) {
96
+ throw new AssertionError('expected value to be of type object');
97
+ }
98
+ };
99
+ const number = value => {
100
+ const type = getType(value);
101
+ if (type !== Number$1) {
102
+ throw new AssertionError('expected value to be of type number');
103
+ }
104
+ };
105
+
57
106
  const isMessagePort = value => {
58
107
  return value && value instanceof MessagePort;
59
108
  };
@@ -899,7 +948,7 @@ const send = (transport, method, ...params) => {
899
948
  const message = create$4$1(method, params);
900
949
  transport.send(message);
901
950
  };
902
- const invoke$4 = (ipc, method, ...params) => {
951
+ const invoke$5 = (ipc, method, ...params) => {
903
952
  return invokeHelper(ipc, method, params, false);
904
953
  };
905
954
  const invokeAndTransfer$3 = (ipc, method, ...params) => {
@@ -938,7 +987,7 @@ const createRpc = ipc => {
938
987
  send(ipc, method, ...params);
939
988
  },
940
989
  invoke(method, ...params) {
941
- return invoke$4(ipc, method, ...params);
990
+ return invoke$5(ipc, method, ...params);
942
991
  },
943
992
  invokeAndTransfer(method, ...params) {
944
993
  return invokeAndTransfer$3(ipc, method, ...params);
@@ -1094,6 +1143,191 @@ const createMockRpc = ({
1094
1143
  return mockRpc;
1095
1144
  };
1096
1145
 
1146
+ // TODO: including these in blob-util.ts causes typedoc to generate docs for them,
1147
+ // even with --excludePrivate ¯\_(ツ)_/¯
1148
+ /** @private */
1149
+
1150
+ /* global Promise, Image, Blob, FileReader, atob, btoa,
1151
+ BlobBuilder, MSBlobBuilder, MozBlobBuilder, WebKitBlobBuilder, webkitURL */
1152
+ /**
1153
+ * Shim for
1154
+ * [`new Blob()`](https://developer.mozilla.org/en-US/docs/Web/API/Blob.Blob)
1155
+ * to support
1156
+ * [older browsers that use the deprecated `BlobBuilder` API](http://caniuse.com/blob).
1157
+ *
1158
+ * Example:
1159
+ *
1160
+ * ```js
1161
+ * var myBlob = blobUtil.createBlob(['hello world'], {type: 'text/plain'});
1162
+ * ```
1163
+ *
1164
+ * @param parts - content of the Blob
1165
+ * @param properties - usually `{type: myContentType}`,
1166
+ * you can also pass a string for the content type
1167
+ * @returns Blob
1168
+ */
1169
+ function createBlob(parts, properties) {
1170
+ parts = parts || [];
1171
+ properties = properties || {};
1172
+ if (typeof properties === 'string') {
1173
+ properties = {
1174
+ type: properties
1175
+ }; // infer content type
1176
+ }
1177
+ try {
1178
+ return new Blob(parts, properties);
1179
+ } catch (e) {
1180
+ if (e.name !== 'TypeError') {
1181
+ throw e;
1182
+ }
1183
+ var Builder = typeof BlobBuilder !== 'undefined' ? BlobBuilder : typeof MSBlobBuilder !== 'undefined' ? MSBlobBuilder : typeof MozBlobBuilder !== 'undefined' ? MozBlobBuilder : WebKitBlobBuilder;
1184
+ var builder = new Builder();
1185
+ for (var i = 0; i < parts.length; i += 1) {
1186
+ builder.append(parts[i]);
1187
+ }
1188
+ return builder.getBlob(properties.type);
1189
+ }
1190
+ }
1191
+ /**
1192
+ * Convert a `Blob` to a binary string.
1193
+ *
1194
+ * Example:
1195
+ *
1196
+ * ```js
1197
+ * blobUtil.blobToBinaryString(blob).then(function (binaryString) {
1198
+ * // success
1199
+ * }).catch(function (err) {
1200
+ * // error
1201
+ * });
1202
+ * ```
1203
+ *
1204
+ * @param blob
1205
+ * @returns Promise that resolves with the binary string
1206
+ */
1207
+ function blobToBinaryString$1(blob) {
1208
+ return new Promise(function (resolve, reject) {
1209
+ var reader = new FileReader();
1210
+ var hasBinaryString = typeof reader.readAsBinaryString === 'function';
1211
+ reader.onloadend = function () {
1212
+ var result = reader.result || '';
1213
+ if (hasBinaryString) {
1214
+ return resolve(result);
1215
+ }
1216
+ resolve(arrayBufferToBinaryString(result));
1217
+ };
1218
+ reader.onerror = reject;
1219
+ if (hasBinaryString) {
1220
+ reader.readAsBinaryString(blob);
1221
+ } else {
1222
+ reader.readAsArrayBuffer(blob);
1223
+ }
1224
+ });
1225
+ }
1226
+ /**
1227
+ * Convert a base64-encoded string to a `Blob`.
1228
+ *
1229
+ * Example:
1230
+ *
1231
+ * ```js
1232
+ * var blob = blobUtil.base64StringToBlob(base64String);
1233
+ * ```
1234
+ * @param base64 - base64-encoded string
1235
+ * @param type - the content type (optional)
1236
+ * @returns Blob
1237
+ */
1238
+ function base64StringToBlob(base64, type) {
1239
+ var parts = [binaryStringToArrayBuffer(atob(base64))];
1240
+ return type ? createBlob(parts, {
1241
+ type: type
1242
+ }) : createBlob(parts);
1243
+ }
1244
+ /**
1245
+ * Convert a binary string to a `Blob`.
1246
+ *
1247
+ * Example:
1248
+ *
1249
+ * ```js
1250
+ * var blob = blobUtil.binaryStringToBlob(binaryString);
1251
+ * ```
1252
+ *
1253
+ * @param binary - binary string
1254
+ * @param type - the content type (optional)
1255
+ * @returns Blob
1256
+ */
1257
+ function binaryStringToBlob$1(binary, type) {
1258
+ return base64StringToBlob(btoa(binary), type);
1259
+ }
1260
+ /**
1261
+ * Convert an `ArrayBuffer` to a binary string.
1262
+ *
1263
+ * Example:
1264
+ *
1265
+ * ```js
1266
+ * var myString = blobUtil.arrayBufferToBinaryString(arrayBuff)
1267
+ * ```
1268
+ *
1269
+ * @param buffer - array buffer
1270
+ * @returns binary string
1271
+ */
1272
+ function arrayBufferToBinaryString(buffer) {
1273
+ var binary = '';
1274
+ var bytes = new Uint8Array(buffer);
1275
+ var length = bytes.byteLength;
1276
+ var i = -1;
1277
+ while (++i < length) {
1278
+ binary += String.fromCharCode(bytes[i]);
1279
+ }
1280
+ return binary;
1281
+ }
1282
+ /**
1283
+ * Convert a binary string to an `ArrayBuffer`.
1284
+ *
1285
+ * ```js
1286
+ * var myBuffer = blobUtil.binaryStringToArrayBuffer(binaryString)
1287
+ * ```
1288
+ *
1289
+ * @param binary - binary string
1290
+ * @returns array buffer
1291
+ */
1292
+ function binaryStringToArrayBuffer(binary) {
1293
+ var length = binary.length;
1294
+ var buf = new ArrayBuffer(length);
1295
+ var arr = new Uint8Array(buf);
1296
+ var i = -1;
1297
+ while (++i < length) {
1298
+ arr[i] = binary.charCodeAt(i);
1299
+ }
1300
+ return buf;
1301
+ }
1302
+
1303
+ const normalizeBlobError = error => {
1304
+ if (error && error instanceof ProgressEvent && error.target &&
1305
+ // @ts-expect-error - target.error may not be in the type definition
1306
+ error.target.error) {
1307
+ // @ts-expect-error - target.error may not be in the type definition
1308
+ return error.target.error;
1309
+ }
1310
+ return error;
1311
+ };
1312
+
1313
+ /* eslint-disable @typescript-eslint/prefer-readonly-parameter-types */
1314
+ const binaryStringToBlob = async (string, type) => {
1315
+ try {
1316
+ return binaryStringToBlob$1(string, type);
1317
+ } catch (error) {
1318
+ const normalizedError = normalizeBlobError(error);
1319
+ throw new VError(normalizedError, 'Failed to convert binary string to blob');
1320
+ }
1321
+ };
1322
+ const blobToBinaryString = async blob => {
1323
+ try {
1324
+ return await blobToBinaryString$1(blob);
1325
+ } catch (error) {
1326
+ const normalizedError = normalizeBlobError(error);
1327
+ throw new VError(normalizedError, 'Failed to convert blob to binary string');
1328
+ }
1329
+ };
1330
+
1097
1331
  const readFile$5 = async uri => {
1098
1332
  const response = await fetch(uri);
1099
1333
  if (!response.ok) {
@@ -1126,7 +1360,10 @@ const readJson$4 = async uri => {
1126
1360
  return json;
1127
1361
  };
1128
1362
 
1363
+ const Script = 2;
1364
+
1129
1365
  const DebugWorker = 55;
1366
+ const ExtensionHostWorker = 44;
1130
1367
  const FileSystemProcess$1 = 210;
1131
1368
  const FileSystemWorker = 209;
1132
1369
  const RendererWorker$1 = 1;
@@ -1164,63 +1401,63 @@ const create = rpcId => {
1164
1401
  };
1165
1402
 
1166
1403
  const {
1167
- invoke: invoke$3,
1404
+ invoke: invoke$4,
1168
1405
  invokeAndTransfer: invokeAndTransfer$2,
1169
1406
  set: set$3,
1170
1407
  dispose: dispose$1
1171
1408
  } = create(FileSystemProcess$1);
1172
1409
  const remove$3 = async uri => {
1173
- return invoke$3('FileSystem.remove', uri);
1410
+ return invoke$4('FileSystem.remove', uri);
1174
1411
  };
1175
1412
  const readFile$4 = async uri => {
1176
- return invoke$3('FileSystem.readFile', uri);
1413
+ return invoke$4('FileSystem.readFile', uri);
1177
1414
  };
1178
1415
  const appendFile$2 = async (uri, text) => {
1179
1416
  // @ts-ignore
1180
- return invoke$3('FileSystem.appendFile', uri, text);
1417
+ return invoke$4('FileSystem.appendFile', uri, text);
1181
1418
  };
1182
1419
  const readDirWithFileTypes$2 = async uri => {
1183
- return invoke$3('FileSystem.readDirWithFileTypes', uri);
1420
+ return invoke$4('FileSystem.readDirWithFileTypes', uri);
1184
1421
  };
1185
1422
  const getPathSeparator$2 = async root => {
1186
1423
  // @ts-ignore
1187
- return invoke$3('FileSystem.getPathSeparator', root);
1424
+ return invoke$4('FileSystem.getPathSeparator', root);
1188
1425
  };
1189
1426
  const readJson$3 = async root => {
1190
1427
  // @ts-ignore
1191
- return invoke$3('FileSystem.readJson', root);
1428
+ return invoke$4('FileSystem.readJson', root);
1192
1429
  };
1193
1430
  const getRealPath$2 = async path => {
1194
1431
  // @ts-ignore
1195
- return invoke$3('FileSystem.getRealPath', path);
1432
+ return invoke$4('FileSystem.getRealPath', path);
1196
1433
  };
1197
1434
  const stat$2 = async path => {
1198
1435
  // @ts-ignore
1199
- return invoke$3('FileSystem.stat', path);
1436
+ return invoke$4('FileSystem.stat', path);
1200
1437
  };
1201
1438
  const writeFile$3 = async (path, content) => {
1202
1439
  // @ts-ignore
1203
- return invoke$3('FileSystem.writeFile', path, content);
1440
+ return invoke$4('FileSystem.writeFile', path, content);
1204
1441
  };
1205
1442
  const mkdir$2 = async path => {
1206
1443
  // @ts-ignore
1207
- return invoke$3('FileSystem.mkdir', path);
1444
+ return invoke$4('FileSystem.mkdir', path);
1208
1445
  };
1209
1446
  const rename$3 = async (oldUri, newUri) => {
1210
1447
  // @ts-ignore
1211
- return invoke$3('FileSystem.rename', oldUri, newUri);
1448
+ return invoke$4('FileSystem.rename', oldUri, newUri);
1212
1449
  };
1213
1450
  const copy$2 = async (oldUri, newUri) => {
1214
1451
  // @ts-ignore
1215
- return invoke$3('FileSystem.copy', oldUri, newUri);
1452
+ return invoke$4('FileSystem.copy', oldUri, newUri);
1216
1453
  };
1217
1454
  const getFolderSize$3 = async uri => {
1218
1455
  // @ts-ignore
1219
- return invoke$3('FileSystem.getFolderSize', uri);
1456
+ return invoke$4('FileSystem.getFolderSize', uri);
1220
1457
  };
1221
1458
  const exists$2 = async uri => {
1222
1459
  // @ts-ignore
1223
- return invoke$3('FileSystem.exists', uri);
1460
+ return invoke$4('FileSystem.exists', uri);
1224
1461
  };
1225
1462
  const registerMockRpc$1 = commandMap => {
1226
1463
  const mockRpc = createMockRpc({
@@ -1239,7 +1476,7 @@ const FileSystemProcess = {
1239
1476
  getFolderSize: getFolderSize$3,
1240
1477
  getPathSeparator: getPathSeparator$2,
1241
1478
  getRealPath: getRealPath$2,
1242
- invoke: invoke$3,
1479
+ invoke: invoke$4,
1243
1480
  invokeAndTransfer: invokeAndTransfer$2,
1244
1481
  mkdir: mkdir$2,
1245
1482
  readDirWithFileTypes: readDirWithFileTypes$2,
@@ -1254,51 +1491,62 @@ const FileSystemProcess = {
1254
1491
  };
1255
1492
 
1256
1493
  const {
1257
- invoke: invoke$2,
1494
+ invoke: invoke$3,
1258
1495
  invokeAndTransfer: invokeAndTransfer$1,
1259
1496
  set: set$2,
1260
1497
  dispose
1261
1498
  } = create(RendererWorker$1);
1262
1499
  const searchFileHtml = async uri => {
1263
- return invoke$2('ExtensionHost.searchFileWithHtml', uri);
1500
+ return invoke$3('ExtensionHost.searchFileWithHtml', uri);
1264
1501
  };
1265
1502
  const getFilePathElectron = async file => {
1266
- return invoke$2('FileSystemHandle.getFilePathElectron', file);
1503
+ return invoke$3('FileSystemHandle.getFilePathElectron', file);
1267
1504
  };
1505
+ /**
1506
+ * @deprecated
1507
+ */
1268
1508
  const showContextMenu = async (x, y, id, ...args) => {
1269
- return invoke$2('ContextMenu.show', x, y, id, ...args);
1509
+ return invoke$3('ContextMenu.show', x, y, id, ...args);
1510
+ };
1511
+ const showContextMenu2 = async (uid, menuId, x, y, args) => {
1512
+ number(uid);
1513
+ number(menuId);
1514
+ number(x);
1515
+ number(y);
1516
+ // @ts-ignore
1517
+ await invoke$3('ContextMenu.show2', uid, menuId, x, y, args);
1270
1518
  };
1271
1519
  const getElectronVersion = async () => {
1272
- return invoke$2('Process.getElectronVersion');
1520
+ return invoke$3('Process.getElectronVersion');
1273
1521
  };
1274
1522
  const applyBulkReplacement = async bulkEdits => {
1275
- await invoke$2('BulkReplacement.applyBulkReplacement', bulkEdits);
1523
+ await invoke$3('BulkReplacement.applyBulkReplacement', bulkEdits);
1276
1524
  };
1277
1525
  const setColorTheme = async id => {
1278
1526
  // @ts-ignore
1279
- return invoke$2(/* ColorTheme.setColorTheme */'ColorTheme.setColorTheme', /* colorThemeId */id);
1527
+ return invoke$3(/* ColorTheme.setColorTheme */'ColorTheme.setColorTheme', /* colorThemeId */id);
1280
1528
  };
1281
1529
  const getNodeVersion = async () => {
1282
- return invoke$2('Process.getNodeVersion');
1530
+ return invoke$3('Process.getNodeVersion');
1283
1531
  };
1284
1532
  const getChromeVersion = async () => {
1285
- return invoke$2('Process.getChromeVersion');
1533
+ return invoke$3('Process.getChromeVersion');
1286
1534
  };
1287
1535
  const getV8Version = async () => {
1288
- return invoke$2('Process.getV8Version');
1536
+ return invoke$3('Process.getV8Version');
1289
1537
  };
1290
1538
  const getFileHandles = async fileIds => {
1291
- const files = await invoke$2('FileSystemHandle.getFileHandles', fileIds);
1539
+ const files = await invoke$3('FileSystemHandle.getFileHandles', fileIds);
1292
1540
  return files;
1293
1541
  };
1294
1542
  const setWorkspacePath = async path => {
1295
- await invoke$2('Workspace.setPath', path);
1543
+ await invoke$3('Workspace.setPath', path);
1296
1544
  };
1297
1545
  const registerWebViewInterceptor = async (id, port) => {
1298
1546
  await invokeAndTransfer$1('WebView.registerInterceptor', id, port);
1299
1547
  };
1300
1548
  const unregisterWebViewInterceptor = async id => {
1301
- await invoke$2('WebView.unregisterInterceptor', id);
1549
+ await invoke$3('WebView.unregisterInterceptor', id);
1302
1550
  };
1303
1551
  const sendMessagePortToEditorWorker = async (port, rpcId) => {
1304
1552
  const command = 'HandleMessagePort.handleMessagePort';
@@ -1326,41 +1574,44 @@ const sendMessagePortToFileSystemWorker = async (port, rpcId) => {
1326
1574
  await invokeAndTransfer$1('SendMessagePortToExtensionHostWorker.sendMessagePortToFileSystemWorker', port, command, rpcId);
1327
1575
  };
1328
1576
  const readFile$3 = async uri => {
1329
- return invoke$2('FileSystem.readFile', uri);
1577
+ return invoke$3('FileSystem.readFile', uri);
1330
1578
  };
1331
1579
  const getWebViewSecret = async key => {
1332
1580
  // @ts-ignore
1333
- return invoke$2('WebView.getSecret', key);
1581
+ return invoke$3('WebView.getSecret', key);
1334
1582
  };
1335
1583
  const setWebViewPort = async (uid, port, origin, portType) => {
1336
1584
  return invokeAndTransfer$1('WebView.setPort', uid, port, origin, portType);
1337
1585
  };
1338
1586
  const setFocus = key => {
1339
- return invoke$2('Focus.setFocus', key);
1587
+ return invoke$3('Focus.setFocus', key);
1340
1588
  };
1341
1589
  const getFileIcon = async options => {
1342
- return invoke$2('IconTheme.getFileIcon', options);
1590
+ return invoke$3('IconTheme.getFileIcon', options);
1343
1591
  };
1344
1592
  const getColorThemeNames = async () => {
1345
- return invoke$2('ColorTheme.getColorThemeNames');
1593
+ return invoke$3('ColorTheme.getColorThemeNames');
1346
1594
  };
1347
1595
  const disableExtension = async id => {
1348
1596
  // @ts-ignore
1349
- return invoke$2('ExtensionManagement.disable', id);
1597
+ return invoke$3('ExtensionManagement.disable', id);
1350
1598
  };
1351
1599
  const enableExtension = async id => {
1352
1600
  // @ts-ignore
1353
- return invoke$2('ExtensionManagement.enable', id);
1601
+ return invoke$3('ExtensionManagement.enable', id);
1354
1602
  };
1355
1603
  const handleDebugChange = async params => {
1356
1604
  // @ts-ignore
1357
- return invoke$2('Run And Debug.handleChange', params);
1605
+ return invoke$3('Run And Debug.handleChange', params);
1358
1606
  };
1359
1607
  const getFolderIcon = async options => {
1360
- return invoke$2('IconTheme.getFolderIcon', options);
1608
+ return invoke$3('IconTheme.getFolderIcon', options);
1609
+ };
1610
+ const handleWorkspaceRefresh = async () => {
1611
+ return invoke$3('Layout.handleWorkspaceRefresh');
1361
1612
  };
1362
1613
  const closeWidget = async widgetId => {
1363
- return invoke$2('Viewlet.closeWidget', widgetId);
1614
+ return invoke$3('Viewlet.closeWidget', widgetId);
1364
1615
  };
1365
1616
  const sendMessagePortToExtensionHostWorker$1 = async (port, rpcId = 0) => {
1366
1617
  const command = 'HandleMessagePort.handleMessagePort2';
@@ -1371,76 +1622,89 @@ const sendMessagePortToSearchProcess = async port => {
1371
1622
  };
1372
1623
  const confirm = async (message, options) => {
1373
1624
  // @ts-ignore
1374
- const result = await invoke$2('ConfirmPrompt.prompt', message, options);
1625
+ const result = await invoke$3('ConfirmPrompt.prompt', message, options);
1375
1626
  return result;
1376
1627
  };
1377
1628
  const getRecentlyOpened = async () => {
1378
- return invoke$2(/* RecentlyOpened.getRecentlyOpened */'RecentlyOpened.getRecentlyOpened');
1629
+ return invoke$3(/* RecentlyOpened.getRecentlyOpened */'RecentlyOpened.getRecentlyOpened');
1379
1630
  };
1380
1631
  const getKeyBindings = async () => {
1381
- return invoke$2('KeyBindingsInitial.getKeyBindings');
1632
+ return invoke$3('KeyBindingsInitial.getKeyBindings');
1382
1633
  };
1383
1634
  const writeClipBoardText = async text => {
1384
- await invoke$2('ClipBoard.writeText', /* text */text);
1635
+ await invoke$3('ClipBoard.writeText', /* text */text);
1636
+ };
1637
+ const readClipBoardText = async () => {
1638
+ return invoke$3('ClipBoard.readText');
1385
1639
  };
1386
1640
  const writeClipBoardImage = async blob => {
1387
1641
  // @ts-ignore
1388
- await invoke$2('ClipBoard.writeImage', /* text */blob);
1642
+ await invoke$3('ClipBoard.writeImage', /* text */blob);
1389
1643
  };
1390
1644
  const searchFileMemory = async uri => {
1391
1645
  // @ts-ignore
1392
- return invoke$2('ExtensionHost.searchFileWithMemory', uri);
1646
+ return invoke$3('ExtensionHost.searchFileWithMemory', uri);
1393
1647
  };
1394
1648
  const searchFileFetch = async uri => {
1395
- return invoke$2('ExtensionHost.searchFileWithFetch', uri);
1649
+ return invoke$3('ExtensionHost.searchFileWithFetch', uri);
1396
1650
  };
1397
1651
  const showMessageBox = async options => {
1398
- return invoke$2('ElectronDialog.showMessageBox', options);
1652
+ return invoke$3('ElectronDialog.showMessageBox', options);
1399
1653
  };
1400
1654
  const handleDebugResumed = async params => {
1401
- await invoke$2('Run And Debug.handleResumed', params);
1655
+ await invoke$3('Run And Debug.handleResumed', params);
1402
1656
  };
1403
1657
  const openWidget = async name => {
1404
- await invoke$2('Viewlet.openWidget', name);
1658
+ await invoke$3('Viewlet.openWidget', name);
1405
1659
  };
1406
1660
  const getIcons = async requests => {
1407
- const icons = await invoke$2('IconTheme.getIcons', requests);
1661
+ const icons = await invoke$3('IconTheme.getIcons', requests);
1408
1662
  return icons;
1409
1663
  };
1410
1664
  const activateByEvent = event => {
1411
- return invoke$2('ExtensionHostManagement.activateByEvent', event);
1665
+ return invoke$3('ExtensionHostManagement.activateByEvent', event);
1412
1666
  };
1413
1667
  const setAdditionalFocus = focusKey => {
1414
1668
  // @ts-ignore
1415
- return invoke$2('Focus.setAdditionalFocus', focusKey);
1669
+ return invoke$3('Focus.setAdditionalFocus', focusKey);
1416
1670
  };
1417
1671
  const getActiveEditorId = () => {
1418
1672
  // @ts-ignore
1419
- return invoke$2('GetActiveEditor.getActiveEditorId');
1673
+ return invoke$3('GetActiveEditor.getActiveEditorId');
1420
1674
  };
1421
1675
  const getWorkspacePath = () => {
1422
- return invoke$2('Workspace.getPath');
1676
+ return invoke$3('Workspace.getPath');
1423
1677
  };
1424
1678
  const sendMessagePortToRendererProcess = async port => {
1425
1679
  const command = 'HandleMessagePort.handleMessagePort';
1426
1680
  // @ts-ignore
1427
1681
  await invokeAndTransfer$1('SendMessagePortToExtensionHostWorker.sendMessagePortToRendererProcess', port, command, DebugWorker);
1428
1682
  };
1683
+ const sendMessagePortToTextMeasurementWorker = async port => {
1684
+ const command = 'TextMeasurement.handleMessagePort';
1685
+ // @ts-ignore
1686
+ await invokeAndTransfer$1('SendMessagePortToExtensionHostWorker.sendMessagePortToTextMeasurementWorker', port, command, 0);
1687
+ };
1688
+ const sendMessagePortToSourceControlWorker = async port => {
1689
+ const command = 'SourceControl.handleMessagePort';
1690
+ // @ts-ignore
1691
+ await invokeAndTransfer$1('SendMessagePortToExtensionHostWorker.sendMessagePortToSourceControlWorker', port, command, 0);
1692
+ };
1429
1693
  const getPreference = async key => {
1430
- return await invoke$2('Preferences.get', key);
1694
+ return await invoke$3('Preferences.get', key);
1431
1695
  };
1432
1696
  const getAllExtensions = async () => {
1433
- return invoke$2('ExtensionManagement.getAllExtensions');
1697
+ return invoke$3('ExtensionManagement.getAllExtensions');
1434
1698
  };
1435
1699
  const rerenderEditor = async key => {
1436
1700
  // @ts-ignore
1437
- return invoke$2('Editor.rerender', key);
1701
+ return invoke$3('Editor.rerender', key);
1438
1702
  };
1439
1703
  const handleDebugPaused = async params => {
1440
- await invoke$2('Run And Debug.handlePaused', params);
1704
+ await invoke$3('Run And Debug.handlePaused', params);
1441
1705
  };
1442
1706
  const openUri = async (uri, focus, options) => {
1443
- await invoke$2('Main.openUri', uri, focus, options);
1707
+ await invoke$3('Main.openUri', uri, focus, options);
1444
1708
  };
1445
1709
  const sendMessagePortToSyntaxHighlightingWorker = async port => {
1446
1710
  await invokeAndTransfer$1(
@@ -1448,76 +1712,79 @@ const sendMessagePortToSyntaxHighlightingWorker = async port => {
1448
1712
  'SendMessagePortToSyntaxHighlightingWorker.sendMessagePortToSyntaxHighlightingWorker', port, 'HandleMessagePort.handleMessagePort2');
1449
1713
  };
1450
1714
  const handleDebugScriptParsed = async script => {
1451
- await invoke$2('Run And Debug.handleScriptParsed', script);
1715
+ await invoke$3('Run And Debug.handleScriptParsed', script);
1452
1716
  };
1453
1717
  const getWindowId = async () => {
1454
- return invoke$2('GetWindowId.getWindowId');
1718
+ return invoke$3('GetWindowId.getWindowId');
1455
1719
  };
1456
1720
  const getBlob = async uri => {
1457
1721
  // @ts-ignore
1458
- return invoke$2('FileSystem.getBlob', uri);
1722
+ return invoke$3('FileSystem.getBlob', uri);
1459
1723
  };
1460
1724
  const getExtensionCommands = async () => {
1461
- return invoke$2('ExtensionHost.getCommands');
1725
+ return invoke$3('ExtensionHost.getCommands');
1462
1726
  };
1463
1727
  const showErrorDialog = async errorInfo => {
1464
1728
  // @ts-ignore
1465
- await invoke$2('ErrorHandling.showErrorDialog', errorInfo);
1729
+ await invoke$3('ErrorHandling.showErrorDialog', errorInfo);
1466
1730
  };
1467
1731
  const getFolderSize$2 = async uri => {
1468
1732
  // @ts-ignore
1469
- return await invoke$2('FileSystem.getFolderSize', uri);
1733
+ return await invoke$3('FileSystem.getFolderSize', uri);
1470
1734
  };
1471
1735
  const getExtension = async id => {
1472
1736
  // @ts-ignore
1473
- return invoke$2('ExtensionManagement.getExtension', id);
1737
+ return invoke$3('ExtensionManagement.getExtension', id);
1474
1738
  };
1475
1739
  const getMarkdownDom = async html => {
1476
1740
  // @ts-ignore
1477
- return invoke$2('Markdown.getVirtualDom', html);
1741
+ return invoke$3('Markdown.getVirtualDom', html);
1478
1742
  };
1479
1743
  const renderMarkdown = async (markdown, options) => {
1480
1744
  // @ts-ignore
1481
- return invoke$2('Markdown.renderMarkdown', markdown, options);
1745
+ return invoke$3('Markdown.renderMarkdown', markdown, options);
1482
1746
  };
1483
1747
  const openNativeFolder = async uri => {
1484
1748
  // @ts-ignore
1485
- await invoke$2('OpenNativeFolder.openNativeFolder', uri);
1749
+ await invoke$3('OpenNativeFolder.openNativeFolder', uri);
1486
1750
  };
1487
1751
  const uninstallExtension = async id => {
1488
- return invoke$2('ExtensionManagement.uninstall', id);
1752
+ return invoke$3('ExtensionManagement.uninstall', id);
1489
1753
  };
1490
1754
  const installExtension = async id => {
1491
1755
  // @ts-ignore
1492
- return invoke$2('ExtensionManagement.install', id);
1756
+ return invoke$3('ExtensionManagement.install', id);
1493
1757
  };
1494
1758
  const openExtensionSearch = async () => {
1495
1759
  // @ts-ignore
1496
- return invoke$2('SideBar.openViewlet', 'Extensions');
1760
+ return invoke$3('SideBar.openViewlet', 'Extensions');
1497
1761
  };
1498
1762
  const setExtensionsSearchValue = async searchValue => {
1499
1763
  // @ts-ignore
1500
- return invoke$2('Extensions.handleInput', searchValue);
1764
+ return invoke$3('Extensions.handleInput', searchValue, Script);
1501
1765
  };
1502
1766
  const openExternal = async uri => {
1503
1767
  // @ts-ignore
1504
- await invoke$2('Open.openExternal', uri);
1768
+ await invoke$3('Open.openExternal', uri);
1505
1769
  };
1506
1770
  const openUrl = async uri => {
1507
1771
  // @ts-ignore
1508
- await invoke$2('Open.openUrl', uri);
1772
+ await invoke$3('Open.openUrl', uri);
1509
1773
  };
1510
1774
  const getAllPreferences = async () => {
1511
1775
  // @ts-ignore
1512
- return invoke$2('Preferences.getAll');
1776
+ return invoke$3('Preferences.getAll');
1513
1777
  };
1514
1778
  const showSaveFilePicker = async () => {
1515
1779
  // @ts-ignore
1516
- return invoke$2('FilePicker.showSaveFilePicker');
1780
+ return invoke$3('FilePicker.showSaveFilePicker');
1517
1781
  };
1518
1782
  const getLogsDir = async () => {
1519
1783
  // @ts-ignore
1520
- return invoke$2('PlatformPaths.getLogsDir');
1784
+ return invoke$3('PlatformPaths.getLogsDir');
1785
+ };
1786
+ const measureTextBlockHeight = async (actualInput, fontFamily, fontSize, lineHeightPx, width) => {
1787
+ return invoke$3(`MeasureTextHeight.measureTextBlockHeight`, actualInput, fontFamily, fontSize, lineHeightPx, width);
1521
1788
  };
1522
1789
  const registerMockRpc = commandMap => {
1523
1790
  const mockRpc = createMockRpc({
@@ -1565,15 +1832,18 @@ const RendererWorker = {
1565
1832
  handleDebugPaused,
1566
1833
  handleDebugResumed,
1567
1834
  handleDebugScriptParsed,
1835
+ handleWorkspaceRefresh,
1568
1836
  installExtension,
1569
- invoke: invoke$2,
1837
+ invoke: invoke$3,
1570
1838
  invokeAndTransfer: invokeAndTransfer$1,
1839
+ measureTextBlockHeight,
1571
1840
  openExtensionSearch,
1572
1841
  openExternal,
1573
1842
  openNativeFolder,
1574
1843
  openUri,
1575
1844
  openUrl,
1576
1845
  openWidget,
1846
+ readClipBoardText,
1577
1847
  readFile: readFile$3,
1578
1848
  registerMockRpc,
1579
1849
  registerWebViewInterceptor,
@@ -1590,7 +1860,9 @@ const RendererWorker = {
1590
1860
  sendMessagePortToMarkdownWorker,
1591
1861
  sendMessagePortToRendererProcess,
1592
1862
  sendMessagePortToSearchProcess,
1863
+ sendMessagePortToSourceControlWorker,
1593
1864
  sendMessagePortToSyntaxHighlightingWorker,
1865
+ sendMessagePortToTextMeasurementWorker,
1594
1866
  set: set$2,
1595
1867
  setAdditionalFocus,
1596
1868
  setColorTheme,
@@ -1599,6 +1871,7 @@ const RendererWorker = {
1599
1871
  setWebViewPort,
1600
1872
  setWorkspacePath,
1601
1873
  showContextMenu,
1874
+ showContextMenu2,
1602
1875
  showErrorDialog,
1603
1876
  showMessageBox,
1604
1877
  showSaveFilePicker,
@@ -1608,51 +1881,35 @@ const RendererWorker = {
1608
1881
  writeClipBoardText
1609
1882
  };
1610
1883
 
1611
- const getPortTuple = () => {
1612
- const {
1613
- port1,
1614
- port2
1615
- } = new MessageChannel();
1884
+ const createLazyRpc = rpcId => {
1885
+ let rpcPromise;
1886
+ let factory;
1887
+ const createRpc = async () => {
1888
+ const rpc = await factory();
1889
+ set$4(rpcId, rpc);
1890
+ };
1891
+ const ensureRpc = async () => {
1892
+ if (!rpcPromise) {
1893
+ rpcPromise = createRpc();
1894
+ }
1895
+ await rpcPromise;
1896
+ };
1616
1897
  return {
1617
- port1,
1618
- port2
1898
+ setFactory(value) {
1899
+ factory = value;
1900
+ },
1901
+ async invoke(method, ...params) {
1902
+ await ensureRpc();
1903
+ const rpc = get(rpcId);
1904
+ return rpc.invoke(method, ...params);
1905
+ }
1619
1906
  };
1620
1907
  };
1621
1908
 
1622
1909
  const {
1623
- invokeAndTransfer,
1624
- set: set$1,
1625
- sendMessagePortToExtensionHostWorker
1626
- } = RendererWorker;
1627
-
1628
- const createExtensionHostRpc = async () => {
1629
- try {
1630
- const {
1631
- port1,
1632
- port2
1633
- } = getPortTuple();
1634
- await sendMessagePortToExtensionHostWorker(port2);
1635
- const rpc = await PlainMessagePortRpcParent.create({
1636
- commandMap: {},
1637
- messagePort: port1
1638
- });
1639
- return rpc;
1640
- } catch (error) {
1641
- throw new VError(error, `Failed to create extension host rpc`);
1642
- }
1643
- };
1644
-
1645
- let rpcPromise = undefined;
1646
- const getOrCreate = () => {
1647
- if (!rpcPromise) {
1648
- rpcPromise = createExtensionHostRpc();
1649
- }
1650
- return rpcPromise;
1651
- };
1652
- const invoke$1 = async (method, ...params) => {
1653
- const rpc = await getOrCreate();
1654
- return rpc.invoke(method, ...params);
1655
- };
1910
+ invoke: invoke$2,
1911
+ setFactory
1912
+ } = createLazyRpc(ExtensionHostWorker);
1656
1913
 
1657
1914
  const RE_PROTOCOL = /^([a-z-]+):\/\//;
1658
1915
  const assertUri = uri => {
@@ -1663,11 +1920,11 @@ const assertUri = uri => {
1663
1920
  };
1664
1921
 
1665
1922
  const {
1666
- set,
1923
+ set: set$1,
1667
1924
  rename: rename$2,
1668
1925
  copy: copy$1,
1669
1926
  mkdir: mkdir$1,
1670
- invoke,
1927
+ invoke: invoke$1,
1671
1928
  getFolderSize: getFolderSize$1,
1672
1929
  writeFile: writeFile$2,
1673
1930
  stat: stat$1,
@@ -1684,7 +1941,7 @@ const {
1684
1941
  const Http = 'http:';
1685
1942
  const Memory = 'memfs:';
1686
1943
  const Https = 'https:';
1687
- const File = 'file:';
1944
+ const File$1 = 'file:';
1688
1945
 
1689
1946
  const watchCallbacks = Object.create(null);
1690
1947
  const registerWatchCallback = (id, rpcId, commandId, uri) => {
@@ -1723,9 +1980,9 @@ const watchFile = async (id, uri, rpcId) => {
1723
1980
  assertUri(uri);
1724
1981
  const commandId = 'Output.executeWatchCallback';
1725
1982
  registerWatchCallback(id, rpcId, commandId, uri);
1726
- if (uri.startsWith(File)) {
1983
+ if (uri.startsWith(File$1)) {
1727
1984
  // @ts-ignore
1728
- await invoke('FileSystem.watchFile', id, uri);
1985
+ await invoke$1('FileSystem.watchFile', id, uri);
1729
1986
  }
1730
1987
  // memfs file watchers are handled in-memory, no need to register with FileSystemProcess
1731
1988
  };
@@ -1740,7 +1997,7 @@ const unwatchFile = async id => {
1740
1997
  unregisterWatchCallback(id);
1741
1998
  // TODO only if it is a file uri
1742
1999
  // @ts-ignore
1743
- await invoke('FileSystem.unwatchFile', id);
2000
+ await invoke$1('FileSystem.unwatchFile', id);
1744
2001
  };
1745
2002
  const triggerMemfsFileWatcher = async uri => {
1746
2003
  // Find all registered watchers for this URI and trigger them
@@ -1751,28 +2008,28 @@ const triggerMemfsFileWatcher = async uri => {
1751
2008
  };
1752
2009
 
1753
2010
  const remove$1 = async dirent => {
1754
- await invoke$1('FileSystemMemory.remove', dirent);
2011
+ await invoke$2('FileSystemMemory.remove', dirent);
1755
2012
  // Trigger file watchers for memfs files
1756
2013
  await triggerMemfsFileWatcher(dirent);
1757
2014
  };
1758
2015
  const readFile$1 = async uri => {
1759
- return invoke$1('FileSystemMemory.readFile', uri);
2016
+ return invoke$2('FileSystemMemory.readFile', uri);
1760
2017
  };
1761
2018
  const readJson$1 = async uri => {
1762
2019
  throw new Error('not implemented');
1763
2020
  };
1764
2021
  const createFile$1 = async uri => {
1765
- await invoke$1('FileSystemMemory.createFile', uri);
2022
+ await invoke$2('FileSystemMemory.createFile', uri);
1766
2023
  // Trigger file watchers for memfs files
1767
2024
  await triggerMemfsFileWatcher(uri);
1768
2025
  };
1769
2026
  const writeFile$1 = async (uri, content) => {
1770
- await invoke$1('FileSystemMemory.writeFile', uri, content);
2027
+ await invoke$2('FileSystemMemory.writeFile', uri, content);
1771
2028
  // Trigger file watchers for memfs files
1772
2029
  await triggerMemfsFileWatcher(uri);
1773
2030
  };
1774
2031
  const rename$1 = async (oldUri, newUri) => {
1775
- await invoke$1('FileSystemMemory.rename', oldUri, newUri);
2032
+ await invoke$2('FileSystemMemory.rename', oldUri, newUri);
1776
2033
  // Trigger file watchers for both old and new URIs
1777
2034
  await triggerMemfsFileWatcher(oldUri);
1778
2035
  await triggerMemfsFileWatcher(newUri);
@@ -1871,7 +2128,7 @@ const getBytes = async blob => {
1871
2128
  const writeBlob = async (uri, blob) => {
1872
2129
  const bytes = await getBytes(blob);
1873
2130
  // @ts-ignore
1874
- await invoke('FileSystem.writeBuffer', uri, bytes);
2131
+ await invoke$1('FileSystem.writeBuffer', uri, bytes);
1875
2132
  };
1876
2133
  const mkdir = async uri => {
1877
2134
  return mkdir$1(uri);
@@ -1899,6 +2156,23 @@ const handleMessagePort = async (port, rpcId) => {
1899
2156
  }
1900
2157
  };
1901
2158
 
2159
+ const getPortTuple = () => {
2160
+ const {
2161
+ port1,
2162
+ port2
2163
+ } = new MessageChannel();
2164
+ return {
2165
+ port1,
2166
+ port2
2167
+ };
2168
+ };
2169
+
2170
+ const {
2171
+ invokeAndTransfer,
2172
+ set,
2173
+ sendMessagePortToExtensionHostWorker
2174
+ } = RendererWorker;
2175
+
1902
2176
  const sendMessagePortToFileSystemProcess = async port => {
1903
2177
  const command = 'HandleMessagePortForFileSystemProcess.handleMessagePortForFileSystemProcess';
1904
2178
  await invokeAndTransfer('SendMessagePortToExtensionHostWorker.sendMessagePortToSharedProcess', port, command, FileSystemWorker);
@@ -1960,13 +2234,117 @@ const initializeFileSytemProcess = async platform => {
1960
2234
  return;
1961
2235
  }
1962
2236
  const rpc = await createFileSystemProcessRpc(platform);
1963
- set(rpc);
2237
+ set$1(rpc);
1964
2238
  };
1965
2239
 
1966
2240
  const initialize = async platform => {
1967
2241
  await initializeFileSytemProcess(platform);
1968
2242
  };
1969
2243
 
2244
+ const Directory = 'directory';
2245
+ const File = 'file';
2246
+
2247
+ let rpcPromise = undefined;
2248
+ const getOrCreate = () => {
2249
+ if (!rpcPromise) {
2250
+ rpcPromise = Promise.resolve(get(RendererWorker$1));
2251
+ }
2252
+ return rpcPromise;
2253
+ };
2254
+ const invoke = async (method, ...params) => {
2255
+ const rpc = await getOrCreate();
2256
+ return rpc.invoke(method, ...params);
2257
+ };
2258
+
2259
+ /* eslint-disable @typescript-eslint/prefer-readonly-parameter-types */
2260
+
2261
+ const fromAsync = async asyncIterable => {
2262
+ const children = [];
2263
+ for await (const value of asyncIterable) {
2264
+ children.push(value);
2265
+ }
2266
+ return children;
2267
+ };
2268
+
2269
+ /**
2270
+ * Do not use directly, use FileSystemHtml.getChildHandles
2271
+ * instead which prompts for the required permission to
2272
+ * retrieve the child handles
2273
+ */
2274
+ const getChildHandles = async handle => {
2275
+ object(handle);
2276
+
2277
+ // @ts-ignore - values() exists on FileSystemDirectoryHandle but TypeScript types may not include it
2278
+ const handles = await fromAsync(handle.values());
2279
+ return handles;
2280
+ };
2281
+
2282
+ const uploadDirectory = async (fileSystemHandle, pathSeparator, root, uploadHandles) => {
2283
+ const folderPath = root + pathSeparator + fileSystemHandle.name;
2284
+ await mkdir(folderPath);
2285
+ const childHandles = await getChildHandles(fileSystemHandle);
2286
+ await uploadHandles(childHandles, pathSeparator, folderPath);
2287
+ };
2288
+
2289
+ const getBinaryString$1 = file => {
2290
+ return invoke('Blob.blobToBinaryString', file);
2291
+ };
2292
+
2293
+ const getFile = handle => {
2294
+ return handle.getFile();
2295
+ };
2296
+ const getBinaryString = async handle => {
2297
+ const file = await getFile(handle);
2298
+ const text = await getBinaryString$1(file);
2299
+ return text;
2300
+ };
2301
+
2302
+ const join = (pathSeparator, ...parts) => {
2303
+ return parts.join(pathSeparator);
2304
+ };
2305
+
2306
+ const uploadFile = async (fileSystemHandle, pathSeparator, root) => {
2307
+ const content = await getBinaryString(fileSystemHandle);
2308
+ const to = join(pathSeparator, root, fileSystemHandle.name);
2309
+ await writeFile(to, content);
2310
+ };
2311
+
2312
+ const uploadHandle = async (fileSystemHandle, pathSeparator, root, uploadHandles) => {
2313
+ const {
2314
+ kind
2315
+ } = fileSystemHandle;
2316
+ switch (kind) {
2317
+ case File:
2318
+ return uploadFile(fileSystemHandle, pathSeparator, root);
2319
+ case Directory:
2320
+ return uploadDirectory(fileSystemHandle, pathSeparator, root, uploadHandles);
2321
+ default:
2322
+ throw new Error(`unsupported file system handle type ${kind}`);
2323
+ }
2324
+ };
2325
+
2326
+ const uploadHandles = async (fileSystemHandles, pathSeparator, root) => {
2327
+ for (const fileSystemHandle of fileSystemHandles) {
2328
+ await uploadHandle(fileSystemHandle, pathSeparator, root, uploadHandles);
2329
+ }
2330
+ };
2331
+ const uploadFileSystemHandles = async (root, pathSeparator, fileSystemHandles) => {
2332
+ if (fileSystemHandles.length === 1) {
2333
+ const file = fileSystemHandles[0];
2334
+ const {
2335
+ name,
2336
+ kind
2337
+ } = file;
2338
+ if (kind === Directory) {
2339
+ await invoke('PersistentFileHandle.addHandle', `/${name}`, file);
2340
+ await invoke('Workspace.setPath', `html:///${name}`);
2341
+ return true;
2342
+ }
2343
+ }
2344
+ await uploadHandles(fileSystemHandles, pathSeparator, root);
2345
+ return false;
2346
+ };
2347
+
1970
2348
  const commandMap = {
1971
2349
  'FileSystem.appendFile': appendFile,
1972
2350
  'FileSystem.copy': copy,
@@ -1989,15 +2367,37 @@ const commandMap = {
1989
2367
  'FileSystem.watchFile': watchFile,
1990
2368
  'FileSystem.writeFile': writeFile,
1991
2369
  'FileSystem.writeBlob': writeBlob,
2370
+ 'FileSystem.uploadFileSystemHandles': uploadFileSystemHandles,
2371
+ 'Blob.base64StringToBlob': base64StringToBlob,
2372
+ 'Blob.binaryStringToBlob': binaryStringToBlob,
2373
+ 'Blob.blobToBinaryString': blobToBinaryString,
1992
2374
  'Initialize.initialize': initialize
1993
2375
  };
1994
2376
 
2377
+ const createExtensionHostRpc = async () => {
2378
+ try {
2379
+ const {
2380
+ port1,
2381
+ port2
2382
+ } = getPortTuple();
2383
+ await sendMessagePortToExtensionHostWorker(port2);
2384
+ const rpc = await PlainMessagePortRpcParent.create({
2385
+ commandMap: {},
2386
+ messagePort: port1
2387
+ });
2388
+ return rpc;
2389
+ } catch (error) {
2390
+ throw new VError(error, `Failed to create extension host rpc`);
2391
+ }
2392
+ };
2393
+
1995
2394
  const listen = async () => {
1996
2395
  Object.assign(commandMapRef, commandMap);
2396
+ setFactory(createExtensionHostRpc);
1997
2397
  const rpc = await WebWorkerRpcClient.create({
1998
2398
  commandMap: commandMap
1999
2399
  });
2000
- set$1(rpc);
2400
+ set(rpc);
2001
2401
  };
2002
2402
 
2003
2403
  const main = async () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/file-system-worker",
3
- "version": "3.1.0",
3
+ "version": "4.0.0",
4
4
  "description": "File System Worker",
5
5
  "keywords": [
6
6
  "Lvce Editor"
@@ -12,5 +12,8 @@
12
12
  "license": "MIT",
13
13
  "author": "Lvce Editor",
14
14
  "type": "module",
15
- "main": "dist/fileSystemWorkerMain.js"
15
+ "main": "dist/fileSystemWorkerMain.js",
16
+ "dependencies": {
17
+ "blob-util": "^2.0.2"
18
+ }
16
19
  }