Skip to content

Commit

Permalink
feat: new metadata types and script improvements
Browse files Browse the repository at this point in the history
* fix: handle mdtype generation better for empty arrays

* feat: mdtype support for forecastingFilter

* feat: support for mdtype SchedulingObjective

* fix: generate pretty json file for registry

* chore: auto-update metadata coverage in METADATA_SUPPORT.md

* test: record perf

Co-authored-by: SF-CLI-BOT <[email protected]>
  • Loading branch information
mshanemc and SF-CLI-BOT authored Sep 8, 2022
1 parent 4f91a95 commit a768e0c
Show file tree
Hide file tree
Showing 6 changed files with 88 additions and 7 deletions.
8 changes: 4 additions & 4 deletions METADATA_SUPPORT.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This list compares metadata types found in Salesforce v56 with the [metadata reg

This repository is used by both the Salesforce CLIs and Salesforce's VSCode Extensions.

Currently, there are 467/512 supported metadata types.
Currently, there are 470/512 supported metadata types.
For status on any existing gaps, please search or file an issue in the [Salesforce CLI issues only repo](https://github.com/forcedotcom/cli/issues).
To contribute a new metadata type, please see the [Contributing Metadata Types to the Registry](./contributing/metadata.md)

Expand Down Expand Up @@ -246,8 +246,8 @@ To contribute a new metadata type, please see the [Contributing Metadata Types t
|FlowDefinition|⚠️|Supports deploy/retrieve but not source tracking|
|FlowSettings|||
|FlowTest|||
|ForecastingFilter||Not supported, but support could be added|
|ForecastingFilterCondition||Not supported, but support could be added|
|ForecastingFilter|||
|ForecastingFilterCondition|||
|ForecastingObjectListSettings|||
|ForecastingSettings|||
|ForecastingSourceDefinition|||
Expand Down Expand Up @@ -427,7 +427,7 @@ To contribute a new metadata type, please see the [Contributing Metadata Types t
|SalesAgreementSettings|||
|SalesWorkQueueSettings|||
|SamlSsoConfig|||
|SchedulingObjective||Not supported, but support could be added|
|SchedulingObjective|||
|SchedulingRule|||
|SchemaSettings|||
|ScoreCategory||Not supported, but support could be added|
Expand Down
4 changes: 2 additions & 2 deletions scripts/update-registry/update2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ interface DescribeResult {
*/
const registryUpdate = (missingTypesAsDescribeResult: DescribeResult[]) => {
missingTypesAsDescribeResult.map((missingTypeDescribe) => {
if (missingTypeDescribe.childXmlNames || missingTypeDescribe.folderContentType) {
if (missingTypeDescribe.childXmlNames?.length || missingTypeDescribe.folderContentType) {
console.log(`Skipping ${missingTypeDescribe.xmlName} because it is a folder or has children`);
return;
}
Expand All @@ -90,7 +90,7 @@ const registryUpdate = (missingTypesAsDescribeResult: DescribeResult[]) => {
};
registry.suffixes[suffix] = typeId;
});
const jsonData = JSON.stringify(registry);
const jsonData = JSON.stringify(registry, null, 2);
fs.writeFileSync('./src/registry/metadataRegistry.json', jsonData);
};

Expand Down
29 changes: 28 additions & 1 deletion src/registry/metadataRegistry.json
Original file line number Diff line number Diff line change
Expand Up @@ -3042,6 +3042,30 @@
"directoryName": "IdentityVerificationProcDefs",
"inFolder": false,
"strictDirectoryName": false
},
"forecastingfilter": {
"id": "forecastingfilter",
"name": "ForecastingFilter",
"suffix": "forecastingFilter",
"directoryName": "forecastingFilters",
"inFolder": false,
"strictDirectoryName": false
},
"forecastingfiltercondition": {
"id": "forecastingfiltercondition",
"name": "ForecastingFilterCondition",
"suffix": "forecastingFilterCondition",
"directoryName": "forecastingFilterConditions",
"inFolder": false,
"strictDirectoryName": false
},
"schedulingobjective": {
"id": "schedulingobjective",
"name": "SchedulingObjective",
"suffix": "schedulingObjective",
"directoryName": "SchedulingObjectives",
"inFolder": false,
"strictDirectoryName": false
}
},
"suffixes": {
Expand Down Expand Up @@ -3379,7 +3403,10 @@
"dwl": "dataweaveresource",
"aq": "assessmentquestion",
"aqs": "assessmentquestionset",
"identityverificationprocdef": "identityverificationprocdef"
"identityverificationprocdef": "identityverificationprocdef",
"forecastingFilter": "forecastingfilter",
"forecastingFilterCondition": "forecastingfiltercondition",
"schedulingObjective": "schedulingobjective"
},
"strictDirectoryNames": {
"experiences": "experiencebundle",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[
{
"name": "componentSetCreate",
"duration": 259.14620899999863
},
{
"name": "sourceToMdapi",
"duration": 6459.770740000007
},
{
"name": "sourceToZip",
"duration": 5113.58167699998
},
{
"name": "mdapiToSource",
"duration": 7055.117207000003
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[
{
"name": "componentSetCreate",
"duration": 482.6520620000083
},
{
"name": "sourceToMdapi",
"duration": 10226.913838000008
},
{
"name": "sourceToZip",
"duration": 8078.776540000021
},
{
"name": "mdapiToSource",
"duration": 9712.470606999996
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[
{
"name": "componentSetCreate",
"duration": 843.7577440000023
},
{
"name": "sourceToMdapi",
"duration": 15412.48656900003
},
{
"name": "sourceToZip",
"duration": 13294.935163000016
},
{
"name": "mdapiToSource",
"duration": 15039.207108000002
}
]

0 comments on commit a768e0c

Please sign in to comment.