brave-real-browser 1.5.99 → 1.5.101

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"
@@ -39,9 +39,18 @@ jobs:
39
39
  node-version: '18'
40
40
  registry-url: 'https://registry.npmjs.org'
41
41
 
42
- - name: Install Dependencies
43
- run: npm ci
44
-
42
+ - name: Update Dependencies to Latest
43
+ run: |
44
+ echo "📦 Updating all dependencies to latest versions..."
45
+
46
+ # Install latest versions of all dependencies
47
+ npm install brave-real-launcher@latest brave-real-puppeteer-core@latest ghost-cursor@latest puppeteer-extra@latest tree-kill@latest xvfb@latest
48
+
49
+ echo "✅ All dependencies updated to latest versions"
50
+ echo ""
51
+ echo "📋 Installed versions:"
52
+ npm list --depth=0
53
+
45
54
  - name: Run Tests
46
55
  run: |
47
56
  echo "⚠️ Skipping tests due to brave-real-launcher module issues"
@@ -62,14 +71,30 @@ jobs:
62
71
  npm version patch --no-git-tag-version
63
72
  NEW_VERSION=$(node -p "require('./package.json').version")
64
73
 
65
- echo "old_version=$OLD_VERSION" >> $GITHUB_OUTPUT
66
- echo "new_version=$NEW_VERSION" >> $GITHUB_OUTPUT
74
+ # Use GITHUB_OUTPUT instead of deprecated set-output
75
+ echo "old_version=$OLD_VERSION" >> "$GITHUB_OUTPUT"
76
+ echo "new_version=$NEW_VERSION" >> "$GITHUB_OUTPUT"
67
77
 
68
- npm install --package-lock-only
78
+ # Check if dependencies were updated
79
+ if git diff --quiet package.json package-lock.json; then
80
+ echo "📌 No dependency updates needed"
81
+ COMMIT_MSG="Auto increment v$OLD_VERSION -> v$NEW_VERSION [skip ci]"
82
+ else
83
+ echo "📦 Dependencies updated, including in commit"
84
+ COMMIT_MSG="Auto increment v$OLD_VERSION -> v$NEW_VERSION with latest dependencies [skip ci]"
85
+ fi
69
86
 
70
87
  git add package.json package-lock.json
71
- git commit -m "Auto increment v$OLD_VERSION -> v$NEW_VERSION [skip ci]"
72
- git tag "v$NEW_VERSION"
88
+ git commit -m "$COMMIT_MSG"
89
+
90
+ # Check if tag already exists
91
+ if git rev-parse "v$NEW_VERSION" >/dev/null 2>&1; then
92
+ echo "⚠️ Tag v$NEW_VERSION already exists, skipping tag creation"
93
+ echo "skip_release=true" >> "$GITHUB_OUTPUT"
94
+ else
95
+ git tag "v$NEW_VERSION"
96
+ echo "skip_release=false" >> "$GITHUB_OUTPUT"
97
+ fi
73
98
 
74
99
  - name: Push Changes
75
100
  run: |
@@ -78,42 +103,72 @@ jobs:
78
103
  env:
79
104
  GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
80
105
 
106
+ - name: Check if Version Already Published
107
+ id: npm_check
108
+ run: |
109
+ PACKAGE_VERSION="${{ steps.version.outputs.new_version }}"
110
+
111
+ if npm view "brave-real-browser@$PACKAGE_VERSION" version 2>/dev/null; then
112
+ echo "⚠️ Version $PACKAGE_VERSION already published on npm, skipping"
113
+ echo "skip_publish=true" >> "$GITHUB_OUTPUT"
114
+ else
115
+ echo "✅ Version $PACKAGE_VERSION not found on npm, proceeding"
116
+ echo "skip_publish=false" >> "$GITHUB_OUTPUT"
117
+ fi
118
+
81
119
  - name: Publish to NPM
82
120
  if: |
83
- github.event_name == 'push' ||
84
- (github.event_name == 'workflow_dispatch' && github.event.inputs.publish == 'true')
121
+ steps.npm_check.outputs.skip_publish != 'true' &&
122
+ (
123
+ github.event_name == 'push' ||
124
+ (github.event_name == 'workflow_dispatch' && github.event.inputs.publish == 'true')
125
+ )
85
126
  run: npm publish --access public
