very-express 0.8.3 → 0.8.5
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/AGENTS.md +21 -3
- package/dist/index.js +890 -396
- package/dist/templates/_middlewares/Authentication.ts +49 -32
- package/dist/templates/_middlewares/UserContext.ts +1 -18
- package/dist/templates/_projectSettings/env +14 -0
- package/dist/templates/_projectSettings/package.json +1 -0
- package/dist/templates/_routes/FirebaseAuthUI.gen.ts +20 -0
- package/dist/templates/_routes/LoginUI.ts +484 -4
- package/dist/templates/_services/MongooseRepositoryAdapter.ts +67 -5
- package/dist/templates/_services/TypeOrmRepositoryAdapter.ts +70 -4
- package/dist/templates/_services/oauth/OAuthProfileMap.ts +27 -8
- package/dist/templates/_services/oauth/OAuthStrategyService.ts +5 -5
- package/dist/templates/_types/auth.ts +27 -0
- package/dist/templates/_types/vex/VexRepository.ts +21 -0
- package/dist/templates/jsonSchema/User.json +8 -1
- package/dist/templates/jsonSchema/UserAuthProfiles.json +13 -5
- package/dist/templates/root/public/js/deleteaccount.js +80 -0
- package/docs/appGenerated/auth.md +83 -22
- package/docs/architecture/authAndRouting.md +9 -2
- package/docs/architecture/databaseTargets.md +1 -1
- package/docs/features/accountDeletion.md +149 -0
- package/docs/features/auditFields.md +2 -32
- package/docs/releaseNote/v0-8-4.md +131 -0
- package/docs/releaseNote/v0-8-5.md +98 -0
- package/docs/superpowers/specs/2026-09-22-usercontext-audit-enforcement-design.md +9 -9
- package/docs/vexJsonSchema.md +11 -1
- package/package.json +1 -1
- package/vex.config.json +4 -1
- /package/docs/{ForeignKey.md → features/ForeignKey.md} +0 -0
- /package/docs/{apiUsage.md → features/apiUsage.md} +0 -0
package/AGENTS.md
CHANGED
|
@@ -67,6 +67,13 @@ Read from `vex.config.json → jsonSchemaDir` (this repo: `./output/jsonSchema`)
|
|
|
67
67
|
- **Auth is the only identity gate.** `UserContext` is established by `Authentication.middleware` from the verified token — there is no separate context middleware, and no generated decorator decides it. Never gate identity on `dataIsolation`: audit fields and ownership filtering are independent features. Use `utils.generator.isAuthEnabled()` when a code path depends on auth being on.
|
|
68
68
|
- **A create that declares `onCreateUserId` with no identity in `UserContext` throws.** Both repository adapters enforce it; `onUpdateUserId` is deliberately not enforced. `dataIsolation` no longer has anything to do with whether the context exists.
|
|
69
69
|
- **Boolean config defaults use `??`, not `||`.** `x || true` swallows an explicit `false`.
|
|
70
|
+
- **Never write to git.** No `git add`, `commit`, `push`, `reset`, `checkout`, `stash`, `rm`, `mv`. The
|
|
71
|
+
working tree is the deliverable and the user reads it with git; changes stay unstaged and
|
|
72
|
+
uncommitted. Reading (`status`, `diff`, `log`, `show`, `grep`) is fine.
|
|
73
|
+
- **Read-only mode means troubleshoot.** When the file policy is read-only, diagnose and report. Do not
|
|
74
|
+
attempt the edit, and do not request a wider mode — the user grants it when they want the change.
|
|
75
|
+
- **Only write js-doc/comment when need.** only leave js-doc/comment when things is complex and name does not tell what it does, only write short and clean comment. A comment earns its place only for what the code cannot say: a non-obvious rule, a workaround, a failure mode. If a comment would have to be edited together with the line below it, delete the comment. no history, no restating the signature.
|
|
76
|
+
- **never bump npm package version**
|
|
70
77
|
|
|
71
78
|
## Conventions
|
|
72
79
|
|
|
@@ -94,6 +101,18 @@ Smart caveman. Drop articles, filler, pleasantries, hedging. Fragments fine. Kee
|
|
|
94
101
|
- Code blocks unchanged. Caveman around code, not in code.
|
|
95
102
|
- Error messages quoted exact.
|
|
96
103
|
|
|
104
|
+
## Writing docs
|
|
105
|
+
|
|
106
|
+
A document describes **what is true now**, for a reader who has only this repo. Write the thing, not
|
|
107
|
+
the argument for it.
|
|
108
|
+
|
|
109
|
+
- **State current state, not what it avoids.** purpose docs is to tell behaviour, not history.
|
|
110
|
+
- **Present tense, current code.** No "will", "we decided", "earlier drafts", "on purpose", "deliberately", "was rejected". What the code does is visible in the code; what changed belongs in `docs/releaseNote/`.
|
|
111
|
+
- **Cut the comparison.** "unlike X", "instead of Y", "no longer Z" — describe what the code does, not the road not taken.
|
|
112
|
+
- **No private context.** No other repositories, projects or issue ids. A reader cannot open them, so naming one is noise. Anything learned out there is restated as a fact checkable from here.
|
|
113
|
+
|
|
114
|
+
Only `docs/plan/` (design records) and `docs/releaseNote/` (what changed, and how to migrate) narrate time. Every other document is present tense.
|
|
115
|
+
|
|
97
116
|
## Documentation map
|
|
98
117
|
|
|
99
118
|
This file covers only what every session needs. Deeper material lives in `docs/`:
|
|
@@ -106,12 +125,11 @@ This file covers only what every session needs. Deeper material lives in `docs/`
|
|
|
106
125
|
| [`docs/architecture/databaseTargets.md`](docs/architecture/databaseTargets.md) | mongo vs sql, repository adapter, data isolation, join whitelist |
|
|
107
126
|
| [`docs/architecture/authAndRouting.md`](docs/architecture/authAndRouting.md) | tsoa, auth routes, swagger, RBAC |
|
|
108
127
|
| [`docs/vexJsonSchema.md`](docs/vexJsonSchema.md) | Full JSON Schema reference — `x-documentConfig`, `x-foreignKey`, `x-format`, `x-vexData` |
|
|
109
|
-
| [`docs/apiUsage.md`](docs/apiUsage.md) | API client guide — pagination, search, response format |
|
|
110
|
-
| [`docs/ForeignKey.md`](docs/ForeignKey.md) | FK joins via the API `join` parameter |
|
|
111
128
|
| [`docs/developmentNote.md`](docs/developmentNote.md) | Why no ts-node, esbuild/dist working dir, `FUNC{{ }}` intent |
|
|
112
129
|
| [`docs/CONTRIBUTING.md`](docs/CONTRIBUTING.md) | Setup, branch/PR workflow, PR checklist |
|
|
113
|
-
| [`docs/features/`](docs/features/) | rbac, dataIsolation, filterOperators, joinWhitelist, auditFields |
|
|
130
|
+
| [`docs/features/`](docs/features/) | foreignKey, apiUsage, rbac, dataIsolation, filterOperators, joinWhitelist, auditFields, accountDeletion |
|
|
114
131
|
| [`docs/appGenerated/auth.md`](docs/appGenerated/auth.md) | JWT rolling keys, OAuth2 providers |
|
|
132
|
+
| [`docs/plan/`](docs/plan/) | Design records and implementation plans — the one place that narrates decisions and rejected alternatives |
|
|
115
133
|
| [`docs/roadMap/`](docs/roadMap/) | Released features and version milestones |
|
|
116
134
|
| [`docs/releaseNote/`](docs/releaseNote/) | Per-version release notes |
|
|
117
135
|
|