@zerotal/arch 1.15.2 → 1.15.3

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.
package/docs/about.md CHANGED
@@ -82,12 +82,11 @@ Add `FlowProvider`. The provider list is the feature manifest for your app.
82
82
  # in your project's parent directory
83
83
  bun create zerotal my-app # choose: API, Flow, React, Vue, or Minimal
84
84
  cd my-app
85
- cp .env.example .env # APP_KEY is pre-generated for you
86
85
  bun zt migrate # create the database schema (API template)
87
86
  bun zt dev # dev server + hot reload at http://localhost:3000
88
87
  ```
89
88
 
90
- The scaffolder writes a fresh `APP_KEY` into `.env.example` and installs
89
+ The scaffolder writes a fresh `APP_KEY` into `.env` and installs
91
90
  dependencies. Pick a template at the prompt:
92
91
 
93
92
  - **API** — JSON REST API (core + ORM + auth + validation + testing). The default.
package/docs/changelog.md CHANGED
@@ -27,6 +27,50 @@ the section for every version you cross and apply its migration notes, not only
27
27
  majors. [Releases and versioning](/docs/support-policy#releases-and-versioning) explains
28
28
  when that carve-out ends.
29
29
 
30
+ ## 1.15.3 — 2026-10-23
31
+
32
+ A patch for the first ten minutes with Zerotal. Scaffolding each starter, following its README
33
+ and running it, the way a newcomer would, turned up four things that did not work as written,
34
+ and a fifth where two guides told you to throw away your own key. All five are fixed here.
35
+
36
+ Nothing here breaks. Safe to take directly.
37
+
38
+ ### Fixed
39
+
40
+ - **A new app's README now says what it takes to run** (`create-zerotal`). The scaffolder
41
+ printed `bun zt migrate` (or `bun zt db:seed` for the admin starter) before `bun zt dev`,
42
+ while every README said `bun install` then `bun run dev`. The README is the copy that stays,
43
+ and following it on the API, Flow, React or Vue starter reached a running app with no `users`
44
+ table. Both are generated from one list now, so they cannot disagree again.
45
+
46
+ - **The admin starter answers `/`.** The dev server prints `http://localhost:3000`, and the app
47
+ had nothing there: a bare JSON `E_NOT_FOUND`, with no hint that the panel is at `/admin`. The
48
+ bare origin now redirects to it.
49
+
50
+ - **A new API starter passes `zt doctor`.** Its `config/app.ts` was a bare object where the other
51
+ five starters use `AppConfig`, which is what fills `allowedOrigins` from `url`. The doctor failed
52
+ an app with no code of its own, and told you to set a `url` that was already set. The config is
53
+ wrapped in `AppConfig` now, and reads `APP_KEY` the way the other starters do: it must be set.
54
+
55
+ - **The Flow and React starters create `users.remember_token`.** Their `User` uses
56
+ `Authenticatable`, but the migration did not create the column, so `zt doctor` failed between
57
+ `migrate` and the first dev boot, until the boot step added it. The migration creates it now.
58
+
59
+ - **[Getting Started](/docs/getting-started) and [About Zerotal](/docs/about) no longer tell you
60
+ to overwrite your key.** Both said to run `cp .env.example .env` and that the ready-made `APP_KEY` lives in
61
+ `.env.example`. The scaffolder writes the real key into `.env` and only a placeholder into the
62
+ example, so following them replaced a generated key with the placeholder. Both now describe
63
+ what the scaffolder writes.
64
+
65
+ ### Changed
66
+
67
+ - **New apps start on a tilde range.** `bun create zerotal` wrote `^X.Y.Z` into every new app's
68
+ `zerotal` and `@zerotal/*` dependencies. Under the [versioning scheme](/docs/upgrade#versioning)
69
+ a minor is where a break lands, so a caret let the app's next install cross one without anyone
70
+ reading its notes. It writes `~X.Y.Z` now, which takes every patch and stops at the minor.
71
+ Apps already scaffolded keep what they have; change `^` to `~` in their `package.json` to get
72
+ the same protection.
73
+
30
74
  ## 1.15.2 — 2026-10-23
31
75
 
32
76
  A patch, and if you run Bun 1.4.4 or later it is the one to take: that Bun stopped accepting the
package/docs/database.md CHANGED
@@ -199,7 +199,7 @@ The `ManualTransaction` handle returned by `DB.beginTransaction()`:
199
199
  | `t.commit()` | Commit and release the transaction |
200
200
  | `t.rollback()` | Roll back and release the transaction |
201
201
 
202
- > **Warning** — Prefer `DB.transaction(callback)`. Manual transactions require careful error handling to avoid leaving connections open.
202
+ > **Warning** — Prefer `DB.transaction(callback)`. A handle you never commit or roll back keeps its connection inside the transaction: on SQLite every later transaction fails with "cannot start a transaction within a transaction", and on a pool it is a connection that never comes back. Settle the handle on every path. A `finally` that calls `t.rollback()` is safe after a commit, where it does nothing.
203
203
 
204
204
  ## Raw queries with DB
205
205
 
@@ -152,20 +152,17 @@ no manual registration.
152
152
 
153
153
  ## Environment setup
154
154
 
155
- The scaffolder generates `.env.example` with a ready-made `APP_KEY`. Copy it to
156
- `.env`:
157
-
158
- ```bash
159
- # in your project root
160
- cp .env.example .env
161
- ```
155
+ The scaffolder writes a `.env` with a freshly generated `APP_KEY`, so a new app boots
156
+ straight away; there is nothing to copy. `.env` is git-ignored. `.env.example` is the
157
+ copy you commit, and it holds placeholders on purpose: on another machine, copy it to
158
+ `.env` and run `bun zt key:generate` to fill the key in.
162
159
 
163
160
  ```ini
164
161
  # .env
165
162
  APP_ENV=development
166
- APP_KEY=base64:… # pre-generated; rotate with `bun zt key:generate`
163
+ APP_KEY=… # generated for you; rotate with `bun zt key:generate`
167
164
  DATABASE_URL=./database/db.sqlite
168
- SESSION_SECRET=change-me-in-production
165
+ SESSION_SECRET=… # API template: generated for you; set your own before deploying
169
166
  ```
170
167
 
171
168
  The database is configured with a single **`DATABASE_URL`** — SQLite uses a file
package/docs/upgrade.md CHANGED
@@ -40,6 +40,8 @@ something, and puts the work where it is useful: reading the notes for each mino
40
40
  > hold exactly where you put it — a release you have certified, a machine you cannot
41
41
  > re-test quickly — pin the exact version with no range operator at all.
42
42
 
43
+ > **Note** — `bun create zerotal` writes a tilde range into new apps for this reason. An app scaffolded earlier has a caret: change `^` to `~` in its `package.json` to get the same protection.
44
+
43
45
  > **Warning** — always upgrade the `@zerotal/*` packages together. Mixing versions across core, ORM, and feature packages leads to type and runtime mismatches.
44
46
 
45
47
  ## Upgrade steps
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zerotal/arch",
3
- "version": "1.15.2",
3
+ "version": "1.15.3",
4
4
  "license": "MIT",
5
5
  "maturity": "stable",
6
6
  "private": false,
@@ -35,11 +35,11 @@
35
35
  "typecheck": "tsc --noEmit"
36
36
  },
37
37
  "dependencies": {
38
- "@zerotal/core": "1.15.2"
38
+ "@zerotal/core": "1.15.3"
39
39
  },
40
40
  "devDependencies": {
41
41
  "typescript": "^5.8.0",
42
- "@zerotal/orm": "1.15.2"
42
+ "@zerotal/orm": "1.15.3"
43
43
  },
44
44
  "description": "The Zerotal agent surface — an MCP server that hands coding agents the framework's machine-readable truth: exact API signatures, live routes and schema, version-matched docs, and `zt doctor`.",
45
45
  "keywords": [