@salesforce/source-deploy-retrieve 12.10.4 → 12.11.0

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/LICENSE.txt CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2024, Salesforce.com, Inc.
1
+ Copyright (c) 2025, Salesforce.com, Inc.
2
2
  All rights reserved.
3
3
 
4
4
  Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
@@ -8,8 +8,18 @@ export type ManifestOption = {
8
8
  destructiveChangesPost?: string;
9
9
  };
10
10
  type MetadataOption = {
11
+ /**
12
+ * Array of metadata type:name pairs to include in the ComponentSet.
13
+ */
11
14
  metadataEntries: string[];
15
+ /**
16
+ * Array of filesystem directory paths to search for local metadata to include in the ComponentSet.
17
+ */
12
18
  directoryPaths: string[];
19
+ /**
20
+ * Array of metadata type:name pairs to exclude from the ComponentSet.
21
+ */
22
+ excludedEntries?: string[];
13
23
  /**
14
24
  * Array of metadata type:name pairs to delete before the deploy. Use of wildcards is not allowed.
15
25
  */
@@ -44,6 +54,7 @@ export declare class ComponentSetBuilder {
44
54
  * @param options: options for creating a ComponentSet
45
55
  */
46
56
  static build(options: ComponentSetOptions): Promise<ComponentSet>;
57
+ private static resolveOrgComponents;
47
58
  }
48
59
  type MetadataTypeAndMetadataName = {
49
60
  type: MetadataType;
@@ -44,6 +44,13 @@ const resolve_1 = require("../resolve");
44
44
  const types_1 = require("./types");
45
45
  ;
46
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
+ let logger;
48
+ const getLogger = () => {
49
+ if (!logger) {
50
+ logger = core_1.Logger.childFromRoot('ComponentSetBuilder');
51
+ }
52
+ return logger;
53
+ };
47
54
  class ComponentSetBuilder {
48
55
  /**
49
56
  * Builds a ComponentSet that can be used for source conversion,
@@ -54,12 +61,11 @@ class ComponentSetBuilder {
54
61
  * @param options: options for creating a ComponentSet
55
62
  */
56
63
  static async build(options) {
57
- const logger = core_1.Logger.childFromRoot('componentSetBuilder');
58
64
  let componentSet;
59
65
  const { sourcepath, manifest, metadata, packagenames, org } = options;
60
66
  const registry = new registryAccess_1.RegistryAccess(undefined, options.projectDir);
61
67
  if (sourcepath) {
62
- logger.debug(`Building ComponentSet from sourcepath: ${sourcepath.join(', ')}`);
68
+ getLogger().debug(`Building ComponentSet from sourcepath: ${sourcepath.join(', ')}`);
63
69
  const fsPaths = sourcepath.map(validateAndResolvePath);
64
70
  componentSet = componentSet_1.ComponentSet.fromSource({
65
71
  fsPaths,
@@ -68,14 +74,14 @@ class ComponentSetBuilder {
68
74
  }
69
75
  // Return empty ComponentSet and use packageNames in the connection via `.retrieve` options
70
76
  if (packagenames) {
71
- logger.debug(`Building ComponentSet for packagenames: ${packagenames.toString()}`);
77
+ getLogger().debug(`Building ComponentSet for packagenames: ${packagenames.toString()}`);
72
78
  componentSet ??= new componentSet_1.ComponentSet(undefined, registry);
73
79
  }
74
80
  // Resolve manifest with source in package directories.
75
81
  if (manifest) {
76
- logger.debug(`Building ComponentSet from manifest: ${manifest.manifestPath}`);
82
+ getLogger().debug(`Building ComponentSet from manifest: ${manifest.manifestPath}`);
77
83
  assertFileExists(manifest.manifestPath);
78
- logger.debug(`Searching in packageDir: ${manifest.directoryPaths.join(', ')} for matching metadata`);
84
+ getLogger().debug(`Searching in packageDir: ${manifest.directoryPaths.join(', ')} for matching metadata`);
79
85
  componentSet = await componentSet_1.ComponentSet.fromManifest({
80
86
  manifestPath: manifest.manifestPath,
81
87
  resolveSourcePaths: manifest.directoryPaths,
@@ -85,9 +91,10 @@ class ComponentSetBuilder {
85
91
  registry,
86
92
  });
87
93
  }
88
- // Resolve metadata entries with source in package directories.
89
- if (metadata) {
90
- logger.debug(`Building ComponentSet from metadata: ${metadata.metadataEntries.toString()}`);
94
+ // Resolve metadata entries with source in package directories, unless we are building a ComponentSet
95
+ // from metadata in an org.
96
+ if (metadata && !org) {
97
+ getLogger().debug(`Building ComponentSet from metadata: ${metadata.metadataEntries.toString()}`);
91
98
  const directoryPaths = metadata.directoryPaths;
92
99
  componentSet ??= new componentSet_1.ComponentSet(undefined, registry);
93
100
  const componentSetFilter = new componentSet_1.ComponentSet(undefined, registry);
@@ -97,7 +104,7 @@ class ComponentSetBuilder {
97
104
  .flatMap(typeAndNameToMetadataComponents({ directoryPaths, registry }))
98
105
  .map(addToComponentSet(componentSet))
99
106
  .map(addToComponentSet(componentSetFilter));
100
- logger.debug(`Searching for matching metadata in directories: ${directoryPaths.join(', ')}`);
107
+ getLogger().debug(`Searching for matching metadata in directories: ${directoryPaths.join(', ')}`);
101
108
  // add destructive changes if defined. Because these are deletes, all entries
102
109
  // are resolved to SourceComponents
103
110
  if (metadata.destructiveEntriesPre) {
@@ -137,26 +144,37 @@ class ComponentSetBuilder {
137
144
  // Resolve metadata entries with an org connection
138
145
  if (org) {
139
146
  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));
147
+ const orgComponentSet = await this.resolveOrgComponents(registry, org, metadata);
148
+ orgComponentSet.toArray().map(addToComponentSet(componentSet));
151
149
  }
152
150
  // there should have been a componentSet created by this point.
153
151
  componentSet = assertComponentSetIsNotUndefined(componentSet);
154
152
  componentSet.apiVersion ??= options.apiversion;
155
153
  componentSet.sourceApiVersion ??= options.sourceapiversion;
156
154
  componentSet.projectDirectory = options.projectDir;
157
- logComponents(logger, componentSet);
155
+ logComponents(componentSet);
158
156
  return componentSet;
159
157
  }
158
+ static async resolveOrgComponents(registry, org, metadata) {
159
+ let mdMap = new Map();
160
+ let debugMsg = `Building ComponentSet from metadata in an org using targetUsername: ${org.username}`;
161
+ if (metadata) {
162
+ if (metadata.metadataEntries?.length) {
163
+ debugMsg += ` filtering on metadata: ${metadata.metadataEntries.toString()}`;
164
+ }
165
+ if (metadata.excludedEntries?.length) {
166
+ debugMsg += ` excluding metadata: ${metadata.excludedEntries.toString()}`;
167
+ }
168
+ mdMap = buildMapFromMetadata(metadata, registry);
169
+ }
170
+ getLogger().debug(debugMsg);
171
+ return componentSet_1.ComponentSet.fromConnection({
172
+ usernameOrConnection: (await core_1.StateAggregator.getInstance()).aliases.getUsername(org.username) ?? org.username,
173
+ componentFilter: getOrgComponentFilter(org, mdMap, metadata),
174
+ metadataTypes: mdMap.size ? Array.from(mdMap.keys()) : undefined,
175
+ registry,
176
+ });
177
+ }
160
178
  }
161
179
  exports.ComponentSetBuilder = ComponentSetBuilder;
162
180
  const addToComponentSet = (cs, deletionType) => (cmp) => {
@@ -184,19 +202,19 @@ const assertNoWildcardInDestructiveEntries = (mdEntry) => {
184
202
  };
185
203
  /** This is only for debug output of matched files based on the command flags.
186
204
  * It will log up to 20 file matches. */
187
- const logComponents = (logger, componentSet) => {
188
- logger.debug(`Matching metadata files (${componentSet.size}):`);
205
+ const logComponents = (componentSet) => {
206
+ getLogger().debug(`Matching metadata files (${componentSet.size}):`);
189
207
  const components = componentSet.getSourceComponents().toArray();
190
208
  components
191
209
  .slice(0, 20)
192
210
  .map((cmp) => cmp.content ?? cmp.xml ?? cmp.fullName)
193
- .map((m) => logger.debug(m));
211
+ .map((m) => getLogger().debug(m));
194
212
  if (components.length > 20)
195
- logger.debug(`(showing 20 of ${componentSet.size} matches)`);
196
- logger.debug(`ComponentSet apiVersion = ${componentSet.apiVersion ?? '<not set>'}`);
197
- logger.debug(`ComponentSet sourceApiVersion = ${componentSet.sourceApiVersion ?? '<not set>'}`);
213
+ getLogger().debug(`(showing 20 of ${componentSet.size} matches)`);
214
+ getLogger().debug(`ComponentSet apiVersion = ${componentSet.apiVersion ?? '<not set>'}`);
215
+ getLogger().debug(`ComponentSet sourceApiVersion = ${componentSet.sourceApiVersion ?? '<not set>'}`);
198
216
  };
199
- const getOrgComponentFilter = (org, mdMap, metadata) => metadata
217
+ const getOrgComponentFilter = (org, mdMap, metadata) => metadata?.metadataEntries?.length
200
218
  ? (component) => {
201
219
  if (component.type && component.fullName) {
202
220
  const mdMapEntry = mdMap.get(component.type);
@@ -241,12 +259,31 @@ metadataName?.includes('*') && metadataName.length > 1 && !metadataName.includes
241
259
  // using minimatch versus RegExp provides better (more expected) matching results
242
260
  .filter((cs) => (0, minimatch_1.minimatch)(cs.fullName, metadataName))
243
261
  : [{ type, fullName: metadataName }];
244
- // TODO: use Map.groupBy when it's available
245
- const buildMapFromComponents = (components) => {
262
+ const buildMapFromMetadata = (mdOption, registry) => {
246
263
  const mdMap = new Map();
247
- components.map((cmp) => {
248
- mdMap.set(cmp.type.name, [...(mdMap.get(cmp.type.name) ?? []), cmp.metadataName]);
249
- });
264
+ // Add metadata type entries we were told to include
265
+ if (mdOption.metadataEntries?.length) {
266
+ mdOption.metadataEntries.map((0, exports.entryToTypeAndName)(registry)).map((cmp) => {
267
+ mdMap.set(cmp.type.name, [...(mdMap.get(cmp.type.name) ?? []), cmp.metadataName]);
268
+ });
269
+ }
270
+ // Build an array of excluded types from the options
271
+ if (mdOption.excludedEntries?.length) {
272
+ const excludedTypes = [];
273
+ mdOption.excludedEntries.map((0, exports.entryToTypeAndName)(registry)).map((cmp) => {
274
+ if (cmp.metadataName === '*') {
275
+ excludedTypes.push(cmp.type.name);
276
+ }
277
+ });
278
+ if (mdMap.size === 0) {
279
+ // we are excluding specific metadata types from all supported types
280
+ Object.values(registry.getRegistry().types).map((t) => {
281
+ if (!excludedTypes.includes(t.name)) {
282
+ mdMap.set(t.name, []);
283
+ }
284
+ });
285
+ }
286
+ }
250
287
  return mdMap;
251
288
  };
252
289
  //# sourceMappingURL=componentSetBuilder.js.map
@@ -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;AAC7D,8DAA2D;AAC3D,+DAA4D;AAG5D,wCAA8C;AAC9C,mCAAwE;;AAGxE,MAAM,QAAQ,OAAG,eAAQ,CAAc,oCAAoC,EAAE,KAAK,qyLAAC,CAAC;AAyCpF,MAAa,mBAAmB;IAC9B;;;;;;;OAOG;IAEI,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,OAA4B;QACpD,MAAM,MAAM,GAAG,aAAM,CAAC,aAAa,CAAC,qBAAqB,CAAC,CAAC;QAC3D,IAAI,YAAsC,CAAC;QAE3C,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,QAAQ,EAAE,YAAY,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC;QACtE,MAAM,QAAQ,GAAG,IAAI,+BAAc,CAAC,SAAS,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC;QAEnE,IAAI,UAAU,EAAE,CAAC;YACf,MAAM,CAAC,KAAK,CAAC,0CAA0C,UAAU,CAAC,IAAI,CAAC,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AG,CAAC,CAAC,GAAG,EAAE,EAAE;YACrE,IAAI,GAAG,CAAC,YAAY,KAAK,GAAG,EAAE,CAAC;gBAC7B,aAAa,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACpC,CAAC;QACH,CAAC,CAAC,CAAC;QACH,IAAI,KAAK,CAAC,IAAI,KAAK,CAAC,EAAE,CAAC;YACrB,oEAAoE;YACpE,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,WAAW,EAAE,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE;gBACpD,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC;oBACpC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;gBACxB,CAAC;YACH,CAAC,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC,CAAC"}
@@ -7,12 +7,17 @@ export type ResolveConnectionResult = {
7
7
  apiVersion: string;
8
8
  };
9
9
  /**
10
- * Resolve MetadataComponents from an org connection
10
+ * Resolve MetadataComponents from an org connection by making listMetadata API calls
11
+ * for the specified metadata types (`mdTypes` arg) or all supported metadata types
12
+ * in the registry.
11
13
  */
12
14
  export declare class ConnectionResolver {
13
15
  private connection;
14
16
  private registry;
15
17
  private mdTypeNames;
18
+ private requestBatchSize;
16
19
  constructor(connection: Connection, registry?: RegistryAccess, mdTypes?: string[]);
17
20
  resolve(componentFilter?: (component: Partial<FileProperties>) => boolean): Promise<ResolveConnectionResult>;
21
+ private sendBatchedRequests;
22
+ private sendBatchedQueries;
18
23
  }
@@ -7,15 +7,36 @@
7
7
  */
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
9
  exports.ConnectionResolver = void 0;
10
+ const node_util_1 = require("node:util");
10
11
  const core_1 = require("@salesforce/core");
11
12
  const ts_types_1 = require("@salesforce/ts-types");
13
+ const kit_1 = require("@salesforce/kit");
12
14
  const registryAccess_1 = require("../registry/registryAccess");
13
15
  const standardvalueset_1 = require("../registry/standardvalueset");
14
16
  const path_1 = require("../utils/path");
15
17
  ;
16
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
+ let requestCount = 0;
20
+ let shouldQueryStandardValueSets = false;
21
+ let logger;
22
+ const getLogger = () => {
23
+ if (!logger) {
24
+ logger = core_1.Logger.childFromRoot('ConnectionResolver');
25
+ }
26
+ return logger;
27
+ };
28
+ // *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
29
+ //
30
+ // NOTE: The `listMetadata` API supports passing 3 metadata types per call but we
31
+ // can't do this because if 1 of the 3 types is not supported by the org (or
32
+ // errors in some way) we don't get any data back about the other types. This
33
+ // means we are forced to make listMetadata calls for individual metadata types.
34
+ //
35
+ // *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
17
36
  /**
18
- * Resolve MetadataComponents from an org connection
37
+ * Resolve MetadataComponents from an org connection by making listMetadata API calls
38
+ * for the specified metadata types (`mdTypes` arg) or all supported metadata types
39
+ * in the registry.
19
40
  */
20
41
  class ConnectionResolver {
21
42
  connection;
@@ -23,6 +44,7 @@ class ConnectionResolver {
23
44
  // Array of metadata type names to use for listMembers. By default it includes
24
45
  // all types defined in the registry.
25
46
  mdTypeNames;
47
+ requestBatchSize;
26
48
  constructor(connection, registry = new registryAccess_1.RegistryAccess(), mdTypes) {
27
49
  this.connection = connection;
28
50
  this.registry = registry;
@@ -30,14 +52,23 @@ class ConnectionResolver {
30
52
  ? // ensure the types passed in are valid per the registry
31
53
  mdTypes.filter((t) => this.registry.getTypeByName(t))
32
54
  : Object.values(this.registry.getRegistry().types).map((t) => t.name);
55
+ // Always reset this. listMembers() function detects and sets it.
56
+ shouldQueryStandardValueSets = false;
57
+ // To limit the number of concurrent requests, batch them per an env var.
58
+ // By default there is no batching.
59
+ this.requestBatchSize = kit_1.env.getNumber('SF_LIST_METADATA_BATCH_SIZE', -1);
33
60
  }
34
61
  async resolve(componentFilter = (component) => (0, ts_types_1.isPlainObject)(component)) {
62
+ // Aggregate array of metadata records in the org
35
63
  const Aggregator = [];
36
- const childrenPromises = [];
37
- const componentTypes = new Set();
64
+ // Folder component type names. Each array value has the form [type::folder]
65
+ const folderComponentTypes = [];
66
+ // Child component type names
67
+ const childComponentTypes = new Set();
38
68
  const lifecycle = core_1.Lifecycle.getInstance();
39
- const componentFromDescribe = (await Promise.all(this.mdTypeNames.map((type) => listMembers(this.registry)(this.connection)({ type })))).flat();
40
- for (const component of componentFromDescribe) {
69
+ // Make batched listMetadata requests for top level metadata
70
+ const listMetadataResponses = await this.sendBatchedRequests(this.mdTypeNames);
71
+ for (const component of listMetadataResponses) {
41
72
  let componentType;
42
73
  if (isNonEmptyString(component.type)) {
43
74
  componentType = this.registry.getTypeByName(component.type);
@@ -62,25 +93,28 @@ class ConnectionResolver {
62
93
  throw new core_1.SfError(messages.getMessage('error_could_not_infer_type', [component.fullName]), 'TypeInferenceError', [messages.getMessage('suggest_type_more_suggestions')]);
63
94
  }
64
95
  Aggregator.push(component);
65
- componentTypes.add(componentType);
66
96
  if (componentType.folderContentType) {
67
- childrenPromises.push(listMembers(this.registry)(this.connection)({
68
- type: this.registry.getTypeByName(componentType.folderContentType).name,
69
- folder: component.fullName,
70
- }));
97
+ const type = this.registry.getTypeByName(componentType.folderContentType).name;
98
+ const folder = component.fullName;
99
+ folderComponentTypes.push(`${type}::${folder}`);
71
100
  }
72
- }
73
- for (const componentType of componentTypes) {
74
101
  const childTypes = componentType.children?.types;
75
102
  if (childTypes) {
76
- Object.values(childTypes).map((childType) => {
77
- childrenPromises.push(listMembers(this.registry)(this.connection)({ type: childType.name }));
78
- });
103
+ Object.values(childTypes).map((childType) => childComponentTypes.add(childType.name));
79
104
  }
80
105
  }
81
- for await (const childrenResult of childrenPromises) {
82
- Aggregator.push(...childrenResult);
106
+ if (folderComponentTypes.length) {
107
+ Aggregator.push(...(await this.sendBatchedRequests(folderComponentTypes)));
108
+ }
109
+ if (childComponentTypes.size > 0) {
110
+ Aggregator.push(...(await this.sendBatchedRequests(Array.from(childComponentTypes))));
83
111
  }
112
+ // If we need to query the list of StandardValueSets (i.e., it's included in this.mdTypeNames)
113
+ // make those requests now.
114
+ if (shouldQueryStandardValueSets) {
115
+ Aggregator.push(...(await this.sendBatchedQueries()));
116
+ }
117
+ getLogger().debug(`https request count = ${requestCount}`);
84
118
  return {
85
119
  components: Aggregator.filter(componentFilter).map((component) => ({
86
120
  fullName: (0, ts_types_1.ensureString)(component.fullName, `Component fullName was not set for ${component.fileName ?? '<missing filename>'}`),
@@ -89,40 +123,111 @@ class ConnectionResolver {
89
123
  apiVersion: this.connection.getApiVersion(),
90
124
  };
91
125
  }
126
+ // Send batched listMetadata requests based on the SF_LIST_METADATA_BATCH_SIZE env var.
127
+ async sendBatchedRequests(listMdQueries) {
128
+ const listMetadataResponses = [];
129
+ let listMetadataRequests = [];
130
+ const sendIt = async () => {
131
+ const requestBatch = (await Promise.all(listMetadataRequests)).flat();
132
+ listMetadataResponses.push(...requestBatch);
133
+ };
134
+ // Make batched listMetadata requests
135
+ for (let i = 0; i < listMdQueries.length;) {
136
+ const q = listMdQueries[i].split('::');
137
+ const listMdQuery = { type: q[0] };
138
+ if (q[1]) {
139
+ listMdQuery.folder = q[1];
140
+ }
141
+ listMetadataRequests.push(listMembers(this.registry)(this.connection)(listMdQuery));
142
+ i++;
143
+ if (this.requestBatchSize > 0 && i % this.requestBatchSize === 0) {
144
+ getLogger().debug(`Awaiting listMetadata requests ${i - this.requestBatchSize + 1} - ${i}`);
145
+ // We are deliberately awaiting the results of batches to throttle requests.
146
+ // eslint-disable-next-line no-await-in-loop
147
+ await sendIt();
148
+ // Reset the requests for the next batch
149
+ listMetadataRequests = [];
150
+ }
151
+ // Always flush the last batch; or send non-batched requests
152
+ if (i === listMdQueries.length) {
153
+ getLogger().debug('Awaiting listMetadata requests');
154
+ // We are deliberately awaiting the results of batches to throttle requests.
155
+ // eslint-disable-next-line no-await-in-loop
156
+ await sendIt();
157
+ }
158
+ }
159
+ return listMetadataResponses;
160
+ }
161
+ // Send batched queries for a known subset of StandardValueSets based on the
162
+ // SF_LIST_METADATA_BATCH_SIZE env var.
163
+ async sendBatchedQueries() {
164
+ const mdType = this.registry.getTypeByName('StandardValueSet');
165
+ const queryResponses = [];
166
+ let queryRequests = [];
167
+ const sendIt = async () => {
168
+ const requestBatch = (await Promise.all(queryRequests)).flat();
169
+ queryResponses.push(...requestBatch.filter((rb) => !!rb));
170
+ };
171
+ // Make batched query requests
172
+ const svsNames = standardvalueset_1.standardValueSet.fullnames;
173
+ for (let i = 0; i < svsNames.length;) {
174
+ const svsFullName = svsNames[i];
175
+ queryRequests.push(querySvs(this.connection)(svsFullName, mdType));
176
+ i++;
177
+ if (this.requestBatchSize > 0 && i % this.requestBatchSize === 0) {
178
+ getLogger().debug(`Awaiting StandardValueSet queries ${i - this.requestBatchSize + 1} - ${i}`);
179
+ // We are deliberately awaiting the results of batches to throttle requests.
180
+ // eslint-disable-next-line no-await-in-loop
181
+ await sendIt();
182
+ // Reset the requests for the next batch
183
+ queryRequests = [];
184
+ }
185
+ // Always flush the last batch; or send non-batched requests
186
+ if (i === svsNames.length) {
187
+ getLogger().debug('Awaiting StandardValueSet queries');
188
+ // We are deliberately awaiting the results of batches to throttle requests.
189
+ // eslint-disable-next-line no-await-in-loop
190
+ await sendIt();
191
+ }
192
+ }
193
+ return queryResponses;
194
+ }
92
195
  }
93
196
  exports.ConnectionResolver = ConnectionResolver;
197
+ const querySvs = (connection) => async (svsFullName, svsType) => {
198
+ try {
199
+ requestCount++;
200
+ getLogger().debug(`StandardValueSet query for ${svsFullName}`);
201
+ const standardValueSetRecord = await connection.singleRecordQuery(`SELECT Id, MasterLabel, Metadata FROM StandardValueSet WHERE MasterLabel = '${svsFullName}'`, { tooling: true });
202
+ if (standardValueSetRecord.Metadata.standardValue.length) {
203
+ return {
204
+ fullName: standardValueSetRecord.MasterLabel,
205
+ fileName: `${svsType.directoryName}/${standardValueSetRecord.MasterLabel}.${svsType.suffix ?? ''}`,
206
+ type: svsType.name,
207
+ };
208
+ }
209
+ }
210
+ catch (error) {
211
+ const err = core_1.SfError.wrap(error);
212
+ getLogger().debug(`[${svsFullName}] ${err.message}`);
213
+ }
214
+ };
94
215
  const listMembers = (registry) => (connection) => async (query) => {
95
216
  const mdType = registry.getTypeByName(query.type);
96
- // Workaround because metadata.list({ type: 'StandardValueSet' }) returns []
217
+ // Workaround because metadata.list({ type: 'StandardValueSet' }) returns [].
218
+ // Query for a subset of known StandardValueSets after all listMetadata calls.
97
219
  if (mdType.name === registry.getRegistry().types.standardvalueset.name) {
98
- const members = [];
99
- const standardValueSetPromises = standardvalueset_1.standardValueSet.fullnames.map(async (standardValueSetFullName) => {
100
- try {
101
- const standardValueSetRecord = await connection.singleRecordQuery(`SELECT Id, MasterLabel, Metadata FROM StandardValueSet WHERE MasterLabel = '${standardValueSetFullName}'`, { tooling: true });
102
- return (standardValueSetRecord.Metadata.standardValue.length && {
103
- fullName: standardValueSetRecord.MasterLabel,
104
- fileName: `${mdType.directoryName}/${standardValueSetRecord.MasterLabel}.${mdType.suffix ?? ''}`,
105
- type: mdType.name,
106
- });
107
- }
108
- catch (err) {
109
- const logger = core_1.Logger.childFromRoot('ConnectionResolver.listMembers');
110
- logger.debug(err);
111
- }
112
- });
113
- for await (const standardValueSetResult of standardValueSetPromises) {
114
- if (standardValueSetResult) {
115
- members.push(standardValueSetResult);
116
- }
117
- }
118
- return members;
220
+ shouldQueryStandardValueSets = true;
221
+ return [];
119
222
  }
120
223
  try {
224
+ requestCount++;
225
+ getLogger().debug(`listMetadata for ${(0, node_util_1.inspect)(query)}`);
121
226
  return (await connection.metadata.list(query)).map(inferFilenamesFromType(mdType));
122
227
  }
123
228
  catch (error) {
124
- const logger = core_1.Logger.childFromRoot('ConnectionResolver.listMembers');
125
- logger.debug(error.message);
229
+ const err = core_1.SfError.wrap(error);
230
+ getLogger().debug(`[${mdType.name}] ${err.message}`);
126
231
  return [];
127
232
  }
128
233
  };
@@ -1 +1 @@
1
- {"version":3,"file":"connectionResolver.js","sourceRoot":"","sources":["../../../src/resolve/connectionResolver.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,2CAAoF;AACpF,mDAAsF;AACtF,+DAA4D;AAE5D,mEAAgE;AAEhE,wCAAwC;;AAMxC,MAAM,QAAQ,OAAG,eAAQ,CAAc,oCAAoC,EAAE,KAAK,qyLAAC,CAAC;AAOpF;;GAEG;AACH,MAAa,kBAAkB;IACrB,UAAU,CAAa;IACvB,QAAQ,CAAiB;IAEjC,8EAA8E;IAC9E,qCAAqC;IAC7B,WAAW,CAAW;IAE9B,YAAmB,UAAsB,EAAE,QAAQ,GAAG,IAAI,+BAAc,EAAE,EAAE,OAAkB;QAC5F,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,WAAW,GAAG,OAAO,EAAE,MAAM;YAChC,CAAC,CAAC,wDAAwD;gBACxD,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;YACvD,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,WAAW,EAAE,CAAC,KAAK,CAAC,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I,CAAC;QACpC,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,IAAI,CAAC;QACH,YAAY,EAAE,CAAC;QACf,SAAS,EAAE,CAAC,KAAK,CAAC,oBAAoB,IAAA,mBAAO,EAAC,KAAK,CAAC,EAAE,CAAC,CAAC;QACxD,OAAO,CAAC,MAAM,UAAU,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,sBAAsB,CAAC,MAAM,CAAC,CAAC,CAAC;IACrF,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,GAAG,GAAG,cAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAChC,SAAS,EAAE,CAAC,KAAK,CAAC,IAAI,MAAM,CAAC,IAAI,KAAK,GAAG,CAAC,OAAO,EAAE,CAAC,CAAC;QACrD,OAAO,EAAE,CAAC;IACZ,CAAC;AACH,CAAC,CAAC;AAEJ,6EAA6E;AAC7E,MAAM,sBAAsB,GAC1B,CAAC,YAA0B,EAAE,EAAE,CAC/B,CAAC,MAA8B,EAA0B,EAAE,CACzD,OAAO,MAAM,CAAC,QAAQ,KAAK,QAAQ,IAAI,YAAY,CAAC,MAAM;IACxD,CAAC,CAAC,EAAE,GAAG,MAAM,EAAE,QAAQ,EAAE,GAAG,YAAY,CAAC,aAAa,IAAI,MAAM,CAAC,QAAQ,IAAI,YAAY,CAAC,MAAM,EAAE,EAAE;IACpG,CAAC,CAAC,MAAM,CAAC;AAEf,MAAM,gBAAgB,GAAG,CAAC,KAAyB,EAAW,EAAE,CAAC,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/source-deploy-retrieve",
3
- "version": "12.10.4",
3
+ "version": "12.11.0",
4
4
  "description": "JavaScript library to run Salesforce metadata deploys and retrieves",
5
5
  "main": "lib/src/index.js",
6
6
  "author": "Salesforce",