@salesforce/source-tracking 2.0.0 → 2.1.2
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,30 @@
|
|
|
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
|
+
### [2.1.2](https://github.com/forcedotcom/source-tracking/compare/v2.1.1...v2.1.2) (2022-06-23)
|
|
6
|
+
|
|
7
|
+
### Bug Fixes
|
|
8
|
+
|
|
9
|
+
- bump core for autofetch ([3567c69](https://github.com/forcedotcom/source-tracking/commit/3567c69dd49444ef757b9699bb676a0a1a25561c))
|
|
10
|
+
|
|
11
|
+
### [2.1.1](https://github.com/forcedotcom/source-tracking/compare/v2.1.0...v2.1.1) (2022-06-22)
|
|
12
|
+
|
|
13
|
+
### Bug Fixes
|
|
14
|
+
|
|
15
|
+
- core for jsforce autofetch ([406c519](https://github.com/forcedotcom/source-tracking/commit/406c519827571fc8f9be2e8008b1cdd8b7827634))
|
|
16
|
+
|
|
17
|
+
## [2.1.0](https://github.com/forcedotcom/source-tracking/compare/v2.0.0...v2.1.0) (2022-06-22)
|
|
18
|
+
|
|
19
|
+
### Features
|
|
20
|
+
|
|
21
|
+
- use StateAggregator ([8a29ac6](https://github.com/forcedotcom/source-tracking/commit/8a29ac6cc7d4009cac32bd86ce55e82104991d95))
|
|
22
|
+
|
|
23
|
+
### Bug Fixes
|
|
24
|
+
|
|
25
|
+
- use await ([ce650bd](https://github.com/forcedotcom/source-tracking/commit/ce650bdc9d18a96adb1b0959c44c4e42eb972e2b))
|
|
26
|
+
- use fixed jsforce autoFetch, restore ut ([f52afd0](https://github.com/forcedotcom/source-tracking/commit/f52afd055d05c6c577e864b1d78edf2acebaab46))
|
|
27
|
+
- wait for query to finish ([4e4ac4b](https://github.com/forcedotcom/source-tracking/commit/4e4ac4b9e3a6a480e8ddb9419cecde7304db76c3))
|
|
28
|
+
|
|
5
29
|
## [2.0.0](https://github.com/forcedotcom/source-tracking/compare/v1.5.0...v2.0.0) (2022-05-23)
|
|
6
30
|
|
|
7
31
|
### ⚠ BREAKING CHANGES
|
package/lib/index.js
CHANGED
|
@@ -7,7 +7,11 @@
|
|
|
7
7
|
*/
|
|
8
8
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
9
9
|
if (k2 === undefined) k2 = k;
|
|
10
|
-
Object.
|
|
10
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
11
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
12
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
13
|
+
}
|
|
14
|
+
Object.defineProperty(o, k2, desc);
|
|
11
15
|
}) : (function(o, m, k, k2) {
|
|
12
16
|
if (k2 === undefined) k2 = k;
|
|
13
17
|
o[k2] = m[k];
|
|
@@ -178,6 +178,8 @@ class ShadowRepo {
|
|
|
178
178
|
const chunks = (0, functions_1.chunkArray)([...new Set(deployedFiles)], this.maxFileAdd);
|
|
179
179
|
for (const chunk of chunks) {
|
|
180
180
|
try {
|
|
181
|
+
// these need to be done sequentially (it's already batched) because isogit manages file locking
|
|
182
|
+
// eslint-disable-next-line no-await-in-loop
|
|
181
183
|
await git.add({
|
|
182
184
|
fs,
|
|
183
185
|
dir: this.projectPath,
|
|
@@ -198,6 +200,8 @@ class ShadowRepo {
|
|
|
198
200
|
}
|
|
199
201
|
}
|
|
200
202
|
for (const filepath of [...new Set(deletedFiles)]) {
|
|
203
|
+
// these need to be done sequentially because isogit manages file locking. Isogit remove does not support multiple files at once
|
|
204
|
+
// eslint-disable-next-line no-await-in-loop
|
|
201
205
|
await git.remove({ fs, dir: this.projectPath, gitdir: this.gitDir, filepath });
|
|
202
206
|
}
|
|
203
207
|
const sha = await git.commit({
|
|
@@ -12,7 +12,7 @@ const source_deploy_retrieve_1 = require("@salesforce/source-deploy-retrieve");
|
|
|
12
12
|
const functions_1 = require("./functions");
|
|
13
13
|
// See UT for examples of the complexity this must handle
|
|
14
14
|
// keys always use forward slashes, even on Windows
|
|
15
|
-
const pathAfterFullName = (fileResponse) => fileResponse
|
|
15
|
+
const pathAfterFullName = (fileResponse) => (fileResponse === null || fileResponse === void 0 ? void 0 : fileResponse.filePath)
|
|
16
16
|
? (0, path_1.join)((0, path_1.dirname)(fileResponse.filePath).substring((0, path_1.dirname)(fileResponse.filePath).lastIndexOf(fileResponse.fullName)), (0, path_1.basename)(fileResponse.filePath)).replace(/\\/gi, '/')
|
|
17
17
|
: '';
|
|
18
18
|
const registry = new source_deploy_retrieve_1.RegistryAccess();
|
|
@@ -282,11 +282,9 @@ class RemoteSourceTrackingService extends core_1.ConfigFile {
|
|
|
282
282
|
sourceMember.serverRevisionCounter = change.RevisionCounter;
|
|
283
283
|
sourceMember.isNameObsolete = change.IsNameObsolete;
|
|
284
284
|
}
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
this.logger.debug(`Inserting ${key} with RevisionCounter: ${change.RevisionCounter}${sync ? ' and syncing' : ''}`);
|
|
289
|
-
}
|
|
285
|
+
// We are not yet tracking it so we'll insert a new record
|
|
286
|
+
else if (!quiet) {
|
|
287
|
+
this.logger.debug(`Inserting ${key} with RevisionCounter: ${change.RevisionCounter}${sync ? ' and syncing' : ''}`);
|
|
290
288
|
}
|
|
291
289
|
// If we are syncing changes then we need to update the lastRetrievedFromServer field to
|
|
292
290
|
// match the RevisionCounter from the SourceMember.
|
|
@@ -437,6 +435,7 @@ class RemoteSourceTrackingService extends core_1.ConfigFile {
|
|
|
437
435
|
* Filter out known source tracking issues
|
|
438
436
|
* This prevents the polling from waiting on things that may never return
|
|
439
437
|
*/
|
|
438
|
+
// eslint-disable-next-line class-methods-use-this
|
|
440
439
|
calculateExpectedSourceMembers(expectedMembers) {
|
|
441
440
|
const outstandingSourceMembers = new Map();
|
|
442
441
|
expectedMembers
|
|
@@ -545,10 +544,8 @@ class RemoteSourceTrackingService extends core_1.ConfigFile {
|
|
|
545
544
|
this.logger.debug(query);
|
|
546
545
|
}
|
|
547
546
|
try {
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
});
|
|
551
|
-
return results.records;
|
|
547
|
+
return (await this.org.getConnection().tooling.query(query, { autoFetch: true, maxFetch: 50000 }))
|
|
548
|
+
.records;
|
|
552
549
|
}
|
|
553
550
|
catch (error) {
|
|
554
551
|
throw core_1.SfError.wrap(error);
|
package/lib/sourceTracking.js
CHANGED
|
@@ -37,6 +37,7 @@ class SourceTracking extends kit_1.AsyncCreatable {
|
|
|
37
37
|
this.project = options.project;
|
|
38
38
|
this.hasSfdxTrackingFiles = (0, compatibility_1.hasSfdxTrackingFiles)(this.org.getOrgId(), this.projectPath);
|
|
39
39
|
}
|
|
40
|
+
// eslint-disable-next-line class-methods-use-this
|
|
40
41
|
async init() {
|
|
41
42
|
// reserved for future use
|
|
42
43
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/source-tracking",
|
|
3
3
|
"description": "API for tracking local and remote Salesforce metadata changes",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.1.2",
|
|
5
5
|
"author": "Salesforce",
|
|
6
6
|
"license": "BSD-3-Clause",
|
|
7
7
|
"main": "lib/index.js",
|
|
@@ -43,15 +43,15 @@
|
|
|
43
43
|
"/oclif.manifest.json"
|
|
44
44
|
],
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@salesforce/core": "^3.
|
|
46
|
+
"@salesforce/core": "^3.21.5",
|
|
47
47
|
"@salesforce/kit": "^1.5.17",
|
|
48
|
-
"@salesforce/source-deploy-retrieve": "^6.0.
|
|
48
|
+
"@salesforce/source-deploy-retrieve": "^6.0.4",
|
|
49
49
|
"graceful-fs": "^4.2.9",
|
|
50
50
|
"isomorphic-git": "1.17.0",
|
|
51
51
|
"ts-retry-promise": "^0.6.0"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
|
-
"@salesforce/cli-plugins-testkit": "^
|
|
54
|
+
"@salesforce/cli-plugins-testkit": "^2.3.0",
|
|
55
55
|
"@salesforce/dev-config": "^3.0.0",
|
|
56
56
|
"@salesforce/dev-scripts": "^2.0.0",
|
|
57
57
|
"@salesforce/prettier-config": "^0.0.2",
|