dshmarket 1.65.1 → 1.65.2
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.md +12 -0
- package/README.zh.md +12 -0
- package/client/client.js +552 -22
- package/lib/atomic-write.js +47 -0
- package/lib/dsh-cli.js +45 -4
- package/lib/hot.js +113 -11
- package/lib/http.js +73 -1
- package/lib/index.js +46 -1
- package/lib/lifecycle.js +28 -0
- package/lib/patch.js +14 -7
- package/lib/routes.js +309 -307
- package/lib/settings.js +8 -2
- package/lib/themes.js +221 -44
- package/lib/toggle-state.js +135 -0
- package/lib/types/atomic-write.d.ts +5 -0
- package/lib/types/dsh-cli.d.ts +7 -0
- package/lib/types/hot.d.ts +67 -9
- package/lib/types/http.d.ts +13 -0
- package/lib/types/index.d.ts +1 -1
- package/lib/types/lifecycle.d.ts +5 -0
- package/lib/types/patch.d.ts +10 -4
- package/lib/types/registry.d.ts +16 -0
- package/lib/types/routes.d.ts +8 -0
- package/lib/types/settings.d.ts +8 -2
- package/lib/types/themes.d.ts +16 -1
- package/lib/types/toggle-state.d.ts +18 -0
- package/package.json +1 -1
- package/src/atomic-write.ts +35 -0
- package/src/client/Market.module.css +11 -0
- package/src/client/MarketSection.tsx +375 -20
- package/src/client/OperationsPanel.tsx +8 -1
- package/src/client/SettingsCard.tsx +83 -1
- package/src/client/locales.ts +64 -0
- package/src/client/market-data.ts +48 -0
- package/src/dsh-cli.ts +47 -4
- package/src/hot.ts +135 -16
- package/src/http.ts +73 -1
- package/src/index.ts +48 -2
- package/src/lifecycle.ts +26 -0
- package/src/patch.ts +13 -7
- package/src/registry.ts +16 -0
- package/src/routes.ts +326 -295
- package/src/settings.ts +8 -2
- package/src/themes.ts +212 -40
- package/src/toggle-state.ts +123 -0
package/README.md
CHANGED
|
@@ -81,6 +81,18 @@ Installs prefer repo-verified npm packages, then author-supplied prebuilt GitHub
|
|
|
81
81
|
**On dsh 0.1.7 and newer there is no switch to flip**: the host derives a plugin's settings from its own Config schema and no longer serves a plugin-registered settings namespace, so the market has no control there. The profile patch below is the way on every host.
|
|
82
82
|
|
|
83
83
|
`GET /dsh-market/status` reports `"restart": false` once it has taken effect.
|
|
84
|
+
- Plugins that compile (native modules) build under the environment the dsh process inherited — which a GUI, a systemd/launchd unit, or a Windows Start-menu launch does **not** inherit from your shell. If a plugin needs a newer compiler than the machine's default (`g++` too old while other work depends on that version), pin the build-time variables with `buildEnv` under `config:` — the config equivalent of `CC=... CXX=... dsh` from a terminal, without changing anything globally. Pinned values may override inherited ones but never the `PATH` or `CI` the market computes for its children (issue #336):
|
|
85
|
+
|
|
86
|
+
```yaml
|
|
87
|
+
- id: dsh-market
|
|
88
|
+
name: dshmarket
|
|
89
|
+
config:
|
|
90
|
+
buildEnv:
|
|
91
|
+
CC: /usr/bin/gcc-11 # or CXX, NODE_OPTIONS, ...
|
|
92
|
+
CXX: /usr/bin/g++-11
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
In the UI the same variables are edited live in **Settings → Plugins → Plugin configuration → dshmarket → Build environment** (one `KEY=value` per line; saving applies to the next install without a restart, and saving an empty list goes back to the profile config above). `PATH` and `CI` are always managed by the market and cannot be overridden from either place.
|
|
84
96
|
- For terminal-attached launches, the detached replacement keeps running after the original terminal closes
|
|
85
97
|
- Listing ≠ endorsement: plugins are third-party code, install sources you trust
|
|
86
98
|
|
package/README.zh.md
CHANGED
|
@@ -78,6 +78,18 @@ dsh plugin --profile web add dshmarket
|
|
|
78
78
|
**dsh 0.1.7 及更新版本上没有这个开关可关**:宿主改为从插件自己的 Config schema 派生设置,不再为插件注册的设置命名空间提供服务,市场在那里没有可用的控件。用下面的 profile patch,它在所有宿主上都有效。
|
|
79
79
|
|
|
80
80
|
生效后 `GET /dsh-market/status` 会返回 `"restart": false`。
|
|
81
|
+
- 需要本地编译的插件(原生模块)会在 dsh 进程继承到的环境里构建——而图形界面、systemd/launchd 托管、Windows 开始菜单启动的 dsh **不会**继承你终端的环境。如果插件需要的编译器比机器默认的新(比如系统 `g++` 太老,但其它工作又依赖这个版本,不能全局升级),就用 `config:` 下的 `buildEnv` 固定编译期环境变量——相当于在终端里 `CC=... CXX=... dsh`,且不动任何全局配置。固定的值可以覆盖继承来的环境变量,但绝不会覆盖市场为子进程算好的 `PATH` 和 `CI`(issue #336):
|
|
82
|
+
|
|
83
|
+
```yaml
|
|
84
|
+
- id: dsh-market
|
|
85
|
+
name: dshmarket
|
|
86
|
+
config:
|
|
87
|
+
buildEnv:
|
|
88
|
+
CC: /usr/bin/gcc-11 # 也可以是 CXX、NODE_OPTIONS 等
|
|
89
|
+
CXX: /usr/bin/g++-11
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
界面上也可以在**设置 → 插件 → 插件配置 → dshmarket → 编译环境变量**里直接改(每行一个 `KEY=value`;保存后下一次安装即生效,留空保存则回到上面的 profile 配置)。无论在哪里配,`PATH` 和 `CI` 都由市场接管,不能覆盖。
|
|
81
93
|
- 从终端启动时,替代进程脱离原终端,关闭原终端后仍会继续运行
|
|
82
94
|
- 收录 ≠ 背书:插件是第三方代码,请只安装你信任的来源
|
|
83
95
|
|