-
Notifications
You must be signed in to change notification settings - Fork 15
W-17561980 Outputs DOT Code for DisplayDependencies Command #762
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
MimiRaiSalesforce
wants to merge
7
commits into
main
Choose a base branch
from
t/managed-packaging/W-17561980/display-dependency-graph
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
6151a7f
feat: included unit test cases to test that the nodes and edges are c…
MimiRaiSalesforce caa5f9d
feat: refactored functions and simplified test cases
MimiRaiSalesforce fcf6b23
feat: updated package file
MimiRaiSalesforce 8b79352
chore: update yarn.lock
WillieRuemmele b6e8ca1
chore: committing with verified signature
MimiRaiSalesforce 9dc9aa6
Merge branch 't/managed-packaging/W-17561980/display-dependency-graph…
MimiRaiSalesforce af87e5b
chore: using gpg signing key
MimiRaiSalesforce File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,11 @@ | ||
| # invalidPackageVersionIdError | ||
|
|
||
| Can't display package dependencies. The package version ID %s you specified is invalid. Review the package version ID and then retry this command. | ||
|
|
||
| # transitiveDependenciesRequiredError | ||
|
|
||
| Can't display package dependencies. To display package dependencies, you must first add the calculateTransitiveDependencies parameter to the sfdx-project.json file, and set the value to "true". Next, create a new package version and then run this command using the 04t ID for the new package version. | ||
|
|
||
| # invalidDependencyGraphError | ||
|
|
||
| Can't display package dependencies. There's an issue generating the dependency graph. Before retrying this command, make sure you added the calculateTransitiveDependencies parameter to the sfdx-project.json file and set the value to "true". After setting the attribute and before retrying this command, you must create a new package version. | ||
This file contains hidden or 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 hidden or 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 |
|---|---|---|
|
|
@@ -15,6 +15,7 @@ import { ConvertResult } from '@salesforce/source-deploy-retrieve'; | |
| import type { Package } from '@salesforce/types/metadata'; | ||
| import { PackageProfileApi } from '../package/packageProfileApi'; | ||
| import { PackageAncestryNode } from '../package/packageAncestry'; | ||
| import { VersionNumber } from '../package/versionNumber'; | ||
| import { PackagingSObjects } from './packagingSObjects'; | ||
| import Package2VersionStatus = PackagingSObjects.Package2VersionStatus; | ||
| import PackageInstallRequest = PackagingSObjects.PackageInstallRequest; | ||
|
|
@@ -500,6 +501,31 @@ export type AncestryRepresentationProducer = { | |
| produce(): PackageAncestryNodeData | string | void; | ||
| }; | ||
|
|
||
| export type PackageVersionDependencyOptions = { | ||
| packageVersionId: string; | ||
| project?: SfProject; | ||
| connection: Connection; | ||
| verbose?: boolean; | ||
| edgeDirection?: 'root-first' | 'root-last'; | ||
| }; | ||
|
|
||
| export type DependencyGraphData = { | ||
| creator: string; | ||
| nodes: DependencyGraphNode[]; | ||
| edges: DependencyGraphEdge[]; | ||
| }; | ||
|
|
||
| export type DependencyGraphNode = { | ||
| subscriberPackageVersionId: string; | ||
| packageName: string; | ||
| version: VersionNumber; | ||
| }; | ||
|
|
||
| export type DependencyGraphEdge = { | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I decided to store the string SubscriberPackageVersionIds (04t...) into the DependencyGraphEdge instead of DependencyGraphNodes because writing the dot code for the edges only requires the 04t... in order to match to the id of a node in the dot code (node_04t...). |
||
| source: string; | ||
| target: string; | ||
| }; | ||
|
|
||
| export const PackageEvents = { | ||
| convert: { | ||
| success: 'Package/convert-success', | ||
|
|
||
This file contains hidden or 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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We originally decided on using this error message if the DependencyGraphJson field was null from the Package2VersionCreateRequest table. However, I decided to make this error more general to also occur if values in the json are invalid (ex. cannot find a 04t listed in the JSON and therefore cannot query correct package name, version, etc. information)