Reduce plugin runtime memory

This commit is contained in:
Gregory Schier
2025-02-24 12:20:47 -08:00
parent 9d5f7784c4
commit c8d6183456
11 changed files with 660 additions and 648 deletions

View File

@@ -30,9 +30,13 @@ var plugin = {
label: "Copy as Curl",
icon: "copy",
async onSelect(ctx, args) {
console.log("---------------------------", 0);
const rendered_request = await ctx.httpRequest.render({ httpRequest: args.httpRequest, purpose: "preview" });
console.log("---------------------------", 1);
const data = await convertToCurl(rendered_request);
console.log("---------------------------", 2);
await ctx.clipboard.copyText(data);
console.log("---------------------------", 3);
await ctx.toast.show({ message: "Curl copied to clipboard", icon: "copy", color: "success" });
}
}]