86
127
  env:
87
128
  NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
88
129
 
89
130
  - name: Create Release
90
- if: success()
91
- uses: actions/create-release@v1
131
+ if: success() && steps.version.outputs.skip_release != 'true'
132
+ run: |
133
+ TAG_NAME="v${{ steps.version.outputs.new_version }}"
134
+ NEW_VERSION="${{ steps.version.outputs.new_version }}"
135
+ OLD_VERSION="${{ steps.version.outputs.old_version }}"
136
+
137
+ # Check if release already exists
138
+ if gh release view "$TAG_NAME" >/dev/null 2>&1; then
139
+ echo "⚠️ Release $TAG_NAME already exists, skipping"
140
+ exit 0
141
+ fi
142
+
143
+ # Create release body
144
+ cat > release_body.md << EOF
145
+ ## Version $NEW_VERSION
146
+
147
+ Auto-incremented from $OLD_VERSION to $NEW_VERSION
148
+
149
+ ### Installation
150
+ \`\`\`bash
151
+ npm install brave-real-browser@$NEW_VERSION
152
+ \`\`\`
153
+
154
+ ### Usage
155
+ \`\`\`javascript
156
+ const { connect } = require('brave-real-browser');
157
+ const { browser, page } = await connect({
158
+ headless: false,
159
+ turnstile: true
160
+ });
161
+ \`\`\`
162
+ EOF
163
+
164
+ # Create GitHub release using gh CLI
165
+ gh release create "$TAG_NAME" \
166
+ --title "v$NEW_VERSION" \
167
+ --notes-file release_body.md
168
+
169
+ echo "✅ Created GitHub release $TAG_NAME"
92
170
  env:
93
171
  GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
94
- with:
95
- tag_name: v${{ steps.version.outputs.new_version }}
96
- release_name: v${{ steps.version.outputs.new_version }}
97
- body: |
98
- ## Version ${{ steps.version.outputs.new_version }}
99
-
100
- Auto-incremented from ${{ steps.version.outputs.old_version }} to ${{ steps.version.outputs.new_version }}
101
-
102
- ### Installation
103
- ```bash
104
- npm install brave-real-browser@${{ steps.version.outputs.new_version }}
105
- ```
106
-
107
- ### Usage
108
- ```javascript
109
- const { connect } = require('brave-real-browser');
110
- const { browser, page } = await connect({
111
- headless: false,
112
- turnstile: true
113
- });
114
- ```
115
- draft: false
116
- prerelease: false
117
172
 
118
173
  - name: Summary
119
174
  if: always()
@@ -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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "brave-real-browser",
3
- "version": "1.5.99",
3
+ "version": "1.5.101",
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",
@@ -14,7 +14,12 @@
14
14
  "typings": "typings.d.ts",
15
15
  "scripts": {
16
16
  "esm_test": "node ./test/esm/test.js",
17
- "cjs_test": "node ./test/cjs/test.js"
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",
19
+ "preinstall": "echo \"🔍 Checking for dependency updates...\"",
20
+ "postinstall": "echo \"✅ Installation complete! Run 'npm run update-deps' to update to latest versions\"",
21
+ "check-updates": "npm outdated || true",
22
+ "upgrade-all": "npm run update-deps && echo \"📦 All dependencies updated to latest versions!\""
18
23
  },
19
24
  "keywords": [
20
25
  "cf-bypass",
@@ -38,8 +43,8 @@
38
43
  "author": "zfc-software",
39
44
  "license": "ISC",
40
45
  "dependencies": {
41
- "brave-real-launcher": "latest",
42
- "brave-real-puppeteer-core": "latest",
46
+ "brave-real-launcher": "^1.2.15",
47
+ "brave-real-puppeteer-core": "^24.23.0-patch.1",
43
48
  "ghost-cursor": "^1.4.1",
44
49
  "puppeteer-extra": "^3.3.6",
45
50
  "tree-kill": "^1.2.2",
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
+ }