@salesforce/source-deploy-retrieve 12.30.2 → 12.31.1
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 +1 -1
- package/lib/src/client/deployMessages.js +1 -1
- package/lib/src/client/diagnosticUtil.js +1 -1
- package/lib/src/client/index.js +1 -1
- package/lib/src/client/metadataApiDeploy.d.ts +2 -2
- package/lib/src/client/metadataApiDeploy.js +89 -6
- package/lib/src/client/metadataApiDeploy.js.map +1 -1
- package/lib/src/client/metadataApiRetrieve.js +2 -2
- package/lib/src/client/metadataApiRetrieve.js.map +1 -1
- package/lib/src/client/metadataTransfer.d.ts +14 -0
- package/lib/src/client/metadataTransfer.js +73 -5
- package/lib/src/client/metadataTransfer.js.map +1 -1
- package/lib/src/client/retrieveExtract.js +1 -1
- package/lib/src/collections/componentSet.d.ts +8 -0
- package/lib/src/collections/componentSet.js +17 -2
- package/lib/src/collections/componentSet.js.map +1 -1
- package/lib/src/collections/componentSetBuilder.js +2 -2
- package/lib/src/collections/componentSetBuilder.js.map +1 -1
- package/lib/src/collections/decodeableMap.js +1 -1
- package/lib/src/collections/index.js +1 -1
- package/lib/src/collections/lazyCollection.js +1 -1
- package/lib/src/common/constants.js +1 -1
- package/lib/src/common/types.js +1 -1
- package/lib/src/convert/convertContext/decomposedExternalServiceRegistrationFinalizer.js +1 -1
- package/lib/src/convert/convertContext/decomposedLabelsFinalizer.js +1 -1
- package/lib/src/convert/convertContext/decomposedPermissionSetFinalizer.js +1 -1
- package/lib/src/convert/convertContext/nonDecompositionFinalizer.js +1 -1
- package/lib/src/convert/convertContext/recompositionFinalizer.js +2 -2
- package/lib/src/convert/convertContext/recompositionFinalizer.js.map +1 -1
- package/lib/src/convert/index.js +1 -1
- package/lib/src/convert/isBinaryFile.js +1 -1
- package/lib/src/convert/metadataConverter.js +2 -2
- package/lib/src/convert/metadataConverter.js.map +1 -1
- package/lib/src/convert/replacements.js +2 -2
- package/lib/src/convert/replacements.js.map +1 -1
- package/lib/src/convert/streams.js +1 -1
- package/lib/src/convert/transformers/decomposeExternalServiceRegistrationTransformer.js +1 -1
- package/lib/src/convert/transformers/decomposeLabelsTransformer.js +1 -1
- package/lib/src/convert/transformers/decomposedMetadataTransformer.js +2 -2
- package/lib/src/convert/transformers/decomposedMetadataTransformer.js.map +1 -1
- package/lib/src/convert/transformers/decomposedPermissionSetTransformer.js +1 -1
- package/lib/src/convert/transformers/defaultMetadataTransformer.js +2 -2
- package/lib/src/convert/transformers/defaultMetadataTransformer.js.map +1 -1
- package/lib/src/convert/transformers/metadataTransformerFactory.js +2 -2
- package/lib/src/convert/transformers/metadataTransformerFactory.js.map +1 -1
- package/lib/src/convert/transformers/nonDecomposedMetadataTransformer.js +2 -2
- package/lib/src/convert/transformers/nonDecomposedMetadataTransformer.js.map +1 -1
- package/lib/src/convert/transformers/staticResourceMetadataTransformer.js +2 -2
- package/lib/src/convert/transformers/staticResourceMetadataTransformer.js.map +1 -1
- package/lib/src/index.js +1 -1
- package/lib/src/registry/coverage.js +1 -1
- package/lib/src/registry/index.js +1 -1
- package/lib/src/registry/levenshtein.js +2 -2
- package/lib/src/registry/levenshtein.js.map +1 -1
- package/lib/src/registry/metadataRegistry.json +31 -1
- package/lib/src/registry/nonSupportedTypes.js +1 -1
- package/lib/src/registry/registry.js +1 -1
- package/lib/src/registry/registryAccess.js +2 -2
- package/lib/src/registry/registryAccess.js.map +1 -1
- package/lib/src/registry/standardvalueset.js +1 -1
- package/lib/src/registry/types.js +1 -1
- package/lib/src/registry/variants.js +1 -1
- package/lib/src/resolve/adapters/baseSourceAdapter.js +2 -2
- package/lib/src/resolve/adapters/baseSourceAdapter.js.map +1 -1
- package/lib/src/resolve/adapters/decomposedSourceAdapter.js +2 -2
- package/lib/src/resolve/adapters/decomposedSourceAdapter.js.map +1 -1
- package/lib/src/resolve/adapters/digitalExperienceSourceAdapter.js +2 -2
- package/lib/src/resolve/adapters/digitalExperienceSourceAdapter.js.map +1 -1
- package/lib/src/resolve/adapters/index.js +1 -1
- package/lib/src/resolve/adapters/matchingContentSourceAdapter.js +2 -2
- package/lib/src/resolve/adapters/matchingContentSourceAdapter.js.map +1 -1
- package/lib/src/resolve/adapters/mixedContentSourceAdapter.js +2 -2
- package/lib/src/resolve/adapters/mixedContentSourceAdapter.js.map +1 -1
- package/lib/src/resolve/adapters/partialDecomposedAdapter.js +1 -1
- package/lib/src/resolve/adapters/sourceAdapterFactory.js +2 -2
- package/lib/src/resolve/adapters/sourceAdapterFactory.js.map +1 -1
- package/lib/src/resolve/connectionResolver.js +2 -2
- package/lib/src/resolve/connectionResolver.js.map +1 -1
- package/lib/src/resolve/forceIgnore.js +1 -1
- package/lib/src/resolve/index.js +1 -1
- package/lib/src/resolve/manifestResolver.js +1 -1
- package/lib/src/resolve/metadataResolver.js +2 -2
- package/lib/src/resolve/metadataResolver.js.map +1 -1
- package/lib/src/resolve/pseudoTypes/agentResolver.js +1 -1
- package/lib/src/resolve/sourceComponent.js +2 -2
- package/lib/src/resolve/sourceComponent.js.map +1 -1
- package/lib/src/resolve/treeContainers.js +2 -2
- package/lib/src/resolve/treeContainers.js.map +1 -1
- package/lib/src/resolve/types.js +1 -1
- package/lib/src/utils/decomposed.js +1 -1
- package/lib/src/utils/filePathGenerator.js +2 -2
- package/lib/src/utils/filePathGenerator.js.map +1 -1
- package/lib/src/utils/fileSystemHandler.js +1 -1
- package/lib/src/utils/index.js +1 -1
- package/lib/src/utils/metadata.js +1 -1
- package/lib/src/utils/path.js +1 -1
- package/messages/sdr.md +4 -0
- package/package.json +1 -1
package/LICENSE.txt
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.parseDeployDiagnostic = void 0;
|
|
4
4
|
/*
|
|
5
|
-
* Copyright
|
|
5
|
+
* Copyright 2026, Salesforce, Inc.
|
|
6
6
|
*
|
|
7
7
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
8
8
|
* you may not use this file except in compliance with the License.
|
package/lib/src/client/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { RegistryAccess } from '../registry
|
|
2
|
-
import { ComponentSet } from '../collections
|
|
1
|
+
import { RegistryAccess } from '../registry';
|
|
2
|
+
import { ComponentSet } from '../collections';
|
|
3
3
|
import { MetadataTransfer, MetadataTransferOptions } from './metadataTransfer';
|
|
4
4
|
import { AsyncResult, FileResponse, MetadataApiDeployOptions as ApiOptions, MetadataApiDeployStatus, MetadataTransferResult } from './types';
|
|
5
5
|
export declare class DeployResult implements MetadataTransferResult {
|
|
@@ -5,7 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.MetadataApiDeploy = exports.DeployResult = void 0;
|
|
7
7
|
/*
|
|
8
|
-
* Copyright
|
|
8
|
+
* Copyright 2026, Salesforce, Inc.
|
|
9
9
|
*
|
|
10
10
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
11
11
|
* you may not use this file except in compliance with the License.
|
|
@@ -21,6 +21,7 @@ exports.MetadataApiDeploy = exports.DeployResult = void 0;
|
|
|
21
21
|
*/
|
|
22
22
|
const node_path_1 = require("node:path");
|
|
23
23
|
const node_util_1 = require("node:util");
|
|
24
|
+
const node_os_1 = require("node:os");
|
|
24
25
|
const ts_types_1 = require("@salesforce/ts-types");
|
|
25
26
|
const jszip_1 = __importDefault(require("jszip"));
|
|
26
27
|
const graceful_fs_1 = __importDefault(require("graceful-fs"));
|
|
@@ -29,13 +30,13 @@ const messages_1 = require("@salesforce/core/messages");
|
|
|
29
30
|
const sfError_1 = require("@salesforce/core/sfError");
|
|
30
31
|
const envVars_1 = require("@salesforce/core/envVars");
|
|
31
32
|
const kit_1 = require("@salesforce/kit");
|
|
32
|
-
const
|
|
33
|
-
const
|
|
33
|
+
const registry_1 = require("../registry");
|
|
34
|
+
const convert_1 = require("../convert");
|
|
34
35
|
const metadataTransfer_1 = require("./metadataTransfer");
|
|
35
36
|
const types_1 = require("./types");
|
|
36
37
|
const deployMessages_1 = require("./deployMessages");
|
|
37
38
|
;
|
|
38
|
-
const messages = new messages_1.Messages('@salesforce/source-deploy-retrieve', 'sdr', new Map([["md_request_fail", "Metadata API request failed: %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_invalid_test_level", "TestLevel cannot be '%s' unless API version is %s or later"], ["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>"]]));
|
|
39
|
+
const messages = new messages_1.Messages('@salesforce/source-deploy-retrieve', 'sdr', new Map([["md_request_fail", "Metadata API request failed: %s"], ["error_retry_limit_exceeded", "Exceeded maximum of %s consecutive retryable errors. Last error: %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_invalid_test_level", "TestLevel cannot be '%s' unless API version is %s or later"], ["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>"]]));
|
|
39
40
|
// TODO: (NEXT MAJOR) this should just be a readonly object and not a class.
|
|
40
41
|
class DeployResult {
|
|
41
42
|
response;
|
|
@@ -88,7 +89,7 @@ class MetadataApiDeploy extends metadataTransfer_1.MetadataTransfer {
|
|
|
88
89
|
validateOptions(options);
|
|
89
90
|
this.options = Object.assign({}, options);
|
|
90
91
|
this.isRestDeploy = !!options.apiOptions?.rest;
|
|
91
|
-
this.registry = options.registry ?? new
|
|
92
|
+
this.registry = options.registry ?? new registry_1.RegistryAccess();
|
|
92
93
|
if (this.mdapiTempDir) {
|
|
93
94
|
this.mdapiTempDir = (0, node_path_1.join)(this.mdapiTempDir, `${new Date().toISOString().replace(/[<>:"\\|?*]/g, '_')}_deploy`);
|
|
94
95
|
}
|
|
@@ -159,6 +160,88 @@ class MetadataApiDeploy extends metadataTransfer_1.MetadataTransfer {
|
|
|
159
160
|
// this is used as the version in the manifest (package.xml).
|
|
160
161
|
this.components.sourceApiVersion ??= apiVersion;
|
|
161
162
|
}
|
|
163
|
+
if (this.options.components) {
|
|
164
|
+
// we must ensure AiAuthoringBundles compile before deployment
|
|
165
|
+
// Use optimized getter method instead of filtering all components
|
|
166
|
+
const aabComponents = this.options.components.getAiAuthoringBundles().toArray();
|
|
167
|
+
if (aabComponents.length > 0) {
|
|
168
|
+
// we need to use a namedJWT connection for this request
|
|
169
|
+
const { accessToken, instanceUrl } = connection.getConnectionOptions();
|
|
170
|
+
if (!instanceUrl) {
|
|
171
|
+
throw sfError_1.SfError.create({
|
|
172
|
+
name: 'ApiAccessError',
|
|
173
|
+
message: 'Missing Instance URL for org connection',
|
|
174
|
+
});
|
|
175
|
+
}
|
|
176
|
+
if (!accessToken) {
|
|
177
|
+
throw sfError_1.SfError.create({
|
|
178
|
+
name: 'ApiAccessError',
|
|
179
|
+
message: 'Missing Access Token for org connection',
|
|
180
|
+
});
|
|
181
|
+
}
|
|
182
|
+
const url = `${instanceUrl}/agentforce/bootstrap/nameduser`;
|
|
183
|
+
// For the namdeduser endpoint request to work we need to delete the access token
|
|
184
|
+
delete connection.accessToken;
|
|
185
|
+
const response = await connection.request({
|
|
186
|
+
method: 'GET',
|
|
187
|
+
url,
|
|
188
|
+
headers: {
|
|
189
|
+
'Content-Type': 'application/json',
|
|
190
|
+
Cookie: `sid=${accessToken}`,
|
|
191
|
+
},
|
|
192
|
+
}, { retry: { maxRetries: 3 } });
|
|
193
|
+
connection.accessToken = response.access_token;
|
|
194
|
+
const results = await Promise.all(aabComponents.map(async (aab) => {
|
|
195
|
+
// aab.content points to a directory, we need to find the .agent file and read it
|
|
196
|
+
if (!aab.content) {
|
|
197
|
+
throw new sfError_1.SfError(messages.getMessage('error_expected_source_files', [aab.fullName, 'aiauthoringbundle']), 'ExpectedSourceFilesError');
|
|
198
|
+
}
|
|
199
|
+
const contentPath = aab.tree.find('content', aab.name, aab.content);
|
|
200
|
+
if (!contentPath) {
|
|
201
|
+
// if this didn't exist, they'll have deploy issues anyways, but we can check here for type reasons
|
|
202
|
+
throw new sfError_1.SfError(`No .agent file found in directory: ${aab.content}`, 'MissingAgentFileError');
|
|
203
|
+
}
|
|
204
|
+
const agentContent = await graceful_fs_1.default.promises.readFile(contentPath, 'utf-8');
|
|
205
|
+
// to avoid circular dependencies between libraries, just call the compile endpoint here
|
|
206
|
+
const result = await connection.request({
|
|
207
|
+
method: 'POST',
|
|
208
|
+
// this will need to be api.salesforce once changes are in prod
|
|
209
|
+
url: 'https://test.api.salesforce.com/einstein/ai-agent/v1.1/authoring/scripts',
|
|
210
|
+
headers: {
|
|
211
|
+
'x-client-name': 'afdx',
|
|
212
|
+
'content-type': 'application/json',
|
|
213
|
+
},
|
|
214
|
+
body: JSON.stringify({
|
|
215
|
+
assets: [
|
|
216
|
+
{
|
|
217
|
+
type: 'AFScript',
|
|
218
|
+
name: 'AFScript',
|
|
219
|
+
content: agentContent,
|
|
220
|
+
},
|
|
221
|
+
],
|
|
222
|
+
afScriptVersion: '1.0.1',
|
|
223
|
+
}),
|
|
224
|
+
});
|
|
225
|
+
result.name = aab.name;
|
|
226
|
+
return result;
|
|
227
|
+
}));
|
|
228
|
+
const errors = results
|
|
229
|
+
.filter((result) => result.status === 'failure')
|
|
230
|
+
.map((result) => result.errors.map((r) => `${result.name}.agent: ${r.description} ${r.lineStart}:${r.colStart}`).join(node_os_1.EOL));
|
|
231
|
+
if (errors.length > 0) {
|
|
232
|
+
throw sfError_1.SfError.create({
|
|
233
|
+
message: `${node_os_1.EOL}${errors.join(node_os_1.EOL)}`,
|
|
234
|
+
name: 'AgentCompilationError',
|
|
235
|
+
});
|
|
236
|
+
}
|
|
237
|
+
else {
|
|
238
|
+
// everything successfully compiled
|
|
239
|
+
// stop using named user jwt access token
|
|
240
|
+
delete connection.accessToken;
|
|
241
|
+
await connection.refreshAuth();
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
}
|
|
162
245
|
// only do event hooks if source, (NOT a metadata format) deploy
|
|
163
246
|
if (this.options.components) {
|
|
164
247
|
await LifecycleInstance.emit('scopedPreDeploy', {
|
|
@@ -337,7 +420,7 @@ class MetadataApiDeploy extends metadataTransfer_1.MetadataTransfer {
|
|
|
337
420
|
}
|
|
338
421
|
// Convert a ComponentSet of metadata in source format and zip
|
|
339
422
|
if (this.options.components && this.components) {
|
|
340
|
-
const converter = new
|
|
423
|
+
const converter = new convert_1.MetadataConverter(this.registry);
|
|
341
424
|
const { zipBuffer, zipFileCount } = await converter.convert(this.components, 'metadata', { type: 'zip' });
|
|
342
425
|
if (!zipBuffer) {
|
|
343
426
|
throw new sfError_1.SfError(messages.getMessage('zipBufferError'));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"metadataApiDeploy.js","sourceRoot":"","sources":["../../../src/client/metadataApiDeploy.ts"],"names":[],"mappings":";;;;;;AAAA;;;;;;;;;;;;;;GAcG;AACH,yCAAwE;AACxE,yCAAmC;AACnC,mDAAgD;AAChD,kDAA0B;AAC1B,8DAA6B;AAC7B,0DAAuD;AACvD,wDAAqD;AACrD,sDAAmD;AACnD,sDAAmD;AACnD,yCAA8C;AAC9C,+DAA4D;AAE5D,oEAAiE;AAEjE,yDAA+E;AAC/E,mCAQiB;AACjB,qDAM0B;;AAG1B,MAAM,QAAQ,OAAG,mBAAQ,CAAc,oCAAoC,EAAE,KAAK,6zLAAC,CAAC;AAEpF,4EAA4E;AAC5E,MAAa,YAAY;IAIL;IACA;IACA;IACA;IANV,aAAa,CAAkB;IAEvC,YACkB,QAAiC,EACjC,UAAyB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IAAI,CAAC;IAC7E,IAAI,wBAAwB,IAAI,YAAY,EAAE,CAAC;QAC7C,MAAM,IAAI,iBAAO,CACf,QAAQ,CAAC,UAAU,CAAC,0BAA0B,EAAE,CAAC,kBAAkB,EAAE,MAAM,CAAC,CAAC,EAC7E,2BAA2B,CAC5B,CAAC;IACJ,CAAC;AACH,CAAC,CAAC"}
|
|
@@ -5,7 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.MetadataApiRetrieve = exports.RetrieveResult = void 0;
|
|
7
7
|
/*
|
|
8
|
-
* Copyright
|
|
8
|
+
* Copyright 2026, Salesforce, Inc.
|
|
9
9
|
*
|
|
10
10
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
11
11
|
* you may not use this file except in compliance with the License.
|
|
@@ -34,7 +34,7 @@ const retrieveExtract_1 = require("./retrieveExtract");
|
|
|
34
34
|
const retrieveExtract_2 = require("./retrieveExtract");
|
|
35
35
|
const utils_1 = require("./utils");
|
|
36
36
|
;
|
|
37
|
-
const messages = new messages_1.Messages('@salesforce/source-deploy-retrieve', 'sdr', new Map([["md_request_fail", "Metadata API request failed: %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_invalid_test_level", "TestLevel cannot be '%s' unless API version is %s or later"], ["error_merge_metadata_target_unsupported", "Merge convert for metadata target format currently unsupported"], ["error_missing_adapter", "Missing adapter '%s' for metadata type '%s'"], ["error_missing_transformer", "Missing transformer '%s' for metadata type '%s'"], ["error_missing_type_definition", "Missing metadata type definition in registry for id '%s'."], ["error_missing_child_type_definition", "Type %s does not have a child type definition %s."], ["noChildTypes", "No child types found in registry for %s (reading %s at %s)"], ["error_no_metadata_xml_ignore", "Metadata xml file %s is forceignored but is required for %s."], ["noSourceIgnore", "%s metadata types require source files, but %s is forceignored."], ["noSourceIgnore.actions", "- Metadata types with content are composed of two files: a content file (ie MyApexClass.cls) and a -meta.xml file (i.e MyApexClass.cls-meta.xml). You must include both files in your .forceignore file. Or try appending \u201C\\*\u201D to your existing .forceignore entry.\n\nSee <https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_exclude_source.htm> for examples"], ["error_path_not_found", "%s: File or folder not found"], ["noContentFound", "SourceComponent %s (metadata type = %s) is missing its content file."], ["noContentFound.actions", ["Ensure the content file exists in the expected location.", "If the content file is in your .forceignore file, ensure the meta-xml file is also ignored to completely exclude it."]], ["error_parsing_xml", "SourceComponent %s (metadata type = %s) does not have an associated metadata xml to parse"], ["error_expected_file_path", "%s: path is to a directory, expected a file"], ["error_expected_directory_path", "%s: path is to a file, expected a directory"], ["error_directory_not_found_or_not_directory", "%s: path is not a directory"], ["error_no_directory_stream", "%s doesn't support readable streams on directories."], ["error_no_source_to_deploy", "No source-backed components present in the package."], ["error_no_components_to_retrieve", "No components in the package to retrieve."], ["error_static_resource_expected_archive_type", "A StaticResource directory must have a content type of application/zip or application/jar - found %s for %s."], ["error_static_resource_missing_resource_file", "A StaticResource must have an associated .resource file, missing %s.resource-meta.xml"], ["error_no_job_id", "The %s operation is missing a job ID. Initialize an operation with an ID, or start a new job."], ["missingApiVersion", "Could not determine an API version to use for the generated manifest. Tried looking for sourceApiVersion in sfdx-project.json, apiVersion from config vars, and the highest apiVersion from the APEX REST endpoint. Using API version 58.0 as a last resort."], ["invalid_xml_parsing", "error parsing %s due to:\\n message: %s\\n line: %s\\n code: %s"], ["zipBufferError", "Zip buffer was not created during conversion"], ["undefinedComponentSet", "Unable to construct a componentSet. Check the logs for more information."], ["replacementsFileNotRead", "The file \"%s\" specified in the \"replacements\" property of sfdx-project.json could not be read."], ["unsupportedBundleType", "Unsupported Bundle Type: %s"], ["filePathGeneratorNoTypeSupport", "Type not supported for filepath generation: %s"], ["missingFolderType", "The registry has %s as is inFolder but it does not have a folderType"], ["tooManyFiles", "Multiple files found for path: %s."], ["cantGetName", "Unable to calculate fullName from path: %s (%s)"], ["missingMetaFileSuffix", "The metadata registry is configured incorrectly for %s. Expected a metaFileSuffix."], ["uniqueIdElementNotInRegistry", "No uniqueIdElement found in registry for %s (reading %s at %s)."], ["uniqueIdElementNotInChild", "The uniqueIdElement %s was not found the child (reading %s at %s)."], ["suggest_type_header", "A metadata type lookup for \"%s\" found the following close matches:"], ["suggest_type_did_you_mean", "-- Did you mean \".%s%s\" instead for the \"%s\" metadata type?"], ["suggest_type_more_suggestions", "Additional suggestions:\nConfirm the file name, extension, and directory names are correct. Validate against the registry at:\n<https://github.com/forcedotcom/source-deploy-retrieve/blob/main/src/registry/metadataRegistry.json>\n\nIf the type is not listed in the registry, check that it has Metadata API support via the Metadata Coverage Report:\n<https://developer.salesforce.com/docs/metadata-coverage>\n\nIf the type is available via Metadata API but not in the registry\n\n- Open an issue <https://github.com/forcedotcom/cli/issues>\n- Add the type via PR. Instructions: <https://github.com/forcedotcom/source-deploy-retrieve/blob/main/contributing/metadata.md>"], ["type_name_suggestions", "Confirm the metadata type name is correct. Validate against the registry at:\n<https://github.com/forcedotcom/source-deploy-retrieve/blob/main/src/registry/metadataRegistry.json>\n\nIf the type is not listed in the registry, check that it has Metadata API support via the Metadata Coverage Report:\n<https://developer.salesforce.com/docs/metadata-coverage>\n\nIf the type is available via Metadata API but not in the registry\n\n- Open an issue <https://github.com/forcedotcom/cli/issues>\n- Add the type via PR. Instructions: <https://github.com/forcedotcom/source-deploy-retrieve/blob/main/contributing/metadata.md>"]]));
|
|
37
|
+
const messages = new messages_1.Messages('@salesforce/source-deploy-retrieve', 'sdr', new Map([["md_request_fail", "Metadata API request failed: %s"], ["error_retry_limit_exceeded", "Exceeded maximum of %s consecutive retryable errors. Last error: %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_invalid_test_level", "TestLevel cannot be '%s' unless API version is %s or later"], ["error_merge_metadata_target_unsupported", "Merge convert for metadata target format currently unsupported"], ["error_missing_adapter", "Missing adapter '%s' for metadata type '%s'"], ["error_missing_transformer", "Missing transformer '%s' for metadata type '%s'"], ["error_missing_type_definition", "Missing metadata type definition in registry for id '%s'."], ["error_missing_child_type_definition", "Type %s does not have a child type definition %s."], ["noChildTypes", "No child types found in registry for %s (reading %s at %s)"], ["error_no_metadata_xml_ignore", "Metadata xml file %s is forceignored but is required for %s."], ["noSourceIgnore", "%s metadata types require source files, but %s is forceignored."], ["noSourceIgnore.actions", "- Metadata types with content are composed of two files: a content file (ie MyApexClass.cls) and a -meta.xml file (i.e MyApexClass.cls-meta.xml). You must include both files in your .forceignore file. Or try appending \u201C\\*\u201D to your existing .forceignore entry.\n\nSee <https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_exclude_source.htm> for examples"], ["error_path_not_found", "%s: File or folder not found"], ["noContentFound", "SourceComponent %s (metadata type = %s) is missing its content file."], ["noContentFound.actions", ["Ensure the content file exists in the expected location.", "If the content file is in your .forceignore file, ensure the meta-xml file is also ignored to completely exclude it."]], ["error_parsing_xml", "SourceComponent %s (metadata type = %s) does not have an associated metadata xml to parse"], ["error_expected_file_path", "%s: path is to a directory, expected a file"], ["error_expected_directory_path", "%s: path is to a file, expected a directory"], ["error_directory_not_found_or_not_directory", "%s: path is not a directory"], ["error_no_directory_stream", "%s doesn't support readable streams on directories."], ["error_no_source_to_deploy", "No source-backed components present in the package."], ["error_no_components_to_retrieve", "No components in the package to retrieve."], ["error_static_resource_expected_archive_type", "A StaticResource directory must have a content type of application/zip or application/jar - found %s for %s."], ["error_static_resource_missing_resource_file", "A StaticResource must have an associated .resource file, missing %s.resource-meta.xml"], ["error_no_job_id", "The %s operation is missing a job ID. Initialize an operation with an ID, or start a new job."], ["missingApiVersion", "Could not determine an API version to use for the generated manifest. Tried looking for sourceApiVersion in sfdx-project.json, apiVersion from config vars, and the highest apiVersion from the APEX REST endpoint. Using API version 58.0 as a last resort."], ["invalid_xml_parsing", "error parsing %s due to:\\n message: %s\\n line: %s\\n code: %s"], ["zipBufferError", "Zip buffer was not created during conversion"], ["undefinedComponentSet", "Unable to construct a componentSet. Check the logs for more information."], ["replacementsFileNotRead", "The file \"%s\" specified in the \"replacements\" property of sfdx-project.json could not be read."], ["unsupportedBundleType", "Unsupported Bundle Type: %s"], ["filePathGeneratorNoTypeSupport", "Type not supported for filepath generation: %s"], ["missingFolderType", "The registry has %s as is inFolder but it does not have a folderType"], ["tooManyFiles", "Multiple files found for path: %s."], ["cantGetName", "Unable to calculate fullName from path: %s (%s)"], ["missingMetaFileSuffix", "The metadata registry is configured incorrectly for %s. Expected a metaFileSuffix."], ["uniqueIdElementNotInRegistry", "No uniqueIdElement found in registry for %s (reading %s at %s)."], ["uniqueIdElementNotInChild", "The uniqueIdElement %s was not found the child (reading %s at %s)."], ["suggest_type_header", "A metadata type lookup for \"%s\" found the following close matches:"], ["suggest_type_did_you_mean", "-- Did you mean \".%s%s\" instead for the \"%s\" metadata type?"], ["suggest_type_more_suggestions", "Additional suggestions:\nConfirm the file name, extension, and directory names are correct. Validate against the registry at:\n<https://github.com/forcedotcom/source-deploy-retrieve/blob/main/src/registry/metadataRegistry.json>\n\nIf the type is not listed in the registry, check that it has Metadata API support via the Metadata Coverage Report:\n<https://developer.salesforce.com/docs/metadata-coverage>\n\nIf the type is available via Metadata API but not in the registry\n\n- Open an issue <https://github.com/forcedotcom/cli/issues>\n- Add the type via PR. Instructions: <https://github.com/forcedotcom/source-deploy-retrieve/blob/main/contributing/metadata.md>"], ["type_name_suggestions", "Confirm the metadata type name is correct. Validate against the registry at:\n<https://github.com/forcedotcom/source-deploy-retrieve/blob/main/src/registry/metadataRegistry.json>\n\nIf the type is not listed in the registry, check that it has Metadata API support via the Metadata Coverage Report:\n<https://developer.salesforce.com/docs/metadata-coverage>\n\nIf the type is available via Metadata API but not in the registry\n\n- Open an issue <https://github.com/forcedotcom/cli/issues>\n- Add the type via PR. Instructions: <https://github.com/forcedotcom/source-deploy-retrieve/blob/main/contributing/metadata.md>"]]));
|
|
38
38
|
class RetrieveResult {
|
|
39
39
|
response;
|
|
40
40
|
components;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"metadataApiRetrieve.js","sourceRoot":"","sources":["../../../src/client/metadataApiRetrieve.ts"],"names":[],"mappings":";;;;;;AAAA;;;;;;;;;;;;;;GAcG;AACH,yCAAwC;AACxC,8DAA6B;AAC7B,kDAA0B;AAC1B,mDAA2D;AAC3D,wDAAqD;AACrD,sDAAmD;AACnD,0DAAuD;AACvD,yCAA8C;AAE9C,8DAA2D;AAC3D,yDAAsD;AACtD,mCAUiB;AACjB,uDAA4C;AAC5C,uDAAsD;AAEtD,mCAAyC;;AAGzC,MAAM,QAAQ,OAAG,mBAAQ,CAAc,oCAAoC,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"metadataApiRetrieve.js","sourceRoot":"","sources":["../../../src/client/metadataApiRetrieve.ts"],"names":[],"mappings":";;;;;;AAAA;;;;;;;;;;;;;;GAcG;AACH,yCAAwC;AACxC,8DAA6B;AAC7B,kDAA0B;AAC1B,mDAA2D;AAC3D,wDAAqD;AACrD,sDAAmD;AACnD,0DAAuD;AACvD,yCAA8C;AAE9C,8DAA2D;AAC3D,yDAAsD;AACtD,mCAUiB;AACjB,uDAA4C;AAC5C,uDAAsD;AAEtD,mCAAyC;;AAGzC,MAAM,QAAQ,OAAG,mBAAQ,CAAc,oCAAoC,EAAE,KAAK,o6LAAC,CAAC;AAEpF,MAAa,cAAc;IAaP;IACA;IAER;IAfV,yEAAyE;IACzE,wEAAwE;IACxE,yBAAyB;IACjB,eAAe,CAAe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AAC;QACpB,OAAO,KAAK,CAAC,WAAW,EAAE,KAAK,MAAM,CAAC;IACxC,CAAC;IACD,OAAO,IAAA,oBAAS,EAAC,KAAK,EAAE,KAAK,CAAC,CAAC;AACjC,CAAC,CAAC;AAEF,MAAM,eAAe,GAAG,CAAC,cAA+B,EAAY,EAAE,CACpE,IAAA,mCAAiB,EAAC,cAAc,CAAC,EAAE,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC"}
|
|
@@ -17,6 +17,9 @@ export declare abstract class MetadataTransfer<Status extends MetadataRequestSta
|
|
|
17
17
|
private event;
|
|
18
18
|
private usernameOrConnection;
|
|
19
19
|
private apiVersion?;
|
|
20
|
+
private consecutiveErrorRetries;
|
|
21
|
+
private errorRetryLimit;
|
|
22
|
+
private errorRetryLimitExceeded;
|
|
20
23
|
constructor({ usernameOrConnection, components, apiVersion, id }: Options);
|
|
21
24
|
get id(): Options['id'];
|
|
22
25
|
/**
|
|
@@ -61,3 +64,14 @@ export declare abstract class MetadataTransfer<Status extends MetadataRequestSta
|
|
|
61
64
|
export declare const normalizePollingInputs: (frequencyOrOptions?: number | Partial<PollingClient.Options>, timeout?: number, componentSetSize?: number) => Pick<PollingClient.Options, "frequency" | "timeout">;
|
|
62
65
|
/** based on the size of the components, pick a reasonable polling frequency */
|
|
63
66
|
export declare const calculatePollingFrequency: (size: number) => number;
|
|
67
|
+
/**
|
|
68
|
+
* Calculate the maximum number of consecutive retryable errors allowed during polling.
|
|
69
|
+
* This limit prevents infinite loops from repeated network/server errors while allowing
|
|
70
|
+
* normal status polling to continue indefinitely (until timeout).
|
|
71
|
+
*
|
|
72
|
+
* Default is 1000 consecutive errors, which can be overridden via SF_METADATA_POLL_ERROR_RETRY_LIMIT.
|
|
73
|
+
*
|
|
74
|
+
* @param logger Logger instance for logging when env var override is used
|
|
75
|
+
* @returns The maximum number of consecutive errors to tolerate
|
|
76
|
+
*/
|
|
77
|
+
export declare const calculateErrorRetryLimit: (logger: Logger) => number;
|
|
@@ -3,9 +3,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.calculatePollingFrequency = exports.normalizePollingInputs = exports.MetadataTransfer = void 0;
|
|
6
|
+
exports.calculateErrorRetryLimit = exports.calculatePollingFrequency = exports.normalizePollingInputs = exports.MetadataTransfer = void 0;
|
|
7
7
|
/*
|
|
8
|
-
* Copyright
|
|
8
|
+
* Copyright 2026, Salesforce, Inc.
|
|
9
9
|
*
|
|
10
10
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
11
11
|
* you may not use this file except in compliance with the License.
|
|
@@ -29,7 +29,7 @@ const metadataConverter_1 = require("../convert/metadataConverter");
|
|
|
29
29
|
const componentSet_1 = require("../collections/componentSet");
|
|
30
30
|
const types_1 = require("./types");
|
|
31
31
|
;
|
|
32
|
-
const messages = new core_1.Messages('@salesforce/source-deploy-retrieve', 'sdr', new Map([["md_request_fail", "Metadata API request failed: %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_invalid_test_level", "TestLevel cannot be '%s' unless API version is %s or later"], ["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>"]]));
|
|
32
|
+
const messages = new core_1.Messages('@salesforce/source-deploy-retrieve', 'sdr', new Map([["md_request_fail", "Metadata API request failed: %s"], ["error_retry_limit_exceeded", "Exceeded maximum of %s consecutive retryable errors. Last error: %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_invalid_test_level", "TestLevel cannot be '%s' unless API version is %s or later"], ["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>"]]));
|
|
33
33
|
class MetadataTransfer {
|
|
34
34
|
components;
|
|
35
35
|
logger;
|
|
@@ -39,6 +39,9 @@ class MetadataTransfer {
|
|
|
39
39
|
event = new node_events_1.EventEmitter();
|
|
40
40
|
usernameOrConnection;
|
|
41
41
|
apiVersion;
|
|
42
|
+
consecutiveErrorRetries = 0;
|
|
43
|
+
errorRetryLimit = 0;
|
|
44
|
+
errorRetryLimitExceeded;
|
|
42
45
|
constructor({ usernameOrConnection, components, apiVersion, id }) {
|
|
43
46
|
this.usernameOrConnection = usernameOrConnection;
|
|
44
47
|
this.components = components;
|
|
@@ -65,6 +68,15 @@ class MetadataTransfer {
|
|
|
65
68
|
}
|
|
66
69
|
async pollStatus(frequencyOrOptions, timeout) {
|
|
67
70
|
const normalizedOptions = (0, exports.normalizePollingInputs)(frequencyOrOptions, timeout, sizeOfComponentSet(this.components));
|
|
71
|
+
// Initialize error retry tracking
|
|
72
|
+
this.consecutiveErrorRetries = 0;
|
|
73
|
+
this.errorRetryLimit = (0, exports.calculateErrorRetryLimit)(this.logger);
|
|
74
|
+
this.errorRetryLimitExceeded = undefined;
|
|
75
|
+
// IMPORTANT:
|
|
76
|
+
// We omit passing the `retryLimit` option on purpose
|
|
77
|
+
// to allow long-running deploy/retrieve jobs with low frequency checks to complete.
|
|
78
|
+
//
|
|
79
|
+
// https://forcedotcom.github.io/sfdx-core/types/status_pollingClient.PollingClient.Options.html#__type.retryLimit
|
|
68
80
|
const pollingClient = await core_1.PollingClient.create({
|
|
69
81
|
...normalizedOptions,
|
|
70
82
|
poll: this.poll.bind(this),
|
|
@@ -73,7 +85,13 @@ class MetadataTransfer {
|
|
|
73
85
|
this.logger.debug(`Polling for metadata transfer status. ID = ${this.id ?? '<no id>'}`);
|
|
74
86
|
this.logger.debug(`Polling frequency (ms): ${normalizedOptions.frequency.milliseconds}`);
|
|
75
87
|
this.logger.debug(`Polling timeout (min): ${normalizedOptions.timeout.minutes}`);
|
|
88
|
+
this.logger.debug(`Polling error retry limit (consecutive errors): ${this.errorRetryLimit}`);
|
|
76
89
|
const completedMdapiStatus = (await pollingClient.subscribe());
|
|
90
|
+
// Check if polling exited due to error retry limit (throw unwrapped error)
|
|
91
|
+
if (this.errorRetryLimitExceeded !== undefined) {
|
|
92
|
+
const errorData = this.errorRetryLimitExceeded;
|
|
93
|
+
throw new core_1.SfError(messages.getMessage('error_retry_limit_exceeded', [errorData.count, errorData.error.message]), 'MetadataTransferError');
|
|
94
|
+
}
|
|
77
95
|
const result = await this.post(completedMdapiStatus);
|
|
78
96
|
if (completedMdapiStatus.status === types_1.RequestStatus.Canceled) {
|
|
79
97
|
this.event.emit('cancel', completedMdapiStatus);
|
|
@@ -85,6 +103,14 @@ class MetadataTransfer {
|
|
|
85
103
|
}
|
|
86
104
|
catch (e) {
|
|
87
105
|
const err = e;
|
|
106
|
+
// Don't wrap the error retry limit exceeded error
|
|
107
|
+
if (err instanceof core_1.SfError && err.message.includes('consecutive retryable errors')) {
|
|
108
|
+
if (this.event.listenerCount('error') === 0) {
|
|
109
|
+
throw err;
|
|
110
|
+
}
|
|
111
|
+
this.event.emit('error', err);
|
|
112
|
+
return;
|
|
113
|
+
}
|
|
88
114
|
const error = new core_1.SfError(messages.getMessage('md_request_fail', [err.message]), 'MetadataTransferError');
|
|
89
115
|
if (error.stack && err.stack) {
|
|
90
116
|
// append the original stack to this new error
|
|
@@ -196,6 +222,8 @@ class MetadataTransfer {
|
|
|
196
222
|
else {
|
|
197
223
|
try {
|
|
198
224
|
mdapiStatus = await this.checkStatus();
|
|
225
|
+
// Reset error counter on successful status check
|
|
226
|
+
this.consecutiveErrorRetries = 0;
|
|
199
227
|
completed = mdapiStatus?.done;
|
|
200
228
|
if (!completed) {
|
|
201
229
|
this.event.emit('update', mdapiStatus);
|
|
@@ -206,13 +234,31 @@ class MetadataTransfer {
|
|
|
206
234
|
// tolerate a known mdapi problem 500/INVALID_CROSS_REFERENCE_KEY: invalid cross reference id
|
|
207
235
|
// that happens when request moves out of Pending
|
|
208
236
|
if (e instanceof Error && e.name === 'JsonParseError') {
|
|
237
|
+
this.consecutiveErrorRetries++;
|
|
238
|
+
if (this.consecutiveErrorRetries > this.errorRetryLimit) {
|
|
239
|
+
// Store error info and signal completion to stop polling
|
|
240
|
+
this.errorRetryLimitExceeded = {
|
|
241
|
+
error: e,
|
|
242
|
+
count: this.errorRetryLimit,
|
|
243
|
+
};
|
|
244
|
+
return { completed: true };
|
|
245
|
+
}
|
|
209
246
|
this.logger.debug('Metadata API response not parseable', e);
|
|
210
247
|
await core_1.Lifecycle.getInstance().emitWarning('Metadata API response not parseable');
|
|
211
248
|
return { completed: false };
|
|
212
249
|
}
|
|
213
|
-
// tolerate intermittent network errors
|
|
250
|
+
// tolerate intermittent network errors up to error retry limit
|
|
214
251
|
if (this.isRetryableError(e)) {
|
|
215
|
-
this.
|
|
252
|
+
this.consecutiveErrorRetries++;
|
|
253
|
+
if (this.consecutiveErrorRetries > this.errorRetryLimit) {
|
|
254
|
+
// Store error info and signal completion to stop polling
|
|
255
|
+
this.errorRetryLimitExceeded = {
|
|
256
|
+
error: e instanceof Error ? e : new Error(String(e)),
|
|
257
|
+
count: this.errorRetryLimit,
|
|
258
|
+
};
|
|
259
|
+
return { completed: true };
|
|
260
|
+
}
|
|
261
|
+
this.logger.debug(`Network error on request (retry ${this.consecutiveErrorRetries}/${this.errorRetryLimit})`, e);
|
|
216
262
|
await core_1.Lifecycle.getInstance().emitWarning('Network error occurred. Continuing to poll.');
|
|
217
263
|
return { completed: false };
|
|
218
264
|
}
|
|
@@ -286,4 +332,26 @@ const calculatePollingFrequency = (size) => {
|
|
|
286
332
|
}
|
|
287
333
|
};
|
|
288
334
|
exports.calculatePollingFrequency = calculatePollingFrequency;
|
|
335
|
+
/**
|
|
336
|
+
* Calculate the maximum number of consecutive retryable errors allowed during polling.
|
|
337
|
+
* This limit prevents infinite loops from repeated network/server errors while allowing
|
|
338
|
+
* normal status polling to continue indefinitely (until timeout).
|
|
339
|
+
*
|
|
340
|
+
* Default is 1000 consecutive errors, which can be overridden via SF_METADATA_POLL_ERROR_RETRY_LIMIT.
|
|
341
|
+
*
|
|
342
|
+
* @param logger Logger instance for logging when env var override is used
|
|
343
|
+
* @returns The maximum number of consecutive errors to tolerate
|
|
344
|
+
*/
|
|
345
|
+
const calculateErrorRetryLimit = (logger) => {
|
|
346
|
+
const envRetryLimit = process.env.SF_METADATA_POLL_ERROR_RETRY_LIMIT;
|
|
347
|
+
if (envRetryLimit) {
|
|
348
|
+
const parsedLimit = parseInt(envRetryLimit, 10);
|
|
349
|
+
if (!isNaN(parsedLimit) && parsedLimit > 0) {
|
|
350
|
+
logger.debug(`Using error retry limit from SF_METADATA_POLL_ERROR_RETRY_LIMIT environment variable: ${parsedLimit}`);
|
|
351
|
+
return parsedLimit;
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
return 1000;
|
|
355
|
+
};
|
|
356
|
+
exports.calculateErrorRetryLimit = calculateErrorRetryLimit;
|
|
289
357
|
//# sourceMappingURL=metadataTransfer.js.map
|