@ripplo/testing 0.0.6 → 0.0.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.
package/README.md CHANGED
@@ -14,9 +14,20 @@ npm install @ripplo/testing
14
14
  2. Define preconditions in `.ripplo/preconditions/`, then add `import "./preconditions/<file>.js";` to `.ripplo/index.ts`. Exports set up test data (users, projects, etc.)
15
15
  3. Write tests in `.ripplo/tests/`, then add `import "./tests/<id>.js";` to `.ripplo/index.ts`. The CLI only loads what that file imports.
16
16
  4. Run `npx ripplo lint` to validate, `npx ripplo run` to execute
17
+ 5. Commit the generated `.ripplo/ripplo.lock` alongside your DSL changes (see Lockfile below)
17
18
 
18
19
  Every test gets a clean slate via preconditions — no shared state, no ordering dependencies, fully parallelizable.
19
20
 
21
+ ## Lockfile
22
+
23
+ `npx ripplo compile` (and `ripplo lint`, and the dashboard's file watcher) writes `.ripplo/ripplo.lock` — a JSON artifact containing the compiled graph + tests, plus a `lockfileVersion` field. **Commit it.**
24
+
25
+ The Ripplo server reads the lockfile on every GitHub push webhook. If the lockfile is missing or out of date, the branch does not sync and the webhook returns 422.
26
+
27
+ - `ripplo compile` — compile + write (default).
28
+ - `ripplo compile --check` — exit non-zero if the lockfile is missing or stale. Use in pre-commit hooks or CI.
29
+ - `ripplo doctor` — surfaces stale lockfiles and a missing pre-commit hook.
30
+
20
31
  ## DSL API
21
32
 
22
33
  ### Test Builder
@@ -83,7 +83,7 @@ function compileSteps(steps, accessedKeys, requiresKeys) {
83
83
  variables[key] = { default: `test-${key}`, type: "string" };
84
84
  });
85
85
  const variableNamespaces = { ...requiresKeys };
86
- return { entryNode: "step-0", nodes, variableNamespaces, variables, version: 2 };
86
+ return { entryNode: "step-0", nodes, variableNamespaces, variables };
87
87
  }
88
88
  function compileNode(step, id, next) {
89
89
  const { label, node: raw } = readStep(step);
@@ -116,7 +116,7 @@ function compileGraph(preconditionDefs, testDefs) {
116
116
  workflow: def.id
117
117
  });
118
118
  });
119
- return { edges, preconditions, states, version: 3 };
119
+ return { edges, preconditions, states };
120
120
  }
121
121
  function resolveDependencyChain(requires, preconditionDefs) {
122
122
  const defsByName = new Map(preconditionDefs.map((d) => [d.name, d]));
package/dist/compiler.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  compile
3
- } from "./chunk-GTHRSFXF.js";
3
+ } from "./chunk-AQ52MYXE.js";
4
4
  import "./chunk-MGATMMCZ.js";
5
5
  export {
6
6
  compile
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  compile
3
- } from "./chunk-GTHRSFXF.js";
3
+ } from "./chunk-AQ52MYXE.js";
4
4
  import "./chunk-MGATMMCZ.js";
5
5
  import {
6
6
  buildSetCookieHeader,