File tree Expand file tree Collapse file tree
src/commands/package/installed Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -60,16 +60,11 @@ export class PackageInstalledListCommand extends SfCommand<PackageInstalledComma
6060
6161 // Calculate Version Settings from the data already in the result
6262 if ( r . SubscriberPackageVersion ) {
63- // Access fields that are now included in the query but may not be in the type definition yet
64- const subPkgVersion = r . SubscriberPackageVersion as {
65- IsManaged ?: boolean ;
66- Package2ContainerOptions ?: string ;
67- } ;
68- const isManaged = subPkgVersion . IsManaged ;
69- const package2ContainerOptions = subPkgVersion . Package2ContainerOptions ;
63+ const isManaged = r . SubscriberPackageVersion . IsManaged ;
64+ const package2ContainerOptions = r . SubscriberPackageVersion . Package2ContainerOptions ;
7065
71- // What does UI do for non- managed packages? Follow the same pattern. Then can probably simplify this logic
72- // If IsManaged is true AND Package2ContainerOptions is blank, use "namespace"; otherwise use "packageId"
66+ // Use namespace for 1GP managed packages. For 2GP managed packages use packageId. For anything else,
67+ // Version Settings is not applicable, so leave it empty.
7368 if ( isManaged && ! package2ContainerOptions ) {
7469 transformed . VersionSettings = 'namespace' ;
7570 } else if ( package2ContainerOptions === 'Managed' ) {
You can’t perform that action at this time.
0 commit comments