@polka-codes/cli-shared 0.10.26 → 0.10.27
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 +7 -1
- package/package.json +9 -9
package/dist/index.js
CHANGED
|
@@ -465,6 +465,7 @@ async function searchFiles(path, regex, filePattern, cwd, excludeFiles) {
|
|
|
465
465
|
args.push(regex, path);
|
|
466
466
|
return new Promise((resolve5, reject) => {
|
|
467
467
|
const results = [];
|
|
468
|
+
let stderr = "";
|
|
468
469
|
const rg = spawn("rg", args, {
|
|
469
470
|
cwd,
|
|
470
471
|
stdio: ["ignore", "pipe", "pipe"]
|
|
@@ -473,12 +474,17 @@ async function searchFiles(path, regex, filePattern, cwd, excludeFiles) {
|
|
|
473
474
|
const lines = data.toString().split("\n").filter(Boolean);
|
|
474
475
|
results.push(...lines);
|
|
475
476
|
});
|
|
477
|
+
rg.stderr.on("data", (data) => {
|
|
478
|
+
stderr += data.toString();
|
|
479
|
+
});
|
|
476
480
|
rg.on("error", (error) => {
|
|
477
481
|
reject(new Error(`Failed to execute ripgrep: ${error.message}`));
|
|
478
482
|
});
|
|
479
483
|
rg.on("close", (code) => {
|
|
480
484
|
if (code !== 0 && code !== 1) {
|
|
481
|
-
|
|
485
|
+
const stderrMessage = stderr.trim();
|
|
486
|
+
const details = stderrMessage.length > 0 ? `: ${stderrMessage}` : "";
|
|
487
|
+
reject(new Error(`Ripgrep process exited with code ${code}${details}`));
|
|
482
488
|
return;
|
|
483
489
|
}
|
|
484
490
|
resolve5(results);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@polka-codes/cli-shared",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.27",
|
|
4
4
|
"license": "AGPL-3.0",
|
|
5
5
|
"author": "github@polka.codes",
|
|
6
6
|
"repository": {
|
|
@@ -26,19 +26,19 @@
|
|
|
26
26
|
"build:copy-wasm": "mkdir -p dist && cp ../../node_modules/sql.js/dist/sql-wasm.wasm dist/"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@ai-sdk/google-vertex": "^4.0.
|
|
30
|
-
"@ai-sdk/provider": "^3.0.
|
|
31
|
-
"@ai-sdk/provider-utils": "^4.0.
|
|
32
|
-
"@inquirer/prompts": "^8.
|
|
33
|
-
"@polka-codes/core": "^0.10.
|
|
34
|
-
"ai": "^6.0.
|
|
29
|
+
"@ai-sdk/google-vertex": "^4.0.113",
|
|
30
|
+
"@ai-sdk/provider": "^3.0.9",
|
|
31
|
+
"@ai-sdk/provider-utils": "^4.0.24",
|
|
32
|
+
"@inquirer/prompts": "^8.4.2",
|
|
33
|
+
"@polka-codes/core": "^0.10.27",
|
|
34
|
+
"ai": "^6.0.170",
|
|
35
35
|
"chalk": "^5.6.2",
|
|
36
36
|
"ignore": "^7.0.5",
|
|
37
|
-
"lodash-es": "^4.
|
|
37
|
+
"lodash-es": "^4.18.1",
|
|
38
38
|
"mime-types": "^3.0.2",
|
|
39
39
|
"sql.js": "^1.14.1",
|
|
40
40
|
"yaml": "^2.8.3",
|
|
41
|
-
"zod": "^4.
|
|
41
|
+
"zod": "^4.4.1"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@types/lodash-es": "^4.17.12",
|