feat: extension support (#78)

This commit is contained in:
Levi authored and GitHub committed 2023-10-16 09:47:31 +08:00
1 parent 82d316af83
commit c073fc0a67
118 files changed
+6971 -780

No files matched your search

@@ -0,0 +1,17 @@
gopeed.events.onResolve(async function (ctx) {
if (Object.keys(ctx.settings).length > 0){
throw new Error("settings is not empty");
}
ctx.res = {
name: "test",
files: Array(2).fill(true).map((_, i) => ({
name: `test-${i}.txt`,
size: 1024,
req: {
url: ctx.req.url + "/" + i,
}
}),
),
};
});
@@ -0,0 +1,14 @@
{
"name": "settings-empty",
"title": "gopeed extension settings empty test",
"version": "0.0.1",
"scripts": [
{
"event": "onResolve",
"matches": [
"*://*/*"
],
"entry": "index.js"
}
]
}