Skip to content

Commit a80ee5d

Browse files
Copilotpmcelhaney
andauthored
fix leftover 'apply script' wording in ADR and use realistic examples in repl.md table
Agent-Logs-Url: https://github.com/counterfact/api-simulator/sessions/b37bee49-842a-4c64-ad79-e29c8cdd03bb Co-authored-by: pmcelhaney <51504+pmcelhaney@users.noreply.github.com>
1 parent e4e8757 commit a80ee5d

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

docs/adr/001-apply-command-with-function-injection.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Three designs were proposed as working documents in `.github/issue-proposals/`:
2727

2828
**Solution 1 (Minimalist Function Injection) is selected.**
2929

30-
An apply script is a TypeScript file with one or more named function exports. When `.scenario <path>` is run, Counterfact splits the argument on `/`, uses the last segment as the function name and the rest as the file path (relative to `<basePath>/repl/`), dynamically imports the module, and calls the named function with a live `ApplyContext` (`$`) object:
30+
A scenario script is a TypeScript file with one or more named function exports. When `.scenario <path>` is run, Counterfact splits the argument on `/`, uses the last segment as the function name and the rest as the file path (relative to `<basePath>/repl/`), dynamically imports the module, and calls the named function with a live `ApplyContext` (`$`) object:
3131

3232
```ts
3333
// repl/sold-pets.ts

docs/features/repl.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,9 @@ For more complex setups you can automate REPL interactions by writing _scenario
6868

6969
| Command | File | Function |
7070
|---|---|---|
71-
| `.scenario foo` | `scenarios/index.ts` | `foo` |
72-
| `.scenario foo/bar` | `scenarios/foo.ts` | `bar` |
73-
| `.scenario foo/bar/baz` | `scenarios/foo/bar.ts` | `baz` |
71+
| `.scenario soldPets` | `scenarios/index.ts` | `soldPets` |
72+
| `.scenario pets/resetAll` | `scenarios/pets.ts` | `resetAll` |
73+
| `.scenario pets/orders/pending` | `scenarios/pets/orders.ts` | `pending` |
7474

7575
A scenario function receives a single argument with `{ context, loadContext, routes, route }`:
7676

0 commit comments

Comments
 (0)