rflib-plugin 0.6.3 → 0.7.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.
- package/lib/commands/rflib/logging/flow/instrument.d.ts +32 -0
- package/lib/commands/rflib/logging/flow/instrument.js +296 -0
- package/lib/commands/rflib/logging/flow/instrument.js.map +1 -0
- package/messages/rflib.logging.flow.instrument.md +36 -0
- package/oclif.lock +436 -425
- package/oclif.manifest.json +145 -50
- package/package.json +10 -5
package/oclif.manifest.json
CHANGED
|
@@ -1,5 +1,115 @@
|
|
|
1
1
|
{
|
|
2
2
|
"commands": {
|
|
3
|
+
"rflib:logging:aura:instrument": {
|
|
4
|
+
"aliases": [],
|
|
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",
|
|
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"
|
|
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 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()",
|
|
29
|
+
"name": "sourcepath",
|
|
30
|
+
"required": true,
|
|
31
|
+
"summary": "Directory containing Aura components 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. Shows:\n- Files that would be modified\n- Number of processed files\n- Number of modified files\n- Number of formatted files",
|
|
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 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",
|
|
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 Aura component that contains the `` component.",
|
|
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:aura:instrument",
|
|
70
|
+
"pluginAlias": "rflib-plugin",
|
|
71
|
+
"pluginName": "rflib-plugin",
|
|
72
|
+
"pluginType": "core",
|
|
73
|
+
"strict": true,
|
|
74
|
+
"summary": "Instrument Aura Components with RFLIB logging statements automatically.",
|
|
75
|
+
"enableJsonFlag": true,
|
|
76
|
+
"isESM": true,
|
|
77
|
+
"relativePath": [
|
|
78
|
+
"lib",
|
|
79
|
+
"commands",
|
|
80
|
+
"rflib",
|
|
81
|
+
"logging",
|
|
82
|
+
"aura",
|
|
83
|
+
"instrument.js"
|
|
84
|
+
],
|
|
85
|
+
"aliasPermutations": [],
|
|
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"
|
|
111
|
+
]
|
|
112
|
+
},
|
|
3
113
|
"rflib:logging:apex:instrument": {
|
|
4
114
|
"aliases": [],
|
|
5
115
|
"args": {},
|
|
@@ -110,12 +220,12 @@
|
|
|
110
220
|
"instrument:apex:logging:rflib"
|
|
111
221
|
]
|
|
112
222
|
},
|
|
113
|
-
"rflib:logging:
|
|
223
|
+
"rflib:logging:flow:instrument": {
|
|
114
224
|
"aliases": [],
|
|
115
225
|
"args": {},
|
|
116
|
-
"description": "
|
|
226
|
+
"description": "More information about a command. Don't repeat the summary.",
|
|
117
227
|
"examples": [
|
|
118
|
-
"
|
|
228
|
+
"<%= config.bin %> <%= command.id %>"
|
|
119
229
|
],
|
|
120
230
|
"flags": {
|
|
121
231
|
"json": {
|
|
@@ -135,39 +245,24 @@
|
|
|
135
245
|
},
|
|
136
246
|
"sourcepath": {
|
|
137
247
|
"char": "s",
|
|
138
|
-
"description": "Path to the source directory containing
|
|
248
|
+
"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.",
|
|
139
249
|
"name": "sourcepath",
|
|
140
250
|
"required": true,
|
|
141
|
-
"summary": "Directory containing
|
|
251
|
+
"summary": "Directory containing Apex classes to instrument with logging.",
|
|
142
252
|
"hasDynamicHelp": false,
|
|
143
253
|
"multiple": false,
|
|
144
254
|
"type": "option"
|
|
145
255
|
},
|
|
146
256
|
"dryrun": {
|
|
147
257
|
"char": "d",
|
|
148
|
-
"description": "When enabled, shows which files would be modified without making actual changes. Useful for reviewing the impact before applying changes.
|
|
258
|
+
"description": "When enabled, shows which files would be modified without making actual changes. Useful for reviewing the impact before applying changes.",
|
|
149
259
|
"name": "dryrun",
|
|
150
260
|
"summary": "Preview changes without modifying files.",
|
|
151
261
|
"allowNo": false,
|
|
152
262
|
"type": "boolean"
|
|
153
263
|
},
|
|
154
|
-
"prettier": {
|
|
155
|
-
"char": "p",
|
|
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
|
-
"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
|
|
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:
|
|
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": "
|
|
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
|
-
"
|
|
287
|
+
"flow",
|
|
193
288
|
"instrument.js"
|
|
194
289
|
],
|
|
195
290
|
"aliasPermutations": [],
|
|
196
291
|
"permutations": [
|
|
197
|
-
"rflib:logging:
|
|
198
|
-
"logging:rflib:
|
|
199
|
-
"logging:
|
|
200
|
-
"logging:
|
|
201
|
-
"rflib:
|
|
202
|
-
"
|
|
203
|
-
"
|
|
204
|
-
"
|
|
205
|
-
"rflib:
|
|
206
|
-
"
|
|
207
|
-
"
|
|
208
|
-
"
|
|
209
|
-
"rflib:logging:instrument:
|
|
210
|
-
"logging:rflib:instrument:
|
|
211
|
-
"logging:instrument:rflib:
|
|
212
|
-
"logging:instrument:
|
|
213
|
-
"rflib:instrument:logging:
|
|
214
|
-
"instrument:rflib:logging:
|
|
215
|
-
"instrument:logging:rflib:
|
|
216
|
-
"instrument:logging:
|
|
217
|
-
"rflib:instrument:
|
|
218
|
-
"instrument:rflib:
|
|
219
|
-
"instrument:
|
|
220
|
-
"instrument:
|
|
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.
|
|
429
|
+
"version": "0.7.0"
|
|
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.
|
|
4
|
+
"version": "0.7.0",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@oclif/core": "^4",
|
|
7
7
|
"@salesforce/core": "^8",
|
|
8
8
|
"@salesforce/sf-plugins-core": "^12",
|
|
9
|
+
"@types/xml2js": "^0.4.14",
|
|
9
10
|
"prettier": "^3.4.2",
|
|
10
|
-
"prettier-plugin-apex": "^2.2.4"
|
|
11
|
+
"prettier-plugin-apex": "^2.2.4",
|
|
12
|
+
"xml2js": "^0.6.2"
|
|
11
13
|
},
|
|
12
14
|
"devDependencies": {
|
|
13
|
-
"@commitlint/cli": "^19.
|
|
15
|
+
"@commitlint/cli": "^19.8.0",
|
|
14
16
|
"@istanbuljs/nyc-config-typescript": "^1.0.2",
|
|
15
17
|
"@oclif/plugin-command-snapshot": "^5.2.35",
|
|
16
18
|
"@salesforce/cli-plugins-testkit": "^5.3.10",
|
|
17
19
|
"@salesforce/dev-scripts": "^10.2.11",
|
|
18
20
|
"c8": "^10.1.3",
|
|
19
|
-
"eslint-plugin-sf-plugin": "^1.20.
|
|
21
|
+
"eslint-plugin-sf-plugin": "^1.20.16",
|
|
20
22
|
"husky": "^8.0.0",
|
|
21
|
-
"oclif": "^4.17.
|
|
23
|
+
"oclif": "^4.17.34",
|
|
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
|
}
|