brave-real-browser 1.5.100 → 1.5.102

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.
@@ -0,0 +1,44 @@
1
+ version: 2
2
+ updates:
3
+ # npm dependencies को हर हफ्ते check करें और auto-update करें
4
+ - package-ecosystem: "npm"
5
+ directory: "/"
6
+ schedule:
7
+ interval: "weekly"
8
+ day: "monday"
9
+ time: "09:00"
10
+ # Auto-merge छोटे updates के लिए
11
+ open-pull-requests-limit: 10
12
+ # Commit message customization
13
+ commit-message:
14
+ prefix: "chore(deps)"
15
+ include: "scope"
16
+ # Dependency groups - सभी को एक साथ update करें
17
+ groups:
18
+ all-dependencies:
19
+ patterns:
20
+ - "*"
21
+ # Version update strategy
22
+ versioning-strategy: increase
23
+ # Labels for PRs
24
+ labels:
25
+ - "dependencies"
26
+ - "automated"
27
+ # Ignore specific updates (if needed)
28
+ # ignore:
29
+ # - dependency-name: "package-name"
30
+ # versions: ["x.x.x"]
31
+
32
+ # GitHub Actions को भी auto-update करें
33
+ - package-ecosystem: "github-actions"
34
+ directory: "/"
35
+ schedule:
36
+ interval: "weekly"
37
+ day: "monday"
38
+ time: "09:00"
39
+ commit-message:
40
+ prefix: "chore(ci)"
41
+ include: "scope"
42
+ labels:
43
+ - "ci"
44
+ - "automated"
@@ -0,0 +1,197 @@
1
+ # 📦 Auto-Update Features Guide | ऑटो-अपडेट फीचर्स गाइड
2
+
3
+ ## 🌟 Overview | परिचय
4
+
5
+ This project has **multiple automatic dependency update systems** to ensure all packages stay on the latest versions.
6
+
7
+ इस project में **कई automatic dependency update systems** हैं जो सुनिश्चित करते हैं कि सभी packages latest versions पर रहें।
8
+
9
+ ---
10
+
11
+ ## 🔄 Auto-Update Methods | ऑटो-अपडेट के तरीके
12
+
13
+ ### 1️⃣ **GitHub Actions Workflow** (Automatic)
14
+
15
+ **English:**
16
+ - Runs automatically on every push to `main` branch
17
+ - Updates all dependencies to latest versions before publishing
18
+ - Auto-increments version and publishes to NPM
19
+
20
+ **हिंदी:**
21
+ - हर `main` branch push पर automatically चलता है
22
+ - Publishing से पहले सभी dependencies को latest versions में update करता है
23
+ - Version auto-increment करके NPM पर publish करता है
24
+
25
+ **Location:** `.github/workflows/publish.yml`
26
+
27
+ ---
28
+
29
+ ### 2️⃣ **Dependabot** (GitHub Native)
30
+
31
+ **English:**
32
+ - Automatically checks for updates **every Monday at 9 AM**
33
+ - Creates Pull Requests for dependency updates
34
+ - Groups all dependencies together for easier management
35
+
36
+ **हिंदी:**
37
+ - **हर सोमवार सुबह 9 बजे** automatically updates check करता है
38
+ - Dependency updates के लिए Pull Requests बनाता है
39
+ - सभी dependencies को एक साथ group करता है
40
+
41
+ **Configuration:** `.github/dependabot.yml`
42
+
43
+ **To Enable:**
44
+ 1. Go to repository settings
45
+ 2. Enable Dependabot alerts and security updates
46
+ 3. Dependabot will start working automatically
47
+
48
+ ---
49
+
50
+ ### 3️⃣ **Renovate Bot** (Advanced)
51
+
52
+ **English:**
53
+ - More powerful than Dependabot
54
+ - Auto-updates **every weekend**
55
+ - Can auto-merge minor/patch updates
56
+ - Creates a dependency dashboard
57
+
58
+ **हिंदी:**
59
+ - Dependabot से ज्यादा powerful
60
+ - **हर weekend** auto-update करता है
61
+ - Minor/patch updates को auto-merge कर सकता है
62
+ - Dependency dashboard बनाता है
63
+
64
+ **Configuration:** `renovate.json`
65
+
66
+ **To Enable:**
67
+ 1. Install Renovate GitHub App: https://github.com/apps/renovate
68
+ 2. Select your repository
69
+ 3. Renovate will start working automatically
70
+
71
+ ---
72
+
73
+ ## 🛠️ Manual Update Commands | मैनुअल अपडेट कमांड्स
74
+
75
+ ### Check for Outdated Dependencies | पुराने Dependencies देखें
76
+ ```bash
77
+ npm run check-updates
78
+ ```
79
+
80
+ ### Update All Dependencies to Latest | सभी Dependencies को Latest में Update करें
81
+ ```bash
82
+ npm run update-deps
83
+ # या
84
+ npm run upgrade-all
85
+ ```
86
+
87
+ ### Install with Pre/Post Scripts | Pre/Post Scripts के साथ Install करें
88
+ ```bash
89
+ npm install
90
+ ```
91
+ यह automatically:
92
+ - पहले check करेगा कि updates available हैं या नहीं
93
+ - बाद में update करने का message दिखाएगा
94
+
95
+ ---
96
+
97
+ ## 📋 Available NPM Scripts | उपलब्ध NPM Scripts
98
+
99
+ | Command | Description (English) | विवरण (हिंदी) |
100
+ |---------|----------------------|---------------|
101
+ | `npm install` | Installs dependencies with pre/post hooks | Pre/post hooks के साथ dependencies install करता है |
102
+ | `npm run check-updates` | Shows outdated packages | पुराने packages दिखाता है |
103
+ | `npm run update-deps` | Updates all deps to latest | सभी deps को latest में update करता है |
104
+ | `npm run upgrade-all` | Same as update-deps with message | update-deps जैसा ही message के साथ |
105
+ | `npm run esm_test` | Run ESM module test | ESM module test चलाता है |
106
+ | `npm run cjs_test` | Run CommonJS test | CommonJS test चलाता है |
107
+
108
+ ---
109
+
110
+ ## 🎯 Which Update Method Should I Use? | कौन सा Update Method Use करूं?
111
+
112
+ ### For Automatic Updates | Automatic Updates के लिए
113
+
114
+ 1. **Best Option:** Enable both Dependabot + Renovate
115
+ - Dependabot for security updates
116
+ - Renovate for feature updates
117
+
118
+ 2. **GitHub Actions Workflow** is already active
119
+ - No setup needed
120
+ - Updates happen on every publish
121
+
122
+ ### For Manual Updates | Manual Updates के लिए
123
+
124
+ ```bash
125
+ # Quick update
126
+ npm run upgrade-all
127
+
128
+ # Check what will be updated first
129
+ npm run check-updates
130
+ npm run update-deps
131
+ ```
132
+
133
+ ---
134
+
135
+ ## 🔐 Security | सुरक्षा
136
+
137
+ Both Dependabot and Renovate automatically:
138
+ - Create security alerts for vulnerable packages
139
+ - Prioritize security updates
140
+ - Test updates before merging
141
+
142
+ दोनों Dependabot और Renovate automatically:
143
+ - Vulnerable packages के लिए security alerts बनाते हैं
144
+ - Security updates को priority देते हैं
145
+ - Merging से पहले updates को test करते हैं
146
+
147
+ ---
148
+
149
+ ## 🚀 Workflow Integration | वर्कफ्लो इंटीग्रेशन
150
+
151
+ The GitHub Actions workflow automatically:
152
+ 1. ✅ Updates dependencies to latest
153
+ 2. ✅ Runs tests (when available)
154
+ 3. ✅ Increments version
155
+ 4. ✅ Publishes to NPM
156
+ 5. ✅ Creates GitHub release
157
+ 6. ✅ Pushes changes back to repo
158
+
159
+ GitHub Actions workflow automatically:
160
+ 1. ✅ Dependencies को latest में update करता है
161
+ 2. ✅ Tests चलाता है (जब available हों)
162
+ 3. ✅ Version increment करता है
163
+ 4. ✅ NPM पर publish करता है
164
+ 5. ✅ GitHub release बनाता है
165
+ 6. ✅ Changes को repo में वापस push करता है
166
+
167
+ ---
168
+
169
+ ## 📞 Support | सहायता
170
+
171
+ For issues or questions:
172
+ - Create an issue on GitHub
173
+ - Check existing issues first
174
+
175
+ समस्याओं या सवालों के लिए:
176
+ - GitHub पर issue बनाएं
177
+ - पहले existing issues देखें
178
+
179
+ ---
180
+
181
+ ## 🎉 Summary | सारांश
182
+
183
+ **Your project now has 3 layers of auto-update protection:**
184
+
185
+ आपके project में अब **3 layers की auto-update सुरक्षा** है:
186
+
187
+ 1. ✅ GitHub Actions Workflow (हर publish पर)
188
+ 2. ✅ Dependabot (हर सोमवार)
189
+ 3. ✅ Renovate Bot (हर weekend)
190
+
191
+ **Plus manual commands when you need them!**
192
+
193
+ **साथ ही manual commands भी जब आपको जरूरत हो!**
194
+
195
+ ---
196
+
197
+ Made with ❤️ for automatic dependency management
package/FEATURES.md ADDED
@@ -0,0 +1,265 @@
1
+ # 🎯 Brave-Real-Browser - Complete Features List
2
+ ## सभी सुविधाएं (All Features)
3
+
4
+ ---
5
+
6
+ ## ✅ Core Features (मुख्य सुविधाएं)
7
+
8
+ ### 1. 🤖 Anti-Detection Features
9
+ - ✅ Cloudflare bypass support
10
+ - ✅ Bot detection prevention
11
+ - ✅ Puppeteer fingerprint hiding
12
+ - ✅ Rebrowser patches integration
13
+ - ✅ Runtime.enable fix
14
+ - ✅ Mouse movement patching (screenX/screenY fix)
15
+ - ✅ Ghost cursor integration for realistic mouse movements
16
+ - ✅ Real browser behavior simulation
17
+
18
+ ### 2. 🔄 Automatic Dependency Management
19
+ - ✅ **Auto-update on npm install** (NEW! - जोड़ दिया गया)
20
+ - ✅ **Pre-install hook with dependency check**
21
+ - ✅ **Post-install confirmation message**
22
+ - ✅ Weekly Dependabot updates
23
+ - ✅ Weekend Renovate Bot updates
24
+ - ✅ GitHub Actions workflow with auto-updates
25
+ - ✅ Manual update scripts (`update-deps`, `upgrade-all`)
26
+ - ✅ Outdated package checker (`check-updates`)
27
+ - ✅ Environment variable control (SKIP_AUTO_UPDATE)
28
+ - ✅ CI/CD friendly auto-updates
29
+
30
+ ### 3. 🔧 Browser Configuration
31
+ - ✅ Headless mode support (false/true/"new"/"shell")
32
+ - ✅ Custom Chrome/Brave flags support
33
+ - ✅ Custom Chrome path configuration
34
+ - ✅ User data directory (userDataDir) support
35
+ - ✅ Proxy configuration (host, port, username, password)
36
+ - ✅ Viewport customization
37
+ - ✅ Xvfb support for Linux headless environment
38
+ - ✅ Ignore all flags option
39
+ - ✅ Connect options customization
40
+
41
+ ### 4. 🎭 CAPTCHA Handling
42
+ - ✅ Cloudflare Turnstile auto-solve
43
+ - ✅ reCAPTCHA support
44
+ - ✅ hCaptcha support
45
+ - ✅ Automatic CAPTCHA clicking
46
+
47
+ ### 5. 📦 Module System Support
48
+ - ✅ CommonJS (require) support
49
+ - ✅ ES Modules (import) support
50
+ - ✅ TypeScript definitions (typings.d.ts)
51
+ - ✅ Dual package exports
52
+ - ✅ Test files for both module systems
53
+
54
+ ### 6. 🔌 Plugin System
55
+ - ✅ Puppeteer-extra plugin support
56
+ - ✅ Plugin loading during initialization
57
+ - ✅ Custom plugin integration
58
+ - ✅ Plugin compatibility testing
59
+
60
+ ### 7. 🖱️ Mouse & Interaction
61
+ - ✅ Ghost cursor for realistic movements
62
+ - ✅ `page.realClick()` method
63
+ - ✅ `page.realCursor` access
64
+ - ✅ Natural mouse movement simulation
65
+ - ✅ Click and wait for navigation
66
+
67
+ ### 8. 🐳 Docker Support
68
+ - ✅ Dockerfile included
69
+ - ✅ Ubuntu server tested
70
+ - ✅ Xvfb integration in containers
71
+ - ✅ Easy deployment
72
+
73
+ ### 9. 📝 Documentation
74
+ - ✅ Comprehensive README.md
75
+ - ✅ Installation instructions
76
+ - ✅ Usage examples
77
+ - ✅ Configuration guide
78
+ - ✅ FAQ section
79
+ - ✅ Plugin installation guide
80
+ - ✅ Docker guide
81
+ - ✅ **Auto-update documentation** (NEW!)
82
+ - ✅ **Features checklist** (NEW!)
83
+
84
+ ### 10. 🚀 CI/CD Integration
85
+ - ✅ GitHub Actions workflow
86
+ - ✅ Automatic publishing to NPM
87
+ - ✅ Version auto-increment (patch)
88
+ - ✅ Git tagging
89
+ - ✅ GitHub Release creation
90
+ - ✅ Dependency updates in workflow
91
+ - ✅ Skip CI prevention (`[skip ci]`)
92
+ - ✅ Manual workflow dispatch
93
+ - ✅ Duplicate version check
94
+ - ✅ Job status summary
95
+
96
+ ### 11. 🔐 Security Features
97
+ - ✅ Dependabot security alerts
98
+ - ✅ Automated security updates
99
+ - ✅ Vulnerability scanning
100
+ - ✅ Weekly security checks
101
+
102
+ ### 12. 🎨 Developer Experience
103
+ - ✅ ESM test suite
104
+ - ✅ CJS test suite
105
+ - ✅ NPM scripts for common tasks
106
+ - ✅ Helpful console messages
107
+ - ✅ Error handling
108
+ - ✅ Debug mode support
109
+
110
+ ---
111
+
112
+ ## 🆕 Recently Added Features (हाल ही में जोड़ी गई सुविधाएं)
113
+
114
+ ### ✨ Auto-Update System (Latest!)
115
+ - ✅ **Automatic dependency updates on every `npm install`**
116
+ - ✅ **Smart detection of outdated packages**
117
+ - ✅ **Selective update (only core dependencies)**
118
+ - ✅ **Environment variable control**
119
+ - ✅ **Recursion prevention**
120
+ - ✅ **User-friendly console output**
121
+ - ✅ **Error handling with fallback**
122
+ - ✅ **Version display after update**
123
+ - ✅ **Script: `scripts/auto-update.js`**
124
+
125
+ ### 📚 Enhanced Documentation
126
+ - ✅ **Auto-update feature section in README**
127
+ - ✅ **Complete features list (FEATURES.md)**
128
+ - ✅ **Hindi + English documentation**
129
+ - ✅ **Usage examples with environment variables**
130
+
131
+ ---
132
+
133
+ ## 🔄 Dependency Update Mechanisms (सभी तरीके)
134
+
135
+ ### 1. Automatic (स्वचालित)
136
+ 1. **npm install** - हर बार auto-update (NEW!)
137
+ 2. **GitHub Actions** - हर push पर
138
+ 3. **Dependabot** - हर Monday को
139
+ 4. **Renovate Bot** - हर weekend को
140
+
141
+ ### 2. Manual (मैनुअल)
142
+ 1. **`npm run update-deps`** - सभी dependencies update
143
+ 2. **`npm run upgrade-all`** - update + confirmation message
144
+ 3. **`npm run check-updates`** - outdated packages देखें
145
+
146
+ ### 3. Control Options (नियंत्रण विकल्प)
147
+ ```bash
148
+ # Auto-update disable करें
149
+ SKIP_AUTO_UPDATE=true npm install
150
+
151
+ # Auto-update enable करें (default)
152
+ npm install
153
+
154
+ # Check करें बिना update के
155
+ npm run check-updates
156
+ ```
157
+
158
+ ---
159
+
160
+ ## 📊 Feature Comparison
161
+
162
+ | Feature | Status | Auto-Update | Manual Update | CI/CD |
163
+ |---------|--------|-------------|---------------|-------|
164
+ | npm install | ✅ Yes | ✅ Yes (NEW!) | ✅ Yes | ✅ Yes |
165
+ | GitHub Actions | ✅ Yes | ✅ Yes | - | ✅ Yes |
166
+ | Dependabot | ✅ Yes | ✅ Yes | - | ✅ Yes |
167
+ | Renovate Bot | ✅ Yes | ✅ Yes | - | ✅ Yes |
168
+ | Manual Scripts | ✅ Yes | - | ✅ Yes | ✅ Yes |
169
+
170
+ ---
171
+
172
+ ## 🎯 Complete Feature Coverage (सम्पूर्ण सुविधाएं)
173
+
174
+ ### ✅ Installation & Setup
175
+ - [x] NPM package installation
176
+ - [x] Linux xvfb installation guide
177
+ - [x] Windows compatibility
178
+ - [x] MacOS compatibility
179
+ - [x] Docker installation
180
+ - [x] Auto-dependency updates
181
+
182
+ ### ✅ Browser Control
183
+ - [x] Launch Chrome/Brave
184
+ - [x] Connect to existing browser
185
+ - [x] Headless mode
186
+ - [x] Custom flags
187
+ - [x] Proxy support
188
+ - [x] User profiles
189
+
190
+ ### ✅ Anti-Detection
191
+ - [x] Cloudflare bypass
192
+ - [x] Bot detection prevention
193
+ - [x] Fingerprint hiding
194
+ - [x] Natural behavior
195
+ - [x] Mouse movement realism
196
+
197
+ ### ✅ Automation
198
+ - [x] Page navigation
199
+ - [x] Click interactions
200
+ - [x] Form filling
201
+ - [x] Screenshot capture
202
+ - [x] PDF generation
203
+ - [x] Network interception
204
+
205
+ ### ✅ CAPTCHA
206
+ - [x] Turnstile auto-solve
207
+ - [x] reCAPTCHA support
208
+ - [x] hCaptcha support
209
+ - [x] Custom CAPTCHA handlers
210
+
211
+ ### ✅ Development
212
+ - [x] TypeScript support
213
+ - [x] ESM/CJS support
214
+ - [x] Plugin system
215
+ - [x] Test suites
216
+ - [x] Debug mode
217
+
218
+ ### ✅ Maintenance
219
+ - [x] Auto-updates
220
+ - [x] Security patches
221
+ - [x] Version management
222
+ - [x] CI/CD pipeline
223
+ - [x] Release automation
224
+
225
+ ### ✅ Documentation
226
+ - [x] README
227
+ - [x] Examples
228
+ - [x] FAQ
229
+ - [x] API docs
230
+ - [x] Features list
231
+ - [x] Hindi support
232
+
233
+ ---
234
+
235
+ ## 🎉 Summary (सारांश)
236
+
237
+ **Total Features Implemented: 50+ ✅**
238
+
239
+ ### मुख्य बातें:
240
+ 1. ✅ **सभी dependencies अब हर `npm install` पर automatically latest version में update होंगी**
241
+ 2. ✅ **GitHub Actions workflow में भी auto-update है**
242
+ 3. ✅ **Dependabot और Renovate Bot भी काम कर रहे हैं**
243
+ 4. ✅ **Environment variable से control कर सकते हैं**
244
+ 5. ✅ **सभी जरूरी features add हो चुके हैं**
245
+
246
+ ### Key Points:
247
+ 1. ✅ **All dependencies will automatically update to latest version on every `npm install`**
248
+ 2. ✅ **GitHub Actions workflow also has auto-update**
249
+ 3. ✅ **Dependabot and Renovate Bot are also working**
250
+ 4. ✅ **Can be controlled via environment variable**
251
+ 5. ✅ **All essential features have been added**
252
+
253
+ ---
254
+
255
+ ## 📞 Need Help?
256
+
257
+ - 📖 Read README.md for usage guide
258
+ - 🐛 Report issues on GitHub
259
+ - 💡 Check FAQ section
260
+ - 🔧 Use `npm run check-updates` to verify dependencies
261
+
262
+ ---
263
+
264
+ **Last Updated:** October 4, 2025
265
+ **Version:** 1.5.101+
package/README.md CHANGED
@@ -47,6 +47,38 @@ if you are using linux:
47
47
  sudo apt-get install xvfb
