-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(hub-common): allow force updates of cache files as well as cache status reporting #1657
base: master
Are you sure you want to change the base?
Conversation
…es and returning the status affects: @esri/hub-common
… polling affects: @esri/hub-common
affects: @esri/hub-common
@@ -53,7 +53,6 @@ export async function fetchExportImageDownloadFile( | |||
// } | |||
|
|||
const blob: Blob = await request(`${entity.url}/exportImage`, requestOptions); | |||
progressCallback && progressCallback(DownloadOperationStatus.COMPLETED); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As part of this PR, we made the decision that fetchDownloadFile()
delegates are no longer responsible for emitting the "complete" event. It is up to the caller of fetchDownloadFile()
to notify that the download is complete.
}; | ||
} | ||
|
||
// Operation still in progress, poll again | ||
// Operation still in progress. Report progress if a callback was provided and poll again. | ||
progressCallback && progressCallback(operationStatus, progressInPercent); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moving this for the same reason as above. We don't want to emit the "complete" event from within this function.
affects: @esri/hub-common
Part of https://devtopia.esri.com/dc/hub/issues/11445
This PR is meant to reflect new realities in our Download API, namely:
fetchDownloadFile()
to update the cache by providing the "updateCache" optionAs an aside, we decided to remove the implicit requirement that
fetchDownloadFile()
would callprogressCallback
with a completed status. It's now up to the callers offetchDownloadFile()
to inform interested parties that the download is complete.Updated meaningful TSDoc to methods including Parameters and Returns, see Documentation Guide
used semantic commit messages
PR title follows semantic commit format (CRITICAL if the title is not in a semantic format, the release automation will not run!)