From 88a0b71473487dd26f18581678d57c8e7114f6ab Mon Sep 17 00:00:00 2001 From: parthkirsan Date: Tue, 18 Nov 2025 13:46:30 +0530 Subject: [PATCH 1/2] create endpoint for buildinfo from local server --- src/lib/server.ts | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/src/lib/server.ts b/src/lib/server.ts index e15bef1..95cb11f 100644 --- a/src/lib/server.ts +++ b/src/lib/server.ts @@ -345,6 +345,35 @@ export default async (ctx: Context): Promise { + let replyCode: number; + let replyBody: Record; + + try { + if (ctx.build && ctx.build.id) { + const buildInfo = ctx.build; + const data = { + buildId: buildInfo.id, + buildName: buildInfo.name, + baseline: buildInfo.baseline, + projectToken: ctx.env.PROJECT_TOKEN || '', + } + replyCode = 200; + replyBody = { data: data }; + } else { + throw new Error('Build information is not available'); + } + } catch (error: any) { + ctx.log.debug(`build info failed; ${error}`); + replyCode = 500; + replyBody = { error: { message: error.message } }; + } + + return reply.code(replyCode).send(replyBody); + + }); + // Use the helper function to find and start server on available port if (ctx.sourceCommand && ctx.sourceCommand === 'exec-start') { From f73ba78143600931633ed5a48f26f8250bfe272a Mon Sep 17 00:00:00 2001 From: parthkirsan Date: Tue, 18 Nov 2025 13:46:45 +0530 Subject: [PATCH 2/2] 4.1.45 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 6e10fd7..f481dcb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@lambdatest/smartui-cli", - "version": "4.1.44", + "version": "4.1.45", "description": "A command line interface (CLI) to run SmartUI tests on LambdaTest", "files": [ "dist/**/*"