rflib-plugin 0.18.0 → 0.19.3

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.
Files changed (33) hide show
  1. package/README.md +116 -0
  2. package/lib/commands/rflib/debug/applicationevents/get.d.ts +17 -0
  3. package/lib/commands/rflib/debug/applicationevents/get.js +63 -0
  4. package/lib/commands/rflib/debug/applicationevents/get.js.map +1 -0
  5. package/lib/commands/rflib/debug/logarchives/get.d.ts +14 -0
  6. package/lib/commands/rflib/debug/logarchives/get.js +43 -0
  7. package/lib/commands/rflib/debug/logarchives/get.js.map +1 -0
  8. package/lib/commands/rflib/debug/loggersettings/get.d.ts +12 -0
  9. package/lib/commands/rflib/debug/loggersettings/get.js +30 -0
  10. package/lib/commands/rflib/debug/loggersettings/get.js.map +1 -0
  11. package/lib/commands/rflib/debug/loggersettings/update.d.ts +16 -0
  12. package/lib/commands/rflib/debug/loggersettings/update.js +57 -0
  13. package/lib/commands/rflib/debug/loggersettings/update.js.map +1 -0
  14. package/lib/commands/rflib/debug/userpermissions/get.d.ts +14 -0
  15. package/lib/commands/rflib/debug/userpermissions/get.js +52 -0
  16. package/lib/commands/rflib/debug/userpermissions/get.js.map +1 -0
  17. package/lib/shared/loggerSettingsRules.d.ts +29 -0
  18. package/lib/shared/loggerSettingsRules.js +157 -0
  19. package/lib/shared/loggerSettingsRules.js.map +1 -0
  20. package/lib/shared/orgClient.d.ts +78 -0
  21. package/lib/shared/orgClient.js +272 -0
  22. package/lib/shared/orgClient.js.map +1 -0
  23. package/lib/shared/permissionAggregator.d.ts +8 -0
  24. package/lib/shared/permissionAggregator.js +143 -0
  25. package/lib/shared/permissionAggregator.js.map +1 -0
  26. package/messages/rflib.debug.applicationevents.get.md +74 -0
  27. package/messages/rflib.debug.logarchives.get.md +45 -0
  28. package/messages/rflib.debug.loggersettings.get.md +27 -0
  29. package/messages/rflib.debug.loggersettings.update.md +63 -0
  30. package/messages/rflib.debug.userpermissions.get.md +63 -0
  31. package/oclif.lock +518 -1315
  32. package/oclif.manifest.json +620 -73
  33. package/package.json +23 -6
