@morphllm/morphsdk 0.2.46 → 0.2.48
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/{chunk-5JTJOQUX.js → chunk-AJ6X4STK.js} +5 -5
- package/dist/{chunk-UXYK7WZX.js → chunk-KM6V456Q.js} +2 -2
- package/dist/{chunk-7T7YOPJV.js → chunk-NHOPUGBN.js} +3 -3
- package/dist/chunk-TPP2UGQP.js +65 -0
- package/dist/chunk-TPP2UGQP.js.map +1 -0
- package/dist/{chunk-CL45IWIU.js → chunk-WI23KSNI.js} +2 -2
- package/dist/{chunk-D6OD3IST.js → chunk-YQVSMU24.js} +3 -3
- package/dist/{chunk-PABIV7X6.js → chunk-ZGK6OGK3.js} +3 -3
- package/dist/client.cjs +42 -3
- package/dist/client.cjs.map +1 -1
- package/dist/client.js +7 -7
- package/dist/index.cjs +42 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +7 -7
- package/dist/tools/warp_grep/anthropic.cjs +42 -3
- package/dist/tools/warp_grep/anthropic.cjs.map +1 -1
- package/dist/tools/warp_grep/anthropic.js +4 -4
- package/dist/tools/warp_grep/index.cjs +42 -3
- package/dist/tools/warp_grep/index.cjs.map +1 -1
- package/dist/tools/warp_grep/index.js +6 -6
- package/dist/tools/warp_grep/openai.cjs +42 -3
- package/dist/tools/warp_grep/openai.cjs.map +1 -1
- package/dist/tools/warp_grep/openai.js +4 -4
- package/dist/tools/warp_grep/providers/local.cjs +42 -3
- package/dist/tools/warp_grep/providers/local.cjs.map +1 -1
- package/dist/tools/warp_grep/providers/local.js +2 -2
- package/dist/tools/warp_grep/utils/ripgrep.cjs +42 -3
- package/dist/tools/warp_grep/utils/ripgrep.cjs.map +1 -1
- package/dist/tools/warp_grep/utils/ripgrep.js +1 -1
- package/dist/tools/warp_grep/vercel.cjs +42 -3
- package/dist/tools/warp_grep/vercel.cjs.map +1 -1
- package/dist/tools/warp_grep/vercel.js +4 -4
- package/package.json +2 -1
- package/dist/chunk-RSLIOCOE.js +0 -26
- package/dist/chunk-RSLIOCOE.js.map +0 -1
- /package/dist/{chunk-5JTJOQUX.js.map → chunk-AJ6X4STK.js.map} +0 -0
- /package/dist/{chunk-UXYK7WZX.js.map → chunk-KM6V456Q.js.map} +0 -0
- /package/dist/{chunk-7T7YOPJV.js.map → chunk-NHOPUGBN.js.map} +0 -0
- /package/dist/{chunk-CL45IWIU.js.map → chunk-WI23KSNI.js.map} +0 -0
- /package/dist/{chunk-D6OD3IST.js.map → chunk-YQVSMU24.js.map} +0 -0
- /package/dist/{chunk-PABIV7X6.js.map → chunk-ZGK6OGK3.js.map} +0 -0
package/dist/client.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import {
|
|
2
2
|
MorphClient
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-AJ6X4STK.js";
|
|
4
|
+
import "./chunk-ZGK6OGK3.js";
|
|
5
|
+
import "./chunk-NHOPUGBN.js";
|
|
6
|
+
import "./chunk-YQVSMU24.js";
|
|
7
|
+
import "./chunk-WI23KSNI.js";
|
|
8
8
|
import "./chunk-7HS6YXA3.js";
|
|
9
9
|
import "./chunk-EK7OQPWD.js";
|
|
10
10
|
import "./chunk-Z2FBMSNE.js";
|
|
11
11
|
import "./chunk-SWQPIKPY.js";
|
|
12
12
|
import "./chunk-WETRQJGU.js";
|
|
13
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-KM6V456Q.js";
|
|
14
14
|
import "./chunk-G2RSY56Q.js";
|
|
15
15
|
import "./chunk-SMGZ6A64.js";
|
|
16
|
-
import "./chunk-
|
|
16
|
+
import "./chunk-TPP2UGQP.js";
|
|
17
17
|
import "./chunk-73RQWOQC.js";
|
|
18
18
|
import "./chunk-TJIUA27P.js";
|
|
19
19
|
import "./chunk-TICMYDII.js";
|
package/dist/index.cjs
CHANGED
|
@@ -1720,9 +1720,12 @@ var import_path4 = __toESM(require("path"), 1);
|
|
|
1720
1720
|
|
|
1721
1721
|
// tools/warp_grep/utils/ripgrep.ts
|
|
1722
1722
|
var import_child_process = require("child_process");
|
|
1723
|
-
|
|
1723
|
+
var import_ripgrep = require("@vscode/ripgrep");
|
|
1724
|
+
var resolvedRgPath = null;
|
|
1725
|
+
var rgPathChecked = false;
|
|
1726
|
+
function spawnRg(rgBinary, args, opts) {
|
|
1724
1727
|
return new Promise((resolve2) => {
|
|
1725
|
-
const child = (0, import_child_process.spawn)(
|
|
1728
|
+
const child = (0, import_child_process.spawn)(rgBinary, args, {
|
|
1726
1729
|
cwd: opts?.cwd,
|
|
1727
1730
|
env: { ...process.env, ...opts?.env || {} },
|
|
1728
1731
|
stdio: ["ignore", "pipe", "pipe"]
|
|
@@ -1735,10 +1738,46 @@ function runRipgrep(args, opts) {
|
|
|
1735
1738
|
resolve2({ stdout, stderr, exitCode: typeof code === "number" ? code : -1 });
|
|
1736
1739
|
});
|
|
1737
1740
|
child.on("error", () => {
|
|
1738
|
-
resolve2({ stdout: "", stderr: "Failed to spawn ripgrep
|
|
1741
|
+
resolve2({ stdout: "", stderr: "Failed to spawn ripgrep.", exitCode: -1 });
|
|
1739
1742
|
});
|
|
1740
1743
|
});
|
|
1741
1744
|
}
|
|
1745
|
+
function isBinaryFailure(result) {
|
|
1746
|
+
if (result.exitCode === -1) return true;
|
|
1747
|
+
if (result.stderr.includes("jemalloc") || result.stderr.includes("Unsupported system page size")) return true;
|
|
1748
|
+
if (result.exitCode === 134) return true;
|
|
1749
|
+
return false;
|
|
1750
|
+
}
|
|
1751
|
+
async function runRipgrep(args, opts) {
|
|
1752
|
+
if (rgPathChecked && resolvedRgPath) {
|
|
1753
|
+
return spawnRg(resolvedRgPath, args, opts);
|
|
1754
|
+
}
|
|
1755
|
+
if (!rgPathChecked) {
|
|
1756
|
+
const result = await spawnRg(import_ripgrep.rgPath, args, opts);
|
|
1757
|
+
if (!isBinaryFailure(result)) {
|
|
1758
|
+
resolvedRgPath = import_ripgrep.rgPath;
|
|
1759
|
+
rgPathChecked = true;
|
|
1760
|
+
return result;
|
|
1761
|
+
}
|
|
1762
|
+
const fallbackResult = await spawnRg("rg", args, opts);
|
|
1763
|
+
if (!isBinaryFailure(fallbackResult)) {
|
|
1764
|
+
resolvedRgPath = "rg";
|
|
1765
|
+
rgPathChecked = true;
|
|
1766
|
+
return fallbackResult;
|
|
1767
|
+
}
|
|
1768
|
+
rgPathChecked = true;
|
|
1769
|
+
return {
|
|
1770
|
+
stdout: "",
|
|
1771
|
+
stderr: "Failed to spawn ripgrep. Neither bundled nor system rg is available.",
|
|
1772
|
+
exitCode: -1
|
|
1773
|
+
};
|
|
1774
|
+
}
|
|
1775
|
+
return {
|
|
1776
|
+
stdout: "",
|
|
1777
|
+
stderr: "Failed to spawn ripgrep. Neither bundled nor system rg is available.",
|
|
1778
|
+
exitCode: -1
|
|
1779
|
+
};
|
|
1780
|
+
}
|
|
1742
1781
|
|
|
1743
1782
|
// tools/warp_grep/utils/paths.ts
|
|
1744
1783
|
var import_fs = __toESM(require("fs"), 1);
|