@salesforce/plugin-org
Advanced tools
Comparing version
@@ -5,2 +5,9 @@ # Changelog | ||
### [1.8.1](https://github.com/salesforcecli/plugin-org/compare/v1.8.0...v1.8.1) (2021-10-06) | ||
### Bug Fixes | ||
* update deps ([254039c](https://github.com/salesforcecli/plugin-org/commit/254039c59bbb88a85fe32d0c705a58d808d330df)) | ||
## [1.8.0](https://github.com/salesforcecli/plugin-org/compare/v1.7.0...v1.8.0) (2021-09-29) | ||
@@ -7,0 +14,0 @@ |
@@ -51,3 +51,3 @@ "use strict"; | ||
sfdxAuthUrl: this.flags.verbose && fields.refreshToken ? authInfo.getSfdxAuthUrl() : undefined, | ||
alias: await utils_1.getAliasByUsername(fields.username), | ||
alias: await (0, utils_1.getAliasByUsername)(fields.username), | ||
}; | ||
@@ -72,4 +72,4 @@ if (!this.flags.json) { | ||
.map((key) => ({ | ||
key: kit_1.camelCaseToTitleCase(key), | ||
value: orgHighlighter_1.getStyledValue(key, result[key]), | ||
key: (0, kit_1.camelCaseToTitleCase)(key), | ||
value: (0, orgHighlighter_1.getStyledValue)(key, result[key]), | ||
})); | ||
@@ -76,0 +76,0 @@ this.ux.styledHeader('Org Description'); |
@@ -44,5 +44,5 @@ "use strict"; | ||
const groupedSortedOrgs = { | ||
nonScratchOrgs: kit_1.sortBy(metaConfigs.nonScratchOrgs, this.sortFunction), | ||
scratchOrgs: kit_1.sortBy(metaConfigs.scratchOrgs, this.sortFunction), | ||
expiredScratchOrgs: metaConfigs.scratchOrgs.filter((org) => !orgListUtil_1.identifyActiveOrgByStatus(org)), | ||
nonScratchOrgs: (0, kit_1.sortBy)(metaConfigs.nonScratchOrgs, this.sortFunction), | ||
scratchOrgs: (0, kit_1.sortBy)(metaConfigs.scratchOrgs, this.sortFunction), | ||
expiredScratchOrgs: metaConfigs.scratchOrgs.filter((org) => !(0, orgListUtil_1.identifyActiveOrgByStatus)(org)), | ||
}; | ||
@@ -61,3 +61,2 @@ if (this.flags.clean && groupedSortedOrgs.expiredScratchOrgs.length > 0) { | ||
}; | ||
this.ux.warn(messages.getMessage('scratchOrgRemoveConnectedStatusProperty')); | ||
this.ux.styledHeader('Orgs'); | ||
@@ -106,3 +105,3 @@ this.printOrgTable(result.nonScratchOrgs, this.flags.skipconnectionstatus); | ||
if (nonScratchOrgs.length) { | ||
this.ux.table(nonScratchOrgs.map((row) => orgHighlighter_1.getStyledObject(row)), { columns: nonScratchOrgColumns }); | ||
this.ux.table(nonScratchOrgs.map((row) => (0, orgHighlighter_1.getStyledObject)(row)), { columns: nonScratchOrgColumns }); | ||
} | ||
@@ -119,3 +118,3 @@ else { | ||
// One or more rows are available. | ||
this.ux.table(scratchOrgs.map((row) => orgHighlighter_1.getStyledObject(row)), { columns: this.getScratchOrgColumnData() }); | ||
this.ux.table(scratchOrgs.map((row) => (0, orgHighlighter_1.getStyledObject)(row)), { columns: this.getScratchOrgColumnData() }); | ||
} | ||
@@ -122,0 +121,0 @@ } |
@@ -56,3 +56,3 @@ "use strict"; | ||
} | ||
await utils_1.openUrl(url); | ||
await (0, utils_1.openUrl)(url); | ||
return output; | ||
@@ -59,0 +59,0 @@ } |
@@ -37,3 +37,3 @@ "use strict"; | ||
if (Reflect.has(clonedObject, key)) { | ||
clonedObject[key] = exports.getStyledValue(key, clonedObject[key]); | ||
clonedObject[key] = (0, exports.getStyledValue)(key, clonedObject[key]); | ||
} | ||
@@ -40,0 +40,0 @@ } |
@@ -78,3 +78,3 @@ "use strict"; | ||
try { | ||
const orgUsername = path_1.basename(fileName, '.json'); | ||
const orgUsername = (0, path_1.basename)(fileName, '.json'); | ||
const auth = await core_1.AuthInfo.create({ username: orgUsername }); | ||
@@ -94,3 +94,3 @@ const userId = auth === null || auth === void 0 ? void 0 : auth.getFields().userId; | ||
if (orgFileNames.includes(orgFileName)) { | ||
const usernames = (await core_1.fs.readJson(path_1.join(core_1.Global.DIR, orgFileName))).usernames; | ||
const usernames = (await core_1.fs.readJson((0, path_1.join)(core_1.Global.DIR, orgFileName))).usernames; | ||
if (usernames && usernames[0] === auth.getFields().username) { | ||
@@ -135,4 +135,4 @@ return auth; | ||
const [alias, lastUsed] = await Promise.all([ | ||
utils_1.getAliasByUsername(currentValue.username), | ||
core_1.fs.stat(path_1.join(core_1.Global.DIR, `${currentValue.username}.json`)), | ||
(0, utils_1.getAliasByUsername)(currentValue.username), | ||
core_1.fs.stat((0, path_1.join)(core_1.Global.DIR, `${currentValue.username}.json`)), | ||
]); | ||
@@ -159,3 +159,3 @@ currentValue.alias = alias; | ||
static removeRestrictedInfoFromConfig(config, properties = ['refreshToken', 'clientSecret']) { | ||
return lib_1.omit(config, properties); | ||
return (0, lib_1.omit)(config, properties); | ||
} | ||
@@ -223,4 +223,2 @@ /** Identify the default orgs */ | ||
scratchOrgInfo.namespace = updatedOrgInfo.Namespace; | ||
// the old toolbelt code always said Unknown. I'd love to get rid of it. | ||
scratchOrgInfo.connectedStatus = 'Unknown'; | ||
} | ||
@@ -227,0 +225,0 @@ else { |
@@ -18,4 +18,3 @@ { | ||
"noOrgsFoundAction": "Use one of the auth commands or force:org:create to add or create a scratch org.", | ||
"scratchOrgRemoveConnectedStatusProperty": "Starting in API version 52, the JSON output of this command no longer returns the property connectedStatus for scratch orgs.", | ||
"noResultsFound": "No non-scratch orgs found." | ||
} |
@@ -1,1 +0,1 @@ | ||
{"version":"1.8.0","commands":{"force:org:display":{"id":"force:org:display","description":"get the description for the current or target org\nOutput includes your access token, client Id, connected status, org ID, instance URL, username, and alias, if applicable.\nUse --verbose to include the SFDX auth URL.\nIncluding --verbose displays the sfdxAuthUrl property only if you authenticated to the org using auth:web:login (not auth:jwt:grant)","usage":"<%= command.id %> [-u <string>] [--apiversion <string>] [--verbose] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]","pluginName":"@salesforce/plugin-org","pluginType":"core","aliases":[],"examples":["sfdx force:org:display","sfdx force:org:display -u me@my.org","sfdx force:org:display -u TestOrg1 --json","sfdx force:org:display -u TestOrg1 --json > tmp/MyOrgDesc.json"],"flags":{"json":{"name":"json","type":"boolean","description":"format output as json","allowNo":false},"loglevel":{"name":"loglevel","type":"option","description":"logging level for this command invocation","required":false,"helpValue":"(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)","options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"default":"warn"},"targetusername":{"name":"targetusername","type":"option","char":"u","description":"username or alias for the target org; overrides default target org"},"apiversion":{"name":"apiversion","type":"option","description":"override the api version used for api requests made by this command"},"verbose":{"name":"verbose","type":"boolean","description":"emit additional command output to stdout","allowNo":false}},"args":[]},"force:org:list":{"id":"force:org:list","description":"list all orgs you’ve created or authenticated to","usage":"<%= command.id %> [--all] [-p --clean] [--skipconnectionstatus] [--verbose] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]","pluginName":"@salesforce/plugin-org","pluginType":"core","aliases":[],"examples":["sfdx force:org:list","sfdx force:org:list --verbose --json","sfdx force:org:list --verbose --json > tmp/MyOrgList.json"],"flags":{"json":{"name":"json","type":"boolean","description":"format output as json","allowNo":false},"loglevel":{"name":"loglevel","type":"option","description":"logging level for this command invocation","required":false,"helpValue":"(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)","options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"default":"warn"},"verbose":{"name":"verbose","type":"boolean","description":"list more information about each org'","allowNo":false},"all":{"name":"all","type":"boolean","description":"include expired, deleted, and unknown-status scratch orgs","allowNo":false},"clean":{"name":"clean","type":"boolean","description":"remove all local org authorizations for non-active orgs","allowNo":false},"noprompt":{"name":"noprompt","type":"boolean","char":"p","description":"do not prompt for confirmation","allowNo":false},"skipconnectionstatus":{"name":"skipconnectionstatus","type":"boolean","description":"skip retrieving the connection status of non-scratch orgs","allowNo":false}},"args":[]},"force:org:open":{"id":"force:org:open","description":"open your default scratch org, or another specified org\nTo open a specific page, specify the portion of the URL after \"yourInstance.salesforce.com/\" as --path.\nFor example, specify \"--path lightning\" to open Lightning Experience, or specify \"--path /apex/YourPage\" to open a Visualforce page.\nTo generate a URL but not launch it in your browser, specify --urlonly.","usage":"<%= command.id %> [-p <string>] [-r] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]","pluginName":"@salesforce/plugin-org","pluginType":"core","aliases":[],"examples":["sfdx force:org:open","sfdx force:org:open -u me@my.org","sfdx force:org:open -u MyTestOrg1","sfdx force:org:open -r -p lightning"],"flags":{"json":{"name":"json","type":"boolean","description":"format output as json","allowNo":false},"loglevel":{"name":"loglevel","type":"option","description":"logging level for this command invocation","required":false,"helpValue":"(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)","options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"default":"warn"},"targetusername":{"name":"targetusername","type":"option","char":"u","description":"username or alias for the target org; overrides default target org"},"apiversion":{"name":"apiversion","type":"option","description":"override the api version used for api requests made by this command"},"path":{"name":"path","type":"option","char":"p","description":"navigation URL path"},"urlonly":{"name":"urlonly","type":"boolean","char":"r","description":"display navigation URL, but don’t launch browser","allowNo":false}},"args":[]}}} | ||
{"version":"1.8.1","commands":{"force:org:display":{"id":"force:org:display","description":"get the description for the current or target org\nOutput includes your access token, client Id, connected status, org ID, instance URL, username, and alias, if applicable.\nUse --verbose to include the SFDX auth URL.\nIncluding --verbose displays the sfdxAuthUrl property only if you authenticated to the org using auth:web:login (not auth:jwt:grant)","usage":"<%= command.id %> [-u <string>] [--apiversion <string>] [--verbose] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]","pluginName":"@salesforce/plugin-org","pluginType":"core","aliases":[],"examples":["sfdx force:org:display","sfdx force:org:display -u me@my.org","sfdx force:org:display -u TestOrg1 --json","sfdx force:org:display -u TestOrg1 --json > tmp/MyOrgDesc.json"],"flags":{"json":{"name":"json","type":"boolean","description":"format output as json","allowNo":false},"loglevel":{"name":"loglevel","type":"option","description":"logging level for this command invocation","required":false,"helpValue":"(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)","options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"default":"warn"},"targetusername":{"name":"targetusername","type":"option","char":"u","description":"username or alias for the target org; overrides default target org"},"apiversion":{"name":"apiversion","type":"option","description":"override the api version used for api requests made by this command"},"verbose":{"name":"verbose","type":"boolean","description":"emit additional command output to stdout","allowNo":false}},"args":[]},"force:org:list":{"id":"force:org:list","description":"list all orgs you’ve created or authenticated to","usage":"<%= command.id %> [--all] [-p --clean] [--skipconnectionstatus] [--verbose] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]","pluginName":"@salesforce/plugin-org","pluginType":"core","aliases":[],"examples":["sfdx force:org:list","sfdx force:org:list --verbose --json","sfdx force:org:list --verbose --json > tmp/MyOrgList.json"],"flags":{"json":{"name":"json","type":"boolean","description":"format output as json","allowNo":false},"loglevel":{"name":"loglevel","type":"option","description":"logging level for this command invocation","required":false,"helpValue":"(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)","options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"default":"warn"},"verbose":{"name":"verbose","type":"boolean","description":"list more information about each org'","allowNo":false},"all":{"name":"all","type":"boolean","description":"include expired, deleted, and unknown-status scratch orgs","allowNo":false},"clean":{"name":"clean","type":"boolean","description":"remove all local org authorizations for non-active orgs","allowNo":false},"noprompt":{"name":"noprompt","type":"boolean","char":"p","description":"do not prompt for confirmation","allowNo":false},"skipconnectionstatus":{"name":"skipconnectionstatus","type":"boolean","description":"skip retrieving the connection status of non-scratch orgs","allowNo":false}},"args":[]},"force:org:open":{"id":"force:org:open","description":"open your default scratch org, or another specified org\nTo open a specific page, specify the portion of the URL after \"yourInstance.salesforce.com/\" as --path.\nFor example, specify \"--path lightning\" to open Lightning Experience, or specify \"--path /apex/YourPage\" to open a Visualforce page.\nTo generate a URL but not launch it in your browser, specify --urlonly.","usage":"<%= command.id %> [-p <string>] [-r] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]","pluginName":"@salesforce/plugin-org","pluginType":"core","aliases":[],"examples":["sfdx force:org:open","sfdx force:org:open -u me@my.org","sfdx force:org:open -u MyTestOrg1","sfdx force:org:open -r -p lightning"],"flags":{"json":{"name":"json","type":"boolean","description":"format output as json","allowNo":false},"loglevel":{"name":"loglevel","type":"option","description":"logging level for this command invocation","required":false,"helpValue":"(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)","options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"default":"warn"},"targetusername":{"name":"targetusername","type":"option","char":"u","description":"username or alias for the target org; overrides default target org"},"apiversion":{"name":"apiversion","type":"option","description":"override the api version used for api requests made by this command"},"path":{"name":"path","type":"option","char":"p","description":"navigation URL path"},"urlonly":{"name":"urlonly","type":"boolean","char":"r","description":"display navigation URL, but don’t launch browser","allowNo":false}},"args":[]}}} |
{ | ||
"name": "@salesforce/plugin-org", | ||
"description": "A template repository for sfdx plugins", | ||
"version": "1.8.0", | ||
"version": "1.8.1", | ||
"author": "Salesforce", | ||
@@ -9,5 +9,5 @@ "bugs": "https://github.com/forcedotcom/cli/issues", | ||
"@oclif/config": "^1", | ||
"@salesforce/command": "^3.0.3", | ||
"@salesforce/core": "^2.27.0", | ||
"@salesforce/kit": "^1.4.5", | ||
"@salesforce/command": "^4.1.3", | ||
"@salesforce/core": "^2.28.0", | ||
"@salesforce/kit": "^1.5.17", | ||
"open": "8.2.1", | ||
@@ -19,3 +19,3 @@ "tslib": "^2" | ||
"@oclif/plugin-command-snapshot": "^2.0.0", | ||
"@salesforce/cli-plugins-testkit": "^1.1.5", | ||
"@salesforce/cli-plugins-testkit": "^1.4.10", | ||
"@salesforce/dev-config": "^2.1.2", | ||
@@ -26,4 +26,4 @@ "@salesforce/dev-scripts": "^0.9.15", | ||
"@salesforce/ts-sinon": "1.3.21", | ||
"@typescript-eslint/eslint-plugin": "^4.2.0", | ||
"@typescript-eslint/parser": "^4.2.0", | ||
"@typescript-eslint/eslint-plugin": "^4.33.0", | ||
"@typescript-eslint/parser": "^4.33.0", | ||
"chai": "^4.2.0", | ||
@@ -36,5 +36,5 @@ "chai-as-promised": "^7.1.1", | ||
"eslint-config-salesforce-license": "^0.1.6", | ||
"eslint-config-salesforce-typescript": "^0.2.7", | ||
"eslint-config-salesforce-typescript": "^0.2.8", | ||
"eslint-plugin-header": "^3.0.0", | ||
"eslint-plugin-import": "^2.20.2", | ||
"eslint-plugin-import": "2.24.2", | ||
"eslint-plugin-jsdoc": "^35.1.2", | ||
@@ -47,3 +47,3 @@ "eslint-plugin-prettier": "^3.1.3", | ||
"nyc": "^15.1.0", | ||
"prettier": "^2.0.5", | ||
"prettier": "^2.4.1", | ||
"pretty-quick": "^3.1.0", | ||
@@ -129,5 +129,5 @@ "shx": "0.3.3", | ||
"sfdx": { | ||
"publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-org/1.8.0.crt", | ||
"signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-org/1.8.0.sig" | ||
"publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-org/1.8.1.crt", | ||
"signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-org/1.8.1.sig" | ||
} | ||
} |
@@ -89,2 +89,7 @@ # plugin-org | ||
``` | ||
get the description for the current or target org | ||
Output includes your access token, client Id, connected status, org ID, instance URL, username, and alias, if applicable. | ||
Use --verbose to include the SFDX auth URL. | ||
Including --verbose displays the sfdxAuthUrl property only if you authenticated to the org using auth:web:login (not auth:jwt:grant) | ||
USAGE | ||
@@ -123,3 +128,3 @@ $ sfdx force:org:display [-u <string>] [--apiversion <string>] [--verbose] [--json] [--loglevel | ||
_See code: [src/commands/force/org/display.ts](https://github.com/salesforcecli/plugin-org/blob/v1.7.0/src/commands/force/org/display.ts)_ | ||
_See code: [src/commands/force/org/display.ts](https://github.com/salesforcecli/plugin-org/blob/v1.8.1/src/commands/force/org/display.ts)_ | ||
@@ -131,2 +136,4 @@ ## `sfdx force:org:list [--all] [-p --clean] [--skipconnectionstatus] [--verbose] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]` | ||
``` | ||
list all orgs you’ve created or authenticated to | ||
USAGE | ||
@@ -162,3 +169,3 @@ $ sfdx force:org:list [--all] [-p --clean] [--skipconnectionstatus] [--verbose] [--json] [--loglevel | ||
_See code: [src/commands/force/org/list.ts](https://github.com/salesforcecli/plugin-org/blob/v1.7.0/src/commands/force/org/list.ts)_ | ||
_See code: [src/commands/force/org/list.ts](https://github.com/salesforcecli/plugin-org/blob/v1.8.1/src/commands/force/org/list.ts)_ | ||
@@ -170,2 +177,7 @@ ## `sfdx force:org:open [-p <string>] [-r] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]` | ||
``` | ||
open your default scratch org, or another specified org | ||
To open a specific page, specify the portion of the URL after "yourInstance.salesforce.com/" as --path. | ||
For example, specify "--path lightning" to open Lightning Experience, or specify "--path /apex/YourPage" to open a Visualforce page. | ||
To generate a URL but not launch it in your browser, specify --urlonly. | ||
USAGE | ||
@@ -205,3 +217,3 @@ $ sfdx force:org:open [-p <string>] [-r] [-u <string>] [--apiversion <string>] [--json] [--loglevel | ||
_See code: [src/commands/force/org/open.ts](https://github.com/salesforcecli/plugin-org/blob/v1.7.0/src/commands/force/org/open.ts)_ | ||
_See code: [src/commands/force/org/open.ts](https://github.com/salesforcecli/plugin-org/blob/v1.8.1/src/commands/force/org/open.ts)_ | ||
<!-- commandsstop --> |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
96319
0.64%214
5.94%959
-0.42%+ Added
+ Added
- Removed
Updated
Updated
Updated