salesforce-alm
Version:
This package contains tools, and APIs, for an improved salesforce.com developer experience.
46 lines (45 loc) • 2.22 kB
TypeScript
/**
* Helper class for dealing with the settings that are defined in a scratch definition file. This class knows how to extract the
* settings from the definition, how to expand them into a MD directory and how to generate a package.xml.
*/
declare class SettingsGenerator {
private settingData;
private objectSettingsData;
private currentApiVersion;
private logger;
constructor();
/** extract the settings from the scratch def file, if they are present. */
extract(scratchDef: any, apiVersion?: any): Promise<void>;
/** True if we are currently tracking setting or object setting data. */
hasSettings(): boolean;
/** Check to see if the scratchDef contains orgPreferenceSettings
* orgPreferenceSettings are no longer supported after api version 46.0
*/
orgPreferenceSettingsMigrationRequired(scratchDef: any): boolean;
/** This will copy all of the settings in the scratchOrgInfo orgPreferences mapping into the settings structure.
* It will also spit out a warning about the pending deprecation og the orgPreferences structure.
* This returns a failure message in the promise upon critical error for api versions after 46.0.
* For api versions less than 47.0 it will return a warning.
*/
migrate(scratchDef: any, apiVersion?: any): Promise<void>;
/** This method converts all orgPreferenceSettings preferences into their respective
* org settings objects.
*/
extractAndMigrateSettings(scratchDef: any): Promise<void>;
/** Create temporary deploy directory used to upload the scratch org shape.
* This will create the dir, all of the .setting files and minimal object files needed for objectSettings
*/
createDeployDir(): Promise<string>;
/**
* Deploys the settings to the org.
*/
deploySettingsViaFolder(username: string, sourceFolder: string): Promise<void>;
private writeObjectSettingsIfNeeded;
private writeSettingsIfNeeded;
_createSettingsFileContent(name: any, json: any): any;
private createObjectFileContent;
private createRecordTypeFileContent;
private createBusinessProcessFileContent;
cap(s: string): string;
}
export = SettingsGenerator;