mongossee 1.0.5 → 1.0.7

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 -10
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -1,26 +1,28 @@
1
1
  #!/usr/bin/env node
2
2
 
3
+ const fs = require('fs');
3
4
  const path = require('path');
4
- // 👇 Ye nayi line .env file ko sahi jagah (jaha script hai waha) dhoondhegi
5
- require('dotenv').config({ path: path.join(__dirname, '.env') });
6
-
7
- const fs = require('fs'); // Node.js File System
8
- //const path = require('path'); // Node.js Path module
5
+ const os = require('os'); // System user info ke liye
9
6
  const yargs = require('yargs/yargs');
10
7
  const { hideBin } = require('yargs/helpers');
11
8
 
12
- // ⚠️ Paste your official Google Gemini API key here.
13
- //const API_KEY = "AIzaSyARf-2uyW5cmwm8tJMBdcbLGIqPWcBZIJQ";
9
+ // 👇 CHANGE 1: Ab hum key ko User ke Home folder mein dhoondhenge
10
+ // Windows par path hoga: C:\Users\rajga\.javix-env
11
+ const envPath = path.join(os.homedir(), '.javix-env');
12
+ require('dotenv').config({ path: envPath });
14
13
 
15
- // 2. Ab key direct nahi, balki environment variable se aayegi
14
+ // 👇 CHANGE 2: Key check karein
16
15
  const API_KEY = process.env.GEMINI_API_KEY;
17
16
 
18
- // Check karein ki key mili ya nahi
19
17
  if (!API_KEY) {
20
- console.error("ERROR KEY");
18
+ console.error("ERROR: API Key nahi mili!");
19
+ console.error(`Please create a file at: ${envPath}`);
20
+ console.error("And add this line inside it: GEMINI_API_KEY=your_key_here");
21
21
  process.exit(1);
22
22
  }
23
23
 
24
+ // ... baaki ka code waisa hi rahega (async function generateProject...)
25
+
24
26
 
25
27
  /**
26
28
  * Generates a full project structure based on a prompt.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mongossee",
3
- "version": "1.0.5",
3
+ "version": "1.0.7",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "bin": {