This commit is contained in:
Namrata Jha
2021-12-20 09:31:36 +00:00
committed by GitHub
parent 04947a51f3
commit 106b04e076
2 changed files with 3 additions and 7 deletions

4
dist/index.js vendored
View File

@@ -91,9 +91,7 @@ function deleteVersions(input) {
return rxjs_1.of(true);
}
const result = finalIds(input);
result.pipe(operators_1.tap(value => (input.numDeleted = value.length < 100 ? value.length : 100)));
console.log(`${input.numDeleted} versions will be deleted`);
return result.pipe(operators_1.concatMap(ids => version_1.deletePackageVersions(ids.slice(0, 100), input.token)));
return result.pipe(operators_1.tap(value => (input.numDeleted = value.length < 100 ? value.length : 100)), operators_1.tap(() => console.log(`${input.numDeleted} versions will be deleted`)), operators_1.concatMap(ids => version_1.deletePackageVersions(ids.slice(0, 100), input.token)));
}
exports.deleteVersions = deleteVersions;

View File

@@ -121,12 +121,10 @@ export function deleteVersions(input: Input): Observable<boolean> {
}
const result = finalIds(input)
result.pipe(
tap(value => (input.numDeleted = value.length < 100 ? value.length : 100))
)
console.log(`${input.numDeleted} versions will be deleted`)
return result.pipe(
tap(value => (input.numDeleted = value.length < 100 ? value.length : 100)),
tap(() => console.log(`${input.numDeleted} versions will be deleted`)),
concatMap(ids => deletePackageVersions(ids.slice(0, 100), input.token))
)
}