@goodandready/dsh-remote-workspace 0.3.2 → 0.3.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/docs/design/DESIGN.md +15 -1
- package/lib/client.js +7 -1
- package/lib/updater-service.js +3 -2
- package/package.json +4 -2
package/docs/design/DESIGN.md
CHANGED
|
@@ -7,7 +7,7 @@ emote_fs,
|
|
|
7
7
|
emote_sync,
|
|
8
8
|
emote_tunnel).
|
|
9
9
|
- **Аудитория**: Разработчики и инженеры, использующие DSH для работы с проектами на VPS, удаленных серверах, облачных инстансах и MiniPC.
|
|
10
|
-
- **Статус**: Стабильный релиз v0.3.
|
|
10
|
+
- **Статус**: Стабильный релиз v0.3.3 (One-Click Updater, Cross-Plugin API, Clean Tokens, Modular Routes).
|
|
11
11
|
|
|
12
12
|
## User Surfaces
|
|
13
13
|
- **Web/UI**: Нативная карточка настроек профилей хостов (settings.plugin.item), удаленный SFTP браузер каталогов, чип статуса подключения в шапке сессии (conversation.session.header.utilities).
|
|
@@ -69,3 +69,17 @@ emote_tunnel: создание/остановка/листинг туннеле
|
|
|
69
69
|
- Защита всех мутирующих эндпоинтов проверкой isTrustedSettingsRequest(req) (защита от cross-site атак).
|
|
70
70
|
- Безопасное чтение Cordis сервисов через .get() с fallback.
|
|
71
71
|
- Изоляция жизненного цикла стримов в TunnelService (прослушивание сокетных и потоковых ошибок).
|
|
72
|
+
|
|
73
|
+
### v0.3.3 Client Architecture Modularization (Refs: #14)
|
|
74
|
+
- Client-side code decomposed into modular ES components under `src/client/`:
|
|
75
|
+
- `src/client/styles.js` — CSS styling with DSH theme variables
|
|
76
|
+
- `src/client/locales.js` — English and Chinese translation dictionaries
|
|
77
|
+
- `src/client/env-editor.js` — Remote .env manager tab component
|
|
78
|
+
- `src/client/docker.js` — Container inspector tab component
|
|
79
|
+
- `src/client/terminal.js` — Web terminal tab component
|
|
80
|
+
- `src/client/file-browser.js` — Remote file explorer tab component
|
|
81
|
+
- `src/client/settings-view.js` — Profiles, tunnels, and sync settings component
|
|
82
|
+
- `src/client/updater-section.js` — One-click updater section component
|
|
83
|
+
- `src/client/plugin-card.js` — Plugin card and status chip components
|
|
84
|
+
- `src/client/entry.js` — Cordis client plugin apply and slot registration
|
|
85
|
+
- Added native builder `scripts/build-client.mjs` hooked into `prepack` and `npm test`.
|
package/lib/client.js
CHANGED
|
@@ -435,6 +435,7 @@ window.__ModuleLoader__.load({
|
|
|
435
435
|
|
|
436
436
|
|
|
437
437
|
// --- Sub-component: Remote Environment Tab (New in v0.3.1) ---
|
|
438
|
+
|
|
438
439
|
function EnvTab(props) {
|
|
439
440
|
const { activeProfile, t } = props
|
|
440
441
|
const [envEntries, setEnvEntries] = React.useState([])
|
|
@@ -538,6 +539,7 @@ window.__ModuleLoader__.load({
|
|
|
538
539
|
}
|
|
539
540
|
|
|
540
541
|
// --- Sub-component: Docker Containers Tab ---
|
|
542
|
+
|
|
541
543
|
function ContainersTab(props) {
|
|
542
544
|
const { activeProfile, t } = props
|
|
543
545
|
const [containers, setContainers] = React.useState([])
|
|
@@ -688,6 +690,7 @@ window.__ModuleLoader__.load({
|
|
|
688
690
|
}
|
|
689
691
|
|
|
690
692
|
// --- Sub-component: Web Terminal Tab ---
|
|
693
|
+
|
|
691
694
|
function TerminalTab(props) {
|
|
692
695
|
const { activeProfile, t } = props
|
|
693
696
|
const [connected, setConnected] = React.useState(false)
|
|
@@ -893,6 +896,7 @@ window.__ModuleLoader__.load({
|
|
|
893
896
|
}
|
|
894
897
|
|
|
895
898
|
// --- Sub-component: Remote File Explorer Tab ---
|
|
899
|
+
|
|
896
900
|
function ExplorerTab(props) {
|
|
897
901
|
const { activeProfile, t } = props
|
|
898
902
|
const [currentPath, setCurrentPath] = React.useState(activeProfile?.remoteWorkspace || '/')
|
|
@@ -2071,6 +2075,7 @@ window.__ModuleLoader__.load({
|
|
|
2071
2075
|
}
|
|
2072
2076
|
|
|
2073
2077
|
// Accordion item for Settings -> Plugins section
|
|
2078
|
+
|
|
2074
2079
|
function UpdaterSection(props) {
|
|
2075
2080
|
const t = props.t || ((k) => k);
|
|
2076
2081
|
const [updateStatus, setUpdateStatus] = React.useState(null);
|
|
@@ -2312,5 +2317,6 @@ window.__ModuleLoader__.load({
|
|
|
2312
2317
|
|
|
2313
2318
|
module.exports = { apply, inject: ['slots', 'locale'] }
|
|
2314
2319
|
return module.exports
|
|
2315
|
-
|
|
2320
|
+
|
|
2321
|
+
},
|
|
2316
2322
|
})
|
package/lib/updater-service.js
CHANGED
|
@@ -276,12 +276,13 @@ function json(response, statusCode, value) {
|
|
|
276
276
|
|
|
277
277
|
export function registerPluginUpdater(ctx, options) {
|
|
278
278
|
let installing = false
|
|
279
|
-
|
|
279
|
+
const webServer = ctx?.get ? (ctx.get('webServer') ?? ctx?.webServer) : ctx?.webServer;
|
|
280
|
+
if (!webServer || typeof webServer.register !== 'function') {
|
|
280
281
|
ctx?.logger?.warn?.('[dsh-remote-workspace] webServer service unavailable, updater skipped')
|
|
281
282
|
return () => {}
|
|
282
283
|
}
|
|
283
284
|
|
|
284
|
-
return
|
|
285
|
+
return webServer.register({
|
|
285
286
|
kind: 'exact',
|
|
286
287
|
path: options.endpoint,
|
|
287
288
|
handler: async (request, response) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@goodandready/dsh-remote-workspace",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.3",
|
|
4
4
|
"description": "Enterprise Remote Workspace Plugin for DeepSeek Harness: SSH2 connection pool, SFTP operations, 3-way conflict-aware mirror sync, port forwarding, and native DSH UI.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -21,7 +21,9 @@
|
|
|
21
21
|
],
|
|
22
22
|
"scripts": {
|
|
23
23
|
"build": "tsup",
|
|
24
|
-
"test": "node --test test/*.test.mjs"
|
|
24
|
+
"test": "node scripts/build-client.mjs && node --test test/*.test.mjs test/*.test.js",
|
|
25
|
+
"build:client": "node scripts/build-client.mjs",
|
|
26
|
+
"prepack": "node scripts/build-client.mjs"
|
|
25
27
|
},
|
|
26
28
|
"keywords": [
|
|
27
29
|
"deepseek-harness",
|