@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.
Files changed (35) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/README.md +3 -3
  3. package/lib/SDR-extra/collections/componentSetExtra.js +1 -1
  4. package/lib/SDR-extra/collections/componentSetExtra.js.map +1 -1
  5. package/lib/SDR-extra/resolve/gitDiffResolver.d.ts +4 -5
  6. package/lib/SDR-extra/resolve/gitDiffResolver.js +45 -160
  7. package/lib/SDR-extra/resolve/gitDiffResolver.js.map +1 -1
  8. package/lib/SDR-extra/resolve/treeContainersExtra.d.ts +1 -2
  9. package/lib/SDR-extra/resolve/treeContainersExtra.js +28 -15
  10. package/lib/SDR-extra/resolve/treeContainersExtra.js.map +1 -1
  11. package/lib/SDR-extra/utils/gitComponentSetArray.d.ts +25 -0
  12. package/lib/SDR-extra/utils/gitComponentSetArray.js +142 -0
  13. package/lib/SDR-extra/utils/gitComponentSetArray.js.map +1 -0
  14. package/lib/SDR-extra/utils/index.d.ts +1 -0
  15. package/lib/SDR-extra/utils/index.js +1 -0
  16. package/lib/SDR-extra/utils/index.js.map +1 -1
  17. package/lib/SDR-extra/utils/localGitRepo.d.ts +19 -23
  18. package/lib/SDR-extra/utils/localGitRepo.js +129 -129
  19. package/lib/SDR-extra/utils/localGitRepo.js.map +1 -1
  20. package/lib/SDR-extra/utils/moveDetection.d.ts +16 -0
  21. package/lib/SDR-extra/utils/moveDetection.js +137 -0
  22. package/lib/SDR-extra/utils/moveDetection.js.map +1 -0
  23. package/lib/SDR-extra/utils/statusMatrix.d.ts +10 -0
  24. package/lib/SDR-extra/utils/statusMatrix.js +78 -0
  25. package/lib/SDR-extra/utils/statusMatrix.js.map +1 -0
  26. package/lib/SDR-extra/utils/worthWalking.d.ts +1 -0
  27. package/lib/SDR-extra/utils/worthWalking.js +19 -0
  28. package/lib/SDR-extra/utils/worthWalking.js.map +1 -0
  29. package/lib/commands/jayree/manifest/git/diff.js +4 -1
  30. package/lib/commands/jayree/manifest/git/diff.js.map +1 -1
  31. package/lib/tsconfig.tsbuildinfo +1 -1
  32. package/npm-shrinkwrap.json +867 -416
  33. package/oclif.lock +362 -251
  34. package/oclif.manifest.json +1 -1
  35. 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.3.28/src/commands/jayree/manifest/cleanup.ts)_
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.3.28/src/commands/jayree/manifest/generate.ts)_
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.3.28/src/commands/jayree/manifest/git/diff.ts)_
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/index.js';
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;AAChE,OAAO,EAAE,MAAM,aAAa,CAAC;AAC7B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AC;YAC9D,UAAU,CAAC,GAAG,CAAC,SAAS,EAAE,SAAS,CAAC,yBAAyB,EAAE,CAAC,CAAC;QACnE,CAAC;QAED,IAAI,qBAAqB,GAAsB,EAAE,CAAC;QAElD,KAAK,MAAM,cAAc,IAAI,UAAU,CAAC,mBAAmB,EAAE,EAAE,CAAC;YAC9D,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 gitDir;
13
- private uniquePackageDirectories;
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 getFileStatus;
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, SourceComponent, DestructiveChangesType, } from '@salesforce/source-deploy-retrieve';
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 { VirtualTreeContainerExtra, parseMetadataXml } from './index.js';
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
- gitDir;
25
- uniquePackageDirectories;
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.gitDir = project.getPath();
32
+ this.project = project;
33
+ this.dir = project.getPath();
33
34
  this.registry = registry ?? new RegistryAccess();
