mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-03-30 22:22:02 +02:00
Send purpose with render request
This commit is contained in:
8
plugins/exporter-curl/package-lock.json
generated
8
plugins/exporter-curl/package-lock.json
generated
@@ -8,7 +8,7 @@
|
||||
"name": "exporter-curl",
|
||||
"version": "0.0.1",
|
||||
"dependencies": {
|
||||
"@yaakapp/api": "^0.1.11"
|
||||
"@yaakapp/api": "^0.1.12"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^20.14.9",
|
||||
@@ -701,9 +701,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@yaakapp/api": {
|
||||
"version": "0.1.11",
|
||||
"resolved": "https://registry.npmjs.org/@yaakapp/api/-/api-0.1.11.tgz",
|
||||
"integrity": "sha512-dRZAXrQpftWygy9nJXiIYPzLA9om6reO/RiEacMe9RKqMjNG6FRF8cGmj7BcdyreizJOkH/DmcOpxn09kDD0XA==",
|
||||
"version": "0.1.12",
|
||||
"resolved": "https://registry.npmjs.org/@yaakapp/api/-/api-0.1.12.tgz",
|
||||
"integrity": "sha512-qA+2BBZz1LGTi0wsOmlwaw6xJbE3elPIUMt/BkiRT+DqQC5spZtISsyoPXjtsM0xZc2orjoRJd0LesXH7xkD0g==",
|
||||
"dependencies": {
|
||||
"@types/node": "^22.0.0"
|
||||
}
|
||||
|
||||
@@ -11,6 +11,6 @@
|
||||
"vitest": "^1.4.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@yaakapp/api": "^0.1.11"
|
||||
"@yaakapp/api": "^0.1.12"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ export const plugin: Plugin = {
|
||||
label: 'Copy as Curl',
|
||||
icon: 'copy',
|
||||
async onSelect(ctx, args) {
|
||||
const rendered_request = await ctx.httpRequest.render({ httpRequest: args.httpRequest });
|
||||
const rendered_request = await ctx.httpRequest.render({ httpRequest: args.httpRequest, purpose: 'preview' });
|
||||
const data = await pluginHookExport(ctx, rendered_request);
|
||||
ctx.clipboard.copyText(data);
|
||||
ctx.toast.show({ variant: 'copied', message: 'Curl copied to clipboard' });
|
||||
|
||||
Reference in New Issue
Block a user