add some logs
This commit is contained in:
@@ -69,6 +69,8 @@ export function finalIds(input: Input): Observable<string[]> {
|
||||
).pipe(
|
||||
// This code block executes on batches of 100 versions starting from oldest
|
||||
map(value => {
|
||||
console.log('If block')
|
||||
console.log(`value: ${JSON.stringify(value)}`)
|
||||
/*
|
||||
Here first filter out the versions that are to be ignored.
|
||||
Then update input.numOldeVersionsToDelete to the no of versions deleted from the next 100 versions batch.
|
||||
@@ -94,6 +96,8 @@ export function finalIds(input: Input): Observable<string[]> {
|
||||
).pipe(
|
||||
// This code block executes on batches of 100 versions starting from oldest
|
||||
map(value => {
|
||||
console.log('Else block')
|
||||
console.log(`value: ${JSON.stringify(value)}`)
|
||||
/*
|
||||
Here totalCount is the total no of versions in the package.
|
||||
First we update totalCount by removing no of ignored versions from it and also filter them out from value.
|
||||
|
||||
@@ -88,6 +88,9 @@ export function deletePackageVersions(
|
||||
packageType: string,
|
||||
token: string
|
||||
): Observable<boolean> {
|
||||
console.log(`Total versions to delete: ${packageVersionIds.length}`)
|
||||
console.log(`Versions to delete: ${packageVersionIds}`)
|
||||
|
||||
if (packageVersionIds.length === 0) {
|
||||
return of(true)
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ export function getOldestVersions(
|
||||
)
|
||||
}),
|
||||
map(response => {
|
||||
return {
|
||||
const resp = {
|
||||
versions: response.data.map((version: GetVersionsResponse[0]) => {
|
||||
return {
|
||||
id: version.id,
|
||||
@@ -61,6 +61,10 @@ export function getOldestVersions(
|
||||
paginate: response.data.length === numVersions,
|
||||
totalCount: response.data.length
|
||||
}
|
||||
console.log(
|
||||
`Response from getOldestVersions method: ${JSON.stringify(resp)}`
|
||||
)
|
||||
return resp
|
||||
})
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user