mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-10-19 21:46:49 +00:00
feat(plugin-sdk): one-command publishing — pack, entry, release
Publishing a plugin meant hand-building the zip, running shasum + stat, resolving the tag's commit, and hand-writing the whole registry entry. The SDK does all of it now: - `trek-plugin pack` builds plugin.zip in the exact layout the installer reads (own tiny zip writer, so the SDK stays dependency-free and the format can't drift from the reader), enforces the same native-binary and size rules, and prints the sha256 + size. docs/ is left out — the store fetches the screenshot from the repo, so it doesn't belong in the install artifact (Koffi's went from 943 KB to 15 KB). - `trek-plugin entry` emits the ready-to-PR registry entry from the manifest + the packed zip + the git tag: commitSha (deref'd), downloadUrl, sha256, size, and minTrekVersion derived from the manifest's trek range. `--merge` prepends a new version onto an existing entry for updates. - `trek-plugin release` chains pack → gh release → entry. Also: the scaffold now points the README at docs/screenshot.png (the path the store actually fetches, was screenshot-1.png) with a size hint, and stops hard-coding an MIT license — a plugin is the author's own code under their own license. Round-tripped against the real server extractor; 18 tests.
This commit is contained in:
@@ -81,7 +81,7 @@ function readme(name: string): string {
|
||||
|
||||
> One sentence: what this plugin does.
|
||||
|
||||

|
||||

|
||||
|
||||
## What it does
|
||||
|
||||
@@ -89,7 +89,9 @@ Describe the feature this plugin adds to TREK.
|
||||
|
||||
## Screenshots
|
||||
|
||||
Show it in context (at least one image).
|
||||
Show it in context. Commit a \`docs/screenshot.png\` — it's what the store card
|
||||
shows. A 16:9 image (e.g. 1600×900) with your plugin centred and some margin
|
||||
looks best (the card crops the edges).
|
||||
|
||||
## Permissions
|
||||
|
||||
@@ -103,7 +105,8 @@ How to configure it.
|
||||
|
||||
## License
|
||||
|
||||
MIT
|
||||
Your plugin is your own code — license it however you like; TREK does not impose
|
||||
one. Replace this line with your license (for example, MIT).
|
||||
`;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user