@lvce-editor/text-search-worker 7.18.2 → 7.19.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.
@@ -1485,8 +1485,14 @@ const getContextArgs = contextLines => {
1485
1485
  }
1486
1486
  return [];
1487
1487
  };
1488
+ const trimPart = part => {
1489
+ return part.trim();
1490
+ };
1491
+ const toGlob = pattern => {
1492
+ return ['--glob', pattern];
1493
+ };
1488
1494
  const getIncludeArgs = include => {
1489
- return (include || '').split(',').map(part => part.trim()).filter(Boolean).flatMap(pattern => ['--glob', pattern]);
1495
+ return (include || '').split(',').map(trimPart).filter(Boolean).flatMap(toGlob);
1490
1496
  };
1491
1497
  const getRipGrepArgs = ({
1492
1498
  contextLines,
@@ -1696,14 +1702,17 @@ const textSearchProviderMap = {
1696
1702
  web: textSearch
1697
1703
  };
1698
1704
 
1699
- const listen = async () => {
1700
- Object.assign(commandMapRef, commandMap);
1701
- add(textSearchProviderMap);
1705
+ const initializeRendererWorker = async () => {
1702
1706
  const rpc = await create$1({
1703
1707
  commandMap: commandMapRef
1704
1708
  });
1705
1709
  set$3(rpc);
1706
1710
  };
1711
+ const listen = async () => {
1712
+ Object.assign(commandMapRef, commandMap);
1713
+ add(textSearchProviderMap);
1714
+ await initializeRendererWorker();
1715
+ };
1707
1716
 
1708
1717
  const main = async () => {
1709
1718
  await listen();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/text-search-worker",
3
- "version": "7.18.2",
3
+ "version": "7.19.0",
4
4
  "description": "Text Search Worker",
5
5
  "keywords": [
6
6
  "text-search"