dsh-bash-terminal-ts 0.9.1 → 0.9.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.
Files changed (71) hide show
  1. package/CHANGELOG.md +214 -205
  2. package/CHANGELOG.pt.md +151 -151
  3. package/README.de.md +206 -206
  4. package/README.en.md +212 -212
  5. package/README.es.md +206 -206
  6. package/README.fr.md +206 -206
  7. package/README.it.md +206 -206
  8. package/README.md +423 -423
  9. package/README.pt.md +212 -212
  10. package/README.ru.md +206 -206
  11. package/agent-presets/README.md +171 -171
  12. package/agent-presets/install-presets.mjs +180 -180
  13. package/agent-presets/standard-win/agent.cordis.yml +271 -271
  14. package/agent-presets/standard-win/preset.yml +2 -2
  15. package/agent-presets/standard-win-gitbash/agent.cordis.yml +271 -271
  16. package/agent-presets/standard-win-gitbash/preset.yml +2 -2
  17. package/agent-presets/standard-win-msys2/agent.cordis.yml +272 -272
  18. package/agent-presets/standard-win-msys2/preset.yml +2 -2
  19. package/agent-presets/standard-win-niu/agent.cordis.yml +270 -270
  20. package/agent-presets/standard-win-niu/preset.yml +2 -2
  21. package/agent-presets/standard-win-wsl2/agent.cordis.yml +271 -271
  22. package/agent-presets/standard-win-wsl2/preset.yml +2 -2
  23. package/cordis.patch.yml +72 -84
  24. package/dist/client.core.js +193 -12
  25. package/dist/client.js +193 -12
  26. package/docs/niu-backend.md +197 -197
  27. package/dsh.plugin.json +23 -23
  28. package/lib/client.js +193 -12
  29. package/lib/dsh-types.d.ts +0 -2
  30. package/lib/index.d.ts +2 -23
  31. package/lib/index.js +4 -34
  32. package/lib/locales.js +0 -10
  33. package/lib/shell-id.d.ts +2 -2
  34. package/lib/shells.d.ts +2 -11
  35. package/lib/shells.js +4 -14
  36. package/lib/terminal.js +0 -1
  37. package/lib/webterminals/catalog.d.ts +0 -2
  38. package/lib/webterminals/catalog.js +0 -1
  39. package/lib/webterminals/mount.d.ts +0 -5
  40. package/lib/webterminals/mount.js +0 -4
  41. package/locale/de.json +5 -5
  42. package/locale/en.json +5 -5
  43. package/locale/es.json +5 -5
  44. package/locale/fr.json +5 -5
  45. package/locale/it.json +5 -5
  46. package/locale/ja.json +5 -5
  47. package/locale/ko.json +5 -5
  48. package/locale/pt.json +6 -6
  49. package/locale/ru.json +5 -5
  50. package/locale/zh.json +5 -5
  51. package/package.json +1 -5
  52. package/scripts/check-artifacts.mjs +96 -96
  53. package/scripts/link-shells.mjs +0 -21
  54. package/src/client.tsx +687 -685
  55. package/src/dsh-types.ts +330 -332
  56. package/src/index.ts +1267 -1316
  57. package/src/locales.ts +499 -509
  58. package/src/shell-id.ts +11 -11
  59. package/src/shells.ts +263 -279
  60. package/src/terminal.ts +615 -616
  61. package/src/webterminals/browser/star-row-copy.ts +256 -0
  62. package/src/webterminals/catalog.ts +0 -3
  63. package/src/webterminals/host.ts +361 -361
  64. package/src/webterminals/mount.ts +228 -237
  65. package/agent-presets/standard-win-payload/agent.cordis.yml +0 -271
  66. package/agent-presets/standard-win-payload/preset.yml +0 -2
  67. package/lib/payload.d.ts +0 -72
  68. package/lib/payload.js +0 -279
  69. package/scripts/payload-alias.mjs +0 -97
  70. package/scripts/provision-payload.mjs +0 -233
  71. package/src/payload.ts +0 -322
