@jayree/sfdx-plugin-manifest 2.7.4 → 2.8.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (33) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/README.md +83 -66
  3. package/lib/SDR-extra/utils/localGitRepo.js +1 -1
  4. package/lib/SDR-extra/utils/localGitRepo.js.map +1 -1
  5. package/lib/commands/jayree/manifest/beta/git/diff.d.ts +8 -6
  6. package/lib/commands/jayree/manifest/beta/git/diff.js +11 -11
  7. package/lib/commands/jayree/manifest/beta/git/diff.js.map +1 -1
  8. package/lib/commands/jayree/manifest/cleanup.d.ts +11 -9
  9. package/lib/commands/jayree/manifest/cleanup.js +78 -18
  10. package/lib/commands/jayree/manifest/cleanup.js.map +1 -1
  11. package/lib/commands/jayree/manifest/generate.d.ts +18 -11
  12. package/lib/commands/jayree/manifest/generate.js +57 -48
  13. package/lib/commands/jayree/manifest/generate.js.map +1 -1
  14. package/lib/commands/jayree/manifest/git/diff.d.ts +17 -11
  15. package/lib/commands/jayree/manifest/git/diff.js +479 -55
  16. package/lib/commands/jayree/manifest/git/diff.js.map +1 -1
  17. package/messages/{gitdiffbeta.md → gitdiff.md} +7 -0
  18. package/messages/manifestcleanup.md +21 -0
  19. package/messages/manifestgenerate.md +43 -0
  20. package/oclif.manifest.json +121 -262
  21. package/package.json +14 -15
  22. package/lib/jayreeSfdxCommand.d.ts +0 -8
  23. package/lib/jayreeSfdxCommand.js +0 -26
  24. package/lib/jayreeSfdxCommand.js.map +0 -1
  25. package/lib/utils/gitdiff.d.ts +0 -57
  26. package/lib/utils/gitdiff.js +0 -442
  27. package/lib/utils/gitdiff.js.map +0 -1
  28. package/lib/utils/manifest.d.ts +0 -1
  29. package/lib/utils/manifest.js +0 -66
  30. package/lib/utils/manifest.js.map +0 -1
  31. package/messages/gitdiff.json +0 -12
  32. package/messages/manifestcleanup.json +0 -6
  33. package/messages/manifestgenerate.json +0 -16
