mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-30 12:11:56 +00:00
revamp manifest types
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
import { PackageDataEntry } from '../services/patch-db/data-model'
|
||||
import { getManifest } from './get-package-data'
|
||||
|
||||
export function hasCurrentDeps(pkg: PackageDataEntry): boolean {
|
||||
return !!Object.keys(pkg['current-dependents']).filter(
|
||||
depId => depId !== getManifest(pkg).id,
|
||||
).length
|
||||
export function hasCurrentDeps(
|
||||
id: string,
|
||||
pkgs: Record<string, PackageDataEntry>,
|
||||
): boolean {
|
||||
return !!Object.values(pkgs).some(pkg => !!pkg['current-dependencies'][id])
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user