@lvce-editor/search-process 15.5.0 → 15.6.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.
- package/dist/index.js +8 -17
- package/package.json +1 -2
package/dist/index.js
CHANGED
|
@@ -1999,11 +1999,6 @@ const collectStdoutPull = async (searchId, stdout, kill, maxSearchResults, chars
|
|
|
1999
1999
|
};
|
|
2000
2000
|
};
|
|
2001
2001
|
|
|
2002
|
-
const rpcMap = new Map();
|
|
2003
|
-
const removeById = id => {
|
|
2004
|
-
rpcMap.delete(id);
|
|
2005
|
-
};
|
|
2006
|
-
|
|
2007
2002
|
const textSearchPull = async (rpc, {
|
|
2008
2003
|
charsAfter,
|
|
2009
2004
|
charsBefore,
|
|
@@ -2025,20 +2020,16 @@ const textSearchPull = async (rpc, {
|
|
|
2025
2020
|
params: [uid, searchId]
|
|
2026
2021
|
});
|
|
2027
2022
|
};
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
if (exitResult.
|
|
2033
|
-
|
|
2034
|
-
throw new RipGrepNotFoundError(exitResult.event);
|
|
2035
|
-
}
|
|
2036
|
-
throw new TextSearchError(exitResult.event);
|
|
2023
|
+
const pipeLinePromise = collectStdoutPull(searchId, childProcess.stdout, childProcess.kill, maxSearchResults, charsBefore, charsAfter, notifyResultsFound);
|
|
2024
|
+
const closePromise = waitForProcessToExit(childProcess);
|
|
2025
|
+
const [pipeLineResult, exitResult] = await Promise.all([pipeLinePromise, closePromise]);
|
|
2026
|
+
if (exitResult.type === Error$1) {
|
|
2027
|
+
if (isEnoentError(exitResult.event)) {
|
|
2028
|
+
throw new RipGrepNotFoundError(exitResult.event);
|
|
2037
2029
|
}
|
|
2038
|
-
|
|
2039
|
-
} finally {
|
|
2040
|
-
removeById(searchId);
|
|
2030
|
+
throw new TextSearchError(exitResult.event);
|
|
2041
2031
|
}
|
|
2032
|
+
return pipeLineResult;
|
|
2042
2033
|
};
|
|
2043
2034
|
|
|
2044
2035
|
const commandMap = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lvce-editor/search-process",
|
|
3
|
-
"version": "15.
|
|
3
|
+
"version": "15.6.0",
|
|
4
4
|
"description": "Search Process",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Lvce Editor",
|
|
@@ -18,7 +18,6 @@
|
|
|
18
18
|
"search-process": "bin/searchProcess.js"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@lvce-editor/constants": "^5.14.0",
|
|
22
21
|
"execa": "^9.6.1",
|
|
23
22
|
"ws": "^8.21.1"
|
|
24
23
|
},
|