@lambdatest/smartui-cli 4.1.17 → 4.1.18
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.cjs +21 -12
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -432,7 +432,7 @@ var constants_default = {
|
|
|
432
432
|
},
|
|
433
433
|
FIGMA_API: "https://api.figma.com/v1/",
|
|
434
434
|
DEFAULT_FIGMA_CONFIG: {
|
|
435
|
-
"depth":
|
|
435
|
+
"depth": 1,
|
|
436
436
|
"figma_config": [
|
|
437
437
|
{
|
|
438
438
|
"figma_file_token": "token_for_first_figma_file",
|
|
@@ -453,7 +453,7 @@ var constants_default = {
|
|
|
453
453
|
]
|
|
454
454
|
},
|
|
455
455
|
figma: {
|
|
456
|
-
"depth":
|
|
456
|
+
"depth": 1,
|
|
457
457
|
"configs": [
|
|
458
458
|
{
|
|
459
459
|
"figma_file_token": "<token>",
|
|
@@ -480,7 +480,7 @@ var constants_default = {
|
|
|
480
480
|
}
|
|
481
481
|
],
|
|
482
482
|
figma: {
|
|
483
|
-
"depth":
|
|
483
|
+
"depth": 1,
|
|
484
484
|
"configs": [
|
|
485
485
|
{
|
|
486
486
|
"figma_file_token": "<token>",
|
|
@@ -751,6 +751,10 @@ var ConfigSchema = {
|
|
|
751
751
|
errorMessage: {
|
|
752
752
|
uniqueItems: "Invalid config; duplicates in requestHeaders"
|
|
753
753
|
}
|
|
754
|
+
},
|
|
755
|
+
allowDuplicateSnapshotNames: {
|
|
756
|
+
type: "boolean",
|
|
757
|
+
errorMessage: "Invalid config; allowDuplicateSnapshotNames must be true/false"
|
|
754
758
|
}
|
|
755
759
|
},
|
|
756
760
|
anyOf: [
|
|
@@ -998,8 +1002,8 @@ var FigmaDesignConfigSchema = {
|
|
|
998
1002
|
properties: {
|
|
999
1003
|
depth: {
|
|
1000
1004
|
type: "integer",
|
|
1001
|
-
minimum:
|
|
1002
|
-
errorMessage: "Depth must be an integer and greater than
|
|
1005
|
+
minimum: 1,
|
|
1006
|
+
errorMessage: "Depth must be an integer and greater than 0"
|
|
1003
1007
|
},
|
|
1004
1008
|
figma_config: {
|
|
1005
1009
|
type: "array",
|
|
@@ -1071,8 +1075,8 @@ var FigmaWebConfigSchema = {
|
|
|
1071
1075
|
"properties": {
|
|
1072
1076
|
depth: {
|
|
1073
1077
|
type: "integer",
|
|
1074
|
-
minimum:
|
|
1075
|
-
errorMessage: "Depth must be an integer and greater than
|
|
1078
|
+
minimum: 1,
|
|
1079
|
+
errorMessage: "Depth must be an integer and greater than 0"
|
|
1076
1080
|
},
|
|
1077
1081
|
"configs": {
|
|
1078
1082
|
"type": "array",
|
|
@@ -1185,8 +1189,8 @@ var FigmaAppConfigSchema = {
|
|
|
1185
1189
|
"properties": {
|
|
1186
1190
|
depth: {
|
|
1187
1191
|
type: "integer",
|
|
1188
|
-
minimum:
|
|
1189
|
-
errorMessage: "Depth must be an integer and greater than
|
|
1192
|
+
minimum: 1,
|
|
1193
|
+
errorMessage: "Depth must be an integer and greater than 0"
|
|
1190
1194
|
},
|
|
1191
1195
|
"configs": {
|
|
1192
1196
|
"type": "array",
|
|
@@ -1873,7 +1877,7 @@ var authExec_default = (ctx) => {
|
|
|
1873
1877
|
};
|
|
1874
1878
|
|
|
1875
1879
|
// package.json
|
|
1876
|
-
var version = "4.1.
|
|
1880
|
+
var version = "4.1.18";
|
|
1877
1881
|
var package_default = {
|
|
1878
1882
|
name: "@lambdatest/smartui-cli",
|
|
1879
1883
|
version,
|
|
@@ -2467,6 +2471,7 @@ var ctx_default = (options) => {
|
|
|
2467
2471
|
let fetchResultObj;
|
|
2468
2472
|
let fetchResultsFileObj;
|
|
2469
2473
|
let buildNameObj;
|
|
2474
|
+
let allowDuplicateSnapshotNames = false;
|
|
2470
2475
|
try {
|
|
2471
2476
|
if (options.config) {
|
|
2472
2477
|
config = JSON.parse(fs5__default.default.readFileSync(options.config, "utf-8"));
|
|
@@ -2527,6 +2532,9 @@ var ctx_default = (options) => {
|
|
|
2527
2532
|
if (config.tunnel) {
|
|
2528
2533
|
tunnelObj = config.tunnel;
|
|
2529
2534
|
}
|
|
2535
|
+
if (config.allowDuplicateSnapshotNames) {
|
|
2536
|
+
allowDuplicateSnapshotNames = true;
|
|
2537
|
+
}
|
|
2530
2538
|
return {
|
|
2531
2539
|
env,
|
|
2532
2540
|
log: logger_default,
|
|
@@ -2550,7 +2558,8 @@ var ctx_default = (options) => {
|
|
|
2550
2558
|
skipBuildCreation: (_j = config.skipBuildCreation) != null ? _j : false,
|
|
2551
2559
|
tunnel: tunnelObj,
|
|
2552
2560
|
userAgent: config.userAgent || "",
|
|
2553
|
-
requestHeaders: config.requestHeaders || {}
|
|
2561
|
+
requestHeaders: config.requestHeaders || {},
|
|
2562
|
+
allowDuplicateSnapshotNames
|
|
2554
2563
|
},
|
|
2555
2564
|
uploadFilePath: "",
|
|
2556
2565
|
webStaticConfig: [],
|
|
@@ -3825,7 +3834,7 @@ var Queue = class {
|
|
|
3825
3834
|
if (this.ctx.isStartExec && !this.ctx.config.tunnel) {
|
|
3826
3835
|
this.ctx.log.info(`Processing Snapshot: ${snapshot == null ? void 0 : snapshot.name}`);
|
|
3827
3836
|
}
|
|
3828
|
-
if (!this.ctx.config.delayedUpload && snapshot && snapshot.name && this.snapshotNames.includes(snapshot.name)) {
|
|
3837
|
+
if (!this.ctx.config.delayedUpload && snapshot && snapshot.name && this.snapshotNames.includes(snapshot.name) && !this.ctx.config.allowDuplicateSnapshotNames) {
|
|
3829
3838
|
drop = true;
|
|
3830
3839
|
this.ctx.log.info(`Skipping duplicate SmartUI snapshot '${snapshot.name}'. To capture duplicate screenshots, please set the 'delayedUpload' configuration as true in your config file.`);
|
|
3831
3840
|
}
|