UNPKG

adpa-enterprise-framework-automation

Version:

Modular, standards-compliant Node.js/TypeScript automation framework for enterprise requirements, project, and data management. Provides CLI and API for BABOK v3, PMBOK 7th Edition, and DMBOK 2.0 (in progress). Production-ready Express.js API with TypeSpe

99 lines 3.63 kB
/** * Adobe Creative Suite Configuration * * Configuration management for Adobe Creative Suite APIs including * InDesign Server, Illustrator, Photoshop, and Document Generation APIs. */ import dotenv from 'dotenv'; // Load environment variables dotenv.config(); export class CreativeSuiteConfigManager { config; constructor() { this.config = this.loadConfiguration(); } loadConfiguration() { return { authentication: { clientId: process.env.ADOBE_CLIENT_ID || '', clientSecret: process.env.ADOBE_CLIENT_SECRET || '', scopes: [ 'creative_sdk', 'indesign_api', 'illustrator_api', 'photoshop_api', 'document_generation' ] }, apis: { indesign: { endpoint: process.env.ADOBE_INDESIGN_API_ENDPOINT || 'https://api.adobe.io/indesign/v1', version: 'v1' }, illustrator: { endpoint: process.env.ADOBE_ILLUSTRATOR_API_ENDPOINT || 'https://api.adobe.io/illustrator/v1', version: 'v1' }, photoshop: { endpoint: process.env.ADOBE_PHOTOSHOP_API_ENDPOINT || 'https://api.adobe.io/photoshop/v1', version: 'v1' }, documentGeneration: { endpoint: process.env.ADOBE_DOCUMENT_GEN_API_ENDPOINT || 'https://api.adobe.io/documentgeneration/v1', version: 'v1' } }, templates: { baseDirectory: './templates/adobe-creative', cacheDirectory: './cache/adobe-templates', supportedFormats: ['.indd', '.ai', '.psd', '.indt'] }, branding: { brandGuidelinesPath: './assets/branding/brand-guidelines.json', colorPalettePath: './assets/branding/color-palette.json', typographyStylesPath: './assets/branding/typography-styles.json', logoDirectory: './assets/branding/logos' }, output: { formats: ['pdf', 'pdf-print', 'html', 'png', 'jpg'], quality: 'high', compression: false } }; } getConfig() { return this.config; } validateConfiguration() { const errors = []; const warnings = []; // Validate authentication if (!this.config.authentication.clientId) { errors.push('Adobe Creative Suite Client ID is required'); } if (!this.config.authentication.clientSecret) { errors.push('Adobe Creative Suite Client Secret is required'); } // Validate API endpoints Object.entries(this.config.apis).forEach(([apiName, apiConfig]) => { if (!apiConfig.endpoint) { warnings.push(`${apiName} API endpoint not configured`); } }); // Validate directories if (!this.config.templates.baseDirectory) { warnings.push('Templates base directory not configured'); } return { isValid: errors.length === 0, errors, warnings }; } updateConfig(updates) { this.config = { ...this.config, ...updates }; } } // Export singleton instance export const creativeSuiteConfig = new CreativeSuiteConfigManager(); //# sourceMappingURL=config.js.map