@salesforce/source-deploy-retrieve 12.1.8 → 12.1.9
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.
- package/lib/src/client/metadataApiDeploy.js +22 -14
- package/lib/src/client/metadataApiDeploy.js.map +1 -1
- package/lib/src/client/metadataApiRetrieve.js +12 -2
- package/lib/src/client/metadataApiRetrieve.js.map +1 -1
- package/lib/src/client/metadataTransfer.js +9 -3
- package/lib/src/client/metadataTransfer.js.map +1 -1
- package/lib/src/collections/componentSet.js +30 -12
- package/lib/src/collections/componentSet.js.map +1 -1
- package/lib/src/collections/componentSetBuilder.js +91 -108
- package/lib/src/collections/componentSetBuilder.js.map +1 -1
- package/lib/src/collections/decodeableMap.js +7 -0
- package/lib/src/collections/decodeableMap.js.map +1 -1
- package/lib/src/collections/lazyCollection.js +1 -0
- package/lib/src/collections/lazyCollection.js.map +1 -1
- package/lib/src/convert/convertContext/convertContext.js +3 -5
- package/lib/src/convert/convertContext/convertContext.js.map +1 -1
- package/lib/src/convert/convertContext/decompositionFinalizer.js +1 -4
- package/lib/src/convert/convertContext/decompositionFinalizer.js.map +1 -1
- package/lib/src/convert/convertContext/nonDecompositionFinalizer.js +9 -11
- package/lib/src/convert/convertContext/nonDecompositionFinalizer.js.map +1 -1
- package/lib/src/convert/convertContext/recompositionFinalizer.js +3 -6
- package/lib/src/convert/convertContext/recompositionFinalizer.js.map +1 -1
- package/lib/src/convert/metadataConverter.js +6 -5
- package/lib/src/convert/metadataConverter.js.map +1 -1
- package/lib/src/convert/replacements.js +3 -1
- package/lib/src/convert/replacements.js.map +1 -1
- package/lib/src/convert/streams.js +15 -6
- package/lib/src/convert/streams.js.map +1 -1
- package/lib/src/convert/transformers/baseMetadataTransformer.js +3 -0
- package/lib/src/convert/transformers/baseMetadataTransformer.js.map +1 -1
- package/lib/src/convert/transformers/decomposedMetadataTransformer.js +1 -1
- package/lib/src/convert/transformers/decomposedMetadataTransformer.js.map +1 -1
- package/lib/src/convert/transformers/defaultMetadataTransformer.js +1 -1
- package/lib/src/convert/transformers/defaultMetadataTransformer.js.map +1 -1
- package/lib/src/convert/transformers/metadataTransformerFactory.js +3 -1
- package/lib/src/convert/transformers/metadataTransformerFactory.js.map +1 -1
- package/lib/src/convert/transformers/nonDecomposedMetadataTransformer.js +1 -1
- package/lib/src/convert/transformers/nonDecomposedMetadataTransformer.js.map +1 -1
- package/lib/src/convert/transformers/staticResourceMetadataTransformer.js +6 -6
- package/lib/src/convert/transformers/staticResourceMetadataTransformer.js.map +1 -1
- package/lib/src/registry/levenshtein.d.ts +4 -0
- package/lib/src/registry/levenshtein.js +68 -0
- package/lib/src/registry/levenshtein.js.map +1 -0
- package/lib/src/registry/registryAccess.js +18 -45
- package/lib/src/registry/registryAccess.js.map +1 -1
- package/lib/src/resolve/adapters/baseSourceAdapter.js +11 -7
- package/lib/src/resolve/adapters/baseSourceAdapter.js.map +1 -1
- package/lib/src/resolve/adapters/bundleSourceAdapter.js +1 -4
- package/lib/src/resolve/adapters/bundleSourceAdapter.js.map +1 -1
- package/lib/src/resolve/adapters/decomposedSourceAdapter.js +3 -6
- package/lib/src/resolve/adapters/decomposedSourceAdapter.js.map +1 -1
- package/lib/src/resolve/adapters/defaultSourceAdapter.js +1 -4
- package/lib/src/resolve/adapters/defaultSourceAdapter.js.map +1 -1
- package/lib/src/resolve/adapters/digitalExperienceSourceAdapter.js +1 -1
- package/lib/src/resolve/adapters/digitalExperienceSourceAdapter.js.map +1 -1
- package/lib/src/resolve/adapters/matchingContentSourceAdapter.js +1 -1
- package/lib/src/resolve/adapters/matchingContentSourceAdapter.js.map +1 -1
- package/lib/src/resolve/adapters/mixedContentSourceAdapter.js +1 -1
- package/lib/src/resolve/adapters/mixedContentSourceAdapter.js.map +1 -1
- package/lib/src/resolve/adapters/sourceAdapterFactory.js +3 -1
- package/lib/src/resolve/adapters/sourceAdapterFactory.js.map +1 -1
- package/lib/src/resolve/connectionResolver.js +6 -1
- package/lib/src/resolve/connectionResolver.js.map +1 -1
- package/lib/src/resolve/forceIgnore.js +4 -2
- package/lib/src/resolve/forceIgnore.js.map +1 -1
- package/lib/src/resolve/manifestResolver.js +2 -0
- package/lib/src/resolve/manifestResolver.js.map +1 -1
- package/lib/src/resolve/metadataResolver.js +6 -1
- package/lib/src/resolve/metadataResolver.js.map +1 -1
- package/lib/src/resolve/sourceComponent.js +12 -2
- package/lib/src/resolve/sourceComponent.js.map +1 -1
- package/lib/src/resolve/treeContainers.js +4 -3
- package/lib/src/resolve/treeContainers.js.map +1 -1
- package/lib/src/utils/filePathGenerator.js +1 -1
- package/lib/src/utils/filePathGenerator.js.map +1 -1
- package/messages/sdr.md +13 -0
- package/package.json +8 -8
|
@@ -43,7 +43,7 @@ const registryAccess_1 = require("../registry/registryAccess");
|
|
|
43
43
|
const resolve_1 = require("../resolve");
|
|
44
44
|
const types_1 = require("./types");
|
|
45
45
|
;
|
|
46
|
-
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>"]]));
|
|
46
|
+
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>"]]));
|
|
47
47
|
class ComponentSetBuilder {
|
|
48
48
|
/**
|
|
49
49
|
* Builds a ComponentSet that can be used for source conversion,
|
|
@@ -53,113 +53,107 @@ class ComponentSetBuilder {
|
|
|
53
53
|
*
|
|
54
54
|
* @param options: options for creating a ComponentSet
|
|
55
55
|
*/
|
|
56
|
-
// eslint-disable-next-line complexity
|
|
57
56
|
static async build(options) {
|
|
58
57
|
const logger = core_1.Logger.childFromRoot('componentSetBuilder');
|
|
59
58
|
let componentSet;
|
|
60
|
-
const { sourcepath, manifest, metadata, packagenames,
|
|
61
|
-
const
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
59
|
+
const { sourcepath, manifest, metadata, packagenames, org } = options;
|
|
60
|
+
const registry = new registryAccess_1.RegistryAccess(undefined, options.projectDir);
|
|
61
|
+
if (sourcepath) {
|
|
62
|
+
logger.debug(`Building ComponentSet from sourcepath: ${sourcepath.join(', ')}`);
|
|
63
|
+
const fsPaths = sourcepath.map(validateAndResolvePath);
|
|
64
|
+
componentSet = componentSet_1.ComponentSet.fromSource({
|
|
65
|
+
fsPaths,
|
|
66
|
+
registry,
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
// Return empty ComponentSet and use packageNames in the connection via `.retrieve` options
|
|
70
|
+
if (packagenames) {
|
|
71
|
+
logger.debug(`Building ComponentSet for packagenames: ${packagenames.toString()}`);
|
|
72
|
+
componentSet ??= new componentSet_1.ComponentSet(undefined, registry);
|
|
73
|
+
}
|
|
74
|
+
// Resolve manifest with source in package directories.
|
|
75
|
+
if (manifest) {
|
|
76
|
+
logger.debug(`Building ComponentSet from manifest: ${manifest.manifestPath}`);
|
|
77
|
+
assertFileExists(manifest.manifestPath);
|
|
78
|
+
logger.debug(`Searching in packageDir: ${manifest.directoryPaths.join(', ')} for matching metadata`);
|
|
79
|
+
componentSet = await componentSet_1.ComponentSet.fromManifest({
|
|
80
|
+
manifestPath: manifest.manifestPath,
|
|
81
|
+
resolveSourcePaths: manifest.directoryPaths,
|
|
82
|
+
forceAddWildcards: true,
|
|
83
|
+
destructivePre: manifest.destructiveChangesPre,
|
|
84
|
+
destructivePost: manifest.destructiveChangesPost,
|
|
85
|
+
registry,
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
// Resolve metadata entries with source in package directories.
|
|
89
|
+
if (metadata) {
|
|
90
|
+
logger.debug(`Building ComponentSet from metadata: ${metadata.metadataEntries.toString()}`);
|
|
91
|
+
const directoryPaths = metadata.directoryPaths;
|
|
92
|
+
componentSet ??= new componentSet_1.ComponentSet(undefined, registry);
|
|
93
|
+
const componentSetFilter = new componentSet_1.ComponentSet(undefined, registry);
|
|
94
|
+
// Build a Set of metadata entries
|
|
95
|
+
metadata.metadataEntries
|
|
96
|
+
.map((0, exports.entryToTypeAndName)(registry))
|
|
97
|
+
.flatMap(typeAndNameToMetadataComponents({ directoryPaths, registry }))
|
|
98
|
+
.map(addToComponentSet(componentSet))
|
|
99
|
+
.map(addToComponentSet(componentSetFilter));
|
|
100
|
+
logger.debug(`Searching for matching metadata in directories: ${directoryPaths.join(', ')}`);
|
|
101
|
+
// add destructive changes if defined. Because these are deletes, all entries
|
|
102
|
+
// are resolved to SourceComponents
|
|
103
|
+
if (metadata.destructiveEntriesPre) {
|
|
104
|
+
metadata.destructiveEntriesPre
|
|
105
|
+
.map((0, exports.entryToTypeAndName)(registry))
|
|
106
|
+
.map(assertNoWildcardInDestructiveEntries)
|
|
107
|
+
.flatMap(typeAndNameToMetadataComponents({ directoryPaths, registry }))
|
|
108
|
+
.map((mdComponent) => new sourceComponent_1.SourceComponent({ type: mdComponent.type, name: mdComponent.fullName }))
|
|
109
|
+
.map(addToComponentSet(componentSet, types_1.DestructiveChangesType.PRE));
|
|
75
110
|
}
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
resolveSourcePaths: manifest.directoryPaths,
|
|
84
|
-
forceAddWildcards: true,
|
|
85
|
-
destructivePre: manifest.destructiveChangesPre,
|
|
86
|
-
destructivePost: manifest.destructiveChangesPost,
|
|
87
|
-
registry: registryAccess,
|
|
88
|
-
});
|
|
111
|
+
if (metadata.destructiveEntriesPost) {
|
|
112
|
+
metadata.destructiveEntriesPost
|
|
113
|
+
.map((0, exports.entryToTypeAndName)(registry))
|
|
114
|
+
.map(assertNoWildcardInDestructiveEntries)
|
|
115
|
+
.flatMap(typeAndNameToMetadataComponents({ directoryPaths, registry }))
|
|
116
|
+
.map((mdComponent) => new sourceComponent_1.SourceComponent({ type: mdComponent.type, name: mdComponent.fullName }))
|
|
117
|
+
.map(addToComponentSet(componentSet, types_1.DestructiveChangesType.POST));
|
|
89
118
|
}
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
//
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
.map(
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
// add destructive changes if defined. Because these are deletes, all entries
|
|
104
|
-
// are resolved to SourceComponents
|
|
105
|
-
if (metadata.destructiveEntriesPre) {
|
|
106
|
-
metadata.destructiveEntriesPre
|
|
107
|
-
.map((0, exports.entryToTypeAndName)(registryAccess))
|
|
108
|
-
.map(assertNoWildcardInDestructiveEntries)
|
|
109
|
-
.flatMap(typeAndNameToMetadataComponents({ directoryPaths, registry: registryAccess }))
|
|
110
|
-
.map((mdComponent) => new sourceComponent_1.SourceComponent({ type: mdComponent.type, name: mdComponent.fullName }))
|
|
111
|
-
.map(addToComponentSet(componentSet, types_1.DestructiveChangesType.PRE));
|
|
112
|
-
}
|
|
113
|
-
if (metadata.destructiveEntriesPost) {
|
|
114
|
-
metadata.destructiveEntriesPost
|
|
115
|
-
.map((0, exports.entryToTypeAndName)(registryAccess))
|
|
116
|
-
.map(assertNoWildcardInDestructiveEntries)
|
|
117
|
-
.flatMap(typeAndNameToMetadataComponents({ directoryPaths, registry: registryAccess }))
|
|
118
|
-
.map((mdComponent) => new sourceComponent_1.SourceComponent({ type: mdComponent.type, name: mdComponent.fullName }))
|
|
119
|
-
.map(addToComponentSet(componentSet, types_1.DestructiveChangesType.POST));
|
|
119
|
+
const resolvedComponents = componentSet_1.ComponentSet.fromSource({
|
|
120
|
+
fsPaths: directoryPaths,
|
|
121
|
+
include: componentSetFilter,
|
|
122
|
+
registry,
|
|
123
|
+
});
|
|
124
|
+
if (resolvedComponents.forceIgnoredPaths) {
|
|
125
|
+
// if useFsForceIgnore = true, then we won't be able to resolve a forceignored path,
|
|
126
|
+
// which we need to do to get the ignored source component
|
|
127
|
+
const resolver = new resolve_1.MetadataResolver(registry, undefined, false);
|
|
128
|
+
for (const ignoredPath of resolvedComponents.forceIgnoredPaths ?? []) {
|
|
129
|
+
resolver.getComponentsFromPath(ignoredPath).map((ignored) => {
|
|
130
|
+
componentSet = componentSet?.filter((resolved) => !(resolved.fullName === ignored.name && resolved.type === ignored.type));
|
|
131
|
+
});
|
|
120
132
|
}
|
|
121
|
-
|
|
122
|
-
fsPaths: directoryPaths,
|
|
123
|
-
include: componentSetFilter,
|
|
124
|
-
registry: registryAccess,
|
|
125
|
-
});
|
|
126
|
-
if (resolvedComponents.forceIgnoredPaths) {
|
|
127
|
-
// if useFsForceIgnore = true, then we won't be able to resolve a forceignored path,
|
|
128
|
-
// which we need to do to get the ignored source component
|
|
129
|
-
const resolver = new resolve_1.MetadataResolver(registryAccess, undefined, false);
|
|
130
|
-
for (const ignoredPath of resolvedComponents.forceIgnoredPaths ?? []) {
|
|
131
|
-
resolver.getComponentsFromPath(ignoredPath).map((ignored) => {
|
|
132
|
-
componentSet = componentSet?.filter((resolved) => !(resolved.fullName === ignored.name && resolved.type === ignored.type));
|
|
133
|
-
});
|
|
134
|
-
}
|
|
135
|
-
componentSet.forceIgnoredPaths = resolvedComponents.forceIgnoredPaths;
|
|
136
|
-
}
|
|
137
|
-
resolvedComponents.toArray().map(addToComponentSet(componentSet));
|
|
138
|
-
}
|
|
139
|
-
// Resolve metadata entries with an org connection
|
|
140
|
-
if (org) {
|
|
141
|
-
componentSet ??= new componentSet_1.ComponentSet(undefined, registryAccess);
|
|
142
|
-
logger.debug(`Building ComponentSet from targetUsername: ${org.username} ${metadata ? `filtered by metadata: ${metadata.metadataEntries.toString()}` : ''}`);
|
|
143
|
-
const mdMap = metadata
|
|
144
|
-
? buildMapFromComponents(metadata.metadataEntries.map((0, exports.entryToTypeAndName)(registryAccess)))
|
|
145
|
-
: new Map();
|
|
146
|
-
const fromConnection = await componentSet_1.ComponentSet.fromConnection({
|
|
147
|
-
usernameOrConnection: (await core_1.StateAggregator.getInstance()).aliases.getUsername(org.username) ?? org.username,
|
|
148
|
-
componentFilter: getOrgComponentFilter(org, mdMap, metadata),
|
|
149
|
-
metadataTypes: mdMap.size ? Array.from(mdMap.keys()) : undefined,
|
|
150
|
-
registry: registryAccess,
|
|
151
|
-
});
|
|
152
|
-
fromConnection.toArray().map(addToComponentSet(componentSet));
|
|
133
|
+
componentSet.forceIgnoredPaths = resolvedComponents.forceIgnoredPaths;
|
|
153
134
|
}
|
|
135
|
+
resolvedComponents.toArray().map(addToComponentSet(componentSet));
|
|
154
136
|
}
|
|
155
|
-
|
|
156
|
-
|
|
137
|
+
// Resolve metadata entries with an org connection
|
|
138
|
+
if (org) {
|
|
139
|
+
componentSet ??= new componentSet_1.ComponentSet(undefined, registry);
|
|
140
|
+
logger.debug(`Building ComponentSet from targetUsername: ${org.username} ${metadata ? `filtered by metadata: ${metadata.metadataEntries.toString()}` : ''}`);
|
|
141
|
+
const mdMap = metadata
|
|
142
|
+
? buildMapFromComponents(metadata.metadataEntries.map((0, exports.entryToTypeAndName)(registry)))
|
|
143
|
+
: new Map();
|
|
144
|
+
const fromConnection = await componentSet_1.ComponentSet.fromConnection({
|
|
145
|
+
usernameOrConnection: (await core_1.StateAggregator.getInstance()).aliases.getUsername(org.username) ?? org.username,
|
|
146
|
+
componentFilter: getOrgComponentFilter(org, mdMap, metadata),
|
|
147
|
+
metadataTypes: mdMap.size ? Array.from(mdMap.keys()) : undefined,
|
|
148
|
+
registry,
|
|
149
|
+
});
|
|
150
|
+
fromConnection.toArray().map(addToComponentSet(componentSet));
|
|
157
151
|
}
|
|
158
152
|
// there should have been a componentSet created by this point.
|
|
159
153
|
componentSet = assertComponentSetIsNotUndefined(componentSet);
|
|
160
|
-
componentSet.apiVersion ??= apiversion;
|
|
161
|
-
componentSet.sourceApiVersion ??= sourceapiversion;
|
|
162
|
-
componentSet.projectDirectory = projectDir;
|
|
154
|
+
componentSet.apiVersion ??= options.apiversion;
|
|
155
|
+
componentSet.sourceApiVersion ??= options.sourceapiversion;
|
|
156
|
+
componentSet.projectDirectory = options.projectDir;
|
|
163
157
|
logComponents(logger, componentSet);
|
|
164
158
|
return componentSet;
|
|
165
159
|
}
|
|
@@ -169,17 +163,6 @@ const addToComponentSet = (cs, deletionType) => (cmp) => {
|
|
|
169
163
|
cs.add(cmp, deletionType);
|
|
170
164
|
return cmp;
|
|
171
165
|
};
|
|
172
|
-
const componentSetBuilderErrorHandler = (e) => {
|
|
173
|
-
if (e instanceof Error && e.message.includes('Missing metadata type definition in registry for id')) {
|
|
174
|
-
// to remain generic to catch missing metadata types regardless of parameters, split on '
|
|
175
|
-
// example message : Missing metadata type definition in registry for id 'NonExistentType'
|
|
176
|
-
const issueType = e.message.split("'")[1];
|
|
177
|
-
throw new core_1.SfError(`The specified metadata type is unsupported: [${issueType}]`);
|
|
178
|
-
}
|
|
179
|
-
else {
|
|
180
|
-
throw e;
|
|
181
|
-
}
|
|
182
|
-
};
|
|
183
166
|
const validateAndResolvePath = (filepath) => path.resolve(assertFileExists(filepath));
|
|
184
167
|
const assertFileExists = (filepath) => {
|
|
185
168
|
if (!graceful_fs_1.default.existsSync(filepath)) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"componentSetBuilder.js","sourceRoot":"","sources":["../../../src/collections/componentSetBuilder.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,gDAAkC;AAClC,2CAA8E;AAC9E,8DAA6B;AAC7B,yCAAsC;AAEtC,gEAA6D;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AAE,IAAI,2BAAY,CAAC,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,2BAAY,CAAC,QAAQ,EAAE,CAAC,EAAE,OAAO,CAAC,QAAQ,CAAC;YACxF,QAAQ,EAAE,OAAO,CAAC,QAAQ;SAC3B,CAAC;aACC,mBAAmB,EAAE;aACrB,OAAO,EAAE;YACV,iFAAiF;aAChF,MAAM,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,IAAA,qBAAS,EAAC,EAAE,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAC;IACzD,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,YAAY,EAAE,CAAC,CAAC;AAE3C,4CAA4C;AAC5C,MAAM,sBAAsB,GAAG,CAAC,UAAyC,EAAe,EAAE;IACxF,MAAM,KAAK,GAAgB,IAAI,GAAG,EAAoB,CAAC;IACvD,UAAU,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE;QACrB,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,EAAE,GAAG,CAAC,YAAY,CAAC,CAAC,CAAC;IACpF,CAAC,CAAC,CAAC;IACH,OAAO,KAAK,CAAC;AACf,CAAC,CAAC"}
|
|
@@ -26,6 +26,13 @@ const ts_types_1 = require("@salesforce/ts-types");
|
|
|
26
26
|
* `decodeableMap.has('layout#Layout__Broker__c-v9.2 Broker Layout')` --> returns `true`
|
|
27
27
|
*/
|
|
28
28
|
class DecodeableMap extends Map {
|
|
29
|
+
// Internal map of decoded keys to encoded keys.
|
|
30
|
+
// E.g., { 'foo-v1.3 Layout': 'foo-v1%2E3 Layout' }
|
|
31
|
+
// This is initialized in the `keysMap` getter due to the constructor calling
|
|
32
|
+
// `super` before the initialization happens, and it needs to be initialized
|
|
33
|
+
// before `this.set()` is called or `TypeErrors` will be thrown.
|
|
34
|
+
internalkeysMap;
|
|
35
|
+
internalLogger;
|
|
29
36
|
get keysMap() {
|
|
30
37
|
if (!this.internalkeysMap) {
|
|
31
38
|
this.internalkeysMap = new Map();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"decodeableMap.js","sourceRoot":"","sources":["../../../src/collections/decodeableMap.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,2CAA0C;AAC1C,mDAAgD;AAEhD;;;;;;;;;;;;;;;GAeG;AACH,MAAa,aAAmC,SAAQ,GAAc;
|
|
1
|
+
{"version":3,"file":"decodeableMap.js","sourceRoot":"","sources":["../../../src/collections/decodeableMap.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,2CAA0C;AAC1C,mDAAgD;AAEhD;;;;;;;;;;;;;;;GAeG;AACH,MAAa,aAAmC,SAAQ,GAAc;IACpE,gDAAgD;IAChD,mDAAmD;IACnD,6EAA6E;IAC7E,4EAA4E;IAC5E,gEAAgE;IACxD,eAAe,CAAuB;IAEtC,cAAc,CAAU;IAEhC,IAAY,OAAO;QACjB,IAAI,CAAC,IAAI,CAAC,eAAe,EAAE,CAAC;YAC1B,IAAI,CAAC,eAAe,GAAG,IAAI,GAAG,EAAE,CAAC;QACnC,CAAC;QACD,OAAO,IAAI,CAAC,eAAe,CAAC;IAC9B,CAAC;IAED,IAAY,MAAM;QAChB,IAAI,CAAC,IAAI,CAAC,cAAc,EAAE,CAAC;YACzB,IAAI,CAAC,cAAc,GAAG,aAAM,CAAC,aAAa,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;QACpE,CAAC;QACD,OAAO,IAAI,CAAC,cAAc,CAAC;IAC7B,CAAC;IAED;;OAEG;IACI,GAAG,CAAC,GAAM;QACf,OAAO,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC;IACpC,CAAC;IAED;;;;OAIG;IACI,GAAG,CAAC,GAAM;QACf,MAAM,WAA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AAC;oBAChD,IAAI,UAAU,IAAI,KAAK,CAAC,GAAG,CAAC,UAAU,CAAC,EAAE,CAAC;wBACxC,OAAO,UAAU,CAAC;oBACpB,CAAC;gBACH,CAAC;YACH,CAAC;YAAC,OAAO,CAAU,EAAE,CAAC;gBACpB,4BAA4B;gBAC5B,MAAM,MAAM,GAAG,CAAC,YAAY,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,IAAA,mBAAQ,EAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;gBAC5E,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,kCAAkC,GAAG,YAAY,MAAM,EAAE,CAAC,CAAC;YAC/E,CAAC;QACH,CAAC;IACH,CAAC;CACF;AAzFD,sCAyFC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lazyCollection.js","sourceRoot":"","sources":["../../../src/collections/lazyCollection.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,MAAa,cAAc;
|
|
1
|
+
{"version":3,"file":"lazyCollection.js","sourceRoot":"","sources":["../../../src/collections/lazyCollection.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,MAAa,cAAc;IACf,QAAQ,CAA0B;IAE5C,YAAmB,QAAsB;QACvC,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC3B,CAAC;IAEM,KAAK;QACV,OAAO,IAAI,CAAC,WAAW,EAAE,CAAC,IAAI,EAAE,CAAC,KAAsB,CAAC;IAC1D,CAAC;IAEM,IAAI,CAAC,SAAkC;QAC5C,MAAM,IAAI,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC;QAChC,IAAI,IAAI,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC;QACvB,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;YAClB,IAAI,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;gBAC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AM,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YACxB,IAAI,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC;QACrB,CAAC;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;IAED;;;;;;OAMG;IACI,CAAC,MAAM,CAAC,QAAQ,CAAC;QACtB,OAAO,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC;IAClF,CAAC;IAEO,WAAW;QACjB,OAAO,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC;IACpF,CAAC;CACF;AA/ED,wCA+EC"}
|
|
@@ -9,11 +9,9 @@ const transactionFinalizer_1 = require("./transactionFinalizer");
|
|
|
9
9
|
* A state manager over the course of a single metadata conversion call.
|
|
10
10
|
*/
|
|
11
11
|
class ConvertContext {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
this.nonDecomposition = new nonDecompositionFinalizer_1.NonDecompositionFinalizer();
|
|
16
|
-
}
|
|
12
|
+
decomposition = new decompositionFinalizer_1.DecompositionFinalizer();
|
|
13
|
+
recomposition = new recompositionFinalizer_1.RecompositionFinalizer();
|
|
14
|
+
nonDecomposition = new nonDecompositionFinalizer_1.NonDecompositionFinalizer();
|
|
17
15
|
// eslint-disable-next-line @typescript-eslint/require-await
|
|
18
16
|
async *executeFinalizers(defaultDirectory) {
|
|
19
17
|
for (const member of Object.values(this)) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"convertContext.js","sourceRoot":"","sources":["../../../../src/convert/convertContext/convertContext.ts"],"names":[],"mappings":";;;AAOA,qEAAkE;AAClE,2EAAwE;AACxE,qEAAkE;AAClE,iEAAqE;AAErE;;GAEG;AACH,MAAa,cAAc;
|
|
1
|
+
{"version":3,"file":"convertContext.js","sourceRoot":"","sources":["../../../../src/convert/convertContext/convertContext.ts"],"names":[],"mappings":";;;AAOA,qEAAkE;AAClE,2EAAwE;AACxE,qEAAkE;AAClE,iEAAqE;AAErE;;GAEG;AACH,MAAa,cAAc;IACT,aAAa,GAAG,IAAI,+CAAsB,EAAE,CAAC;IAC7C,aAAa,GAAG,IAAI,+CAAsB,EAAE,CAAC;IAC7C,gBAAgB,GAAG,IAAI,qDAAyB,EAAE,CAAC;IAEnE,4DAA4D;IACrD,KAAK,CAAC,CAAC,iBAAiB,CAAC,gBAAyB;QACvD,KAAK,MAAM,MAAM,IAAI,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC;YACzC,IAAI,MAAM,YAAY,kDAA2B,EAAE,CAAC;gBAClD,MAAM,MAAM,CAAC,QAAQ,CAAC,gBAAgB,CAAC,CAAC;YAC1C,CAAC;QACH,CAAC;IACH,CAAC;CACF;AAbD,wCAaC"}
|
|
@@ -10,10 +10,7 @@ const hasFullDecompositionInfo = (value) => Boolean(value[1].writeInfo) && Boole
|
|
|
10
10
|
* with in the conversion pipeline.
|
|
11
11
|
*/
|
|
12
12
|
class DecompositionFinalizer extends transactionFinalizer_1.ConvertTransactionFinalizer {
|
|
13
|
-
|
|
14
|
-
super(...arguments);
|
|
15
|
-
this.transactionState = new Map();
|
|
16
|
-
}
|
|
13
|
+
transactionState = new Map();
|
|
17
14
|
// eslint-disable-next-line @typescript-eslint/require-await
|
|
18
15
|
async finalize() {
|
|
19
16
|
return (Array.from(this.transactionState.entries())
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"decompositionFinalizer.js","sourceRoot":"","sources":["../../../../src/convert/convertContext/decompositionFinalizer.ts"],"names":[],"mappings":";;;AAQA,iEAAqE;AAUrE,mGAAmG;AACnG,MAAM,wBAAwB,GAAG,CAC/B,KAAwC,EAC0D,EAAE,CACpG,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,IAAI,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;AAE1D;;;;GAIG;AACH,MAAa,sBAAuB,SAAQ,kDAA+C;
|
|
1
|
+
{"version":3,"file":"decompositionFinalizer.js","sourceRoot":"","sources":["../../../../src/convert/convertContext/decompositionFinalizer.ts"],"names":[],"mappings":";;;AAQA,iEAAqE;AAUrE,mGAAmG;AACnG,MAAM,wBAAwB,GAAG,CAC/B,KAAwC,EAC0D,EAAE,CACpG,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,IAAI,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;AAE1D;;;;GAIG;AACH,MAAa,sBAAuB,SAAQ,kDAA+C;IAClF,gBAAgB,GAAuB,IAAI,GAAG,EAAmC,CAAC;IAEzF,4DAA4D;IACrD,KAAK,CAAC,QAAQ;QACnB,OAAO,CACL,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,OAAO,EAAE,CAAC;aACxC,MAAM,CAAC,wBAAwB,CAAC;YACjC,mCAAmC;aAClC,MAAM,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC;aACxC,GAAG,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,SAAS,EAAE,KAAK,CAAC,MAAM,EAAE,MAAM,IAAI,KAAK,CAAC,MAAM,EAAE,UAAU,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC,CAC5G,CAAC;IACJ,CAAC;CACF;AAbD,wDAaC"}
|
|
@@ -23,17 +23,15 @@ const transactionFinalizer_1 = require("./transactionFinalizer");
|
|
|
23
23
|
* Inserts unclaimed child components into the parent that belongs to the default package
|
|
24
24
|
*/
|
|
25
25
|
class NonDecompositionFinalizer extends transactionFinalizer_1.ConvertTransactionFinalizer {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
this.parentComponentMap = new Map();
|
|
36
|
-
}
|
|
26
|
+
transactionState = {
|
|
27
|
+
childrenByUniqueElement: new Map(),
|
|
28
|
+
exampleComponent: undefined,
|
|
29
|
+
};
|
|
30
|
+
// filename => (childName => childXml)
|
|
31
|
+
mergeMap = new Map();
|
|
32
|
+
// filename => sourceComponent
|
|
33
|
+
parentComponentMap = new Map();
|
|
34
|
+
tree;
|
|
37
35
|
async finalize(defaultDirectory, tree = new treeContainers_1.NodeFSTreeContainer()) {
|
|
38
36
|
const writerData = [];
|
|
39
37
|
if (this.transactionState.childrenByUniqueElement.size === 0) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nonDecompositionFinalizer.js","sourceRoot":"","sources":["../../../../src/convert/convertContext/nonDecompositionFinalizer.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,yCAAiC;AACjC,mDAAwE;AACxE,2CAA6C;AAC7C,uDAAuD;AACvD,sDAAiF;AACjF,iEAA8D;AAC9D,iEAAkF;AAElF,wCAAqC;AAErC,iEAAqE;AAUrE;;;;;GAKG;AACH,MAAa,yBAA0B,SAAQ,kDAAkD;
|
|
1
|
+
{"version":3,"file":"nonDecompositionFinalizer.js","sourceRoot":"","sources":["../../../../src/convert/convertContext/nonDecompositionFinalizer.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,yCAAiC;AACjC,mDAAwE;AACxE,2CAA6C;AAC7C,uDAAuD;AACvD,sDAAiF;AACjF,iEAA8D;AAC9D,iEAAkF;AAElF,wCAAqC;AAErC,iEAAqE;AAUrE;;;;;GAKG;AACH,MAAa,yBAA0B,SA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YAC1D,MAAM,iBAAiB,CAAC,CAAC,CAAC;SAC3B,CACF,CACF,CAAC;QAEF,IAAI,CAAC,QAAQ,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,CAAC;IAClC,CAAC;CACF;AAxJD,8DAwJC;AAED,sEAAsE;AACtE,MAAM,SAAS,GAAG,CAAC,QAA8B,EAAE,qBAAsC,EAAW,EAAE,CAAC,CAAC;IACtG,CAAC,qBAAqB,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;QACjC,CAAC,sBAAU,CAAC,EAAE,sBAAU;QACxB,oCAAoC;QACpC,CAAC,IAAA,0BAAa,EAAC,qBAAqB,CAAC,IAAI,CAAC,CAAC,EAAE,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC;KAC3E;CACF,CAAC,CAAC;AAEH,gEAAgE;AAChE,MAAM,gBAAgB,GAAG,CAAC,SAA0B,EAAU,EAAE;IAC9D,MAAM,EAAE,QAAQ,EAAE,GAAG,SAAS,CAAC;IAC/B,MAAM,CAAC,QAAQ,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACvC,MAAM,MAAM,GAAG,GAAG,QAAQ,IAAI,SAAS,CAAC,IAAI,CAAC,MAAM,IAAI,EAAE,GAAG,2BAAe,EAAE,CAAC;IAE9E,OAAO,IAAA,gBAAI,EAAC,SAAS,CAAC,sBAAsB,CAAC,EAAE,EAAE,QAAQ,CAAC,EAAE,MAAM,CAAC,CAAC;AACtE,CAAC,CAAC"}
|
|
@@ -15,7 +15,7 @@ const sourceComponent_1 = require("../../resolve/sourceComponent");
|
|
|
15
15
|
const streams_1 = require("../streams");
|
|
16
16
|
const transactionFinalizer_1 = require("./transactionFinalizer");
|
|
17
17
|
;
|
|
18
|
-
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>"]]));
|
|
18
|
+
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>"]]));
|
|
19
19
|
/**
|
|
20
20
|
* Merges child components that share the same parent in the conversion pipeline into a single file.
|
|
21
21
|
*
|
|
@@ -23,11 +23,8 @@ const messages = new core_1.Messages('@salesforce/source-deploy-retrieve', 'sdr'
|
|
|
23
23
|
*
|
|
24
24
|
*/
|
|
25
25
|
class RecompositionFinalizer extends transactionFinalizer_1.ConvertTransactionFinalizer {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
this.transactionState = new Map();
|
|
29
|
-
this.xmlCache = new Map();
|
|
30
|
-
}
|
|
26
|
+
transactionState = new Map();
|
|
27
|
+
xmlCache = new Map();
|
|
31
28
|
async finalize() {
|
|
32
29
|
return Promise.all([...this.transactionState.values()]
|
|
33
30
|
.filter(ensureStateValueWithParent)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recompositionFinalizer.js","sourceRoot":"","sources":["../../../../src/convert/convertContext/recompositionFinalizer.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,yCAAiC;AAEjC,2CAA4C;AAC5C,uDAAkF;AAElF,sDAAgE;AAGhE,mEAAgE;AAChE,wCAAqC;AAErC,iEAAqE;;AAGrE,MAAM,QAAQ,OAAG,eAAQ,CAAc,oCAAoC,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"recompositionFinalizer.js","sourceRoot":"","sources":["../../../../src/convert/convertContext/recompositionFinalizer.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,yCAAiC;AAEjC,2CAA4C;AAC5C,uDAAkF;AAElF,sDAAgE;AAGhE,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ccess");
|
|
|
20
20
|
const streams_1 = require("./streams");
|
|
21
21
|
const replacements_1 = require("./replacements");
|
|
22
22
|
;
|
|
23
|
-
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>"]]));
|
|
23
|
+
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>"]]));
|
|
24
24
|
class MetadataConverter {
|
|
25
|
+
static PACKAGE_XML_FILE = 'package.xml';
|
|
26
|
+
static DESTRUCTIVE_CHANGES_POST_XML_FILE = 'destructiveChangesPost.xml';
|
|
27
|
+
static DESTRUCTIVE_CHANGES_PRE_XML_FILE = 'destructiveChangesPre.xml';
|
|
28
|
+
static DEFAULT_PACKAGE_PREFIX = 'metadataPackage';
|
|
29
|
+
registry;
|
|
25
30
|
constructor(registry = new registryAccess_1.RegistryAccess()) {
|
|
26
31
|
this.registry = registry;
|
|
27
32
|
}
|
|
@@ -55,10 +60,6 @@ class MetadataConverter {
|
|
|
55
60
|
}
|
|
56
61
|
}
|
|
57
62
|
exports.MetadataConverter = MetadataConverter;
|
|
58
|
-
MetadataConverter.PACKAGE_XML_FILE = 'package.xml';
|
|
59
|
-
MetadataConverter.DESTRUCTIVE_CHANGES_POST_XML_FILE = 'destructiveChangesPost.xml';
|
|
60
|
-
MetadataConverter.DESTRUCTIVE_CHANGES_PRE_XML_FILE = 'destructiveChangesPre.xml';
|
|
61
|
-
MetadataConverter.DEFAULT_PACKAGE_PREFIX = 'metadataPackage';
|
|
62
63
|
const getResult = (registry) => (packagePath) => async (writer) => {
|
|
63
64
|
// union type discrimination
|
|
64
65
|
if ('addToZip' in writer) {
|