chillypotato-registry
v2.0.2
Published
Template registry and management for ChillyPotato
Downloads
9
Maintainers
Readme
chillypotato-registry
Template registry and management for ChillyPotato
Features
- 📦 Template discovery and browsing
- 🔍 Search with categories and tags
- 💾 Local caching with TTL
- 🔒 Template verification (checksums, signatures)
- 📥 Remote template downloads
- 🔄 Version management
Installation
npm install chillypotato-registryQuick Start
import { Registry } from 'chillypotato-registry';
const registry = new Registry();
// List templates
const templates = await registry.listTemplates();
// Search templates
const results = await registry.searchTemplates('react');
// Get template
const template = await registry.getTemplate('react-tailwind');
// Download template
await registry.downloadTemplate('react-tailwind', './templates');API
Registry
class Registry {
constructor(options?: RegistryOptions);
async listTemplates(filter?: TemplateFilter): Promise<RegistryTemplate[]>;
async getTemplate(name: string): Promise<RegistryTemplate>;
async searchTemplates(query: string): Promise<RegistryTemplate[]>;
async downloadTemplate(name: string, destination: string): Promise<string>;
async clearCache(): Promise<void>;
}RegistryOptions
interface RegistryOptions {
registryUrl?: string;
cacheEnabled?: boolean;
cacheTTL?: number;
cacheDir?: string;
verifySignatures?: boolean;
}Cache
import { Cache } from 'chillypotato-registry';
const cache = new Cache({ ttl: 3600000 });
await cache.set('key', 'value');
const value = await cache.get('key');Signer
import { Signer } from 'chillypotato-registry';
const signer = new Signer();
const checksum = await signer.generateChecksum('./template.tar.gz');
const isValid = await signer.verifyChecksum('./template.tar.gz', checksum);Configuration
Environment Variables
CHILLYPOTATO_REGISTRY_URL=https://registry.example.com
CHILLYPOTATO_CACHE_DIR=~/.chillypotato/cache
CHILLYPOTATO_CACHE_TTL=3600000Custom Registry
const registry = new Registry({
registryUrl: 'https://templates.mycompany.com',
cacheEnabled: true,
cacheTTL: 3600000,
});License
MIT © ChillyPotato Team
