rflib-plugin 0.6.4 → 0.7.1

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,5 +1,115 @@
1
1
  {
2
2
  "commands": {
3
+ "rflib:logging:apex:instrument": {
4
+ "aliases": [],
5
+ "args": {},
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
+ "examples": [
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
+ ],
10
+ "flags": {
11
+ "json": {
12
+ "description": "Format output as json.",
13
+ "helpGroup": "GLOBAL",
14
+ "name": "json",
15
+ "allowNo": false,
16
+ "type": "boolean"
17
+ },
18
+ "flags-dir": {
19
+ "helpGroup": "GLOBAL",
20
+ "name": "flags-dir",
21
+ "summary": "Import flag values from a directory.",
22
+ "hasDynamicHelp": false,
23
+ "multiple": false,
24
+ "type": "option"
25
+ },
26
+ "sourcepath": {
27
+ "char": "s",
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
+ "name": "sourcepath",
30
+ "required": true,
31
+ "summary": "Directory containing Apex classes to instrument with logging.",
32
+ "hasDynamicHelp": false,
33
+ "multiple": false,
34
+ "type": "option"
35
+ },
36
+ "dryrun": {
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.",
39
+ "name": "dryrun",
40
+ "summary": "Preview changes without modifying files.",
41
+ "allowNo": false,
42
+ "type": "boolean"
43
+ },
44
+ "prettier": {
45
+ "char": "p",
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
+ "name": "prettier",
48
+ "summary": "Format modified files using Prettier.",
49
+ "allowNo": false,
50
+ "type": "boolean"
51
+ },
52
+ "no-if": {
53
+ "description": "When provided, the command will not add log statements inside of `if` and `else` blocks.",
54
+ "name": "no-if",
55
+ "summary": "Exclude the instrumentation of if-else statements.",
56
+ "allowNo": false,
57
+ "type": "boolean"
58
+ },
59
+ "skip-instrumented": {
60
+ "description": "When provided, the command will not add log statements to any Apex class that contains the `rflib_Logger` reference.",
61
+ "name": "skip-instrumented",
62
+ "summary": "Skips any files where a logger is already present.",
63
+ "allowNo": false,
64
+ "type": "boolean"
65
+ }
66
+ },
67
+ "hasDynamicHelp": false,
68
+ "hiddenAliases": [],
69
+ "id": "rflib:logging:apex:instrument",
70
+ "pluginAlias": "rflib-plugin",
71
+ "pluginName": "rflib-plugin",
72
+ "pluginType": "core",
73
+ "strict": true,
74
+ "summary": "Instrument Apex classes with RFLIB logging statements automatically.",
75
+ "enableJsonFlag": true,
76
+ "isESM": true,
77
+ "relativePath": [
78
+ "lib",
79
+ "commands",
80
+ "rflib",
81
+ "logging",
82
+ "apex",
83
+ "instrument.js"
84
+ ],
85
+ "aliasPermutations": [],
86
+ "permutations": [
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
+ ]
112
+ },
3
113
  "rflib:logging:aura:instrument": {
4
114
  "aliases": [],
5
115
  "args": {},
@@ -110,12 +220,12 @@
110
220
  "instrument:aura:logging:rflib"
111
221
  ]
112
222
  },
113
- "rflib:logging:apex:instrument": {
223
+ "rflib:logging:flow:instrument": {
114
224
  "aliases": [],
115
225
  "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.",
226
+ "description": "More information about a command. Don't repeat the summary.",
117
227
  "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"
228
+ "<%= config.bin %> <%= command.id %>"
119
229
  ],
120
230
  "flags": {
121
231
  "json": {
@@ -151,23 +261,8 @@
151
261
  "allowNo": false,
152
262
  "type": "boolean"
153
263
  },
154
- "prettier": {
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",
157
- "name": "prettier",
158
- "summary": "Format modified files using Prettier.",
159
- "allowNo": false,
160
- "type": "boolean"
161
- },
162
- "no-if": {
163
- "description": "When provided, the command will not add log statements inside of `if` and `else` blocks.",
164
- "name": "no-if",
165
- "summary": "Exclude the instrumentation of if-else statements.",
166
- "allowNo": false,
167
- "type": "boolean"
168
- },
169
264
  "skip-instrumented": {
170
- "description": "When provided, the command will not add log statements to any Apex class that contains the `rflib_Logger` reference.",
265
+ "description": "When provided, the command will not add log statements to any Flows that already contains a RFLIB logging node.",
171
266
  "name": "skip-instrumented",
172
267
  "summary": "Skips any files where a logger is already present.",
173
268
  "allowNo": false,
@@ -176,12 +271,12 @@
176
271
  },
177
272
  "hasDynamicHelp": false,
178
273
  "hiddenAliases": [],
179
- "id": "rflib:logging:apex:instrument",
274
+ "id": "rflib:logging:flow:instrument",
180
275
  "pluginAlias": "rflib-plugin",
181
276
  "pluginName": "rflib-plugin",
182
277
  "pluginType": "core",
183
278
  "strict": true,
184
- "summary": "Instrument Apex classes with RFLIB logging statements automatically.",
279
+ "summary": "Summary of a command.",
185
280
  "enableJsonFlag": true,
186
281
  "isESM": true,
187
282
  "relativePath": [
@@ -189,35 +284,35 @@
189
284
  "commands",
190
285
  "rflib",
191
286
  "logging",
192
- "apex",
287
+ "flow",
193
288
  "instrument.js"
194
289
  ],
195
290
  "aliasPermutations": [],
196
291
  "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"
292
+ "rflib:logging:flow:instrument",
293
+ "logging:rflib:flow:instrument",
294
+ "logging:flow:rflib:instrument",
295
+ "logging:flow:instrument:rflib",
296
+ "rflib:flow:logging:instrument",
297
+ "flow:rflib:logging:instrument",
298
+ "flow:logging:rflib:instrument",
299
+ "flow:logging:instrument:rflib",
300
+ "rflib:flow:instrument:logging",
301
+ "flow:rflib:instrument:logging",
302
+ "flow:instrument:rflib:logging",
303
+ "flow:instrument:logging:rflib",
304
+ "rflib:logging:instrument:flow",
305
+ "logging:rflib:instrument:flow",
306
+ "logging:instrument:rflib:flow",
307
+ "logging:instrument:flow:rflib",
308
+ "rflib:instrument:logging:flow",
309
+ "instrument:rflib:logging:flow",
310
+ "instrument:logging:rflib:flow",
311
+ "instrument:logging:flow:rflib",
312
+ "rflib:instrument:flow:logging",
313
+ "instrument:rflib:flow:logging",
314
+ "instrument:flow:rflib:logging",
315
+ "instrument:flow:logging:rflib"
221
316
  ]
222
317
  },
223
318
  "rflib:logging:lwc:instrument": {
@@ -331,5 +426,5 @@
331
426
  ]
332
427
  }