package/cordis.patch.yml CHANGED
@@ -1,84 +1,72 @@
1
- # dsh-bash-terminal-ts bundle layer — applied automatically when a profile lists
2
- # this package in dsh.profile.bundles (dsh.bundle.patch declaration).
3
- - insert:
4
- - id: tool-bash-terminal
5
- name: 'dsh-bash-terminal-ts'
6
-
7
- # ---------------------------------------------------------------------------
8
- # The host's own right-sidebar terminal: which shells its selector offers.
9
- #
10
- # Why a plugin touches this at all (user decision, 2026-10-13, overriding the
11
- # original "never modify the host terminal row" rule): the official menu builds
12
- # its list from `shellCandidates` through `discoverShells`, which keys a Map by
13
- # the executable FILE NAME (`shellKind` = basename, lower-cased, `.exe`
14
- # stripped) and keeps the earliest entry. Git Bash and MSYS2 are both
15
- # `bash.exe`, so on the stock list MSYS2 can never appear. A hard link at
16
- # `C:\msys64\usr\bin\msys-bash.exe` gives it a distinct kind; measured over a
17
- # real PTY, bash does not mis-classify itself under the new name
18
- # (`argv0=/usr/bin/msys-bash`, `$BASH_VERSION` 5.3.15, `gcc` resolving to
19
- # /mingw64/bin, correct `-dumpmachine`).
20
- #
21
- # Why all twelve keys are spelled out: a patch replaces the targeted row's WHOLE
22
- # config. Omit one and that limit silently reverts to nothing at all - each
23
- # field's `.default()` applies when the field is absent from the schema input,
24
- # and a replaced row provides no input for the keys it does not mention.
25
- # `scripts/check-artifacts.mjs` asserts the full key set, so a host upgrade that
26
- # adds a thirteenth key fails the build instead of quietly dropping a limit.
27
- #
28
- # Which entries are prepended, and why nothing is displaced: `discoverShells` keeps the
29
- # EARLIEST entry per executable file name, and on Windows a bare `bash` resolves to
30
- # `C:\Windows\System32\bash.exe` - the WSL forwarder. Listing `Git\bin\bash.exe` here (an
31
- # earlier revision did exactly that) would claim that key for Git and silently DELETE WSL
32
- # from the menu. Both additions therefore carry their own file name: `msys-bash.exe` is a
33
- # hard link in the user-writable MSYS2 tree, and `git-bash.exe` is a hard link inside
34
- # `C:\Program Files\Git\bin\`, which needs one elevated step by the operator:
35
- #
36
- # New-Item -ItemType HardLink -Path 'C:\Program Files\Git\bin\git-bash.exe' -Target 'C:\Program Files\Git\bin\bash.exe'
37
- #
38
- # (It has to live in that directory: bash derives its POSIX root from its own path, and a
39
- # link elsewhere cannot even be created - CreateHardLink needs write access to the source
40
- # file, which Program Files denies a standard user.) Until that link exists the candidate
41
- # is skipped, so the row is correct either way and the stock candidates stay untouched.
42
- #
43
- # The third addition is the pinned POSIX payload's own menu entry, and it is the reason
44
- # the link is named `bash-terminal.exe` rather than anything containing a bare `bash`:
45
- # the stock list already spends the `bash` key on the WSL forwarder, and re-using it
46
- # would DELETE that row from the menu. The path is built from LOCALAPPDATA with `!!js`
47
- # because the payload store lives per-user, and it points at the STABLE junction
48
- # (`payloads\bash-terminal`) so re-provisioning a new version does not need a patch
49
- # edit. Both the link and the junction are created by scripts/provision-payload.mjs /
50
- # link-shells.mjs only AFTER the digest gate passed, and a machine that never
51
- # provisioned a payload simply has no file here - skipped per candidate, like the
52
- # others. See scripts/payload-alias.mjs for the full layout.
53
- #
54
- # `shell` is deliberately absent: that means "no explicit default", so the
55
- # controller uses the execution environment's default shell - the stock
56
- # behaviour, unchanged.
57
- #
58
- # Degradation: `discoverShells` catches SubprocessExecutableNotFoundError per
59
- # candidate, so a machine without Git, or without the link, simply offers fewer
60
- # shells. This row cannot fail.
61
- # ---------------------------------------------------------------------------
62
- - id: terminal-controller
63
- config:
64
- shellCandidates:
65
- - !!js '(process.env.LOCALAPPDATA || "") + "\\dsh-bash-terminal-ts\\payloads\\bash-terminal\\bin\\bash-terminal.exe"'
66
- - 'C:\Program Files\Git\bin\git-bash.exe'
67
- - 'C:\msys64\usr\bin\msys-bash.exe'
68
- - zsh
69
- - bash
70
- - fish
71
- - pwsh
72
- - powershell
73
- - cmd
74
- - niu.exe
75
- maxTerminals: 8
76
- maxCols: 500
77
- maxRows: 200
78
- scrollback: 1000
79
- maxBufferedBytes: 2097152
80
- maxInputBytes: 65536
81
- disposeGraceMs: 1000
82
- unattendedTimeoutMs: 7200000
83
- activityPollIntervalMs: 30000
84
- cleanupRetryMs: 60000
1
+ # dsh-bash-terminal-ts bundle layer — applied automatically when a profile lists
2
+ # this package in dsh.profile.bundles (dsh.bundle.patch declaration).
3
+ - insert:
4
+ - id: tool-bash-terminal
5
+ name: 'dsh-bash-terminal-ts'
6
+
7
+ # ---------------------------------------------------------------------------
8
+ # The host's own right-sidebar terminal: which shells its selector offers.
9
+ #
10
+ # Why a plugin touches this at all (user decision, 2026-10-13, overriding the
11
+ # original "never modify the host terminal row" rule): the official menu builds
12
+ # its list from `shellCandidates` through `discoverShells`, which keys a Map by
13
+ # the executable FILE NAME (`shellKind` = basename, lower-cased, `.exe`
14
+ # stripped) and keeps the earliest entry. Git Bash and MSYS2 are both
15
+ # `bash.exe`, so on the stock list MSYS2 can never appear. A hard link at
16
+ # `C:\msys64\usr\bin\msys-bash.exe` gives it a distinct kind; measured over a
17
+ # real PTY, bash does not mis-classify itself under the new name
18
+ # (`argv0=/usr/bin/msys-bash`, `$BASH_VERSION` 5.3.15, `gcc` resolving to
19
+ # /mingw64/bin, correct `-dumpmachine`).
20
+ #
21
+ # Why all twelve keys are spelled out: a patch replaces the targeted row's WHOLE
22
+ # config. Omit one and that limit silently reverts to nothing at all - each
23
+ # field's `.default()` applies when the field is absent from the schema input,
24
+ # and a replaced row provides no input for the keys it does not mention.
25
+ # `scripts/check-artifacts.mjs` asserts the full key set, so a host upgrade that
26
+ # adds a thirteenth key fails the build instead of quietly dropping a limit.
27
+ #
28
+ # Which entries are prepended, and why nothing is displaced: `discoverShells` keeps the
29
+ # EARLIEST entry per executable file name, and on Windows a bare `bash` resolves to
30
+ # `C:\Windows\System32\bash.exe` - the WSL forwarder. Listing `Git\bin\bash.exe` here (an
31
+ # earlier revision did exactly that) would claim that key for Git and silently DELETE WSL
32
+ # from the menu. Both additions therefore carry their own file name: `msys-bash.exe` is a
33
+ # hard link in the user-writable MSYS2 tree, and `git-bash.exe` is a hard link inside
34
+ # `C:\Program Files\Git\bin\`, which needs one elevated step by the operator:
35
+ #
36
+ # New-Item -ItemType HardLink -Path 'C:\Program Files\Git\bin\git-bash.exe' -Target 'C:\Program Files\Git\bin\bash.exe'
37
+ #
38
+ # (It has to live in that directory: bash derives its POSIX root from its own path, and a
39
+ # link elsewhere cannot even be created - CreateHardLink needs write access to the source
40
+ # file, which Program Files denies a standard user.) Until that link exists the candidate
41
+ # is skipped, so the row is correct either way and the stock candidates stay untouched.
42
+ #
43
+ # `shell` is deliberately absent: that means "no explicit default", so the
44
+ # controller uses the execution environment's default shell - the stock
45
+ # behaviour, unchanged.
46
+ #
47
+ # Degradation: `discoverShells` catches SubprocessExecutableNotFoundError per
48
+ # candidate, so a machine without Git, or without the link, simply offers fewer
49
+ # shells. This row cannot fail.
50
+ # ---------------------------------------------------------------------------
51
+ - id: terminal-controller
52
+ config:
53
+ shellCandidates:
54
+ - 'C:\Program Files\Git\bin\git-bash.exe'
55
+ - 'C:\msys64\usr\bin\msys-bash.exe'
56
+ - zsh
57
+ - bash
58
+ - fish
59
+ - pwsh
60
+ - powershell
61
+ - cmd
62
+ - niu.exe
63
+ maxTerminals: 8
64
+ maxCols: 500
65
+ maxRows: 200
66
+ scrollback: 1000
67
+ maxBufferedBytes: 2097152
68
+ maxInputBytes: 65536
69
+ disposeGraceMs: 1000
70
+ unattendedTimeoutMs: 7200000
71
+ activityPollIntervalMs: 30000
72
+ cleanupRetryMs: 60000
@@ -6151,7 +6151,6 @@ var zh = {
6151
6151
  "dock.state.available": "\u53EF\u7528",
6152
6152
  "dock.state.notInstalled": "\u672A\u63A2\u6D4B\u5230",
6153
6153
  "dock.state.wslPreferred": "\u5DF2\u68C0\u6D4B\u5230 WSL \u53D1\u884C\u7248\uFF08\u4F18\u5148\u7528 WSL bash\uFF09",
6154
- "shell.payload": "POSIX payload",
6155
6154
  "shell.niu": "Niubash",
6156
6155
  "dock.state.noDistro": "\u65E0\u5DF2\u5B89\u88C5\u53D1\u884C\u7248",
6157
6156
  "dock.state.launcherOnly": "\u53EA\u627E\u5230\u542F\u52A8\u5668\uFF0C\u65E0\u6CD5\u5185\u5D4C",
@@ -6199,7 +6198,6 @@ var en = {
6199
6198
  "dock.state.available": "Available",
6200
6199
  "dock.state.notInstalled": "Not found",
6201
6200
  "dock.state.wslPreferred": "WSL distro detected (WSL bash preferred)",
6202
- "shell.payload": "POSIX payload",
6203
6201
  "shell.niu": "Niubash",
6204
6202
  "dock.state.noDistro": "No distro installed",
6205
6203
  "dock.state.launcherOnly": "Only a launcher was found; it cannot be embedded",
@@ -6247,7 +6245,6 @@ var ja = {
6247
6245
  "dock.state.available": "\u5229\u7528\u53EF",
6248
6246
  "dock.state.notInstalled": "\u898B\u3064\u304B\u308A\u307E\u305B\u3093",
6249
6247
  "dock.state.wslPreferred": "WSL \u30C7\u30A3\u30B9\u30C8\u30EA\u691C\u51FA\u6E08\u307F\uFF08WSL bash \u512A\u5148\uFF09",
6250
- "shell.payload": "POSIX payload",
6251
6248
  "shell.niu": "Niubash",
6252
6249
  "dock.state.noDistro": "\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u6E08\u307F\u30C7\u30A3\u30B9\u30C8\u30EA\u30D3\u30E5\u30FC\u30B7\u30E7\u30F3\u306A\u3057",
6253
6250
  "dock.state.launcherOnly": "\u30E9\u30F3\u30C1\u30E3\u30FC\u306E\u307F\u691C\u51FA\u3001\u57CB\u3081\u8FBC\u307F\u4E0D\u53EF",
@@ -6295,7 +6292,6 @@ var ko = {
6295
6292
  "dock.state.available": "\uC0AC\uC6A9 \uAC00\uB2A5",
6296
6293
  "dock.state.notInstalled": "\uD0D0\uC9C0\uB418\uC9C0 \uC54A\uC74C",
6297
6294
  "dock.state.wslPreferred": "WSL \uBC30\uD3EC\uD310 \uAC10\uC9C0\uB428 (WSL bash \uC6B0\uC120)",
6298
- "shell.payload": "POSIX payload",
6299
6295
  "shell.niu": "Niubash",
6300
6296
  "dock.state.noDistro": "\uC124\uCE58\uB41C \uBC30\uD3EC\uD310 \uC5C6\uC74C",
6301
6297
  "dock.state.launcherOnly": "\uB7F0\uCC98\uB9CC \uBC1C\uACAC\uB418\uC5B4 \uB0B4\uC7A5\uD560 \uC218 \uC5C6\uC74C",
@@ -6343,7 +6339,6 @@ var fr = {
6343
6339
  "dock.state.available": "Disponible",
6344
6340
  "dock.state.notInstalled": "Non d\xE9tect\xE9",
6345
6341
  "dock.state.wslPreferred": "Distro WSL d\xE9tect\xE9e (bash WSL pr\xE9f\xE9r\xE9)",
6346
- "shell.payload": "POSIX payload",
6347
6342
  "shell.niu": "Niubash",
6348
6343
  "dock.state.noDistro": "Aucune distribution install\xE9e",
6349
6344
  "dock.state.launcherOnly": "Seuls des lanceurs ont \xE9t\xE9 trouv\xE9s; int\xE9gration impossible",
@@ -6391,7 +6386,6 @@ var de = {
6391
6386
  "dock.state.available": "Verf\xFCgbar",
6392
6387
  "dock.state.notInstalled": "Nicht gefunden",
6393
6388
  "dock.state.wslPreferred": "WSL-Distro erkannt (WSL bash bevorzugt)",
6394
- "shell.payload": "POSIX payload",
6395
6389
  "shell.niu": "Niubash",
6396
6390
  "dock.state.noDistro": "Keine Distribution installiert",
6397
6391
  "dock.state.launcherOnly": "Nur Launcher gefunden; Einbettung nicht m\xF6glich",
@@ -6439,7 +6433,6 @@ var it = {
6439
6433
  "dock.state.available": "Disponibile",
6440
6434
  "dock.state.notInstalled": "Non trovato",
6441
6435
  "dock.state.wslPreferred": "Distro WSL rilevata (bash WSL preferito)",
6442
- "shell.payload": "POSIX payload",
6443
6436
  "shell.niu": "Niubash",
6444
6437
  "dock.state.noDistro": "Nessuna distribuzione installata",
6445
6438
  "dock.state.launcherOnly": "Trovato solo un launcher; incorporamento non possibile",
@@ -6487,7 +6480,6 @@ var ru = {
6487
6480
  "dock.state.available": "\u0414\u043E\u0441\u0442\u0443\u043F\u0435\u043D",
6488
6481
  "dock.state.notInstalled": "\u041D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D",
6489
6482
  "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)",
6490
- "shell.payload": "POSIX payload",
6491
6483
  "shell.niu": "Niubash",
6492
6484
  "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",
6493
6485
  "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",
@@ -6535,7 +6527,6 @@ var es = {
6535
6527
  "dock.state.available": "Disponible",
6536
6528
  "dock.state.notInstalled": "No detectado",
6537
6529
  "dock.state.wslPreferred": "Distro de WSL detectada (se prefiere bash de WSL)",
6538
- "shell.payload": "POSIX payload",
6539
6530
  "shell.niu": "Niubash",
6540
6531
  "dock.state.noDistro": "Sin distribuci\xF3n instalada",
6541
6532
  "dock.state.launcherOnly": "Solo se encontr\xF3 un lanzador; no se puede incrustar",
@@ -6583,7 +6574,6 @@ var pt = {
6583
6574
  "dock.state.available": "Dispon\xEDvel",
6584
6575
  "dock.state.notInstalled": "N\xE3o detectado",
6585
6576
  "dock.state.wslPreferred": "Distro WSL detectada (bash do WSL preferido)",
6586
- "shell.payload": "POSIX payload",
6587
6577
  "shell.niu": "Niubash",
6588
6578
  "dock.state.noDistro": "Nenhuma distribui\xE7\xE3o instalada",
6589
6579
  "dock.state.launcherOnly": "Apenas um lan\xE7ador foi encontrado; n\xE3o \xE9 poss\xEDvel incorpor\xE1-lo",
@@ -7747,10 +7737,198 @@ function MultiShellTerminal(props) {
7747
7737
  ] });
7748
7738
  }
7749
7739
 
7740
+ // src/webterminals/browser/star-row-copy.ts
7741
+ var REPO_URL = "https://github.com/drscrewdriver/dsh-bash-terminal-ts";
7742
+ var STAR_NS = "bash-terminal";
7743
+ var STAR_VARIANT = "S";
7744
+ var STAR_COPY = {
7745
+ zh: { ask: "\u89C9\u5F97\u7701\u4E8B\u4E86\uFF1F\u4E00\u9897 Star \u8BA9\u5DE5\u5177\u88AB\u66F4\u591A\u4EBA\u770B\u89C1" },
7746
+ en: { ask: "Finding it handy? A star helps more people discover this tool" },
7747
+ ja: { ask: "\u4FBF\u5229\u3067\u3057\u305F\u3089\u2B50\u3067\u3001\u3053\u306E\u30C4\u30FC\u30EB\u304C\u3082\u3063\u3068\u5C4A\u304D\u307E\u3059" },
7748
+ ko: { ask: "\uC720\uC6A9\uD588\uB2E4\uBA74 \u2B50 \uD558\uB098\uB85C \uB354 \uB9CE\uC740 \uC0AC\uC6A9\uC790\uC5D0\uAC8C \uB2FF\uC2B5\uB2C8\uB2E4" },
7749
+ fr: { ask: "Utile ? Une \xE9toile aide cet outil \xE0 \xEAtre d\xE9couvert" },
7750
+ de: { ask: "N\xFCtzlich? Ein Stern hilft dem Tool, gesehen zu werden" },
7751
+ it: { ask: "Ti \xE8 utile? Una stella aiuta questo tool a farsi scoprire" },
7752
+ ru: { ask: "\u041F\u0440\u0438\u0433\u043E\u0434\u0438\u043B\u043E\u0441\u044C? \u0417\u0432\u0435\u0437\u0434\u0430 \u043F\u043E\u043C\u043E\u0436\u0435\u0442 \u0431\u043E\u043B\u044C\u0448\u0435\u043C\u0443 \u0447\u0438\u0441\u043B\u0443 \u043B\u044E\u0434\u0435\u0439 \u0443\u0437\u043D\u0430\u0442\u044C \u043E tool" },
7753
+ es: { ask: "\xBFTe resulta \xFAtil? Una estrella ayuda a que m\xE1s gente lo descubra" },
7754
+ pt: { ask: "Achou \xFAtil? Uma estrela ajuda mais pessoas a descobrir a ferramenta" }
7755
+ };
7756
+ var STAR_LANGS = ["zh", "en", "ja", "ko", "fr", "de", "it", "ru", "es", "pt"];
7757
+ var GITHUB_MARK_PATH = "M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332 -5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12";
7758
+ var STYLE_ID = "dsh-star-row-style";
7759
+ var STYLE_CSS = [
7760
+ ".dsh-star-row{display:flex;align-items:center;gap:7px;font-size:12px;",
7761
+ "line-height:1.5;color:inherit;text-decoration:none;opacity:.72;padding:3px 0;",
7762
+ "margin-top:6px;min-width:0;flex-wrap:wrap}",
7763
+ ".dsh-star-row:hover{opacity:1;text-decoration:underline}",
7764
+ ".dsh-star-row svg{width:14px;height:14px;flex:none;display:block}",
7765
+ ".dsh-star-row .dsh-star-ask{opacity:.85;font-weight:400}"
7766
+ ].join("");
7767
+ function pickLang() {
7768
+ const tag = typeof document !== "undefined" && document.documentElement.lang || "";
7769
+ const low = tag.toLowerCase();
7770
+ for (const cand of STAR_LANGS) {
7771
+ if (low.startsWith(cand)) return STAR_COPY[cand];
7772
+ }
7773
+ return STAR_COPY.en;
7774
+ }
7775
+ var STAR_CTA = {
7776
+ zh: "\u7559\u9897 Star",
7777
+ en: "Star",
7778
+ ja: "\u30B9\u30BF\u30FC",
7779
+ ko: "\uC2A4\uD0C0",
7780
+ fr: "Star",
7781
+ de: "Stern",
7782
+ it: "Stella",
7783
+ ru: "\u0417\u0432\u0435\u0437\u0434\u0430",
7784
+ es: "Estrella",
7785
+ pt: "Estrela"
7786
+ };
7787
+ var STAR_HIDE = {
7788
+ zh: "\u4E0D\u518D\u63D0\u793A",
7789
+ en: "Dismiss",
7790
+ ja: "\u4ECA\u5F8C\u8868\u793A\u3057\u306A\u3044",
7791
+ ko: "\uB2E4\uC2DC \uBCF4\uC9C0 \uC54A\uAE30",
7792
+ fr: "Masquer",
7793
+ de: "Ausblenden",
7794
+ it: "Nascondi",
7795
+ ru: "\u0421\u043A\u0440\u044B\u0442\u044C",
7796
+ es: "Ocultar",
7797
+ pt: "Ocultar"
7798
+ };
7799
+ var STAR_S_STYLE_ID = "dsh-star-row-s-style";
7800
+ var STAR_S_STYLE = [
7801
+ ".dsh-star-row-s{display:flex;align-items:center;gap:8px;flex-wrap:wrap;",
7802
+ "font-size:12px;line-height:1.5;color:inherit;opacity:.75;margin-top:10px;",
7803
+ "padding-top:8px;border-top:1px solid var(--dsw-alias-border-l2,currentColor)}",
7804
+ ".dsh-star-row-s:hover{opacity:1}",
7805
+ ".dsh-star-link{display:inline-flex;align-items:center;gap:6px;",
7806
+ "color:inherit;text-decoration:none}",
7807
+ ".dsh-star-link:hover{text-decoration:underline}",
7808
+ ".dsh-star-link svg{width:14px;height:14px;flex:none;display:block}",
7809
+ ".dsh-star-row-s .dsh-star-ask{opacity:.85;font-weight:400}",
7810
+ ".dsh-star-cta,.dsh-star-hide{font:inherit;font-size:11px;line-height:1;",
7811
+ "padding:4px 9px;border-radius:999px;border:1px solid currentColor;",
7812
+ "background:transparent;color:inherit;cursor:pointer;flex:none;opacity:.7}",
7813
+ ".dsh-star-hide{padding:4px 7px}",
7814
+ ".dsh-star-cta:hover,.dsh-star-hide:hover{opacity:1}"
7815
+ ].join("");
7816
+ function starLang() {
7817
+ const tag = typeof document !== "undefined" && document.documentElement.lang || "";
7818
+ const low = tag.toLowerCase();
7819
+ for (const cand of STAR_LANGS) if (low.startsWith(cand)) return cand;
7820
+ return "en";
7821
+ }
7822
+ function starDismissed() {
7823
+ try {
7824
+ return localStorage.getItem("dsh.star." + STAR_NS + ".dismissed") === "1";
7825
+ } catch {
7826
+ return false;
7827
+ }
7828
+ }
7829
+ function starDismiss() {
7830
+ try {
7831
+ localStorage.setItem("dsh.star." + STAR_NS + ".dismissed", "1");
7832
+ } catch {
7833
+ }
7834
+ }
7835
+ function injectStarSStyle(d) {
7836
+ if (d.getElementById(STAR_S_STYLE_ID)) return;
7837
+ const style = d.createElement("style");
7838
+ style.id = STAR_S_STYLE_ID;
7839
+ style.textContent = STAR_S_STYLE;
7840
+ d.head.appendChild(style);
7841
+ }
7842
+ function openRepo(d) {
7843
+ const a = d.createElement("a");
7844
+ a.href = REPO_URL;
7845
+ a.target = "_blank";
7846
+ a.rel = "noopener noreferrer";
7847
+ a.click();
7848
+ }
7849
+ function extendedStarRow(link, d) {
7850
+ if (STAR_VARIANT !== "S") return null;
7851
+ if (starDismissed()) return link;
7852
+ injectStarSStyle(d);
7853
+ link.className = "dsh-star-link";
7854
+ const lang = starLang();
7855
+ const row = d.createElement("div");
7856
+ row.className = "dsh-star-row-s";
7857
+ row.appendChild(link);
7858
+ const ask = d.createElement("span");
7859
+ ask.className = "dsh-star-ask";
7860
+ ask.textContent = STAR_COPY[lang].ask;
7861
+ row.appendChild(ask);
7862
+ const cta = d.createElement("button");
7863
+ cta.type = "button";
7864
+ cta.className = "dsh-star-cta";
7865
+ cta.textContent = "\u2605 " + STAR_CTA[lang];
7866
+ cta.addEventListener("click", (event) => {
7867
+ event.preventDefault();
7868
+ event.stopPropagation();
7869
+ openRepo(d);
7870
+ });
7871
+ row.appendChild(cta);
7872
+ const hide = d.createElement("button");
7873
+ hide.type = "button";
7874
+ hide.className = "dsh-star-hide";
7875
+ hide.textContent = "\xD7";
7876
+ hide.title = STAR_HIDE[lang];
7877
+ hide.setAttribute("aria-label", STAR_HIDE[lang]);
7878
+ hide.addEventListener("click", (event) => {
7879
+ event.preventDefault();
7880
+ event.stopPropagation();
7881
+ starDismiss();
7882
+ if (row.parentNode) {
7883
+ row.parentNode.replaceChild(link, row);
7884
+ link.className = "dsh-star-row";
7885
+ }
7886
+ });
7887
+ row.appendChild(hide);
7888
+ return row;
7889
+ }
7890
+ function mountStarRow(doc) {
7891
+ const d = doc ?? document;
7892
+ if (!d.getElementById(STYLE_ID)) {
7893
+ const tag = d.createElement("style");
7894
+ tag.id = STYLE_ID;
7895
+ tag.textContent = STYLE_CSS;
7896
+ d.head.appendChild(tag);
7897
+ }
7898
+ const match = REPO_URL.match(/github\.com\/([^/]+\/[^/#?]+)/);
7899
+ const repo = match ? match[1] : "drscrewdriver";
7900
+ const a = d.createElement("a");
7901
+ a.className = "dsh-star-row";
7902
+ a.href = REPO_URL;
7903
+ a.target = "_blank";
7904
+ a.rel = "noreferrer";
7905
+ a.dataset.starNs = STAR_NS;
7906
+ const svg = d.createElementNS("http://www.w3.org/2000/svg", "svg");
7907
+ svg.setAttribute("viewBox", "0 0 24 24");
7908
+ svg.setAttribute("aria-hidden", "true");
7909
+ const path = d.createElementNS("http://www.w3.org/2000/svg", "path");
7910
+ path.setAttribute("fill", "currentColor");
7911
+ path.setAttribute("d", GITHUB_MARK_PATH);
7912
+ svg.appendChild(path);
7913
+ a.appendChild(svg);
7914
+ const label = d.createElement("span");
7915
+ label.textContent = repo;
7916
+ a.appendChild(label);
7917
+ const row = extendedStarRow(a, d);
7918
+ if (row) return row;
7919
+ if (STAR_VARIANT === "A") {
7920
+ const ask = d.createElement("span");
7921
+ ask.className = "dsh-star-ask";
7922
+ ask.textContent = pickLang().ask;
7923
+ a.appendChild(ask);
7924
+ }
7925
+ return a;
7926
+ }
7927
+
7750
7928
  // src/client.tsx
7751
7929
  var import_jsx_runtime3 = require("react/jsx-runtime");
7752
7930
  var SETTINGS_NS = "settings.bash-terminal";
7753
- var SHELLS = ["powershell", "gitbash", "msys2", "wsl", "payload", "niu"];
7931
+ var SHELLS = ["powershell", "gitbash", "msys2", "wsl", "niu"];
7754
7932
  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}";
7755
7933
  if (typeof document !== "undefined" && document.querySelector('style[data-plugin-css="bash-terminal-row"]') === null) {
7756
7934
  const tag = document.createElement("style");
@@ -8000,7 +8178,10 @@ function ShellDockSection() {
8000
8178
  function SettingsBody() {
8001
8179
  return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
8002
8180
  /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(ShellPreferenceRow, {}),
8003
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(ShellDockSection, {})
8181
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(ShellDockSection, {}),
8182
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { ref: (node) => {
8183
+ if (node && !node.firstChild) node.appendChild(mountStarRow());
8184
+ } })
8004
8185
  ] });
8005
8186
  }
8006
8187
  var hostSettingsSurface = "unknown";