@testmuai/kane-cli 0.2.7 → 0.2.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/dist/{ChromeProfilePicker-TSTGICKC.js → ChromeProfilePicker-GJA52BNZ.js} +1 -1
  2. package/dist/{CliFeedbackPrompt-D2GV3CIR.js → CliFeedbackPrompt-4OSH6D53.js} +1 -1
  3. package/dist/{CliUploadProgress-3LN7ZAQQ.js → CliUploadProgress-UORYVN7R.js} +1 -1
  4. package/dist/{ConfigView-HFR7OLBN.js → ConfigView-DHYUHQTK.js} +1 -1
  5. package/dist/{FolderPicker-JMDO2YEV.js → FolderPicker-TXCV7G4Y.js} +1 -1
  6. package/dist/{HelpView-GAECHNPW.js → HelpView-64BD2OKB.js} +1 -1
  7. package/dist/{LinksBox-VNX4GTYY.js → LinksBox-DNJBK25G.js} +1 -1
  8. package/dist/{LoginWizard-POE64KP6.js → LoginWizard-X5DLBHLV.js} +1 -1
  9. package/dist/{ProfilesView-AJFBUG46.js → ProfilesView-N4G4L2VO.js} +1 -1
  10. package/dist/{ProjectPicker-FTUZCSBL.js → ProjectPicker-XL67H337.js} +1 -1
  11. package/dist/{WhoamiView-FSFBRPAS.js → WhoamiView-JYNYZVTK.js} +1 -1
  12. package/dist/{build-MFETN2BY.js → build-JIKYOZUH.js} +1 -1
  13. package/dist/{changelog-WJATJ25O.js → changelog-IPUSJH3G.js} +1 -1
  14. package/dist/{chunk-ND4JFVHY.js → chunk-BCTJUECQ.js} +1 -1
  15. package/dist/{chunk-Q7JVDEOV.js → chunk-C44QQJR4.js} +1 -1
  16. package/dist/{chunk-665WKKCX.js → chunk-CLF6GATH.js} +1 -1
  17. package/dist/{chunk-IEPLQSZE.js → chunk-DSCYZSVU.js} +1 -1
  18. package/dist/{chunk-LAVCECRF.js → chunk-E4454TNP.js} +1 -1
  19. package/dist/{devtools-4SYFVOFF.js → chunk-E47GFYXA.js} +3 -3
  20. package/dist/{chunk-32JVIWDK.js → chunk-GCZ4YXN4.js} +1 -1
  21. package/dist/{chunk-RZYQ7T3Y.js → chunk-KEU7JQAB.js} +1 -1
  22. package/dist/{chunk-KBTVURNO.js → chunk-LACJLE5X.js} +1 -1
  23. package/dist/{chunk-N5O3NTGW.js → chunk-LDQZDX3F.js} +1 -1
  24. package/dist/{chunk-22Q72KEE.js → chunk-M7JR2ZX5.js} +1 -1
  25. package/dist/{chunk-5TNGPFD4.js → chunk-MJYMADLM.js} +1 -1
  26. package/dist/{chunk-DCUGTUXD.js → chunk-MYZUROOZ.js} +1 -1
  27. package/dist/{chunk-JWPOUEON.js → chunk-RFGE6ULZ.js} +8 -8
  28. package/dist/{chunk-FGRL7YK2.js → chunk-RWLPN2OC.js} +1 -1
  29. package/dist/{chunk-QDWB44VO.js → chunk-U3KZXIN2.js} +1 -1
  30. package/dist/{chunk-QXBLFS66.js → chunk-UL7ZRTTG.js} +1 -1
  31. package/dist/{chunk-HPYGNTYE.js → chunk-YXQQ33RG.js} +1 -1
  32. package/dist/devtools-6FR6UXUE.js +2 -0
  33. package/dist/index.js +49 -44
  34. package/dist/{logging-X4C7SASV.js → logging-32VNKE6C.js} +1 -1
  35. package/dist/login-flow-TNDBDANY.js +2 -0
  36. package/dist/{pipeline-W3MWTZHK.js → pipeline-QHJGNZ7H.js} +1 -1
  37. package/dist/{updater-L2ORCIIP.js → updater-VR2G73FF.js} +1 -1
  38. package/dist/{version-check-IF4G6QYT.js → version-check-RN63L7BF.js} +1 -1
  39. package/package.json +5 -5
  40. package/dist/login-flow-47Y4Y2UB.js +0 -2
