ci test
This commit is contained in:
7
dist/index.js
vendored
7
dist/index.js
vendored
@@ -13925,7 +13925,7 @@ class Input {
|
||||
return !!(this.owner &&
|
||||
this.repo &&
|
||||
this.packageName &&
|
||||
this.numOldVersionsToDelete != null &&
|
||||
this.numOldVersionsToDelete > 0 &&
|
||||
this.token);
|
||||
}
|
||||
}
|
||||
@@ -15768,10 +15768,13 @@ function getVersionIds(input) {
|
||||
}
|
||||
exports.getVersionIds = getVersionIds;
|
||||
function deleteVersions(input) {
|
||||
console.log(`input: ${JSON.stringify(input)}`);
|
||||
if (!input.token) {
|
||||
return rxjs_1.throwError('No token found');
|
||||
}
|
||||
if (input.numOldVersionsToDelete <= 0) {
|
||||
console.log('Number of old versions to delete input is 0 or less, no versions will be deleted');
|
||||
return rxjs_1.of(true);
|
||||
}
|
||||
return getVersionIds(input).pipe(operators_1.concatMap(ids => version_1.deletePackageVersions(ids, input.token)));
|
||||
}
|
||||
exports.deleteVersions = deleteVersions;
|
||||
|
||||
@@ -24,11 +24,17 @@ export function getVersionIds(input: Input): Observable<string[]> {
|
||||
}
|
||||
|
||||
export function deleteVersions(input: Input): Observable<boolean> {
|
||||
console.log(`input: ${JSON.stringify(input)}`)
|
||||
if (!input.token) {
|
||||
return throwError('No token found')
|
||||
}
|
||||
|
||||
if (input.numOldVersionsToDelete <= 0) {
|
||||
console.log(
|
||||
'Number of old versions to delete input is 0 or less, no versions will be deleted'
|
||||
)
|
||||
return of(true)
|
||||
}
|
||||
|
||||
return getVersionIds(input).pipe(
|
||||
concatMap(ids => deletePackageVersions(ids, input.token))
|
||||
)
|
||||
|
||||
@@ -40,7 +40,7 @@ export class Input {
|
||||
this.owner &&
|
||||
this.repo &&
|
||||
this.packageName &&
|
||||
this.numOldVersionsToDelete != null &&
|
||||
this.numOldVersionsToDelete > 0 &&
|
||||
this.token
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user