Suppose we created 2 versions of a unlocked package. These two versions have assigned a package version ID in the Dev Hub org and are added to the sfdx-project.json:
{
"name": "NewTestProject",
"namespace": "",
"sfdcLoginUrl": "https://login.salesforce.com",
"sourceApiVersion": "59.0",
"packageDirectories": [
{
"path": "force-app",
"default": true
},
{
"path": "core/Account",
"scopeProfiles": "true",
"versionName": "v1.0.0",
"dependencies": [],
"default": false,
"package": "Account Package1",
"versionNumber": "0.1.0.NEXT",
"versionDescription": ""
}
],
"packageAliases": {
"Account Package1": "0Ho3X000000PBJZSA4",
"Account [email protected]": "04t3X000003LSseQAG",
"Account [email protected]": "04t3X000003LSsjQAG"
}
}
Now we can install any of these two versions into any existing org using sf
without having it's metadata stored in our local directory:
sf package install --package 04t3X000003LSseQAG --target-org [email protected] -k password123 -w 1
Where is the metadata stored? Are we retrieving it from Dev Hub using our package version ID? If so, does it mean that deleting our Dev Hub org deletes the metadata as well? Is this technicality documented somewhere? I was unable to find.