diff --git a/.gitignore b/.gitignore index dc51be2..82ee25a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,3 @@ node_modules dist .idea -pnpm-lock.yaml \ No newline at end of file diff --git a/package.json b/package.json index 2fde396..8331bce 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@lambdatest/smartui-cli", - "version": "4.1.18", + "version": "4.1.19", "description": "A command line interface (CLI) to run SmartUI tests on LambdaTest", "files": [ "dist/**/*" diff --git a/src/commander/exec.ts b/src/commander/exec.ts index f3b7afc..adf91e8 100644 --- a/src/commander/exec.ts +++ b/src/commander/exec.ts @@ -22,6 +22,7 @@ command .option('-P, --port ', 'Port number for the server') .option('--fetch-results [filename]', 'Fetch results and optionally specify an output file, e.g., .json') .option('--buildName ', 'Specify the build name') + .option('--scheduled ', 'Specify the schedule ID') .option('--userName ', 'Specify the LT username') .option('--accessKey ', 'Specify the LT accesskey') .action(async function(execCommand, _, command) { diff --git a/src/lib/ctx.ts b/src/lib/ctx.ts index 5b930cb..94bc258 100644 --- a/src/lib/ctx.ts +++ b/src/lib/ctx.ts @@ -147,6 +147,7 @@ export default (options: Record): Context => { force: options.force ? true : false, markBaseline: options.markBaseline ? true : false, buildName: options.buildName || '', + scheduled: options.scheduled || '', port: port, ignoreResolutions: resolutionOff, fileExtension: extensionFiles, diff --git a/src/lib/httpClient.ts b/src/lib/httpClient.ts index 5c878ff..6251182 100644 --- a/src/lib/httpClient.ts +++ b/src/lib/httpClient.ts @@ -202,7 +202,7 @@ export default class httpClient { } } - createBuild(git: Git, config: any, log: Logger, buildName: string, isStartExec: boolean, smartGit: boolean, markBaseline: boolean, baselineBuild: string) { + createBuild(git: Git, config: any, log: Logger, buildName: string, isStartExec: boolean, smartGit: boolean, markBaseline: boolean, baselineBuild: string, scheduled?: string) { return this.request({ url: '/build', method: 'POST', @@ -214,7 +214,8 @@ export default class httpClient { packageVersion: pkgJSON.version, smartGit, markBaseline, - baselineBuild + baselineBuild, + scheduled } }, log) } diff --git a/src/tasks/createBuild.ts b/src/tasks/createBuild.ts index e37f198..761da0e 100644 --- a/src/tasks/createBuild.ts +++ b/src/tasks/createBuild.ts @@ -10,7 +10,7 @@ export default (ctx: Context): ListrTask,