@jayree/sfdx-plugin-manifest 2.7.3 → 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 +30 -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 +319 -1
  21. package/package.json +19 -20
  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 +1,319 @@
1
- {"version":"2.7.3","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","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","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>"],"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}}}
1
+ {
2
+ "version": "2.8.0",
3
+ "commands": {
4
+ "jayree:manifest:cleanup": {
5
+ "id": "jayree:manifest:cleanup",
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.",
8
+ "strict": true,
9
+ "pluginName": "@jayree/sfdx-plugin-manifest",
10
+ "pluginAlias": "@jayree/sfdx-plugin-manifest",
11
+ "pluginType": "core",
12
+ "aliases": [],
13
+ "examples": [
14
+ "<%= config.bin %> <%= command.id %> --manifest=package.xml --file=packageignore.xml"
15
+ ],
16
+ "flags": {
17
+ "json": {
18
+ "name": "json",
19
+ "type": "boolean",
20
+ "description": "Format output as json.",
21
+ "helpGroup": "GLOBAL",
22
+ "allowNo": false
23
+ },
24
+ "manifest": {
25
+ "name": "manifest",
26
+ "type": "option",
27
+ "char": "x",
28
+ "summary": "Path to the manifest file.",
29
+ "multiple": false
30
+ },
31
+ "file": {
32
+ "name": "file",
33
+ "type": "option",
34
+ "char": "f",
35
+ "summary": "Path to the second 'cleanup' manifest file.",
36
+ "required": true,
37
+ "multiple": false
38
+ }
39
+ },
40
+ "args": {},
41
+ "requiresProject": true
42
+ },
43
+ "jayree:manifest:generate": {
44
+ "id": "jayree:manifest:generate",
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.",
47
+ "strict": true,
48
+ "pluginName": "@jayree/sfdx-plugin-manifest",
49
+ "pluginAlias": "@jayree/sfdx-plugin-manifest",
50
+ "pluginType": "core",
51
+ "aliases": [],
52
+ "examples": [
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>"
54
+ ],
55
+ "flags": {
56
+ "json": {
57
+ "name": "json",
58
+ "type": "boolean",
59
+ "description": "Format output as json.",
60
+ "helpGroup": "GLOBAL",
61
+ "allowNo": false
62
+ },
63
+ "target-org": {
64
+ "name": "target-org",
65
+ "type": "option",
66
+ "char": "o",
67
+ "summary": "Username or alias of the target org.",
68
+ "required": true,
69
+ "multiple": false,
70
+ "aliases": [
71
+ "targetusername",
72
+ "u"
73
+ ]
74
+ },
75
+ "api-version": {
76
+ "name": "api-version",
77
+ "type": "option",
78
+ "description": "Override the api version used for api requests made by this command",
79
+ "multiple": false,
80
+ "aliases": [
81
+ "apiversion"
82
+ ]
83
+ },
84
+ "quick-filter": {
85
+ "name": "quick-filter",
86
+ "type": "option",
87
+ "char": "q",
88
+ "description": "Metadata type, member or file path to filter on.",
89
+ "multiple": true,
90
+ "aliases": [
91
+ "quickfilter"
92
+ ],
93
+ "delimiter": ","
94
+ },
95
+ "match-case": {
96
+ "name": "match-case",
97
+ "type": "boolean",
98
+ "char": "c",
99
+ "summary": "Enable 'match case' for the quickfilter.",
100
+ "allowNo": false,
101
+ "aliases": [
102
+ "matchcase"
103
+ ]
104
+ },
105
+ "match-whole-word": {
106
+ "name": "match-whole-word",
107
+ "type": "boolean",
108
+ "char": "w",
109
+ "summary": "Enable 'match whole word' for the quickfilter.",
110
+ "allowNo": false,
111
+ "aliases": [
112
+ "matchwholeword"
113
+ ]
114
+ },
115
+ "include-flow-versions": {
116
+ "name": "include-flow-versions",
117
+ "type": "boolean",
118
+ "summary": "Include flow versions as with api version 43.0.",
119
+ "allowNo": false,
120
+ "aliases": [
121
+ "includeflowversions"
122
+ ]
123
+ },
124
+ "file": {
125
+ "name": "file",
126
+ "type": "option",
127
+ "char": "f",
128
+ "summary": "Write to 'file' instead of stdout.",
129
+ "multiple": false
130
+ },
131
+ "exclude-managed": {
132
+ "name": "exclude-managed",
133
+ "type": "boolean",
134
+ "summary": "Exclude managed packages from output.",
135
+ "allowNo": false,
136
+ "exclusive": [
137
+ "exclude-all"
138
+ ],
139
+ "aliases": [
140
+ "excludemanaged",
141
+ "x"
142
+ ]
143
+ },
144
+ "exclude-all": {
145
+ "name": "exclude-all",
146
+ "type": "boolean",
147
+ "summary": "Exclude all packages from output.",
148
+ "allowNo": false,
149
+ "exclusive": [
150
+ "exclude-managed"
151
+ ],
152
+ "aliases": [
153
+ "excludeall",
154
+ "a"
155
+ ]
156
+ }
157
+ },
158
+ "args": {},
159
+ "hasDynamicHelp": true
160
+ },
161
+ "jayree:manifest:git:diff": {
162
+ "id": "jayree:manifest: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).",
165
+ "strict": true,
166
+ "pluginName": "@jayree/sfdx-plugin-manifest",
167
+ "pluginAlias": "@jayree/sfdx-plugin-manifest",
168
+ "pluginType": "core",
169
+ "aliases": [],
170
+ "examples": [
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>"
177
+ ],
178
+ "flags": {
179
+ "json": {
180
+ "name": "json",
181
+ "type": "boolean",
182
+ "description": "Format output as json.",
183
+ "helpGroup": "GLOBAL",
184
+ "allowNo": false
185
+ },
186
+ "source-dir": {
187
+ "name": "source-dir",
188
+ "type": "option",
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"
196
+ ],
197
+ "delimiter": ","
198
+ },
199
+ "output-dir": {
200
+ "name": "output-dir",
201
+ "type": "option",
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.",
204
+ "multiple": false,
205
+ "default": "",
206
+ "aliases": [
207
+ "outputdir",
208
+ "o"
209
+ ]
210
+ },
211
+ "destructive-changes-only": {
212
+ "name": "destructive-changes-only",
213
+ "type": "boolean",
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
+ ]
220
+ }
221
+ },
222
+ "args": {
223
+ "ref1": {
224
+ "name": "ref1",
225
+ "description": "Base commit or branch.",
226
+ "required": true
227
+ },
228
+ "ref2": {
229
+ "name": "ref2",
230
+ "description": "Commit or branch to compare to the base commit."
231
+ }
232
+ },
233
+ "requiresProject": true
234
+ },
235
+ "jayree:manifest:beta:git:diff": {
236
+ "id": "jayree:manifest:beta:git:diff",
237
+ "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.",
238
+ "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).",
239
+ "strict": true,
240
+ "pluginName": "@jayree/sfdx-plugin-manifest",
241
+ "pluginAlias": "@jayree/sfdx-plugin-manifest",
242
+ "pluginType": "core",
243
+ "aliases": [],
244
+ "examples": [
245
+ "Uses the changes between two arbitrary <commit>.\n<%= config.bin %> <%= command.id %> <commit> <commit>\n<%= config.bin %> <%= command.id %> <commit>..<commit>",
246
+ "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>",
247
+ "Uses the diff of what is unique in branchB (REF2) and unique in branchA (REF1).\n<%= config.bin %> <%= command.id %> branchA..branchB",
248
+ "Uses the diff of what is unique in branchB (REF2).\n<%= config.bin %> <%= command.id %> branchA...branchB",
249
+ "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",
250
+ "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>"
251
+ ],
252
+ "flags": {
253
+ "json": {
254
+ "name": "json",
255
+ "type": "boolean",
256
+ "description": "Format output as json.",
257
+ "helpGroup": "GLOBAL",
258
+ "allowNo": false
259
+ },
260
+ "api-version": {
261
+ "name": "api-version",
262
+ "type": "option",
263
+ "description": "Override the api version used for api requests made by this command",
264
+ "multiple": false,
265
+ "aliases": [
266
+ "apiversion"
267
+ ]
268
+ },
269
+ "source-dir": {
270
+ "name": "source-dir",
271
+ "type": "option",
272
+ "char": "d",
273
+ "summary": "Path to the local source files to include in the manifest.",
274
+ "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.",
275
+ "multiple": true,
276
+ "aliases": [
277
+ "sourcepath",
278
+ "p"
279
+ ],
280
+ "delimiter": ","
281
+ },
282
+ "output-dir": {
283
+ "name": "output-dir",
284
+ "type": "option",
285
+ "summary": "Directory to save the created manifest files.",
286
+ "description": "The location can be an absolute path or relative to the current working directory.",
287
+ "multiple": false,
288
+ "default": "",
289
+ "aliases": [
290
+ "outputdir",
291
+ "o"
292
+ ]
293
+ },
294
+ "destructive-changes-only": {
295
+ "name": "destructive-changes-only",
296
+ "type": "boolean",
297
+ "summary": "Create a destructiveChanges manifest only.",
298
+ "description": "Use this flag to create a 'destructiveChanges.xml' and a blank 'package.xml'.",
299
+ "allowNo": false,
300
+ "aliases": [
301
+ "destructivechangesonly"
302
+ ]
303
+ }
304
+ },
305
+ "args": {
306
+ "ref1": {
307
+ "name": "ref1",
308
+ "description": "Base commit or branch.",
309
+ "required": true
310
+ },
311
+ "ref2": {
312
+ "name": "ref2",
313
+ "description": "Commit or branch to compare to the base commit."
314
+ }
315
+ },
316
+ "requiresProject": true
317
+ }
318
+ }
319
+ }
package/package.json CHANGED
@@ -1,20 +1,19 @@
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.7.3",
4
+ "version": "2.8.0",
5
5
  "author": "jayree",
