Skip to content

New: Add importProgressHook for import progress reporting#216

Merged
taylortom merged 2 commits into
masterfrom
feature/import-progress-hook
Jun 24, 2026
Merged

New: Add importProgressHook for import progress reporting#216
taylortom merged 2 commits into
masterfrom
feature/import-progress-hook

Conversation

@taylortom

Copy link
Copy Markdown
Contributor

New

  • Add a generic, transport-agnostic importProgressHook to AdaptFrameworkModule, bridged from AdaptFrameworkImport (mirrors the existing preImportHook/postImportHook wiring).
  • Emit progress during import:
    • a phase event ({ phase, step, totalSteps }) before each enabled phase in the import task loop, and
    • per-item events ({ phase, current, total }) within the heavy phases importCourseAssets and importCourseData.
  • Thread an opaque importToken correlation id through POST /importimportCourse() → the importer (exposed as importer.importToken), so a consumer can attribute progress to a specific import (e.g. pick a websocket room). It has no meaning to the framework itself.
  • Document the new seam in docs/building-courses.md.

The framework emits plain progress objects and depends on no particular delivery mechanism; relaying them (e.g. over a websocket) is left to consumer modules.

Testing

  • npm test — all 38 tests pass.
  • npx standard — clean.

@taylortom
taylortom merged commit 3c17d23 into master Jun 24, 2026
2 checks passed
@taylortom
taylortom deleted the feature/import-progress-hook branch June 24, 2026 13:09
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 3.3.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant