ci test
This commit is contained in:
Vendored
+5
-2
@@ -13925,7 +13925,7 @@ class Input {
|
|||||||
return !!(this.owner &&
|
return !!(this.owner &&
|
||||||
this.repo &&
|
this.repo &&
|
||||||
this.packageName &&
|
this.packageName &&
|
||||||
this.numOldVersionsToDelete != null &&
|
this.numOldVersionsToDelete > 0 &&
|
||||||
this.token);
|
this.token);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -15768,10 +15768,13 @@ function getVersionIds(input) {
|
|||||||
}
|
}
|
||||||
exports.getVersionIds = getVersionIds;
|
exports.getVersionIds = getVersionIds;
|
||||||
function deleteVersions(input) {
|
function deleteVersions(input) {
|
||||||
console.log(`input: ${JSON.stringify(input)}`);
|
|
||||||
if (!input.token) {
|
if (!input.token) {
|
||||||
return rxjs_1.throwError('No token found');
|
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)));
|
return getVersionIds(input).pipe(operators_1.concatMap(ids => version_1.deletePackageVersions(ids, input.token)));
|
||||||
}
|
}
|
||||||
exports.deleteVersions = deleteVersions;
|
exports.deleteVersions = deleteVersions;
|
||||||
|
|||||||
+7
-1
@@ -24,11 +24,17 @@ export function getVersionIds(input: Input): Observable<string[]> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function deleteVersions(input: Input): Observable<boolean> {
|
export function deleteVersions(input: Input): Observable<boolean> {
|
||||||
console.log(`input: ${JSON.stringify(input)}`)
|
|
||||||
if (!input.token) {
|
if (!input.token) {
|
||||||
return throwError('No token found')
|
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(
|
return getVersionIds(input).pipe(
|
||||||
concatMap(ids => deletePackageVersions(ids, input.token))
|
concatMap(ids => deletePackageVersions(ids, input.token))
|
||||||
)
|
)
|
||||||
|
|||||||
+1
-1
@@ -40,7 +40,7 @@ export class Input {
|
|||||||
this.owner &&
|
this.owner &&
|
||||||
this.repo &&
|
this.repo &&
|
||||||
this.packageName &&
|
this.packageName &&
|
||||||
this.numOldVersionsToDelete != null &&
|
this.numOldVersionsToDelete > 0 &&
|
||||||
this.token
|
this.token
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user