@lambdatest/smartui-cli 4.1.40 → 4.1.41

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.
Files changed (2) hide show
  1. package/dist/index.cjs +8 -9
  2. package/package.json +1 -1
package/dist/index.cjs CHANGED
@@ -2385,7 +2385,7 @@ var server_default = (ctx) => __async(void 0, null, function* () {
2385
2385
  reply.code(200).send({ data: { dom: SMARTUI_DOM } });
2386
2386
  });
2387
2387
  server.post("/snapshot", opts, (request, reply) => __async(void 0, null, function* () {
2388
- var _a, _b, _c, _d, _e, _f, _g, _h, _i;
2388
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
2389
2389
  let replyCode;
2390
2390
  let replyBody;
2391
2391
  try {
@@ -2397,11 +2397,12 @@ var server_default = (ctx) => __async(void 0, null, function* () {
2397
2397
  throw new Error(`Invalid snapshot options; rejectionThreshold (${snapshot.options.rejectionThreshold}) must be greater than approvalThreshold (${snapshot.options.approvalThreshold})`);
2398
2398
  }
2399
2399
  }
2400
- const sessionId = (_e = snapshot == null ? void 0 : snapshot.options) == null ? void 0 : _e.sessionId;
2400
+ snapshot.name = (_e = snapshot == null ? void 0 : snapshot.name) == null ? void 0 : _e.trim();
2401
+ const sessionId = (_f = snapshot == null ? void 0 : snapshot.options) == null ? void 0 : _f.sessionId;
2401
2402
  let capsBuildId = "";
2402
- const contextId = (_f = snapshot == null ? void 0 : snapshot.options) == null ? void 0 : _f.contextId;
2403
+ const contextId = (_g = snapshot == null ? void 0 : snapshot.options) == null ? void 0 : _g.contextId;
2403
2404
  if (sessionId) {
2404
- if ((_g = ctx.sessionCapabilitiesMap) == null ? void 0 : _g.has(sessionId)) {
2405
+ if ((_h = ctx.sessionCapabilitiesMap) == null ? void 0 : _h.has(sessionId)) {
2405
2406
  const cachedCapabilities = ctx.sessionCapabilitiesMap.get(sessionId);
2406
2407
  capsBuildId = (cachedCapabilities == null ? void 0 : cachedCapabilities.buildId) || "";
2407
2408
  } else {
@@ -2432,9 +2433,9 @@ var server_default = (ctx) => __async(void 0, null, function* () {
2432
2433
  ctx.log.debug(`Marking contextId as captured and added to queue: ${contextId}`);
2433
2434
  }
2434
2435
  if (contextId) {
2435
- (_h = ctx.snapshotQueue) == null ? void 0 : _h.enqueueFront(snapshot);
2436
+ (_i = ctx.snapshotQueue) == null ? void 0 : _i.enqueueFront(snapshot);
2436
2437
  } else {
2437
- (_i = ctx.snapshotQueue) == null ? void 0 : _i.enqueue(snapshot);
2438
+ (_j = ctx.snapshotQueue) == null ? void 0 : _j.enqueue(snapshot);
2438
2439
  }
2439
2440
  ctx.isSnapshotCaptured = true;
2440
2441
  replyCode = 200;
@@ -2790,7 +2791,7 @@ var authExec_default = (ctx) => {
2790
2791
  };
2791
2792
 
2792
2793
  // package.json
2793
- var version = "4.1.40";
2794
+ var version = "4.1.41";
2794
2795
  var package_default = {
2795
2796
  name: "@lambdatest/smartui-cli",
2796
2797
  version,
@@ -3618,8 +3619,6 @@ var ctx_default = (options) => {
3618
3619
  if (options.userName && options.accessKey) {
3619
3620
  env.LT_USERNAME = options.userName;
3620
3621
  env.LT_ACCESS_KEY = options.accessKey;
3621
- process.env.LT_USERNAME = options.userName;
3622
- process.env.LT_ACCESS_KEY = options.accessKey;
3623
3622
  }
3624
3623
  } catch (error) {
3625
3624
  console.log(`[smartui] Error: ${error.message}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lambdatest/smartui-cli",
3
- "version": "4.1.40",
3
+ "version": "4.1.41",
4
4
  "description": "A command line interface (CLI) to run SmartUI tests on LambdaTest",
5
5
  "files": [
6
6
  "dist/**/*"