@salesforce/source-deploy-retrieve 10.5.6 → 10.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/src/client/deployMessages.d.ts +20 -0
- package/lib/src/client/deployMessages.js +146 -0
- package/lib/src/client/deployMessages.js.map +1 -0
- package/lib/src/client/diagnosticUtil.d.ts +4 -8
- package/lib/src/client/diagnosticUtil.js +53 -112
- package/lib/src/client/diagnosticUtil.js.map +1 -1
- package/lib/src/client/index.d.ts +2 -2
- package/lib/src/client/index.js.map +1 -1
- package/lib/src/client/metadataApiDeploy.d.ts +4 -21
- package/lib/src/client/metadataApiDeploy.js +66 -200
- package/lib/src/client/metadataApiDeploy.js.map +1 -1
- package/lib/src/client/metadataApiRetrieve.d.ts +6 -12
- package/lib/src/client/metadataApiRetrieve.js +62 -165
- package/lib/src/client/metadataApiRetrieve.js.map +1 -1
- package/lib/src/client/metadataTransfer.d.ts +6 -6
- package/lib/src/client/metadataTransfer.js +58 -52
- package/lib/src/client/metadataTransfer.js.map +1 -1
- package/lib/src/client/retrieveExtract.d.ts +15 -0
- package/lib/src/client/retrieveExtract.js +130 -0
- package/lib/src/client/retrieveExtract.js.map +1 -0
- package/lib/src/client/types.d.ts +10 -4
- package/lib/src/client/types.js +1 -0
- package/lib/src/client/types.js.map +1 -1
- package/lib/src/collections/componentSet.d.ts +6 -3
- package/lib/src/collections/componentSet.js +31 -23
- package/lib/src/collections/componentSet.js.map +1 -1
- package/lib/src/collections/componentSetBuilder.d.ts +10 -1
- package/lib/src/collections/componentSetBuilder.js +139 -133
- package/lib/src/collections/componentSetBuilder.js.map +1 -1
- package/lib/src/collections/types.d.ts +2 -1
- package/lib/src/collections/types.js +2 -1
- package/lib/src/collections/types.js.map +1 -1
- package/lib/src/common/types.d.ts +2 -2
- package/lib/src/convert/convertContext/convertContext.d.ts +13 -0
- package/lib/src/convert/convertContext/convertContext.js +27 -0
- package/lib/src/convert/convertContext/convertContext.js.map +1 -0
- package/lib/src/convert/convertContext/decompositionFinalizer.d.ts +19 -0
- package/lib/src/convert/convertContext/decompositionFinalizer.js +27 -0
- package/lib/src/convert/convertContext/decompositionFinalizer.js.map +1 -0
- package/lib/src/convert/convertContext/nonDecompositionFinalizer.d.ts +42 -0
- package/lib/src/convert/convertContext/nonDecompositionFinalizer.js +167 -0
- package/lib/src/convert/convertContext/nonDecompositionFinalizer.js.map +1 -0
- package/lib/src/convert/convertContext/recompositionFinalizer.d.ts +29 -0
- package/lib/src/convert/convertContext/recompositionFinalizer.js +122 -0
- package/lib/src/convert/convertContext/recompositionFinalizer.js.map +1 -0
- package/lib/src/convert/convertContext/transactionFinalizer.d.ts +5 -0
- package/lib/src/convert/convertContext/transactionFinalizer.js +7 -0
- package/lib/src/convert/convertContext/transactionFinalizer.js.map +1 -0
- package/lib/src/convert/metadataConverter.d.ts +3 -3
- package/lib/src/convert/metadataConverter.js +37 -27
- package/lib/src/convert/metadataConverter.js.map +1 -1
- package/lib/src/convert/replacements.d.ts +1 -1
- package/lib/src/convert/streams.d.ts +10 -8
- package/lib/src/convert/streams.js +40 -31
- package/lib/src/convert/streams.js.map +1 -1
- package/lib/src/convert/transformers/baseMetadataTransformer.d.ts +3 -3
- package/lib/src/convert/transformers/baseMetadataTransformer.js +3 -3
- package/lib/src/convert/transformers/baseMetadataTransformer.js.map +1 -1
- package/lib/src/convert/transformers/decomposedMetadataTransformer.d.ts +2 -10
- package/lib/src/convert/transformers/decomposedMetadataTransformer.js +172 -164
- package/lib/src/convert/transformers/decomposedMetadataTransformer.js.map +1 -1
- package/lib/src/convert/transformers/defaultMetadataTransformer.d.ts +1 -1
- package/lib/src/convert/transformers/defaultMetadataTransformer.js +9 -9
- package/lib/src/convert/transformers/defaultMetadataTransformer.js.map +1 -1
- package/lib/src/convert/transformers/metadataTransformerFactory.d.ts +2 -2
- package/lib/src/convert/transformers/metadataTransformerFactory.js +1 -1
- package/lib/src/convert/transformers/metadataTransformerFactory.js.map +1 -1
- package/lib/src/convert/transformers/nonDecomposedMetadataTransformer.d.ts +1 -1
- package/lib/src/convert/transformers/nonDecomposedMetadataTransformer.js +7 -7
- package/lib/src/convert/transformers/nonDecomposedMetadataTransformer.js.map +1 -1
- package/lib/src/convert/transformers/staticResourceMetadataTransformer.d.ts +2 -2
- package/lib/src/convert/transformers/staticResourceMetadataTransformer.js +4 -4
- package/lib/src/convert/transformers/staticResourceMetadataTransformer.js.map +1 -1
- package/lib/src/convert/types.d.ts +13 -1
- package/lib/src/registry/coverage.js +10 -10
- package/lib/src/registry/coverage.js.map +1 -1
- package/lib/src/registry/presets/decomposeCustomLabelsBeta.json +43 -0
- package/lib/src/registry/presets/decomposePermissionSetBeta.json +186 -0
- package/lib/src/registry/presets/decomposeSharingRulesBeta.json +81 -0
- package/lib/src/registry/presets/decomposeWorkflowBeta.json +103 -0
- package/lib/src/registry/registry.d.ts +1 -1
- package/lib/src/registry/registry.js +2 -2
- package/lib/src/registry/registry.js.map +1 -1
- package/lib/src/registry/registryAccess.d.ts +2 -1
- package/lib/src/registry/registryAccess.js +6 -3
- package/lib/src/registry/registryAccess.js.map +1 -1
- package/lib/src/registry/standardvalueset.js +2 -2
- package/lib/src/registry/standardvalueset.js.map +1 -1
- package/lib/src/registry/types.d.ts +1 -1
- package/lib/src/registry/variants.d.ts +12 -0
- package/lib/src/registry/variants.js +71 -0
- package/lib/src/registry/variants.js.map +1 -0
- package/lib/src/resolve/adapters/baseSourceAdapter.d.ts +3 -13
- package/lib/src/resolve/adapters/baseSourceAdapter.js +61 -61
- package/lib/src/resolve/adapters/baseSourceAdapter.js.map +1 -1
- package/lib/src/resolve/adapters/bundleSourceAdapter.d.ts +1 -1
- package/lib/src/resolve/adapters/decomposedSourceAdapter.d.ts +2 -2
- package/lib/src/resolve/adapters/decomposedSourceAdapter.js +13 -12
- package/lib/src/resolve/adapters/decomposedSourceAdapter.js.map +1 -1
- package/lib/src/resolve/adapters/defaultSourceAdapter.d.ts +1 -1
- package/lib/src/resolve/adapters/digitalExperienceSourceAdapter.d.ts +2 -2
- package/lib/src/resolve/adapters/digitalExperienceSourceAdapter.js +10 -10
- package/lib/src/resolve/adapters/digitalExperienceSourceAdapter.js.map +1 -1
- package/lib/src/resolve/adapters/matchingContentSourceAdapter.d.ts +1 -2
- package/lib/src/resolve/adapters/matchingContentSourceAdapter.js +4 -7
- package/lib/src/resolve/adapters/matchingContentSourceAdapter.js.map +1 -1
- package/lib/src/resolve/adapters/mixedContentSourceAdapter.d.ts +1 -1
- package/lib/src/resolve/adapters/sourceAdapterFactory.d.ts +2 -1
- package/lib/src/resolve/adapters/sourceAdapterFactory.js +6 -16
- package/lib/src/resolve/adapters/sourceAdapterFactory.js.map +1 -1
- package/lib/src/resolve/connectionResolver.d.ts +1 -1
- package/lib/src/resolve/connectionResolver.js +9 -16
- package/lib/src/resolve/connectionResolver.js.map +1 -1
- package/lib/src/resolve/forceIgnore.d.ts +1 -1
- package/lib/src/resolve/manifestResolver.d.ts +1 -1
- package/lib/src/resolve/manifestResolver.js +39 -35
- package/lib/src/resolve/manifestResolver.js.map +1 -1
- package/lib/src/resolve/metadataResolver.d.ts +2 -47
- package/lib/src/resolve/metadataResolver.js +206 -215
- package/lib/src/resolve/metadataResolver.js.map +1 -1
- package/lib/src/resolve/sourceComponent.d.ts +3 -4
- package/lib/src/resolve/sourceComponent.js +17 -42
- package/lib/src/resolve/sourceComponent.js.map +1 -1
- package/lib/src/resolve/treeContainers.js +5 -14
- package/lib/src/resolve/treeContainers.js.map +1 -1
- package/lib/src/resolve/types.d.ts +2 -2
- package/lib/src/utils/decomposed.d.ts +7 -0
- package/lib/src/utils/decomposed.js +19 -0
- package/lib/src/utils/decomposed.js.map +1 -0
- 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/index.d.ts +1 -1
- package/lib/src/utils/index.js +2 -1
- package/lib/src/utils/index.js.map +1 -1
- package/lib/src/utils/path.d.ts +17 -2
- package/lib/src/utils/path.js +44 -1
- package/lib/src/utils/path.js.map +1 -1
- package/package.json +5 -8
- package/LICENSE +0 -29
- package/lib/src/convert/convertContext.d.ts +0 -92
- package/lib/src/convert/convertContext.js +0 -304
- package/lib/src/convert/convertContext.js.map +0 -1
- package/lib/src/convert/transformers/index.d.ts +0 -1
- package/lib/src/convert/transformers/index.js +0 -12
- package/lib/src/convert/transformers/index.js.map +0 -1
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
import { JsonMap } from '@salesforce/ts-types';
|
|
2
|
-
import { ComponentSet } from '../collections';
|
|
3
|
-
import { MetadataComponent, SourceComponent, NodeFSTreeContainer, TreeContainer } from '../resolve';
|
|
4
|
-
import { WriteInfo, WriterFormat } from './types';
|
|
5
|
-
declare abstract class ConvertTransactionFinalizer<T> {
|
|
6
|
-
protected abstract transactionState: T;
|
|
7
|
-
abstract finalize(defaultDirectory?: string): Promise<WriterFormat[]>;
|
|
8
|
-
}
|
|
9
|
-
type RecompositionStateValue = {
|
|
10
|
-
/**
|
|
11
|
-
* Parent component that children are rolled up into
|
|
12
|
-
*/
|
|
13
|
-
component?: SourceComponent;
|
|
14
|
-
/**
|
|
15
|
-
* Children to be rolled up into the parent file
|
|
16
|
-
*/
|
|
17
|
-
children?: ComponentSet;
|
|
18
|
-
};
|
|
19
|
-
type RecompositionState = Map<string, RecompositionStateValue>;
|
|
20
|
-
/**
|
|
21
|
-
* Merges child components that share the same parent in the conversion pipeline
|
|
22
|
-
* into a single file.
|
|
23
|
-
*/
|
|
24
|
-
declare class RecompositionFinalizer extends ConvertTransactionFinalizer<RecompositionState> {
|
|
25
|
-
transactionState: RecompositionState;
|
|
26
|
-
private parsedXmlCache;
|
|
27
|
-
finalize(): Promise<WriterFormat[]>;
|
|
28
|
-
private recompose;
|
|
29
|
-
}
|
|
30
|
-
export type DecompositionStateValue = {
|
|
31
|
-
foundMerge?: boolean;
|
|
32
|
-
writeInfo?: WriteInfo;
|
|
33
|
-
origin?: MetadataComponent;
|
|
34
|
-
component?: SourceComponent;
|
|
35
|
-
children?: ComponentSet;
|
|
36
|
-
};
|
|
37
|
-
export type DecompositionState = Map<string, DecompositionStateValue>;
|
|
38
|
-
/**
|
|
39
|
-
* Creates write infos for any children that haven't been written yet. Children may
|
|
40
|
-
* delay being written in order to find potential existing children to merge
|
|
41
|
-
* with in the conversion pipeline.
|
|
42
|
-
*/
|
|
43
|
-
declare class DecompositionFinalizer extends ConvertTransactionFinalizer<DecompositionState> {
|
|
44
|
-
transactionState: DecompositionState;
|
|
45
|
-
finalize(): Promise<WriterFormat[]>;
|
|
46
|
-
}
|
|
47
|
-
interface NonDecompositionState {
|
|
48
|
-
childrenByUniqueElement: Map<string, JsonMap>;
|
|
49
|
-
exampleComponent?: SourceComponent;
|
|
50
|
-
}
|
|
51
|
-
/**
|
|
52
|
-
* Merges child components that share the same parent in the conversion pipeline
|
|
53
|
-
* into a single file.
|
|
54
|
-
*
|
|
55
|
-
* Inserts unclaimed child components into the parent that belongs to the default package
|
|
56
|
-
*/
|
|
57
|
-
declare class NonDecompositionFinalizer extends ConvertTransactionFinalizer<NonDecompositionState> {
|
|
58
|
-
transactionState: NonDecompositionState;
|
|
59
|
-
protected mergeMap: Map<string, Map<string, JsonMap>>;
|
|
60
|
-
protected parentComponentMap: Map<string, SourceComponent>;
|
|
61
|
-
protected tree: TreeContainer | undefined;
|
|
62
|
-
finalize(defaultDirectory: string, tree?: NodeFSTreeContainer): Promise<WriterFormat[]>;
|
|
63
|
-
private initChildMapping;
|
|
64
|
-
/**
|
|
65
|
-
* check both top-level maps and make sure there are defaults
|
|
66
|
-
*/
|
|
67
|
-
private ensureDefaults;
|
|
68
|
-
/**
|
|
69
|
-
* Returns all the components of the incoming type in the project.
|
|
70
|
-
*
|
|
71
|
-
* Some components are not resolved during component resolution.
|
|
72
|
-
* This typically only happens when a specific source path was resolved. This is problematic for
|
|
73
|
-
* nondecomposed metadata types (like CustomLabels) because we need to know the location of each
|
|
74
|
-
* child type before recomposing the final xml.
|
|
75
|
-
* The labels could belong in any of the files OR need to go in the default location which already contains labels
|
|
76
|
-
*/
|
|
77
|
-
private getAllComponentsOfType;
|
|
78
|
-
/**
|
|
79
|
-
* Populate the mergeMap with all the children of all the local components
|
|
80
|
-
*/
|
|
81
|
-
private initMergeMap;
|
|
82
|
-
}
|
|
83
|
-
/**
|
|
84
|
-
* A state manager over the course of a single metadata conversion call.
|
|
85
|
-
*/
|
|
86
|
-
export declare class ConvertContext {
|
|
87
|
-
readonly decomposition: DecompositionFinalizer;
|
|
88
|
-
readonly recomposition: RecompositionFinalizer;
|
|
89
|
-
readonly nonDecomposition: NonDecompositionFinalizer;
|
|
90
|
-
executeFinalizers(defaultDirectory?: string): AsyncIterable<WriterFormat[]>;
|
|
91
|
-
}
|
|
92
|
-
export {};
|
|
@@ -1,304 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ConvertContext = void 0;
|
|
4
|
-
/*
|
|
5
|
-
* Copyright (c) 2020, salesforce.com, inc.
|
|
6
|
-
* All rights reserved.
|
|
7
|
-
* Licensed under the BSD 3-Clause license.
|
|
8
|
-
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
9
|
-
*/
|
|
10
|
-
const node_path_1 = require("node:path");
|
|
11
|
-
const ts_types_1 = require("@salesforce/ts-types");
|
|
12
|
-
const core_1 = require("@salesforce/core");
|
|
13
|
-
const kit_1 = require("@salesforce/kit");
|
|
14
|
-
const common_1 = require("../common");
|
|
15
|
-
const collections_1 = require("../collections");
|
|
16
|
-
const resolve_1 = require("../resolve");
|
|
17
|
-
const streams_1 = require("./streams");
|
|
18
|
-
;
|
|
19
|
-
const messages = new core_1.Messages('@salesforce/source-deploy-retrieve', 'sdr', new Map([["md_request_fail", "Metadata API request failed: %s"], ["error_convert_invalid_format", "Invalid conversion format '%s'"], ["error_could_not_infer_type", "%s: Could not infer a metadata type"], ["error_unexpected_child_type", "Unexpected child metadata [%s] found for parent type [%s]"], ["noParent", "Could not find parent type for %s (%s)"], ["error_expected_source_files", "%s: Expected source files for type '%s'"], ["error_failed_convert", "Component conversion failed: %s"], ["error_merge_metadata_target_unsupported", "Merge convert for metadata target format currently unsupported"], ["error_missing_adapter", "Missing adapter '%s' for metadata type '%s'"], ["error_missing_transformer", "Missing transformer '%s' for metadata type '%s'"], ["error_missing_type_definition", "Missing metadata type definition in registry for id '%s'."], ["error_missing_child_type_definition", "Type %s does not have a child type definition %s."], ["noChildTypes", "No child types found in registry for %s (reading %s at %s)"], ["error_no_metadata_xml_ignore", "Metadata xml file %s is forceignored but is required for %s."], ["noSourceIgnore", "%s metadata types require source files, but %s is forceignored."], ["noSourceIgnore.actions", "- Metadata types with content are composed of two files: a content file (ie MyApexClass.cls) and a -meta.xml file (i.e MyApexClass.cls-meta.xml). You must include both files in your .forceignore file. Or try appending \u201C\\*\u201D to your existing .forceignore entry.\n\nSee <https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_exclude_source.htm> for examples"], ["error_path_not_found", "%s: File or folder not found"], ["noContentFound", "SourceComponent %s (metadata type = %s) is missing its content file."], ["noContentFound.actions", ["Ensure the content file exists in the expected location.", "If the content file is in your .forceignore file, ensure the meta-xml file is also ignored to completely exclude it."]], ["error_parsing_xml", "SourceComponent %s (metadata type = %s) does not have an associated metadata xml to parse"], ["error_expected_file_path", "%s: path is to a directory, expected a file"], ["error_expected_directory_path", "%s: path is to a file, expected a directory"], ["error_directory_not_found_or_not_directory", "%s: path is not a directory"], ["error_no_directory_stream", "%s doesn't support readable streams on directories."], ["error_no_source_to_deploy", "No source-backed components present in the package."], ["error_no_components_to_retrieve", "No components in the package to retrieve."], ["error_static_resource_expected_archive_type", "A StaticResource directory must have a content type of application/zip or application/jar - found %s for %s."], ["error_static_resource_missing_resource_file", "A StaticResource must have an associated .resource file, missing %s.resource-meta.xml"], ["error_no_job_id", "The %s operation is missing a job ID. Initialize an operation with an ID, or start a new job."], ["missingApiVersion", "Could not determine an API version to use for the generated manifest. Tried looking for sourceApiVersion in sfdx-project.json, apiVersion from config vars, and the highest apiVersion from the APEX REST endpoint. Using API version 58.0 as a last resort."], ["invalid_xml_parsing", "error parsing %s due to:\\n message: %s\\n line: %s\\n code: %s"], ["zipBufferError", "Zip buffer was not created during conversion"], ["undefinedComponentSet", "Unable to construct a componentSet. Check the logs for more information."], ["replacementsFileNotRead", "The file \"%s\" specified in the \"replacements\" property of sfdx-project.json could not be read."], ["unsupportedBundleType", "Unsupported Bundle Type: %s"], ["filePathGeneratorNoTypeSupport", "Type not supported for filepath generation: %s"], ["missingFolderType", "The registry has %s as is inFolder but it does not have a folderType"], ["tooManyFiles", "Multiple files found for path: %s."], ["cantGetName", "Unable to calculate fullName from path: %s (%s)"], ["missingMetaFileSuffix", "The metadata registry is configured incorrectly for %s. Expected a metaFileSuffix."], ["uniqueIdElementNotInRegistry", "No uniqueIdElement found in registry for %s (reading %s at %s)."], ["uniqueIdElementNotInChild", "The uniqueIdElement %s was not found the child (reading %s at %s)."], ["suggest_type_header", "A metadata type lookup for \"%s\" found the following close matches:"], ["suggest_type_did_you_mean", "-- Did you mean \".%s%s\" instead for the \"%s\" metadata type?"], ["suggest_type_more_suggestions", "Additional suggestions:\nConfirm the file name, extension, and directory names are correct. Validate against the registry at:\n<https://github.com/forcedotcom/source-deploy-retrieve/blob/main/src/registry/metadataRegistry.json>\n\nIf the type is not listed in the registry, check that it has Metadata API support via the Metadata Coverage Report:\n<https://developer.salesforce.com/docs/metadata-coverage>\n\nIf the type is available via Metadata API but not in the registry\n\n- Open an issue <https://github.com/forcedotcom/cli/issues>\n- Add the type via PR. Instructions: <https://github.com/forcedotcom/source-deploy-retrieve/blob/main/contributing/metadata.md>"]]));
|
|
20
|
-
class ConvertTransactionFinalizer {
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* Merges child components that share the same parent in the conversion pipeline
|
|
24
|
-
* into a single file.
|
|
25
|
-
*/
|
|
26
|
-
class RecompositionFinalizer extends ConvertTransactionFinalizer {
|
|
27
|
-
constructor() {
|
|
28
|
-
super(...arguments);
|
|
29
|
-
this.transactionState = new Map();
|
|
30
|
-
// A cache of SourceComponent xml file paths to parsed contents so that identical child xml
|
|
31
|
-
// files are not read and parsed multiple times.
|
|
32
|
-
this.parsedXmlCache = new Map();
|
|
33
|
-
}
|
|
34
|
-
async finalize() {
|
|
35
|
-
return Promise.all(Array.from(this.transactionState.values()).map(async (stateValue) => {
|
|
36
|
-
if (!stateValue.component) {
|
|
37
|
-
throw new Error(`The parent component is missing from the recomposition state entry. The children are ${stateValue.children
|
|
38
|
-
?.toArray()
|
|
39
|
-
.map((c) => c.fullName)
|
|
40
|
-
.join(', ')}`);
|
|
41
|
-
}
|
|
42
|
-
const recomposedXmlObj = await this.recompose(stateValue.children, stateValue.component);
|
|
43
|
-
return {
|
|
44
|
-
component: stateValue.component,
|
|
45
|
-
writeInfos: [
|
|
46
|
-
{
|
|
47
|
-
source: new streams_1.JsToXml(recomposedXmlObj),
|
|
48
|
-
output: (0, node_path_1.join)(stateValue.component.type.directoryName, `${stateValue.component.fullName}.${stateValue.component.type.suffix}`),
|
|
49
|
-
},
|
|
50
|
-
],
|
|
51
|
-
};
|
|
52
|
-
}));
|
|
53
|
-
}
|
|
54
|
-
async recompose(children = new collections_1.ComponentSet(), parent) {
|
|
55
|
-
// When recomposing children that are non-decomposed, read and cache the parent XML to prevent
|
|
56
|
-
// reading the parent source file (referenced in all child SourceComponents) multiple times.
|
|
57
|
-
let parentXml;
|
|
58
|
-
if (parent.type.strategies?.transformer === "nonDecomposed" /* TransformerStrategy.NonDecomposed */ && parent.xml) {
|
|
59
|
-
parentXml = await parent.parseXml();
|
|
60
|
-
this.parsedXmlCache.set(parent.xml, parentXml);
|
|
61
|
-
}
|
|
62
|
-
const parentXmlObj = parent.type.strategies?.recomposition === "startEmpty" /* RecompositionStrategy.StartEmpty */
|
|
63
|
-
? {}
|
|
64
|
-
: parentXml ?? (await parent.parseXml());
|
|
65
|
-
for (const child of children) {
|
|
66
|
-
if (!child.parent) {
|
|
67
|
-
throw messages.createError('noParent', [child.fullName, child.type.name]);
|
|
68
|
-
}
|
|
69
|
-
const groupName = child.type.xmlElementName ?? child.type.directoryName;
|
|
70
|
-
const { name: parentName } = child.parent.type;
|
|
71
|
-
const childSourceComponent = child;
|
|
72
|
-
let xmlObj;
|
|
73
|
-
if (parentXml) {
|
|
74
|
-
// If the xml file for the child is in the cache, use it. Otherwise
|
|
75
|
-
// read and cache the xml file that contains this child and use it.
|
|
76
|
-
if (childSourceComponent.xml && !this.parsedXmlCache.has(childSourceComponent.xml)) {
|
|
77
|
-
// TODO: can we safely parallelize this?
|
|
78
|
-
// eslint-disable-next-line no-await-in-loop
|
|
79
|
-
this.parsedXmlCache.set(childSourceComponent.xml, await parent.parseXml(childSourceComponent.xml));
|
|
80
|
-
}
|
|
81
|
-
xmlObj = childSourceComponent.parseFromParentXml(this.parsedXmlCache.get((0, ts_types_1.ensureString)(childSourceComponent.xml, `Child component ${child.fullName} has no xml file`)));
|
|
82
|
-
}
|
|
83
|
-
else {
|
|
84
|
-
// TODO: can we safely parallelize this?
|
|
85
|
-
// eslint-disable-next-line no-await-in-loop
|
|
86
|
-
xmlObj = await childSourceComponent.parseXml();
|
|
87
|
-
}
|
|
88
|
-
if (!xmlObj) {
|
|
89
|
-
throw messages.createError('error_parsing_xml', [child.fullName, child.type.name]);
|
|
90
|
-
}
|
|
91
|
-
const childContents = xmlObj[child.type.name] ?? xmlObj;
|
|
92
|
-
if (!parentXmlObj[parentName]) {
|
|
93
|
-
parentXmlObj[parentName] = { [common_1.XML_NS_KEY]: common_1.XML_NS_URL };
|
|
94
|
-
}
|
|
95
|
-
// type safe way of checking childContents for the key
|
|
96
|
-
if ((0, ts_types_1.getString)(childContents, common_1.XML_NS_KEY)) {
|
|
97
|
-
// child don't need to be written with `xmlns="http://soap.sforce.com/2006/04/metadata"` attribute
|
|
98
|
-
delete childContents[common_1.XML_NS_KEY];
|
|
99
|
-
}
|
|
100
|
-
const parentObj = parentXmlObj[parentName];
|
|
101
|
-
if (!parentObj[groupName]) {
|
|
102
|
-
parentObj[groupName] = [];
|
|
103
|
-
}
|
|
104
|
-
// it might be an object and not an array. Example: custom object with a Field property containing a single field
|
|
105
|
-
const group = (0, kit_1.ensureArray)(parentObj[groupName]);
|
|
106
|
-
group.push(childContents);
|
|
107
|
-
}
|
|
108
|
-
return parentXmlObj;
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
/** DecompositionStateValue has all props as optional. The makes writeInfo and origin required */
|
|
112
|
-
const hasFullDecompositionInfo = (value) => Boolean(value[1].writeInfo) && Boolean(value[1].origin);
|
|
113
|
-
/**
|
|
114
|
-
* Creates write infos for any children that haven't been written yet. Children may
|
|
115
|
-
* delay being written in order to find potential existing children to merge
|
|
116
|
-
* with in the conversion pipeline.
|
|
117
|
-
*/
|
|
118
|
-
class DecompositionFinalizer extends ConvertTransactionFinalizer {
|
|
119
|
-
constructor() {
|
|
120
|
-
super(...arguments);
|
|
121
|
-
this.transactionState = new Map();
|
|
122
|
-
}
|
|
123
|
-
// eslint-disable-next-line @typescript-eslint/require-await
|
|
124
|
-
async finalize() {
|
|
125
|
-
return Array.from(this.transactionState.entries())
|
|
126
|
-
.filter(hasFullDecompositionInfo)
|
|
127
|
-
.filter(([, value]) => !value.foundMerge)
|
|
128
|
-
.map(([, value]) => ({ component: value.origin?.parent ?? value.origin, writeInfos: [value.writeInfo] }));
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
/**
|
|
132
|
-
* Merges child components that share the same parent in the conversion pipeline
|
|
133
|
-
* into a single file.
|
|
134
|
-
*
|
|
135
|
-
* Inserts unclaimed child components into the parent that belongs to the default package
|
|
136
|
-
*/
|
|
137
|
-
class NonDecompositionFinalizer extends ConvertTransactionFinalizer {
|
|
138
|
-
constructor() {
|
|
139
|
-
super(...arguments);
|
|
140
|
-
this.transactionState = {
|
|
141
|
-
childrenByUniqueElement: new Map(),
|
|
142
|
-
exampleComponent: undefined,
|
|
143
|
-
};
|
|
144
|
-
// filename => (childName => childXml)
|
|
145
|
-
this.mergeMap = new Map();
|
|
146
|
-
// filename => sourceComponent
|
|
147
|
-
this.parentComponentMap = new Map();
|
|
148
|
-
}
|
|
149
|
-
async finalize(defaultDirectory, tree = new resolve_1.NodeFSTreeContainer()) {
|
|
150
|
-
const writerData = [];
|
|
151
|
-
if (this.transactionState.childrenByUniqueElement.size === 0) {
|
|
152
|
-
return writerData;
|
|
153
|
-
}
|
|
154
|
-
this.tree = tree;
|
|
155
|
-
const packageDirectories = core_1.SfProject.getInstance(defaultDirectory).getPackageDirectories();
|
|
156
|
-
const pkgPaths = packageDirectories.map((pkg) => pkg.fullPath);
|
|
157
|
-
// nondecomposed metadata types can exist in multiple locations under the same name
|
|
158
|
-
// so we have to find all components that could potentially match inbound components
|
|
159
|
-
if (!this.transactionState.exampleComponent) {
|
|
160
|
-
throw new Error('No example component exists in the transaction state for nondecomposed metadata');
|
|
161
|
-
}
|
|
162
|
-
const allNonDecomposed = pkgPaths.includes(defaultDirectory)
|
|
163
|
-
? this.getAllComponentsOfType(pkgPaths, this.transactionState.exampleComponent.type.name)
|
|
164
|
-
: // defaultDirectory isn't a package, assume it's the target output dir for conversion so don't scan folder
|
|
165
|
-
[];
|
|
166
|
-
// prepare 3 maps to simplify component merging
|
|
167
|
-
await this.initMergeMap(allNonDecomposed);
|
|
168
|
-
this.parentComponentMap = new Map(allNonDecomposed.map((c) => [(0, ts_types_1.ensureString)(c.xml, `no xml file path for ${c.fullName}`), c]));
|
|
169
|
-
const childNameToParentFilePath = this.initChildMapping();
|
|
170
|
-
// we'll merge any new labels into the default location
|
|
171
|
-
const defaultKey = (0, node_path_1.join)(defaultDirectory, getDefaultOutput(this.transactionState.exampleComponent));
|
|
172
|
-
this.ensureDefaults(defaultKey);
|
|
173
|
-
// put the incoming components into the mergeMap. Keep track of any files we need to write
|
|
174
|
-
const filesToWrite = new Set();
|
|
175
|
-
this.transactionState.childrenByUniqueElement.forEach((child, childUniqueElement) => {
|
|
176
|
-
const parentKey = childNameToParentFilePath.get(childUniqueElement) ?? defaultKey;
|
|
177
|
-
const parentItemMap = this.mergeMap.get(parentKey);
|
|
178
|
-
parentItemMap?.set(childUniqueElement, child);
|
|
179
|
-
filesToWrite.add(parentKey);
|
|
180
|
-
});
|
|
181
|
-
// use the mergeMap to return the writables
|
|
182
|
-
this.mergeMap.forEach((children, parentKey) => {
|
|
183
|
-
if (filesToWrite.has(parentKey)) {
|
|
184
|
-
const parentSourceComponent = this.parentComponentMap.get(parentKey);
|
|
185
|
-
if (!parentSourceComponent) {
|
|
186
|
-
throw new Error(`No source component found for ${parentKey}`);
|
|
187
|
-
}
|
|
188
|
-
const recomposedXmlObj = recompose(children, parentSourceComponent);
|
|
189
|
-
writerData.push({
|
|
190
|
-
component: parentSourceComponent,
|
|
191
|
-
writeInfos: [{ source: new streams_1.JsToXml(recomposedXmlObj), output: parentKey }],
|
|
192
|
-
});
|
|
193
|
-
}
|
|
194
|
-
});
|
|
195
|
-
return writerData;
|
|
196
|
-
}
|
|
197
|
-
initChildMapping() {
|
|
198
|
-
const output = new Map();
|
|
199
|
-
this.mergeMap.forEach((children, parentKey) => {
|
|
200
|
-
children.forEach((child, childName) => {
|
|
201
|
-
output.set(childName, parentKey);
|
|
202
|
-
});
|
|
203
|
-
});
|
|
204
|
-
return output;
|
|
205
|
-
}
|
|
206
|
-
/**
|
|
207
|
-
* check both top-level maps and make sure there are defaults
|
|
208
|
-
*/
|
|
209
|
-
ensureDefaults(defaultKey) {
|
|
210
|
-
if (!this.mergeMap.has(defaultKey)) {
|
|
211
|
-
// If project has no files of this type, there won't be anything from allNonDecomposed.
|
|
212
|
-
this.mergeMap.set(defaultKey, new Map());
|
|
213
|
-
}
|
|
214
|
-
if (!this.parentComponentMap.has(defaultKey)) {
|
|
215
|
-
// it's possible to get here if there are no files of this type in the project.
|
|
216
|
-
// we don't have any SourceComponent to reference except the new incoming ones
|
|
217
|
-
// so this creates a "default" component with the correct path for the xml file
|
|
218
|
-
this.parentComponentMap.set(defaultKey, {
|
|
219
|
-
...this.transactionState.exampleComponent,
|
|
220
|
-
xml: defaultKey,
|
|
221
|
-
});
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
/**
|
|
225
|
-
* Returns all the components of the incoming type in the project.
|
|
226
|
-
*
|
|
227
|
-
* Some components are not resolved during component resolution.
|
|
228
|
-
* This typically only happens when a specific source path was resolved. This is problematic for
|
|
229
|
-
* nondecomposed metadata types (like CustomLabels) because we need to know the location of each
|
|
230
|
-
* child type before recomposing the final xml.
|
|
231
|
-
* The labels could belong in any of the files OR need to go in the default location which already contains labels
|
|
232
|
-
*/
|
|
233
|
-
getAllComponentsOfType(pkgDirs, componentType) {
|
|
234
|
-
const unprocessedComponents = collections_1.ComponentSet.fromSource({
|
|
235
|
-
fsPaths: pkgDirs,
|
|
236
|
-
include: new collections_1.ComponentSet([{ fullName: '*', type: componentType }]),
|
|
237
|
-
tree: this.tree,
|
|
238
|
-
}).getSourceComponents();
|
|
239
|
-
return unprocessedComponents.toArray();
|
|
240
|
-
}
|
|
241
|
-
/**
|
|
242
|
-
* Populate the mergeMap with all the children of all the local components
|
|
243
|
-
*/
|
|
244
|
-
async initMergeMap(allComponentsOfType) {
|
|
245
|
-
// A function we can parallelize since we have to parseXml for each local file
|
|
246
|
-
const getMappedChildren = async (component) => {
|
|
247
|
-
const results = await Promise.all(component.getChildren().map(async (child) => {
|
|
248
|
-
const childXml = await child.parseXml();
|
|
249
|
-
return [
|
|
250
|
-
(0, ts_types_1.getString)(childXml, (0, ts_types_1.ensureString)(child.type.uniqueIdElement), `No uniqueIdElement exists in the registry for ${child.type.name}`),
|
|
251
|
-
childXml,
|
|
252
|
-
];
|
|
253
|
-
}));
|
|
254
|
-
return new Map(results);
|
|
255
|
-
};
|
|
256
|
-
const result = await Promise.all(allComponentsOfType.map(async (c) => [
|
|
257
|
-
(0, ts_types_1.ensureString)(c.xml, `Missing xml file for ${c.type.name}`),
|
|
258
|
-
await getMappedChildren(c),
|
|
259
|
-
]));
|
|
260
|
-
this.mergeMap = new Map(result);
|
|
261
|
-
}
|
|
262
|
-
}
|
|
263
|
-
/**
|
|
264
|
-
* A state manager over the course of a single metadata conversion call.
|
|
265
|
-
*/
|
|
266
|
-
class ConvertContext {
|
|
267
|
-
constructor() {
|
|
268
|
-
this.decomposition = new DecompositionFinalizer();
|
|
269
|
-
this.recomposition = new RecompositionFinalizer();
|
|
270
|
-
this.nonDecomposition = new NonDecompositionFinalizer();
|
|
271
|
-
}
|
|
272
|
-
// eslint-disable-next-line @typescript-eslint/require-await
|
|
273
|
-
async *executeFinalizers(defaultDirectory) {
|
|
274
|
-
for (const member of Object.values(this)) {
|
|
275
|
-
if (member instanceof ConvertTransactionFinalizer) {
|
|
276
|
-
yield member.finalize(defaultDirectory);
|
|
277
|
-
}
|
|
278
|
-
}
|
|
279
|
-
}
|
|
280
|
-
}
|
|
281
|
-
exports.ConvertContext = ConvertContext;
|
|
282
|
-
/**
|
|
283
|
-
* Return a json object that's built up from the mergeMap children
|
|
284
|
-
*/
|
|
285
|
-
const recompose = (children, parentSourceComponent) => {
|
|
286
|
-
// for CustomLabels, that's `labels`
|
|
287
|
-
const groupName = parentSourceComponent.type.directoryName;
|
|
288
|
-
return {
|
|
289
|
-
[parentSourceComponent.type.name]: {
|
|
290
|
-
[common_1.XML_NS_KEY]: common_1.XML_NS_URL,
|
|
291
|
-
[groupName]: Array.from(children.values()),
|
|
292
|
-
},
|
|
293
|
-
};
|
|
294
|
-
};
|
|
295
|
-
/**
|
|
296
|
-
* Return the default filepath for new metadata of this type
|
|
297
|
-
*/
|
|
298
|
-
const getDefaultOutput = (component) => {
|
|
299
|
-
const { fullName } = component;
|
|
300
|
-
const [baseName] = fullName.split('.');
|
|
301
|
-
const output = `${baseName}.${component.type.suffix}${common_1.META_XML_SUFFIX}`;
|
|
302
|
-
return (0, node_path_1.join)(component.getPackageRelativePath('', 'source'), output);
|
|
303
|
-
};
|
|
304
|
-
//# sourceMappingURL=convertContext.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"convertContext.js","sourceRoot":"","sources":["../../../src/convert/convertContext.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,yCAAiC;AACjC,mDAAmF;AACnF,2CAAuD;AACvD,yCAA8C;AAC9C,sCAAoE;AACpE,gDAA8C;AAE9C,wCAAoG;AACpG,uCAAoC;;AAIpC,MAAM,QAAQ,OAAG,eAAQ,CAAc,oCAAoC,EAAE,KAAK,6pKAAC,CAAC;AACpF,MAAe,2BAA2B;CAIzC;AAcD;;;GAGG;AACH,MAAM,sBAAuB,SAAQ,2BAA+C;IAApF;;QACS,qBAAgB,GAAuB,IAAI,GAAG,EAAmC,CAAC;QAEzF,2FAA2F;QAC3F,gDAAgD;QACxC,mBAAc,GAAG,IAAI,GAAG,EAAmB,CAAC;IAoGtD,CAAC;IAlGQ,KAAK,CAAC,QAAQ;QACnB,OAAO,OAAO,CAAC,GAAG,CAChB,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,MAAM,EAAE,CAAC,CAAC,GAAG,CAAC,KAAK,EAAE,UAAU,EAAyB,EAAE;YACzF,IAAI,CAAC,UAAU,CAAC,SAAS,EAAE,CAAC;gBAC1B,MAAM,IAAI,KAAK,CACb,yFAAyF,UAAU,CAAC,QAAQ;oBAC1G,EAAE,OAAO,EAAE;qBACV,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC;qBACtB,IAAI,CAAC,IAAI,CAAC,EAAE,CAChB,CAAC;YACJ,CAAC;YAED,MAAM,gBAAgB,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,QAAQ,EAAE,U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C;AAEF;;GAEG;AACH,MAAM,gBAAgB,GAAG,CAAC,SAA0B,EAAU,EAAE;IAC9D,MAAM,EAAE,QAAQ,EAAE,GAAG,SAAS,CAAC;IAC/B,MAAM,CAAC,QAAQ,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACvC,MAAM,MAAM,GAAG,GAAG,QAAQ,IAAI,SAAS,CAAC,IAAI,CAAC,MAAM,GAAG,wBAAe,EAAE,CAAC;IAExE,OAAO,IAAA,gBAAI,EAAC,SAAS,CAAC,sBAAsB,CAAC,EAAE,EAAE,QAAQ,CAAC,EAAE,MAAM,CAAC,CAAC;AACtE,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { MetadataTransformerFactory } from './metadataTransformerFactory';
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.MetadataTransformerFactory = void 0;
|
|
4
|
-
/*
|
|
5
|
-
* Copyright (c) 2020, salesforce.com, inc.
|
|
6
|
-
* All rights reserved.
|
|
7
|
-
* Licensed under the BSD 3-Clause license.
|
|
8
|
-
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
9
|
-
*/
|
|
10
|
-
var metadataTransformerFactory_1 = require("./metadataTransformerFactory");
|
|
11
|
-
Object.defineProperty(exports, "MetadataTransformerFactory", { enumerable: true, get: function () { return metadataTransformerFactory_1.MetadataTransformerFactory; } });
|
|
12
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/convert/transformers/index.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,2EAA0E;AAAjE,wIAAA,0BAA0B,OAAA"}
|