mongossee 1.0.22 → 1.0.24

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.
Files changed (2) hide show
  1. package/index.js +12 -4
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -19,8 +19,8 @@ async function generateProject(prompt, directoryName) {
19
19
 
20
20
 
21
21
  const body = {
22
- prompt: prompt + " . IMPORTANT: Return strictly code only. Do not include any comments, docstrings, or explanations inside the code files."
23
- };
22
+ prompt: prompt + " . IMPORTANT: Return strictly functional code only. ⛔ NO COMMENTS: Do not include any comments (//, /* */, #, or docstrings) or explanations inside the code files. Ensure the 'code' field contains proper indentation and newlines (\\n) so it's readable. Do not wrap in markdown code blocks."
23
+ };
24
24
 
25
25
  try {
26
26
  console.log(`Code Running in Expresss`);
@@ -39,7 +39,15 @@ async function generateProject(prompt, directoryName) {
39
39
  const errorMessage = data.error || 'Unknown Server Error';
40
40
  console.error(`\n❌ Server Error: ${errorMessage}`);
41
41
  if (data.raw_response) {
42
- console.log("Raw Output (Debug):", data.raw_response);
42
+ console.log("Raw Output (Debug):");
43
+ try {
44
+ // AI ka response agar markdown mein ho toh clean karke parse karein
45
+ const cleanRaw = data.raw_response.replace(/```json|```/g, "").trim();
46
+ const prettyJson = JSON.stringify(JSON.parse(cleanRaw), null, 2);
47
+ console.log(prettyJson);
48
+ } catch (e) {
49
+ console.log("Raw Response:", data.raw_response);
50
+ }
43
51
  }
44
52
  return; // Stop here
45
53
  }
@@ -74,7 +82,7 @@ async function generateProject(prompt, directoryName) {
74
82
  }
75
83
 
76
84
  const hasPackageJson = files.some(file => file.filename === 'package.json');
77
-
85
+
78
86
 
79
87
  if (hasPackageJson) {
80
88
  console.log(`📦 package.json detected. Installing dependencies...`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mongossee",
3
- "version": "1.0.22",
3
+ "version": "1.0.24",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "bin": {