@jayree/sfdx-plugin-manifest 3.3.28 → 3.4.1
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +18 -0
- package/README.md +3 -3
- package/lib/SDR-extra/collections/componentSetExtra.js +1 -1
- package/lib/SDR-extra/collections/componentSetExtra.js.map +1 -1
- package/lib/SDR-extra/resolve/gitDiffResolver.d.ts +4 -5
- package/lib/SDR-extra/resolve/gitDiffResolver.js +45 -160
- package/lib/SDR-extra/resolve/gitDiffResolver.js.map +1 -1
- package/lib/SDR-extra/resolve/treeContainersExtra.d.ts +1 -2
- package/lib/SDR-extra/resolve/treeContainersExtra.js +28 -15
- package/lib/SDR-extra/resolve/treeContainersExtra.js.map +1 -1
- package/lib/SDR-extra/utils/gitComponentSetArray.d.ts +25 -0
- package/lib/SDR-extra/utils/gitComponentSetArray.js +142 -0
- package/lib/SDR-extra/utils/gitComponentSetArray.js.map +1 -0
- package/lib/SDR-extra/utils/index.d.ts +1 -0
- package/lib/SDR-extra/utils/index.js +1 -0
- package/lib/SDR-extra/utils/index.js.map +1 -1
- package/lib/SDR-extra/utils/localGitRepo.d.ts +19 -23
- package/lib/SDR-extra/utils/localGitRepo.js +129 -129
- package/lib/SDR-extra/utils/localGitRepo.js.map +1 -1
- package/lib/SDR-extra/utils/moveDetection.d.ts +16 -0
- package/lib/SDR-extra/utils/moveDetection.js +137 -0
- package/lib/SDR-extra/utils/moveDetection.js.map +1 -0
- package/lib/SDR-extra/utils/statusMatrix.d.ts +10 -0
- package/lib/SDR-extra/utils/statusMatrix.js +78 -0
- package/lib/SDR-extra/utils/statusMatrix.js.map +1 -0
- package/lib/SDR-extra/utils/worthWalking.d.ts +1 -0
- package/lib/SDR-extra/utils/worthWalking.js +19 -0
- package/lib/SDR-extra/utils/worthWalking.js.map +1 -0
- package/lib/commands/jayree/manifest/git/diff.js +4 -1
- package/lib/commands/jayree/manifest/git/diff.js.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/npm-shrinkwrap.json +867 -416
- package/oclif.lock +362 -251
- package/oclif.manifest.json +1 -1
- package/package.json +6 -3
package/CHANGELOG.md
CHANGED
@@ -1,3 +1,21 @@
|
|
1
|
+
## [3.4.1](https://github.com/jayree/sfdx-plugin-manifest/compare/3.4.0...3.4.1) (2024-08-10)
|
2
|
+
|
3
|
+
|
4
|
+
### Bug Fixes
|
5
|
+
|
6
|
+
* **deps:** bump @salesforce/source-tracking from 7.1.4 to 7.1.5 ([#1424](https://github.com/jayree/sfdx-plugin-manifest/issues/1424)) ([060e1f9](https://github.com/jayree/sfdx-plugin-manifest/commit/060e1f97f7342f6a5845eee70b86db678e07d9d0))
|
7
|
+
|
8
|
+
|
9
|
+
|
10
|
+
# [3.4.0](https://github.com/jayree/sfdx-plugin-manifest/compare/3.3.28...3.4.0) (2024-08-04)
|
11
|
+
|
12
|
+
|
13
|
+
### Features
|
14
|
+
|
15
|
+
* **manifest:git:diff:** new moved files detection ([#1392](https://github.com/jayree/sfdx-plugin-manifest/issues/1392)) ([3ca21a7](https://github.com/jayree/sfdx-plugin-manifest/commit/3ca21a7bcae522953098c4839a1f096e2f8b834e))
|
16
|
+
|
17
|
+
|
18
|
+
|
1
19
|
## [3.3.28](https://github.com/jayree/sfdx-plugin-manifest/compare/3.3.27...3.3.28) (2024-08-03)
|
2
20
|
|
3
21
|
|
package/README.md
CHANGED
@@ -60,7 +60,7 @@ EXAMPLES
|
|
60
60
|
$ sf jayree manifest cleanup --manifest=package.xml --file=packageignore.xml
|
61
61
|
```
|
62
62
|
|
63
|
-
_See code: [src/commands/jayree/manifest/cleanup.ts](https://github.com/jayree/sfdx-plugin-manifest/blob/3.
|
63
|
+
_See code: [src/commands/jayree/manifest/cleanup.ts](https://github.com/jayree/sfdx-plugin-manifest/blob/3.4.1/src/commands/jayree/manifest/cleanup.ts)_
|
64
64
|
|
65
65
|
### `sf jayree manifest generate`
|
66
66
|
|
@@ -98,7 +98,7 @@ EXAMPLES
|
|
98
98
|
<Package xmlns='http://soap.sforce.com/2006/04/metadata'>...</Package>
|
99
99
|
```
|
100
100
|
|
101
|
-
_See code: [src/commands/jayree/manifest/generate.ts](https://github.com/jayree/sfdx-plugin-manifest/blob/3.
|
101
|
+
_See code: [src/commands/jayree/manifest/generate.ts](https://github.com/jayree/sfdx-plugin-manifest/blob/3.4.1/src/commands/jayree/manifest/generate.ts)_
|
102
102
|
|
103
103
|
### `sf jayree manifest git diff REF1 [REF2]`
|
104
104
|
|
@@ -181,5 +181,5 @@ FLAG DESCRIPTIONS
|
|
181
181
|
The location can be an absolute path or relative to the current working directory.
|
182
182
|
```
|
183
183
|
|
184
|
-
_See code: [src/commands/jayree/manifest/git/diff.ts](https://github.com/jayree/sfdx-plugin-manifest/blob/3.
|
184
|
+
_See code: [src/commands/jayree/manifest/git/diff.ts](https://github.com/jayree/sfdx-plugin-manifest/blob/3.4.1/src/commands/jayree/manifest/git/diff.ts)_
|
185
185
|
<!-- commandsstop -->
|
@@ -8,7 +8,7 @@ import path from 'node:path';
|
|
8
8
|
import { ComponentSet, RegistryAccess, } from '@salesforce/source-deploy-retrieve';
|
9
9
|
import { SfProject, Lifecycle, Logger } from '@salesforce/core';
|
10
10
|
import fs from 'graceful-fs';
|
11
|
-
import { GitDiffResolver } from '../resolve/
|
11
|
+
import { GitDiffResolver } from '../resolve/gitDiffResolver.js';
|
12
12
|
const logger = Logger.childFromRoot('gitDiff:ComponentSetExtra');
|
13
13
|
export class ComponentSetExtra extends ComponentSet {
|
14
14
|
static async fromGitDiff(input) {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"componentSetExtra.js","sourceRoot":"","sources":["../../../src/SDR-extra/collections/componentSetExtra.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EACL,YAAY,EAGZ,cAAc,GAEf,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AA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9D,qBAAqB,GAAG,qBAAqB,CAAC,MAAM,CAAC,cAAc,CAAC,WAAW,EAAE,CAAC,CAAC;YACnF,qBAAqB,GAAG,qBAAqB,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;QACvE,CAAC;QAED,MAAM,SAAS,GAAG,SAAS,CAAC,WAAW,EAAE,CAAC;QAC1C,IAAI,KAAK,EAAE,MAAM,SAAS,IAAI,OAAO,CAAC,mBAAmB,EAAE,EAAE,CAAC;YAC5D,IACE,CAAC,qBAAqB,CAAC,IAAI,CACzB,CAAC,cAAc,EAAE,EAAE,CACjB,SAAS,CAAC,IAAI,CAAC,IAAI,KAAK,cAAc,CAAC,IAAI,CAAC,IAAI,IAAI,SAAS,CAAC,QAAQ,KAAK,cAAc,CAAC,QAAQ,CACrG,EACD,CAAC;gBACD,MAAM,SAAS,CAAC,WAAW,CACzB,kBAAkB,SAAS,CAAC,IAAI,CAAC,IAAI,IAAI,SAAS,CAAC,QAAQ,0BAA0B,CACtF,CAAC;YACJ,CAAC;QACH,CAAC;QAED,OAAO,UAAU,CAAC;IACpB,CAAC;CACF"}
|
@@ -9,16 +9,15 @@ export declare class GitDiffResolver {
|
|
9
9
|
private ref2VirtualTreeContainer;
|
10
10
|
private ref1Resolver;
|
11
11
|
private ref2Resolver;
|
12
|
-
private
|
13
|
-
private
|
12
|
+
private dir;
|
13
|
+
private packagesDirs;
|
14
14
|
private localRepo;
|
15
15
|
private registry;
|
16
|
+
private project;
|
16
17
|
/**
|
17
18
|
* @param dir SFDX project directory
|
18
19
|
*/
|
19
20
|
constructor(project: SfProject, registry?: RegistryAccess);
|
20
21
|
resolve(ref1: string, ref2: string | undefined, fsPaths: string[] | undefined): Promise<ComponentSet>;
|
21
|
-
private
|
22
|
-
private getComponentSet;
|
23
|
-
private getChildComponentStatus;
|
22
|
+
private gitChangesAsComponentSet;
|
24
23
|
}
|
@@ -5,12 +5,11 @@
|
|
5
5
|
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
6
6
|
*/
|
7
7
|
import path from 'node:path';
|
8
|
-
import { ComponentSet, RegistryAccess, MetadataResolver
|
8
|
+
import { ComponentSet, RegistryAccess, MetadataResolver } from '@salesforce/source-deploy-retrieve';
|
9
9
|
import { SfError, Lifecycle, Logger } from '@salesforce/core';
|
10
|
-
import equal from 'fast-deep-equal';
|
11
|
-
import { getString } from '@salesforce/ts-types';
|
12
10
|
import { GitRepo } from '../utils/localGitRepo.js';
|
13
|
-
import {
|
11
|
+
import { getComponentSets, getGroupedFiles } from '../utils/gitComponentSetArray.js';
|
12
|
+
import { VirtualTreeContainerExtra } from '../resolve/treeContainersExtra.js';
|
14
13
|
const logger = Logger.childFromRoot('gitDiff:resolver');
|
15
14
|
/**
|
16
15
|
* Resolver for metadata type and component objects from a git diff result
|
@@ -21,20 +20,23 @@ export class GitDiffResolver {
|
|
21
20
|
ref2VirtualTreeContainer;
|
22
21
|
ref1Resolver;
|
23
22
|
ref2Resolver;
|
24
|
-
|
25
|
-
|
23
|
+
dir;
|
24
|
+
packagesDirs;
|
26
25
|
localRepo;
|
27
26
|
registry;
|
27
|
+
project;
|
28
28
|
/**
|
29
29
|
* @param dir SFDX project directory
|
30
30
|
*/
|
31
31
|
constructor(project, registry) {
|
32
|
-
this.
|
32
|
+
this.project = project;
|
33
|
+
this.dir = project.getPath();
|
33
34
|
this.registry = registry ?? new RegistryAccess();
|
34
|
-
this.
|
35
|
+
this.packagesDirs = project.getUniquePackageDirectories();
|
35
36
|
this.localRepo = GitRepo.getInstance({
|
36
|
-
|
37
|
-
packageDirs: this.
|
37
|
+
dir: this.dir,
|
38
|
+
packageDirs: this.packagesDirs,
|
39
|
+
registry: this.registry,
|
38
40
|
});
|
39
41
|
}
|
40
42
|
async resolve(ref1, ref2, fsPaths) {
|
@@ -52,15 +54,14 @@ export class GitDiffResolver {
|
|
52
54
|
ref2 = r2;
|
53
55
|
}
|
54
56
|
logger.debug({ ref1, ref2 });
|
55
|
-
|
56
|
-
logger.debug({ fileStatus });
|
57
|
+
await this.localRepo.getStatus(ref1, ref2);
|
57
58
|
const [ref1VirtualTreeContainer, ref2VirtualTreeContainer] = await Promise.all([
|
58
|
-
VirtualTreeContainerExtra.fromGitRef(ref1, this.
|
59
|
-
VirtualTreeContainerExtra.fromGitRef(ref2, this.
|
59
|
+
VirtualTreeContainerExtra.fromGitRef(ref1, this.dir, this.localRepo.getModifyFilenames()),
|
60
|
+
VirtualTreeContainerExtra.fromGitRef(ref2, this.dir, this.localRepo.getModifyFilenames()),
|
60
61
|
]);
|
61
62
|
if (fsPaths) {
|
62
63
|
fsPaths.map((filepath) => {
|
63
|
-
filepath = path.
|
64
|
+
filepath = filepath.endsWith(path.sep) && filepath.length > 1 ? filepath.slice(0, -1) : filepath;
|
64
65
|
if (!ref1VirtualTreeContainer.exists(filepath) && !ref2VirtualTreeContainer.exists(filepath)) {
|
65
66
|
throw new SfError(`The sourcepath "${filepath}" is not a valid source file path.`);
|
66
67
|
}
|
@@ -69,154 +70,38 @@ export class GitDiffResolver {
|
|
69
70
|
this.ref2VirtualTreeContainer = ref2VirtualTreeContainer;
|
70
71
|
this.ref1Resolver = new MetadataResolver(this.registry, ref1VirtualTreeContainer);
|
71
72
|
this.ref2Resolver = new MetadataResolver(this.registry, this.ref2VirtualTreeContainer);
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
files = (await this.localRepo.getFileState({ ref1, ref2 })).filter((l) => this.uniquePackageDirectories.some((f) => l.path.startsWith(f)));
|
78
|
-
}
|
79
|
-
else {
|
80
|
-
files = await this.localRepo.getStatus(ref1);
|
81
|
-
}
|
82
|
-
files = files.filter((file) => {
|
83
|
-
if (file.status === 'D') {
|
84
|
-
for (const sourcePath of this.uniquePackageDirectories) {
|
85
|
-
const defaultFolder = path.join(sourcePath, 'main', 'default');
|
86
|
-
const filePath = file.path.replace(file.path.startsWith(defaultFolder) ? defaultFolder : sourcePath, '');
|
87
|
-
const target = files.find((t) => t.path.endsWith(filePath) && t.status === 'A');
|
88
|
-
if (target) {
|
89
|
-
return false;
|
90
|
-
}
|
91
|
-
}
|
92
|
-
const fullName = parseMetadataXml(file.path)?.fullName;
|
93
|
-
if (fullName) {
|
94
|
-
if (files.find((a) => a.path === path.join(path.dirname(file.path), fullName, path.basename(file.path)) && a.status === 'A')) {
|
95
|
-
return false;
|
96
|
-
}
|
97
|
-
}
|
98
|
-
}
|
99
|
-
return true;
|
100
|
-
});
|
101
|
-
return files;
|
102
|
-
}
|
103
|
-
// eslint-disable-next-line complexity
|
104
|
-
async getComponentSet(gitLines) {
|
105
|
-
const results = new ComponentSet(undefined, this.registry);
|
106
|
-
const childComponentPromises = [];
|
107
|
-
for (const [, { status, path: fpath }] of gitLines.entries()) {
|
108
|
-
if (status === 'D') {
|
109
|
-
for (const c of this.ref1Resolver.getComponentsFromPath(fpath)) {
|
110
|
-
// if the component supports partial delete AND there are files that are not deleted,
|
111
|
-
// set the component for deploy, not for delete.
|
112
|
-
// https://github.com/forcedotcom/source-tracking/blob/5cb32bef2e5860c0f8fc2afa3ea65432fe511a99/src/shared/localComponentSetArray.ts#L81
|
113
|
-
if ((!!c.type.supportsPartialDelete || c.type.name === 'CustomObjectTranslation') &&
|
114
|
-
c.content &&
|
115
|
-
this.ref2VirtualTreeContainer.exists(c.content)) {
|
116
|
-
// all bundle types have a directory name
|
117
|
-
try {
|
118
|
-
this.ref2Resolver
|
119
|
-
.getComponentsFromPath(path.resolve(c.content))
|
120
|
-
.filter((input) => input instanceof SourceComponent)
|
121
|
-
.map((nonDeletedComponent) => {
|
122
|
-
results.add(nonDeletedComponent);
|
123
|
-
});
|
124
|
-
}
|
125
|
-
catch (e) {
|
126
|
-
logger.debug(`unable to find component at ${c.content}. That's ok if it was supposed to be deleted`);
|
127
|
-
}
|
128
|
-
}
|
129
|
-
else {
|
130
|
-
results.add(c, DestructiveChangesType.POST);
|
131
|
-
}
|
132
|
-
}
|
133
|
-
}
|
134
|
-
else if (status === 'A') {
|
135
|
-
for (const c of this.ref2Resolver.getComponentsFromPath(fpath)) {
|
136
|
-
results.add(c);
|
137
|
-
}
|
138
|
-
}
|
139
|
-
else {
|
140
|
-
childComponentPromises.push(this.getChildComponentStatus(fpath));
|
141
|
-
}
|
142
|
-
}
|
143
|
-
for await (const check of childComponentPromises) {
|
144
|
-
if (check.status === 0) {
|
145
|
-
for (const c of this.ref2Resolver.getComponentsFromPath(check.path)) {
|
146
|
-
results.add(c);
|
147
|
-
}
|
148
|
-
}
|
149
|
-
else if (check.status === -1) {
|
150
|
-
// unchanged file
|
151
|
-
}
|
152
|
-
else if (check.status === -2) {
|
153
|
-
// forceignored file
|
154
|
-
}
|
155
|
-
else {
|
156
|
-
if (check.toDestructiveChanges) {
|
157
|
-
for (const c of check.toDestructiveChanges) {
|
158
|
-
results.add(c, DestructiveChangesType.POST);
|
159
|
-
}
|
160
|
-
}
|
161
|
-
if (check.toManifest) {
|
162
|
-
for (const c of check.toManifest) {
|
163
|
-
results.add(c);
|
164
|
-
}
|
165
|
-
}
|
73
|
+
const cs = (await this.gitChangesAsComponentSet(false))?.[0] ?? new ComponentSet();
|
74
|
+
if (cs.forceIgnoredPaths?.size) {
|
75
|
+
const lifecycle = Lifecycle.getInstance();
|
76
|
+
for await (const file of cs.forceIgnoredPaths) {
|
77
|
+
await lifecycle.emitWarning(`The forceignored file ${file} was ignored.`);
|
166
78
|
}
|
167
79
|
}
|
168
|
-
|
169
|
-
const lifecycle = Lifecycle.getInstance();
|
170
|
-
for await (const file of forceIgnored) {
|
171
|
-
await lifecycle.emitWarning(`The forceignored file "${file}" was ignored.`);
|
172
|
-
}
|
173
|
-
return results;
|
80
|
+
return cs;
|
174
81
|
}
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
const
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
}
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
.
|
194
|
-
|
195
|
-
.
|
196
|
-
.
|
197
|
-
|
198
|
-
.getChildren()
|
199
|
-
.filter((childComponent) => !ref2ChildUniqueIdArray.includes(getUniqueIdentifier(childComponent))); // deleted
|
200
|
-
const childComponentsNotInRef1 = ref2Component
|
201
|
-
.getChildren()
|
202
|
-
.filter((childComponent) => !ref1ChildUniqueIdArray.includes(getUniqueIdentifier(childComponent))); // added
|
203
|
-
const childComponentsInRef1AndRef2 = ref1Component
|
204
|
-
.getChildren()
|
205
|
-
.filter((childComponent) => ref2ChildUniqueIdArray.includes(getUniqueIdentifier(childComponent))); // modified?
|
206
|
-
for await (const childComponentRef1 of childComponentsInRef1AndRef2) {
|
207
|
-
const [childComponentRef2] = ref2Component
|
208
|
-
.getChildren()
|
209
|
-
.filter((childComponent) => getUniqueIdentifier(childComponentRef1) === getUniqueIdentifier(childComponent));
|
210
|
-
if (!equal(await childComponentRef1.parseXml(), await childComponentRef2.parseXml())) {
|
211
|
-
childComponentsNotInRef1.push(childComponentRef2); // modified! -> add to added
|
212
|
-
}
|
213
|
-
}
|
214
|
-
return {
|
215
|
-
path: fpath,
|
216
|
-
status: 1 + childComponentsNotInRef2.length + childComponentsNotInRef1.length,
|
217
|
-
toManifest: childComponentsNotInRef1,
|
218
|
-
toDestructiveChanges: childComponentsNotInRef2,
|
219
|
-
};
|
82
|
+
// eslint-disable-next-line complexity
|
83
|
+
async gitChangesAsComponentSet(byPackageDir) {
|
84
|
+
const [projectConfig] = await Promise.all([
|
85
|
+
this.project.resolveProjectConfig(),
|
86
|
+
]);
|
87
|
+
const sourceApiVersion = projectConfig.sourceApiVersion;
|
88
|
+
const adds = this.localRepo.getAddFilenames();
|
89
|
+
const modifies = this.localRepo.getModifyFilenames();
|
90
|
+
const deletes = this.localRepo.getDeleteFilenames();
|
91
|
+
const groupings = getGroupedFiles({
|
92
|
+
packageDirs: this.packagesDirs,
|
93
|
+
adds,
|
94
|
+
modifies,
|
95
|
+
deletes,
|
96
|
+
}, byPackageDir ?? Boolean(projectConfig.pushPackageDirectoriesSequentially));
|
97
|
+
return getComponentSets({
|
98
|
+
groupings,
|
99
|
+
sourceApiVersion,
|
100
|
+
registry: this.registry,
|
101
|
+
resolverForDeletes: this.ref1Resolver,
|
102
|
+
resolverForNonDeletes: this.ref2Resolver,
|
103
|
+
virtualTreeContainer: this.ref2VirtualTreeContainer,
|
104
|
+
});
|
220
105
|
}
|
221
106
|
}
|
222
107
|
//# sourceMappingURL=gitDiffResolver.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"gitDiffResolver.js","sourceRoot":"","sources":["../../../src/SDR-extra/resolve/gitDiffResolver.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,
|
1
|
+
{"version":3,"file":"gitDiffResolver.js","sourceRoot":"","sources":["../../../src/SDR-extra/resolve/gitDiffResolver.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AACpG,OAAO,EAAa,OAAO,EAAE,SAAS,EAAE,MAAM,EAAmB,MAAM,kBAAkB,CAAC;AAC1F,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AACrF,OAAO,EAAE,yBAAyB,EAAE,MAAM,mCAAmC,CAAC;AAE9E,MAAM,MAAM,GAAG,MAAM,CAAC,aAAa,CAAC,kBAAkB,CAAC,CAAC;AAExD;;;;GAIG;AACH,MAAM,OAAO,eAAe;IAClB,wBAAwB,CAA6B;IACrD,YAAY,CAAoB;IAChC,YAAY,CAAoB;IAChC,GAAG,CAAS;IACZ,YAAY,CAAoB;IAChC,SAAS,CAAU;IACnB,QAAQ,CAAiB;IACzB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-1,5 +1,4 @@
|
|
1
1
|
import { VirtualTreeContainer } from '@salesforce/source-deploy-retrieve';
|
2
|
-
export { parseMetadataXml } from '@salesforce/source-deploy-retrieve/lib/src/utils/index.js';
|
3
2
|
export declare class VirtualTreeContainerExtra extends VirtualTreeContainer {
|
4
3
|
/**
|
5
4
|
* Designed for recreating virtual files from a git ref
|
@@ -10,5 +9,5 @@ export declare class VirtualTreeContainerExtra extends VirtualTreeContainer {
|
|
10
9
|
* @param includeBufferForFiles full paths to modified files
|
11
10
|
* @returns VirtualTreeContainer
|
12
11
|
*/
|
13
|
-
static fromGitRef(ref: string,
|
12
|
+
static fromGitRef(ref: string, dir: string, includeBufferForFiles: string[]): Promise<VirtualTreeContainer>;
|
14
13
|
}
|
@@ -4,12 +4,13 @@
|
|
4
4
|
* Licensed under the BSD 3-Clause license.
|
5
5
|
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
6
6
|
*/
|
7
|
+
// https://github.com/forcedotcom/source-deploy-retrieve/blob/main/src/resolve/treeContainers.ts
|
7
8
|
import path from 'node:path';
|
8
9
|
import fs from 'node:fs/promises';
|
9
10
|
import { VirtualTreeContainer } from '@salesforce/source-deploy-retrieve';
|
10
11
|
import { parseMetadataXml } from '@salesforce/source-deploy-retrieve/lib/src/utils/index.js';
|
11
|
-
import {
|
12
|
-
|
12
|
+
import { readBlob as _readBlob, listFiles as _listFiles, resolveRef } from 'isomorphic-git';
|
13
|
+
import { ensurePosix, ensureWindows, IS_WINDOWS } from '@salesforce/source-tracking/lib/shared/local/functions.js';
|
13
14
|
export class VirtualTreeContainerExtra extends VirtualTreeContainer {
|
14
15
|
/**
|
15
16
|
* Designed for recreating virtual files from a git ref
|
@@ -20,26 +21,23 @@ export class VirtualTreeContainerExtra extends VirtualTreeContainer {
|
|
20
21
|
* @param includeBufferForFiles full paths to modified files
|
21
22
|
* @returns VirtualTreeContainer
|
22
23
|
*/
|
23
|
-
static async fromGitRef(ref,
|
24
|
-
const
|
25
|
-
const
|
26
|
-
const oid = await localRepo.getOid(ref);
|
24
|
+
static async fromGitRef(ref, dir, includeBufferForFiles) {
|
25
|
+
const paths = await listFiles(dir, ref);
|
26
|
+
const oid = ref ? await resolveRef({ fs, dir, ref }) : '';
|
27
27
|
const virtualDirectoryByFullPath = new Map();
|
28
|
-
for await (const
|
29
|
-
let dirPath = path.dirname(
|
28
|
+
for await (const filepath of paths) {
|
29
|
+
let dirPath = path.dirname(filepath);
|
30
30
|
virtualDirectoryByFullPath.set(dirPath, {
|
31
31
|
dirPath,
|
32
32
|
children: Array.from(new Set(virtualDirectoryByFullPath.get(dirPath)?.children ?? []).add({
|
33
|
-
name: path.basename(
|
34
|
-
data: parseMetadataXml(
|
35
|
-
? oid
|
36
|
-
? await localRepo.readBlobAsBuffer({ oid, filename })
|
37
|
-
: await fs.readFile(filename)
|
33
|
+
name: path.basename(filepath),
|
34
|
+
data: parseMetadataXml(filepath) && includeBufferForFiles.includes(filepath)
|
35
|
+
? await readBlob(dir, filepath, oid)
|
38
36
|
: Buffer.from(''),
|
39
37
|
})),
|
40
38
|
});
|
41
|
-
const splits =
|
42
|
-
for (let i =
|
39
|
+
const splits = filepath.split(path.sep);
|
40
|
+
for (let i = 0; i < splits.length - 1; i++) {
|
43
41
|
dirPath = splits.slice(0, i + 1).join(path.sep);
|
44
42
|
virtualDirectoryByFullPath.set(dirPath, {
|
45
43
|
dirPath,
|
@@ -50,4 +48,19 @@ export class VirtualTreeContainerExtra extends VirtualTreeContainer {
|
|
50
48
|
return new VirtualTreeContainer(Array.from(virtualDirectoryByFullPath.values()));
|
51
49
|
}
|
52
50
|
}
|
51
|
+
async function listFiles(dir, ref) {
|
52
|
+
return ref
|
53
|
+
? (await _listFiles({ fs, dir, ref })).map((p) => path.join(IS_WINDOWS ? ensureWindows(p) : p))
|
54
|
+
: (await fs.readdir(dir, { recursive: true })).map((p) => path.join(IS_WINDOWS ? ensureWindows(p) : p));
|
55
|
+
}
|
56
|
+
async function readBlob(dir, filepath, oid) {
|
57
|
+
return oid
|
58
|
+
? Buffer.from((await _readBlob({
|
59
|
+
fs,
|
60
|
+
dir,
|
61
|
+
oid,
|
62
|
+
filepath: IS_WINDOWS ? ensurePosix(filepath) : filepath,
|
63
|
+
})).blob)
|
64
|
+
: fs.readFile(path.resolve(filepath));
|
65
|
+
}
|
53
66
|
//# sourceMappingURL=treeContainersExtra.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"treeContainersExtra.js","sourceRoot":"","sources":["../../../src/SDR-extra/resolve/treeContainersExtra.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAClC,OAAO,EAAE,oBAAoB,EAAoB,MAAM,oCAAoC,CAAC;AAC5F,OAAO,EAAE,gBAAgB,EAAE,MAAM,2DAA2D,CAAC;AAC7F,OAAO,EAAE,
|
1
|
+
{"version":3,"file":"treeContainersExtra.js","sourceRoot":"","sources":["../../../src/SDR-extra/resolve/treeContainersExtra.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,gGAAgG;AAChG,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAClC,OAAO,EAAE,oBAAoB,EAAoB,MAAM,oCAAoC,CAAC;AAC5F,OAAO,EAAE,gBAAgB,EAAE,MAAM,2DAA2D,CAAC;AAC7F,OAAO,EAAE,QAAQ,IAAI,SAAS,EAAE,SAAS,IAAI,UAAU,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5F,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,2DAA2D,CAAC;AAEnH,MAAM,OAAO,yBAA0B,SAAQ,oBAAoB;IACjE;;;;;;;;OAQG;IACI,MAAM,CAAC,KAAK,CAAC,UAAU,CAC5B,GAAW,EACX,GAAW,EACX,qBAA+B;QAE/B,MAAM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AC,WAAW,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ;SACxD,CAAC,CACH,CAAC,IAAI,CACP;QACH,CAAC,CAAC,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC;AAC1C,CAAC"}
|
@@ -0,0 +1,25 @@
|
|
1
|
+
import { ComponentSet, RegistryAccess, MetadataResolver } from '@salesforce/source-deploy-retrieve';
|
2
|
+
import { NamedPackageDir } from '@salesforce/core';
|
3
|
+
import { VirtualTreeContainerExtra } from '../resolve/treeContainersExtra.js';
|
4
|
+
type GroupedFileInput = {
|
5
|
+
packageDirs: NamedPackageDir[];
|
6
|
+
adds: string[];
|
7
|
+
modifies: string[];
|
8
|
+
deletes: string[];
|
9
|
+
};
|
10
|
+
type GroupedFile = {
|
11
|
+
path: string;
|
12
|
+
adds: string[];
|
13
|
+
modifies: string[];
|
14
|
+
deletes: string[];
|
15
|
+
};
|
16
|
+
export declare const getGroupedFiles: (input: GroupedFileInput, byPackageDir?: boolean) => GroupedFile[];
|
17
|
+
export declare const getComponentSets: ({ groupings, sourceApiVersion, registry, resolverForNonDeletes, resolverForDeletes, virtualTreeContainer, }: {
|
18
|
+
groupings: GroupedFile[];
|
19
|
+
sourceApiVersion?: string;
|
20
|
+
registry: RegistryAccess;
|
21
|
+
resolverForNonDeletes: MetadataResolver;
|
22
|
+
resolverForDeletes: MetadataResolver;
|
23
|
+
virtualTreeContainer: VirtualTreeContainerExtra;
|
24
|
+
}) => ComponentSet[];
|
25
|
+
export {};
|