dsh-gitbash-shell 0.42.2 → 0.43.0
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/CHANGELOG.md +183 -0
- package/dsh.plugin.json +1 -1
- package/package.json +3 -3
- package/src/bash-render.js +1 -1
- package/src/bash-tool.js +1 -1
- package/src/client.js +210 -22
- package/src/fastctx-bridge.js +124 -54
- package/src/index.js +46 -11
- package/src/native-executor.js +2 -1
- package/src/native-tool.js +5 -2
- package/src/tool-runner.js +245 -44
- package/src/toolchain.js +16 -10
package/src/client.js
CHANGED
|
@@ -132,6 +132,12 @@ window.__ModuleLoader__.load({
|
|
|
132
132
|
"tools.state.current": "已是最新",
|
|
133
133
|
"tools.adminHint": "需要管理员权限:会弹出 UAC 窗口,请在电脑上确认",
|
|
134
134
|
"tools.working": "处理中",
|
|
135
|
+
"tools.cancel": "取消",
|
|
136
|
+
"tools.cancelledNote": "已取消:完成的条目保留结果,其余已跳过。",
|
|
137
|
+
"tools.kind.cancelled": "已取消",
|
|
138
|
+
"tools.kind.skipped": "已跳过",
|
|
139
|
+
"tools.kind.timeout": "超时",
|
|
140
|
+
"tools.kind.network": "网络失败",
|
|
135
141
|
"tools.resultOk": "成功",
|
|
136
142
|
"tools.resultFail": "失败",
|
|
137
143
|
"tools.installing": "安装中…",
|
|
@@ -212,6 +218,12 @@ window.__ModuleLoader__.load({
|
|
|
212
218
|
"tools.state.current": "Up to date",
|
|
213
219
|
"tools.adminHint": "Needs administrator: a UAC prompt will appear — accept it on this machine",
|
|
214
220
|
"tools.working": "Working",
|
|
221
|
+
"tools.cancel": "取消",
|
|
222
|
+
"tools.cancelledNote": "已取消:完成的条目保留结果,其余已跳过。",
|
|
223
|
+
"tools.kind.cancelled": "已取消",
|
|
224
|
+
"tools.kind.skipped": "已跳过",
|
|
225
|
+
"tools.kind.timeout": "超时",
|
|
226
|
+
"tools.kind.network": "网络失败",
|
|
215
227
|
"tools.resultOk": "succeeded",
|
|
216
228
|
"tools.resultFail": "failed",
|
|
217
229
|
"tools.installing": "Installing…",
|
|
@@ -302,6 +314,12 @@ window.__ModuleLoader__.load({
|
|
|
302
314
|
"tools.state.current": "محدَّث",
|
|
303
315
|
"tools.adminHint": "يتطلب صلاحيات المسؤول: ستظهر نافذة UAC — أكّدها على هذا الجهاز",
|
|
304
316
|
"tools.working": "جارٍ العمل",
|
|
317
|
+
"tools.cancel": "إلغاء",
|
|
318
|
+
"tools.cancelledNote": "تم الإلغاء: تحتفظ الإدخالات المكتملة بنتائجها، وتخطّي الباقي.",
|
|
319
|
+
"tools.kind.cancelled": "أُلغي",
|
|
320
|
+
"tools.kind.skipped": "تم التخطي",
|
|
321
|
+
"tools.kind.timeout": "انتهت المهلة",
|
|
322
|
+
"tools.kind.network": "فشل الشبكة",
|
|
305
323
|
"tools.resultOk": "نجح",
|
|
306
324
|
"tools.resultFail": "فشل",
|
|
307
325
|
"tools.installing": "جارٍ التثبيت…",
|
|
@@ -382,6 +400,12 @@ window.__ModuleLoader__.load({
|
|
|
382
400
|
"tools.state.current": "Aktuell",
|
|
383
401
|
"tools.adminHint": "Erfordert Administratorrechte: Ein UAC-Fenster erscheint — bitte an diesem Rechner bestätigen",
|
|
384
402
|
"tools.working": "Läuft",
|
|
403
|
+
"tools.cancel": "Abbrechen",
|
|
404
|
+
"tools.cancelledNote": "Abgebrochen: abgeschlossene Einträge behalten ihr Ergebnis, der Rest wurde übersprungen.",
|
|
405
|
+
"tools.kind.cancelled": "Abgebrochen",
|
|
406
|
+
"tools.kind.skipped": "Übersprungen",
|
|
407
|
+
"tools.kind.timeout": "Timeout",
|
|
408
|
+
"tools.kind.network": "Netzwerkfehler",
|
|
385
409
|
"tools.resultOk": "erfolgreich",
|
|
386
410
|
"tools.resultFail": "fehlgeschlagen",
|
|
387
411
|
"tools.installing": "Wird installiert…",
|
|
@@ -462,6 +486,12 @@ window.__ModuleLoader__.load({
|
|
|
462
486
|
"tools.state.current": "À jour",
|
|
463
487
|
"tools.adminHint": "Nécessite les droits administrateur : une fenêtre UAC va s'afficher — validez-la sur cette machine",
|
|
464
488
|
"tools.working": "En cours",
|
|
489
|
+
"tools.cancel": "Annuler",
|
|
490
|
+
"tools.cancelledNote": "Annulé : les entrées terminées conservent leur résultat, les autres ont été ignorées.",
|
|
491
|
+
"tools.kind.cancelled": "Annulé",
|
|
492
|
+
"tools.kind.skipped": "Ignoré",
|
|
493
|
+
"tools.kind.timeout": "Expiré",
|
|
494
|
+
"tools.kind.network": "Échec réseau",
|
|
465
495
|
"tools.resultOk": "réussi",
|
|
466
496
|
"tools.resultFail": "échec",
|
|
467
497
|
"tools.installing": "Installation…",
|
|
@@ -542,6 +572,12 @@ window.__ModuleLoader__.load({
|
|
|
542
572
|
"tools.state.current": "अद्यतन",
|
|
543
573
|
"tools.adminHint": "व्यवस्थापक अनुमति चाहिए: एक UAC विंडो दिखेगी — इस मशीन पर पुष्टि करें",
|
|
544
574
|
"tools.working": "चल रहा है",
|
|
575
|
+
"tools.cancel": "रद्द करें",
|
|
576
|
+
"tools.cancelledNote": "रद्द: पूर्ण प्रविष्टियाँ अपना परिणाम रखती हैं; शेष छोड़ दिए गए।",
|
|
577
|
+
"tools.kind.cancelled": "रद्द",
|
|
578
|
+
"tools.kind.skipped": "छोड़ा गया",
|
|
579
|
+
"tools.kind.timeout": "समय समाप्त",
|
|
580
|
+
"tools.kind.network": "नेटवर्क विफल",
|
|
545
581
|
"tools.resultOk": "सफल",
|
|
546
582
|
"tools.resultFail": "विफल",
|
|
547
583
|
"tools.installing": "इंस्टॉल हो रहा है…",
|
|
@@ -622,6 +658,12 @@ window.__ModuleLoader__.load({
|
|
|
622
658
|
"tools.state.current": "Terbaru",
|
|
623
659
|
"tools.adminHint": "Perlu administrator: jendela UAC akan muncul — setujui di komputer ini",
|
|
624
660
|
"tools.working": "Memproses",
|
|
661
|
+
"tools.cancel": "Batalkan",
|
|
662
|
+
"tools.cancelledNote": "Dibatalkan: entri yang selesai tetap berhasil; sisanya dilewati.",
|
|
663
|
+
"tools.kind.cancelled": "Dibatalkan",
|
|
664
|
+
"tools.kind.skipped": "Dilewati",
|
|
665
|
+
"tools.kind.timeout": "Habis waktu",
|
|
666
|
+
"tools.kind.network": "Kegagalan jaringan",
|
|
625
667
|
"tools.resultOk": "berhasil",
|
|
626
668
|
"tools.resultFail": "gagal",
|
|
627
669
|
"tools.installing": "Memasang…",
|
|
@@ -702,6 +744,12 @@ window.__ModuleLoader__.load({
|
|
|
702
744
|
"tools.state.current": "Aggiornato",
|
|
703
745
|
"tools.adminHint": "Richiede privilegi di amministratore: apparirà una finestra UAC — confermala su questo computer",
|
|
704
746
|
"tools.working": "In corso",
|
|
747
|
+
"tools.cancel": "Annulla",
|
|
748
|
+
"tools.cancelledNote": "Annullato: le voci completate conservano l'esito; le altre sono state saltate.",
|
|
749
|
+
"tools.kind.cancelled": "Annullato",
|
|
750
|
+
"tools.kind.skipped": "Saltato",
|
|
751
|
+
"tools.kind.timeout": "Timeout",
|
|
752
|
+
"tools.kind.network": "Errore di rete",
|
|
705
753
|
"tools.resultOk": "riuscito",
|
|
706
754
|
"tools.resultFail": "non riuscito",
|
|
707
755
|
"tools.installing": "Installazione…",
|
|
@@ -782,6 +830,12 @@ window.__ModuleLoader__.load({
|
|
|
782
830
|
"tools.state.current": "最新",
|
|
783
831
|
"tools.adminHint": "管理者権限が必要です。UAC の画面が表示されるので、この PC で承認してください",
|
|
784
832
|
"tools.working": "処理中",
|
|
833
|
+
"tools.cancel": "キャンセル",
|
|
834
|
+
"tools.cancelledNote": "中止しました:完了した項目の結果は保持され、残りはスキップされました。",
|
|
835
|
+
"tools.kind.cancelled": "中止",
|
|
836
|
+
"tools.kind.skipped": "スキップ",
|
|
837
|
+
"tools.kind.timeout": "タイムアウト",
|
|
838
|
+
"tools.kind.network": "ネットワーク失敗",
|
|
785
839
|
"tools.resultOk": "成功",
|
|
786
840
|
"tools.resultFail": "失敗",
|
|
787
841
|
"tools.installing": "インストール中…",
|
|
@@ -862,6 +916,12 @@ window.__ModuleLoader__.load({
|
|
|
862
916
|
"tools.state.current": "최신",
|
|
863
917
|
"tools.adminHint": "관리자 권한이 필요합니다. UAC 창이 뜨면 이 PC에서 승인하세요",
|
|
864
918
|
"tools.working": "처리 중",
|
|
919
|
+
"tools.cancel": "취소",
|
|
920
|
+
"tools.cancelledNote": "취소됨: 완료된 항목의 결과는 유지되고 나머지는 건너뛰었습니다.",
|
|
921
|
+
"tools.kind.cancelled": "취소됨",
|
|
922
|
+
"tools.kind.skipped": "건너뜀",
|
|
923
|
+
"tools.kind.timeout": "시간 초과",
|
|
924
|
+
"tools.kind.network": "네트워크 실패",
|
|
865
925
|
"tools.resultOk": "성공",
|
|
866
926
|
"tools.resultFail": "실패",
|
|
867
927
|
"tools.installing": "설치 중…",
|
|
@@ -942,6 +1002,12 @@ window.__ModuleLoader__.load({
|
|
|
942
1002
|
"tools.state.current": "Bijgewerkt",
|
|
943
1003
|
"tools.adminHint": "Vereist beheerdersrechten: er verschijnt een UAC-venster — bevestig dat op deze computer",
|
|
944
1004
|
"tools.working": "Bezig",
|
|
1005
|
+
"tools.cancel": "Annuleren",
|
|
1006
|
+
"tools.cancelledNote": "Geannuleerd: voltooide items behouden hun resultaat; de rest is overgeslagen.",
|
|
1007
|
+
"tools.kind.cancelled": "Geannuleerd",
|
|
1008
|
+
"tools.kind.skipped": "Overgeslagen",
|
|
1009
|
+
"tools.kind.timeout": "Time-out",
|
|
1010
|
+
"tools.kind.network": "Netwerkfout",
|
|
945
1011
|
"tools.resultOk": "geslaagd",
|
|
946
1012
|
"tools.resultFail": "mislukt",
|
|
947
1013
|
"tools.installing": "Installeren…",
|
|
@@ -1022,6 +1088,12 @@ window.__ModuleLoader__.load({
|
|
|
1022
1088
|
"tools.state.current": "Aktualne",
|
|
1023
1089
|
"tools.adminHint": "Wymaga uprawnień administratora: pojawi się okno UAC — potwierdź je na tym komputerze",
|
|
1024
1090
|
"tools.working": "Przetwarzanie",
|
|
1091
|
+
"tools.cancel": "Anuluj",
|
|
1092
|
+
"tools.cancelledNote": "Anulowano: ukończone pozycje zachowują wynik, pozostałe pominięto.",
|
|
1093
|
+
"tools.kind.cancelled": "Anulowano",
|
|
1094
|
+
"tools.kind.skipped": "Pominięto",
|
|
1095
|
+
"tools.kind.timeout": "Przekroczono czas",
|
|
1096
|
+
"tools.kind.network": "Błąd sieci",
|
|
1025
1097
|
"tools.resultOk": "sukces",
|
|
1026
1098
|
"tools.resultFail": "niepowodzenie",
|
|
1027
1099
|
"tools.installing": "Instalowanie…",
|
|
@@ -1102,6 +1174,12 @@ window.__ModuleLoader__.load({
|
|
|
1102
1174
|
"tools.state.current": "Atualizado",
|
|
1103
1175
|
"tools.adminHint": "Requer administrador: aparecerá uma janela UAC — confirme-a neste computador",
|
|
1104
1176
|
"tools.working": "A processar",
|
|
1177
|
+
"tools.cancel": "Cancelar",
|
|
1178
|
+
"tools.cancelledNote": "Cancelado: as entradas concluídas mantêm o resultado; as restantes foram ignoradas.",
|
|
1179
|
+
"tools.kind.cancelled": "Cancelado",
|
|
1180
|
+
"tools.kind.skipped": "Ignorado",
|
|
1181
|
+
"tools.kind.timeout": "Tempo esgotado",
|
|
1182
|
+
"tools.kind.network": "Falha de rede",
|
|
1105
1183
|
"tools.resultOk": "com êxito",
|
|
1106
1184
|
"tools.resultFail": "falhou",
|
|
1107
1185
|
"tools.installing": "A instalar…",
|
|
@@ -1182,6 +1260,12 @@ window.__ModuleLoader__.load({
|
|
|
1182
1260
|
"tools.state.current": "Актуально",
|
|
1183
1261
|
"tools.adminHint": "Нужны права администратора: появится окно UAC — подтвердите его на этом компьютере",
|
|
1184
1262
|
"tools.working": "Выполняется",
|
|
1263
|
+
"tools.cancel": "Отмена",
|
|
1264
|
+
"tools.cancelledNote": "Отменено: завершённые пункты сохраняют результат, остальные пропущены.",
|
|
1265
|
+
"tools.kind.cancelled": "Отменено",
|
|
1266
|
+
"tools.kind.skipped": "Пропущено",
|
|
1267
|
+
"tools.kind.timeout": "Превышено время",
|
|
1268
|
+
"tools.kind.network": "Сбой сети",
|
|
1185
1269
|
"tools.resultOk": "успешно",
|
|
1186
1270
|
"tools.resultFail": "ошибка",
|
|
1187
1271
|
"tools.installing": "Установка…",
|
|
@@ -1262,6 +1346,12 @@ window.__ModuleLoader__.load({
|
|
|
1262
1346
|
"tools.state.current": "Senaste",
|
|
1263
1347
|
"tools.adminHint": "Kräver administratör: ett UAC-fönster visas — bekräfta det på den här datorn",
|
|
1264
1348
|
"tools.working": "Arbetar",
|
|
1349
|
+
"tools.cancel": "Avbryt",
|
|
1350
|
+
"tools.cancelledNote": "Avbruten: färdiga poster behåller sitt resultat; resten hoppades över.",
|
|
1351
|
+
"tools.kind.cancelled": "Avbruten",
|
|
1352
|
+
"tools.kind.skipped": "Hoppade över",
|
|
1353
|
+
"tools.kind.timeout": "Tidsgräns",
|
|
1354
|
+
"tools.kind.network": "Nätverksfel",
|
|
1265
1355
|
"tools.resultOk": "lyckades",
|
|
1266
1356
|
"tools.resultFail": "misslyckades",
|
|
1267
1357
|
"tools.installing": "Installerar…",
|
|
@@ -1342,6 +1432,12 @@ window.__ModuleLoader__.load({
|
|
|
1342
1432
|
"tools.state.current": "ล่าสุดแล้ว",
|
|
1343
1433
|
"tools.adminHint": "ต้องใช้สิทธิ์ผู้ดูแลระบบ จะมีหน้าต่าง UAC ขึ้นมา กรุณายืนยันบนเครื่องนี้",
|
|
1344
1434
|
"tools.working": "กำลังดำเนินการ",
|
|
1435
|
+
"tools.cancel": "ยกเลิก",
|
|
1436
|
+
"tools.cancelledNote": "ยกเลิกแล้ว: รายการที่เสร็จแล้วคงผลลัพธ์ไว้ ส่วนที่เหลือถูกข้าม",
|
|
1437
|
+
"tools.kind.cancelled": "ยกเลิกแล้ว",
|
|
1438
|
+
"tools.kind.skipped": "ข้ามไว้",
|
|
1439
|
+
"tools.kind.timeout": "หมดเวลา",
|
|
1440
|
+
"tools.kind.network": "เครือข่ายล้มเหลว",
|
|
1345
1441
|
"tools.resultOk": "สำเร็จ",
|
|
1346
1442
|
"tools.resultFail": "ล้มเหลว",
|
|
1347
1443
|
"tools.installing": "กำลังติดตั้ง…",
|
|
@@ -1422,6 +1518,12 @@ window.__ModuleLoader__.load({
|
|
|
1422
1518
|
"tools.state.current": "Güncel",
|
|
1423
1519
|
"tools.adminHint": "Yönetici izni gerekir: bir UAC penceresi açılır — bu bilgisayarda onaylayın",
|
|
1424
1520
|
"tools.working": "İşleniyor",
|
|
1521
|
+
"tools.cancel": "İptal",
|
|
1522
|
+
"tools.cancelledNote": "İptal edildi: tamamlanan girdiler sonuçlarını korur; kalanlar atlandı.",
|
|
1523
|
+
"tools.kind.cancelled": "İptal edildi",
|
|
1524
|
+
"tools.kind.skipped": "Atlandı",
|
|
1525
|
+
"tools.kind.timeout": "Zaman aşımı",
|
|
1526
|
+
"tools.kind.network": "Ağ hatası",
|
|
1425
1527
|
"tools.resultOk": "başarılı",
|
|
1426
1528
|
"tools.resultFail": "başarısız",
|
|
1427
1529
|
"tools.installing": "Kuruluyor…",
|
|
@@ -1502,6 +1604,12 @@ window.__ModuleLoader__.load({
|
|
|
1502
1604
|
"tools.state.current": "Mới nhất",
|
|
1503
1605
|
"tools.adminHint": "Cần quyền quản trị: cửa sổ UAC sẽ hiện ra — hãy xác nhận trên máy này",
|
|
1504
1606
|
"tools.working": "Đang xử lý",
|
|
1607
|
+
"tools.cancel": "Hủy bỏ",
|
|
1608
|
+
"tools.cancelledNote": "Đã hủy: các mục đã xong giữ nguyên kết quả; phần còn lại đã bỏ qua.",
|
|
1609
|
+
"tools.kind.cancelled": "Đã hủy",
|
|
1610
|
+
"tools.kind.skipped": "Đã bỏ qua",
|
|
1611
|
+
"tools.kind.timeout": "Hết thời gian",
|
|
1612
|
+
"tools.kind.network": "Lỗi mạng",
|
|
1505
1613
|
"tools.resultOk": "thành công",
|
|
1506
1614
|
"tools.resultFail": "thất bại",
|
|
1507
1615
|
"tools.installing": "Đang cài…",
|
|
@@ -1582,6 +1690,12 @@ window.__ModuleLoader__.load({
|
|
|
1582
1690
|
"tools.state.current": "已經最新",
|
|
1583
1691
|
"tools.adminHint": "需要管理員權限:會彈出 UAC 視窗,請喺電腦度確認",
|
|
1584
1692
|
"tools.working": "處理緊",
|
|
1693
|
+
"tools.cancel": "取消",
|
|
1694
|
+
"tools.cancelledNote": "已取消:完成的項目保留結果,其餘已跳過。",
|
|
1695
|
+
"tools.kind.cancelled": "已取消",
|
|
1696
|
+
"tools.kind.skipped": "已跳過",
|
|
1697
|
+
"tools.kind.timeout": "逾時",
|
|
1698
|
+
"tools.kind.network": "網絡失敗",
|
|
1585
1699
|
"tools.resultOk": "成功",
|
|
1586
1700
|
"tools.resultFail": "失敗",
|
|
1587
1701
|
"tools.installing": "安裝緊…",
|
|
@@ -1662,6 +1776,12 @@ window.__ModuleLoader__.load({
|
|
|
1662
1776
|
"tools.state.current": "已經最新",
|
|
1663
1777
|
"tools.adminHint": "需要管理員權限:會彈出 UAC 視窗,請喺電腦度確認",
|
|
1664
1778
|
"tools.working": "處理緊",
|
|
1779
|
+
"tools.cancel": "取消",
|
|
1780
|
+
"tools.cancelledNote": "已取消:完成的項目保留結果,其餘已跳過。",
|
|
1781
|
+
"tools.kind.cancelled": "已取消",
|
|
1782
|
+
"tools.kind.skipped": "已跳過",
|
|
1783
|
+
"tools.kind.timeout": "逾時",
|
|
1784
|
+
"tools.kind.network": "網絡失敗",
|
|
1665
1785
|
"tools.resultOk": "成功",
|
|
1666
1786
|
"tools.resultFail": "失敗",
|
|
1667
1787
|
"tools.installing": "安裝緊…",
|
|
@@ -1742,6 +1862,12 @@ window.__ModuleLoader__.load({
|
|
|
1742
1862
|
"tools.state.current": "已是最新",
|
|
1743
1863
|
"tools.adminHint": "需要管理員權限:會彈出 UAC 視窗,請在這台電腦上確認",
|
|
1744
1864
|
"tools.working": "處理中",
|
|
1865
|
+
"tools.cancel": "取消",
|
|
1866
|
+
"tools.cancelledNote": "已取消:完成的項目保留結果,其餘已跳過。",
|
|
1867
|
+
"tools.kind.cancelled": "已取消",
|
|
1868
|
+
"tools.kind.skipped": "已跳過",
|
|
1869
|
+
"tools.kind.timeout": "逾時",
|
|
1870
|
+
"tools.kind.network": "網路失敗",
|
|
1745
1871
|
"tools.resultOk": "成功",
|
|
1746
1872
|
"tools.resultFail": "失敗",
|
|
1747
1873
|
"tools.installing": "安裝中…",
|
|
@@ -1763,6 +1889,15 @@ window.__ModuleLoader__.load({
|
|
|
1763
1889
|
return Object.prototype.hasOwnProperty.call(bag, key);
|
|
1764
1890
|
}
|
|
1765
1891
|
|
|
1892
|
+
/* Issue #35: how long the entry in flight has been running, in the
|
|
1893
|
+
locale-neutral "2m13s" / "47s" form — a duration needs no words. */
|
|
1894
|
+
function formatElapsed(ms) {
|
|
1895
|
+
var total = Math.max(0, Math.round(ms / 1000));
|
|
1896
|
+
var m = Math.floor(total / 60);
|
|
1897
|
+
var s = total % 60;
|
|
1898
|
+
return m > 0 ? m + "m" + (s < 10 ? "0" + s : "" + s) + "s" : s + "s";
|
|
1899
|
+
}
|
|
1900
|
+
|
|
1766
1901
|
/* Resolve one locale tag against what this plugin ships: the exact tag,
|
|
1767
1902
|
then the primary subtag, then English. Chinese is special-cased because
|
|
1768
1903
|
the traditional variants are shipped while a bare zh-Hant-* is not
|
|
@@ -1890,6 +2025,10 @@ window.__ModuleLoader__.load({
|
|
|
1890
2025
|
".gb-toolState.gb-st-running{border-color:var(--dsw-alias-brand-primary);color:var(--dsw-alias-brand-primary);display:inline-flex;align-items:center;gap:5px}",
|
|
1891
2026
|
".gb-st-ok{border-color:var(--dsw-alias-state-success-primary,#3fb950);color:var(--dsw-alias-state-success-primary,#3fb950)}",
|
|
1892
2027
|
".gb-st-fail{border-color:var(--dsw-alias-status-danger,#e5484d);color:var(--dsw-alias-status-danger,#e5484d)}",
|
|
2028
|
+
".gb-st-skip{color:var(--dsw-alias-label-tertiary)}",
|
|
2029
|
+
".gb-toolElapsed{flex:none;font-size:calc(11px + var(--dsh-content-font-delta-secondary, 0px));color:var(--dsw-alias-label-tertiary);font-variant-numeric:tabular-nums}",
|
|
2030
|
+
".gb-toolCancel{flex:none;padding:1px 10px}",
|
|
2031
|
+
".gb-toolTail{margin:0 0 4px;font-size:calc(11px + var(--dsh-content-font-delta-secondary, 0px));line-height:1.4;color:var(--dsw-alias-label-tertiary);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}",
|
|
1893
2032
|
".gb-spin{flex:none;display:inline-block;width:10px;height:10px;border:2px solid var(--dsw-alias-border-l2);border-top-color:var(--dsw-alias-brand-primary);border-radius:50%;animation:gb-spin .8s linear infinite}",
|
|
1894
2033
|
".gb-toolBar{flex:1 1 auto;min-width:32px;height:4px;border-radius:2px;background:var(--dsw-alias-border-l2);overflow:hidden}",
|
|
1895
2034
|
".gb-toolBarFill{display:block;height:100%;width:38%;border-radius:2px;background:var(--dsw-alias-brand-primary);animation:gb-slide 1.15s ease-in-out infinite}",
|
|
@@ -2068,18 +2207,33 @@ window.__ModuleLoader__.load({
|
|
|
2068
2207
|
} catch (error_) { /* keep the switch usable */ }
|
|
2069
2208
|
}, []);
|
|
2070
2209
|
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
var setBashDraft = bashState[1];
|
|
2074
|
-
var bashSavedState = useState(false);
|
|
2075
|
-
var bashSaved = bashSavedState[0];
|
|
2076
|
-
var setBashSaved = bashSavedState[1];
|
|
2077
|
-
useEffect(function () {
|
|
2210
|
+
var scope = props.scope;
|
|
2211
|
+
var snap = { status: "unavailable" };
|
|
2078
2212
|
try {
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2213
|
+
if (scope && typeof scope.getSnapshot === "function") snap = scope.getSnapshot();
|
|
2214
|
+
} catch (error_) { /* keep unavailable */ }
|
|
2215
|
+
|
|
2216
|
+
var bashState = useState({ scope: scope, value: "", dirty: false, owner: {} });
|
|
2217
|
+
var bashDraft = bashState[0].scope === scope ? bashState[0].value : "";
|
|
2218
|
+
var setBashDraft = bashState[1];
|
|
2219
|
+
var bashSaved = bashState[0].scope === scope && bashState[0].saved === true;
|
|
2220
|
+
function setBashSaved(saved) {
|
|
2221
|
+
setBashDraft(function (previous) {
|
|
2222
|
+
// A late save only belongs to the exact draft that submitted it.
|
|
2223
|
+
if (previous.scope !== scope || previous.owner !== bashState[0].owner || previous.saved === saved) return previous;
|
|
2224
|
+
return Object.assign({}, previous, { saved: saved === true, dirty: saved === true ? false : previous.dirty });
|
|
2225
|
+
});
|
|
2226
|
+
}
|
|
2227
|
+
var mirroredBashPath = snap.value && typeof snap.value.bashPath === "string" ? snap.value.bashPath : "";
|
|
2228
|
+
useEffect(function () {
|
|
2229
|
+
// Core's parent rerenders on mirror arrival. Hydrate once ready (or
|
|
2230
|
+
// for a new scope), but never replace this scope's local edits.
|
|
2231
|
+
setBashDraft(function (previous) {
|
|
2232
|
+
if (previous.scope !== scope) return { scope: scope, value: snap.status === "ready" ? mirroredBashPath : "", dirty: false, owner: {} };
|
|
2233
|
+
if (snap.status !== "ready" || previous.dirty || previous.value === mirroredBashPath) return previous;
|
|
2234
|
+
return { scope: scope, value: mirroredBashPath, dirty: false, owner: {} };
|
|
2235
|
+
});
|
|
2236
|
+
}, [scope, snap.status, mirroredBashPath]);
|
|
2083
2237
|
|
|
2084
2238
|
/* v0.38.0: the card's sections are FOLDERS. All seven stay collapsed
|
|
2085
2239
|
by default — the user scans seven labelled header rows, expands the
|
|
@@ -2098,13 +2252,6 @@ window.__ModuleLoader__.load({
|
|
|
2098
2252
|
});
|
|
2099
2253
|
}
|
|
2100
2254
|
|
|
2101
|
-
var scope = props.scope;
|
|
2102
|
-
|
|
2103
|
-
var snap = { status: "unavailable" };
|
|
2104
|
-
try {
|
|
2105
|
-
if (scope && typeof scope.getSnapshot === "function") snap = scope.getSnapshot();
|
|
2106
|
-
} catch (error_) { /* keep unavailable */ }
|
|
2107
|
-
|
|
2108
2255
|
var pageView = props.view === "page";
|
|
2109
2256
|
|
|
2110
2257
|
// Hooks run for every snapshot state; readiness only gates their work.
|
|
@@ -2301,7 +2448,7 @@ window.__ModuleLoader__.load({
|
|
|
2301
2448
|
E("span", { className: "gb-rowLabel" }, t("bash.label") + ":"),
|
|
2302
2449
|
),
|
|
2303
2450
|
E("div", { className: "gb-seg" },
|
|
2304
|
-
E("input", { className: "gb-input", type: "text", spellCheck: false, placeholder: "C:/Program Files/Git/bin/bash.exe", value: bashDraft, onChange: function (e) { setBashDraft(e.target.value
|
|
2451
|
+
E("input", { className: "gb-input", type: "text", spellCheck: false, placeholder: "C:/Program Files/Git/bin/bash.exe", value: bashDraft, onChange: function (e) { setBashDraft({ scope: scope, value: e.target.value, dirty: true, owner: {} }); } }),
|
|
2305
2452
|
E("button", {
|
|
2306
2453
|
type: "button",
|
|
2307
2454
|
className: "gb-saveBtn" + (bashSaved ? " gb-saved" : ""),
|
|
@@ -2562,6 +2709,19 @@ window.__ModuleLoader__.load({
|
|
|
2562
2709
|
.then(function () { setToolBusy(false); });
|
|
2563
2710
|
}
|
|
2564
2711
|
|
|
2712
|
+
function cancelTools() {
|
|
2713
|
+
// Issue #35: the host kills the whole winget process tree; the job
|
|
2714
|
+
// stays current (finished, cancelled) so the card can show what
|
|
2715
|
+
// happened, and `clear` forgets it when the view closes.
|
|
2716
|
+
return fetch(TOOLS_URL + "?action=cancel", { method: "POST", headers: { "content-type": "application/json" } })
|
|
2717
|
+
.then(function (res) {
|
|
2718
|
+
if (!res.ok) throw new Error("HTTP " + res.status);
|
|
2719
|
+
return res.json();
|
|
2720
|
+
})
|
|
2721
|
+
.then(function (data) { setToolJob(data !== null && typeof data === "object" && data.job ? data.job : null); })
|
|
2722
|
+
.catch(function (err) { setToolErr(String((err && err.message) || err)); });
|
|
2723
|
+
}
|
|
2724
|
+
|
|
2565
2725
|
var toolsSection = fold("sec.tools",
|
|
2566
2726
|
toolsData === null && toolErr === "" ? E("p", { className: "gb-hint" }, t("tools.loading")) : null,
|
|
2567
2727
|
toolErr !== "" ? E("p", { className: "gb-error" }, toolErr) : null,
|
|
@@ -2582,8 +2742,19 @@ window.__ModuleLoader__.load({
|
|
|
2582
2742
|
E("span", { className: "gb-spin" }),
|
|
2583
2743
|
t(isUpgrade ? "tools.updating" : "tools.installing"));
|
|
2584
2744
|
} else if (entry !== undefined) {
|
|
2585
|
-
|
|
2586
|
-
|
|
2745
|
+
/* Issue #35: the ending matters — cancelled/skipped are not
|
|
2746
|
+
failures, a timeout and a wedged download are not the
|
|
2747
|
+
same as winget saying no. Skipped entries are neutral. */
|
|
2748
|
+
var okBadge = entry.ok === true;
|
|
2749
|
+
var kindKey = okBadge ? "tools.resultOk"
|
|
2750
|
+
: entry.kind === "cancelled" ? "tools.kind.cancelled"
|
|
2751
|
+
: entry.kind === "skipped" ? "tools.kind.skipped"
|
|
2752
|
+
: entry.kind === "timeout" ? "tools.kind.timeout"
|
|
2753
|
+
: entry.kind === "network" ? "tools.kind.network"
|
|
2754
|
+
: "tools.resultFail";
|
|
2755
|
+
var mark = okBadge ? "✓ " : (entry.kind === "skipped" ? "– " : "✗ ");
|
|
2756
|
+
var stateClass = okBadge ? "gb-st-ok" : (entry.kind === "skipped" ? "gb-st-skip" : "gb-st-fail");
|
|
2757
|
+
badge = E("span", { className: "gb-toolState " + stateClass }, mark + t(kindKey));
|
|
2587
2758
|
} else {
|
|
2588
2759
|
badge = E("span", { className: "gb-toolState gb-st-" + row.state }, t("tools.state." + row.state));
|
|
2589
2760
|
}
|
|
@@ -2603,7 +2774,9 @@ window.__ModuleLoader__.load({
|
|
|
2603
2774
|
active ? E("span", { className: "gb-toolBar" }, E("span", { className: "gb-toolBarFill" })) : null,
|
|
2604
2775
|
E("span", { className: "gb-toolSrc" }, (row.version !== "" ? row.version + " · " : "") + (row.provider !== "" ? row.provider : row.source) + (row.admin ? " · " + t("tools.adminHint") : "")),
|
|
2605
2776
|
));
|
|
2606
|
-
|
|
2777
|
+
/* Skipped entries have nothing to explain ("cancelled before
|
|
2778
|
+
this entry started") — only real verdicts print a line. */
|
|
2779
|
+
if (entry !== undefined && entry.ok !== true && entry.kind !== "skipped") {
|
|
2607
2780
|
acc.push(E("p", { key: row.id + ":fail", className: "gb-toolFail" },
|
|
2608
2781
|
t(entry.action === "upgrade" ? "tools.updating" : "tools.installing") + " — " + t("tools.resultFail") + ": " + (entry.detail || "")));
|
|
2609
2782
|
}
|
|
@@ -2628,11 +2801,26 @@ window.__ModuleLoader__.load({
|
|
|
2628
2801
|
E("span", { className: "gb-spin" }),
|
|
2629
2802
|
E("span", { className: "gb-rowLabel" }, (activeCmd !== "" ? activeCmd + " · " : "") + t("tools.working") + ":"),
|
|
2630
2803
|
E("span", { className: "gb-rowValue" }, toolJob.done + " / " + toolJob.total),
|
|
2804
|
+
/* Issue #35: how long the entry in flight has been running —
|
|
2805
|
+
the difference between "slow UAC wait" and "wedged download"
|
|
2806
|
+
is exactly this number. Locale-neutral 2m13s form; refreshed
|
|
2807
|
+
by the 1.2s poll, so no timer of its own. */
|
|
2808
|
+
E("span", { className: "gb-toolElapsed" }, formatElapsed(Date.now() - (toolJob.currentSince || toolJob.startedAt || Date.now()))),
|
|
2809
|
+
E("button", {
|
|
2810
|
+
type: "button",
|
|
2811
|
+
className: "gb-segBtn gb-toolCancel",
|
|
2812
|
+
onClick: cancelTools,
|
|
2813
|
+
}, t("tools.cancel")),
|
|
2631
2814
|
),
|
|
2815
|
+
/* The freshest winget line ("Failed to download, waiting a bit
|
|
2816
|
+
and retry"): the one signal that distinguishes a wedged
|
|
2817
|
+
download from a quiet UAC wait. One grey line, not a log. */
|
|
2818
|
+
typeof toolJob.lastOutput === "string" && toolJob.lastOutput !== "" ? E("p", { className: "gb-toolTail" }, toolJob.lastOutput) : null,
|
|
2632
2819
|
E("div", { className: "gb-jobBar" },
|
|
2633
2820
|
E("div", { className: "gb-jobBarFill", style: { width: jobPct + "%" } }),
|
|
2634
2821
|
),
|
|
2635
2822
|
) : null,
|
|
2823
|
+
toolJob !== null && toolJob.finished === true && toolJob.cancelled === true ? E("p", { className: "gb-hint" }, t("tools.cancelledNote")) : null,
|
|
2636
2824
|
E("p", { className: "gb-hint" }, t("tools.hint")),
|
|
2637
2825
|
);
|
|
2638
2826
|
|