cartographer-ai 1.0.12 → 1.0.14
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/package.json +1 -1
- package/src/cartographer.js +10 -6
package/package.json
CHANGED
package/src/cartographer.js
CHANGED
|
@@ -90,18 +90,22 @@ export class Cartographer {
|
|
|
90
90
|
},
|
|
91
91
|
});
|
|
92
92
|
} catch (error) {
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
93
|
+
if (error?.response?.data?.error) {
|
|
94
|
+
const errorMessage = `\x1b[31m${
|
|
95
|
+
error?.response?.data?.error ?? "Unexpected error occured"
|
|
96
|
+
}\x1b[0m`;
|
|
96
97
|
|
|
97
|
-
|
|
98
|
-
|
|
98
|
+
const err = new Error(errorMessage);
|
|
99
|
+
err.stack = "";
|
|
99
100
|
|
|
100
|
-
|
|
101
|
+
throw err;
|
|
102
|
+
}
|
|
101
103
|
}
|
|
102
104
|
}
|
|
103
105
|
|
|
104
106
|
#parseFile(content, modifiedFiles, filePath, gitRoot) {
|
|
107
|
+
if (!content || typeof content !== "string") return;
|
|
108
|
+
|
|
105
109
|
const match = content.match(regex);
|
|
106
110
|
if (!match) return;
|
|
107
111
|
|