@testmuai/kane-cli 0.2.4 → 0.2.6
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/{ChromeProfilePicker-IRZUDC2R.js → ChromeProfilePicker-GFXYO62T.js} +1 -1
- package/dist/{CliFeedbackPrompt-RIIDDIY5.js → CliFeedbackPrompt-F3ZTTEUY.js} +1 -1
- package/dist/{CliUploadProgress-QF57Z3FD.js → CliUploadProgress-DNE54O2E.js} +1 -1
- package/dist/{ConfigView-5R4G4OZ6.js → ConfigView-MTU2VXM3.js} +1 -1
- package/dist/FolderPicker-VVQBL3YD.js +2 -0
- package/dist/HelpView-WVCLJJMT.js +2 -0
- package/dist/{LinksBox-623NMFSA.js → LinksBox-I4PYUQY7.js} +1 -1
- package/dist/{LoginWizard-SSE5NJVU.js → LoginWizard-ZGXMGBNJ.js} +1 -1
- package/dist/{ProfilesView-DBNO4RSU.js → ProfilesView-AUJOUVYZ.js} +1 -1
- package/dist/ProjectPicker-3WKERA5V.js +2 -0
- package/dist/{WhoamiView-2VBZBQF7.js → WhoamiView-CY65SJE3.js} +1 -1
- package/dist/{changelog-XYK3P4RQ.js → changelog-CHSXQF3G.js} +1 -1
- package/dist/chunk-36GHKMI7.js +2 -0
- package/dist/chunk-3C7VPJXD.js +2 -0
- package/dist/chunk-5BRNKEYT.js +2 -0
- package/dist/chunk-6HRAVME7.js +2 -0
- package/dist/chunk-6SF4L62W.js +2 -0
- package/dist/{chunk-426ZAKPO.js → chunk-ATLXF7HN.js} +1 -1
- package/dist/{chunk-LZZDLYE3.js → chunk-CW5PVMPK.js} +1 -1
- package/dist/chunk-DXKKUGFG.js +2 -0
- package/dist/{chunk-B4K7UTF2.js → chunk-EWT2AY54.js} +1 -1
- package/dist/chunk-IFWLAQ3L.js +2 -0
- package/dist/chunk-KMHVGLJY.js +2 -0
- package/dist/chunk-L5Y2GUO6.js +2 -0
- package/dist/chunk-O7HXQ753.js +2 -0
- package/dist/chunk-OIERCP6B.js +2 -0
- package/dist/{chunk-GNMGQOGV.js → chunk-PSB4TGW4.js} +10 -8
- package/dist/chunk-PWGEMRBD.js +2 -0
- package/dist/{chunk-BSMUBGQO.js → chunk-THEP5K6T.js} +1 -1
- package/dist/{chunk-JXLB6N6Q.js → chunk-WSRUIIRY.js} +1 -1
- package/dist/{chunk-GTYF5DR6.js → chunk-Y4NPKZOF.js} +1 -1
- package/dist/controller-client-7BIK5FYL.js +2 -0
- package/dist/index.js +60 -47
- package/dist/logging-O5R56LPM.js +2 -0
- package/dist/machine-id-DZN4MYOO.js +2 -0
- package/dist/pipeline-NXUVAHY5.js +2 -0
- package/dist/resolver-QLDOAIXU.js +2 -0
- package/dist/tms-client-T4HO73MT.js +2 -0
- package/dist/{updater-H5HYMYRG.js → updater-WVTXO7SS.js} +1 -1
- package/dist/{version-check-KS7CP3M5.js → version-check-SR6WBC6M.js} +1 -1
- package/package.json +4 -4
- package/dist/FolderPicker-G4C4RCP2.js +0 -2
- package/dist/HelpView-2ZFLX7JC.js +0 -2
- package/dist/ProjectPicker-AFQDF2VS.js +0 -2
- package/dist/chunk-3CJ6IY5O.js +0 -2
- package/dist/chunk-I7YWZ3D2.js +0 -2
- package/dist/chunk-IA4UI2BT.js +0 -2
- package/dist/chunk-KSHUUU2I.js +0 -2
- package/dist/chunk-NRQDE7HH.js +0 -2
- package/dist/chunk-RDG6MGL7.js +0 -2
- package/dist/chunk-RPQV6H45.js +0 -2
- package/dist/chunk-S2FLPRVR.js +0 -2
- package/dist/chunk-XHPTLI5U.js +0 -2
- package/dist/chunk-YNF4MUQP.js +0 -2
- package/dist/controller-client-PS5GDXE3.js +0 -2
- package/dist/exitCleanup-J3GVD6U2.js +0 -2
- package/dist/pipeline-7NY333ZT.js +0 -2
- package/dist/resolver-L3Z6FAOD.js +0 -2
- package/dist/tms-client-QWVBCUUT.js +0 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{c as a}from"./chunk-
|
|
2
|
+
import{c as a}from"./chunk-Y4NPKZOF.js";import{a as s}from"./chunk-OIERCP6B.js";import"./chunk-UR6MHSHU.js";import{execFile as l}from"child_process";async function p(i){let t=await a();if(!t)return{success:!0,fromVersion:s,toVersion:s};let o=`@testmuai/kane-cli@${t.latest}`;return new Promise(n=>{let r=l("npm",["install","-g",o],{timeout:12e4,env:{...process.env}});r.stdout?.on("data",e=>i?.(e)),r.stderr?.on("data",e=>i?.(e)),r.on("close",e=>{n(e===0?{success:!0,fromVersion:s,toVersion:t.latest}:{success:!1,fromVersion:s,toVersion:t.latest,error:`npm install exited with code ${e}. Try manually: npm install -g ${o}`})}),r.on("error",e=>{n({success:!1,fromVersion:s,toVersion:t.latest,error:`Failed to run npm: ${e.message}. Try manually: npm install -g ${o}`})})})}export{p as runSelfUpdate};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a,b,c}from"./chunk-
|
|
2
|
+
import{a,b,c}from"./chunk-Y4NPKZOF.js";import"./chunk-OIERCP6B.js";import"./chunk-UR6MHSHU.js";export{c as checkForUpdate,a as compareVersions,b as getSeverity};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@testmuai/kane-cli",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.6",
|
|
4
4
|
"description": "KaneAI Terminal UI — browser automation testing agent",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -23,9 +23,9 @@
|
|
|
23
23
|
"sharp": "^0.34.5"
|
|
24
24
|
},
|
|
25
25
|
"optionalDependencies": {
|
|
26
|
-
"@testmuai/kane-cli-darwin-arm64": "0.2.
|
|
27
|
-
"@testmuai/kane-cli-linux-x64": "0.2.
|
|
28
|
-
"@testmuai/kane-cli-win-x64": "0.2.
|
|
26
|
+
"@testmuai/kane-cli-darwin-arm64": "0.2.6",
|
|
27
|
+
"@testmuai/kane-cli-linux-x64": "0.2.6",
|
|
28
|
+
"@testmuai/kane-cli-win-x64": "0.2.6"
|
|
29
29
|
},
|
|
30
30
|
"publishConfig": {
|
|
31
31
|
"registry": "https://registry.npmjs.org",
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a,b}from"./chunk-LZZDLYE3.js";import"./chunk-RPQV6H45.js";import"./chunk-I7YWZ3D2.js";import"./chunk-HCBYKLMW.js";import"./chunk-RDG6MGL7.js";import"./chunk-Q7JVDEOV.js";import"./chunk-6YGTRKDT.js";import"./chunk-UR6MHSHU.js";export{b as FolderPicker,a as formatFolderLine};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as f}from"./chunk-HCBYKLMW.js";import{a as h,b as c,r as t}from"./chunk-RDG6MGL7.js";import{a as n,b as o,j as p,k as x}from"./chunk-Q7JVDEOV.js";import{a as T}from"./chunk-6YGTRKDT.js";import{e as u}from"./chunk-UR6MHSHU.js";var b=u(T(),1);var e=u(f(),1),w="https://www.testmuai.com/support/docs/kane-cli-introduction",B="https://github.com/LambdaTest/kane-cli/issues";function L(){let{exit:l}=p(),{stdout:i}=x(),s=i?.columns??80;return(0,b.useEffect)(()=>{let d=setTimeout(()=>l(),50);return()=>clearTimeout(d)},[l]),(0,e.jsxs)(n,{flexDirection:"column",children:[(0,e.jsxs)(n,{paddingX:1,paddingTop:1,flexDirection:"column",children:[(0,e.jsx)(o,{color:t.purple,bold:!0,children:c}),(0,e.jsxs)(n,{children:[(0,e.jsx)(o,{color:t.dimmed,children:"Browser automation powered by AI "}),(0,e.jsxs)(o,{color:t.muted,children:[" v",h]})]})]}),(0,e.jsx)(o,{children:" "}),(0,e.jsx)(m,{title:"USAGE",children:(0,e.jsxs)(o,{color:t.cyan,children:[" $ ",c," ","<command>"," [flags]"]})}),(0,e.jsxs)(m,{title:"COMMANDS",children:[(0,e.jsx)(a,{cmd:"run",args:"<objective>",desc:"Run a browser automation task",highlight:!0}),(0,e.jsx)(a,{cmd:"setup",desc:"First-time auth & configuration"}),(0,e.jsx)(a,{cmd:"login",desc:"OAuth PKCE login (opens browser)"}),(0,e.jsx)(a,{cmd:"logout",desc:"Revoke tokens + delete profile"}),(0,e.jsx)(a,{cmd:"whoami",desc:"Show authenticated identity"}),(0,e.jsx)(a,{cmd:"config",args:"show|set-\u2026|reset",desc:"Manage configuration"}),(0,e.jsx)(a,{cmd:"profiles",args:"list|switch|delete",desc:"Manage auth profiles"})]}),(0,e.jsxs)(m,{title:"RUN FLAGS",children:[(0,e.jsx)(r,{long:"--url",arg:"<url>",desc:"Target URL"}),(0,e.jsx)(r,{long:"--max-steps",arg:"<n>",desc:"Max agent steps (default: 30)"}),(0,e.jsx)(r,{long:"--timeout",arg:"<sec>",desc:"Kill run after N seconds"}),(0,e.jsx)(r,{long:"--headless",desc:"No visible browser window"}),(0,e.jsx)(r,{long:"--variables",arg:"<json>",desc:"Inline variables as JSON"}),(0,e.jsx)(r,{long:"--variables-file",arg:"<path>",desc:"Load variables from file"}),(0,e.jsx)(r,{long:"--ws-endpoint",arg:"<url>",desc:"Remote browser (LambdaTest)"}),(0,e.jsx)(r,{long:"--cdp-endpoint",arg:"<url>",desc:"Connect to existing Chrome CDP"}),(0,e.jsx)(r,{long:"--cft",desc:"Use Playwright Chromium instead of managed Chrome"}),(0,e.jsx)(r,{long:"--global-context",arg:"<file>",desc:"Override global context markdown"}),(0,e.jsx)(r,{long:"--local-context",arg:"<file>",desc:"Override local context markdown"}),(0,e.jsx)(r,{long:"--username",arg:"<user>",desc:"Basic auth (skip OAuth)"}),(0,e.jsx)(r,{long:"--access-key",arg:"<key>",desc:"Basic auth access key"}),(0,e.jsx)(r,{long:"--env",arg:"<name>",desc:"Environment (prod or stage)"}),(0,e.jsx)(r,{long:"--agent",desc:"NDJSON output (no UI)",highlight:!0})]}),(0,e.jsxs)(m,{title:"EXAMPLES",children:[(0,e.jsx)(g,{label:"Search",cmd:`${c} run "Search for laptop" --url https://amazon.in`}),(0,e.jsx)(g,{label:"Headless",cmd:`${c} run "Verify login" --url https://app.example.com --headless`}),(0,e.jsx)(g,{label:"Variables",cmd:`${c} run "Login as {{user}}" --url https://app.com --variables '{"user":{"value":"alice"}}'`}),(0,e.jsx)(g,{label:"Agent",cmd:`${c} run "Add to cart" --url https://shop.com --agent | jq .status`})]}),(0,e.jsxs)(n,{flexDirection:"column",marginTop:0,paddingX:1,children:[(0,e.jsx)(o,{color:t.muted,children:"\u2500".repeat(Math.min(s-2,70))}),(0,e.jsxs)(n,{gap:3,children:[(0,e.jsxs)(n,{children:[(0,e.jsx)(o,{color:t.dimmed,children:"Docs "}),(0,e.jsx)(o,{color:t.cyan,underline:!0,children:w})]}),(0,e.jsxs)(n,{children:[(0,e.jsx)(o,{color:t.dimmed,children:"Bugs "}),(0,e.jsx)(o,{color:t.cyan,underline:!0,children:B})]})]})]}),(0,e.jsx)(o,{children:" "})]})}function m({title:l,children:i}){return(0,e.jsxs)(n,{flexDirection:"column",marginBottom:1,children:[(0,e.jsx)(n,{marginLeft:1,children:(0,e.jsx)(o,{bold:!0,color:t.dimmed,children:l})}),i]})}function a({cmd:l,args:i,desc:s,highlight:d}){return(0,e.jsxs)(n,{marginLeft:2,children:[(0,e.jsx)(n,{width:12,children:(0,e.jsx)(o,{color:d?t.purple:t.green,bold:!0,children:l})}),(0,e.jsx)(n,{width:28,children:i?(0,e.jsx)(o,{color:t.dimmed,children:i}):null}),(0,e.jsx)(o,{color:t.dimmed,children:s})]})}function r({long:l,arg:i,desc:s,highlight:d}){return(0,e.jsxs)(n,{marginLeft:2,children:[(0,e.jsxs)(n,{width:26,children:[(0,e.jsx)(o,{color:d?t.purple:t.cyan,children:l}),i&&(0,e.jsxs)(o,{color:t.dimmed,children:[" ",i]})]}),(0,e.jsx)(o,{color:t.dimmed,children:s})]})}function g({label:l,cmd:i}){return(0,e.jsxs)(n,{marginLeft:2,flexDirection:"column",children:[(0,e.jsxs)(o,{color:t.dimmed,children:["# ",l]}),(0,e.jsxs)(o,{color:t.cyan,children:["$ ",i]})]})}export{L as HelpView};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a,b}from"./chunk-BSMUBGQO.js";import"./chunk-RPQV6H45.js";import"./chunk-I7YWZ3D2.js";import"./chunk-HCBYKLMW.js";import"./chunk-RDG6MGL7.js";import"./chunk-Q7JVDEOV.js";import"./chunk-6YGTRKDT.js";import"./chunk-UR6MHSHU.js";export{b as ProjectPicker,a as formatProjectLine};
|
package/dist/chunk-3CJ6IY5O.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
var r=class{constructor(e,s){this.baseUrl=e;typeof s=="string"?this.authHeader=`Bearer ${s}`:this.authHeader=`Basic ${Buffer.from(`${s.username}:${s.accessKey}`).toString("base64")}`}authHeader;headers(){return{Authorization:this.authHeader,"Content-Type":"application/json"}}async getTmsCredentials(){let e=await fetch(`${this.baseUrl}/auth/tms-credentials`,{method:"GET",headers:this.headers()});if(!e.ok)throw new Error(`Credential exchange failed: ${e.status} ${await e.text()}`);return await e.json()}async getPresignedUrls(e,s,a){let t=await fetch(`${this.baseUrl}/upload/presign`,{method:"POST",headers:this.headers(),body:JSON.stringify({test_id:e,session_id:s,files:a})});if(!t.ok)throw new Error(`Presign request failed: ${t.status} ${await t.text()}`);return await t.json()}async getScreenshotSas(){let e=await fetch(`${this.baseUrl}/upload/screenshot-sas`,{method:"GET",headers:this.headers()});if(!e.ok)throw new Error(`Screenshot SAS request failed: ${e.status} ${await e.text()}`);return await e.json()}};export{r as a};
|
package/dist/chunk-I7YWZ3D2.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
var h=class{constructor(e,t,i){this.baseUrl=e;this.authHeader=`Basic ${Buffer.from(`${t}:${i}`).toString("base64")}`}authHeader;headers(){return{Authorization:this.authHeader,"Content-Type":"application/json",Accept:"application/json"}}async listProjects(e){let s=[],a=!1;for(let o=1;o<=100;o++){let n=`${this.baseUrl}/v1/projects?page=${o}&per_page=200&sort=created_at`,r=await fetch(n,{method:"GET",headers:this.headers()});if(!r.ok)throw new Error(`List projects failed: ${r.status} ${await r.text()}`);let d=(await r.json()).data??[];if(e&&!a&&d.length>0){let c=d[0];e(`PROJECT response sample project_id=${c.project_id} name=${c.name}`),a=!0}if(s.push(...d),d.length<200)break}return s}async getDefaultFolder(e){let t=await fetch(`${this.baseUrl}/v1/projects/${e}/folder/default`,{method:"GET",headers:this.headers()});if(!t.ok)throw new Error(`Get default folder failed: ${t.status} ${await t.text()}`);return(await t.json()).id}async listFolders(e){let t=await fetch(`${this.baseUrl}/v1/folder/entity/${e}`,{method:"GET",headers:this.headers()});if(!t.ok)throw new Error(`List folders failed: ${t.status} ${await t.text()}`);return(await t.json()).data??[]}async createAtmTest(e,t){let i=t?`Bearer ${t}`:this.authHeader,s=await fetch(`${this.baseUrl}/atm/v1/test`,{method:"POST",headers:{Authorization:i,"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(e)});if(!s.ok)throw new Error(`Create ATM test failed: ${s.status} ${await s.text()}`);let a=await s.json();if(!a.test_id)throw new Error("Create ATM test returned no test_id");return a.test_id}async endTest(e,t,i){let s=i?`Bearer ${i}`:this.authHeader,a=new URLSearchParams({commit_id:t.commit_id,time_taken:String(t.time_taken),steps_count:String(t.steps_count),commit_message:t.commit_message}),o={};t.objectives&&t.objectives.length>0&&(o.objectives=t.objectives);let n=await fetch(`${this.baseUrl}/atm/v1/test/${e}?${a.toString()}`,{method:"DELETE",headers:{Authorization:s,"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(o)});if(!n.ok)throw new Error(`End test failed: ${n.status} ${await n.text()}`);let r=await n.json();return{testcase_id:r.data?.testcase_id??"",test_id:r.data?.test_id??e,project_id:r.data?.project_id??""}}async submitFeedback(e,t){let i=t?`Bearer ${t}`:this.authHeader,s={instruction_id:e.instruction_id,test_id:e.test_id,feedback_type:e.feedback_type,mode:e.mode??"human"};e.details&&(s.details=e.details);let a=await fetch(`${this.baseUrl}/atm/v1/generative-feedback`,{method:"POST",headers:{Authorization:i,"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(s)});if(!a.ok)throw new Error(`Submit feedback failed: ${a.status} ${await a.text()}`);return await a.json()}};export{h as a};
|
package/dist/chunk-IA4UI2BT.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as m}from"./chunk-HCBYKLMW.js";import{r as t}from"./chunk-RDG6MGL7.js";import{a as p,b as r,i as a}from"./chunk-Q7JVDEOV.js";import{a as f}from"./chunk-6YGTRKDT.js";import{e as s}from"./chunk-UR6MHSHU.js";var c=s(f(),1);var e=s(m(),1);function R({onSubmit:n}){let[o,l]=(0,c.useState)(0),u=(0,c.useRef)(!1);return a((x,i)=>{u.current||(i.leftArrow||i.rightArrow?l(d=>d===0?1:0):i.return?(u.current=!0,n(o===0?"positive":"negative")):i.escape&&(u.current=!0,n(null)))}),(0,e.jsxs)(p,{marginTop:1,children:[(0,e.jsx)(r,{color:t.secondary,children:"Rate this session: "}),(0,e.jsx)(r,{color:o===0?t.primary:t.dim,children:o===0?"[ \u{1F44D} ]":" \u{1F44D} "}),(0,e.jsx)(r,{children:" "}),(0,e.jsx)(r,{color:o===1?t.primary:t.dim,children:o===1?"[ \u{1F44E} ]":" \u{1F44E} "}),(0,e.jsx)(r,{color:t.dim,children:" \u2190/\u2192 select \xB7 Enter submit \xB7 Esc skip"})]})}export{R as a};
|
package/dist/chunk-KSHUUU2I.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as d}from"./chunk-HCBYKLMW.js";import{r as t}from"./chunk-RDG6MGL7.js";import{a as s,b as n}from"./chunk-Q7JVDEOV.js";import{a as f}from"./chunk-6YGTRKDT.js";import{e as u}from"./chunk-UR6MHSHU.js";var c=u(f(),1);var R=u(f(),1);var m=u(f(),1);function b(o,r){let a=(0,m.useRef)(o);a.current=o,(0,m.useEffect)(()=>{if(r===null)return;let i=setInterval(()=>a.current(),r);return()=>clearInterval(i)},[r])}var B=u(d(),1),T=["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"];function v({active:o=!0}){let[r,a]=(0,R.useState)(0);return b(()=>{a(i=>(i+1)%T.length)},o?80:null),(0,B.jsx)(n,{color:t.purple,children:o?T[r]:"\u25CF"})}var e=u(d(),1);function $(){return[{name:"convert",label:"Converting session data",status:"pending"},{name:"zip",label:"Compressing artifacts",status:"pending"},{name:"presign",label:"Requesting upload URLs",status:"pending"},{name:"upload",label:"Uploading to KaneAI",status:"pending"},{name:"finalize",label:"Finalizing test case",status:"pending"},{name:"code_export",label:"Downloading test code",status:"pending"}]}function k(o,r,a,i){return o.map(p=>p.name===r?{...p,status:a,detail:i}:p)}function I(o){let r=o/1e3;if(r<60)return`${r.toFixed(1)}s`;let a=Math.floor(r/60),i=Math.round(r%60);return`${a}m ${i}s`}function O(o){let[r,a]=(0,c.useState)(0),i=c.default.useRef(Date.now());return(0,c.useEffect)(()=>{if(!o)return;i.current=Date.now();let p=setInterval(()=>{a(Date.now()-i.current)},100);return()=>clearInterval(p)},[o]),r}function y({steps:o,status:r,testUrl:a,error:i}){let p=O(r==="uploading");return r==="uploading"?(0,e.jsxs)(s,{flexDirection:"column",paddingX:1,paddingY:1,children:[(0,e.jsxs)(s,{children:[(0,e.jsx)(n,{color:t.primary,children:"\u2601 "}),(0,e.jsx)(n,{color:t.primary,bold:!0,children:"Saving to KaneAI"}),(0,e.jsxs)(n,{color:t.dimmed,children:[" ",I(p)]})]}),(0,e.jsx)(s,{flexDirection:"column",marginTop:1,children:o.filter(l=>l.status!=="skipped").map((l,E,P)=>{let D=E===P.length-1?"\u2514\u2500":"\u251C\u2500",g=l.status==="done",x=l.status==="running",S=l.status==="failed";return(0,e.jsxs)(s,{children:[(0,e.jsxs)(n,{color:t.dimmed,children:[" ",D," "]}),(0,e.jsx)(s,{width:3,children:x?(0,e.jsx)(v,{}):g?(0,e.jsx)(n,{color:t.green,children:"\u2713"}):S?(0,e.jsx)(n,{color:t.red,children:"\u2717"}):(0,e.jsx)(n,{color:t.muted,children:"\u25CB"})}),(0,e.jsx)(n,{color:g?t.dim:x?t.base:S?t.red:t.muted,children:l.label}),l.detail&&(0,e.jsxs)(n,{color:t.dimmed,children:[" ",l.detail]})]},l.name)})}),(0,e.jsx)(s,{marginTop:1,children:(0,e.jsx)(n,{color:t.muted,children:" press Ctrl+C twice to force exit"})})]}):r==="success"?(0,e.jsx)(e.Fragment,{}):(0,e.jsxs)(s,{flexDirection:"column",paddingX:1,paddingY:1,children:[(0,e.jsxs)(s,{children:[(0,e.jsx)(n,{color:t.red,children:"\u2601 "}),(0,e.jsx)(n,{color:t.red,bold:!0,children:"Save failed"})]}),i&&(0,e.jsxs)(s,{marginTop:0,children:[(0,e.jsx)(n,{color:t.dimmed,children:" "}),(0,e.jsx)(n,{color:t.dim,children:i})]})]})}export{b as a,v as b,$ as c,k as d,y as e};
|
package/dist/chunk-NRQDE7HH.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as n}from"./chunk-3CJ6IY5O.js";var o=class{constructor(t,r,e,s){this.controllerBaseUrl=t;this.getOAuthToken=r;this.directBasicAuth=e;this.log=s}_cached=null;_revoked=!1;revoke(){this._revoked=!0,this._cached=null}get revoked(){return this._revoked}get cached(){return this._cached}async resolve(t=!1){if(this._cached&&!t)return this._cached;try{let r;if(this.directBasicAuth)r=new n(this.controllerBaseUrl,{username:this.directBasicAuth.username,accessKey:this.directBasicAuth.access_key});else{let s=await this.getOAuthToken();if(!s)return null;r=new n(this.controllerBaseUrl,s)}let e=await r.getTmsCredentials();return this.directBasicAuth&&!e.access_key&&(e.access_key=this.directBasicAuth.access_key),this._cached=e,this.log?.(`AUTH_RESOLVE success: user=${e.username} org=${e.org_id} user_id=${e.user_id} has_access_key=${!!e.access_key}`),e}catch(r){return this.log?.(`AUTH_RESOLVE failed: ${r instanceof Error?r.message:String(r)}`),null}}async fetch(t,r={}){if(this._revoked)throw new Error("Resolver has been revoked \u2014 identity changed");let e=await this.resolve();if(!e)throw new Error("Not authenticated \u2014 no credentials resolved");let s=i=>({...r,headers:{...r.headers,Authorization:`Basic ${Buffer.from(`${i.username}:${i.access_key}`).toString("base64")}`}}),a=await globalThis.fetch(t,s(e));if(a.status===401){if(this._revoked)throw new Error("Resolver has been revoked \u2014 identity changed");this.log?.(`AUTH_RESOLVE 401 on ${t} \u2014 re-resolving`);let i=await this.resolve(!0);if(!i)throw new Error("Re-authentication failed after 401");return globalThis.fetch(t,s(i))}return a}};export{o as a};
|
package/dist/chunk-RDG6MGL7.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{homedir as s}from"os";import{join as t}from"path";var p="0.2.4",m="kane-cli",e=t(s(),".testmuai","kaneai"),l=t(e,"profiles"),i=t(e,"config.json"),d=t(e,"tui-config.json"),h="https://registry.npmjs.org/@testmuai/kane-cli",f="https://api.github.com/repos/LambdaTest/kane-cli/releases",_=9222,u=9230,A=t(e,"chrome-profile"),U=t(e,"chrome-profiles"),r="127.0.0.1",b=18392,g=18400,o="/callback";function x(a){return`http://${r}:${a}${o}`}var L="KANE CLI",E="*",R={prod:{authBaseUrl:"https://auth.lambdatest.com",consentUrl:"https://accounts.lambdatest.com",controllerBaseUrl:"https://kaneai-api.lambdatest.com/v16-controller/v1",tmsBaseUrl:"https://test-manager-api.lambdatest.com/api",secretsBaseUrl:"https://api-hyperexecute.lambdatest.com",testManagerUiUrl:"https://test-manager.lambdatest.com",shareApiBaseUrl:"https://api.lambdatest.com",v16ServerHost:"https://kaneai-api.lambdatest.com/v16-server"},stage:{authBaseUrl:"https://stage-auth.lambdatestinternal.com",consentUrl:"https://stage-accounts.lambdatestinternal.com",controllerBaseUrl:"https://auteur-stage-automind.lambdatestinternal.com/v16-controller/v1",tmsBaseUrl:"https://stage-test-manager-api.lambdatestinternal.com/api",secretsBaseUrl:"https://api-stage-hyperexecute.lambdatestinternal.com",testManagerUiUrl:"https://stage-test-manager.lambdatestinternal.com",shareApiBaseUrl:"https://stage-api.lambdatestinternal.com",v16ServerHost:"https://auteur-stage-automind.lambdatestinternal.com/v16-server"}},C={base:"#ffffff",primary:"#ff9500",secondary:"#888888",accent:"#ffffff",dim:"#666666",ambient:"#444444",statusPass:"#4ade80",statusFail:"#ef4444",purple:"#ff9500",cyan:"#ff9500",yellow:"#ff9500",green:"#4ade80",greenDim:"#666666",red:"#ef4444",redDim:"#666666",dimmed:"#666666",muted:"#444444"};export{p as a,m as b,e as c,d,h as e,f,_ as g,u as h,U as i,r as j,b as k,g as l,o as m,x as n,L as o,E as p,R as q,C as r};
|
package/dist/chunk-RPQV6H45.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as M}from"./chunk-HCBYKLMW.js";import{q as N,r as t}from"./chunk-RDG6MGL7.js";import{a as i,b as n,i as R}from"./chunk-Q7JVDEOV.js";import{a as P}from"./chunk-6YGTRKDT.js";import{e as b}from"./chunk-UR6MHSHU.js";function y(a="prod"){let r=N[a];return a!=="stage"?r:{authBaseUrl:process.env.KANE_STAGE_AUTH_URL??r.authBaseUrl,consentUrl:process.env.KANE_STAGE_CONSENT_URL??r.consentUrl,controllerBaseUrl:process.env.TESTMUAI_BASE_URL??r.controllerBaseUrl,tmsBaseUrl:process.env.KANE_STAGE_TMS_URL??r.tmsBaseUrl,secretsBaseUrl:process.env.KANE_STAGE_SECRETS_URL??r.secretsBaseUrl,testManagerUiUrl:process.env.KANE_STAGE_TEST_MANAGER_UI_URL??r.testManagerUiUrl,shareApiBaseUrl:process.env.KANE_STAGE_SHARE_API_URL??r.shareApiBaseUrl,v16ServerHost:process.env.KANE_STAGE_V16_SERVER_HOST??r.v16ServerHost}}var f=b(P(),1);var e=b(M(),1),g=5;function w(a,r){if(!r)return a;let u=r.toLowerCase();return a.filter(E=>E.label.toLowerCase().includes(u))}function Y({title:a,items:r,loading:u=!1,loadingText:E,error:U=null,itemNoun:A="items",onSelect:C,onCancel:L,defaultActiveId:S}){let[m,c]=(0,f.useState)(0),[T,p]=(0,f.useState)(0),[d,_]=(0,f.useState)("");(0,f.useEffect)(()=>{if(r.length===0)return;let l=S?r.findIndex(o=>o.id===S):r.findIndex(o=>o.isActive);l>=0&&(p(Math.floor(l/g)),c(l%g))},[r,S]);let x=w(r,d),B=T*g,I=Math.min(B+g,x.length),v=Math.ceil(x.length/g),G=I-B,h=x.slice(B,I);return R((l,o)=>{if(U){o.escape&&L();return}if(o.escape){d?(_(""),c(0),p(0)):L();return}if(o.upArrow){m>0?c(s=>s-1):T>0&&(p(s=>s-1),c(g-1));return}if(o.downArrow){m<G-1?c(s=>s+1):T<v-1&&(p(s=>s+1),c(0));return}if(o.return&&h[m]){C(h[m]);return}if(o.backspace||o.delete){_(s=>s.slice(0,-1)),c(0),p(0);return}l&&!o.ctrl&&!o.meta&&(_(s=>s+l),c(0),p(0))},{isActive:!u}),u?(0,e.jsxs)(i,{flexDirection:"column",borderStyle:"round",borderColor:t.primary,paddingX:2,paddingY:1,children:[(0,e.jsx)(n,{color:t.primary,bold:!0,children:a}),(0,e.jsx)(i,{marginTop:1,children:(0,e.jsx)(n,{color:t.secondary,children:E??`Loading ${A}\u2026`})})]}):U?(0,e.jsxs)(i,{flexDirection:"column",borderStyle:"round",borderColor:t.statusFail,paddingX:2,paddingY:1,children:[(0,e.jsx)(n,{color:t.statusFail,bold:!0,children:a}),(0,e.jsx)(i,{marginTop:1,children:(0,e.jsx)(n,{color:t.statusFail,children:U})}),(0,e.jsx)(i,{marginTop:1,children:(0,e.jsx)(n,{color:t.dim,children:"esc back"})})]}):(0,e.jsxs)(i,{flexDirection:"column",borderStyle:"round",borderColor:t.primary,paddingX:2,paddingY:1,children:[(0,e.jsxs)(i,{children:[(0,e.jsx)(n,{color:t.primary,bold:!0,children:a}),(0,e.jsxs)(n,{color:t.dim,children:[" (",x.length,d?`/${r.length}`:""," ",A,")"]})]}),d&&(0,e.jsxs)(i,{marginTop:1,children:[(0,e.jsx)(n,{color:t.secondary,children:"filter: "}),(0,e.jsx)(n,{children:d}),(0,e.jsx)(n,{color:t.dimmed,children:"\u2588"})]}),(0,e.jsx)(i,{flexDirection:"column",marginTop:1,children:x.length===0?(0,e.jsxs)(n,{color:t.dim,children:["No ",A,' match "',d,'"']}):h.map((l,o)=>{let s=o===m,H=s?"\u276F ":" ",K=l.isActive?t.statusPass:s?t.primary:void 0;return(0,e.jsxs)(n,{color:K,children:[H,l.label,l.isActive?" \u25CF selected":""]},l.id)})}),v>1&&(0,e.jsx)(i,{marginTop:1,children:(0,e.jsxs)(n,{color:t.dim,children:["Page ",T+1,"/",v]})}),(0,e.jsx)(i,{marginTop:1,children:(0,e.jsxs)(n,{color:t.dim,children:["\u2191\u2193 navigate \xB7 type to search \xB7 \u21B5 select \xB7 esc ",d?"clear":"back"]})})]})}export{y as a,Y as b};
|
package/dist/chunk-S2FLPRVR.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as E}from"./chunk-HCBYKLMW.js";import{r}from"./chunk-RDG6MGL7.js";import{a as i,b as t,i as M}from"./chunk-Q7JVDEOV.js";import{a as q}from"./chunk-6YGTRKDT.js";import{e as L}from"./chunk-UR6MHSHU.js";var c=L(q(),1);var e=L(E(),1);function G(y){let m=[{id:"method",label:"Auth method",options:[{label:"Basic Auth",value:"basic"},{label:"OAuth (browser)",value:"oauth"}]}];return y&&m.push({id:"env",label:"Environment",options:[{label:"prod",value:"prod"},{label:"stage",value:"stage"}]}),m.push({id:"profile",label:"Profile"}),m.push({id:"credentials",label:"Credentials"}),m}function Z({devMode:y,profiles:m,onBasicLogin:F,onOAuthLogin:W,onComplete:R,onCancel:v}){let X=G(y),[B,S]=(0,c.useState)(0),[P,b]=(0,c.useState)(0),[T,w]=(0,c.useState)({}),[d,p]=(0,c.useState)("select"),[_,x]=(0,c.useState)(""),[u,A]=(0,c.useState)("username"),[z,Y]=(0,c.useState)(""),[k,C]=(0,c.useState)(null),[N,K]=(0,c.useState)(null),g=X[B],$=T.method??"basic",f=T.env??"prod",D=(0,c.useCallback)(()=>{let n=m.filter(l=>l.env===f).map(l=>({label:`${l.profile} [${l.env}]`,value:l.profile}));return n.push({label:"+ Create new",value:"__new__"}),n},[m,f]),I=(0,c.useCallback)(()=>{B===0?v():(S(a=>a-1),b(0),p("select"),x(""),C(null))},[B,v]),O=(0,c.useCallback)(a=>{$==="basic"?(p("text-input"),A("username"),x("")):(p("waiting"),W(a,f).then(()=>{K(`Logged in via OAuth as ${a} [${f}]`),p("done")}).catch(n=>{C(n.message),p("error")}))},[$,f,W]);M((a,n)=>{if(d==="done"){let o=T.profile??"default";R(o,f);return}if(d==="error"){v();return}if(d==="waiting"){n.escape&&v();return}if(d==="text-input"||d==="text-input-masked"){if(n.escape){I();return}if(n.return){let o=_.trim();if(!o)return;if(u==="profileName"){let s=o;w(V=>({...V,profile:s})),O(s);return}if(u==="username"){Y(o),x(""),A("accessKey"),p("text-input-masked");return}if(u==="accessKey"){let s=T.profile??"default";F(s,f,z,o),K(`Logged in as ${s} [${f}] via basic auth`),p("done");return}}if(n.backspace||n.delete){x(o=>o.slice(0,-1));return}a&&!n.ctrl&&!n.meta&&x(o=>o+a);return}if(n.escape){I();return}let l=g?.id==="profile"?D():g?.options??[];if(n.upArrow){b(o=>Math.max(0,o-1));return}if(n.downArrow){b(o=>Math.min(l.length-1,o+1));return}if(n.return&&l[P]){let o=l[P];if(g.id==="profile"){if(o.value==="__new__"){p("text-input"),A("profileName"),x("");return}w(s=>({...s,profile:o.value})),S(s=>s+1),b(0),O(o.value);return}w(s=>({...s,[g.id]:o.value})),S(s=>s+1),b(0)}});let h="Login";if(d==="done")return(0,e.jsxs)(i,{flexDirection:"column",borderStyle:"round",borderColor:r.statusPass,paddingX:2,paddingY:1,children:[(0,e.jsxs)(t,{color:r.statusPass,bold:!0,children:["\u2713 ",N]}),(0,e.jsx)(i,{marginTop:1,children:(0,e.jsx)(t,{color:r.dim,children:"press any key"})})]});if(d==="error")return(0,e.jsxs)(i,{flexDirection:"column",borderStyle:"round",borderColor:r.statusFail,paddingX:2,paddingY:1,children:[(0,e.jsx)(t,{color:r.statusFail,bold:!0,children:"Login failed"}),(0,e.jsx)(i,{marginTop:1,children:(0,e.jsx)(t,{color:r.statusFail,children:k})}),(0,e.jsx)(i,{marginTop:1,children:(0,e.jsx)(t,{color:r.dim,children:"press any key"})})]});if(d==="waiting")return(0,e.jsxs)(i,{flexDirection:"column",borderStyle:"round",borderColor:r.primary,paddingX:2,paddingY:1,children:[(0,e.jsxs)(t,{color:r.primary,bold:!0,children:[h," \u203A OAuth"]}),(0,e.jsx)(i,{marginTop:1,children:(0,e.jsx)(t,{color:r.secondary,children:"Opening browser for login..."})}),(0,e.jsx)(i,{marginTop:1,children:(0,e.jsx)(t,{color:r.primary,children:"Waiting for callback \u27F3"})}),(0,e.jsx)(i,{marginTop:1,children:(0,e.jsx)(t,{color:r.dim,children:"esc cancel"})})]});if(d==="text-input"||d==="text-input-masked"){let a=u==="username"?"Username":u==="accessKey"?"Access Key":"Profile name",n=d==="text-input-masked"?"\u2022".repeat(_.length):_,l=u==="username"||u==="accessKey"?`${h} \u203A Basic Auth`:`${h} \u203A New Profile`;return(0,e.jsxs)(i,{flexDirection:"column",borderStyle:"round",borderColor:r.primary,paddingX:2,paddingY:1,children:[(0,e.jsx)(t,{color:r.primary,bold:!0,children:l}),u==="accessKey"&&(0,e.jsxs)(i,{marginTop:1,children:[(0,e.jsx)(t,{color:r.secondary,children:"Username: "}),(0,e.jsx)(t,{children:z})]}),(0,e.jsxs)(i,{marginTop:1,children:[(0,e.jsxs)(t,{color:r.secondary,children:[a,": "]}),(0,e.jsx)(t,{children:n}),(0,e.jsx)(t,{color:r.dimmed,children:"\u2588"})]}),(0,e.jsx)(i,{marginTop:1,children:(0,e.jsx)(t,{color:r.dim,children:"\u21B5 confirm \xB7 esc back"})})]})}let U=g?.id==="profile"?D():g?.options??[];return(0,e.jsxs)(i,{flexDirection:"column",borderStyle:"round",borderColor:r.primary,paddingX:2,paddingY:1,children:[(0,e.jsx)(t,{color:r.primary,bold:!0,children:h}),(0,e.jsx)(i,{marginTop:1,children:(0,e.jsxs)(t,{color:r.secondary,children:[g?.label,":"]})}),(0,e.jsx)(i,{flexDirection:"column",marginTop:1,children:U.map((a,n)=>{let l=n===P,o=l?"\u276F ":" ",s=a.value==="__new__"?r.statusPass:l?r.primary:void 0;return(0,e.jsxs)(t,{color:s,children:[o,a.label]},a.value)})}),(0,e.jsx)(i,{marginTop:1,children:(0,e.jsx)(t,{color:r.dim,children:"\u2191\u2193 navigate \xB7 \u21B5 select \xB7 esc back"})})]})}export{G as a,Z as b};
|
package/dist/chunk-XHPTLI5U.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as S}from"./chunk-HCBYKLMW.js";import{i as p,r as t}from"./chunk-RDG6MGL7.js";import{a as m,b as n,i as y}from"./chunk-Q7JVDEOV.js";import{a as L}from"./chunk-6YGTRKDT.js";import{e as h}from"./chunk-UR6MHSHU.js";var g=h(L(),1);import{readdirSync as D,mkdirSync as A,statSync as N}from"fs";import{join as P}from"path";var r=h(S(),1);function O(c){try{return D(c).filter(s=>{try{return N(P(c,s)).isDirectory()}catch{return!1}})}catch{return[]}}function E(c,s,f,T){return{name:c,path:s,label:c,isActive:T}}function F({currentPath:c,onSelect:s,onCancel:f}){let l=O(p).map(i=>{let e=P(p,i);return E(i,e,c,e===c)}),d=!c,B=l.length+2,[a,b]=(0,g.useState)(()=>{if(d)return 0;let i=l.findIndex(e=>e.isActive);return i>=0?i+1:0}),[v,C]=(0,g.useState)(!1),[I,x]=(0,g.useState)("");return y((i,e)=>{if(v){if(e.escape){C(!1),x("");return}if(e.return){let o=I.trim();if(o){let u=P(p,o);A(u,{recursive:!0}),s(u),f()}return}if(e.backspace||e.delete){x(o=>o.slice(0,-1));return}i&&!e.ctrl&&!e.meta&&x(o=>o+i);return}if(e.escape){f();return}if(e.upArrow){b(o=>Math.max(0,o-1));return}if(e.downArrow){b(o=>Math.min(B-1,o+1));return}if(e.return){if(a===0){d||s(""),f();return}if(a===l.length+1){A(p,{recursive:!0}),C(!0),x("");return}let o=l[a-1];o&&!o.isActive&&s(o.path),f();return}}),v?(0,r.jsxs)(m,{flexDirection:"column",borderStyle:"round",borderColor:t.primary,paddingX:2,paddingY:1,children:[(0,r.jsx)(n,{color:t.primary,bold:!0,children:"Chrome Profile \u203A New"}),(0,r.jsxs)(m,{marginTop:1,children:[(0,r.jsx)(n,{color:t.secondary,children:"Name: "}),(0,r.jsx)(n,{children:I}),(0,r.jsx)(n,{color:t.dimmed,children:"\u2588"})]}),(0,r.jsx)(m,{marginTop:1,children:(0,r.jsx)(n,{color:t.dim,children:"\u21B5 create \xB7 esc back"})})]}):(0,r.jsxs)(m,{flexDirection:"column",borderStyle:"round",borderColor:t.primary,paddingX:2,paddingY:1,children:[(0,r.jsx)(n,{color:t.primary,bold:!0,children:"Chrome Profile"}),(0,r.jsxs)(m,{flexDirection:"column",marginTop:1,children:[(0,r.jsxs)(n,{color:d?t.statusPass:a===0?t.primary:t.dim,children:[a===0?"\u276F ":" ","Use temporary (no profile)",d?" \u25CF active":""]}),l.map((i,e)=>{let u=e+1===a,R=u?"\u276F ":" ",w=i.isActive?t.statusPass:u?t.primary:void 0;return(0,r.jsxs)(n,{color:w,children:[R,i.label,i.isActive?" \u25CF active":""]},i.name)}),(0,r.jsxs)(n,{color:a===l.length+1?t.primary:t.dim,children:[a===l.length+1?"\u276F ":" ","+ Create new"]})]}),(0,r.jsx)(m,{marginTop:1,children:(0,r.jsx)(n,{color:t.dim,children:"\u2191\u2193 navigate \xB7 \u21B5 select \xB7 esc back"})})]})}export{O as a,E as b,F as c};
|
package/dist/chunk-YNF4MUQP.js
DELETED