mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-03-31 06:23:08 +02:00
Template response plugin
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.6"
|
||||
"@yaakapp/api": "^0.1.9"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^20.14.9",
|
||||
@@ -701,9 +701,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@yaakapp/api": {
|
||||
"version": "0.1.6",
|
||||
"resolved": "https://registry.npmjs.org/@yaakapp/api/-/api-0.1.6.tgz",
|
||||
"integrity": "sha512-5lYXKcOVmLzVUrkfU4JOCbz+CBV5Dm/cALoZvfbelvZWOVu3sTrBxS9cbNVQQq2B6WwLInSevk7pMq58GqIj5Q==",
|
||||
"version": "0.1.9",
|
||||
"resolved": "https://registry.npmjs.org/@yaakapp/api/-/api-0.1.9.tgz",
|
||||
"integrity": "sha512-5mgBoNplXUnNIUpLgGPCjcf6p/BcsU485cH3/MnIzcXIaMfFpZVVwHq5vf9cm+NDcr5hwYmPyIbwmBf9uVoV2Q==",
|
||||
"dependencies": {
|
||||
"@types/node": "^22.0.0"
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
{
|
||||
"name": "exporter-curl",
|
||||
"private": true,
|
||||
"version": "0.0.1",
|
||||
"scripts": {
|
||||
"build": "yaakcli ./src/index.js"
|
||||
@@ -10,6 +11,6 @@
|
||||
"vitest": "^1.4.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@yaakapp/api": "^0.1.6"
|
||||
"@yaakapp/api": "^0.1.9"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { HttpRequest, YaakContext, YaakPlugin } from '@yaakapp/api';
|
||||
import { Context, HttpRequest, Plugin } from '@yaakapp/api';
|
||||
|
||||
const NEWLINE = '\\\n ';
|
||||
|
||||
export const plugin: YaakPlugin = {
|
||||
export const plugin: Plugin = {
|
||||
httpRequestActions: [{
|
||||
key: 'export-curl',
|
||||
label: 'Copy as Curl',
|
||||
@@ -16,7 +16,7 @@ export const plugin: YaakPlugin = {
|
||||
}],
|
||||
};
|
||||
|
||||
export async function pluginHookExport(_ctx: YaakContext, request: Partial<HttpRequest>) {
|
||||
export async function pluginHookExport(_ctx: Context, request: Partial<HttpRequest>) {
|
||||
const xs = ['curl'];
|
||||
|
||||
// Add method and URL all on first line
|
||||
|
||||
Reference in New Issue
Block a user