@lambdatest/smartui-cli 4.1.19 → 4.1.20
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 +31 -4
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1249,6 +1249,32 @@ var validateSnapshot = ajv.compile(SnapshotSchema);
|
|
|
1249
1249
|
var validateFigmaDesignConfig = ajv.compile(FigmaDesignConfigSchema);
|
|
1250
1250
|
var validateWebFigmaConfig = ajv.compile(FigmaWebConfigSchema);
|
|
1251
1251
|
var validateAppFigmaConfig = ajv.compile(FigmaAppConfigSchema);
|
|
1252
|
+
var validateConfigForScheduled = (config) => {
|
|
1253
|
+
validateConfigForScheduled.errors = null;
|
|
1254
|
+
if (!validateConfig(config)) {
|
|
1255
|
+
let errors = validateConfig.errors || [];
|
|
1256
|
+
errors = errors.filter((error) => {
|
|
1257
|
+
const message = error.message || "";
|
|
1258
|
+
return !message.includes("max unique viewports allowed - 5");
|
|
1259
|
+
});
|
|
1260
|
+
if (config.web && config.web.viewports && Array.isArray(config.web.viewports)) {
|
|
1261
|
+
if (config.web.viewports.length > 8) {
|
|
1262
|
+
errors.push({
|
|
1263
|
+
message: "Invalid config; max unique viewports allowed - 8 (scheduled build)",
|
|
1264
|
+
keyword: "maxItems",
|
|
1265
|
+
instancePath: "/web/viewports",
|
|
1266
|
+
schemaPath: "#/properties/web/properties/viewports/maxItems"
|
|
1267
|
+
});
|
|
1268
|
+
}
|
|
1269
|
+
}
|
|
1270
|
+
if (errors.length > 0) {
|
|
1271
|
+
validateConfigForScheduled.errors = errors;
|
|
1272
|
+
return false;
|
|
1273
|
+
}
|
|
1274
|
+
}
|
|
1275
|
+
return true;
|
|
1276
|
+
};
|
|
1277
|
+
validateConfigForScheduled.errors = null;
|
|
1252
1278
|
var lambdaTunnel = __require("@lambdatest/node-tunnel");
|
|
1253
1279
|
util.promisify(setTimeout);
|
|
1254
1280
|
var tunnelInstance;
|
|
@@ -1877,7 +1903,7 @@ var authExec_default = (ctx) => {
|
|
|
1877
1903
|
};
|
|
1878
1904
|
|
|
1879
1905
|
// package.json
|
|
1880
|
-
var version = "4.1.
|
|
1906
|
+
var version = "4.1.20";
|
|
1881
1907
|
var package_default = {
|
|
1882
1908
|
name: "@lambdatest/smartui-cli",
|
|
1883
1909
|
version,
|
|
@@ -2480,8 +2506,9 @@ var ctx_default = (options) => {
|
|
|
2480
2506
|
config.web.viewports = config.web.resolutions;
|
|
2481
2507
|
delete config.web.resolutions;
|
|
2482
2508
|
}
|
|
2483
|
-
|
|
2484
|
-
|
|
2509
|
+
let validateConfigFn = options.scheduled ? validateConfigForScheduled : validateConfig;
|
|
2510
|
+
if (!validateConfigFn(config)) {
|
|
2511
|
+
throw new Error(validateConfigFn.errors[0].message);
|
|
2485
2512
|
}
|
|
2486
2513
|
} else {
|
|
2487
2514
|
logger_default.info("## No config file provided. Using default config.");
|
|
@@ -4622,7 +4649,7 @@ var captureScreenshots_default = (ctx) => {
|
|
|
4622
4649
|
|
|
4623
4650
|
// src/commander/capture.ts
|
|
4624
4651
|
var command2 = new commander.Command();
|
|
4625
|
-
command2.name("capture").description("Capture screenshots of static sites").argument("<file>", "Web static config file").option("-C, --parallel [number]", "Specify the number of instances per browser", parseInt).option("-F, --force", "forcefully apply the specified parallel instances per browser").option("--fetch-results [filename]", "Fetch results and optionally specify an output file, e.g., <filename>.json").option("--buildName <string>", "Specify the build name").option("--userName <string>", "Specify the LT username").option("--accessKey <string>", "Specify the LT accesskey").action(function(file, _, command9) {
|
|
4652
|
+
command2.name("capture").description("Capture screenshots of static sites").argument("<file>", "Web static config file").option("-C, --parallel [number]", "Specify the number of instances per browser", parseInt).option("-F, --force", "forcefully apply the specified parallel instances per browser").option("--fetch-results [filename]", "Fetch results and optionally specify an output file, e.g., <filename>.json").option("--buildName <string>", "Specify the build name").option("--scheduled <string>", "Specify the schedule ID").option("--userName <string>", "Specify the LT username").option("--accessKey <string>", "Specify the LT accesskey").action(function(file, _, command9) {
|
|
4626
4653
|
return __async(this, null, function* () {
|
|
4627
4654
|
var _a, _b;
|
|
4628
4655
|
const options = command9.optsWithGlobals();
|