dsh-plugin-toolkit 0.13.4 → 0.13.6
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 +21 -0
- package/client.js +21 -7
- package/lib/verify.mjs +18 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,24 @@
|
|
|
1
|
+
## 0.13.6
|
|
2
|
+
|
|
3
|
+
- **The dock no longer leaves half the composer blank.** Its content stopped at
|
|
4
|
+
`76ch` and was pinned to the left, so on a wide window the panel looked
|
|
5
|
+
broken: a form in the left third and nothing beside it. The content is now one
|
|
6
|
+
column of `760px`, centred, with equal margins — and the guide uses the width
|
|
7
|
+
it does have as two columns, with the check table spanning both.
|
|
8
|
+
- The header (title, language switch, chevron) lines up with that column instead
|
|
9
|
+
of sitting at the far right of the window.
|
|
10
|
+
- `scripts/preview.mjs` renders at the real conversation width (1120px), which
|
|
11
|
+
is how this was found: at 720px the old layout looked fine.
|
|
12
|
+
|
|
13
|
+
## 0.13.5
|
|
14
|
+
|
|
15
|
+
- **A wildcard export no longer fails the pack check.** `exports` can name a
|
|
16
|
+
pattern (`"./locale/*.json"`), while `npm pack` lists the files it shipped
|
|
17
|
+
(`locale/en.json`). Comparing them as strings reported a correctly packed
|
|
18
|
+
plugin as broken; the check now matches patterns by prefix and suffix.
|
|
19
|
+
- Found by running `verify` against the neighbour project's plugin, which ships
|
|
20
|
+
exactly that export.
|
|
21
|
+
|
|
1
22
|
## 0.13.4
|
|
2
23
|
|
|
3
24
|
- **`docs/why-it-exists.md`**: the five failures that shaped these checks, each
|
package/client.js
CHANGED
|
@@ -224,7 +224,7 @@ window.__ModuleLoader__.load({
|
|
|
224
224
|
'.tk-panel{padding:16px;display:flex;flex-direction:column;gap:10px;font-size:13px}',
|
|
225
225
|
'.tk-title{margin:0;flex:1;min-width:0;font-size:14px;font-weight:600}',
|
|
226
226
|
'.tk-hint{margin:0;font-size:12px;color:var(--dsw-alias-label-tertiary,#888)}',
|
|
227
|
-
'.tk-form{display:flex;gap:8px}',
|
|
227
|
+
'.tk-form{display:flex;gap:8px;max-width:720px}',
|
|
228
228
|
'.tk-input{flex:1;min-width:0;height:28px;padding:0 9px;font:inherit;font-size:12px;',
|
|
229
229
|
'border:0.5px solid var(--dsw-alias-border-l2,#ccc);border-radius:6px;',
|
|
230
230
|
'background:var(--dsw-alias-bg-layer-1,#fff);color:inherit}',
|
|
@@ -300,7 +300,7 @@ window.__ModuleLoader__.load({
|
|
|
300
300
|
'.tk-lang-button[data-on="false"]:hover{color:var(--dsw-alias-label-primary,#1f2329)}',
|
|
301
301
|
'.tk-lang-button:focus-visible{outline:1px solid var(--dsw-alias-state-business-primary,#4176e6);outline-offset:-1px}',
|
|
302
302
|
'.tk-dock{border-top:0.5px solid var(--dsw-alias-border-l2,#e5e5e5);margin:0 12px}',
|
|
303
|
-
'.tk-dock-head{display:flex}',
|
|
303
|
+
'.tk-dock-head{display:flex;max-width:760px;margin:0 auto;width:100%}',
|
|
304
304
|
'.tk-dock-toggle{display:flex;align-items:center;gap:8px;flex:1;min-width:0;padding:7px 2px;',
|
|
305
305
|
'border:0;background:none;font:inherit;font-size:12px;color:inherit;cursor:pointer;text-align:left}',
|
|
306
306
|
'.tk-dock-toggle:focus-visible{outline:1px solid var(--dsw-alias-state-business-primary,#4176e6);',
|
|
@@ -314,10 +314,18 @@ window.__ModuleLoader__.load({
|
|
|
314
314
|
'.tk-dock-chevron[data-open="true"]{transform:rotate(45deg);margin-bottom:3px}',
|
|
315
315
|
'.tk-summary:focus-visible{outline:1px solid var(--dsw-alias-state-business-primary,#4176e6);',
|
|
316
316
|
'outline-offset:2px;border-radius:4px}',
|
|
317
|
-
'.tk-dock-body{display:flex;flex-direction:column;gap:10px;
|
|
317
|
+
'.tk-dock-body{display:flex;flex-direction:column;gap:10px;padding:2px 2px 14px;',
|
|
318
318
|
'max-height:60vh;overflow:auto;font-size:12px}',
|
|
319
|
+
'.tk-dock-main{display:flex;flex-direction:column;gap:10px;min-width:0}',
|
|
320
|
+
// One readable column, centred. Filling a 1100px composer with 1100px of
|
|
321
|
+
// prose is worse than using 760px of it, but a column pinned to the left
|
|
322
|
+
// reads as a rendering bug — the margins have to be equal.
|
|
323
|
+
'.tk-dock-body>.tk-dock-main,.tk-dock-body>.tk-guide-all{width:100%;max-width:760px;margin:0 auto}',
|
|
319
324
|
'.tk-guide-all{margin-top:2px;padding-top:12px;border-top:0.5px solid var(--dsw-alias-border-l1,#ececec)}',
|
|
320
325
|
'.tk-guide-all[open]{display:flex;flex-direction:column;gap:14px}',
|
|
326
|
+
'.tk-guide-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:16px 32px;align-items:start}',
|
|
327
|
+
'.tk-guide-grid>.tk-guide{min-width:0}',
|
|
328
|
+
'.tk-guide-grid>.tk-guide-checks{grid-column:1/-1;max-width:760px}',
|
|
321
329
|
'.tk-guide-summary{cursor:pointer;font-size:11px;font-weight:600;list-style:none;',
|
|
322
330
|
'color:var(--dsw-alias-label-secondary,#555);padding:2px 0}',
|
|
323
331
|
'.tk-guide-summary::-webkit-details-marker{display:none}',
|
|
@@ -329,7 +337,7 @@ window.__ModuleLoader__.load({
|
|
|
329
337
|
'.tk-guide p{margin:0;color:var(--dsw-alias-label-secondary,#555)}',
|
|
330
338
|
'.tk-guide ol,.tk-guide ul{margin:0;padding-left:18px;display:flex;flex-direction:column;gap:3px;',
|
|
331
339
|
'color:var(--dsw-alias-label-secondary,#555)}',
|
|
332
|
-
'.tk-guide-rows{display:grid;grid-template-columns:
|
|
340
|
+
'.tk-guide-rows{display:grid;grid-template-columns:150px 1fr;gap:6px 16px;margin:0}',
|
|
333
341
|
'.tk-guide-rows dt{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:11px;',
|
|
334
342
|
'color:var(--dsw-alias-label-primary,#222)}',
|
|
335
343
|
'.tk-guide-rows dd{margin:0;color:var(--dsw-alias-label-secondary,#555)}',
|
|
@@ -544,17 +552,22 @@ window.__ModuleLoader__.load({
|
|
|
544
552
|
// The input comes first: the guide is reference material, and making
|
|
545
553
|
// people scroll past a wall of prose to reach the one control they
|
|
546
554
|
// came for is how a docked panel stops being used.
|
|
547
|
-
|
|
548
|
-
|
|
555
|
+
// On a wide window the guide sits beside the work instead of below
|
|
556
|
+
// it: a form in the left half and nothing in the right half is what
|
|
557
|
+
// "the panel looks broken" looks like.
|
|
558
|
+
h('div', { className: 'tk-dock-main' },
|
|
559
|
+
h(Form, { checker }),
|
|
560
|
+
h(Result, { checker })),
|
|
549
561
|
h('details', { className: 'tk-guide-all', open: true },
|
|
550
562
|
h('summary', { className: 'tk-guide-summary' }, translate('guideTitle', lang)),
|
|
563
|
+
h('div', { className: 'tk-guide-grid' },
|
|
551
564
|
h('div', { className: 'tk-guide' },
|
|
552
565
|
h('h3', {}, guide.who.title),
|
|
553
566
|
h('p', {}, guide.who.body)),
|
|
554
567
|
h('div', { className: 'tk-guide' },
|
|
555
568
|
h('h3', {}, guide.steps.title),
|
|
556
569
|
h('ol', {}, guide.steps.items.map((item) => h('li', { key: item }, item)))),
|
|
557
|
-
h('div', { className: 'tk-guide' },
|
|
570
|
+
h('div', { className: 'tk-guide tk-guide-checks' },
|
|
558
571
|
h('h3', {}, guide.checks.title),
|
|
559
572
|
h('dl', { className: 'tk-guide-rows' },
|
|
560
573
|
guide.checks.rows.map(([name, what]) => [
|
|
@@ -567,6 +580,7 @@ window.__ModuleLoader__.load({
|
|
|
567
580
|
h('div', { className: 'tk-guide' },
|
|
568
581
|
h('h3', {}, guide.cli.title),
|
|
569
582
|
h('p', {}, h('code', {}, guide.cli.body)))))
|
|
583
|
+
)
|
|
570
584
|
: null);
|
|
571
585
|
}
|
|
572
586
|
|
package/lib/verify.mjs
CHANGED
|
@@ -79,6 +79,22 @@ function undeclaredContext() {
|
|
|
79
79
|
});
|
|
80
80
|
}
|
|
81
81
|
|
|
82
|
+
/**
|
|
83
|
+
* A declared path can be a pattern: `exports["./locale/*.json"]` names a folder
|
|
84
|
+
* of files, and `npm pack` lists the files it actually shipped. Exact set
|
|
85
|
+
* membership would report a correctly packed plugin as broken — which it did,
|
|
86
|
+
* on this repository's own neighbour.
|
|
87
|
+
*/
|
|
88
|
+
function shipsPath(shipped, target) {
|
|
89
|
+
if (target.includes('*') === false) return shipped.has(target);
|
|
90
|
+
const [head, tail] = target.split('*');
|
|
91
|
+
const suffix = tail ?? '';
|
|
92
|
+
for (const file of shipped) {
|
|
93
|
+
if (file.startsWith(head) === true && file.endsWith(suffix) === true) return true;
|
|
94
|
+
}
|
|
95
|
+
return false;
|
|
96
|
+
}
|
|
97
|
+
|
|
82
98
|
export async function verify({ dir, mount = true }) {
|
|
83
99
|
const failures = [];
|
|
84
100
|
const report = doctor(dir);
|
|
@@ -101,7 +117,7 @@ export async function verify({ dir, mount = true }) {
|
|
|
101
117
|
// installed plugin is missing its own code.
|
|
102
118
|
const shipped = new Set(packed.files);
|
|
103
119
|
for (const target of declaredPaths(report.manifest)) {
|
|
104
|
-
if (shipped
|
|
120
|
+
if (shipsPath(shipped, target) === false) {
|
|
105
121
|
failures.push({
|
|
106
122
|
check: 'pack',
|
|
107
123
|
message: `the tarball does not contain ${target}, so the installed plugin would be missing it`,
|
|
@@ -113,7 +129,7 @@ export async function verify({ dir, mount = true }) {
|
|
|
113
129
|
const repoEntry = resolveEntry(dir, report.manifest);
|
|
114
130
|
if (repoEntry !== null) {
|
|
115
131
|
const relative = path.relative(dir, repoEntry).split(path.sep).join('/');
|
|
116
|
-
if (shipped
|
|
132
|
+
if (shipsPath(shipped, relative) === false) {
|
|
117
133
|
failures.push({
|
|
118
134
|
check: 'pack',
|
|
119
135
|
message: `the tarball does not contain ${relative}, so the installed plugin has no panel`,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-plugin-toolkit",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.6",
|
|
4
4
|
"description": "Preflight, release and test DeepSeek Harness plugins: check a folder or any GitHub repository, wait for npm to actually serve the version, and keep the market index honest.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|