@salesforce/source-deploy-retrieve 12.1.8 → 12.1.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (85) hide show
  1. package/lib/src/client/metadataApiDeploy.js +22 -14
  2. package/lib/src/client/metadataApiDeploy.js.map +1 -1
  3. package/lib/src/client/metadataApiRetrieve.js +12 -2
  4. package/lib/src/client/metadataApiRetrieve.js.map +1 -1
  5. package/lib/src/client/metadataTransfer.js +9 -3
  6. package/lib/src/client/metadataTransfer.js.map +1 -1
  7. package/lib/src/collections/componentSet.js +76 -55
  8. package/lib/src/collections/componentSet.js.map +1 -1
  9. package/lib/src/collections/componentSetBuilder.js +91 -108
  10. package/lib/src/collections/componentSetBuilder.js.map +1 -1
  11. package/lib/src/collections/decodeableMap.js +7 -0
  12. package/lib/src/collections/decodeableMap.js.map +1 -1
  13. package/lib/src/collections/lazyCollection.js +1 -0
  14. package/lib/src/collections/lazyCollection.js.map +1 -1
  15. package/lib/src/convert/convertContext/convertContext.js +3 -5
  16. package/lib/src/convert/convertContext/convertContext.js.map +1 -1
  17. package/lib/src/convert/convertContext/decompositionFinalizer.js +1 -4
  18. package/lib/src/convert/convertContext/decompositionFinalizer.js.map +1 -1
  19. package/lib/src/convert/convertContext/nonDecompositionFinalizer.js +9 -11
  20. package/lib/src/convert/convertContext/nonDecompositionFinalizer.js.map +1 -1
  21. package/lib/src/convert/convertContext/recompositionFinalizer.d.ts +0 -3
  22. package/lib/src/convert/convertContext/recompositionFinalizer.js +6 -17
  23. package/lib/src/convert/convertContext/recompositionFinalizer.js.map +1 -1
  24. package/lib/src/convert/metadataConverter.js +6 -5
  25. package/lib/src/convert/metadataConverter.js.map +1 -1
  26. package/lib/src/convert/replacements.js +3 -1
  27. package/lib/src/convert/replacements.js.map +1 -1
  28. package/lib/src/convert/streams.js +15 -6
  29. package/lib/src/convert/streams.js.map +1 -1
  30. package/lib/src/convert/transformers/baseMetadataTransformer.js +3 -0
  31. package/lib/src/convert/transformers/baseMetadataTransformer.js.map +1 -1
  32. package/lib/src/convert/transformers/decomposedMetadataTransformer.js +5 -7
  33. package/lib/src/convert/transformers/decomposedMetadataTransformer.js.map +1 -1
  34. package/lib/src/convert/transformers/defaultMetadataTransformer.js +1 -1
  35. package/lib/src/convert/transformers/defaultMetadataTransformer.js.map +1 -1
  36. package/lib/src/convert/transformers/metadataTransformerFactory.js +3 -1
  37. package/lib/src/convert/transformers/metadataTransformerFactory.js.map +1 -1
  38. package/lib/src/convert/transformers/nonDecomposedMetadataTransformer.js +1 -1
  39. package/lib/src/convert/transformers/nonDecomposedMetadataTransformer.js.map +1 -1
  40. package/lib/src/convert/transformers/staticResourceMetadataTransformer.js +6 -6
  41. package/lib/src/convert/transformers/staticResourceMetadataTransformer.js.map +1 -1
  42. package/lib/src/convert/types.d.ts +7 -0
  43. package/lib/src/convert/types.js +1 -0
  44. package/lib/src/convert/types.js.map +1 -1
  45. package/lib/src/registry/levenshtein.d.ts +4 -0
  46. package/lib/src/registry/levenshtein.js +68 -0
  47. package/lib/src/registry/levenshtein.js.map +1 -0
  48. package/lib/src/registry/presets/decomposeWorkflowBeta.json +7 -0
  49. package/lib/src/registry/registryAccess.js +18 -45
  50. package/lib/src/registry/registryAccess.js.map +1 -1
  51. package/lib/src/resolve/adapters/baseSourceAdapter.js +11 -7
  52. package/lib/src/resolve/adapters/baseSourceAdapter.js.map +1 -1
  53. package/lib/src/resolve/adapters/bundleSourceAdapter.js +1 -4
  54. package/lib/src/resolve/adapters/bundleSourceAdapter.js.map +1 -1
  55. package/lib/src/resolve/adapters/decomposedSourceAdapter.js +3 -6
  56. package/lib/src/resolve/adapters/decomposedSourceAdapter.js.map +1 -1
  57. package/lib/src/resolve/adapters/defaultSourceAdapter.js +1 -4
  58. package/lib/src/resolve/adapters/defaultSourceAdapter.js.map +1 -1
  59. package/lib/src/resolve/adapters/digitalExperienceSourceAdapter.js +1 -1
  60. package/lib/src/resolve/adapters/digitalExperienceSourceAdapter.js.map +1 -1
  61. package/lib/src/resolve/adapters/matchingContentSourceAdapter.js +1 -1
  62. package/lib/src/resolve/adapters/matchingContentSourceAdapter.js.map +1 -1
  63. package/lib/src/resolve/adapters/mixedContentSourceAdapter.js +1 -1
  64. package/lib/src/resolve/adapters/mixedContentSourceAdapter.js.map +1 -1
  65. package/lib/src/resolve/adapters/sourceAdapterFactory.js +3 -1
  66. package/lib/src/resolve/adapters/sourceAdapterFactory.js.map +1 -1
  67. package/lib/src/resolve/connectionResolver.js +6 -1
  68. package/lib/src/resolve/connectionResolver.js.map +1 -1
  69. package/lib/src/resolve/forceIgnore.js +4 -2
  70. package/lib/src/resolve/forceIgnore.js.map +1 -1
  71. package/lib/src/resolve/manifestResolver.js +2 -0
  72. package/lib/src/resolve/manifestResolver.js.map +1 -1
  73. package/lib/src/resolve/metadataResolver.js +6 -1
  74. package/lib/src/resolve/metadataResolver.js.map +1 -1
  75. package/lib/src/resolve/sourceComponent.js +12 -2
  76. package/lib/src/resolve/sourceComponent.js.map +1 -1
  77. package/lib/src/resolve/treeContainers.js +4 -3
  78. package/lib/src/resolve/treeContainers.js.map +1 -1
  79. package/lib/src/utils/decomposed.d.ts +5 -0
  80. package/lib/src/utils/decomposed.js +13 -1
  81. package/lib/src/utils/decomposed.js.map +1 -1
  82. package/lib/src/utils/filePathGenerator.js +1 -1
  83. package/lib/src/utils/filePathGenerator.js.map +1 -1
  84. package/messages/sdr.md +13 -0
  85. package/package.json +8 -8
