diff --git a/src/registry/registry.json b/src/registry/registry.json index 92e2e18679..6c576f9a0e 100644 --- a/src/registry/registry.json +++ b/src/registry/registry.json @@ -11,6 +11,7 @@ "customlabels": { "id": "customlabels", "name": "CustomLabels", + "ignoreTypeName": true, "suffix": "labels", "directoryName": "labels", "inFolder": false, @@ -2563,7 +2564,7 @@ "bots": "bot", "objectTranslations": "customobjecttranslation", "staticresources": "staticresource", - "sites": "customsite", + "sites": "customsite" }, "childTypes": { "customlabel": "customlabels", diff --git a/src/registry/types.ts b/src/registry/types.ts index 5b98569b6b..de755e8957 100644 --- a/src/registry/types.ts +++ b/src/registry/types.ts @@ -57,6 +57,11 @@ export interface MetadataType { * Whether or not components are required to reside in a folder named after the type's directoryName. */ strictDirectoryName?: boolean; + /** + * Whether or not to ignore the fullName that's parsed from the file path. If true, the metadata type's + * name will be used instead. For example, CustomLabels instead of MyLabels. + */ + ignoreTypeName?: boolean; /** * If the type is a folder type (container for components), the id of the type it is a container for. */ diff --git a/src/resolve/sourceComponent.ts b/src/resolve/sourceComponent.ts index 30e67dcb0b..0f2b96c327 100644 --- a/src/resolve/sourceComponent.ts +++ b/src/resolve/sourceComponent.ts @@ -218,6 +218,9 @@ export class SourceComponent implements MetadataComponent { } get fullName(): string { + if (this.type.ignoreTypeName) { + return this.type.name; + } if (this.parent && this.type.ignoreParentName) { return this.name; } else {