spacetime dev hardcodes 'npm run dev' without detecting package manager in existing projects

Description

spacetime dev saves "dev": { "run": "npm run dev" } to spacetime.json, but it always assumes npm regardless of the actual package manager used in the project.

Steps to Reproduce

  1. Create a project using pnpm (with pnpm-lock.yaml and "packageManager": "pnpm@10.28.2" in package.json)
  2. Run spacetime dev
  3. Observe spacetime.json is modified to include "dev": { "run": "npm run dev" }

Expected Behavior

spacetime dev should detect the project's package manager by checking (in priority order):

  1. packageManager field in package.json (corepack standard)
  2. Lock file presence: pnpm-lock.yaml → pnpm, yarn.lock → yarn, bun.lockb → bun, package-lock.json → npm
  3. Fall back to npm only if none of the above are found

The saved command should use the detected package manager: pnpm run dev, yarn dev, bun run dev, etc.

Actual Behavior

Always saves "npm run dev" regardless of the package manager. In a pnpm monorepo, this causes npm to be invoked (which may not have the correct dependencies hoisted) or fails entirely if npm is not the intended package manager.

Additional Context

  • SpacetimeDB CLI version: v2.1.0
  • The --server-only flag correctly skips client command detection, which is the current workaround
  • This also affects initial project scaffolding via spacetime dev --template

Workaround

Use --server-only and run the client dev server separately, or manually edit spacetime.json after each run (since spacetime dev overwrites it on every invocation).