@lvce-editor/extension-host-worker 5.26.0 → 5.28.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.
@@ -1108,6 +1108,14 @@ const readDirWithFileTypesExternal = async path => {
1108
1108
  const content = await invoke$2('FileSystem.readDirWithFileTypes', path);
1109
1109
  return content;
1110
1110
  };
1111
+ const remove$4 = async (protocol, path) => {
1112
+ try {
1113
+ const provider = get$a(protocol);
1114
+ return await provider.remove(path);
1115
+ } catch (error) {
1116
+ throw new VError(error, 'Failed to execute file system provider');
1117
+ }
1118
+ };
1111
1119
  const rename$1 = async (protocol, oldUri, newUri) => {
1112
1120
  try {
1113
1121
  const provider = get$a(protocol);
@@ -4821,6 +4829,7 @@ const FileSystemReadDirWithFileTypes = 'ExtensionHostFileSystem.readDirWithFileT
4821
4829
  const FileSystemReadFile = 'ExtensionHostFileSystem.readFile';
4822
4830
  const FileSystemRename = 'ExtensionHostFileSystem.rename';
4823
4831
  const FileSystemWriteFile = 'ExtensionHostFileSystem.writeFile';
4832
+ const FileSystemRemove = 'ExtensionHostFileSystem.remove';
4824
4833
  const FormattingExecuteFormmattingProvider = 'ExtensionHostFormatting.executeFormattingProvider';
4825
4834
  const HoverExecute = 'ExtensionHostHover.execute';
4826
4835
  const ImplementationExecuteImplementationProvider = 'ExtensionHostImplementation.executeImplementationProvider';
@@ -5974,6 +5983,15 @@ const matchesUri = (uri, relativeRoot, include, exclude) => {
5974
5983
  };
5975
5984
 
5976
5985
  const textSearch = async (scheme, root, query, options, assetDir) => {
5986
+ string(scheme);
5987
+ string(root);
5988
+ string(query);
5989
+ const {
5990
+ results
5991
+ } = await textSearch2(scheme, root, query, options);
5992
+ return results;
5993
+ };
5994
+ const textSearch2 = async (scheme, root, query, options, assetDir) => {
5977
5995
  string(scheme);
5978
5996
  string(root);
5979
5997
  string(query);
@@ -5991,7 +6009,10 @@ const textSearch = async (scheme, root, query, options, assetDir) => {
5991
6009
  allResults.push(...results);
5992
6010
  }
5993
6011
  }
5994
- return allResults;
6012
+ return {
6013
+ results: allResults,
6014
+ limitHit: allResults.length > options.limit
6015
+ };
5995
6016
  };
5996
6017
 
5997
6018
  const registerInterceptor = async (id, port) => {
@@ -6082,6 +6103,7 @@ const commandMap = {
6082
6103
  'TextSearchFetch.textSearch': textSearch$2,
6083
6104
  'TextSearchHtml.textSearch': textSearch$1,
6084
6105
  'TextSearchMemory.textSearch': textSearch,
6106
+ 'TextSearchMemory.textSearch2': textSearch2,
6085
6107
  'WebView.create3': createWebView3,
6086
6108
  'WebView.createWebViewWorkerRpc': createWebViewWorkerRpc,
6087
6109
  'WebView.createWebViewWorkerRpc2': createWebViewWorkerRpc2,
@@ -6103,6 +6125,7 @@ const commandMap = {
6103
6125
  [FileSystemReadFile]: readFile$2,
6104
6126
  [FileSystemRename]: rename$1,
6105
6127
  [FileSystemWriteFile]: writeFile$3,
6128
+ [FileSystemRemove]: remove$4,
6106
6129
  [FormattingExecuteFormmattingProvider]: executeFormattingProvider,
6107
6130
  [HoverExecute]: executeHoverProvider,
6108
6131
  [ImplementationExecuteImplementationProvider]: executeImplementationProvider,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/extension-host-worker",
3
- "version": "5.26.0",
3
+ "version": "5.28.0",
4
4
  "description": "Webworker for the extension host functionality in Lvce Editor.",
5
5
  "keywords": [
6
6
  "web-worker"