rflib-plugin 0.23.2 → 0.23.4
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/oclif.manifest.json +80 -80
- package/package.json +1 -1
package/oclif.manifest.json
CHANGED
|
@@ -1209,12 +1209,12 @@
|
|
|
1209
1209
|
"whohas:userpermissions:debug:rflib"
|
|
1210
1210
|
]
|
|
1211
1211
|
},
|
|
1212
|
-
"rflib:logging:
|
|
1212
|
+
"rflib:logging:apex:instrument": {
|
|
1213
1213
|
"aliases": [],
|
|
1214
1214
|
"args": {},
|
|
1215
|
-
"description": "Analyzes
|
|
1215
|
+
"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.",
|
|
1216
1216
|
"examples": [
|
|
1217
|
-
"- Add logging to all
|
|
1217
|
+
"- 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"
|
|
1218
1218
|
],
|
|
1219
1219
|
"flags": {
|
|
1220
1220
|
"json": {
|
|
@@ -1234,17 +1234,17 @@
|
|
|
1234
1234
|
},
|
|
1235
1235
|
"sourcepath": {
|
|
1236
1236
|
"char": "s",
|
|
1237
|
-
"description": "Path to the source directory containing
|
|
1237
|
+
"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.",
|
|
1238
1238
|
"name": "sourcepath",
|
|
1239
1239
|
"required": true,
|
|
1240
|
-
"summary": "Directory containing
|
|
1240
|
+
"summary": "Directory containing Apex classes to instrument with logging.",
|
|
1241
1241
|
"hasDynamicHelp": false,
|
|
1242
1242
|
"multiple": false,
|
|
1243
1243
|
"type": "option"
|
|
1244
1244
|
},
|
|
1245
1245
|
"dryrun": {
|
|
1246
1246
|
"char": "d",
|
|
1247
|
-
"description": "When enabled, shows which files would be modified without making actual changes. Useful for reviewing the impact before applying changes.
|
|
1247
|
+
"description": "When enabled, shows which files would be modified without making actual changes. Useful for reviewing the impact before applying changes.",
|
|
1248
1248
|
"name": "dryrun",
|
|
1249
1249
|
"summary": "Preview changes without modifying files.",
|
|
1250
1250
|
"allowNo": false,
|
|
@@ -1252,7 +1252,7 @@
|
|
|
1252
1252
|
},
|
|
1253
1253
|
"prettier": {
|
|
1254
1254
|
"char": "p",
|
|
1255
|
-
"description": "When enabled, formats the modified
|
|
1255
|
+
"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",
|
|
1256
1256
|
"name": "prettier",
|
|
1257
1257
|
"summary": "Format modified files using Prettier.",
|
|
1258
1258
|
"allowNo": false,
|
|
@@ -1265,8 +1265,15 @@
|
|
|
1265
1265
|
"allowNo": false,
|
|
1266
1266
|
"type": "boolean"
|
|
1267
1267
|
},
|
|
1268
|
+
"no-catch": {
|
|
1269
|
+
"description": "When provided, the command will not add error log statements inside of `catch` blocks.",
|
|
1270
|
+
"name": "no-catch",
|
|
1271
|
+
"summary": "Exclude the instrumentation of catch blocks.",
|
|
1272
|
+
"allowNo": false,
|
|
1273
|
+
"type": "boolean"
|
|
1274
|
+
},
|
|
1268
1275
|
"skip-instrumented": {
|
|
1269
|
-
"description": "When provided, the command will not add log statements to any
|
|
1276
|
+
"description": "When provided, the command will not add log statements to any Apex class that contains the `rflib_Logger` reference.",
|
|
1270
1277
|
"name": "skip-instrumented",
|
|
1271
1278
|
"summary": "Skips any files where a logger is already present.",
|
|
1272
1279
|
"allowNo": false,
|
|
@@ -1282,7 +1289,7 @@
|
|
|
1282
1289
|
},
|
|
1283
1290
|
"exclude": {
|
|
1284
1291
|
"char": "e",
|
|
1285
|
-
"description": "Exclude specific files or directories that match the provided glob pattern. For example, use --exclude \"**/Generated_*.
|
|
1292
|
+
"description": "Exclude specific files or directories that match the provided glob pattern. For example, use --exclude \"**/Generated_*.cls\" to skip auto-generated classes.",
|
|
1286
1293
|
"name": "exclude",
|
|
1287
1294
|
"summary": "Exclude files or directories from instrumentation based on a glob pattern.",
|
|
1288
1295
|
"hasDynamicHelp": false,
|
|
@@ -1302,12 +1309,12 @@
|
|
|
1302
1309
|
},
|
|
1303
1310
|
"hasDynamicHelp": false,
|
|
1304
1311
|
"hiddenAliases": [],
|
|
1305
|
-
"id": "rflib:logging:
|
|
1312
|
+
"id": "rflib:logging:apex:instrument",
|
|
1306
1313
|
"pluginAlias": "rflib-plugin",
|
|
1307
1314
|
"pluginName": "rflib-plugin",
|
|
1308
1315
|
"pluginType": "core",
|
|
1309
1316
|
"strict": true,
|
|
1310
|
-
"summary": "Instrument
|
|
1317
|
+
"summary": "Instrument Apex classes with RFLIB logging statements automatically.",
|
|
1311
1318
|
"enableJsonFlag": true,
|
|
1312
1319
|
"isESM": true,
|
|
1313
1320
|
"relativePath": [
|
|
@@ -1315,43 +1322,43 @@
|
|
|
1315
1322
|
"commands",
|
|
1316
1323
|
"rflib",
|
|
1317
1324
|
"logging",
|
|
1318
|
-
"
|
|
1325
|
+
"apex",
|
|
1319
1326
|
"instrument.js"
|
|
1320
1327
|
],
|
|
1321
1328
|
"aliasPermutations": [],
|
|
1322
1329
|
"permutations": [
|
|
1323
|
-
"rflib:logging:
|
|
1324
|
-
"logging:rflib:
|
|
1325
|
-
"logging:
|
|
1326
|
-
"logging:
|
|
1327
|
-
"rflib:
|
|
1328
|
-
"
|
|
1329
|
-
"
|
|
1330
|
-
"
|
|
1331
|
-
"rflib:
|
|
1332
|
-
"
|
|
1333
|
-
"
|
|
1334
|
-
"
|
|
1335
|
-
"rflib:logging:instrument:
|
|
1336
|
-
"logging:rflib:instrument:
|
|
1337
|
-
"logging:instrument:rflib:
|
|
1338
|
-
"logging:instrument:
|
|
1339
|
-
"rflib:instrument:logging:
|
|
1340
|
-
"instrument:rflib:logging:
|
|
1341
|
-
"instrument:logging:rflib:
|
|
1342
|
-
"instrument:logging:
|
|
1343
|
-
"rflib:instrument:
|
|
1344
|
-
"instrument:rflib:
|
|
1345
|
-
"instrument:
|
|
1346
|
-
"instrument:
|
|
1330
|
+
"rflib:logging:apex:instrument",
|
|
1331
|
+
"logging:rflib:apex:instrument",
|
|
1332
|
+
"logging:apex:rflib:instrument",
|
|
1333
|
+
"logging:apex:instrument:rflib",
|
|
1334
|
+
"rflib:apex:logging:instrument",
|
|
1335
|
+
"apex:rflib:logging:instrument",
|
|
1336
|
+
"apex:logging:rflib:instrument",
|
|
1337
|
+
"apex:logging:instrument:rflib",
|
|
1338
|
+
"rflib:apex:instrument:logging",
|
|
1339
|
+
"apex:rflib:instrument:logging",
|
|
1340
|
+
"apex:instrument:rflib:logging",
|
|
1341
|
+
"apex:instrument:logging:rflib",
|
|
1342
|
+
"rflib:logging:instrument:apex",
|
|
1343
|
+
"logging:rflib:instrument:apex",
|
|
1344
|
+
"logging:instrument:rflib:apex",
|
|
1345
|
+
"logging:instrument:apex:rflib",
|
|
1346
|
+
"rflib:instrument:logging:apex",
|
|
1347
|
+
"instrument:rflib:logging:apex",
|
|
1348
|
+
"instrument:logging:rflib:apex",
|
|
1349
|
+
"instrument:logging:apex:rflib",
|
|
1350
|
+
"rflib:instrument:apex:logging",
|
|
1351
|
+
"instrument:rflib:apex:logging",
|
|
1352
|
+
"instrument:apex:rflib:logging",
|
|
1353
|
+
"instrument:apex:logging:rflib"
|
|
1347
1354
|
]
|
|
1348
1355
|
},
|
|
1349
|
-
"rflib:logging:
|
|
1356
|
+
"rflib:logging:aura:instrument": {
|
|
1350
1357
|
"aliases": [],
|
|
1351
1358
|
"args": {},
|
|
1352
|
-
"description": "Analyzes
|
|
1359
|
+
"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",
|
|
1353
1360
|
"examples": [
|
|
1354
|
-
"- Add logging
|
|
1361
|
+
"- 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"
|
|
1355
1362
|
],
|
|
1356
1363
|
"flags": {
|
|
1357
1364
|
"json": {
|
|
@@ -1371,17 +1378,17 @@
|
|
|
1371
1378
|
},
|
|
1372
1379
|
"sourcepath": {
|
|
1373
1380
|
"char": "s",
|
|
1374
|
-
"description": "Path to the source directory containing
|
|
1381
|
+
"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()",
|
|
1375
1382
|
"name": "sourcepath",
|
|
1376
1383
|
"required": true,
|
|
1377
|
-
"summary": "Directory containing
|
|
1384
|
+
"summary": "Directory containing Aura components to instrument with logging.",
|
|
1378
1385
|
"hasDynamicHelp": false,
|
|
1379
1386
|
"multiple": false,
|
|
1380
1387
|
"type": "option"
|
|
1381
1388
|
},
|
|
1382
1389
|
"dryrun": {
|
|
1383
1390
|
"char": "d",
|
|
1384
|
-
"description": "When enabled, shows which files would be modified without making actual changes. Useful for reviewing the impact before applying changes.",
|
|
1391
|
+
"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",
|
|
1385
1392
|
"name": "dryrun",
|
|
1386
1393
|
"summary": "Preview changes without modifying files.",
|
|
1387
1394
|
"allowNo": false,
|
|
@@ -1389,7 +1396,7 @@
|
|
|
1389
1396
|
},
|
|
1390
1397
|
"prettier": {
|
|
1391
1398
|
"char": "p",
|
|
1392
|
-
"description": "When enabled, formats the modified
|
|
1399
|
+
"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",
|
|
1393
1400
|
"name": "prettier",
|
|
1394
1401
|
"summary": "Format modified files using Prettier.",
|
|
1395
1402
|
"allowNo": false,
|
|
@@ -1402,15 +1409,8 @@
|
|
|
1402
1409
|
"allowNo": false,
|
|
1403
1410
|
"type": "boolean"
|
|
1404
1411
|
},
|
|
1405
|
-
"no-catch": {
|
|
1406
|
-
"description": "When provided, the command will not add error log statements inside of `catch` blocks.",
|
|
1407
|
-
"name": "no-catch",
|
|
1408
|
-
"summary": "Exclude the instrumentation of catch blocks.",
|
|
1409
|
-
"allowNo": false,
|
|
1410
|
-
"type": "boolean"
|
|
1411
|
-
},
|
|
1412
1412
|
"skip-instrumented": {
|
|
1413
|
-
"description": "When provided, the command will not add log statements to any
|
|
1413
|
+
"description": "When provided, the command will not add log statements to any Aura component that contains the `` component.",
|
|
1414
1414
|
"name": "skip-instrumented",
|
|
1415
1415
|
"summary": "Skips any files where a logger is already present.",
|
|
1416
1416
|
"allowNo": false,
|
|
@@ -1426,7 +1426,7 @@
|
|
|
1426
1426
|
},
|
|
1427
1427
|
"exclude": {
|
|
1428
1428
|
"char": "e",
|
|
1429
|
-
"description": "Exclude specific files or directories that match the provided glob pattern. For example, use --exclude \"**/Generated_*.
|
|
1429
|
+
"description": "Exclude specific files or directories that match the provided glob pattern. For example, use --exclude \"**/Generated_*.cmp\" to skip auto-generated components.",
|
|
1430
1430
|
"name": "exclude",
|
|
1431
1431
|
"summary": "Exclude files or directories from instrumentation based on a glob pattern.",
|
|
1432
1432
|
"hasDynamicHelp": false,
|
|
@@ -1446,12 +1446,12 @@
|
|
|
1446
1446
|
},
|
|
1447
1447
|
"hasDynamicHelp": false,
|
|
1448
1448
|
"hiddenAliases": [],
|
|
1449
|
-
"id": "rflib:logging:
|
|
1449
|
+
"id": "rflib:logging:aura:instrument",
|
|
1450
1450
|
"pluginAlias": "rflib-plugin",
|
|
1451
1451
|
"pluginName": "rflib-plugin",
|
|
1452
1452
|
"pluginType": "core",
|
|
1453
1453
|
"strict": true,
|
|
1454
|
-
"summary": "Instrument
|
|
1454
|
+
"summary": "Instrument Aura Components with RFLIB logging statements automatically.",
|
|
1455
1455
|
"enableJsonFlag": true,
|
|
1456
1456
|
"isESM": true,
|
|
1457
1457
|
"relativePath": [
|
|
@@ -1459,35 +1459,35 @@
|
|
|
1459
1459
|
"commands",
|
|
1460
1460
|
"rflib",
|
|
1461
1461
|
"logging",
|
|
1462
|
-
"
|
|
1462
|
+
"aura",
|
|
1463
1463
|
"instrument.js"
|
|
1464
1464
|
],
|
|
1465
1465
|
"aliasPermutations": [],
|
|
1466
1466
|
"permutations": [
|
|
1467
|
-
"rflib:logging:
|
|
1468
|
-
"logging:rflib:
|
|
1469
|
-
"logging:
|
|
1470
|
-
"logging:
|
|
1471
|
-
"rflib:
|
|
1472
|
-
"
|
|
1473
|
-
"
|
|
1474
|
-
"
|
|
1475
|
-
"rflib:
|
|
1476
|
-
"
|
|
1477
|
-
"
|
|
1478
|
-
"
|
|
1479
|
-
"rflib:logging:instrument:
|
|
1480
|
-
"logging:rflib:instrument:
|
|
1481
|
-
"logging:instrument:rflib:
|
|
1482
|
-
"logging:instrument:
|
|
1483
|
-
"rflib:instrument:logging:
|
|
1484
|
-
"instrument:rflib:logging:
|
|
1485
|
-
"instrument:logging:rflib:
|
|
1486
|
-
"instrument:logging:
|
|
1487
|
-
"rflib:instrument:
|
|
1488
|
-
"instrument:rflib:
|
|
1489
|
-
"instrument:
|
|
1490
|
-
"instrument:
|
|
1467
|
+
"rflib:logging:aura:instrument",
|
|
1468
|
+
"logging:rflib:aura:instrument",
|
|
1469
|
+
"logging:aura:rflib:instrument",
|
|
1470
|
+
"logging:aura:instrument:rflib",
|
|
1471
|
+
"rflib:aura:logging:instrument",
|
|
1472
|
+
"aura:rflib:logging:instrument",
|
|
1473
|
+
"aura:logging:rflib:instrument",
|
|
1474
|
+
"aura:logging:instrument:rflib",
|
|
1475
|
+
"rflib:aura:instrument:logging",
|
|
1476
|
+
"aura:rflib:instrument:logging",
|
|
1477
|
+
"aura:instrument:rflib:logging",
|
|
1478
|
+
"aura:instrument:logging:rflib",
|
|
1479
|
+
"rflib:logging:instrument:aura",
|
|
1480
|
+
"logging:rflib:instrument:aura",
|
|
1481
|
+
"logging:instrument:rflib:aura",
|
|
1482
|
+
"logging:instrument:aura:rflib",
|
|
1483
|
+
"rflib:instrument:logging:aura",
|
|
1484
|
+
"instrument:rflib:logging:aura",
|
|
1485
|
+
"instrument:logging:rflib:aura",
|
|
1486
|
+
"instrument:logging:aura:rflib",
|
|
1487
|
+
"rflib:instrument:aura:logging",
|
|
1488
|
+
"instrument:rflib:aura:logging",
|
|
1489
|
+
"instrument:aura:rflib:logging",
|
|
1490
|
+
"instrument:aura:logging:rflib"
|
|
1491
1491
|
]
|
|
1492
1492
|
},
|
|
1493
1493
|
"rflib:logging:flow:instrument": {
|
|
@@ -1771,5 +1771,5 @@
|
|
|
1771
1771
|
]
|
|
1772
1772
|
}
|
|
1773
1773
|
},
|
|
1774
|
-
"version": "0.23.
|
|
1774
|
+
"version": "0.23.4"
|
|
1775
1775
|
}
|
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.23.
|
|
4
|
+
"version": "0.23.4",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@oclif/core": "^4.14.0",
|
|
7
7
|
"@salesforce/core": "^8.32.6",
|