@salesforce/source-deploy-retrieve 4.5.2 → 4.5.3
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/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [4.5.3](https://github.com/forcedotcom/source-deploy-retrieve/compare/v4.5.2...v4.5.3) (2021-10-06)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* set correct status on file responses ([#465](https://github.com/forcedotcom/source-deploy-retrieve/issues/465)) ([3e95508](https://github.com/forcedotcom/source-deploy-retrieve/commit/3e9550846a0528f7c6c5ea02881003a87601fc1f))
|
|
11
|
+
|
|
5
12
|
### [4.5.2](https://github.com/forcedotcom/source-deploy-retrieve/compare/v4.5.1...v4.5.2) (2021-10-03)
|
|
6
13
|
|
|
7
14
|
|
|
@@ -8,7 +8,14 @@ export declare type MetadataApiRetrieveOptions = MetadataTransferOptions & Retri
|
|
|
8
8
|
export declare class RetrieveResult implements MetadataTransferResult {
|
|
9
9
|
readonly response: MetadataApiRetrieveStatus;
|
|
10
10
|
readonly components: ComponentSet;
|
|
11
|
-
|
|
11
|
+
private localComponents;
|
|
12
|
+
private fileResponses;
|
|
13
|
+
/**
|
|
14
|
+
* @param response The metadata retrieve response from the server
|
|
15
|
+
* @param components The ComponentSet of retrieved source components
|
|
16
|
+
* @param localComponents The ComponentSet used to create the retrieve request
|
|
17
|
+
*/
|
|
18
|
+
constructor(response: MetadataApiRetrieveStatus, components: ComponentSet, localComponents?: ComponentSet);
|
|
12
19
|
getFileResponses(): FileResponse[];
|
|
13
20
|
}
|
|
14
21
|
export declare class MetadataApiRetrieve extends MetadataTransfer<MetadataApiRetrieveStatus, RetrieveResult> {
|
|
@@ -25,12 +25,21 @@ const errors_1 = require("../errors");
|
|
|
25
25
|
const utils_1 = require("../utils");
|
|
26
26
|
const ts_types_1 = require("@salesforce/ts-types");
|
|
27
27
|
class RetrieveResult {
|
|
28
|
-
|
|
28
|
+
/**
|
|
29
|
+
* @param response The metadata retrieve response from the server
|
|
30
|
+
* @param components The ComponentSet of retrieved source components
|
|
31
|
+
* @param localComponents The ComponentSet used to create the retrieve request
|
|
32
|
+
*/
|
|
33
|
+
constructor(response, components, localComponents) {
|
|
29
34
|
this.response = response;
|
|
30
35
|
this.components = components;
|
|
36
|
+
this.localComponents = new collections_1.ComponentSet(localComponents === null || localComponents === void 0 ? void 0 : localComponents.getSourceComponents());
|
|
31
37
|
}
|
|
32
38
|
getFileResponses() {
|
|
33
|
-
|
|
39
|
+
if (this.response && this.fileResponses) {
|
|
40
|
+
return this.fileResponses;
|
|
41
|
+
}
|
|
42
|
+
this.fileResponses = [];
|
|
34
43
|
// construct failures
|
|
35
44
|
if (this.response.messages) {
|
|
36
45
|
const retrieveMessages = utils_1.normalizeToArray(this.response.messages);
|
|
@@ -39,7 +48,7 @@ class RetrieveResult {
|
|
|
39
48
|
const matches = message.problem.match(/.+'(.+)'.+'(.+)'/);
|
|
40
49
|
if (matches) {
|
|
41
50
|
const [typeName, fullName] = matches.slice(1);
|
|
42
|
-
|
|
51
|
+
this.fileResponses.push({
|
|
43
52
|
fullName,
|
|
44
53
|
type: typeName,
|
|
45
54
|
state: types_1.ComponentStatus.Failed,
|
|
@@ -48,7 +57,7 @@ class RetrieveResult {
|
|
|
48
57
|
});
|
|
49
58
|
}
|
|
50
59
|
else {
|
|
51
|
-
|
|
60
|
+
this.fileResponses.push({
|
|
52
61
|
fullName: '',
|
|
53
62
|
type: '',
|
|
54
63
|
problemType: 'Error',
|
|
@@ -64,18 +73,20 @@ class RetrieveResult {
|
|
|
64
73
|
const baseResponse = {
|
|
65
74
|
fullName,
|
|
66
75
|
type: type.name,
|
|
67
|
-
state:
|
|
76
|
+
state: this.localComponents.has(retrievedComponent)
|
|
77
|
+
? types_1.ComponentStatus.Changed
|
|
78
|
+
: types_1.ComponentStatus.Created,
|
|
68
79
|
};
|
|
69
80
|
if (!type.children) {
|
|
70
81
|
for (const filePath of retrievedComponent.walkContent()) {
|
|
71
|
-
|
|
82
|
+
this.fileResponses.push(Object.assign({}, baseResponse, { filePath }));
|
|
72
83
|
}
|
|
73
84
|
}
|
|
74
85
|
if (xml) {
|
|
75
|
-
|
|
86
|
+
this.fileResponses.push(Object.assign({}, baseResponse, { filePath: xml }));
|
|
76
87
|
}
|
|
77
88
|
}
|
|
78
|
-
return
|
|
89
|
+
return this.fileResponses;
|
|
79
90
|
}
|
|
80
91
|
}
|
|
81
92
|
exports.RetrieveResult = RetrieveResult;
|
|
@@ -148,7 +159,7 @@ class MetadataApiRetrieve extends metadataTransfer_1.MetadataTransfer {
|
|
|
148
159
|
}
|
|
149
160
|
components = components !== null && components !== void 0 ? components : new collections_1.ComponentSet(undefined, this.options.registry);
|
|
150
161
|
yield this.maybeSaveTempDirectory('source', components);
|
|
151
|
-
return new RetrieveResult(result, components);
|
|
162
|
+
return new RetrieveResult(result, components, this.components);
|
|
152
163
|
});
|
|
153
164
|
}
|
|
154
165
|
getPackageNames() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"metadataApiRetrieve.js","sourceRoot":"","sources":["../../../src/client/metadataApiRetrieve.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;GAKG;AACH,wCAAoE;AACpE,gDAA8C;AAC9C,wCAA+D;AAC/D,mCAWiB;AACjB,yDAA+E;AAC/E,sCAAwE;AACxE,oCAA4C;AAE5C,mDAA2D;AAK3D,MAAa,cAAc;
|
|
1
|
+
{"version":3,"file":"metadataApiRetrieve.js","sourceRoot":"","sources":["../../../src/client/metadataApiRetrieve.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;GAKG;AACH,wCAAoE;AACpE,gDAA8C;AAC9C,wCAA+D;AAC/D,mCAW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