@salesforce/source-deploy-retrieve
Version:
JavaScript library to run Salesforce metadata deploys and retrieves
55 lines (54 loc) • 1.97 kB
TypeScript
import { SourcePath } from '../../common/types';
import { SourceComponent } from '../sourceComponent';
import { BaseSourceAdapter } from './baseSourceAdapter';
/**
* Handles types with mixed content. Mixed content means there are one or more additional
* file(s) associated with a component with any file extension. Even an entire folder
* can be considered "the content".
*
* __Example Types__:
*
* StaticResources, Documents, Bundle Types
*
* __Example Structures__:
*
*```text
* foos/
* ├── myFoo/
* | ├── fooFolder/
* | ├── foofighters.x
* | ├── foo.y
* | ├── fooBar.z
* ├── myFoo.ext-meta.xml
* bars/
* ├── myBar.xyz
* ├── myBar.ext2-meta.xml
*```
*/
export declare class MixedContentSourceAdapter extends BaseSourceAdapter {
/**
*
* Returns undefined if no matching file is found
*/
protected getRootMetadataXmlPath(trigger: SourcePath): SourcePath | undefined;
protected populate(trigger: SourcePath, component?: SourceComponent): SourceComponent | undefined;
/**
* Trim a path up until the root of a component's content. If the content is a file,
* the given path will be returned back. If the content is a folder, the path to that
* folder will be returned. Intended to be used exclusively for MixedContent types.
*
* @param path Path to trim
* @param type MetadataType to determine content for
*/
protected trimPathToContent(path: SourcePath): SourcePath;
/**
* A utility for finding a component's root metadata xml from a path to a component's
* content. "Content" can either be a single file or an entire directory. If the content
* is a directory, the path can be files or other directories inside of it.
*
* Returns undefined if no matching file is found
*
* @param path Path to content or a child of the content
*/
private findMetadataFromContent;
}