@gpc-cli/core 0.9.22 → 0.9.23
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/dist/index.js +23 -5
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -242,11 +242,29 @@ function buildTestCase(item, commandName, index = 0) {
|
|
|
242
242
|
};
|
|
243
243
|
}
|
|
244
244
|
const record = item;
|
|
245
|
-
const
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
245
|
+
const CANDIDATE_KEYS = [
|
|
246
|
+
"name",
|
|
247
|
+
"title",
|
|
248
|
+
"sku",
|
|
249
|
+
"id",
|
|
250
|
+
"reviewId",
|
|
251
|
+
"productId",
|
|
252
|
+
"packageName",
|
|
253
|
+
"track",
|
|
254
|
+
"trackId",
|
|
255
|
+
"versionCode",
|
|
256
|
+
"region",
|
|
257
|
+
"languageCode"
|
|
258
|
+
];
|
|
259
|
+
let resolvedName = `item-${index + 1}`;
|
|
260
|
+
for (const key of CANDIDATE_KEYS) {
|
|
261
|
+
const val = record[key];
|
|
262
|
+
if (val != null && val !== "" && val !== "-") {
|
|
263
|
+
resolvedName = String(val);
|
|
264
|
+
break;
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
const name = escapeXml(resolvedName);
|
|
250
268
|
const classname = `gpc.${escapeXml(commandName)}`;
|
|
251
269
|
const breached = record["breached"];
|
|
252
270
|
if (breached === true) {
|