@nxgt/janus 0.2.1 → 0.2.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/docs/guide/adapters.md +2 -0
- package/docs/guide/vocabulary.md +1 -1
- package/docs/roadmap.md +18 -16
- package/package.json +1 -1
package/docs/guide/adapters.md
CHANGED
|
@@ -299,3 +299,5 @@ Types: `ConformanceHarness`, `OpenedStores`, `StoreFaults`, `ConformanceCase`,
|
|
|
299
299
|
- [Errors](errors.md) — `StoreFailure`, `StoreConflict` and the rule behind them
|
|
300
300
|
- [Vocabulary](vocabulary.md) — ids, cursors and `invalidCursor`
|
|
301
301
|
- `@nxgt/janus-mongo` — an adapter that passes both suites against a real mongod, outages included
|
|
302
|
+
- `@nxgt/janus-drizzle` — both suites on PostgreSQL 17 and PGlite
|
|
303
|
+
- `@nxgt/janus-redis` — the sessions and one-time tokens cases on Redis 7.4
|
package/docs/guide/vocabulary.md
CHANGED
|
@@ -78,7 +78,7 @@ either finds this row.
|
|
|
78
78
|
| --- | --- | --- |
|
|
79
79
|
| **store** | Where a side keeps its data, behind a port. The **identity stores** are `users`, `sessions` and `tokens`; the **relation store** holds the tuples | "database", "repository" |
|
|
80
80
|
| **port** | The interface a store implements: `JanusStores` for the identity stores — named after the package, not the side — and `RelationStore` | "driver" |
|
|
81
|
-
| **adapter** | A package implementing the ports for one database: `@nxgt/janus-mongo`. What its `create…Adapter(db)` answers is its stores, keyed as `janus()` takes them — `{ store, relations }` | "plugin", "connector" |
|
|
81
|
+
| **adapter** | A package implementing the ports for one database: `@nxgt/janus-mongo`, `@nxgt/janus-drizzle`, `@nxgt/janus-redis`. What its `create…Adapter(db)` answers is its stores, keyed as `janus()` takes them — `{ store, relations }` | "plugin", "connector" |
|
|
82
82
|
| **integration** | A package fitting Janus into one web framework or one observability library: `@nxgt/janus-hono`, `@nxgt/janus-telemetry`. It implements no port | "plugin", "adapter" |
|
|
83
83
|
| **kit** | A package that opens the connections and wires adapters and integrations into one object for an application: `@nxgt/janus-kit`'s `connectKit` answers `{ auth, access, db, redis, ping, close }`. It implements no port, and `janus()` and `permissions()` are still written by the application | "framework", "starter" |
|
|
84
84
|
|
package/docs/roadmap.md
CHANGED
|
@@ -5,17 +5,7 @@ dates here, and the version something shipped in is the only number.
|
|
|
5
5
|
|
|
6
6
|
## Now
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
on Drizzle: both sides over one database, the tables in your own drizzle-kit
|
|
10
|
-
migrations. Built, not yet published.
|
|
11
|
-
- **Tracing and an audit trail** — in a package of its own,
|
|
12
|
-
`@nxgt/janus-telemetry`: a span per flow and per permission check, and the
|
|
13
|
-
security events worth keeping, never a login, a password, a session token
|
|
14
|
-
or a one-time token. Built, not yet published.
|
|
15
|
-
- **A Redis adapter for sessions and one-time tokens** — in a package of its
|
|
16
|
-
own, `@nxgt/janus-redis`: both are read on every request and ephemeral, so
|
|
17
|
-
they live in Redis, expired by Redis itself, while users stay in another
|
|
18
|
-
store. Built, not yet published.
|
|
8
|
+
Nothing yet.
|
|
19
9
|
|
|
20
10
|
## Next
|
|
21
11
|
|
|
@@ -92,7 +82,19 @@ dates here, and the version something shipped in is the only number.
|
|
|
92
82
|
|
|
93
83
|
## Shipped
|
|
94
84
|
|
|
95
|
-
|
|
85
|
+
Each entry names the version it came in.
|
|
86
|
+
|
|
87
|
+
- **The adapters and the kit, each at its first release, v0.1.0, beside
|
|
88
|
+
`@nxgt/janus` 0.2.2** —
|
|
89
|
+
[`@nxgt/janus-drizzle`](https://www.npmjs.com/package/@nxgt/janus-drizzle),
|
|
90
|
+
both sides over one PostgreSQL database on Drizzle;
|
|
91
|
+
[`@nxgt/janus-redis`](https://www.npmjs.com/package/@nxgt/janus-redis),
|
|
92
|
+
sessions and one-time tokens in Redis, expired by Redis itself;
|
|
93
|
+
[`@nxgt/janus-telemetry`](https://www.npmjs.com/package/@nxgt/janus-telemetry),
|
|
94
|
+
a span per flow and per permission check, and the security events worth an
|
|
95
|
+
audit trail, never a login, a password, a session token or a one-time token;
|
|
96
|
+
and [`@nxgt/janus-kit`](https://www.npmjs.com/package/@nxgt/janus-kit), all
|
|
97
|
+
of it wired in one call.
|
|
96
98
|
|
|
97
99
|
- **The model's keys read `related` and `permits`** — Keto's OPL words: an
|
|
98
100
|
object type declares `related: { members: ['staff', 'team#members'] }` and
|
|
@@ -100,17 +102,17 @@ The first public release, v0.1.
|
|
|
100
102
|
`relations` and `permissions` as keys are refused, by the compiler and by
|
|
101
103
|
`defineModel`, with a message naming the new key —
|
|
102
104
|
`types.team.relations is now related: rename the key`. The `permissions()`
|
|
103
|
-
function and `janus({ relations })` keep their names. —
|
|
105
|
+
function and `janus({ relations })` keep their names. — v0.2.0
|
|
104
106
|
- **`LOGIN_TAKEN` no longer quotes the login in its message**, in the memory
|
|
105
107
|
store and in both adapters; `error.login` still names it, and the
|
|
106
|
-
conformance suite checks it. —
|
|
108
|
+
conformance suite checks it. — v0.2.0
|
|
107
109
|
- **The conformance suite accepts a store with its own expiry** — a store
|
|
108
110
|
that drops a lapsed session at once, as a Redis TTL does, passes
|
|
109
|
-
`sessions.deleteUser`; one that still holds it must count it. —
|
|
111
|
+
`sessions.deleteUser`; one that still holds it must count it. — v0.2.0
|
|
110
112
|
- **A NUL character or a lone surrogate never reaches a store** — refused in
|
|
111
113
|
fields with `USER_INVALID` on every adapter, rather than `STORE_FAILED` on
|
|
112
114
|
PostgreSQL alone; a login holding one is nobody's. The conformance suite
|
|
113
|
-
holds every adapter to round-tripping every other character. —
|
|
115
|
+
holds every adapter to round-tripping every other character. — v0.2.1
|
|
114
116
|
|
|
115
117
|
- **A Hono integration** — [`@nxgt/janus-hono`](https://www.npmjs.com/package/@nxgt/janus-hono):
|
|
116
118
|
the session middleware, the cookie, a route guarded by a permission,
|