@salesforce/source-deploy-retrieve 12.22.7 → 12.22.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/src/client/deployMessages.js +2 -2
- package/lib/src/client/deployMessages.js.map +1 -1
- package/lib/src/client/diagnosticUtil.js +3 -3
- package/lib/src/client/diagnosticUtil.js.map +1 -1
- package/lib/src/client/metadataApiDeploy.js +16 -13
- package/lib/src/client/metadataApiDeploy.js.map +1 -1
- package/lib/src/client/metadataApiRetrieve.d.ts +2 -1
- package/lib/src/client/metadataApiRetrieve.js +15 -11
- package/lib/src/client/metadataApiRetrieve.js.map +1 -1
- package/lib/src/client/retrieveExtract.d.ts +1 -1
- package/lib/src/collections/decodeableMap.js +2 -2
- package/lib/src/collections/decodeableMap.js.map +1 -1
- package/lib/src/convert/convertContext/nonDecompositionFinalizer.js +2 -2
- package/lib/src/convert/convertContext/nonDecompositionFinalizer.js.map +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/metadataConverter.js +13 -7
- package/lib/src/convert/metadataConverter.js.map +1 -1
- package/lib/src/convert/streams.d.ts +1 -1
- package/lib/src/convert/streams.js +8 -7
- package/lib/src/convert/streams.js.map +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/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 +11 -9
- package/lib/src/convert/transformers/staticResourceMetadataTransformer.js.map +1 -1
- package/lib/src/registry/coverage.js +3 -3
- package/lib/src/registry/coverage.js.map +1 -1
- package/lib/src/registry/registry.d.ts +3 -0
- package/lib/src/registry/registry.js +4 -4
- package/lib/src/registry/registry.js.map +1 -1
- package/lib/src/registry/registryAccess.js +5 -4
- package/lib/src/registry/registryAccess.js.map +1 -1
- package/lib/src/registry/standardvalueset.d.ts +5 -3
- package/lib/src/registry/standardvalueset.js +4 -4
- package/lib/src/registry/standardvalueset.js.map +1 -1
- package/lib/src/registry/variants.d.ts +1 -1
- package/lib/src/registry/variants.js +1 -2
- package/lib/src/registry/variants.js.map +1 -1
- package/lib/src/resolve/adapters/baseSourceAdapter.js +4 -3
- package/lib/src/resolve/adapters/baseSourceAdapter.js.map +1 -1
- package/lib/src/resolve/adapters/decomposedSourceAdapter.js +4 -3
- 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/matchingContentSourceAdapter.js +4 -3
- package/lib/src/resolve/adapters/matchingContentSourceAdapter.js.map +1 -1
- package/lib/src/resolve/adapters/mixedContentSourceAdapter.js +4 -3
- package/lib/src/resolve/adapters/mixedContentSourceAdapter.js.map +1 -1
- package/lib/src/resolve/adapters/sourceAdapterFactory.js +4 -3
- package/lib/src/resolve/adapters/sourceAdapterFactory.js.map +1 -1
- package/lib/src/resolve/forceIgnore.js +3 -3
- package/lib/src/resolve/forceIgnore.js.map +1 -1
- package/lib/src/resolve/manifestResolver.js +2 -2
- package/lib/src/resolve/manifestResolver.js.map +1 -1
- package/lib/src/resolve/metadataResolver.js +10 -7
- package/lib/src/resolve/metadataResolver.js.map +1 -1
- package/lib/src/resolve/treeContainers.js +14 -13
- package/lib/src/resolve/treeContainers.js.map +1 -1
- package/lib/src/utils/filePathGenerator.js +2 -2
- package/lib/src/utils/filePathGenerator.js.map +1 -1
- package/lib/src/utils/fileSystemHandler.d.ts +1 -1
- package/lib/src/utils/fileSystemHandler.js +5 -5
- package/lib/src/utils/fileSystemHandler.js.map +1 -1
- package/lib/src/utils/index.d.ts +0 -1
- package/lib/src/utils/index.js +1 -3
- package/lib/src/utils/index.js.map +1 -1
- package/lib/src/utils/metadata.js +2 -2
- package/lib/src/utils/metadata.js.map +1 -1
- package/package.json +1 -1
- package/lib/src/utils/collections.d.ts +0 -7
- package/lib/src/utils/collections.js +0 -24
- package/lib/src/utils/collections.js.map +0 -1
|
@@ -15,7 +15,9 @@ const node_stream_1 = require("node:stream");
|
|
|
15
15
|
const jszip_1 = __importDefault(require("jszip"));
|
|
16
16
|
const mime_1 = require("mime");
|
|
17
17
|
const graceful_fs_1 = require("graceful-fs");
|
|
18
|
-
const
|
|
18
|
+
const logger_1 = require("@salesforce/core/logger");
|
|
19
|
+
const messages_1 = require("@salesforce/core/messages");
|
|
20
|
+
const sfError_1 = require("@salesforce/core/sfError");
|
|
19
21
|
const kit_1 = require("@salesforce/kit");
|
|
20
22
|
const path_1 = require("../../utils/path");
|
|
21
23
|
const fileSystemHandler_1 = require("../../utils/fileSystemHandler");
|
|
@@ -23,11 +25,11 @@ const streams_1 = require("../streams");
|
|
|
23
25
|
const replacements_1 = require("../replacements");
|
|
24
26
|
const baseMetadataTransformer_1 = require("./baseMetadataTransformer");
|
|
25
27
|
;
|
|
26
|
-
const messages = new
|
|
28
|
+
const messages = new messages_1.Messages('@salesforce/source-deploy-retrieve', 'sdr', new Map([["md_request_fail", "Metadata API request failed: %s"], ["error_convert_invalid_format", "Invalid conversion format '%s'"], ["error_could_not_infer_type", "%s: Could not infer a metadata type"], ["error_unexpected_child_type", "Unexpected child metadata [%s] found for parent type [%s]"], ["noParent", "Could not find parent type for %s (%s)"], ["error_expected_source_files", "%s: Expected source files for type '%s'"], ["error_failed_convert", "Component conversion failed: %s"], ["error_merge_metadata_target_unsupported", "Merge convert for metadata target format currently unsupported"], ["error_missing_adapter", "Missing adapter '%s' for metadata type '%s'"], ["error_missing_transformer", "Missing transformer '%s' for metadata type '%s'"], ["error_missing_type_definition", "Missing metadata type definition in registry for id '%s'."], ["error_missing_child_type_definition", "Type %s does not have a child type definition %s."], ["noChildTypes", "No child types found in registry for %s (reading %s at %s)"], ["error_no_metadata_xml_ignore", "Metadata xml file %s is forceignored but is required for %s."], ["noSourceIgnore", "%s metadata types require source files, but %s is forceignored."], ["noSourceIgnore.actions", "- Metadata types with content are composed of two files: a content file (ie MyApexClass.cls) and a -meta.xml file (i.e MyApexClass.cls-meta.xml). You must include both files in your .forceignore file. Or try appending \u201C\\*\u201D to your existing .forceignore entry.\n\nSee <https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_exclude_source.htm> for examples"], ["error_path_not_found", "%s: File or folder not found"], ["noContentFound", "SourceComponent %s (metadata type = %s) is missing its content file."], ["noContentFound.actions", ["Ensure the content file exists in the expected location.", "If the content file is in your .forceignore file, ensure the meta-xml file is also ignored to completely exclude it."]], ["error_parsing_xml", "SourceComponent %s (metadata type = %s) does not have an associated metadata xml to parse"], ["error_expected_file_path", "%s: path is to a directory, expected a file"], ["error_expected_directory_path", "%s: path is to a file, expected a directory"], ["error_directory_not_found_or_not_directory", "%s: path is not a directory"], ["error_no_directory_stream", "%s doesn't support readable streams on directories."], ["error_no_source_to_deploy", "No source-backed components present in the package."], ["error_no_components_to_retrieve", "No components in the package to retrieve."], ["error_static_resource_expected_archive_type", "A StaticResource directory must have a content type of application/zip or application/jar - found %s for %s."], ["error_static_resource_missing_resource_file", "A StaticResource must have an associated .resource file, missing %s.resource-meta.xml"], ["error_no_job_id", "The %s operation is missing a job ID. Initialize an operation with an ID, or start a new job."], ["missingApiVersion", "Could not determine an API version to use for the generated manifest. Tried looking for sourceApiVersion in sfdx-project.json, apiVersion from config vars, and the highest apiVersion from the APEX REST endpoint. Using API version 58.0 as a last resort."], ["invalid_xml_parsing", "error parsing %s due to:\\n message: %s\\n line: %s\\n code: %s"], ["zipBufferError", "Zip buffer was not created during conversion"], ["undefinedComponentSet", "Unable to construct a componentSet. Check the logs for more information."], ["replacementsFileNotRead", "The file \"%s\" specified in the \"replacements\" property of sfdx-project.json could not be read."], ["unsupportedBundleType", "Unsupported Bundle Type: %s"], ["filePathGeneratorNoTypeSupport", "Type not supported for filepath generation: %s"], ["missingFolderType", "The registry has %s as is inFolder but it does not have a folderType"], ["tooManyFiles", "Multiple files found for path: %s."], ["cantGetName", "Unable to calculate fullName from path: %s (%s)"], ["missingMetaFileSuffix", "The metadata registry is configured incorrectly for %s. Expected a metaFileSuffix."], ["uniqueIdElementNotInRegistry", "No uniqueIdElement found in registry for %s (reading %s at %s)."], ["uniqueIdElementNotInChild", "The uniqueIdElement %s was not found the child (reading %s at %s)."], ["suggest_type_header", "A metadata type lookup for \"%s\" found the following close matches:"], ["suggest_type_did_you_mean", "-- Did you mean \".%s%s\" instead for the \"%s\" metadata type?"], ["suggest_type_more_suggestions", "Additional suggestions:\nConfirm the file name, extension, and directory names are correct. Validate against the registry at:\n<https://github.com/forcedotcom/source-deploy-retrieve/blob/main/src/registry/metadataRegistry.json>\n\nIf the type is not listed in the registry, check that it has Metadata API support via the Metadata Coverage Report:\n<https://developer.salesforce.com/docs/metadata-coverage>\n\nIf the type is available via Metadata API but not in the registry\n\n- Open an issue <https://github.com/forcedotcom/cli/issues>\n- Add the type via PR. Instructions: <https://github.com/forcedotcom/source-deploy-retrieve/blob/main/contributing/metadata.md>"], ["type_name_suggestions", "Confirm the metadata type name is correct. Validate against the registry at:\n<https://github.com/forcedotcom/source-deploy-retrieve/blob/main/src/registry/metadataRegistry.json>\n\nIf the type is not listed in the registry, check that it has Metadata API support via the Metadata Coverage Report:\n<https://developer.salesforce.com/docs/metadata-coverage>\n\nIf the type is available via Metadata API but not in the registry\n\n- Open an issue <https://github.com/forcedotcom/cli/issues>\n- Add the type via PR. Instructions: <https://github.com/forcedotcom/source-deploy-retrieve/blob/main/contributing/metadata.md>"]]));
|
|
27
29
|
let logger;
|
|
28
30
|
const getLogger = () => {
|
|
29
31
|
if (!logger) {
|
|
30
|
-
logger =
|
|
32
|
+
logger = logger_1.Logger.childFromRoot('StaticResourceMetadataTransformer');
|
|
31
33
|
}
|
|
32
34
|
return logger;
|
|
33
35
|
};
|
|
@@ -142,7 +144,7 @@ class StaticResourceMetadataTransformer extends baseMetadataTransformer_1.BaseMe
|
|
|
142
144
|
*/
|
|
143
145
|
// eslint-disable-next-line class-methods-use-this
|
|
144
146
|
async pipeline(stream, destination) {
|
|
145
|
-
(0, fileSystemHandler_1.ensureFileExists)(destination);
|
|
147
|
+
await (0, fileSystemHandler_1.ensureFileExists)(destination);
|
|
146
148
|
await (0, streams_1.getPipeline)()(stream, (0, graceful_fs_1.createWriteStream)(destination));
|
|
147
149
|
}
|
|
148
150
|
}
|
|
@@ -159,13 +161,13 @@ const FALLBACK_TYPE_MAP = new Map([
|
|
|
159
161
|
const getContentType = async (component) => {
|
|
160
162
|
const resource = (await component.parseXml()).StaticResource;
|
|
161
163
|
if (!resource || !Object.keys(resource).includes('contentType')) {
|
|
162
|
-
throw new
|
|
164
|
+
throw new sfError_1.SfError(messages.getMessage('error_static_resource_missing_resource_file', [
|
|
163
165
|
(0, node_path_1.join)('staticresources', component.name ?? component.xml ?? component.type.name),
|
|
164
166
|
]), 'LibraryError');
|
|
165
167
|
}
|
|
166
168
|
const output = resource.contentType ?? DEFAULT_CONTENT_TYPE;
|
|
167
169
|
if (typeof output !== 'string') {
|
|
168
|
-
throw new
|
|
170
|
+
throw new sfError_1.SfError(`Expected a string for contentType in ${component.name} (${component.xml ?? '<no xml>'}) but got ${JSON.stringify(output)}`);
|
|
169
171
|
}
|
|
170
172
|
return output;
|
|
171
173
|
};
|
|
@@ -177,7 +179,7 @@ const getBaseContentPath = (component, mergeWith) => {
|
|
|
177
179
|
const baseContentPath = component.getPackageRelativePath(component.content, 'source');
|
|
178
180
|
return (0, node_path_1.join)((0, node_path_1.dirname)(baseContentPath), (0, path_1.baseName)(baseContentPath));
|
|
179
181
|
}
|
|
180
|
-
throw new
|
|
182
|
+
throw new sfError_1.SfError(`Expected a content path for ${component.name} (${component.xml ?? '<no xml>'})`);
|
|
181
183
|
};
|
|
182
184
|
const getExtensionFromType = (contentType) =>
|
|
183
185
|
// return registered ext, fallback, or the default (application/octet-stream -> bin)
|
|
@@ -189,7 +191,7 @@ const componentIsExpandedArchive = async (component) => {
|
|
|
189
191
|
if (StaticResourceMetadataTransformer.ARCHIVE_MIME_TYPES.has(contentType)) {
|
|
190
192
|
return true;
|
|
191
193
|
}
|
|
192
|
-
throw new
|
|
194
|
+
throw new sfError_1.SfError(messages.getMessage('error_static_resource_expected_archive_type', [contentType, component.name]), 'LibraryError');
|
|
193
195
|
}
|
|
194
196
|
return false;
|
|
195
197
|
};
|
|
@@ -199,7 +201,7 @@ async function getStaticResourceZip(component, content) {
|
|
|
199
201
|
return await jszip_1.default.loadAsync(staticResourceZip, { createFolders: true });
|
|
200
202
|
}
|
|
201
203
|
catch (e) {
|
|
202
|
-
throw new
|
|
204
|
+
throw new sfError_1.SfError(`Unable to open zip file ${content} for ${component.name} (${component.xml ?? '<no xml>'})`, 'BadZipFile', ['Check that your file really is a valid zip archive']);
|
|
203
205
|
}
|
|
204
206
|
}
|
|
205
207
|
//# sourceMappingURL=staticResourceMetadataTransformer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"staticResourceMetadataTransformer.js","sourceRoot":"","sources":["../../../../src/convert/transformers/staticResourceMetadataTransformer.ts"],"names":[],"mappings":";;;;;;AAAA;;;;;GAKG;AACH,yCAA0E;AAC1E,6CAAuC;AACvC,kDAA0B;AAC1B,+BAAoC;AAEpC,6CAAgD;AAChD,
|
|
1
|
+
{"version":3,"file":"staticResourceMetadataTransformer.js","sourceRoot":"","sources":["../../../../src/convert/transformers/staticResourceMetadataTransformer.ts"],"names":[],"mappings":";;;;;;AAAA;;;;;GAKG;AACH,yCAA0E;AAC1E,6CAAuC;AACvC,kDAA0B;AAC1B,+BAAoC;AAEpC,6CAAgD;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,CAAC,OAAO,CAAC,EAAE,CAAC;QACzC,MAAM,WAAW,GAAG,MAAM,cAAc,CAAC,SAAS,CAAC,CAAC;QACpD,IAAI,iCAAiC,CAAC,kBAAkB,CAAC,GAAG,CAAC,WAAW,CAAC,EAAE,CAAC;YAC1E,OAAO,IAAI,CAAC;QACd,CAAC;QACD,MAAM,IAAI,iBAAO,CACf,QAAQ,CAAC,UAAU,CAAC,6CAA6C,EAAE,CAAC,WAAW,EAAE,SAAS,CAAC,IAAI,CAAC,CAAC,EACjG,cAAc,CACf,CAAC;IACJ,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC,CAAC;AAEF,KAAK,UAAU,oBAAoB,CAAC,SAA0B,EAAE,OAAe;IAC7E,IAAI,CAAC;QACH,MAAM,iBAAiB,GAAG,MAAM,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;QACjE,OAAO,MAAM,eAAK,CAAC,SAAS,CAAC,iBAAiB,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,CAAC;IAC3E,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,MAAM,IAAI,iBAAO,CACf,2BAA2B,OAAO,QAAQ,SAAS,CAAC,IAAI,KAAK,SAAS,CAAC,GAAG,IAAI,UAAU,GAAG,EAC3F,YAAY,EACZ,CAAC,oDAAoD,CAAC,CACvD,CAAC;IACJ,CAAC;AACH,CAAC"}
|
|
@@ -14,7 +14,7 @@ exports.getCoverage = exports.getCurrentApiVersion = void 0;
|
|
|
14
14
|
const got_1 = __importDefault(require("got"));
|
|
15
15
|
const proxy_agent_1 = require("proxy-agent");
|
|
16
16
|
const ts_types_1 = require("@salesforce/ts-types");
|
|
17
|
-
const
|
|
17
|
+
const sfError_1 = require("@salesforce/core/sfError");
|
|
18
18
|
const getProxiedOptions = (url) => ({
|
|
19
19
|
timeout: {
|
|
20
20
|
request: 10_000,
|
|
@@ -33,10 +33,10 @@ const getCurrentApiVersion = async () => {
|
|
|
33
33
|
apiVer = +lastVersionEntry.version;
|
|
34
34
|
}
|
|
35
35
|
catch (e) {
|
|
36
|
-
const err = e instanceof Error ? e :
|
|
36
|
+
const err = e instanceof Error ? e : sfError_1.SfError.wrap((0, ts_types_1.isString)(e) ? e : 'unknown');
|
|
37
37
|
const eMsg = 'Unable to get a current API version from the appexchange org';
|
|
38
38
|
const eActions = ['Provide an API version explicitly', 'Set an API version in the project configuration'];
|
|
39
|
-
throw new
|
|
39
|
+
throw new sfError_1.SfError(eMsg, 'ApiVersionRetrievalError', eActions, err);
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
return apiVer;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coverage.js","sourceRoot":"","sources":["../../../src/registry/coverage.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;AACH,+BAA+B;;;;;;AAG/B,8CAAsB;AACtB,6CAAyC;AACzC,mDAAgD;AAChD,
|
|
1
|
+
{"version":3,"file":"coverage.js","sourceRoot":"","sources":["../../../src/registry/coverage.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;AACH,+BAA+B;;;;;;AAG/B,8CAAsB;AACtB,6CAAyC;AACzC,mDAAgD;AAChD,sDAAmD;AAGnD,MAAM,iBAAiB,GAAG,CAAC,GAAW,EAA6B,EAAE,CAAC,CAAC;IACrE,OAAO,EAAE;QACP,OAAO,EAAE,MAAM;KAChB;IACD,KAAK,EAAE;QACL,KAAK,EAAE,IAAI,wBAAU,EAAE;KACxB;IACD,GAAG;CACJ,CAAC,CAAC;AAQH,IAAI,MAAc,CAAC;AAEZ,MAAM,oBAAoB,GAAG,KAAK,IAAqB,EAAE;IAC9D,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;QACzB,IAAI,CAAC;YACH,MAAM,cAAc,GAAG,kDAAkD,CAAC;YAC1E,MAAM,gBAAgB,GAAG,CAAC,MAAM,IAAA,aAAG,EAAC,iBAAiB,CAAC,cAAc,CAAC,CAAC,CAAC,IAAI,EA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
* The static import of json file should never be changed,
|
|
6
|
+
* other read methods might make esbuild fail to bundle the json file
|
|
4
7
|
*/
|
|
5
8
|
export declare const registry: Readonly<MetadataRegistry>;
|
|
@@ -30,12 +30,12 @@ exports.registry = void 0;
|
|
|
30
30
|
* Licensed under the BSD 3-Clause license.
|
|
31
31
|
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
32
32
|
*/
|
|
33
|
-
const collections_1 = require("../utils/collections");
|
|
34
|
-
// The static import of json file should never be changed,
|
|
35
|
-
// other read methods might make esbuild fail to bundle the json file
|
|
36
33
|
const registryData = __importStar(require("./metadataRegistry.json"));
|
|
37
34
|
/**
|
|
38
35
|
* The default metadata registry.
|
|
36
|
+
*
|
|
37
|
+
* The static import of json file should never be changed,
|
|
38
|
+
* other read methods might make esbuild fail to bundle the json file
|
|
39
39
|
*/
|
|
40
|
-
exports.registry =
|
|
40
|
+
exports.registry = registryData;
|
|
41
41
|
//# sourceMappingURL=registry.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../../src/registry/registry.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;GAKG;AACH,
|
|
1
|
+
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../../src/registry/registry.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;GAKG;AACH,sEAAwD;AAGxD;;;;;GAKG;AACU,QAAA,QAAQ,GAAG,YAA0C,CAAC"}
|
|
@@ -7,11 +7,12 @@ exports.RegistryAccess = void 0;
|
|
|
7
7
|
* Licensed under the BSD 3-Clause license.
|
|
8
8
|
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
9
9
|
*/
|
|
10
|
-
const
|
|
10
|
+
const messages_1 = require("@salesforce/core/messages");
|
|
11
|
+
const sfError_1 = require("@salesforce/core/sfError");
|
|
11
12
|
const variants_1 = require("./variants");
|
|
12
13
|
const levenshtein_1 = require("./levenshtein");
|
|
13
14
|
;
|
|
14
|
-
const messages = new
|
|
15
|
+
const messages = new messages_1.Messages('@salesforce/source-deploy-retrieve', 'sdr', new Map([["md_request_fail", "Metadata API request failed: %s"], ["error_convert_invalid_format", "Invalid conversion format '%s'"], ["error_could_not_infer_type", "%s: Could not infer a metadata type"], ["error_unexpected_child_type", "Unexpected child metadata [%s] found for parent type [%s]"], ["noParent", "Could not find parent type for %s (%s)"], ["error_expected_source_files", "%s: Expected source files for type '%s'"], ["error_failed_convert", "Component conversion failed: %s"], ["error_merge_metadata_target_unsupported", "Merge convert for metadata target format currently unsupported"], ["error_missing_adapter", "Missing adapter '%s' for metadata type '%s'"], ["error_missing_transformer", "Missing transformer '%s' for metadata type '%s'"], ["error_missing_type_definition", "Missing metadata type definition in registry for id '%s'."], ["error_missing_child_type_definition", "Type %s does not have a child type definition %s."], ["noChildTypes", "No child types found in registry for %s (reading %s at %s)"], ["error_no_metadata_xml_ignore", "Metadata xml file %s is forceignored but is required for %s."], ["noSourceIgnore", "%s metadata types require source files, but %s is forceignored."], ["noSourceIgnore.actions", "- Metadata types with content are composed of two files: a content file (ie MyApexClass.cls) and a -meta.xml file (i.e MyApexClass.cls-meta.xml). You must include both files in your .forceignore file. Or try appending \u201C\\*\u201D to your existing .forceignore entry.\n\nSee <https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_exclude_source.htm> for examples"], ["error_path_not_found", "%s: File or folder not found"], ["noContentFound", "SourceComponent %s (metadata type = %s) is missing its content file."], ["noContentFound.actions", ["Ensure the content file exists in the expected location.", "If the content file is in your .forceignore file, ensure the meta-xml file is also ignored to completely exclude it."]], ["error_parsing_xml", "SourceComponent %s (metadata type = %s) does not have an associated metadata xml to parse"], ["error_expected_file_path", "%s: path is to a directory, expected a file"], ["error_expected_directory_path", "%s: path is to a file, expected a directory"], ["error_directory_not_found_or_not_directory", "%s: path is not a directory"], ["error_no_directory_stream", "%s doesn't support readable streams on directories."], ["error_no_source_to_deploy", "No source-backed components present in the package."], ["error_no_components_to_retrieve", "No components in the package to retrieve."], ["error_static_resource_expected_archive_type", "A StaticResource directory must have a content type of application/zip or application/jar - found %s for %s."], ["error_static_resource_missing_resource_file", "A StaticResource must have an associated .resource file, missing %s.resource-meta.xml"], ["error_no_job_id", "The %s operation is missing a job ID. Initialize an operation with an ID, or start a new job."], ["missingApiVersion", "Could not determine an API version to use for the generated manifest. Tried looking for sourceApiVersion in sfdx-project.json, apiVersion from config vars, and the highest apiVersion from the APEX REST endpoint. Using API version 58.0 as a last resort."], ["invalid_xml_parsing", "error parsing %s due to:\\n message: %s\\n line: %s\\n code: %s"], ["zipBufferError", "Zip buffer was not created during conversion"], ["undefinedComponentSet", "Unable to construct a componentSet. Check the logs for more information."], ["replacementsFileNotRead", "The file \"%s\" specified in the \"replacements\" property of sfdx-project.json could not be read."], ["unsupportedBundleType", "Unsupported Bundle Type: %s"], ["filePathGeneratorNoTypeSupport", "Type not supported for filepath generation: %s"], ["missingFolderType", "The registry has %s as is inFolder but it does not have a folderType"], ["tooManyFiles", "Multiple files found for path: %s."], ["cantGetName", "Unable to calculate fullName from path: %s (%s)"], ["missingMetaFileSuffix", "The metadata registry is configured incorrectly for %s. Expected a metaFileSuffix."], ["uniqueIdElementNotInRegistry", "No uniqueIdElement found in registry for %s (reading %s at %s)."], ["uniqueIdElementNotInChild", "The uniqueIdElement %s was not found the child (reading %s at %s)."], ["suggest_type_header", "A metadata type lookup for \"%s\" found the following close matches:"], ["suggest_type_did_you_mean", "-- Did you mean \".%s%s\" instead for the \"%s\" metadata type?"], ["suggest_type_more_suggestions", "Additional suggestions:\nConfirm the file name, extension, and directory names are correct. Validate against the registry at:\n<https://github.com/forcedotcom/source-deploy-retrieve/blob/main/src/registry/metadataRegistry.json>\n\nIf the type is not listed in the registry, check that it has Metadata API support via the Metadata Coverage Report:\n<https://developer.salesforce.com/docs/metadata-coverage>\n\nIf the type is available via Metadata API but not in the registry\n\n- Open an issue <https://github.com/forcedotcom/cli/issues>\n- Add the type via PR. Instructions: <https://github.com/forcedotcom/source-deploy-retrieve/blob/main/contributing/metadata.md>"], ["type_name_suggestions", "Confirm the metadata type name is correct. Validate against the registry at:\n<https://github.com/forcedotcom/source-deploy-retrieve/blob/main/src/registry/metadataRegistry.json>\n\nIf the type is not listed in the registry, check that it has Metadata API support via the Metadata Coverage Report:\n<https://developer.salesforce.com/docs/metadata-coverage>\n\nIf the type is available via Metadata API but not in the registry\n\n- Open an issue <https://github.com/forcedotcom/cli/issues>\n- Add the type via PR. Instructions: <https://github.com/forcedotcom/source-deploy-retrieve/blob/main/contributing/metadata.md>"]]));
|
|
15
16
|
class RegistryAccess {
|
|
16
17
|
registry;
|
|
17
18
|
strictFolderTypes;
|
|
@@ -37,10 +38,10 @@ class RegistryAccess {
|
|
|
37
38
|
if (childType) {
|
|
38
39
|
return childType;
|
|
39
40
|
}
|
|
40
|
-
throw new
|
|
41
|
+
throw new sfError_1.SfError(messages.getMessage('error_missing_child_type_definition', [parentTypeId, lower]), 'RegistryError');
|
|
41
42
|
}
|
|
42
43
|
if (!this.registry.types[lower]) {
|
|
43
|
-
throw
|
|
44
|
+
throw sfError_1.SfError.create({
|
|
44
45
|
message: messages.getMessage('error_missing_type_definition', [name]),
|
|
45
46
|
name: 'RegistryError',
|
|
46
47
|
actions: (0, levenshtein_1.getTypeSuggestions)(this.registry, lower),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registryAccess.js","sourceRoot":"","sources":["../../../src/registry/registryAccess.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,
|
|
1
|
+
{"version":3,"file":"registryAccess.js","sourceRoot":"","sources":["../../../src/registry/registryAccess.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,wDAAqD;AACrD,sDAAmD;AAEnD,yCAAkD;AAClD,+CAAqE;;AAOrE,MAAM,QAAQ,OAAG,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CAAC,WAAW,EAAE,CAAC,IAAI,EAAE,CAAC;QAC7C,IAAI,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE,CAAC;YACpC,MAAM,YAAY,GAAG,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;YACrD,OAAO,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;QAC3C,CAAC;IACH,CAAC;CACF;AAvJD,wCAuJC"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import * as standardValueSetData from './stdValueSetRegistry.json';
|
|
1
2
|
/**
|
|
2
3
|
* The standardValueSet fullNames.
|
|
4
|
+
*
|
|
5
|
+
* The static import of json file should never be changed,
|
|
6
|
+
* other read methods might make esbuild fail to bundle the json file
|
|
3
7
|
*/
|
|
4
|
-
export declare const standardValueSet: Readonly<
|
|
5
|
-
fullnames: string[];
|
|
6
|
-
}>;
|
|
8
|
+
export declare const standardValueSet: Readonly<typeof standardValueSetData>;
|
|
@@ -30,12 +30,12 @@ exports.standardValueSet = void 0;
|
|
|
30
30
|
* Licensed under the BSD 3-Clause license.
|
|
31
31
|
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
32
32
|
*/
|
|
33
|
-
const collections_1 = require("../utils/collections");
|
|
34
|
-
// The static import of json file should never be changed,
|
|
35
|
-
// other read methods might make esbuild fail to bundle the json file
|
|
36
33
|
const standardValueSetData = __importStar(require("./stdValueSetRegistry.json"));
|
|
37
34
|
/**
|
|
38
35
|
* The standardValueSet fullNames.
|
|
36
|
+
*
|
|
37
|
+
* The static import of json file should never be changed,
|
|
38
|
+
* other read methods might make esbuild fail to bundle the json file
|
|
39
39
|
*/
|
|
40
|
-
exports.standardValueSet =
|
|
40
|
+
exports.standardValueSet = standardValueSetData;
|
|
41
41
|
//# sourceMappingURL=standardvalueset.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"standardvalueset.js","sourceRoot":"","sources":["../../../src/registry/standardvalueset.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;GAKG;AACH,
|
|
1
|
+
{"version":3,"file":"standardvalueset.js","sourceRoot":"","sources":["../../../src/registry/standardvalueset.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;GAKG;AACH,iFAAmE;AAEnE;;;;;GAKG;AACU,QAAA,gBAAgB,GAAG,oBAA6D,CAAC"}
|
|
@@ -14,7 +14,7 @@ export type RegistryLoadInput = {
|
|
|
14
14
|
presets?: never;
|
|
15
15
|
} | ProjectVariants;
|
|
16
16
|
/** combine the standard registration with any overrides specific in the sfdx-project.json */
|
|
17
|
-
export declare const getEffectiveRegistry: (input?: RegistryLoadInput) => MetadataRegistry
|
|
17
|
+
export declare const getEffectiveRegistry: (input?: RegistryLoadInput) => Readonly<MetadataRegistry>;
|
|
18
18
|
/** merge the children of the top-level properties (ex: types, suffixes, etc) on 2 registries */
|
|
19
19
|
export declare const firstLevelMerge: (original: MetadataRegistry, overrides: MetadataRegistry) => MetadataRegistry;
|
|
20
20
|
export {};
|
|
@@ -31,13 +31,12 @@ exports.firstLevelMerge = exports.getEffectiveRegistry = void 0;
|
|
|
31
31
|
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
32
32
|
*/
|
|
33
33
|
const core_1 = require("@salesforce/core");
|
|
34
|
-
const collections_1 = require("../utils/collections");
|
|
35
34
|
// The static import of json file should never be changed,
|
|
36
35
|
// other read methods might make esbuild fail to bundle the json file
|
|
37
36
|
const registryData = __importStar(require("./metadataRegistry.json"));
|
|
38
37
|
const presetMap_1 = require("./presets/presetMap");
|
|
39
38
|
/** combine the standard registration with any overrides specific in the sfdx-project.json */
|
|
40
|
-
const getEffectiveRegistry = (input) =>
|
|
39
|
+
const getEffectiveRegistry = (input) => removeEmptyStrings((0, exports.firstLevelMerge)(registryData, mergeVariants(input?.presets?.length ?? input?.registryCustomizations ? input : getProjectVariants(input?.projectDir))));
|
|
41
40
|
exports.getEffectiveRegistry = getEffectiveRegistry;
|
|
42
41
|
/** read the project to get additional registry customizations and sourceBehaviorOptions */
|
|
43
42
|
const getProjectVariants = (projectDir) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"variants.js","sourceRoot":"","sources":["../../../src/registry/variants.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;GAKG;AACH,2CAAwF;
|
|
1
|
+
{"version":3,"file":"variants.js","sourceRoot":"","sources":["../../../src/registry/variants.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;GAKG;AACH,2CAAwF;AAExF,0DAA0D;AAC1D,qEAAqE;AACrE,sEAAwD;AACxD,mDAAgD;AAoBhD,6FAA6F;AACtF,MAAM,oBAAoB,GAAG,CAAC,KAAyB,EAA8B,EAAE,CAC5F,kBAAkB,CAChB,IAAA,uBAAe,EACb,YAAgC,EAChC,aAAa,CACX,KAAK,EAAE,OAAO,EAAE,MAAM,IAAI,KAAK,EAAE,sBAAsB,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,kBAAkB,CAAC,KAAK,EAAE,UAAU,CAAC,CACxG,CACF,CACF,CAAC;AARS,QAAA,oBAAoB,wBAQ7B;AAEJ,2FAA2F;AAC3F,MAAM,kBAAkB,GAAG,CAAC,UAAmB,EAAmB,EAAE;IAClE,MAAM,MAAM,GAAG,aAAM,CAAC,aAAa,CAAC,6BAA6B,CAAC,CAAC;IACnE,MAAM,QAAQ,GAAG,eAAe,CAAC,UAAU,CAAC,CAAC;IAC7C,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,MAAM,CAAC,KAAK,CAAC,2CAA2C,CAAC,CAAC;QAC1D,oDAAoD;QACpD,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,yFAAyF;IACzF,MAAM,sBAAsB,GAAG,QA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AE,QAAQ,CAAC,OAAO,EAAE,IAAI,CAAC,GAAG,CAAC;YACpC,mBAAmB,EAAE,kBAAkB,CAAC,MAAM;YAC9C,mBAAmB,EAAE,kBAAkB,CAAC,IAAI,CAAC,GAAG,CAAC;SAClD,CAAC,CAAC;IACL,CAAC;SAAM,CAAC;QACN,MAAM,CAAC,KAAK,CAAC,+DAA+D,UAAU,EAAE,CAAC,CAAC;IAC5F,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAC"}
|
|
@@ -8,7 +8,8 @@ exports.BaseSourceAdapter = void 0;
|
|
|
8
8
|
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
9
9
|
*/
|
|
10
10
|
const node_path_1 = require("node:path");
|
|
11
|
-
const
|
|
11
|
+
const messages_1 = require("@salesforce/core/messages");
|
|
12
|
+
const sfError_1 = require("@salesforce/core/sfError");
|
|
12
13
|
const ts_types_1 = require("@salesforce/ts-types");
|
|
13
14
|
const path_1 = require("../../utils/path");
|
|
14
15
|
const forceIgnore_1 = require("../forceIgnore");
|
|
@@ -16,7 +17,7 @@ const treeContainers_1 = require("../treeContainers");
|
|
|
16
17
|
const sourceComponent_1 = require("../sourceComponent");
|
|
17
18
|
const registryAccess_1 = require("../../registry/registryAccess");
|
|
18
19
|
;
|
|
19
|
-
const messages = new
|
|
20
|
+
const messages = new messages_1.Messages('@salesforce/source-deploy-retrieve', 'sdr', new Map([["md_request_fail", "Metadata API request failed: %s"], ["error_convert_invalid_format", "Invalid conversion format '%s'"], ["error_could_not_infer_type", "%s: Could not infer a metadata type"], ["error_unexpected_child_type", "Unexpected child metadata [%s] found for parent type [%s]"], ["noParent", "Could not find parent type for %s (%s)"], ["error_expected_source_files", "%s: Expected source files for type '%s'"], ["error_failed_convert", "Component conversion failed: %s"], ["error_merge_metadata_target_unsupported", "Merge convert for metadata target format currently unsupported"], ["error_missing_adapter", "Missing adapter '%s' for metadata type '%s'"], ["error_missing_transformer", "Missing transformer '%s' for metadata type '%s'"], ["error_missing_type_definition", "Missing metadata type definition in registry for id '%s'."], ["error_missing_child_type_definition", "Type %s does not have a child type definition %s."], ["noChildTypes", "No child types found in registry for %s (reading %s at %s)"], ["error_no_metadata_xml_ignore", "Metadata xml file %s is forceignored but is required for %s."], ["noSourceIgnore", "%s metadata types require source files, but %s is forceignored."], ["noSourceIgnore.actions", "- Metadata types with content are composed of two files: a content file (ie MyApexClass.cls) and a -meta.xml file (i.e MyApexClass.cls-meta.xml). You must include both files in your .forceignore file. Or try appending \u201C\\*\u201D to your existing .forceignore entry.\n\nSee <https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_exclude_source.htm> for examples"], ["error_path_not_found", "%s: File or folder not found"], ["noContentFound", "SourceComponent %s (metadata type = %s) is missing its content file."], ["noContentFound.actions", ["Ensure the content file exists in the expected location.", "If the content file is in your .forceignore file, ensure the meta-xml file is also ignored to completely exclude it."]], ["error_parsing_xml", "SourceComponent %s (metadata type = %s) does not have an associated metadata xml to parse"], ["error_expected_file_path", "%s: path is to a directory, expected a file"], ["error_expected_directory_path", "%s: path is to a file, expected a directory"], ["error_directory_not_found_or_not_directory", "%s: path is not a directory"], ["error_no_directory_stream", "%s doesn't support readable streams on directories."], ["error_no_source_to_deploy", "No source-backed components present in the package."], ["error_no_components_to_retrieve", "No components in the package to retrieve."], ["error_static_resource_expected_archive_type", "A StaticResource directory must have a content type of application/zip or application/jar - found %s for %s."], ["error_static_resource_missing_resource_file", "A StaticResource must have an associated .resource file, missing %s.resource-meta.xml"], ["error_no_job_id", "The %s operation is missing a job ID. Initialize an operation with an ID, or start a new job."], ["missingApiVersion", "Could not determine an API version to use for the generated manifest. Tried looking for sourceApiVersion in sfdx-project.json, apiVersion from config vars, and the highest apiVersion from the APEX REST endpoint. Using API version 58.0 as a last resort."], ["invalid_xml_parsing", "error parsing %s due to:\\n message: %s\\n line: %s\\n code: %s"], ["zipBufferError", "Zip buffer was not created during conversion"], ["undefinedComponentSet", "Unable to construct a componentSet. Check the logs for more information."], ["replacementsFileNotRead", "The file \"%s\" specified in the \"replacements\" property of sfdx-project.json could not be read."], ["unsupportedBundleType", "Unsupported Bundle Type: %s"], ["filePathGeneratorNoTypeSupport", "Type not supported for filepath generation: %s"], ["missingFolderType", "The registry has %s as is inFolder but it does not have a folderType"], ["tooManyFiles", "Multiple files found for path: %s."], ["cantGetName", "Unable to calculate fullName from path: %s (%s)"], ["missingMetaFileSuffix", "The metadata registry is configured incorrectly for %s. Expected a metaFileSuffix."], ["uniqueIdElementNotInRegistry", "No uniqueIdElement found in registry for %s (reading %s at %s)."], ["uniqueIdElementNotInChild", "The uniqueIdElement %s was not found the child (reading %s at %s)."], ["suggest_type_header", "A metadata type lookup for \"%s\" found the following close matches:"], ["suggest_type_did_you_mean", "-- Did you mean \".%s%s\" instead for the \"%s\" metadata type?"], ["suggest_type_more_suggestions", "Additional suggestions:\nConfirm the file name, extension, and directory names are correct. Validate against the registry at:\n<https://github.com/forcedotcom/source-deploy-retrieve/blob/main/src/registry/metadataRegistry.json>\n\nIf the type is not listed in the registry, check that it has Metadata API support via the Metadata Coverage Report:\n<https://developer.salesforce.com/docs/metadata-coverage>\n\nIf the type is available via Metadata API but not in the registry\n\n- Open an issue <https://github.com/forcedotcom/cli/issues>\n- Add the type via PR. Instructions: <https://github.com/forcedotcom/source-deploy-retrieve/blob/main/contributing/metadata.md>"], ["type_name_suggestions", "Confirm the metadata type name is correct. Validate against the registry at:\n<https://github.com/forcedotcom/source-deploy-retrieve/blob/main/src/registry/metadataRegistry.json>\n\nIf the type is not listed in the registry, check that it has Metadata API support via the Metadata Coverage Report:\n<https://developer.salesforce.com/docs/metadata-coverage>\n\nIf the type is available via Metadata API but not in the registry\n\n- Open an issue <https://github.com/forcedotcom/cli/issues>\n- Add the type via PR. Instructions: <https://github.com/forcedotcom/source-deploy-retrieve/blob/main/contributing/metadata.md>"]]));
|
|
20
21
|
class BaseSourceAdapter {
|
|
21
22
|
type;
|
|
22
23
|
registry;
|
|
@@ -43,7 +44,7 @@ class BaseSourceAdapter {
|
|
|
43
44
|
}
|
|
44
45
|
}
|
|
45
46
|
if (rootMetadata && this.forceIgnore.denies(rootMetadata.path)) {
|
|
46
|
-
throw new
|
|
47
|
+
throw new sfError_1.SfError(messages.getMessage('error_no_metadata_xml_ignore', [rootMetadata.path, path]), 'UnexpectedForceIgnore');
|
|
47
48
|
}
|
|
48
49
|
let component;
|
|
49
50
|
if (rootMetadata) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"baseSourceAdapter.js","sourceRoot":"","sources":["../../../../src/resolve/adapters/baseSourceAdapter.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,yCAAmD;AACnD,
|
|
1
|
+
{"version":3,"file":"baseSourceAdapter.js","sourceRoot":"","sources":["../../../../src/resolve/adapters/baseSourceAdapter.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,yCAAmD;AACnD,wDAAqD;AACrD,sDAAmD;AACnD,mDAAoD;AAEpD,2CAAyE;AACzE,gDAA6C;AAC7C,sDAAuE;AACvE,wDAAqD;AAGrD,kEAA+D;;AAG/D,MAAM,QAAQ,OAAG,mBAAQ,CAAc,oCAAoC,EAAE,KAAK,qyLAAC,CAAC;AAEpF,MAAsB,iBAAiB;IAC3B,IAAI,CAAe;IACnB,QAAQ,CAAiB;IACzB,WAAW,CAAc;IACzB,IAAI,CAAgB;IAE9B;;;OAGG;IACO,SAAS,GAAG,KAAK,CAAC;IAClB,mBAAmB,GAAG,IAAI,CAAC;IAErC,YACE,IAAkB,EAClB,QAAQ,GAAG,IAAI,+BAAc,EAAE,EAC/B,WAAW,GAAG,IAAI,yBAAW,EAAE,EAC/B,IAAI,GAAG,IAAI,oCAAmB,EAAE;QAEhC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,WAAW,G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AC;IAED,4CAA4C;IAC5C,IAAI,CAAC,UAAU,EAAE,CAAC;QAChB,OAAO,YAAY,CAAC,QAAQ,CAAC;IAC/B,CAAC;IACD,MAAM,eAAe,GAAG,QAAQ,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;IAE3D,4HAA4H;IAC5H,IAAI,eAAe,CAAC,UAAU,IAAI,eAAe,CAAC,UAAU,KAAK,IAAI,CAAC,EAAE,EAAE,CAAC;QACzE,MAAM,MAAM,GAAG,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,eAAG,CAAC,CAAC;QAC5C,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,eAAe,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,IAAI,YAAY,CAAC,QAAQ,EAAE,CAAC;IACjG,CAAC;IACD,wFAAwF;IACxF,IAAI,eAAe,CAAC,UAAU,KAAK,IAAI,CAAC,EAAE,EAAE,CAAC;QAC3C,OAAO,YAAY,CAAC,QAAQ,CAAC;IAC/B,CAAC;IACD,MAAM,QAAQ,CAAC,WAAW,CAAC,aAAa,EAAE,CAAC,YAAY,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;AAC5E,CAAC,CAAC"}
|
|
@@ -7,12 +7,13 @@ exports.DecomposedSourceAdapter = void 0;
|
|
|
7
7
|
* Licensed under the BSD 3-Clause license.
|
|
8
8
|
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
9
9
|
*/
|
|
10
|
-
const
|
|
10
|
+
const messages_1 = require("@salesforce/core/messages");
|
|
11
|
+
const sfError_1 = require("@salesforce/core/sfError");
|
|
11
12
|
const sourceComponent_1 = require("../sourceComponent");
|
|
12
13
|
const path_1 = require("../../utils/path");
|
|
13
14
|
const mixedContentSourceAdapter_1 = require("./mixedContentSourceAdapter");
|
|
14
15
|
;
|
|
15
|
-
const messages = new
|
|
16
|
+
const messages = new messages_1.Messages('@salesforce/source-deploy-retrieve', 'sdr', new Map([["md_request_fail", "Metadata API request failed: %s"], ["error_convert_invalid_format", "Invalid conversion format '%s'"], ["error_could_not_infer_type", "%s: Could not infer a metadata type"], ["error_unexpected_child_type", "Unexpected child metadata [%s] found for parent type [%s]"], ["noParent", "Could not find parent type for %s (%s)"], ["error_expected_source_files", "%s: Expected source files for type '%s'"], ["error_failed_convert", "Component conversion failed: %s"], ["error_merge_metadata_target_unsupported", "Merge convert for metadata target format currently unsupported"], ["error_missing_adapter", "Missing adapter '%s' for metadata type '%s'"], ["error_missing_transformer", "Missing transformer '%s' for metadata type '%s'"], ["error_missing_type_definition", "Missing metadata type definition in registry for id '%s'."], ["error_missing_child_type_definition", "Type %s does not have a child type definition %s."], ["noChildTypes", "No child types found in registry for %s (reading %s at %s)"], ["error_no_metadata_xml_ignore", "Metadata xml file %s is forceignored but is required for %s."], ["noSourceIgnore", "%s metadata types require source files, but %s is forceignored."], ["noSourceIgnore.actions", "- Metadata types with content are composed of two files: a content file (ie MyApexClass.cls) and a -meta.xml file (i.e MyApexClass.cls-meta.xml). You must include both files in your .forceignore file. Or try appending \u201C\\*\u201D to your existing .forceignore entry.\n\nSee <https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_exclude_source.htm> for examples"], ["error_path_not_found", "%s: File or folder not found"], ["noContentFound", "SourceComponent %s (metadata type = %s) is missing its content file."], ["noContentFound.actions", ["Ensure the content file exists in the expected location.", "If the content file is in your .forceignore file, ensure the meta-xml file is also ignored to completely exclude it."]], ["error_parsing_xml", "SourceComponent %s (metadata type = %s) does not have an associated metadata xml to parse"], ["error_expected_file_path", "%s: path is to a directory, expected a file"], ["error_expected_directory_path", "%s: path is to a file, expected a directory"], ["error_directory_not_found_or_not_directory", "%s: path is not a directory"], ["error_no_directory_stream", "%s doesn't support readable streams on directories."], ["error_no_source_to_deploy", "No source-backed components present in the package."], ["error_no_components_to_retrieve", "No components in the package to retrieve."], ["error_static_resource_expected_archive_type", "A StaticResource directory must have a content type of application/zip or application/jar - found %s for %s."], ["error_static_resource_missing_resource_file", "A StaticResource must have an associated .resource file, missing %s.resource-meta.xml"], ["error_no_job_id", "The %s operation is missing a job ID. Initialize an operation with an ID, or start a new job."], ["missingApiVersion", "Could not determine an API version to use for the generated manifest. Tried looking for sourceApiVersion in sfdx-project.json, apiVersion from config vars, and the highest apiVersion from the APEX REST endpoint. Using API version 58.0 as a last resort."], ["invalid_xml_parsing", "error parsing %s due to:\\n message: %s\\n line: %s\\n code: %s"], ["zipBufferError", "Zip buffer was not created during conversion"], ["undefinedComponentSet", "Unable to construct a componentSet. Check the logs for more information."], ["replacementsFileNotRead", "The file \"%s\" specified in the \"replacements\" property of sfdx-project.json could not be read."], ["unsupportedBundleType", "Unsupported Bundle Type: %s"], ["filePathGeneratorNoTypeSupport", "Type not supported for filepath generation: %s"], ["missingFolderType", "The registry has %s as is inFolder but it does not have a folderType"], ["tooManyFiles", "Multiple files found for path: %s."], ["cantGetName", "Unable to calculate fullName from path: %s (%s)"], ["missingMetaFileSuffix", "The metadata registry is configured incorrectly for %s. Expected a metaFileSuffix."], ["uniqueIdElementNotInRegistry", "No uniqueIdElement found in registry for %s (reading %s at %s)."], ["uniqueIdElementNotInChild", "The uniqueIdElement %s was not found the child (reading %s at %s)."], ["suggest_type_header", "A metadata type lookup for \"%s\" found the following close matches:"], ["suggest_type_did_you_mean", "-- Did you mean \".%s%s\" instead for the \"%s\" metadata type?"], ["suggest_type_more_suggestions", "Additional suggestions:\nConfirm the file name, extension, and directory names are correct. Validate against the registry at:\n<https://github.com/forcedotcom/source-deploy-retrieve/blob/main/src/registry/metadataRegistry.json>\n\nIf the type is not listed in the registry, check that it has Metadata API support via the Metadata Coverage Report:\n<https://developer.salesforce.com/docs/metadata-coverage>\n\nIf the type is available via Metadata API but not in the registry\n\n- Open an issue <https://github.com/forcedotcom/cli/issues>\n- Add the type via PR. Instructions: <https://github.com/forcedotcom/source-deploy-retrieve/blob/main/contributing/metadata.md>"], ["type_name_suggestions", "Confirm the metadata type name is correct. Validate against the registry at:\n<https://github.com/forcedotcom/source-deploy-retrieve/blob/main/src/registry/metadataRegistry.json>\n\nIf the type is not listed in the registry, check that it has Metadata API support via the Metadata Coverage Report:\n<https://developer.salesforce.com/docs/metadata-coverage>\n\nIf the type is available via Metadata API but not in the registry\n\n- Open an issue <https://github.com/forcedotcom/cli/issues>\n- Add the type via PR. Instructions: <https://github.com/forcedotcom/source-deploy-retrieve/blob/main/contributing/metadata.md>"]]));
|
|
16
17
|
/**
|
|
17
18
|
* Handles decomposed types. A flavor of mixed content where a component can
|
|
18
19
|
* have additional -meta.xml files that represent child components of the main
|
|
@@ -99,7 +100,7 @@ class DecomposedSourceAdapter extends mixedContentSourceAdapter_1.MixedContentSo
|
|
|
99
100
|
else if (!component) {
|
|
100
101
|
// This is most likely metadata found within a CustomObject folder that is not a
|
|
101
102
|
// child type of CustomObject. E.g., Layout, SharingRules, ApexClass.
|
|
102
|
-
throw new
|
|
103
|
+
throw new sfError_1.SfError(messages.getMessage('error_unexpected_child_type', [trigger, this.type.name]), 'TypeInferenceError');
|
|
103
104
|
}
|
|
104
105
|
if (component) {
|
|
105
106
|
component.content = pathToContent;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"decomposedSourceAdapter.js","sourceRoot":"","sources":["../../../../src/resolve/adapters/decomposedSourceAdapter.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,
|
|
1
|
+
{"version":3,"file":"decomposedSourceAdapter.js","sourceRoot":"","sources":["../../../../src/resolve/adapters/decomposedSourceAdapter.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,wDAAqD;AACrD,sDAAmD;AAEnD,wDAAqD;AACrD,2CAA0E;AAC1E,2EAAwE;;AAGxE,MAAM,QAAQ,OAAG,mBAAQ,CAAc,oCAAoC,EAAE,KAAK,qyLAAC,CAAC;AAEpF;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,MAAa,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