Skip to content

Comments

fix: respect --no-download flag in job export#181

Open
clavery wants to merge 2 commits intomainfrom
bugfix/169-download
Open

fix: respect --no-download flag in job export#181
clavery wants to merge 2 commits intomainfrom
bugfix/169-download

Conversation

@clavery
Copy link
Collaborator

@clavery clavery commented Feb 21, 2026

Summary

Fixes #169 — thanks @F17HEH for reporting this!

  • Bug: b2c job export --no-download was still downloading the archive from the instance. The flag was only mapped to keepArchive, which prevented deletion but not the download itself.
  • Fix: Refactored the SDK export functions into a clear separation of concerns so the CLI can skip the download entirely when --no-download is set.

SDK changes (slight breaking change)

siteArchiveExport no longer downloads the archive — it only runs the server-side export job and returns { execution, archiveFilename }. The data and archiveKept fields have been removed from SiteArchiveExportResult, and keepArchive has been removed from SiteArchiveExportOptions.

The export functions are now layered:

Function Responsibility
siteArchiveExport Run server-side export job only
siteArchiveExportToBuffer Export + download to memory via WebDAV (new)
siteArchiveExportToPath Export + download + save to disk

SDK consumers that previously relied on siteArchiveExport returning data should migrate to siteArchiveExportToBuffer.

Test plan

  • All SDK tests pass (1282 passing)
  • All CLI tests pass (518 passing)
  • All MCP tests pass (304 passing)
  • Typecheck passes
  • Lint passes
  • Manual test: b2c job export --no-download should complete without downloading
  • Manual test: b2c job export (without --no-download) should still download and save locally

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

--no-download is not being adhered too on the cli

1 participant