@oracle/oraclejet-audit 18.1.4 → 19.0.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.
Files changed (86) hide show
  1. package/corePackMigrator/corePackMigrator.js +1 -1
  2. package/corePackMigrator/metadata/badgeMetadata.json +66 -0
  3. package/corePackMigrator/metadata/checkboxsetMetadata.json +101 -0
  4. package/corePackMigrator/metadata/inputNumberMetadata.json +0 -3
  5. package/corePackMigrator/metadata/inputTextMetadata.json +0 -3
  6. package/corePackMigrator/metadata/labelMetadata.json +285 -222
  7. package/corePackMigrator/metadata/labelValueMetadata.json +226 -137
  8. package/corePackMigrator/metadata/listviewMetadata.json +7 -0
  9. package/corePackMigrator/metadata/radiosetMetadata.json +20 -9
  10. package/corePackMigrator/metadata/selectorMetadata.json +6 -0
  11. package/corePackMigrator/resource/astUtils.js +1 -1
  12. package/corePackMigrator/resource/componentMigrator.js +1 -1
  13. package/corePackMigrator/resource/fileScanner.js +1 -1
  14. package/corePackMigrator/resource/htmlUtils.js +1 -1
  15. package/corePackMigrator/resource/manifest.json +57 -49
  16. package/corePackMigrator/resource/migrationConfig.json +1 -1
  17. package/corePackMigrator/utilities/logging.js +2 -2
  18. package/jaf-amd.js +1 -1
  19. package/lib/Components.js +1 -1
  20. package/lib/Config.js +1 -1
  21. package/lib/FsUtils.js +1 -1
  22. package/lib/HtmlUtils.js +1 -1
  23. package/lib/JafLib.js +1 -1
  24. package/lib/MetaLib.js +1 -1
  25. package/lib/OjCPack.js +1 -1
  26. package/lib/RegTypes.js +1 -1
  27. package/lib/Registry.js +1 -1
  28. package/lib/Rules.js +1 -1
  29. package/lib/Ts.js +1 -1
  30. package/lib/TsUtils.js +1 -1
  31. package/lib/TsxUtils.js +1 -1
  32. package/lib/checkage.js +1 -1
  33. package/lib/defaults.js +1 -1
  34. package/lib/extends.js +1 -1
  35. package/lib/ns.js +1 -1
  36. package/lib/scaffold.js +1 -1
  37. package/lib/scopewalker.js +1 -1
  38. package/lib/sublib/precomp/Precompiler.js +1 -1
  39. package/libext/expparser.js +1 -1
  40. package/meta/18.0.0/jetauditmeta.js +1 -1
  41. package/meta/18.1.0/jetauditmeta.js +1 -1
  42. package/meta/19.0.0/jetauditmeta.js +9 -0
  43. package/meta/metaverlist.json +1 -1
  44. package/package.json +4 -4
  45. package/profiles/best-practice.json +3 -0
  46. package/profiles/redwood-strict.json +10 -1
  47. package/rulepacks/jetwc/jetwc-use-public-apis.js +6 -0
  48. package/rulepacks/jetwc/msgid.json +1 -1
  49. package/rulepacks/jetwc/rules.json +1 -1
  50. package/rulepacks/jetwc-lib/jetwcutils-componentAuditUtils.js +1 -1
  51. package/rulepacks/jetwc-lib/jetwcutils-componentFinder.js +1 -1
  52. package/rulepacks/jetwco/jetwco-cacc-properties.js +1 -1
  53. package/rulepacks/jetwco/rules.json +1 -1
  54. package/rules/jet/msgid.json +1 -1
  55. package/rules/jet/oj-acc-aria-accessible.js +1 -1
  56. package/rules/jet/oj-acc-aria-prop.js +1 -1
  57. package/rules/jet/oj-acc-navigable-link.js +6 -0
  58. package/rules/jet/oj-acc-select-aria-label.js +1 -1
  59. package/rules/jet/oj-cca-compjson-prop-conflict.js +6 -0
  60. package/rules/jet/oj-css-bp-zindex.js +7 -0
  61. package/rules/jet/oj-html-badge-maintenance.js +6 -0
  62. package/rules/jet/oj-html-binding-as-slot-child.js +1 -1
  63. package/rules/jet/oj-html-corequired.js +6 -0
  64. package/rules/jet/oj-html-nav-tab-nointeractive.js +6 -0
  65. package/rules/jet/oj-html-oj-ux-ico-slot.js +6 -0
  66. package/rules/jet/oj-html-ojtag-id.js +1 -1
  67. package/rules/jet/oj-html-redwood-ojoption-disabled.js +6 -0
  68. package/rules/jet/oj-html-slot-pref-content.js +1 -1
  69. package/rules/jet/oj-html-tabbar-progressive-popup.js +1 -1
  70. package/rules/jet/oj-html-wctag-for.js +1 -1
  71. package/rules/jet/oj-html-wctag-id.js +1 -1
  72. package/rules/jet/oj-html-wctag-maintenance.js +1 -1
  73. package/rules/jet/oj-html-wctag-packprivate.js +1 -1
  74. package/rules/jet/oj-js-poly-promise.js +1 -1
  75. package/rules/jet/oj-ts-poly-promise.js +1 -1
  76. package/rules/jet/oj-tsx-acc-navigable-link.js +6 -0
  77. package/rules/jet/oj-tsx-aria-prop.js +1 -1
  78. package/rules/jet/oj-tsx-corequired.js +6 -0
  79. package/rules/jet/oj-tsx-prop-ko-binding.js +6 -0
  80. package/rules/jet/oj-tsx-tabbar-progressive-popup.js +6 -0
  81. package/rules/jet/oj-tsx-wctag-packprivate.js +1 -1
  82. package/rules/jet/rules.json +1 -1
  83. package/schema/component-schema.json +1 -1
  84. package/src/JafCore.js +1 -1
  85. package/types/index.d.ts +5 -0
  86. package/corePackMigrator/metadata/messagesMetadata.json +0 -41
