rflib-plugin 0.6.0 → 0.6.2

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,
@@ -66,12 +66,12 @@
66
66
  },
67
67
  "hasDynamicHelp": false,
68
68
  "hiddenAliases": [],
69
- "id": "rflib:logging:aura:instrument",
69
+ "id": "rflib:logging:apex:instrument",
70
70
  "pluginAlias": "rflib-plugin",
71
71
  "pluginName": "rflib-plugin",
72
72
  "pluginType": "core",
73
73
  "strict": true,
74
- "summary": "Instrument Aura Components with RFLIB logging statements automatically.",
74
+ "summary": "Instrument Apex classes with RFLIB logging statements automatically.",
75
75
  "enableJsonFlag": true,
76
76
  "isESM": true,
77
77
  "relativePath": [
@@ -79,43 +79,43 @@
79
79
  "commands",
80
80
  "rflib",
81
81
  "logging",
82
- "aura",
82
+ "apex",
83
83
  "instrument.js"
84
84
  ],
85
85
  "aliasPermutations": [],
86
86
  "permutations": [
87
- "rflib:logging:aura:instrument",
88
- "logging:rflib:aura:instrument",
89
- "logging:aura:rflib:instrument",
90
- "logging:aura:instrument:rflib",
91
- "rflib:aura:logging:instrument",
92
- "aura:rflib:logging:instrument",
93
- "aura:logging:rflib:instrument",
94
- "aura:logging:instrument:rflib",
95
- "rflib:aura:instrument:logging",
96
- "aura:rflib:instrument:logging",
97
- "aura:instrument:rflib:logging",
98
- "aura:instrument:logging:rflib",
99
- "rflib:logging:instrument:aura",
100
- "logging:rflib:instrument:aura",
101
- "logging:instrument:rflib:aura",
102
- "logging:instrument:aura:rflib",
103
- "rflib:instrument:logging:aura",
104
- "instrument:rflib:logging:aura",
105
- "instrument:logging:rflib:aura",
106
- "instrument:logging:aura:rflib",
107
- "rflib:instrument:aura:logging",
108
- "instrument:rflib:aura:logging",
109
- "instrument:aura:rflib:logging",
110
- "instrument:aura:logging:rflib"
87
+ "rflib:logging:apex:instrument",
88
+ "logging:rflib:apex:instrument",
89
+ "logging:apex:rflib:instrument",
90
+ "logging:apex:instrument:rflib",
91
+ "rflib:apex:logging:instrument",
92
+ "apex:rflib:logging:instrument",
93
+ "apex:logging:rflib:instrument",
94
+ "apex:logging:instrument:rflib",
95
+ "rflib:apex:instrument:logging",
96
+ "apex:rflib:instrument:logging",
97
+ "apex:instrument:rflib:logging",
98
+ "apex:instrument:logging:rflib",
99
+ "rflib:logging:instrument:apex",
100
+ "logging:rflib:instrument:apex",
101
+ "logging:instrument:rflib:apex",
102
+ "logging:instrument:apex:rflib",
103
+ "rflib:instrument:logging:apex",
104
+ "instrument:rflib:logging:apex",
105
+ "instrument:logging:rflib:apex",
106
+ "instrument:logging:apex:rflib",
107
+ "rflib:instrument:apex:logging",
108
+ "instrument:rflib:apex:logging",
109
+ "instrument:apex:rflib:logging",
110
+ "instrument:apex:logging:rflib"
111
111
  ]
112
112
  },
