@salesforce/source-deploy-retrieve
Version:
JavaScript library to run Salesforce metadata deploys and retrieves
65 lines (64 loc) • 2.19 kB
TypeScript
import { ComponentSet } from '../collections/componentSet';
import { RegistryAccess } from '../registry/registryAccess';
import { MetadataType } from '../registry/types';
export type ManifestOption = {
manifestPath: string;
directoryPaths: string[];
destructiveChangesPre?: string;
destructiveChangesPost?: string;
};
type MetadataOption = {
/**
* Array of metadata type:name pairs to include in the ComponentSet.
*/
metadataEntries: string[];
/**
* Array of filesystem directory paths to search for local metadata to include in the ComponentSet.
*/
directoryPaths: string[];
/**
* Array of metadata type:name pairs to exclude from the ComponentSet.
*/
excludedEntries?: string[];
/**
* Array of metadata type:name pairs to delete before the deploy. Use of wildcards is not allowed.
*/
destructiveEntriesPre?: string[];
/**
* Array of metadata type:name pairs to delete after the deploy. Use of wildcards is not allowed.
*/
destructiveEntriesPost?: string[];
};
type OrgOption = {
username: string;
exclude: string[];
};
export type ComponentSetOptions = {
packagenames?: string[];
sourcepath?: string[];
manifest?: ManifestOption;
metadata?: MetadataOption;
apiversion?: string;
sourceapiversion?: string;
org?: OrgOption;
/** important for constructing registries based on your project. Uses CWD by default */
projectDir?: string;
};
export declare class ComponentSetBuilder {
/**
* Builds a ComponentSet that can be used for source conversion,
* deployment, or retrieval, using all specified options.
*
* @see https://github.com/forcedotcom/source-deploy-retrieve/blob/develop/src/collections/componentSet.ts
*
* @param options: options for creating a ComponentSet
*/
static build(options: ComponentSetOptions): Promise<ComponentSet>;
private static resolveOrgComponents;
}
type MetadataTypeAndMetadataName = {
type: MetadataType;
metadataName: string;
};
export declare const entryToTypeAndName: (reg: RegistryAccess) => (rawEntry: string) => MetadataTypeAndMetadataName;
export {};