@jayree/sfdx-plugin-manifest 2.6.4 → 2.7.0
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +12 -0
- package/README.md +48 -53
- package/lib/SDR-extra/collections/componentSetExtra.d.ts +2 -3
- package/lib/SDR-extra/collections/componentSetExtra.js +27 -17
- package/lib/SDR-extra/collections/componentSetExtra.js.map +1 -1
- package/lib/SDR-extra/collections/index.d.ts +1 -0
- package/lib/SDR-extra/collections/index.js +8 -0
- package/lib/SDR-extra/collections/index.js.map +1 -0
- package/lib/SDR-extra/index.d.ts +3 -0
- package/lib/SDR-extra/index.js +10 -0
- package/lib/SDR-extra/index.js.map +1 -0
- package/lib/SDR-extra/resolve/gitDiffResolver.d.ts +3 -6
- package/lib/SDR-extra/resolve/gitDiffResolver.js +21 -17
- package/lib/SDR-extra/resolve/gitDiffResolver.js.map +1 -1
- package/lib/SDR-extra/resolve/index.d.ts +2 -0
- package/lib/SDR-extra/resolve/index.js +9 -0
- package/lib/SDR-extra/resolve/index.js.map +1 -0
- package/lib/SDR-extra/resolve/treeContainersExtra.d.ts +1 -1
- package/lib/SDR-extra/resolve/treeContainersExtra.js +8 -7
- package/lib/SDR-extra/resolve/treeContainersExtra.js.map +1 -1
- package/lib/SDR-extra/utils/index.d.ts +1 -0
- package/lib/SDR-extra/utils/index.js +8 -0
- package/lib/SDR-extra/utils/index.js.map +1 -0
- package/lib/SDR-extra/utils/localGitRepo.d.ts +39 -0
- package/lib/SDR-extra/utils/localGitRepo.js +239 -0
- package/lib/SDR-extra/utils/localGitRepo.js.map +1 -0
- package/lib/commands/jayree/manifest/beta/git/diff.d.ts +15 -10
- package/lib/commands/jayree/manifest/beta/git/diff.js +42 -33
- package/lib/commands/jayree/manifest/beta/git/diff.js.map +1 -1
- package/messages/gitdiffbeta.md +67 -0
- package/oclif.manifest.json +1 -1
- package/package.json +5 -3
- package/lib/SDR-extra/utils/git-extra.d.ts +0 -71
- package/lib/SDR-extra/utils/git-extra.js +0 -202
- package/lib/SDR-extra/utils/git-extra.js.map +0 -1
- package/messages/gitdiffbeta.json +0 -17
@@ -0,0 +1,239 @@
|
|
1
|
+
/*
|
2
|
+
* Copyright (c) 2022, jayree
|
3
|
+
* All rights reserved.
|
4
|
+
* Licensed under the BSD 3-Clause license.
|
5
|
+
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
6
|
+
*/
|
7
|
+
import util from 'util';
|
8
|
+
import path from 'path';
|
9
|
+
import git from 'isomorphic-git';
|
10
|
+
import { Lifecycle } from '@salesforce/core';
|
11
|
+
import fs from 'graceful-fs';
|
12
|
+
export class GitRepo {
|
13
|
+
constructor(options) {
|
14
|
+
this.gitDir = options.gitDir;
|
15
|
+
this.packageDirs = options.packageDirs;
|
16
|
+
}
|
17
|
+
static getInstance(options) {
|
18
|
+
if (!GitRepo.instanceMap.has(options.gitDir)) {
|
19
|
+
const newInstance = new GitRepo(options);
|
20
|
+
GitRepo.instanceMap.set(options.gitDir, newInstance);
|
21
|
+
}
|
22
|
+
return GitRepo.instanceMap.get(options.gitDir);
|
23
|
+
}
|
24
|
+
async resolveMultiRefString(ref) {
|
25
|
+
const a = ref.split('.');
|
26
|
+
let ref1;
|
27
|
+
let ref2;
|
28
|
+
if (a.length === 3 || a.length === 4) {
|
29
|
+
ref1 = a[0];
|
30
|
+
ref2 = a[a.length - 1];
|
31
|
+
}
|
32
|
+
else if (a.length === 1) {
|
33
|
+
ref1 = a[0];
|
34
|
+
ref2 = undefined;
|
35
|
+
}
|
36
|
+
else {
|
37
|
+
throw new Error(`Ambiguous ${util.format('argument%s', ref.length === 1 ? '' : 's')}: ${ref}
|
38
|
+
See more help with --help`);
|
39
|
+
}
|
40
|
+
if (a.length === 4) {
|
41
|
+
ref1 = (await git.findMergeBase({
|
42
|
+
fs,
|
43
|
+
dir: this.gitDir,
|
44
|
+
oids: [ref2, ref1],
|
45
|
+
}))[0];
|
46
|
+
}
|
47
|
+
else {
|
48
|
+
ref1 = await this.resolveSingleRefString(ref1);
|
49
|
+
}
|
50
|
+
ref2 = await this.resolveSingleRefString(ref2);
|
51
|
+
return { ref1, ref2 };
|
52
|
+
}
|
53
|
+
async resolveSingleRefString(ref) {
|
54
|
+
if (ref === undefined) {
|
55
|
+
return '';
|
56
|
+
}
|
57
|
+
if (!['~', '^'].some((el) => ref.includes(el))) {
|
58
|
+
return (await this.getCommitLog(ref)).oid;
|
59
|
+
}
|
60
|
+
const firstIndex = [ref.indexOf('^'), ref.indexOf('~')].filter((a) => a >= 0).reduce((a, b) => Math.min(a, b));
|
61
|
+
let ipath = ref.substring(firstIndex);
|
62
|
+
let resolvedRef = ref.substring(0, firstIndex);
|
63
|
+
while (ipath.length && resolvedRef !== undefined) {
|
64
|
+
if (ipath.startsWith('^')) {
|
65
|
+
ipath = ipath.substring(1);
|
66
|
+
let next = Number(ipath.substring(0, 1));
|
67
|
+
ipath = next ? ipath.substring(1) : ipath;
|
68
|
+
next = next ? next : 1;
|
69
|
+
// eslint-disable-next-line no-await-in-loop
|
70
|
+
resolvedRef = (await this.getCommitLog(resolvedRef)).parents[next - 1];
|
71
|
+
}
|
72
|
+
else if (ipath.startsWith('~')) {
|
73
|
+
ipath = ipath.substring(1);
|
74
|
+
let next = Number(ipath.substring(0, 1));
|
75
|
+
ipath = next ? ipath.substring(1) : ipath;
|
76
|
+
next = next ? next : 1;
|
77
|
+
for (let index = 0; index <= next - 1; index++) {
|
78
|
+
// eslint-disable-next-line no-await-in-loop
|
79
|
+
resolvedRef = (await this.getCommitLog(resolvedRef)).parents[0];
|
80
|
+
}
|
81
|
+
}
|
82
|
+
else {
|
83
|
+
resolvedRef = undefined;
|
84
|
+
}
|
85
|
+
}
|
86
|
+
if (resolvedRef === undefined) {
|
87
|
+
throw new Error(`ambiguous argument '${ref}': unknown revision or path not in the working tree.`);
|
88
|
+
}
|
89
|
+
return resolvedRef;
|
90
|
+
}
|
91
|
+
async getStatus(ref) {
|
92
|
+
const getStatusText = (row) => {
|
93
|
+
if ([
|
94
|
+
[0, 2, 2],
|
95
|
+
[0, 2, 3], // added, staged, with unstaged changes
|
96
|
+
].some((a) => a.every((val, index) => val === row[index]))) {
|
97
|
+
return 'A';
|
98
|
+
}
|
99
|
+
if ([
|
100
|
+
[1, 0, 0],
|
101
|
+
[1, 0, 1],
|
102
|
+
[1, 1, 0],
|
103
|
+
[1, 2, 0],
|
104
|
+
[1, 0, 3], // modified, staged, with unstaged deletion
|
105
|
+
].some((a) => a.every((val, index) => val === row[index]))) {
|
106
|
+
return 'D';
|
107
|
+
}
|
108
|
+
if ([
|
109
|
+
[1, 2, 1],
|
110
|
+
[1, 2, 2],
|
111
|
+
[1, 2, 3], // modified, staged, with unstaged changes
|
112
|
+
].some((a) => a.every((val, index) => val === row[index]))) {
|
113
|
+
return 'M';
|
114
|
+
}
|
115
|
+
};
|
116
|
+
const statusMatrix = await git.statusMatrix({
|
117
|
+
fs,
|
118
|
+
dir: this.gitDir,
|
119
|
+
ref,
|
120
|
+
filter: (f) => this.packageDirs ? this.packageDirs.some((fDir) => f.startsWith(this.ensureGitRelPath(fDir))) : true,
|
121
|
+
});
|
122
|
+
const warningMatrix = statusMatrix.filter((row) => [
|
123
|
+
[0, 2, 3],
|
124
|
+
[1, 0, 3],
|
125
|
+
[1, 2, 3],
|
126
|
+
[1, 1, 0],
|
127
|
+
[1, 2, 0],
|
128
|
+
[0, 0, 3],
|
129
|
+
[1, 1, 3],
|
130
|
+
[1, 2, 1],
|
131
|
+
[1, 0, 1],
|
132
|
+
[0, 2, 0], // new, untracked
|
133
|
+
].some((a) => a.every((val, index) => val === row.slice(1)[index])));
|
134
|
+
if (warningMatrix.length) {
|
135
|
+
const buildWarningArray = (warnings) => {
|
136
|
+
const LifecycleInstance = Lifecycle.getInstance();
|
137
|
+
const emitWarningArray = [];
|
138
|
+
warnings.forEach((warning) => {
|
139
|
+
const filteredChanges = warningMatrix
|
140
|
+
.filter((row) => warning.filter.some((a) => a.every((val, index) => val === row.slice(1)[index])))
|
141
|
+
.map((row) => path.join(this.gitDir, ensureOSPath(row[0])));
|
142
|
+
for (const file of filteredChanges) {
|
143
|
+
emitWarningArray.push(LifecycleInstance.emitWarning(util.format(warning.message, file)));
|
144
|
+
}
|
145
|
+
});
|
146
|
+
return emitWarningArray;
|
147
|
+
};
|
148
|
+
// prettier-ignore
|
149
|
+
await Promise.all(buildWarningArray([
|
150
|
+
{ filter: [[0, 2, 3], [1, 0, 3], [1, 2, 3], [1, 1, 0], [1, 2, 0]], message: 'The staged file with unstaged changes "%s" was processed.', },
|
151
|
+
{ filter: [[0, 0, 3], [1, 1, 3]], message: 'The staged file with unstaged changes "%s" was ignored.', },
|
152
|
+
{ filter: [[1, 2, 1], [1, 0, 1]], message: 'The unstaged file "%s" was processed.', },
|
153
|
+
{ filter: [[0, 2, 0]], message: 'The untracked file "%s" was ignored.', },
|
154
|
+
]));
|
155
|
+
}
|
156
|
+
const gitlines = statusMatrix
|
157
|
+
.filter((row) => ![
|
158
|
+
[0, 0, 0],
|
159
|
+
[1, 1, 1],
|
160
|
+
[0, 0, 3],
|
161
|
+
[0, 2, 0],
|
162
|
+
[1, 1, 3], // modified, staged, with unstaged original file
|
163
|
+
].some((a) => a.every((val, index) => val === row.slice(1)[index])))
|
164
|
+
.map((row) => ({
|
165
|
+
path: path.join(this.gitDir, ensureOSPath(row[0])),
|
166
|
+
status: getStatusText(row.slice(1)),
|
167
|
+
}));
|
168
|
+
return gitlines;
|
169
|
+
}
|
170
|
+
async getFileState(options) {
|
171
|
+
const gitDir = this.gitDir;
|
172
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
173
|
+
return git.walk({
|
174
|
+
fs,
|
175
|
+
dir: this.gitDir,
|
176
|
+
trees: [git.TREE({ ref: options.ref1 }), git.TREE({ ref: options.ref2 })],
|
177
|
+
async map(filepath, [A, B]) {
|
178
|
+
if (filepath === '.' || (await A?.type()) === 'tree' || (await B?.type()) === 'tree') {
|
179
|
+
return;
|
180
|
+
}
|
181
|
+
const Aoid = await A?.oid();
|
182
|
+
const Boid = await B?.oid();
|
183
|
+
let type = 'EQ';
|
184
|
+
if (Aoid !== Boid) {
|
185
|
+
type = 'M';
|
186
|
+
}
|
187
|
+
if (Aoid === undefined) {
|
188
|
+
type = 'A';
|
189
|
+
}
|
190
|
+
if (Boid === undefined) {
|
191
|
+
type = 'D';
|
192
|
+
}
|
193
|
+
if (type !== 'EQ') {
|
194
|
+
return {
|
195
|
+
path: path.join(gitDir, ensureOSPath(filepath)),
|
196
|
+
status: type,
|
197
|
+
};
|
198
|
+
}
|
199
|
+
},
|
200
|
+
});
|
201
|
+
}
|
202
|
+
async listFullPathFiles(ref) {
|
203
|
+
return (await git.listFiles({ fs, dir: this.gitDir, ref })).map((p) => path.join(this.gitDir, ensureOSPath(p)));
|
204
|
+
}
|
205
|
+
async getOid(ref) {
|
206
|
+
return ref ? git.resolveRef({ fs, dir: this.gitDir, ref }) : '';
|
207
|
+
}
|
208
|
+
async readBlobAsBuffer(options) {
|
209
|
+
return Buffer.from((await git.readBlob({
|
210
|
+
fs,
|
211
|
+
dir: this.gitDir,
|
212
|
+
oid: options.oid,
|
213
|
+
filepath: this.ensureGitRelPath(options.filename),
|
214
|
+
})).blob);
|
215
|
+
}
|
216
|
+
async getCommitLog(ref) {
|
217
|
+
try {
|
218
|
+
const [log] = await git.log({
|
219
|
+
fs,
|
220
|
+
dir: this.gitDir,
|
221
|
+
ref,
|
222
|
+
depth: 1,
|
223
|
+
});
|
224
|
+
return { oid: log.oid, parents: log.commit.parent };
|
225
|
+
}
|
226
|
+
catch (error) {
|
227
|
+
throw new Error(`ambiguous argument '${ref}': unknown revision or path not in the working tree.
|
228
|
+
See more help with --help`);
|
229
|
+
}
|
230
|
+
}
|
231
|
+
ensureGitRelPath(fpath) {
|
232
|
+
return path.relative(this.gitDir, fpath).split(path.sep).join(path.posix.sep);
|
233
|
+
}
|
234
|
+
}
|
235
|
+
GitRepo.instanceMap = new Map();
|
236
|
+
function ensureOSPath(fpath) {
|
237
|
+
return fpath.split(path.posix.sep).join(path.sep);
|
238
|
+
}
|
239
|
+
//# sourceMappingURL=localGitRepo.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"localGitRepo.js","sourceRoot":"","sources":["../../../src/SDR-extra/utils/localGitRepo.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,GAAG,MAAM,gBAAgB,CAAC;AACjC,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,MAAM,aAAa,CAAC;AAO7B,MAAM,OAAO,OAAO;IAOlB,YAAoB,OAAuB;QACzC,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;QAC7B,IAAI,CAAC,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC;IACzC,CAAC;IAEM,MAAM,CAAC,WAAW,CAAC,OAAuB;QAC/C,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,GAAG,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE;YAC5C,MAAM,WAAW,GAAG,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC;YACzC,OAAO,CAAC,WAAW,CAAC,GAAG,CAAC,OAAO,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;SACtD;QACD,OAAO,OAAO,CAAC,WAAW,CAAC,GAAG,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IACjD,CAAC;IAEM,KAAK,CAAC,qBAAqB,CAAC,GAAW;QAI5C,MAAM,CAAC,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACzB,IAAI,IAAY,CAAC;QACjB,IAAI,IAAY,CAAC;QAEjB,IAAI,CAAC,CAAC,MAAM,KAAK,CAAC,IAAI,CAAC,CAAC,MAAM,KAAK,CAAC,EAAE;YACpC,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;Y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-1,6 +1,6 @@
|
|
1
1
|
import { ArgInput } from '@oclif/core/lib/interfaces';
|
2
|
-
import {
|
3
|
-
import {
|
2
|
+
import { SfCommand } from '@salesforce/sf-plugins-core';
|
3
|
+
import { Optional } from '@salesforce/ts-types';
|
4
4
|
export interface GitDiffCommandResult {
|
5
5
|
manifest?: {
|
6
6
|
path: string;
|
@@ -11,14 +11,18 @@ export interface GitDiffCommandResult {
|
|
11
11
|
name: string;
|
12
12
|
};
|
13
13
|
}
|
14
|
-
export default class GitDiffCommand extends
|
15
|
-
static
|
16
|
-
static
|
17
|
-
static
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
14
|
+
export default class GitDiffCommand extends SfCommand<GitDiffCommandResult> {
|
15
|
+
static readonly summary: string;
|
16
|
+
static readonly description: string;
|
17
|
+
static readonly examples: string[];
|
18
|
+
static readonly args: ArgInput;
|
19
|
+
static readonly requiresProject = true;
|
20
|
+
static readonly flags: {
|
21
|
+
'api-version': import("@oclif/core/lib/interfaces").OptionFlag<string>;
|
22
|
+
'source-dir': import("@oclif/core/lib/interfaces").OptionFlag<string[]>;
|
23
|
+
'output-dir': import("@oclif/core/lib/interfaces").OptionFlag<string>;
|
24
|
+
'destructive-changes-only': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
25
|
+
};
|
22
26
|
private outputDir;
|
23
27
|
private manifestName;
|
24
28
|
private destructiveChangesName;
|
@@ -26,6 +30,7 @@ export default class GitDiffCommand extends JayreeSfdxCommand {
|
|
26
30
|
private componentSet;
|
27
31
|
private destructiveChangesOnly;
|
28
32
|
run(): Promise<GitDiffCommandResult>;
|
33
|
+
protected getSourceApiVersion(): Promise<Optional<string>>;
|
29
34
|
protected createManifest(): Promise<void>;
|
30
35
|
protected formatResult(): GitDiffCommandResult;
|
31
36
|
}
|
@@ -4,31 +4,35 @@
|
|
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
|
-
import os from 'os';
|
8
7
|
import { join } from 'path';
|
9
|
-
import { flags } from '@salesforce/command';
|
10
8
|
import { Messages } from '@salesforce/core';
|
11
9
|
import fs from 'fs-extra';
|
12
10
|
import { DestructiveChangesType } from '@salesforce/source-deploy-retrieve';
|
13
|
-
import {
|
14
|
-
import {
|
11
|
+
import { SfCommand, Flags, orgApiVersionFlagWithDeprecations, arrayWithDeprecation } from '@salesforce/sf-plugins-core';
|
12
|
+
import { getString } from '@salesforce/ts-types';
|
13
|
+
import { ComponentSetExtra } from '../../../../../SDR-extra/index.js';
|
15
14
|
Messages.importMessagesDirectory(new URL('./', import.meta.url).pathname);
|
16
15
|
const messages = Messages.loadMessages('@jayree/sfdx-plugin-manifest', 'gitdiffbeta');
|
17
|
-
export default class GitDiffCommand extends
|
16
|
+
export default class GitDiffCommand extends SfCommand {
|
18
17
|
async run() {
|
19
18
|
await this.createManifest();
|
20
19
|
return this.formatResult();
|
21
20
|
}
|
21
|
+
async getSourceApiVersion() {
|
22
|
+
const projectConfig = await this.project.resolveProjectConfig();
|
23
|
+
return getString(projectConfig, 'sourceApiVersion');
|
24
|
+
}
|
22
25
|
async createManifest() {
|
26
|
+
const { flags, args } = await this.parse(GitDiffCommand);
|
23
27
|
this.manifestName = 'package.xml';
|
24
28
|
this.destructiveChangesName = 'destructiveChanges.xml';
|
25
|
-
this.outputDir =
|
26
|
-
this.destructiveChangesOnly =
|
29
|
+
this.outputDir = flags['output-dir'];
|
30
|
+
this.destructiveChangesOnly = flags['destructive-changes-only'];
|
27
31
|
this.componentSet = await ComponentSetExtra.fromGitDiff({
|
28
|
-
ref: [
|
29
|
-
fsPaths:
|
32
|
+
ref: [args.ref1, args.ref2],
|
33
|
+
fsPaths: flags['source-dir'],
|
30
34
|
});
|
31
|
-
this.componentSet.sourceApiVersion =
|
35
|
+
this.componentSet.sourceApiVersion = flags['api-version'] ?? (await this.getSourceApiVersion());
|
32
36
|
if (this.outputDir) {
|
33
37
|
await fs.ensureDir(this.outputDir);
|
34
38
|
this.outputPath = join(this.outputDir, this.manifestName);
|
@@ -52,26 +56,26 @@ export default class GitDiffCommand extends JayreeSfdxCommand {
|
|
52
56
|
}
|
53
57
|
}
|
54
58
|
formatResult() {
|
55
|
-
if (!this.
|
59
|
+
if (!this.jsonEnabled()) {
|
56
60
|
if (this.componentSet.size) {
|
57
61
|
if (this.destructiveChangesOnly && !this.componentSet.getTypesOfDestructiveChanges().length) {
|
58
|
-
this.
|
62
|
+
this.log(messages.getMessage('noComponents'));
|
59
63
|
}
|
60
64
|
else if (this.outputDir) {
|
61
|
-
this.
|
65
|
+
this.log(messages.getMessage('successOutputDir', [this.manifestName, this.outputDir]));
|
62
66
|
if (this.componentSet.getTypesOfDestructiveChanges().length) {
|
63
|
-
this.
|
67
|
+
this.log(messages.getMessage('successOutputDir', [this.destructiveChangesName, this.outputDir]));
|
64
68
|
}
|
65
69
|
}
|
66
70
|
else {
|
67
|
-
this.
|
71
|
+
this.log(messages.getMessage('success', [this.manifestName]));
|
68
72
|
if (this.componentSet.getTypesOfDestructiveChanges().length) {
|
69
|
-
this.
|
73
|
+
this.log(messages.getMessage('success', [this.destructiveChangesName]));
|
70
74
|
}
|
71
75
|
}
|
72
76
|
}
|
73
77
|
else {
|
74
|
-
this.
|
78
|
+
this.log(messages.getMessage('noComponents'));
|
75
79
|
}
|
76
80
|
}
|
77
81
|
if (this.componentSet.getTypesOfDestructiveChanges().length) {
|
@@ -91,8 +95,9 @@ export default class GitDiffCommand extends JayreeSfdxCommand {
|
|
91
95
|
}
|
92
96
|
}
|
93
97
|
}
|
98
|
+
GitDiffCommand.summary = messages.getMessage('summary');
|
94
99
|
GitDiffCommand.description = messages.getMessage('description');
|
95
|
-
GitDiffCommand.examples = messages.
|
100
|
+
GitDiffCommand.examples = messages.getMessages('examples');
|
96
101
|
GitDiffCommand.args = [
|
97
102
|
{
|
98
103
|
name: 'ref1',
|
@@ -104,24 +109,28 @@ GitDiffCommand.args = [
|
|
104
109
|
description: 'commit or branch to compare to the base commit',
|
105
110
|
},
|
106
111
|
];
|
107
|
-
GitDiffCommand.
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
+
GitDiffCommand.requiresProject = true;
|
113
|
+
GitDiffCommand.flags = {
|
114
|
+
'api-version': orgApiVersionFlagWithDeprecations,
|
115
|
+
'source-dir': arrayWithDeprecation({
|
116
|
+
char: 'd',
|
117
|
+
summary: messages.getMessage('flags.source-dir.summary'),
|
118
|
+
description: messages.getMessage('flags.source-dir.description'),
|
119
|
+
deprecateAliases: true,
|
120
|
+
aliases: ['sourcepath', 'p'],
|
112
121
|
}),
|
113
|
-
|
114
|
-
|
115
|
-
description: messages.getMessage('flags.
|
122
|
+
'output-dir': Flags.directory({
|
123
|
+
summary: messages.getMessage('flags.output-dir.summary'),
|
124
|
+
description: messages.getMessage('flags.output-dir.description'),
|
116
125
|
default: '',
|
126
|
+
deprecateAliases: true,
|
127
|
+
aliases: ['outputdir', 'o'],
|
117
128
|
}),
|
118
|
-
|
119
|
-
|
120
|
-
description: messages.getMessage('flags.
|
121
|
-
|
129
|
+
'destructive-changes-only': Flags.boolean({
|
130
|
+
summary: messages.getMessage('flags.destructive-changes-only.summary'),
|
131
|
+
description: messages.getMessage('flags.destructive-changes-only.description'),
|
132
|
+
deprecateAliases: true,
|
133
|
+
aliases: ['destructivechangesonly'],
|
122
134
|
}),
|
123
135
|
};
|
124
|
-
GitDiffCommand.requiresUsername = false;
|
125
|
-
GitDiffCommand.supportsDevhubUsername = false;
|
126
|
-
GitDiffCommand.requiresProject = true;
|
127
136
|
//# sourceMappingURL=diff.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"diff.js","sourceRoot":"","sources":["../../../../../../src/commands/jayree/manifest/beta/git/diff.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,MAAM,
|
1
|
+
{"version":3,"file":"diff.js","sourceRoot":"","sources":["../../../../../../src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E,iCAAiC;IAChD,YAAY,EAAE,oBAAoB,CAAC;QACjC,IAAI,EAAE,GAAG;QACT,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,0BAA0B,CAAC;QACxD,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,8BAA8B,CAAC;QAChE,gBAAgB,EAAE,IAAI;QACtB,OAAO,EAAE,CAAC,YAAY,EAAE,GAAG,CAAC;KAC7B,CAAC;IACF,YAAY,EAAE,KAAK,CAAC,SAAS,CAAC;QAC5B,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,0BAA0B,CAAC;QACxD,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,8BAA8B,CAAC;QAChE,OAAO,EAAE,EAAE;QACX,gBAAgB,EAAE,IAAI;QACtB,OAAO,EAAE,CAAC,WAAW,EAAE,GAAG,CAAC;KAC5B,CAAC;IACF,0BAA0B,EAAE,KAAK,CAAC,OAAO,CAAC;QACxC,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,wCAAwC,CAAC;QACtE,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,4CAA4C,CAAC;QAC9E,gBAAgB,EAAE,IAAI;QACtB,OAAO,EAAE,CAAC,wBAAwB,CAAC;KACpC,CAAC;CACH,CAAC"}
|
@@ -0,0 +1,67 @@
|
|
1
|
+
# summary
|
2
|
+
|
3
|
+
Create a project manifest and destructiveChanges manifest that lists the metadata components you want to deploy or delete based on changes in your git history.
|
4
|
+
|
5
|
+
# description
|
6
|
+
|
7
|
+
Use this command to create a manifest and destructiveChanges manifest file based on the difference (git diff) of two git refs.
|
8
|
+
|
9
|
+
You can use all ways to spell <commit> which are valid for 'git diff' (See https://git-scm.com/docs/git-diff).
|
10
|
+
|
11
|
+
# examples
|
12
|
+
|
13
|
+
- Uses the changes between two arbitrary <commit>.
|
14
|
+
|
15
|
+
<%= config.bin %> <%= command.id %> <commit> <commit>
|
16
|
+
|
17
|
+
<%= config.bin %> <%= command.id %> <commit>..<commit>
|
18
|
+
|
19
|
+
- Uses the changes on the branch containing and up to the second <commit>, starting at a common ancestor of both <commit>.
|
20
|
+
|
21
|
+
<%= config.bin %> <%= command.id %> <commit>...<commit>
|
22
|
+
|
23
|
+
- Uses the diff of what is unique in branchB (REF2) and unique in branchA (REF1).
|
24
|
+
|
25
|
+
<%= config.bin %> <%= command.id %> branchA..branchB
|
26
|
+
|
27
|
+
- Uses the diff of what is unique in branchB (REF2).
|
28
|
+
|
29
|
+
<%= config.bin %> <%= command.id %> branchA...branchB
|
30
|
+
|
31
|
+
# flags.output-dir.summary
|
32
|
+
|
33
|
+
Directory to save the created manifest files.
|
34
|
+
|
35
|
+
# flags.output-dir.description
|
36
|
+
|
37
|
+
The location can be an absolute path or relative to the current working directory.
|
38
|
+
|
39
|
+
# flags.source-dir.summary
|
40
|
+
|
41
|
+
Path to the local source files to include in the manifest.
|
42
|
+
|
43
|
+
# flags.source-dir.description
|
44
|
+
|
45
|
+
The supplied path can be to a single file (in which case the operation is applied to only one file) or to a folder (in which case the operation is applied to all metadata types in the directory and its subdirectories).
|
46
|
+
|
47
|
+
You can specify this flag more than once.
|
48
|
+
|
49
|
+
# flags.destructive-changes-only.summary
|
50
|
+
|
51
|
+
Create a destructiveChanges manifest only.
|
52
|
+
|
53
|
+
# flags.destructive-changes-only.description
|
54
|
+
|
55
|
+
Use this flag to create a 'destructiveChanges.xml' and a blank 'package.xml'.
|
56
|
+
|
57
|
+
# success
|
58
|
+
|
59
|
+
Successfully wrote %s.
|
60
|
+
|
61
|
+
# successOutputDir
|
62
|
+
|
63
|
+
Successfully wrote %s to %s.
|
64
|
+
|
65
|
+
# noComponents
|
66
|
+
|
67
|
+
No source-backed components present.
|
package/oclif.manifest.json
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":"2.6.4","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},"jayree:manifest:beta:git:diff":{"id":"jayree:manifest:beta:git:diff","description":"create a project manifest and destructiveChanges manifest that lists the metadata components you want to deploy or delete based on changes in your git history\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] [--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:beta:git:diff <commit> <commit>","$ sfdx jayree:manifest:git:diff <commit>..<commit>","uses the changes between two arbitrary <commit>","$ sfdx jayree:manifest:beta: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:beta:git:diff branchA..branchB","uses the diff of what is unique in branchB (REF2) and unique in branchA (REF1)","$ sfdx jayree:manifest:beta: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"},"apiversion":{"name":"apiversion","type":"option","description":"override the api version used for api requests made by this command","multiple":false},"sourcepath":{"name":"sourcepath","type":"option","char":"p","description":"comma-separated list of paths to the local source files to include in the manifest","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},{"name":"ref2","description":"commit or branch to compare to the base commit"}],"flagsConfig":{"apiversion":{"type":"option","kind":"string","description":"override the api version used for api requests made by this command","longDescription":"Override the API version used for API requests made by this command.","input":[],"multiple":false},"sourcepath":{"kind":"array","char":"p","description":"comma-separated list of paths to the local source files to include in the manifest","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}}}
|
1
|
+
{"version":"2.7.0","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},"jayree:manifest:beta:git:diff":{"id":"jayree:manifest:beta:git:diff","summary":"Create a project manifest and destructiveChanges manifest that lists the metadata components you want to deploy or delete based on changes in your git history.","description":"Use 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' (See https://git-scm.com/docs/git-diff).","strict":true,"pluginName":"@jayree/sfdx-plugin-manifest","pluginAlias":"@jayree/sfdx-plugin-manifest","pluginType":"core","aliases":[],"examples":["Uses the changes between two arbitrary <commit>.\n<%= config.bin %> <%= command.id %> <commit> <commit>\n<%= config.bin %> <%= command.id %> <commit>..<commit>","Uses the changes on the branch containing and up to the second <commit>, starting at a common ancestor of both <commit>.\n<%= config.bin %> <%= command.id %> <commit>...<commit>","Uses the diff of what is unique in branchB (REF2) and unique in branchA (REF1).\n<%= config.bin %> <%= command.id %> branchA..branchB","Uses the diff of what is unique in branchB (REF2).\n<%= config.bin %> <%= command.id %> branchA...branchB"],"flags":{"json":{"name":"json","type":"boolean","description":"Format output as json.","helpGroup":"GLOBAL","allowNo":false},"api-version":{"name":"api-version","type":"option","description":"Override the api version used for api requests made by this command","multiple":false,"aliases":["apiversion"]},"source-dir":{"name":"source-dir","type":"option","char":"d","summary":"Path to the local source files to include in the manifest.","description":"The supplied path can be to a single file (in which case the operation is applied to only one file) or to a folder (in which case the operation is applied to all metadata types in the directory and its subdirectories).\n\nYou can specify this flag more than once.","multiple":true,"aliases":["sourcepath","p"]},"output-dir":{"name":"output-dir","type":"option","summary":"Directory to save the created manifest files.","description":"The location can be an absolute path or relative to the current working directory.","multiple":false,"default":"","aliases":["outputdir","o"]},"destructive-changes-only":{"name":"destructive-changes-only","type":"boolean","summary":"Create a destructiveChanges manifest only.","description":"Use this flag to create a 'destructiveChanges.xml' and a blank 'package.xml'.","allowNo":false,"aliases":["destructivechangesonly"]}},"args":[{"name":"ref1","description":"base commit or branch","required":true},{"name":"ref2","description":"commit or branch to compare to the base commit"}],"requiresProject":true}}}
|