ripplo 0.7.49 → 0.7.51
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/README.md +4 -6
- package/dist/{chunk-UBPGO5KY.js → chunk-AA5U2MVM.js} +1 -1
- package/dist/{chunk-R2QYFBGQ.js → chunk-CU6ZOAZF.js} +31 -31
- package/dist/{chunk-3W2KCWPN.js → chunk-CUHD57L6.js} +19 -17
- package/dist/{chunk-UX4XVD54.js → chunk-JEHQMSKX.js} +1 -1
- package/dist/{chunk-3BYXC7SY.js → chunk-O6J2UXMN.js} +1 -1
- package/dist/{chunk-B7VRWN2U.js → chunk-ZKBCWP2P.js} +1 -1
- package/dist/{daemon-YXH443NG.js → daemon-OUFHFJR6.js} +1 -1
- package/dist/{daemon-S5L6HCUY.js → daemon-U7CSN5UE.js} +1 -1
- package/dist/daemon-lock-PXILYGWE.js +2 -0
- package/dist/index.js +238 -205
- package/dist/status-P55MSJ4Q.js +2 -0
- package/package.json +3 -3
- package/dist/daemon-lock-K6KZL4X2.js +0 -2
- package/dist/status-BRJFECSM.js +0 -2
package/README.md
CHANGED
|
@@ -23,15 +23,13 @@ export const createTask = test("Create a task", () => {
|
|
|
23
23
|
|
|
24
24
|
## Setup with Claude Code
|
|
25
25
|
|
|
26
|
-
If you use Claude Code, this is the shortest path.
|
|
26
|
+
If you use Claude Code, this is the shortest path. One command installs the plugin and opens a guided session that handles auth, project creation, scaffolding, and adapter wiring, and adds hooks that keep tests in sync as the agent changes your code.
|
|
27
27
|
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
/plugin install ripplo
|
|
31
|
-
/ripplo:setup
|
|
28
|
+
```sh
|
|
29
|
+
npx ripplo setup
|
|
32
30
|
```
|
|
33
31
|
|
|
34
|
-
Skip the rest of this section unless you want to know what
|
|
32
|
+
Skip the rest of this section unless you want to know what setup does, or you're not on Claude Code.
|
|
35
33
|
|
|
36
34
|
## Setup by hand
|
|
37
35
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{
|
|
2
|
+
import{i as k}from"./chunk-ZKBCWP2P.js";import{g as w}from"./chunk-CU6ZOAZF.js";import{readFileSync as M}from"fs";import{z as F}from"zod";var O=F.object({version:F.string()});function xe(){let t=M(new URL("../package.json",import.meta.url),"utf8");return O.parse(JSON.parse(t)).version}import j from"fs";import g from"path";import{createJiti as K}from"jiti";import{err as f,ok as I}from"neverthrow";import z from"fs";import p from"path";import l from"typescript";function P(t){let r=p.join(t,"index.ts"),n=U(t);z.mkdirSync(p.dirname(n.tsBuildInfoFile??""),{recursive:!0});let o=l.createIncrementalCompilerHost(n),i=l.createIncrementalProgram({host:o,options:n,rootNames:[r]}),s=[...i.getSyntacticDiagnostics(),...i.getSemanticDiagnostics()];i.emit();let a=s.filter(u=>N(u,t));if(a.length===0)return{diagnostics:[],ok:!0};let L={getCanonicalFileName:u=>u,getCurrentDirectory:()=>p.dirname(t),getNewLine:()=>`
|
|
3
3
|
`};return{diagnostics:l.formatDiagnosticsWithColorAndContext(a,L).split(`
|
|
4
4
|
`).filter(u=>u.length>0),ok:!1}}function N(t,r){let n=t.file?.fileName;return n==null?!0:n.startsWith(r)}var D=p.join(".local","tsbuildinfo");function U(t){return{allowImportingTsExtensions:!0,allowJs:!1,esModuleInterop:!0,incremental:!0,module:l.ModuleKind.Preserve,moduleResolution:l.ModuleResolutionKind.Bundler,noEmit:!0,resolveJsonModule:!0,skipLibCheck:!0,strict:!1,target:l.ScriptTarget.ES2022,tsBuildInfoFile:p.join(t,D)}}import{createHash as q}from"crypto";import T from"fs/promises";import b from"path";import{err as c,ok as E,Result as H}from"neverthrow";var X=".ripplo/fixtures",R=10*1024*1024,S=50*1024*1024;async function v(t,r){let n=B(r);if(n.length===0)return E({});let o=b.join(t,X),i=await Promise.all(n.map(s=>J({fixturesRoot:o,name:s})));return H.combine(i).andThen(W)}function B(t){let n=t.workflows.flatMap(o=>[...o.steps,...o.tests.flatMap(i=>i.steps)]).flatMap(o=>o.action.kind==="upload"?o.action.files:[]);return[...new Set(n)].toSorted((o,i)=>o.localeCompare(i))}async function J({fixturesRoot:t,name:r}){if(r.includes("..")||b.isAbsolute(r))return c({kind:"fixture-invalid-name",name:r});let n=b.join(t,r),o=await T.lstat(n).catch(()=>null);if(o==null)return c({kind:"fixture-missing",name:r,path:n});if(o.isSymbolicLink())return c({kind:"fixture-symlink",name:r});if(!o.isFile())return c({kind:"fixture-not-file",name:r});let i=await T.readFile(n);if(i.byteLength>R)return c({kind:"fixture-too-large",name:r,size:i.byteLength});let s=q("sha256").update(i).digest("hex");return E([r,{sha256:s,size:i.byteLength}])}function W(t){let r=t.reduce((n,[,o])=>n+o.size,0);return r>S?c({kind:"fixtures-total-too-large",total:r}):E(Object.fromEntries(t))}var y=".ripplo/ripplo.lock",d;async function Me(t){let{result:r}=await V(t);return r}async function V(t){let r=Q(g.join(t,".ripplo"));if(d!=null&&d.fingerprint===r&&d.result.isOk())return{fingerprint:r,result:d.result};let n=await G(t);return d={fingerprint:r,result:n},{fingerprint:r,result:n}}async function G(t){let r=g.join(t,".ripplo"),n=g.join(r,"index.ts"),o=P(r);return o.ok?(await Z(n)).andThen(a=>te({entryPath:n,exported:a})).match(async a=>(await v(t,a)).map(m=>({...a,fixtures:m})).mapErr(m=>({error:m,kind:"fixture-failed"})),a=>Promise.resolve(f(a))):f({diagnostics:o.diagnostics,kind:"typecheck-failed"})}var Y=new Set([".local","debug","node_modules"]);function Q(t){return A(t).toSorted((r,n)=>r.localeCompare(n)).join("|")}function A(t){return(j.existsSync(t)?j.readdirSync(t,{withFileTypes:!0}):[]).flatMap(n=>{if(Y.has(n.name))return[];let o=g.join(t,n.name);if(n.isDirectory())return A(o);let i=j.statSync(o);return[`${o}:${String(i.mtimeMs)}:${String(i.size)}`]})}async function Z(t){try{let n=await K(import.meta.url,{fsCache:!1,moduleCache:!1,sourceMaps:!0}).import(t),o=n!=null&&typeof n=="object"&&"default"in n?Reflect.get(n,"default"):n;return I(o)}catch(r){return f({kind:"load-threw",message:ee(r)})}}function ee(t){return t instanceof Error?t.message:String(t)}function te({entryPath:t,exported:r}){if(r==null||typeof r!="object"||!("lockfile"in r))return f({entryPath:t,kind:"not-ripplo"});let n=w.safeParse(Reflect.get(r,"lockfile"));return n.success?I(n.data):f({issues:n.error.issues.map(o=>`${o.path.join(".")}: ${o.message}`),kind:"invalid-lockfile"})}function h(t,r){return r==null?`Load \`/ripplo:${t}\` skill for instructions.`:`Load \`/ripplo:${t}\` skill for instructions on ${r}.`}function ze(t){return t.length===1?h(t[0]):`Before proceeding, load the ${t.map(n=>`\`/ripplo:${n}\``).join(" and ")} skills \u2014 every one, each carries rules the others don't.`}function He(t){return[`Compilation failed: ${re(t)}`,h("create","DSL authoring + lint rules")].join(`
|
|
5
5
|
`)}function Xe(){return`${y} is up to date`}function Be(t){return[`${y} is ${t==="missing"?"missing":"out of date"} \u2014 run \`npx ripplo compile\` and commit the result`,h("setup")].join(`
|