Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .claude/content.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export default scenario("Example")
.resource("http", client.http.createHttpClient())
.step("make request", async ({ http }) => {
const res = await http.get("/api/users");
expect(res).ok().status(200);
expect(res).toBeSuccessful().toHaveStatus(200);
})
.build();
```
Expand Down
20 changes: 10 additions & 10 deletions data/api/builder.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"name": "builder",
"specifier": "@probitas/builder",
"version": "0.2.6",
"version": "0.2.7",
"moduleDoc": "Builder module for creating scenario definitions with a fluent, type-safe API.\n\nThis package provides the {@linkcode scenario} fn function that returns a builder\nfor constructing scenario definitions. The builder uses method chaining to define\nresources, setup functions, and test steps with full TypeScript type inference.\n\n## Links\n\n- [GitHub Repository](https://github.com/jsr-probitas/probitas)\n- [@probitas/probitas](https://jsr.io/@probitas/probitas) - Main package (recommended for most users)\n\n## Related Packages\n\n| Package | Description |\n|---------|-------------|\n| [@probitas/scenario](https://jsr.io/@probitas/scenario) | Core type definitions used by this builder |\n| [@probitas/runner](https://jsr.io/@probitas/runner) | Executes scenarios built with this package |\n\n## Key Features\n\n- **Fluent API**: Chain methods naturally to build complex scenarios\n- **Type-safe context**: Each step receives typed access to previous step results\n- **Resource management**: Register resources with automatic lifecycle handling\n- **Setup/Cleanup**: Define setup functions with automatic cleanup support\n- **Configurable defaults**: Override timeout and retry settings at any level\n\n## Core Exports\n\n- {@linkcode scenario} - Factory function to create a new scenario builder\n- {@linkcode StepContext} - Type representing the context passed to step functions\n- {@linkcode StepFunction} - Type signature for step functions\n- {@linkcode SetupFunction} - Type signature for setup functions\n- {@linkcode ResourceFunction} - Type signature for resource fn functions\n- {@linkcode BuilderScenarioOptions} - Partial options for scenario configuration\n- {@linkcode BuilderStepOptions} - Partial options for step configuration\n- {@linkcode DEFAULT_SCENARIO_OPTIONS} - Default values for scenario options\n- {@linkcode DEFAULT_STEP_OPTIONS} - Default values for step options\n",
"exports": [
{
"name": "scenario",
"isDefault": false,
"location": {
"filename": "https://jsr.io/@probitas/builder/0.2.6/scenario_builder.ts",
"filename": "https://jsr.io/@probitas/builder/0.2.7/scenario_builder.ts",
"line": 554,
"col": 0,
"byteIndex": 17911
Expand Down Expand Up @@ -102,7 +102,7 @@
"name": "BuilderStepContext",
"isDefault": false,
"location": {
"filename": "https://jsr.io/@probitas/builder/0.2.6/types.ts",
"filename": "https://jsr.io/@probitas/builder/0.2.7/types.ts",
"line": 40,
"col": 0,
"byteIndex": 1237
Expand Down Expand Up @@ -163,7 +163,7 @@
"doc": "Result from the previous step.\n\nFully typed based on what the previous step returned.\nFor the first step, this is `unknown`."
},
"location": {
"filename": "https://jsr.io/@probitas/builder/0.2.6/types.ts",
"filename": "https://jsr.io/@probitas/builder/0.2.7/types.ts",
"line": 51,
"col": 2,
"byteIndex": 1578
Expand All @@ -188,7 +188,7 @@
"doc": "All accumulated results as a typed tuple.\n\nAllows accessing any previous result by index:\n```ts\nctx.results[0] // First step's result\nctx.results[1] // Second step's result\n```"
},
"location": {
"filename": "https://jsr.io/@probitas/builder/0.2.6/types.ts",
"filename": "https://jsr.io/@probitas/builder/0.2.7/types.ts",
"line": 62,
"col": 2,
"byteIndex": 1828
Expand All @@ -213,7 +213,7 @@
"doc": "Named resources registered with `.resource()`.\n\nResources are typed based on their registration:\n```ts\n.resource(\"db\", () => createDbConnection())\n.step((ctx) => ctx.resources.db.query(...))\n```"
},
"location": {
"filename": "https://jsr.io/@probitas/builder/0.2.6/types.ts",
"filename": "https://jsr.io/@probitas/builder/0.2.7/types.ts",
"line": 73,
"col": 2,
"byteIndex": 2093
Expand Down Expand Up @@ -331,7 +331,7 @@
"name": "BuilderStepFunction",
"isDefault": false,
"location": {
"filename": "https://jsr.io/@probitas/builder/0.2.6/types.ts",
"filename": "https://jsr.io/@probitas/builder/0.2.7/types.ts",
"line": 102,
"col": 0,
"byteIndex": 2907
Expand Down Expand Up @@ -551,7 +551,7 @@
"name": "BuilderStepDefinition",
"isDefault": false,
"location": {
"filename": "https://jsr.io/@probitas/builder/0.2.6/types.ts",
"filename": "https://jsr.io/@probitas/builder/0.2.7/types.ts",
"line": 124,
"col": 0,
"byteIndex": 3682
Expand Down Expand Up @@ -613,7 +613,7 @@
"doc": "Step function to execute"
},
"location": {
"filename": "https://jsr.io/@probitas/builder/0.2.6/types.ts",
"filename": "https://jsr.io/@probitas/builder/0.2.7/types.ts",
"line": 131,
"col": 2,
"byteIndex": 3922
Expand Down Expand Up @@ -769,5 +769,5 @@
}
}
],
"generatedAt": "2025-12-09T00:26:33.270Z"
"generatedAt": "2025-12-09T20:05:09.738Z"
}
Loading