Add @yaakapp/api everywhere

This commit is contained in:
Gregory Schier
2024-08-15 06:17:33 -07:00
parent bb3f948596
commit 54efb6ae4e
25 changed files with 258 additions and 1984 deletions

View File

@@ -1,4 +1,6 @@
export function pluginHookImport(_ctx: any, contents: string) {
import { YaakContext } from '@yaakapp/api';
export function pluginHookImport(_ctx: YaakContext, contents: string) {
let parsed;
try {
parsed = JSON.parse(contents);
@@ -24,6 +26,6 @@ export function pluginHookImport(_ctx: any, contents: string) {
return { resources: parsed.resources }; // Should already be in the correct format
}
export function isJSObject(obj: any) {
function isJSObject(obj: any) {
return Object.prototype.toString.call(obj) === '[object Object]';
}