@eutobias/serenojs 0.1.1 → 0.1.2

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/README.md CHANGED
@@ -40,8 +40,8 @@ consumed by any frontend.
40
40
  - **Authentication** — opaque cookie sessions (no JWT), rotating refresh tokens,
41
41
  user management and CSRF protection for unsafe requests.
42
42
  - **Media uploads** — type/size validation, safe file serving and media lists.
43
- - **Backups** — consistent SQLite snapshot plus assets in a single archive, with
44
- restore and an optional periodic scheduler.
43
+ - **Backups** — collection schemas, a consistent SQLite snapshot and assets in
44
+ a single archive, with restore and an optional periodic scheduler.
45
45
 
46
46
  ## Stack / requirements
47
47
 
@@ -121,6 +121,7 @@ export default defineCmsConfig({
121
121
  media: { path: "/media" },
122
122
  files: { path: "/files" },
123
123
  backup: { path: "/backup", enabled: true, intervalHours: 24, keep: 10 },
124
+ schemas: { path: "src/schemas" },
124
125
  db: { path: ".data/admin.db" },
125
126
  });
126
127
  ```
@@ -221,6 +222,7 @@ can render them directly. For localized content, parse the nested values:
221
222
  | `backup.enabled` | `true` | Enable the periodic backup scheduler |
222
223
  | `backup.intervalHours` | `24` | Scheduler interval |
223
224
  | `backup.keep` | `10` | Number of stored backups to keep |
225
+ | `schemas.path` | `"src/schemas"` | Host directory where restore writes the schema modules |
224
226
  | `db.path` | `".data/admin.db"` | SQLite file path |
225
227
 
226
228
  The package also reads these environment variables:
@@ -485,10 +487,12 @@ extensions are always blocked. The default maximum size is 10 MB unless
485
487
  | `PUT` | `/backup` | Restore a raw `.serenojs` archive body |
486
488
  | `DELETE` | `/backup?name=<file>` | Delete a stored backup |
487
489
 
488
- All backup endpoints require authentication. A backup contains a consistent
489
- SQLite snapshot plus files under `public/images` and `public/files`. Restoring
490
+ All backup endpoints require authentication. A backup contains the collection
491
+ schemas (`src/schemas`), a consistent SQLite snapshot plus files under
492
+ `public/images` and `public/files`. Restoring rewrites the schema modules,
490
493
  replaces the live tables in a transaction and rewrites assets; it may invalidate
491
- the current session.
494
+ the current session. Backups created by older versions without embedded schemas
495
+ have their descriptors reconstructed from the database tables.
492
496
 
493
497
  ## API examples
494
498