2

Let's say I have a scratch org that has 5 packages (1 to 5).

I wish to retrieve the meta-data from the 3rd package, so I use the mdapi:retrieve command to retrieve the meta-data from the 3rd package.

I unzip the contents in the directory and I see the meta-data from the 3rd package only there (which is good).

However, I also want to retrieve the sfdx-project.json file (or at least, the meta-data that tells me the dependencies of the 3rd package). For example, package 3 is dependent on package 1 and package 2.

QUESTION: Is there a command to target a package and return the "dependencies" parameter from the sfdx-project.json file? Ideally, I'd see something like this:

        "dependencies": [
            {
                "package": "Package1",
                "versionNumber": "0.1.0.LATEST"
            },
            {
                "package": "Package2",
                "versionNumber": "0.1.0.LATEST"
            }
        ]
0

I have found that this can help identify the dependencies from a particular package.

This doc is also helpful.

sfdx force:data:soql:query -u [insert either org alias or username alias] -t -q "SELECT Dependencies FROM SubscriberPackageVersion WHERE id='04tXXXXXX' and InstallationKey='ABC'" --json | grep subscriberPackageVersionId

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.