mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-12-04 13:56:23 +01:00
Add Bruno imports and a file-tree importer API (#706)
This commit is contained in:
1 parent
46464cfacf
commit
aa10c44a45
109 files changed
+4684
-879
No files matched your search
@@ -4,6 +4,7 @@ import type {
|
||||
Folder,
|
||||
HttpRequest,
|
||||
HttpUrlParameter,
|
||||
ImportSource,
|
||||
PluginDefinition,
|
||||
Workspace,
|
||||
} from "@yaakapp/api";
|
||||
@@ -86,9 +87,10 @@ export const plugin: PluginDefinition = {
|
||||
importer: {
|
||||
name: "cURL",
|
||||
description: "Import cURL commands",
|
||||
onImport(_ctx: Context, args: { text: string }) {
|
||||
onImportSource(_ctx: Context, { source }: { source: ImportSource }) {
|
||||
if (source.type !== "text") return null;
|
||||
// oxlint-disable-next-line no-explicit-any
|
||||
return convertCurl(args.text) as any;
|
||||
return convertCurl(source.text) as any;
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user