Lines 1-24javascript
2import{B as Je,V as Ke,W as Qe,Z as Ge,_ as Xe,a as N,b as De,g as _e,i as qe,j as He,k as We,l as g,m as Be,o as Ve,p as ie,q as h,r as F,s as ze,w as I}from"./chunk-ITI53W73.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 en from"fs";import W from"path";import{config as kt}from"dotenv";import{z as q}from"zod";import{err as St,ok as nn}from"neverthrow";import _ from"fs";import le from"path";import{err as ae,ok as Ye}from"neverthrow";import{z as D}from"zod";var mt=le.join(".ripplo","project.json"),se=[".env",".env.local"],gt=D.object({envFiles:D.array(D ...
3`)}function Rt(e){return e.length!==se.length?!1:e.every((n,t)=>n===se[t])}function ea(e){let t=ce(e)?.envFiles??[".env",".env.local"],r=W.join(e,".ripplo");t.forEach(o=>{let i=W.resolve(r,o);en.existsSync(i)&&kt({override:!0,path:i,quiet:!0})}),H=void 0}var xt=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?nn(H):bt().map(e=>(H=e,e))}function wt(e){let t=ce(e)?.envFiles??[],r=W.join(e,".ripplo");return t.map(o=>W.resolve(r,o)).filter(o=>!en.existsSync(o))}function bt(){let e=xt.safeParse(process.env);if(!e.succ ...
4`};return{diagnostics:P.formatDiagnosticsWithColorAndContext(s,l).split(`
5`).filter(d=>d.length>0),ok:!1}}function Pt(e,n){let t=e.file?.fileName;return t==null?!0:t.startsWith(n)}var Ct=M.join(".local","tsbuildinfo");function Tt(e){return
6`)}function Pa(){return`${T} is up to date`}function Ca(e){return[`${T} is ${e==="missing"?"missing":"out of date"} \u2014 run \`npx ripplo compile\` and commit the result`,j("setup")].join(`
MediumDynamic Require
Package source references dynamic require/import behavior.
dist/chunk-SM6N6ZSY.jsView on unpkg · L4 7`)}function Ta(){return`Wrote ${T}`}function qt(e){switch(e.kind){case"typecheck-failed":return["TypeScript errors in .ripplo/:",...cn(e.diagnostics)].join(`
8`);case"not-ripplo":return`${e.entryPath} must default-export a Ripplo (createRipplo({ entities, singletons, workflows })). Check that the default export is the value returned by createRipplo, not a function or a re-export.`;case"invalid-lockfile":return["Lockfile failed schema validation (stale or hand-edited .ripplo/ripplo.lock?):",...cn(e.issues),"Regenerate with `npx ripplo compile` \u2014 never hand-edit the lockfile."].join(`
9`);case"load-threw":return[`.ripplo/index.ts threw while loading: ${e.message}`,"Usually a bad import or a top-level throw in .ripplo/ \u2014 run `npx ripplo compile` for the stack."].join(`
10`);case"fixture-failed":return Ht(e.error)}}function cn(e,n=8){return e.length<=n?e:[...e.slice(0,n),`\u2026 and ${String(e.length-n)} more`]}function Ht(
11`);case"project-file-invalid":return[`${e.path} is invalid:`,...e.issues.map(n=>` ${n}`),"Fix the file by hand or re-run `npx ripplo init`."].join(`
12`);case"not-authenticated":return["Not signed in. Run `npx ripplo auth login`.","(Claude Code: run it yourself in the background \u2014 the user just approves in the browser.)"].join(`
13`);case"env-invalid":return Wt(e);case"playwright-install-failed":return["Playwright browser install failed \u2014 Chromium is still missing.","Run `npx playwright install chromium` and check its output for network, proxy, or disk-space errors."].join(`
14`);case"gitdir-unrecognized":return`Unrecognized .git file at ${e.marker} \u2014 expected a directory or a "gitdir:" pointer (worktree). Is the repo corrupted?`;case"gitdir-empty":return`Empty gitdir pointer at ${e.marker} \u2014 the worktree's .git file points nowhere. Re-create the worktree.`;case"oauth-device-code-failed":return[`Could not start sign-in (device-code request failed): ${e.description}`,"Is the Ripplo server reachable? Check RIPPLO_SERVER_URL and retry."].join(`
15`);case"oauth-authorization-failed":return[`Sign-in failed (${e.code}): ${e.description}`,e.code==="expired_token"?"The approval window expired \u2014 run `npx ripplo auth login` again.":"Run `npx ripplo auth login` to retry."].join(`
16`);case"compilation-failed":return K(e.error)}}function Wt(e){let n=e.missingEnvFiles.length===0?[]:["Declared env files not found:",...e.missingEnvFiles.map(t=>` ${t}`),"In a git worktree? Env files aren't copied from the main checkout \u2014 recreate them, or symlink to a shared file outside the working tree."];return["Env config invalid:",...e.issues.
17`)}import{err as zt,ok as Jt}from"neverthrow";import{z as Re}from"zod";var Bt="https://ripplo.ai";function pn(){return yn().RIPPLO_SERVER_URL}function fn(){return yn().RIPPLO_PROJECT_ID}var Vt=Re.object({RIPPLO_PROJECT_ID:Re.string().min(1
18 mutation SyncDevSession(
22 $lockfileContent: String
23 $fixtures: [SyncDevFixtureInput!]
24 $preconditions: [SyncDevPreconditionInput!]!
Long lines were clipped for display.