dsh-plugin-toolkit 0.9.2 → 0.9.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/CHANGELOG.md +14 -0
- package/lib/doctor.mjs +14 -2
- package/lib/init.mjs +1 -0
- package/package.json +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## 0.9.3
|
|
2
|
+
|
|
3
|
+
- The panel needed one more thing than `dsh.client`: the host resolves the bundle
|
|
4
|
+
through `exports["./client"]` (`clientExportOf`), and drops the row when that
|
|
5
|
+
subpath is missing. 0.9.2 declared `dsh.client` but its `exports` map had no
|
|
6
|
+
`./client`, so the tab was still absent — this release exports `./client` and
|
|
7
|
+
`doctor` now checks the same thing the host does.
|
|
8
|
+
- `init` scaffolds `exports: { '.': './index.js', './client': './client.js' }`.
|
|
9
|
+
Every plugin generated before this release was missing it, so every generated
|
|
10
|
+
panel was invisible for the same reason.
|
|
11
|
+
- `doctor` reports a `dsh.client` whose `exports["./client"]` file does not exist,
|
|
12
|
+
and a `dsh.client` with no `./client` export at all. The `files`-list gap is now
|
|
13
|
+
caught at the manifest stage instead of at pack time.
|
|
14
|
+
|
|
1
15
|
## 0.9.2
|
|
2
16
|
|
|
3
17
|
- `doctor` reports a shipped client bundle that no `dsh.client` declares. The host
|
package/lib/doctor.mjs
CHANGED
|
@@ -122,8 +122,20 @@ export function checkClientDeclaration(dir, manifest) {
|
|
|
122
122
|
const client = manifest.dsh?.client;
|
|
123
123
|
if (client !== undefined && client !== null) {
|
|
124
124
|
const platform = client.platform;
|
|
125
|
-
if (platform
|
|
126
|
-
|
|
125
|
+
if (platform !== undefined && platform !== 'web') {
|
|
126
|
+
return `dsh.client.platform is ${JSON.stringify(platform)}, but the harness serves client bundles on web`;
|
|
127
|
+
}
|
|
128
|
+
// The host reads the bundle path from exports["./client"] only — a
|
|
129
|
+
// declaration without that subpath makes the host drop the row.
|
|
130
|
+
const exported = manifest.exports;
|
|
131
|
+
const subpath = typeof exported === 'string' ? undefined : exportTarget(exported?.['./client']);
|
|
132
|
+
if (typeof subpath !== 'string') {
|
|
133
|
+
return 'dsh.client is declared but exports has no "./client" bundle, so the host drops the row and the panel cannot appear';
|
|
134
|
+
}
|
|
135
|
+
const file = subpath.replace(/^\.\//u, '');
|
|
136
|
+
return fs.existsSync(path.join(dir, file))
|
|
137
|
+
? null
|
|
138
|
+
: `exports["./client"] points at ${subpath}, which does not exist`;
|
|
127
139
|
}
|
|
128
140
|
const exported = manifest.exports;
|
|
129
141
|
const subpath = typeof exported === 'string' ? undefined : exportTarget(exported?.['./client']);
|
package/lib/init.mjs
CHANGED
|
@@ -33,6 +33,7 @@ function manifest({ name, title, version }) {
|
|
|
33
33
|
type: 'module',
|
|
34
34
|
engines: { node: '>=18', dsh: '>=0.2.0' },
|
|
35
35
|
main: 'index.js',
|
|
36
|
+
exports: { '.': './index.js', './client': './client.js' },
|
|
36
37
|
files: ['index.js', 'client.js', 'cordis.patch.yml', 'README.md'],
|
|
37
38
|
scripts: { test: 'node --test', doctor: 'dsh-plugin doctor .' },
|
|
38
39
|
devDependencies: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-plugin-toolkit",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.3",
|
|
4
4
|
"description": "Preflight, release and test DeepSeek Harness plugins: checks what the host needs, waits for npm to actually serve the version, and keeps the market index honest.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
},
|
|
9
9
|
"exports": {
|
|
10
10
|
".": "./index.js",
|
|
11
|
+
"./client": "./client.js",
|
|
11
12
|
"./cli": "./lib/cli.mjs",
|
|
12
13
|
"./testkit": "./lib/testkit/index.mjs"
|
|
13
14
|
},
|