@@ -38,6 +38,13 @@ You can use all ways to spell <commit> which are valid for 'git diff' (See https
38
38
 
39
39
  <%= config.bin %> <%= command.id %> --source-dir force-app -- <commit> <commit>
40
40
 
41
+ # args.ref1.description
42
+
43
+ Base commit or branch.
44
+
45
+ # args.ref2.description
46
+
47
+ Commit or branch to compare to the base commit.
41
48
 
42
49
  # flags.output-dir.summary
43
50
 
@@ -0,0 +1,21 @@
1
+ # summary
2
+
3
+ Removes those tags from a manifest file that are present in a second manifest file.
4
+
5
+ # description
6
+
7
+ Use this command to remove components or metadata types from a manifes file.
8
+
9
+ If the 'cleanup' manifest file (--file) doesn't exist, a template file is created, which can then be modified.
10
+
11
+ # examples
12
+
13
+ <%= config.bin %> <%= command.id %> --manifest=package.xml --file=packageignore.xml
14
+
15
+ # flags.manifest.summary
16
+
17
+ Path to the manifest file.
18
+
19
+ # flags.file.summary
20
+
21
+ Path to the second 'cleanup' manifest file.
@@ -0,0 +1,43 @@
1
+ # summary
2
+
3
+ Generate a complete manifest file form the specified org.
4
+
5
+ # description
6
+
7
+ Use this command to generate a manifest file based on an existing org.
8
+
9
+ # examples
10
+
11
+ <%= config.bin %> <%= command.id %> --targetusername myOrg@example.com
12
+
13
+ <?xml version='1.0' encoding='UTF-8'?>
14
+
15
+ <Package xmlns='http://soap.sforce.com/2006/04/metadata'>...</Package>
16
+
17
+ # flags.quick-filter.summary
18
+
19
+ Metadata type, member or file path to filter on.
20
+
21
+ # flags.match-case.summary
22
+
23
+ Enable 'match case' for the quickfilter.
24
+
25
+ # flags.match-whole-word.summary
26
+
27
+ Enable 'match whole word' for the quickfilter.
28
+
29
+ # flags.file.summary
30
+
31
+ Write to 'file' instead of stdout.
32
+
33
+ # flags.exclude-managed.summary
34
+
35
+ Exclude managed packages from output.
36
+
37
+ # flags.exclude-all.summary
38
+
39
+ Exclude all packages from output.
40
+
41
+ # flags.include-flow-versions.summary
42
+
43
+ Include flow versions as with api version 43.0.
@@ -1,377 +1,235 @@
1
1
  {
2
- "version": "2.7.4",
2
+ "version": "2.8.0",
3
3
  "commands": {
4
4
  "jayree:manifest:cleanup": {
5
5
  "id": "jayree:manifest:cleanup",
6
- "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.",
6
+ "summary": "Removes those tags from a manifest file that are present in a second manifest file.",
7
+ "description": "Use this command to remove components or metadata types from a manifes file.\n\nIf the 'cleanup' manifest file (--file) doesn't exist, a template file is created, which can then be modified.",
7
8
  "strict": true,
8
- "usage": "<%= command.id %> [-x <filepath>] [-f <filepath>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]",
9
9
  "pluginName": "@jayree/sfdx-plugin-manifest",
10
10
  "pluginAlias": "@jayree/sfdx-plugin-manifest",
11
11
  "pluginType": "core",
12
12
  "aliases": [],
13
13
  "examples": [
14
- "$ sfdx jayree:manifest:cleanup --manifest=package.xml --file=packageignore.xml"
14
+ "<%= config.bin %> <%= command.id %> --manifest=package.xml --file=packageignore.xml"
15
15
  ],
16
16
  "flags": {
17
17
  "json": {
18
18
  "name": "json",
19
19
  "type": "boolean",
20
- "description": "format output as json",
20
+ "description": "Format output as json.",
21
+ "helpGroup": "GLOBAL",
21
22
  "allowNo": false
22
23
  },
23
- "loglevel": {
24
- "name": "loglevel",
25
- "type": "option",
26
- "description": "logging level for this command invocation",
27
- "required": false,
28
- "helpValue": "(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)",
29
- "multiple": false,
30
- "options": [
31
- "trace",
32
- "debug",
33
- "info",
34
- "warn",
35
- "error",
36
- "fatal",
37
- "TRACE",
38
- "DEBUG",
39
- "INFO",
40
- "WARN",
41
- "ERROR",
42
- "FATAL"
43
- ],
44
- "default": "warn"
45
- },
46
24
  "manifest": {
47
25
  "name": "manifest",
48
26
  "type": "option",
49
27
  "char": "x",
50
- "description": "path to the manifest file",
28
+ "summary": "Path to the manifest file.",
51
29
  "multiple": false
52
30
  },
53
31
  "file": {
54
32
  "name": "file",
55
33
  "type": "option",
56
34
  "char": "f",
57
- "description": "path to the second 'cleanup' manifest file",
35
+ "summary": "Path to the second 'cleanup' manifest file.",
36
+ "required": true,
58
37
  "multiple": false
59
38
  }
60
39
  },
61
40
  "args": {},
62
- "flagsConfig": {
63
- "manifest": {
64
- "kind": "filepath",
65
- "char": "x",
66
- "description": "path to the manifest file",
67
- "input": [],
68
- "multiple": false,
69
- "type": "option"
70
- },
71
- "file": {
72
- "kind": "filepath",
73
- "char": "f",
74
- "description": "path to the second 'cleanup' manifest file",
75
- "input": [],
76
- "multiple": false,
77
- "type": "option"
78
- }
79
- },
80
- "requiresUsername": false,
81
- "supportsDevhubUsername": false,
82
41
  "requiresProject": true
83
42
  },
84
43
  "jayree:manifest:generate": {
85
44
  "id": "jayree:manifest:generate",
86
- "description": "generate a complete manifest file form the specified org\nUse this command to generate a manifest file based on an existing org.",
45
+ "summary": "Generate a complete manifest file form the specified org.",
46
+ "description": "Use this command to generate a manifest file based on an existing org.",
87
47
  "strict": true,
88
- "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]",
89
48
  "pluginName": "@jayree/sfdx-plugin-manifest",
90
49
  "pluginAlias": "@jayree/sfdx-plugin-manifest",
91
50
  "pluginType": "core",
92
51
  "aliases": [],
93
52
  "examples": [
94
- "$ sfdx jayree:manifest:generate --targetusername myOrg@example.com",
95
- "<?xml version='1.0' encoding='UTF-8'?>",
96
- "<Package xmlns='http://soap.sforce.com/2006/04/metadata'>...</Package>"
53
+ "<%= config.bin %> <%= command.id %> --targetusername myOrg@example.com\n\n<?xml version='1.0' encoding='UTF-8'?>\n\n<Package xmlns='http://soap.sforce.com/2006/04/metadata'>...</Package>"
97
54
  ],
98
55
  "flags": {
99
56
  "json": {
100
57
  "name": "json",
101
58
  "type": "boolean",
102
- "description": "format output as json",
59
+ "description": "Format output as json.",
60
+ "helpGroup": "GLOBAL",
103
61
  "allowNo": false
104
62
  },
105
- "loglevel": {
106
- "name": "loglevel",
63
+ "target-org": {
64
+ "name": "target-org",
107
65
  "type": "option",
108
- "description": "logging level for this command invocation",
109
- "required": false,
110
- "helpValue": "(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)",
66
+ "char": "o",
67
+ "summary": "Username or alias of the target org.",
68
+ "required": true,
111
69
  "multiple": false,
112
- "options": [
113
- "trace",
114
- "debug",
115
- "info",
116
- "warn",
117
- "error",
118
- "fatal",
119
- "TRACE",
120
- "DEBUG",
121
- "INFO",
122
- "WARN",
123
- "ERROR",
124
- "FATAL"
125
- ],
126
- "default": "warn"
127
- },
128
- "targetusername": {
129
- "name": "targetusername",
130
- "type": "option",
131
- "char": "u",
132
- "description": "username or alias for the target org; overrides default target org",
133
- "multiple": false
70
+ "aliases": [
71
+ "targetusername",
72
+ "u"
73
+ ]
134
74
  },
135
- "apiversion": {
136
- "name": "apiversion",
75
+ "api-version": {
76
+ "name": "api-version",
137
77
  "type": "option",
138
- "description": "override the api version used for api requests made by this command",
139
- "multiple": false
78
+ "description": "Override the api version used for api requests made by this command",
79
+ "multiple": false,
80
+ "aliases": [
81
+ "apiversion"
82
+ ]
140
83
  },
141
- "quickfilter": {
142
- "name": "quickfilter",
84
+ "quick-filter": {
85
+ "name": "quick-filter",
143
86
  "type": "option",
144
87
  "char": "q",
145
- "description": "csv separated list of metadata type, member or file names to filter on",
146
- "multiple": false
88
+ "description": "Metadata type, member or file path to filter on.",
89
+ "multiple": true,
90
+ "aliases": [
91
+ "quickfilter"
92
+ ],
93
+ "delimiter": ","
147
94
  },
148
- "matchcase": {
149
- "name": "matchcase",
95
+ "match-case": {
96
+ "name": "match-case",
150
97
  "type": "boolean",
151
98
  "char": "c",
152
- "description": "enable 'match case' for the quickfilter",
153
- "allowNo": false
99
+ "summary": "Enable 'match case' for the quickfilter.",
100
+ "allowNo": false,
101
+ "aliases": [
102
+ "matchcase"
103
+ ]
154
104
  },
155
- "matchwholeword": {
156
- "name": "matchwholeword",
105
+ "match-whole-word": {
106
+ "name": "match-whole-word",
157
107
  "type": "boolean",
158
108
  "char": "w",
159
- "description": "enable 'match whole word' for the quickfilter",
160
- "allowNo": false
109
+ "summary": "Enable 'match whole word' for the quickfilter.",
110
+ "allowNo": false,
111
+ "aliases": [
112
+ "matchwholeword"
113
+ ]
161
114
  },
162
- "includeflowversions": {
163
- "name": "includeflowversions",
115
+ "include-flow-versions": {
116
+ "name": "include-flow-versions",
164
117
  "type": "boolean",
165
- "description": "include flow versions as with api version 43.0",
166
- "allowNo": false
118
+ "summary": "Include flow versions as with api version 43.0.",
119
+ "allowNo": false,
120
+ "aliases": [
121
+ "includeflowversions"
122
+ ]
167
123
  },
168
124
  "file": {
169
125
  "name": "file",
170
126
  "type": "option",
171
127
  "char": "f",
172
- "description": "write to 'file' instead of stdout",
128
+ "summary": "Write to 'file' instead of stdout.",
173
129
  "multiple": false
174
130
  },
175
- "excludemanaged": {
176
- "name": "excludemanaged",
131
+ "exclude-managed": {
132
+ "name": "exclude-managed",
177
133
  "type": "boolean",
178
- "char": "x",
179
- "description": "exclude managed packages from output",
134
+ "summary": "Exclude managed packages from output.",
180
135
  "allowNo": false,
181
136
  "exclusive": [
182
- "excludeall"
137
+ "exclude-all"
138
+ ],
139
+ "aliases": [
140
+ "excludemanaged",
141
+ "x"
183
142
  ]
184
143
  },
185
- "excludeall": {
186
- "name": "excludeall",
144
+ "exclude-all": {
145
+ "name": "exclude-all",
187
146
  "type": "boolean",
188
- "char": "a",
189
- "description": "exclude all packages from output",
147
+ "summary": "Exclude all packages from output.",
190
148
  "allowNo": false,
191
149
  "exclusive": [
192
- "excludemanaged"
150
+ "exclude-managed"
151
+ ],
152
+ "aliases": [
153
+ "excludeall",
154
+ "a"
193
155
  ]
194
156
  }
195
157
  },
196
158
  "args": {},
197
- "flagsConfig": {
198
- "quickfilter": {
199
- "kind": "array",
200
- "char": "q",
201
- "description": "csv separated list of metadata type, member or file names to filter on",
202
- "input": [],
203
- "multiple": false,
204
- "type": "option"
205
- },
206
- "matchcase": {
207
- "kind": "boolean",
208
- "char": "c",
209
- "description": "enable 'match case' for the quickfilter",
210
- "allowNo": false,
211
- "type": "boolean"
212
- },
213
- "matchwholeword": {
214
- "kind": "boolean",
215
- "char": "w",
216
- "description": "enable 'match whole word' for the quickfilter",
217
- "allowNo": false,
218
- "type": "boolean"
219
- },
220
- "includeflowversions": {
221
- "kind": "boolean",
222
- "description": "include flow versions as with api version 43.0",
223
- "allowNo": false,
224
- "type": "boolean"
225
- },
226
- "file": {
227
- "kind": "string",
228
- "char": "f",
229
- "description": "write to 'file' instead of stdout",
230
- "input": [],
231
- "multiple": false,
232
- "type": "option"
233
- },
234
- "excludemanaged": {
235
- "kind": "boolean",
236
- "char": "x",
237
- "description": "exclude managed packages from output",
238
- "exclusive": [
239
- "excludeall"
240
- ],
241
- "allowNo": false,
242
- "type": "boolean"
243
- },
244
- "excludeall": {
245
- "kind": "boolean",
246
- "char": "a",
247
- "description": "exclude all packages from output",
248
- "exclusive": [
249
- "excludemanaged"
250
- ],
251
- "allowNo": false,
252
- "type": "boolean"
253
- }
254
- },
255
- "requiresUsername": true,
256
- "supportsDevhubUsername": false,
257
- "requiresProject": false
159
+ "hasDynamicHelp": true
258
160
  },
259
161
  "jayree:manifest:git:diff": {
260
162
  "id": "jayree:manifest:git:diff",
261
- "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)",
163
+ "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.",
164
+ "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).",
262
165
  "strict": true,
263
- "usage": "<%= command.id %> [-p <array>] [-o <string>] [-d] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]",
264
166
  "pluginName": "@jayree/sfdx-plugin-manifest",
265
167
  "pluginAlias": "@jayree/sfdx-plugin-manifest",
266
168
  "pluginType": "core",
267
169
  "aliases": [],
268
170
  "examples": [
269
- "$ sfdx jayree:manifest:git:diff <commit> <commit>",
270
- "$ sfdx jayree:manifest:git:diff <commit>..<commit>",
271
- "uses the changes between two arbitrary <commit>",
272
- "$ sfdx jayree:manifest:git:diff <commit>...<commit>",
273
- "uses the changes on the branch containing and up to the second <commit>, starting at a common ancestor of both <commit>.",
274
- "$ sfdx jayree:manifest:git:diff branchA..branchB",
275
- "uses the diff of what is unique in branchB (REF2) and unique in branchA (REF1)",
276
- "$ sfdx jayree:manifest:git:diff branchA...branchB",
277
- "uses the diff of what is unique in branchB (REF2)"
171
+ "Uses the changes between two arbitrary <commit>.\n<%= config.bin %> <%= command.id %> <commit> <commit>\n<%= config.bin %> <%= command.id %> <commit>..<commit>",
172
+ "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>",
173
+ "Uses the diff of what is unique in branchB (REF2) and unique in branchA (REF1).\n<%= config.bin %> <%= command.id %> branchA..branchB",
174
+ "Uses the diff of what is unique in branchB (REF2).\n<%= config.bin %> <%= command.id %> branchA...branchB",
175
+ "Specify the flags before or after the REF args\n<%= config.bin %> <%= command.id %> --output-dir package <commit> <commit>\n<%= config.bin %> <%= command.id %> <commit> <commit> --output-dir package",
176
+ "If you specify the 'source-dir' flag before the REF args, use '--' to separate the args from the 'source-dir' values.\n<%= config.bin %> <%= command.id %> --source-dir force-app -- <commit> <commit>"
278
177
  ],
279
178
  "flags": {
280
179
  "json": {
281
180
  "name": "json",
282
181
  "type": "boolean",
283
- "description": "format output as json",
182
+ "description": "Format output as json.",
183
+ "helpGroup": "GLOBAL",
284
184
  "allowNo": false
285
185
  },
286
- "loglevel": {
287
- "name": "loglevel",
186
+ "source-dir": {
187
+ "name": "source-dir",
288
188
  "type": "option",
289
- "description": "logging level for this command invocation",
290
- "required": false,
291
- "helpValue": "(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)",
292
- "multiple": false,
293
- "options": [
294
- "trace",
295
- "debug",
296
- "info",
297
- "warn",
298
- "error",
299
- "fatal",
300
- "TRACE",
301
- "DEBUG",
302
- "INFO",
303
- "WARN",
304
- "ERROR",
305
- "FATAL"
189
+ "char": "d",
190
+ "summary": "Path to the local source files to include in the manifest.",
191
+ "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.",
192
+ "multiple": true,
193
+ "aliases": [
194
+ "sourcepath",
195
+ "p"
306
196
  ],
307
- "default": "warn"
308
- },
309
- "sourcepath": {
310
- "name": "sourcepath",
311
- "type": "option",
312
- "char": "p",
313
- "description": "comma-separated list of source file paths to limit the diff",
314
- "multiple": false
197
+ "delimiter": ","
315
198
  },
316
- "outputdir": {
317
- "name": "outputdir",
199
+ "output-dir": {
200
+ "name": "output-dir",
318
201
  "type": "option",
319
- "char": "o",
320
- "description": "directory to save the created manifest files",
202
+ "summary": "Directory to save the created manifest files.",
203
+ "description": "The location can be an absolute path or relative to the current working directory.",
321
204
  "multiple": false,
322
- "default": ""
205
+ "default": "",
206
+ "aliases": [
207
+ "outputdir",
208
+ "o"
209
+ ]
323
210
  },
324
- "destructivechangesonly": {
325
- "name": "destructivechangesonly",
211
+ "destructive-changes-only": {
212
+ "name": "destructive-changes-only",
326
213
  "type": "boolean",
327
- "char": "d",
328
- "description": "create a destructiveChanges manifest only (package.xml will be empty)",
329
- "allowNo": false
214
+ "summary": "Create a destructiveChanges manifest only.",
215
+ "description": "Use this flag to create a 'destructiveChanges.xml' and a blank 'package.xml'.",
216
+ "allowNo": false,
217
+ "aliases": [
218
+ "destructivechangesonly"
219
+ ]
330
220
  }
331
221
  },
332
222
  "args": {
333
223
  "ref1": {
334
224
  "name": "ref1",
335
- "description": "base commit or branch",
336
- "required": true,
337
- "hidden": false
225
+ "description": "Base commit or branch.",
226
+ "required": true
338
227
  },
339
228
  "ref2": {
340
229
  "name": "ref2",
341
- "description": "commit or branch to compare to the base commit",
342
- "required": false,
343
- "hidden": false
230
+ "description": "Commit or branch to compare to the base commit."
344
231
  }
345
232
  },
346
- "flagsConfig": {
347
- "sourcepath": {
348
- "kind": "array",
349
- "char": "p",
350
- "description": "comma-separated list of source file paths to limit the diff",
351
- "input": [],
352
- "multiple": false,
353
- "type": "option"
354
- },
355
- "outputdir": {
356
- "kind": "string",
357
- "char": "o",
358
- "description": "directory to save the created manifest files",
359
- "default": "",
360
- "input": [],
361
- "multiple": false,
362
- "type": "option"
363
- },
364
- "destructivechangesonly": {
365
- "kind": "boolean",
366
- "char": "d",
367
- "description": "create a destructiveChanges manifest only (package.xml will be empty)",
368
- "default": false,
369
- "allowNo": false,
370
- "type": "boolean"
371
- }
372
- },
373
- "requiresUsername": false,
374
- "supportsDevhubUsername": false,
375
233
  "requiresProject": true
376
234
  },
377
235
  "jayree:manifest:beta:git:diff": {
@@ -418,7 +276,8 @@
418
276
  "aliases": [
419
277
  "sourcepath",
420
278
  "p"
421
- ]
279
+ ],
280
+ "delimiter": ","
422
281
  },
423
282
  "output-dir": {
424
283
  "name": "output-dir",
@@ -446,12 +305,12 @@
446
305
  "args": {
447
306
  "ref1": {
448
307
  "name": "ref1",
449
- "description": "base commit or branch",
308
+ "description": "Base commit or branch.",
450
309
  "required": true
451
310
  },
452
311
  "ref2": {
453
312
  "name": "ref2",
454
- "description": "commit or branch to compare to the base commit"
313
+ "description": "Commit or branch to compare to the base commit."
455
314
  }
456
315
  },
457
316
  "requiresProject": true