Skip to content

feat(content): clone HTML/JSON by default, add --media for assets#2709

Open
davidnuescheler wants to merge 2 commits intomainfrom
feat/content-clone-html-json-default
Open

feat(content): clone HTML/JSON by default, add --media for assets#2709
davidnuescheler wants to merge 2 commits intomainfrom
feat/content-clone-html-json-default

Conversation

@davidnuescheler
Copy link
Copy Markdown
Contributor

Summary

  • aem content clone now downloads only .html and .json files by default (case-insensitive).
  • Add --media to include all other file types (images, video, SVG, PDF, etc.), matching the previous all-files behavior.
  • When the remote lists more files than are cloned, the CLI logs the discovered vs cloned counts and mentions --media.
  • Large-clone confirmation uses the filtered file count.

Testing

  • Unit tests updated in test/content/clone.cmd.test.js and test/content/content-commands.test.js.

Made with Cursor

- Filter listed files to .html and .json unless --media is passed
- Add filterFilesForContentClone helper in content-shared
- Log when total discovered count exceeds cloned count
- Extend clone command and tests

Made-with: Cursor
@davidnuescheler davidnuescheler requested a review from kptdobe April 19, 2026 20:38
kptdobe
kptdobe previously approved these changes Apr 20, 2026
Copy link
Copy Markdown
Contributor

@tripodsan tripodsan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

improve extension operation (this certainly exists already somewhere....)

Comment thread src/content/content-shared.js
* @param {boolean} includeMedia
* @returns {typeof files}
*/
export function filterFilesForContentClone(files, includeMedia) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is the check for media here? it just returns true, so why filter at all?
but it's ok to keep it, in case in the future there are more files to filter.

@github-actions
Copy link
Copy Markdown

This PR will trigger a minor release when merged.

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.

3 participants