@@ -66,7 +66,7 @@ const getXmlDestination = (targetFormat, component, mergeWith) => {
66
66
  const { folderContentType, suffix, legacySuffix } = component.type;
67
67
  if (!component.xml) {
68
68
  ;
69
- const messages = new messages_1.Messages('@salesforce/source-deploy-retrieve', 'sdr', new Map([["md_request_fail", "Metadata API request failed: %s"], ["error_convert_invalid_format", "Invalid conversion format '%s'"], ["error_could_not_infer_type", "%s: Could not infer a metadata type"], ["error_unexpected_child_type", "Unexpected child metadata [%s] found for parent type [%s]"], ["noParent", "Could not find parent type for %s (%s)"], ["error_expected_source_files", "%s: Expected source files for type '%s'"], ["error_failed_convert", "Component conversion failed: %s"], ["error_merge_metadata_target_unsupported", "Merge convert for metadata target format currently unsupported"], ["error_missing_adapter", "Missing adapter '%s' for metadata type '%s'"], ["error_missing_transformer", "Missing transformer '%s' for metadata type '%s'"], ["error_missing_type_definition", "Missing metadata type definition in registry for id '%s'."], ["error_missing_child_type_definition", "Type %s does not have a child type definition %s."], ["noChildTypes", "No child types found in registry for %s (reading %s at %s)"], ["error_no_metadata_xml_ignore", "Metadata xml file %s is forceignored but is required for %s."], ["noSourceIgnore", "%s metadata types require source files, but %s is forceignored."], ["noSourceIgnore.actions", "- Metadata types with content are composed of two files: a content file (ie MyApexClass.cls) and a -meta.xml file (i.e MyApexClass.cls-meta.xml). You must include both files in your .forceignore file. Or try appending \u201C\\*\u201D to your existing .forceignore entry.\n\nSee <https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_exclude_source.htm> for examples"], ["error_path_not_found", "%s: File or folder not found"], ["noContentFound", "SourceComponent %s (metadata type = %s) is missing its content file."], ["noContentFound.actions", ["Ensure the content file exists in the expected location.", "If the content file is in your .forceignore file, ensure the meta-xml file is also ignored to completely exclude it."]], ["error_parsing_xml", "SourceComponent %s (metadata type = %s) does not have an associated metadata xml to parse"], ["error_expected_file_path", "%s: path is to a directory, expected a file"], ["error_expected_directory_path", "%s: path is to a file, expected a directory"], ["error_directory_not_found_or_not_directory", "%s: path is not a directory"], ["error_no_directory_stream", "%s doesn't support readable streams on directories."], ["error_no_source_to_deploy", "No source-backed components present in the package."], ["error_no_components_to_retrieve", "No components in the package to retrieve."], ["error_static_resource_expected_archive_type", "A StaticResource directory must have a content type of application/zip or application/jar - found %s for %s."], ["error_static_resource_missing_resource_file", "A StaticResource must have an associated .resource file, missing %s.resource-meta.xml"], ["error_no_job_id", "The %s operation is missing a job ID. Initialize an operation with an ID, or start a new job."], ["missingApiVersion", "Could not determine an API version to use for the generated manifest. Tried looking for sourceApiVersion in sfdx-project.json, apiVersion from config vars, and the highest apiVersion from the APEX REST endpoint. Using API version 58.0 as a last resort."], ["invalid_xml_parsing", "error parsing %s due to:\\n message: %s\\n line: %s\\n code: %s"], ["zipBufferError", "Zip buffer was not created during conversion"], ["undefinedComponentSet", "Unable to construct a componentSet. Check the logs for more information."], ["replacementsFileNotRead", "The file \"%s\" specified in the \"replacements\" property of sfdx-project.json could not be read."], ["unsupportedBundleType", "Unsupported Bundle Type: %s"], ["filePathGeneratorNoTypeSupport", "Type not supported for filepath generation: %s"], ["missingFolderType", "The registry has %s as is inFolder but it does not have a folderType"], ["tooManyFiles", "Multiple files found for path: %s."], ["cantGetName", "Unable to calculate fullName from path: %s (%s)"], ["missingMetaFileSuffix", "The metadata registry is configured incorrectly for %s. Expected a metaFileSuffix."], ["uniqueIdElementNotInRegistry", "No uniqueIdElement found in registry for %s (reading %s at %s)."], ["uniqueIdElementNotInChild", "The uniqueIdElement %s was not found the child (reading %s at %s)."], ["suggest_type_header", "A metadata type lookup for \"%s\" found the following close matches:"], ["suggest_type_did_you_mean", "-- Did you mean \".%s%s\" instead for the \"%s\" metadata type?"], ["suggest_type_more_suggestions", "Additional suggestions:\nConfirm the file name, extension, and directory names are correct. Validate against the registry at:\n<https://github.com/forcedotcom/source-deploy-retrieve/blob/main/src/registry/metadataRegistry.json>\n\nIf the type is not listed in the registry, check that it has Metadata API support via the Metadata Coverage Report:\n<https://developer.salesforce.com/docs/metadata-coverage>\n\nIf the type is available via Metadata API but not in the registry\n\n- Open an issue <https://github.com/forcedotcom/cli/issues>\n- Add the type via PR. Instructions: <https://github.com/forcedotcom/source-deploy-retrieve/blob/main/contributing/metadata.md>"]]));
69
+ const messages = new messages_1.Messages('@salesforce/source-deploy-retrieve', 'sdr', new Map([["md_request_fail", "Metadata API request failed: %s"], ["error_convert_invalid_format", "Invalid conversion format '%s'"], ["error_could_not_infer_type", "%s: Could not infer a metadata type"], ["error_unexpected_child_type", "Unexpected child metadata [%s] found for parent type [%s]"], ["noParent", "Could not find parent type for %s (%s)"], ["error_expected_source_files", "%s: Expected source files for type '%s'"], ["error_failed_convert", "Component conversion failed: %s"], ["error_merge_metadata_target_unsupported", "Merge convert for metadata target format currently unsupported"], ["error_missing_adapter", "Missing adapter '%s' for metadata type '%s'"], ["error_missing_transformer", "Missing transformer '%s' for metadata type '%s'"], ["error_missing_type_definition", "Missing metadata type definition in registry for id '%s'."], ["error_missing_child_type_definition", "Type %s does not have a child type definition %s."], ["noChildTypes", "No child types found in registry for %s (reading %s at %s)"], ["error_no_metadata_xml_ignore", "Metadata xml file %s is forceignored but is required for %s."], ["noSourceIgnore", "%s metadata types require source files, but %s is forceignored."], ["noSourceIgnore.actions", "- Metadata types with content are composed of two files: a content file (ie MyApexClass.cls) and a -meta.xml file (i.e MyApexClass.cls-meta.xml). You must include both files in your .forceignore file. Or try appending \u201C\\*\u201D to your existing .forceignore entry.\n\nSee <https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_exclude_source.htm> for examples"], ["error_path_not_found", "%s: File or folder not found"], ["noContentFound", "SourceComponent %s (metadata type = %s) is missing its content file."], ["noContentFound.actions", ["Ensure the content file exists in the expected location.", "If the content file is in your .forceignore file, ensure the meta-xml file is also ignored to completely exclude it."]], ["error_parsing_xml", "SourceComponent %s (metadata type = %s) does not have an associated metadata xml to parse"], ["error_expected_file_path", "%s: path is to a directory, expected a file"], ["error_expected_directory_path", "%s: path is to a file, expected a directory"], ["error_directory_not_found_or_not_directory", "%s: path is not a directory"], ["error_no_directory_stream", "%s doesn't support readable streams on directories."], ["error_no_source_to_deploy", "No source-backed components present in the package."], ["error_no_components_to_retrieve", "No components in the package to retrieve."], ["error_static_resource_expected_archive_type", "A StaticResource directory must have a content type of application/zip or application/jar - found %s for %s."], ["error_static_resource_missing_resource_file", "A StaticResource must have an associated .resource file, missing %s.resource-meta.xml"], ["error_no_job_id", "The %s operation is missing a job ID. Initialize an operation with an ID, or start a new job."], ["missingApiVersion", "Could not determine an API version to use for the generated manifest. Tried looking for sourceApiVersion in sfdx-project.json, apiVersion from config vars, and the highest apiVersion from the APEX REST endpoint. Using API version 58.0 as a last resort."], ["invalid_xml_parsing", "error parsing %s due to:\\n message: %s\\n line: %s\\n code: %s"], ["zipBufferError", "Zip buffer was not created during conversion"], ["undefinedComponentSet", "Unable to construct a componentSet. Check the logs for more information."], ["replacementsFileNotRead", "The file \"%s\" specified in the \"replacements\" property of sfdx-project.json could not be read."], ["unsupportedBundleType", "Unsupported Bundle Type: %s"], ["filePathGeneratorNoTypeSupport", "Type not supported for filepath generation: %s"], ["missingFolderType", "The registry has %s as is inFolder but it does not have a folderType"], ["tooManyFiles", "Multiple files found for path: %s."], ["cantGetName", "Unable to calculate fullName from path: %s (%s)"], ["missingMetaFileSuffix", "The metadata registry is configured incorrectly for %s. Expected a metaFileSuffix."], ["uniqueIdElementNotInRegistry", "No uniqueIdElement found in registry for %s (reading %s at %s)."], ["uniqueIdElementNotInChild", "The uniqueIdElement %s was not found the child (reading %s at %s)."], ["suggest_type_header", "A metadata type lookup for \"%s\" found the following close matches:"], ["suggest_type_did_you_mean", "-- Did you mean \".%s%s\" instead for the \"%s\" metadata type?"], ["suggest_type_more_suggestions", "Additional suggestions:\nConfirm the file name, extension, and directory names are correct. Validate against the registry at:\n<https://github.com/forcedotcom/source-deploy-retrieve/blob/main/src/registry/metadataRegistry.json>\n\nIf the type is not listed in the registry, check that it has Metadata API support via the Metadata Coverage Report:\n<https://developer.salesforce.com/docs/metadata-coverage>\n\nIf the type is available via Metadata API but not in the registry\n\n- Open an issue <https://github.com/forcedotcom/cli/issues>\n- Add the type via PR. Instructions: <https://github.com/forcedotcom/source-deploy-retrieve/blob/main/contributing/metadata.md>"], ["type_name_suggestions", "Confirm the metadata type name is correct. Validate against the registry at:\n<https://github.com/forcedotcom/source-deploy-retrieve/blob/main/src/registry/metadataRegistry.json>\n\nIf the type is not listed in the registry, check that it has Metadata API support via the Metadata Coverage Report:\n<https://developer.salesforce.com/docs/metadata-coverage>\n\nIf the type is available via Metadata API but not in the registry\n\n- Open an issue <https://github.com/forcedotcom/cli/issues>\n- Add the type via PR. Instructions: <https://github.com/forcedotcom/source-deploy-retrieve/blob/main/contributing/metadata.md>"]]));
70
70
  throw messages.createError('error_parsing_xml', [component.fullName, component.type.name]);
71
71
  }
72
72
  let xmlDestination = component.getPackageRelativePath(component.xml, targetFormat);
@@ -1 +1 @@
1
- {"version":3,"file":"defaultMetadataTransformer.js","sourceRoot":"","sources":["../../../../src/convert/transformers/defaultMetadataTransformer.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,yCAAoD;AACpD,wDAAqD;AACrD,0DAAuD;AAEvD,sDAAyD;AAGzD,2CAAsD;AACtD,kDAAkE;AAClE,uEAAoE;AAEpE,MAAM,qBAAqB,GAAG,IAAI,MAAM,CAAC,iBAAiB,GAAG,2BAAe,GAAG,IAAI,CAAC,CAAC;AAErF;;;;;;GAMG;AACH,MAAa,0BAA2B,SAAQ,iDAAuB;IACrE,oFAAoF;IAC7E,KAAK,CAAC,gBAAgB,CAAC,SAA0B;QACtD,OAAO,aAAa,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;IAC9C,CAAC;IAED,oFAAoF;IAC7E,KAAK,CAAC,cAAc,CAAC,SAA0B,EAAE,SAA2B;QACjF,OAAO,aAAa,CAAC,SAAS,EAAE,QAAQ,EAAE,SAAS,CAAC,CAAC;IACvD,CAAC;CACF;AAVD,gEAUC;AAED,MAAM,aAAa,GAAG,CACpB,SAA0B,EAC1B,YAA4B,EAC5B,SAA2B,EACd,EAAE,CACf,SAAS;KACN,WAAW,EAAE;KACb,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;IACd,MAAM,EAAE,IAAA,8CAA+B,EAAC,SAAS,EAAE,IAAI,CAAC;IACxD,MAAM,EAAE,2BAA2B,CAAC,IAAI,EAAE,YAAY,EAA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C,CAAC;IACH,CAAC;SAAM,IAAI,MAAM,EAAE,CAAC;QAClB,IAAI,SAAS,CAAC,IAAI,CAAC,IAAI,KAAK,UAAU,IAAI,YAAY,KAAK,UAAU,IAAI,SAAS,CAAC,OAAO,EAAE,CAAC;YAC3F,cAAc,GAAG,cAAc,CAAC,OAAO,CACrC,IAAI,MAAM,CAAC,GAAG,GAAG,MAAM,GAAG,2BAAe,GAAG,GAAG,CAAC,EAChD,GAAG,GAAG,IAAA,cAAO,EAAC,SAAS,CAAC,OAAO,CAAC,GAAG,2BAAe,CACnD,CAAC;QACJ,CAAC;aAAM,CAAC;YACN,cAAc,GAAG,cAAc,CAAC,OAAO,CAAC,qBAAqB,EAAE,GAAG,GAAG,MAAM,GAAG,2BAAe,CAAC,CAAC;QACjG,CAAC;IACH,CAAC;IACD,IAAI,YAAY,IAAI,MAAM,IAAI,cAAc,CAAC,QAAQ,CAAC,YAAY,CAAC,EAAE,CAAC;QACpE,KAAK,qBAAS,CAAC,WAAW,EAAE,CAAC,WAAW,CACtC,OAAO,SAAS,CAAC,IAAI,CAAC,IAAI,cAAc,SAAS,CAAC,QAAQ,2BAA2B,YAAY,sEAAsE,CACxK,CAAC;QACF,cAAc,GAAG,cAAc,CAAC,OAAO,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC;IAChE,CAAC;IACD,OAAO,cAAc,CAAC;AACxB,CAAC,CAAC"}
1
+ {"version":3,"file":"defaultMetadataTransformer.js","sourceRoot":"","sources":["../../../../src/convert/transformers/defaultMetadataTransformer.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,yCAAoD;AACpD,wDAAqD;AACrD,0DAAuD;AAEvD,sDAAyD;AAGzD,2CAAsD;AACtD,kDAAkE;AAClE,uEAAoE;AAEpE,MAAM,qBAAqB,GAAG,IAAI,MAAM,CAAC,iBAAiB,GAAG,2BAAe,GAAG,IAAI,CAAC,CAAC;AAErF;;;;;;GAMG;AACH,MAAa,0BAA2B,SAAQ,iDAAuB;I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AAI,cAAc,SAAS,CAAC,QAAQ,2BAA2B,YAAY,sEAAsE,CACxK,CAAC;QACF,cAAc,GAAG,cAAc,CAAC,OAAO,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC;IAChE,CAAC;IACD,OAAO,cAAc,CAAC;AACxB,CAAC,CAAC"}
@@ -14,8 +14,10 @@ const decomposedMetadataTransformer_1 = require("./decomposedMetadataTransformer
14
14
  const staticResourceMetadataTransformer_1 = require("./staticResourceMetadataTransformer");
15
15
  const nonDecomposedMetadataTransformer_1 = require("./nonDecomposedMetadataTransformer");
16
16
  ;
17
- const messages = new core_1.Messages('@salesforce/source-deploy-retrieve', 'sdr', new Map([["md_request_fail", "Metadata API request failed: %s"], ["error_convert_invalid_format", "Invalid conversion format '%s'"], ["error_could_not_infer_type", "%s: Could not infer a metadata type"], ["error_unexpected_child_type", "Unexpected child metadata [%s] found for parent type [%s]"], ["noParent", "Could not find parent type for %s (%s)"], ["error_expected_source_files", "%s: Expected source files for type '%s'"], ["error_failed_convert", "Component conversion failed: %s"], ["error_merge_metadata_target_unsupported", "Merge convert for metadata target format currently unsupported"], ["error_missing_adapter", "Missing adapter '%s' for metadata type '%s'"], ["error_missing_transformer", "Missing transformer '%s' for metadata type '%s'"], ["error_missing_type_definition", "Missing metadata type definition in registry for id '%s'."], ["error_missing_child_type_definition", "Type %s does not have a child type definition %s."], ["noChildTypes", "No child types found in registry for %s (reading %s at %s)"], ["error_no_metadata_xml_ignore", "Metadata xml file %s is forceignored but is required for %s."], ["noSourceIgnore", "%s metadata types require source files, but %s is forceignored."], ["noSourceIgnore.actions", "- Metadata types with content are composed of two files: a content file (ie MyApexClass.cls) and a -meta.xml file (i.e MyApexClass.cls-meta.xml). You must include both files in your .forceignore file. Or try appending \u201C\\*\u201D to your existing .forceignore entry.\n\nSee <https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_exclude_source.htm> for examples"], ["error_path_not_found", "%s: File or folder not found"], ["noContentFound", "SourceComponent %s (metadata type = %s) is missing its content file."], ["noContentFound.actions", ["Ensure the content file exists in the expected location.", "If the content file is in your .forceignore file, ensure the meta-xml file is also ignored to completely exclude it."]], ["error_parsing_xml", "SourceComponent %s (metadata type = %s) does not have an associated metadata xml to parse"], ["error_expected_file_path", "%s: path is to a directory, expected a file"], ["error_expected_directory_path", "%s: path is to a file, expected a directory"], ["error_directory_not_found_or_not_directory", "%s: path is not a directory"], ["error_no_directory_stream", "%s doesn't support readable streams on directories."], ["error_no_source_to_deploy", "No source-backed components present in the package."], ["error_no_components_to_retrieve", "No components in the package to retrieve."], ["error_static_resource_expected_archive_type", "A StaticResource directory must have a content type of application/zip or application/jar - found %s for %s."], ["error_static_resource_missing_resource_file", "A StaticResource must have an associated .resource file, missing %s.resource-meta.xml"], ["error_no_job_id", "The %s operation is missing a job ID. Initialize an operation with an ID, or start a new job."], ["missingApiVersion", "Could not determine an API version to use for the generated manifest. Tried looking for sourceApiVersion in sfdx-project.json, apiVersion from config vars, and the highest apiVersion from the APEX REST endpoint. Using API version 58.0 as a last resort."], ["invalid_xml_parsing", "error parsing %s due to:\\n message: %s\\n line: %s\\n code: %s"], ["zipBufferError", "Zip buffer was not created during conversion"], ["undefinedComponentSet", "Unable to construct a componentSet. Check the logs for more information."], ["replacementsFileNotRead", "The file \"%s\" specified in the \"replacements\" property of sfdx-project.json could not be read."], ["unsupportedBundleType", "Unsupported Bundle Type: %s"], ["filePathGeneratorNoTypeSupport", "Type not supported for filepath generation: %s"], ["missingFolderType", "The registry has %s as is inFolder but it does not have a folderType"], ["tooManyFiles", "Multiple files found for path: %s."], ["cantGetName", "Unable to calculate fullName from path: %s (%s)"], ["missingMetaFileSuffix", "The metadata registry is configured incorrectly for %s. Expected a metaFileSuffix."], ["uniqueIdElementNotInRegistry", "No uniqueIdElement found in registry for %s (reading %s at %s)."], ["uniqueIdElementNotInChild", "The uniqueIdElement %s was not found the child (reading %s at %s)."], ["suggest_type_header", "A metadata type lookup for \"%s\" found the following close matches:"], ["suggest_type_did_you_mean", "-- Did you mean \".%s%s\" instead for the \"%s\" metadata type?"], ["suggest_type_more_suggestions", "Additional suggestions:\nConfirm the file name, extension, and directory names are correct. Validate against the registry at:\n<https://github.com/forcedotcom/source-deploy-retrieve/blob/main/src/registry/metadataRegistry.json>\n\nIf the type is not listed in the registry, check that it has Metadata API support via the Metadata Coverage Report:\n<https://developer.salesforce.com/docs/metadata-coverage>\n\nIf the type is available via Metadata API but not in the registry\n\n- Open an issue <https://github.com/forcedotcom/cli/issues>\n- Add the type via PR. Instructions: <https://github.com/forcedotcom/source-deploy-retrieve/blob/main/contributing/metadata.md>"]]));
17
+ const messages = new core_1.Messages('@salesforce/source-deploy-retrieve', 'sdr', new Map([["md_request_fail", "Metadata API request failed: %s"], ["error_convert_invalid_format", "Invalid conversion format '%s'"], ["error_could_not_infer_type", "%s: Could not infer a metadata type"], ["error_unexpected_child_type", "Unexpected child metadata [%s] found for parent type [%s]"], ["noParent", "Could not find parent type for %s (%s)"], ["error_expected_source_files", "%s: Expected source files for type '%s'"], ["error_failed_convert", "Component conversion failed: %s"], ["error_merge_metadata_target_unsupported", "Merge convert for metadata target format currently unsupported"], ["error_missing_adapter", "Missing adapter '%s' for metadata type '%s'"], ["error_missing_transformer", "Missing transformer '%s' for metadata type '%s'"], ["error_missing_type_definition", "Missing metadata type definition in registry for id '%s'."], ["error_missing_child_type_definition", "Type %s does not have a child type definition %s."], ["noChildTypes", "No child types found in registry for %s (reading %s at %s)"], ["error_no_metadata_xml_ignore", "Metadata xml file %s is forceignored but is required for %s."], ["noSourceIgnore", "%s metadata types require source files, but %s is forceignored."], ["noSourceIgnore.actions", "- Metadata types with content are composed of two files: a content file (ie MyApexClass.cls) and a -meta.xml file (i.e MyApexClass.cls-meta.xml). You must include both files in your .forceignore file. Or try appending \u201C\\*\u201D to your existing .forceignore entry.\n\nSee <https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_exclude_source.htm> for examples"], ["error_path_not_found", "%s: File or folder not found"], ["noContentFound", "SourceComponent %s (metadata type = %s) is missing its content file."], ["noContentFound.actions", ["Ensure the content file exists in the expected location.", "If the content file is in your .forceignore file, ensure the meta-xml file is also ignored to completely exclude it."]], ["error_parsing_xml", "SourceComponent %s (metadata type = %s) does not have an associated metadata xml to parse"], ["error_expected_file_path", "%s: path is to a directory, expected a file"], ["error_expected_directory_path", "%s: path is to a file, expected a directory"], ["error_directory_not_found_or_not_directory", "%s: path is not a directory"], ["error_no_directory_stream", "%s doesn't support readable streams on directories."], ["error_no_source_to_deploy", "No source-backed components present in the package."], ["error_no_components_to_retrieve", "No components in the package to retrieve."], ["error_static_resource_expected_archive_type", "A StaticResource directory must have a content type of application/zip or application/jar - found %s for %s."], ["error_static_resource_missing_resource_file", "A StaticResource must have an associated .resource file, missing %s.resource-meta.xml"], ["error_no_job_id", "The %s operation is missing a job ID. Initialize an operation with an ID, or start a new job."], ["missingApiVersion", "Could not determine an API version to use for the generated manifest. Tried looking for sourceApiVersion in sfdx-project.json, apiVersion from config vars, and the highest apiVersion from the APEX REST endpoint. Using API version 58.0 as a last resort."], ["invalid_xml_parsing", "error parsing %s due to:\\n message: %s\\n line: %s\\n code: %s"], ["zipBufferError", "Zip buffer was not created during conversion"], ["undefinedComponentSet", "Unable to construct a componentSet. Check the logs for more information."], ["replacementsFileNotRead", "The file \"%s\" specified in the \"replacements\" property of sfdx-project.json could not be read."], ["unsupportedBundleType", "Unsupported Bundle Type: %s"], ["filePathGeneratorNoTypeSupport", "Type not supported for filepath generation: %s"], ["missingFolderType", "The registry has %s as is inFolder but it does not have a folderType"], ["tooManyFiles", "Multiple files found for path: %s."], ["cantGetName", "Unable to calculate fullName from path: %s (%s)"], ["missingMetaFileSuffix", "The metadata registry is configured incorrectly for %s. Expected a metaFileSuffix."], ["uniqueIdElementNotInRegistry", "No uniqueIdElement found in registry for %s (reading %s at %s)."], ["uniqueIdElementNotInChild", "The uniqueIdElement %s was not found the child (reading %s at %s)."], ["suggest_type_header", "A metadata type lookup for \"%s\" found the following close matches:"], ["suggest_type_did_you_mean", "-- Did you mean \".%s%s\" instead for the \"%s\" metadata type?"], ["suggest_type_more_suggestions", "Additional suggestions:\nConfirm the file name, extension, and directory names are correct. Validate against the registry at:\n<https://github.com/forcedotcom/source-deploy-retrieve/blob/main/src/registry/metadataRegistry.json>\n\nIf the type is not listed in the registry, check that it has Metadata API support via the Metadata Coverage Report:\n<https://developer.salesforce.com/docs/metadata-coverage>\n\nIf the type is available via Metadata API but not in the registry\n\n- Open an issue <https://github.com/forcedotcom/cli/issues>\n- Add the type via PR. Instructions: <https://github.com/forcedotcom/source-deploy-retrieve/blob/main/contributing/metadata.md>"], ["type_name_suggestions", "Confirm the metadata type name is correct. Validate against the registry at:\n<https://github.com/forcedotcom/source-deploy-retrieve/blob/main/src/registry/metadataRegistry.json>\n\nIf the type is not listed in the registry, check that it has Metadata API support via the Metadata Coverage Report:\n<https://developer.salesforce.com/docs/metadata-coverage>\n\nIf the type is available via Metadata API but not in the registry\n\n- Open an issue <https://github.com/forcedotcom/cli/issues>\n- Add the type via PR. Instructions: <https://github.com/forcedotcom/source-deploy-retrieve/blob/main/contributing/metadata.md>"]]));
18
18
  class MetadataTransformerFactory {
19
+ registry;
20
+ context;
19
21
  constructor(registry, context = new convertContext_1.ConvertContext()) {
20
22
  this.registry = registry;
21
23
  this.context = context;
@@ -1 +1 @@
1
- {"version":3,"file":"metadataTransformerFactory.js","sourceRoot":"","sources":["../../../../src/convert/transformers/metadataTransformerFactory.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,2CAA4C;AAG5C,qEAAkE;AAGlE,6EAA0E;AAC1E,mFAAgF;AAChF,2FAAwF;AACxF,yFAAsF;;AAGtF,MAAM,QAAQ,OAAG,eAAQ,CAAc,oCAAoC,EAAE,KAAK,6pKAAC,CAAC;AAEpF,MAAa,0BAA0B;IAIrC,YAAmB,QAAwB,EAAE,OAAO,GAAG,IAAI,+BAAc,EAAE;QACzE,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;IAEM,cAAc,CAAC,SAA0B;QAC9C,oEAAoE;QACpE,MAAM,IAAI,GAAG,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC;QACvE,MAAM,aAAa,GAAG,IAAI,CAAC,UAAU,EAAE,WAAW,CAAC;QACnD,QAAQ,aAAa,EAAE,CAAC;YACtB,mDAAkC;YAClC,KAAK,SAAS;gBACZ,OAAO,IAAI,uDAA0B,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;YACrE;gBACE,OAAO,IAAI,6DAA6B,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;YACxE;gBACE,OAAO,IAAI,qEAAiC,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;YAC5E;gBACE,OAAO,IAAI,mEAAgC,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;YAC3E;gBACE,MAAM,QAAQ,CAAC,WAAW,CAAC,2BAA2B,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,aAAa,CAAC,CAAC,CAAC;QACxF,CAAC;IACH,CAAC;CACF;AA3BD,gEA2BC"}
1
+ {"version":3,"file":"metadataTransformerFactory.js","sourceRoot":"","sources":["../../../../src/convert/transformers/metadataTransformerFactory.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,2CAA4C;AAG5C,qEAAkE;AAGlE,6EAA0E;AAC1E,mFAAgF;AAChF,2FAAwF;AACxF,yFAAsF;;AAGtF,MAAM,QAAQ,OAAG,eAAQ,CAAc,oCAAoC,EAAE,KAAK,qyLAAC,CAAC;AAEpF,MAAa,0BAA0B;IAC7B,QAAQ,CAAiB;IACzB,OAAO,CAAiB;IAEhC,YAAmB,QAAwB,EAAE,OAAO,GAAG,IAAI,+BAAc,EAAE;QACzE,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;IAEM,cAAc,CAAC,SAA0B;QAC9C,oEAAoE;QACpE,MAAM,IAAI,GAAG,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC;QACvE,MAAM,aAAa,GAAG,IAAI,CAAC,UAAU,EAAE,WAAW,CAAC;QACnD,QAAQ,aAAa,EAAE,CAAC;YACtB,mDAAkC;YAClC,KAAK,SAAS;gBACZ,OAAO,IAAI,uDAA0B,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;YACrE;gBACE,OAAO,IAAI,6DAA6B,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;YACxE;gBACE,OAAO,IAAI,qEAAiC,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;YAC5E;gBACE,OAAO,IAAI,mEAAgC,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;YAC3E;gBACE,MAAM,QAAQ,CAAC,WAAW,CAAC,2BAA2B,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,aAAa,CAAC,CAAC,CAAC;QACxF,CAAC;IACH,CAAC;CACF;AA3BD,gEA2BC"}
@@ -12,7 +12,7 @@ const kit_1 = require("@salesforce/kit");
12
12
  const core_1 = require("@salesforce/core");
13
13
  const decomposedMetadataTransformer_1 = require("./decomposedMetadataTransformer");
14
14
  ;
15
- const messages = new core_1.Messages('@salesforce/source-deploy-retrieve', 'sdr', new Map([["md_request_fail", "Metadata API request failed: %s"], ["error_convert_invalid_format", "Invalid conversion format '%s'"], ["error_could_not_infer_type", "%s: Could not infer a metadata type"], ["error_unexpected_child_type", "Unexpected child metadata [%s] found for parent type [%s]"], ["noParent", "Could not find parent type for %s (%s)"], ["error_expected_source_files", "%s: Expected source files for type '%s'"], ["error_failed_convert", "Component conversion failed: %s"], ["error_merge_metadata_target_unsupported", "Merge convert for metadata target format currently unsupported"], ["error_missing_adapter", "Missing adapter '%s' for metadata type '%s'"], ["error_missing_transformer", "Missing transformer '%s' for metadata type '%s'"], ["error_missing_type_definition", "Missing metadata type definition in registry for id '%s'."], ["error_missing_child_type_definition", "Type %s does not have a child type definition %s."], ["noChildTypes", "No child types found in registry for %s (reading %s at %s)"], ["error_no_metadata_xml_ignore", "Metadata xml file %s is forceignored but is required for %s."], ["noSourceIgnore", "%s metadata types require source files, but %s is forceignored."], ["noSourceIgnore.actions", "- Metadata types with content are composed of two files: a content file (ie MyApexClass.cls) and a -meta.xml file (i.e MyApexClass.cls-meta.xml). You must include both files in your .forceignore file. Or try appending \u201C\\*\u201D to your existing .forceignore entry.\n\nSee <https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_exclude_source.htm> for examples"], ["error_path_not_found", "%s: File or folder not found"], ["noContentFound", "SourceComponent %s (metadata type = %s) is missing its content file."], ["noContentFound.actions", ["Ensure the content file exists in the expected location.", "If the content file is in your .forceignore file, ensure the meta-xml file is also ignored to completely exclude it."]], ["error_parsing_xml", "SourceComponent %s (metadata type = %s) does not have an associated metadata xml to parse"], ["error_expected_file_path", "%s: path is to a directory, expected a file"], ["error_expected_directory_path", "%s: path is to a file, expected a directory"], ["error_directory_not_found_or_not_directory", "%s: path is not a directory"], ["error_no_directory_stream", "%s doesn't support readable streams on directories."], ["error_no_source_to_deploy", "No source-backed components present in the package."], ["error_no_components_to_retrieve", "No components in the package to retrieve."], ["error_static_resource_expected_archive_type", "A StaticResource directory must have a content type of application/zip or application/jar - found %s for %s."], ["error_static_resource_missing_resource_file", "A StaticResource must have an associated .resource file, missing %s.resource-meta.xml"], ["error_no_job_id", "The %s operation is missing a job ID. Initialize an operation with an ID, or start a new job."], ["missingApiVersion", "Could not determine an API version to use for the generated manifest. Tried looking for sourceApiVersion in sfdx-project.json, apiVersion from config vars, and the highest apiVersion from the APEX REST endpoint. Using API version 58.0 as a last resort."], ["invalid_xml_parsing", "error parsing %s due to:\\n message: %s\\n line: %s\\n code: %s"], ["zipBufferError", "Zip buffer was not created during conversion"], ["undefinedComponentSet", "Unable to construct a componentSet. Check the logs for more information."], ["replacementsFileNotRead", "The file \"%s\" specified in the \"replacements\" property of sfdx-project.json could not be read."], ["unsupportedBundleType", "Unsupported Bundle Type: %s"], ["filePathGeneratorNoTypeSupport", "Type not supported for filepath generation: %s"], ["missingFolderType", "The registry has %s as is inFolder but it does not have a folderType"], ["tooManyFiles", "Multiple files found for path: %s."], ["cantGetName", "Unable to calculate fullName from path: %s (%s)"], ["missingMetaFileSuffix", "The metadata registry is configured incorrectly for %s. Expected a metaFileSuffix."], ["uniqueIdElementNotInRegistry", "No uniqueIdElement found in registry for %s (reading %s at %s)."], ["uniqueIdElementNotInChild", "The uniqueIdElement %s was not found the child (reading %s at %s)."], ["suggest_type_header", "A metadata type lookup for \"%s\" found the following close matches:"], ["suggest_type_did_you_mean", "-- Did you mean \".%s%s\" instead for the \"%s\" metadata type?"], ["suggest_type_more_suggestions", "Additional suggestions:\nConfirm the file name, extension, and directory names are correct. Validate against the registry at:\n<https://github.com/forcedotcom/source-deploy-retrieve/blob/main/src/registry/metadataRegistry.json>\n\nIf the type is not listed in the registry, check that it has Metadata API support via the Metadata Coverage Report:\n<https://developer.salesforce.com/docs/metadata-coverage>\n\nIf the type is available via Metadata API but not in the registry\n\n- Open an issue <https://github.com/forcedotcom/cli/issues>\n- Add the type via PR. Instructions: <https://github.com/forcedotcom/source-deploy-retrieve/blob/main/contributing/metadata.md>"]]));
15
+ const messages = new core_1.Messages('@salesforce/source-deploy-retrieve', 'sdr', new Map([["md_request_fail", "Metadata API request failed: %s"], ["error_convert_invalid_format", "Invalid conversion format '%s'"], ["error_could_not_infer_type", "%s: Could not infer a metadata type"], ["error_unexpected_child_type", "Unexpected child metadata [%s] found for parent type [%s]"], ["noParent", "Could not find parent type for %s (%s)"], ["error_expected_source_files", "%s: Expected source files for type '%s'"], ["error_failed_convert", "Component conversion failed: %s"], ["error_merge_metadata_target_unsupported", "Merge convert for metadata target format currently unsupported"], ["error_missing_adapter", "Missing adapter '%s' for metadata type '%s'"], ["error_missing_transformer", "Missing transformer '%s' for metadata type '%s'"], ["error_missing_type_definition", "Missing metadata type definition in registry for id '%s'."], ["error_missing_child_type_definition", "Type %s does not have a child type definition %s."], ["noChildTypes", "No child types found in registry for %s (reading %s at %s)"], ["error_no_metadata_xml_ignore", "Metadata xml file %s is forceignored but is required for %s."], ["noSourceIgnore", "%s metadata types require source files, but %s is forceignored."], ["noSourceIgnore.actions", "- Metadata types with content are composed of two files: a content file (ie MyApexClass.cls) and a -meta.xml file (i.e MyApexClass.cls-meta.xml). You must include both files in your .forceignore file. Or try appending \u201C\\*\u201D to your existing .forceignore entry.\n\nSee <https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_exclude_source.htm> for examples"], ["error_path_not_found", "%s: File or folder not found"], ["noContentFound", "SourceComponent %s (metadata type = %s) is missing its content file."], ["noContentFound.actions", ["Ensure the content file exists in the expected location.", "If the content file is in your .forceignore file, ensure the meta-xml file is also ignored to completely exclude it."]], ["error_parsing_xml", "SourceComponent %s (metadata type = %s) does not have an associated metadata xml to parse"], ["error_expected_file_path", "%s: path is to a directory, expected a file"], ["error_expected_directory_path", "%s: path is to a file, expected a directory"], ["error_directory_not_found_or_not_directory", "%s: path is not a directory"], ["error_no_directory_stream", "%s doesn't support readable streams on directories."], ["error_no_source_to_deploy", "No source-backed components present in the package."], ["error_no_components_to_retrieve", "No components in the package to retrieve."], ["error_static_resource_expected_archive_type", "A StaticResource directory must have a content type of application/zip or application/jar - found %s for %s."], ["error_static_resource_missing_resource_file", "A StaticResource must have an associated .resource file, missing %s.resource-meta.xml"], ["error_no_job_id", "The %s operation is missing a job ID. Initialize an operation with an ID, or start a new job."], ["missingApiVersion", "Could not determine an API version to use for the generated manifest. Tried looking for sourceApiVersion in sfdx-project.json, apiVersion from config vars, and the highest apiVersion from the APEX REST endpoint. Using API version 58.0 as a last resort."], ["invalid_xml_parsing", "error parsing %s due to:\\n message: %s\\n line: %s\\n code: %s"], ["zipBufferError", "Zip buffer was not created during conversion"], ["undefinedComponentSet", "Unable to construct a componentSet. Check the logs for more information."], ["replacementsFileNotRead", "The file \"%s\" specified in the \"replacements\" property of sfdx-project.json could not be read."], ["unsupportedBundleType", "Unsupported Bundle Type: %s"], ["filePathGeneratorNoTypeSupport", "Type not supported for filepath generation: %s"], ["missingFolderType", "The registry has %s as is inFolder but it does not have a folderType"], ["tooManyFiles", "Multiple files found for path: %s."], ["cantGetName", "Unable to calculate fullName from path: %s (%s)"], ["missingMetaFileSuffix", "The metadata registry is configured incorrectly for %s. Expected a metaFileSuffix."], ["uniqueIdElementNotInRegistry", "No uniqueIdElement found in registry for %s (reading %s at %s)."], ["uniqueIdElementNotInChild", "The uniqueIdElement %s was not found the child (reading %s at %s)."], ["suggest_type_header", "A metadata type lookup for \"%s\" found the following close matches:"], ["suggest_type_did_you_mean", "-- Did you mean \".%s%s\" instead for the \"%s\" metadata type?"], ["suggest_type_more_suggestions", "Additional suggestions:\nConfirm the file name, extension, and directory names are correct. Validate against the registry at:\n<https://github.com/forcedotcom/source-deploy-retrieve/blob/main/src/registry/metadataRegistry.json>\n\nIf the type is not listed in the registry, check that it has Metadata API support via the Metadata Coverage Report:\n<https://developer.salesforce.com/docs/metadata-coverage>\n\nIf the type is available via Metadata API but not in the registry\n\n- Open an issue <https://github.com/forcedotcom/cli/issues>\n- Add the type via PR. Instructions: <https://github.com/forcedotcom/source-deploy-retrieve/blob/main/contributing/metadata.md>"], ["type_name_suggestions", "Confirm the metadata type name is correct. Validate against the registry at:\n<https://github.com/forcedotcom/source-deploy-retrieve/blob/main/src/registry/metadataRegistry.json>\n\nIf the type is not listed in the registry, check that it has Metadata API support via the Metadata Coverage Report:\n<https://developer.salesforce.com/docs/metadata-coverage>\n\nIf the type is available via Metadata API but not in the registry\n\n- Open an issue <https://github.com/forcedotcom/cli/issues>\n- Add the type via PR. Instructions: <https://github.com/forcedotcom/source-deploy-retrieve/blob/main/contributing/metadata.md>"]]));
16
16
  /**
17
17
  * Metadata Transformer for metadata types with children types that are NOT decomposed into separate files.
18
18
  *
@@ -1 +1 @@
1
- {"version":3,"file":"nonDecomposedMetadataTransformer.js","sourceRoot":"","sources":["../../../../src/convert/transformers/nonDecomposedMetadataTransformer.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,mDAA+D;AAC/D,yCAA8C;AAC9C,2CAA4C;AAG5C,mFAAgF;;AAEhF,MAAM,QAAQ,OAAG,eAAQ,CAAc,oCAAoC,EAAE,KAAK,6pKAAC,CAAC;AACpF;;;;;GAKG;AACH,MAAa,gCAAiC,SAAQ,6DAA6B;IACjF,+EAA+E;IAC/E,6DAA6D;IACtD,KAAK,CAAC,cAAc,CAAC,SAA0B,EAAE,SAA2B;QACjF,6EAA6E;QAC7E,MAAM,SAAS,GAAG,MAAM,SAAS,CAAC,QAAQ,EAAE,CAAC;QAC7C,MAAM,iBAAiB,GAAG,GAAG,SAAS,CAAC,IAAI,CAAC,IAAI,IAAI,SAAS,CAAC,IAAI,CAAC,aAAa,EAAE,CAAC;QACnF,MAAM,mBAAmB,GAAG,IAAA,iBAAW,EAAC,IAAA,cAAG,EAAC,SAAS,EAAE,iBAAiB,CAAC,CAAc,CAAC;QACxF,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;YAC7B,MAAM,QAAQ,CAAC,WAAW,CAAC,cAAc,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,EAAE,SAAS,CAAC,QAAQ,EAAE,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;QACvG,CAAC;QACD,mCAAmC;QACnC,MAAM,CAAC,WAAW,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;QACjE,MAAM,EAAE,eAAe,EAAE,GAAG,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;QACvE,IAAI,CAAC,eAAe,EAAE,CAAC;YACrB,MAAM,QAAQ,CAAC,WAAW,CAAC,8BAA8B,EAAE;gBACzD,SAAS,CAAC,IAAI,CAAC,IAAI;gBACnB,SAAS,CAAC,QAAQ;gBAClB,SAAS,CAAC,GAAG;aACd,CAAC,CAAC;QACL,CAAC;QAED,IAAI,CAAC,OAAO,CAAC,gBAAgB,CAAC,gBAAgB,CAAC,gBAAgB,KAAK,SAAS,CAAC;QAE9E,mBAAmB,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE;YAChC,MAAM,SAAS,GAAG,IAAA,oBAAS,EAAC,KAAK,EAAE,eAAe,CAAC,CAAC;YACpD,IAAI,CAAC,SAAS,EAAE,CAAC;gBACf,MAAM,QAAQ,CAAC,WAAW,CAAC,2BAA2B,EAAE,CAAC,eAAe,EAAE,SAAS,CAAC,QAAQ,EAAE,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;YAChH,CAAC;YACD,IAAI,CAAC,OAAO,CAAC,gBAAgB,CAAC,gBAAgB,CAAC,uBAAuB,CAAC,GAAG,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;QAC/F,CAAC,CAAC,CAAC;QAEH,OAAO,EAAE,CAAC;IACZ,CAAC;CACF;AAlCD,4EAkCC"}
1
+ {"version":3,"file":"nonDecomposedMetadataTransformer.js","sourceRoot":"","sources":["../../../../src/convert/transformers/nonDecomposedMetadataTransformer.ts"],"names":[],"mappings":";AAAA;;;;;GAKG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,IAAI,CAAC,OAAO,CAAC,gBAAgB,CAAC,gBAAgB,CAAC,gBAAgB,KAAK,SAAS,CAAC;QAE9E,mBAAmB,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE;YAChC,MAAM,SAAS,GAAG,IAAA,oBAAS,EAAC,KAAK,EAAE,eAAe,CAAC,CAAC;YACpD,IAAI,CAAC,SAAS,EAAE,CAAC;gBACf,MAAM,QAAQ,CAAC,WAAW,CAAC,2BAA2B,EAAE,CAAC,eAAe,EAAE,SAAS,CAAC,QAAQ,EAAE,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;YAChH,CAAC;YACD,IAAI,CAAC,OAAO,CAAC,gBAAgB,CAAC,gBAAgB,CAAC,uBAAuB,CAAC,GAAG,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;QAC/F,CAAC,CAAC,CAAC;QAEH,OAAO,EAAE,CAAC;IACZ,CAAC;CACF;AAlCD,4EAkCC"}
@@ -23,7 +23,7 @@ const streams_1 = require("../streams");
23
23
  const replacements_1 = require("../replacements");
24
24
  const baseMetadataTransformer_1 = require("./baseMetadataTransformer");
25
25
  ;
26
- const messages = new core_1.Messages('@salesforce/source-deploy-retrieve', 'sdr', new Map([["md_request_fail", "Metadata API request failed: %s"], ["error_convert_invalid_format", "Invalid conversion format '%s'"], ["error_could_not_infer_type", "%s: Could not infer a metadata type"], ["error_unexpected_child_type", "Unexpected child metadata [%s] found for parent type [%s]"], ["noParent", "Could not find parent type for %s (%s)"], ["error_expected_source_files", "%s: Expected source files for type '%s'"], ["error_failed_convert", "Component conversion failed: %s"], ["error_merge_metadata_target_unsupported", "Merge convert for metadata target format currently unsupported"], ["error_missing_adapter", "Missing adapter '%s' for metadata type '%s'"], ["error_missing_transformer", "Missing transformer '%s' for metadata type '%s'"], ["error_missing_type_definition", "Missing metadata type definition in registry for id '%s'."], ["error_missing_child_type_definition", "Type %s does not have a child type definition %s."], ["noChildTypes", "No child types found in registry for %s (reading %s at %s)"], ["error_no_metadata_xml_ignore", "Metadata xml file %s is forceignored but is required for %s."], ["noSourceIgnore", "%s metadata types require source files, but %s is forceignored."], ["noSourceIgnore.actions", "- Metadata types with content are composed of two files: a content file (ie MyApexClass.cls) and a -meta.xml file (i.e MyApexClass.cls-meta.xml). You must include both files in your .forceignore file. Or try appending \u201C\\*\u201D to your existing .forceignore entry.\n\nSee <https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_exclude_source.htm> for examples"], ["error_path_not_found", "%s: File or folder not found"], ["noContentFound", "SourceComponent %s (metadata type = %s) is missing its content file."], ["noContentFound.actions", ["Ensure the content file exists in the expected location.", "If the content file is in your .forceignore file, ensure the meta-xml file is also ignored to completely exclude it."]], ["error_parsing_xml", "SourceComponent %s (metadata type = %s) does not have an associated metadata xml to parse"], ["error_expected_file_path", "%s: path is to a directory, expected a file"], ["error_expected_directory_path", "%s: path is to a file, expected a directory"], ["error_directory_not_found_or_not_directory", "%s: path is not a directory"], ["error_no_directory_stream", "%s doesn't support readable streams on directories."], ["error_no_source_to_deploy", "No source-backed components present in the package."], ["error_no_components_to_retrieve", "No components in the package to retrieve."], ["error_static_resource_expected_archive_type", "A StaticResource directory must have a content type of application/zip or application/jar - found %s for %s."], ["error_static_resource_missing_resource_file", "A StaticResource must have an associated .resource file, missing %s.resource-meta.xml"], ["error_no_job_id", "The %s operation is missing a job ID. Initialize an operation with an ID, or start a new job."], ["missingApiVersion", "Could not determine an API version to use for the generated manifest. Tried looking for sourceApiVersion in sfdx-project.json, apiVersion from config vars, and the highest apiVersion from the APEX REST endpoint. Using API version 58.0 as a last resort."], ["invalid_xml_parsing", "error parsing %s due to:\\n message: %s\\n line: %s\\n code: %s"], ["zipBufferError", "Zip buffer was not created during conversion"], ["undefinedComponentSet", "Unable to construct a componentSet. Check the logs for more information."], ["replacementsFileNotRead", "The file \"%s\" specified in the \"replacements\" property of sfdx-project.json could not be read."], ["unsupportedBundleType", "Unsupported Bundle Type: %s"], ["filePathGeneratorNoTypeSupport", "Type not supported for filepath generation: %s"], ["missingFolderType", "The registry has %s as is inFolder but it does not have a folderType"], ["tooManyFiles", "Multiple files found for path: %s."], ["cantGetName", "Unable to calculate fullName from path: %s (%s)"], ["missingMetaFileSuffix", "The metadata registry is configured incorrectly for %s. Expected a metaFileSuffix."], ["uniqueIdElementNotInRegistry", "No uniqueIdElement found in registry for %s (reading %s at %s)."], ["uniqueIdElementNotInChild", "The uniqueIdElement %s was not found the child (reading %s at %s)."], ["suggest_type_header", "A metadata type lookup for \"%s\" found the following close matches:"], ["suggest_type_did_you_mean", "-- Did you mean \".%s%s\" instead for the \"%s\" metadata type?"], ["suggest_type_more_suggestions", "Additional suggestions:\nConfirm the file name, extension, and directory names are correct. Validate against the registry at:\n<https://github.com/forcedotcom/source-deploy-retrieve/blob/main/src/registry/metadataRegistry.json>\n\nIf the type is not listed in the registry, check that it has Metadata API support via the Metadata Coverage Report:\n<https://developer.salesforce.com/docs/metadata-coverage>\n\nIf the type is available via Metadata API but not in the registry\n\n- Open an issue <https://github.com/forcedotcom/cli/issues>\n- Add the type via PR. Instructions: <https://github.com/forcedotcom/source-deploy-retrieve/blob/main/contributing/metadata.md>"]]));
26
+ const messages = new core_1.Messages('@salesforce/source-deploy-retrieve', 'sdr', new Map([["md_request_fail", "Metadata API request failed: %s"], ["error_convert_invalid_format", "Invalid conversion format '%s'"], ["error_could_not_infer_type", "%s: Could not infer a metadata type"], ["error_unexpected_child_type", "Unexpected child metadata [%s] found for parent type [%s]"], ["noParent", "Could not find parent type for %s (%s)"], ["error_expected_source_files", "%s: Expected source files for type '%s'"], ["error_failed_convert", "Component conversion failed: %s"], ["error_merge_metadata_target_unsupported", "Merge convert for metadata target format currently unsupported"], ["error_missing_adapter", "Missing adapter '%s' for metadata type '%s'"], ["error_missing_transformer", "Missing transformer '%s' for metadata type '%s'"], ["error_missing_type_definition", "Missing metadata type definition in registry for id '%s'."], ["error_missing_child_type_definition", "Type %s does not have a child type definition %s."], ["noChildTypes", "No child types found in registry for %s (reading %s at %s)"], ["error_no_metadata_xml_ignore", "Metadata xml file %s is forceignored but is required for %s."], ["noSourceIgnore", "%s metadata types require source files, but %s is forceignored."], ["noSourceIgnore.actions", "- Metadata types with content are composed of two files: a content file (ie MyApexClass.cls) and a -meta.xml file (i.e MyApexClass.cls-meta.xml). You must include both files in your .forceignore file. Or try appending \u201C\\*\u201D to your existing .forceignore entry.\n\nSee <https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_exclude_source.htm> for examples"], ["error_path_not_found", "%s: File or folder not found"], ["noContentFound", "SourceComponent %s (metadata type = %s) is missing its content file."], ["noContentFound.actions", ["Ensure the content file exists in the expected location.", "If the content file is in your .forceignore file, ensure the meta-xml file is also ignored to completely exclude it."]], ["error_parsing_xml", "SourceComponent %s (metadata type = %s) does not have an associated metadata xml to parse"], ["error_expected_file_path", "%s: path is to a directory, expected a file"], ["error_expected_directory_path", "%s: path is to a file, expected a directory"], ["error_directory_not_found_or_not_directory", "%s: path is not a directory"], ["error_no_directory_stream", "%s doesn't support readable streams on directories."], ["error_no_source_to_deploy", "No source-backed components present in the package."], ["error_no_components_to_retrieve", "No components in the package to retrieve."], ["error_static_resource_expected_archive_type", "A StaticResource directory must have a content type of application/zip or application/jar - found %s for %s."], ["error_static_resource_missing_resource_file", "A StaticResource must have an associated .resource file, missing %s.resource-meta.xml"], ["error_no_job_id", "The %s operation is missing a job ID. Initialize an operation with an ID, or start a new job."], ["missingApiVersion", "Could not determine an API version to use for the generated manifest. Tried looking for sourceApiVersion in sfdx-project.json, apiVersion from config vars, and the highest apiVersion from the APEX REST endpoint. Using API version 58.0 as a last resort."], ["invalid_xml_parsing", "error parsing %s due to:\\n message: %s\\n line: %s\\n code: %s"], ["zipBufferError", "Zip buffer was not created during conversion"], ["undefinedComponentSet", "Unable to construct a componentSet. Check the logs for more information."], ["replacementsFileNotRead", "The file \"%s\" specified in the \"replacements\" property of sfdx-project.json could not be read."], ["unsupportedBundleType", "Unsupported Bundle Type: %s"], ["filePathGeneratorNoTypeSupport", "Type not supported for filepath generation: %s"], ["missingFolderType", "The registry has %s as is inFolder but it does not have a folderType"], ["tooManyFiles", "Multiple files found for path: %s."], ["cantGetName", "Unable to calculate fullName from path: %s (%s)"], ["missingMetaFileSuffix", "The metadata registry is configured incorrectly for %s. Expected a metaFileSuffix."], ["uniqueIdElementNotInRegistry", "No uniqueIdElement found in registry for %s (reading %s at %s)."], ["uniqueIdElementNotInChild", "The uniqueIdElement %s was not found the child (reading %s at %s)."], ["suggest_type_header", "A metadata type lookup for \"%s\" found the following close matches:"], ["suggest_type_did_you_mean", "-- Did you mean \".%s%s\" instead for the \"%s\" metadata type?"], ["suggest_type_more_suggestions", "Additional suggestions:\nConfirm the file name, extension, and directory names are correct. Validate against the registry at:\n<https://github.com/forcedotcom/source-deploy-retrieve/blob/main/src/registry/metadataRegistry.json>\n\nIf the type is not listed in the registry, check that it has Metadata API support via the Metadata Coverage Report:\n<https://developer.salesforce.com/docs/metadata-coverage>\n\nIf the type is available via Metadata API but not in the registry\n\n- Open an issue <https://github.com/forcedotcom/cli/issues>\n- Add the type via PR. Instructions: <https://github.com/forcedotcom/source-deploy-retrieve/blob/main/contributing/metadata.md>"], ["type_name_suggestions", "Confirm the metadata type name is correct. Validate against the registry at:\n<https://github.com/forcedotcom/source-deploy-retrieve/blob/main/src/registry/metadataRegistry.json>\n\nIf the type is not listed in the registry, check that it has Metadata API support via the Metadata Coverage Report:\n<https://developer.salesforce.com/docs/metadata-coverage>\n\nIf the type is available via Metadata API but not in the registry\n\n- Open an issue <https://github.com/forcedotcom/cli/issues>\n- Add the type via PR. Instructions: <https://github.com/forcedotcom/source-deploy-retrieve/blob/main/contributing/metadata.md>"]]));
27
27
  let logger;
28
28
  const getLogger = () => {
29
29
  if (!logger) {
@@ -32,6 +32,11 @@ const getLogger = () => {
32
32
  return logger;
33
33
  };
34
34
  class StaticResourceMetadataTransformer extends baseMetadataTransformer_1.BaseMetadataTransformer {
35
+ static ARCHIVE_MIME_TYPES = new Set([
36
+ 'application/zip',
37
+ 'application/x-zip-compressed',
38
+ 'application/jar',
39
+ ]);
35
40
  // allowed to preserve API
36
41
  // eslint-disable-next-line class-methods-use-this
37
42
  async toMetadataFormat(component) {
@@ -142,11 +147,6 @@ class StaticResourceMetadataTransformer extends baseMetadataTransformer_1.BaseMe
142
147
  }
143
148
  }
144
149
  exports.StaticResourceMetadataTransformer = StaticResourceMetadataTransformer;
145
- StaticResourceMetadataTransformer.ARCHIVE_MIME_TYPES = new Set([
146
- 'application/zip',
147
- 'application/x-zip-compressed',
148
- 'application/jar',
149
- ]);
150
150
  const DEFAULT_CONTENT_TYPE = 'application/octet-stream';
151
151
  const FALLBACK_TYPE_MAP = new Map([
152
152
  ['text/javascript', 'js'],
@@ -1 +1 @@
1
- {"version":3,"file":"staticResourceMetadataTransformer.js","sourceRoot":"","sources":["../../../../src/convert/transformers/staticResourceMetadataTransformer.ts"],"names":[],"mappings":";;;;;;AAAA;;;;;GAKG;AACH,yCAA0E;AAC1E,6CAAuC;AACvC,kDAA0B;AAC1B,+BAAoC;AAEpC,6CAAgD;AAChD,2CAA6D;AAC7D,yCAA0C;AAC1C,2CAA4C;AAI5C,qEAAiE;AACjE,wCAAsC;AACtC,kDAAkE;AAClE,uEAAoE;;AAGpE,MAAM,QAAQ,OAAG,eAAQ,CAAc,oCAAoC,EAAE,KAAK,6pKAAC,CAAC;AAEpF,IAAI,MAAc,CAAC;AACnB,MAAM,SAAS,GAAG,GAAW,EAAE;IAC7B,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,MAAM,GAAG,aAAM,CAAC,aAAa,CAAC,mCAAmC,CAAC,CAAC;IACrE,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC;AAEF,MAAa,iCAAkC,SAAQ,iDAAuB;IAO5E,0BAA0B;IAC1B,kDAAkD;IAC3C,KAAK,CAAC,gBAAgB,CAAC,SAA0B;QACt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AM,eAAK,CAAC,SAAS,CAAC,iBAAiB,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,CAAC;IAC3E,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,MAAM,IAAI,cAAO,CACf,2BAA2B,OAAO,QAAQ,SAAS,CAAC,IAAI,KAAK,SAAS,CAAC,GAAG,IAAI,UAAU,GAAG,EAC3F,YAAY,EACZ,CAAC,oDAAoD,CAAC,CACvD,CAAC;IACJ,CAAC;AACH,CAAC"}
1
+ {"version":3,"file":"staticResourceMetadataTransformer.js","sourceRoot":"","sources":["../../../../src/convert/transformers/staticResourceMetadataTransformer.ts"],"names":[],"mappings":";;;;;;AAAA;;;;;GAKG;AACH,yCAA0E;AAC1E,6CAAuC;AACvC,kDAA0B;AAC1B,+BAAoC;AAEpC,6CAAgD;AAChD,2CAA6D;AAC7D,yCAA0C;AAC1C,2CAA4C;AAI5C,qEAAiE;AACjE,wCAAsC;AACtC,kDAAkE;AAClE,uEAAoE;;AAGpE,MAAM,QAAQ,OAAG,eAAQ,CAAc,oCAAoC,EAAE,KAAK,qyLAAC,CAAC;AAEpF,IAAI,MAAc,CAAC;AACnB,MAAM,SAAS,GAAG,GAAW,EAAE;IAC7B,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,MAAM,GAAG,aAAM,CAAC,aAAa,CAAC,mCAAmC,CAAC,CAAC;IACrE,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC;AAEF,MAAa,iCAAkC,SAAQ,iDAAuB;IACrE,MAAM,CAAU,kBAAkB,GAAG,IAAI,GAAG,CAAC;QAClD,iBAAiB;QACjB,8BAA8B;QAC9B,iBAAiB;KAClB,CAAC,CAAC;IAEH,0BAA0B;IAC1B,kDAAkD;IAC3C,KAAK,CAAC,gBAAgB,CAAC,SAA0B;QACtD,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,SAAS,CAAC;QACzC,IAAI,CAAC,OAAO,EAAE,C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,CAAC,GAAG,IAAI,UAAU,GAAG,EAC3F,YAAY,EACZ,CAAC,oDAAoD,CAAC,CACvD,CAAC;IACJ,CAAC;AACH,CAAC"}
@@ -1,4 +1,6 @@
1
1
  import { Readable } from 'node:stream';
2
+ import { JsonMap } from '@salesforce/ts-types';
3
+ import { XML_NS_KEY, XML_NS_URL } from '../common/constants';
2
4
  import { FileResponseSuccess } from '../client/types';
3
5
  import { SourcePath } from '../common/types';
4
6
  import { MetadataComponent, SourceComponent } from '../resolve';
@@ -133,4 +135,9 @@ export type ReplacementEvent = {
133
135
  filename: string;
134
136
  replaced: string;
135
137
  };
138
+ export type XmlObj = {
139
+ [index: string]: {
140
+ [XML_NS_KEY]: typeof XML_NS_URL;
141
+ } & JsonMap;
142
+ };
136
143
  export {};
@@ -1,3 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ const constants_1 = require("../common/constants");
3
4
  //# sourceMappingURL=types.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/convert/types.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/convert/types.ts"],"names":[],"mappings":";;AAQA,mDAA6D"}
@@ -0,0 +1,4 @@
1
+ import { MetadataRegistry } from './types';
2
+ /** "did you mean" for Metadata type names */
3
+ export declare const getTypeSuggestions: (registry: MetadataRegistry, typeName: string) => string[];
4
+ export declare const getSuffixGuesses: (suffixes: string[], input: string) => string[];
@@ -0,0 +1,68 @@
1
+ "use strict";
2
+ /*
3
+ * Copyright (c) 2023, salesforce.com, inc.
4
+ * All rights reserved.
5
+ * Licensed under the BSD 3-Clause license.
6
+ * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
7
+ */
8
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
9
+ if (k2 === undefined) k2 = k;
10
+ var desc = Object.getOwnPropertyDescriptor(m, k);
11
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
12
+ desc = { enumerable: true, get: function() { return m[k]; } };
13
+ }
14
+ Object.defineProperty(o, k2, desc);
15
+ }) : (function(o, m, k, k2) {
16
+ if (k2 === undefined) k2 = k;
17
+ o[k2] = m[k];
18
+ }));
19
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
20
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
21
+ }) : function(o, v) {
22
+ o["default"] = v;
23
+ });
24
+ var __importStar = (this && this.__importStar) || function (mod) {
25
+ if (mod && mod.__esModule) return mod;
26
+ var result = {};
27
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
28
+ __setModuleDefault(result, mod);
29
+ return result;
30
+ };
31
+ Object.defineProperty(exports, "__esModule", { value: true });
32
+ exports.getSuffixGuesses = exports.getTypeSuggestions = void 0;
33
+ const messages_1 = require("@salesforce/core/messages");
34
+ const Levenshtein = __importStar(require("fast-levenshtein"));
35
+ ;
36
+ const messages = new messages_1.Messages('@salesforce/source-deploy-retrieve', 'sdr', new Map([["md_request_fail", "Metadata API request failed: %s"], ["error_convert_invalid_format", "Invalid conversion format '%s'"], ["error_could_not_infer_type", "%s: Could not infer a metadata type"], ["error_unexpected_child_type", "Unexpected child metadata [%s] found for parent type [%s]"], ["noParent", "Could not find parent type for %s (%s)"], ["error_expected_source_files", "%s: Expected source files for type '%s'"], ["error_failed_convert", "Component conversion failed: %s"], ["error_merge_metadata_target_unsupported", "Merge convert for metadata target format currently unsupported"], ["error_missing_adapter", "Missing adapter '%s' for metadata type '%s'"], ["error_missing_transformer", "Missing transformer '%s' for metadata type '%s'"], ["error_missing_type_definition", "Missing metadata type definition in registry for id '%s'."], ["error_missing_child_type_definition", "Type %s does not have a child type definition %s."], ["noChildTypes", "No child types found in registry for %s (reading %s at %s)"], ["error_no_metadata_xml_ignore", "Metadata xml file %s is forceignored but is required for %s."], ["noSourceIgnore", "%s metadata types require source files, but %s is forceignored."], ["noSourceIgnore.actions", "- Metadata types with content are composed of two files: a content file (ie MyApexClass.cls) and a -meta.xml file (i.e MyApexClass.cls-meta.xml). You must include both files in your .forceignore file. Or try appending \u201C\\*\u201D to your existing .forceignore entry.\n\nSee <https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_exclude_source.htm> for examples"], ["error_path_not_found", "%s: File or folder not found"], ["noContentFound", "SourceComponent %s (metadata type = %s) is missing its content file."], ["noContentFound.actions", ["Ensure the content file exists in the expected location.", "If the content file is in your .forceignore file, ensure the meta-xml file is also ignored to completely exclude it."]], ["error_parsing_xml", "SourceComponent %s (metadata type = %s) does not have an associated metadata xml to parse"], ["error_expected_file_path", "%s: path is to a directory, expected a file"], ["error_expected_directory_path", "%s: path is to a file, expected a directory"], ["error_directory_not_found_or_not_directory", "%s: path is not a directory"], ["error_no_directory_stream", "%s doesn't support readable streams on directories."], ["error_no_source_to_deploy", "No source-backed components present in the package."], ["error_no_components_to_retrieve", "No components in the package to retrieve."], ["error_static_resource_expected_archive_type", "A StaticResource directory must have a content type of application/zip or application/jar - found %s for %s."], ["error_static_resource_missing_resource_file", "A StaticResource must have an associated .resource file, missing %s.resource-meta.xml"], ["error_no_job_id", "The %s operation is missing a job ID. Initialize an operation with an ID, or start a new job."], ["missingApiVersion", "Could not determine an API version to use for the generated manifest. Tried looking for sourceApiVersion in sfdx-project.json, apiVersion from config vars, and the highest apiVersion from the APEX REST endpoint. Using API version 58.0 as a last resort."], ["invalid_xml_parsing", "error parsing %s due to:\\n message: %s\\n line: %s\\n code: %s"], ["zipBufferError", "Zip buffer was not created during conversion"], ["undefinedComponentSet", "Unable to construct a componentSet. Check the logs for more information."], ["replacementsFileNotRead", "The file \"%s\" specified in the \"replacements\" property of sfdx-project.json could not be read."], ["unsupportedBundleType", "Unsupported Bundle Type: %s"], ["filePathGeneratorNoTypeSupport", "Type not supported for filepath generation: %s"], ["missingFolderType", "The registry has %s as is inFolder but it does not have a folderType"], ["tooManyFiles", "Multiple files found for path: %s."], ["cantGetName", "Unable to calculate fullName from path: %s (%s)"], ["missingMetaFileSuffix", "The metadata registry is configured incorrectly for %s. Expected a metaFileSuffix."], ["uniqueIdElementNotInRegistry", "No uniqueIdElement found in registry for %s (reading %s at %s)."], ["uniqueIdElementNotInChild", "The uniqueIdElement %s was not found the child (reading %s at %s)."], ["suggest_type_header", "A metadata type lookup for \"%s\" found the following close matches:"], ["suggest_type_did_you_mean", "-- Did you mean \".%s%s\" instead for the \"%s\" metadata type?"], ["suggest_type_more_suggestions", "Additional suggestions:\nConfirm the file name, extension, and directory names are correct. Validate against the registry at:\n<https://github.com/forcedotcom/source-deploy-retrieve/blob/main/src/registry/metadataRegistry.json>\n\nIf the type is not listed in the registry, check that it has Metadata API support via the Metadata Coverage Report:\n<https://developer.salesforce.com/docs/metadata-coverage>\n\nIf the type is available via Metadata API but not in the registry\n\n- Open an issue <https://github.com/forcedotcom/cli/issues>\n- Add the type via PR. Instructions: <https://github.com/forcedotcom/source-deploy-retrieve/blob/main/contributing/metadata.md>"], ["type_name_suggestions", "Confirm the metadata type name is correct. Validate against the registry at:\n<https://github.com/forcedotcom/source-deploy-retrieve/blob/main/src/registry/metadataRegistry.json>\n\nIf the type is not listed in the registry, check that it has Metadata API support via the Metadata Coverage Report:\n<https://developer.salesforce.com/docs/metadata-coverage>\n\nIf the type is available via Metadata API but not in the registry\n\n- Open an issue <https://github.com/forcedotcom/cli/issues>\n- Add the type via PR. Instructions: <https://github.com/forcedotcom/source-deploy-retrieve/blob/main/contributing/metadata.md>"]]));
37
+ /** "did you mean" for Metadata type names */
38
+ const getTypeSuggestions = (registry, typeName) => {
39
+ const scores = getScores(Object.values(registry.types).map((t) => t.name), typeName);
40
+ const guesses = getLowestScores(scores).map((guess) => guess.registryKey);
41
+ return [
42
+ ...(guesses.length
43
+ ? [
44
+ `Did you mean one of the following types? [${guesses.join(',')}]`,
45
+ '', // Add a blank line for better readability
46
+ ]
47
+ : []),
48
+ messages.getMessage('type_name_suggestions'),
49
+ ];
50
+ };
51
+ exports.getTypeSuggestions = getTypeSuggestions;
52
+ const getSuffixGuesses = (suffixes, input) => {
53
+ const scores = getScores(suffixes, input);
54
+ return getLowestScores(scores).map((g) => g.registryKey);
55
+ };
56
+ exports.getSuffixGuesses = getSuffixGuesses;
57
+ const getScores = (choices, input) => choices.map((registryKey) => ({
58
+ registryKey,
59
+ score: Levenshtein.get(input, registryKey, { useCollator: true }),
60
+ }));
61
+ /** Levenshtein uses positive integers for scores, find all scores that match the lowest score */
62
+ const getLowestScores = (scores) => {
63
+ const sortedScores = scores.sort(levenshteinSorter);
64
+ const lowestScore = scores[0].score;
65
+ return sortedScores.filter((score) => score.score === lowestScore);
66
+ };
67
+ const levenshteinSorter = (a, b) => a.score - b.score;
68
+ //# sourceMappingURL=levenshtein.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"levenshtein.js","sourceRoot":"","sources":["../../../src/registry/levenshtein.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,wDAAqD;AACrD,8DAAgD;;AAIhD,MAAM,QAAQ,OAAG,mBAAQ,CAAc,oCAAoC,EAAE,KAAK,qyLAAC,CAAC;AAEpF,6CAA6C;AACtC,MAAM,kBAAkB,GAAG,CAAC,QAA0B,EAAE,QAAgB,EAAY,EAAE;IAC3F,MAAM,MAAM,GAAG,SAAS,CACtB,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,EAChD,QAAQ,CACT,CAAC;IAEF,MAAM,OAAO,GAAG,eAAe,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;IAC1E,OAAO;QACL,GAAG,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AC,CAAC,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC"}
@@ -39,6 +39,7 @@
39
39
  "workflowalert": {
40
40
  "directoryName": "workflowAlerts",
41
41
  "id": "workflowalert",
42
+ "isAddressable": false,
42
43
  "name": "WorkflowAlert",
43
44
  "suffix": "workflowAlert",
44
45
  "xmlElementName": "alerts"
@@ -46,6 +47,7 @@
46
47
  "workflowfieldupdate": {
47
48
  "directoryName": "workflowFieldUpdates",
48
49
  "id": "workflowfieldupdate",
50
+ "isAddressable": false,
49
51
  "name": "WorkflowFieldUpdate",
50
52
  "suffix": "workflowFieldUpdate",
51
53
  "xmlElementName": "fieldUpdates"
@@ -53,6 +55,7 @@
53
55
  "workflowknowledgepublish": {
54
56
  "directoryName": "workflowKnowledgePublishes",
55
57
  "id": "workflowknowledgepublish",
58
+ "isAddressable": false,
56
59
  "name": "WorkflowKnowledgePublish",
57
60
  "suffix": "workflowKnowledgePublish",
58
61
  "xmlElementName": "knowledgePublishes"
@@ -60,6 +63,7 @@
60
63
  "workflowoutboundmessage": {
61
64
  "directoryName": "workflowOutboundMessages",
62
65
  "id": "workflowoutboundmessage",
66
+ "isAddressable": false,
63
67
  "name": "WorkflowOutboundMessage",
64
68
  "suffix": "workflowOutboundMessage",
65
69
  "xmlElementName": "outboundMessages"
@@ -67,6 +71,7 @@
67
71
  "workflowrule": {
68
72
  "directoryName": "workflowRules",
69
73
  "id": "workflowrule",
74
+ "isAddressable": false,
70
75
  "name": "WorkflowRule",
71
76
  "suffix": "workflowRule",
72
77
  "xmlElementName": "rules"
@@ -74,6 +79,7 @@
74
79
  "workflowsend": {
75
80
  "directoryName": "workflowSends",
76
81
  "id": "workflowsend",
82
+ "isAddressable": false,
77
83
  "name": "WorkflowSend",
78
84
  "suffix": "workflowSend",
79
85
  "xmlElementName": "send"
@@ -81,6 +87,7 @@
81
87
  "workflowtask": {
82
88
  "directoryName": "workflowTasks",
83
89
  "id": "workflowtask",
90
+ "isAddressable": false,
84
91
  "name": "WorkflowTask",
85
92
  "suffix": "workflowTask",
86
93
  "xmlElementName": "tasks"
@@ -1,27 +1,4 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
2
  Object.defineProperty(exports, "__esModule", { value: true });
26
3
  exports.RegistryAccess = void 0;
27
4
  /*
@@ -31,11 +8,15 @@ exports.RegistryAccess = void 0;
31
8
  * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
32
9
  */
33
10
  const core_1 = require("@salesforce/core");
34
- const Levenshtein = __importStar(require("fast-levenshtein"));
35
11
  const variants_1 = require("./variants");
12
+ const levenshtein_1 = require("./levenshtein");
36
13
  ;
37
- const messages = new core_1.Messages('@salesforce/source-deploy-retrieve', 'sdr', new Map([["md_request_fail", "Metadata API request failed: %s"], ["error_convert_invalid_format", "Invalid conversion format '%s'"], ["error_could_not_infer_type", "%s: Could not infer a metadata type"], ["error_unexpected_child_type", "Unexpected child metadata [%s] found for parent type [%s]"], ["noParent", "Could not find parent type for %s (%s)"], ["error_expected_source_files", "%s: Expected source files for type '%s'"], ["error_failed_convert", "Component conversion failed: %s"], ["error_merge_metadata_target_unsupported", "Merge convert for metadata target format currently unsupported"], ["error_missing_adapter", "Missing adapter '%s' for metadata type '%s'"], ["error_missing_transformer", "Missing transformer '%s' for metadata type '%s'"], ["error_missing_type_definition", "Missing metadata type definition in registry for id '%s'."], ["error_missing_child_type_definition", "Type %s does not have a child type definition %s."], ["noChildTypes", "No child types found in registry for %s (reading %s at %s)"], ["error_no_metadata_xml_ignore", "Metadata xml file %s is forceignored but is required for %s."], ["noSourceIgnore", "%s metadata types require source files, but %s is forceignored."], ["noSourceIgnore.actions", "- Metadata types with content are composed of two files: a content file (ie MyApexClass.cls) and a -meta.xml file (i.e MyApexClass.cls-meta.xml). You must include both files in your .forceignore file. Or try appending \u201C\\*\u201D to your existing .forceignore entry.\n\nSee <https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_exclude_source.htm> for examples"], ["error_path_not_found", "%s: File or folder not found"], ["noContentFound", "SourceComponent %s (metadata type = %s) is missing its content file."], ["noContentFound.actions", ["Ensure the content file exists in the expected location.", "If the content file is in your .forceignore file, ensure the meta-xml file is also ignored to completely exclude it."]], ["error_parsing_xml", "SourceComponent %s (metadata type = %s) does not have an associated metadata xml to parse"], ["error_expected_file_path", "%s: path is to a directory, expected a file"], ["error_expected_directory_path", "%s: path is to a file, expected a directory"], ["error_directory_not_found_or_not_directory", "%s: path is not a directory"], ["error_no_directory_stream", "%s doesn't support readable streams on directories."], ["error_no_source_to_deploy", "No source-backed components present in the package."], ["error_no_components_to_retrieve", "No components in the package to retrieve."], ["error_static_resource_expected_archive_type", "A StaticResource directory must have a content type of application/zip or application/jar - found %s for %s."], ["error_static_resource_missing_resource_file", "A StaticResource must have an associated .resource file, missing %s.resource-meta.xml"], ["error_no_job_id", "The %s operation is missing a job ID. Initialize an operation with an ID, or start a new job."], ["missingApiVersion", "Could not determine an API version to use for the generated manifest. Tried looking for sourceApiVersion in sfdx-project.json, apiVersion from config vars, and the highest apiVersion from the APEX REST endpoint. Using API version 58.0 as a last resort."], ["invalid_xml_parsing", "error parsing %s due to:\\n message: %s\\n line: %s\\n code: %s"], ["zipBufferError", "Zip buffer was not created during conversion"], ["undefinedComponentSet", "Unable to construct a componentSet. Check the logs for more information."], ["replacementsFileNotRead", "The file \"%s\" specified in the \"replacements\" property of sfdx-project.json could not be read."], ["unsupportedBundleType", "Unsupported Bundle Type: %s"], ["filePathGeneratorNoTypeSupport", "Type not supported for filepath generation: %s"], ["missingFolderType", "The registry has %s as is inFolder but it does not have a folderType"], ["tooManyFiles", "Multiple files found for path: %s."], ["cantGetName", "Unable to calculate fullName from path: %s (%s)"], ["missingMetaFileSuffix", "The metadata registry is configured incorrectly for %s. Expected a metaFileSuffix."], ["uniqueIdElementNotInRegistry", "No uniqueIdElement found in registry for %s (reading %s at %s)."], ["uniqueIdElementNotInChild", "The uniqueIdElement %s was not found the child (reading %s at %s)."], ["suggest_type_header", "A metadata type lookup for \"%s\" found the following close matches:"], ["suggest_type_did_you_mean", "-- Did you mean \".%s%s\" instead for the \"%s\" metadata type?"], ["suggest_type_more_suggestions", "Additional suggestions:\nConfirm the file name, extension, and directory names are correct. Validate against the registry at:\n<https://github.com/forcedotcom/source-deploy-retrieve/blob/main/src/registry/metadataRegistry.json>\n\nIf the type is not listed in the registry, check that it has Metadata API support via the Metadata Coverage Report:\n<https://developer.salesforce.com/docs/metadata-coverage>\n\nIf the type is available via Metadata API but not in the registry\n\n- Open an issue <https://github.com/forcedotcom/cli/issues>\n- Add the type via PR. Instructions: <https://github.com/forcedotcom/source-deploy-retrieve/blob/main/contributing/metadata.md>"]]));
14
+ const messages = new core_1.Messages('@salesforce/source-deploy-retrieve', 'sdr', new Map([["md_request_fail", "Metadata API request failed: %s"], ["error_convert_invalid_format", "Invalid conversion format '%s'"], ["error_could_not_infer_type", "%s: Could not infer a metadata type"], ["error_unexpected_child_type", "Unexpected child metadata [%s] found for parent type [%s]"], ["noParent", "Could not find parent type for %s (%s)"], ["error_expected_source_files", "%s: Expected source files for type '%s'"], ["error_failed_convert", "Component conversion failed: %s"], ["error_merge_metadata_target_unsupported", "Merge convert for metadata target format currently unsupported"], ["error_missing_adapter", "Missing adapter '%s' for metadata type '%s'"], ["error_missing_transformer", "Missing transformer '%s' for metadata type '%s'"], ["error_missing_type_definition", "Missing metadata type definition in registry for id '%s'."], ["error_missing_child_type_definition", "Type %s does not have a child type definition %s."], ["noChildTypes", "No child types found in registry for %s (reading %s at %s)"], ["error_no_metadata_xml_ignore", "Metadata xml file %s is forceignored but is required for %s."], ["noSourceIgnore", "%s metadata types require source files, but %s is forceignored."], ["noSourceIgnore.actions", "- Metadata types with content are composed of two files: a content file (ie MyApexClass.cls) and a -meta.xml file (i.e MyApexClass.cls-meta.xml). You must include both files in your .forceignore file. Or try appending \u201C\\*\u201D to your existing .forceignore entry.\n\nSee <https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_exclude_source.htm> for examples"], ["error_path_not_found", "%s: File or folder not found"], ["noContentFound", "SourceComponent %s (metadata type = %s) is missing its content file."], ["noContentFound.actions", ["Ensure the content file exists in the expected location.", "If the content file is in your .forceignore file, ensure the meta-xml file is also ignored to completely exclude it."]], ["error_parsing_xml", "SourceComponent %s (metadata type = %s) does not have an associated metadata xml to parse"], ["error_expected_file_path", "%s: path is to a directory, expected a file"], ["error_expected_directory_path", "%s: path is to a file, expected a directory"], ["error_directory_not_found_or_not_directory", "%s: path is not a directory"], ["error_no_directory_stream", "%s doesn't support readable streams on directories."], ["error_no_source_to_deploy", "No source-backed components present in the package."], ["error_no_components_to_retrieve", "No components in the package to retrieve."], ["error_static_resource_expected_archive_type", "A StaticResource directory must have a content type of application/zip or application/jar - found %s for %s."], ["error_static_resource_missing_resource_file", "A StaticResource must have an associated .resource file, missing %s.resource-meta.xml"], ["error_no_job_id", "The %s operation is missing a job ID. Initialize an operation with an ID, or start a new job."], ["missingApiVersion", "Could not determine an API version to use for the generated manifest. Tried looking for sourceApiVersion in sfdx-project.json, apiVersion from config vars, and the highest apiVersion from the APEX REST endpoint. Using API version 58.0 as a last resort."], ["invalid_xml_parsing", "error parsing %s due to:\\n message: %s\\n line: %s\\n code: %s"], ["zipBufferError", "Zip buffer was not created during conversion"], ["undefinedComponentSet", "Unable to construct a componentSet. Check the logs for more information."], ["replacementsFileNotRead", "The file \"%s\" specified in the \"replacements\" property of sfdx-project.json could not be read."], ["unsupportedBundleType", "Unsupported Bundle Type: %s"], ["filePathGeneratorNoTypeSupport", "Type not supported for filepath generation: %s"], ["missingFolderType", "The registry has %s as is inFolder but it does not have a folderType"], ["tooManyFiles", "Multiple files found for path: %s."], ["cantGetName", "Unable to calculate fullName from path: %s (%s)"], ["missingMetaFileSuffix", "The metadata registry is configured incorrectly for %s. Expected a metaFileSuffix."], ["uniqueIdElementNotInRegistry", "No uniqueIdElement found in registry for %s (reading %s at %s)."], ["uniqueIdElementNotInChild", "The uniqueIdElement %s was not found the child (reading %s at %s)."], ["suggest_type_header", "A metadata type lookup for \"%s\" found the following close matches:"], ["suggest_type_did_you_mean", "-- Did you mean \".%s%s\" instead for the \"%s\" metadata type?"], ["suggest_type_more_suggestions", "Additional suggestions:\nConfirm the file name, extension, and directory names are correct. Validate against the registry at:\n<https://github.com/forcedotcom/source-deploy-retrieve/blob/main/src/registry/metadataRegistry.json>\n\nIf the type is not listed in the registry, check that it has Metadata API support via the Metadata Coverage Report:\n<https://developer.salesforce.com/docs/metadata-coverage>\n\nIf the type is available via Metadata API but not in the registry\n\n- Open an issue <https://github.com/forcedotcom/cli/issues>\n- Add the type via PR. Instructions: <https://github.com/forcedotcom/source-deploy-retrieve/blob/main/contributing/metadata.md>"], ["type_name_suggestions", "Confirm the metadata type name is correct. Validate against the registry at:\n<https://github.com/forcedotcom/source-deploy-retrieve/blob/main/src/registry/metadataRegistry.json>\n\nIf the type is not listed in the registry, check that it has Metadata API support via the Metadata Coverage Report:\n<https://developer.salesforce.com/docs/metadata-coverage>\n\nIf the type is available via Metadata API but not in the registry\n\n- Open an issue <https://github.com/forcedotcom/cli/issues>\n- Add the type via PR. Instructions: <https://github.com/forcedotcom/source-deploy-retrieve/blob/main/contributing/metadata.md>"]]));
38
15
  class RegistryAccess {
16
+ registry;
17
+ strictFolderTypes;
18
+ folderContentTypes;
19
+ aliasTypes;
39
20
  constructor(registry, projectDir) {
40
21
  this.registry = registry ?? (0, variants_1.getEffectiveRegistry)({ projectDir });
41
22
  }
@@ -59,7 +40,11 @@ class RegistryAccess {
59
40
  throw new core_1.SfError(messages.getMessage('error_missing_child_type_definition', [parentTypeId, lower]), 'RegistryError');
60
41
  }
61
42
  if (!this.registry.types[lower]) {
62
- throw new core_1.SfError(messages.getMessage('error_missing_type_definition', [lower]), 'RegistryError');
43
+ throw core_1.SfError.create({
44
+ message: messages.getMessage('error_missing_type_definition', [name]),
45
+ name: 'RegistryError',
46
+ actions: (0, levenshtein_1.getTypeSuggestions)(this.registry, lower),
47
+ });
63
48
  }
64
49
  const alias = this.registry.types[lower].aliasFor;
65
50
  // redirect via alias
@@ -84,25 +69,13 @@ class RegistryAccess {
84
69
  * @returns An array of similar suffix and metadata type matches
85
70
  */
86
71
  guessTypeBySuffix(suffix) {
87
- const registryKeys = Object.keys(this.registry.suffixes);
88
- const scores = registryKeys.map((registryKey) => ({
89
- registryKey,
90
- score: Levenshtein.get(suffix, registryKey, { useCollator: true }),
91
- }));
92
- const sortedScores = scores.sort((a, b) => a.score - b.score);
93
- const lowestScore = sortedScores[0].score;
94
- // Levenshtein uses positive integers for scores, find all scores that match the lowest score
95
- const guesses = sortedScores.filter((score) => score.score === lowestScore);
96
- if (guesses.length > 0) {
97
- return guesses.map((guess) => {
98
- const typeId = this.registry.suffixes[guess.registryKey];
99
- const metadataType = this.getTypeByName(typeId);
100
- return {
101
- suffixGuess: guess.registryKey,
102
- metadataTypeGuess: metadataType,
103
- };
104
- });
105
- }
72
+ const guesses = (0, levenshtein_1.getSuffixGuesses)(Object.keys(this.registry.suffixes), suffix);
73
+ return guesses.length
74
+ ? guesses.map((guess) => ({
75
+ suffixGuess: guess,
76
+ metadataTypeGuess: this.getTypeByName(this.registry.suffixes[guess]),
77
+ }))
78
+ : undefined;
106
79
  }
107
80
  /**
108
81
  * Searches for the first metadata type in the registry that returns `true`
@@ -1 +1 @@
1
- {"version":3,"file":"registryAccess.js","sourceRoot":"","sources":["../../../src/registry/registryAccess.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;GAKG;AACH,2CAAqD;AACrD,8DAAgD;AAEhD,yCAAkD;;AAOlD,MAAM,QAAQ,OAAG,eAAQ,CAAc,oCAAoC,EAAE,KAAK,6pKAAC,CAAC;AAEpF,MAAa,cAAc;IAMzB,YAAmB,QAA2B,EAAE,UAAmB;QACjE,IAAI,CAAC,QAAQ,GAAG,QAAQ,IAAI,IAAA,+BAAoB,EAAC,EAAE,UAAU,EAAE,CAAC,CAAC;IACnE,CAAC;IAEM,WAAW;QAChB,OAAO,IAAI,CAAC,QAAQ,CAAC;IACvB,CAAC;IAED;;;;;OAKG;IACI,aAAa,CAAC,IAAY;QAC/B,MAAM,KAAK,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC,IAAI,EAAE,CAAC;QACxC,IAAI,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE,CAAC;YACpC,MAAM,YAAY,GAAG,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;YACrD,MAAM,SAAS,GAAG,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,QAAQ,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;YAC3E,IAAI,SAAS,EAAE,CAAC;gBACd,OAAO,SAAS,CAAC;YACnB,CAAC;YACD,MAAM,IAAI,cAAO,CACf,QAAQ,CAAC,UAAU,CAAC,qCAAqC,EAAE,CAAC,YAAY,EAAE,KAAK,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