@flrande/bak-extension 0.6.8 → 0.6.9
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.
- package/dist/.bak-e2e-build-stamp +1 -1
- package/dist/background.global.js +19 -7
- package/dist/manifest.json +1 -1
- package/package.json +2 -2
- package/src/session-binding.ts +19 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
2026-03-
|
|
1
|
+
2026-03-13T09:31:23.678Z
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
// package.json
|
|
63
63
|
var package_default = {
|
|
64
64
|
name: "@flrande/bak-extension",
|
|
65
|
-
version: "0.6.
|
|
65
|
+
version: "0.6.9",
|
|
66
66
|
type: "module",
|
|
67
67
|
scripts: {
|
|
68
68
|
build: "tsup src/background.ts src/content.ts src/popup.ts --format iife --out-dir dist --clean && node scripts/copy-assets.mjs",
|
|
@@ -1202,6 +1202,7 @@
|
|
|
1202
1202
|
const candidateWindowIds = [];
|
|
1203
1203
|
const peerTabIds = /* @__PURE__ */ new Set();
|
|
1204
1204
|
const peerGroupIds = /* @__PURE__ */ new Set();
|
|
1205
|
+
const reusablePeerIds = /* @__PURE__ */ new Set();
|
|
1205
1206
|
const pushWindowId = (windowId) => {
|
|
1206
1207
|
if (typeof windowId !== "number") {
|
|
1207
1208
|
return;
|
|
@@ -1212,11 +1213,20 @@
|
|
|
1212
1213
|
candidateWindowIds.push(windowId);
|
|
1213
1214
|
};
|
|
1214
1215
|
for (const peer of peers) {
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1216
|
+
if (peer.groupId === null) {
|
|
1217
|
+
continue;
|
|
1218
|
+
}
|
|
1219
|
+
const group = await this.waitForGroup(peer.groupId, 300);
|
|
1220
|
+
if (!group) {
|
|
1221
|
+
continue;
|
|
1222
|
+
}
|
|
1223
|
+
reusablePeerIds.add(peer.id);
|
|
1224
|
+
peerGroupIds.add(group.id);
|
|
1225
|
+
pushWindowId(group.windowId);
|
|
1226
|
+
}
|
|
1227
|
+
for (const peer of peers) {
|
|
1228
|
+
if (!reusablePeerIds.has(peer.id)) {
|
|
1229
|
+
continue;
|
|
1220
1230
|
}
|
|
1221
1231
|
const trackedTabIds = this.collectCandidateTabIds(peer);
|
|
1222
1232
|
for (const trackedTabId of trackedTabIds) {
|
|
@@ -1224,7 +1234,9 @@
|
|
|
1224
1234
|
}
|
|
1225
1235
|
const trackedTabs = await this.readLooseTrackedTabs(trackedTabIds);
|
|
1226
1236
|
for (const tab of trackedTabs) {
|
|
1227
|
-
|
|
1237
|
+
if (tab.groupId !== null && peerGroupIds.has(tab.groupId)) {
|
|
1238
|
+
pushWindowId(tab.windowId);
|
|
1239
|
+
}
|
|
1228
1240
|
}
|
|
1229
1241
|
}
|
|
1230
1242
|
for (const windowId of candidateWindowIds) {
|
package/dist/manifest.json
CHANGED
package/package.json
CHANGED
package/src/session-binding.ts
CHANGED
|
@@ -882,6 +882,7 @@ class SessionBindingManager {
|
|
|
882
882
|
const candidateWindowIds: number[] = [];
|
|
883
883
|
const peerTabIds = new Set<number>();
|
|
884
884
|
const peerGroupIds = new Set<number>();
|
|
885
|
+
const reusablePeerIds = new Set<string>();
|
|
885
886
|
const pushWindowId = (windowId: number | null | undefined): void => {
|
|
886
887
|
if (typeof windowId !== 'number') {
|
|
887
888
|
return;
|
|
@@ -893,11 +894,21 @@ class SessionBindingManager {
|
|
|
893
894
|
};
|
|
894
895
|
|
|
895
896
|
for (const peer of peers) {
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
897
|
+
if (peer.groupId === null) {
|
|
898
|
+
continue;
|
|
899
|
+
}
|
|
900
|
+
const group = await this.waitForGroup(peer.groupId, 300);
|
|
901
|
+
if (!group) {
|
|
902
|
+
continue;
|
|
903
|
+
}
|
|
904
|
+
reusablePeerIds.add(peer.id);
|
|
905
|
+
peerGroupIds.add(group.id);
|
|
906
|
+
pushWindowId(group.windowId);
|
|
907
|
+
}
|
|
908
|
+
|
|
909
|
+
for (const peer of peers) {
|
|
910
|
+
if (!reusablePeerIds.has(peer.id)) {
|
|
911
|
+
continue;
|
|
901
912
|
}
|
|
902
913
|
const trackedTabIds = this.collectCandidateTabIds(peer);
|
|
903
914
|
for (const trackedTabId of trackedTabIds) {
|
|
@@ -905,7 +916,9 @@ class SessionBindingManager {
|
|
|
905
916
|
}
|
|
906
917
|
const trackedTabs = await this.readLooseTrackedTabs(trackedTabIds);
|
|
907
918
|
for (const tab of trackedTabs) {
|
|
908
|
-
|
|
919
|
+
if (tab.groupId !== null && peerGroupIds.has(tab.groupId)) {
|
|
920
|
+
pushWindowId(tab.windowId);
|
|
921
|
+
}
|
|
909
922
|
}
|
|
910
923
|
}
|
|
911
924
|
|