rflib-plugin 0.15.0 → 0.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "commands": {
3
- "rflib:logging:aura:instrument": {
3
+ "rflib:logging:apex:instrument": {
4
4
  "aliases": [],
5
5
  "args": {},
6
- "description": "Analyzes Aura Component files and adds RFLIB logging statements for:\n- Method entry logging with parameter values in Controller, Helper, and Renderer files\n- Error logging in try-catch blocks\n- Error logging in Promise catch handlers\n- Adds rflibLoggerCmp component if not present\n- Replaces console.log and similar method invocations\n- Formats modified files using Prettier (optional)\n\nThe command processes:\n- Component (.cmp) files to add the logger component\n- Controller (.js) files for method instrumentation\n- Helper (.js) files for method instrumentation\n- Renderer (.js) files for method instrumentation",
6
+ "description": "Analyzes Apex classes and adds RFLIB logging statements for method entry and error handling. Adds class-level logger initialization if not already present. \nFor Apex Test classes, the `@TestSetup` method will be updated to include `rflib_TestUtil.prepareLoggerForUnitTests();` to avoid test failures caused by the logging framework.",
7
7
  "examples": [
8
- "- Add logging to all aura files:\n$ sf rflib logging aura instrument --sourcepath force-app\n\n- Preview changes:\n$ sf rflib logging aura instrument --sourcepath force-app --dryrun\n\n- Add logging and format code:\n$ sf rflib logging aura instrument --sourcepath force-app --prettier\n\n- Process specific component:\n$ sf rflib logging aura instrument --sourcepath force-app/main/default/aura/myComponent"
8
+ "- Add logging statements to all Apex classes in a directory:\n\n$ sf rflib logging apex instrument --sourcepath force-app/main/default/classes\n\n- Preview changes without modifying files:\n\n$ sf rflib logging apex instrument --sourcepath force-app/main/default/classes --dryrun\n\n- Add logging statements and format code:\n\n$ sf rflib logging apex instrument --sourcepath force-app/main/default/classes --prettier"
9
9
  ],
10
10
  "flags": {
11
11
  "json": {
@@ -25,17 +25,17 @@
25
25
  },
26
26
  "sourcepath": {
27
27
  "char": "s",
28
- "description": "Path to the source directory containing Aura components that should be instrumented with RFLIB logging statements. The command will:\n- Scan for 'aura' directories recursively\n- Process all Aura components found\n- Add <c:rflibLoggerCmp> to component files\n- Add logging statements to JavaScript files\n- Initialize logger in methods using component.find()",
28
+ "description": "Path to the source directory containing Apex classes that should be instrumented with RFLIB logging statements. Test classes (ending with 'Test.cls') are automatically excluded.",
29
29
  "name": "sourcepath",
30
30
  "required": true,
31
- "summary": "Directory containing Aura components to instrument with logging.",
31
+ "summary": "Directory containing Apex classes to instrument with logging.",
32
32
  "hasDynamicHelp": false,
33
33
  "multiple": false,
34
34
  "type": "option"
35
35
  },
36
36
  "dryrun": {
37
37
  "char": "d",
38
- "description": "When enabled, shows which files would be modified without making actual changes. Useful for reviewing the impact before applying changes. Shows:\n- Files that would be modified\n- Number of processed files\n- Number of modified files\n- Number of formatted files",
38
+ "description": "When enabled, shows which files would be modified without making actual changes. Useful for reviewing the impact before applying changes.",
39
39
  "name": "dryrun",
40
40
  "summary": "Preview changes without modifying files.",
41
41
  "allowNo": false,
@@ -43,7 +43,7 @@
43
43
  },
44
44
  "prettier": {
45
45
  "char": "p",
46
- "description": "When enabled, formats the modified JavaScript files using Prettier after adding logging statements. Maintains consistent code style with:\n- 120 character line width\n- 4 space indentation\n- Single quotes for strings\n- No tabs\n- No trailing commas",
46
+ "description": "When enabled, formats the modified Apex files using prettier-plugin-apex after adding logging statements. Maintains consistent code style with:\n\n- 120 character line width\n- 4 space indentation\n- Single quotes for strings\n- No tabs",
47
47
  "name": "prettier",
48
48
  "summary": "Format modified files using Prettier.",
49
49
  "allowNo": false,
@@ -57,7 +57,7 @@
57
57
  "type": "boolean"
58
58
  },
59
59
  "skip-instrumented": {
60
- "description": "When provided, the command will not add log statements to any Aura component that contains the `` component.",
60
+ "description": "When provided, the command will not add log statements to any Apex class that contains the `rflib_Logger` reference.",
61
61
  "name": "skip-instrumented",
62
62
  "summary": "Skips any files where a logger is already present.",
63
63
  "allowNo": false,
@@ -73,22 +73,32 @@
73
73
  },
74
74
  "exclude": {
75
75
  "char": "e",
76
- "description": "Exclude specific files or directories that match the provided glob pattern. For example, use --exclude \"**/Generated_*.cmp\" to skip auto-generated components.",
76
+ "description": "Exclude specific files or directories that match the provided glob pattern. For example, use --exclude \"**/Generated_*.cls\" to skip auto-generated classes.",
77
77
  "name": "exclude",
78
78
  "summary": "Exclude files or directories from instrumentation based on a glob pattern.",
79
79
  "hasDynamicHelp": false,
80
80
  "multiple": false,
81
81
  "type": "option"
82
+ },
83
+ "concurrency": {
84
+ "char": "c",
85
+ "description": "Controls the maximum number of files to process at the same time. This is useful in very large codebases to prevent excessive memory usage or file descriptor exhaustion. Defaults to 10.",
86
+ "name": "concurrency",
87
+ "summary": "Limits the number of files processed concurrently.",
88
+ "default": 10,
89
+ "hasDynamicHelp": false,
90
+ "multiple": false,
91
+ "type": "option"
82
92
  }
83
93
  },
84
94
  "hasDynamicHelp": false,
85
95
  "hiddenAliases": [],
86
- "id": "rflib:logging:aura:instrument",
96
+ "id": "rflib:logging:apex:instrument",
87
97
  "pluginAlias": "rflib-plugin",
88
98
  "pluginName": "rflib-plugin",
89
99
  "pluginType": "core",
90
100
  "strict": true,
91
- "summary": "Instrument Aura Components with RFLIB logging statements automatically.",
101
+ "summary": "Instrument Apex classes with RFLIB logging statements automatically.",
92
102
  "enableJsonFlag": true,
93
103
  "isESM": true,
94
104
  "relativePath": [
@@ -96,43 +106,43 @@
96
106
  "commands",
97
107
  "rflib",
98
108
  "logging",
99
- "aura",
109
+ "apex",
100
110
  "instrument.js"
101
111
  ],
102
112
  "aliasPermutations": [],
103
113
  "permutations": [
104
- "rflib:logging:aura:instrument",
105
- "logging:rflib:aura:instrument",
106
- "logging:aura:rflib:instrument",
107
- "logging:aura:instrument:rflib",
108
- "rflib:aura:logging:instrument",
109
- "aura:rflib:logging:instrument",
110
- "aura:logging:rflib:instrument",
111
- "aura:logging:instrument:rflib",
112
- "rflib:aura:instrument:logging",
113
- "aura:rflib:instrument:logging",
114
- "aura:instrument:rflib:logging",
115
- "aura:instrument:logging:rflib",
116
- "rflib:logging:instrument:aura",
117
- "logging:rflib:instrument:aura",
118
- "logging:instrument:rflib:aura",
119
- "logging:instrument:aura:rflib",
120
- "rflib:instrument:logging:aura",
121
- "instrument:rflib:logging:aura",
122
- "instrument:logging:rflib:aura",
123
- "instrument:logging:aura:rflib",
124
- "rflib:instrument:aura:logging",
125
- "instrument:rflib:aura:logging",
126
- "instrument:aura:rflib:logging",
127
- "instrument:aura:logging:rflib"
114
+ "rflib:logging:apex:instrument",
115
+ "logging:rflib:apex:instrument",
116
+ "logging:apex:rflib:instrument",
117
+ "logging:apex:instrument:rflib",
118
+ "rflib:apex:logging:instrument",
119
+ "apex:rflib:logging:instrument",
120
+ "apex:logging:rflib:instrument",
121
+ "apex:logging:instrument:rflib",
122
+ "rflib:apex:instrument:logging",
123
+ "apex:rflib:instrument:logging",
124
+ "apex:instrument:rflib:logging",
125
+ "apex:instrument:logging:rflib",
126
+ "rflib:logging:instrument:apex",
127
+ "logging:rflib:instrument:apex",
128
+ "logging:instrument:rflib:apex",
129
+ "logging:instrument:apex:rflib",
130
+ "rflib:instrument:logging:apex",
131
+ "instrument:rflib:logging:apex",
132
+ "instrument:logging:rflib:apex",
133
+ "instrument:logging:apex:rflib",
134
+ "rflib:instrument:apex:logging",
135
+ "instrument:rflib:apex:logging",
136
+ "instrument:apex:rflib:logging",
137
+ "instrument:apex:logging:rflib"
128
138
  ]
129
139
  },
130
- "rflib:logging:apex:instrument": {
140
+ "rflib:logging:aura:instrument": {
131
141
  "aliases": [],
132
142
  "args": {},
133
- "description": "Analyzes Apex classes and adds RFLIB logging statements for method entry and error handling. Adds class-level logger initialization if not already present. \nFor Apex Test classes, the `@TestSetup` method will be updated to include `rflib_TestUtil.prepareLoggerForUnitTests();` to avoid test failures caused by the logging framework.",
143
+ "description": "Analyzes Aura Component files and adds RFLIB logging statements for:\n- Method entry logging with parameter values in Controller, Helper, and Renderer files\n- Error logging in try-catch blocks\n- Error logging in Promise catch handlers\n- Adds rflibLoggerCmp component if not present\n- Replaces console.log and similar method invocations\n- Formats modified files using Prettier (optional)\n\nThe command processes:\n- Component (.cmp) files to add the logger component\n- Controller (.js) files for method instrumentation\n- Helper (.js) files for method instrumentation\n- Renderer (.js) files for method instrumentation",
134
144
  "examples": [
135
- "- Add logging statements to all Apex classes in a directory:\n\n$ sf rflib logging apex instrument --sourcepath force-app/main/default/classes\n\n- Preview changes without modifying files:\n\n$ sf rflib logging apex instrument --sourcepath force-app/main/default/classes --dryrun\n\n- Add logging statements and format code:\n\n$ sf rflib logging apex instrument --sourcepath force-app/main/default/classes --prettier"
145
+ "- Add logging to all aura files:\n$ sf rflib logging aura instrument --sourcepath force-app\n\n- Preview changes:\n$ sf rflib logging aura instrument --sourcepath force-app --dryrun\n\n- Add logging and format code:\n$ sf rflib logging aura instrument --sourcepath force-app --prettier\n\n- Process specific component:\n$ sf rflib logging aura instrument --sourcepath force-app/main/default/aura/myComponent"
136
146
  ],
137
147
  "flags": {
138
148
  "json": {
@@ -152,17 +162,17 @@
152
162
  },
153
163
  "sourcepath": {
154
164
  "char": "s",
155
- "description": "Path to the source directory containing Apex classes that should be instrumented with RFLIB logging statements. Test classes (ending with 'Test.cls') are automatically excluded.",
165
+ "description": "Path to the source directory containing Aura components that should be instrumented with RFLIB logging statements. The command will:\n- Scan for 'aura' directories recursively\n- Process all Aura components found\n- Add <c:rflibLoggerCmp> to component files\n- Add logging statements to JavaScript files\n- Initialize logger in methods using component.find()",
156
166
  "name": "sourcepath",
157
167
  "required": true,
158
- "summary": "Directory containing Apex classes to instrument with logging.",
168
+ "summary": "Directory containing Aura components to instrument with logging.",
159
169
  "hasDynamicHelp": false,
160
170
  "multiple": false,
161
171
  "type": "option"
162
172
  },
163
173
  "dryrun": {
164
174
  "char": "d",
165
- "description": "When enabled, shows which files would be modified without making actual changes. Useful for reviewing the impact before applying changes.",
175
+ "description": "When enabled, shows which files would be modified without making actual changes. Useful for reviewing the impact before applying changes. Shows:\n- Files that would be modified\n- Number of processed files\n- Number of modified files\n- Number of formatted files",
166
176
  "name": "dryrun",
167
177
  "summary": "Preview changes without modifying files.",
168
178
  "allowNo": false,
@@ -170,7 +180,7 @@
170
180
  },
171
181
  "prettier": {
172
182
  "char": "p",
173
- "description": "When enabled, formats the modified Apex files using prettier-plugin-apex after adding logging statements. Maintains consistent code style with:\n\n- 120 character line width\n- 4 space indentation\n- Single quotes for strings\n- No tabs",
183
+ "description": "When enabled, formats the modified JavaScript files using Prettier after adding logging statements. Maintains consistent code style with:\n- 120 character line width\n- 4 space indentation\n- Single quotes for strings\n- No tabs\n- No trailing commas",
174
184
  "name": "prettier",
175
185
  "summary": "Format modified files using Prettier.",
176
186
  "allowNo": false,
@@ -184,7 +194,7 @@
184
194
  "type": "boolean"
185
195
  },
186
196
  "skip-instrumented": {
187
- "description": "When provided, the command will not add log statements to any Apex class that contains the `rflib_Logger` reference.",
197
+ "description": "When provided, the command will not add log statements to any Aura component that contains the `` component.",
188
198
  "name": "skip-instrumented",
189
199
  "summary": "Skips any files where a logger is already present.",
190
200
  "allowNo": false,
@@ -200,22 +210,32 @@
200
210
  },
201
211
  "exclude": {
202
212
  "char": "e",
203
- "description": "Exclude specific files or directories that match the provided glob pattern. For example, use --exclude \"**/Generated_*.cls\" to skip auto-generated classes.",
213
+ "description": "Exclude specific files or directories that match the provided glob pattern. For example, use --exclude \"**/Generated_*.cmp\" to skip auto-generated components.",
204
214
  "name": "exclude",
205
215
  "summary": "Exclude files or directories from instrumentation based on a glob pattern.",
206
216
  "hasDynamicHelp": false,
207
217
  "multiple": false,
208
218
  "type": "option"
219
+ },
220
+ "concurrency": {
221
+ "char": "c",
222
+ "description": "Controls the maximum number of files to process at the same time. This is useful in very large codebases to prevent excessive memory usage or file descriptor exhaustion. Defaults to 10.",
223
+ "name": "concurrency",
224
+ "summary": "Limits the number of files processed concurrently.",
225
+ "default": 10,
226
+ "hasDynamicHelp": false,
227
+ "multiple": false,
228
+ "type": "option"
209
229
  }
210
230
  },
211
231
  "hasDynamicHelp": false,
212
232
  "hiddenAliases": [],
213
- "id": "rflib:logging:apex:instrument",
233
+ "id": "rflib:logging:aura:instrument",
214
234
  "pluginAlias": "rflib-plugin",
215
235
  "pluginName": "rflib-plugin",
216
236
  "pluginType": "core",
217
237
  "strict": true,
218
- "summary": "Instrument Apex classes with RFLIB logging statements automatically.",
238
+ "summary": "Instrument Aura Components with RFLIB logging statements automatically.",
219
239
  "enableJsonFlag": true,
220
240
  "isESM": true,
221
241
  "relativePath": [
@@ -223,35 +243,35 @@
223
243
  "commands",
224
244
  "rflib",
225
245
  "logging",
226
- "apex",
246
+ "aura",
227
247
  "instrument.js"
228
248
  ],
229
249
  "aliasPermutations": [],
230
250
  "permutations": [
231
- "rflib:logging:apex:instrument",
232
- "logging:rflib:apex:instrument",
233
- "logging:apex:rflib:instrument",
234
- "logging:apex:instrument:rflib",
235
- "rflib:apex:logging:instrument",
236
- "apex:rflib:logging:instrument",
237
- "apex:logging:rflib:instrument",
238
- "apex:logging:instrument:rflib",
239
- "rflib:apex:instrument:logging",
240
- "apex:rflib:instrument:logging",
241
- "apex:instrument:rflib:logging",
242
- "apex:instrument:logging:rflib",
243
- "rflib:logging:instrument:apex",
244
- "logging:rflib:instrument:apex",
245
- "logging:instrument:rflib:apex",
246
- "logging:instrument:apex:rflib",
247
- "rflib:instrument:logging:apex",
248
- "instrument:rflib:logging:apex",
249
- "instrument:logging:rflib:apex",
250
- "instrument:logging:apex:rflib",
251
- "rflib:instrument:apex:logging",
252
- "instrument:rflib:apex:logging",
253
- "instrument:apex:rflib:logging",
254
- "instrument:apex:logging:rflib"
251
+ "rflib:logging:aura:instrument",
252
+ "logging:rflib:aura:instrument",
253
+ "logging:aura:rflib:instrument",
254
+ "logging:aura:instrument:rflib",
255
+ "rflib:aura:logging:instrument",
256
+ "aura:rflib:logging:instrument",
257
+ "aura:logging:rflib:instrument",
258
+ "aura:logging:instrument:rflib",
259
+ "rflib:aura:instrument:logging",
260
+ "aura:rflib:instrument:logging",
261
+ "aura:instrument:rflib:logging",
262
+ "aura:instrument:logging:rflib",
263
+ "rflib:logging:instrument:aura",
264
+ "logging:rflib:instrument:aura",
265
+ "logging:instrument:rflib:aura",
266
+ "logging:instrument:aura:rflib",
267
+ "rflib:instrument:logging:aura",
268
+ "instrument:rflib:logging:aura",
269
+ "instrument:logging:rflib:aura",
270
+ "instrument:logging:aura:rflib",
271
+ "rflib:instrument:aura:logging",
272
+ "instrument:rflib:aura:logging",
273
+ "instrument:aura:rflib:logging",
274
+ "instrument:aura:logging:rflib"
255
275
  ]
256
276
  },
257
277
  "rflib:logging:flow:instrument": {
@@ -320,6 +340,16 @@
320
340
  "hasDynamicHelp": false,
321
341
  "multiple": false,
322
342
  "type": "option"
343
+ },
344
+ "concurrency": {
345
+ "char": "c",
346
+ "description": "Controls the maximum number of files to process at the same time. This is useful in very large codebases to prevent excessive memory usage or file descriptor exhaustion. Defaults to 10.",
347
+ "name": "concurrency",
348
+ "summary": "Limits the number of files processed concurrently.",
349
+ "default": 10,
350
+ "hasDynamicHelp": false,
351
+ "multiple": false,
352
+ "type": "option"
323
353
  }
324
354
  },
325
355
  "hasDynamicHelp": false,
@@ -447,6 +477,16 @@
447
477
  "hasDynamicHelp": false,
448
478
  "multiple": false,
449
479
  "type": "option"
480
+ },
481
+ "concurrency": {
482
+ "char": "c",
483
+ "description": "Controls the maximum number of files to process at the same time. This is useful in very large codebases to prevent excessive memory usage or file descriptor exhaustion. Defaults to 10.",
484
+ "name": "concurrency",
485
+ "summary": "Limits the number of files processed concurrently.",
486
+ "default": 10,
487
+ "hasDynamicHelp": false,
488
+ "multiple": false,
489
+ "type": "option"
450
490
  }
451
491
  },
452
492
  "hasDynamicHelp": false,
@@ -496,5 +536,5 @@
496
536
  ]
497
537
  }
498
538
  },
499
- "version": "0.15.0"
539
+ "version": "0.16.0"
500
540
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "rflib-plugin",
3
3
  "description": "Utility commands to help with the adoption of the RFLIB open-source library for Salesforce.",
4
- "version": "0.15.0",
4
+ "version": "0.16.0",
5
5
  "dependencies": {
6
6
  "@oclif/core": "^4.8.0",
7
7
  "@salesforce/core": "^8.26.2",