express-file-cluster 0.7.0 → 0.7.1
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 +1 -1
- package/dist/docs/getting-started/index.md +2 -1
- package/dist/docs/getting-started/project-structure.md +1 -1
- package/dist/docs/guides/generated-portals.md +1 -1
- package/dist/docs/guides/rbac.md +1 -1
- package/dist/docs/index.md +1 -1
- package/dist/docs/skills/SKILL.md +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
EFC is an opinionated backend framework built on Express. Drop files in `src/api/` and they become routes. Every CPU core serves traffic automatically. Heavy work goes to a queue-backed task subsystem so requests stay fast.
|
|
6
6
|
|
|
7
|
-
> **Status: v0.7.
|
|
7
|
+
> **Status: v0.7.1 (Beta).** Router (incl. catch-all/optional segments and request validation), clustering, auth, structured logging, `defineModel` on MongoDB and PostgreSQL (types inferred from the schema), PostgreSQL-native `defineTable` with Prisma-style queries and relations (foreign keys, many-to-many, `include`, relation filters, nested writes), query logging, BullMQ and pg-boss tasks with cron, and migrations are all implemented.
|
|
8
8
|
|
|
9
9
|
---
|
|
10
10
|
|
|
@@ -20,6 +20,7 @@ The interactive wizard walks through:
|
|
|
20
20
|
? Project name: my-api
|
|
21
21
|
? Language: TypeScript | JavaScript
|
|
22
22
|
? Database: MongoDB | PostgreSQL
|
|
23
|
+
? Models: defineTable | defineModel (PostgreSQL only)
|
|
23
24
|
? Authentication strategy: http-only | localStorage
|
|
24
25
|
? Features: (space to toggle)
|
|
25
26
|
◉ Multi-core clustering
|
|
@@ -31,7 +32,7 @@ The interactive wizard walks through:
|
|
|
31
32
|
◯ Mailer
|
|
32
33
|
```
|
|
33
34
|
|
|
34
|
-
|
|
35
|
+
On **PostgreSQL**, models default to [`defineTable`](../api-reference/table.md): PostgreSQL-native, with real foreign keys between the generated models (a user's sessions, invoices, tickets…), `relations` for `include`, and Prisma-style queries in the generated routes. Pick **defineModel** instead for the portable API. On **MongoDB**, models are `defineModel`, which compiles to mongoose. See [Database](../guides/database.md).
|
|
35
36
|
|
|
36
37
|
Depending on what you toggle on, you'll see follow-up questions:
|
|
37
38
|
|
|
@@ -70,7 +70,7 @@ See [Background Tasks](../core-concepts/background-tasks.md).
|
|
|
70
70
|
|
|
71
71
|
## `src/model/` — Data models
|
|
72
72
|
|
|
73
|
-
|
|
73
|
+
Model definitions. On PostgreSQL (by default) they're [`defineTable`](../api-reference/table.md) models — PostgreSQL-native, with foreign keys and `relations` between them — and `src/model/index.ts` imports them all and declares the `Tables` map that types `include`; add new models there. On MongoDB (or with the **defineModel** choice) they're engine-agnostic `defineModel()` models, which compile to mongoose or Drizzle with the same API on both.
|
|
74
74
|
|
|
75
75
|
See [Database Guide](../guides/database.md).
|
|
76
76
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
`create-efc-app`'s **User portal** and **Admin portal** feature options scaffold a large, ready-to-run set of models and routes — everything from auth extras (2FA, sessions, password reset) to admin content management (blogs, FAQs, coupons). This page is the complete inventory, so nothing you didn't ask for shows up as a surprise, and nothing you did enable goes undocumented.
|
|
4
4
|
|
|
5
|
-
> On MongoDB
|
|
5
|
+
> Every model below is real on both databases. On MongoDB they're `defineModel` collections. On PostgreSQL they're [`defineTable`](../api-reference/table.md) models (or `defineModel`, if you picked it) linked by foreign keys — `Session`, `Notification`, `File`, `SupportTicket`, `Subscription`, `Invoice` and `ApiKey` reference `User` (deleted with it), `Subscription` references `Plan`, `Invoice` its `Subscription`, `AuditLog`, `Blog` and assigned tickets an `Admin` (cleared when it's deleted), and `Category` its parent — with matching `relations` (`user.sessions`, `plan.subscriptions`, `category.children`…) for `include`. A reference stays a plain id when its target model isn't generated. See [Database](./database.md).
|
|
6
6
|
|
|
7
7
|
---
|
|
8
8
|
|
package/dist/docs/guides/rbac.md
CHANGED
|
@@ -53,7 +53,7 @@ Both approaches produce the same 401/403 behavior — RBAC-on just centralizes t
|
|
|
53
53
|
|
|
54
54
|
### `Role` model
|
|
55
55
|
|
|
56
|
-
A `src/model/Role.ts` model is created (
|
|
56
|
+
A `src/model/Role.ts` model is created (`defineModel` on MongoDB, `defineTable` on PostgreSQL by default).
|
|
57
57
|
|
|
58
58
|
### Admin role management routes
|
|
59
59
|
|
package/dist/docs/index.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
**express-file-cluster (EFC)** is an opinionated backend framework built on Express. It removes routing ceremony, saturates every CPU core automatically, and ships a production-grade background-task subsystem — all from a single `ignite()` call.
|
|
4
4
|
|
|
5
|
-
> **Status: v0.7.
|
|
5
|
+
> **Status: v0.7.1 — Beta.** File-based routing (incl. catch-all and optional segments), request validation, clustering, auth, structured logging, MongoDB and PostgreSQL models with types inferred from the schema, PostgreSQL-native `defineTable` (Prisma-style queries and relations: foreign keys, many-to-many, `include`, relation filters, nested writes), query logging, BullMQ and pg-boss tasks with cron and dead-letter tooling, and migrations are all implemented.
|
|
6
6
|
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -37,7 +37,7 @@ Load **only** the module the work points to. Each is self-contained.
|
|
|
37
37
|
docs/ ← full documentation
|
|
38
38
|
```
|
|
39
39
|
|
|
40
|
-
## Status (v0.7.
|
|
40
|
+
## Status (v0.7.1 — Beta, Phase 2 complete + defineTable with relations)
|
|
41
41
|
|
|
42
42
|
Implemented: file-based router (incl. `[[id]]`, `[...slug]`, `[[...slug]]`), request validation (`export const schema`, Standard Schema), multi-core clustering with graceful shutdown, http-only + localStorage auth, structured logging (pino, request IDs), `defineModel` on MongoDB (mongoose) **and** PostgreSQL (Drizzle) with validation, query options, bulk ops, transactions, `sync()`/`drop()`, PostgreSQL-native `defineTable` (Prisma-style queries, foreign keys, many-to-many, `include`, relation filters, nested writes), query logging (`logging.queries`), BullMQ **and** pg-boss task backends with cron schedules and dead-letter CLI, worker_threads for CPU-bound tasks, migrations/seeds/studio (`efc db`), full CLI.
|
|
43
43
|
|
package/package.json
CHANGED