/** * Manifest from commerce-app.json. */ export interface CommerceAppManifest { id: string; name: string; version: string; domain: string; description?: string; publisher?: { name: string; url?: string; support?: string; }; dependencies?: Record; } /** * Result of CAP validation. */ export interface CapValidationResult { /** Whether the CAP is valid (no errors). */ valid: boolean; /** Blocking errors — a CAP with errors cannot be installed. */ errors: string[]; /** Advisory warnings — a CAP with warnings can still be installed. */ warnings: string[]; /** Parsed manifest from commerce-app.json (if parseable). */ manifest?: CommerceAppManifest; } /** * Validates a Commerce App Package (CAP) directory or zip file. * * Checks required files, manifest schema, and cartridge structure rules. * This is a purely local operation — no B2C instance required. * * @param target - Path to a CAP directory or .zip file * @returns Validation result with errors and warnings * * @example * ```typescript * const result = await validateCap('./my-commerce-app-v1.0.0'); * if (!result.valid) { * console.error('Validation errors:', result.errors); * } * ``` */ export declare function validateCap(target: string): Promise;