Open
Conversation
Refactor SDK site archive export into three functions with clear separation of concerns: - siteArchiveExport: server-side job only (no download) - siteArchiveExportToBuffer: export + download to memory - siteArchiveExportToPath: export + download + save to disk The CLI now calls siteArchiveExport directly when --no-download is set, skipping the WebDAV download entirely.
The explicit inline type annotation for onProgress was narrower than the SDK's WaitForJobOptions type (execution_status: string vs string | undefined), causing CI typecheck failure.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #169 — thanks @F17HEH for reporting this!
b2c job export --no-downloadwas still downloading the archive from the instance. The flag was only mapped tokeepArchive, which prevented deletion but not the download itself.--no-downloadis set.SDK changes (slight breaking change)
siteArchiveExportno longer downloads the archive — it only runs the server-side export job and returns{ execution, archiveFilename }. ThedataandarchiveKeptfields have been removed fromSiteArchiveExportResult, andkeepArchivehas been removed fromSiteArchiveExportOptions.The export functions are now layered:
siteArchiveExportsiteArchiveExportToBuffersiteArchiveExportToPathSDK consumers that previously relied on
siteArchiveExportreturningdatashould migrate tositeArchiveExportToBuffer.Test plan
b2c job export --no-downloadshould complete without downloadingb2c job export(without --no-download) should still download and save locally