UNPKG

@corejam/base

Version:

A scaffolding for building progressive GraphQL powered jamstack applications

39 lines (38 loc) 1.22 kB
import { PluginManifest } from "./typings/Plugin"; /** * Check if we are currently a plugin that needs to load server side code. * If packageName is provided we check that. * * Otherwise we default to checking current process.cwd if we are inside a package. */ export declare function isAPlugin(packageName?: string): boolean; /** * Collect all corejam plugins that are currently active * so we can bootstrap them individually. * * @param path */ export declare function collectPlugins(path?: string): Array<string>; /** * Imports a plugin while taking into consideration * different contexts it could be launched in. * * (Production, Inside plugin, testing) * * @param plugin */ export declare function importPlugin(plugin: string): any; /** * Load the manifest file from cache */ export declare function loadManifest(): PluginManifest; /** * Collect the schemas from each plugin and write it out to one large schema. * Doing it this way temporarily due to us loosing caching functionality using * executableSchema() */ export declare function bootstrapSchema(hoisted?: boolean): string; /** * Get the current cache dir, create it if needed */ export declare function getCacheDir(): string;