spfn 0.2.0-beta.54 → 0.2.0-beta.57

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +8 -4
  2. package/dist/index.js +717 -646
  3. package/package.json +21 -17
package/README.md CHANGED
@@ -61,7 +61,9 @@ Tailwind, import alias `@/*`, no ESLint), sets up SVGR icons, then runs `init`.
61
61
 
62
62
  Adds SPFN to an existing Next.js project: copies the server templates, wires the RPC
63
63
  proxy route, Docker files, deploy + codegen config, updates `package.json` scripts/deps,
64
- and installs. See [Scaffold structure](#scaffold-structure) for what lands on disk.
64
+ and installs. With auth enabled it also adds the `/_auth/:path*` → SPFN API rewrite to
65
+ `next.config` (OAuth callbacks return to the app origin; merged manually if a `rewrites()`
66
+ already exists). See [Scaffold structure](#scaffold-structure) for what lands on disk.
65
67
 
66
68
  | Option | Description |
67
69
  |--------|-------------|
@@ -165,7 +167,7 @@ loaded `.env` chain.
165
167
  | Subcommand | Description |
166
168
  |------------|-------------|
167
169
  | `db generate` (`g`) | Generate migrations from schema changes (timestamp-prefixed) |
168
- | `db push` | Apply schema to DB. Safe by default; destructive changes need confirmation. `--force` applies destructive changes, `--dry-run` previews |
170
+ | `db push` | Diff with Drizzle Kit's current PostgreSQL engine and apply the selected DDL atomically. Destructive changes need confirmation; `--force` applies them, `--dry-run` previews |
169
171
  | `db migrate` (`m`) | Run pending migrations. `--with-backup` snapshots first |
170
172
  | `db studio` | Open Drizzle Studio. `-p, --port` (auto-finds a free port) |
171
173
  | `db check` | Verify the database connection |
@@ -280,6 +282,7 @@ spfn.config.js # deployment config (subdomain/region/domai
280
282
  docker-compose.yml # Postgres + Redis (dev)
281
283
  docker-compose.production.yml
282
284
  Dockerfile, .dockerignore
285
+ next.config.ts # patched when auth is enabled: /_auth/:path* rewrite → SPFN API
283
286
  .env.example # committed reference — every key, placeholder values
284
287
  .env.local # generated, gitignored (Next.js-facing URLs)
285
288
  .env.server # generated, gitignored (server secrets: DB, cache)
@@ -376,8 +379,9 @@ type ships from `spfn` (`@type {import('spfn').SpfnConfig}`).
376
379
  - **`spfn start` needs a prior `spfn build`.** It hard-fails without `.spfn/server`,
377
380
  `.spfn/prod-server.mjs`, and `.next`.
378
381
  - **Destructive DB commands are guarded.** `db drop` double-confirms (and verifies the
379
- target); `db push` applies additive changes but withholds destructive ones unless
380
- `--force`/confirmed. Prefer `db generate` + `db migrate` for production; `db push` is dev-only.
382
+ target); `db push` applies the selected statements in one transaction and withholds
383
+ destructive ones unless `--force`/confirmed. Prefer `db generate` + `db migrate` for
384
+ production; `db push` is dev-only.
381
385
  - **`spfn add` requires a scoped package name** (must contain `/`) and only applies
382
386
  migrations when `DATABASE_URL` is set — otherwise it skips with a hint.
383
387
  - **Package manager is auto-detected from lockfiles.** If detection is wrong (e.g. mixed