@goodandready/dsh-russian-lang 0.3.19 → 0.3.20
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/lib/index.js +17 -8
- package/package.json +4 -4
package/lib/index.js
CHANGED
|
@@ -48,20 +48,29 @@ const NS = 'russian-lang'
|
|
|
48
48
|
// бросает TypeError на уровне модуля — поэтому только feature-detect.
|
|
49
49
|
const vol = (s) => (typeof s?.volatile === 'function' ? s.volatile() : s)
|
|
50
50
|
|
|
51
|
+
// Unwrap Volatile boxes before any caller reads a value. A volatile field holds a box
|
|
52
|
+
// rather than its value, and the Loader mutates those boxes in place.
|
|
53
|
+
export function plainConfig(value) {
|
|
54
|
+
if (value === null || typeof value !== 'object') return value
|
|
55
|
+
if (Array.isArray(value)) return value.map(plainConfig)
|
|
56
|
+
if (typeof value.get === 'function') return plainConfig(value.get())
|
|
57
|
+
return Object.fromEntries(Object.entries(value).map(([k, v]) => [k, plainConfig(v)]))
|
|
58
|
+
}
|
|
59
|
+
|
|
51
60
|
export const Config = z.object({
|
|
52
|
-
enabled: vol(z.boolean().required(false)),
|
|
53
|
-
overrides: vol(z.dict(z.string()).required(false)),
|
|
61
|
+
enabled: vol(z.boolean().required(false)).volatile(),
|
|
62
|
+
overrides: vol(z.dict(z.string()).required(false)).volatile(),
|
|
54
63
|
typography: vol(z.object({
|
|
55
64
|
enabled: z.boolean().required(false),
|
|
56
65
|
yo: z.boolean().required(false),
|
|
57
66
|
liveInput: z.boolean().required(false)
|
|
58
67
|
}).required(false)),
|
|
59
|
-
agentPrompt: vol(z.boolean().required(false)),
|
|
60
|
-
agentPromptPreset: vol(z.string().required(false)),
|
|
61
|
-
slashAliases: vol(z.boolean().required(false)),
|
|
62
|
-
quickSwitch: vol(z.boolean().required(false)),
|
|
63
|
-
translateEngine: vol(z.string().required(false)),
|
|
64
|
-
localApiUrl: vol(z.string().required(false))
|
|
68
|
+
agentPrompt: vol(z.boolean().required(false)).volatile(),
|
|
69
|
+
agentPromptPreset: vol(z.string().required(false)).volatile(),
|
|
70
|
+
slashAliases: vol(z.boolean().required(false)).volatile(),
|
|
71
|
+
quickSwitch: vol(z.boolean().required(false)).volatile(),
|
|
72
|
+
translateEngine: vol(z.string().required(false)).volatile(),
|
|
73
|
+
localApiUrl: vol(z.string().required(false)).volatile()
|
|
65
74
|
})
|
|
66
75
|
|
|
67
76
|
// Историческое имя схемы; сама схема — Config выше.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@goodandready/dsh-russian-lang",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.20",
|
|
4
4
|
"description": "Russian localization for DeepSeek Harness (DSH v0.1.7-rc.1+) web UI: adds Русский as native language option. 100.0% coverage across 11,295 keys (127 namespaces). Features full DSH v0.1.7-rc.1 core support (terminal, archive, command palette, Auto review, trajectory, PTC/Creator presets) and complete GoodAndReady plugin catalog (subscriptions, tts, image-gen, voice, key-limits, notify, commandcode, plugin-console).",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -50,10 +50,10 @@
|
|
|
50
50
|
"lint": "python3 tools/lint_translations.py"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
|
-
"
|
|
53
|
+
"@deepseek-ai/schemastery": "^3.18.4"
|
|
54
54
|
},
|
|
55
55
|
"dependencies": {
|
|
56
|
-
"@deepseek-ai/schemastery": "^3.18.
|
|
56
|
+
"@deepseek-ai/schemastery": "^3.18.4"
|
|
57
57
|
},
|
|
58
58
|
"peerDependencies": {
|
|
59
59
|
"@deepseek-ai/cordis": "^4.0.1",
|
|
@@ -70,4 +70,4 @@
|
|
|
70
70
|
"bin": {
|
|
71
71
|
"dsh-i18n": "./bin/dsh-i18n.mjs"
|
|
72
72
|
}
|
|
73
|
-
}
|
|
73
|
+
}
|