chore: prepare verified CRX uploads and release 0.15.4
Testing / remote-protocol-compat (0.9.5) (push) Successful in 36s
Package Extension / package-extension (push) Successful in 33s
Build & Publish Package / publish (push) Successful in 31s
Testing / remote-protocol-compat (0.9.3) (push) Successful in 32s
Testing / test (push) Successful in 36s
Testing / remote-protocol-compat (0.9.5) (push) Successful in 36s
Package Extension / package-extension (push) Successful in 33s
Build & Publish Package / publish (push) Successful in 31s
Testing / remote-protocol-compat (0.9.3) (push) Successful in 32s
Testing / test (push) Successful in 36s
- Add helper scripts for Chrome Web Store verified CRX uploads using a dedicated RSA upload key protected by GPG. - Document the verified upload packaging flow and ignore local signing secrets. - Add npm packaging entry point for signed webstore CRX artifacts. - Chunk large SDK tab close batches to avoid native-host response timeouts. - Bump project and extension versions to 0.15.4 with matching tests.
This commit is contained in:
@@ -6,6 +6,11 @@ from collections.abc import Callable, Iterable
|
||||
from browser_cli.models import BrowserCounts, Tab
|
||||
from browser_cli.sdk.base import Namespace
|
||||
|
||||
# Keep SDK-driven bulk closes comfortably below the native-host response
|
||||
# timeout. The extension can close larger batches, but real browsers may take
|
||||
# much longer when hundreds of visible tabs are involved.
|
||||
BULK_CLOSE_CHUNK_SIZE = 50
|
||||
|
||||
class TabsNS(Namespace):
|
||||
"""List, open, close, move, and inspect browser tabs."""
|
||||
|
||||
@@ -75,6 +80,20 @@ class TabsNS(Namespace):
|
||||
ids = None
|
||||
if tab_ids is not None:
|
||||
ids = [t.id if isinstance(t, Tab) else t for t in tab_ids]
|
||||
if ids is not None and len(ids) > BULK_CLOSE_CHUNK_SIZE and not inactive and not duplicates and tab_id is None:
|
||||
closed = 0
|
||||
for start in range(0, len(ids), BULK_CLOSE_CHUNK_SIZE):
|
||||
chunk = ids[start:start + BULK_CLOSE_CHUNK_SIZE]
|
||||
result = self.command("tabs.close", {
|
||||
"tabId": None,
|
||||
"tabIds": chunk,
|
||||
"inactive": False,
|
||||
"duplicates": False,
|
||||
"gentleMode": gentle_mode,
|
||||
})
|
||||
closed += self.field(result, "closed", len(chunk))
|
||||
return closed
|
||||
|
||||
result = self.command("tabs.close", {
|
||||
"tabId": tab_id,
|
||||
"tabIds": ids,
|
||||
|
||||
Reference in New Issue
Block a user