rflib-plugin 0.19.11 → 0.21.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.
@@ -1,5 +1,98 @@
1
1
  {
2
2
  "commands": {
3
+ "rflib:packages:upgrade": {
4
+ "aliases": [],
5
+ "args": {},
6
+ "description": "Compares the RFLIB packages (RFLIB, RFLIB-FS, RFLIB-TF, RFLIB-PHAROS) installed in the target org with the latest package versions published in the RFLIB GitHub repository (https://github.com/j-fischer/rflib).\n\nFor every installed package with a newer version available, the command asks whether to install the upgrade and, if confirmed, starts the installation in the target org. Upgrades are installed one at a time in dependency order (RFLIB first), and the remaining upgrades are skipped if an installation does not complete successfully.\n\nPackages that are not installed in the target org are only reported; this command never installs a package that isn't already present.\n\nUse --dryrun to only report the available upgrades, or --no-prompt to install all available upgrades without asking for confirmation. When --json is specified without --no-prompt, no upgrades are installed.",
7
+ "examples": [
8
+ "Check the RFLIB packages installed in an org and choose which upgrades to install:\n$ sf rflib packages upgrade --target-org myOrg",
9
+ "Report the available upgrades without installing anything:\n$ sf rflib packages upgrade --target-org myOrg --dryrun",
10
+ "Install all available upgrades without prompting, waiting up to 60 minutes for each installation:\n$ sf rflib packages upgrade --target-org myOrg --no-prompt --wait 60"
11
+ ],
12
+ "flags": {
13
+ "json": {
14
+ "description": "Format output as json.",
15
+ "helpGroup": "GLOBAL",
16
+ "name": "json",
17
+ "allowNo": false,
18
+ "type": "boolean"
19
+ },
20
+ "flags-dir": {
21
+ "helpGroup": "GLOBAL",
22
+ "name": "flags-dir",
23
+ "summary": "Import flag values from a directory.",
24
+ "hasDynamicHelp": false,
25
+ "multiple": false,
26
+ "type": "option"
27
+ },
28
+ "target-org": {
29
+ "char": "o",
30
+ "description": "The username or alias of the Salesforce org whose installed RFLIB packages should be checked and upgraded.",
31
+ "name": "target-org",
32
+ "noCacheDefault": true,
33
+ "required": true,
34
+ "summary": "Username or alias of the target org.",
35
+ "hasDynamicHelp": true,
36
+ "multiple": false,
37
+ "type": "option"
38
+ },
39
+ "dryrun": {
40
+ "char": "d",
41
+ "description": "Compare the installed packages with the latest versions and print the results, without prompting or installing any upgrades.",
42
+ "exclusive": [
43
+ "no-prompt"
44
+ ],
45
+ "name": "dryrun",
46
+ "summary": "Report the available upgrades without installing them.",
47
+ "allowNo": false,
48
+ "type": "boolean"
49
+ },
50
+ "no-prompt": {
51
+ "char": "r",
52
+ "description": "Skip the confirmation prompt for each upgrade and install every available upgrade. Use this flag in scripts and CI jobs, or together with --json.",
53
+ "name": "no-prompt",
54
+ "summary": "Install all available upgrades without asking for confirmation.",
55
+ "allowNo": false,
56
+ "type": "boolean"
57
+ },
58
+ "wait": {
59
+ "char": "w",
60
+ "description": "The number of minutes to wait for each package installation to complete before moving on. If the wait time elapses, the installation continues in the org and the remaining upgrades are skipped. Use \"sf package install report\" with the reported request ID to check its progress. Specify 0 to submit the first installation request without waiting.",
61
+ "name": "wait",
62
+ "summary": "Number of minutes to wait for each package installation to complete.",
63
+ "default": 30,
64
+ "hasDynamicHelp": false,
65
+ "multiple": false,
66
+ "type": "option"
67
+ }
68
+ },
69
+ "hasDynamicHelp": true,
70
+ "hiddenAliases": [],
71
+ "id": "rflib:packages:upgrade",
72
+ "pluginAlias": "rflib-plugin",
73
+ "pluginName": "rflib-plugin",
74
+ "pluginType": "core",
75
+ "strict": true,
76
+ "summary": "Check the RFLIB packages installed in a Salesforce org and upgrade them to the latest released versions.",
77
+ "enableJsonFlag": true,
78
+ "isESM": true,
79
+ "relativePath": [
80
+ "lib",
81
+ "commands",
82
+ "rflib",
83
+ "packages",
84
+ "upgrade.js"
85
+ ],
86
+ "aliasPermutations": [],
87
+ "permutations": [
88
+ "rflib:packages:upgrade",
89
+ "packages:rflib:upgrade",
90
+ "packages:upgrade:rflib",
91
+ "rflib:upgrade:packages",
92
+ "upgrade:rflib:packages",
93
+ "upgrade:packages:rflib"
94
+ ]
95
+ },
3
96
  "rflib:debug:applicationevents:get": {
4
97
  "aliases": [],
5
98
  "args": {},
@@ -128,106 +221,6 @@
128
221
  "get:applicationevents:debug:rflib"
129
222
  ]
130
223
  },
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",
144
- "allowNo": false,
145
- "type": "boolean"
146
- },
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
224
  "rflib:debug:loggersettings:get": {
232
225
  "aliases": [],
233
226
  "args": {},
@@ -547,12 +540,112 @@
547
540
  "get:userpermissions:debug:rflib"
548
541
  ]
