@salesforce/source-tracking 1.3.1 → 1.4.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/CHANGELOG.md +6 -0
- package/lib/sourceTracking.d.ts +1 -0
- package/lib/sourceTracking.js +27 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
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
|
+
## [1.4.0](https://github.com/forcedotcom/source-tracking/compare/v1.3.1...v1.4.0) (2022-04-27)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
- comp set for pulls ([4b361a4](https://github.com/forcedotcom/source-tracking/commit/4b361a4f31ac4f810762ee8d6f8447f7eef1be31))
|
|
10
|
+
|
|
5
11
|
### [1.3.1](https://github.com/forcedotcom/source-tracking/compare/v1.3.0...v1.3.1) (2022-03-25)
|
|
6
12
|
|
|
7
13
|
### Bug Fixes
|
package/lib/sourceTracking.d.ts
CHANGED
|
@@ -33,6 +33,7 @@ export declare class SourceTracking extends AsyncCreatable {
|
|
|
33
33
|
* @returns ComponentSet[]
|
|
34
34
|
*/
|
|
35
35
|
localChangesAsComponentSet(byPackageDir?: boolean): Promise<ComponentSet[]>;
|
|
36
|
+
remoteNonDeletesAsComponentSet(): Promise<ComponentSet>;
|
|
36
37
|
/**
|
|
37
38
|
* Does most of the work for the force:source:status command.
|
|
38
39
|
* Outputs need a bit of massage since this aims to provide nice json.
|
package/lib/sourceTracking.js
CHANGED
|
@@ -116,6 +116,33 @@ class SourceTracking extends kit_1.AsyncCreatable {
|
|
|
116
116
|
})
|
|
117
117
|
.filter((componentSet) => componentSet.size > 0);
|
|
118
118
|
}
|
|
119
|
+
async remoteNonDeletesAsComponentSet() {
|
|
120
|
+
const [changeResults, sourceBackedComponents] = await Promise.all([
|
|
121
|
+
// all changes based on remote tracking
|
|
122
|
+
this.getChanges({
|
|
123
|
+
origin: 'remote',
|
|
124
|
+
state: 'nondelete',
|
|
125
|
+
format: 'ChangeResult',
|
|
126
|
+
}),
|
|
127
|
+
// only returns source-backed components (SBC)
|
|
128
|
+
this.getChanges({
|
|
129
|
+
origin: 'remote',
|
|
130
|
+
state: 'nondelete',
|
|
131
|
+
format: 'SourceComponent',
|
|
132
|
+
}),
|
|
133
|
+
]);
|
|
134
|
+
const componentSet = new source_deploy_retrieve_1.ComponentSet(sourceBackedComponents);
|
|
135
|
+
// there may be remote adds not in the SBC. So we add those manually
|
|
136
|
+
changeResults.forEach((cr) => {
|
|
137
|
+
if (cr.type && cr.name && !componentSet.has({ type: cr.type, fullName: cr.name })) {
|
|
138
|
+
componentSet.add({
|
|
139
|
+
type: cr.type,
|
|
140
|
+
fullName: cr.name,
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
});
|
|
144
|
+
return componentSet;
|
|
145
|
+
}
|
|
119
146
|
/**
|
|
120
147
|
* Does most of the work for the force:source:status command.
|
|
121
148
|
* Outputs need a bit of massage since this aims to provide nice json.
|
package/package.json
CHANGED