mongossee 1.0.25 → 1.0.26

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 +4 -1
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -33,6 +33,7 @@ async function generateProject(prompt, directoryName) {
33
33
  7. 📁 ARCHITECTURE: If the prompt mentions Parent/Child or Props, strictly follow React best practices (state in parent, props to child, arrow functions for events).
34
34
  8. 📄 FORMAT: Return ONLY a valid JSON array of objects: [{"filename": "string", "code": "string"}].
35
35
  9. 🚫 NO MARKDOWN: Do not wrap the response in \`\`\`json blocks.
36
+ 10. IMPORTANT: I need 'Pretty-Printed' code. Use multi-line formatting. Single-line code is strictly forbidden.
36
37
  `
37
38
  };
38
39
 
@@ -90,8 +91,10 @@ async function generateProject(prompt, directoryName) {
90
91
  fs.mkdirSync(fileDir, { recursive: true });
91
92
  }
92
93
 
94
+ const formattedCode = file.code.replace(/\\n/g, '\n');
95
+
93
96
  // Write the code to the file
94
- fs.writeFileSync(filePath, file.code);
97
+ fs.writeFileSync(filePath, formattedCode);
95
98
  //console.log(`Created file: ${filePath}`);
96
99
  }
97
100
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mongossee",
3
- "version": "1.0.25",
3
+ "version": "1.0.26",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "bin": {