@coo-quack/calc-mcp 1.7.0 → 1.7.1
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 +3 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -74609,6 +74609,9 @@ function execute19(input) {
|
|
|
74609
74609
|
if (input.action === "replace" && !flags.includes("g")) {
|
|
74610
74610
|
flags = `g${flags}`;
|
|
74611
74611
|
}
|
|
74612
|
+
if (input.action === "matchAll" && !flags.includes("g")) {
|
|
74613
|
+
flags = `g${flags}`;
|
|
74614
|
+
}
|
|
74612
74615
|
const regex = new RegExp(input.pattern, flags);
|
|
74613
74616
|
switch (input.action) {
|
|
74614
74617
|
case "test": {
|
|
@@ -74627,9 +74630,6 @@ function execute19(input) {
|
|
|
74627
74630
|
});
|
|
74628
74631
|
}
|
|
74629
74632
|
case "matchAll": {
|
|
74630
|
-
if (!input.flags?.includes("g")) {
|
|
74631
|
-
throw new Error("matchAll requires the 'g' flag");
|
|
74632
|
-
}
|
|
74633
74633
|
const matches = withTimeout(() => [...input.text.matchAll(regex)]);
|
|
74634
74634
|
return JSON.stringify(matches.map((m) => ({
|
|
74635
74635
|
match: m[0],
|