From 334f20f7fa4a08e80d182d9264a98a5e610d6bce Mon Sep 17 00:00:00 2001 From: Namrata Jha Date: Tue, 14 Dec 2021 15:57:21 +0000 Subject: [PATCH] fix checks --- dist/index.js | 5 ++--- src/delete.ts | 4 +++- src/input.ts | 3 +-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/dist/index.js b/dist/index.js index 11fa4da..94c12ce 100644 --- a/dist/index.js +++ b/dist/index.js @@ -81,7 +81,7 @@ function finalIds(input) { })); } } - return rxjs_1.throwError(`no package id found`); + return rxjs_1.throwError("Could not get packageVersionIds. Explicitly specify using the 'package-version-ids' input"); } exports.finalIds = finalIds; function deleteVersions(input) { @@ -137,8 +137,7 @@ class Input { return !!(this.owner && this.repo && this.packageName && - this.numOldVersionsToDelete > 0 && - this.minVersionsToKeep >= 0 && + this.numOldVersionsToDelete >= 0 && this.token); } checkInput() { diff --git a/src/delete.ts b/src/delete.ts index fcb875d..91ce8de 100644 --- a/src/delete.ts +++ b/src/delete.ts @@ -128,7 +128,9 @@ export function finalIds(input: Input): Observable { } } - return throwError(`no package id found`) + return throwError( + "Could not get packageVersionIds. Explicitly specify using the 'package-version-ids' input" + ) } export function deleteVersions(input: Input): Observable { diff --git a/src/input.ts b/src/input.ts index c016c66..dd996ca 100644 --- a/src/input.ts +++ b/src/input.ts @@ -54,8 +54,7 @@ export class Input { this.owner && this.repo && this.packageName && - this.numOldVersionsToDelete > 0 && - this.minVersionsToKeep >= 0 && + this.numOldVersionsToDelete >= 0 && this.token ) }