File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed
Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -101,14 +101,25 @@ export class RetrieveResult implements MetadataTransferResult {
101101
102102 // construct successes
103103 for ( const retrievedComponent of this . components . getSourceComponents ( ) ) {
104- const { fullName, type, xml } = retrievedComponent ;
104+ const { fullName, type, xml, content } = retrievedComponent ;
105105 const baseResponse = {
106106 fullName,
107107 type : type . name ,
108108 state : this . localComponents . has ( retrievedComponent ) ? ComponentStatus . Changed : ComponentStatus . Created ,
109109 } as const ;
110110
111- if ( ! type . children || Object . values ( type . children . types ) . some ( ( t ) => t . unaddressableWithoutParent ) ) {
111+ // Special handling for web_app bundles - they need to walk content and report individual files
112+ const isWebAppBundle = type . name === 'DigitalExperienceBundle' && fullName . startsWith ( 'web_app/' ) && content ;
113+
114+ if ( isWebAppBundle ) {
115+ const walkedPaths = retrievedComponent . walkContent ( ) ;
116+ // Add the bundle directory itself
117+ this . fileResponses . push ( { ...baseResponse , filePath : content } satisfies FileResponseSuccess ) ;
118+ // Add each file with its specific path
119+ for ( const filePath of walkedPaths ) {
120+ this . fileResponses . push ( { ...baseResponse , filePath } satisfies FileResponseSuccess ) ;
121+ }
122+ } else if ( ! type . children || Object . values ( type . children . types ) . some ( ( t ) => t . unaddressableWithoutParent ) ) {
112123 for ( const filePath of retrievedComponent . walkContent ( ) ) {
113124 this . fileResponses . push ( { ...baseResponse , filePath } satisfies FileResponseSuccess ) ;
114125 }
You can’t perform that action at this time.
0 commit comments