mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-12-05 22:36:23 +01:00
Update plugins
This commit is contained in:
1 parent
26cce077bb
commit
d142966d0c
16 files changed
+855
-504
No files matched your search
@@ -1,6 +1,16 @@
|
||||
import { Context, Environment } from '@yaakapp/api';
|
||||
import { Environment, PluginDefinition } from '@yaakapp/api';
|
||||
|
||||
export function pluginHookImport(_ctx: Context, contents: string) {
|
||||
export const plugin: PluginDefinition = {
|
||||
importer: {
|
||||
name: 'Yaak',
|
||||
description: 'Yaak official format',
|
||||
onImport(_ctx, args) {
|
||||
return migrateImport(args.text) as any;
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
export function migrateImport(contents: string) {
|
||||
let parsed;
|
||||
try {
|
||||
parsed = JSON.parse(contents);
|
||||
|
||||
Reference in new issue
Block a user