Check that this org is a scratch org by asking the dev hub if it knows about it.
Clean all data files in the org's data path. Usually
Should the remove org operations throw an error on failure?
Returns for the config aggregator.
Returns the JSForce connection for the org.
Returns the Org object or null if this org is not affiliated with a Dev Hub (according to the local config).
Returns an org field. Returns undefined if the field is not set or invalid.
Returns a map of requested fields.
Returns the orgId for this org.
Returns the admin username used to create the org.
Returns true if the org is a Dev Hub.
Reads and returns the content of all user auth files for this org as an array. @returns {Promise<AuthInfo[]>}
Refreshes the auth for this org's instance by calling HTTP GET on the baseUrl of the connection object.
Removes the scratch org config file at $HOME/.sfdx/[name].json, any project level org files, all user auth files for the org, matching default config settings, and any matching aliases.
Retrieves the highest api version that is supported by the target server instance. If the apiVersion configured for Sfdx is greater than the one returned in this call an api version mismatch occurs. In the case of the CLI that results in a warning.
The max api version number, i.e 46.0.
Asynchronously constructs and initializes a new instance of a concrete subclass with the provided options.
An options object providing initialization params to the async constructor.
Provides a way to manage a locally authenticated Org.
AuthInfo
Connection
Aliases
Config
// Email username const org1: Org = await Org.create({ aliasOrUsername: 'foo@example.com' });//tslint:disable-line:no-unused-variable // The defaultusername config property const org2: Org = await Org.create({}); // Full Connection const org3: Org = await Org.create({ connection: await Connection.create(await AuthInfo.create({ username: 'username' })) });
https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_cli_usernames_orgs.htm