@@ -1,87 +1,94 @@
1
1
  [
2
2
  {
3
- "JetVersion": "19.0.0",
3
+ "JetVersion": "20.0.0",
4
4
  "componentName": "oj-action-card",
5
5
  "metadata": "actionCardMetadata",
6
- "migrationApiLink": "https://jet.oraclecorp.com/trunk/jsdocs/oj.ojActionCard.html#migration-section"
6
+ "migrationApiLink": "https://www.oracle.com/webfolder/technetwork/jet/jsdocs/oj.ojActionCard.html#migration-section"
7
7
  },
8
8
  {
9
9
  "JetVersion": "13.0.0",
10
10
  "componentName": "oj-avatar",
11
11
  "metadata": "avatarMetadata",
12
- "migrationApiLink": "https://jet.oraclecorp.com/trunk/jsdocs/oj.ojAvatar.html#migration-section"
12
+ "migrationApiLink": "https://www.oracle.com/webfolder/technetwork/jet/jsdocs/oj.ojAvatar.html#migration-section"
13
+ },
14
+ {
15
+ "JetVersion": "19.0.0",
16
+ "componentClass": "oj-badge",
17
+ "metadata": "badgeMetadata",
18
+ "migrationApiLink": "https://www.oracle.com/webfolder/technetwork/jet/jsdocs/Badge.html"
13
19
  },
14
20
  {
15
21
  "JetVersion": "13.0.0",
16
22
  "componentName": "oj-button",
17
23
  "metadata": "buttonMetadata",
18
- "migrationApiLink": "https://jet.oraclecorp.com/trunk/jsdocs/oj.ojButton.html#migration-section"
24
+ "migrationApiLink": "https://www.oracle.com/webfolder/technetwork/jet/jsdocs/oj.ojButton.html#migration-section"
19
25
  },
20
26
  {
21
27
  "JetVersion": "17.0.0",
22
28
  "componentName": "oj-buttonset-many",
23
- "migrationApiLink": "https://jet.oraclecorp.com/trunk/jsdocs/oj.ojButtonsetMany.html#migration-section",
29
+ "migrationApiLink": "https://www.oracle.com/webfolder/technetwork/jet/jsdocs/oj.ojButtonsetMany.html#migration-section",
24
30
  "dataDriven": "true"
25
31
  },
26
32
  {
27
33
  "JetVersion": "17.0.0",
28
34
  "componentName": "oj-buttonset-one",
29
- "migrationApiLink": "https://jet.oraclecorp.com/trunk/jsdocs/oj.ojButtonsetOne.html#migration-section",
35
+ "migrationApiLink": "https://www.oracle.com/webfolder/technetwork/jet/jsdocs/oj.ojButtonsetOne.html#migration-section",
30
36
  "dataDriven": "true"
31
37
  },
32
38
  {
33
- "JetVersion": "19.0.0",
39
+ "JetVersion": "20.0.0",
34
40
  "componentName": "oj-chart",
35
41
  "metadata": "chartMetadata",
36
- "migrationApiLink": "https://jet.oraclecorp.com/trunk/jsdocs/oj.ojChart.html#migration-section"
42
+ "migrationApiLink": "https://www.oracle.com/webfolder/technetwork/jet/jsdocs/oj.ojChart.html#migration-section"
37
43
  },
38
44
  {
39
45
  "JetVersion": "16.0.0",
40
46
  "componentName": "oj-checkboxset",
41
- "migrationApiLink": "https://jet.oraclecorp.com/trunk/jsdocs/oj.ojCheckboxset.html#migration-section",
47
+ "metadata": "checkboxsetMetadata",
48
+ "migrationApiLink": "https://www.oracle.com/webfolder/technetwork/jet/jsdocs/oj.ojCheckboxset.html#migration-section",
42
49
  "dataDriven": "true"
43
50
  },
44
51
  {
45
- "JetVersion": "19.0.0",
52
+ "JetVersion": "20.0.0",
46
53
  "componentName": "oj-collapsible",
47
54
  "metadata": "collapsibleMetadata",
48
- "migrationApiLink": "https://jet.oraclecorp.com/trunk/jsdocs/oj.ojCollapsible.html#migration-section"
55
+ "migrationApiLink": "https://www.oracle.com/webfolder/technetwork/jet/jsdocs/oj.ojCollapsible.html#migration-section"
49
56
  },
50
57
  {
51
58
  "JetVersion": "17.0.0",
52
59
  "componentName": "oj-conveyor-belt",
53
60
  "metadata": "conveyorBeltMetadata",
54
- "migrationApiLink": "https://jet.oraclecorp.com/trunk/jsdocs/oj.ojConveyorBelt.html#migration-section"
61
+ "migrationApiLink": "https://www.oracle.com/webfolder/technetwork/jet/jsdocs/oj.ojConveyorBelt.html#migration-section"
55
62
  },
56
63
  {
57
64
  "JetVersion": "17.0.0",
58
65
  "componentName": "oj-date-picker",
59
66
  "metadata": "datePickerMetadata",
60
- "migrationApiLink": "https://jet.oraclecorp.com/trunk/jsdocs/oj.ojDatePicker.html#migration-section"
67
+ "migrationApiLink": "https://www.oracle.com/webfolder/technetwork/jet/jsdocs/oj.ojDatePicker.html#migration-section"
61
68
  },
62
69
  {
63
70
  "JetVersion": "17.0.0",
64
71
  "componentName": "oj-drawer-layout",
65
72
  "metadata": "drawerLayoutMetadata",
66
- "migrationApiLink": "https://jet.oraclecorp.com/trunk/jsdocs/oj.ojDrawerLayout.html#migration-section"
73
+ "migrationApiLink": "https://www.oracle.com/webfolder/technetwork/jet/jsdocs/oj.ojDrawerLayout.html#migration-section"
67
74
  },
68
75
  {
69
76
  "JetVersion": "16.0.0",
70
77
  "componentName": "oj-drawer-popup",
71
78
  "metadata": "drawerPopupMetadata",
72
- "migrationApiLink": "https://jet.oraclecorp.com/trunk/jsdocs/oj.ojDrawerPopup.html#migration-section"
79
+ "migrationApiLink": "https://www.oracle.com/webfolder/technetwork/jet/jsdocs/oj.ojDrawerPopup.html#migration-section"
73
80
  },
74
81
  {
75
82
  "JetVersion": "14.0.0",
76
83
  "componentName": "oj-file-picker",
77
84
  "metadata": "filePickerMetadata",
78
- "migrationApiLink": "https://jet.oraclecorp.com/trunk/jsdocs/oj.ojFilePicker.html#migration-section"
85
+ "migrationApiLink": "https://www.oracle.com/webfolder/technetwork/jet/jsdocs/oj.ojFilePicker.html#migration-section"
79
86
  },
80
87
  {
81
88
  "JetVersion": "15.0.0",
82
89
  "componentName": "oj-highlight-text",
83
90
  "metadata": "highlightTextMetadata",
84
- "migrationApiLink": "https://jet.oraclecorp.com/trunk/jsdocs/oj.ojHighlightText.html#migration-section"
91
+ "migrationApiLink": "https://www.oracle.com/webfolder/technetwork/jet/jsdocs/oj.ojHighlightText.html#migration-section"
85
92
  },
86
93
  {
87
94
  "componentName": "oj-label-value",
@@ -95,146 +102,147 @@
95
102
  "JetVersion": "17.0.0",
96
103
  "componentName": "oj-input-date",
97
104
  "metadata": "inputDateMetadata",
98
- "migrationApiLink": "https://jet.oraclecorp.com/trunk/jsdocs/oj.ojInputDate.html#migration-section"
105
+ "migrationApiLink": "https://www.oracle.com/webfolder/technetwork/jet/jsdocs/oj.ojInputDate.html#migration-section"
99
106
  },
100
107
  {
101
108
  "JetVersion": "14.0.0",
102
109
  "componentName": "oj-input-number",
103
110
  "metadata": "inputNumberMetadata",
104
- "migrationApiLink": "https://jet.oraclecorp.com/trunk/jsdocs/oj.ojInputNumber.html#migration-section"
111
+ "migrationApiLink": "https://www.oracle.com/webfolder/technetwork/jet/jsdocs/oj.ojInputNumber.html#migration-section"
105
112
  },
106
113
  {
107
114
  "JetVersion": "13.0.0",
108
115
  "componentName": "oj-input-password",
109
116
  "metadata": "inputPasswordMetadata",
110
- "migrationApiLink": "https://jet.oraclecorp.com/trunk/jsdocs/oj.ojInputPassword.html#migration-section"
117
+ "migrationApiLink": "https://www.oracle.com/webfolder/technetwork/jet/jsdocs/oj.ojInputPassword.html#migration-section"
111
118
  },
112
119
  {
113
120
  "JetVersion": "13.0.0",
114
121
  "componentName": "oj-input-text",
115
122
  "metadata": "inputTextMetadata",
116
- "migrationApiLink": "https://jet.oraclecorp.com/trunk/jsdocs/oj.ojInputText.html#migration-section"
123
+ "migrationApiLink": "https://www.oracle.com/webfolder/technetwork/jet/jsdocs/oj.ojInputText.html#migration-section"
117
124
  },
118
125
  {
119
- "JetVersion": "19.0.0",
126
+ "JetVersion": "20.0.0",
120
127
  "componentName": "oj-legend",
121
128
  "metadata": "legendMetadata",
122
- "migrationApiLink": "https://jet.oraclecorp.com/trunk/jsdocs/oj.ojLegend.html#migration-section"
129
+ "migrationApiLink": "https://www.oracle.com/webfolder/technetwork/jet/jsdocs/oj.ojLegend.html#migration-section"
123
130
  },
124
131
  {
125
- "JetVersion": "19.0.0",
132
+ "JetVersion": "20.0.0",
126
133
  "componentName": "oj-legend-item"
127
134
  },
128
135
  {
129
- "JetVersion": "19.0.0",
136
+ "JetVersion": "20.0.0",
130
137
  "componentName": "oj-legend-section"
131
138
  },
132
139
  {
133
140
  "JetVersion": "14.0.0",
134
141
  "componentName": "oj-list-item-layout",
135
142
  "metadata": "listItemLayoutMetadata",
136
- "migrationApiLink": "https://jet.oraclecorp.com/trunk/jsdocs/oj.ojListItemLayout.html#migration-section"
143
+ "migrationApiLink": "https://www.oracle.com/webfolder/technetwork/jet/jsdocs/oj.ojListItemLayout.html#migration-section"
137
144
  },
138
145
  {
139
- "JetVersion": "19.0.0",
146
+ "JetVersion": "20.0.0",
140
147
  "componentName": "oj-list-view",
141
148
  "metadata": "listViewMetadata",
142
- "migrationApiLink": "https://jet.oraclecorp.com/trunk/jsdocs/oj.ojListView.html#migration-section"
149
+ "migrationApiLink": "https://www.oracle.com/webfolder/technetwork/jet/jsdocs/oj.ojListView.html#migration-section"
143
150
  },
144
151
  {
145
152
  "JetVersion": "16.0.0",
146
153
  "componentName": "oj-menu-button",
147
- "migrationApiLink": "https://jet.oraclecorp.com/trunk/jsdocs/oj.ojMenuButton.html#migration-section",
154
+ "migrationApiLink": "https://www.oracle.com/webfolder/technetwork/jet/jsdocs/oj.ojMenuButton.html#migration-section",
148
155
  "dataDriven": "true"
149
156
  },
150
157
  {
151
158
  "JetVersion": "16.0.0",
152
159
  "componentName": "oj-menu-select-many",
153
- "migrationApiLink": "https://jet.oraclecorp.com/trunk/jsdocs/oj.ojMenuSelectMany.html#migration-section",
160
+ "migrationApiLink": "https://www.oracle.com/webfolder/technetwork/jet/jsdocs/oj.ojMenuSelectMany.html#migration-section",
154
161
  "dataDriven": "true"
155
162
  },
156
163
  {
157
164
  "JetVersion": "14.0.0",
158
165
  "componentName": "oj-messages",
159
- "metadata": "messagesMetadata",
160
- "migrationApiLink": "https://jet.oraclecorp.com/trunk/jsdocs/oj.ojMessages.html#migration-section"
166
+ "migrationApiLink": "https://www.oracle.com/webfolder/technetwork/jet/jsdocs/oj.ojMessages.html#migration-section",
167
+ "dataDriven": "true"
161
168
  },
162
169
  {
163
170
  "JetVersion": "16.0.0",
164
171
  "componentName": "oj-message-banner",
165
172
  "metadata": "messageBannerMetadata",
166
- "migrationApiLink": "https://jet.oraclecorp.com/trunk/jsdocs/oj.ojMessageBanner.html#migration-section"
173
+ "migrationApiLink": "https://www.oracle.com/webfolder/technetwork/jet/jsdocs/oj.ojMessageBanner.html#migration-section"
167
174
  },
168
175
  {
169
176
  "JetVersion": "13.0.0",
170
177
  "componentName": "oj-progress-circle",
171
178
  "metadata": "progressCircleMetadata",
172
- "migrationApiLink": "https://jet.oraclecorp.com/trunk/jsdocs/oj.ojProgressCircle.html#migration-section"
179
+ "migrationApiLink": "https://www.oracle.com/webfolder/technetwork/jet/jsdocs/oj.ojProgressCircle.html#migration-section"
173
180
  },
174
181
  {
175
182
  "JetVersion": "13.0.0",
176
183
  "componentName": "oj-progress-bar",
177
184
  "metadata": "progressBarMetadata",
178
- "migrationApiLink": "https://jet.oraclecorp.com/trunk/jsdocs/oj.ojProgressBar.html#migration-section"
185
+ "migrationApiLink": "https://www.oracle.com/webfolder/technetwork/jet/jsdocs/oj.ojProgressBar.html#migration-section"
179
186
  },
180
187
  {
181
188
  "JetVersion": "13.0.0",
182
189
  "componentName": "oj-rating-gauge",
183
190
  "metadata": "ratingGaugeMetadata",
184
- "migrationApiLink": "https://jet.oraclecorp.com/trunk/jsdocs/oj.ojRatingGauge.html#migration-section"
191
+ "migrationApiLink": "https://www.oracle.com/webfolder/technetwork/jet/jsdocs/oj.ojRatingGauge.html#migration-section"
185
192
  },
186
193
  {
187
194
  "JetVersion": "16.0.0",
188
195
  "componentName": "oj-radioset",
189
- "migrationApiLink": "https://jet.oraclecorp.com/trunk/jsdocs/oj.ojRadioset.html#migration-section",
196
+ "metadata": "radiosetMetadata",
197
+ "migrationApiLink": "https://www.oracle.com/webfolder/technetwork/jet/jsdocs/oj.ojRadioset.html#migration-section",
190
198
  "dataDriven": "true"
191
199
  },
192
200
  {
193
- "JetVersion": "19.0.0",
201
+ "JetVersion": "20.0.0",
194
202
  "componentName": "oj-select-single",
195
203
  "metadata": "selectSingleMetadata",
196
- "migrationApiLink": "https://jet.oraclecorp.com/trunk/jsdocs/oj.ojSelectSingle.html#migration-section"
204
+ "migrationApiLink": "https://www.oracle.com/webfolder/technetwork/jet/jsdocs/oj.ojSelectSingle.html#migration-section"
197
205
  },
198
206
  {
199
207
  "JetVersion": "13.0.0",
200
208
  "componentName": "oj-select-many",
201
- "migrationApiLink": "https://jet.oraclecorp.com/trunk/jsdocs/oj.ojSelectMany.html#migration-section",
209
+ "migrationApiLink": "https://www.oracle.com/webfolder/technetwork/jet/jsdocs/oj.ojSelectMany.html#migration-section",
202
210
  "dataDriven": "true"
203
211
  },
204
212
  {
205
213
  "JetVersion": "15.0.0",
206
214
  "componentName": "oj-selector",
207
215
  "metadata": "selectorMetadata",
208
- "migrationApiLink": "https://jet.oraclecorp.com/trunk/jsdocs/oj.ojSelector.html#migration-section"
216
+ "migrationApiLink": "https://www.oracle.com/webfolder/technetwork/jet/jsdocs/oj.ojSelector.html#migration-section"
209
217
  },
210
218
  {
211
219
  "JetVersion": "14.0.0",
212
220
  "componentName": "oj-status-meter-gauge",
213
221
  "metadata": "statusMeterGaugeMetadata",
214
- "migrationApiLink": "https://jet.oraclecorp.com/trunk/jsdocs/oj.ojStatusMeterGauge.html#migration-section"
222
+ "migrationApiLink": "https://www.oracle.com/webfolder/technetwork/jet/jsdocs/oj.ojStatusMeterGauge.html#migration-section"
215
223
  },
216
224
  {
217
- "JetVersion": "19.0.0",
225
+ "JetVersion": "20.0.0",
218
226
  "componentName": "oj-tab-bar",
219
- "migrationApiLink": "https://jet.oraclecorp.com/trunk/jsdocs/oj.ojTabBar.html#migration-section",
227
+ "migrationApiLink": "https://www.oracle.com/webfolder/technetwork/jet/jsdocs/oj.ojTabBar.html#migration-section",
220
228
  "dataDriven": "true"
221
229
  },
222
230
  {
223
- "JetVersion": "19.0.0",
231
+ "JetVersion": "20.0.0",
224
232
  "componentName": "oj-tag-cloud",
225
233
  "metadata": "tagCloudMetadata",
226
- "migrationApiLink": "https://jet.oraclecorp.com/trunk/jsdocs/oj.ojTagCloud.html#migration-section"
234
+ "migrationApiLink": "https://www.oracle.com/webfolder/technetwork/jet/jsdocs/oj.ojTagCloud.html#migration-section"
227
235
  },
228
236
  {
229
- "JetVersion": "19.0.0",
237
+ "JetVersion": "20.0.0",
230
238
  "componentName": "oj-tag-cloud-item",
231
239
  "metadata": "tagCloudItemMetadata",
232
- "migrationApiLink": "https://jet.oraclecorp.com/trunk/jsdocs/oj.ojTagCloudItem.html#migration-section"
240
+ "migrationApiLink": "https://www.oracle.com/webfolder/technetwork/jet/jsdocs/oj.ojTagCloudItem.html#migration-section"
233
241
  },
234
242
  {
235
243
  "JetVersion": "13.0.0",
236
244
  "componentName": "oj-text-area",
237
245
  "metadata": "textAreaMetadata",
238
- "migrationApiLink": "https://jet.oraclecorp.com/trunk/jsdocs/oj.ojTextArea.html#migration-section"
246
+ "migrationApiLink": "https://www.oracle.com/webfolder/technetwork/jet/jsdocs/oj.ojTextArea.html#migration-section"
239
247
  }
240
248
  ]
