ripplo 0.1.11 → 0.2.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 +10 -7
- package/dist/index.js +221 -151
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -59,17 +59,19 @@ The plugin hooks into your agent's workflow to create a tight validation loop
|
|
|
59
59
|
npm install @ripplo/testing
|
|
60
60
|
```
|
|
61
61
|
|
|
62
|
-
This is the DSL your `.ripplo/` files use
|
|
62
|
+
This is the DSL your `.ripplo/` files use — tests, preconditions (test data), and observers (backend assertions).
|
|
63
63
|
|
|
64
64
|
## How It Works
|
|
65
65
|
|
|
66
|
-
**Define tests as code** — Tests are TypeScript files using a typed DSL. Your agent writes them, or you write them by hand. Each test
|
|
66
|
+
**Define tests as code** — Tests are TypeScript files using a typed DSL. Your agent writes them, or you write them by hand. Each test declares its preconditions, starting URL, and interaction steps.
|
|
67
67
|
|
|
68
|
-
**Every test gets a clean slate** — Each test
|
|
68
|
+
**Every test gets a clean slate** — Each test declares its own preconditions (fresh user, sample data, permissions). No shared state or ordering dependencies.
|
|
69
|
+
|
|
70
|
+
**Backend assertions are first-class** — Use `assert.backend(observer, params)` mid-flow to verify DB rows, jobs, emails, or webhooks. Observers are typed, named, and bounded by a budget tier (fast / slow / async).
|
|
69
71
|
|
|
70
72
|
**Dev mode to cloud** — The dashboard runs tests locally as you develop. When you merge, tests sync and run in the cloud against your deployed environment.
|
|
71
73
|
|
|
72
|
-
**Secure by default** — Every
|
|
74
|
+
**Secure by default** — Every engine request is cryptographically signed. The engine adapter is gated behind a webhook secret and an `ENABLE_RIPPLO_TESTING` env flag.
|
|
73
75
|
|
|
74
76
|
## Commands
|
|
75
77
|
|
|
@@ -88,10 +90,11 @@ After setup, your project will have:
|
|
|
88
90
|
|
|
89
91
|
```
|
|
90
92
|
.ripplo/
|
|
91
|
-
├── ripplo.ts # Config: createRipplo({ projectId, appUrl, ... })
|
|
93
|
+
├── ripplo.ts # Config: createRipplo({ projectId, appUrl, engineUrl, ... })
|
|
92
94
|
├── ripplo.lock # Generated + committed: compiled DSL the Ripplo server reads on push
|
|
93
|
-
├── index.ts # Entry point — explicitly imports every precondition and test file
|
|
95
|
+
├── index.ts # Entry point — explicitly imports every precondition, observer, and test file
|
|
94
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)
|
|
95
98
|
└── tests/ # Test specs (add `import "./tests/<id>.js";` to index.ts)
|
|
96
99
|
```
|
|
97
100
|
|
|
@@ -100,7 +103,7 @@ Configuration lives in `ripplo.ts` via `createRipplo()`:
|
|
|
100
103
|
```ts
|
|
101
104
|
const ripplo = createRipplo({
|
|
102
105
|
appUrl: "http://localhost:3000",
|
|
103
|
-
|
|
106
|
+
engineUrl: "http://localhost:3000/ripplo",
|
|
104
107
|
projectId: "your-project-id",
|
|
105
108
|
webhookSecret: process.env["RIPPLO_WEBHOOK_SECRET"] ?? "",
|
|
106
109
|
});
|