@salesforce/source-deploy-retrieve 11.0.2 → 11.1.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/lib/src/collections/componentSetBuilder.d.ts +8 -0
- package/lib/src/collections/componentSetBuilder.js +28 -2
- package/lib/src/collections/componentSetBuilder.js.map +1 -1
- package/lib/src/resolve/connectionResolver.d.ts +1 -3
- package/lib/src/resolve/connectionResolver.js +44 -83
- package/lib/src/resolve/connectionResolver.js.map +1 -1
- package/package.json +6 -7
|
@@ -10,6 +10,14 @@ export type ManifestOption = {
|
|
|
10
10
|
type MetadataOption = {
|
|
11
11
|
metadataEntries: string[];
|
|
12
12
|
directoryPaths: string[];
|
|
13
|
+
/**
|
|
14
|
+
* Array of metadata type:name pairs to delete before the deploy. Use of wildcards is not allowed.
|
|
15
|
+
*/
|
|
16
|
+
destructiveEntriesPre?: string[];
|
|
17
|
+
/**
|
|
18
|
+
* Array of metadata type:name pairs to delete after the deploy. Use of wildcards is not allowed.
|
|
19
|
+
*/
|
|
20
|
+
destructiveEntriesPost?: string[];
|
|
13
21
|
};
|
|
14
22
|
type OrgOption = {
|
|
15
23
|
username: string;
|
|
@@ -37,8 +37,10 @@ const path = __importStar(require("node:path"));
|
|
|
37
37
|
const core_1 = require("@salesforce/core");
|
|
38
38
|
const graceful_fs_1 = __importDefault(require("graceful-fs"));
|
|
39
39
|
const minimatch_1 = __importDefault(require("minimatch"));
|
|
40
|
+
const sourceComponent_1 = require("../resolve/sourceComponent");
|
|
40
41
|
const componentSet_1 = require("../collections/componentSet");
|
|
41
42
|
const registryAccess_1 = require("../registry/registryAccess");
|
|
43
|
+
const types_1 = require("./types");
|
|
42
44
|
;
|
|
43
45
|
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>"]]));
|
|
44
46
|
class ComponentSetBuilder {
|
|
@@ -96,6 +98,24 @@ class ComponentSetBuilder {
|
|
|
96
98
|
.map(addToComponentSet(componentSet))
|
|
97
99
|
.map(addToComponentSet(componentSetFilter));
|
|
98
100
|
logger.debug(`Searching for matching metadata in directories: ${directoryPaths.join(', ')}`);
|
|
101
|
+
// add destructive changes if defined. Because these are deletes, all entries
|
|
102
|
+
// are resolved to SourceComponents
|
|
103
|
+
if (metadata.destructiveEntriesPre) {
|
|
104
|
+
metadata.destructiveEntriesPre
|
|
105
|
+
.map((0, exports.entryToTypeAndName)(registryAccess))
|
|
106
|
+
.map(assertNoWildcardInDestructiveEntries)
|
|
107
|
+
.flatMap(typeAndNameToMetadataComponents({ directoryPaths, registry: registryAccess }))
|
|
108
|
+
.map((mdComponent) => new sourceComponent_1.SourceComponent({ type: mdComponent.type, name: mdComponent.fullName }))
|
|
109
|
+
.map(addToComponentSet(componentSet, types_1.DestructiveChangesType.PRE));
|
|
110
|
+
}
|
|
111
|
+
if (metadata.destructiveEntriesPost) {
|
|
112
|
+
metadata.destructiveEntriesPost
|
|
113
|
+
.map((0, exports.entryToTypeAndName)(registryAccess))
|
|
114
|
+
.map(assertNoWildcardInDestructiveEntries)
|
|
115
|
+
.flatMap(typeAndNameToMetadataComponents({ directoryPaths, registry: registryAccess }))
|
|
116
|
+
.map((mdComponent) => new sourceComponent_1.SourceComponent({ type: mdComponent.type, name: mdComponent.fullName }))
|
|
117
|
+
.map(addToComponentSet(componentSet, types_1.DestructiveChangesType.POST));
|
|
118
|
+
}
|
|
99
119
|
const resolvedComponents = componentSet_1.ComponentSet.fromSource({
|
|
100
120
|
fsPaths: directoryPaths,
|
|
101
121
|
include: componentSetFilter,
|
|
@@ -133,8 +153,8 @@ class ComponentSetBuilder {
|
|
|
133
153
|
}
|
|
134
154
|
}
|
|
135
155
|
exports.ComponentSetBuilder = ComponentSetBuilder;
|
|
136
|
-
const addToComponentSet = (cs) => (cmp) => {
|
|
137
|
-
cs.add(cmp);
|
|
156
|
+
const addToComponentSet = (cs, deletionType) => (cmp) => {
|
|
157
|
+
cs.add(cmp, deletionType);
|
|
138
158
|
return cmp;
|
|
139
159
|
};
|
|
140
160
|
const componentSetBuilderErrorHandler = (e) => {
|
|
@@ -161,6 +181,12 @@ const assertComponentSetIsNotUndefined = (componentSet) => {
|
|
|
161
181
|
}
|
|
162
182
|
return componentSet;
|
|
163
183
|
};
|
|
184
|
+
const assertNoWildcardInDestructiveEntries = (mdEntry) => {
|
|
185
|
+
if (mdEntry.metadataName.includes('*')) {
|
|
186
|
+
throw core_1.SfError.create({ message: 'Wildcards are not supported when providing destructive metadata entries' });
|
|
187
|
+
}
|
|
188
|
+
return mdEntry;
|
|
189
|
+
};
|
|
164
190
|
/** This is only for debug output of matched files based on the command flags.
|
|
165
191
|
* It will log up to 20 file matches. */
|
|
166
192
|
const logComponents = (logger, componentSet) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"componentSetBuilder.js","sourceRoot":"","sources":["../../../src/collections/componentSetBuilder.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,gDAAkC;AAClC,2CAA8E;AAC9E,8DAA6B;AAC7B,0DAAkC;AAElC,8DAA2D;AAC3D,+DAA4D;;
|
|
1
|
+
{"version":3,"file":"componentSetBuilder.js","sourceRoot":"","sources":["../../../src/collections/componentSetBuilder.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,gDAAkC;AAClC,2CAA8E;AAC9E,8DAA6B;AAC7B,0DAAkC;AAElC,gEAA6D;AAC7D,8DAA2D;AAC3D,+DAA4D;AAG5D,mCAAwE;;AAGxE,MAAM,QAAQ,OAAG,eAAQ,CAAc,oCAAoC,EAAE,KAAK,6pKAAC,CAAC;AAyCpF,MAAa,mBAAmB;IAC9B;;;;;;;OAOG;IAEI,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,OAA4B;QACpD,MAAM,MAAM,GAAG,aAAM,CAAC,aAAa,CAAC,qBAAqB,CAAC,CAAC;QAC3D,IAAI,YAAsC,CAAC;QAE3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G,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,EAAE,GAAG,CAAC,YAAY,CAAC,CAAC,CAAC;IACpF,CAAC,CAAC,CAAC;IACH,OAAO,KAAK,CAAC;AACf,CAAC,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Connection
|
|
1
|
+
import { Connection } from '@salesforce/core';
|
|
2
2
|
import { RegistryAccess } from '../registry/registryAccess';
|
|
3
3
|
import { FileProperties } from '../client/types';
|
|
4
4
|
import { MetadataComponent } from './types';
|
|
@@ -10,11 +10,9 @@ export type ResolveConnectionResult = {
|
|
|
10
10
|
* Resolve MetadataComponents from an org connection
|
|
11
11
|
*/
|
|
12
12
|
export declare class ConnectionResolver {
|
|
13
|
-
protected logger: Logger;
|
|
14
13
|
private connection;
|
|
15
14
|
private registry;
|
|
16
15
|
private mdTypeNames;
|
|
17
16
|
constructor(connection: Connection, registry?: RegistryAccess, mdTypes?: string[]);
|
|
18
17
|
resolve(componentFilter?: (component: Partial<FileProperties>) => boolean): Promise<ResolveConnectionResult>;
|
|
19
|
-
private listMembers;
|
|
20
18
|
}
|
|
@@ -7,9 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
9
|
exports.ConnectionResolver = void 0;
|
|
10
|
-
const ts_retry_promise_1 = require("ts-retry-promise");
|
|
11
10
|
const core_1 = require("@salesforce/core");
|
|
12
|
-
const kit_1 = require("@salesforce/kit");
|
|
13
11
|
const ts_types_1 = require("@salesforce/ts-types");
|
|
14
12
|
const registryAccess_1 = require("../registry/registryAccess");
|
|
15
13
|
const standardvalueset_1 = require("../registry/standardvalueset");
|
|
@@ -23,7 +21,6 @@ class ConnectionResolver {
|
|
|
23
21
|
constructor(connection, registry = new registryAccess_1.RegistryAccess(), mdTypes) {
|
|
24
22
|
this.connection = connection;
|
|
25
23
|
this.registry = registry;
|
|
26
|
-
this.logger = core_1.Logger.childFromRoot(this.constructor.name);
|
|
27
24
|
this.mdTypeNames = mdTypes?.length
|
|
28
25
|
? // ensure the types passed in are valid per the registry
|
|
29
26
|
mdTypes.filter((t) => this.registry.getTypeByName(t))
|
|
@@ -34,18 +31,18 @@ class ConnectionResolver {
|
|
|
34
31
|
const childrenPromises = [];
|
|
35
32
|
const componentTypes = new Set();
|
|
36
33
|
const lifecycle = core_1.Lifecycle.getInstance();
|
|
37
|
-
const componentFromDescribe = (await Promise.all(this.mdTypeNames.map((type) => this.
|
|
34
|
+
const componentFromDescribe = (await Promise.all(this.mdTypeNames.map((type) => listMembers(this.registry)(this.connection)({ type })))).flat();
|
|
38
35
|
for (const component of componentFromDescribe) {
|
|
39
36
|
let componentType;
|
|
40
|
-
if (
|
|
37
|
+
if (isNonEmptyString(component.type)) {
|
|
41
38
|
componentType = this.registry.getTypeByName(component.type);
|
|
42
39
|
}
|
|
43
|
-
else if (
|
|
40
|
+
else if (isNonEmptyString(component.fileName)) {
|
|
44
41
|
// fix { type: { "$": { "xsi:nil": "true" } } }
|
|
45
42
|
componentType = (0, ts_types_1.ensurePlainObject)(this.registry.getTypeBySuffix((0, path_1.extName)(component.fileName)), `No type found for ${component.fileName} when matching by suffix. Check the file extension.`);
|
|
46
43
|
component.type = componentType.name;
|
|
47
44
|
}
|
|
48
|
-
else if (component.type
|
|
45
|
+
else if (!isNonEmptyString(component.type) && !isNonEmptyString(component.fileName)) {
|
|
49
46
|
// has no type and has no filename! Warn and skip that component.
|
|
50
47
|
// eslint-disable-next-line no-await-in-loop
|
|
51
48
|
await Promise.all([
|
|
@@ -61,10 +58,9 @@ class ConnectionResolver {
|
|
|
61
58
|
}
|
|
62
59
|
Aggregator.push(component);
|
|
63
60
|
componentTypes.add(componentType);
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
type: this.registry.getTypeByName(folderContentType).name,
|
|
61
|
+
if (componentType.folderContentType) {
|
|
62
|
+
childrenPromises.push(listMembers(this.registry)(this.connection)({
|
|
63
|
+
type: this.registry.getTypeByName(componentType.folderContentType).name,
|
|
68
64
|
folder: component.fullName,
|
|
69
65
|
}));
|
|
70
66
|
}
|
|
@@ -73,7 +69,7 @@ class ConnectionResolver {
|
|
|
73
69
|
const childTypes = componentType.children?.types;
|
|
74
70
|
if (childTypes) {
|
|
75
71
|
Object.values(childTypes).map((childType) => {
|
|
76
|
-
childrenPromises.push(this.
|
|
72
|
+
childrenPromises.push(listMembers(this.registry)(this.connection)({ type: childType.name }));
|
|
77
73
|
});
|
|
78
74
|
}
|
|
79
75
|
}
|
|
@@ -88,81 +84,46 @@ class ConnectionResolver {
|
|
|
88
84
|
apiVersion: this.connection.getApiVersion(),
|
|
89
85
|
};
|
|
90
86
|
}
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
// throw error if PollingClient timed out.
|
|
107
|
-
if (error instanceof ts_retry_promise_1.NotRetryableError) {
|
|
108
|
-
throw ts_retry_promise_1.NotRetryableError;
|
|
87
|
+
}
|
|
88
|
+
exports.ConnectionResolver = ConnectionResolver;
|
|
89
|
+
const listMembers = (registry) => (connection) => async (query) => {
|
|
90
|
+
const mdType = registry.getTypeByName(query.type);
|
|
91
|
+
// Workaround because metadata.list({ type: 'StandardValueSet' }) returns []
|
|
92
|
+
if (mdType.name === registry.getRegistry().types.standardvalueset.name) {
|
|
93
|
+
const members = [];
|
|
94
|
+
const standardValueSetPromises = standardvalueset_1.standardValueSet.fullnames.map(async (standardValueSetFullName) => {
|
|
95
|
+
try {
|
|
96
|
+
const standardValueSetRecord = await connection.singleRecordQuery(`SELECT Id, MasterLabel, Metadata FROM StandardValueSet WHERE MasterLabel = '${standardValueSetFullName}'`, { tooling: true });
|
|
97
|
+
return (standardValueSetRecord.Metadata.standardValue.length && {
|
|
98
|
+
fullName: standardValueSetRecord.MasterLabel,
|
|
99
|
+
fileName: `${mdType.directoryName}/${standardValueSetRecord.MasterLabel}.${mdType.suffix}`,
|
|
100
|
+
type: mdType.name,
|
|
101
|
+
});
|
|
109
102
|
}
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
// if the Metadata Type doesn't return a correct fileName then help it out
|
|
114
|
-
for (const m of members) {
|
|
115
|
-
if (typeof m.fileName == 'object') {
|
|
116
|
-
const t = this.registry.getTypeByName(query.type);
|
|
117
|
-
m.fileName = `${t.directoryName}/${m.fullName}.${t.suffix}`;
|
|
103
|
+
catch (err) {
|
|
104
|
+
const logger = core_1.Logger.childFromRoot('ConnectionResolver.listMembers');
|
|
105
|
+
logger.debug(err);
|
|
118
106
|
}
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
try {
|
|
124
|
-
// The 'singleRecordQuery' method was having connection errors, using `retry` resolves this
|
|
125
|
-
// Note that this type of connection retry logic may someday be added to jsforce v2
|
|
126
|
-
// Once that happens this logic could be reverted
|
|
127
|
-
const standardValueSetRecord = await (0, ts_retry_promise_1.retry)(async () => {
|
|
128
|
-
try {
|
|
129
|
-
return await this.connection.singleRecordQuery(`SELECT Id, MasterLabel, Metadata FROM StandardValueSet WHERE MasterLabel = '${standardValueSetFullName}'`, { tooling: true });
|
|
130
|
-
}
|
|
131
|
-
catch (err) {
|
|
132
|
-
// We exit the retry loop with `NotRetryableError` if we get an (expected) unsupported metadata type error
|
|
133
|
-
const error = err;
|
|
134
|
-
if (error.message.includes('either inaccessible or not supported in Metadata API')) {
|
|
135
|
-
this.logger.debug('Expected error:', error.message);
|
|
136
|
-
throw new ts_retry_promise_1.NotRetryableError(error.message);
|
|
137
|
-
}
|
|
138
|
-
// Otherwise throw the err so we can retry again
|
|
139
|
-
throw err;
|
|
140
|
-
}
|
|
141
|
-
});
|
|
142
|
-
return (standardValueSetRecord.Metadata.standardValue.length && {
|
|
143
|
-
fullName: standardValueSetRecord.MasterLabel,
|
|
144
|
-
fileName: `${this.registry.getRegistry().types.standardvalueset.directoryName}/${standardValueSetRecord.MasterLabel}.${this.registry.getRegistry().types.standardvalueset.suffix}`,
|
|
145
|
-
type: this.registry.getRegistry().types.standardvalueset.name,
|
|
146
|
-
});
|
|
147
|
-
}
|
|
148
|
-
catch (err) {
|
|
149
|
-
// error.message here will be overwritten by 'ts-retry-promise'
|
|
150
|
-
// Example error.message from the library: "All retries failed" or "Met not retryable error"
|
|
151
|
-
// 'ts-retry-promise' exposes the actual error on `error.lastError`
|
|
152
|
-
const error = err;
|
|
153
|
-
if (error.lastError?.message) {
|
|
154
|
-
this.logger.debug(error.lastError.message);
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
});
|
|
158
|
-
for await (const standardValueSetResult of standardValueSetPromises) {
|
|
159
|
-
if (standardValueSetResult) {
|
|
160
|
-
members.push(standardValueSetResult);
|
|
161
|
-
}
|
|
107
|
+
});
|
|
108
|
+
for await (const standardValueSetResult of standardValueSetPromises) {
|
|
109
|
+
if (standardValueSetResult) {
|
|
110
|
+
members.push(standardValueSetResult);
|
|
162
111
|
}
|
|
163
112
|
}
|
|
164
113
|
return members;
|
|
165
114
|
}
|
|
166
|
-
|
|
167
|
-
|
|
115
|
+
try {
|
|
116
|
+
return (await connection.metadata.list(query)).map(inferFilenamesFromType(mdType));
|
|
117
|
+
}
|
|
118
|
+
catch (error) {
|
|
119
|
+
const logger = core_1.Logger.childFromRoot('ConnectionResolver.listMembers');
|
|
120
|
+
logger.debug(error.message);
|
|
121
|
+
return [];
|
|
122
|
+
}
|
|
123
|
+
};
|
|
124
|
+
/* if the Metadata Type doesn't return a correct fileName then help it out */
|
|
125
|
+
const inferFilenamesFromType = (metadataType) => (member) => typeof member.fileName === 'object'
|
|
126
|
+
? { ...member, fileName: `${metadataType.directoryName}/${member.fullName}.${metadataType.suffix}` }
|
|
127
|
+
: member;
|
|
128
|
+
const isNonEmptyString = (value) => typeof value === 'string' && value.length > 0;
|
|
168
129
|
//# sourceMappingURL=connectionResolver.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connectionResolver.js","sourceRoot":"","sources":["../../../src/resolve/connectionResolver.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,
|
|
1
|
+
{"version":3,"file":"connectionResolver.js","sourceRoot":"","sources":["../../../src/resolve/connectionResolver.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,2CAAoF;AACpF,mDAAsF;AACtF,+DAA4D;AAE5D,mEAAgE;AAEhE,wCAAwC;;AAMxC,MAAM,QAAQ,OAAG,eAAQ,CAAc,oCAAoC,EAAE,KAAK,6pKAAC,CAAC;AAOpF;;GAEG;AACH,MAAa,kBAAkB;IAQ7B,YAAmB,UAAsB,EAAE,QAAQ,GAAG,IAAI,+BAAc,EAAE,EAAE,OAAkB;QAC5F,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,WAAW,GAAG,OAAO,EAAE,MAAM;YAChC,CAAC,CAAC,wDAAwD;gBACxD,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;YACvD,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,WAAW,EAAE,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;IAC1E,CAAC;IAEM,KAAK,CAAC,OAAO,CAClB,kBAAkB,CAAC,SAAkC,EAAW,EAAE,CAAC,IAAA,wBAAa,EAAC,SAAS,CAAC;Q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AAC,YAA0B,EAAE,EAAE,CAC/B,CAAC,MAA8B,EAA0B,EAAE,CACzD,OAAO,MAAM,CAAC,QAAQ,KAAK,QAAQ;IACjC,CAAC,CAAC,EAAE,GAAG,MAAM,EAAE,QAAQ,EAAE,GAAG,YAAY,CAAC,aAAa,IAAI,MAAM,CAAC,QAAQ,IAAI,YAAY,CAAC,MAAM,EAAE,EAAE;IACpG,CAAC,CAAC,MAAM,CAAC;AAEf,MAAM,gBAAgB,GAAG,CAAC,KAAyB,EAAW,EAAE,CAAC,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/source-deploy-retrieve",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.1.1",
|
|
4
4
|
"description": "JavaScript library to run Salesforce metadata deploys and retrieves",
|
|
5
5
|
"main": "lib/src/index.js",
|
|
6
6
|
"author": "Salesforce",
|
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
"node": ">=18.0.0"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@salesforce/core": "^7.3.
|
|
29
|
-
"@salesforce/kit": "^3.1.
|
|
28
|
+
"@salesforce/core": "^7.3.1",
|
|
29
|
+
"@salesforce/kit": "^3.1.1",
|
|
30
30
|
"@salesforce/ts-types": "^2.0.9",
|
|
31
31
|
"fast-levenshtein": "^3.0.0",
|
|
32
32
|
"fast-xml-parser": "^4.3.6",
|
|
@@ -36,12 +36,11 @@
|
|
|
36
36
|
"jszip": "^3.10.1",
|
|
37
37
|
"mime": "2.6.0",
|
|
38
38
|
"minimatch": "^5.1.6",
|
|
39
|
-
"proxy-agent": "^6.4.0"
|
|
40
|
-
"ts-retry-promise": "^0.7.1"
|
|
39
|
+
"proxy-agent": "^6.4.0"
|
|
41
40
|
},
|
|
42
41
|
"devDependencies": {
|
|
43
42
|
"@jsforce/jsforce-node": "^3.1.0",
|
|
44
|
-
"@salesforce/cli-plugins-testkit": "^5.2.
|
|
43
|
+
"@salesforce/cli-plugins-testkit": "^5.2.3",
|
|
45
44
|
"@salesforce/dev-scripts": "^9.0.0",
|
|
46
45
|
"@types/deep-equal-in-any-order": "^1.0.1",
|
|
47
46
|
"@types/fast-levenshtein": "^0.0.4",
|
|
@@ -50,7 +49,7 @@
|
|
|
50
49
|
"@types/minimatch": "^5.1.2",
|
|
51
50
|
"deep-equal-in-any-order": "^1.1.19",
|
|
52
51
|
"deepmerge": "^4.3.1",
|
|
53
|
-
"eslint-plugin-sf-plugin": "^1.18.
|
|
52
|
+
"eslint-plugin-sf-plugin": "^1.18.2",
|
|
54
53
|
"mocha-junit-reporter": "^1.23.3",
|
|
55
54
|
"mocha-snap": "^5.0.0",
|
|
56
55
|
"ts-node": "^10.9.2",
|