@lambdatest/smartui-cli 4.1.0 → 4.1.1
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 +12 -4
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1281,6 +1281,7 @@ var server_default = (ctx) => __async(void 0, null, function* () {
|
|
|
1281
1281
|
throw new Error(validateSnapshot.errors[0].message);
|
|
1282
1282
|
ctx.testType = testType;
|
|
1283
1283
|
(_a = ctx.snapshotQueue) == null ? void 0 : _a.enqueue(snapshot);
|
|
1284
|
+
ctx.isSnapshotCaptured = true;
|
|
1284
1285
|
replyCode = 200;
|
|
1285
1286
|
replyBody = { data: { message: "success", warnings: [] } };
|
|
1286
1287
|
} catch (error) {
|
|
@@ -1465,7 +1466,7 @@ var auth_default = (ctx) => {
|
|
|
1465
1466
|
};
|
|
1466
1467
|
|
|
1467
1468
|
// package.json
|
|
1468
|
-
var version = "4.1.
|
|
1469
|
+
var version = "4.1.1";
|
|
1469
1470
|
var package_default = {
|
|
1470
1471
|
name: "@lambdatest/smartui-cli",
|
|
1471
1472
|
version,
|
|
@@ -1920,7 +1921,8 @@ var ctx_default = (options) => {
|
|
|
1920
1921
|
},
|
|
1921
1922
|
cliVersion: version,
|
|
1922
1923
|
totalSnapshots: -1,
|
|
1923
|
-
isStartExec: false
|
|
1924
|
+
isStartExec: false,
|
|
1925
|
+
isSnapshotCaptured: false
|
|
1924
1926
|
};
|
|
1925
1927
|
};
|
|
1926
1928
|
function executeCommand(command7) {
|
|
@@ -2123,8 +2125,11 @@ var finalizeBuild_default = (ctx) => {
|
|
|
2123
2125
|
ctx2.log.debug(`Closed browser`);
|
|
2124
2126
|
yield (_b = ctx2.server) == null ? void 0 : _b.close();
|
|
2125
2127
|
ctx2.log.debug(`Closed server`);
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
+
if (ctx2.isSnapshotCaptured) {
|
|
2129
|
+
ctx2.log.debug(`Log file to be uploaded`);
|
|
2130
|
+
let resp = yield ctx2.client.getS3PreSignedURL(ctx2);
|
|
2131
|
+
yield ctx2.client.uploadLogs(ctx2, resp.data.url);
|
|
2132
|
+
}
|
|
2128
2133
|
fs6__default.default.unlinkSync(constants_default.LOG_FILE_PATH);
|
|
2129
2134
|
ctx2.log.debug(`Log file deleted: ${constants_default.LOG_FILE_PATH}`);
|
|
2130
2135
|
} catch (error) {
|
|
@@ -3288,6 +3293,7 @@ command2.name("capture").description("Capture screenshots of static sites").argu
|
|
|
3288
3293
|
process.exit(1);
|
|
3289
3294
|
}
|
|
3290
3295
|
let ctx = ctx_default(command7.optsWithGlobals());
|
|
3296
|
+
ctx.isSnapshotCaptured = true;
|
|
3291
3297
|
if (!fs6__default.default.existsSync(file)) {
|
|
3292
3298
|
ctx.log.error(`Web Static Config file ${file} not found.`);
|
|
3293
3299
|
return;
|
|
@@ -3379,6 +3385,7 @@ command3.name("upload").description("Upload screenshots from given directory").a
|
|
|
3379
3385
|
process.exit(1);
|
|
3380
3386
|
}
|
|
3381
3387
|
let ctx = ctx_default(command7.optsWithGlobals());
|
|
3388
|
+
ctx.isSnapshotCaptured = true;
|
|
3382
3389
|
if (!fs6__default.default.existsSync(directory)) {
|
|
3383
3390
|
console.log(`Error: The provided directory ${directory} not found.`);
|
|
3384
3391
|
return;
|
|
@@ -3577,6 +3584,7 @@ uploadFigma.name("upload-figma").description("Capture screenshots of static site
|
|
|
3577
3584
|
return __async(this, null, function* () {
|
|
3578
3585
|
var _a, _b;
|
|
3579
3586
|
let ctx = ctx_default(command7.optsWithGlobals());
|
|
3587
|
+
ctx.isSnapshotCaptured = true;
|
|
3580
3588
|
if (!fs6__default.default.existsSync(file)) {
|
|
3581
3589
|
console.log(`Error: Figma Config file ${file} not found.`);
|
|
3582
3590
|
return;
|