6
6
  "type": "module",
7
7
  "bugs": "https://github.com/jayree/sfdx-plugin-manifest/issues",
8
8
  "dependencies": {
9
- "@oclif/core": "^1.24.0",
10
- "@salesforce/command": "^5.2.41",
11
- "@salesforce/kit": "^1.8.3",
12
- "@salesforce/sf-plugins-core": "^1.22.0",
13
- "@salesforce/source-deploy-retrieve": "^7.7.3",
14
- "@salesforce/ts-types": "^1.7.2",
9
+ "@oclif/core": "^2.0.7",
10
+ "@salesforce/kit": "^1.8.4",
11
+ "@salesforce/sf-plugins-core": "^2.0.1",
12
+ "@salesforce/source-deploy-retrieve": "^7.7.6",
13
+ "@salesforce/ts-types": "^1.7.3",
15
14
  "debug": "^4.3.4",
16
15
  "fast-deep-equal": "^3.1.3",
17
- "fast-xml-parser": "^4.0.13",
16
+ "fast-xml-parser": "^4.0.15",
18
17
  "fs-extra": "^11.1.0",
19
18
  "graceful-fs": "^4.2.10",
20
19
  "isomorphic-git": "^1.21.0",
@@ -22,17 +21,17 @@
22
21
  "marked": "^4.2.12",
23
22
  "marked-terminal": "^5.1.1",
24
23
  "semver": "^7.3.8",
25
- "tslib": "^2.4.1"
24
+ "tslib": "^2.5.0"
26
25
  },
