@jayree/sfdx-plugin-manifest 2.9.1 → 3.0.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 +91 -6
- package/lib/commands/jayree/manifest/git/diff.d.ts +23 -20
- package/lib/commands/jayree/manifest/git/diff.js +87 -584
- package/lib/commands/jayree/manifest/git/diff.js.map +1 -1
- package/lib/commands/jayree/manifest/legacy/git/diff.d.ts +37 -0
- package/lib/commands/jayree/manifest/legacy/git/diff.js +640 -0
- package/lib/commands/jayree/manifest/legacy/git/diff.js.map +1 -0
- package/oclif.manifest.json +22 -14
- package/package.json +12 -4
- package/schemas/jayree-manifest-git-diff.json +24 -5
- package/schemas/jayree-manifest-legacy-git-diff.json +19 -0
- package/lib/commands/jayree/manifest/beta/git/diff.d.ts +0 -38
- package/lib/commands/jayree/manifest/beta/git/diff.js +0 -141
- package/lib/commands/jayree/manifest/beta/git/diff.js.map +0 -1
- package/schemas/jayree-manifest-beta-git-diff.json +0 -38
package/CHANGELOG.md
CHANGED
@@ -1,3 +1,15 @@
|
|
1
|
+
# [3.0.0](https://github.com/jayree/sfdx-plugin-manifest/compare/v2.9.1...v3.0.0) (2023-03-03)
|
2
|
+
|
3
|
+
|
4
|
+
### Features
|
5
|
+
|
6
|
+
* **manifest:git:diff:** make :beta:git:diff the default command. The old command is available as :legacy:git:diff ([2f4b9dc](https://github.com/jayree/sfdx-plugin-manifest/commit/2f4b9dc80dd3a4e6241c44907a88c5f00bcade63))
|
7
|
+
|
8
|
+
|
9
|
+
### BREAKING CHANGES
|
10
|
+
|
11
|
+
* **manifest:git:diff:** This change makes :beta:git:diff the default command.
|
12
|
+
|
1
13
|
## [2.9.1](https://github.com/jayree/sfdx-plugin-manifest/compare/v2.9.0...v2.9.1) (2023-03-03)
|
2
14
|
|
3
15
|
|
package/README.md
CHANGED
@@ -21,6 +21,7 @@ sfdx plugins:install @jayree/sfdx-plugin-manifest
|
|
21
21
|
* [`sfdx jayree:manifest:cleanup`](#sfdx-jayreemanifestcleanup)
|
22
22
|
* [`sfdx jayree:manifest:generate`](#sfdx-jayreemanifestgenerate)
|
23
23
|
* [`sfdx jayree:manifest:git:diff`](#sfdx-jayreemanifestgitdiff)
|
24
|
+
* [`sfdx jayree:manifest:legacy:git:diff`](#sfdx-jayreemanifestlegacygitdiff)
|
24
25
|
|
25
26
|
### `sfdx jayree:manifest:beta:git:diff`
|
26
27
|
|
@@ -53,6 +54,9 @@ DESCRIPTION
|
|
53
54
|
|
54
55
|
You can use all ways to spell <commit> which are valid for 'git diff' (See https://git-scm.com/docs/git-diff).
|
55
56
|
|
57
|
+
ALIASES
|
58
|
+
$ sfdx jayree:manifest:beta:git:diff
|
59
|
+
|
56
60
|
EXAMPLES
|
57
61
|
Uses the changes between two arbitrary <commit>.
|
58
62
|
|
@@ -99,8 +103,6 @@ FLAG DESCRIPTIONS
|
|
99
103
|
The location can be an absolute path or relative to the current working directory.
|
100
104
|
```
|
101
105
|
|
102
|
-
_See code: [src/commands/jayree/manifest/beta/git/diff.ts](https://github.com/jayree/sfdx-plugin-manifest/blob/v2.9.1/src/commands/jayree/manifest/beta/git/diff.ts)_
|
103
|
-
|
104
106
|
### `sfdx jayree:manifest:cleanup`
|
105
107
|
|
106
108
|
Removes those tags from a manifest file that are present in a second manifest file.
|
@@ -127,7 +129,7 @@ EXAMPLES
|
|
127
129
|
$ sfdx jayree:manifest:cleanup --manifest=package.xml --file=packageignore.xml
|
128
130
|
```
|
129
131
|
|
130
|
-
_See code: [src/commands/jayree/manifest/cleanup.ts](https://github.com/jayree/sfdx-plugin-manifest/blob/
|
132
|
+
_See code: [src/commands/jayree/manifest/cleanup.ts](https://github.com/jayree/sfdx-plugin-manifest/blob/v3.0.0/src/commands/jayree/manifest/cleanup.ts)_
|
131
133
|
|
132
134
|
### `sfdx jayree:manifest:generate`
|
133
135
|
|
@@ -163,7 +165,7 @@ EXAMPLES
|
|
163
165
|
<Package xmlns='http://soap.sforce.com/2006/04/metadata'>...</Package>
|
164
166
|
```
|
165
167
|
|
166
|
-
_See code: [src/commands/jayree/manifest/generate.ts](https://github.com/jayree/sfdx-plugin-manifest/blob/
|
168
|
+
_See code: [src/commands/jayree/manifest/generate.ts](https://github.com/jayree/sfdx-plugin-manifest/blob/v3.0.0/src/commands/jayree/manifest/generate.ts)_
|
167
169
|
|
168
170
|
### `sfdx jayree:manifest:git:diff`
|
169
171
|
|
@@ -171,7 +173,8 @@ Create a project manifest and destructiveChanges manifest that lists the metadat
|
|
171
173
|
|
172
174
|
```
|
173
175
|
USAGE
|
174
|
-
$ sfdx jayree:manifest:git:diff REF1 [REF2] [--json] [-
|
176
|
+
$ sfdx jayree:manifest:git:diff REF1 [REF2] [--json] [--api-version <value>] [-d <value>] [--output-dir <value>]
|
177
|
+
[--destructive-changes-only]
|
175
178
|
|
176
179
|
ARGUMENTS
|
177
180
|
REF1 Base commit or branch.
|
@@ -179,6 +182,7 @@ ARGUMENTS
|
|
179
182
|
|
180
183
|
FLAGS
|
181
184
|
-d, --source-dir=<value>... Path to the local source files to include in the manifest.
|
185
|
+
--api-version=<value> Override the api version used for api requests made by this command
|
182
186
|
--destructive-changes-only Create a destructiveChanges manifest only.
|
183
187
|
--output-dir=<value> Directory to save the created manifest files.
|
184
188
|
|
@@ -194,6 +198,9 @@ DESCRIPTION
|
|
194
198
|
|
195
199
|
You can use all ways to spell <commit> which are valid for 'git diff' (See https://git-scm.com/docs/git-diff).
|
196
200
|
|
201
|
+
ALIASES
|
202
|
+
$ sfdx jayree:manifest:beta:git:diff
|
203
|
+
|
197
204
|
EXAMPLES
|
198
205
|
Uses the changes between two arbitrary <commit>.
|
199
206
|
|
@@ -240,5 +247,83 @@ FLAG DESCRIPTIONS
|
|
240
247
|
The location can be an absolute path or relative to the current working directory.
|
241
248
|
```
|
242
249
|
|
243
|
-
_See code: [src/commands/jayree/manifest/git/diff.ts](https://github.com/jayree/sfdx-plugin-manifest/blob/
|
250
|
+
_See code: [src/commands/jayree/manifest/git/diff.ts](https://github.com/jayree/sfdx-plugin-manifest/blob/v3.0.0/src/commands/jayree/manifest/git/diff.ts)_
|
251
|
+
|
252
|
+
### `sfdx jayree:manifest:legacy:git:diff`
|
253
|
+
|
254
|
+
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.
|
255
|
+
|
256
|
+
```
|
257
|
+
USAGE
|
258
|
+
$ sfdx jayree:manifest:legacy:git:diff REF1 [REF2] [--json] [-d <value>] [--output-dir <value>]
|
259
|
+
[--destructive-changes-only]
|
260
|
+
|
261
|
+
ARGUMENTS
|
262
|
+
REF1 Base commit or branch.
|
263
|
+
REF2 Commit or branch to compare to the base commit.
|
264
|
+
|
265
|
+
FLAGS
|
266
|
+
-d, --source-dir=<value>... Path to the local source files to include in the manifest.
|
267
|
+
--destructive-changes-only Create a destructiveChanges manifest only.
|
268
|
+
--output-dir=<value> Directory to save the created manifest files.
|
269
|
+
|
270
|
+
GLOBAL FLAGS
|
271
|
+
--json Format output as json.
|
272
|
+
|
273
|
+
DESCRIPTION
|
274
|
+
Create a project manifest and destructiveChanges manifest that lists the metadata components you want to deploy or
|
275
|
+
delete based on changes in your git history.
|
276
|
+
|
277
|
+
Use this command to create a manifest and destructiveChanges manifest file based on the difference (git diff) of two
|
278
|
+
git refs.
|
279
|
+
|
280
|
+
You can use all ways to spell <commit> which are valid for 'git diff' (See https://git-scm.com/docs/git-diff).
|
281
|
+
|
282
|
+
EXAMPLES
|
283
|
+
Uses the changes between two arbitrary <commit>.
|
284
|
+
|
285
|
+
$ sfdx jayree:manifest:legacy:git:diff <commit> <commit>
|
286
|
+
$ sfdx jayree:manifest:legacy:git:diff <commit>..<commit>
|
287
|
+
|
288
|
+
Uses the changes on the branch containing and up to the second <commit>, starting at a common ancestor of both
|
289
|
+
<commit>.
|
290
|
+
|
291
|
+
$ sfdx jayree:manifest:legacy:git:diff <commit>...<commit>
|
292
|
+
|
293
|
+
Uses the diff of what is unique in branchB (REF2) and unique in branchA (REF1).
|
294
|
+
|
295
|
+
$ sfdx jayree:manifest:legacy:git:diff branchA..branchB
|
296
|
+
|
297
|
+
Uses the diff of what is unique in branchB (REF2).
|
298
|
+
|
299
|
+
$ sfdx jayree:manifest:legacy:git:diff branchA...branchB
|
300
|
+
|
301
|
+
Specify the flags before or after the REF args
|
302
|
+
|
303
|
+
$ sfdx jayree:manifest:legacy:git:diff --output-dir package <commit> <commit>
|
304
|
+
$ sfdx jayree:manifest:legacy:git:diff <commit> <commit> --output-dir package
|
305
|
+
|
306
|
+
If you specify the 'source-dir' flag before the REF args, use '--' to separate the args from the 'source-dir'
|
307
|
+
values.
|
308
|
+
|
309
|
+
$ sfdx jayree:manifest:legacy:git:diff --source-dir force-app -- <commit> <commit>
|
310
|
+
|
311
|
+
FLAG DESCRIPTIONS
|
312
|
+
-d, --source-dir=<value>... Path to the local source files to include in the manifest.
|
313
|
+
|
314
|
+
The supplied path can be to a single file (in which case the operation is applied to only one file) or to a folder
|
315
|
+
(in which case the operation is applied to all metadata types in the directory and its subdirectories).
|
316
|
+
|
317
|
+
You can specify this flag more than once.
|
318
|
+
|
319
|
+
--destructive-changes-only Create a destructiveChanges manifest only.
|
320
|
+
|
321
|
+
Use this flag to create a 'destructiveChanges.xml' and a blank 'package.xml'.
|
322
|
+
|
323
|
+
--output-dir=<value> Directory to save the created manifest files.
|
324
|
+
|
325
|
+
The location can be an absolute path or relative to the current working directory.
|
326
|
+
```
|
327
|
+
|
328
|
+
_See code: [src/commands/jayree/manifest/legacy/git/diff.ts](https://github.com/jayree/sfdx-plugin-manifest/blob/v3.0.0/src/commands/jayree/manifest/legacy/git/diff.ts)_
|
244
329
|
<!-- commandsstop -->
|
@@ -1,37 +1,40 @@
|
|
1
1
|
import { SfCommand } from '@salesforce/sf-plugins-core';
|
2
2
|
import { Optional } from '@salesforce/ts-types';
|
3
3
|
export interface GitDiffCommandResult {
|
4
|
-
|
5
|
-
|
4
|
+
manifest?: {
|
5
|
+
path: string;
|
6
|
+
name: string;
|
7
|
+
};
|
8
|
+
destructiveChanges?: {
|
9
|
+
path: string;
|
10
|
+
name: string;
|
11
|
+
};
|
6
12
|
}
|
7
|
-
export default class
|
13
|
+
export default class GitDiffCommand extends SfCommand<GitDiffCommandResult> {
|
8
14
|
static readonly summary: string;
|
9
15
|
static readonly description: string;
|
10
16
|
static readonly examples: string[];
|
11
17
|
static readonly args: {
|
12
|
-
ref1: import("@oclif/core/lib/interfaces/parser").Arg<string, Record<string, unknown>>;
|
13
|
-
ref2: import("@oclif/core/lib/interfaces/parser").Arg<string | undefined, Record<string, unknown>>;
|
18
|
+
ref1: import("@oclif/core/lib/interfaces/parser.js").Arg<string, Record<string, unknown>>;
|
19
|
+
ref2: import("@oclif/core/lib/interfaces/parser.js").Arg<string | undefined, Record<string, unknown>>;
|
14
20
|
};
|
15
21
|
static readonly requiresProject = true;
|
22
|
+
static readonly deprecateAliases = true;
|
23
|
+
static readonly aliases: string[];
|
16
24
|
static readonly flags: {
|
17
|
-
'
|
18
|
-
'
|
19
|
-
'
|
25
|
+
'api-version': import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
|
26
|
+
'source-dir': import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string[] | undefined, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
|
27
|
+
'output-dir': import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
|
28
|
+
'destructive-changes-only': import("@oclif/core/lib/interfaces/parser.js").BooleanFlag<boolean>;
|
20
29
|
};
|
21
|
-
private isOutputEnabled;
|
22
30
|
private outputDir;
|
23
|
-
private
|
24
|
-
private
|
25
|
-
private
|
26
|
-
private destructiveChanges;
|
27
|
-
private manifest;
|
28
|
-
private gitLines;
|
29
|
-
private ref1VirtualTreeContainer;
|
30
|
-
private ref2VirtualTreeContainer;
|
31
|
+
private manifestName;
|
32
|
+
private destructiveChangesName;
|
33
|
+
private outputPath;
|
31
34
|
private componentSet;
|
32
|
-
private
|
33
|
-
private outputWarnings;
|
34
|
-
private fsPaths;
|
35
|
+
private destructiveChangesOnly;
|
35
36
|
run(): Promise<GitDiffCommandResult>;
|
36
37
|
protected getSourceApiVersion(): Promise<Optional<string>>;
|
38
|
+
protected createManifest(): Promise<void>;
|
39
|
+
protected formatResult(): GitDiffCommandResult;
|
37
40
|
}
|