@lvce-editor/text-search-worker 7.18.1 → 7.18.2
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.
- package/dist/textSearchWorkerMain.js +13 -34
- package/package.json +1 -1
|
@@ -1470,7 +1470,7 @@ const getTextSearchProvider = scheme => {
|
|
|
1470
1470
|
return get(scheme);
|
|
1471
1471
|
};
|
|
1472
1472
|
|
|
1473
|
-
const textSearch$
|
|
1473
|
+
const textSearch$6 = async (root, query, options, assetDir, platform, searchId, uid) => {
|
|
1474
1474
|
string(root);
|
|
1475
1475
|
string(query);
|
|
1476
1476
|
const scheme = getProtocol(root);
|
|
@@ -1559,11 +1559,11 @@ const commandMap = {
|
|
|
1559
1559
|
'TextSearch.getPullResults': getPullResults,
|
|
1560
1560
|
'TextSearch.handlePullResultsFound': handlePullResultsFound,
|
|
1561
1561
|
'TextSearch.initialize': initialize,
|
|
1562
|
-
'TextSearch.search': textSearch$
|
|
1562
|
+
'TextSearch.search': textSearch$6,
|
|
1563
1563
|
'TextSearch.searchIncremental': textSearchIncremental
|
|
1564
1564
|
};
|
|
1565
1565
|
|
|
1566
|
-
const textSearch$
|
|
1566
|
+
const textSearch$5 = async (scheme, root, query, options) => {
|
|
1567
1567
|
string(scheme);
|
|
1568
1568
|
string(query);
|
|
1569
1569
|
const ripGrepArgs = getRipGrepArgs({
|
|
@@ -1583,7 +1583,7 @@ const textSearch$6 = async (scheme, root, query, options) => {
|
|
|
1583
1583
|
};
|
|
1584
1584
|
};
|
|
1585
1585
|
|
|
1586
|
-
const textSearch$
|
|
1586
|
+
const textSearch$4 = async (scheme, root, query, options, assetDir) => {
|
|
1587
1587
|
const results = await invoke$3('ExtensionHostTextSearch.textSearchFetch', scheme, root, query, options, assetDir);
|
|
1588
1588
|
return {
|
|
1589
1589
|
limitHit: false,
|
|
@@ -1591,7 +1591,7 @@ const textSearch$5 = async (scheme, root, query, options, assetDir) => {
|
|
|
1591
1591
|
};
|
|
1592
1592
|
};
|
|
1593
1593
|
|
|
1594
|
-
const textSearch$
|
|
1594
|
+
const textSearch$3 = async (scheme, root, query) => {
|
|
1595
1595
|
const results = await invoke$3('ExtensionHostTextSearch.textSearchHtml', scheme, root, query);
|
|
1596
1596
|
return {
|
|
1597
1597
|
limitHit: false,
|
|
@@ -1599,7 +1599,7 @@ const textSearch$4 = async (scheme, root, query) => {
|
|
|
1599
1599
|
};
|
|
1600
1600
|
};
|
|
1601
1601
|
|
|
1602
|
-
const textSearch$
|
|
1602
|
+
const textSearch$2 = async (scheme, root, query, options, assetDir) => {
|
|
1603
1603
|
try {
|
|
1604
1604
|
// @ts-ignore
|
|
1605
1605
|
const result = await invoke$3('ExtensionHostTextSearch.textSearchMemory2', scheme, root, query, options, assetDir);
|
|
@@ -1638,7 +1638,7 @@ const getOpenEditorPaths = (root, openEditorUris) => {
|
|
|
1638
1638
|
return [...new Set(paths)];
|
|
1639
1639
|
};
|
|
1640
1640
|
|
|
1641
|
-
const textSearch$
|
|
1641
|
+
const textSearch$1 = async (scheme, root, query, options, assetDir, _platform, searchId, uid) => {
|
|
1642
1642
|
const openEditorPaths = options.openEditorUris ? getOpenEditorPaths(root, options.openEditorUris) : undefined;
|
|
1643
1643
|
if (openEditorPaths && openEditorPaths.length === 0) {
|
|
1644
1644
|
return {
|
|
@@ -1677,26 +1677,6 @@ const textSearch$2 = async (scheme, root, query, options, assetDir, _platform, s
|
|
|
1677
1677
|
};
|
|
1678
1678
|
};
|
|
1679
1679
|
|
|
1680
|
-
const textSearch$1 = async (_scheme, root, query, options, assetDir, platform, searchId, uid) => {
|
|
1681
|
-
const workspace = new URL(root);
|
|
1682
|
-
const openEditorUris = options.openEditorUris?.flatMap(uri => {
|
|
1683
|
-
if (!uri.startsWith('remote-ssh://')) {
|
|
1684
|
-
return [];
|
|
1685
|
-
}
|
|
1686
|
-
const editor = new URL(uri);
|
|
1687
|
-
if (editor.host !== workspace.host || editor.username !== workspace.username) {
|
|
1688
|
-
return [];
|
|
1689
|
-
}
|
|
1690
|
-
return [decodeURIComponent(editor.pathname)];
|
|
1691
|
-
});
|
|
1692
|
-
return textSearch$2('file', decodeURIComponent(workspace.pathname), query, {
|
|
1693
|
-
...options,
|
|
1694
|
-
...(openEditorUris && {
|
|
1695
|
-
openEditorUris
|
|
1696
|
-
})
|
|
1697
|
-
}, assetDir, platform, searchId, uid);
|
|
1698
|
-
};
|
|
1699
|
-
|
|
1700
1680
|
const textSearch = async (scheme, root, query) => {
|
|
1701
1681
|
// TODO ask renderer worker for files
|
|
1702
1682
|
return {
|
|
@@ -1706,14 +1686,13 @@ const textSearch = async (scheme, root, query) => {
|
|
|
1706
1686
|
};
|
|
1707
1687
|
|
|
1708
1688
|
const textSearchProviderMap = {
|
|
1709
|
-
'': textSearch$
|
|
1689
|
+
'': textSearch$1,
|
|
1710
1690
|
// TODO deprecate/remove workspaces without scheme
|
|
1711
|
-
default: textSearch$
|
|
1712
|
-
fetch: textSearch$
|
|
1713
|
-
file: textSearch$
|
|
1714
|
-
html: textSearch$
|
|
1715
|
-
memfs: textSearch$
|
|
1716
|
-
'remote-ssh': textSearch$1,
|
|
1691
|
+
default: textSearch$5,
|
|
1692
|
+
fetch: textSearch$4,
|
|
1693
|
+
file: textSearch$1,
|
|
1694
|
+
html: textSearch$3,
|
|
1695
|
+
memfs: textSearch$2,
|
|
1717
1696
|
web: textSearch
|
|
1718
1697
|
};
|
|
1719
1698
|
|