@jayree/sfdx-plugin-manifest 2.3.12 → 2.4.1
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +14 -0
- package/README.md +7 -5
- package/bin/is-sfdx.js +3 -0
- package/lib/commands/jayree/manifest/git/diff.d.ts +1 -0
- package/lib/commands/jayree/manifest/git/diff.js +23 -10
- package/lib/commands/jayree/manifest/git/diff.js.map +1 -1
- package/lib/utils/gitdiff.d.ts +1 -1
- package/lib/utils/gitdiff.js +35 -27
- package/lib/utils/gitdiff.js.map +1 -1
- package/messages/gitdiff.json +1 -0
- package/oclif.manifest.json +1 -1
- package/package.json +5 -4
package/CHANGELOG.md
CHANGED
@@ -1,3 +1,17 @@
|
|
1
|
+
## [2.4.1](https://github.com/jayree/sfdx-plugin-manifest/compare/v2.4.0...v2.4.1) (2022-11-24)
|
2
|
+
|
3
|
+
|
4
|
+
### Bug Fixes
|
5
|
+
|
6
|
+
* **manifest:git:diff:** run the command from anywhere in your sfdx project ([1835b4c](https://github.com/jayree/sfdx-plugin-manifest/commit/1835b4cba7bc062686eb5e67d0508be734179c36))
|
7
|
+
|
8
|
+
# [2.4.0](https://github.com/jayree/sfdx-plugin-manifest/compare/v2.3.12...v2.4.0) (2022-11-20)
|
9
|
+
|
10
|
+
|
11
|
+
### Features
|
12
|
+
|
13
|
+
* **manifest:git:diff:** add sourcepath to limit the diff ([f50feee](https://github.com/jayree/sfdx-plugin-manifest/commit/f50feee58df4842419a84bd810cca0b2c88e481c))
|
14
|
+
|
1
15
|
## [2.3.12](https://github.com/jayree/sfdx-plugin-manifest/compare/v2.3.11...v2.3.12) (2022-11-18)
|
2
16
|
|
3
17
|
|
package/README.md
CHANGED
@@ -22,7 +22,7 @@ $ sfdx plugins:install @jayree/sfdx-plugin-manifest
|
|
22
22
|
$ sfdx jayree:[COMMAND]
|
23
23
|
running command...
|
24
24
|
$ sfdx plugins
|
25
|
-
@jayree/sfdx-plugin-manifest 2.
|
25
|
+
@jayree/sfdx-plugin-manifest 2.4.1
|
26
26
|
$ sfdx help jayree:[COMMAND]
|
27
27
|
USAGE
|
28
28
|
$ sfdx jayree:COMMAND
|
@@ -63,7 +63,7 @@ EXAMPLES
|
|
63
63
|
$ sfdx jayree:manifest:cleanup --manifest=package.xml --file=packageignore.xml
|
64
64
|
```
|
65
65
|
|
66
|
-
_See code: [src/commands/jayree/manifest/cleanup.ts](https://github.com/jayree/sfdx-plugin-manifest/blob/v2.
|
66
|
+
_See code: [src/commands/jayree/manifest/cleanup.ts](https://github.com/jayree/sfdx-plugin-manifest/blob/v2.4.1/src/commands/jayree/manifest/cleanup.ts)_
|
67
67
|
|
68
68
|
### `sfdx jayree:manifest:generate`
|
69
69
|
|
@@ -106,7 +106,7 @@ EXAMPLES
|
|
106
106
|
<Package xmlns='http://soap.sforce.com/2006/04/metadata'>...</Package>
|
107
107
|
```
|
108
108
|
|
109
|
-
_See code: [src/commands/jayree/manifest/generate.ts](https://github.com/jayree/sfdx-plugin-manifest/blob/v2.
|
109
|
+
_See code: [src/commands/jayree/manifest/generate.ts](https://github.com/jayree/sfdx-plugin-manifest/blob/v2.4.1/src/commands/jayree/manifest/generate.ts)_
|
110
110
|
|
111
111
|
### `sfdx jayree:manifest:git:diff`
|
112
112
|
|
@@ -114,7 +114,7 @@ create a manifest and destructiveChanges manifest using 'git diff' data
|
|
114
114
|
|
115
115
|
```
|
116
116
|
USAGE
|
117
|
-
$ sfdx jayree:manifest:git:diff [-o <string>] [-d] [--json] [--loglevel
|
117
|
+
$ sfdx jayree:manifest:git:diff [-p <array>] [-o <string>] [-d] [--json] [--loglevel
|
118
118
|
trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
|
119
119
|
|
120
120
|
ARGUMENTS
|
@@ -126,6 +126,8 @@ FLAGS
|
|
126
126
|
only (package.xml will be empty)
|
127
127
|
-o, --outputdir=<value> directory to save the created
|
128
128
|
manifest files
|
129
|
+
-p, --sourcepath=<value> comma-separated list of source file
|
130
|
+
paths to limit the diff
|
129
131
|
--json format output as json
|
130
132
|
--loglevel=(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL) [default: warn] logging level for
|
131
133
|
this command invocation
|
@@ -158,5 +160,5 @@ EXAMPLES
|
|
158
160
|
uses the diff of what is unique in branchB (REF2)
|
159
161
|
```
|
160
162
|
|
161
|
-
_See code: [src/commands/jayree/manifest/git/diff.ts](https://github.com/jayree/sfdx-plugin-manifest/blob/v2.
|
163
|
+
_See code: [src/commands/jayree/manifest/git/diff.ts](https://github.com/jayree/sfdx-plugin-manifest/blob/v2.4.1/src/commands/jayree/manifest/git/diff.ts)_
|
162
164
|
<!-- commandsstop -->
|
package/bin/is-sfdx.js
ADDED
@@ -6,12 +6,13 @@
|
|
6
6
|
*/
|
7
7
|
import os from 'os';
|
8
8
|
import { join, dirname, relative } from 'path';
|
9
|
+
import path from 'path';
|
9
10
|
import { flags } from '@salesforce/command';
|
10
|
-
import { Messages } from '@salesforce/core';
|
11
|
+
import { Messages, SfError } from '@salesforce/core';
|
11
12
|
import fs from 'fs-extra';
|
12
13
|
import { Logger, Listr } from 'listr2';
|
13
14
|
import kit from '@salesforce/kit';
|
14
|
-
import {
|
15
|
+
import { DestructiveChangesType } from '@salesforce/source-deploy-retrieve';
|
15
16
|
import { JayreeSfdxCommand } from '../../../../jayreeSfdxCommand.js';
|
16
17
|
import { getGitResults, createVirtualTreeContainer, fixComponentSetChilds, getGitDiff, debug, ensureOSPath, getGitArgsFromArgv, } from '../../../../utils/gitdiff.js';
|
17
18
|
Messages.importMessagesDirectory(new URL('./', import.meta.url).pathname);
|
@@ -27,13 +28,14 @@ const unexpectedArgument = async (input) => {
|
|
27
28
|
};
|
28
29
|
export default class GitDiff extends JayreeSfdxCommand {
|
29
30
|
async run() {
|
31
|
+
const sourcepath = this.getFlag('sourcepath');
|
30
32
|
this.destructiveChangesOnly = this.getFlag('destructivechangesonly');
|
31
33
|
this.outputDir = this.getFlag('outputdir');
|
32
34
|
this.projectRoot = this.project.getPath();
|
33
35
|
this.sfdxProjectFolders = this.project.getPackageDirectories().map((p) => ensureOSPath(p.path));
|
34
36
|
this.sourceApiVersion = (await this.project.retrieveSfProjectJson()).getContents().sourceApiVersion;
|
35
|
-
this.destructiveChanges = join(this.
|
36
|
-
this.manifest = join(this.
|
37
|
+
this.destructiveChanges = join(this.outputDir, 'destructiveChanges.xml');
|
38
|
+
this.manifest = join(this.outputDir, 'package.xml');
|
37
39
|
debug({
|
38
40
|
outputDir: this.outputDir,
|
39
41
|
projectRoot: this.projectRoot,
|
@@ -70,12 +72,9 @@ export default class GitDiff extends JayreeSfdxCommand {
|
|
70
72
|
},
|
71
73
|
},
|
72
74
|
{
|
73
|
-
title: gitArgs.ref2 !== '' ? `ref2: ${gitArgs.ref2}` :
|
75
|
+
title: gitArgs.ref2 !== '' ? `ref2: ${gitArgs.ref2}` : `ref2: (staging area)`,
|
74
76
|
task: async () => {
|
75
|
-
this.ref2VirtualTreeContainer =
|
76
|
-
gitArgs.ref2 !== ''
|
77
|
-
? await createVirtualTreeContainer(gitArgs.ref2, this.projectRoot, this.gitLines.filter((l) => l.status === 'M').map((l) => l.path))
|
78
|
-
: new NodeFSTreeContainer();
|
77
|
+
this.ref2VirtualTreeContainer = await createVirtualTreeContainer(gitArgs.ref2, this.projectRoot, this.gitLines.filter((l) => l.status === 'M').map((l) => l.path));
|
79
78
|
},
|
80
79
|
},
|
81
80
|
], { concurrent: true }),
|
@@ -84,7 +83,17 @@ export default class GitDiff extends JayreeSfdxCommand {
|
|
84
83
|
title: 'Analyze git diff results',
|
85
84
|
skip: () => !this.gitLines.length,
|
86
85
|
task: async (ctx, task) => {
|
87
|
-
|
86
|
+
if (sourcepath) {
|
87
|
+
this.fsPaths = sourcepath.map((filepath) => {
|
88
|
+
if (!this.ref1VirtualTreeContainer.exists(filepath) &&
|
89
|
+
!this.ref2VirtualTreeContainer.exists(filepath)) {
|
90
|
+
throw new SfError(`The sourcepath "${filepath}" is not a valid source file path.`);
|
91
|
+
}
|
92
|
+
return path.resolve(filepath);
|
93
|
+
});
|
94
|
+
debug(`fsPaths: ${this.fsPaths.join(', ')}`);
|
95
|
+
}
|
96
|
+
const { manifest, output } = await getGitResults(this.gitLines, this.ref1VirtualTreeContainer, this.ref2VirtualTreeContainer, this.destructiveChangesOnly, this.fsPaths);
|
88
97
|
task.output = `Added: ${output.counts.added}, Deleted: ${output.counts.deleted}, Modified: ${output.counts.modified}, Unchanged: ${output.counts.unchanged}, Ignored: ${output.counts.ignored}${output.counts.error ? `, Errors: ${output.counts.error}` : ''}`;
|
89
98
|
this.outputErrors = output.errors;
|
90
99
|
debug({ manifest });
|
@@ -168,6 +177,10 @@ GitDiff.args = [
|
|
168
177
|
},
|
169
178
|
];
|
170
179
|
GitDiff.flagsConfig = {
|
180
|
+
sourcepath: flags.array({
|
181
|
+
char: 'p',
|
182
|
+
description: messages.getMessage('sourcepath'),
|
183
|
+
}),
|
171
184
|
outputdir: flags.string({
|
172
185
|
char: 'o',
|
173
186
|
description: messages.getMessage('outputdir'),
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"diff.js","sourceRoot":"","sources":["../../../../../src/commands/jayree/manifest/git/diff.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAC;
|
1
|
+
{"version":3,"file":"diff.js","sourceRoot":"","sources":["../../../../../src/commands/jayree/manifest/git/diff.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAC;AAC/C,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAe,KAAK,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,M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;IACD;QACE,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,KAAK;QACf,WAAW,EAAE,gDAAgD;QAC7D,KAAK,EAAE,kBAAkB;QACzB,MAAM,EAAE,KAAK;KACd;CACF,CAAC;AAEe,mBAAW,GAAgB;IAC1C,UAAU,EAAE,KAAK,CAAC,KAAK,CAAC;QACtB,IAAI,EAAE,GAAG;QACT,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,YAAY,CAAC;KAC/C,CAAC;IACF,SAAS,EAAE,KAAK,CAAC,MAAM,CAAC;QACtB,IAAI,EAAE,GAAG;QACT,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,WAAW,CAAC;QAC7C,OAAO,EAAE,EAAE;KACZ,CAAC;IACF,sBAAsB,EAAE,KAAK,CAAC,OAAO,CAAC;QACpC,IAAI,EAAE,GAAG;QACT,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,wBAAwB,CAAC;QAC1D,OAAO,EAAE,KAAK;KACf,CAAC;CACH,CAAC;AAEe,wBAAgB,GAAG,KAAK,CAAC;AACzB,8BAAsB,GAAG,KAAK,CAAC;AAC/B,uBAAe,GAAG,IAAI,CAAC"}
|
package/lib/utils/gitdiff.d.ts
CHANGED
@@ -41,6 +41,6 @@ export declare function analyzeFile(path: string, ref1VirtualTreeContainer: Virt
|
|
41
41
|
toDestructiveChanges?: SourceComponent[];
|
42
42
|
}>;
|
43
43
|
export declare function getGitDiff(sfdxProjectFolders: string[], ref1: string, ref2: string, dir: string): Promise<gitLines>;
|
44
|
-
export declare function getGitResults(gitLines: gitLines, ref1VirtualTreeContainer: VirtualTreeContainer, ref2VirtualTreeContainer: VirtualTreeContainer | FSTreeContainer, destructiveChangesOnly: boolean): Promise<gitResults>;
|
44
|
+
export declare function getGitResults(gitLines: gitLines, ref1VirtualTreeContainer: VirtualTreeContainer, ref2VirtualTreeContainer: VirtualTreeContainer | FSTreeContainer, destructiveChangesOnly: boolean, fsPaths: string[]): Promise<gitResults>;
|
45
45
|
export declare function fixComponentSetChilds(cs: ComponentSet): ComponentSet;
|
46
46
|
export {};
|
package/lib/utils/gitdiff.js
CHANGED
@@ -6,6 +6,7 @@
|
|
6
6
|
*/
|
7
7
|
import { join, basename, sep, posix, dirname } from 'path';
|
8
8
|
import util from 'util';
|
9
|
+
import { resolve } from 'path';
|
9
10
|
import fs from 'fs-extra';
|
10
11
|
import equal from 'fast-deep-equal';
|
11
12
|
import { ComponentSet, RegistryAccess, registry, VirtualTreeContainer, MetadataResolver, DestructiveChangesType, } from '@salesforce/source-deploy-retrieve';
|
@@ -120,7 +121,7 @@ export function ensureGitPath(path) {
|
|
120
121
|
}
|
121
122
|
export async function createVirtualTreeContainer(ref, dir, modifiedFiles) {
|
122
123
|
const paths = (await git.listFiles({ fs, dir, ref })).map((p) => ensureOSPath(p));
|
123
|
-
const oid = await git.resolveRef({ fs, dir, ref });
|
124
|
+
const oid = ref ? await git.resolveRef({ fs, dir, ref }) : '';
|
124
125
|
const virtualDirectoryByFullPath = new Map();
|
125
126
|
for await (const filename of paths) {
|
126
127
|
let dirPath = dirname(filename);
|
@@ -129,7 +130,9 @@ export async function createVirtualTreeContainer(ref, dir, modifiedFiles) {
|
|
129
130
|
children: Array.from(new Set(virtualDirectoryByFullPath.get(dirPath)?.children ?? []).add({
|
130
131
|
name: basename(filename),
|
131
132
|
data: parseMetadataXml(filename) && modifiedFiles.includes(filename)
|
132
|
-
?
|
133
|
+
? oid
|
134
|
+
? Buffer.from((await git.readBlob({ fs, dir, oid, filepath: ensureGitPath(filename) })).blob)
|
135
|
+
: await fs.readFile(join(dir, ensureOSPath(filename)))
|
133
136
|
: Buffer.from(''),
|
134
137
|
})),
|
135
138
|
});
|
@@ -246,7 +249,7 @@ export async function getGitDiff(sfdxProjectFolders, ref1, ref2, dir) {
|
|
246
249
|
return gitLines;
|
247
250
|
}
|
248
251
|
// eslint-disable-next-line complexity
|
249
|
-
export async function getGitResults(gitLines, ref1VirtualTreeContainer, ref2VirtualTreeContainer, destructiveChangesOnly) {
|
252
|
+
export async function getGitResults(gitLines, ref1VirtualTreeContainer, ref2VirtualTreeContainer, destructiveChangesOnly, fsPaths) {
|
250
253
|
const results = {
|
251
254
|
manifest: new ComponentSet(undefined, registryAccess),
|
252
255
|
output: {
|
@@ -271,38 +274,43 @@ export async function getGitResults(gitLines, ref1VirtualTreeContainer, ref2Virt
|
|
271
274
|
};
|
272
275
|
const analyzedFilesPromises = [];
|
273
276
|
for (const [, { status, path }] of gitLines.entries()) {
|
274
|
-
if (
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
else {
|
281
|
-
try {
|
282
|
-
// in case a binary source file of a bundle was deleted, check if the bundle ist still valid and update instead of delete
|
283
|
-
ref2Resolver.getComponentsFromPath(c.xml);
|
284
|
-
if (!destructiveChangesOnly) {
|
285
|
-
results.manifest.add(c);
|
286
|
-
results.output.counts.added++;
|
287
|
-
}
|
277
|
+
if (!fsPaths || fsPaths.some((fsPath) => resolve(path).startsWith(fsPath))) {
|
278
|
+
if (status === 'D') {
|
279
|
+
for (const c of getComponentsFromPath(ref1Resolver, path)) {
|
280
|
+
if (c.xml === path || gitLines.find((x) => x.path === c.xml)) {
|
281
|
+
results.manifest.add(c, DestructiveChangesType.POST);
|
282
|
+
results.output.counts.deleted++;
|
288
283
|
}
|
289
|
-
|
290
|
-
|
291
|
-
|
284
|
+
else {
|
285
|
+
try {
|
286
|
+
// in case a binary source file of a bundle was deleted, check if the bundle ist still valid and update instead of delete
|
287
|
+
ref2Resolver.getComponentsFromPath(c.xml);
|
288
|
+
if (!destructiveChangesOnly) {
|
289
|
+
results.manifest.add(c);
|
290
|
+
results.output.counts.added++;
|
291
|
+
}
|
292
|
+
}
|
293
|
+
catch (error) {
|
294
|
+
results.output.counts.error++;
|
295
|
+
results.output.errors.push(error);
|
296
|
+
}
|
292
297
|
}
|
293
298
|
}
|
294
299
|
}
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
300
|
+
else if (status === 'A') {
|
301
|
+
if (!destructiveChangesOnly) {
|
302
|
+
for (const c of getComponentsFromPath(ref2Resolver, path)) {
|
303
|
+
results.manifest.add(c);
|
304
|
+
results.output.counts.added++;
|
305
|
+
}
|
301
306
|
}
|
302
307
|
}
|
308
|
+
else {
|
309
|
+
analyzedFilesPromises.push(analyzeFile(path, ref1VirtualTreeContainer, ref2VirtualTreeContainer));
|
310
|
+
}
|
303
311
|
}
|
304
312
|
else {
|
305
|
-
|
313
|
+
debug(`${path} not included in sourcepath`);
|
306
314
|
}
|
307
315
|
}
|
308
316
|
for await (const check of analyzedFilesPromises) {
|
package/lib/utils/gitdiff.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"gitdiff.js","sourceRoot":"","sources":["../../src/utils/gitdiff.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAC3D,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,MAAM,UAAU,CAAC;AAC1B,OAAO,KAAK,MAAM,iBAAiB,CAAC;AACpC,OAAO,EACL,YAAY,EACZ,cAAc,EACd,QAAQ,EAER,oBAAoB,EAGpB,gBAAgB,EAChB,sBAAsB,GACvB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,2DAA2D,CAAC;AAC7F,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,GAAG,MAAM,gBAAgB,CAAC;AAEjC,MAAM,CAAC,MAAM,KAAK,GAAG,KAAK,CAAC,0BAA0B,CAAC,CAAC;AAEvD,MAAM,cAAc,GAAG,IAAI,cAAc,EAAE,CAAC;AAoB5C,KAAK,UAAU,UAAU,CAAC,OAAe,EAAE,GAAW;IACpD,IAAI,OAAO,KAAK,EAAE,EAAE;QAClB,OAAO,E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,CAAC;YACF,OAAO,SAAS,CAAC,MAAM,CAAC;SACzB;QACD,OAAO,SAAS,CAAC;IACnB,CAAC,CAAC,CAAC;IAEH,OAAO,IAAI,YAAY,CAAC,gBAAgB,EAAE,cAAc,CAAC,CAAC;AAC5D,CAAC"}
|
package/messages/gitdiff.json
CHANGED
@@ -7,5 +7,6 @@
|
|
7
7
|
"$ sfdx jayree:manifest:git:diff branchA...branchB\nuses the diff of what is unique in branchB (REF2)"
|
8
8
|
],
|
9
9
|
"outputdir": "directory to save the created manifest files",
|
10
|
+
"sourcepath": "comma-separated list of source file paths to limit the diff",
|
10
11
|
"destructivechangesonly": "create a destructiveChanges manifest only (package.xml will be empty)"
|
11
12
|
}
|
package/oclif.manifest.json
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":"2.
|
1
|
+
{"version":"2.4.1","commands":{"jayree:manifest:cleanup":{"id":"jayree:manifest:cleanup","description":"removes those tags from a manifest file that are present in a second manifest file\nUse this command to remove components or metadata types from a manifes file.\nIf the 'cleanup' manifest file (--file) doesn't exist, a template file is created, which can then be modified.","strict":true,"usage":"<%= command.id %> [-x <filepath>] [-f <filepath>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]","pluginName":"@jayree/sfdx-plugin-manifest","pluginAlias":"@jayree/sfdx-plugin-manifest","pluginType":"core","aliases":[],"examples":["$ sfdx jayree:manifest:cleanup --manifest=package.xml --file=packageignore.xml"],"flags":{"json":{"name":"json","type":"boolean","description":"format output as json","allowNo":false},"loglevel":{"name":"loglevel","type":"option","description":"logging level for this command invocation","required":false,"helpValue":"(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)","multiple":false,"options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"default":"warn"},"manifest":{"name":"manifest","type":"option","char":"x","description":"path to the manifest file","multiple":false},"file":{"name":"file","type":"option","char":"f","description":"path to the second 'cleanup' manifest file","multiple":false}},"args":[],"flagsConfig":{"manifest":{"kind":"filepath","char":"x","description":"path to the manifest file","input":[],"multiple":false,"type":"option"},"file":{"kind":"filepath","char":"f","description":"path to the second 'cleanup' manifest file","input":[],"multiple":false,"type":"option"}},"requiresUsername":false,"supportsDevhubUsername":false,"requiresProject":true},"jayree:manifest:generate":{"id":"jayree:manifest:generate","description":"generate a complete manifest file form the specified org\nUse this command to generate a manifest file based on an existing org.","strict":true,"usage":"<%= command.id %> [-q <array>] [-c] [-w] [--includeflowversions] [-f <string>] [-x | -a] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]","pluginName":"@jayree/sfdx-plugin-manifest","pluginAlias":"@jayree/sfdx-plugin-manifest","pluginType":"core","aliases":[],"examples":["$ sfdx jayree:manifest:generate --targetusername myOrg@example.com","<?xml version='1.0' encoding='UTF-8'?>","<Package xmlns='http://soap.sforce.com/2006/04/metadata'>...</Package>"],"flags":{"json":{"name":"json","type":"boolean","description":"format output as json","allowNo":false},"loglevel":{"name":"loglevel","type":"option","description":"logging level for this command invocation","required":false,"helpValue":"(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)","multiple":false,"options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"default":"warn"},"targetusername":{"name":"targetusername","type":"option","char":"u","description":"username or alias for the target org; overrides default target org","multiple":false},"apiversion":{"name":"apiversion","type":"option","description":"override the api version used for api requests made by this command","multiple":false},"quickfilter":{"name":"quickfilter","type":"option","char":"q","description":"csv separated list of metadata type, member or file names to filter on","multiple":false},"matchcase":{"name":"matchcase","type":"boolean","char":"c","description":"enable 'match case' for the quickfilter","allowNo":false},"matchwholeword":{"name":"matchwholeword","type":"boolean","char":"w","description":"enable 'match whole word' for the quickfilter","allowNo":false},"includeflowversions":{"name":"includeflowversions","type":"boolean","description":"include flow versions as with api version 43.0","allowNo":false},"file":{"name":"file","type":"option","char":"f","description":"write to 'file' instead of stdout","multiple":false},"excludemanaged":{"name":"excludemanaged","type":"boolean","char":"x","description":"exclude managed packages from output","allowNo":false,"exclusive":["excludeall"]},"excludeall":{"name":"excludeall","type":"boolean","char":"a","description":"exclude all packages from output","allowNo":false,"exclusive":["excludemanaged"]}},"args":[],"flagsConfig":{"quickfilter":{"kind":"array","char":"q","description":"csv separated list of metadata type, member or file names to filter on","input":[],"multiple":false,"type":"option"},"matchcase":{"kind":"boolean","char":"c","description":"enable 'match case' for the quickfilter","allowNo":false,"type":"boolean"},"matchwholeword":{"kind":"boolean","char":"w","description":"enable 'match whole word' for the quickfilter","allowNo":false,"type":"boolean"},"includeflowversions":{"kind":"boolean","description":"include flow versions as with api version 43.0","allowNo":false,"type":"boolean"},"file":{"kind":"string","char":"f","description":"write to 'file' instead of stdout","input":[],"multiple":false,"type":"option"},"excludemanaged":{"kind":"boolean","char":"x","description":"exclude managed packages from output","exclusive":["excludeall"],"allowNo":false,"type":"boolean"},"excludeall":{"kind":"boolean","char":"a","description":"exclude all packages from output","exclusive":["excludemanaged"],"allowNo":false,"type":"boolean"}},"requiresUsername":true,"supportsDevhubUsername":false,"requiresProject":false},"jayree:manifest:git:diff":{"id":"jayree:manifest:git:diff","description":"create a manifest and destructiveChanges manifest using 'git diff' data\nUse this command to create a manifest and destructiveChanges manifest file based on the difference (git diff) of two git refs.\n\nYou can use all ways to spell <commit> which are valid for 'git diff'.\n(See https://git-scm.com/docs/git-diff)","strict":true,"usage":"<%= command.id %> [-p <array>] [-o <string>] [-d] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]","pluginName":"@jayree/sfdx-plugin-manifest","pluginAlias":"@jayree/sfdx-plugin-manifest","pluginType":"core","aliases":[],"examples":["$ sfdx jayree:manifest:git:diff <commit> <commit>","$ sfdx jayree:manifest:git:diff <commit>..<commit>","uses the changes between two arbitrary <commit>","$ sfdx jayree:manifest:git:diff <commit>...<commit>","uses the changes on the branch containing and up to the second <commit>, starting at a common ancestor of both <commit>.","$ sfdx jayree:manifest:git:diff branchA..branchB","uses the diff of what is unique in branchB (REF2) and unique in branchA (REF1)","$ sfdx jayree:manifest:git:diff branchA...branchB","uses the diff of what is unique in branchB (REF2)"],"flags":{"json":{"name":"json","type":"boolean","description":"format output as json","allowNo":false},"loglevel":{"name":"loglevel","type":"option","description":"logging level for this command invocation","required":false,"helpValue":"(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)","multiple":false,"options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"default":"warn"},"sourcepath":{"name":"sourcepath","type":"option","char":"p","description":"comma-separated list of source file paths to limit the diff","multiple":false},"outputdir":{"name":"outputdir","type":"option","char":"o","description":"directory to save the created manifest files","multiple":false,"default":""},"destructivechangesonly":{"name":"destructivechangesonly","type":"boolean","char":"d","description":"create a destructiveChanges manifest only (package.xml will be empty)","allowNo":false}},"args":[{"name":"ref1","description":"base commit or branch","required":true,"hidden":false},{"name":"ref2","description":"commit or branch to compare to the base commit","required":false,"hidden":false}],"flagsConfig":{"sourcepath":{"kind":"array","char":"p","description":"comma-separated list of source file paths to limit the diff","input":[],"multiple":false,"type":"option"},"outputdir":{"kind":"string","char":"o","description":"directory to save the created manifest files","default":"","input":[],"multiple":false,"type":"option"},"destructivechangesonly":{"kind":"boolean","char":"d","description":"create a destructiveChanges manifest only (package.xml will be empty)","default":false,"allowNo":false,"type":"boolean"}},"requiresUsername":false,"supportsDevhubUsername":false,"requiresProject":true}}}
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@jayree/sfdx-plugin-manifest",
|
3
3
|
"description": "A Salesforce CLI plugin containing commands for creating manifest files from Salesforce orgs or git commits of sfdx projects.",
|
4
|
-
"version": "2.
|
4
|
+
"version": "2.4.1",
|
5
5
|
"author": "jayree",
|
6
6
|
"type": "module",
|
7
7
|
"bugs": "https://github.com/jayree/sfdx-plugin-manifest/issues",
|
@@ -75,7 +75,8 @@
|
|
75
75
|
"/lib",
|
76
76
|
"/messages",
|
77
77
|
"/oclif.manifest.json",
|
78
|
-
"/CHANGELOG.md"
|
78
|
+
"/CHANGELOG.md",
|
79
|
+
"/bin/is-sfdx.js"
|
79
80
|
],
|
80
81
|
"homepage": "https://github.com/jayree/sfdx-plugin-manifest",
|
81
82
|
"keywords": [
|
@@ -135,12 +136,12 @@
|
|
135
136
|
"lint": "sf-lint",
|
136
137
|
"lint-fix": "sf-lint --fix",
|
137
138
|
"postcompile": "oclif readme",
|
138
|
-
"_postinstall": "patch-package",
|
139
|
+
"_postinstall": "node ./bin/is-sfdx.js || patch-package",
|
139
140
|
"postpack": "shx rm -f oclif.manifest.json",
|
140
141
|
"postpublish": "pinst --enable",
|
141
142
|
"posttest": "yarn lint && yarn test:deprecation-policy",
|
142
143
|
"prepack": "sf-prepack",
|
143
|
-
"prepare": "is-ci || husky install",
|
144
|
+
"prepare": "is-ci || node ./bin/is-sfdx.js || husky install",
|
144
145
|
"prepublishOnly": "pinst --disable",
|
145
146
|
"pretest": "sf-compile-test",
|
146
147
|
"test": "sf-test",
|