@lvce-editor/text-search-worker 7.23.0 → 7.24.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.
|
@@ -1437,11 +1437,11 @@ const invoke = async (method, ...params) => {
|
|
|
1437
1437
|
};
|
|
1438
1438
|
|
|
1439
1439
|
const getIncrementalResults = async (searchId, minLineY, maxLineY) => {
|
|
1440
|
-
return invoke('TextSearch.getIncrementalResults', searchId, minLineY, maxLineY);
|
|
1440
|
+
return await invoke('TextSearch.getIncrementalResults', searchId, minLineY, maxLineY);
|
|
1441
1441
|
};
|
|
1442
1442
|
|
|
1443
1443
|
const getPullResults = async searchId => {
|
|
1444
|
-
return invoke('TextSearch.getPullResults', searchId);
|
|
1444
|
+
return await invoke('TextSearch.getPullResults', searchId);
|
|
1445
1445
|
};
|
|
1446
1446
|
|
|
1447
1447
|
const commandMapRef = Object.create(null);
|
|
@@ -1484,7 +1484,6 @@ const launchSearchProcessNode = async () => {
|
|
|
1484
1484
|
}
|
|
1485
1485
|
return create$2({
|
|
1486
1486
|
commandMap: commandMapRef,
|
|
1487
|
-
// @ts-ignore
|
|
1488
1487
|
type: 'search-process'
|
|
1489
1488
|
});
|
|
1490
1489
|
};
|
|
@@ -1506,7 +1505,7 @@ const initialize = async platform => {
|
|
|
1506
1505
|
|
|
1507
1506
|
const RE_PROTOCOL = /^([a-z-\d]+):\/\//;
|
|
1508
1507
|
const getProtocol = uri => {
|
|
1509
|
-
const protocolMatch =
|
|
1508
|
+
const protocolMatch = RE_PROTOCOL.exec(uri);
|
|
1510
1509
|
if (protocolMatch) {
|
|
1511
1510
|
return protocolMatch[1];
|
|
1512
1511
|
}
|
|
@@ -1691,7 +1690,7 @@ const toPath = (uri, expectedUrl) => {
|
|
|
1691
1690
|
if (expectedUrl && (url.protocol !== expectedUrl.protocol || url.host !== expectedUrl.host)) {
|
|
1692
1691
|
return '';
|
|
1693
1692
|
}
|
|
1694
|
-
if (url.protocol === 'file:'
|
|
1693
|
+
if (expectedUrl || url.protocol === 'file:') {
|
|
1695
1694
|
return normalizeWindowsDrive(decodeURIComponent(url.pathname)).replaceAll('\\', '/');
|
|
1696
1695
|
}
|
|
1697
1696
|
return '';
|
|
@@ -1723,7 +1722,6 @@ const filterOpenEditorResults = (root, results, openEditorUris) => {
|
|
|
1723
1722
|
};
|
|
1724
1723
|
const textSearch$2 = async (scheme, root, query, options, assetDir) => {
|
|
1725
1724
|
try {
|
|
1726
|
-
// @ts-ignore
|
|
1727
1725
|
const result = await invoke$3('ExtensionHostTextSearch.textSearchMemory2', scheme, root, query, options, assetDir);
|
|
1728
1726
|
if (!result || !result.results) {
|
|
1729
1727
|
throw new Error(`new api not supported`);
|
|
@@ -1760,7 +1758,7 @@ const textSearch$1 = async (scheme, root, query, options, assetDir, _platform, s
|
|
|
1760
1758
|
}),
|
|
1761
1759
|
searchString: query
|
|
1762
1760
|
});
|
|
1763
|
-
if (options.usePullBasedSearch &&
|
|
1761
|
+
if (searchId && options.usePullBasedSearch && (scheme === '' || scheme === 'file')) {
|
|
1764
1762
|
const pullSearchOptions = {
|
|
1765
1763
|
ripGrepArgs,
|
|
1766
1764
|
searchDir: root,
|