Add Bruno imports and a file-tree importer API (#706)

This commit is contained in:
Gregory Schier authored and GitHub committed 2026-09-24 14:50:44 -07:00
1 parent 46464cfacf
commit aa10c44a45
109 files changed
+4684 -879

No files matched your search

+4 -3
View File
@@ -1,4 +1,4 @@
import type { Context, PluginDefinition } from "@yaakapp/api";
import type { Context, ImportSource, PluginDefinition } from "@yaakapp/api";
import YAML from "yaml";
import { deleteUndefinedAttrs, isJSObject } from "./common";
import { convertInsomniaV4 } from "./v4";
@@ -8,8 +8,9 @@ export const plugin: PluginDefinition = {
importer: {
name: "Insomnia",
description: "Import Insomnia workspaces",
async onImport(_ctx: Context, args: { text: string }) {
return convertInsomnia(args.text);
async onImportSource(_ctx: Context, { source }: { source: ImportSource }) {
if (source.type !== "text") return null;
return convertInsomnia(source.text);
},
},
};