@@ -1,11 +1,13 @@
1
1
  {
2
2
  "commands": {
3
- "rflib:logging:aura:instrument": {
3
+ "rflib:debug:applicationevents:get": {
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": "Retrieves rflib_Application_Event__c records from the target org via the Salesforce REST API.\nApplication Events are business-level events used to track feature adoption, user actions, and domain-specific milestones.\nResults are ordered by Occurred_On__c descending (most recent first).\n\nRequires the RFLIB base package to be installed in the target org and the running user to be assigned the rflib_Ops_Center_Access permission set (or have equivalent read access to rflib_Application_Event__c).\nFor installation instructions, visit: https://github.com/j-fischer/rflib",
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
+ "Get all application events from the default org:\n$ sf rflib debug applicationevents get --target-org myOrg",
9
+ "Get events filtered by name and date range:\n$ sf rflib debug applicationevents get --target-org myOrg --event-name \"order-%\" --start-date 2024-01-01T00:00:00Z",
10
+ "Get events related to a specific record with a custom limit:\n$ sf rflib debug applicationevents get --target-org myOrg --related-record-id 0017000000XXXXXX --record-limit 50"
9
11
  ],
10
12
  "flags": {
11
13
  "json": {
@@ -23,118 +25,526 @@
23
25
  "multiple": false,
24
26
  "type": "option"
25
27
  },
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",
28
+ "target-org": {
29
+ "char": "o",
30
+ "description": "The username or alias of the Salesforce org containing the RFLIB base package.",
31
+ "name": "target-org",
32
+ "noCacheDefault": true,
30
33
  "required": true,
31
- "summary": "Directory containing Aura components to instrument with logging.",
34
+ "summary": "Username or alias of the target org.",
35
+ "hasDynamicHelp": true,
36
+ "multiple": false,
37
+ "type": "option"
38
+ },
39
+ "event-name": {
40
+ "char": "e",
41
+ "description": "Filter Application Events by their Event_Name__c field. Use the % character as a wildcard for partial matches, for example \"order-%\".",
42
+ "name": "event-name",
43
+ "summary": "Filter by event name. Use % as a wildcard.",
32
44
  "hasDynamicHelp": false,
33
45
  "multiple": false,
34
46
  "type": "option"
35
47
  },
36
- "dryrun": {
48
+ "start-date": {
49
+ "char": "s",
50
+ "description": "Only return events where Occurred_On__c is on or after this date. Must be in ISO 8601 format, e.g. 2024-01-01T00:00:00Z.",
51
+ "name": "start-date",
52
+ "summary": "Filter events on or after this ISO 8601 date.",
53
+ "hasDynamicHelp": false,
54
+ "multiple": false,
55
+ "type": "option"
56
+ },
57
+ "end-date": {
37
58
  "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"
59
+ "description": "Only return events where Occurred_On__c is on or before this date. Must be in ISO 8601 format, e.g. 2024-12-31T23:59:59Z.",
60
+ "name": "end-date",
61
+ "summary": "Filter events on or before this ISO 8601 date.",
62
+ "hasDynamicHelp": false,
63
+ "multiple": false,
64
+ "type": "option"
43
65
  },
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.",
66
+ "related-record-id": {
67
+ "char": "r",
68
+ "description": "Only return events associated with this specific record ID.",
69
+ "name": "related-record-id",
70
+ "summary": "Filter by Related_Record_ID__c (exact match).",
71
+ "hasDynamicHelp": false,
72
+ "multiple": false,
73
+ "type": "option"
74
+ },
75
+ "record-limit": {
76
+ "char": "l",
77
+ "description": "Controls how many Application Event records are returned. Defaults to 200. Maximum allowed value is 2000.",
78
+ "name": "record-limit",
79
+ "summary": "Maximum number of records to return (default 200, max 2000).",
80
+ "hasDynamicHelp": false,
81
+ "multiple": false,
82
+ "type": "option"
83
+ }
84
+ },
85
+ "hasDynamicHelp": true,
86
+ "hiddenAliases": [],
87
+ "id": "rflib:debug:applicationevents:get",
88
+ "pluginAlias": "rflib-plugin",
89
+ "pluginName": "rflib-plugin",
90
+ "pluginType": "core",
91
+ "strict": true,
92
+ "summary": "Query RFLIB Application Events from a Salesforce org.",
93
+ "enableJsonFlag": true,
94
+ "isESM": true,
95
+ "relativePath": [
96
+ "lib",
97
+ "commands",
98
+ "rflib",
99
+ "debug",
100
+ "applicationevents",
101
+ "get.js"
102
+ ],
103
+ "aliasPermutations": [],
104
+ "permutations": [
105
+ "rflib:debug:applicationevents:get",
106
+ "debug:rflib:applicationevents:get",
107
+ "debug:applicationevents:rflib:get",
108
+ "debug:applicationevents:get:rflib",
109
+ "rflib:applicationevents:debug:get",
110
+ "applicationevents:rflib:debug:get",
111
+ "applicationevents:debug:rflib:get",
112
+ "applicationevents:debug:get:rflib",
113
+ "rflib:applicationevents:get:debug",
114
+ "applicationevents:rflib:get:debug",
115
+ "applicationevents:get:rflib:debug",
116
+ "applicationevents:get:debug:rflib",
117
+ "rflib:debug:get:applicationevents",
118
+ "debug:rflib:get:applicationevents",
119
+ "debug:get:rflib:applicationevents",
120
+ "debug:get:applicationevents:rflib",
121
+ "rflib:get:debug:applicationevents",
122
+ "get:rflib:debug:applicationevents",
123
+ "get:debug:rflib:applicationevents",
124
+ "get:debug:applicationevents:rflib",
125
+ "rflib:get:applicationevents:debug",
126
+ "get:rflib:applicationevents:debug",
127
+ "get:applicationevents:rflib:debug",
128
+ "get:applicationevents:debug:rflib"
129
+ ]
130
+ },
131
+ "rflib:debug:logarchives:get": {
132
+ "aliases": [],
133
+ "args": {},
134
+ "description": "Retrieves rflib_Logs_Archive__b records from the target org's big object store via the Salesforce REST API.\nEach log record contains log level, context, request ID, and full log messages in the format: [timestamp]|[LEVEL]|[TRACE_ID]|[CONTEXT]|[MESSAGE].\n\nRequires the RFLIB base package to be installed in the target org and the running user to be assigned the rflib_Ops_Center_Access permission set (or have equivalent read access to rflib_Logs_Archive__b).\nFor installation instructions, visit: https://github.com/j-fischer/rflib",
135
+ "examples": [
136
+ "Get log archives from the last 24 hours:\n$ sf rflib debug logarchives get --target-org myOrg",
137
+ "Get log archives for a specific date range:\n$ sf rflib debug logarchives get --target-org myOrg --start-date 2024-01-01T00:00:00Z --end-date 2024-01-02T00:00:00Z"
138
+ ],
139
+ "flags": {
140
+ "json": {
141
+ "description": "Format output as json.",
142
+ "helpGroup": "GLOBAL",
143
+ "name": "json",
49
144
  "allowNo": false,
50
145
  "type": "boolean"
51
146
  },
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.",
147
+ "flags-dir": {
148
+ "helpGroup": "GLOBAL",
149
+ "name": "flags-dir",
150
+ "summary": "Import flag values from a directory.",
151
+ "hasDynamicHelp": false,
152
+ "multiple": false,
153
+ "type": "option"
154
+ },
155
+ "target-org": {
156
+ "char": "o",
157
+ "description": "The username or alias of the Salesforce org containing the RFLIB base package.",
158
+ "name": "target-org",
159
+ "noCacheDefault": true,
160
+ "required": true,
161
+ "summary": "Username or alias of the target org.",
162
+ "hasDynamicHelp": true,
163
+ "multiple": false,
164
+ "type": "option"
165
+ },
166
+ "start-date": {
167
+ "char": "s",
168
+ "description": "Only return log archives created on or after this date. Must be in ISO 8601 format, e.g. 2024-01-01T00:00:00Z. Defaults to 24 hours ago if omitted.",
169
+ "name": "start-date",
170
+ "summary": "Start of the date range in ISO 8601 format. Defaults to 24 hours ago.",
171
+ "hasDynamicHelp": false,
172
+ "multiple": false,
173
+ "type": "option"
174
+ },
175
+ "end-date": {
176
+ "char": "d",
177
+ "description": "Only return log archives created on or before this date. Must be in ISO 8601 format, e.g. 2024-12-31T23:59:59Z. Defaults to the current time if omitted.",
178
+ "name": "end-date",
179
+ "summary": "End of the date range in ISO 8601 format. Defaults to now.",
180
+ "hasDynamicHelp": false,
181
+ "multiple": false,
182
+ "type": "option"
183
+ }
184
+ },
185
+ "hasDynamicHelp": true,
186
+ "hiddenAliases": [],
187
+ "id": "rflib:debug:logarchives:get",
188
+ "pluginAlias": "rflib-plugin",
189
+ "pluginName": "rflib-plugin",
190
+ "pluginType": "core",
191
+ "strict": true,
192
+ "summary": "Query RFLIB log archives from a Salesforce org.",
193
+ "enableJsonFlag": true,
194
+ "isESM": true,
195
+ "relativePath": [
196
+ "lib",
197
+ "commands",
198
+ "rflib",
199
+ "debug",
200
+ "logarchives",
201
+ "get.js"
202
+ ],
203
+ "aliasPermutations": [],
204
+ "permutations": [
205
+ "rflib:debug:logarchives:get",
206
+ "debug:rflib:logarchives:get",
207
+ "debug:logarchives:rflib:get",
208
+ "debug:logarchives:get:rflib",
209
+ "rflib:logarchives:debug:get",
210
+ "logarchives:rflib:debug:get",
211
+ "logarchives:debug:rflib:get",
212
+ "logarchives:debug:get:rflib",
213
+ "rflib:logarchives:get:debug",
214
+ "logarchives:rflib:get:debug",
215
+ "logarchives:get:rflib:debug",
216
+ "logarchives:get:debug:rflib",
217
+ "rflib:debug:get:logarchives",
218
+ "debug:rflib:get:logarchives",
219
+ "debug:get:rflib:logarchives",
220
+ "debug:get:logarchives:rflib",
221
+ "rflib:get:debug:logarchives",
222
+ "get:rflib:debug:logarchives",
223
+ "get:debug:rflib:logarchives",
224
+ "get:debug:logarchives:rflib",
225
+ "rflib:get:logarchives:debug",
226
+ "get:rflib:logarchives:debug",
227
+ "get:logarchives:rflib:debug",
228
+ "get:logarchives:debug:rflib"
229
+ ]
230
+ },
231
+ "rflib:debug:loggersettings:get": {
232
+ "aliases": [],
233
+ "args": {},
234
+ "description": "Retrieves all rflib_Logger_Settings__c hierarchy custom setting records from the target org via the Salesforce REST API.\nReturns settings across org-wide defaults, profile overrides, and user overrides, along with embedded best-practice recommendations.\n\nUse \"sf rflib debug loggersettings update\" to apply changes.\n\nRequires the RFLIB base package to be installed in the target org and the running user to be assigned the rflib_Ops_Center_Access permission set (or have equivalent read access to rflib_Logger_Settings__c).\nFor installation instructions, visit: https://github.com/j-fischer/rflib",
235
+ "examples": [
236
+ "Read all logger settings from the target org:\n$ sf rflib debug loggersettings get --target-org myOrg"
237
+ ],
238
+ "flags": {
239
+ "json": {
240
+ "description": "Format output as json.",
241
+ "helpGroup": "GLOBAL",
242
+ "name": "json",
56
243
  "allowNo": false,
57
244
  "type": "boolean"
58
245
  },
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.",
246
+ "flags-dir": {
247
+ "helpGroup": "GLOBAL",
248
+ "name": "flags-dir",
249
+ "summary": "Import flag values from a directory.",
250
+ "hasDynamicHelp": false,
251
+ "multiple": false,
252
+ "type": "option"
253
+ },
254
+ "target-org": {
255
+ "char": "o",
256
+ "description": "The username or alias of the Salesforce org containing the RFLIB base package.",
257
+ "name": "target-org",
258
+ "noCacheDefault": true,
259
+ "required": true,
260
+ "summary": "Username or alias of the target org.",
261
+ "hasDynamicHelp": true,
262
+ "multiple": false,
263
+ "type": "option"
264
+ }
265
+ },
266
+ "hasDynamicHelp": true,
267
+ "hiddenAliases": [],
268
+ "id": "rflib:debug:loggersettings:get",
269
+ "pluginAlias": "rflib-plugin",
270
+ "pluginName": "rflib-plugin",
271
+ "pluginType": "core",
272
+ "strict": true,
273
+ "summary": "Read all RFLIB Logger Settings from a Salesforce org.",
274
+ "enableJsonFlag": true,
275
+ "isESM": true,
276
+ "relativePath": [
277
+ "lib",
278
+ "commands",
279
+ "rflib",
280
+ "debug",
281
+ "loggersettings",
282
+ "get.js"
283
+ ],
284
+ "aliasPermutations": [],
285
+ "permutations": [
286
+ "rflib:debug:loggersettings:get",
287
+ "debug:rflib:loggersettings:get",
288
+ "debug:loggersettings:rflib:get",
289
+ "debug:loggersettings:get:rflib",
290
+ "rflib:loggersettings:debug:get",
291
+ "loggersettings:rflib:debug:get",
292
+ "loggersettings:debug:rflib:get",
293
+ "loggersettings:debug:get:rflib",
294
+ "rflib:loggersettings:get:debug",
295
+ "loggersettings:rflib:get:debug",
296
+ "loggersettings:get:rflib:debug",
297
+ "loggersettings:get:debug:rflib",
298
+ "rflib:debug:get:loggersettings",
299
+ "debug:rflib:get:loggersettings",
300
+ "debug:get:rflib:loggersettings",
301
+ "debug:get:loggersettings:rflib",
302
+ "rflib:get:debug:loggersettings",
303
+ "get:rflib:debug:loggersettings",
304
+ "get:debug:rflib:loggersettings",
305
+ "get:debug:loggersettings:rflib",
306
+ "rflib:get:loggersettings:debug",
307
+ "get:rflib:loggersettings:debug",
308
+ "get:loggersettings:rflib:debug",
309
+ "get:loggersettings:debug:rflib"
310
+ ]
311
+ },
312
+ "rflib:debug:loggersettings:update": {
313
+ "aliases": [],
314
+ "args": {},
315
+ "description": "Creates or updates a single field on an rflib_Logger_Settings__c record in the target org via the Salesforce REST API.\nValidates field values and warns about best-practice violations.\n\nTo update an existing record, provide --record-id. To create a new record, provide --setup-owner-id with an org ID (00D...), profile ID (00E...), or user ID.\n\nRequires the RFLIB base package to be installed in the target org and the running user to be assigned the rflib_Ops_Center_Access permission set (or have equivalent update access to rflib_Logger_Settings__c).\nFor installation instructions, visit: https://github.com/j-fischer/rflib",
316
+ "examples": [
317
+ "Update the Log_Event_Reporting_Level__c field on an existing record:\n$ sf rflib debug loggersettings update --target-org myOrg --record-id a0A000000001234 --field-name Log_Event_Reporting_Level__c --field-value WARN",
318
+ "Create a new org-wide Logger Setting:\n$ sf rflib debug loggersettings update --target-org myOrg --setup-owner-id 00D000000000001 --field-name Log_Event_Reporting_Level__c --field-value WARN"
319
+ ],
320
+ "flags": {
321
+ "json": {
322
+ "description": "Format output as json.",
323
+ "helpGroup": "GLOBAL",
324
+ "name": "json",
63
325
  "allowNo": false,
64
326
  "type": "boolean"
65
327
  },
66
- "verbose": {
328
+ "flags-dir": {
329
+ "helpGroup": "GLOBAL",
330
+ "name": "flags-dir",
331
+ "summary": "Import flag values from a directory.",
332
+ "hasDynamicHelp": false,
333
+ "multiple": false,
334
+ "type": "option"
335
+ },
336
+ "target-org": {
337
+ "char": "o",
338
+ "description": "The username or alias of the Salesforce org containing the RFLIB base package.",
339
+ "name": "target-org",
340
+ "noCacheDefault": true,
341
+ "required": true,
342
+ "summary": "Username or alias of the target org.",
343
+ "hasDynamicHelp": true,
344
+ "multiple": false,
345
+ "type": "option"
346
+ },
347
+ "field-name": {
348
+ "char": "f",
349
+ "description": "The API name of the field to create or update, e.g. Log_Event_Reporting_Level__c. For log level fields, valid values are: TRACE, DEBUG, INFO, WARN, ERROR, FATAL, NONE.",
350
+ "name": "field-name",
351
+ "required": true,
352
+ "summary": "API name of the rflib_Logger_Settings__c field to update.",
353
+ "hasDynamicHelp": false,
354
+ "multiple": false,
355
+ "type": "option"
356
+ },
357
+ "field-value": {
67
358
  "char": "v",
68
- "description": "When provided with --dryrun, prints the paths of the files that would be modified.",
69
- "name": "verbose",
70
- "summary": "Enable verbose output.",
359
+ "description": "The new value to set on the specified field. For log level fields, valid values are: TRACE, DEBUG, INFO, WARN, ERROR, FATAL, NONE.",
360
+ "name": "field-value",
361
+ "required": true,
362
+ "summary": "New value for the specified field.",
363
+ "hasDynamicHelp": false,
364
+ "multiple": false,
365
+ "type": "option"
366
+ },
367
+ "record-id": {
368
+ "char": "r",
369
+ "description": "The Salesforce record ID of an existing rflib_Logger_Settings__c record to update. Omit this flag to create a new record (requires --setup-owner-id).",
370
+ "name": "record-id",
371
+ "summary": "ID of an existing rflib_Logger_Settings__c record to update.",
372
+ "hasDynamicHelp": false,
373
+ "multiple": false,
374
+ "type": "option"
375
+ },
376
+ "setup-owner-id": {
377
+ "char": "s",
378
+ "description": "Required when creating a new Logger Setting record. Accepts an org ID (00D...), profile ID (00E...), or user ID. Read existing record IDs using \"sf rflib debug loggersettings get\".",
379
+ "name": "setup-owner-id",
380
+ "summary": "Setup owner ID for creating a new Logger Setting record.",
381
+ "hasDynamicHelp": false,
382
+ "multiple": false,
383
+ "type": "option"
384
+ }
385
+ },
386
+ "hasDynamicHelp": true,
387
+ "hiddenAliases": [],
388
+ "id": "rflib:debug:loggersettings:update",
389
+ "pluginAlias": "rflib-plugin",
390
+ "pluginName": "rflib-plugin",
391
+ "pluginType": "core",
392
+ "strict": true,
393
+ "summary": "Create or update an RFLIB Logger Setting in a Salesforce org.",
394
+ "enableJsonFlag": true,
395
+ "isESM": true,
396
+ "relativePath": [
397
+ "lib",
398
+ "commands",
399
+ "rflib",
400
+ "debug",
401
+ "loggersettings",
402
+ "update.js"
403
+ ],
404
+ "aliasPermutations": [],
405
+ "permutations": [
406
+ "rflib:debug:loggersettings:update",
407
+ "debug:rflib:loggersettings:update",
408
+ "debug:loggersettings:rflib:update",
409
+ "debug:loggersettings:update:rflib",
410
+ "rflib:loggersettings:debug:update",
411
+ "loggersettings:rflib:debug:update",
412
+ "loggersettings:debug:rflib:update",
413
+ "loggersettings:debug:update:rflib",
414
+ "rflib:loggersettings:update:debug",
415
+ "loggersettings:rflib:update:debug",
416
+ "loggersettings:update:rflib:debug",
417
+ "loggersettings:update:debug:rflib",
418
+ "rflib:debug:update:loggersettings",
419
+ "debug:rflib:update:loggersettings",
420
+ "debug:update:rflib:loggersettings",
421
+ "debug:update:loggersettings:rflib",
422
+ "rflib:update:debug:loggersettings",
423
+ "update:rflib:debug:loggersettings",
424
+ "update:debug:rflib:loggersettings",
425
+ "update:debug:loggersettings:rflib",
426
+ "rflib:update:loggersettings:debug",
427
+ "update:rflib:loggersettings:debug",
428
+ "update:loggersettings:rflib:debug",
429
+ "update:loggersettings:debug:rflib"
430
+ ]
431
+ },
432
+ "rflib:debug:userpermissions:get": {
433
+ "aliases": [],
434
+ "args": {},
435
+ "description": "Retrieves FLS (Field-Level Security), OLS (Object-Level Security), and Apex class/page permissions for a specific user\nvia the Salesforce REST API. Permissions are aggregated across the user's profile, permission sets, and permission set groups.\n\nUse --sobject-type to narrow FLS or OLS results to a specific SObject.\n\nRequires the RFLIB base package to be installed in the target org and the running user to be assigned the rflib_Ops_Center_Access permission set (or have equivalent read access to the relevant permission objects).\nFor installation instructions, visit: https://github.com/j-fischer/rflib",
436
+ "examples": [
437
+ "Check all permissions for a user:\n$ sf rflib debug userpermissions get --target-org myOrg --user-id 0057000000XXXXXX --permission-type ALL",
438
+ "Check FLS for a specific object:\n$ sf rflib debug userpermissions get --target-org myOrg --user-id 0057000000XXXXXX --permission-type FLS --sobject-type Account",
439
+ "Check Apex access:\n$ sf rflib debug userpermissions get --target-org myOrg --user-id 0057000000XXXXXX --permission-type APEX"
440
+ ],
441
+ "flags": {
442
+ "json": {
443
+ "description": "Format output as json.",
444
+ "helpGroup": "GLOBAL",
445
+ "name": "json",
71
446
  "allowNo": false,
72
447
  "type": "boolean"
73
448
  },
74
- "exclude": {
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.",
77
- "name": "exclude",
78
- "summary": "Exclude files or directories from instrumentation based on a glob pattern.",
449
+ "flags-dir": {
450
+ "helpGroup": "GLOBAL",
451
+ "name": "flags-dir",
452
+ "summary": "Import flag values from a directory.",
79
453
  "hasDynamicHelp": false,
80
454
  "multiple": false,
81
455
  "type": "option"
82
456
  },
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,
457
+ "target-org": {
458
+ "char": "o",
459
+ "description": "The username or alias of the Salesforce org containing the RFLIB base package.",
460
+ "name": "target-org",
461
+ "noCacheDefault": true,
462
+ "required": true,
463
+ "summary": "Username or alias of the target org.",
464
+ "hasDynamicHelp": true,
465
+ "multiple": false,
466
+ "type": "option"
467
+ },
468
+ "user-id": {
469
+ "char": "u",
470
+ "description": "The Salesforce User ID (15 or 18 characters) of the user whose permissions should be retrieved.",
471
+ "name": "user-id",
472
+ "required": true,
473
+ "summary": "Salesforce User ID (15 or 18 character) to check permissions for.",
474
+ "hasDynamicHelp": false,
475
+ "multiple": false,
476
+ "type": "option"
477
+ },
478
+ "permission-type": {
479
+ "char": "t",
480
+ "description": "Controls which permission types are returned:\n - FLS: Field-Level Security only\n - OLS: Object-Level Security only\n - APEX: Apex class and page access only\n - ALL: All three permission types",
481
+ "name": "permission-type",
482
+ "required": true,
483
+ "summary": "Type of permissions to retrieve: FLS, OLS, APEX, or ALL.",
484
+ "hasDynamicHelp": false,
485
+ "multiple": false,
486
+ "options": [
487
+ "FLS",
488
+ "OLS",
489
+ "APEX",
490
+ "ALL"
491
+ ],
492
+ "type": "option"
493
+ },
494
+ "sobject-type": {
495
+ "char": "b",
496
+ "description": "Filters Field-Level Security or Object-Level Security results to a specific SObject type, e.g. Account, Contact, Opportunity.",
497
+ "name": "sobject-type",
498
+ "summary": "Optional SObject API name to filter FLS or OLS results.",
89
499
  "hasDynamicHelp": false,
90
500
  "multiple": false,
91
501
  "type": "option"
92
502
  }
93
503
  },
94
- "hasDynamicHelp": false,
504
+ "hasDynamicHelp": true,
95
505
  "hiddenAliases": [],
96
- "id": "rflib:logging:aura:instrument",
506
+ "id": "rflib:debug:userpermissions:get",
97
507
  "pluginAlias": "rflib-plugin",
98
508
  "pluginName": "rflib-plugin",
99
509
  "pluginType": "core",
100
510
  "strict": true,
101
- "summary": "Instrument Aura Components with RFLIB logging statements automatically.",
511
+ "summary": "Check Salesforce permissions for a user in the target org.",
102
512
  "enableJsonFlag": true,
103
513
  "isESM": true,
104
514
  "relativePath": [
105
515
  "lib",
106
516
  "commands",
107
517
  "rflib",
108
- "logging",
109
- "aura",
110
- "instrument.js"
518
+ "debug",
519
+ "userpermissions",
520
+ "get.js"
111
521
  ],
112
522
  "aliasPermutations": [],
113
523
  "permutations": [
114
- "rflib:logging:aura:instrument",
115
- "logging:rflib:aura:instrument",
116
- "logging:aura:rflib:instrument",
117
- "logging:aura:instrument:rflib",
118
- "rflib:aura:logging:instrument",
119
- "aura:rflib:logging:instrument",
120
- "aura:logging:rflib:instrument",
121
- "aura:logging:instrument:rflib",
122
- "rflib:aura:instrument:logging",
123
- "aura:rflib:instrument:logging",
124
- "aura:instrument:rflib:logging",
125
- "aura:instrument:logging:rflib",
126
- "rflib:logging:instrument:aura",
127
- "logging:rflib:instrument:aura",
128
- "logging:instrument:rflib:aura",
129
- "logging:instrument:aura:rflib",
130
- "rflib:instrument:logging:aura",
131
- "instrument:rflib:logging:aura",
132
- "instrument:logging:rflib:aura",
133
- "instrument:logging:aura:rflib",
134
- "rflib:instrument:aura:logging",
135
- "instrument:rflib:aura:logging",
136
- "instrument:aura:rflib:logging",
137
- "instrument:aura:logging:rflib"
524
+ "rflib:debug:userpermissions:get",
525
+ "debug:rflib:userpermissions:get",
526
+ "debug:userpermissions:rflib:get",
527
+ "debug:userpermissions:get:rflib",
528
+ "rflib:userpermissions:debug:get",
529
+ "userpermissions:rflib:debug:get",
530
+ "userpermissions:debug:rflib:get",
531
+ "userpermissions:debug:get:rflib",
532
+ "rflib:userpermissions:get:debug",
533
+ "userpermissions:rflib:get:debug",
534
+ "userpermissions:get:rflib:debug",
535
+ "userpermissions:get:debug:rflib",
536
+ "rflib:debug:get:userpermissions",
537
+ "debug:rflib:get:userpermissions",
538
+ "debug:get:rflib:userpermissions",
539
+ "debug:get:userpermissions:rflib",
540
+ "rflib:get:debug:userpermissions",
541
+ "get:rflib:debug:userpermissions",
542
+ "get:debug:rflib:userpermissions",
543
+ "get:debug:userpermissions:rflib",
544
+ "rflib:get:userpermissions:debug",
545
+ "get:rflib:userpermissions:debug",
546
+ "get:userpermissions:rflib:debug",
547
+ "get:userpermissions:debug:rflib"
138
548
  ]
139
549
  },
140
550
  "rflib:logging:apex:instrument": {
@@ -281,6 +691,143 @@
281
691
  "instrument:apex:logging:rflib"
282
692
  ]
283
693
  },
694
+ "rflib:logging:aura:instrument": {
695
+ "aliases": [],
696
+ "args": {},
697
+ "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",
698
+ "examples": [
699
+ "- 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"
700
+ ],
701
+ "flags": {
702
+ "json": {
703
+ "description": "Format output as json.",
704
+ "helpGroup": "GLOBAL",
705
+ "name": "json",
706
+ "allowNo": false,
707
+ "type": "boolean"
708
+ },
709
+ "flags-dir": {
710
+ "helpGroup": "GLOBAL",
711
+ "name": "flags-dir",
712
+ "summary": "Import flag values from a directory.",
713
+ "hasDynamicHelp": false,
714
+ "multiple": false,
715
+ "type": "option"
716
+ },
717
+ "sourcepath": {
718
+ "char": "s",
719
+ "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()",
720
+ "name": "sourcepath",
721
+ "required": true,
722
+ "summary": "Directory containing Aura components to instrument with logging.",
723
+ "hasDynamicHelp": false,
724
+ "multiple": false,
725
+ "type": "option"
726
+ },
727
+ "dryrun": {
728
+ "char": "d",
729
+ "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",
730
+ "name": "dryrun",
731
+ "summary": "Preview changes without modifying files.",
732
+ "allowNo": false,
733
+ "type": "boolean"
734
+ },
735
+ "prettier": {
736
+ "char": "p",
737
+ "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",
738
+ "name": "prettier",
739
+ "summary": "Format modified files using Prettier.",
740
+ "allowNo": false,
741
+ "type": "boolean"
742
+ },
743
+ "no-if": {
744
+ "description": "When provided, the command will not add log statements inside of `if` and `else` blocks.",
745
+ "name": "no-if",
746
+ "summary": "Exclude the instrumentation of if-else statements.",
747
+ "allowNo": false,
748
+ "type": "boolean"
749
+ },
750
+ "skip-instrumented": {
751
+ "description": "When provided, the command will not add log statements to any Aura component that contains the `` component.",
752
+ "name": "skip-instrumented",
753
+ "summary": "Skips any files where a logger is already present.",
754
+ "allowNo": false,
755
+ "type": "boolean"
756
+ },
757
+ "verbose": {
758
+ "char": "v",
759
+ "description": "When provided with --dryrun, prints the paths of the files that would be modified.",
760
+ "name": "verbose",
761
+ "summary": "Enable verbose output.",
762
+ "allowNo": false,
763
+ "type": "boolean"
764
+ },
765
+ "exclude": {
766
+ "char": "e",
767
+ "description": "Exclude specific files or directories that match the provided glob pattern. For example, use --exclude \"**/Generated_*.cmp\" to skip auto-generated components.",
768
+ "name": "exclude",
769
+ "summary": "Exclude files or directories from instrumentation based on a glob pattern.",
770
+ "hasDynamicHelp": false,
771
+ "multiple": false,
772
+ "type": "option"
773
+ },
774
+ "concurrency": {
775
+ "char": "c",
776
+ "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.",
777
+ "name": "concurrency",
778
+ "summary": "Limits the number of files processed concurrently.",
779
+ "default": 10,
780
+ "hasDynamicHelp": false,
781
+ "multiple": false,
782
+ "type": "option"
783
+ }
784
+ },
785
+ "hasDynamicHelp": false,
786
+ "hiddenAliases": [],
787
+ "id": "rflib:logging:aura:instrument",
788
+ "pluginAlias": "rflib-plugin",
789
+ "pluginName": "rflib-plugin",
790
+ "pluginType": "core",
791
+ "strict": true,
792
+ "summary": "Instrument Aura Components with RFLIB logging statements automatically.",
793
+ "enableJsonFlag": true,
794
+ "isESM": true,
795
+ "relativePath": [
796
+ "lib",
797
+ "commands",
798
+ "rflib",
799
+ "logging",
800
+ "aura",
801
+ "instrument.js"
802
+ ],
803
+ "aliasPermutations": [],
804
+ "permutations": [
805
+ "rflib:logging:aura:instrument",
806
+ "logging:rflib:aura:instrument",
807
+ "logging:aura:rflib:instrument",
808
+ "logging:aura:instrument:rflib",
809
+ "rflib:aura:logging:instrument",
810
+ "aura:rflib:logging:instrument",
811
+ "aura:logging:rflib:instrument",
812
+ "aura:logging:instrument:rflib",
813
+ "rflib:aura:instrument:logging",
814
+ "aura:rflib:instrument:logging",
815
+ "aura:instrument:rflib:logging",
816
+ "aura:instrument:logging:rflib",
817
+ "rflib:logging:instrument:aura",
818
+ "logging:rflib:instrument:aura",
819
+ "logging:instrument:rflib:aura",
820
+ "logging:instrument:aura:rflib",
821
+ "rflib:instrument:logging:aura",
822
+ "instrument:rflib:logging:aura",
823
+ "instrument:logging:rflib:aura",
824
+ "instrument:logging:aura:rflib",
825
+ "rflib:instrument:aura:logging",
826
+ "instrument:rflib:aura:logging",
827
+ "instrument:aura:rflib:logging",
828
+ "instrument:aura:logging:rflib"
829
+ ]
830
+ },
284
831
  "rflib:logging:flow:instrument": {
285
832
  "aliases": [],
286
833
  "args": {},
@@ -543,5 +1090,5 @@
543
1090
  ]
544
1091
  }
545
1092
  },
546
- "version": "0.18.0"
1093
+ "version": "0.19.3"
547
1094
  }