fix dependency errors and navigation

This commit is contained in:
Matt Hill
2024-05-14 07:02:21 -06:00
parent 70dc53bda7
commit 47ff630c55

View File

@@ -210,9 +210,9 @@ export class ServiceRoute {
): DependencyInfo[] { ): DependencyInfo[] {
const manifest = getManifest(pkg) const manifest = getManifest(pkg)
return Object.keys(pkg.currentDependencies) return Object.keys(pkg.currentDependencies).map(id =>
.filter(id => !!manifest.dependencies[id]) this.getDepValues(pkg, manifest, id, depErrors),
.map(id => this.getDepValues(pkg, manifest, id, depErrors)) )
} }
private getDepValues( private getDepValues(
@@ -253,7 +253,7 @@ export class ServiceRoute {
depId: string, depId: string,
depErrors: PkgDependencyErrors, depErrors: PkgDependencyErrors,
) { ) {
const depError = depErrors[pkgManifest.id] const depError = depErrors[depId]
let errorText: string | null = null let errorText: string | null = null
let fixText: string | null = null let fixText: string | null = null
@@ -321,10 +321,15 @@ export class ServiceRoute {
version: pkg.currentDependencies[depId].versionSpec, version: pkg.currentDependencies[depId].versionSpec,
} }
const navigationExtras: NavigationExtras = { const navigationExtras: NavigationExtras = {
// @TODO state not being used by marketplace component. Maybe it is not important to use.
state: { dependentInfo }, state: { dependentInfo },
queryParams: { id: depId },
} }
await this.router.navigate(['marketplace', depId], navigationExtras) await this.router.navigate(
['portal', 'system', 'marketplace'],
navigationExtras,
)
} }
} }