feat(assets): add extractAssets function for asset mapping across Con…#1109
Open
yashin4112 wants to merge 1 commit into
Open
feat(assets): add extractAssets function for asset mapping across Con…#1109yashin4112 wants to merge 1 commit into
yashin4112 wants to merge 1 commit into
Conversation
…tentful, Drupal, and WordPress
🔒 Security Scan Results
⏱️ SLA Breach Summary
ℹ️ Vulnerabilities Without Available Fixes (Informational Only)The following vulnerabilities were detected but do not have fixes available (no upgrade or patch). These are excluded from failure thresholds:
✅ BUILD PASSED - All security checks passed |
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.
🔗 Jira Ticket
MIGRATION-1030
📋 PR Type
📝 Description
What changed?
extractAssetslib to the Contentful, WordPress, and Drupal connectors so each builds anassetMappingarray in the upload-api and sends it in thecreateDummyDatapayload — the same flow AEM and Sitecore already use.migration-contentful/libs/extractAssets.js): reads the export JSON'sassets, dedupes bysys.id, pulls locale-keyedfields.file/fields.title.migration-wordpress/libs/extractAssets.ts): walks WXR items, filterswp:post_type === 'attachment', dedupes by post id.migration-drupal/libs/extractAssets.js): queries thefile_managedtable over MySQL, dedupes byfid.createAssetsassigns, so delta dedupe / uid-mapper lookups line up across iterations.extractAssetsinto each connector's mapper service/controller and exported it from eachmigration-*package index.extractAssetsexport.Why?
Contentful, WordPress, and Drupal migrations never populated the AssetMapper UI because no
assetMappingarray was built on the upload side (only AEM and Sitecore did). This brings those three connectors to parity so their media assets appear on the Asset Mapper and participate in delta tracking.🧩 Affected Areas
api— Node.js backendui— React frontendupload-api— Upload API serverdocker/docker-compose🧪 How to Test
file_managed).Expected result: Contentful, WordPress, and Drupal assets show on the AssetMapper (previously empty), with stable UIDs across iterations.
📸 Screenshots / Recordings
🔗 Related PRs / Dependencies
✅ Author Checklist
feature/,bugfix/, orhotfix/+ 5–30 lowercase chars.env/example.envupdated if new environment variables were addednpm test)README.md/ docs updated if behaviour changed👀 Reviewer Notes
createAssets(Contentfulsys.id, WordPress post id, Drupalfid) — that's the key to delta matching; worth a sanity check.extractAssetsopens its own MySQL connection (viadbConnection(config)) and closes it infinally, mirroringextractLocale.file_sizeis empty at extract time for Contentful/WordPress (only known after download); Drupal has it fromfile_managed.filesize.upload-api/src/config/index.jsondev tweak (cmsType/localPath) — intentionally left out of this PR.