mirror of
https://github.com/Termix-SSH/Termix.git
synced 2026-10-30 15:15:24 +00:00
feat: plugin docs and env manifest fields, in-app docs links, SDK 1.0.3
This commit is contained in:
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/);
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user