Part 4: Update the Snapshot
Add a command
Section titled “Add a command”Install pnpm into the snapshot:
export const Golden = Boat.Snapshot("Golden", { run: ["git clone --depth 1 https://github.com/sindresorhus/is ~/repo"], run: ["git clone --depth 1 https://github.com/sindresorhus/is ~/repo", "npm install -g pnpm"],});Deploy the new base
Section titled “Deploy the new base”pnpm alchemy deploybun alchemy deploynpx alchemy deployyarn alchemy deployThe commands changed, so Alchemy runs them all again in a fresh sandbox and saves the result under the same name. The Worker is unchanged and isn’t redeployed.
curl -X POST "$URL/run" -d 'pnpm --version'curl -X POST "$URL/run" -d 'pnpm --version'curl -X POST "$URL/run" -d 'pnpm --version'curl -X POST "$URL/run" -d 'pnpm --version'Running sandboxes keep their disk
Section titled “Running sandboxes keep their disk”A sandbox has its own copy of the disk it started from. Users who already have a sandbox keep it, with their changes and without pnpm. Sandboxes started after the deploy get the new base. To move a user onto it, delete their sandbox; their next request starts a new one from Golden.
Part 5 tests it.