ripplo 0.2.1 → 0.3.0

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 (3) hide show
  1. package/README.md +25 -13
  2. package/dist/index.js +210 -140
  3. package/package.json +4 -4
package/README.md CHANGED
@@ -90,23 +90,35 @@ After setup, your project will have:
90
90
 
91
91
  ```
92
92
  .ripplo/
93
- ├── ripplo.ts # Config: createRipplo({ projectId, appUrl, engineUrl, ... })
94
- ├── ripplo.lock # Generated + committed: compiled DSL the Ripplo server reads on push
95
- ├── index.ts # Entry point explicitly imports every precondition, observer, and test file
96
- ├── preconditions/ # Test data setup/teardown (add `import "./preconditions/<file>.js";` to index.ts)
97
- ├── observers/ # Backend state assertions (add `import "./observers/<file>.js";` to index.ts)
98
- └── tests/ # Test specs (add `import "./tests/<id>.js";` to index.ts)
93
+ ├── ripplo.ts # createRipplo(config, { preconditions, observers, tests })
94
+ ├── ripplo.lock # Generated + committed: compiled DSL the Ripplo server reads on push
95
+ ├── index.ts # Re-exports the ripplo instance + registries
96
+ ├── preconditions/index.ts # Exports each precondition handle + a `preconditions` registry
97
+ ├── observers/index.ts # Exports each observer handle + an `observers` registry
98
+ └── tests/
99
+ ├── index.ts # Composes all tests into a `tests` array
100
+ └── <test-id>.ts # Each file exports one TestDefinition
99
101
  ```
100
102
 
101
- Configuration lives in `ripplo.ts` via `createRipplo()`:
103
+ Configuration lives in `ripplo.ts` via `createRipplo()`. It takes two arguments: the config, and the three registries composed from the folders above.
102
104
 
103
105
  ```ts
104
- const ripplo = createRipplo({
105
- appUrl: "http://localhost:3000",
106
- engineUrl: "http://localhost:3000/ripplo",
107
- projectId: "your-project-id",
108
- webhookSecret: process.env["RIPPLO_WEBHOOK_SECRET"] ?? "",
109
- });
106
+ import { createRipplo } from "@ripplo/testing";
107
+ import { preconditions } from "./preconditions/index.js";
108
+ import { observers } from "./observers/index.js";
109
+ import { tests } from "./tests/index.js";
110
+
111
+ export default createRipplo(
112
+ {
113
+ appUrl: "http://localhost:3000",
114
+ engineUrl: "http://localhost:3000/ripplo",
115
+ projectId: "your-project-id",
116
+ webhookSecret: process.env["RIPPLO_WEBHOOK_SECRET"] ?? "",
117
+ },
118
+ { preconditions, observers, tests },
119
+ );
110
120
  ```
111
121
 
122
+ Implementations (precondition setup/teardown, observer functions) live in your app server via `createEngine(ripplo, { preconditions, observers })` — see `@ripplo/testing`'s README for the full wiring.
123
+
112
124
  Learn more at [ripplo.ai](https://ripplo.ai).