@javierfrancoleal/plugin-authoring 1.0.2 → 1.0.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.
|
@@ -230,9 +230,12 @@ async function apply(ctx) {
|
|
|
230
230
|
3. New bundles are NOT picked up by HMR on external edits — restart the app.
|
|
231
231
|
4. `dsh.bundle.patch` + `dsh.client` can coexist (dual-face).
|
|
232
232
|
5. React / slots / primitives are baseline; don't list them in `dsh.client.inject`.
|
|
233
|
-
6. **Bundle URLs are revisioned**: the
|
|
234
|
-
`/plugins
|
|
235
|
-
|
|
233
|
+
6. **Bundle URLs are revisioned**: `/plugins/??<id>/client.js&rev=<rev>`; the bare
|
|
234
|
+
`/plugins/<id>/client.js` **always 404s**. Derive `rev` LOCALLY (no need to
|
|
235
|
+
scrape the HTML, which requires auth): sha1 over
|
|
236
|
+
`"plugin-artifact\0" + "<len>:mtimeMs" + "<len>:ctimeMs" + "<len>:size"`
|
|
237
|
+
(file stats of `lib/client.js`), first 12 hex chars — see the checklist.
|
|
238
|
+
The `/plugins` endpoint needs **no auth**.
|
|
236
239
|
7. **The app may change port after a restart** — re-read the advertised URL.
|
|
237
240
|
|
|
238
241
|
## Validation checklist
|
|
@@ -241,8 +244,8 @@ async function apply(ctx) {
|
|
|
241
244
|
node --check lib/index.js && node --check lib/client.js
|
|
242
245
|
node tools/check-client.mjs lib/client.js
|
|
243
246
|
dsh --profile testprices --dump-config | grep mi-plugin # throwaway profile, not desktop
|
|
244
|
-
|
|
245
|
-
curl -sS "http://127.0.0.1:<puerto>/plugins/??@scope/mi-plugin/client.js&rev
|
|
247
|
+
REV=$(node -e 'const fs=require("fs"),crypto=require("crypto");const st=fs.statSync("lib/client.js");const h=crypto.createHash("sha1").update("plugin-artifact").update("\0");for(const p of [String(st.mtimeMs),String(st.ctimeMs),String(st.size)])h.update(String(Buffer.byteLength(p))+":").update(p);console.log(h.digest("hex").slice(0,12))')
|
|
248
|
+
curl -sS "http://127.0.0.1:<puerto>/plugins/??@scope/mi-plugin/client.js&rev=$REV" # 200 (no auth needed)
|
|
246
249
|
```
|
|
247
250
|
|
|
248
251
|
Full reference: `docs/PLUGIN-AUTHORING.md`. Template: `templates/dsh-plugin/`.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@javierfrancoleal/plugin-authoring",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"description": "Plugin-authoring skill for DeepSeek Harness: the distilled anatomy, client-UI recipe, slots, locale, theme tokens, install steps, gotchas, and validation checklist for building and publishing new DSH plugins.",
|
|
5
5
|
"author": "J.Franco",
|
|
6
6
|
"license": "MIT",
|