dsh-bash-terminal-ts 0.8.1 → 0.8.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/README.de.md +1 -1
- package/README.en.md +6 -2
- package/README.es.md +1 -1
- package/README.fr.md +1 -1
- package/README.it.md +1 -1
- package/README.md +5 -1
- package/README.ru.md +1 -1
- package/agent-presets/README.md +170 -0
- package/agent-presets/install-presets.mjs +179 -0
- package/agent-presets/standard-win/agent.cordis.yml +271 -0
- package/agent-presets/standard-win/preset.yml +2 -0
- package/agent-presets/standard-win-gitbash/agent.cordis.yml +271 -0
- package/agent-presets/standard-win-gitbash/preset.yml +2 -0
- package/agent-presets/standard-win-msys2/agent.cordis.yml +272 -0
- package/agent-presets/standard-win-msys2/preset.yml +2 -0
- package/agent-presets/standard-win-payload/agent.cordis.yml +271 -0
- package/agent-presets/standard-win-payload/preset.yml +2 -0
- package/agent-presets/standard-win-wsl2/agent.cordis.yml +271 -0
- package/agent-presets/standard-win-wsl2/preset.yml +2 -0
- package/cordis.patch.yml +12 -0
- package/dist/client.core.js +43 -12
- package/dist/client.js +43 -12
- package/dsh.plugin.json +2 -2
- package/lib/client.js +43 -12
- package/lib/dsh-types.d.ts +3 -1
- package/lib/index.d.ts +23 -2
- package/lib/index.js +79 -18
- package/lib/locales.js +27 -9
- package/lib/payload.d.ts +72 -0
- package/lib/payload.js +279 -0
- package/lib/shell-id.d.ts +2 -2
- package/lib/shells.d.ts +11 -2
- package/lib/shells.js +18 -4
- package/lib/terminal.js +1 -0
- package/lib/webterminals/catalog.d.ts +2 -0
- package/lib/webterminals/catalog.js +1 -0
- package/lib/webterminals/host.js +2 -2
- package/lib/webterminals/mount.d.ts +5 -0
- package/lib/webterminals/mount.js +4 -0
- package/package.json +17 -11
- package/scripts/check-artifacts.mjs +1 -1
- package/scripts/link-shells.mjs +22 -0
- package/scripts/payload-alias.mjs +97 -0
- package/scripts/provision-payload.mjs +233 -0
- package/src/client.tsx +29 -4
- package/src/dsh-types.ts +3 -1
- package/src/index.ts +117 -16
- package/src/locales.ts +27 -9
- package/src/payload.ts +322 -0
- package/src/shell-id.ts +2 -2
- package/src/shells.ts +27 -5
- package/src/terminal.ts +1 -0
- package/src/webterminals/browser/api.ts +1 -1
- package/src/webterminals/catalog.ts +3 -0
- package/src/webterminals/host.ts +2 -2
- package/src/webterminals/mount.ts +9 -0
package/dist/client.js
CHANGED
|
@@ -6152,9 +6152,11 @@ var zh = {
|
|
|
6152
6152
|
"shell.wsl": "WSL",
|
|
6153
6153
|
"shell.unavailable": "\u8BBE\u7F6E\u9762\u4E0D\u53EF\u7528\uFF1A\u5BBF\u4E3B\u914D\u7F6E\u6865\u672A\u54CD\u5E94\uFF08\u68C0\u67E5\u5BBF\u4E3B\u662F\u5426\u4E3A compat \u7248\uFF09",
|
|
6154
6154
|
"dock.title": "\u5E95\u90E8\u7EC8\u7AEF",
|
|
6155
|
-
"dock.hint": "\u5F00\u5173\
|
|
6155
|
+
"dock.hint": "\u5F00\u5173\u540C\u65F6\u7EA6\u675F\u5E95\u90E8\u7EC8\u7AEF\u4E0E shell \u5DE5\u5177\u7684\u53EF\u9009\u540E\u7AEF\uFF08PowerShell \u4E3A\u4FDD\u5E95\uFF0C\u6052\u53EF\u9009\uFF09\uFF1B\u4E0D\u6539\u53D8\u5B98\u65B9\u53F3\u680F\u7EC8\u7AEF\u3002",
|
|
6156
6156
|
"dock.state.available": "\u53EF\u7528",
|
|
6157
6157
|
"dock.state.notInstalled": "\u672A\u63A2\u6D4B\u5230",
|
|
6158
|
+
"dock.state.wslPreferred": "\u5DF2\u68C0\u6D4B\u5230 WSL \u53D1\u884C\u7248\uFF08\u4F18\u5148\u7528 WSL bash\uFF09",
|
|
6159
|
+
"shell.payload": "POSIX payload",
|
|
6158
6160
|
"dock.state.noDistro": "\u65E0\u5DF2\u5B89\u88C5\u53D1\u884C\u7248",
|
|
6159
6161
|
"dock.state.launcherOnly": "\u53EA\u627E\u5230\u542F\u52A8\u5668\uFF0C\u65E0\u6CD5\u5185\u5D4C",
|
|
6160
6162
|
"dock.powershell.locked": "PowerShell \u662F\u4FDD\u5E95\u540E\u7AEF\uFF0C\u65E0\u6CD5\u5173\u95ED\u3002",
|
|
@@ -6197,9 +6199,11 @@ var en = {
|
|
|
6197
6199
|
"shell.wsl": "WSL",
|
|
6198
6200
|
"shell.unavailable": "Settings unavailable: the host config bridge did not respond (is the host a compat build?)",
|
|
6199
6201
|
"dock.title": "Bottom terminal",
|
|
6200
|
-
"dock.hint": "These switches
|
|
6202
|
+
"dock.hint": "These switches gate both the bottom dock terminal and the shell tool's selectable backends (PowerShell is the floor and always available). The official right-hand terminal is untouched.",
|
|
6201
6203
|
"dock.state.available": "Available",
|
|
6202
6204
|
"dock.state.notInstalled": "Not found",
|
|
6205
|
+
"dock.state.wslPreferred": "WSL distro detected (WSL bash preferred)",
|
|
6206
|
+
"shell.payload": "POSIX payload",
|
|
6203
6207
|
"dock.state.noDistro": "No distro installed",
|
|
6204
6208
|
"dock.state.launcherOnly": "Only a launcher was found; it cannot be embedded",
|
|
6205
6209
|
"dock.powershell.locked": "PowerShell is the fallback backend and cannot be turned off.",
|
|
@@ -6242,9 +6246,11 @@ var ja = {
|
|
|
6242
6246
|
"shell.wsl": "WSL",
|
|
6243
6247
|
"shell.unavailable": "\u8A2D\u5B9A\u9762\u3092\u5229\u7528\u3067\u304D\u307E\u305B\u3093\uFF1A\u30DB\u30B9\u30C8\u306E\u8A2D\u5B9A\u30D6\u30EA\u30C3\u30B8\u304C\u5FDC\u7B54\u3057\u307E\u305B\u3093\uFF08compat \u30D3\u30EB\u30C9\u3067\u3059\u304B\uFF1F\uFF09",
|
|
6244
6248
|
"dock.title": "\u4E0B\u90E8\u30BF\u30FC\u30DF\u30CA\u30EB",
|
|
6245
|
-
"dock.hint": "\u3053\u306E\u30B9\u30A4\u30C3\u30C1\u306F\u4E0B\u90E8\u30C9\u30C3\u30AF\u306E\u30BF\u30FC\u30DF\u30CA\u30EB\u306E\
|
|
6249
|
+
"dock.hint": "\u3053\u306E\u30B9\u30A4\u30C3\u30C1\u306F\u4E0B\u90E8\u30C9\u30C3\u30AF\u306E\u30BF\u30FC\u30DF\u30CA\u30EB\u3068 shell \u30C4\u30FC\u30EB\u306E\u9078\u629E\u53EF\u80FD\u30D0\u30C3\u30AF\u30A8\u30F3\u30C9\u306E\u4E21\u65B9\u306B\u5F71\u97FF\u3057\u307E\u3059\uFF08PowerShell \u306F\u6700\u7D42\u4EE3\u66FF\u306E\u305F\u3081\u5E38\u306B\u9078\u629E\u53EF\uFF09\u3002\u516C\u5F0F\u306E\u53F3\u5074\u30BF\u30FC\u30DF\u30CA\u30EB\u306F\u5909\u66F4\u3055\u308C\u307E\u305B\u3093\u3002",
|
|
6246
6250
|
"dock.state.available": "\u5229\u7528\u53EF",
|
|
6247
6251
|
"dock.state.notInstalled": "\u898B\u3064\u304B\u308A\u307E\u305B\u3093",
|
|
6252
|
+
"dock.state.wslPreferred": "WSL \u30C7\u30A3\u30B9\u30C8\u30EA\u691C\u51FA\u6E08\u307F\uFF08WSL bash \u512A\u5148\uFF09",
|
|
6253
|
+
"shell.payload": "POSIX payload",
|
|
6248
6254
|
"dock.state.noDistro": "\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u6E08\u307F\u30C7\u30A3\u30B9\u30C8\u30EA\u30D3\u30E5\u30FC\u30B7\u30E7\u30F3\u306A\u3057",
|
|
6249
6255
|
"dock.state.launcherOnly": "\u30E9\u30F3\u30C1\u30E3\u30FC\u306E\u307F\u691C\u51FA\u3001\u57CB\u3081\u8FBC\u307F\u4E0D\u53EF",
|
|
6250
6256
|
"dock.powershell.locked": "PowerShell \u306F\u6700\u5F8C\u306E\u4EE3\u66FF\u306E\u305F\u3081\u7121\u52B9\u5316\u3067\u304D\u307E\u305B\u3093\u3002",
|
|
@@ -6287,9 +6293,11 @@ var ko = {
|
|
|
6287
6293
|
"shell.wsl": "WSL",
|
|
6288
6294
|
"shell.unavailable": "\uC124\uC815\uBA74\uC744 \uC0AC\uC6A9\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4: \uD638\uC2A4\uD2B8 \uC124\uC815 \uBE0C\uB9AC\uC9C0\uAC00 \uC751\uB2F5\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4 (compat \uBE4C\uB4DC\uC778\uAC00\uC694?)",
|
|
6289
6295
|
"dock.title": "\uD558\uB2E8 \uD130\uBBF8\uB110",
|
|
6290
|
-
"dock.hint": "\uC774 \uC2A4\uC704\uCE58\uB294 \uD558\uB2E8 \uB3C5
|
|
6296
|
+
"dock.hint": "\uC774 \uC2A4\uC704\uCE58\uB294 \uD558\uB2E8 \uB3C5 \uD130\uBBF8\uB110\uACFC shell \uB3C4\uAD6C\uC758 \uC120\uD0DD \uAC00\uB2A5 \uBC31\uC5D4\uB4DC \uBAA8\uB450\uC5D0 \uC601\uD5A5\uC744 \uC90D\uB2C8\uB2E4(PowerShell\uC740 \uD56D\uC0C1 \uC120\uD0DD \uAC00\uB2A5). \uACF5\uC2DD \uC624\uB978\uCABD \uD130\uBBF8\uB110\uC740 \uBCC0\uACBD\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.",
|
|
6291
6297
|
"dock.state.available": "\uC0AC\uC6A9 \uAC00\uB2A5",
|
|
6292
6298
|
"dock.state.notInstalled": "\uD0D0\uC9C0\uB418\uC9C0 \uC54A\uC74C",
|
|
6299
|
+
"dock.state.wslPreferred": "WSL \uBC30\uD3EC\uD310 \uAC10\uC9C0\uB428 (WSL bash \uC6B0\uC120)",
|
|
6300
|
+
"shell.payload": "POSIX payload",
|
|
6293
6301
|
"dock.state.noDistro": "\uC124\uCE58\uB41C \uBC30\uD3EC\uD310 \uC5C6\uC74C",
|
|
6294
6302
|
"dock.state.launcherOnly": "\uB7F0\uCC98\uB9CC \uBC1C\uACAC\uB418\uC5B4 \uB0B4\uC7A5\uD560 \uC218 \uC5C6\uC74C",
|
|
6295
6303
|
"dock.powershell.locked": "PowerShell\uC740 \uCD5C\uC885 \uB300\uCCB4 \uD56D\uBAA9\uC774\uBBC0\uB85C \uB04C \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.",
|
|
@@ -6332,9 +6340,11 @@ var fr = {
|
|
|
6332
6340
|
"shell.wsl": "WSL",
|
|
6333
6341
|
"shell.unavailable": "Param\xE8tres indisponibles: le pont de configuration de l'h\xF4te n'a pas r\xE9pondu",
|
|
6334
6342
|
"dock.title": "Terminal inf\xE9rieur",
|
|
6335
|
-
"dock.hint": "Ces interrupteurs
|
|
6343
|
+
"dock.hint": "Ces interrupteurs r\xE9gissent \xE0 la fois le terminal du dock bas et les backends s\xE9lectionnables de l'outil shell (PowerShell reste toujours disponible). Le terminal officiel de droite reste inchang\xE9.",
|
|
6336
6344
|
"dock.state.available": "Disponible",
|
|
6337
6345
|
"dock.state.notInstalled": "Non d\xE9tect\xE9",
|
|
6346
|
+
"dock.state.wslPreferred": "Distro WSL d\xE9tect\xE9e (bash WSL pr\xE9f\xE9r\xE9)",
|
|
6347
|
+
"shell.payload": "POSIX payload",
|
|
6338
6348
|
"dock.state.noDistro": "Aucune distribution install\xE9e",
|
|
6339
6349
|
"dock.state.launcherOnly": "Seuls des lanceurs ont \xE9t\xE9 trouv\xE9s; int\xE9gration impossible",
|
|
6340
6350
|
"dock.powershell.locked": "PowerShell sert de repli final et ne peut pas \xEAtre d\xE9sactiv\xE9.",
|
|
@@ -6377,9 +6387,11 @@ var de = {
|
|
|
6377
6387
|
"shell.wsl": "WSL",
|
|
6378
6388
|
"shell.unavailable": "Einstellungen nicht verf\xFCgbar: Die Konfigurationsbr\xFCcke des Hosts hat nicht geantwortet",
|
|
6379
6389
|
"dock.title": "Unteres Terminal",
|
|
6380
|
-
"dock.hint": "Diese Schalter
|
|
6390
|
+
"dock.hint": "Diese Schalter steuern sowohl das Terminal im unteren Dock als auch die w\xE4hlbaren Backends des shell-Werkzeugs (PowerShell bleibt immer verf\xFCgbar). Das offizielle rechte Terminal bleibt unber\xFChrt.",
|
|
6381
6391
|
"dock.state.available": "Verf\xFCgbar",
|
|
6382
6392
|
"dock.state.notInstalled": "Nicht gefunden",
|
|
6393
|
+
"dock.state.wslPreferred": "WSL-Distro erkannt (WSL bash bevorzugt)",
|
|
6394
|
+
"shell.payload": "POSIX payload",
|
|
6383
6395
|
"dock.state.noDistro": "Keine Distribution installiert",
|
|
6384
6396
|
"dock.state.launcherOnly": "Nur Launcher gefunden; Einbettung nicht m\xF6glich",
|
|
6385
6397
|
"dock.powershell.locked": "PowerShell ist die letzte R\xFCckfallm\xF6glichkeit und kann nicht deaktiviert werden.",
|
|
@@ -6422,9 +6434,11 @@ var it = {
|
|
|
6422
6434
|
"shell.wsl": "WSL",
|
|
6423
6435
|
"shell.unavailable": "Impostazioni non disponibili: il bridge di configurazione dell'host non ha risposto",
|
|
6424
6436
|
"dock.title": "Terminale inferiore",
|
|
6425
|
-
"dock.hint": "Questi interruttori
|
|
6437
|
+
"dock.hint": "Questi interruttori controllano sia il terminale nella barra inferiore sia i backend selezionabili dello strumento shell (PowerShell resta sempre disponibile). Il terminale ufficiale a destra non cambia.",
|
|
6426
6438
|
"dock.state.available": "Disponibile",
|
|
6427
6439
|
"dock.state.notInstalled": "Non trovato",
|
|
6440
|
+
"dock.state.wslPreferred": "Distro WSL rilevata (bash WSL preferito)",
|
|
6441
|
+
"shell.payload": "POSIX payload",
|
|
6428
6442
|
"dock.state.noDistro": "Nessuna distribuzione installata",
|
|
6429
6443
|
"dock.state.launcherOnly": "Trovato solo un launcher; incorporamento non possibile",
|
|
6430
6444
|
"dock.powershell.locked": "PowerShell \xE8 il ripiego finale e non pu\xF2 essere disattivato.",
|
|
@@ -6467,9 +6481,11 @@ var ru = {
|
|
|
6467
6481
|
"shell.wsl": "WSL",
|
|
6468
6482
|
"shell.unavailable": "\u041D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438 \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u043D\u044B: \u043C\u043E\u0441\u0442 \u043A\u043E\u043D\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0445\u043E\u0441\u0442\u0430 \u043D\u0435 \u043E\u0442\u0432\u0435\u0442\u0438\u043B",
|
|
6469
6483
|
"dock.title": "\u041D\u0438\u0436\u043D\u0438\u0439 \u0442\u0435\u0440\u043C\u0438\u043D\u0430\u043B",
|
|
6470
|
-
"dock.hint": "\u042D\u0442\u0438 \u043F\u0435\u0440\u0435\u043A\u043B\u044E\u0447\u0430\u0442\u0435\u043B\u0438 \u0432\u043B\u0438\u044F\u044E\u0442 \
|
|
6484
|
+
"dock.hint": "\u042D\u0442\u0438 \u043F\u0435\u0440\u0435\u043A\u043B\u044E\u0447\u0430\u0442\u0435\u043B\u0438 \u0432\u043B\u0438\u044F\u044E\u0442 \u0438 \u043D\u0430 \u0442\u0435\u0440\u043C\u0438\u043D\u0430\u043B \u0432 \u043D\u0438\u0436\u043D\u0435\u0439 \u043F\u0430\u043D\u0435\u043B\u0438, \u0438 \u043D\u0430 \u0432\u044B\u0431\u0438\u0440\u0430\u0435\u043C\u044B\u0435 \u0431\u044D\u043A\u0435\u043D\u0434\u044B \u0438\u043D\u0441\u0442\u0440\u0443\u043C\u0435\u043D\u0442\u0430 shell (PowerShell \u0434\u043E\u0441\u0442\u0443\u043F\u0435\u043D \u0432\u0441\u0435\u0433\u0434\u0430). \u041E\u0444\u0438\u0446\u0438\u0430\u043B\u044C\u043D\u044B\u0439 \u043F\u0440\u0430\u0432\u044B\u0439 \u0442\u0435\u0440\u043C\u0438\u043D\u0430\u043B \u043D\u0435 \u043C\u0435\u043D\u044F\u0435\u0442\u0441\u044F.",
|
|
6471
6485
|
"dock.state.available": "\u0414\u043E\u0441\u0442\u0443\u043F\u0435\u043D",
|
|
6472
6486
|
"dock.state.notInstalled": "\u041D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D",
|
|
6487
|
+
"dock.state.wslPreferred": "\u041E\u0431\u043D\u0430\u0440\u0443\u0436\u0435\u043D \u0434\u0438\u0441\u0442\u0440\u0438\u0431\u0443\u0442\u0438\u0432 WSL (\u043F\u0440\u0435\u0434\u043F\u043E\u0447\u0442\u0438\u0442\u0435\u043B\u044C\u043D\u0435\u0435 WSL bash)",
|
|
6488
|
+
"shell.payload": "POSIX payload",
|
|
6473
6489
|
"dock.state.noDistro": "\u041D\u0435\u0442 \u0443\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D\u043D\u044B\u0445 \u0434\u0438\u0441\u0442\u0440\u0438\u0431\u0443\u0442\u0438\u0432\u043E\u0432",
|
|
6474
6490
|
"dock.state.launcherOnly": "\u041D\u0430\u0439\u0434\u0435\u043D \u0442\u043E\u043B\u044C\u043A\u043E \u043B\u0430\u0443\u043D\u0447\u0435\u0440, \u0432\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u043D\u0438\u0435 \u043D\u0435\u0432\u043E\u0437\u043C\u043E\u0436\u043D\u043E",
|
|
6475
6491
|
"dock.powershell.locked": "PowerShell \u2014 \u0440\u0435\u0437\u0435\u0440\u0432\u043D\u044B\u0439 \u0432\u0430\u0440\u0438\u0430\u043D\u0442, \u0435\u0433\u043E \u043D\u0435\u043B\u044C\u0437\u044F \u043E\u0442\u043A\u043B\u044E\u0447\u0438\u0442\u044C.",
|
|
@@ -6512,9 +6528,11 @@ var es = {
|
|
|
6512
6528
|
"shell.wsl": "WSL",
|
|
6513
6529
|
"shell.unavailable": "Configuraci\xF3n no disponible: el puente de configuraci\xF3n del host no respondi\xF3",
|
|
6514
6530
|
"dock.title": "Terminal inferior",
|
|
6515
|
-
"dock.hint": "Estos interruptores
|
|
6531
|
+
"dock.hint": "Estos interruptores afectan tanto al terminal del panel inferior como a los backends seleccionables de la herramienta shell (PowerShell siempre est\xE1 disponible). El terminal oficial derecho no cambia.",
|
|
6516
6532
|
"dock.state.available": "Disponible",
|
|
6517
6533
|
"dock.state.notInstalled": "No detectado",
|
|
6534
|
+
"dock.state.wslPreferred": "Distro de WSL detectada (se prefiere bash de WSL)",
|
|
6535
|
+
"shell.payload": "POSIX payload",
|
|
6518
6536
|
"dock.state.noDistro": "Sin distribuci\xF3n instalada",
|
|
6519
6537
|
"dock.state.launcherOnly": "Solo se encontr\xF3 un lanzador; no se puede incrustar",
|
|
6520
6538
|
"dock.powershell.locked": "PowerShell es el respaldo final y no puede desactivarse.",
|
|
@@ -7680,7 +7698,7 @@ function MultiShellTerminal(props) {
|
|
|
7680
7698
|
// src/client.tsx
|
|
7681
7699
|
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
7682
7700
|
var SETTINGS_NS = "settings.bash-terminal";
|
|
7683
|
-
var SHELLS = ["powershell", "gitbash", "msys2", "wsl"];
|
|
7701
|
+
var SHELLS = ["powershell", "gitbash", "msys2", "wsl", "payload"];
|
|
7684
7702
|
var ROW_CSS = ".btRow{border-bottom:1px solid var(--dsw-alias-border-l2);align-items:center;gap:8px;padding:16px 0;display:flex}.btRowText{flex-direction:column;flex:1;gap:4px;min-width:0;padding-right:48px;display:flex}.btTitle{color:var(--dsw-alias-label-primary);font-size:14px;font-weight:400;line-height:22px}.btDesc{color:var(--dsw-alias-label-tertiary);font-size:12px;font-weight:400;line-height:18px}.btSelector{background:var(--dsw-alias-bg-module-platform);height:36px;font:inherit;color:var(--dsw-alias-label-primary);cursor:pointer;border:none;border-radius:18px;align-items:center;gap:12px;padding:0 14px;font-size:14px;line-height:22px;display:inline-flex}.btSelector:hover{background:var(--dsw-alias-interactive-bg-hover)}.btGear{position:fixed;right:16px;bottom:110px;z-index:10000;width:40px;height:40px;border-radius:50%;border:1px solid rgba(127,127,127,.4);background:rgba(30,30,32,.85);color:inherit;cursor:pointer;font-size:17px;box-shadow:0 4px 16px rgba(0,0,0,.35)}.btOverlay{position:fixed;inset:0;z-index:10000;background:rgba(0,0,0,.45)}.btPanel{position:fixed;top:6vh;left:50%;transform:translateX(-50%);width:min(760px,92vw);max-height:84vh;overflow-y:auto;z-index:10001;background:var(--dsw-alias-bg-module-platform,rgba(30,30,32,.92));border:1px solid var(--dsw-alias-border-l2,rgba(127,127,127,.3));border-radius:14px;padding:20px;color:var(--dsw-alias-label-primary)}.btBadge{border-radius:10px;padding:2px 8px;font-size:11px;line-height:16px;background:var(--dsw-alias-bg-module-platform);color:var(--dsw-alias-label-tertiary);white-space:nowrap}.btBadgeOk{color:var(--dsw-alias-label-primary)}.btNotice{color:var(--dsw-alias-label-secondary);font-size:12px;line-height:18px;padding:8px 0}.btWarn{color:var(--dsw-status-warning-default,#b8860b)}.btRowSwitch{padding-right:0}.btSwitch{width:40px;height:24px;border-radius:12px;border:none;cursor:pointer;background:var(--dsw-alias-bg-module-platform);position:relative;flex:none;transition:background .15s ease;box-shadow:inset 0 0 0 1px var(--dsw-alias-border-l2)}.btSwitch::after{content:'';position:absolute;top:3px;left:3px;width:18px;height:18px;border-radius:50%;background:var(--dsw-alias-label-tertiary);transition:transform .15s ease,background .15s ease}.btSwitchOn{background:var(--dsw-alias-interactive-brand,#2f6fed)}.btSwitchOn::after{transform:translateX(16px);background:#fff}.btSwitch:disabled{cursor:not-allowed;opacity:.4}.btSwitch:disabled::after{background:var(--dsw-alias-label-quaternary,#8a8a8a)}.btInput{background:var(--dsw-alias-bg-module-platform);height:32px;border:none;border-radius:8px;color:var(--dsw-alias-label-primary);padding:0 10px;font:inherit;min-width:0;flex:1}.btPick{position:relative;display:inline-block}.btPickBtn{gap:6px}.btPickSm{height:28px;padding:0 10px;border-radius:14px;font-size:12px;line-height:18px}.btPickBtn:disabled{opacity:.4;cursor:not-allowed}.btPickText{max-width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.btPickCaret{color:var(--dsw-alias-label-tertiary);font-size:10px;line-height:1}.btPickList{position:absolute;z-index:1000;top:calc(100% + 4px);left:0;min-width:100%;max-height:260px;overflow-y:auto;padding:4px;border:1px solid var(--dsw-alias-border-l2);border-radius:10px;background:var(--dsw-alias-bg-overlay);box-shadow:0 8px 24px rgba(0,0,0,.28)}.btPickOpt{padding:6px 10px;font-size:12px;line-height:18px;border-radius:6px;color:var(--dsw-alias-label-primary);cursor:pointer;white-space:nowrap}.btPickOpt:hover{background:var(--dsw-alias-interactive-bg-hover)}.btPickOptOn{color:var(--dsw-alias-interactive-brand);font-weight:600}";
|
|
7685
7703
|
if (typeof document !== "undefined" && document.querySelector('style[data-plugin-css="bash-terminal-row"]') === null) {
|
|
7686
7704
|
const tag = document.createElement("style");
|
|
@@ -7706,10 +7724,22 @@ function catalogOf(snapshot) {
|
|
|
7706
7724
|
function badgeKey(row) {
|
|
7707
7725
|
if (!row.togglable) return "dock.state.floor";
|
|
7708
7726
|
if (row.available) return "dock.state.available";
|
|
7709
|
-
return row.reason === "no-distro" ? "dock.state.noDistro" : row.reason === "launcher-only" ? "dock.state.launcherOnly" : "dock.state.notInstalled";
|
|
7727
|
+
return row.reason === "no-distro" ? "dock.state.noDistro" : row.reason === "launcher-only" ? "dock.state.launcherOnly" : row.reason === "wsl-preferred" ? "dock.state.wslPreferred" : "dock.state.notInstalled";
|
|
7728
|
+
}
|
|
7729
|
+
function dropdownRows(snapshot, chosen) {
|
|
7730
|
+
const all = SHELLS.map((id) => ({ id, label: tr("shell." + id) }));
|
|
7731
|
+
const rows = catalogOf(snapshot);
|
|
7732
|
+
if (rows === null) return all;
|
|
7733
|
+
const usable = rows.filter((row) => row.activated && row.available).map((row) => ({ id: row.id, label: tr("shell." + row.id) }));
|
|
7734
|
+
if (chosen.length > 0 && !usable.some((row) => row.id === chosen)) {
|
|
7735
|
+
const extra = all.find((row) => row.id === chosen);
|
|
7736
|
+
if (extra !== void 0) usable.push(extra);
|
|
7737
|
+
}
|
|
7738
|
+
return usable;
|
|
7710
7739
|
}
|
|
7711
7740
|
function ShellPreferenceRow({ snapshot }) {
|
|
7712
7741
|
const [shell, setShell] = (0, import_react3.useState)("powershell");
|
|
7742
|
+
const [snap, setSnap] = (0, import_react3.useState)(snapshot ?? null);
|
|
7713
7743
|
const [status, setStatus] = (0, import_react3.useState)("loading");
|
|
7714
7744
|
(0, import_react3.useEffect)(() => {
|
|
7715
7745
|
let alive = true;
|
|
@@ -7718,6 +7748,7 @@ function ShellPreferenceRow({ snapshot }) {
|
|
|
7718
7748
|
if (!alive) return;
|
|
7719
7749
|
if (v && v.defaultShell) {
|
|
7720
7750
|
setShell(v.defaultShell);
|
|
7751
|
+
setSnap(v);
|
|
7721
7752
|
setStatus("ready");
|
|
7722
7753
|
} else {
|
|
7723
7754
|
setStatus("unavailable");
|
|
@@ -7751,7 +7782,7 @@ function ShellPreferenceRow({ snapshot }) {
|
|
|
7751
7782
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
7752
7783
|
ShellPicker,
|
|
7753
7784
|
{
|
|
7754
|
-
rows:
|
|
7785
|
+
rows: dropdownRows(snap, shell),
|
|
7755
7786
|
value: shell,
|
|
7756
7787
|
onChange: (next) => change(next)
|
|
7757
7788
|
}
|
package/dsh.plugin.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"id": "dsh-bash-terminal-ts",
|
|
3
3
|
"name": "dsh-bash-terminal-ts",
|
|
4
|
-
"version": "0.8.
|
|
4
|
+
"version": "0.8.3",
|
|
5
5
|
"description": {
|
|
6
6
|
"en": "One shell tool that runs commands through PowerShell, Git Bash, MSYS2 or WSL on Windows, plus an embedded terminal for the bottom dock with per-shell activation switches and a default-shell fallback chain.",
|
|
7
7
|
"zh": "一个 shell 工具,可在 Windows 上通过 PowerShell / Git Bash / MSYS2 / WSL 执行命令;另提供底部工作台的内嵌终端,支持按 shell 激活开关与默认 shell 回落链。"
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
},
|
|
14
14
|
"license": "MIT",
|
|
15
15
|
"engines": {
|
|
16
|
-
"dsh": "0.1.0-rc.2 || 0.1.0-rc.3 || 0.1.0-rc.6 || 0.1.0-rc.7 || 0.1.0-rc.8 || 0.1.1-rc.1 || 0.1.1-rc.2 || 0.1.2-rc.1 || 0.1.5-rc.1 || 0.1.5-rc.2 || 0.1.5-rc.3 || 0.1.7-rc.1 || 0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-rc.1"
|
|
16
|
+
"dsh": "0.1.0-rc.2 || 0.1.0-rc.3 || 0.1.0-rc.6 || 0.1.0-rc.7 || 0.1.0-rc.8 || 0.1.1-rc.1 || 0.1.1-rc.2 || 0.1.2-rc.1 || 0.1.5-rc.1 || 0.1.5-rc.2 || 0.1.5-rc.3 || 0.1.7-rc.1 || 0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-rc.1 || 0.2.1-rc.2 || 0.2.1-rc.3"
|
|
17
17
|
},
|
|
18
18
|
"components": {
|
|
19
19
|
"host": "lib/index.js",
|
package/lib/client.js
CHANGED
|
@@ -6152,9 +6152,11 @@ var zh = {
|
|
|
6152
6152
|
"shell.wsl": "WSL",
|
|
6153
6153
|
"shell.unavailable": "\u8BBE\u7F6E\u9762\u4E0D\u53EF\u7528\uFF1A\u5BBF\u4E3B\u914D\u7F6E\u6865\u672A\u54CD\u5E94\uFF08\u68C0\u67E5\u5BBF\u4E3B\u662F\u5426\u4E3A compat \u7248\uFF09",
|
|
6154
6154
|
"dock.title": "\u5E95\u90E8\u7EC8\u7AEF",
|
|
6155
|
-
"dock.hint": "\u5F00\u5173\
|
|
6155
|
+
"dock.hint": "\u5F00\u5173\u540C\u65F6\u7EA6\u675F\u5E95\u90E8\u7EC8\u7AEF\u4E0E shell \u5DE5\u5177\u7684\u53EF\u9009\u540E\u7AEF\uFF08PowerShell \u4E3A\u4FDD\u5E95\uFF0C\u6052\u53EF\u9009\uFF09\uFF1B\u4E0D\u6539\u53D8\u5B98\u65B9\u53F3\u680F\u7EC8\u7AEF\u3002",
|
|
6156
6156
|
"dock.state.available": "\u53EF\u7528",
|
|
6157
6157
|
"dock.state.notInstalled": "\u672A\u63A2\u6D4B\u5230",
|
|
6158
|
+
"dock.state.wslPreferred": "\u5DF2\u68C0\u6D4B\u5230 WSL \u53D1\u884C\u7248\uFF08\u4F18\u5148\u7528 WSL bash\uFF09",
|
|
6159
|
+
"shell.payload": "POSIX payload",
|
|
6158
6160
|
"dock.state.noDistro": "\u65E0\u5DF2\u5B89\u88C5\u53D1\u884C\u7248",
|
|
6159
6161
|
"dock.state.launcherOnly": "\u53EA\u627E\u5230\u542F\u52A8\u5668\uFF0C\u65E0\u6CD5\u5185\u5D4C",
|
|
6160
6162
|
"dock.powershell.locked": "PowerShell \u662F\u4FDD\u5E95\u540E\u7AEF\uFF0C\u65E0\u6CD5\u5173\u95ED\u3002",
|
|
@@ -6197,9 +6199,11 @@ var en = {
|
|
|
6197
6199
|
"shell.wsl": "WSL",
|
|
6198
6200
|
"shell.unavailable": "Settings unavailable: the host config bridge did not respond (is the host a compat build?)",
|
|
6199
6201
|
"dock.title": "Bottom terminal",
|
|
6200
|
-
"dock.hint": "These switches
|
|
6202
|
+
"dock.hint": "These switches gate both the bottom dock terminal and the shell tool's selectable backends (PowerShell is the floor and always available). The official right-hand terminal is untouched.",
|
|
6201
6203
|
"dock.state.available": "Available",
|
|
6202
6204
|
"dock.state.notInstalled": "Not found",
|
|
6205
|
+
"dock.state.wslPreferred": "WSL distro detected (WSL bash preferred)",
|
|
6206
|
+
"shell.payload": "POSIX payload",
|
|
6203
6207
|
"dock.state.noDistro": "No distro installed",
|
|
6204
6208
|
"dock.state.launcherOnly": "Only a launcher was found; it cannot be embedded",
|
|
6205
6209
|
"dock.powershell.locked": "PowerShell is the fallback backend and cannot be turned off.",
|
|
@@ -6242,9 +6246,11 @@ var ja = {
|
|
|
6242
6246
|
"shell.wsl": "WSL",
|
|
6243
6247
|
"shell.unavailable": "\u8A2D\u5B9A\u9762\u3092\u5229\u7528\u3067\u304D\u307E\u305B\u3093\uFF1A\u30DB\u30B9\u30C8\u306E\u8A2D\u5B9A\u30D6\u30EA\u30C3\u30B8\u304C\u5FDC\u7B54\u3057\u307E\u305B\u3093\uFF08compat \u30D3\u30EB\u30C9\u3067\u3059\u304B\uFF1F\uFF09",
|
|
6244
6248
|
"dock.title": "\u4E0B\u90E8\u30BF\u30FC\u30DF\u30CA\u30EB",
|
|
6245
|
-
"dock.hint": "\u3053\u306E\u30B9\u30A4\u30C3\u30C1\u306F\u4E0B\u90E8\u30C9\u30C3\u30AF\u306E\u30BF\u30FC\u30DF\u30CA\u30EB\u306E\
|
|
6249
|
+
"dock.hint": "\u3053\u306E\u30B9\u30A4\u30C3\u30C1\u306F\u4E0B\u90E8\u30C9\u30C3\u30AF\u306E\u30BF\u30FC\u30DF\u30CA\u30EB\u3068 shell \u30C4\u30FC\u30EB\u306E\u9078\u629E\u53EF\u80FD\u30D0\u30C3\u30AF\u30A8\u30F3\u30C9\u306E\u4E21\u65B9\u306B\u5F71\u97FF\u3057\u307E\u3059\uFF08PowerShell \u306F\u6700\u7D42\u4EE3\u66FF\u306E\u305F\u3081\u5E38\u306B\u9078\u629E\u53EF\uFF09\u3002\u516C\u5F0F\u306E\u53F3\u5074\u30BF\u30FC\u30DF\u30CA\u30EB\u306F\u5909\u66F4\u3055\u308C\u307E\u305B\u3093\u3002",
|
|
6246
6250
|
"dock.state.available": "\u5229\u7528\u53EF",
|
|
6247
6251
|
"dock.state.notInstalled": "\u898B\u3064\u304B\u308A\u307E\u305B\u3093",
|
|
6252
|
+
"dock.state.wslPreferred": "WSL \u30C7\u30A3\u30B9\u30C8\u30EA\u691C\u51FA\u6E08\u307F\uFF08WSL bash \u512A\u5148\uFF09",
|
|
6253
|
+
"shell.payload": "POSIX payload",
|
|
6248
6254
|
"dock.state.noDistro": "\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u6E08\u307F\u30C7\u30A3\u30B9\u30C8\u30EA\u30D3\u30E5\u30FC\u30B7\u30E7\u30F3\u306A\u3057",
|
|
6249
6255
|
"dock.state.launcherOnly": "\u30E9\u30F3\u30C1\u30E3\u30FC\u306E\u307F\u691C\u51FA\u3001\u57CB\u3081\u8FBC\u307F\u4E0D\u53EF",
|
|
6250
6256
|
"dock.powershell.locked": "PowerShell \u306F\u6700\u5F8C\u306E\u4EE3\u66FF\u306E\u305F\u3081\u7121\u52B9\u5316\u3067\u304D\u307E\u305B\u3093\u3002",
|
|
@@ -6287,9 +6293,11 @@ var ko = {
|
|
|
6287
6293
|
"shell.wsl": "WSL",
|
|
6288
6294
|
"shell.unavailable": "\uC124\uC815\uBA74\uC744 \uC0AC\uC6A9\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4: \uD638\uC2A4\uD2B8 \uC124\uC815 \uBE0C\uB9AC\uC9C0\uAC00 \uC751\uB2F5\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4 (compat \uBE4C\uB4DC\uC778\uAC00\uC694?)",
|
|
6289
6295
|
"dock.title": "\uD558\uB2E8 \uD130\uBBF8\uB110",
|
|
6290
|
-
"dock.hint": "\uC774 \uC2A4\uC704\uCE58\uB294 \uD558\uB2E8 \uB3C5
|
|
6296
|
+
"dock.hint": "\uC774 \uC2A4\uC704\uCE58\uB294 \uD558\uB2E8 \uB3C5 \uD130\uBBF8\uB110\uACFC shell \uB3C4\uAD6C\uC758 \uC120\uD0DD \uAC00\uB2A5 \uBC31\uC5D4\uB4DC \uBAA8\uB450\uC5D0 \uC601\uD5A5\uC744 \uC90D\uB2C8\uB2E4(PowerShell\uC740 \uD56D\uC0C1 \uC120\uD0DD \uAC00\uB2A5). \uACF5\uC2DD \uC624\uB978\uCABD \uD130\uBBF8\uB110\uC740 \uBCC0\uACBD\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.",
|
|
6291
6297
|
"dock.state.available": "\uC0AC\uC6A9 \uAC00\uB2A5",
|
|
6292
6298
|
"dock.state.notInstalled": "\uD0D0\uC9C0\uB418\uC9C0 \uC54A\uC74C",
|
|
6299
|
+
"dock.state.wslPreferred": "WSL \uBC30\uD3EC\uD310 \uAC10\uC9C0\uB428 (WSL bash \uC6B0\uC120)",
|
|
6300
|
+
"shell.payload": "POSIX payload",
|
|
6293
6301
|
"dock.state.noDistro": "\uC124\uCE58\uB41C \uBC30\uD3EC\uD310 \uC5C6\uC74C",
|
|
6294
6302
|
"dock.state.launcherOnly": "\uB7F0\uCC98\uB9CC \uBC1C\uACAC\uB418\uC5B4 \uB0B4\uC7A5\uD560 \uC218 \uC5C6\uC74C",
|
|
6295
6303
|
"dock.powershell.locked": "PowerShell\uC740 \uCD5C\uC885 \uB300\uCCB4 \uD56D\uBAA9\uC774\uBBC0\uB85C \uB04C \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.",
|
|
@@ -6332,9 +6340,11 @@ var fr = {
|
|
|
6332
6340
|
"shell.wsl": "WSL",
|
|
6333
6341
|
"shell.unavailable": "Param\xE8tres indisponibles: le pont de configuration de l'h\xF4te n'a pas r\xE9pondu",
|
|
6334
6342
|
"dock.title": "Terminal inf\xE9rieur",
|
|
6335
|
-
"dock.hint": "Ces interrupteurs
|
|
6343
|
+
"dock.hint": "Ces interrupteurs r\xE9gissent \xE0 la fois le terminal du dock bas et les backends s\xE9lectionnables de l'outil shell (PowerShell reste toujours disponible). Le terminal officiel de droite reste inchang\xE9.",
|
|
6336
6344
|
"dock.state.available": "Disponible",
|
|
6337
6345
|
"dock.state.notInstalled": "Non d\xE9tect\xE9",
|
|
6346
|
+
"dock.state.wslPreferred": "Distro WSL d\xE9tect\xE9e (bash WSL pr\xE9f\xE9r\xE9)",
|
|
6347
|
+
"shell.payload": "POSIX payload",
|
|
6338
6348
|
"dock.state.noDistro": "Aucune distribution install\xE9e",
|
|
6339
6349
|
"dock.state.launcherOnly": "Seuls des lanceurs ont \xE9t\xE9 trouv\xE9s; int\xE9gration impossible",
|
|
6340
6350
|
"dock.powershell.locked": "PowerShell sert de repli final et ne peut pas \xEAtre d\xE9sactiv\xE9.",
|
|
@@ -6377,9 +6387,11 @@ var de = {
|
|
|
6377
6387
|
"shell.wsl": "WSL",
|
|
6378
6388
|
"shell.unavailable": "Einstellungen nicht verf\xFCgbar: Die Konfigurationsbr\xFCcke des Hosts hat nicht geantwortet",
|
|
6379
6389
|
"dock.title": "Unteres Terminal",
|
|
6380
|
-
"dock.hint": "Diese Schalter
|
|
6390
|
+
"dock.hint": "Diese Schalter steuern sowohl das Terminal im unteren Dock als auch die w\xE4hlbaren Backends des shell-Werkzeugs (PowerShell bleibt immer verf\xFCgbar). Das offizielle rechte Terminal bleibt unber\xFChrt.",
|
|
6381
6391
|
"dock.state.available": "Verf\xFCgbar",
|
|
6382
6392
|
"dock.state.notInstalled": "Nicht gefunden",
|
|
6393
|
+
"dock.state.wslPreferred": "WSL-Distro erkannt (WSL bash bevorzugt)",
|
|
6394
|
+
"shell.payload": "POSIX payload",
|
|
6383
6395
|
"dock.state.noDistro": "Keine Distribution installiert",
|
|
6384
6396
|
"dock.state.launcherOnly": "Nur Launcher gefunden; Einbettung nicht m\xF6glich",
|
|
6385
6397
|
"dock.powershell.locked": "PowerShell ist die letzte R\xFCckfallm\xF6glichkeit und kann nicht deaktiviert werden.",
|
|
@@ -6422,9 +6434,11 @@ var it = {
|
|
|
6422
6434
|
"shell.wsl": "WSL",
|
|
6423
6435
|
"shell.unavailable": "Impostazioni non disponibili: il bridge di configurazione dell'host non ha risposto",
|
|
6424
6436
|
"dock.title": "Terminale inferiore",
|
|
6425
|
-
"dock.hint": "Questi interruttori
|
|
6437
|
+
"dock.hint": "Questi interruttori controllano sia il terminale nella barra inferiore sia i backend selezionabili dello strumento shell (PowerShell resta sempre disponibile). Il terminale ufficiale a destra non cambia.",
|
|
6426
6438
|
"dock.state.available": "Disponibile",
|
|
6427
6439
|
"dock.state.notInstalled": "Non trovato",
|
|
6440
|
+
"dock.state.wslPreferred": "Distro WSL rilevata (bash WSL preferito)",
|
|
6441
|
+
"shell.payload": "POSIX payload",
|
|
6428
6442
|
"dock.state.noDistro": "Nessuna distribuzione installata",
|
|
6429
6443
|
"dock.state.launcherOnly": "Trovato solo un launcher; incorporamento non possibile",
|
|
6430
6444
|
"dock.powershell.locked": "PowerShell \xE8 il ripiego finale e non pu\xF2 essere disattivato.",
|
|
@@ -6467,9 +6481,11 @@ var ru = {
|
|
|
6467
6481
|
"shell.wsl": "WSL",
|
|
6468
6482
|
"shell.unavailable": "\u041D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438 \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u043D\u044B: \u043C\u043E\u0441\u0442 \u043A\u043E\u043D\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0445\u043E\u0441\u0442\u0430 \u043D\u0435 \u043E\u0442\u0432\u0435\u0442\u0438\u043B",
|
|
6469
6483
|
"dock.title": "\u041D\u0438\u0436\u043D\u0438\u0439 \u0442\u0435\u0440\u043C\u0438\u043D\u0430\u043B",
|
|
6470
|
-
"dock.hint": "\u042D\u0442\u0438 \u043F\u0435\u0440\u0435\u043A\u043B\u044E\u0447\u0430\u0442\u0435\u043B\u0438 \u0432\u043B\u0438\u044F\u044E\u0442 \
|
|
6484
|
+
"dock.hint": "\u042D\u0442\u0438 \u043F\u0435\u0440\u0435\u043A\u043B\u044E\u0447\u0430\u0442\u0435\u043B\u0438 \u0432\u043B\u0438\u044F\u044E\u0442 \u0438 \u043D\u0430 \u0442\u0435\u0440\u043C\u0438\u043D\u0430\u043B \u0432 \u043D\u0438\u0436\u043D\u0435\u0439 \u043F\u0430\u043D\u0435\u043B\u0438, \u0438 \u043D\u0430 \u0432\u044B\u0431\u0438\u0440\u0430\u0435\u043C\u044B\u0435 \u0431\u044D\u043A\u0435\u043D\u0434\u044B \u0438\u043D\u0441\u0442\u0440\u0443\u043C\u0435\u043D\u0442\u0430 shell (PowerShell \u0434\u043E\u0441\u0442\u0443\u043F\u0435\u043D \u0432\u0441\u0435\u0433\u0434\u0430). \u041E\u0444\u0438\u0446\u0438\u0430\u043B\u044C\u043D\u044B\u0439 \u043F\u0440\u0430\u0432\u044B\u0439 \u0442\u0435\u0440\u043C\u0438\u043D\u0430\u043B \u043D\u0435 \u043C\u0435\u043D\u044F\u0435\u0442\u0441\u044F.",
|
|
6471
6485
|
"dock.state.available": "\u0414\u043E\u0441\u0442\u0443\u043F\u0435\u043D",
|
|
6472
6486
|
"dock.state.notInstalled": "\u041D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D",
|
|
6487
|
+
"dock.state.wslPreferred": "\u041E\u0431\u043D\u0430\u0440\u0443\u0436\u0435\u043D \u0434\u0438\u0441\u0442\u0440\u0438\u0431\u0443\u0442\u0438\u0432 WSL (\u043F\u0440\u0435\u0434\u043F\u043E\u0447\u0442\u0438\u0442\u0435\u043B\u044C\u043D\u0435\u0435 WSL bash)",
|
|
6488
|
+
"shell.payload": "POSIX payload",
|
|
6473
6489
|
"dock.state.noDistro": "\u041D\u0435\u0442 \u0443\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D\u043D\u044B\u0445 \u0434\u0438\u0441\u0442\u0440\u0438\u0431\u0443\u0442\u0438\u0432\u043E\u0432",
|
|
6474
6490
|
"dock.state.launcherOnly": "\u041D\u0430\u0439\u0434\u0435\u043D \u0442\u043E\u043B\u044C\u043A\u043E \u043B\u0430\u0443\u043D\u0447\u0435\u0440, \u0432\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u043D\u0438\u0435 \u043D\u0435\u0432\u043E\u0437\u043C\u043E\u0436\u043D\u043E",
|
|
6475
6491
|
"dock.powershell.locked": "PowerShell \u2014 \u0440\u0435\u0437\u0435\u0440\u0432\u043D\u044B\u0439 \u0432\u0430\u0440\u0438\u0430\u043D\u0442, \u0435\u0433\u043E \u043D\u0435\u043B\u044C\u0437\u044F \u043E\u0442\u043A\u043B\u044E\u0447\u0438\u0442\u044C.",
|
|
@@ -6512,9 +6528,11 @@ var es = {
|
|
|
6512
6528
|
"shell.wsl": "WSL",
|
|
6513
6529
|
"shell.unavailable": "Configuraci\xF3n no disponible: el puente de configuraci\xF3n del host no respondi\xF3",
|
|
6514
6530
|
"dock.title": "Terminal inferior",
|
|
6515
|
-
"dock.hint": "Estos interruptores
|
|
6531
|
+
"dock.hint": "Estos interruptores afectan tanto al terminal del panel inferior como a los backends seleccionables de la herramienta shell (PowerShell siempre est\xE1 disponible). El terminal oficial derecho no cambia.",
|
|
6516
6532
|
"dock.state.available": "Disponible",
|
|
6517
6533
|
"dock.state.notInstalled": "No detectado",
|
|
6534
|
+
"dock.state.wslPreferred": "Distro de WSL detectada (se prefiere bash de WSL)",
|
|
6535
|
+
"shell.payload": "POSIX payload",
|
|
6518
6536
|
"dock.state.noDistro": "Sin distribuci\xF3n instalada",
|
|
6519
6537
|
"dock.state.launcherOnly": "Solo se encontr\xF3 un lanzador; no se puede incrustar",
|
|
6520
6538
|
"dock.powershell.locked": "PowerShell es el respaldo final y no puede desactivarse.",
|
|
@@ -7680,7 +7698,7 @@ function MultiShellTerminal(props) {
|
|
|
7680
7698
|
// src/client.tsx
|
|
7681
7699
|
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
7682
7700
|
var SETTINGS_NS = "settings.bash-terminal";
|
|
7683
|
-
var SHELLS = ["powershell", "gitbash", "msys2", "wsl"];
|
|
7701
|
+
var SHELLS = ["powershell", "gitbash", "msys2", "wsl", "payload"];
|
|
7684
7702
|
var ROW_CSS = ".btRow{border-bottom:1px solid var(--dsw-alias-border-l2);align-items:center;gap:8px;padding:16px 0;display:flex}.btRowText{flex-direction:column;flex:1;gap:4px;min-width:0;padding-right:48px;display:flex}.btTitle{color:var(--dsw-alias-label-primary);font-size:14px;font-weight:400;line-height:22px}.btDesc{color:var(--dsw-alias-label-tertiary);font-size:12px;font-weight:400;line-height:18px}.btSelector{background:var(--dsw-alias-bg-module-platform);height:36px;font:inherit;color:var(--dsw-alias-label-primary);cursor:pointer;border:none;border-radius:18px;align-items:center;gap:12px;padding:0 14px;font-size:14px;line-height:22px;display:inline-flex}.btSelector:hover{background:var(--dsw-alias-interactive-bg-hover)}.btGear{position:fixed;right:16px;bottom:110px;z-index:10000;width:40px;height:40px;border-radius:50%;border:1px solid rgba(127,127,127,.4);background:rgba(30,30,32,.85);color:inherit;cursor:pointer;font-size:17px;box-shadow:0 4px 16px rgba(0,0,0,.35)}.btOverlay{position:fixed;inset:0;z-index:10000;background:rgba(0,0,0,.45)}.btPanel{position:fixed;top:6vh;left:50%;transform:translateX(-50%);width:min(760px,92vw);max-height:84vh;overflow-y:auto;z-index:10001;background:var(--dsw-alias-bg-module-platform,rgba(30,30,32,.92));border:1px solid var(--dsw-alias-border-l2,rgba(127,127,127,.3));border-radius:14px;padding:20px;color:var(--dsw-alias-label-primary)}.btBadge{border-radius:10px;padding:2px 8px;font-size:11px;line-height:16px;background:var(--dsw-alias-bg-module-platform);color:var(--dsw-alias-label-tertiary);white-space:nowrap}.btBadgeOk{color:var(--dsw-alias-label-primary)}.btNotice{color:var(--dsw-alias-label-secondary);font-size:12px;line-height:18px;padding:8px 0}.btWarn{color:var(--dsw-status-warning-default,#b8860b)}.btRowSwitch{padding-right:0}.btSwitch{width:40px;height:24px;border-radius:12px;border:none;cursor:pointer;background:var(--dsw-alias-bg-module-platform);position:relative;flex:none;transition:background .15s ease;box-shadow:inset 0 0 0 1px var(--dsw-alias-border-l2)}.btSwitch::after{content:'';position:absolute;top:3px;left:3px;width:18px;height:18px;border-radius:50%;background:var(--dsw-alias-label-tertiary);transition:transform .15s ease,background .15s ease}.btSwitchOn{background:var(--dsw-alias-interactive-brand,#2f6fed)}.btSwitchOn::after{transform:translateX(16px);background:#fff}.btSwitch:disabled{cursor:not-allowed;opacity:.4}.btSwitch:disabled::after{background:var(--dsw-alias-label-quaternary,#8a8a8a)}.btInput{background:var(--dsw-alias-bg-module-platform);height:32px;border:none;border-radius:8px;color:var(--dsw-alias-label-primary);padding:0 10px;font:inherit;min-width:0;flex:1}.btPick{position:relative;display:inline-block}.btPickBtn{gap:6px}.btPickSm{height:28px;padding:0 10px;border-radius:14px;font-size:12px;line-height:18px}.btPickBtn:disabled{opacity:.4;cursor:not-allowed}.btPickText{max-width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.btPickCaret{color:var(--dsw-alias-label-tertiary);font-size:10px;line-height:1}.btPickList{position:absolute;z-index:1000;top:calc(100% + 4px);left:0;min-width:100%;max-height:260px;overflow-y:auto;padding:4px;border:1px solid var(--dsw-alias-border-l2);border-radius:10px;background:var(--dsw-alias-bg-overlay);box-shadow:0 8px 24px rgba(0,0,0,.28)}.btPickOpt{padding:6px 10px;font-size:12px;line-height:18px;border-radius:6px;color:var(--dsw-alias-label-primary);cursor:pointer;white-space:nowrap}.btPickOpt:hover{background:var(--dsw-alias-interactive-bg-hover)}.btPickOptOn{color:var(--dsw-alias-interactive-brand);font-weight:600}";
|
|
7685
7703
|
if (typeof document !== "undefined" && document.querySelector('style[data-plugin-css="bash-terminal-row"]') === null) {
|
|
7686
7704
|
const tag = document.createElement("style");
|
|
@@ -7706,10 +7724,22 @@ function catalogOf(snapshot) {
|
|
|
7706
7724
|
function badgeKey(row) {
|
|
7707
7725
|
if (!row.togglable) return "dock.state.floor";
|
|
7708
7726
|
if (row.available) return "dock.state.available";
|
|
7709
|
-
return row.reason === "no-distro" ? "dock.state.noDistro" : row.reason === "launcher-only" ? "dock.state.launcherOnly" : "dock.state.notInstalled";
|
|
7727
|
+
return row.reason === "no-distro" ? "dock.state.noDistro" : row.reason === "launcher-only" ? "dock.state.launcherOnly" : row.reason === "wsl-preferred" ? "dock.state.wslPreferred" : "dock.state.notInstalled";
|
|
7728
|
+
}
|
|
7729
|
+
function dropdownRows(snapshot, chosen) {
|
|
7730
|
+
const all = SHELLS.map((id) => ({ id, label: tr("shell." + id) }));
|
|
7731
|
+
const rows = catalogOf(snapshot);
|
|
7732
|
+
if (rows === null) return all;
|
|
7733
|
+
const usable = rows.filter((row) => row.activated && row.available).map((row) => ({ id: row.id, label: tr("shell." + row.id) }));
|
|
7734
|
+
if (chosen.length > 0 && !usable.some((row) => row.id === chosen)) {
|
|
7735
|
+
const extra = all.find((row) => row.id === chosen);
|
|
7736
|
+
if (extra !== void 0) usable.push(extra);
|
|
7737
|
+
}
|
|
7738
|
+
return usable;
|
|
7710
7739
|
}
|
|
7711
7740
|
function ShellPreferenceRow({ snapshot }) {
|
|
7712
7741
|
const [shell, setShell] = (0, import_react3.useState)("powershell");
|
|
7742
|
+
const [snap, setSnap] = (0, import_react3.useState)(snapshot ?? null);
|
|
7713
7743
|
const [status, setStatus] = (0, import_react3.useState)("loading");
|
|
7714
7744
|
(0, import_react3.useEffect)(() => {
|
|
7715
7745
|
let alive = true;
|
|
@@ -7718,6 +7748,7 @@ function ShellPreferenceRow({ snapshot }) {
|
|
|
7718
7748
|
if (!alive) return;
|
|
7719
7749
|
if (v && v.defaultShell) {
|
|
7720
7750
|
setShell(v.defaultShell);
|
|
7751
|
+
setSnap(v);
|
|
7721
7752
|
setStatus("ready");
|
|
7722
7753
|
} else {
|
|
7723
7754
|
setStatus("unavailable");
|
|
@@ -7751,7 +7782,7 @@ function ShellPreferenceRow({ snapshot }) {
|
|
|
7751
7782
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
7752
7783
|
ShellPicker,
|
|
7753
7784
|
{
|
|
7754
|
-
rows:
|
|
7785
|
+
rows: dropdownRows(snap, shell),
|
|
7755
7786
|
value: shell,
|
|
7756
7787
|
onChange: (next) => change(next)
|
|
7757
7788
|
}
|
package/lib/dsh-types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** The terminal backends this plugin exposes. */
|
|
2
|
-
export type ShellId = "powershell" | "gitbash" | "msys2" | "wsl";
|
|
2
|
+
export type ShellId = "powershell" | "gitbash" | "msys2" | "wsl" | "payload";
|
|
3
3
|
/** Permissive node of the DSH JSON-schema dialect used in tool output declarations. */
|
|
4
4
|
export interface JsonSchemaNode {
|
|
5
5
|
type?: string;
|
|
@@ -175,6 +175,8 @@ export interface ResolvedPaths {
|
|
|
175
175
|
gitbash?: string;
|
|
176
176
|
msys2?: string;
|
|
177
177
|
wsl?: string;
|
|
178
|
+
/** The digest-verified pinned POSIX runtime payload (see src/payload.ts). */
|
|
179
|
+
payload?: string;
|
|
178
180
|
}
|
|
179
181
|
export interface CollectSpec {
|
|
180
182
|
maxBytes: number;
|
package/lib/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ export declare const name = "bash-terminal";
|
|
|
4
4
|
/** Services required before the tool can register. */
|
|
5
5
|
export declare const inject: string[];
|
|
6
6
|
/** The terminal backends this tool exposes, in catalog order. */
|
|
7
|
-
export declare const SHELLS: readonly ["powershell", "gitbash", "msys2", "wsl"];
|
|
7
|
+
export declare const SHELLS: readonly ["powershell", "gitbash", "msys2", "wsl", "payload"];
|
|
8
8
|
/** The backend used when the caller does not name one. */
|
|
9
9
|
export declare const DEFAULT_SHELL: ShellId;
|
|
10
10
|
/** Static shape of the runtime configuration schema. */
|
|
@@ -41,8 +41,29 @@ export interface ConfigValues {
|
|
|
41
41
|
shellGitBash: boolean;
|
|
42
42
|
shellMsys2: boolean;
|
|
43
43
|
shellWsl: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* Activation switch for the payload row in the bottom-terminal UI. Separate
|
|
46
|
+
* from `enablePosixPayload` (the operator gate that RUNS the digest check at
|
|
47
|
+
* startup): this one only decides whether a resolved payload may appear in
|
|
48
|
+
* pickers. Default false - the payload is opt-in twice, provisioning and
|
|
49
|
+
* activation.
|
|
50
|
+
*/
|
|
51
|
+
shellPayload: boolean;
|
|
44
52
|
/** WSL distribution for the browser terminal; '' means the WSL default. */
|
|
45
53
|
wslDistro: string;
|
|
54
|
+
/**
|
|
55
|
+
* Pinned backup POSIX runtime payload (see src/payload.ts - the artifact is
|
|
56
|
+
* a Git-for-Windows tree; OUR name avoids the bash/msys tokens by policy).
|
|
57
|
+
* Default off; enabling it lets a digest-verified payload fill the Git Bash
|
|
58
|
+
* slot as a LAST-RESORT source when the machine has no system Git Bash. A
|
|
59
|
+
* detected WSL distro outranks the payload entirely (a real WSL bash is the
|
|
60
|
+
* better POSIX shell), and an unverifiable payload fails closed - it is
|
|
61
|
+
* never run, never silently replaced. Resolved at startup, so toggling
|
|
62
|
+
* takes effect on the next restart.
|
|
63
|
+
*/
|
|
64
|
+
enablePosixPayload: boolean;
|
|
65
|
+
/** Explicit payload root or bin/bash.exe path; '' = auto-discovery only. */
|
|
66
|
+
payloadPosixPath: string;
|
|
46
67
|
}
|
|
47
68
|
/** Runtime configuration schema. */
|
|
48
69
|
export declare const Config: import("./dsh.js").SchemasterySchema;
|
|
@@ -74,7 +95,7 @@ export declare function defaultWslPath(env?: NodeJS.ProcessEnv): string;
|
|
|
74
95
|
/** Executable paths, possibly undefined when a backend is not installed. */
|
|
75
96
|
export type { ResolvedPaths };
|
|
76
97
|
type PathConfig = Partial<Pick<ConfigValues, "pwshPath" | "gitBashPath" | "msys2Path" | "wslPath">>;
|
|
77
|
-
export declare function resolveAllPaths(config?: PathConfig, env?: NodeJS.ProcessEnv): ResolvedPaths;
|
|
98
|
+
export declare function resolveAllPaths(config?: PathConfig, env?: NodeJS.ProcessEnv, payloadBash?: string): ResolvedPaths;
|
|
78
99
|
export declare function buildArgv(shell: string, command: string, paths: ResolvedPaths, distro?: string): Array<string | undefined>;
|
|
79
100
|
/**
|
|
80
101
|
* Merge the DSH_* environment over the process environment. For WSL, only
|