feat: plugin docs and env manifest fields, in-app docs links, SDK 1.0.3

This commit is contained in:
LukeGus committed 2026-10-08 00:34:50 -05:00
1 parent 7fcda3bb01
commit cfab6f764c
65 files changed
+1665 -294

No files matched your search

@@ -155,6 +155,23 @@ describe("parseRegistryIndex", () => {
expect(index.plugins[1].features).toEqual([]);
});
it("keeps only https docs links", () => {
const index = parseRegistryIndex({
plugins: [
{
id: "docker",
docs: "https://docs.termix.site/plugins/docker/",
versions: [version()],
},
{ id: "other", docs: "javascript:alert(1)", versions: [version()] },
],
});
expect(index.plugins[0].docs).toBe(
"https://docs.termix.site/plugins/docker",
);
expect(index.plugins[1].docs).toBeUndefined();
});
it("refuses something that is not an index", () => {
expect(() => parseRegistryIndex({ nope: true })).toThrow(/no plugins/);
});