ripplo 0.2.2 → 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.
- package/README.md +25 -13
- package/dist/index.js +134 -94
- 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
|
|
94
|
-
├── ripplo.lock
|
|
95
|
-
├── index.ts
|
|
96
|
-
├── preconditions/
|
|
97
|
-
├── observers/
|
|
98
|
-
└── tests/
|
|
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
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
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).
|