549
542
  },
550
- "rflib:logging:aura:instrument": {
543
+ "rflib:debug:logarchives:get": {
551
544
  "aliases": [],
552
545
  "args": {},
553
- "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",
546
+ "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",
554
547
  "examples": [
555
- "- 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"
548
+ "Get log archives from the last 24 hours:\n$ sf rflib debug logarchives get --target-org myOrg",
549
+ "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"
550
+ ],
551
+ "flags": {
552
+ "json": {
553
+ "description": "Format output as json.",
554
+ "helpGroup": "GLOBAL",
555
+ "name": "json",
556
+ "allowNo": false,
557
+ "type": "boolean"
558
+ },
559
+ "flags-dir": {
560
+ "helpGroup": "GLOBAL",
561
+ "name": "flags-dir",
562
+ "summary": "Import flag values from a directory.",
563
+ "hasDynamicHelp": false,
564
+ "multiple": false,
565
+ "type": "option"
566
+ },
567
+ "target-org": {
568
+ "char": "o",
569
+ "description": "The username or alias of the Salesforce org containing the RFLIB base package.",
570
+ "name": "target-org",
571
+ "noCacheDefault": true,
572
+ "required": true,
573
+ "summary": "Username or alias of the target org.",
574
+ "hasDynamicHelp": true,
575
+ "multiple": false,
576
+ "type": "option"
577
+ },
578
+ "start-date": {
579
+ "char": "s",
580
+ "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.",
581
+ "name": "start-date",
582
+ "summary": "Start of the date range in ISO 8601 format. Defaults to 24 hours ago.",
583
+ "hasDynamicHelp": false,
584
+ "multiple": false,
585
+ "type": "option"
586
+ },
587
+ "end-date": {
588
+ "char": "d",
589
+ "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.",
590
+ "name": "end-date",
591
+ "summary": "End of the date range in ISO 8601 format. Defaults to now.",
592
+ "hasDynamicHelp": false,
593
+ "multiple": false,
594
+ "type": "option"
595
+ }
596
+ },
597
+ "hasDynamicHelp": true,
598
+ "hiddenAliases": [],
599
+ "id": "rflib:debug:logarchives:get",
600
+ "pluginAlias": "rflib-plugin",
601
+ "pluginName": "rflib-plugin",
602
+ "pluginType": "core",
603
+ "strict": true,
604
+ "summary": "Query RFLIB log archives from a Salesforce org.",
605
+ "enableJsonFlag": true,
606
+ "isESM": true,
607
+ "relativePath": [
608
+ "lib",
609
+ "commands",
610
+ "rflib",
611
+ "debug",
612
+ "logarchives",
613
+ "get.js"
614
+ ],
615
+ "aliasPermutations": [],
616
+ "permutations": [
617
+ "rflib:debug:logarchives:get",
618
+ "debug:rflib:logarchives:get",
619
+ "debug:logarchives:rflib:get",
620
+ "debug:logarchives:get:rflib",
621
+ "rflib:logarchives:debug:get",
622
+ "logarchives:rflib:debug:get",
623
+ "logarchives:debug:rflib:get",
624
+ "logarchives:debug:get:rflib",
625
+ "rflib:logarchives:get:debug",
626
+ "logarchives:rflib:get:debug",
627
+ "logarchives:get:rflib:debug",
628
+ "logarchives:get:debug:rflib",
629
+ "rflib:debug:get:logarchives",
630
+ "debug:rflib:get:logarchives",
631
+ "debug:get:rflib:logarchives",
632
+ "debug:get:logarchives:rflib",
633
+ "rflib:get:debug:logarchives",
634
+ "get:rflib:debug:logarchives",
635
+ "get:debug:rflib:logarchives",
636
+ "get:debug:logarchives:rflib",
637
+ "rflib:get:logarchives:debug",
638
+ "get:rflib:logarchives:debug",
639
+ "get:logarchives:rflib:debug",
640
+ "get:logarchives:debug:rflib"
641
+ ]
642
+ },
643
+ "rflib:logging:apex:instrument": {
644
+ "aliases": [],
645
+ "args": {},
646
+ "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.",
647
+ "examples": [
648
+ "- 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"
556
649
  ],
557
650
  "flags": {
558
651
  "json": {
@@ -572,17 +665,17 @@
572
665
  },
573
666
  "sourcepath": {
574
667
  "char": "s",
575
- "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()",
668
+ "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.",
576
669
  "name": "sourcepath",
577
670
  "required": true,
578
- "summary": "Directory containing Aura components to instrument with logging.",
671
+ "summary": "Directory containing Apex classes to instrument with logging.",
579
672
  "hasDynamicHelp": false,
580
673
  "multiple": false,
581
674
  "type": "option"
582
675
  },
583
676
  "dryrun": {
584
677
  "char": "d",
585
- "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",
678
+ "description": "When enabled, shows which files would be modified without making actual changes. Useful for reviewing the impact before applying changes.",
586
679
  "name": "dryrun",
587
680
  "summary": "Preview changes without modifying files.",
588
681
  "allowNo": false,
@@ -590,7 +683,7 @@
590
683
  },
591
684
  "prettier": {
592
685
  "char": "p",
593
- "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",
686
+ "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",
594
687
  "name": "prettier",
595
688
  "summary": "Format modified files using Prettier.",
596
689
  "allowNo": false,
@@ -603,8 +696,15 @@
603
696
  "allowNo": false,
604
697
  "type": "boolean"
605
698
  },
699
+ "no-catch": {
700
+ "description": "When provided, the command will not add error log statements inside of `catch` blocks.",
701
+ "name": "no-catch",
702
+ "summary": "Exclude the instrumentation of catch blocks.",
703
+ "allowNo": false,
704
+ "type": "boolean"
705
+ },
606
706
  "skip-instrumented": {
607
- "description": "When provided, the command will not add log statements to any Aura component that contains the `` component.",
707
+ "description": "When provided, the command will not add log statements to any Apex class that contains the `rflib_Logger` reference.",
608
708
  "name": "skip-instrumented",
609
709
  "summary": "Skips any files where a logger is already present.",
610
710
  "allowNo": false,
@@ -620,7 +720,7 @@
620
720
  },
621
721
  "exclude": {
622
722
  "char": "e",
623
- "description": "Exclude specific files or directories that match the provided glob pattern. For example, use --exclude \"**/Generated_*.cmp\" to skip auto-generated components.",
723
+ "description": "Exclude specific files or directories that match the provided glob pattern. For example, use --exclude \"**/Generated_*.cls\" to skip auto-generated classes.",
624
724
  "name": "exclude",
625
725
  "summary": "Exclude files or directories from instrumentation based on a glob pattern.",
626
726
  "hasDynamicHelp": false,
@@ -640,12 +740,12 @@
640
740
  },
641
741
  "hasDynamicHelp": false,
642
742
  "hiddenAliases": [],
643
- "id": "rflib:logging:aura:instrument",
743
+ "id": "rflib:logging:apex:instrument",
644
744
  "pluginAlias": "rflib-plugin",
645
745
  "pluginName": "rflib-plugin",
646
746
  "pluginType": "core",
647
747
  "strict": true,
648
- "summary": "Instrument Aura Components with RFLIB logging statements automatically.",
748
+ "summary": "Instrument Apex classes with RFLIB logging statements automatically.",
649
749
  "enableJsonFlag": true,
650
750
  "isESM": true,
651
751
  "relativePath": [
@@ -653,43 +753,43 @@
653
753
  "commands",
654
754
  "rflib",
655
755
  "logging",
656
- "aura",
756
+ "apex",
657
757
  "instrument.js"
658
758
  ],
659
759
  "aliasPermutations": [],
660
760
  "permutations": [
661
- "rflib:logging:aura:instrument",
662
- "logging:rflib:aura:instrument",
663
- "logging:aura:rflib:instrument",
664
- "logging:aura:instrument:rflib",
665
- "rflib:aura:logging:instrument",
666
- "aura:rflib:logging:instrument",
667
- "aura:logging:rflib:instrument",
668
- "aura:logging:instrument:rflib",
669
- "rflib:aura:instrument:logging",
670
- "aura:rflib:instrument:logging",
671
- "aura:instrument:rflib:logging",
672
- "aura:instrument:logging:rflib",
673
- "rflib:logging:instrument:aura",
674
- "logging:rflib:instrument:aura",
675
- "logging:instrument:rflib:aura",
676
- "logging:instrument:aura:rflib",
677
- "rflib:instrument:logging:aura",
678
- "instrument:rflib:logging:aura",
679
- "instrument:logging:rflib:aura",
680
- "instrument:logging:aura:rflib",
681
- "rflib:instrument:aura:logging",
682
- "instrument:rflib:aura:logging",
683
- "instrument:aura:rflib:logging",
684
- "instrument:aura:logging:rflib"
761
+ "rflib:logging:apex:instrument",
762
+ "logging:rflib:apex:instrument",
763
+ "logging:apex:rflib:instrument",
764
+ "logging:apex:instrument:rflib",
765
+ "rflib:apex:logging:instrument",
766
+ "apex:rflib:logging:instrument",
767
+ "apex:logging:rflib:instrument",
768
+ "apex:logging:instrument:rflib",
769
+ "rflib:apex:instrument:logging",
770
+ "apex:rflib:instrument:logging",
771
+ "apex:instrument:rflib:logging",
772
+ "apex:instrument:logging:rflib",
773
+ "rflib:logging:instrument:apex",
774
+ "logging:rflib:instrument:apex",
775
+ "logging:instrument:rflib:apex",
776
+ "logging:instrument:apex:rflib",
777
+ "rflib:instrument:logging:apex",
778
+ "instrument:rflib:logging:apex",
779
+ "instrument:logging:rflib:apex",
780
+ "instrument:logging:apex:rflib",
781
+ "rflib:instrument:apex:logging",
782
+ "instrument:rflib:apex:logging",
783
+ "instrument:apex:rflib:logging",
784
+ "instrument:apex:logging:rflib"
685
785
  ]
686
786
  },
687
- "rflib:logging:apex:instrument": {
787
+ "rflib:logging:aura:instrument": {
688
788
  "aliases": [],
689
789
  "args": {},
690
- "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.",
790
+ "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",
691
791
  "examples": [
692
- "- 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"
792
+ "- 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"
693
793
  ],
694
794
  "flags": {
695
795
  "json": {
@@ -709,17 +809,17 @@
709
809
  },
710
810
  "sourcepath": {
711
811
  "char": "s",
712
- "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.",
812
+ "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()",
713
813
  "name": "sourcepath",
714
814
  "required": true,
715
- "summary": "Directory containing Apex classes to instrument with logging.",
815
+ "summary": "Directory containing Aura components to instrument with logging.",
716
816
  "hasDynamicHelp": false,
717
817
  "multiple": false,
718
818
  "type": "option"
719
819
  },
720
820
  "dryrun": {
721
821
  "char": "d",
722
- "description": "When enabled, shows which files would be modified without making actual changes. Useful for reviewing the impact before applying changes.",
822
+ "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",
723
823
  "name": "dryrun",
724
824
  "summary": "Preview changes without modifying files.",
725
825
  "allowNo": false,
@@ -727,7 +827,7 @@
727
827
  },
728
828
  "prettier": {
729
829
  "char": "p",
730
- "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",
830
+ "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",
731
831
  "name": "prettier",
732
832
  "summary": "Format modified files using Prettier.",
733
833
  "allowNo": false,
@@ -740,15 +840,8 @@
740
840
  "allowNo": false,
741
841
  "type": "boolean"
742
842
  },
743
- "no-catch": {
744
- "description": "When provided, the command will not add error log statements inside of `catch` blocks.",
745
- "name": "no-catch",
746
- "summary": "Exclude the instrumentation of catch blocks.",
747
- "allowNo": false,
748
- "type": "boolean"
749
- },
750
843
  "skip-instrumented": {
751
- "description": "When provided, the command will not add log statements to any Apex class that contains the `rflib_Logger` reference.",
844
+ "description": "When provided, the command will not add log statements to any Aura component that contains the `` component.",
752
845
  "name": "skip-instrumented",
753
846
  "summary": "Skips any files where a logger is already present.",
754
847
  "allowNo": false,
@@ -764,7 +857,7 @@
764
857
  },
765
858
  "exclude": {
766
859
  "char": "e",
767
- "description": "Exclude specific files or directories that match the provided glob pattern. For example, use --exclude \"**/Generated_*.cls\" to skip auto-generated classes.",
860
+ "description": "Exclude specific files or directories that match the provided glob pattern. For example, use --exclude \"**/Generated_*.cmp\" to skip auto-generated components.",
768
861
  "name": "exclude",
769
862
  "summary": "Exclude files or directories from instrumentation based on a glob pattern.",
770
863
  "hasDynamicHelp": false,
@@ -784,12 +877,12 @@
784
877
  },
785
878
  "hasDynamicHelp": false,
786
879
  "hiddenAliases": [],
787
- "id": "rflib:logging:apex:instrument",
880
+ "id": "rflib:logging:aura:instrument",
788
881
  "pluginAlias": "rflib-plugin",
789
882
  "pluginName": "rflib-plugin",
790
883
  "pluginType": "core",
791
884
  "strict": true,
792
- "summary": "Instrument Apex classes with RFLIB logging statements automatically.",
885
+ "summary": "Instrument Aura Components with RFLIB logging statements automatically.",
793
886
  "enableJsonFlag": true,
794
887
  "isESM": true,
795
888
  "relativePath": [
@@ -797,45 +890,46 @@
797
890
  "commands",
798
891
  "rflib",
799
892
  "logging",
800
- "apex",
893
+ "aura",
801
894
  "instrument.js"
802
895
  ],
803
896
  "aliasPermutations": [],
804
897
  "permutations": [
805
- "rflib:logging:apex:instrument",
806
- "logging:rflib:apex:instrument",
807
- "logging:apex:rflib:instrument",
808
- "logging:apex:instrument:rflib",
809
- "rflib:apex:logging:instrument",
810
- "apex:rflib:logging:instrument",
811
- "apex:logging:rflib:instrument",
812
- "apex:logging:instrument:rflib",
813
- "rflib:apex:instrument:logging",
814
- "apex:rflib:instrument:logging",
815
- "apex:instrument:rflib:logging",
816
- "apex:instrument:logging:rflib",
817
- "rflib:logging:instrument:apex",
818
- "logging:rflib:instrument:apex",
819
- "logging:instrument:rflib:apex",
820
- "logging:instrument:apex:rflib",
821
- "rflib:instrument:logging:apex",
822
- "instrument:rflib:logging:apex",
823
- "instrument:logging:rflib:apex",
824
- "instrument:logging:apex:rflib",
825
- "rflib:instrument:apex:logging",
826
- "instrument:rflib:apex:logging",
827
- "instrument:apex:rflib:logging",
828
- "instrument:apex:logging:rflib"
898
+ "rflib:logging:aura:instrument",
899
+ "logging:rflib:aura:instrument",
900
+ "logging:aura:rflib:instrument",
901
+ "logging:aura:instrument:rflib",
902
+ "rflib:aura:logging:instrument",
903
+ "aura:rflib:logging:instrument",
904
+ "aura:logging:rflib:instrument",
905
+ "aura:logging:instrument:rflib",
906
+ "rflib:aura:instrument:logging",
907
+ "aura:rflib:instrument:logging",
908
+ "aura:instrument:rflib:logging",
909
+ "aura:instrument:logging:rflib",
910
+ "rflib:logging:instrument:aura",
911
+ "logging:rflib:instrument:aura",
912
+ "logging:instrument:rflib:aura",
913
+ "logging:instrument:aura:rflib",
914
+ "rflib:instrument:logging:aura",
915
+ "instrument:rflib:logging:aura",
916
+ "instrument:logging:rflib:aura",
917
+ "instrument:logging:aura:rflib",
918
+ "rflib:instrument:aura:logging",
919
+ "instrument:rflib:aura:logging",
920
+ "instrument:aura:rflib:logging",
921
+ "instrument:aura:logging:rflib"
829
922
  ]
830
923
  },
831
924
  "rflib:logging:flow:instrument": {
832
925
  "aliases": [],
833
926
  "args": {},
834
- "description": "Automatically adds RFLIB logging statements to Salesforce Flows to provide enhanced tracking and debugging capabilities. Works with both standard Flows and Auto-Launched Flows. Instruments flow invocations and decision paths with logging actions. Also sets the CanvasMode to AUTO_LAYOUT_CANVAS for better flow visualization while preserving the original processType.",
927
+ "description": "Automatically adds RFLIB logging statements to Salesforce Flows to provide enhanced tracking and debugging capabilities. Works with both standard Flows and Auto-Launched Flows. Instruments flow invocations and decision paths with logging actions, and logs an error on the fault path of every element that can fail. Existing fault paths continue after the error is logged. Elements without a fault path get one that logs the error and then terminates the transaction, so the Flow still fails as before; this requires the Terminate Transaction option of the RFLIB Log Message action, which was added in RFLIB 11.4.0. The command checks the RFLIB version installed in the target org and skips the fault paths if the org runs an older version or RFLIB is not installed as a package. Also sets the CanvasMode to AUTO_LAYOUT_CANVAS for better flow visualization while preserving the original processType.",
835
928
  "examples": [
836
- "<%= config.bin %> <%= command.id %> --sourcepath force-app",
837
- "<%= config.bin %> <%= command.id %> --sourcepath force-app --dryrun",
838
- "<%= config.bin %> <%= command.id %> --sourcepath force-app --skip-instrumented"
929
+ "<%= config.bin %> <%= command.id %> --target-org myOrg --sourcepath force-app",
930
+ "<%= config.bin %> <%= command.id %> --target-org myOrg --sourcepath force-app --dryrun",
931
+ "<%= config.bin %> <%= command.id %> --target-org myOrg --sourcepath force-app --skip-instrumented",
932
+ "<%= config.bin %> <%= command.id %> --target-org myOrg --sourcepath force-app --skip-fault-paths"
839
933
  ],
840
934
  "flags": {
841
935
  "json": {
@@ -853,6 +947,17 @@
853
947
  "multiple": false,
854
948
  "type": "option"
855
949
  },
950
+ "target-org": {
951
+ "char": "o",
952
+ "description": "The Salesforce org the instrumented Flows will be deployed to. The command checks the version of the RFLIB package installed in this org to decide whether fault paths can be instrumented.",
953
+ "name": "target-org",
954
+ "noCacheDefault": true,
955
+ "required": true,
956
+ "summary": "Username or alias of the target org.",
957
+ "hasDynamicHelp": true,
958
+ "multiple": false,
959
+ "type": "option"
960
+ },
856
961
  "sourcepath": {
857
962
  "char": "s",
858
963
  "description": "Path to the source directory containing Flow files that should be instrumented with RFLIB logging statements. Processes .flow-meta.xml files with processType=\"Flow\" or \"AutoLaunchedFlow\".",
@@ -878,6 +983,13 @@
878
983
  "allowNo": false,
879
984
  "type": "boolean"
880
985
  },
986
+ "skip-fault-paths": {
987
+ "description": "When provided, the command will not add error logging to fault paths and will not create fault paths for elements that have none, regardless of the RFLIB version installed in the target org.",
988
+ "name": "skip-fault-paths",
989
+ "summary": "Skips logging errors on fault paths.",
990
+ "allowNo": false,
991
+ "type": "boolean"
992
+ },
881
993
  "verbose": {
882
994
  "char": "v",
883
995
  "description": "When provided with --dryrun, prints the paths of the files that would be modified.",
@@ -906,7 +1018,7 @@
906
1018
  "type": "option"
907
1019
  }
908
1020
  },
909
- "hasDynamicHelp": false,
1021
+ "hasDynamicHelp": true,
910
1022
  "hiddenAliases": [],
911
1023
  "id": "rflib:logging:flow:instrument",
912
1024
  "pluginAlias": "rflib-plugin",
@@ -1090,5 +1202,5 @@
1090
1202
  ]
1091
1203
  }
1092
1204
  },
1093
- "version": "0.19.11"
1205
+ "version": "0.21.0"
1094
1206
  }