mirror of
https://github.com/moltbot/moltbot.git
synced 2026-05-02 02:57:51 +00:00
perf: generate bundled plugin metadata for cold startup
This commit is contained in:
32
scripts/generate-bundled-plugin-metadata.d.mts
Normal file
32
scripts/generate-bundled-plugin-metadata.d.mts
Normal file
@@ -0,0 +1,32 @@
|
||||
export type BundledPluginPathPair = {
|
||||
source: string;
|
||||
built: string;
|
||||
};
|
||||
|
||||
export type BundledPluginMetadataEntry = {
|
||||
dirName: string;
|
||||
idHint: string;
|
||||
source: BundledPluginPathPair;
|
||||
setupSource?: BundledPluginPathPair;
|
||||
packageName?: string;
|
||||
packageVersion?: string;
|
||||
packageDescription?: string;
|
||||
packageManifest?: Record<string, unknown>;
|
||||
manifest: Record<string, unknown>;
|
||||
};
|
||||
|
||||
export function collectBundledPluginMetadata(params?: {
|
||||
repoRoot?: string;
|
||||
}): BundledPluginMetadataEntry[];
|
||||
|
||||
export function renderBundledPluginMetadataModule(entries: BundledPluginMetadataEntry[]): string;
|
||||
|
||||
export function writeBundledPluginMetadataModule(params?: {
|
||||
repoRoot?: string;
|
||||
outputPath?: string;
|
||||
check?: boolean;
|
||||
}): {
|
||||
changed: boolean;
|
||||
wrote: boolean;
|
||||
outputPath: string;
|
||||
};
|
||||
Reference in New Issue
Block a user