This commit is contained in:
Namrata Jha
2021-12-20 09:21:35 +00:00
committed by GitHub
parent 7d96e1e541
commit 04947a51f3
3 changed files with 8 additions and 11 deletions
+5 -7
View File
@@ -34,12 +34,7 @@ export function getVersionIds(
: EMPTY
),
tap(value => (totalCount = value.totalCount)),
map(value => value.versions),
tap(value =>
value.map(info =>
console.log(`id0: ${info.id}, version: ${info.version}`)
)
)
map(value => value.versions)
)
}
@@ -126,7 +121,10 @@ export function deleteVersions(input: Input): Observable<boolean> {
}
const result = finalIds(input)
console.log(`${input.numDeleted} versions deleted`)
result.pipe(
tap(value => (input.numDeleted = value.length < 100 ? value.length : 100))
)
console.log(`${input.numDeleted} versions will be deleted`)
return result.pipe(
concatMap(ids => deletePackageVersions(ids.slice(0, 100), input.token))
-1
View File
@@ -45,7 +45,6 @@ export function deletePackageVersions(
token: string
): Observable<boolean> {
if (packageVersionIds.length === 0) {
console.log('no package version ids found, no versions will be deleted')
return of(true)
}