tango-app-api-analysis-traffic 3.8.23 → 3.8.24
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/package.json
CHANGED
|
@@ -1082,6 +1082,13 @@ export async function exportRevopTagging( req, res ) {
|
|
|
1082
1082
|
}
|
|
1083
1083
|
|
|
1084
1084
|
const exportData = [];
|
|
1085
|
+
// Convert camelCase revopsType to space-separated, capitalized words (e.g. nonShopper -> Non Shopper)
|
|
1086
|
+
const camelCaseToTitle = ( str ) => {
|
|
1087
|
+
if ( !str ) return '';
|
|
1088
|
+
return `${str}`
|
|
1089
|
+
.replace( /([a-z0-9])([A-Z])/g, '$1 $2' )
|
|
1090
|
+
.replace( /^./, ( s ) => s.toUpperCase() );
|
|
1091
|
+
};
|
|
1085
1092
|
logger.info( { allHits: allHits } );
|
|
1086
1093
|
for ( const hit of allHits ) {
|
|
1087
1094
|
const src = hit._source || {};
|
|
@@ -1121,7 +1128,7 @@ export async function exportRevopTagging( req, res ) {
|
|
|
1121
1128
|
const subCategory = Array.isArray( issueItem?.issue ) ? issueItem.issue.join( ', ' ) : ( issueItem?.issue || '' );
|
|
1122
1129
|
exportData.push( {
|
|
1123
1130
|
...base,
|
|
1124
|
-
'Tag Type': revopsType,
|
|
1131
|
+
'Tag Type': camelCaseToTitle( revopsType ),
|
|
1125
1132
|
'Tagged Category': issueItem?.name || '',
|
|
1126
1133
|
'Tagged Sub Category': subCategory,
|
|
1127
1134
|
'Description': src.description || '',
|
|
@@ -1130,7 +1137,7 @@ export async function exportRevopTagging( req, res ) {
|
|
|
1130
1137
|
} else {
|
|
1131
1138
|
exportData.push( {
|
|
1132
1139
|
...base,
|
|
1133
|
-
'Tag Type': revopsType,
|
|
1140
|
+
'Tag Type': camelCaseToTitle( revopsType ),
|
|
1134
1141
|
'Tagged Category': typeLower === 'nonshopper' ? ( src.nonshoperType || '' ) : '',
|
|
1135
1142
|
'Tagged Sub Category': '',
|
|
1136
1143
|
'Description': src.description || '',
|