Skip to content

Commit 8f566b2

Browse files
committed
fix: correct anvil interval mining arg parse and update README
1 parent 58f2026 commit 8f566b2

File tree

8 files changed

+649
-38
lines changed

8 files changed

+649
-38
lines changed

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
minimum-release-age=44640

README.md

Lines changed: 24 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ Pandvil provides a Docker-based testing environment that:
2020
We haven't set up NPM yet, but you can download from GitHub like so:
2121

2222
```bash
23-
# Replace v0.0.13 with whatever version you want
24-
pnpm add -D https://github.com/morpho-org/pandvil/releases/download/v0.0.13/package.tgz
23+
# Replace v0.0.14 with whatever version you want
24+
pnpm add -D https://github.com/morpho-org/pandvil/releases/download/v0.0.14/package.tgz
2525
```
2626

2727
## Setup
@@ -62,22 +62,29 @@ pnpm pandvil build --help
6262

6363
```bash
6464
<<DOC
65-
Run the Pandvil dev server for your app
65+
Usage: pandvil start [options] [command]
66+
67+
Run the Pandvil dev server
68+
69+
Server options:
70+
--port <port> Port to connect to Pandvil dev server (default: 3999)
71+
--ponder-log-level <level> Minimum log level for Ponder (warn | error | info | debug | trace) (default: "warn")
72+
--anvil-interval-mining <interval> Block time (integer seconds) for anvil interval mining, or 'off' (default: 5)
73+
--parent-branch <id> Neon parent branch ID to fork off of (default: "main")
74+
--preserve-ephemeral-branch Whether to preserve the Neon child branch on server shutdown (default: false)
75+
--preserve-schemas Whether to preserve database schemas on instance shutdown (default: false)
76+
--spawn <schemas...> Number of instances to spawn, or variadic instance IDs (default: [])
6677
6778
Options:
68-
--name <name> The ponder app name
69-
--parent-branch <name> The name of the Neon branch to fork off of
70-
--spawn <N> | <name> Spawn N instances on startup (if integer), or spawn 1 instance of a given name (if string)
71-
--prepare <N> Spawn N instances and wait for backfill, preserving branch on exit for future use
72-
--preserve-ephemeral-branch Tells the server not to delete its Neon branch on shutdown
73-
--preserve-schemas Tells the server not to delete schemas when killing instances
74-
--ponder-log-level <level> "debug" | "trace" | "error" | "warn" | "info" (default: "warn")
75-
--anvil-interval-mining <s> "off" or an integer indicating seconds per block
76-
--port <port> Port to connect to Pandvil dev server (default: "3999")
79+
-h, --help display help for command
80+
81+
Commands:
82+
docker [options] <name>
83+
help [command] display help for command
7784
DOC
7885

79-
pnpm pandvil run \
80-
--name your-ponder-app-name
86+
pnpm pandvil start docker your-ponder-app-name \
87+
--name
8188
--parent-branch some-neon-branch
8289

8390
# Output (example):
@@ -112,8 +119,10 @@ Starting Pandvil container...
112119
> ```
113120
> 2. Take the load off your CI by backfilling in advance:
114121
> ```
115-
> pnpm pandvil run --name your-ponder-app-name --parent-branch your-ci-branch --prepare 10
122+
> pnpm pandvil start docker your-ponder-app-name --parent-branch your-ci-branch --spawn 10 --prepare
116123
> # This prepares 10 instances, but you can prepare more depending on how many independent tests you plan to run!
124+
> # You can also specify exact schema names like so:
125+
> pnpm pandvil start docker your-ponder-app-name --parent-branch your-ci-branch --spawn my-schema-a --spawn my-schema-b --prepare
117126
> ```
118127
> 3. Use the Neon web app to rename the ephemeral branch to something meaningful, like your-ci-branch-bootstrap
119128
> 4. Run your CI!

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@morpho-org/pandvil",
33
"description": "A testing environment for ponder that supports chain forking via anvil",
4-
"version": "0.0.13",
4+
"version": "0.0.14",
55
"author": "Morpho Association <[email protected]>",
66
"contributors": [
77
"Hayden Shively <[email protected]>"
@@ -64,6 +64,7 @@
6464
"eslint-plugin-prettier": "^5.5.3",
6565
"husky": "^9.1.7",
6666
"lint-staged": "^16.1.2",
67+
"neonctl": "^2.15.0",
6768
"prettier": "^3.6.2",
6869
"tsup": "^8.5.0",
6970
"typescript": "^5.8.3",

0 commit comments

Comments
 (0)