@baseplate-dev/sync
Version:
Library for syncing Baseplate descriptions
19 lines • 1.1 kB
TypeScript
import type { Logger } from '#src/utils/evented-logger.js';
import type { OrphanedTemplateEntry } from '../../metadata/read-template-info-files.js';
import type { TemplateExtractorConfigLookup } from '../configs/template-extractor-config-lookup.js';
/**
* Cleans up orphaned templates where the generated file was manually deleted
* but the metadata and extractor config still exist.
*
* For each orphaned entry:
* 1. Removes the template from the extractor.json config (in-memory)
* 2. Deletes the template source file if it exists
* 3. Removes the entry from .templates-info.json
*
* @param orphanedEntries - Array of orphaned template entries
* @param configLookup - Template extractor config lookup for accessing/modifying configs
* @param logger - Logger for output
* @returns Array of generator names that were modified (for later writing to disk)
*/
export declare function cleanupOrphanedTemplates(orphanedEntries: OrphanedTemplateEntry[], configLookup: TemplateExtractorConfigLookup, logger: Logger): Promise<string[]>;
//# sourceMappingURL=cleanup-orphaned-templates.d.ts.map