@lambdatest/smartui-cli 4.1.13 → 4.1.15
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 +29 -11
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1856,7 +1856,7 @@ var authExec_default = (ctx) => {
|
|
|
1856
1856
|
};
|
|
1857
1857
|
|
|
1858
1858
|
// package.json
|
|
1859
|
-
var version = "4.1.
|
|
1859
|
+
var version = "4.1.15";
|
|
1860
1860
|
var package_default = {
|
|
1861
1861
|
name: "@lambdatest/smartui-cli",
|
|
1862
1862
|
version,
|
|
@@ -2691,6 +2691,8 @@ var createBuildExec_default = (ctx) => {
|
|
|
2691
2691
|
baseline: resp.data.baseline,
|
|
2692
2692
|
useKafkaFlow: resp.data.useKafkaFlow || false
|
|
2693
2693
|
};
|
|
2694
|
+
process.env.SMARTUI_BUILD_ID = resp.data.buildId;
|
|
2695
|
+
process.env.SMARTUI_BUILD_NAME = resp.data.buildName;
|
|
2694
2696
|
} else if (resp && resp.error) {
|
|
2695
2697
|
if (resp.error.message) {
|
|
2696
2698
|
ctx2.log.error(`Error while creation of build: ${resp.error.message}`);
|
|
@@ -2779,6 +2781,10 @@ var exec_default = (ctx) => {
|
|
|
2779
2781
|
var _a3;
|
|
2780
2782
|
if (code !== null) {
|
|
2781
2783
|
task.title = `Execution of '${(_a3 = ctx2.args.execCommand) == null ? void 0 : _a3.join(" ")}' completed; exited with code ${code}`;
|
|
2784
|
+
if (code !== 0) {
|
|
2785
|
+
reject();
|
|
2786
|
+
process.exitCode = code;
|
|
2787
|
+
}
|
|
2782
2788
|
} else if (signal !== null) {
|
|
2783
2789
|
throw new Error(`Child process killed with signal ${signal}`);
|
|
2784
2790
|
}
|
|
@@ -2814,11 +2820,12 @@ var processSnapshot_default = (ctx) => {
|
|
|
2814
2820
|
});
|
|
2815
2821
|
let output = "";
|
|
2816
2822
|
for (let snapshot of (_b = ctx2.snapshotQueue) == null ? void 0 : _b.getProcessedSnapshots()) {
|
|
2817
|
-
if (snapshot.error)
|
|
2823
|
+
if (snapshot.error) {
|
|
2818
2824
|
output += `${chalk__default.default.red("\u2717")} ${chalk__default.default.gray(`${snapshot.name}
|
|
2819
2825
|
[error] ${snapshot.error}`)}
|
|
2820
2826
|
`;
|
|
2821
|
-
|
|
2827
|
+
process.exitCode = 1;
|
|
2828
|
+
} else
|
|
2822
2829
|
output += `${chalk__default.default.green("\u2713")} ${chalk__default.default.gray(snapshot.name)}
|
|
2823
2830
|
${snapshot.warnings.length ? chalk__default.default.gray(`[warning] ${snapshot.warnings.join("\n[warning] ")}
|
|
2824
2831
|
`) : ""}`;
|
|
@@ -2828,6 +2835,7 @@ ${snapshot.warnings.length ? chalk__default.default.gray(`[warning] ${snapshot.w
|
|
|
2828
2835
|
} catch (error) {
|
|
2829
2836
|
ctx2.log.debug(error);
|
|
2830
2837
|
task.output = chalk__default.default.gray(error.message);
|
|
2838
|
+
process.exitCode = 1;
|
|
2831
2839
|
throw new Error("Processing of snapshots failed");
|
|
2832
2840
|
}
|
|
2833
2841
|
}),
|
|
@@ -3222,14 +3230,16 @@ function processSnapshot(snapshot, ctx) {
|
|
|
3222
3230
|
url: requestUrl,
|
|
3223
3231
|
resourceType: request.resourceType()
|
|
3224
3232
|
};
|
|
3225
|
-
if (
|
|
3226
|
-
discoveryErrors.browsers[globalBrowser]
|
|
3227
|
-
|
|
3228
|
-
|
|
3229
|
-
discoveryErrors.browsers[globalBrowser][globalViewport]
|
|
3230
|
-
|
|
3231
|
-
|
|
3232
|
-
(
|
|
3233
|
+
if (response.status() >= 400 && response.status() < 600 && response.status() !== 0) {
|
|
3234
|
+
if (!discoveryErrors.browsers[globalBrowser]) {
|
|
3235
|
+
discoveryErrors.browsers[globalBrowser] = {};
|
|
3236
|
+
}
|
|
3237
|
+
if (discoveryErrors.browsers[globalBrowser] && !discoveryErrors.browsers[globalBrowser][globalViewport]) {
|
|
3238
|
+
discoveryErrors.browsers[globalBrowser][globalViewport] = [];
|
|
3239
|
+
}
|
|
3240
|
+
if (discoveryErrors.browsers[globalBrowser]) {
|
|
3241
|
+
(_a2 = discoveryErrors.browsers[globalBrowser][globalViewport]) == null ? void 0 : _a2.push(data);
|
|
3242
|
+
}
|
|
3233
3243
|
}
|
|
3234
3244
|
}
|
|
3235
3245
|
} else {
|
|
@@ -3979,6 +3989,7 @@ command.name("exec").description("Run test commands around SmartUI").argument("<
|
|
|
3979
3989
|
yield tasks.run(ctx);
|
|
3980
3990
|
} catch (error) {
|
|
3981
3991
|
ctx.log.info("\nRefer docs: https://www.lambdatest.com/support/docs/smart-visual-regression-testing/");
|
|
3992
|
+
process.exitCode = 1;
|
|
3982
3993
|
throw new Error();
|
|
3983
3994
|
}
|
|
3984
3995
|
});
|
|
@@ -4176,6 +4187,8 @@ var createBuild_default = (ctx) => {
|
|
|
4176
4187
|
baseline: resp.data.baseline,
|
|
4177
4188
|
useKafkaFlow: resp.data.useKafkaFlow || false
|
|
4178
4189
|
};
|
|
4190
|
+
process.env.SMARTUI_BUILD_ID = resp.data.buildId;
|
|
4191
|
+
process.env.SMARTUI_BUILD_NAME = resp.data.buildName;
|
|
4179
4192
|
} else if (resp && resp.error) {
|
|
4180
4193
|
if (resp.error.message) {
|
|
4181
4194
|
ctx2.log.error(`Error while creation of build: ${resp.error.message}`);
|
|
@@ -4618,6 +4631,7 @@ command2.name("capture").description("Capture screenshots of static sites").argu
|
|
|
4618
4631
|
yield tasks.run(ctx);
|
|
4619
4632
|
} catch (error) {
|
|
4620
4633
|
console.log("\nRefer docs: https://www.lambdatest.com/support/docs/smart-visual-regression-testing/");
|
|
4634
|
+
process.exitCode = 1;
|
|
4621
4635
|
}
|
|
4622
4636
|
});
|
|
4623
4637
|
});
|
|
@@ -4692,6 +4706,7 @@ command3.name("upload").description("Upload screenshots from given directory").a
|
|
|
4692
4706
|
yield tasks.run(ctx);
|
|
4693
4707
|
} catch (error) {
|
|
4694
4708
|
console.log("\nRefer docs: https://www.lambdatest.com/support/docs/smart-visual-regression-testing/");
|
|
4709
|
+
process.exitCode = 1;
|
|
4695
4710
|
}
|
|
4696
4711
|
});
|
|
4697
4712
|
});
|
|
@@ -5002,6 +5017,7 @@ uploadWebFigmaCommand.name("upload-figma-web").description("Capture figma screen
|
|
|
5002
5017
|
verifyFigmaWebConfig(ctx);
|
|
5003
5018
|
} catch (error) {
|
|
5004
5019
|
ctx.log.error(chalk__default.default.red(`Invalid figma-web config; ${error.message}`));
|
|
5020
|
+
process.exitCode = 1;
|
|
5005
5021
|
return;
|
|
5006
5022
|
}
|
|
5007
5023
|
let tasks = new listr2.Listr(
|
|
@@ -5054,6 +5070,7 @@ uploadAppFigmaCommand.name("upload-figma-app").description("Capture figma screen
|
|
|
5054
5070
|
verifyFigmaWebConfig(ctx);
|
|
5055
5071
|
} catch (error) {
|
|
5056
5072
|
ctx.log.error(chalk__default.default.red(`Invalid figma-app config; ${error.message}`));
|
|
5073
|
+
process.exitCode = 1;
|
|
5057
5074
|
return;
|
|
5058
5075
|
}
|
|
5059
5076
|
let tasks = new listr2.Listr(
|
|
@@ -5397,6 +5414,7 @@ command8.name("build").description("Merge a source build into the target build")
|
|
|
5397
5414
|
yield tasks.run(ctx);
|
|
5398
5415
|
} catch (error) {
|
|
5399
5416
|
console.error("Error during merge operation:", error);
|
|
5417
|
+
process.exitCode = 1;
|
|
5400
5418
|
}
|
|
5401
5419
|
});
|
|
5402
5420
|
});
|