113
- "rflib:logging:apex:instrument": {
113
+ "rflib:logging:aura:instrument": {
114
114
  "aliases": [],
115
115
  "args": {},
116
- "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.",
116
+ "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",
117
117
  "examples": [
118
- "- 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"
118
+ "- 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"
119
119
  ],
120
120
  "flags": {
121
121
  "json": {
@@ -135,17 +135,17 @@
135
135
  },
136
136
  "sourcepath": {
137
137
  "char": "s",
138
- "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.",
138
+ "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()",
139
139
  "name": "sourcepath",
140
140
  "required": true,
141
- "summary": "Directory containing Apex classes to instrument with logging.",
141
+ "summary": "Directory containing Aura components to instrument with logging.",
142
142
  "hasDynamicHelp": false,
143
143
  "multiple": false,
144
144
  "type": "option"
145
145
  },
146
146
  "dryrun": {
147
147
  "char": "d",
148
- "description": "When enabled, shows which files would be modified without making actual changes. Useful for reviewing the impact before applying changes.",
148
+ "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",
149
149
  "name": "dryrun",
150
150
  "summary": "Preview changes without modifying files.",
151
151
  "allowNo": false,
@@ -153,7 +153,7 @@
153
153
  },
154
154
  "prettier": {
155
155
  "char": "p",
156
- "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",
156
+ "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",
157
157
  "name": "prettier",
158
158
  "summary": "Format modified files using Prettier.",
159
159
  "allowNo": false,
@@ -167,7 +167,7 @@
167
167
  "type": "boolean"
168
168
  },
169
169
  "skip-instrumented": {
170
- "description": "When provided, the command will not add log statements to any Apex class that contains the `rflib_Logger` reference.",
170
+ "description": "When provided, the command will not add log statements to any Aura component that contains the `` component.",
171
171
  "name": "skip-instrumented",
172
172
  "summary": "Skips any files where a logger is already present.",
173
173
  "allowNo": false,
@@ -176,12 +176,12 @@
176
176
  },
177
177
  "hasDynamicHelp": false,
178
178
  "hiddenAliases": [],
179
- "id": "rflib:logging:apex:instrument",
179
+ "id": "rflib:logging:aura:instrument",
180
180
  "pluginAlias": "rflib-plugin",
181
181
  "pluginName": "rflib-plugin",
182
182
  "pluginType": "core",
183
183
  "strict": true,
184
- "summary": "Instrument Apex classes with RFLIB logging statements automatically.",
184
+ "summary": "Instrument Aura Components with RFLIB logging statements automatically.",
185
185
  "enableJsonFlag": true,
186
186
  "isESM": true,
187
187
  "relativePath": [
@@ -189,35 +189,35 @@
189
189
  "commands",
190
190
  "rflib",
191
191
  "logging",
192
- "apex",
192
+ "aura",
193
193
  "instrument.js"
194
194
  ],
195
195
  "aliasPermutations": [],
196
196
  "permutations": [
197
- "rflib:logging:apex:instrument",
198
- "logging:rflib:apex:instrument",
199
- "logging:apex:rflib:instrument",
200
- "logging:apex:instrument:rflib",
201
- "rflib:apex:logging:instrument",
202
- "apex:rflib:logging:instrument",
203
- "apex:logging:rflib:instrument",
204
- "apex:logging:instrument:rflib",
205
- "rflib:apex:instrument:logging",
206
- "apex:rflib:instrument:logging",
207
- "apex:instrument:rflib:logging",
208
- "apex:instrument:logging:rflib",
209
- "rflib:logging:instrument:apex",
210
- "logging:rflib:instrument:apex",
211
- "logging:instrument:rflib:apex",
212
- "logging:instrument:apex:rflib",
213
- "rflib:instrument:logging:apex",
214
- "instrument:rflib:logging:apex",
215
- "instrument:logging:rflib:apex",
216
- "instrument:logging:apex:rflib",
217
- "rflib:instrument:apex:logging",
218
- "instrument:rflib:apex:logging",
219
- "instrument:apex:rflib:logging",
220
- "instrument:apex:logging:rflib"
197
+ "rflib:logging:aura:instrument",
198
+ "logging:rflib:aura:instrument",
199
+ "logging:aura:rflib:instrument",
200
+ "logging:aura:instrument:rflib",
201
+ "rflib:aura:logging:instrument",
202
+ "aura:rflib:logging:instrument",
203
+ "aura:logging:rflib:instrument",
204
+ "aura:logging:instrument:rflib",
205
+ "rflib:aura:instrument:logging",
206
+ "aura:rflib:instrument:logging",
207
+ "aura:instrument:rflib:logging",
208
+ "aura:instrument:logging:rflib",
209
+ "rflib:logging:instrument:aura",
210
+ "logging:rflib:instrument:aura",
211
+ "logging:instrument:rflib:aura",
212
+ "logging:instrument:aura:rflib",
213
+ "rflib:instrument:logging:aura",
214
+ "instrument:rflib:logging:aura",
215
+ "instrument:logging:rflib:aura",
216
+ "instrument:logging:aura:rflib",
217
+ "rflib:instrument:aura:logging",
218
+ "instrument:rflib:aura:logging",
219
+ "instrument:aura:rflib:logging",
220
+ "instrument:aura:logging:rflib"
221
221
  ]
222
222
  },
223
223
  "rflib:logging:lwc:instrument": {
@@ -331,5 +331,5 @@
331
331
  ]
332
332
  }
333
333
  },
334
- "version": "0.6.0"
334
+ "version": "0.6.2"
335
335
  }
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.6.0",
4
+ "version": "0.6.2",
5
5
  "dependencies": {
6
6
  "@oclif/core": "^4",
7
7
  "@salesforce/core": "^8",
@@ -12,13 +12,13 @@
12
12
  "devDependencies": {
13
13
  "@commitlint/cli": "^19.6.1",
14
14
  "@istanbuljs/nyc-config-typescript": "^1.0.2",
15
- "@oclif/plugin-command-snapshot": "^5.2.28",
15
+ "@oclif/plugin-command-snapshot": "^5.2.35",
16
16
  "@salesforce/cli-plugins-testkit": "^5.3.10",
17
17
  "@salesforce/dev-scripts": "^10.2.11",
18
18
  "c8": "^10.1.3",
19
19
  "eslint-plugin-sf-plugin": "^1.20.14",
20
20
  "husky": "^8.0.0",
21
- "oclif": "^4.17.17",
21
+ "oclif": "^4.17.27",
22
22
  "source-map-support": "^0.5.21",
23
23
  "ts-node": "^10.9.2",
24
24
  "tsconfig-paths": "^4.2.0",