27
26
  "devDependencies": {
28
27
  "@commitlint/cli": "^17.4.2",
29
28
  "@commitlint/config-conventional": "^17.4.2",
30
- "@oclif/plugin-command-snapshot": "^3.3.0",
31
- "@oclif/plugin-help": "^5.1.22",
29
+ "@oclif/plugin-command-snapshot": "^3.3.2",
30
+ "@oclif/plugin-help": "^5.2.2",
32
31
  "@salesforce/dev-config": "^3.1.0",
33
- "@salesforce/dev-scripts": "^3.1.0",
32
+ "@salesforce/dev-scripts": "^3.1.1",
34
33
  "@salesforce/prettier-config": "^0.0.2",
35
- "@salesforce/ts-sinon": "^1.4.4",
34
+ "@salesforce/ts-sinon": "^1.4.5",
36
35
  "@types/chai": "^4.3.4",
37
36
  "@types/debug": "^4.1.7",
38
37
  "@types/fs-extra": "^11.0.1",
@@ -42,24 +41,24 @@
42
41
  "@types/node": "^18.11.18",
43
42
  "@types/semver": "^7.3.13",
44
43
  "@types/sinon": "10.0.13",
45
- "@typescript-eslint/eslint-plugin": "^5.48.2",
46
- "@typescript-eslint/parser": "^5.48.2",
44
+ "@typescript-eslint/eslint-plugin": "^5.49.0",
45
+ "@typescript-eslint/parser": "^5.49.0",
47
46
  "chai": "^4.3.7",
48
- "eslint": "^8.32.0",
47
+ "eslint": "^8.33.0",
49
48
  "eslint-config-oclif": "^4.0",
50
49
  "eslint-config-prettier": "^8.6.0",
51
- "eslint-config-salesforce": "^1.1.0",
50
+ "eslint-config-salesforce": "^1.1.1",
52
51
  "eslint-config-salesforce-typescript": "^1.1.1",
53
52
  "eslint-plugin-header": "^3.1.1",
54
53
  "eslint-plugin-import": "2.27.5",
55
- "eslint-plugin-jsdoc": "^39.6.7",
54
+ "eslint-plugin-jsdoc": "^39.7.4",
56
55
  "eslint-plugin-prettier": "^4.2.1",
57
- "eslint-plugin-sf-plugin": "^1.6.3",
56
+ "eslint-plugin-sf-plugin": "^1.8.0",
58
57
  "husky": "^8.0.3",
59
58
  "is-ci": "^3.0.1",
60
59
  "mocha": "^10.2.0",
61
60
  "nyc": "^15.1.0",
62
- "oclif": "^3.4.3",
61
+ "oclif": "^3.6.1",
63
62
  "patch-package": "^6.5.1",
64
63
  "pinst": "^3.0.0",
65
64
  "prettier": "^2.8.3",
@@ -1,8 +0,0 @@
1
- import { SfdxCommand } from '@salesforce/command';
2
- import { Optional } from '@salesforce/ts-types';
3
- export declare abstract class JayreeSfdxCommand extends SfdxCommand {
4
- protected warnIfRunByAlias(aliases: string[], id: string): void;
5
- protected getFlag<T>(flagName: string, defaultVal?: unknown): T;
6
- protected isJsonOutput(): boolean;
7
- protected getSourceApiVersion(): Promise<Optional<string>>;
8
- }
@@ -1,26 +0,0 @@
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 { SfdxCommand } from '@salesforce/command';
8
- import { get, getBoolean, getString } from '@salesforce/ts-types';
9
- export class JayreeSfdxCommand extends SfdxCommand {
10
- warnIfRunByAlias(aliases, id) {
11
- if (aliases.some((r) => process.argv.includes(r))) {
12
- this.ux.warn(`You are using a deprecated alias of the command: ${id}`);
13
- }
14
- }
15
- getFlag(flagName, defaultVal) {
16
- return get(this.flags, flagName, defaultVal);
17
- }
18
- isJsonOutput() {
19
- return getBoolean(this.flags, 'json', false);
20
- }
21
- async getSourceApiVersion() {
22
- const projectConfig = await this.project.resolveProjectConfig();
23
- return getString(projectConfig, 'sourceApiVersion');
24
- }
25
- }
26
- //# sourceMappingURL=jayreeSfdxCommand.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"jayreeSfdxCommand.js","sourceRoot":"","sources":["../src/jayreeSfdxCommand.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,GAAG,EAAE,UAAU,EAAE,SAAS,EAAY,MAAM,sBAAsB,CAAC;AAE5E,MAAM,OAAgB,iBAAkB,SAAQ,WAAW;IAC/C,gBAAgB,CAAC,OAAiB,EAAE,EAAU;QACtD,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,EAAE;YACjD,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,oDAAoD,EAAE,EAAE,CAAC,CAAC;SACxE;IACH,CAAC;IAES,OAAO,CAAI,QAAgB,EAAE,UAAoB;QACzD,OAAO,GAAG,CAAC,IAAI,CAAC,KAAK,EAAE,QAAQ,EAAE,UAAU,CAAM,CAAC;IACpD,CAAC;IAES,YAAY;QACpB,OAAO,UAAU,CAAC,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;IAC/C,CAAC;IAES,KAAK,CAAC,mBAAmB;QACjC,MAAM,aAAa,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,oBAAoB,EAAE,CAAC;QAChE,OAAO,SAAS,CAAC,aAAa,EAAE,kBAAkB,CAAC,CAAC;IACtD,CAAC;CACF"}
@@ -1,57 +0,0 @@
1
- import { ComponentSet, VirtualTreeContainer, SourceComponent, NodeFSTreeContainer as FSTreeContainer } from '@salesforce/source-deploy-retrieve';
2
- import Debug from 'debug';
3
- import git from 'isomorphic-git';
4
- export declare const debug: Debug.Debugger;
5
- type gitResults = {
6
- manifest: ComponentSet;
7
- output: {
8
- unchanged: string[];
9
- ignored: {
10
- ref1: string[];
11
- ref2: string[];
12
- };
13
- counts: {
14
- added: number;
15
- deleted: number;
16
- modified: number;
17
- unchanged: number;
18
- ignored: number;
19
- error: number;
20
- };
21
- errors: string[];
22
- };
23
- };
24
- type git = {
25
- ref1: string;
26
- ref2: string;
27
- refString: string;
28
- };
29
- export type gitLines = Array<{
30
- path: string;
31
- status: string;
32
- }>;
33
- export declare function resolveRef(refOrig: string, dir: string): Promise<string>;
34
- export declare function getGitArgsFromArgv(ref1: string, ref2: string, argv: string[], dir: string): Promise<git>;
35
- export declare function ensureOSPath(path: string): string;
36
- export declare function ensureGitRelPath(dir: string, path: string): string;
37
- export declare function createVirtualTreeContainer(ref: string, dir: string, modifiedFiles: string[]): Promise<VirtualTreeContainer>;
38
- export declare function analyzeFile(path: string, ref1VirtualTreeContainer: VirtualTreeContainer, ref2VirtualTreeContainer: VirtualTreeContainer | FSTreeContainer): Promise<{
39
- path: string;
40
- status: number;
41
- toManifest?: SourceComponent[];
42
- toDestructiveChanges?: SourceComponent[];
43
- }>;
44
- export declare function getUniqueIdentifier(component: SourceComponent): string;
45
- export declare function getFileStateChanges(commitHash1: string, commitHash2: string, dir: string): Promise<[
46
- {
47
- path: string;
48
- status: string;
49
- }
50
- ]>;
51
- export declare function getGitDiff(ref1: string, ref2: string, dir: string): Promise<{
52
- gitlines: gitLines;
53
- warnings: string[];
54
- }>;
55
- export declare function getGitResults(gitLines: gitLines, ref1VirtualTreeContainer: VirtualTreeContainer, ref2VirtualTreeContainer: VirtualTreeContainer | FSTreeContainer, destructiveChangesOnly: boolean, fsPaths: string[]): Promise<gitResults>;
56
- export declare function fixComponentSetChilds(cs: ComponentSet): ComponentSet;
57
- export {};