Skip to content

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.

Connection

The org connection to query against.

readonly string[]

Component IDs, in either 15- or 18-character form.

ResolvePackageNamesOptions

Chunk size, and whether to tolerate query failure.

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.