ripplo 0.7.35 → 0.7.36
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.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{B as ze,V as Je,W as Ke,Z as Qe,_ as Ge,a as N,b as De,g as _e,i as qe,j as He,k as We,l as g,m as Be,p as ie,q as h,r as F,s as Ve,w as I}from"./chunk-
|
|
2
|
+
import{B as ze,V as Je,W as Ke,Z as Qe,_ as Ge,a as N,b as De,g as _e,i as qe,j as He,k as We,l as g,m as Be,p as ie,q as h,r as F,s as Ve,w as I}from"./chunk-AT7Q6HQH.js";import{b as Ue,d as f,e as y,g as Oe,h as w,i as Ne}from"./chunk-5VRJXHWH.js";import Ze from"fs";import W from"path";import{config as Rt}from"dotenv";import{z as q}from"zod";import{err as kt,ok as en}from"neverthrow";import _ from"fs";import le from"path";import{err as ae,ok as Xe}from"neverthrow";import{z as D}from"zod";var yt=le.join(".ripplo","project.json"),se=[".env",".env.local"],mt=D.object({envFiles:D.array(D.string().min(1)).optional(),projectId:D.string().min(1)});function Ye(e){return le.join(e,yt)}function de(e){let n=Ye(e);return _.existsSync(n)?gt(n).andThen(t=>{let r=mt.safeParse(t);return r.success?Xe({envFiles:r.data.envFiles??se,projectId:r.data.projectId}):ae({issues:r.error.issues.map(o=>`${o.path.join(".")}: ${o.message}`),kind:"project-file-invalid",path:n})}):ae({kind:"project-file-missing",path:n})}function ce(e){return de(e).match(n=>n,()=>{})}function gt(e){try{return Xe(JSON.parse(_.readFileSync(e,"utf8")))}catch(n){return ae({issues:[n instanceof Error?n.message:String(n)],kind:"project-file-invalid",path:e})}}function Vi({cwd:e,envFiles:n,projectId:t}){let r=Ye(e);_.mkdirSync(le.dirname(r),{recursive:!0});let o={projectId:t};n!=null&&!ht(n)&&(o.envFiles=[...n]),_.writeFileSync(r,JSON.stringify(o,null,2)+`
|
|
3
3
|
`)}function ht(e){return e.length!==se.length?!1:e.every((n,t)=>n===se[t])}function Zi(e){let t=ce(e)?.envFiles??[".env",".env.local"],r=W.join(e,".ripplo");t.forEach(o=>{let i=W.resolve(r,o);Ze.existsSync(i)&&Rt({override:!0,path:i,quiet:!0})}),H=void 0}var St=q.object({RIPPLO_APP_URL:q.url(),RIPPLO_ENGINE_URL:q.url(),RIPPLO_WEBHOOK_SECRET:q.string().min(1)}),H;function B(){return H!=null?en(H):wt().map(e=>(H=e,e))}function xt(e){let t=ce(e)?.envFiles??[],r=W.join(e,".ripplo");return t.map(o=>W.resolve(r,o)).filter(o=>!Ze.existsSync(o))}function wt(){let e=St.safeParse(process.env);if(!e.success)return kt({issues:e.error.issues.map(t=>`${t.path.join(".")}: ${t.message}`),kind:"env-invalid",missingEnvFiles:xt(process.cwd())});let n=e.data;return en({appUrl:n.RIPPLO_APP_URL,engineUrl:n.RIPPLO_ENGINE_URL,webhookSecret:n.RIPPLO_WEBHOOK_SECRET})}import{readFileSync as bt}from"fs";import{z as nn}from"zod";var Et=nn.object({version:nn.string()});function V(){let e=bt(new URL("../package.json",import.meta.url),"utf8");return Et.parse(JSON.parse(e)).version}import me from"fs";import z from"path";import{createJiti as $t}from"jiti";import{err as U,ok as an}from"neverthrow";import vt from"fs";import M from"path";import P from"typescript";function tn(e){let n=M.join(e,"index.ts"),t=Ct(e);vt.mkdirSync(M.dirname(t.tsBuildInfoFile??""),{recursive:!0});let r=P.createIncrementalCompilerHost(t),o=P.createIncrementalProgram({host:r,options:t,rootNames:[n]}),i=[...o.getSyntacticDiagnostics(),...o.getSemanticDiagnostics()];o.emit();let s=i.filter(d=>It(d,e));if(s.length===0)return{diagnostics:[],ok:!0};let l={getCanonicalFileName:d=>d,getCurrentDirectory:()=>M.dirname(e),getNewLine:()=>`
|
|
4
4
|
`};return{diagnostics:P.formatDiagnosticsWithColorAndContext(s,l).split(`
|
|
5
5
|
`).filter(d=>d.length>0),ok:!1}}function It(e,n){let t=e.file?.fileName;return t==null?!0:t.startsWith(n)}var Pt=M.join(".local","tsbuildinfo");function Ct(e){return{allowImportingTsExtensions:!0,allowJs:!1,esModuleInterop:!0,incremental:!0,module:P.ModuleKind.Preserve,moduleResolution:P.ModuleResolutionKind.Bundler,noEmit:!0,resolveJsonModule:!0,skipLibCheck:!0,strict:!1,target:P.ScriptTarget.ES2022,tsBuildInfoFile:M.join(e,Pt)}}import{createHash as Tt}from"crypto";import rn from"fs/promises";import ue from"path";import{err as C,ok as pe,Result as jt}from"neverthrow";var $=".ripplo/fixtures",fe=10*1024*1024,ye=50*1024*1024;async function on(e,n){let t=At(n);if(t.length===0)return pe({});let r=ue.join(e,$),o=await Promise.all(t.map(i=>Ft({fixturesRoot:r,name:i})));return jt.combine(o).andThen(Mt)}function At(e){let t=e.workflows.flatMap(r=>[...r.steps,...r.tests.flatMap(o=>o.steps)]).flatMap(r=>r.action.kind==="upload"?r.action.files:[]);return[...new Set(t)].toSorted((r,o)=>r.localeCompare(o))}async function Ft({fixturesRoot:e,name:n}){if(n.includes("..")||ue.isAbsolute(n))return C({kind:"fixture-invalid-name",name:n});let t=ue.join(e,n),r=await rn.lstat(t).catch(()=>null);if(r==null)return C({kind:"fixture-missing",name:n,path:t});if(r.isSymbolicLink())return C({kind:"fixture-symlink",name:n});if(!r.isFile())return C({kind:"fixture-not-file",name:n});let o=await rn.readFile(t);if(o.byteLength>fe)return C({kind:"fixture-too-large",name:n,size:o.byteLength});let i=Tt("sha256").update(o).digest("hex");return pe([n,{sha256:i,size:o.byteLength}])}function Mt(e){let n=e.reduce((t,[,r])=>t+r.size,0);return n>ye?C({kind:"fixtures-total-too-large",total:n}):pe(Object.fromEntries(e))}var T=".ripplo/ripplo.lock",L;async function sn(e){let{result:n}=await ge(e);return n}async function ge(e){let n=Ut(z.join(e,".ripplo"));if(L!=null&&L.fingerprint===n&&L.result.isOk())return{fingerprint:n,result:L.result};let t=await O(e);return L={fingerprint:n,result:t},{fingerprint:n,result:t}}async function O(e){let n=z.join(e,".ripplo"),t=z.join(n,"index.ts"),r=tn(n);return r.ok?(await Ot(t)).andThen(s=>Dt({entryPath:t,exported:s})).match(async s=>(await on(e,s)).map(u=>({...s,fixtures:u})).mapErr(u=>({error:u,kind:"fixture-failed"})),s=>Promise.resolve(U(s))):U({diagnostics:r.diagnostics,kind:"typecheck-failed"})}var Lt=new Set([".local","debug","node_modules"]);function Ut(e){return ln(e).toSorted((n,t)=>n.localeCompare(t)).join("|")}function ln(e){return(me.existsSync(e)?me.readdirSync(e,{withFileTypes:!0}):[]).flatMap(t=>{if(Lt.has(t.name))return[];let r=z.join(e,t.name);if(t.isDirectory())return ln(r);let o=me.statSync(r);return[`${r}:${String(o.mtimeMs)}:${String(o.size)}`]})}async function Ot(e){try{let t=await $t(import.meta.url,{fsCache:!1,moduleCache:!1,sourceMaps:!0}).import(e),r=t!=null&&typeof t=="object"&&"default"in t?Reflect.get(t,"default"):t;return an(r)}catch(n){return U({kind:"load-threw",message:Nt(n)})}}function Nt(e){return e instanceof Error?e.message:String(e)}function Dt({entryPath:e,exported:n}){if(n==null||typeof n!="object"||!("lockfile"in n))return U({entryPath:e,kind:"not-ripplo"});let t=_e.safeParse(Reflect.get(n,"lockfile"));return t.success?an(t.data):U({issues:t.error.issues.map(r=>`${r.path.join(".")}: ${r.message}`),kind:"invalid-lockfile"})}function j(e,n){return n==null?`Load \`/ripplo:${e}\` skill for instructions.`:`Load \`/ripplo:${e}\` skill for instructions on ${n}.`}function xa(e){return e.length===1?j(e[0]):`Before proceeding, load the ${e.map(t=>`\`/ripplo:${t}\``).join(" and ")} skills \u2014 every one, each carries rules the others don't.`}function K(e){return[`Compilation failed: ${_t(e)}`,j("create","DSL authoring + lint rules")].join(`
|
|
@@ -121,7 +121,7 @@ import{B as ze,V as Je,W as Ke,Z as Qe,_ as Ge,a as N,b as De,g as _e,i as qe,j
|
|
|
121
121
|
clipUploadUrl(runId: $runId)
|
|
122
122
|
}
|
|
123
123
|
`);async function No(e,n,t){let r=ne.join(n,t,"clip.gif");if(Fe(r))try{let o=await f({config:e,document:Oo,variables:{runId:t}});if(o.clipUploadUrl==null)return;let i=await fetch(o.clipUploadUrl,{body:new Uint8Array(Me(r)),headers:{"Content-Type":"image/gif"},method:"PUT"});i.ok||y.warn({runId:t,status:i.status},"Clip upload failed")}catch(o){y.warn({err:o,runId:t},"Clip upload skipped")}}function Do(e){return e.reduce((n,t)=>Math.min(n,t.startMs),e[0]?.startMs??0)}function dt(e){return e.flatMap(n=>n.kind==="step"?[{annotations:n.annotations,endMs:n.endMs,findings:n.findings,index:n.index,source:n.source,startMs:n.startMs,state:n.state,url:n.url}]:[])}function _o(e,n){let t=ne.join(e,n,"behavior.jsonl");if(!Fe(t))return null;let r=Me(t,"utf8").split(`
|
|
124
|
-
`).filter(i=>i.length>0).map(i=>qo(i)).flatMap(i=>Ho(i)?[i.event]:[]),o=r[0];return o==null?null:{events:r,origin:o.timestamp}}function qo(e){return JSON.parse(e)}function Ho(e){return typeof e=="object"&&e!=null&&Reflect.get(e,"kind")==="rrweb"}function Wo(e){return e.flatMap(n=>n.kind==="world"?n.aliases:[])}function Bo(e){return e.flatMap(n=>{let t=Jo(n.source);return t.flatMap(r=>{let i=t.filter(l=>l.entity===r.entity).indexOf(r),s=n.state.rows.filter(l=>l.status==="created"&&l.entity===r.entity).at(i);return s==null?[]:[{alias:r.as,entity:r.entity,key:s.key}]})})}function Vo(e){return new Set(e.flatMap(n=>n.kind==="world"?n.generated.map(t=>ct(t)):[]))}function ct({entity:e,field:n,key:t}){return`${e}\0${t}\0${n}`}function zo(e){return new Set(e.flatMap(n=>n.kind==="world"?n.generatedSingletons:[]))}function Jo(e){return e==null?[]:e.expect.flatMap(n=>Ae(n))}function Ae(e){return e.kind==="state"&&e.assertion.kind==="created"?[{as:e.assertion.as,entity:e.entity}]:e.kind==="and"?e.predicates.flatMap(n=>Ae(n)):e.kind==="when"?e.branches.flatMap(n=>n.consequence.flatMap(t=>Ae(t))):[]}async function Ko({aliases:e,config:n,generated:t,generatedSingletons:r,origin:o,records:i,rrwebEvents:s,runId:l,stepSources:u}){let d=i.map((p,c)=>Yo({aliases:e,generated:t,generatedSingletons:r,origin:o,record:p,rrwebEvents:s,sourceTest:u?.[c]??null}));await f({config:n,document:li,variables:{items:[{runId:l,steps:d}]}})}var Qo=3,Go=0;function Xo({endMs:e,rrwebEvents:n,startMs:t}){let r=n.find(o=>o.type===Qo&&o.data?.source===Go&&o.timestamp>=t&&o.timestamp<=e);return r==null?t:r.timestamp}function Yo({aliases:e,generated:n,generatedSingletons:t,origin:r,record:o,rrwebEvents:i,sourceTest:s}){let l=We(o.source,o.index),u=Xo({endMs:o.endMs,rrwebEvents:i,startMs:o.startMs}),d=o.annotations.map(c=>({kind:c.kind,label:c.label,outcome:c.outcome,recordingStartMs:Math.max(0,(c.kind==="action"?u:c.atMs)-r),rrwebIds:[...c.rrwebIds],url:c.url})),p=o.annotations.find(c=>c.kind==="action")?.rrwebIds??[];return{annotations:d,detail:null,duration:Math.max(0,o.endMs-o.startMs),findings:o.findings.map(c=>at(c)),nodeType:l.kind,recordingEndMs:Math.max(0,o.endMs-r),recordingStartMs:Math.max(0,u-r),rrwebIds:[...p],snapshotTimestamp:Math.max(0,o.endMs-r),sourceTest:s,stateRows:o.state.rows.map(c=>Zo({aliases:e,generated:n,row:c})),stateSingletons:o.state.singletons.map(c=>({changed:c.changed,generated:t.has(c.name),name:c.name,value:c.value==null?null:String(c.value)})),status:o.findings.length>0?"failed":"passed",stepIndex:o.index,title:it(l),url:o.url}}function Zo({aliases:e,generated:n,row:t}){let r=e.find(o=>o.entity===t.entity&&o.key===t.key);return{entity:t.entity,fields:t.fields.map(o=>({changed:o.changed,field:o.field,generated:n.has(ct({entity:t.entity,field:o.field,key:t.key})),value:o.value==null?null:String(o.value)})),key:t.key,label:r?.alias??t.key,status:t.status}}var ei=$o(Mo);async function ut(e,n){await f({config:e,document:ui,variables:{runIds:[n]}})}var ni="application/x-ndjson";async function ti({config:e,debugDir:n,runId:t}){let r=ne.join(n,t,"behavior.jsonl");if(Fe(r))try{let o=await f({config:e,document:ri,variables:{runId:t}}),i=await fetch(o.debugArtifactUploadUrl,{body:Me(r),headers:{"content-type":ni},method:"PUT"});if(!i.ok){y.warn({runId:t,status:i.status},"behavior upload PUT failed");return}await ut(e,t)}catch(o){y.warn({error:o,runId:t},"behavior upload failed")}}var ri=E(`
|
|
124
|
+
`).filter(i=>i.length>0).map(i=>qo(i)).flatMap(i=>Ho(i)?[i.event]:[]),o=r[0];return o==null?null:{events:r,origin:o.timestamp}}function qo(e){return JSON.parse(e)}function Ho(e){return typeof e=="object"&&e!=null&&Reflect.get(e,"kind")==="rrweb"}function Wo(e){return e.flatMap(n=>n.kind==="world"?n.aliases:[])}function Bo(e){return e.flatMap(n=>{let t=Jo(n.source);return t.flatMap(r=>{let i=t.filter(l=>l.entity===r.entity).indexOf(r),s=n.state.rows.filter(l=>l.status==="created"&&l.entity===r.entity).at(i);return s==null?[]:[{alias:r.as,entity:r.entity,key:s.key}]})})}function Vo(e){return new Set(e.flatMap(n=>n.kind==="world"?n.generated.map(t=>ct(t)):[]))}function ct({entity:e,field:n,key:t}){return`${e}\0${t}\0${n}`}function zo(e){return new Set(e.flatMap(n=>n.kind==="world"?n.generatedSingletons:[]))}function Jo(e){return e==null?[]:e.expect.flatMap(n=>Ae(n))}function Ae(e){return e.kind==="state"&&e.assertion.kind==="created"?[{as:e.assertion.as,entity:e.entity}]:e.kind==="and"?e.predicates.flatMap(n=>Ae(n)):e.kind==="when"?e.branches.flatMap(n=>n.consequence.flatMap(t=>Ae(t))):[]}async function Ko({aliases:e,config:n,generated:t,generatedSingletons:r,origin:o,records:i,rrwebEvents:s,runId:l,stepSources:u}){let d=i.map((p,c)=>Yo({aliases:e,generated:t,generatedSingletons:r,origin:o,record:p,rrwebEvents:s,sourceTest:u?.[c]??null}));await f({config:n,document:li,variables:{items:[{runId:l,steps:d}]}})}var Qo=3,Go=0;function Xo({endMs:e,rrwebEvents:n,startMs:t}){let r=n.find(o=>o.type===Qo&&o.data?.source===Go&&o.timestamp>=t&&o.timestamp<=e);return r==null?t:r.timestamp}function Yo({aliases:e,generated:n,generatedSingletons:t,origin:r,record:o,rrwebEvents:i,sourceTest:s}){let l=We(o.source,o.index),u=Xo({endMs:o.endMs,rrwebEvents:i,startMs:o.startMs}),d=o.annotations.map(c=>({kind:c.kind,label:c.label,outcome:c.outcome,recordingStartMs:Math.max(0,(c.kind==="action"?u:c.atMs)-r),rrwebIds:[...c.rrwebIds],url:c.url,value:c.value??null})),p=o.annotations.find(c=>c.kind==="action")?.rrwebIds??[];return{annotations:d,detail:null,duration:Math.max(0,o.endMs-o.startMs),findings:o.findings.map(c=>at(c)),nodeType:l.kind,recordingEndMs:Math.max(0,o.endMs-r),recordingStartMs:Math.max(0,u-r),rrwebIds:[...p],snapshotTimestamp:Math.max(0,o.endMs-r),sourceTest:s,stateRows:o.state.rows.map(c=>Zo({aliases:e,generated:n,row:c})),stateSingletons:o.state.singletons.map(c=>({changed:c.changed,generated:t.has(c.name),name:c.name,value:c.value==null?null:String(c.value)})),status:o.findings.length>0?"failed":"passed",stepIndex:o.index,title:it(l),url:o.url}}function Zo({aliases:e,generated:n,row:t}){let r=e.find(o=>o.entity===t.entity&&o.key===t.key);return{entity:t.entity,fields:t.fields.map(o=>({changed:o.changed,field:o.field,generated:n.has(ct({entity:t.entity,field:o.field,key:t.key})),value:o.value==null?null:String(o.value)})),key:t.key,label:r?.alias??t.key,status:t.status}}var ei=$o(Mo);async function ut(e,n){await f({config:e,document:ui,variables:{runIds:[n]}})}var ni="application/x-ndjson";async function ti({config:e,debugDir:n,runId:t}){let r=ne.join(n,t,"behavior.jsonl");if(Fe(r))try{let o=await f({config:e,document:ri,variables:{runId:t}}),i=await fetch(o.debugArtifactUploadUrl,{body:Me(r),headers:{"content-type":ni},method:"PUT"});if(!i.ok){y.warn({runId:t,status:i.status},"behavior upload PUT failed");return}await ut(e,t)}catch(o){y.warn({error:o,runId:t},"behavior upload failed")}}var ri=E(`
|
|
125
125
|
mutation DebugArtifactUploadUrl($runId: String!) {
|
|
126
126
|
debugArtifactUploadUrl(runId: $runId)
|
|
127
127
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{aa as a,ba as b,ca as c,da as d,ea as e,fa as f,ga as g,ha as h,ia as i,ja as j,ka as k}from"./chunk-
|
|
2
|
+
import{aa as a,ba as b,ca as c,da as d,ea as e,fa as f,ga as g,ha as h,ia as i,ja as j,ka as k}from"./chunk-AT7Q6HQH.js";import"./chunk-IHSHBPJY.js";import"./chunk-7UWDMECF.js";export{b as renderDaemonBindError,g as renderDaemonLockCompromised,f as renderDaemonLockHeld,e as renderDaemonReady,h as renderDaemonStatus,j as renderDaemonVersionNote,i as renderExplorationProgress,d as renderNotSignedIn,c as renderProjectAccessDenied,a as renderTunnelProvisionFailed,k as wireOutcome};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{$ as Ie,B as ie,D as me,F as ye,U as be,V as xe,W as Pe,X as Re,Y as Ee,Z as Te,_ as Ce,b as K,ba as P,ca as R,da as We,e as Y,ea as M,fa as Ae,h as x,ha as U,i as re,ia as Le,j as H,ja as De,m as _,ma as E,na as He,oa as _e,pa as Me,qa as Ue,r as oe,sa as qe,u as w,w as ne,x as te}from"./chunk-
|
|
2
|
+
import{$ as Ie,B as ie,D as me,F as ye,U as be,V as xe,W as Pe,X as Re,Y as Ee,Z as Te,_ as Ce,b as K,ba as P,ca as R,da as We,e as Y,ea as M,fa as Ae,h as x,ha as U,i as re,ia as Le,j as H,ja as De,m as _,ma as E,na as He,oa as _e,pa as Me,qa as Ue,r as oe,sa as qe,u as w,w as ne,x as te}from"./chunk-OY73M2ST.js";import{G as se,I as ce,J as de,K as ue,L as pe,T as fe,ba as ge,ca as Se,da as ke,e as X,ea as ve,fa as we,ga as he,h as Z,i as D,l as ee,n as ae,q as le}from"./chunk-AT7Q6HQH.js";import{b as Oe}from"./chunk-RLXQYG7H.js";import{c as G,d as g,e as s,f as L,g as V}from"./chunk-5VRJXHWH.js";import"./chunk-IHSHBPJY.js";import"./chunk-7UWDMECF.js";import Bo from"path";import{createClient as jo}from"graphql-sse";import zo,{AbortError as Jo}from"p-retry";import{graphql as z}from"gql.tada";import{graphql as Ar}from"gql.tada";import{print as Lr}from"graphql";async function Fe({config:e,cwd:r,headed:o,pool:n,runId:t,signal:i,testSlug:a,workClass:l,workflowSlug:c}){let u=await x(r);if(u.isErr())return await E(e,t,`lockfile:${u.error.kind}`),{kind:"dispatch-error",reason:{detail:`lockfile:${u.error.kind}`,type:"generic"}};let p=Wr(u.value,{testSlug:a,workflowSlug:c});if(p==null)return await E(e,t,`no-test:${c}/${a}`),{kind:"dispatch-error",reason:{detail:`no-test:${c}/${a}`,type:"generic"}};let d=await P({headed:o,workClass:l,task:()=>n.execute({headed:o,runId:t,testRef:p},i)});return!d.serverNotified&&d.outcome.kind==="error"&&await E(e,t,d.outcome.detail),d.outcome}function Wr(e,{testSlug:r,workflowSlug:o}){let t=e.workflows.find(i=>ee(i.name)===o)?.tests.find(i=>i.slug===r);return t==null?void 0:le(t)}var Dr=6e4,Hr=Ar(`
|
|
3
3
|
subscription RunRequestedWatch($devSessionId: String!) {
|
|
4
4
|
runRequested(devSessionId: $devSessionId) {
|
|
5
5
|
runId
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{A as Or,B as ze,C as Mr,D as te,E as b,F as B,G as Qe,H as dn,I as cn,J as un,K as pn,L as mn,M as fn,N as gn,O as hn,P as ve,Q as yn,R as kn,S as Rn,T as Sn,V as Cn,W as xn,X as Pn,Y as En,Z as $n,_ as In,a as Cr,aa as jn,b as q,c as xr,d as Pr,e as C,f as ne,g as T,ga as oe,ha as An,i as $r,ia as Xe,j as x,k as c,ka as Tn,l as Ir,la as Ye,m as P,n as jr,o as Ar,p as Tr,q as Dr,r as $,ra as Dn,s as I,sa as Ln,t as Lr,u as y,v as ke,y as O,z as _r}from"./chunk-
|
|
2
|
+
import{A as Or,B as ze,C as Mr,D as te,E as b,F as B,G as Qe,H as dn,I as cn,J as un,K as pn,L as mn,M as fn,N as gn,O as hn,P as ve,Q as yn,R as kn,S as Rn,T as Sn,V as Cn,W as xn,X as Pn,Y as En,Z as $n,_ as In,a as Cr,aa as jn,b as q,c as xr,d as Pr,e as C,f as ne,g as T,ga as oe,ha as An,i as $r,ia as Xe,j as x,k as c,ka as Tn,l as Ir,la as Ye,m as P,n as jr,o as Ar,p as Tr,q as Dr,r as $,ra as Dn,s as I,sa as Ln,t as Lr,u as y,v as ke,y as O,z as _r}from"./chunk-OY73M2ST.js";import{$ as ln,A as Gr,C as Ke,D as Jr,E as zr,F as Kr,H as Qr,I as Xr,M as Yr,N as Zr,O as en,P as rn,Q as nn,R as tn,S as on,U as sn,X as be,Y as an,c as Er,d as re,e as G,f as ye,h as A,ha as wn,ja as bn,ka as vn,l as _,o as Nr,r as we,s as Fr,t as Ur,u as Hr,v as Wr,w as qr,x as f,y as Br,z as Vr}from"./chunk-AT7Q6HQH.js";import{a as gr,b as hr,c as yr,d as u,e as D,g as he,h as kr,i as L,j as wr,k as br,l as Je,m as vr,n as Rr,o as Sr}from"./chunk-5VRJXHWH.js";import"./chunk-IHSHBPJY.js";import"./chunk-7UWDMECF.js";import Du from"update-notifier";import Lu from"yargs";import{hideBin as _u}from"yargs/helpers";function Re({current:e,latest:r}){return r==null?`ripplo v${e} (latest: unknown)`:r===e?`ripplo v${e} (latest)`:`ripplo v${e} (latest: v${r} \u2014 run \`npx ripplo update\`)`}function _n(){return"Update available {currentVersion} \u2192 {latestVersion}\nRun `npx ripplo update`"}import{graphql as ss}from"gql.tada";import{exec as Ki}from"child_process";import{createAuthClient as Ji}from"better-auth/client";import{deviceAuthorizationClient as zi}from"better-auth/client/plugins";function On({baseURL:e}){return Ji({baseURL:e,fetchOptions:{headers:{"User-Agent":"Ripplo CLI"}},plugins:[zi()]})}import{err as Mn,ok as Qi}from"neverthrow";var Xi=5e3,Nn="ripplo-cli";async function Fn({onDeviceCode:e,url:r}){let n=r??Lr().RIPPLO_SERVER_URL,t=On({baseURL:n}),o=await t.device.code({client_id:Nn});if(o.error!=null)return Mn({description:o.error.error_description,kind:"oauth-device-code-failed"});let{device_code:i,user_code:s,verification_uri_complete:a}=o.data;return e({userCode:s,verificationUrl:a}),ts(a),(await Yi({authClient:t,deviceCode:i})).map(d=>(wr({serverUrl:n,token:d}),d))}async function Yi({authClient:e,deviceCode:r}){for(;;){await rs(Xi);let n=await e.device.token({client_id:Nn,device_code:r,grant_type:"urn:ietf:params:oauth:grant-type:device_code"});if(n.data?.access_token!=null)return Qi(n.data.access_token);if(n.error==null)continue;if(!es(n.error.error))return Mn({code:n.error.error,description:n.error.error_description,kind:"oauth-authorization-failed"})}}var Zi=new Set(["authorization_pending","slow_down"]);function es(e){return Zi.has(e)}function rs(e){return new Promise(r=>{setTimeout(r,e)})}function ns(){return process.platform==="darwin"?"open":process.platform==="win32"?"start":"xdg-open"}function ts(e){let r=ns();Ki(`${r} "${e}"`,()=>{})}function N({serverUrl:e,token:r}){return{appUrl:"",cwd:process.cwd(),engineUrl:"",projectId:"",ripploServerUrl:e,token:r,tunnelAuth:void 0,webhookSecret:""}}import os from"fs";import is from"path";function g(e){return os.existsSync(is.join(e,".ripplo"))}var as=ss(`
|
|
3
3
|
query AuthViewer {
|
|
4
4
|
currentUser {
|
|
5
5
|
name
|
|
@@ -364,7 +364,7 @@ ${e.findings.map(t=>Br({evidencePath:void 0,finding:t})).join(`
|
|
|
364
364
|
`);return}Xd(e)}function Xd(e){let r=`ripplo@${e}`,n=Bd("npm",["install","-g",r],{stdio:"inherit"});if(n.status!==0){let t=`exit ${String(n.status)}`;process.stderr.write(`${Go(t)}
|
|
365
365
|
`),process.exit(1)}process.stdout.write(`${dr({evicted:0,latest:e,mode:"global"})}
|
|
366
366
|
`)}async function Yd(e){if((await Te(e)).kind==="not-running")return;let n=await Et(e);process.stdout.write(`${Jo(n)}
|
|
367
|
-
`)}async function Ko({executor:e}){let{runDaemon:r}=await import("./daemon-
|
|
367
|
+
`)}async function Ko({executor:e}){let{runDaemon:r}=await import("./daemon-QZGRZM6N.js"),{TunnelProvisionFailedError:n}=await import("./daemon-tunnel-DYA5LIEG.js"),{renderTunnelProvisionFailed:t}=await import("./daemon-IUYRZTJR.js");try{await r({executor:e})}catch(o){throw o instanceof n&&(process.stderr.write(`${t(o.failure)}
|
|
368
368
|
`),process.exit(1)),o}}import{graphql as He}from"gql.tada";function Qo(){return"No scope items added \u2014 the matched tests are already in scope (check `npx ripplo scope status`)."}function Xo(e){return[`No test found for: ${e.join(", ")}`,"Pass a test id (kebab-case slug of the test name) or the exact intent string.","List known tests with `npx ripplo status`. To add one, stub it first via the testing DSL.",c("create")].join(`
|
|
369
369
|
`)}import{graphql as Zd}from"gql.tada";var Yo=Zd(`
|
|
370
370
|
query ScopeStatus($projectId: String!, $cwd: String!) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ripplo",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.36",
|
|
4
4
|
"description": "CLI for Ripplo — AI-powered end-to-end testing",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"homepage": "https://ripplo.ai",
|
|
@@ -59,13 +59,13 @@
|
|
|
59
59
|
"eslint-plugin-neverthrow": "^1.1.4",
|
|
60
60
|
"tsup": "^8.5.1",
|
|
61
61
|
"vitest": "^4.1.4",
|
|
62
|
-
"@ripplo/runtime": "^0.0.0",
|
|
63
|
-
"@ripplo/spec": "^0.0.0",
|
|
64
62
|
"@ripplo/core": "^0.0.0",
|
|
63
|
+
"@ripplo/graphql": "^0.0.0",
|
|
64
|
+
"@ripplo/runtime": "^0.0.0",
|
|
65
65
|
"@ripplo/run-report": "0.0.0",
|
|
66
66
|
"@ripplo/rrweb-bundle": "0.0.0",
|
|
67
67
|
"@ripplo/eslint-config": "0.0.0",
|
|
68
|
-
"@ripplo/
|
|
68
|
+
"@ripplo/spec": "^0.0.0"
|
|
69
69
|
},
|
|
70
70
|
"scripts": {
|
|
71
71
|
"dev": "tsx watch src/index.ts",
|