@jayree/sfdx-plugin-manifest 3.2.20 → 3.2.22
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 +18 -0
- package/README.md +3 -3
- package/lib/SDR-extra/collections/componentSetExtra.js +19 -20
- package/lib/SDR-extra/collections/componentSetExtra.js.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/npm-shrinkwrap.json +1192 -314
- package/oclif.lock +415 -313
- package/oclif.manifest.json +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,21 @@
|
|
|
1
|
+
## [3.2.22](https://github.com/jayree/sfdx-plugin-manifest/compare/3.2.21...3.2.22) (2024-06-01)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **deps:** bump @salesforce/source-deploy-retrieve from 11.6.2 to 11.6.4 ([#1321](https://github.com/jayree/sfdx-plugin-manifest/issues/1321)) ([4ed4c18](https://github.com/jayree/sfdx-plugin-manifest/commit/4ed4c18205315137e1aa19f2feaa3ce81c1e13f0))
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
## [3.2.21](https://github.com/jayree/sfdx-plugin-manifest/compare/3.2.20...3.2.21) (2024-05-31)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Bug Fixes
|
|
14
|
+
|
|
15
|
+
* **gitdiff:** optimize componentset filter ([7990cb3](https://github.com/jayree/sfdx-plugin-manifest/commit/7990cb3b795a81187fd9c4649ab85349e4cb0a14))
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
1
19
|
## [3.2.20](https://github.com/jayree/sfdx-plugin-manifest/compare/3.2.19...3.2.20) (2024-05-25)
|
|
2
20
|
|
|
3
21
|
|
package/README.md
CHANGED
|
@@ -47,7 +47,7 @@ EXAMPLES
|
|
|
47
47
|
$ sf jayree manifest cleanup --manifest=package.xml --file=packageignore.xml
|
|
48
48
|
```
|
|
49
49
|
|
|
50
|
-
_See code: [src/commands/jayree/manifest/cleanup.ts](https://github.com/jayree/sfdx-plugin-manifest/blob/3.2.
|
|
50
|
+
_See code: [src/commands/jayree/manifest/cleanup.ts](https://github.com/jayree/sfdx-plugin-manifest/blob/3.2.22/src/commands/jayree/manifest/cleanup.ts)_
|
|
51
51
|
|
|
52
52
|
### `sf jayree manifest generate`
|
|
53
53
|
|
|
@@ -85,7 +85,7 @@ EXAMPLES
|
|
|
85
85
|
<Package xmlns='http://soap.sforce.com/2006/04/metadata'>...</Package>
|
|
86
86
|
```
|
|
87
87
|
|
|
88
|
-
_See code: [src/commands/jayree/manifest/generate.ts](https://github.com/jayree/sfdx-plugin-manifest/blob/3.2.
|
|
88
|
+
_See code: [src/commands/jayree/manifest/generate.ts](https://github.com/jayree/sfdx-plugin-manifest/blob/3.2.22/src/commands/jayree/manifest/generate.ts)_
|
|
89
89
|
|
|
90
90
|
### `sf jayree manifest git diff REF1 [REF2]`
|
|
91
91
|
|
|
@@ -168,5 +168,5 @@ FLAG DESCRIPTIONS
|
|
|
168
168
|
The location can be an absolute path or relative to the current working directory.
|
|
169
169
|
```
|
|
170
170
|
|
|
171
|
-
_See code: [src/commands/jayree/manifest/git/diff.ts](https://github.com/jayree/sfdx-plugin-manifest/blob/3.2.
|
|
171
|
+
_See code: [src/commands/jayree/manifest/git/diff.ts](https://github.com/jayree/sfdx-plugin-manifest/blob/3.2.22/src/commands/jayree/manifest/git/diff.ts)_
|
|
172
172
|
<!-- commandsstop -->
|
|
@@ -5,7 +5,7 @@
|
|
|
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,
|
|
8
|
+
import { ComponentSet, RegistryAccess, } from '@salesforce/source-deploy-retrieve';
|
|
9
9
|
import { SfProject, Lifecycle } from '@salesforce/core';
|
|
10
10
|
import Debug from 'debug';
|
|
11
11
|
import fs from 'graceful-fs';
|
|
@@ -39,46 +39,45 @@ export class ComponentSetExtra extends ComponentSet {
|
|
|
39
39
|
}
|
|
40
40
|
const project = await SfProject.resolve();
|
|
41
41
|
const gitDiffResolver = new GitDiffResolver(project, registry);
|
|
42
|
-
const
|
|
42
|
+
const gitDiffResult = await gitDiffResolver.resolve(ref1, ref2, fsPaths);
|
|
43
|
+
const include = new ComponentSet([], registry);
|
|
44
|
+
const markedForDelete = new ComponentSet([], registry);
|
|
43
45
|
const childsTobeReplacedByParent = [
|
|
44
46
|
...Object.keys(registry.getTypeByName('workflow').children?.types ?? {}),
|
|
45
47
|
...Object.keys(registry.getTypeByName('sharingrules').children?.types ?? {}),
|
|
46
48
|
...Object.keys(registry.getTypeByName('bot').children?.types ?? {}),
|
|
47
49
|
];
|
|
48
|
-
for (const component of
|
|
49
|
-
if (!component.isMarkedForDelete()
|
|
50
|
-
component.parent &&
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
50
|
+
for (const component of gitDiffResult.getSourceComponents()) {
|
|
51
|
+
if (!component.isMarkedForDelete()) {
|
|
52
|
+
if (component.parent && childsTobeReplacedByParent.includes(component.type.id)) {
|
|
53
|
+
debug(`add parent ${component.parent.type.name}:${component.parent.fullName} of ${component.type.name}:${component.fullName} to manifest`);
|
|
54
|
+
include.add(component.parent);
|
|
55
|
+
}
|
|
56
|
+
include.add(component);
|
|
57
|
+
}
|
|
58
|
+
else {
|
|
59
|
+
markedForDelete.add(component, component.getDestructiveChangesType());
|
|
54
60
|
}
|
|
55
61
|
}
|
|
56
62
|
fsPaths =
|
|
57
63
|
fsPaths?.map((filepath) => path.resolve(filepath)).filter((filepath) => fs.existsSync(filepath)) ??
|
|
58
64
|
project.getUniquePackageDirectories().map((pDir) => pDir.fullPath);
|
|
59
65
|
debug({ fsPaths });
|
|
60
|
-
|
|
66
|
+
const components = ComponentSet.fromSource({
|
|
61
67
|
fsPaths,
|
|
62
|
-
include
|
|
68
|
+
include,
|
|
63
69
|
tree,
|
|
64
70
|
registry,
|
|
65
71
|
});
|
|
66
|
-
const
|
|
67
|
-
.
|
|
68
|
-
.filter((c) => c.isMarkedForDelete())
|
|
69
|
-
.map((c) => `${c.fullName}:${c.type.name}`));
|
|
70
|
-
components = components.filter(({ fullName, type }) => !isMarkedForDelete.has(`${fullName}:${type.name}`));
|
|
71
|
-
for (const component of inclusiveFilter.getSourceComponents()) {
|
|
72
|
-
if (component.isMarkedForDelete()) {
|
|
73
|
-
components.add(component, DestructiveChangesType.POST);
|
|
74
|
-
}
|
|
72
|
+
for (const component of markedForDelete.getSourceComponents()) {
|
|
73
|
+
components.add(component, component.getDestructiveChangesType());
|
|
75
74
|
}
|
|
76
75
|
let localSourceComponents = [];
|
|
77
76
|
for (const localComponent of components.getSourceComponents()) {
|
|
78
77
|
localSourceComponents = localSourceComponents.concat(localComponent.getChildren());
|
|
79
78
|
localSourceComponents = localSourceComponents.concat(localComponent);
|
|
80
79
|
}
|
|
81
|
-
for await (const component of
|
|
80
|
+
for await (const component of include.getSourceComponents()) {
|
|
82
81
|
if (!localSourceComponents.find((localComponent) => component.type.name === localComponent.type.name && component.fullName === localComponent.fullName)) {
|
|
83
82
|
await Lifecycle.getInstance().emitWarning(`The component "${component.type.name}:${component.fullName}" was not found locally.`);
|
|
84
83
|
}
|
|
@@ -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,
|
|
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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