@maci0/dsh-alias 0.7.2 → 0.7.4
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 +2 -2
- package/lib/client.js +17 -14
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -19,7 +19,7 @@ their own. The Plugins page gains an **Alias** card that edits the same set.
|
|
|
19
19
|
|
|
20
20
|
## Install
|
|
21
21
|
|
|
22
|
-
Requires DeepSeek Harness `>=0.2.2-
|
|
22
|
+
Requires DeepSeek Harness `>=0.2.2-rc.4 <0.3.0`. Restart DSH and refresh the browser after upgrading.
|
|
23
23
|
|
|
24
24
|
> **Install it as a bundle.** `dsh plugin add …` mounts the row from the
|
|
25
25
|
> package's own patch layer, which is what the settings editor can write to. A
|
|
@@ -28,7 +28,7 @@ Requires DeepSeek Harness `>=0.2.2-alpha.3 <0.3.0`. Restart DSH and refresh the
|
|
|
28
28
|
> would win).
|
|
29
29
|
|
|
30
30
|
```sh
|
|
31
|
-
dsh plugin --profile web add --save-exact @maci0/dsh-alias@0.7.
|
|
31
|
+
dsh plugin --profile web add --save-exact @maci0/dsh-alias@0.7.4
|
|
32
32
|
```
|
|
33
33
|
|
|
34
34
|
Pin an exact npm version. To upgrade, run the same command with the newer
|
package/lib/client.js
CHANGED
|
@@ -7,10 +7,10 @@
|
|
|
7
7
|
* every write goes through `ctx.configForms`, the same settings document
|
|
8
8
|
* `/alias` writes on the host, so the two surfaces cannot disagree.
|
|
9
9
|
*
|
|
10
|
-
* Chrome is a stylesheet, not inline style objects:
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
10
|
+
* Chrome is a stylesheet, not inline style objects: `apply` installs one
|
|
11
|
+
* `<style data-plugin>` tag through `ctx.effect`, and the plugin's dispose
|
|
12
|
+
* removes it. All classes are `da-`-prefixed because that sheet lands in the
|
|
13
|
+
* page's own document.
|
|
14
14
|
*
|
|
15
15
|
* This file is plain JavaScript on purpose. The client module system serves a
|
|
16
16
|
* package's `exports["./client"]` artifact as a lazy-CJS factory registered on
|
|
@@ -65,17 +65,8 @@ window.__ModuleLoader__.load({
|
|
|
65
65
|
'.da-error{font-size:12px;line-height:1.5;color:var(--dsw-alias-label-error)}',
|
|
66
66
|
].join('')
|
|
67
67
|
|
|
68
|
-
// Appended while the factory materializes: the module system claims the tag
|
|
69
|
-
// for this package and disposes it on unload. Guarded because the node unit
|
|
70
|
-
// tests evaluate this file without a DOM.
|
|
71
|
-
if (typeof document !== 'undefined') {
|
|
72
|
-
const style = document.createElement('style')
|
|
73
|
-
style.textContent = CSS
|
|
74
|
-
document.head.append(style)
|
|
75
|
-
}
|
|
76
|
-
|
|
77
68
|
/** Plugin version, shown in the card header. Kept in lockstep with package.json. */
|
|
78
|
-
const VERSION = '0.7.
|
|
69
|
+
const VERSION = '0.7.4'
|
|
79
70
|
|
|
80
71
|
const en = {
|
|
81
72
|
title: 'Alias',
|
|
@@ -319,6 +310,18 @@ window.__ModuleLoader__.load({
|
|
|
319
310
|
* @param ctx - the browser plugin context.
|
|
320
311
|
*/
|
|
321
312
|
function apply(ctx) {
|
|
313
|
+
// One stylesheet per plugin instance, removed when the plugin disposes.
|
|
314
|
+
// Guarded because the node unit tests evaluate this file without a DOM.
|
|
315
|
+
if (typeof document !== 'undefined') {
|
|
316
|
+
ctx.effect(() => {
|
|
317
|
+
const style = document.createElement('style')
|
|
318
|
+
style.setAttribute('data-plugin', '@maci0/dsh-alias')
|
|
319
|
+
style.textContent = CSS
|
|
320
|
+
document.head.append(style)
|
|
321
|
+
return () => style.remove()
|
|
322
|
+
}, 'dsh-alias: stylesheet')
|
|
323
|
+
}
|
|
324
|
+
|
|
322
325
|
const t = ctx.locale.bind(LOCALE_NS)
|
|
323
326
|
ctx.effect(
|
|
324
327
|
() => ctx.locale.register(LOCALE_NS, { en, zh }),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@maci0/dsh-alias",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.4",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -47,11 +47,11 @@
|
|
|
47
47
|
},
|
|
48
48
|
"engines": {
|
|
49
49
|
"node": "^22.19.0 || >=24.0.0",
|
|
50
|
-
"dsh": ">=0.2.2-
|
|
50
|
+
"dsh": ">=0.2.2-rc.4 <0.3.0"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
|
-
"@deepseek-ai/cordis": "4.0
|
|
54
|
-
"@deepseek-ai/cosmokit": "1.
|
|
53
|
+
"@deepseek-ai/cordis": "4.1.0",
|
|
54
|
+
"@deepseek-ai/cosmokit": "1.9.0"
|
|
55
55
|
},
|
|
56
56
|
"repository": {
|
|
57
57
|
"type": "git",
|
|
@@ -59,9 +59,9 @@
|
|
|
59
59
|
},
|
|
60
60
|
"icon": "./icon.svg",
|
|
61
61
|
"dependencies": {
|
|
62
|
-
"@deepseek-ai/schemastery": "3.
|
|
62
|
+
"@deepseek-ai/schemastery": "3.19.0"
|
|
63
63
|
},
|
|
64
64
|
"peerDependencies": {
|
|
65
|
-
"@deepseek-ai/cordis": "4.0
|
|
65
|
+
"@deepseek-ai/cordis": "4.1.0"
|
|
66
66
|
}
|
|
67
67
|
}
|