vlocode-project - v1.40.0-beta-4
    Preparing search index...

    Type Alias SalesforcePackageEntry

    SalesforcePackageEntry: SalesforcePackageComponentFile & {
        data: Buffer | string;
        fsPath?: string;
    }

    Represents a single file or component included in a Salesforce deployment package.

    This type merges the metadata defined by SalesforcePackageComponentFile with the actual file payload under the data property.

    • The data property holds the file contents and is required.
    • Provide a Buffer for binary files (images, archives, compiled assets) and a string for text files (XML, Apex, metadata files). Strings are treated as text content (typically UTF-8).
    • Consumers should write or transmit data exactly as provided; no additional encoding is assumed.
    // Binary file example
    const pngEntry: SalesforcePackageEntry = {
    ...componentMeta,
    data: Buffer.from([0x89, 0x50, 0x4E, 0x47])
    };

    // Text file example
    const xmlEntry: SalesforcePackageEntry = {
    ...componentMeta,
    data: '<ApexClass>...</ApexClass>'
    };