fix: add plugin runtime registry
This commit is contained in:
17
src/plugins/runtime.ts
Normal file
17
src/plugins/runtime.ts
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
import type { PluginRegistry } from "./registry.js";
|
||||||
|
|
||||||
|
let activeRegistry: PluginRegistry | null = null;
|
||||||
|
let activeRegistryKey: string | null = null;
|
||||||
|
|
||||||
|
export function setActivePluginRegistry(registry: PluginRegistry, cacheKey?: string) {
|
||||||
|
activeRegistry = registry;
|
||||||
|
activeRegistryKey = cacheKey ?? null;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getActivePluginRegistry(): PluginRegistry | null {
|
||||||
|
return activeRegistry;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getActivePluginRegistryKey(): string | null {
|
||||||
|
return activeRegistryKey;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user