import { type CommerceAppManifest } from './validate.js'; /** * Options for CAP packaging. */ export interface CommerceAppPackageOptions { /** * Output path for the zip file. * - If a directory: zip is written to `{outputPath}/{id}-v{version}.zip` * - If a .zip path: written to that exact location * - Default: current working directory */ outputPath?: string; } /** * Result of CAP packaging. */ export interface CommerceAppPackageResult { /** Absolute path to the produced zip file. */ outputPath: string; /** Parsed manifest. */ manifest: CommerceAppManifest; } /** * Packages a CAP directory into a distributable .zip file. * * The zip root directory is named `{id}-v{version}/` as required by the CAP spec. * Reads commerce-app.json to determine the app name and version. * * @param sourceDir - Path to the CAP directory * @param options - Packaging options * @returns Result with the output zip path and manifest * * @example * ```typescript * const result = await commerceAppPackage('./commerce-avalara-tax-app-v0.2.5'); * console.log(`Packaged to: ${result.outputPath}`); * ``` */ export declare function commerceAppPackage(sourceDir: string, options?: CommerceAppPackageOptions): Promise;