salesforce-alm
Version:
This package contains tools, and APIs, for an improved salesforce.com developer experience.
56 lines (55 loc) • 2.27 kB
TypeScript
/**
* Manage stashed values in the global .sfdx folder under stash.json. Stashed aliases allow commands
* to specify various values that get persisted in the global directory for use later.
*
* All aliases are stored under a group that corresponds to the command performing the stash.
*
*/
declare class Stash {
static readonly Commands: {
MDAPI_RETRIEVE: string;
MDAPI_DEPLOY: string;
SOURCE_DEPLOY: string;
};
/**
* Set a group of stashed values in a bulk save.
*
* @param {object} newStashValues An object of key value pairs that should be set in stash
* @param {string} command The command the alias belongs to.
* @returns {Promise<object>} The new aliases that were saved.
*/
static setValues(newStashValues: any, command: string): Promise<any>;
/**
* Set an alias on a command group
*
* @param {string} alias The name of the alias to set
* @param {string} property The value of the alias
* @param {string} command The command the alias belongs to. Defaults to Orgs
* @returns {Promise} The promise resolved when the alias is set
*/
static set(alias: string, property: string | number, command: string): Promise<any>;
/**
* Unset one or more aliases on a command group
*
* @param {string|string[]} aliases The names of the aliases to unset
* @param {string} command The command the alias belongs to. Defaults to Orgs
* @returns {Promise} The promise resolved when the aliases are unset
*/
static unset(aliasesToUnset: string | string[], command: string): Promise<any>;
/**
* Get an alias from a command group
*
* @param {string} alias The name of the alias to get
* @param {string} command The command the alias belongs to. Defaults to Orgs
* @returns {Promise} The promise resolved when the alias is retrieved
*/
static get(alias: string | number, command: string): Promise<any>;
/**
* Get all alias from a command group
*
* @param {string} command The command of aliases to retrieve. Defaults to Orgs
* @returns {Promise} The promise resolved when the aliases are retrieved
*/
static list(command: string): Promise<any>;
}
export = Stash;