Skip to content

Commit 1655361

Browse files
feat: @w-22893150 - add support for FragmentBundle metadata
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent dffedd3 commit 1655361

4 files changed

Lines changed: 23 additions & 2 deletions

File tree

METADATA_SUPPORT.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,7 @@ To contribute a new metadata type, please see the [Contributing Metadata Types t
387387
|FlowSettings|||
388388
|FlowTest|||
389389
|FlowValueMap|||
390+
|FragmentBundle|||
390391
|ForecastingFilter|||
391392
|ForecastingFilterCondition|||
392393
|ForecastingGroup|||

src/registry/metadataRegistry.json

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,8 @@
7171
"waveTemplates": "wavetemplatebundle",
7272
"appTemplates": "appframeworktemplatebundle",
7373
"lightningTypes": "lightningtypebundle",
74-
"uiBundles": "uibundle"
74+
"uiBundles": "uibundle",
75+
"fragments": "fragmentbundle"
7576
},
7677
"suffixes": {
7778
"Canvas": "canvasmetadata",
@@ -5371,6 +5372,18 @@
53715372
"directoryName": "policyRuleDefinitionSets",
53725373
"inFolder": false,
53735374
"strictDirectoryName": false
5375+
},
5376+
"fragmentbundle": {
5377+
"id": "fragmentbundle",
5378+
"name": "FragmentBundle",
5379+
"directoryName": "fragments",
5380+
"inFolder": false,
5381+
"strictDirectoryName": true,
5382+
"strategies": {
5383+
"adapter": "bundle"
5384+
},
5385+
"supportsPartialDelete": true,
5386+
"metaFileSuffix": "fragment.json"
53745387
}
53755388
}
53765389
}

src/resolve/metadataResolver.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,13 @@ const parseAsMetadata =
400400
if (tree.isDirectory(fsPath)) {
401401
return;
402402
}
403-
return ['DigitalExperience', 'ExperiencePropertyTypeBundle', 'LightningTypeBundle', 'ContentTypeBundle']
403+
return [
404+
'DigitalExperience',
405+
'ExperiencePropertyTypeBundle',
406+
'LightningTypeBundle',
407+
'ContentTypeBundle',
408+
'FragmentBundle',
409+
]
404410
.map((type) => registry.getTypeByName(type))
405411
.find((type) => fsPath.split(sep).includes(type.directoryName))?.name;
406412
};

src/utils/filePathGenerator.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ export const filePathsFromMetadataComponent = (
125125
['ExperiencePropertyTypeBundle', [join(packageDirWithTypeDir, `${fullName}${sep}schema.json`)]],
126126
['LightningTypeBundle', [join(packageDirWithTypeDir, `${fullName}${sep}schema.json`)]],
127127
['ContentTypeBundle', [join(packageDirWithTypeDir, `${fullName}${sep}schema.json`)]],
128+
['FragmentBundle', [join(packageDirWithTypeDir, `${fullName}${sep}fragment.json`)]],
128129
['WaveTemplateBundle', [join(packageDirWithTypeDir, `${fullName}${sep}template-info.json`)]],
129130
// ui-bundle.json is optional, so only the meta XML is a guaranteed file path.
130131
['UIBundle', [join(packageDirWithTypeDir, `${fullName}${sep}${fullName}.uibundle${META_XML_SUFFIX}`)]],

0 commit comments

Comments
 (0)