resolvePackageNamesBySubjectId
resolvePackageNamesBySubjectId(
connection,subjectIds,options):Promise<Map<string,string>>
Defined in: packages/simply-core/src/metadata/packageAttribution.ts:91
Resolve which unlocked (2GP) package each metadata component belongs to, via Package2Member.
Components installed from an unlocked package aren’t attributed by NamespacePrefix or
Publisher.Name the way managed-package components are — Package2Member is the only place
that mapping exists, and it’s Tooling API only.
Parameters
Section titled “Parameters”connection
Section titled “connection”Connection
The org connection to query against.
subjectIds
Section titled “subjectIds”readonly string[]
Component IDs, in either 15- or 18-character form.
options
Section titled “options”Chunk size, and whether to tolerate query failure.
Returns
Section titled “Returns”Promise<Map<string, string>>
Package name by 15-character component ID. Components with no Package2Member row are
absent from the map rather than present with a placeholder, so callers keep control of the
“not in a package” label. Empty if subjectIds is empty.