local-operator-ui 0.47.1 → 0.47.3
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/out/main/index.js +808 -100
- package/out/preload/index.js +6 -2
- package/out/renderer/assets/{_basePickBy-cBt3C7Mm.js → _basePickBy-DB5UhjYV.js} +1 -1
- package/out/renderer/assets/{_baseUniq-BPAvTjjw.js → _baseUniq-CO2CTXxC.js} +1 -1
- package/out/renderer/assets/{agent-details-page-B9WQ68z3.js → agent-details-page-BJbb9h0W.js} +1 -1
- package/out/renderer/assets/{agent-hub-page-C-UV58tJ.js → agent-hub-page-ByreiiFO.js} +1 -1
- package/out/renderer/assets/{agents-page-CSQOyTDS.js → agents-page-CVs4-5JL.js} +3 -3
- package/out/renderer/assets/{approvalsOverlay-BYA7At9F.js → approvalsOverlay-BS11DEX_.js} +1 -1
- package/out/renderer/assets/{arc-RoFzSfxq.js → arc-B2MWo13u.js} +1 -1
- package/out/renderer/assets/{architectureDiagram-IEHRJDOE-KlQWIO4I.js → architectureDiagram-IEHRJDOE-IKMhs0I0.js} +1 -1
- package/out/renderer/assets/{blockDiagram-JOT3LUYC-CUIG5pQc.js → blockDiagram-JOT3LUYC-07e1WvLo.js} +1 -1
- package/out/renderer/assets/{book-open-CJGaJB5s.js → book-open-o6Ci6i7b.js} +1 -1
- package/out/renderer/assets/browser-page-n1fOydKF.js +1 -0
- package/out/renderer/assets/{browser-webauthn-prompt-CH3nbvN4.js → browser-webauthn-prompt-D_wF7hZJ.js} +1 -1
- package/out/renderer/assets/{building-2-CbHZ2q0R.js → building-2-IHnpP87O.js} +1 -1
- package/out/renderer/assets/{c4Diagram-VJAJSXHY-BtzkHJj8.js → c4Diagram-VJAJSXHY-DMxj_Hrp.js} +1 -1
- package/out/renderer/assets/channel-B6KagFA1.js +1 -0
- package/out/renderer/assets/{chunk-4BMEZGHF-rvmjs7-X.js → chunk-4BMEZGHF-Bpn4D57q.js} +1 -1
- package/out/renderer/assets/{chunk-A2AXSNBT-CDQJ7DrH.js → chunk-A2AXSNBT-C3PVXr-y.js} +1 -1
- package/out/renderer/assets/{chunk-AEK57VVT-BblqzOjK.js → chunk-AEK57VVT-CDTvcrrW.js} +1 -1
- package/out/renderer/assets/{chunk-D6G4REZN-CwhcoQLc.js → chunk-D6G4REZN-B7UOkwTl.js} +1 -1
- package/out/renderer/assets/{chunk-RZ5BOZE2-CeARX8pW.js → chunk-RZ5BOZE2-1hA1Echk.js} +1 -1
- package/out/renderer/assets/{chunk-XZIHB7SX-C2Z6kJVH.js → chunk-XZIHB7SX-BN47WuH3.js} +1 -1
- package/out/renderer/assets/classDiagram-GIVACNV2-DJ6OV3HZ.js +1 -0
- package/out/renderer/assets/classDiagram-v2-COTLJTTW-DJ6OV3HZ.js +1 -0
- package/out/renderer/assets/clone-B3VQJcAu.js +1 -0
- package/out/renderer/assets/{console-mirror-Df9e_9IL.js → console-mirror-Dn5eHVWo.js} +1 -1
- package/out/renderer/assets/{consoleCapture-CEWo4h66.js → consoleCapture-xozSszqN.js} +1 -1
- package/out/renderer/assets/{conversation-input-sync-BsdkPoIA.js → conversation-input-sync-BVsF7l3I.js} +4 -4
- package/out/renderer/assets/{dagre-OKDRZEBW-jshmXRqe.js → dagre-OKDRZEBW-Dut2gG74.js} +1 -1
- package/out/renderer/assets/{diagram-SSKATNLV-B6z3h0LO.js → diagram-SSKATNLV-DYGgyCpm.js} +1 -1
- package/out/renderer/assets/{diagram-VNBRO52H-C1EoDciD.js → diagram-VNBRO52H-DD0wl-MW.js} +1 -1
- package/out/renderer/assets/{erDiagram-Q7BY3M3F-cbQwdE8b.js → erDiagram-Q7BY3M3F-BREX25r3.js} +1 -1
- package/out/renderer/assets/{error-boundary-ByCPkFsK.js → error-boundary-BxhJ3iuk.js} +1 -1
- package/out/renderer/assets/{flowDiagram-4HSFHLVR-bLcnhccs.js → flowDiagram-4HSFHLVR-DNkAsz-I.js} +1 -1
- package/out/renderer/assets/{ganttDiagram-APWFNJXF-CQ1hiJNI.js → ganttDiagram-APWFNJXF-ZzPEnHst.js} +1 -1
- package/out/renderer/assets/{gitGraphDiagram-7IBYFJ6S-Djrozblc.js → gitGraphDiagram-7IBYFJ6S-CUKIvqjH.js} +1 -1
- package/out/renderer/assets/{graph-BDU7ZxXp.js → graph-DTPUOcGS.js} +1 -1
- package/out/renderer/assets/{hash-CY36bXoG.js → hash-zzipccCe.js} +1 -1
- package/out/renderer/assets/{heart-DTUFqrqu.js → heart-talyFNIT.js} +1 -1
- package/out/renderer/assets/{image-plus-DmG9Cnvq.js → image-plus-BUqPfYTB.js} +1 -1
- package/out/renderer/assets/{index-BwVoBwoc.js → index-BA6avCxL.js} +1 -1
- package/out/renderer/assets/{index-BABrThFM.js → index-CRdM2kJg.js} +5 -5
- package/out/renderer/assets/{index-D312rJYs.js → index-D-EToOaH.js} +1 -1
- package/out/renderer/assets/{index-Dz49kEuI.js → index-DhacaaxL.js} +1 -1
- package/out/renderer/assets/index-Rn79D6K9.css +1 -0
- package/out/renderer/assets/infoDiagram-PH2N3AL5-B37EvLQi.js +2 -0
- package/out/renderer/assets/{installer-DBgMBOUt.js → installer-DF2zRJpj.js} +1 -1
- package/out/renderer/assets/{journeyDiagram-U35MCT3I-B9EaYOUJ.js → journeyDiagram-U35MCT3I-BxfhPHtW.js} +1 -1
- package/out/renderer/assets/{kanban-definition-NDS4AKOZ-D_w2NByn.js → kanban-definition-NDS4AKOZ-BgkrZMto.js} +1 -1
- package/out/renderer/assets/{layout-CWAYrBQg.js → layout-B9nQEv_p.js} +1 -1
- package/out/renderer/assets/{legacy-agents-page-B9wR_UC9.js → legacy-agents-page-kk1LFe_c.js} +1 -1
- package/out/renderer/assets/{library-page-D-CE1ZCg.js → library-page-D4eRUdFJ.js} +3 -3
- package/out/renderer/assets/{mermaid.core-CynzcDYk.js → mermaid.core-q53VaKVc.js} +5 -5
- package/out/renderer/assets/{mesh-page-CR_KErFC.js → mesh-page-Dvr0QwmL.js} +1 -1
- package/out/renderer/assets/{messages-CYpcciYD.js → messages-jsVMtBxc.js} +8 -8
- package/out/renderer/assets/{mindmap-definition-ALO5MXBD-BA2W15tE.js → mindmap-definition-ALO5MXBD-DpxbgH_Y.js} +1 -1
- package/out/renderer/assets/{mini-BpsHkXJs.js → mini-LFizy8yv.js} +1 -1
- package/out/renderer/assets/{notebook-pen-jwZCAOYl.js → notebook-pen-Bxf8Tqod.js} +1 -1
- package/out/renderer/assets/{notifications-page-SK5NqB-7.js → notifications-page-DJXKu0ZI.js} +1 -1
- package/out/renderer/assets/{org-access-Bg27Z8x2.js → org-access-Ba3LG2fT.js} +1 -1
- package/out/renderer/assets/{org-surface-gate-CQxklQ-G.js → org-surface-gate-Cwaj-NQ2.js} +1 -1
- package/out/renderer/assets/{page-header-BHM4h2fS.js → page-header-ChFUVo8k.js} +1 -1
- package/out/renderer/assets/{path-utils-Bf8RCJbS.js → path-utils-b0Q7uRc_.js} +1 -1
- package/out/renderer/assets/{pieDiagram-IB7DONF6-DW77nNiO.js → pieDiagram-IB7DONF6-Bhgnb8v_.js} +1 -1
- package/out/renderer/assets/{project-markdown-BTsnM7OU.js → project-markdown-MAWgB0Dm.js} +1 -1
- package/out/renderer/assets/{projects-page-Br5DSkr6.js → projects-page-DEW3WYzf.js} +1 -1
- package/out/renderer/assets/{publication-validation-BPaO06Dy.js → publication-validation-DnoePW95.js} +1 -1
- package/out/renderer/assets/{quadrantDiagram-7GDLP6J5-CDj60YNy.js → quadrantDiagram-7GDLP6J5-Db2V1weY.js} +1 -1
- package/out/renderer/assets/{radar-MK3ICKWK-CyccF--S.js → radar-MK3ICKWK-BGnqMHxZ.js} +1 -1
- package/out/renderer/assets/{radient-auth-buttons-BCtJNYf5.js → radient-auth-buttons-CJih9t7E.js} +1 -1
- package/out/renderer/assets/{requirementDiagram-KVF5MWMF-sFj0_2m1.js → requirementDiagram-KVF5MWMF-5GVf00gN.js} +1 -1
- package/out/renderer/assets/{sankeyDiagram-QLVOVGJD-DsEIhN9c.js → sankeyDiagram-QLVOVGJD-B7GTCd68.js} +1 -1
- package/out/renderer/assets/{schedules-page-DAwa60MB.js → schedules-page-D4ZI1XYF.js} +1 -1
- package/out/renderer/assets/{sequenceDiagram-X6HHIX6F-CZ0uz7Vj.js → sequenceDiagram-X6HHIX6F-JAb_N9nv.js} +1 -1
- package/out/renderer/assets/{settings-page-Db00UHjC.js → settings-page-g7LgEGD9.js} +1 -1
- package/out/renderer/assets/{smartart-D5JzCfoV.js → smartart-BNovL5t6.js} +1 -1
- package/out/renderer/assets/{stateDiagram-DGXRK772-BJy4s7Hy.js → stateDiagram-DGXRK772-DrbrNwcU.js} +1 -1
- package/out/renderer/assets/stateDiagram-v2-YXO3MK2T-urlspDSN.js +1 -0
- package/out/renderer/assets/team-bridge-page-BOOGqDXG.js +38 -0
- package/out/renderer/assets/{timeline-definition-BDJGKUSR-rp4x17fE.js → timeline-definition-BDJGKUSR-CB-hKf9f.js} +1 -1
- package/out/renderer/assets/{use-default-on-banner-bwSRinka.js → use-default-on-banner-BFYrcb1d.js} +1 -1
- package/out/renderer/assets/{use-download-agent-mutation-Dgwa2p9-.js → use-download-agent-mutation-BF8RPYZw.js} +1 -1
- package/out/renderer/assets/{use-session-snapshot-QkR7pjNd.js → use-session-snapshot-s7DYXq5N.js} +1 -1
- package/out/renderer/assets/{xychartDiagram-VJFVF3MP-CDpmuteS.js → xychartDiagram-VJFVF3MP-1WM-ToPV.js} +1 -1
- package/out/renderer/browser-approvals-overlay.html +2 -2
- package/out/renderer/console-capture.html +6 -6
- package/out/renderer/index.html +8 -8
- package/out/renderer/installer.html +5 -5
- package/out/renderer/mini.html +8 -8
- package/package.json +3 -2
- package/out/renderer/assets/browser-page-Db4cYtxn.js +0 -1
- package/out/renderer/assets/channel-QUwfyg33.js +0 -1
- package/out/renderer/assets/classDiagram-GIVACNV2-BGCwsHyk.js +0 -1
- package/out/renderer/assets/classDiagram-v2-COTLJTTW-BGCwsHyk.js +0 -1
- package/out/renderer/assets/clone-B3p2Fvp_.js +0 -1
- package/out/renderer/assets/index-C8UzEgJt.css +0 -1
- package/out/renderer/assets/infoDiagram-PH2N3AL5-C5S1bkLb.js +0 -2
- package/out/renderer/assets/stateDiagram-v2-YXO3MK2T-DyjFY3o5.js +0 -1
- package/out/renderer/assets/team-bridge-page-HYbbsoUb.js +0 -38
package/out/main/index.js
CHANGED
|
@@ -2873,7 +2873,9 @@ const desktopRequestUnion = zod.z.discriminatedUnion("op", [
|
|
|
2873
2873
|
conversation_id: id$1,
|
|
2874
2874
|
message_id: id$1,
|
|
2875
2875
|
limit: zod.z.number().int().min(1).max(100).optional(),
|
|
2876
|
-
after_seq: zod.z.number().int().nonnegative().optional()
|
|
2876
|
+
after_seq: zod.z.number().int().nonnegative().optional(),
|
|
2877
|
+
before_seq: zod.z.number().int().positive().optional(),
|
|
2878
|
+
order: zod.z.enum(["asc", "desc"]).optional()
|
|
2877
2879
|
}).strict(),
|
|
2878
2880
|
zod.z.object({
|
|
2879
2881
|
op: zod.z.literal("team_bridge.messages.list"),
|
|
@@ -2920,7 +2922,9 @@ const desktopRequestUnion = zod.z.discriminatedUnion("op", [
|
|
|
2920
2922
|
expected_account_id: id$1,
|
|
2921
2923
|
tenant_id: id$1,
|
|
2922
2924
|
limit: zod.z.number().int().min(1).max(100).optional(),
|
|
2923
|
-
after_seq: zod.z.number().int().nonnegative().optional()
|
|
2925
|
+
after_seq: zod.z.number().int().nonnegative().optional(),
|
|
2926
|
+
before_seq: zod.z.number().int().positive().optional(),
|
|
2927
|
+
order: zod.z.enum(["asc", "desc"]).optional()
|
|
2924
2928
|
}).strict(),
|
|
2925
2929
|
zod.z.object({ op: zod.z.literal("team_bridge.scheduled.list"), tenant_id: id$1 }).strict(),
|
|
2926
2930
|
zod.z.object({
|
|
@@ -5830,6 +5834,9 @@ function desktopEndpoint(request) {
|
|
|
5830
5834
|
path2 += `/${encodeURIComponent(request.message_id)}/replies`;
|
|
5831
5835
|
if (request.after_seq !== void 0)
|
|
5832
5836
|
query2.set("after_seq", String(request.after_seq));
|
|
5837
|
+
if (request.before_seq !== void 0)
|
|
5838
|
+
query2.set("before_seq", String(request.before_seq));
|
|
5839
|
+
if (request.order !== void 0) query2.set("order", request.order);
|
|
5833
5840
|
}
|
|
5834
5841
|
}
|
|
5835
5842
|
return { path: `${path2}?${query2}`, method: "GET" };
|
|
@@ -5928,6 +5935,9 @@ function desktopEndpoint(request) {
|
|
|
5928
5935
|
query2.set("limit", String(request.limit));
|
|
5929
5936
|
if (request.after_seq !== void 0)
|
|
5930
5937
|
query2.set("after_seq", String(request.after_seq));
|
|
5938
|
+
if (request.before_seq !== void 0)
|
|
5939
|
+
query2.set("before_seq", String(request.before_seq));
|
|
5940
|
+
if (request.order !== void 0) query2.set("order", request.order);
|
|
5931
5941
|
const suffix = query2.size > 0 ? `?${query2.toString()}` : "";
|
|
5932
5942
|
return {
|
|
5933
5943
|
path: `/v1/desktop/team-bridge/conversations/${encodeURIComponent(request.conversation_id)}/messages/${encodeURIComponent(request.message_id)}/replies${suffix}`,
|
|
@@ -14772,6 +14782,8 @@ const enUiOwnerAudit = {
|
|
|
14772
14782
|
"ui.ownerAudit.agent": "Chief of staff",
|
|
14773
14783
|
"ui.ownerAudit.more": "Load more",
|
|
14774
14784
|
"ui.ownerAudit.older": "Load older messages",
|
|
14785
|
+
"ui.ownerAudit.older_replies": "Load older replies",
|
|
14786
|
+
"ui.ownerAudit.empty_replies": "No replies in this audit window.",
|
|
14775
14787
|
"ui.ownerAudit.page_cutoff": "Older messages are not shown yet. Load older messages to read what came before.",
|
|
14776
14788
|
"ui.ownerAudit.admitted": "Admitted to your chief of staff",
|
|
14777
14789
|
"ui.ownerAudit.rejected": "Rejected by your chief of staff’s screening",
|
|
@@ -16838,7 +16850,8 @@ const enUiTeamBridge = {
|
|
|
16838
16850
|
"ui.teamBridge.mentions.notice.invite": "Invite them",
|
|
16839
16851
|
"ui.teamBridge.mentions.notice.silent": "Mention without notifying",
|
|
16840
16852
|
"ui.teamBridge.mentions.notice.pending": "{name} is invited but hasn’t joined yet, so they won’t be notified.",
|
|
16841
|
-
"ui.teamBridge.mentions.notice.invited": "{name} has been invited. They won’t be notified until they join."
|
|
16853
|
+
"ui.teamBridge.mentions.notice.invited": "{name} has been invited. They won’t be notified until they join.",
|
|
16854
|
+
"ui.teamBridge.replies.legacy_window": "This server only supports oldest-first replies. Load more to continue."
|
|
16842
16855
|
};
|
|
16843
16856
|
const enUiUpdatesPanel = {
|
|
16844
16857
|
"ui.updates.panel.dismiss.not_now": "Not now",
|
|
@@ -22178,6 +22191,8 @@ const esUiOwnerAudit = {
|
|
|
22178
22191
|
"ui.ownerAudit.agent": "Jefe de gabinete",
|
|
22179
22192
|
"ui.ownerAudit.more": "Cargar más",
|
|
22180
22193
|
"ui.ownerAudit.older": "Cargar mensajes anteriores",
|
|
22194
|
+
"ui.ownerAudit.older_replies": "Cargar respuestas anteriores",
|
|
22195
|
+
"ui.ownerAudit.empty_replies": "No hay respuestas en esta ventana de auditoría.",
|
|
22181
22196
|
"ui.ownerAudit.page_cutoff": "Los mensajes anteriores aún no se muestran. Carga los mensajes anteriores para leer lo que vino antes.",
|
|
22182
22197
|
"ui.ownerAudit.admitted": "Admitido por tu jefe de gabinete",
|
|
22183
22198
|
"ui.ownerAudit.rejected": "Rechazado por el filtrado de tu jefe de gabinete",
|
|
@@ -24244,7 +24259,8 @@ const esUiTeamBridge = {
|
|
|
24244
24259
|
"ui.teamBridge.mentions.notice.invite": "Invitar",
|
|
24245
24260
|
"ui.teamBridge.mentions.notice.silent": "Mencionar sin notificar",
|
|
24246
24261
|
"ui.teamBridge.mentions.notice.pending": "{name} recibió una invitación pero aún no se ha unido, así que no recibirá ninguna notificación.",
|
|
24247
|
-
"ui.teamBridge.mentions.notice.invited": "Se invitó a {name}. No recibirá notificaciones hasta que se una."
|
|
24262
|
+
"ui.teamBridge.mentions.notice.invited": "Se invitó a {name}. No recibirá notificaciones hasta que se una.",
|
|
24263
|
+
"ui.teamBridge.replies.legacy_window": "Este servidor solo permite ver las respuestas de la más antigua a la más reciente. Carga más para continuar."
|
|
24248
24264
|
};
|
|
24249
24265
|
const esUiUpdatesPanel = {
|
|
24250
24266
|
"ui.updates.panel.dismiss.not_now": "Ahora no",
|
|
@@ -29584,6 +29600,8 @@ const frUiOwnerAudit = {
|
|
|
29584
29600
|
"ui.ownerAudit.agent": "Cheffe de cabinet",
|
|
29585
29601
|
"ui.ownerAudit.more": "Charger plus",
|
|
29586
29602
|
"ui.ownerAudit.older": "Charger les messages précédents",
|
|
29603
|
+
"ui.ownerAudit.older_replies": "Charger les réponses précédentes",
|
|
29604
|
+
"ui.ownerAudit.empty_replies": "Aucune réponse dans cette fenêtre d’audit.",
|
|
29587
29605
|
"ui.ownerAudit.page_cutoff": "Les messages précédents ne sont pas encore affichés. Chargez les messages précédents pour lire ce qui précède.",
|
|
29588
29606
|
"ui.ownerAudit.admitted": "Admis par votre cheffe de cabinet",
|
|
29589
29607
|
"ui.ownerAudit.rejected": "Rejeté par le filtrage de votre cheffe de cabinet",
|
|
@@ -31650,7 +31668,8 @@ const frUiTeamBridge = {
|
|
|
31650
31668
|
"ui.teamBridge.mentions.notice.invite": "L’inviter",
|
|
31651
31669
|
"ui.teamBridge.mentions.notice.silent": "Mentionner sans notifier",
|
|
31652
31670
|
"ui.teamBridge.mentions.notice.pending": "{name} a reçu une invitation mais n’a pas encore rejoint la conversation, et ne recevra donc pas de notification.",
|
|
31653
|
-
"ui.teamBridge.mentions.notice.invited": "Invitation envoyée à {name}, qui ne recevra pas de notification avant d’avoir rejoint la conversation."
|
|
31671
|
+
"ui.teamBridge.mentions.notice.invited": "Invitation envoyée à {name}, qui ne recevra pas de notification avant d’avoir rejoint la conversation.",
|
|
31672
|
+
"ui.teamBridge.replies.legacy_window": "Ce serveur affiche uniquement les réponses des plus anciennes aux plus récentes. Chargez-en davantage pour continuer."
|
|
31654
31673
|
};
|
|
31655
31674
|
const frUiUpdatesPanel = {
|
|
31656
31675
|
"ui.updates.panel.dismiss.not_now": "Pas maintenant",
|
|
@@ -36990,6 +37009,8 @@ const hiUiOwnerAudit = {
|
|
|
36990
37009
|
"ui.ownerAudit.agent": "चीफ़ ऑफ़ स्टाफ़",
|
|
36991
37010
|
"ui.ownerAudit.more": "और लोड करें",
|
|
36992
37011
|
"ui.ownerAudit.older": "पुराने संदेश लोड करें",
|
|
37012
|
+
"ui.ownerAudit.older_replies": "पुराने जवाब लोड करें",
|
|
37013
|
+
"ui.ownerAudit.empty_replies": "इस ऑडिट अवधि में कोई जवाब नहीं है।",
|
|
36993
37014
|
"ui.ownerAudit.page_cutoff": "पुराने संदेश अभी नहीं दिखाए गए हैं। इससे पहले के संदेश पढ़ने के लिए पुराने संदेश लोड करें।",
|
|
36994
37015
|
"ui.ownerAudit.admitted": "आपके चीफ़ ऑफ़ स्टाफ़ ने स्वीकार किया",
|
|
36995
37016
|
"ui.ownerAudit.rejected": "आपके चीफ़ ऑफ़ स्टाफ़ की जाँच ने अस्वीकार किया",
|
|
@@ -39056,7 +39077,8 @@ const hiUiTeamBridge = {
|
|
|
39056
39077
|
"ui.teamBridge.mentions.notice.invite": "आमंत्रित करें",
|
|
39057
39078
|
"ui.teamBridge.mentions.notice.silent": "सूचना दिए बिना उल्लेख करें",
|
|
39058
39079
|
"ui.teamBridge.mentions.notice.pending": "{name} को आमंत्रित किया गया है, लेकिन वे अभी शामिल नहीं हुए हैं, इसलिए उन्हें सूचना नहीं मिलेगी।",
|
|
39059
|
-
"ui.teamBridge.mentions.notice.invited": "{name} को आमंत्रित कर दिया गया है। शामिल होने तक उन्हें सूचना नहीं मिलेगी।"
|
|
39080
|
+
"ui.teamBridge.mentions.notice.invited": "{name} को आमंत्रित कर दिया गया है। शामिल होने तक उन्हें सूचना नहीं मिलेगी।",
|
|
39081
|
+
"ui.teamBridge.replies.legacy_window": "यह सर्वर जवाबों को केवल पुराने से नए क्रम में दिखा सकता है। आगे देखने के लिए और लोड करें।"
|
|
39060
39082
|
};
|
|
39061
39083
|
const hiUiUpdatesPanel = {
|
|
39062
39084
|
"ui.updates.panel.dismiss.not_now": "अभी नहीं",
|
|
@@ -44396,6 +44418,8 @@ const ruUiOwnerAudit = {
|
|
|
44396
44418
|
"ui.ownerAudit.agent": "Координатор",
|
|
44397
44419
|
"ui.ownerAudit.more": "Загрузить ещё",
|
|
44398
44420
|
"ui.ownerAudit.older": "Загрузить предыдущие сообщения",
|
|
44421
|
+
"ui.ownerAudit.older_replies": "Загрузить более ранние ответы",
|
|
44422
|
+
"ui.ownerAudit.empty_replies": "В этом окне аудита нет ответов.",
|
|
44399
44423
|
"ui.ownerAudit.page_cutoff": "Более ранние сообщения пока не показаны. Загрузите предыдущие сообщения, чтобы прочитать их.",
|
|
44400
44424
|
"ui.ownerAudit.admitted": "Принято вашим координатором",
|
|
44401
44425
|
"ui.ownerAudit.rejected": "Отклонено фильтрацией вашего координатора",
|
|
@@ -46462,7 +46486,8 @@ const ruUiTeamBridge = {
|
|
|
46462
46486
|
"ui.teamBridge.mentions.notice.invite": "Пригласить",
|
|
46463
46487
|
"ui.teamBridge.mentions.notice.silent": "Упомянуть без уведомления",
|
|
46464
46488
|
"ui.teamBridge.mentions.notice.pending": "Приглашение для {name} ещё не принято, поэтому уведомление не придёт.",
|
|
46465
|
-
"ui.teamBridge.mentions.notice.invited": "Приглашение для {name} отправлено. Пока его не примут, уведомление не придёт."
|
|
46489
|
+
"ui.teamBridge.mentions.notice.invited": "Приглашение для {name} отправлено. Пока его не примут, уведомление не придёт.",
|
|
46490
|
+
"ui.teamBridge.replies.legacy_window": "Этот сервер показывает ответы только от старых к новым. Загрузите ещё, чтобы продолжить."
|
|
46466
46491
|
};
|
|
46467
46492
|
const ruUiUpdatesPanel = {
|
|
46468
46493
|
"ui.updates.panel.dismiss.not_now": "Не сейчас",
|
|
@@ -51802,6 +51827,8 @@ const urUiOwnerAudit = {
|
|
|
51802
51827
|
"ui.ownerAudit.agent": "چیف آف اسٹاف",
|
|
51803
51828
|
"ui.ownerAudit.more": "مزید لوڈ کریں",
|
|
51804
51829
|
"ui.ownerAudit.older": "پرانے پیغامات لوڈ کریں",
|
|
51830
|
+
"ui.ownerAudit.older_replies": "پرانے جوابات لوڈ کریں",
|
|
51831
|
+
"ui.ownerAudit.empty_replies": "اس آڈٹ کی مدت میں کوئی جواب نہیں ہے۔",
|
|
51805
51832
|
"ui.ownerAudit.page_cutoff": "پرانے پیغامات ابھی تک نہیں دکھائے گئے۔ پرانے پیغامات لوڈ کریں تاکہ آپ پڑھ سکیں کہ پہلے کیا تھا۔",
|
|
51806
51833
|
"ui.ownerAudit.admitted": "آپ کے چیف آف اسٹاف نے قبول کیا",
|
|
51807
51834
|
"ui.ownerAudit.rejected": "آپ کے چیف آف اسٹاف کی جانچ نے مسترد کیا",
|
|
@@ -53868,7 +53895,8 @@ const urUiTeamBridge = {
|
|
|
53868
53895
|
"ui.teamBridge.mentions.notice.invite": "مدعو کریں",
|
|
53869
53896
|
"ui.teamBridge.mentions.notice.silent": "اطلاع دیے بغیر ذکر کریں",
|
|
53870
53897
|
"ui.teamBridge.mentions.notice.pending": "{name} کو مدعو کیا گیا ہے لیکن وہ ابھی شامل نہیں ہوئے، اس لیے انہیں اطلاع نہیں ملے گی۔",
|
|
53871
|
-
"ui.teamBridge.mentions.notice.invited": "{name} کو مدعو کر دیا گیا۔ شامل ہونے تک انہیں اطلاع نہیں ملے گی۔"
|
|
53898
|
+
"ui.teamBridge.mentions.notice.invited": "{name} کو مدعو کر دیا گیا۔ شامل ہونے تک انہیں اطلاع نہیں ملے گی۔",
|
|
53899
|
+
"ui.teamBridge.replies.legacy_window": "یہ سرور جوابات صرف پرانے سے نئے کی ترتیب میں دکھاتا ہے۔ آگے دیکھنے کے لیے مزید لوڈ کریں۔"
|
|
53872
53900
|
};
|
|
53873
53901
|
const urUiUpdatesPanel = {
|
|
53874
53902
|
"ui.updates.panel.dismiss.not_now": "ابھی نہیں",
|
|
@@ -59208,6 +59236,8 @@ const viUiOwnerAudit = {
|
|
|
59208
59236
|
"ui.ownerAudit.agent": "Chánh văn phòng",
|
|
59209
59237
|
"ui.ownerAudit.more": "Tải thêm",
|
|
59210
59238
|
"ui.ownerAudit.older": "Tải tin nhắn cũ hơn",
|
|
59239
|
+
"ui.ownerAudit.older_replies": "Tải phản hồi cũ hơn",
|
|
59240
|
+
"ui.ownerAudit.empty_replies": "Không có phản hồi nào trong khoảng thời gian kiểm tra này.",
|
|
59211
59241
|
"ui.ownerAudit.page_cutoff": "Các tin nhắn cũ hơn chưa được hiển thị. Tải tin nhắn cũ hơn để đọc phần trước đó.",
|
|
59212
59242
|
"ui.ownerAudit.admitted": "Được chánh văn phòng của bạn tiếp nhận",
|
|
59213
59243
|
"ui.ownerAudit.rejected": "Bị bộ lọc của chánh văn phòng của bạn từ chối",
|
|
@@ -61274,7 +61304,8 @@ const viUiTeamBridge = {
|
|
|
61274
61304
|
"ui.teamBridge.mentions.notice.invite": "Mời",
|
|
61275
61305
|
"ui.teamBridge.mentions.notice.silent": "Nhắc đến mà không thông báo",
|
|
61276
61306
|
"ui.teamBridge.mentions.notice.pending": "{name} đã được mời nhưng chưa tham gia nên sẽ không nhận được thông báo.",
|
|
61277
|
-
"ui.teamBridge.mentions.notice.invited": "Đã mời {name}. Họ sẽ không nhận được thông báo cho đến khi tham gia."
|
|
61307
|
+
"ui.teamBridge.mentions.notice.invited": "Đã mời {name}. Họ sẽ không nhận được thông báo cho đến khi tham gia.",
|
|
61308
|
+
"ui.teamBridge.replies.legacy_window": "Máy chủ này chỉ hỗ trợ hiển thị phản hồi từ cũ đến mới. Tải thêm để tiếp tục."
|
|
61278
61309
|
};
|
|
61279
61310
|
const viUiUpdatesPanel = {
|
|
61280
61311
|
"ui.updates.panel.dismiss.not_now": "Để sau",
|
|
@@ -66614,6 +66645,8 @@ const zhCNUiOwnerAudit = {
|
|
|
66614
66645
|
"ui.ownerAudit.agent": "首席助理",
|
|
66615
66646
|
"ui.ownerAudit.more": "加载更多",
|
|
66616
66647
|
"ui.ownerAudit.older": "加载较早的消息",
|
|
66648
|
+
"ui.ownerAudit.older_replies": "加载较早的回复",
|
|
66649
|
+
"ui.ownerAudit.empty_replies": "此审计时段内没有回复。",
|
|
66617
66650
|
"ui.ownerAudit.page_cutoff": "较早的消息尚未显示。加载较早的消息即可阅读此前的内容。",
|
|
66618
66651
|
"ui.ownerAudit.admitted": "已被你的首席助理接收",
|
|
66619
66652
|
"ui.ownerAudit.rejected": "已被你的首席助理的筛选拒绝",
|
|
@@ -68680,7 +68713,8 @@ const zhCNUiTeamBridge = {
|
|
|
68680
68713
|
"ui.teamBridge.mentions.notice.invite": "邀请",
|
|
68681
68714
|
"ui.teamBridge.mentions.notice.silent": "提及但不通知",
|
|
68682
68715
|
"ui.teamBridge.mentions.notice.pending": "{name}已受邀但尚未加入,因此不会收到通知。",
|
|
68683
|
-
"ui.teamBridge.mentions.notice.invited": "已邀请{name}。对方加入之前不会收到通知。"
|
|
68716
|
+
"ui.teamBridge.mentions.notice.invited": "已邀请{name}。对方加入之前不会收到通知。",
|
|
68717
|
+
"ui.teamBridge.replies.legacy_window": "此服务器仅支持从最早的回复开始显示。加载更多以继续。"
|
|
68684
68718
|
};
|
|
68685
68719
|
const zhCNUiUpdatesPanel = {
|
|
68686
68720
|
"ui.updates.panel.dismiss.not_now": "暂不",
|
|
@@ -74386,9 +74420,9 @@ async function resolveLoginShellPath(options = {}) {
|
|
|
74386
74420
|
);
|
|
74387
74421
|
});
|
|
74388
74422
|
try {
|
|
74389
|
-
const
|
|
74390
|
-
if (
|
|
74391
|
-
return
|
|
74423
|
+
const settled2 = await Promise.race([attempt, expired]);
|
|
74424
|
+
if (settled2 === "timeout") return { ok: false, reason: "timeout", shell };
|
|
74425
|
+
return settled2;
|
|
74392
74426
|
} finally {
|
|
74393
74427
|
if (timer) clearTimeout(timer);
|
|
74394
74428
|
}
|
|
@@ -75827,15 +75861,15 @@ function runBounded(command, args, env, bounds) {
|
|
|
75827
75861
|
child.stderr?.on("data", (chunk) => {
|
|
75828
75862
|
stderr += chunk.toString();
|
|
75829
75863
|
});
|
|
75830
|
-
let
|
|
75864
|
+
let settled2 = false;
|
|
75831
75865
|
let timedOut = false;
|
|
75832
75866
|
const timers = [];
|
|
75833
|
-
const settle2 = (
|
|
75834
|
-
if (
|
|
75835
|
-
|
|
75867
|
+
const settle2 = (finish2) => {
|
|
75868
|
+
if (settled2) return;
|
|
75869
|
+
settled2 = true;
|
|
75836
75870
|
for (const timer of timers) clearTimeout(timer);
|
|
75837
75871
|
timers.length = 0;
|
|
75838
|
-
|
|
75872
|
+
finish2();
|
|
75839
75873
|
};
|
|
75840
75874
|
timers.push(
|
|
75841
75875
|
setTimeout(() => {
|
|
@@ -80977,15 +81011,15 @@ ${result.stdout}`,
|
|
|
80977
81011
|
* into whichever generation the last retry left behind.
|
|
80978
81012
|
*/
|
|
80979
81013
|
async runInstallScript(venvPath, cmd, args) {
|
|
80980
|
-
let
|
|
81014
|
+
let settled2 = false;
|
|
80981
81015
|
return new Promise((resolve) => {
|
|
80982
81016
|
let captured = "";
|
|
80983
81017
|
let capturedErrors = "";
|
|
80984
81018
|
let markerCarry = "";
|
|
80985
81019
|
let subCarry = "";
|
|
80986
81020
|
const settle2 = (ok, exitCode) => {
|
|
80987
|
-
if (
|
|
80988
|
-
|
|
81021
|
+
if (settled2) return;
|
|
81022
|
+
settled2 = true;
|
|
80989
81023
|
resolve({ ok, exitCode, stdout: captured, stderr: capturedErrors });
|
|
80990
81024
|
};
|
|
80991
81025
|
try {
|
|
@@ -81174,6 +81208,9 @@ const METHODS$1 = [
|
|
|
81174
81208
|
"screenshot",
|
|
81175
81209
|
"click",
|
|
81176
81210
|
"type",
|
|
81211
|
+
// Trusted desktop key input; the core mirror must add this at the same
|
|
81212
|
+
// position because this list is the closed admission gate, not discovery.
|
|
81213
|
+
"press",
|
|
81177
81214
|
"close",
|
|
81178
81215
|
"status",
|
|
81179
81216
|
"tabs",
|
|
@@ -81215,7 +81252,12 @@ const METHODS$1 = [
|
|
|
81215
81252
|
"network_start",
|
|
81216
81253
|
"network_stop",
|
|
81217
81254
|
"network_read",
|
|
81218
|
-
"network_clear"
|
|
81255
|
+
"network_clear",
|
|
81256
|
+
// Desktop-only video recording. Appended after the network family in the order
|
|
81257
|
+
// `protocol.py`'s METHODS tuple carries them, so the hand-kept mirror stays
|
|
81258
|
+
// comparable by eye (D8).
|
|
81259
|
+
"record_start",
|
|
81260
|
+
"record_stop"
|
|
81219
81261
|
];
|
|
81220
81262
|
const METHOD_SET = new Set(METHODS$1);
|
|
81221
81263
|
function isMethod(value) {
|
|
@@ -81248,6 +81290,8 @@ const ERROR_CODES = [
|
|
|
81248
81290
|
// direction (daemon -> session), a browser host is not, which is exactly why a
|
|
81249
81291
|
// policy refusal travels as an `ok: true` result here.
|
|
81250
81292
|
"capability_unsupported",
|
|
81293
|
+
// Paired with the core press follow-up before callers use this new method.
|
|
81294
|
+
"unsupported_key",
|
|
81251
81295
|
"internal",
|
|
81252
81296
|
// The console namespace's own additions (design 10.6). Spread rather than copied
|
|
81253
81297
|
// for the same reason METHODS is: this list is what `rpc.ts` narrows a raised
|
|
@@ -81264,6 +81308,9 @@ const HOST_CAPABILITIES = [
|
|
|
81264
81308
|
"query",
|
|
81265
81309
|
"download",
|
|
81266
81310
|
"upload",
|
|
81311
|
+
// Desktop-only trusted keys. Core must capability-gate extension/cmux and
|
|
81312
|
+
// older desktop hosts instead of sending them an unknown method.
|
|
81313
|
+
"press",
|
|
81267
81314
|
// Session-scoped network capture. DESKTOP-ONLY: the extension's debugger is
|
|
81268
81315
|
// attached only for the duration of an action, so it holds no standing session
|
|
81269
81316
|
// to keep a `Network` subscription on. The backend therefore gates these four
|
|
@@ -81271,7 +81318,13 @@ const HOST_CAPABILITIES = [
|
|
|
81271
81318
|
"network_start",
|
|
81272
81319
|
"network_stop",
|
|
81273
81320
|
"network_read",
|
|
81274
|
-
"network_clear"
|
|
81321
|
+
"network_clear",
|
|
81322
|
+
// Video recording is served by this host build because it ships on a runtime
|
|
81323
|
+
// with `Page.startScreenRecording` (D8): the Electron bump is the ordering
|
|
81324
|
+
// PR-A owns, so a build that predates the bump advertises nothing it cannot
|
|
81325
|
+
// do.
|
|
81326
|
+
"record_start",
|
|
81327
|
+
"record_stop"
|
|
81275
81328
|
];
|
|
81276
81329
|
const RUN_DIRNAME = path$1.join("run", "ui-browser");
|
|
81277
81330
|
const STATE_FILENAME = "host.json";
|
|
@@ -89219,7 +89272,7 @@ class ConsoleCaptureView {
|
|
|
89219
89272
|
for (let attempt = 1; attempt <= 2; attempt++) {
|
|
89220
89273
|
this.feedSeq += 1;
|
|
89221
89274
|
const nonce = this.feedSeq;
|
|
89222
|
-
const
|
|
89275
|
+
const settled2 = await waitForCapture(
|
|
89223
89276
|
contents,
|
|
89224
89277
|
"console-capture-settled",
|
|
89225
89278
|
() => contents.send("console-capture-feed", {
|
|
@@ -89233,7 +89286,7 @@ class ConsoleCaptureView {
|
|
|
89233
89286
|
this.options.settleTimeoutMs
|
|
89234
89287
|
);
|
|
89235
89288
|
const renderer = stringOr(
|
|
89236
|
-
|
|
89289
|
+
settled2.renderer,
|
|
89237
89290
|
"unknown"
|
|
89238
89291
|
);
|
|
89239
89292
|
if (renderer !== "dom") {
|
|
@@ -97867,6 +97920,543 @@ function stopNetworkCapture(webContentsId) {
|
|
|
97867
97920
|
capture.unsubscribe();
|
|
97868
97921
|
captures.delete(webContentsId);
|
|
97869
97922
|
}
|
|
97923
|
+
const CDP_DEADLINE_MS = 15e3;
|
|
97924
|
+
const CDP_ATTACH_DEADLINE_MS = 5e3;
|
|
97925
|
+
const SCRIPTING_DEADLINE_MS = 15e3;
|
|
97926
|
+
function deadline(op, ms, what) {
|
|
97927
|
+
return new Promise((resolve, reject) => {
|
|
97928
|
+
const timer = setTimeout(() => {
|
|
97929
|
+
reject(
|
|
97930
|
+
new BridgeCommandError("internal", `${what} did not respond within ${ms}ms`, {
|
|
97931
|
+
stalled: what
|
|
97932
|
+
})
|
|
97933
|
+
);
|
|
97934
|
+
}, ms);
|
|
97935
|
+
op.then(
|
|
97936
|
+
(value) => {
|
|
97937
|
+
clearTimeout(timer);
|
|
97938
|
+
resolve(value);
|
|
97939
|
+
},
|
|
97940
|
+
(error) => {
|
|
97941
|
+
clearTimeout(timer);
|
|
97942
|
+
reject(error);
|
|
97943
|
+
}
|
|
97944
|
+
);
|
|
97945
|
+
});
|
|
97946
|
+
}
|
|
97947
|
+
const RECORD_WIDTH = 1280;
|
|
97948
|
+
const RECORD_HEIGHT = 720;
|
|
97949
|
+
const RECORD_FPS = 10;
|
|
97950
|
+
const MAX_NAME_BYTES$1 = 255;
|
|
97951
|
+
const RECORD_DEFAULT_DURATION_S = 120;
|
|
97952
|
+
const RECORD_MAX_DURATION_S = 600;
|
|
97953
|
+
const RECORD_MAX_BYTES = 64 * 1024 * 1024;
|
|
97954
|
+
const MAX_CONCURRENT_RECORDINGS = 2;
|
|
97955
|
+
const RECORD_START_DEADLINE_MS = 2e4;
|
|
97956
|
+
const RECORD_STOP_DEADLINE_MS = 2e4;
|
|
97957
|
+
const RECORD_STOP_BUDGET_MS = 45e3;
|
|
97958
|
+
const RECORD_ABORT_DEADLINE_MS = 2e3;
|
|
97959
|
+
const RECORD_READ_BYTES = 1024 * 1024;
|
|
97960
|
+
const RECORD_FIRST_CHROMIUM_MAJOR = 153;
|
|
97961
|
+
const recordings = /* @__PURE__ */ new Map();
|
|
97962
|
+
const settled = /* @__PURE__ */ new Map();
|
|
97963
|
+
const reservations = /* @__PURE__ */ new Map();
|
|
97964
|
+
function notActive() {
|
|
97965
|
+
return new BridgeCommandError(
|
|
97966
|
+
"internal",
|
|
97967
|
+
"no recording is running on this tab for this requester; start one with record_start",
|
|
97968
|
+
{ reason: "record_not_active" }
|
|
97969
|
+
);
|
|
97970
|
+
}
|
|
97971
|
+
function abortedWhileSaving() {
|
|
97972
|
+
return new BridgeCommandError(
|
|
97973
|
+
"internal",
|
|
97974
|
+
"the recording was discarded while it was being saved; nothing was written",
|
|
97975
|
+
{ reason: "record_aborted" }
|
|
97976
|
+
);
|
|
97977
|
+
}
|
|
97978
|
+
function typedFailure(error) {
|
|
97979
|
+
if (error instanceof BridgeCommandError) return error;
|
|
97980
|
+
return new BridgeCommandError(
|
|
97981
|
+
"internal",
|
|
97982
|
+
error instanceof Error ? error.message : String(error),
|
|
97983
|
+
{ reason: "record_failed" }
|
|
97984
|
+
);
|
|
97985
|
+
}
|
|
97986
|
+
function chromiumMajor() {
|
|
97987
|
+
const version = process.versions.chrome ?? "";
|
|
97988
|
+
const major = Number.parseInt(version.split(".")[0] ?? "", 10);
|
|
97989
|
+
return Number.isFinite(major) ? major : 0;
|
|
97990
|
+
}
|
|
97991
|
+
function pathRefusal(path2, detail) {
|
|
97992
|
+
return new BridgeCommandError("internal", detail, {
|
|
97993
|
+
reason: "record_path",
|
|
97994
|
+
path: path2
|
|
97995
|
+
});
|
|
97996
|
+
}
|
|
97997
|
+
function preflightPath(params) {
|
|
97998
|
+
const path2 = stringParam(params, "path");
|
|
97999
|
+
if (!path2) {
|
|
98000
|
+
throw pathRefusal(
|
|
98001
|
+
"",
|
|
98002
|
+
"record_start requires the harness-chosen output path: an absolute path ending in .mp4"
|
|
98003
|
+
);
|
|
98004
|
+
}
|
|
98005
|
+
if (!path$1.isAbsolute(path2)) {
|
|
98006
|
+
throw pathRefusal(path2, `the recording path must be absolute: ${path2}`);
|
|
98007
|
+
}
|
|
98008
|
+
const name = path$1.basename(path2);
|
|
98009
|
+
if (!name.toLowerCase().endsWith(".mp4") || name.length === ".mp4".length) {
|
|
98010
|
+
throw pathRefusal(path2, `the recording path must end in .mp4: ${path2}`);
|
|
98011
|
+
}
|
|
98012
|
+
if (Buffer.byteLength(`.${name}.part`, "utf8") > MAX_NAME_BYTES$1) {
|
|
98013
|
+
throw pathRefusal(
|
|
98014
|
+
path2,
|
|
98015
|
+
`the recording file name is too long: it must be at most ${MAX_NAME_BYTES$1 - 6} bytes, so that its temporary ".part" file also fits`
|
|
98016
|
+
);
|
|
98017
|
+
}
|
|
98018
|
+
const dir = path$1.dirname(path2);
|
|
98019
|
+
let parentIsDirectory = false;
|
|
98020
|
+
try {
|
|
98021
|
+
parentIsDirectory = fs.statSync(dir).isDirectory();
|
|
98022
|
+
} catch {
|
|
98023
|
+
parentIsDirectory = false;
|
|
98024
|
+
}
|
|
98025
|
+
if (!parentIsDirectory) {
|
|
98026
|
+
throw pathRefusal(
|
|
98027
|
+
path2,
|
|
98028
|
+
`the recording path's parent directory does not exist or is not a directory: ${dir}`
|
|
98029
|
+
);
|
|
98030
|
+
}
|
|
98031
|
+
try {
|
|
98032
|
+
fs.accessSync(dir, fs.constants.W_OK);
|
|
98033
|
+
} catch {
|
|
98034
|
+
throw pathRefusal(
|
|
98035
|
+
path2,
|
|
98036
|
+
`the recording path's parent directory is not writable: ${dir}`
|
|
98037
|
+
);
|
|
98038
|
+
}
|
|
98039
|
+
let present = true;
|
|
98040
|
+
try {
|
|
98041
|
+
fs.lstatSync(path2);
|
|
98042
|
+
} catch {
|
|
98043
|
+
present = false;
|
|
98044
|
+
}
|
|
98045
|
+
if (present) {
|
|
98046
|
+
throw pathRefusal(
|
|
98047
|
+
path2,
|
|
98048
|
+
`the recording path already exists and is never overwritten: ${path2}`
|
|
98049
|
+
);
|
|
98050
|
+
}
|
|
98051
|
+
return path2;
|
|
98052
|
+
}
|
|
98053
|
+
function durationOf(params) {
|
|
98054
|
+
const raw = params.max_duration_s;
|
|
98055
|
+
if (raw === void 0) return RECORD_DEFAULT_DURATION_S;
|
|
98056
|
+
const seconds = Number(raw);
|
|
98057
|
+
if (!Number.isInteger(seconds) || seconds < 1 || seconds > RECORD_MAX_DURATION_S) {
|
|
98058
|
+
throw new BridgeCommandError(
|
|
98059
|
+
"internal",
|
|
98060
|
+
`record_start max_duration_s takes WHOLE SECONDS only: give an integer from 1 to ${RECORD_MAX_DURATION_S}. Nothing was started.`,
|
|
98061
|
+
{ reason: "record_failed", param: "max_duration_s" }
|
|
98062
|
+
);
|
|
98063
|
+
}
|
|
98064
|
+
return seconds;
|
|
98065
|
+
}
|
|
98066
|
+
function maxBytesOf(params) {
|
|
98067
|
+
const raw = params.max_bytes;
|
|
98068
|
+
if (raw === void 0) return RECORD_MAX_BYTES;
|
|
98069
|
+
const bytes = Number(raw);
|
|
98070
|
+
if (!Number.isInteger(bytes) || bytes < 1 || bytes > RECORD_MAX_BYTES) {
|
|
98071
|
+
throw new BridgeCommandError(
|
|
98072
|
+
"internal",
|
|
98073
|
+
`record_start max_bytes must be a whole number of bytes from 1 to ${RECORD_MAX_BYTES}; nothing was started`,
|
|
98074
|
+
{ reason: "record_failed", param: "max_bytes" }
|
|
98075
|
+
);
|
|
98076
|
+
}
|
|
98077
|
+
return bytes;
|
|
98078
|
+
}
|
|
98079
|
+
function capWords(bytes) {
|
|
98080
|
+
return bytes >= 1024 * 1024 ? `${Math.floor(bytes / (1024 * 1024))} MiB` : `${Math.round(bytes / 1024)} KiB`;
|
|
98081
|
+
}
|
|
98082
|
+
function classifyStartFailure(error) {
|
|
98083
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
98084
|
+
const major = chromiumMajor();
|
|
98085
|
+
if (major > 0 && major < RECORD_FIRST_CHROMIUM_MAJOR) {
|
|
98086
|
+
return new BridgeCommandError(
|
|
98087
|
+
"internal",
|
|
98088
|
+
`the desktop app's browser engine (Chromium ${major}) has no video recording; it needs Chromium ${RECORD_FIRST_CHROMIUM_MAJOR} or newer. Update the desktop app and retry. Screenshots still work. Nothing was written.`,
|
|
98089
|
+
{ reason: "record_unsupported", chromium: major }
|
|
98090
|
+
);
|
|
98091
|
+
}
|
|
98092
|
+
if (/AV1\/libaom|libaom/i.test(message)) {
|
|
98093
|
+
return new BridgeCommandError(
|
|
98094
|
+
"internal",
|
|
98095
|
+
"this browser engine build cannot encode AV1, which video recording needs. Nothing was written.",
|
|
98096
|
+
{ reason: "record_av1_unavailable", detail: message }
|
|
98097
|
+
);
|
|
98098
|
+
}
|
|
98099
|
+
if (/not found|wasn't found|was not found|unknown method|-32601/i.test(message)) {
|
|
98100
|
+
return new BridgeCommandError(
|
|
98101
|
+
"internal",
|
|
98102
|
+
`this browser engine has no video recording (${message}); it needs Chromium ${RECORD_FIRST_CHROMIUM_MAJOR} or newer. Nothing was written.`,
|
|
98103
|
+
{ reason: "record_unsupported", detail: message }
|
|
98104
|
+
);
|
|
98105
|
+
}
|
|
98106
|
+
return new BridgeCommandError("internal", message, {
|
|
98107
|
+
reason: "record_failed"
|
|
98108
|
+
});
|
|
98109
|
+
}
|
|
98110
|
+
function captureShape() {
|
|
98111
|
+
return {
|
|
98112
|
+
fps: RECORD_FPS,
|
|
98113
|
+
container: "mp4",
|
|
98114
|
+
codec: "av1"
|
|
98115
|
+
};
|
|
98116
|
+
}
|
|
98117
|
+
async function readStream(recording, handle2, budgetAt, fd) {
|
|
98118
|
+
let bytes = 0;
|
|
98119
|
+
for (; ; ) {
|
|
98120
|
+
if (recording.aborted) throw abortedWhileSaving();
|
|
98121
|
+
if (Date.now() > budgetAt) {
|
|
98122
|
+
throw new BridgeCommandError(
|
|
98123
|
+
"internal",
|
|
98124
|
+
`the recording did not finish within ${RECORD_STOP_BUDGET_MS / 1e3} s; nothing was saved`,
|
|
98125
|
+
{ reason: "record_failed" }
|
|
98126
|
+
);
|
|
98127
|
+
}
|
|
98128
|
+
const remaining = recording.maxBytes - bytes;
|
|
98129
|
+
const page = await recording.cdp.send(
|
|
98130
|
+
recording.contents,
|
|
98131
|
+
"IO.read",
|
|
98132
|
+
{ handle: handle2, size: Math.min(RECORD_READ_BYTES, remaining + 1) },
|
|
98133
|
+
{ deadlineMs: CDP_DEADLINE_MS }
|
|
98134
|
+
);
|
|
98135
|
+
const data = typeof page?.data === "string" ? page.data : "";
|
|
98136
|
+
const chunk = data ? Buffer.from(data, page?.base64Encoded === false ? "utf8" : "base64") : Buffer.alloc(0);
|
|
98137
|
+
if (chunk.length > 0) {
|
|
98138
|
+
fs.writeSync(fd, chunk);
|
|
98139
|
+
bytes += chunk.length;
|
|
98140
|
+
}
|
|
98141
|
+
if (bytes > recording.maxBytes) {
|
|
98142
|
+
throw new BridgeCommandError(
|
|
98143
|
+
"internal",
|
|
98144
|
+
`the recording is larger than ${capWords(recording.maxBytes)}; nothing was saved. Record a shorter span (timeout_s) and retry.`,
|
|
98145
|
+
{ reason: "record_too_large", max_bytes: recording.maxBytes }
|
|
98146
|
+
);
|
|
98147
|
+
}
|
|
98148
|
+
if (page?.eof === true || chunk.length === 0) break;
|
|
98149
|
+
}
|
|
98150
|
+
return bytes;
|
|
98151
|
+
}
|
|
98152
|
+
async function runFinalize(recording, autoStopped) {
|
|
98153
|
+
const { contents, cdp, path: path2, partPath } = recording;
|
|
98154
|
+
const budgetAt = Date.now() + RECORD_STOP_BUDGET_MS;
|
|
98155
|
+
let handle2 = "";
|
|
98156
|
+
let fd = null;
|
|
98157
|
+
let createdPart = false;
|
|
98158
|
+
let endedAt = recording.startedAt;
|
|
98159
|
+
try {
|
|
98160
|
+
const stopped = await cdp.send(
|
|
98161
|
+
contents,
|
|
98162
|
+
"Page.stopScreenRecording",
|
|
98163
|
+
{},
|
|
98164
|
+
{ deadlineMs: RECORD_STOP_DEADLINE_MS }
|
|
98165
|
+
);
|
|
98166
|
+
endedAt = Date.now();
|
|
98167
|
+
handle2 = typeof stopped?.stream === "string" ? stopped.stream : "";
|
|
98168
|
+
if (recording.aborted) throw abortedWhileSaving();
|
|
98169
|
+
if (!handle2) {
|
|
98170
|
+
throw new BridgeCommandError(
|
|
98171
|
+
"internal",
|
|
98172
|
+
"the browser engine returned no recording stream; nothing was saved",
|
|
98173
|
+
{ reason: "record_failed" }
|
|
98174
|
+
);
|
|
98175
|
+
}
|
|
98176
|
+
fd = fs.openSync(partPath, "wx", 384);
|
|
98177
|
+
createdPart = true;
|
|
98178
|
+
const bytes = await readStream(recording, handle2, budgetAt, fd);
|
|
98179
|
+
if (bytes === 0) {
|
|
98180
|
+
throw new BridgeCommandError(
|
|
98181
|
+
"internal",
|
|
98182
|
+
"the recording produced no bytes; nothing was saved",
|
|
98183
|
+
{ reason: "record_failed" }
|
|
98184
|
+
);
|
|
98185
|
+
}
|
|
98186
|
+
if (recording.aborted) throw abortedWhileSaving();
|
|
98187
|
+
fs.fsyncSync(fd);
|
|
98188
|
+
fs.closeSync(fd);
|
|
98189
|
+
fd = null;
|
|
98190
|
+
try {
|
|
98191
|
+
fs.linkSync(partPath, path2);
|
|
98192
|
+
} catch (error) {
|
|
98193
|
+
const code = error?.code;
|
|
98194
|
+
if (code === "EEXIST") {
|
|
98195
|
+
throw pathRefusal(
|
|
98196
|
+
path2,
|
|
98197
|
+
`the recording path appeared while recording and is never overwritten: ${path2}`
|
|
98198
|
+
);
|
|
98199
|
+
}
|
|
98200
|
+
throw error;
|
|
98201
|
+
}
|
|
98202
|
+
try {
|
|
98203
|
+
fs.unlinkSync(partPath);
|
|
98204
|
+
} catch {
|
|
98205
|
+
}
|
|
98206
|
+
return {
|
|
98207
|
+
path: path2,
|
|
98208
|
+
bytes,
|
|
98209
|
+
duration_ms: endedAt - recording.startedAt,
|
|
98210
|
+
auto_stopped: autoStopped,
|
|
98211
|
+
...captureShape()
|
|
98212
|
+
};
|
|
98213
|
+
} catch (error) {
|
|
98214
|
+
throw typedFailure(error);
|
|
98215
|
+
} finally {
|
|
98216
|
+
if (fd !== null) {
|
|
98217
|
+
try {
|
|
98218
|
+
fs.closeSync(fd);
|
|
98219
|
+
} catch {
|
|
98220
|
+
}
|
|
98221
|
+
}
|
|
98222
|
+
if (createdPart) {
|
|
98223
|
+
try {
|
|
98224
|
+
fs.unlinkSync(partPath);
|
|
98225
|
+
} catch {
|
|
98226
|
+
}
|
|
98227
|
+
}
|
|
98228
|
+
if (handle2) {
|
|
98229
|
+
try {
|
|
98230
|
+
await cdp.send(
|
|
98231
|
+
contents,
|
|
98232
|
+
"IO.close",
|
|
98233
|
+
{ handle: handle2 },
|
|
98234
|
+
{ deadlineMs: CDP_DEADLINE_MS }
|
|
98235
|
+
);
|
|
98236
|
+
} catch {
|
|
98237
|
+
}
|
|
98238
|
+
}
|
|
98239
|
+
}
|
|
98240
|
+
}
|
|
98241
|
+
function settle$1(webContentsId, recording, outcome) {
|
|
98242
|
+
if (recordings.get(webContentsId) === recording) {
|
|
98243
|
+
recordings.delete(webContentsId);
|
|
98244
|
+
}
|
|
98245
|
+
if (recording.timer !== void 0) {
|
|
98246
|
+
clearTimeout(recording.timer);
|
|
98247
|
+
recording.timer = void 0;
|
|
98248
|
+
}
|
|
98249
|
+
if (recording.aborted) return;
|
|
98250
|
+
settled.set(webContentsId, { owner: recording.owner, ...outcome });
|
|
98251
|
+
}
|
|
98252
|
+
async function endReplaced(recording) {
|
|
98253
|
+
try {
|
|
98254
|
+
await recording.cdp.attach(recording.contents).catch(() => void 0);
|
|
98255
|
+
const stopped = await recording.cdp.send(
|
|
98256
|
+
recording.contents,
|
|
98257
|
+
"Page.stopScreenRecording",
|
|
98258
|
+
{},
|
|
98259
|
+
{ deadlineMs: RECORD_ABORT_DEADLINE_MS }
|
|
98260
|
+
);
|
|
98261
|
+
const handle2 = typeof stopped?.stream === "string" ? stopped.stream : "";
|
|
98262
|
+
if (handle2) {
|
|
98263
|
+
await recording.cdp.send(
|
|
98264
|
+
recording.contents,
|
|
98265
|
+
"IO.close",
|
|
98266
|
+
{ handle: handle2 },
|
|
98267
|
+
{ deadlineMs: RECORD_ABORT_DEADLINE_MS }
|
|
98268
|
+
).catch(() => void 0);
|
|
98269
|
+
}
|
|
98270
|
+
} catch {
|
|
98271
|
+
}
|
|
98272
|
+
}
|
|
98273
|
+
async function abortAndEnd(webContentsId, reason) {
|
|
98274
|
+
const recording = recordings.get(webContentsId);
|
|
98275
|
+
if (!recording) {
|
|
98276
|
+
abortRecording(webContentsId, reason);
|
|
98277
|
+
return;
|
|
98278
|
+
}
|
|
98279
|
+
abortRecording(webContentsId, reason);
|
|
98280
|
+
await endReplaced(recording);
|
|
98281
|
+
}
|
|
98282
|
+
function finish(webContentsId, recording, autoStopped) {
|
|
98283
|
+
if (!recording.finishing) {
|
|
98284
|
+
recording.finishing = runFinalize(recording, autoStopped);
|
|
98285
|
+
void recording.finishing.then(
|
|
98286
|
+
(result) => settle$1(webContentsId, recording, { result }),
|
|
98287
|
+
(error) => settle$1(webContentsId, recording, { error: typedFailure(error) })
|
|
98288
|
+
);
|
|
98289
|
+
}
|
|
98290
|
+
return recording.finishing;
|
|
98291
|
+
}
|
|
98292
|
+
async function recordStart(ctx, params, requestId2) {
|
|
98293
|
+
const tab = ctx.registry.requireSurface(String(params.tab ?? ""));
|
|
98294
|
+
const contents = tab.view.webContents;
|
|
98295
|
+
const id2 = contents.id;
|
|
98296
|
+
const owner = requesterOf(params, requestId2);
|
|
98297
|
+
const active = recordings.get(id2);
|
|
98298
|
+
if (active) {
|
|
98299
|
+
if (active.owner === owner) {
|
|
98300
|
+
const ageMs = Math.max(0, Math.round(Date.now() - active.startedAt));
|
|
98301
|
+
throw new BridgeCommandError(
|
|
98302
|
+
"busy",
|
|
98303
|
+
`a recording is already running on this tab for this session: ${active.path} (${Math.round(ageMs / 1e3)}s into its ${active.maxDurationS}s cap). Stop it with record_stop before starting another.`,
|
|
98304
|
+
{ reason: "record_active", path: active.path, age_ms: ageMs }
|
|
98305
|
+
);
|
|
98306
|
+
}
|
|
98307
|
+
}
|
|
98308
|
+
const path2 = preflightPath(params);
|
|
98309
|
+
const maxDurationS = durationOf(params);
|
|
98310
|
+
const maxBytes = maxBytesOf(params);
|
|
98311
|
+
const inFlight = [...reservations.values()].some(
|
|
98312
|
+
(entry2) => entry2.webContentsId === id2
|
|
98313
|
+
);
|
|
98314
|
+
if (inFlight) {
|
|
98315
|
+
throw new BridgeCommandError(
|
|
98316
|
+
"busy",
|
|
98317
|
+
"a recording is already starting on this tab; wait for that start to finish, then use record_stop before starting another. Nothing was started twice.",
|
|
98318
|
+
{ reason: "record_active", path: path2 }
|
|
98319
|
+
);
|
|
98320
|
+
}
|
|
98321
|
+
const canonicalPath2 = path$1.resolve(path2);
|
|
98322
|
+
const pathTaken = [...recordings.values()].some(
|
|
98323
|
+
(other) => path$1.resolve(other.path) === canonicalPath2
|
|
98324
|
+
) || [...reservations.values()].some(
|
|
98325
|
+
(entry2) => path$1.resolve(entry2.path) === canonicalPath2
|
|
98326
|
+
);
|
|
98327
|
+
if (pathTaken) {
|
|
98328
|
+
throw pathRefusal(
|
|
98329
|
+
path2,
|
|
98330
|
+
`this path is already being recorded: ${path2}. Choose another name; a recording is never overwritten or shared.`
|
|
98331
|
+
);
|
|
98332
|
+
}
|
|
98333
|
+
const effective = recordings.size - (active ? 1 : 0) + reservations.size;
|
|
98334
|
+
if (effective >= MAX_CONCURRENT_RECORDINGS) {
|
|
98335
|
+
throw new BridgeCommandError(
|
|
98336
|
+
"busy",
|
|
98337
|
+
`${MAX_CONCURRENT_RECORDINGS} recordings are already running, which is this host's cap; stop one with record_stop and retry. Nothing was started.`,
|
|
98338
|
+
{ reason: "record_limit", limit: MAX_CONCURRENT_RECORDINGS }
|
|
98339
|
+
);
|
|
98340
|
+
}
|
|
98341
|
+
if (active) {
|
|
98342
|
+
abortRecording(id2, "replaced_by_another_owner");
|
|
98343
|
+
}
|
|
98344
|
+
const reservation = `${Date.now()}-${Math.random()}`;
|
|
98345
|
+
const entry = { webContentsId: id2, path: path2, cancelled: false };
|
|
98346
|
+
reservations.set(reservation, entry);
|
|
98347
|
+
let started = false;
|
|
98348
|
+
try {
|
|
98349
|
+
if (active) await endReplaced(active);
|
|
98350
|
+
await ctx.cdp.attach(contents);
|
|
98351
|
+
try {
|
|
98352
|
+
await ctx.cdp.send(
|
|
98353
|
+
contents,
|
|
98354
|
+
"Page.startScreenRecording",
|
|
98355
|
+
{
|
|
98356
|
+
audio: false,
|
|
98357
|
+
maxWidth: RECORD_WIDTH,
|
|
98358
|
+
maxHeight: RECORD_HEIGHT,
|
|
98359
|
+
frameRate: RECORD_FPS
|
|
98360
|
+
},
|
|
98361
|
+
{ deadlineMs: RECORD_START_DEADLINE_MS }
|
|
98362
|
+
);
|
|
98363
|
+
started = true;
|
|
98364
|
+
} catch (error) {
|
|
98365
|
+
throw classifyStartFailure(error);
|
|
98366
|
+
}
|
|
98367
|
+
} catch (error) {
|
|
98368
|
+
reservations.delete(reservation);
|
|
98369
|
+
throw error;
|
|
98370
|
+
}
|
|
98371
|
+
if (entry.cancelled) {
|
|
98372
|
+
reservations.delete(reservation);
|
|
98373
|
+
if (started) await endReplaced({ cdp: ctx.cdp, contents });
|
|
98374
|
+
throw new BridgeCommandError(
|
|
98375
|
+
"internal",
|
|
98376
|
+
"that browser tab was released while the recording was starting; nothing was saved. Use 'open' with a URL to get a new tab.",
|
|
98377
|
+
{ reason: "record_failed" }
|
|
98378
|
+
);
|
|
98379
|
+
}
|
|
98380
|
+
const recording = {
|
|
98381
|
+
owner,
|
|
98382
|
+
contents,
|
|
98383
|
+
cdp: ctx.cdp,
|
|
98384
|
+
path: path2,
|
|
98385
|
+
partPath: `${path$1.dirname(path2)}/.${path$1.basename(path2)}.part`,
|
|
98386
|
+
startedAt: Date.now(),
|
|
98387
|
+
maxBytes,
|
|
98388
|
+
maxDurationS,
|
|
98389
|
+
timer: void 0,
|
|
98390
|
+
finishing: null,
|
|
98391
|
+
aborted: false
|
|
98392
|
+
};
|
|
98393
|
+
recordings.set(id2, recording);
|
|
98394
|
+
reservations.delete(reservation);
|
|
98395
|
+
recording.timer = setTimeout(() => {
|
|
98396
|
+
void finish(id2, recording, true).catch(() => void 0);
|
|
98397
|
+
}, maxDurationS * 1e3);
|
|
98398
|
+
recording.timer.unref?.();
|
|
98399
|
+
return {
|
|
98400
|
+
recording: true,
|
|
98401
|
+
path: path2,
|
|
98402
|
+
max_duration_s: maxDurationS,
|
|
98403
|
+
max_bytes: maxBytes,
|
|
98404
|
+
...captureShape()
|
|
98405
|
+
};
|
|
98406
|
+
}
|
|
98407
|
+
async function recordStop(ctx, params, requestId2) {
|
|
98408
|
+
const tab = ctx.registry.requireSurface(String(params.tab ?? ""));
|
|
98409
|
+
const id2 = tab.view.webContents.id;
|
|
98410
|
+
const owner = requesterOf(params, requestId2);
|
|
98411
|
+
const recording = recordings.get(id2);
|
|
98412
|
+
if (recording) {
|
|
98413
|
+
if (recording.owner !== owner) throw notActive();
|
|
98414
|
+
try {
|
|
98415
|
+
return await finish(id2, recording, false);
|
|
98416
|
+
} finally {
|
|
98417
|
+
settled.delete(id2);
|
|
98418
|
+
}
|
|
98419
|
+
}
|
|
98420
|
+
const pending = settled.get(id2);
|
|
98421
|
+
if (settled.has(id2) && pending?.owner === owner) {
|
|
98422
|
+
settled.delete(id2);
|
|
98423
|
+
if ("error" in pending) throw pending.error;
|
|
98424
|
+
return pending.result;
|
|
98425
|
+
}
|
|
98426
|
+
throw notActive();
|
|
98427
|
+
}
|
|
98428
|
+
function detachExplanation() {
|
|
98429
|
+
return "The debugger connection to the tab ended (the page went away, or DevTools took it)";
|
|
98430
|
+
}
|
|
98431
|
+
function abortRecording(webContentsId, reason, options = {}) {
|
|
98432
|
+
for (const [token, entry] of reservations) {
|
|
98433
|
+
if (entry.webContentsId === webContentsId) {
|
|
98434
|
+
entry.cancelled = true;
|
|
98435
|
+
reservations.delete(token);
|
|
98436
|
+
}
|
|
98437
|
+
}
|
|
98438
|
+
const recording = recordings.get(webContentsId);
|
|
98439
|
+
if (recording) {
|
|
98440
|
+
recording.aborted = true;
|
|
98441
|
+
if (recording.timer !== void 0) {
|
|
98442
|
+
clearTimeout(recording.timer);
|
|
98443
|
+
recording.timer = void 0;
|
|
98444
|
+
}
|
|
98445
|
+
recordings.delete(webContentsId);
|
|
98446
|
+
}
|
|
98447
|
+
if (options.tombstone && recording) {
|
|
98448
|
+
settled.set(webContentsId, {
|
|
98449
|
+
owner: recording.owner,
|
|
98450
|
+
error: new BridgeCommandError(
|
|
98451
|
+
"internal",
|
|
98452
|
+
`${detachExplanation()}; the recording was discarded (${reason}). Nothing was written.`,
|
|
98453
|
+
{ reason: "record_aborted", detail: reason }
|
|
98454
|
+
)
|
|
98455
|
+
});
|
|
98456
|
+
return;
|
|
98457
|
+
}
|
|
98458
|
+
if (recording || options.clearSettled) settled.delete(webContentsId);
|
|
98459
|
+
}
|
|
97870
98460
|
const MAX_ENTRIES = 200;
|
|
97871
98461
|
const MAX_BYTES = 256 * 1024;
|
|
97872
98462
|
const MAX_ARG_CHARS = 2e3;
|
|
@@ -98003,30 +98593,6 @@ function routeDebuggerEvent(webContentsId, method, rawParams) {
|
|
|
98003
98593
|
});
|
|
98004
98594
|
}
|
|
98005
98595
|
}
|
|
98006
|
-
const CDP_DEADLINE_MS = 15e3;
|
|
98007
|
-
const CDP_ATTACH_DEADLINE_MS = 5e3;
|
|
98008
|
-
const SCRIPTING_DEADLINE_MS = 15e3;
|
|
98009
|
-
function deadline(op, ms, what) {
|
|
98010
|
-
return new Promise((resolve, reject) => {
|
|
98011
|
-
const timer = setTimeout(() => {
|
|
98012
|
-
reject(
|
|
98013
|
-
new BridgeCommandError("internal", `${what} did not respond within ${ms}ms`, {
|
|
98014
|
-
stalled: what
|
|
98015
|
-
})
|
|
98016
|
-
);
|
|
98017
|
-
}, ms);
|
|
98018
|
-
op.then(
|
|
98019
|
-
(value) => {
|
|
98020
|
-
clearTimeout(timer);
|
|
98021
|
-
resolve(value);
|
|
98022
|
-
},
|
|
98023
|
-
(error) => {
|
|
98024
|
-
clearTimeout(timer);
|
|
98025
|
-
reject(error);
|
|
98026
|
-
}
|
|
98027
|
-
);
|
|
98028
|
-
});
|
|
98029
|
-
}
|
|
98030
98596
|
const PROTOCOL_VERSION = "1.3";
|
|
98031
98597
|
const ALREADY_ATTACHED = /another debugger|already attached/i;
|
|
98032
98598
|
const STALE_SESSION = /no session|session with given id|no target|target closed/i;
|
|
@@ -98143,7 +98709,7 @@ class CdpPool {
|
|
|
98143
98709
|
const detachListener = (_event, reason) => {
|
|
98144
98710
|
attachment.detachedReason = reason || "detached";
|
|
98145
98711
|
this.frames.delete(contents.id);
|
|
98146
|
-
|
|
98712
|
+
this.dropCaptures(contents.id, reason || "detached");
|
|
98147
98713
|
this.options.log?.(
|
|
98148
98714
|
`[browser] debugger detached from view ${contents.id}: ${reason}`
|
|
98149
98715
|
);
|
|
@@ -98340,6 +98906,33 @@ class CdpPool {
|
|
|
98340
98906
|
attachment.listeners.detach
|
|
98341
98907
|
);
|
|
98342
98908
|
}
|
|
98909
|
+
/**
|
|
98910
|
+
* End every capture this view owns, at one debugger boundary.
|
|
98911
|
+
*
|
|
98912
|
+
* WHY ONE HELPER. The network buffer and a recording die at the same four
|
|
98913
|
+
* boundaries (`forget`, `detach`, the detach EVENT, and `close` through
|
|
98914
|
+
* `detach`), and each was hand-listed at each site. That is how a fourth capture
|
|
98915
|
+
* drifts: one boundary is missed, and a stale subscription or a running encoder
|
|
98916
|
+
* outlives the attachment that fed it.
|
|
98917
|
+
*
|
|
98918
|
+
* THE LOG RING IS THE EXCEPTION, and it is deliberate: the detach EVENT is a
|
|
98919
|
+
* DevTools hand-over of a view that stays open, and `logs` is defined as
|
|
98920
|
+
* "everything since the surface opened" — so the ring must survive it, which is
|
|
98921
|
+
* exactly what the re-attach case in `browser-host.test.mjs` asserts. `forget`
|
|
98922
|
+
* and `detach` end the view's drive and drop it. The detach event passes the
|
|
98923
|
+
* reason, which is what turns a recording's abort into the tombstone a later
|
|
98924
|
+
* `record_stop` reads.
|
|
98925
|
+
*/
|
|
98926
|
+
dropCaptures(webContentsId, detachedReason) {
|
|
98927
|
+
if (detachedReason === void 0) stopLogCapture(webContentsId);
|
|
98928
|
+
stopNetworkCapture(webContentsId);
|
|
98929
|
+
abortRecording(webContentsId, detachedReason ?? "detached", {
|
|
98930
|
+
tombstone: detachedReason !== void 0,
|
|
98931
|
+
// `forget`/`detach` end the handle, so an uncollected result dies with it;
|
|
98932
|
+
// the detach EVENT hands a live tab over and must leave it alone.
|
|
98933
|
+
clearSettled: detachedReason === void 0
|
|
98934
|
+
});
|
|
98935
|
+
}
|
|
98343
98936
|
/** Drop the attachment record and its log buffer, without talking to the view.
|
|
98344
98937
|
* Used when the view is already gone. */
|
|
98345
98938
|
forget(webContentsId) {
|
|
@@ -98348,8 +98941,7 @@ class CdpPool {
|
|
|
98348
98941
|
this.attachments.delete(webContentsId);
|
|
98349
98942
|
this.subscribers.delete(webContentsId);
|
|
98350
98943
|
this.frames.delete(webContentsId);
|
|
98351
|
-
|
|
98352
|
-
stopNetworkCapture(webContentsId);
|
|
98944
|
+
this.dropCaptures(webContentsId);
|
|
98353
98945
|
}
|
|
98354
98946
|
/** Detach cleanly: release the debugger session and the log buffer. */
|
|
98355
98947
|
async detach(webContentsId) {
|
|
@@ -98358,8 +98950,7 @@ class CdpPool {
|
|
|
98358
98950
|
this.attachments.delete(webContentsId);
|
|
98359
98951
|
this.subscribers.delete(webContentsId);
|
|
98360
98952
|
this.frames.delete(webContentsId);
|
|
98361
|
-
|
|
98362
|
-
stopNetworkCapture(webContentsId);
|
|
98953
|
+
this.dropCaptures(webContentsId);
|
|
98363
98954
|
if (!attachment) return;
|
|
98364
98955
|
try {
|
|
98365
98956
|
if (attachment.contents.debugger.isAttached()) {
|
|
@@ -98390,7 +98981,7 @@ const ERR_ABORTED = -3;
|
|
|
98390
98981
|
function settle(contents, timeoutMs = 3e4) {
|
|
98391
98982
|
return new Promise((resolve, reject) => {
|
|
98392
98983
|
let done = false;
|
|
98393
|
-
const
|
|
98984
|
+
const finish2 = (error) => {
|
|
98394
98985
|
if (done) return;
|
|
98395
98986
|
done = true;
|
|
98396
98987
|
clearTimeout(timer);
|
|
@@ -98401,15 +98992,15 @@ function settle(contents, timeoutMs = 3e4) {
|
|
|
98401
98992
|
if (error) reject(error);
|
|
98402
98993
|
else resolve();
|
|
98403
98994
|
};
|
|
98404
|
-
const onFinish = () =>
|
|
98995
|
+
const onFinish = () => finish2();
|
|
98405
98996
|
const onInPage = (_event, _url, isMainFrame) => {
|
|
98406
98997
|
if (!isMainFrame) return;
|
|
98407
|
-
|
|
98998
|
+
finish2();
|
|
98408
98999
|
};
|
|
98409
99000
|
const onFail = (_event, errorCode, errorDescription, _url, isMainFrame) => {
|
|
98410
99001
|
if (!isMainFrame) return;
|
|
98411
99002
|
if (errorCode === ERR_ABORTED) return;
|
|
98412
|
-
|
|
99003
|
+
finish2(
|
|
98413
99004
|
new BridgeCommandError(
|
|
98414
99005
|
"nav_failed",
|
|
98415
99006
|
errorDescription ?? "navigation failed",
|
|
@@ -98417,14 +99008,14 @@ function settle(contents, timeoutMs = 3e4) {
|
|
|
98417
99008
|
)
|
|
98418
99009
|
);
|
|
98419
99010
|
};
|
|
98420
|
-
const onDestroyed = () =>
|
|
99011
|
+
const onDestroyed = () => finish2(
|
|
98421
99012
|
new BridgeCommandError(
|
|
98422
99013
|
"tab_closed",
|
|
98423
99014
|
"that browser tab closed while it was loading; dropped the handle. Use 'open' with a URL to get a new tab"
|
|
98424
99015
|
)
|
|
98425
99016
|
);
|
|
98426
99017
|
const timer = setTimeout(
|
|
98427
|
-
() =>
|
|
99018
|
+
() => finish2(
|
|
98428
99019
|
new BridgeCommandError("nav_timeout", "navigation timed out", {
|
|
98429
99020
|
timeout_ms: timeoutMs
|
|
98430
99021
|
})
|
|
@@ -98550,8 +99141,8 @@ async function withOriginGate(ctx, view, requester, approved, operation) {
|
|
|
98550
99141
|
async function navigateView(ctx, view, url, requester, approved, timeoutMs = 3e4) {
|
|
98551
99142
|
const contents = view.webContents;
|
|
98552
99143
|
return withOriginGate(ctx, view, requester, approved, async () => {
|
|
98553
|
-
const
|
|
98554
|
-
await Promise.race([
|
|
99144
|
+
const settled2 = settle(contents, timeoutMs);
|
|
99145
|
+
await Promise.race([settled2, loadFailure(contents.loadURL(url.href))]);
|
|
98555
99146
|
return { url: contents.getURL(), title: contents.getTitle() };
|
|
98556
99147
|
});
|
|
98557
99148
|
}
|
|
@@ -100018,6 +100609,87 @@ async function click(ctx, params) {
|
|
|
100018
100609
|
...after
|
|
100019
100610
|
};
|
|
100020
100611
|
}
|
|
100612
|
+
const PRESS_KEYS = /* @__PURE__ */ new Map([
|
|
100613
|
+
["Tab", { key: "Tab", code: "Tab", virtualKeyCode: 9, modifiers: 0 }],
|
|
100614
|
+
["Shift+Tab", { key: "Tab", code: "Tab", virtualKeyCode: 9, modifiers: 8 }],
|
|
100615
|
+
["Enter", { key: "Enter", code: "Enter", virtualKeyCode: 13, modifiers: 0 }],
|
|
100616
|
+
[
|
|
100617
|
+
"Escape",
|
|
100618
|
+
{ key: "Escape", code: "Escape", virtualKeyCode: 27, modifiers: 0 }
|
|
100619
|
+
],
|
|
100620
|
+
[
|
|
100621
|
+
"ArrowUp",
|
|
100622
|
+
{ key: "ArrowUp", code: "ArrowUp", virtualKeyCode: 38, modifiers: 0 }
|
|
100623
|
+
],
|
|
100624
|
+
[
|
|
100625
|
+
"ArrowDown",
|
|
100626
|
+
{ key: "ArrowDown", code: "ArrowDown", virtualKeyCode: 40, modifiers: 0 }
|
|
100627
|
+
],
|
|
100628
|
+
[
|
|
100629
|
+
"ArrowLeft",
|
|
100630
|
+
{ key: "ArrowLeft", code: "ArrowLeft", virtualKeyCode: 37, modifiers: 0 }
|
|
100631
|
+
],
|
|
100632
|
+
[
|
|
100633
|
+
"ArrowRight",
|
|
100634
|
+
{ key: "ArrowRight", code: "ArrowRight", virtualKeyCode: 39, modifiers: 0 }
|
|
100635
|
+
]
|
|
100636
|
+
]);
|
|
100637
|
+
async function press(ctx, params) {
|
|
100638
|
+
const named = typeof params.key === "string" ? PRESS_KEYS.get(params.key) : void 0;
|
|
100639
|
+
if (!named) {
|
|
100640
|
+
throw new BridgeCommandError(
|
|
100641
|
+
"unsupported_key",
|
|
100642
|
+
`unsupported key: ${String(params.key)}`,
|
|
100643
|
+
{
|
|
100644
|
+
key: params.key ?? null
|
|
100645
|
+
}
|
|
100646
|
+
);
|
|
100647
|
+
}
|
|
100648
|
+
const record = ctx.registry.requireSurface(params.tab);
|
|
100649
|
+
const contents = record.view.webContents;
|
|
100650
|
+
const event = {
|
|
100651
|
+
key: named.key,
|
|
100652
|
+
code: named.code,
|
|
100653
|
+
windowsVirtualKeyCode: named.virtualKeyCode,
|
|
100654
|
+
modifiers: named.modifiers
|
|
100655
|
+
};
|
|
100656
|
+
const before = pageOf(record.view).url;
|
|
100657
|
+
let navigationSeen = false;
|
|
100658
|
+
const onStart = (...args) => {
|
|
100659
|
+
if (args[2] !== false) navigationSeen = true;
|
|
100660
|
+
};
|
|
100661
|
+
contents.on("did-start-navigation", onStart);
|
|
100662
|
+
try {
|
|
100663
|
+
let keyDownFailed = true;
|
|
100664
|
+
try {
|
|
100665
|
+
await ctx.cdp.send(contents, "Input.dispatchKeyEvent", {
|
|
100666
|
+
...event,
|
|
100667
|
+
type: "keyDown",
|
|
100668
|
+
...named.key === "Enter" ? { text: "\r", unmodifiedText: "\r" } : {}
|
|
100669
|
+
});
|
|
100670
|
+
keyDownFailed = false;
|
|
100671
|
+
} finally {
|
|
100672
|
+
const release = ctx.cdp.send(contents, "Input.dispatchKeyEvent", {
|
|
100673
|
+
...event,
|
|
100674
|
+
type: "keyUp"
|
|
100675
|
+
});
|
|
100676
|
+
if (keyDownFailed) await release.catch(() => void 0);
|
|
100677
|
+
else await release;
|
|
100678
|
+
}
|
|
100679
|
+
await sleep(1200);
|
|
100680
|
+
if (navigationSeen)
|
|
100681
|
+
await settle(contents, 1e4).catch(() => void 0);
|
|
100682
|
+
ctx.registry.touch(record);
|
|
100683
|
+
const after = pageOf(record.view);
|
|
100684
|
+
return {
|
|
100685
|
+
key: params.key,
|
|
100686
|
+
navigated: navigationSeen || after.url !== before,
|
|
100687
|
+
...after
|
|
100688
|
+
};
|
|
100689
|
+
} finally {
|
|
100690
|
+
contents.removeListener("did-start-navigation", onStart);
|
|
100691
|
+
}
|
|
100692
|
+
}
|
|
100021
100693
|
async function type(ctx, params) {
|
|
100022
100694
|
const record = ctx.registry.requireSurface(params.tab);
|
|
100023
100695
|
const contents = record.view.webContents;
|
|
@@ -100113,17 +100785,17 @@ async function typeInto(ctx, contents, node, text2, target2) {
|
|
|
100113
100785
|
const setValue = set2?.result?.value;
|
|
100114
100786
|
if (setValue === null) return null;
|
|
100115
100787
|
await sleep(SETTLE_BEFORE_REREAD_MS);
|
|
100116
|
-
const
|
|
100117
|
-
if (holdsTypedText(
|
|
100788
|
+
const settled2 = await conversationReadBack(ctx, node, contents);
|
|
100789
|
+
if (holdsTypedText(settled2, text2)) {
|
|
100118
100790
|
return {
|
|
100119
|
-
value:
|
|
100791
|
+
value: settled2,
|
|
100120
100792
|
via: "value_setter",
|
|
100121
100793
|
insert_text_readback: readBack2
|
|
100122
100794
|
};
|
|
100123
100795
|
}
|
|
100124
100796
|
throw new BridgeCommandError(
|
|
100125
100797
|
"element_not_found",
|
|
100126
|
-
`${target2} took the value-setter write but does not hold the text (read back ${quoteReadBack(
|
|
100798
|
+
`${target2} took the value-setter write but does not hold the text (read back ${quoteReadBack(settled2)}), so nothing was reported typed`
|
|
100127
100799
|
);
|
|
100128
100800
|
}
|
|
100129
100801
|
async function iframeScopeOf(ctx, contents, node) {
|
|
@@ -102219,6 +102891,7 @@ const DOCUMENT_SCOPED = /* @__PURE__ */ new Set([
|
|
|
102219
102891
|
"screenshot",
|
|
102220
102892
|
"click",
|
|
102221
102893
|
"type",
|
|
102894
|
+
"press",
|
|
102222
102895
|
"scroll",
|
|
102223
102896
|
"logs",
|
|
102224
102897
|
// `download` names a control on the CURRENT document (the link or button that
|
|
@@ -102230,15 +102903,27 @@ const DOCUMENT_SCOPED = /* @__PURE__ */ new Set([
|
|
|
102230
102903
|
// say why, and the pair is what replaced the single post-hoc check the round-1
|
|
102231
102904
|
// review refused (M2).
|
|
102232
102905
|
"download",
|
|
102233
|
-
"upload"
|
|
102906
|
+
"upload",
|
|
102907
|
+
// `record_start` captures PIXELS of the current document, which is the same
|
|
102908
|
+
// class of data `screenshot` gates, so it is authorized against that document
|
|
102909
|
+
// on entry and again on the result (D8). `record_stop` reveals nothing new —
|
|
102910
|
+
// it ends a capture the current document already authorized and writes bytes
|
|
102911
|
+
// whose destination was approved at start — so it is deliberately NOT in this
|
|
102912
|
+
// set. NEITHER is a NAVIGATING_ACTION: a recording does not drive the page.
|
|
102913
|
+
"record_start"
|
|
102234
102914
|
]);
|
|
102235
102915
|
const NAVIGATING_ACTIONS = /* @__PURE__ */ new Set([
|
|
102236
102916
|
"click",
|
|
102237
102917
|
"type",
|
|
102918
|
+
"press",
|
|
102238
102919
|
"download",
|
|
102239
102920
|
"upload"
|
|
102240
102921
|
]);
|
|
102241
|
-
const NAVIGATION_ACTIONS = /* @__PURE__ */ new Set([
|
|
102922
|
+
const NAVIGATION_ACTIONS = /* @__PURE__ */ new Set([
|
|
102923
|
+
"click",
|
|
102924
|
+
"type",
|
|
102925
|
+
"press"
|
|
102926
|
+
]);
|
|
102242
102927
|
const TAB_SCOPED = /* @__PURE__ */ new Set([
|
|
102243
102928
|
"goto",
|
|
102244
102929
|
"read",
|
|
@@ -102250,6 +102935,7 @@ const TAB_SCOPED = /* @__PURE__ */ new Set([
|
|
|
102250
102935
|
"screenshot",
|
|
102251
102936
|
"click",
|
|
102252
102937
|
"type",
|
|
102938
|
+
"press",
|
|
102253
102939
|
"scroll",
|
|
102254
102940
|
"logs",
|
|
102255
102941
|
"close",
|
|
@@ -102270,7 +102956,13 @@ const TAB_SCOPED = /* @__PURE__ */ new Set([
|
|
|
102270
102956
|
"network_start",
|
|
102271
102957
|
"network_stop",
|
|
102272
102958
|
"network_read",
|
|
102273
|
-
"network_clear"
|
|
102959
|
+
"network_clear",
|
|
102960
|
+
// Both recording verbs are TAB-scoped: a recording is the tab's own capture,
|
|
102961
|
+
// and the finalize reads a stream that belongs to that tab's session. The
|
|
102962
|
+
// stop can hold the lane for up to 45 s while it drains, which is the same
|
|
102963
|
+
// bargain `download` already makes (D7).
|
|
102964
|
+
"record_start",
|
|
102965
|
+
"record_stop"
|
|
102274
102966
|
]);
|
|
102275
102967
|
const RESTORE_CONCURRENCY = 4;
|
|
102276
102968
|
const RESTORE_TAB_TIMEOUT_MS = 1e4;
|
|
@@ -102433,7 +103125,17 @@ class BrowserHost {
|
|
|
102433
103125
|
const operation = async () => {
|
|
102434
103126
|
assertDocument();
|
|
102435
103127
|
const result = await this.perform(method, params, requestId2);
|
|
102436
|
-
|
|
103128
|
+
try {
|
|
103129
|
+
assertDocument();
|
|
103130
|
+
} catch (error) {
|
|
103131
|
+
if (method === "record_start") {
|
|
103132
|
+
await abortAndEnd(
|
|
103133
|
+
record.view.webContents.id,
|
|
103134
|
+
"document_refused_after_start"
|
|
103135
|
+
);
|
|
103136
|
+
}
|
|
103137
|
+
throw error;
|
|
103138
|
+
}
|
|
102437
103139
|
return result;
|
|
102438
103140
|
};
|
|
102439
103141
|
if (!NAVIGATION_ACTIONS.has(method)) return operation();
|
|
@@ -102502,6 +103204,8 @@ class BrowserHost {
|
|
|
102502
103204
|
return click(this, params);
|
|
102503
103205
|
case "type":
|
|
102504
103206
|
return type(this, params);
|
|
103207
|
+
case "press":
|
|
103208
|
+
return press(this, params);
|
|
102505
103209
|
case "download":
|
|
102506
103210
|
return download(this, params);
|
|
102507
103211
|
case "upload":
|
|
@@ -102514,6 +103218,10 @@ class BrowserHost {
|
|
|
102514
103218
|
return networkRead(this, params, requestId2);
|
|
102515
103219
|
case "network_clear":
|
|
102516
103220
|
return networkClear(this, params, requestId2);
|
|
103221
|
+
case "record_start":
|
|
103222
|
+
return recordStart(this, params, requestId2);
|
|
103223
|
+
case "record_stop":
|
|
103224
|
+
return recordStop(this, params, requestId2);
|
|
102517
103225
|
case "request_access":
|
|
102518
103226
|
return this.approvals.requestAccess(
|
|
102519
103227
|
params.url,
|
|
@@ -104695,10 +105403,10 @@ function registerBrowserIpc(options) {
|
|
|
104695
105403
|
if (!owner || owner.isDestroyed() || !owner.isVisible()) return null;
|
|
104696
105404
|
const zoom = owner.webContents.getZoomFactor();
|
|
104697
105405
|
return new Promise((resolve) => {
|
|
104698
|
-
let
|
|
105406
|
+
let settled2 = false;
|
|
104699
105407
|
const settle2 = (selection) => {
|
|
104700
|
-
if (
|
|
104701
|
-
|
|
105408
|
+
if (settled2) return;
|
|
105409
|
+
settled2 = true;
|
|
104702
105410
|
resolve(tabActionsMenuSelectionOrNull(selection));
|
|
104703
105411
|
};
|
|
104704
105412
|
const menu = electron.Menu.buildFromTemplate(
|
|
@@ -112464,16 +113172,16 @@ function runInOwnProcessGroup(input) {
|
|
|
112464
113172
|
const log2 = input.log ?? (() => {
|
|
112465
113173
|
});
|
|
112466
113174
|
return new Promise((resolve) => {
|
|
112467
|
-
let
|
|
113175
|
+
let settled2 = false;
|
|
112468
113176
|
let timedOut = false;
|
|
112469
113177
|
let stdout = "";
|
|
112470
113178
|
let stderr = "";
|
|
112471
113179
|
let groupPid = null;
|
|
112472
113180
|
let timer = null;
|
|
112473
113181
|
let escalation = null;
|
|
112474
|
-
const
|
|
112475
|
-
if (
|
|
112476
|
-
|
|
113182
|
+
const finish2 = (result) => {
|
|
113183
|
+
if (settled2) return;
|
|
113184
|
+
settled2 = true;
|
|
112477
113185
|
if (timer) clearTimeout(timer);
|
|
112478
113186
|
dropStream(child?.stdout);
|
|
112479
113187
|
dropStream(child?.stderr);
|
|
@@ -112494,7 +113202,7 @@ function runInOwnProcessGroup(input) {
|
|
|
112494
113202
|
`Could not start ${input.command}: ${error.message}`,
|
|
112495
113203
|
"error"
|
|
112496
113204
|
);
|
|
112497
|
-
|
|
113205
|
+
finish2({
|
|
112498
113206
|
exitCode: null,
|
|
112499
113207
|
stdout,
|
|
112500
113208
|
stderr: error.message,
|
|
@@ -112518,7 +113226,7 @@ function runInOwnProcessGroup(input) {
|
|
|
112518
113226
|
child.stderr?.on("data", (chunk) => record(chunk, "stderr"));
|
|
112519
113227
|
child.on("error", (error) => {
|
|
112520
113228
|
log2(`The updater could not be run: ${error.message}`, "error");
|
|
112521
|
-
|
|
113229
|
+
finish2({
|
|
112522
113230
|
exitCode: null,
|
|
112523
113231
|
stdout,
|
|
112524
113232
|
stderr: stderr.length > 0 ? stderr : error.message,
|
|
@@ -112528,7 +113236,7 @@ function runInOwnProcessGroup(input) {
|
|
|
112528
113236
|
});
|
|
112529
113237
|
});
|
|
112530
113238
|
child.on("close", (code) => {
|
|
112531
|
-
|
|
113239
|
+
finish2({
|
|
112532
113240
|
exitCode: code,
|
|
112533
113241
|
stdout,
|
|
112534
113242
|
stderr,
|
|
@@ -112553,7 +113261,7 @@ function runInOwnProcessGroup(input) {
|
|
|
112553
113261
|
signalInstallGroup(groupPid, "SIGKILL");
|
|
112554
113262
|
}, graceMs);
|
|
112555
113263
|
escalation.unref?.();
|
|
112556
|
-
|
|
113264
|
+
finish2({
|
|
112557
113265
|
exitCode: null,
|
|
112558
113266
|
stdout,
|
|
112559
113267
|
stderr,
|
|
@@ -112776,11 +113484,11 @@ async function fetchServerReleaseNotes(version, options) {
|
|
|
112776
113484
|
}
|
|
112777
113485
|
function getJson(url, timeoutMs) {
|
|
112778
113486
|
return new Promise((resolve, reject) => {
|
|
112779
|
-
let
|
|
112780
|
-
const settle2 = (
|
|
112781
|
-
if (
|
|
112782
|
-
|
|
112783
|
-
|
|
113487
|
+
let settled2 = false;
|
|
113488
|
+
const settle2 = (finish2) => {
|
|
113489
|
+
if (settled2) return;
|
|
113490
|
+
settled2 = true;
|
|
113491
|
+
finish2();
|
|
112784
113492
|
};
|
|
112785
113493
|
const fail = (error) => settle2(
|
|
112786
113494
|
() => reject(error instanceof Error ? error : new Error(String(error)))
|
|
@@ -112939,10 +113647,10 @@ function runExtraction(zipPath, stagingRoot, options = {}) {
|
|
|
112939
113647
|
const command = options.command ?? DITTO_PATH;
|
|
112940
113648
|
const timeoutMs = options.timeoutMs ?? EXTRACTION_TIMEOUT_MS;
|
|
112941
113649
|
return new Promise((resolve) => {
|
|
112942
|
-
let
|
|
112943
|
-
const
|
|
112944
|
-
if (
|
|
112945
|
-
|
|
113650
|
+
let settled2 = false;
|
|
113651
|
+
const finish2 = (result) => {
|
|
113652
|
+
if (settled2) return;
|
|
113653
|
+
settled2 = true;
|
|
112946
113654
|
clearTimeout(timer);
|
|
112947
113655
|
resolve(result);
|
|
112948
113656
|
};
|
|
@@ -112971,15 +113679,15 @@ function runExtraction(zipPath, stagingRoot, options = {}) {
|
|
|
112971
113679
|
child.pid,
|
|
112972
113680
|
(message) => logger.warn(message, LogFileType.UPDATE_SERVICE)
|
|
112973
113681
|
);
|
|
112974
|
-
|
|
113682
|
+
finish2({
|
|
112975
113683
|
ok: false,
|
|
112976
113684
|
reason: `it was still running after ${timeoutMs} ms`
|
|
112977
113685
|
});
|
|
112978
113686
|
}, timeoutMs);
|
|
112979
|
-
child.on("error", (error) =>
|
|
113687
|
+
child.on("error", (error) => finish2({ ok: false, reason: String(error) }));
|
|
112980
113688
|
child.on(
|
|
112981
113689
|
"close",
|
|
112982
|
-
(code) =>
|
|
113690
|
+
(code) => finish2(
|
|
112983
113691
|
code === 0 ? { ok: true } : {
|
|
112984
113692
|
ok: false,
|
|
112985
113693
|
reason: `ditto exited ${code}${stderr.trim() ? `: ${stderr.trim()}` : ""}`
|
|
@@ -115525,10 +116233,10 @@ ${heal.removed.join("\n")}`,
|
|
|
115525
116233
|
rememberAbandonedAppFeedFetch(fetch2) {
|
|
115526
116234
|
if (this.appFeedAbandonedFetches.has(fetch2)) return;
|
|
115527
116235
|
this.appFeedAbandonedFetches.add(fetch2);
|
|
115528
|
-
const
|
|
116236
|
+
const settled2 = () => {
|
|
115529
116237
|
this.appFeedAbandonedFetches.delete(fetch2);
|
|
115530
116238
|
};
|
|
115531
|
-
fetch2.then(
|
|
116239
|
+
fetch2.then(settled2, settled2);
|
|
115532
116240
|
}
|
|
115533
116241
|
/**
|
|
115534
116242
|
* Arm the download's stall watchdog for a fresh attempt.
|
|
@@ -119236,21 +119944,21 @@ class ViewerEndpoint {
|
|
|
119236
119944
|
let buffer = "";
|
|
119237
119945
|
let closed = false;
|
|
119238
119946
|
let chain = Promise.resolve();
|
|
119239
|
-
const
|
|
119947
|
+
const finish2 = () => {
|
|
119240
119948
|
closed = true;
|
|
119241
119949
|
socket.destroy();
|
|
119242
119950
|
};
|
|
119243
119951
|
const authTimer = setTimeout(() => {
|
|
119244
|
-
if (!authenticated)
|
|
119952
|
+
if (!authenticated) finish2();
|
|
119245
119953
|
}, AUTH_TIMEOUT_MS);
|
|
119246
119954
|
socket.setEncoding("utf8");
|
|
119247
|
-
socket.on("error",
|
|
119955
|
+
socket.on("error", finish2);
|
|
119248
119956
|
socket.on("close", () => clearTimeout(authTimer));
|
|
119249
119957
|
socket.on("data", (chunk) => {
|
|
119250
119958
|
if (closed) return;
|
|
119251
119959
|
buffer += chunk;
|
|
119252
119960
|
if (buffer.length > MAX_FRAME_BYTES) {
|
|
119253
|
-
|
|
119961
|
+
finish2();
|
|
119254
119962
|
return;
|
|
119255
119963
|
}
|
|
119256
119964
|
for (; ; ) {
|
|
@@ -119265,7 +119973,7 @@ class ViewerEndpoint {
|
|
|
119265
119973
|
authenticated = true;
|
|
119266
119974
|
clearTimeout(authTimer);
|
|
119267
119975
|
},
|
|
119268
|
-
finish
|
|
119976
|
+
finish: finish2
|
|
119269
119977
|
}).catch(() => void 0)
|
|
119270
119978
|
);
|
|
119271
119979
|
}
|