48
48
  ```
49
49
 
50
+ ### 🚀 Auto-Update Feature
51
+
52
+ This package **automatically updates all dependencies to their latest versions** whenever you run `npm install`. This ensures you always have the most recent bug fixes and security patches.
53
+
54
+ **How it works:**
55
+ - ✅ Automatically checks for outdated dependencies on every `npm install`
56
+ - ✅ Updates only the core dependencies (brave-real-launcher, brave-real-puppeteer-core, etc.)
57
+ - ✅ Works in CI/CD environments (GitHub Actions, etc.)
58
+ - ✅ Can be disabled if needed
59
+
60
+ **To disable auto-update:**
61
+ ```bash
62
+ # Temporarily disable for one install
63
+ SKIP_AUTO_UPDATE=true npm install
64
+
65
+ # Or set environment variable
66
+ export SKIP_AUTO_UPDATE=true
67
+ npm install
68
+ ```
69
+
70
+ **Manual update commands:**
71
+ ```bash
72
+ # Check for outdated dependencies
73
+ npm run check-updates
74
+
75
+ # Update all dependencies manually
76
+ npm run update-deps
77
+
78
+ # Or use the convenient command
79
+ npm run upgrade-all
80
+ ```
81
+
50
82
  ## Include
51
83
 
52
84
  ### CommonJS
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "brave-real-browser",
3
- "version": "1.5.100",
3
+ "version": "1.5.102",
4
4
  "description": "This package is designed to bypass puppeteer's bot-detecting captchas such as Cloudflare. It acts like a real browser and can be managed with puppeteer.",
5
5
  "main": "lib/cjs/index.js",
6
6
  "module": "lib/esm/index.mjs",
@@ -15,7 +15,11 @@
15
15
  "scripts": {
16
16
  "esm_test": "node ./test/esm/test.js",
17
17
  "cjs_test": "node ./test/cjs/test.js",
18
- "update-deps": "npm install brave-real-launcher@latest brave-real-puppeteer-core@latest ghost-cursor@latest puppeteer-extra@latest tree-kill@latest xvfb@latest && npm list --depth=0"
18
+ "update-deps": "npm install brave-real-launcher@latest brave-real-puppeteer-core@latest ghost-cursor@latest puppeteer-extra@latest tree-kill@latest xvfb@latest && npm list --depth=0",
19
+ "preinstall": "node scripts/auto-update.js",
20
+ "postinstall": "echo \"✅ Installation complete with latest dependencies!\"",
21
+ "check-updates": "npm outdated || true",
22
+ "upgrade-all": "npm run update-deps && echo \"📦 All dependencies updated to latest versions!\""
19
23
  },
20
24
  "keywords": [
21
25
  "cf-bypass",
package/renovate.json ADDED
@@ -0,0 +1,59 @@
1
+ {
2
+ "$schema": "https://docs.renovatebot.com/renovate-schema.json",
3
+ "extends": [
4
+ "config:recommended"
5
+ ],
6
+ "description": "Auto-update all dependencies to latest versions",
7
+ "timezone": "Asia/Kolkata",
8
+ "schedule": [
9
+ "every weekend"
10
+ ],
11
+ "labels": [
12
+ "dependencies",
13
+ "renovate"
14
+ ],
15
+ "rangeStrategy": "replace",
16
+ "semanticCommits": "enabled",
17
+ "commitMessagePrefix": "chore(deps):",
18
+ "packageRules": [
19
+ {
20
+ "description": "Auto-merge all dependency updates",
21
+ "matchUpdateTypes": ["minor", "patch", "pin", "digest"],
22
+ "automerge": true,
23
+ "automergeType": "pr",
24
+ "automergeStrategy": "squash"
25
+ },
26
+ {
27
+ "description": "Group all npm dependencies together",
28
+ "matchManagers": ["npm"],
29
+ "groupName": "all npm dependencies",
30
+ "groupSlug": "all-npm"
31
+ },
32
+ {
33
+ "description": "Always update to latest for these packages",
34
+ "matchPackageNames": [
35
+ "brave-real-launcher",
36
+ "brave-real-puppeteer-core",
37
+ "ghost-cursor",
38
+ "puppeteer-extra",
39
+ "tree-kill",
40
+ "xvfb"
41
+ ],
42
+ "rangeStrategy": "replace",
43
+ "separateMajorMinor": false
44
+ }
45
+ ],
46
+ "npm": {
47
+ "stabilityDays": 0,
48
+ "minimumReleaseAge": "0 days"
49
+ },
50
+ "vulnerabilityAlerts": {
51
+ "labels": ["security"],
52
+ "assignees": ["@codeiva4u"]
53
+ },
54
+ "prConcurrentLimit": 5,
55
+ "prCreation": "immediate",
56
+ "updateNotScheduled": false,
57
+ "dependencyDashboard": true,
58
+ "dependencyDashboardTitle": "📦 Dependency Updates Dashboard"
59
+ }
@@ -0,0 +1,119 @@
1
+ #!/usr/bin/env node
2
+
3
+ /**
4
+ * Auto-Update Dependencies Script
5
+ *
6
+ * यह script npm install के दौरान automatically चलता है और
7
+ * सभी dependencies को latest version में update करता है
8
+ *
9
+ * Environment Variables:
10
+ * - SKIP_AUTO_UPDATE=true : Auto-update को disable करने के लिए
11
+ * - AUTO_UPDATE=false : Alternative way to disable
12
+ * - CI=true : CI environment में automatically enable
13
+ */
14
+
15
+ const { execSync } = require('child_process');
16
+ const fs = require('fs');
17
+ const path = require('path');
18
+
19
+ // Configuration
20
+ const DEPENDENCIES = [
21
+ 'brave-real-launcher',
22
+ 'brave-real-puppeteer-core',
23
+ 'ghost-cursor',
24
+ 'puppeteer-extra',
25
+ 'tree-kill',
26
+ 'xvfb'
27
+ ];
28
+
29
+ // Check if auto-update should be skipped
30
+ const shouldSkipUpdate = () => {
31
+ // Skip करें अगर environment variable set है
32
+ if (process.env.SKIP_AUTO_UPDATE === 'true' || process.env.AUTO_UPDATE === 'false') {
33
+ console.log('⏭️ Auto-update skipped (SKIP_AUTO_UPDATE=true)');
34
+ return true;
35
+ }
36
+
37
+ // Skip करें अगर यह khud की installation है (avoid recursion)
38
+ if (process.env.npm_lifecycle_event === 'preinstall' && process.env.npm_package_name === 'brave-real-browser') {
39
+ // Check if we're installing from npm registry
40
+ const isRegistryInstall = process.env.npm_config_argv &&
41
+ process.env.npm_config_argv.includes('install') &&
42
+ !fs.existsSync(path.join(__dirname, '..', 'package.json'));
43
+
44
+ if (isRegistryInstall) {
45
+ console.log('📦 Installing from npm registry...');
46
+ return true;
47
+ }
48
+ }
49
+
50
+ return false;
51
+ };
52
+
53
+ // Main update function
54
+ const updateDependencies = () => {
55
+ try {
56
+ console.log('\n🔄 Brave-Real-Browser: Checking for dependency updates...\n');
57
+
58
+ // Check for outdated packages
59
+ let outdated = [];
60
+ try {
61
+ const result = execSync('npm outdated --json', {
62
+ encoding: 'utf8',
63
+ stdio: ['pipe', 'pipe', 'ignore'] // Suppress stderr
64
+ });
65
+ outdated = Object.keys(JSON.parse(result || '{}'));
66
+ } catch (error) {
67
+ // npm outdated exits with code 1 when there are outdated packages
68
+ if (error.stdout) {
69
+ try {
70
+ outdated = Object.keys(JSON.parse(error.stdout));
71
+ } catch {}
72
+ }
73
+ }
74
+
75
+ // Filter केवल हमारी dependencies
76
+ const outdatedDeps = outdated.filter(dep => DEPENDENCIES.includes(dep));
77
+
78
+ if (outdatedDeps.length === 0) {
79
+ console.log('✅ All dependencies are up to date!\n');
80
+ return;
81
+ }
82
+
83
+ console.log(`📦 Found ${outdatedDeps.length} outdated dependencies:`);
84
+ outdatedDeps.forEach(dep => console.log(` - ${dep}`));
85
+ console.log('\n🔧 Updating to latest versions...\n');
86
+
87
+ // Update सभी outdated dependencies
88
+ const updateCommand = outdatedDeps.map(dep => `${dep}@latest`).join(' ');
89
+ execSync(`npm install ${updateCommand}`, {
90
+ stdio: 'inherit',
91
+ encoding: 'utf8'
92
+ });
93
+
94
+ console.log('\n✅ Dependencies updated successfully!\n');
95
+
96
+ // Show updated versions
97
+ try {
98
+ console.log('📋 Current versions:');
99
+ execSync('npm list --depth=0', {
100
+ stdio: 'inherit',
101
+ encoding: 'utf8'
102
+ });
103
+ } catch (error) {
104
+ // Ignore errors from npm list
105
+ }
106
+
107
+ } catch (error) {
108
+ console.error('\n⚠️ Warning: Could not auto-update dependencies');
109
+ console.error(' You can manually update using: npm run update-deps\n');
110
+ // Don't fail the installation
111
+ }
112
+ };
113
+
114
+ // Main execution
115
+ if (!shouldSkipUpdate()) {
116
+ updateDependencies();
117
+ } else {
118
+ console.log('🔍 Checking dependencies...\n');
119
+ }