From a768e0ccb1338ea250813604f3aa63c2814d6b77 Mon Sep 17 00:00:00 2001 From: Shane McLaughlin Date: Thu, 8 Sep 2022 07:49:18 -0700 Subject: [PATCH] feat: new metadata types and script improvements * 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 --- METADATA_SUPPORT.md | 8 ++--- scripts/update-registry/update2.ts | 4 +-- src/registry/metadataRegistry.json | 29 ++++++++++++++++++- .../eda.json | 18 ++++++++++++ .../lotsOfClasses.json | 18 ++++++++++++ .../lotsOfClassesOneDir.json | 18 ++++++++++++ 6 files changed, 88 insertions(+), 7 deletions(-) create mode 100644 test/nuts/perfResults/x64-linux-2xIntel-Xeon-CPU-E5-2673-v4-2-30GHz/eda.json create mode 100644 test/nuts/perfResults/x64-linux-2xIntel-Xeon-CPU-E5-2673-v4-2-30GHz/lotsOfClasses.json create mode 100644 test/nuts/perfResults/x64-linux-2xIntel-Xeon-CPU-E5-2673-v4-2-30GHz/lotsOfClassesOneDir.json diff --git a/METADATA_SUPPORT.md b/METADATA_SUPPORT.md index 62e1778db2..f5656e2aca 100644 --- a/METADATA_SUPPORT.md +++ b/METADATA_SUPPORT.md @@ -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) @@ -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|✅|| @@ -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| diff --git a/scripts/update-registry/update2.ts b/scripts/update-registry/update2.ts index 0a3c927e79..a63b234c1f 100644 --- a/scripts/update-registry/update2.ts +++ b/scripts/update-registry/update2.ts @@ -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; } @@ -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); }; diff --git a/src/registry/metadataRegistry.json b/src/registry/metadataRegistry.json index df22655d66..24b1472e96 100644 --- a/src/registry/metadataRegistry.json +++ b/src/registry/metadataRegistry.json @@ -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": { @@ -3379,7 +3403,10 @@ "dwl": "dataweaveresource", "aq": "assessmentquestion", "aqs": "assessmentquestionset", - "identityverificationprocdef": "identityverificationprocdef" + "identityverificationprocdef": "identityverificationprocdef", + "forecastingFilter": "forecastingfilter", + "forecastingFilterCondition": "forecastingfiltercondition", + "schedulingObjective": "schedulingobjective" }, "strictDirectoryNames": { "experiences": "experiencebundle", diff --git a/test/nuts/perfResults/x64-linux-2xIntel-Xeon-CPU-E5-2673-v4-2-30GHz/eda.json b/test/nuts/perfResults/x64-linux-2xIntel-Xeon-CPU-E5-2673-v4-2-30GHz/eda.json new file mode 100644 index 0000000000..6358d9ee7e --- /dev/null +++ b/test/nuts/perfResults/x64-linux-2xIntel-Xeon-CPU-E5-2673-v4-2-30GHz/eda.json @@ -0,0 +1,18 @@ +[ + { + "name": "componentSetCreate", + "duration": 259.14620899999863 + }, + { + "name": "sourceToMdapi", + "duration": 6459.770740000007 + }, + { + "name": "sourceToZip", + "duration": 5113.58167699998 + }, + { + "name": "mdapiToSource", + "duration": 7055.117207000003 + } +] \ No newline at end of file diff --git a/test/nuts/perfResults/x64-linux-2xIntel-Xeon-CPU-E5-2673-v4-2-30GHz/lotsOfClasses.json b/test/nuts/perfResults/x64-linux-2xIntel-Xeon-CPU-E5-2673-v4-2-30GHz/lotsOfClasses.json new file mode 100644 index 0000000000..c936a51b13 --- /dev/null +++ b/test/nuts/perfResults/x64-linux-2xIntel-Xeon-CPU-E5-2673-v4-2-30GHz/lotsOfClasses.json @@ -0,0 +1,18 @@ +[ + { + "name": "componentSetCreate", + "duration": 482.6520620000083 + }, + { + "name": "sourceToMdapi", + "duration": 10226.913838000008 + }, + { + "name": "sourceToZip", + "duration": 8078.776540000021 + }, + { + "name": "mdapiToSource", + "duration": 9712.470606999996 + } +] \ No newline at end of file diff --git a/test/nuts/perfResults/x64-linux-2xIntel-Xeon-CPU-E5-2673-v4-2-30GHz/lotsOfClassesOneDir.json b/test/nuts/perfResults/x64-linux-2xIntel-Xeon-CPU-E5-2673-v4-2-30GHz/lotsOfClassesOneDir.json new file mode 100644 index 0000000000..976b74a9e7 --- /dev/null +++ b/test/nuts/perfResults/x64-linux-2xIntel-Xeon-CPU-E5-2673-v4-2-30GHz/lotsOfClassesOneDir.json @@ -0,0 +1,18 @@ +[ + { + "name": "componentSetCreate", + "duration": 843.7577440000023 + }, + { + "name": "sourceToMdapi", + "duration": 15412.48656900003 + }, + { + "name": "sourceToZip", + "duration": 13294.935163000016 + }, + { + "name": "mdapiToSource", + "duration": 15039.207108000002 + } +] \ No newline at end of file