generated from salesforcecli/plugin-template
-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: preview a visualforce page with open command * Update messages/open.json Co-authored-by: Juliet Shackell <[email protected]> * refactor: use const, ternary * feat: open vf from meta files, error when file doesn't exist * test: nuts check file existence * refactor: move shared code out of tests * fix: temporarily disable async deploy NUTs Co-authored-by: Fodil <[email protected]> Co-authored-by: Juliet Shackell <[email protected]> Co-authored-by: Steve Hetzel <[email protected]>
- Loading branch information
1 parent
e4e2d76
commit 7a3630b
Showing
7 changed files
with
92 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,7 +24,7 @@ sfdx plugins:install [email protected] | |
|
||
## Issues | ||
|
||
Please report any issues at https://github.com/forcedotcom/cli/issues | ||
Please report any issues at <https://github.com/forcedotcom/cli/issues> | ||
|
||
## Contributing | ||
|
||
|
@@ -43,7 +43,7 @@ Please report any issues at https://github.com/forcedotcom/cli/issues | |
### CLA | ||
|
||
External contributors will be required to sign a Contributor's License | ||
Agreement. You can do so by going to https://cla.salesforce.com/sign-cla. | ||
Agreement. You can do so by going to <https://cla.salesforce.com/sign-cla>. | ||
|
||
### Build | ||
|
||
|
@@ -947,9 +947,9 @@ DESCRIPTION | |
EXAMPLES | ||
To deploy the source files in a directory: | ||
$ sfdx force:source:deploy -p path/to/source | ||
$ sfdx force:source:deploy -p path/to/source | ||
To deploy a specific Apex class and the objects whose source is in a directory: | ||
$ sfdx force:source:deploy -p "path/to/apex/classes/MyClass.cls,path/to/source/objects" | ||
$ sfdx force:source:deploy -p "path/to/apex/classes/MyClass.cls,path/to/source/objects" | ||
To deploy source files in a comma-separated list that contains spaces: | ||
$ sfdx force:source:deploy -p "path/to/objects/MyCustomObject/fields/MyField.field-meta.xml, path/to/apex/classes" | ||
To deploy all Apex classes: | ||
|
@@ -1186,7 +1186,7 @@ OPTIONS | |
DESCRIPTION | ||
Opens the specified Lightning Page in Lightning App Builder. Lightning Page files have the suffix .flexipage-meta.xml, | ||
and are stored in the flexipages directory. If you specify a different type of file, this command opens your org’s | ||
and are stored in the flexipages directory. If you specify a visualforce page (with a .page suffix) this command let you preview your visualforce page. If you specify a different type of file, this command opens your org’s | ||
home page. | ||
The file opens in your default browser. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/* | ||
* Copyright (c) 2020, salesforce.com, inc. | ||
* All rights reserved. | ||
* Licensed under the BSD 3-Clause license. | ||
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause | ||
*/ | ||
import { AuthInfo, Connection } from '@salesforce/core'; | ||
|
||
export const isNameObsolete = async (username: string, memberType: string, memberName: string): Promise<boolean> => { | ||
const connection = await Connection.create({ | ||
authInfo: await AuthInfo.create({ username }), | ||
}); | ||
|
||
const res = await connection.singleRecordQuery<{ IsNameObsolete: boolean }>( | ||
`SELECT IsNameObsolete FROM SourceMember WHERE MemberType='${memberType}' AND MemberName='${memberName}'`, | ||
{ tooling: true } | ||
); | ||
|
||
return res.IsNameObsolete; | ||
}; |