34
- this.uniquePackageDirectories = project.getUniquePackageDirectories().map((pDir) => pDir.fullPath);
35
+ this.packagesDirs = project.getUniquePackageDirectories();
35
36
  this.localRepo = GitRepo.getInstance({
36
- gitDir: this.gitDir,
37
- packageDirs: this.uniquePackageDirectories,
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
- const fileStatus = await this.getFileStatus(ref1, ref2);
56
- logger.debug({ fileStatus });
57
+ await this.localRepo.getStatus(ref1, ref2);
57
58
  const [ref1VirtualTreeContainer, ref2VirtualTreeContainer] = await Promise.all([
58
- VirtualTreeContainerExtra.fromGitRef(ref1, this.gitDir, fileStatus.filter((l) => l.status === 'M').map((l) => l.path)),
59
- VirtualTreeContainerExtra.fromGitRef(ref2, this.gitDir, fileStatus.filter((l) => l.status === 'M').map((l) => l.path)),
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.resolve(filepath);
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
- return this.getComponentSet(fileStatus);
73
- }
74
- async getFileStatus(ref1, ref2) {
75
- let files;
76
- if (ref2) {
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
- const forceIgnored = Array.from(new Set([...this.ref1Resolver.forceIgnoredPaths, ...this.ref2Resolver.forceIgnoredPaths]));
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
- async getChildComponentStatus(fpath) {
176
- if (!parseMetadataXml(fpath)) {
177
- return { path: fpath, status: 0 };
178
- }
179
- const [ref2Component] = this.ref2Resolver.getComponentsFromPath(fpath); // git path only conaints files
180
- const [ref1Component] = this.ref1Resolver.getComponentsFromPath(fpath); // git path only conaints files
181
- if (this.ref1Resolver.forceIgnoredPaths.has(fpath) || this.ref2Resolver.forceIgnoredPaths.has(fpath)) {
182
- return { path: fpath, status: -2 };
183
- }
184
- if (equal(await ref1Component.parseXml(fpath), await ref2Component.parseXml(fpath))) {
185
- return { path: fpath, status: -1 };
186
- }
187
- if (ref1Component.type.strictDirectoryName === true || !ref1Component.type.children) {
188
- return { path: fpath, status: 0 };
189
- }
190
- const getUniqueIdentifier = (component) => `${component.type.name}#${getString(component, component.type.uniqueIdElement)}`;
191
- const ref2ChildUniqueIdArray = ref2Component
192
- .getChildren()
193
- .map((childComponent) => getUniqueIdentifier(childComponent));
194
- const ref1ChildUniqueIdArray = ref1Component
195
- .getChildren()
196
- .map((childComponent) => getUniqueIdentifier(childComponent));
197
- const childComponentsNotInRef2 = ref1Component
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,EACL,YAAY,EACZ,cAAc,EACd,gBAAgB,EAChB,eAAe,EACf,sBAAsB,GACvB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAa,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AACzE,OAAO,KAAK,MAAM,iBAAiB,CAAC;AACpC,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AACnD,OAAO,EAAE,yBAAyB,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAEzE,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,MAAM,CAAS;IACf,wBAAwB,CAAW;IACnC,SAAS,CAAU;IACnB,QAAQ,CAAiB;IAEjC;;OAEG;IACH,YAAmB,OAAkB,EAAE,QAAyB;QAC9D,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;QAChC,IAAI,CAAC,QAAQ,GAAG,QAAQ,IAAI,IAAI,cAAc,EAAE,CAAC;QACjD,IAAI,CAAC,wBAAwB,GAAG,OAAO,CAAC,2BAA2B,EAAE,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,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AG,IAAI,CAAC,SAAS,CAAC,eAAe,EAAE,CAAC;QAC9C,MAAM,QAAQ,GAAG,IAAI,CAAC,SAAS,CAAC,kBAAkB,EAAE,CAAC;QACrD,MAAM,OAAO,GAAG,IAAI,CAAC,SAAS,CAAC,kBAAkB,EAAE,CAAC;QAEpD,MAAM,SAAS,GAAG,eAAe,CAC/B;YACE,WAAW,EAAE,IAAI,CAAC,YAAY;YAC9B,IAAI;YACJ,QAAQ;YACR,OAAO;SACR,EACD,YAAY,IAAI,OAAO,CAAC,aAAa,CAAC,kCAAkC,CAAC,CAC1E,CAAC;QAEF,OAAO,gBAAgB,CAAC;YACtB,SAAS;YACT,gBAAgB;YAChB,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,kBAAkB,EAAE,IAAI,CAAC,YAAY;YACrC,qBAAqB,EAAE,IAAI,CAAC,YAAY;YACxC,oBAAoB,EAAE,IAAI,CAAC,wBAAwB;SACpD,CAAC,CAAC;IACL,CAAC;CACF"}
@@ -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, gitDir: string, includeBufferForFiles: string[]): Promise<VirtualTreeContainer>;
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 { GitRepo } from '../utils/index.js';
12
- export { parseMetadataXml } from '@salesforce/source-deploy-retrieve/lib/src/utils/index.js';
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, gitDir, includeBufferForFiles) {
24
- const localRepo = GitRepo.getInstance({ gitDir });
25
- const paths = await localRepo.listFullPathFiles(ref);
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 filename of paths) {
29
- let dirPath = path.dirname(filename);
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(filename),
34
- data: parseMetadataXml(filename) && includeBufferForFiles.includes(filename)
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 = filename.split(path.sep);
42
- for (let i = 1; i < splits.length - 1; 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,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAE5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,2DAA2D,CAAC;AAE7F,MAAM,OAAO,yBAA0B,SAAQ,oBAAoB;IACjE;;;;;;;;OAQG;IACI,MAAM,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CAAC,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 {};