@@ -1,5 +1,5 @@
1
1
  {
2
- "jetVersion": "18.0.0",
2
+ "jetVersion": "19.0.0",
3
3
  "excludeFolders": [
4
4
  ".tscache",
5
5
  ".vs",
@@ -3,8 +3,8 @@
3
3
  * Licensed under The Universal Permissive License (UPL), Version 1.0
4
4
  * as shown at https://oss.oracle.com/licenses/upl/
5
5
  */
6
- function consoleLog(text){global.jaf.log.console(text)}function consoleWarning(text){let clr=global.jaf.utils.color;let warnMsg=`\n[Warn]: ${text}`;global.jaf.log.console(clr.PINK(warnMsg))}function logMessage(text){global.jaf.log.msg(text)}function logFilePath(filepath,err){if(err){global.jaf.log.msg(`\nFile in: ${filepath}`)}else{global.jaf.log.msg(`\nMigrating in: ${filepath}`)}}function logImportUpdate(from,to){global.jaf.log.msg(`\tImport: Updated from "${from}" to "${to}"`)}function logImportAppend(to,from){global.jaf.log.msg(`\tImport: Appended "${to}" ${from?`to "${from}"`:""}`)}function logMissingImport(component,to){global.jaf.log.msg(`\tImport: Added "${to}" for "${component}" to top of file due to missing import`)}function logTagMigration(from,to,isDescendant){let msg="";isDescendant?msg=`\t\tDescendant tag migrated from "${from}" to "${to}"`:msg=`\tTag migrated from "${from}" to "${to}"`;return msg}function logTagProcessed(component){return`\tProcessed tag: "${component}"`}function logClassNameToAttribute(className,attribute,value){return`\t\tClass name of "${className}" migrated to "${attribute}" attribute with value of "${value}"`}function logAttributeMigration(fromAtt,fromVal,toAtt,toVal){let msg="";toVal?msg=`\t\tAttribute migrated from "${fromAtt}" with a value of "${fromVal}" to "${toAtt}" with a value of "${toVal}"`:msg=`\t\tAttribute migrated from "${fromAtt}" to "${toAtt}"`;return msg}function logAttributeDeprecation(from,fromVal){return`\t\tAttribute deprecated, removed "${from}" ${fromVal?`with a value of "${fromVal}"`:""}`}function logAttributeAddition(toAtt,toVal,toTag){return`\t\tAttribute added, "${toAtt}" with a value of "${toVal}"${toTag?` to "${toTag}"`:""}`}function logAttributeTransfer(fromTag,toTag,att,val){return`\t\tAttribute "${att}" with value "${val}" transferred from "${fromTag}" to "${toTag}"`}function logObjectManipulation(attribute,key,newKey,value,newValue){return`\t\tKey value pair in "${attribute}" value migrated from key "${key}" with value "${value}" to key "${newKey}" with value "${newValue}"`}function logTypeMigration(fromType,toType){global.jaf.log.msg(`\tType migrated from "${fromType}" to "${toType}"`)}function logLocatorMigration(fromLoc,toLoc,variable){global.jaf.log.msg(`\tLocator migrated from "${fromLoc}" to "${toLoc}" ${variable?`on "${variable}"`:""}`)}function logMethodDeprecation(method,webElement){global.jaf.log.msg(`\tTest will fail: Method "${method}" is not supported for corepack "${webElement}"`)}function logTestAttributeDeprecation(attribute,value,webElement){global.jaf.log.msg(`\tTest will fail: Attribute "${attribute}" ${value?`with a value of "${value}"`:""} was dprecated for core pack "${webElement}"`)}function logTestAttributeMigration(fromAtt,toAtt,fromVal,toVal){global.jaf.log.msg(`\tAttribute migrated from "${fromAtt}" ${fromVal?`with a value of "${fromVal}" to "${toAtt}" ${toVal?`with a value of "${toVal}"`:""}`:`to "${toAtt}"`}`)}function logIgnoreComponent(component,attribute,value,parent,missingAtt=false,msg){if(parent){if(attribute){global.jaf.log.msg(`\tRule to ignore: "${parent}" filtered out due to${missingAtt?" missing ":" "}attribute "${attribute}" ${value?`with value of "${value}" `:""}on descendant "${component}"`)}else{global.jaf.log.msg(`\tRule to ignore: "${parent}" filtered out due to descendant "${component}"`)}}else if(attribute){if(typeof attribute==="object"){const keys=Object.keys(attribute);let key=keys[0];value=attribute[key];attribute=key}global.jaf.log.msg(`\tRule to ignore: "${component}" filtered out due to${missingAtt?" missing ":" "}attribute "${attribute}"${value?` with value of "${value}"`:""}${msg?`. ${msg}`:""}`)}else{global.jaf.log.msg(`\tIgnored "${component}" processing. There is nothing to process for this component`)}}function logComponentReplacement(component,replacement){return`\t\tComponent "${component}" replaced by "${replacement}"`}function logComponentRemoved(component){return`\t\tComponent "${component}" was removed`}function logIgnoreDataDriven(component){global.jaf.log.msg(`\t"${component}" migration ignored due to being data driven. Manual migration is required until the component migration is supported.`)}function logCommentSlotContent(component,value,child){const msg=`\t\tCommented out "${component}"'s descendant ${child?`"${child}"`:""} with "slot" attribute having value of "${value}"`;return msg}function logSlotContentToAttribute(component,attribute,value){let msg="";value?msg=`\t\tSlot migrated: "${component}" added attribute "${attribute}" with value of "${value}"`:msg=`\t\tSlot migration ignored: "${component}" did not add attribute "${attribute}" due to value of "${value}"`;return msg}function logAttributeExpression(component,attribute,value){global.jaf.log.msg(`\t\tAttribute expression: "${component}" has attribute "${attribute}" with value as expression of "${value}"`)}function logExcludeAttributeExpression(component,attribute,value){global.jaf.log.msg(`\tMigration skipped: "${component}" has attribute "${attribute}" with value as expression of "${value}"`)}function logIncludeExcludeIssue(type){const text=`\nMigration attempt exited. The migration config file used has values for both include${type} and exclude${type}. Please use only one or the other.`;global.jaf.log.msg(text);consoleLog(text)}function logAttributeWarning(attribute){return`\t\tWarning: Attribute "${attribute}" might need manual migration. Please see component's migration section`}function logCompMetrics(componentsInfo,time,logFile,dr){logFile=logFile.split("\n");let overallMetrics=`
6
+ function consoleLog(text){global.jaf.log.console(text)}function consoleWarning(text){let clr=global.jaf.utils.color;let warnMsg=`\n[Warn]: ${text}`;global.jaf.log.console(clr.PINK(warnMsg))}function logMessage(text){global.jaf.log.msg(text)}function logFilePath(filepath,err){if(err){global.jaf.log.msg(`\nFile in: ${filepath}`)}else{global.jaf.log.msg(`\nMigrating in: ${filepath}`)}}function logImportUpdate(from,to){global.jaf.log.msg(`\tImport: Updated from "${from}" to "${to}"`)}function logImportAppend(to,from,toModel){global.jaf.log.msg(`\tImport: Appended "${to}"${from?` to "${from}"`:""}${toModel?" to model file":""}`)}function logMissingImport(component,to){global.jaf.log.msg(`\tImport: Added "${to}" for "${component}" to top of file due to missing import`)}function logTagMigration(from,to,isDescendant){let msg="";isDescendant?msg=`\t\tDescendant tag migrated from "${from}" to "${to}"`:msg=`\tTag migrated from "${from}" to "${to}"`;return msg}function logClassToTagMigration(from,className,to,isDescendant){let msg="";isDescendant?msg=`\t\tDescendant element with class "${className}" migrated from ${from} to ${to}`:msg=`\tElement with class "${className}" migrated from "${from}" to "${to}"`;return msg}function logTagProcessed(component){return`\tProcessed tag: "${component}"`}function logClassNameToAttribute(className,attribute,value){return`\t\tClass name of "${className}" migrated to "${attribute}" attribute with value of "${value}"`}function logAttributeMigration(fromAtt,fromVal,toAtt,toVal){let msg="";toVal?msg=`\t\tAttribute migrated from "${fromAtt}" with a value of "${fromVal}" to "${toAtt}" with a value of "${toVal}"`:msg=`\t\tAttribute migrated from "${fromAtt}" to "${toAtt}"`;return msg}function logAttributeDeprecation(from,fromVal){return`\t\tAttribute deprecated, removed "${from}" ${fromVal?`with a value of "${fromVal}"`:""}`}function logAttributeAddition(toAtt,toVal,toTag){return`\t\tAttribute added, "${toAtt}" with a value of "${toVal}"${toTag?` to "${toTag}"`:""}`}function logAttributeTransfer(fromTag,toTag,att,val){return`\t\tAttribute "${att}" with value "${val}" transferred from "${fromTag}" to "${toTag}"`}function logObjectManipulation(attribute,key,newKey,value,newValue){return`\t\tKey value pair in "${attribute}" value migrated from key "${key}" with value "${value}" to key "${newKey}" with value "${newValue}"`}function logTypeMigration(fromType,toType){global.jaf.log.msg(`\tType migrated from "${fromType}" to "${toType}"`)}function logLocatorMigration(fromLoc,toLoc,variable){global.jaf.log.msg(`\tLocator migrated from "${fromLoc}" to "${toLoc}" ${variable?`on "${variable}"`:""}`)}function logMethodDeprecation(method,webElement){global.jaf.log.msg(`\tTest will fail: Method "${method}" is not supported for corepack "${webElement}"`)}function logTestAttributeDeprecation(attribute,value,webElement){global.jaf.log.msg(`\tTest will fail: Attribute "${attribute}" ${value?`with a value of "${value}"`:""} was dprecated for core pack "${webElement}"`)}function logTestAttributeMigration(fromAtt,toAtt,fromVal,toVal){global.jaf.log.msg(`\tAttribute migrated from "${fromAtt}" ${fromVal?`with a value of "${fromVal}" to "${toAtt}" ${toVal?`with a value of "${toVal}"`:""}`:`to "${toAtt}"`}`)}function logIgnoreComponent(component,attribute,value,parent,missingAtt=false,msg){if(parent){if(attribute){global.jaf.log.msg(`\tRule to ignore: "${parent}" filtered out due to${missingAtt?" missing ":" "}attribute "${attribute}" ${value?`with value of "${value}" `:""}on descendant "${component}"`)}else{global.jaf.log.msg(`\tRule to ignore: "${parent}" filtered out due to descendant "${component}"`)}}else if(attribute){if(typeof attribute==="object"){const keys=Object.keys(attribute);let key=keys[0];value=attribute[key];attribute=key}global.jaf.log.msg(`\tRule to ignore: "${component}" filtered out due to${missingAtt?" missing ":" "}attribute "${attribute}"${value?` with value of "${value}"`:""}${msg?`. ${msg}`:""}`)}else if(msg){global.jaf.log.msg(`\tRule to ignore: "${component}" filtered out${msg?`. ${msg}`:""}`)}else{global.jaf.log.msg(`\tIgnored "${component}" processing. There is nothing to process for this component`)}}function logComponentReplacement(component,replacement){return`\t\tComponent "${component}" replaced by "${replacement}"`}function logComponentRemoved(component){return`\t\tComponent "${component}" was removed`}function logIgnoreDataDriven(component){global.jaf.log.msg(`\t"${component}" migration ignored due to being data driven. Manual migration is required until the component migration is supported.`)}function logCommentSlotContent(component,value,child){const msg=`\t\tCommented out "${component}"'s descendant ${child?`"${child}"`:""} with "slot" attribute having value of "${value}"`;return msg}function logSlotContentToAttribute(component,attribute,value){let msg="";value?msg=`\t\tSlot migrated: "${component}" added attribute "${attribute}" with value of "${value}"`:msg=`\t\tSlot migration ignored: "${component}" did not add attribute "${attribute}" due to value of "${value}"`;return msg}function logAttributeExpression(component,attribute,value){global.jaf.log.msg(`\t\tAttribute expression: "${component}" has attribute "${attribute}" with value as expression of "${value}"`)}function logExcludeAttributeExpression(component,attribute,value){global.jaf.log.msg(`\tMigration skipped: "${component}" has attribute "${attribute}" with value as expression of "${value}"`)}function logIncludeExcludeIssue(type){const text=`\nMigration attempt exited. The migration config file used has values for both include${type} and exclude${type}. Please use only one or the other.`;global.jaf.log.msg(text);consoleLog(text)}function logAttributeWarning(attribute){return`\t\tWarning: Attribute "${attribute}" might need manual migration. Please see component's migration section`}function logOptionMigration(itemTag,attribute,obj){return`\t\t"${itemTag}"'s content moved to "${attribute}" attribute as ${obj}`}function logMapperRequest(component){global.jaf.log.msg(`\tSkipped migration for "${component}". To migrate please provide view/model information through config file. For more detail see migration user guide linked at the end of this file`)}function logCompMetrics(componentsInfo,time,logFile,dr){logFile=logFile.split("\n");let overallMetrics=`
7
7
  Overall metrics
8
8
  \tFiles Updated: ${global.migrationMetrics.files}
9
9
  \tComponent Instances Migrated: ${global.migrationMetrics.components}
10
- \tTime for migration: ${time}`;let appTotal=0;let appMigrated=0;let appInfo={skipped:{},migrated:{}};let fileSpecificMetrics=``;let componentMetrics=`\n\nComponent Migration Metrics`;for(let fileInfo of componentsInfo){let fileTotal=0;let fileMigrated=0;let percentage=0;let compTotal=0;fileSpecificMetrics+=`\n\nFile in: ${fileInfo.path}`;for(let key of Object.keys(fileInfo.migrated)){if(appInfo.migrated[key]){appInfo.migrated[key]+=fileInfo.migrated[key]}else{appInfo.migrated[key]=fileInfo.migrated[key]}compTotal=0;fileTotal+=fileInfo.migrated[key];fileMigrated+=fileInfo.migrated[key];compTotal+=fileInfo.migrated[key];if(fileInfo.skipped[key]){fileTotal+=fileInfo.skipped[key];compTotal+=fileInfo.skipped[key];if(appInfo.skipped[key]){appInfo.skipped[key]+=fileInfo.skipped[key]}else{appInfo.skipped[key]=fileInfo.skipped[key]}}percentage=fileInfo.migrated[key]*100/compTotal;fileSpecificMetrics+=`\n\t"${key}": ${fileInfo.migrated[key]}/${compTotal} ${Math.floor(percentage)}%`}for(let key of Object.keys(fileInfo.skipped)){if(!fileInfo.migrated[key]){if(appInfo.skipped[key]){appInfo.skipped[key]+=fileInfo.skipped[key]}else{appInfo.skipped[key]=fileInfo.skipped[key]}fileTotal+=fileInfo.skipped[key];fileSpecificMetrics+=`\n\t"${key}": 0/${fileInfo.skipped[key]} 0%`}}appTotal+=fileTotal;appMigrated+=fileMigrated;percentage=fileTotal?fileMigrated*100/fileTotal:0;fileSpecificMetrics+=`\n\tFile total: ${fileMigrated}/${fileTotal} ${Math.floor(percentage)}%`}for(let key of Object.keys(appInfo.migrated)){compTotal=appInfo.migrated[key];if(appInfo.skipped[key]){compTotal+=appInfo.skipped[key]}percentage=appTotal?appInfo.migrated[key]*100/compTotal:0;componentMetrics+=`\n\t"${key}": ${appInfo.migrated[key]}/${compTotal} ${Math.floor(percentage)}%`}for(let key of Object.keys(appInfo.skipped)){if(!appInfo.migrated[key]){componentMetrics+=`\n\t"${key}": 0/${appInfo.skipped[key]} 0%`}}percentage=appTotal?appMigrated*100/appTotal:0;componentMetrics+=`\n\tTotal: ${appMigrated}/${appTotal} ${Math.floor(percentage)}%`;let data=overallMetrics+componentMetrics+fileSpecificMetrics;if(dr){logFile.splice(2,0,data)}else{logFile.unshift(data)}logFile=logFile.join(`\n`);return logFile}function logApiLinks(){global.jaf.log.msg(`\nComponent API Migration Sections`);global.manifestData.forEach(component=>{if(component.migrationApiLink){global.jaf.log.msg(`\t${component.componentName}: ${component.migrationApiLink}`)}})}exports.consoleLog=consoleLog;exports.consoleWarning=consoleWarning;exports.logMessage=logMessage;exports.logFilePath=logFilePath;exports.logImportUpdate=logImportUpdate;exports.logImportAppend=logImportAppend;exports.logMissingImport=logMissingImport;exports.logTagMigration=logTagMigration;exports.logTagProcessed=logTagProcessed;exports.logClassNameToAttribute=logClassNameToAttribute;exports.logAttributeMigration=logAttributeMigration;exports.logAttributeDeprecation=logAttributeDeprecation;exports.logAttributeAddition=logAttributeAddition;exports.logAttributeTransfer=logAttributeTransfer;exports.logObjectManipulation=logObjectManipulation;exports.logTypeMigration=logTypeMigration;exports.logLocatorMigration=logLocatorMigration;exports.logMethodDeprecation=logMethodDeprecation;exports.logTestAttributeDeprecation=logTestAttributeDeprecation;exports.logTestAttributeMigration=logTestAttributeMigration;exports.logIgnoreComponent=logIgnoreComponent;exports.logComponentReplacement=logComponentReplacement;exports.logComponentRemoved=logComponentRemoved;exports.logIgnoreDataDriven=logIgnoreDataDriven;exports.logCommentSlotContent=logCommentSlotContent;exports.logCompMetrics=logCompMetrics;exports.logSlotContentToAttribute=logSlotContentToAttribute;exports.logAttributeExpression=logAttributeExpression;exports.logExcludeAttributeExpression=logExcludeAttributeExpression;exports.logIncludeExcludeIssue=logIncludeExcludeIssue;exports.logAttributeWarning=logAttributeWarning;exports.logApiLinks=logApiLinks;
10
+ \tTime for migration: ${time}`;let appTotal=0;let appMigrated=0;let appInfo={skipped:{},migrated:{}};let fileSpecificMetrics=``;let componentMetrics=`\n\nComponent Migration Metrics`;for(let fileInfo of componentsInfo){let fileTotal=0;let fileMigrated=0;let percentage=0;let compTotal=0;fileSpecificMetrics+=`\n\nFile in: ${fileInfo.path}`;for(let key of Object.keys(fileInfo.migrated)){if(appInfo.migrated[key]){appInfo.migrated[key]+=fileInfo.migrated[key]}else{appInfo.migrated[key]=fileInfo.migrated[key]}compTotal=0;fileTotal+=fileInfo.migrated[key];fileMigrated+=fileInfo.migrated[key];compTotal+=fileInfo.migrated[key];if(fileInfo.skipped[key]){fileTotal+=fileInfo.skipped[key];compTotal+=fileInfo.skipped[key];if(appInfo.skipped[key]){appInfo.skipped[key]+=fileInfo.skipped[key]}else{appInfo.skipped[key]=fileInfo.skipped[key]}}percentage=fileInfo.migrated[key]*100/compTotal;fileSpecificMetrics+=`\n\t"${key}": ${fileInfo.migrated[key]}/${compTotal} ${Math.floor(percentage)}%`}for(let key of Object.keys(fileInfo.skipped)){if(!fileInfo.migrated[key]){if(appInfo.skipped[key]){appInfo.skipped[key]+=fileInfo.skipped[key]}else{appInfo.skipped[key]=fileInfo.skipped[key]}fileTotal+=fileInfo.skipped[key];fileSpecificMetrics+=`\n\t"${key}": 0/${fileInfo.skipped[key]} 0%`}}appTotal+=fileTotal;appMigrated+=fileMigrated;percentage=fileTotal?fileMigrated*100/fileTotal:0;fileSpecificMetrics+=`\n\tFile total: ${fileMigrated}/${fileTotal} ${Math.floor(percentage)}%`}for(let key of Object.keys(appInfo.migrated)){compTotal=appInfo.migrated[key];if(appInfo.skipped[key]){compTotal+=appInfo.skipped[key]}percentage=appTotal?appInfo.migrated[key]*100/compTotal:0;componentMetrics+=`\n\t"${key}": ${appInfo.migrated[key]}/${compTotal} ${Math.floor(percentage)}%`}for(let key of Object.keys(appInfo.skipped)){if(!appInfo.migrated[key]){componentMetrics+=`\n\t"${key}": 0/${appInfo.skipped[key]} 0%`}}percentage=appTotal?appMigrated*100/appTotal:0;componentMetrics+=`\n\tTotal: ${appMigrated}/${appTotal} ${Math.floor(percentage)}%`;let data=overallMetrics+componentMetrics+fileSpecificMetrics;if(dr){logFile.splice(2,0,data)}else{logFile.unshift(data)}logFile=logFile.join(`\n`);return logFile}function logApiLinks(){global.jaf.log.msg(`\nComponent API Migration Sections`);global.manifestData.forEach(component=>{if(component.migrationApiLink){global.jaf.log.msg(`\t${component.componentName?component.componentName:component.componentClass}: ${component.migrationApiLink}`)}});global.jaf.log.msg(`\n\tMigration user guide: https://confluence.oraclecorp.com/confluence/display/JET/Oracle+JET+Migration+Framework+User+Guide`)}exports.consoleLog=consoleLog;exports.consoleWarning=consoleWarning;exports.logMessage=logMessage;exports.logFilePath=logFilePath;exports.logImportUpdate=logImportUpdate;exports.logImportAppend=logImportAppend;exports.logMissingImport=logMissingImport;exports.logTagMigration=logTagMigration;exports.logTagProcessed=logTagProcessed;exports.logClassToTagMigration=logClassToTagMigration;exports.logClassNameToAttribute=logClassNameToAttribute;exports.logAttributeMigration=logAttributeMigration;exports.logAttributeDeprecation=logAttributeDeprecation;exports.logAttributeAddition=logAttributeAddition;exports.logAttributeTransfer=logAttributeTransfer;exports.logObjectManipulation=logObjectManipulation;exports.logTypeMigration=logTypeMigration;exports.logLocatorMigration=logLocatorMigration;exports.logMethodDeprecation=logMethodDeprecation;exports.logTestAttributeDeprecation=logTestAttributeDeprecation;exports.logTestAttributeMigration=logTestAttributeMigration;exports.logIgnoreComponent=logIgnoreComponent;exports.logComponentReplacement=logComponentReplacement;exports.logComponentRemoved=logComponentRemoved;exports.logIgnoreDataDriven=logIgnoreDataDriven;exports.logCommentSlotContent=logCommentSlotContent;exports.logCompMetrics=logCompMetrics;exports.logSlotContentToAttribute=logSlotContentToAttribute;exports.logAttributeExpression=logAttributeExpression;exports.logExcludeAttributeExpression=logExcludeAttributeExpression;exports.logIncludeExcludeIssue=logIncludeExcludeIssue;exports.logAttributeWarning=logAttributeWarning;exports.logMapperRequest=logMapperRequest;exports.logApiLinks=logApiLinks;exports.logOptionMigration=logOptionMigration;