@@ -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{t as r}from"./chunk-22Q72KEE.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};
2
+ import{a as E}from"./chunk-HCBYKLMW.js";import{t as r}from"./chunk-M7JR2ZX5.js";import{a as i,b as t,i as M}from"./chunk-C44QQJR4.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{s}from"./chunk-22Q72KEE.js";function n(r="prod"){let e=s[r];return r!=="stage"?e:{authBaseUrl:process.env.KANE_STAGE_AUTH_URL??e.authBaseUrl,consentUrl:process.env.KANE_STAGE_CONSENT_URL??e.consentUrl,controllerBaseUrl:process.env.TESTMUAI_BASE_URL??e.controllerBaseUrl,tmsBaseUrl:process.env.KANE_STAGE_TMS_URL??e.tmsBaseUrl,secretsBaseUrl:process.env.KANE_STAGE_SECRETS_URL??e.secretsBaseUrl,testManagerUiUrl:process.env.KANE_STAGE_TEST_MANAGER_UI_URL??e.testManagerUiUrl,shareApiBaseUrl:process.env.KANE_STAGE_SHARE_API_URL??e.shareApiBaseUrl,v16ServerHost:process.env.KANE_STAGE_V16_SERVER_HOST??e.v16ServerHost}}export{n as a};
2
+ import{s}from"./chunk-M7JR2ZX5.js";function n(r="prod"){let e=s[r];return r!=="stage"?e:{authBaseUrl:process.env.KANE_STAGE_AUTH_URL??e.authBaseUrl,consentUrl:process.env.KANE_STAGE_CONSENT_URL??e.consentUrl,controllerBaseUrl:process.env.TESTMUAI_BASE_URL??e.controllerBaseUrl,tmsBaseUrl:process.env.KANE_STAGE_TMS_URL??e.tmsBaseUrl,secretsBaseUrl:process.env.KANE_STAGE_SECRETS_URL??e.secretsBaseUrl,testManagerUiUrl:process.env.KANE_STAGE_TEST_MANAGER_UI_URL??e.testManagerUiUrl,shareApiBaseUrl:process.env.KANE_STAGE_SHARE_API_URL??e.shareApiBaseUrl,v16ServerHost:process.env.KANE_STAGE_V16_SERVER_HOST??e.v16ServerHost}}export{n as a};
@@ -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 c="0.2.7",l="kane-cli",e=t(s(),".testmuai","kaneai"),m=t(e,"profiles"),i=t(e,"tui-config.json"),d="https://registry.npmjs.org/@testmuai/kane-cli",h="https://api.github.com/repos/LambdaTest/kane-cli/releases",f="https://dd-proxy.lambdatest.com/intake/kane-cli",u="https://kaneai-playground.lambdatest.io",_=9222,b=9230,U=t(e,"chrome-profiles"),r="127.0.0.1",x=18392,g=18400,o="/callback";function A(a){return`http://${r}:${a}${o}`}var R="KANE CLI",L="*",C={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"}},E={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{c as a,l as b,e as c,i as d,d as e,h as f,f as g,u as h,_ as i,b as j,U as k,r as l,x as m,g as n,o,A as p,R as q,L as r,C as s,E as t};
2
+ import{homedir as s}from"os";import{join as t}from"path";var c="0.2.8",l="kane-cli",e=t(s(),".testmuai","kaneai"),m=t(e,"profiles"),i=t(e,"tui-config.json"),d="https://registry.npmjs.org/@testmuai/kane-cli",h="https://api.github.com/repos/LambdaTest/kane-cli/releases",f="https://dd-proxy.lambdatest.com/intake/kane-cli",u="https://kaneai-playground.lambdatest.io",_=9222,b=9230,U=t(e,"chrome-profiles"),r="127.0.0.1",x=18392,g=18400,o="/callback";function A(a){return`http://${r}:${a}${o}`}var R="KANE CLI",L="*",C={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"}},E={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{c as a,l as b,e as c,i as d,d as e,h as f,f as g,u as h,_ as i,b as j,U as k,r as l,x as m,g as n,o,A as p,R as q,L as r,C as s,E as t};
@@ -1,2 +1,2 @@
1
1
  import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{a as I}from"./chunk-RZYQ7T3Y.js";import{a as v}from"./chunk-N5O3NTGW.js";import{a as S}from"./chunk-HCBYKLMW.js";import{t as a}from"./chunk-22Q72KEE.js";import{a as l,b as i,i as F}from"./chunk-Q7JVDEOV.js";import{a as O}from"./chunk-6YGTRKDT.js";import{a as y}from"./chunk-HFQ7T5KT.js";import{e as N}from"./chunk-UR6MHSHU.js";var o=N(O(),1);var e=N(S(),1);function U(r,m,x,u){return{id:r,label:`${m} (${r}) \xB7 ${x} tests`,isActive:r===u}}function q({resolver:r,projectId:m,currentFolderId:x,env:u,onSelect:B,onCancel:C}){let[_,A]=(0,o.useState)([]),[$,b]=(0,o.useState)(!0),[k,w]=(0,o.useState)(null),[f,d]=(0,o.useState)("list"),[L,E]=(0,o.useState)(""),[P,g]=(0,o.useState)(null),p=(0,o.useRef)(!1);return(0,o.useEffect)(()=>{if(!r){w("Login first to browse folders"),b(!1);return}(async()=>{try{let t=r.cached??await r.resolve();if(!t){w("Login first to browse folders"),b(!1);return}let n=v(u),h=(await new y(n.tmsBaseUrl,t.username,t.access_key).listFolders(m)).map(T=>U(T.id,T.name,T.test_cases_count,x));A(h),h.length===0&&(p.current=!0,d("naming"))}catch(t){w(t instanceof Error?t.message:String(t))}finally{b(!1)}})()},[r,m,x,u]),F((t,n)=>{if(f==="naming"){if(n.escape){E(""),g(null),p.current?C():d("list");return}if(n.return){let c=L.trim();if(!c){g("Name cannot be empty");return}if(!m){g("No project selected \u2014 pick a project first");return}g(null),d("creating"),(async()=>{try{if(!r)throw new Error("Not authenticated");let s=r.cached??await r.resolve();if(!s)throw new Error("Not authenticated");let h=v(u),R=await new y(h.tmsBaseUrl,s.username,s.access_key).createFolder(m,c);B(R.id,R.name)}catch(s){g(s instanceof Error?s.message:String(s)),d("naming")}})();return}if(n.backspace||n.delete){E(c=>c.slice(0,-1));return}n.tab||n.ctrl||n.meta||t&&E(c=>c+t)}}),f==="naming"||f==="creating"?(0,e.jsxs)(l,{flexDirection:"column",borderStyle:"round",borderColor:a.primary,paddingX:2,paddingY:1,children:[(0,e.jsx)(i,{color:a.primary,bold:!0,children:"Create new folder"}),p.current&&(0,e.jsx)(l,{marginTop:1,children:(0,e.jsx)(i,{color:a.dim,children:"No folders yet \u2014 let's create one."})}),(0,e.jsxs)(l,{marginTop:1,children:[(0,e.jsx)(i,{color:a.dim,children:"Name: "}),(0,e.jsx)(i,{children:L}),f==="naming"&&(0,e.jsx)(i,{inverse:!0,children:" "})]}),P&&(0,e.jsx)(l,{marginTop:1,children:(0,e.jsx)(i,{color:a.red,children:P})}),f==="creating"&&(0,e.jsx)(l,{marginTop:1,children:(0,e.jsx)(i,{color:a.dim,children:"Creating..."})}),f==="naming"&&(0,e.jsx)(l,{marginTop:1,children:(0,e.jsxs)(i,{color:a.dim,children:["\u21B5 create \xB7 esc ",p.current?"cancel":"back"]})})]}):(0,e.jsx)(I,{title:"Folders",items:_,loading:$,error:k,itemNoun:"folders",onTab:()=>{p.current=!1,d("naming")},extraHint:"tab to create new",onSelect:t=>{let n=t.label.split(" (")[0];B(t.id,n)},onCancel:C})}export{U as a,q as b};
2
+ import{a as I}from"./chunk-KEU7JQAB.js";import{a as v}from"./chunk-LDQZDX3F.js";import{a as S}from"./chunk-HCBYKLMW.js";import{t as a}from"./chunk-M7JR2ZX5.js";import{a as l,b as i,i as F}from"./chunk-C44QQJR4.js";import{a as O}from"./chunk-6YGTRKDT.js";import{a as y}from"./chunk-HFQ7T5KT.js";import{e as N}from"./chunk-UR6MHSHU.js";var o=N(O(),1);var e=N(S(),1);function U(r,m,x,u){return{id:r,label:`${m} (${r}) \xB7 ${x} tests`,isActive:r===u}}function q({resolver:r,projectId:m,currentFolderId:x,env:u,onSelect:B,onCancel:C}){let[_,A]=(0,o.useState)([]),[$,b]=(0,o.useState)(!0),[k,w]=(0,o.useState)(null),[f,d]=(0,o.useState)("list"),[L,E]=(0,o.useState)(""),[P,g]=(0,o.useState)(null),p=(0,o.useRef)(!1);return(0,o.useEffect)(()=>{if(!r){w("Login first to browse folders"),b(!1);return}(async()=>{try{let t=r.cached??await r.resolve();if(!t){w("Login first to browse folders"),b(!1);return}let n=v(u),h=(await new y(n.tmsBaseUrl,t.username,t.access_key).listFolders(m)).map(T=>U(T.id,T.name,T.test_cases_count,x));A(h),h.length===0&&(p.current=!0,d("naming"))}catch(t){w(t instanceof Error?t.message:String(t))}finally{b(!1)}})()},[r,m,x,u]),F((t,n)=>{if(f==="naming"){if(n.escape){E(""),g(null),p.current?C():d("list");return}if(n.return){let c=L.trim();if(!c){g("Name cannot be empty");return}if(!m){g("No project selected \u2014 pick a project first");return}g(null),d("creating"),(async()=>{try{if(!r)throw new Error("Not authenticated");let s=r.cached??await r.resolve();if(!s)throw new Error("Not authenticated");let h=v(u),R=await new y(h.tmsBaseUrl,s.username,s.access_key).createFolder(m,c);B(R.id,R.name)}catch(s){g(s instanceof Error?s.message:String(s)),d("naming")}})();return}if(n.backspace||n.delete){E(c=>c.slice(0,-1));return}n.tab||n.ctrl||n.meta||t&&E(c=>c+t)}}),f==="naming"||f==="creating"?(0,e.jsxs)(l,{flexDirection:"column",borderStyle:"round",borderColor:a.primary,paddingX:2,paddingY:1,children:[(0,e.jsx)(i,{color:a.primary,bold:!0,children:"Create new folder"}),p.current&&(0,e.jsx)(l,{marginTop:1,children:(0,e.jsx)(i,{color:a.dim,children:"No folders yet \u2014 let's create one."})}),(0,e.jsxs)(l,{marginTop:1,children:[(0,e.jsx)(i,{color:a.dim,children:"Name: "}),(0,e.jsx)(i,{children:L}),f==="naming"&&(0,e.jsx)(i,{inverse:!0,children:" "})]}),P&&(0,e.jsx)(l,{marginTop:1,children:(0,e.jsx)(i,{color:a.red,children:P})}),f==="creating"&&(0,e.jsx)(l,{marginTop:1,children:(0,e.jsx)(i,{color:a.dim,children:"Creating..."})}),f==="naming"&&(0,e.jsx)(l,{marginTop:1,children:(0,e.jsxs)(i,{color:a.dim,children:["\u21B5 create \xB7 esc ",p.current?"cancel":"back"]})})]}):(0,e.jsx)(I,{title:"Folders",items:_,loading:$,error:k,itemNoun:"folders",onTab:()=>{p.current=!1,d("naming")},extraHint:"tab to create new",onSelect:t=>{let n=t.label.split(" (")[0];B(t.id,n)},onCancel:C})}export{U as a,q as b};
@@ -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{t as o}from"./chunk-22Q72KEE.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};
2
+ import{a as m}from"./chunk-HCBYKLMW.js";import{t as o}from"./chunk-M7JR2ZX5.js";import{a as r,b as i}from"./chunk-C44QQJR4.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};