333
428
  },
334
- "version": "0.6.4"
429
+ "version": "0.7.1"
335
430
  }
package/package.json CHANGED
@@ -1,24 +1,26 @@
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.4",
4
+ "version": "0.7.1",
5
5
  "dependencies": {
6
6
  "@oclif/core": "^4",
7
7
  "@salesforce/core": "^8",
8
8
  "@salesforce/sf-plugins-core": "^12",
9
- "prettier": "^3.4.2",
10
- "prettier-plugin-apex": "^2.2.4"
9
+ "@types/xml2js": "^0.4.14",
10
+ "prettier": "^3.5.3",
11
+ "prettier-plugin-apex": "^2.2.4",
12
+ "xml2js": "^0.6.2"
11
13
  },
12
14
  "devDependencies": {
13
15
  "@commitlint/cli": "^19.8.0",
14
16
  "@istanbuljs/nyc-config-typescript": "^1.0.2",
15
- "@oclif/plugin-command-snapshot": "^5.2.35",
17
+ "@oclif/plugin-command-snapshot": "^5.2.38",
16
18
  "@salesforce/cli-plugins-testkit": "^5.3.10",
17
19
  "@salesforce/dev-scripts": "^10.2.11",
18
20
  "c8": "^10.1.3",
19
21
  "eslint-plugin-sf-plugin": "^1.20.16",
20
22
  "husky": "^8.0.0",
21
- "oclif": "^4.17.34",
23
+ "oclif": "^4.17.42",
22
24
  "source-map-support": "^0.5.21",
23
25
  "ts-node": "^10.9.2",
24
26
  "tsconfig-paths": "^4.2.0",
@@ -65,6 +67,9 @@
65
67
  },
66
68
  "aura": {
67
69
  "description": "Commands related to Aura logging"
70
+ },
71
+ "flow": {
72
+ "description": "description for rflib.logging.flow"
68
73
  }
69
74
  }
70
75
  }