dsh-remote-vs 0.9.2 → 0.10.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/README.en.md +15 -4
- package/README.md +13 -3
- package/cordis.patch.yml +10 -5
- package/lib/client.js +728 -94
- package/lib/index.js +2 -2
- package/lib/types/client/composer.d.ts +5 -1
- package/lib/types/client/scm/HistoryPanel.d.ts +5 -0
- package/lib/types/client/scm/actions.d.ts +25 -0
- package/lib/types/client/scm/git-cache.d.ts +93 -0
- package/lib/types/client/scm/panel-cache.d.ts +43 -0
- package/lib/types/client/scm/read-queue.d.ts +74 -0
- package/lib/types/client/store.d.ts +66 -3
- package/lib/types/git-ops.d.ts +38 -0
- package/lib/types/index.d.ts +5 -0
- package/package.json +37 -37
- package/src/client/SettingsHosts.tsx +2 -1
- package/src/client/composer.ts +11 -2
- package/src/client/i18n.ts +10 -2
- package/src/client/scm/HistoryPanel.tsx +61 -11
- package/src/client/scm/ScmPanel.tsx +123 -22
- package/src/client/scm/actions.ts +49 -6
- package/src/client/scm/git-cache.ts +159 -0
- package/src/client/scm/panel-cache.ts +93 -0
- package/src/client/scm/read-queue.ts +151 -0
- package/src/client/store.tsx +360 -60
- package/src/client/vsc/vsc.css +10 -0
- package/src/git-ops.ts +60 -0
- package/src/index.ts +10 -2
package/src/index.ts
CHANGED
|
@@ -69,6 +69,11 @@ export interface Config {
|
|
|
69
69
|
/**
|
|
70
70
|
* P2 transparent-routing kill-switch: off = pure local passthrough;
|
|
71
71
|
* shadow = log remote decisions but execute locally; enforce = route.
|
|
72
|
+
*
|
|
73
|
+
* The DEFAULT is `enforce`: the plugin exists to execute remote workspaces
|
|
74
|
+
* remotely, and a fresh profile that silently kept executing locally was the
|
|
75
|
+
* most common "why is nothing remote" report. `off`/`shadow` stay available as
|
|
76
|
+
* explicit opt-outs for debugging and for hosts that must stay local.
|
|
72
77
|
*/
|
|
73
78
|
routingMode?: RoutingMode
|
|
74
79
|
/** Per-command timeout for git work on a remote host (ms). */
|
|
@@ -107,7 +112,7 @@ export interface ResolvedConfig {
|
|
|
107
112
|
export const Config = z.object({
|
|
108
113
|
announceToAgent: z.boolean().default(false).volatile(),
|
|
109
114
|
enabled: z.boolean().default(true).volatile(),
|
|
110
|
-
routingMode: z.union(['off', 'shadow', 'enforce'] as const).default('
|
|
115
|
+
routingMode: z.union(['off', 'shadow', 'enforce'] as const).default('enforce').volatile(),
|
|
111
116
|
gitTimeoutMs: z.number().step(1).min(MIN_TIMEOUT_MS).max(MAX_TIMEOUT_MS)
|
|
112
117
|
.default(DEFAULT_GIT_TIMEOUT_MS).volatile(),
|
|
113
118
|
readTimeoutMs: z.number().step(1).min(MIN_TIMEOUT_MS).max(MAX_TIMEOUT_MS)
|
|
@@ -171,7 +176,10 @@ export function apply(ctx: Context, config?: ResolvedConfig): void {
|
|
|
171
176
|
const worlds = new RemoteWorlds(ctx, {
|
|
172
177
|
store,
|
|
173
178
|
pool,
|
|
174
|
-
|
|
179
|
+
// Keep the runtime fallback equal to the schema default: a Host that hands
|
|
180
|
+
// the plugin a config object without this field must behave like a fresh
|
|
181
|
+
// profile, not like the old opt-in (`off`) behaviour.
|
|
182
|
+
mode: () => readField(config?.routingMode, 'enforce' as RoutingMode),
|
|
175
183
|
})
|
|
176
184
|
ctx.provide('remoteWorlds', worlds)
|
|
177
185
|
ctx.effect(() => () => { pool.dispose() }, 'dsh-remote-vs: pool')
|