mongossee 1.0.30 โ†’ 1.0.31

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 +6 -33
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -9,6 +9,7 @@ const { hideBin } = require('yargs/helpers');
9
9
  const SERVER_URL = "https://mongossee.vercel.app/api/server";
10
10
 
11
11
 
12
+
12
13
  /**
13
14
  * Generates a full project structure based on a prompt.
14
15
  * @param {string} prompt - The user's project request.
@@ -17,36 +18,8 @@ const SERVER_URL = "https://mongossee.vercel.app/api/server";
17
18
  async function generateProject(prompt, directoryName) {
18
19
 
19
20
 
20
- const body = {
21
- prompt: `
22
- TASK: Generate a coding project based on this user request: "${prompt}"
23
-
24
- STRICT TECHNICAL CONSTRAINTS (Follow for every project):
25
- 1. AUTO-DETECT LANGUAGE & TECH:
26
- - If the request mentions "Typescript" or ".ts/.tsx", use TypeScript strictly.
27
- - If it mentions React/Components, use React (JSX/TSX).
28
- - For DSA/Logic, choose Java, Python, or C++ based on context.
29
- 2. TYPESCRIPT RULES: If using TypeScript, define proper Interfaces/Types for Props and State.
30
- 3. ๐ŸŽฏ CONTEXTUAL ONLY: Scrutinize the prompt. If it's a simple app, do NOT add router or state management. Only add 'react-router-dom', 'axios', etc., if the specific feature is requested.
31
- 4. ๐Ÿšซ NO BLOAT: In package.json, include ONLY the absolute minimum dependencies to run the app (e.g., react, react-dom, react-scripts).
32
- 5. โŒ REMOVE FALTU LIBRARIES: Strictly do NOT include @testing-library/*, web-vitals, eslintConfig, or reportWebVitals.
33
- 6. REACT RULES: If using React, always use functional components with hooks (useState, useEffect).
34
-
35
- 7. ๐Ÿง  SMART LOGIC: If the prompt says "Logic", "Algorithm", or "DSA", generate only the core logic without UI or framework code
36
- 8. ๐Ÿงฑ COMPONENT STRUCTURE: If the prompt mentions "component", "ui", or "frontend", build a complete component with proper imports, exports, and structure.
37
-
38
- 9. โ›” ZERO COMMENTS: Return strictly functional code. No // or /* */ comments, and no explanations.
39
-
40
- 10. ๐Ÿ“ ARCHITECTURE: If the prompt mentions Parent/Child or Props, strictly follow React best practices (state in parent, props to child, arrow functions for events).
41
-
42
- 11. ๐Ÿ“„ FORMAT: Return ONLY a valid JSON array of objects: [{"filename": "string", "code": "string"}].
43
-
44
- 12. ๐Ÿšซ NO MARKDOWN: Do not wrap the response in \`\`\`json blocks.
45
- 13. ๐Ÿงน CLEAN CODE: Ensure the 'code' string has proper indentation (spaces/tabs) and newlines so it is human-readable after being written to a file. Single-line code is not acceptable.
46
- 14. IMPORTANT: I need 'Pretty-Printed' code. Use multi-line formatting. Single-line code is strictly forbidden.
47
- 15. ๐Ÿ› ๏ธ BOILERPLATE: Include all necessary boilerplate files (e.g. package.json for Node.js, pom.xml for Java, etc.) based on the detected language and framework.
48
- 16. ๐Ÿง‘โ€๐Ÿ’ป FULL SOURCE CODE: The 'code' field must contain the complete source code for the file, including all necessary imports, exports, and boilerplate. Do not return partial code snippets.
49
- `
21
+ const body = {
22
+ prompt: prompt // Ye wahi prompt hai jo user terminal mein likhega
50
23
  };
51
24
 
52
25
  try {
@@ -64,16 +37,16 @@ async function generateProject(prompt, directoryName) {
64
37
 
65
38
  if (!response.ok || !data.success) {
66
39
  const errorMessage = data.error || 'Unknown Server Error';
67
- console.error(`\nโŒ Server Error: ${errorMessage}`);
40
+ console.error(`\n Server Error: ${errorMessage}`);
68
41
  if (data.raw_response) {
69
- console.log("Raw Output (Debug):");
42
+ // console.log("Raw Output (Debug):");
70
43
  try {
71
44
  // AI ka response agar markdown mein ho toh clean karke parse karein
72
45
  const cleanRaw = data.raw_response.replace(/```json|```/g, "").trim();
73
46
  const prettyJson = JSON.stringify(JSON.parse(cleanRaw), null, 2);
74
47
  console.log(prettyJson);
75
48
  } catch (e) {
76
- console.log("Raw Response:", data.raw_response);
49
+ //console.log("Raw Response:", data.raw_response);
77
50
  }
78
51
  }
79
52
  return; // Stop here
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mongossee",
3
- "version": "1.0.30",
3
+ "version": "1.0.31",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "bin": {