@testmuai/kane-cli 0.2.4 → 0.2.5
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-J34PIRKT.js} +1 -1
- package/dist/{CliFeedbackPrompt-RIIDDIY5.js → CliFeedbackPrompt-6BF5FIGV.js} +1 -1
- package/dist/{CliUploadProgress-QF57Z3FD.js → CliUploadProgress-OLN4CLU7.js} +1 -1
- package/dist/{ConfigView-5R4G4OZ6.js → ConfigView-P4W6OHZK.js} +1 -1
- package/dist/{FolderPicker-G4C4RCP2.js → FolderPicker-CJAJHSMM.js} +1 -1
- package/dist/HelpView-AZGTX7MR.js +2 -0
- package/dist/{LinksBox-623NMFSA.js → LinksBox-P7HGFKVG.js} +1 -1
- package/dist/{LoginWizard-SSE5NJVU.js → LoginWizard-LQKZ3AYY.js} +1 -1
- package/dist/{ProfilesView-DBNO4RSU.js → ProfilesView-RXVSD4YZ.js} +1 -1
- package/dist/{ProjectPicker-AFQDF2VS.js → ProjectPicker-GFSQKLDY.js} +1 -1
- package/dist/{WhoamiView-2VBZBQF7.js → WhoamiView-GVVXM665.js} +1 -1
- package/dist/{changelog-XYK3P4RQ.js → changelog-WS4VVR5W.js} +1 -1
- package/dist/{chunk-JXLB6N6Q.js → chunk-37E6GGJP.js} +1 -1
- package/dist/{chunk-KSHUUU2I.js → chunk-4XWNQQSQ.js} +1 -1
- package/dist/{chunk-B4K7UTF2.js → chunk-5DRGVR7L.js} +1 -1
- package/dist/{chunk-GNMGQOGV.js → chunk-6JF2T7BO.js} +1 -1
- package/dist/{chunk-LZZDLYE3.js → chunk-722N7IS6.js} +1 -1
- package/dist/{chunk-NRQDE7HH.js → chunk-C5U522LO.js} +1 -1
- package/dist/{chunk-XHPTLI5U.js → chunk-CVDB2PVG.js} +1 -1
- package/dist/{chunk-BSMUBGQO.js → chunk-F5NOXQWP.js} +1 -1
- package/dist/{chunk-RDG6MGL7.js → chunk-F6J3XGBQ.js} +1 -1
- package/dist/{chunk-IA4UI2BT.js → chunk-FH54KGU4.js} +1 -1
- package/dist/{chunk-3CJ6IY5O.js → chunk-GPQFSC4B.js} +1 -1
- package/dist/{chunk-RPQV6H45.js → chunk-I7KNK4LR.js} +1 -1
- package/dist/{chunk-426ZAKPO.js → chunk-UJP3DMYF.js} +1 -1
- package/dist/{chunk-GTYF5DR6.js → chunk-V77DQ5LB.js} +1 -1
- package/dist/{chunk-S2FLPRVR.js → chunk-W22K4TDJ.js} +1 -1
- package/dist/{controller-client-PS5GDXE3.js → controller-client-VI55T5AT.js} +1 -1
- package/dist/index.js +41 -41
- package/dist/{pipeline-7NY333ZT.js → pipeline-ZLHWF3V7.js} +1 -1
- package/dist/{resolver-L3Z6FAOD.js → resolver-XLRER3KZ.js} +1 -1
- package/dist/{updater-H5HYMYRG.js → updater-KDWM6PUM.js} +1 -1
- package/dist/{version-check-KS7CP3M5.js → version-check-YRWT2JIC.js} +1 -1
- package/package.json +4 -4
- package/dist/HelpView-2ZFLX7JC.js +0 -2
|
@@ -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-CVDB2PVG.js";import"./chunk-HCBYKLMW.js";import"./chunk-F6J3XGBQ.js";import"./chunk-Q7JVDEOV.js";import"./chunk-6YGTRKDT.js";import"./chunk-UR6MHSHU.js";export{c as ChromeProfilePicker,b as formatChromeProfileLine,a as listChromeProfiles};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as r}from"./chunk-
|
|
2
|
+
import{a as r}from"./chunk-FH54KGU4.js";import"./chunk-HCBYKLMW.js";import"./chunk-F6J3XGBQ.js";import{c as e}from"./chunk-Q7JVDEOV.js";import{a as i}from"./chunk-6YGTRKDT.js";import{e as m}from"./chunk-UR6MHSHU.js";var t=m(i(),1);async function d(){return new Promise(o=>{let c=e(t.default.createElement(r,{onSubmit:n=>{c.unmount(),o(n)}}),{stdout:process.stderr,exitOnCtrlC:!1})})}export{d as renderFeedbackPrompt};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{c as P,d as g,e as f}from"./chunk-
|
|
2
|
+
import{c as P,d as g,e as f}from"./chunk-4XWNQQSQ.js";import{a as c}from"./chunk-HCBYKLMW.js";import"./chunk-F6J3XGBQ.js";import{c as d}from"./chunk-Q7JVDEOV.js";import{a as h}from"./chunk-6YGTRKDT.js";import{e as p}from"./chunk-UR6MHSHU.js";var e=p(h(),1);var m=p(c(),1);function w({pipeline:t,buildShareUrl:r,onDone:o}){let[n,i]=(0,e.useState)(P()),[S,l]=(0,e.useState)("uploading"),[U,R]=(0,e.useState)(),[C,E]=(0,e.useState)();return(0,e.useEffect)(()=>{let x=t.config.onProgress;t.config.onProgress=(s,u,a)=>{x(s,u,a),i(y=>g(y,s,u,a))},t.execute().then(s=>{s.success?(R(r?.(s)),l("success")):(E(s.error),l("failed")),setTimeout(()=>o(s),1500)})},[]),(0,m.jsx)(f,{steps:n,status:S,testUrl:U,error:C})}async function O(t,r){return new Promise(o=>{let n=d(e.default.createElement(w,{pipeline:t,buildShareUrl:r,onDone:i=>{n.unmount(),o(i)}}),{stdout:process.stderr,exitOnCtrlC:!1})})}export{O as renderUploadProgress};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as f,b as l,c as r}from"./chunk-
|
|
2
|
+
import{a as f,b as l,c as r}from"./chunk-5DRGVR7L.js";import{a as d}from"./chunk-HCBYKLMW.js";import{r as o}from"./chunk-F6J3XGBQ.js";import{a as t,j as m}from"./chunk-Q7JVDEOV.js";import{a as h}from"./chunk-6YGTRKDT.js";import{e as n}from"./chunk-UR6MHSHU.js";var c=n(h(),1);var e=n(d(),1);function D({model:s,authLabel:p,profile:b,env:g,defaultUrl:a,projectId:v,folderId:w,windowSize:x,chromeProfile:C,setupComplete:i}){let{exit:u}=m();return(0,c.useEffect)(()=>{let B=setTimeout(()=>u(),50);return()=>clearTimeout(B)},[u]),(0,e.jsx)(t,{flexDirection:"column",children:(0,e.jsx)(f,{title:"Configuration",children:(0,e.jsxs)(t,{flexDirection:"column",paddingY:1,children:[(0,e.jsx)(r,{label:"Auth"}),(0,e.jsx)(l,{label:" method",value:p}),(0,e.jsx)(l,{label:" profile",value:b}),(0,e.jsx)(l,{label:" env",value:g}),(0,e.jsx)(r,{label:"Defaults"}),(0,e.jsx)(l,{label:" url",value:a??"(none)",valueColor:a?o.cyan:o.dimmed}),(0,e.jsx)(l,{label:" model",value:s}),(0,e.jsx)(l,{label:" window",value:x}),(0,e.jsx)(l,{label:" project",value:v??"(none)"}),(0,e.jsx)(l,{label:" folder",value:w??"(none)"}),(0,e.jsx)(r,{label:"Paths"}),(0,e.jsx)(l,{label:" chrome",value:C,valueColor:o.dimmed}),(0,e.jsx)(r,{label:"Setup"}),(0,e.jsx)(l,{label:" status",value:i?"complete":"pending",valueColor:i?o.green:o.yellow})]})})})}export{D as ConfigView};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a,b}from"./chunk-
|
|
2
|
+
import{a,b}from"./chunk-722N7IS6.js";import"./chunk-I7KNK4LR.js";import"./chunk-I7YWZ3D2.js";import"./chunk-HCBYKLMW.js";import"./chunk-F6J3XGBQ.js";import"./chunk-Q7JVDEOV.js";import"./chunk-6YGTRKDT.js";import"./chunk-UR6MHSHU.js";export{b as FolderPicker,a as formatFolderLine};
|
|
@@ -0,0 +1,2 @@
|
|
|
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 a,r as t}from"./chunk-F6J3XGBQ.js";import{a as n,b as o,j as x,k as p}from"./chunk-Q7JVDEOV.js";import{a as b}from"./chunk-6YGTRKDT.js";import{e as u}from"./chunk-UR6MHSHU.js";var T=u(b(),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:i}=x(),{stdout:l}=p(),s=l?.columns??80;return(0,T.useEffect)(()=>{let d=setTimeout(()=>i(),50);return()=>clearTimeout(d)},[i]),(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:a}),(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:[" $ ",a," ","<command>"," [flags]"]})}),(0,e.jsxs)(m,{title:"COMMANDS",children:[(0,e.jsx)(c,{cmd:"run",args:"<objective>",desc:"Run a browser automation task",highlight:!0}),(0,e.jsx)(c,{cmd:"login",desc:"Auth setup (interactive, --oauth, or --username)"}),(0,e.jsx)(c,{cmd:"logout",desc:"Revoke tokens + delete profile"}),(0,e.jsx)(c,{cmd:"whoami",desc:"Show authenticated identity"}),(0,e.jsx)(c,{cmd:"config",args:"show|set-\u2026|reset",desc:"Manage configuration"}),(0,e.jsx)(c,{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:`${a} run "Search for laptop" --url https://amazon.in`}),(0,e.jsx)(g,{label:"Headless",cmd:`${a} run "Verify login" --url https://app.example.com --headless`}),(0,e.jsx)(g,{label:"Variables",cmd:`${a} run "Login as {{user}}" --url https://app.com --variables '{"user":{"value":"alice"}}'`}),(0,e.jsx)(g,{label:"Agent",cmd:`${a} 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:i,children:l}){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:i})}),l]})}function c({cmd:i,args:l,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:i})}),(0,e.jsx)(n,{width:28,children:l?(0,e.jsx)(o,{color:t.dimmed,children:l}):null}),(0,e.jsx)(o,{color:t.dimmed,children:s})]})}function r({long:i,arg:l,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:i}),l&&(0,e.jsxs)(o,{color:t.dimmed,children:[" ",l]})]}),(0,e.jsx)(o,{color:t.dimmed,children:s})]})}function g({label:i,cmd:l}){return(0,e.jsxs)(n,{marginLeft:2,flexDirection:"column",children:[(0,e.jsxs)(o,{color:t.dimmed,children:["# ",i]}),(0,e.jsxs)(o,{color:t.cyan,children:["$ ",l]})]})}export{L as HelpView};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a}from"./chunk-
|
|
2
|
+
import{a}from"./chunk-UJP3DMYF.js";import"./chunk-HCBYKLMW.js";import"./chunk-F6J3XGBQ.js";import"./chunk-Q7JVDEOV.js";import"./chunk-6YGTRKDT.js";import"./chunk-UR6MHSHU.js";export{a as LinksBox};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a,b}from"./chunk-
|
|
2
|
+
import{a,b}from"./chunk-W22K4TDJ.js";import"./chunk-HCBYKLMW.js";import"./chunk-F6J3XGBQ.js";import"./chunk-Q7JVDEOV.js";import"./chunk-6YGTRKDT.js";import"./chunk-UR6MHSHU.js";export{b as LoginWizard,a as getWizardSteps};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a,b}from"./chunk-
|
|
2
|
+
import{a,b}from"./chunk-37E6GGJP.js";import"./chunk-HCBYKLMW.js";import"./chunk-F6J3XGBQ.js";import"./chunk-Q7JVDEOV.js";import"./chunk-6YGTRKDT.js";import"./chunk-UR6MHSHU.js";export{b as ProfilesView,a as formatProfileLine};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a,b}from"./chunk-
|
|
2
|
+
import{a,b}from"./chunk-F5NOXQWP.js";import"./chunk-I7KNK4LR.js";import"./chunk-I7YWZ3D2.js";import"./chunk-HCBYKLMW.js";import"./chunk-F6J3XGBQ.js";import"./chunk-Q7JVDEOV.js";import"./chunk-6YGTRKDT.js";import"./chunk-UR6MHSHU.js";export{b as ProjectPicker,a as formatProjectLine};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as s,b as o}from"./chunk-
|
|
2
|
+
import{a as s,b as o}from"./chunk-5DRGVR7L.js";import{a as x}from"./chunk-HCBYKLMW.js";import{r as i}from"./chunk-F6J3XGBQ.js";import{a as r,b as n,j as u}from"./chunk-Q7JVDEOV.js";import{a as B}from"./chunk-6YGTRKDT.js";import{e as t}from"./chunk-UR6MHSHU.js";var p=t(B(),1);var e=t(x(),1);function R({profile:f,env:g,authenticated:a,authMethod:v,username:m,tokenStatus:l,expiresAt:c}){let{exit:d}=u();return(0,p.useEffect)(()=>{let b=setTimeout(()=>d(),50);return()=>clearTimeout(b)},[d]),(0,e.jsx)(r,{flexDirection:"column",children:(0,e.jsx)(s,{title:"Identity",variant:a?"success":"warning",children:(0,e.jsxs)(r,{flexDirection:"column",paddingY:1,children:[(0,e.jsx)(r,{children:a?(0,e.jsx)(n,{color:i.green,bold:!0,children:"\u2713 Authenticated"}):(0,e.jsx)(n,{color:i.yellow,bold:!0,children:"\u26A0 Not logged in"})}),(0,e.jsxs)(r,{flexDirection:"column",marginTop:1,children:[(0,e.jsx)(o,{label:"Profile",value:f}),(0,e.jsx)(o,{label:"Environment",value:g}),(0,e.jsx)(o,{label:"Method",value:v}),m&&(0,e.jsx)(o,{label:"User",value:m}),l&&(0,e.jsx)(o,{label:"Token",value:l,valueColor:l==="valid"?i.green:l==="expired"?i.red:i.dimmed}),c&&(0,e.jsx)(o,{label:"Expires",value:c})]})]})})})}export{R as WhoamiView};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{c as i,f as c}from"./chunk-
|
|
2
|
+
import{c as i,f as c}from"./chunk-F6J3XGBQ.js";import"./chunk-UR6MHSHU.js";import{readFileSync as h,writeFileSync as g,mkdirSync as u}from"fs";import{join as d}from"path";var l=d(i,"changelog-cache.json"),f=3600*1e3;function p(){try{let e=JSON.parse(h(l,"utf-8"));if(Date.now()-e.cachedAt<f)return e}catch{}return null}function y(e){try{u(i,{recursive:!0}),g(l,JSON.stringify({entries:e,cachedAt:Date.now()}))}catch{}}async function E(e){try{let t=p();if(t){let r=t.entries;return e?.all?r:r.slice(0,5)}let n=new AbortController,o=setTimeout(()=>n.abort(),5e3),a=await fetch(`${c}?per_page=30`,{headers:{Accept:"application/vnd.github+json"},signal:n.signal});if(clearTimeout(o),!a.ok)return[];let s=(await a.json()).map(r=>({version:r.tag_name.replace(/^v/,""),date:r.published_at?r.published_at.slice(0,10):"",body:r.body??""}));return y(s),e?.all?s:s.slice(0,5)}catch{return[]}}function A(e){if(e.length===0)return"Could not fetch changelog. Visit https://github.com/LambdaTest/kane-cli/releases";let t=["kane-cli Changelog","\u2500".repeat(40),""];for(let n of e){if(t.push(`v${n.version} (${n.date})`),n.body){let o=n.body.split(`
|
|
3
3
|
`).filter(a=>a.trim());for(let a of o)t.push(` ${a}`)}t.push("")}return t.join(`
|
|
4
4
|
`)}export{E as fetchChangelog,A as formatChangelog};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as P}from"./chunk-HCBYKLMW.js";import{r as i}from"./chunk-
|
|
2
|
+
import{a as P}from"./chunk-HCBYKLMW.js";import{r as i}from"./chunk-F6J3XGBQ.js";import{a,b as l,i as h}from"./chunk-Q7JVDEOV.js";import{a as w}from"./chunk-6YGTRKDT.js";import{e as b}from"./chunk-UR6MHSHU.js";var A=b(w(),1);var o=b(P(),1);function B(n,d,f,m,p){let x=f==="basic"&&m?`basic (${m})`:f,s=20,c=`${n} [${d}]`,u="\xB7".repeat(Math.max(2,s-c.length+3));return{label:`${c} ${u} ${x}`,profile:n,env:d,isActive:p}}function y({creds:n,onSwitch:d,onCancel:f}){let m=n.listProfiles(),p=n.getActiveProfile(),x=n.getDefaultEnv(),s=m.map(e=>{let t=n.loadBasicAuth(e.profile,e.env),r=n.loadCredentials(e.profile,e.env)!==null,g=t?"basic":r?"oauth":"none",v=t?t.username:null,T=e.profile===p&&e.env===x;return B(e.profile,e.env,g,v,T)}),[c,u]=(0,A.useState)(()=>{let e=s.findIndex(t=>t.isActive);return e>=0?e:0});return h((e,t)=>{if(t.escape){f();return}if(t.upArrow){u(r=>Math.max(0,r-1));return}if(t.downArrow){u(r=>Math.min(s.length-1,r+1));return}if(t.return&&s[c]){let r=s[c];r.isActive||d(r.profile,r.env),f();return}}),s.length===0?(0,o.jsxs)(a,{flexDirection:"column",borderStyle:"round",borderColor:i.primary,paddingX:2,paddingY:1,children:[(0,o.jsx)(l,{color:i.primary,bold:!0,children:"Profiles"}),(0,o.jsx)(a,{marginTop:1,children:(0,o.jsx)(l,{color:i.dim,children:"No profiles \u2014 use Login to create one"})}),(0,o.jsx)(a,{marginTop:1,children:(0,o.jsx)(l,{color:i.dim,children:"esc back"})})]}):(0,o.jsxs)(a,{flexDirection:"column",borderStyle:"round",borderColor:i.primary,paddingX:2,paddingY:1,children:[(0,o.jsx)(l,{color:i.primary,bold:!0,children:"Profiles"}),(0,o.jsx)(a,{flexDirection:"column",marginTop:1,children:s.map((e,t)=>{let r=t===c,g=r?"\u276F ":" ",v=e.isActive?i.statusPass:r?i.primary:void 0;return(0,o.jsxs)(l,{color:v,children:[g,e.label,e.isActive?" \u25CF active":""]},`${e.profile}-${e.env}`)})}),(0,o.jsx)(a,{marginTop:1,children:(0,o.jsx)(l,{color:i.dim,children:"\u2191\u2193 navigate \xB7 \u21B5 switch \xB7 esc back"})})]})}export{B as a,y as b};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
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-
|
|
2
|
+
import{a as d}from"./chunk-HCBYKLMW.js";import{r as t}from"./chunk-F6J3XGBQ.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};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as m}from"./chunk-HCBYKLMW.js";import{r as o}from"./chunk-
|
|
2
|
+
import{a as m}from"./chunk-HCBYKLMW.js";import{r as o}from"./chunk-F6J3XGBQ.js";import{a as r,b as i}from"./chunk-Q7JVDEOV.js";import{e as a}from"./chunk-UR6MHSHU.js";var e=a(m(),1),u={default:o.muted,error:o.red,success:o.green,info:o.purple,warning:o.yellow};function T({title:t,titleColor:l,borderColor:d,variant:n="default",children:c,width:s,paddingX:x=2,paddingY:g=0,marginBottom:p=0}){let f=d??u[n],B=l??(n==="default"?o.purple:u[n]);return(0,e.jsxs)(r,{flexDirection:"column",marginBottom:p,children:[t&&(0,e.jsx)(r,{marginBottom:0,children:(0,e.jsxs)(i,{color:B,bold:!0,children:[" ",t]})}),(0,e.jsx)(r,{borderStyle:"round",borderColor:f,flexDirection:"column",paddingX:x,paddingY:g,width:s,children:c})]})}function h({label:t,value:l,labelColor:d=o.dimmed,valueColor:n,labelWidth:c=14}){return(0,e.jsxs)(r,{children:[(0,e.jsx)(r,{width:c,children:(0,e.jsx)(i,{color:d,children:t})}),(0,e.jsx)(i,{color:n,children:l})]})}function C({label:t}){return(0,e.jsx)(r,{marginTop:1,marginBottom:0,children:(0,e.jsx)(i,{bold:!0,children:t})})}export{T as a,h as b,C as c};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as Ec}from"./chunk-
|
|
2
|
+
import{a as Ec}from"./chunk-GPQFSC4B.js";import{a as xc}from"./chunk-I7YWZ3D2.js";import{a as D,b as Hv,c as g,d as Vv,e as Yv,f as Kv}from"./chunk-UR6MHSHU.js";var Pc=g((YB,Lc)=>{"use strict";var sE=typeof process=="object"&&process&&process.platform==="win32";Lc.exports=sE?{sep:"\\"}:{sep:"/"}});var Fc=g((KB,qc)=>{"use strict";qc.exports=Cc;function Cc(t,e,r){t instanceof RegExp&&(t=kc(t,r)),e instanceof RegExp&&(e=kc(e,r));var i=Mc(t,e,r);return i&&{start:i[0],end:i[1],pre:r.slice(0,i[0]),body:r.slice(i[0]+t.length,i[1]),post:r.slice(i[1]+e.length)}}function kc(t,e){var r=e.match(t);return r?r[0]:null}Cc.range=Mc;function Mc(t,e,r){var i,n,s,o,a,l=r.indexOf(t),u=r.indexOf(e,l+1),f=l;if(l>=0&&u>0){if(t===e)return[l,u];for(i=[],s=r.length;f>=0&&!a;)f==l?(i.push(f),l=r.indexOf(t,f+1)):i.length==1?a=[i.pop(),u]:(n=i.pop(),n<s&&(s=n,o=u),u=r.indexOf(e,f+1)),f=l<u&&l>=0?l:u;i.length&&(a=[s,o])}return a}});var na=g((ZB,$c)=>{"use strict";var jc=Fc();$c.exports=lE;var Bc="\0SLASH"+Math.random()+"\0",Uc="\0OPEN"+Math.random()+"\0",ia="\0CLOSE"+Math.random()+"\0",Wc="\0COMMA"+Math.random()+"\0",zc="\0PERIOD"+Math.random()+"\0";function ra(t){return parseInt(t,10)==t?parseInt(t,10):t.charCodeAt(0)}function oE(t){return t.split("\\\\").join(Bc).split("\\{").join(Uc).split("\\}").join(ia).split("\\,").join(Wc).split("\\.").join(zc)}function aE(t){return t.split(Bc).join("\\").split(Uc).join("{").split(ia).join("}").split(Wc).join(",").split(zc).join(".")}function Gc(t){if(!t)return[""];var e=[],r=jc("{","}",t);if(!r)return t.split(",");var i=r.pre,n=r.body,s=r.post,o=i.split(",");o[o.length-1]+="{"+n+"}";var a=Gc(s);return s.length&&(o[o.length-1]+=a.shift(),o.push.apply(o,a)),e.push.apply(e,o),e}function lE(t){return t?(t.substr(0,2)==="{}"&&(t="\\{\\}"+t.substr(2)),gi(oE(t),!0).map(aE)):[]}function uE(t){return"{"+t+"}"}function fE(t){return/^-?0\d/.test(t)}function cE(t,e){return t<=e}function hE(t,e){return t>=e}function gi(t,e){var r=[],i=jc("{","}",t);if(!i)return[t];var n=i.pre,s=i.post.length?gi(i.post,!1):[""];if(/\$$/.test(i.pre))for(var o=0;o<s.length;o++){var a=n+"{"+i.body+"}"+s[o];r.push(a)}else{var l=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(i.body),u=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(i.body),f=l||u,c=i.body.indexOf(",")>=0;if(!f&&!c)return i.post.match(/,(?!,).*\}/)?(t=i.pre+"{"+i.body+ia+i.post,gi(t)):[t];var h;if(f)h=i.body.split(/\.\./);else if(h=Gc(i.body),h.length===1&&(h=gi(h[0],!1).map(uE),h.length===1))return s.map(function(T){return i.pre+h[0]+T});var d;if(f){var y=ra(h[0]),p=ra(h[1]),S=Math.max(h[0].length,h[1].length),m=h.length==3?Math.max(Math.abs(ra(h[2])),1):1,b=cE,v=p<y;v&&(m*=-1,b=hE);var E=h.some(fE);d=[];for(var A=y;b(A,p);A+=m){var N;if(u)N=String.fromCharCode(A),N==="\\"&&(N="");else if(N=String(A),E){var x=S-N.length;if(x>0){var O=new Array(x+1).join("0");A<0?N="-"+O+N.slice(1):N=O+N}}d.push(N)}}else{d=[];for(var w=0;w<h.length;w++)d.push.apply(d,gi(h[w],!1))}for(var w=0;w<d.length;w++)for(var o=0;o<s.length;o++){var a=n+d[w]+s[o];(!e||f||a)&&r.push(a)}}return r}});var Qc=g((XB,ua)=>{"use strict";var Pe=ua.exports=(t,e,r={})=>(Mn(e),!r.nocomment&&e.charAt(0)==="#"?!1:new wr(e,r).match(t));ua.exports=Pe;var aa=Pc();Pe.sep=aa.sep;var Re=Symbol("globstar **");Pe.GLOBSTAR=Re;var dE=na(),Hc={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}},la="[^/]",sa=la+"*?",pE="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",gE="(?:(?!(?:\\/|^)\\.).)*?",Kc=t=>t.split("").reduce((e,r)=>(e[r]=!0,e),{}),Vc=Kc("().*{}+?[]^$\\!"),_E=Kc("[.("),Yc=/\/+/;Pe.filter=(t,e={})=>(r,i,n)=>Pe(r,t,e);var At=(t,e={})=>{let r={};return Object.keys(t).forEach(i=>r[i]=t[i]),Object.keys(e).forEach(i=>r[i]=e[i]),r};Pe.defaults=t=>{if(!t||typeof t!="object"||!Object.keys(t).length)return Pe;let e=Pe,r=(i,n,s)=>e(i,n,At(t,s));return r.Minimatch=class extends e.Minimatch{constructor(n,s){super(n,At(t,s))}},r.Minimatch.defaults=i=>e.defaults(At(t,i)).Minimatch,r.filter=(i,n)=>e.filter(i,At(t,n)),r.defaults=i=>e.defaults(At(t,i)),r.makeRe=(i,n)=>e.makeRe(i,At(t,n)),r.braceExpand=(i,n)=>e.braceExpand(i,At(t,n)),r.match=(i,n,s)=>e.match(i,n,At(t,s)),r};Pe.braceExpand=(t,e)=>Zc(t,e);var Zc=(t,e={})=>(Mn(t),e.nobrace||!/\{(?:(?!\{).)*\}/.test(t)?[t]:dE(t)),yE=1024*64,Mn=t=>{if(typeof t!="string")throw new TypeError("invalid pattern");if(t.length>yE)throw new TypeError("pattern is too long")},oa=Symbol("subparse");Pe.makeRe=(t,e)=>new wr(t,e||{}).makeRe();Pe.match=(t,e,r={})=>{let i=new wr(e,r);return t=t.filter(n=>i.match(n)),i.options.nonull&&!t.length&&t.push(e),t};var mE=t=>t.replace(/\\(.)/g,"$1"),bE=t=>t.replace(/\\([^-\]])/g,"$1"),wE=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),SE=t=>t.replace(/[[\]\\]/g,"\\$&"),wr=class{constructor(e,r){Mn(e),r||(r={}),this.options=r,this.maxGlobstarRecursion=r.maxGlobstarRecursion!==void 0?r.maxGlobstarRecursion:200,this.set=[],this.pattern=e,this.windowsPathsNoEscape=!!r.windowsPathsNoEscape||r.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.regexp=null,this.negate=!1,this.comment=!1,this.empty=!1,this.partial=!!r.partial,this.make()}debug(){}make(){let e=this.pattern,r=this.options;if(!r.nocomment&&e.charAt(0)==="#"){this.comment=!0;return}if(!e){this.empty=!0;return}this.parseNegate();let i=this.globSet=this.braceExpand();r.debug&&(this.debug=(...n)=>console.error(...n)),this.debug(this.pattern,i),i=this.globParts=i.map(n=>n.split(Yc)),this.debug(this.pattern,i),i=i.map((n,s,o)=>n.map(this.parse,this)),this.debug(this.pattern,i),i=i.filter(n=>n.indexOf(!1)===-1),this.debug(this.pattern,i),this.set=i}parseNegate(){if(this.options.nonegate)return;let e=this.pattern,r=!1,i=0;for(let n=0;n<e.length&&e.charAt(n)==="!";n++)r=!r,i++;i&&(this.pattern=e.slice(i)),this.negate=r}matchOne(e,r,i){return r.indexOf(Re)!==-1?this._matchGlobstar(e,r,i,0,0):this._matchOne(e,r,i,0,0)}_matchGlobstar(e,r,i,n,s){let o=-1;for(let b=s;b<r.length;b++)if(r[b]===Re){o=b;break}let a=-1;for(let b=r.length-1;b>=0;b--)if(r[b]===Re){a=b;break}let l=r.slice(s,o),u=i?r.slice(o+1):r.slice(o+1,a),f=i?[]:r.slice(a+1);if(l.length){let b=e.slice(n,n+l.length);if(!this._matchOne(b,l,i,0,0))return!1;n+=l.length}let c=0;if(f.length){if(f.length+n>e.length)return!1;let b=e.length-f.length;if(this._matchOne(e,f,i,b,0))c=f.length;else{if(e[e.length-1]!==""||n+f.length===e.length||!this._matchOne(e,f,i,b-1,0))return!1;c=f.length+1}}if(!u.length){let b=!!c;for(let v=n;v<e.length-c;v++){let E=String(e[v]);if(b=!0,E==="."||E===".."||!this.options.dot&&E.charAt(0)===".")return!1}return i||b}let h=[[[],0]],d=h[0],y=0,p=[0];for(let b of u)b===Re?(p.push(y),d=[[],0],h.push(d)):(d[0].push(b),y++);let S=h.length-1,m=e.length-c;for(let b of h)b[1]=m-(p[S--]+b[0].length);return!!this._matchGlobStarBodySections(e,h,n,0,i,0,!!c)}_matchGlobStarBodySections(e,r,i,n,s,o,a){let l=r[n];if(!l){for(let c=i;c<e.length;c++){a=!0;let h=e[c];if(h==="."||h===".."||!this.options.dot&&h.charAt(0)===".")return!1}return a}let[u,f]=l;for(;i<=f;){if(this._matchOne(e.slice(0,i+u.length),u,s,i,0)&&o<this.maxGlobstarRecursion){let d=this._matchGlobStarBodySections(e,r,i+u.length,n+1,s,o+1,a);if(d!==!1)return d}let h=e[i];if(h==="."||h===".."||!this.options.dot&&h.charAt(0)===".")return!1;i++}return s||null}_matchOne(e,r,i,n,s){let o,a,l,u;for(o=n,a=s,l=e.length,u=r.length;o<l&&a<u;o++,a++){this.debug("matchOne loop");let f=r[a],c=e[o];if(this.debug(r,f,c),f===!1||f===Re)return!1;let h;if(typeof f=="string"?(h=c===f,this.debug("string match",f,c,h)):(h=c.match(f),this.debug("pattern match",f,c,h)),!h)return!1}if(o===l&&a===u)return!0;if(o===l)return i;if(a===u)return o===l-1&&e[o]==="";throw new Error("wtf?")}braceExpand(){return Zc(this.pattern,this.options)}parse(e,r){Mn(e);let i=this.options;if(e==="**")if(i.noglobstar)e="*";else return Re;if(e==="")return"";let n="",s=!1,o=!1,a=[],l=[],u,f=!1,c=-1,h=-1,d,y,p,S=e.charAt(0)===".",m=i.dot||S,b=()=>S?"":m?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",v=x=>x.charAt(0)==="."?"":i.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",E=()=>{if(u){switch(u){case"*":n+=sa,s=!0;break;case"?":n+=la,s=!0;break;default:n+="\\"+u;break}this.debug("clearStateChar %j %j",u,n),u=!1}};for(let x=0,O;x<e.length&&(O=e.charAt(x));x++){if(this.debug("%s %s %s %j",e,x,n,O),o){if(O==="/")return!1;Vc[O]&&(n+="\\"),n+=O,o=!1;continue}switch(O){case"/":return!1;case"\\":if(f&&e.charAt(x+1)==="-"){n+=O;continue}E(),o=!0;continue;case"?":case"*":case"+":case"@":case"!":if(this.debug("%s %s %s %j <-- stateChar",e,x,n,O),f){this.debug(" in class"),O==="!"&&x===h+1&&(O="^"),n+=O;continue}if(O==="*"&&u==="*")continue;this.debug("call clearStateChar %j",u),E(),u=O,i.noext&&E();continue;case"(":{if(f){n+="(";continue}if(!u){n+="\\(";continue}let w={type:u,start:x-1,reStart:n.length,open:Hc[u].open,close:Hc[u].close};this.debug(this.pattern," ",w),a.push(w),n+=w.open,w.start===0&&w.type!=="!"&&(S=!0,n+=v(e.slice(x+1))),this.debug("plType %j %j",u,n),u=!1;continue}case")":{let w=a[a.length-1];if(f||!w){n+="\\)";continue}a.pop(),E(),s=!0,y=w,n+=y.close,y.type==="!"&&l.push(Object.assign(y,{reEnd:n.length}));continue}case"|":{let w=a[a.length-1];if(f||!w){n+="\\|";continue}E(),n+="|",w.start===0&&w.type!=="!"&&(S=!0,n+=v(e.slice(x+1)));continue}case"[":if(E(),f){n+="\\"+O;continue}f=!0,h=x,c=n.length,n+=O;continue;case"]":if(x===h+1||!f){n+="\\"+O;continue}d=e.substring(h+1,x);try{RegExp("["+SE(bE(d))+"]"),n+=O}catch{n=n.substring(0,c)+"(?:$.)"}s=!0,f=!1;continue;default:E(),Vc[O]&&!(O==="^"&&f)&&(n+="\\"),n+=O;break}}for(f&&(d=e.slice(h+1),p=this.parse(d,oa),n=n.substring(0,c)+"\\["+p[0],s=s||p[1]),y=a.pop();y;y=a.pop()){let x;x=n.slice(y.reStart+y.open.length),this.debug("setting tail",n,y),x=x.replace(/((?:\\{2}){0,64})(\\?)\|/g,(w,T,R)=>(R||(R="\\"),T+T+R+"|")),this.debug(`tail=%j
|
|
3
3
|
%s`,x,x,y,n);let O=y.type==="*"?sa:y.type==="?"?la:"\\"+y.type;s=!0,n=n.slice(0,y.reStart)+O+"\\("+x}E(),o&&(n+="\\\\");let A=_E[n.charAt(0)];for(let x=l.length-1;x>-1;x--){let O=l[x],w=n.slice(0,O.reStart),T=n.slice(O.reStart,O.reEnd-8),R=n.slice(O.reEnd),P=n.slice(O.reEnd-8,O.reEnd)+R,z=w.split(")").length,ue=w.split("(").length-z,Z=R;for(let V=0;V<ue;V++)Z=Z.replace(/\)[+*?]?/,"");R=Z;let te=R===""&&r!==oa?"(?:$|\\/)":"";n=w+T+R+te+P}if(n!==""&&s&&(n="(?=.)"+n),A&&(n=b()+n),r===oa)return[n,s];if(i.nocase&&!s&&(s=e.toUpperCase()!==e.toLowerCase()),!s)return mE(e);let N=i.nocase?"i":"";try{return Object.assign(new RegExp("^"+n+"$",N),{_glob:e,_src:n})}catch{return new RegExp("$.")}}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let e=this.set;if(!e.length)return this.regexp=!1,this.regexp;let r=this.options,i=r.noglobstar?sa:r.dot?pE:gE,n=r.nocase?"i":"",s=e.map(o=>(o=o.map(a=>typeof a=="string"?wE(a):a===Re?Re:a._src).reduce((a,l)=>(a[a.length-1]===Re&&l===Re||a.push(l),a),[]),o.forEach((a,l)=>{a!==Re||o[l-1]===Re||(l===0?o.length>1?o[l+1]="(?:\\/|"+i+"\\/)?"+o[l+1]:o[l]=i:l===o.length-1?o[l-1]+="(?:\\/|"+i+")?":(o[l-1]+="(?:\\/|\\/"+i+"\\/)"+o[l+1],o[l+1]=Re))}),o.filter(a=>a!==Re).join("/"))).join("|");s="^(?:"+s+")$",this.negate&&(s="^(?!"+s+").*$");try{this.regexp=new RegExp(s,n)}catch{this.regexp=!1}return this.regexp}match(e,r=this.partial){if(this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return e==="";if(e==="/"&&r)return!0;let i=this.options;aa.sep!=="/"&&(e=e.split(aa.sep).join("/")),e=e.split(Yc),this.debug(this.pattern,"split",e);let n=this.set;this.debug(this.pattern,"set",n);let s;for(let o=e.length-1;o>=0&&(s=e[o],!s);o--);for(let o=0;o<n.length;o++){let a=n[o],l=e;if(i.matchBase&&a.length===1&&(l=[s]),this.matchOne(l,a,r))return i.flipNegate?!0:!this.negate}return i.flipNegate?!1:this.negate}static defaults(e){return Pe.defaults(e).Minimatch}};Pe.Minimatch=wr});var rh=g((JB,th)=>{"use strict";th.exports=eh;var ca=D("fs"),{EventEmitter:vE}=D("events"),{Minimatch:fa}=Qc(),{resolve:EE}=D("path");function xE(t,e){return new Promise((r,i)=>{ca.readdir(t,{withFileTypes:!0},(n,s)=>{if(n)switch(n.code){case"ENOTDIR":e?i(n):r([]);break;case"ENOTSUP":case"ENOENT":case"ENAMETOOLONG":case"UNKNOWN":r([]);break;default:i(n);break}else r(s)})})}function Xc(t,e){return new Promise((r,i)=>{(e?ca.stat:ca.lstat)(t,(s,o)=>{s?s.code==="ENOENT"?r(e?Xc(t,!1):null):r(null):r(o)})})}async function*Jc(t,e,r,i,n,s){let o=await xE(e+t,s);for(let a of o){let l=a.name;l===void 0&&(l=a,i=!0);let u=t+"/"+l,f=u.slice(1),c=e+"/"+f,h=null;(i||r)&&(h=await Xc(c,r)),!h&&a.name!==void 0&&(h=a),h===null&&(h={isDirectory:()=>!1}),h.isDirectory()?n(f)||(yield{relative:f,absolute:c,stats:h},yield*Jc(u,e,r,i,n,!1)):yield{relative:f,absolute:c,stats:h}}}async function*TE(t,e,r,i){yield*Jc("",t,e,r,i,!0)}function AE(t){return{pattern:t.pattern,dot:!!t.dot,noglobstar:!!t.noglobstar,matchBase:!!t.matchBase,nocase:!!t.nocase,ignore:t.ignore,skip:t.skip,follow:!!t.follow,stat:!!t.stat,nodir:!!t.nodir,mark:!!t.mark,silent:!!t.silent,absolute:!!t.absolute}}var qn=class extends vE{constructor(e,r,i){if(super(),typeof r=="function"&&(i=r,r=null),this.options=AE(r||{}),this.matchers=[],this.options.pattern){let n=Array.isArray(this.options.pattern)?this.options.pattern:[this.options.pattern];this.matchers=n.map(s=>new fa(s,{dot:this.options.dot,noglobstar:this.options.noglobstar,matchBase:this.options.matchBase,nocase:this.options.nocase}))}if(this.ignoreMatchers=[],this.options.ignore){let n=Array.isArray(this.options.ignore)?this.options.ignore:[this.options.ignore];this.ignoreMatchers=n.map(s=>new fa(s,{dot:!0}))}if(this.skipMatchers=[],this.options.skip){let n=Array.isArray(this.options.skip)?this.options.skip:[this.options.skip];this.skipMatchers=n.map(s=>new fa(s,{dot:!0}))}this.iterator=TE(EE(e||"."),this.options.follow,this.options.stat,this._shouldSkipDirectory.bind(this)),this.paused=!1,this.inactive=!1,this.aborted=!1,i&&(this._matches=[],this.on("match",n=>this._matches.push(this.options.absolute?n.absolute:n.relative)),this.on("error",n=>i(n)),this.on("end",()=>i(null,this._matches))),setTimeout(()=>this._next(),0)}_shouldSkipDirectory(e){return this.skipMatchers.some(r=>r.match(e))}_fileMatches(e,r){let i=e+(r?"/":"");return(this.matchers.length===0||this.matchers.some(n=>n.match(i)))&&!this.ignoreMatchers.some(n=>n.match(i))&&(!this.options.nodir||!r)}_next(){!this.paused&&!this.aborted?this.iterator.next().then(e=>{if(e.done)this.emit("end");else{let r=e.value.stats.isDirectory();if(this._fileMatches(e.value.relative,r)){let i=e.value.relative,n=e.value.absolute;this.options.mark&&r&&(i+="/",n+="/"),this.options.stat?this.emit("match",{relative:i,absolute:n,stat:e.value.stats}):this.emit("match",{relative:i,absolute:n})}this._next(this.iterator)}}).catch(e=>{this.abort(),this.emit("error",e),!e.code&&!this.options.silent&&console.error(e)}):this.inactive=!0}abort(){this.aborted=!0}pause(){this.paused=!0}resume(){this.paused=!1,this.inactive&&(this.inactive=!1,this._next())}};function eh(t,e,r){return new qn(t,e,r)}eh.ReaddirGlob=qn});var ed={};Vv(ed,{all:()=>wa,allLimit:()=>Sa,allSeries:()=>va,any:()=>Ia,anyLimit:()=>Da,anySeries:()=>Na,apply:()=>lh,applyEach:()=>ph,applyEachSeries:()=>gh,asyncify:()=>jn,auto:()=>ka,autoInject:()=>_h,cargo:()=>yh,cargoQueue:()=>mh,compose:()=>bh,concat:()=>pa,concatLimit:()=>mi,concatSeries:()=>ga,constant:()=>wh,default:()=>Nx,detect:()=>_a,detectLimit:()=>ya,detectSeries:()=>ma,dir:()=>vh,doDuring:()=>Bn,doUntil:()=>Eh,doWhilst:()=>Bn,during:()=>$n,each:()=>ba,eachLimit:()=>Un,eachOf:()=>Fe,eachOfLimit:()=>yi,eachOfSeries:()=>Xe,eachSeries:()=>Wn,ensureAsync:()=>qa,every:()=>wa,everyLimit:()=>Sa,everySeries:()=>va,filter:()=>Ea,filterLimit:()=>xa,filterSeries:()=>Ta,find:()=>_a,findLimit:()=>ya,findSeries:()=>ma,flatMap:()=>pa,flatMapLimit:()=>mi,flatMapSeries:()=>ga,foldl:()=>Sr,foldr:()=>Ra,forEach:()=>ba,forEachLimit:()=>Un,forEachOf:()=>Fe,forEachOfLimit:()=>yi,forEachOfSeries:()=>Xe,forEachSeries:()=>Wn,forever:()=>Th,groupBy:()=>Ah,groupByLimit:()=>Zn,groupBySeries:()=>Rh,inject:()=>Sr,log:()=>Oh,map:()=>Yn,mapLimit:()=>Si,mapSeries:()=>Pa,mapValues:()=>Ih,mapValuesLimit:()=>Qn,mapValuesSeries:()=>Dh,memoize:()=>Nh,nextTick:()=>Lh,parallel:()=>Ph,parallelLimit:()=>kh,priorityQueue:()=>Ch,queue:()=>ja,race:()=>Mh,reduce:()=>Sr,reduceRight:()=>Ra,reflect:()=>zn,reflectAll:()=>qh,reject:()=>Fh,rejectLimit:()=>jh,rejectSeries:()=>Bh,retry:()=>Gn,retryable:()=>zh,select:()=>Ea,selectLimit:()=>xa,selectSeries:()=>Ta,seq:()=>Ma,series:()=>Gh,setImmediate:()=>Rt,some:()=>Ia,someLimit:()=>Da,someSeries:()=>Na,sortBy:()=>$h,timeout:()=>Hh,times:()=>Vh,timesLimit:()=>Xn,timesSeries:()=>Yh,transform:()=>Kh,tryEach:()=>Zh,unmemoize:()=>Qh,until:()=>Xh,waterfall:()=>Jh,whilst:()=>$n,wrapSync:()=>jn});function lh(t,...e){return(...r)=>t(...e,...r)}function bi(t){return function(...e){var r=e.pop();return t.call(this,e,r)}}function ch(t){setTimeout(t,0)}function hh(t){return(e,...r)=>t(()=>e(...r))}function jn(t){return wi(t)?function(...e){let r=e.pop(),i=t.apply(this,e);return ih(i,r)}:bi(function(e,r){var i;try{i=t.apply(this,e)}catch(n){return r(n)}if(i&&typeof i.then=="function")return ih(i,r);r(null,i)})}function ih(t,e){return t.then(r=>{nh(e,null,r)},r=>{nh(e,r&&(r instanceof Error||r.message)?r:new Error(r))})}function nh(t,e,r){try{t(e,r)}catch(i){Rt(n=>{throw n},i)}}function wi(t){return t[Symbol.toStringTag]==="AsyncFunction"}function OE(t){return t[Symbol.toStringTag]==="AsyncGenerator"}function IE(t){return typeof t[Symbol.asyncIterator]=="function"}function q(t){if(typeof t!="function")throw new Error("expected a function");return wi(t)?jn(t):t}function M(t,e){if(e||(e=t.length),!e)throw new Error("arity is undefined");function r(...i){return typeof i[e-1]=="function"?t.apply(this,i):new Promise((n,s)=>{i[e-1]=(o,...a)=>{if(o)return s(o);n(a.length>1?a:a[0])},t.apply(this,i)})}return r}function dh(t){return function(r,...i){return M(function(s){var o=this;return t(r,(a,l)=>{q(a).apply(o,i.concat(l))},s)})}}function La(t,e,r,i){e=e||[];var n=[],s=0,o=q(r);return t(e,(a,l,u)=>{var f=s++;o(a,(c,h)=>{n[f]=h,u(c)})},a=>{i(a,n)})}function Hn(t){return t&&typeof t.length=="number"&&t.length>=0&&t.length%1===0}function Ot(t){function e(...r){if(t!==null){var i=t;t=null,i.apply(this,r)}}return Object.assign(e,t),e}function DE(t){return t[Symbol.iterator]&&t[Symbol.iterator]()}function NE(t){var e=-1,r=t.length;return function(){return++e<r?{value:t[e],key:e}:null}}function LE(t){var e=-1;return function(){var i=t.next();return i.done?null:(e++,{value:i.value,key:e})}}function PE(t){var e=t?Object.keys(t):[],r=-1,i=e.length;return function n(){var s=e[++r];return s==="__proto__"?n():r<i?{value:t[s],key:s}:null}}function kE(t){if(Hn(t))return NE(t);var e=DE(t);return e?LE(e):PE(t)}function It(t){return function(...e){if(t===null)throw new Error("Callback was already called.");var r=t;t=null,r.apply(this,e)}}function sh(t,e,r,i){let n=!1,s=!1,o=!1,a=0,l=0;function u(){a>=e||o||n||(o=!0,t.next().then(({value:h,done:d})=>{if(!(s||n)){if(o=!1,d){n=!0,a<=0&&i(null);return}a++,r(h,l,f),l++,u()}}).catch(c))}function f(h,d){if(a-=1,!s){if(h)return c(h);if(h===!1){n=!0,s=!0;return}if(d===Vn||n&&a<=0)return n=!0,i(null);u()}}function c(h){s||(o=!1,n=!0,i(h))}u()}function CE(t,e,r,i){return $e(e)(t,q(r),i)}function ME(t,e,r){r=Ot(r);var i=0,n=0,{length:s}=t,o=!1;s===0&&r(null);function a(l,u){l===!1&&(o=!0),o!==!0&&(l?r(l):(++n===s||u===Vn)&&r(null))}for(;i<s;i++)e(t[i],i,It(a))}function qE(t,e,r){return yi(t,1/0,e,r)}function FE(t,e,r){var i=Hn(t)?ME:qE;return i(t,q(e),r)}function jE(t,e,r){return La(Fe,t,e,r)}function BE(t,e,r){return yi(t,1,e,r)}function UE(t,e,r){return La(Xe,t,e,r)}function vr(){let t,e;function r(i,...n){if(i)return e(i);t(n.length>1?n:n[0])}return r[Er]=new Promise((i,n)=>{t=i,e=n}),r}function ka(t,e,r){typeof e!="number"&&(r=e,e=null),r=Ot(r||vr());var i=Object.keys(t).length;if(!i)return r(null);e||(e=i);var n={},s=0,o=!1,a=!1,l=Object.create(null),u=[],f=[],c={};Object.keys(t).forEach(v=>{var E=t[v];if(!Array.isArray(E)){h(v,[E]),f.push(v);return}var A=E.slice(0,E.length-1),N=A.length;if(N===0){h(v,E),f.push(v);return}c[v]=N,A.forEach(x=>{if(!t[x])throw new Error("async.auto task `"+v+"` has a non-existent dependency `"+x+"` in "+A.join(", "));y(x,()=>{N--,N===0&&h(v,E)})})}),m(),d();function h(v,E){u.push(()=>S(v,E))}function d(){if(!o){if(u.length===0&&s===0)return r(null,n);for(;u.length&&s<e;){var v=u.shift();v()}}}function y(v,E){var A=l[v];A||(A=l[v]=[]),A.push(E)}function p(v){var E=l[v]||[];E.forEach(A=>A()),d()}function S(v,E){if(!a){var A=It((x,...O)=>{if(s--,x===!1){o=!0;return}if(O.length<2&&([O]=O),x){var w={};if(Object.keys(n).forEach(T=>{w[T]=n[T]}),w[v]=O,a=!0,l=Object.create(null),o)return;r(x,w)}else n[v]=O,p(v)});s++;var N=q(E[E.length-1]);E.length>1?N(n,A):N(A)}}function m(){for(var v,E=0;f.length;)v=f.pop(),E++,b(v).forEach(A=>{--c[A]===0&&f.push(A)});if(E!==i)throw new Error("async.auto cannot execute tasks due to a recursive dependency")}function b(v){var E=[];return Object.keys(t).forEach(A=>{let N=t[A];Array.isArray(N)&&N.indexOf(v)>=0&&E.push(A)}),E}return r[Er]}function HE(t){let e="",r=0,i=t.indexOf("*/");for(;r<t.length;)if(t[r]==="/"&&t[r+1]==="/"){let n=t.indexOf(`
|
|
4
4
|
`,r);r=n===-1?t.length:n}else if(i!==-1&&t[r]==="/"&&t[r+1]==="*"){let n=t.indexOf("*/",r);n!==-1?(r=n+2,i=t.indexOf("*/",r)):(e+=t[r],r++)}else e+=t[r],r++;return e}function VE(t){let e=HE(t.toString()),r=e.match(WE);if(r||(r=e.match(zE)),!r)throw new Error(`could not parse args in autoInject
|
|
5
5
|
Source:
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as u,b as g}from"./chunk-
|
|
2
|
+
import{a as u,b as g}from"./chunk-I7KNK4LR.js";import{a as d}from"./chunk-I7YWZ3D2.js";import{a as f}from"./chunk-HCBYKLMW.js";import{a as P}from"./chunk-6YGTRKDT.js";import{e as m}from"./chunk-UR6MHSHU.js";var r=m(P(),1);var p=m(f(),1);function R(t,s,n,o){return{id:t,label:`${s} (${t}) \xB7 ${n} tests`,isActive:t===o}}function A({resolver:t,projectId:s,currentFolderId:n,env:o,onSelect:v,onCancel:L}){let[h,y]=(0,r.useState)([]),[E,i]=(0,r.useState)(!0),[b,l]=(0,r.useState)(null);return(0,r.useEffect)(()=>{if(!t){l("Login first to browse folders"),i(!1);return}(async()=>{try{let e=t.cached;if(!e){l("Login first to browse folders"),i(!1);return}let a=u(o),F=await new d(a.tmsBaseUrl,e.username,e.access_key).listFolders(s);y(F.map(c=>R(c.id,c.name,c.test_cases_count,n)))}catch(e){l(e instanceof Error?e.message:String(e))}finally{i(!1)}})()},[t,s,n,o]),(0,p.jsx)(g,{title:"Folders",items:h,loading:E,error:b,itemNoun:"folders",onSelect:e=>{let a=e.label.split(" (")[0];v(e.id,a)},onCancel:L})}export{R as a,A as b};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as n}from"./chunk-
|
|
2
|
+
import{a as n}from"./chunk-GPQFSC4B.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};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
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-
|
|
2
|
+
import{a as S}from"./chunk-HCBYKLMW.js";import{i as p,r as t}from"./chunk-F6J3XGBQ.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};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as f,b as u}from"./chunk-
|
|
2
|
+
import{a as f,b as u}from"./chunk-I7KNK4LR.js";import{a as p}from"./chunk-I7YWZ3D2.js";import{a as m}from"./chunk-HCBYKLMW.js";import{a as E}from"./chunk-6YGTRKDT.js";import{e as a}from"./chunk-UR6MHSHU.js";var r=a(E(),1);var g=a(m(),1);function b(e,o,n){return{id:e,label:`${o} (${e})`,isActive:e===n}}function N({resolver:e,currentProjectId:o,env:n,onSelect:j,onCancel:P}){let[d,v]=(0,r.useState)([]),[L,s]=(0,r.useState)(!0),[h,i]=(0,r.useState)(null);return(0,r.useEffect)(()=>{if(!e){i("Login first to browse projects"),s(!1);return}(async()=>{try{let t=e.cached;if(!t){i("Login first to browse projects"),s(!1);return}let c=f(n),y=await new p(c.tmsBaseUrl,t.username,t.access_key).listProjects();v(y.map(l=>b(l.project_id,l.name,o)))}catch(t){i(t instanceof Error?t.message:String(t))}finally{s(!1)}})()},[e,o,n]),(0,g.jsx)(u,{title:"Projects",items:d,loading:L,error:h,itemNoun:"projects",onSelect:t=>{let c=t.label.replace(` (${t.id})`,"");j(t.id,c)},onCancel:P})}export{b as a,N as b};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
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.
|
|
2
|
+
import{homedir as s}from"os";import{join as t}from"path";var p="0.2.5",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};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
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-
|
|
2
|
+
import{a as m}from"./chunk-HCBYKLMW.js";import{r as t}from"./chunk-F6J3XGBQ.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};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
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};
|
|
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()}async getCreditBalance(){let e=await fetch(`${this.baseUrl}/credits/balance`,{method:"GET",headers:this.headers()});if(!e.ok)throw new Error(`Credit balance request failed: ${e.status} ${await e.text()}`);return await e.json()}};export{r as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
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-
|
|
2
|
+
import{a as M}from"./chunk-HCBYKLMW.js";import{q as N,r as t}from"./chunk-F6J3XGBQ.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};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as c}from"./chunk-HCBYKLMW.js";import{r as a}from"./chunk-
|
|
2
|
+
import{a as c}from"./chunk-HCBYKLMW.js";import{r as a}from"./chunk-F6J3XGBQ.js";import{a as s,b as u,j as p}from"./chunk-Q7JVDEOV.js";import{a as T}from"./chunk-6YGTRKDT.js";import{e as l}from"./chunk-UR6MHSHU.js";var x=l(T(),1);function g(n,e){if(!e)return n;let i=n.trim()||e;return`\x1B]8;;${e}\x07${i}\x1B]8;;\x07`}var r=l(c(),1);function h({shareableLink:n,testCaseLink:e,codeExportDir:i,autoExit:m=!0}){let{exit:f}=p();(0,x.useEffect)(()=>{if(!m)return;let t=setTimeout(()=>f(),100);return()=>clearTimeout(t)},[f,m]);let o=[];return n&&o.push({label:"ShareLink",url:n}),e&&o.push({label:"TestCase",url:e}),i&&o.push({label:"CodeExport",url:i,linkUrl:`file://${i}`}),o.length===0?(0,r.jsx)(r.Fragment,{}):(0,r.jsx)(s,{flexDirection:"column",marginTop:1,marginLeft:1,children:o.map(t=>(0,r.jsxs)(s,{flexDirection:"column",marginBottom:1,children:[(0,r.jsxs)(u,{color:a.primary,children:[t.label,":"]}),(0,r.jsx)(u,{color:a.dim,children:g(t.url,t.linkUrl??t.url)})]},t.label))})}export{h as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as n,c as s,e as c}from"./chunk-
|
|
2
|
+
import{a as n,c as s,e as c}from"./chunk-F6J3XGBQ.js";import{readFileSync as p,writeFileSync as f,mkdirSync as h}from"fs";import{join as d}from"path";var m=d(s,"version-check.json"),g=1440*60*1e3;function y(){try{let t=JSON.parse(p(m,"utf-8"));if(Date.now()-t.checkedAt<g)return t}catch{}return null}function C(t){try{h(s,{recursive:!0}),f(m,JSON.stringify({latest:t,checkedAt:Date.now()}))}catch{}}function u(t,i){let a=t.split(".").map(Number),e=i.split(".").map(Number);for(let o=0;o<3;o++){let r=(e[o]??0)-(a[o]??0);if(r!==0)return r}return 0}function l(t,i){let a=t.split(".").map(Number),e=i.split(".").map(Number);return(e[0]??0)!==(a[0]??0)?"major":(e[1]??0)!==(a[1]??0)?"minor":"patch"}async function N(){try{let t=y();if(t)return u(n,t.latest)>0?{current:n,latest:t.latest,severity:l(n,t.latest)}:null;let i=new AbortController,a=setTimeout(()=>i.abort(),5e3),e=await fetch(c,{headers:{Accept:"application/json"},signal:i.signal});if(clearTimeout(a),!e.ok)return null;let r=(await e.json())["dist-tags"]?.latest;return r?(C(r),u(n,r)>0?{current:n,latest:r,severity:l(n,r)}:null):null}catch{return null}}export{u as a,l as b,N as c};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as E}from"./chunk-HCBYKLMW.js";import{r}from"./chunk-
|
|
2
|
+
import{a as E}from"./chunk-HCBYKLMW.js";import{r}from"./chunk-F6J3XGBQ.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};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a}from"./chunk-
|
|
2
|
+
import{a}from"./chunk-GPQFSC4B.js";import"./chunk-UR6MHSHU.js";export{a as ControllerClient};
|