cdp-tunnel 2.5.1 → 2.5.2

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.
@@ -132,7 +132,9 @@ var SpecialHandler = (function() {
132
132
  function addTabToAutomationGroup(tabId, clientId) {
133
133
  Logger.info('[TabGroup] Starting addTabToAutomationGroup for tabId:', tabId, 'clientId:', clientId);
134
134
 
135
- muteTabIfNeeded(tabId);
135
+ setTimeout(function() {
136
+ muteTabIfNeeded(tabId);
137
+ }, 200);
136
138
 
137
139
  var groupClientId = clientId;
138
140
  if (!groupClientId) {
@@ -141,44 +143,46 @@ var SpecialHandler = (function() {
141
143
  }
142
144
  var baseName = CDPUtils.getGroupBaseName(groupClientId);
143
145
 
144
- Logger.info('[TabGroup] Executing group operation for:', baseName);
145
-
146
- chrome.tabGroups.query({}, function(allGroups) {
147
- var existing = CDPUtils.findGroupByName(allGroups, baseName);
148
- if (existing) {
149
- chrome.tabs.group({ tabIds: tabId, groupId: existing.id }, function(result) {
150
- if (chrome.runtime.lastError) {
151
- Logger.error('[TabGroup] Failed to add tab to group:', chrome.runtime.lastError.message);
152
- } else {
153
- State.setGroupIdForClient(groupClientId, existing.id);
154
- updateTabGroupName(groupClientId);
155
- Logger.info('[TabGroup] Tab', tabId, 'added to existing group:', existing.id);
156
- }
157
- });
158
- } else {
159
- chrome.tabs.group({ tabIds: tabId }, function(groupId) {
160
- if (chrome.runtime.lastError) {
161
- Logger.error('[TabGroup] Failed to create group:', chrome.runtime.lastError.message);
162
- return;
163
- }
164
- if (groupId) {
165
- chrome.tabGroups.update(groupId, {
166
- title: baseName,
167
- color: CDPUtils.getGroupColorForClient(groupClientId),
168
- collapsed: true
169
- }, function() {
170
- if (chrome.runtime.lastError) {
171
- Logger.error('[TabGroup] Failed to update group:', chrome.runtime.lastError.message);
172
- } else {
173
- State.setGroupIdForClient(groupClientId, groupId);
174
- updateTabGroupName(groupClientId);
175
- Logger.info('[TabGroup] Created new group:', groupId, 'with tab:', tabId);
176
- }
177
- });
178
- }
179
- });
180
- }
181
- });
146
+ setTimeout(function() {
147
+ Logger.info('[TabGroup] Executing group operation for:', baseName);
148
+
149
+ chrome.tabGroups.query({}, function(allGroups) {
150
+ var existing = CDPUtils.findGroupByName(allGroups, baseName);
151
+ if (existing) {
152
+ chrome.tabs.group({ tabIds: tabId, groupId: existing.id }, function(result) {
153
+ if (chrome.runtime.lastError) {
154
+ Logger.error('[TabGroup] Failed to add tab to group:', chrome.runtime.lastError.message);
155
+ } else {
156
+ State.setGroupIdForClient(groupClientId, existing.id);
157
+ updateTabGroupName(groupClientId);
158
+ Logger.info('[TabGroup] Tab', tabId, 'added to existing group:', existing.id);
159
+ }
160
+ });
161
+ } else {
162
+ chrome.tabs.group({ tabIds: tabId }, function(groupId) {
163
+ if (chrome.runtime.lastError) {
164
+ Logger.error('[TabGroup] Failed to create group:', chrome.runtime.lastError.message);
165
+ return;
166
+ }
167
+ if (groupId) {
168
+ chrome.tabGroups.update(groupId, {
169
+ title: baseName,
170
+ color: CDPUtils.getGroupColorForClient(groupClientId),
171
+ collapsed: true
172
+ }, function() {
173
+ if (chrome.runtime.lastError) {
174
+ Logger.error('[TabGroup] Failed to update group:', chrome.runtime.lastError.message);
175
+ } else {
176
+ State.setGroupIdForClient(groupClientId, groupId);
177
+ updateTabGroupName(groupClientId);
178
+ Logger.info('[TabGroup] Created new group:', groupId, 'with tab:', tabId);
179
+ }
180
+ });
181
+ }
182
+ });
183
+ }
184
+ });
185
+ }, 500);
182
186
  }
183
187
 
184
188
  function updateTabGroupName(clientId) {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "manifest_version": 3,
3
3
  "name": "CDP Bridge",
4
- "version": "2.5.1",
4
+ "version": "2.5.2",
5
5
  "description": "Chrome DevTools Protocol Bridge for Playwright/Puppeteer automation",
6
6
  "permissions": [
7
7
  "debugger",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cdp-tunnel",
3
- "version": "2.5.1",
3
+ "version": "2.5.2",
4
4
  "description": "Bridge Chrome's debugger API to WebSocket — control your existing browser with Playwright/Puppeteer via CDP",
5
5
  "main": "server/proxy-server.js",
6
6
  "bin": "./cli/index.js",