@nxgt/janus-telemetry 0.3.2 → 0.3.4
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 +17 -1
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -33,7 +33,8 @@ bun add @nxgt/janus-telemetry @nxgt/janus @nxgt/telemetry
|
|
|
33
33
|
bun add -d typescript
|
|
34
34
|
```
|
|
35
35
|
|
|
36
|
-
Every peer is required: `@nxgt/janus`
|
|
36
|
+
Every peer is required: `@nxgt/janus` 0.8 (the exact range is in
|
|
37
|
+
`peerDependencies`), `@nxgt/telemetry` (`>=0.2.1 <1`, any 0.x from 0.2.1) and
|
|
37
38
|
`typescript` (6). `@nxgt/janus` and `@nxgt/telemetry` are **peers**: one copy of `@nxgt/janus`, so
|
|
38
39
|
`instanceof JanusError` holds, and one of `@nxgt/telemetry`, so there is one
|
|
39
40
|
current span. Like `@nxgt/janus`, it expects `"moduleResolution": "bundler"`.
|
|
@@ -121,6 +122,21 @@ when the flow knows them — `janus.signOut` carries neither:
|
|
|
121
122
|
- [Troubleshooting](docs/troubleshooting.md) — what you see, why, and the fix
|
|
122
123
|
- [Roadmap](docs/roadmap.md) — what is next, and what is not planned
|
|
123
124
|
|
|
125
|
+
## Type safety, counted
|
|
126
|
+
|
|
127
|
+
Six plausible mistakes are refused by the compiler, each with a
|
|
128
|
+
`@ts-expect-error` case in `test/types/instrument.ts`. Three are refusals of
|
|
129
|
+
`@nxgt/janus` that must survive instrumenting, since an instrumented
|
|
130
|
+
instance is typed as the one it wraps:
|
|
131
|
+
- a sign-in without its password;
|
|
132
|
+
- a user type the instance does not have;
|
|
133
|
+
- a permission the model does not declare.
|
|
134
|
+
|
|
135
|
+
Three are this package's own:
|
|
136
|
+
- something other than a `janus()` instance passed to `instrumentJanus`;
|
|
137
|
+
- a `permissions()` instance passed to `instrumentJanus`;
|
|
138
|
+
- a `janus()` instance passed to `instrumentPermissions`.
|
|
139
|
+
|
|
124
140
|
## Licence
|
|
125
141
|
|
|
126
142
|
MIT
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nxgt/janus-telemetry",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.4",
|
|
4
4
|
"description": "Observability for @nxgt/janus on @nxgt/telemetry: a span per flow and per permission check, and the security events worth an audit trail — never a login, an e-mail, a password, a session token, a one-time token or a session id",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -49,14 +49,14 @@
|
|
|
49
49
|
]
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
|
-
"@nxgt/janus": "^0.8.
|
|
52
|
+
"@nxgt/janus": "^0.8.6",
|
|
53
53
|
"@nxgt/telemetry": "0.2.1",
|
|
54
54
|
"@types/bun": "^1.4.2",
|
|
55
55
|
"zod": "^4.6.5"
|
|
56
56
|
},
|
|
57
57
|
"peerDependencies": {
|
|
58
|
-
"@nxgt/janus": "^0.8.
|
|
59
|
-
"@nxgt/telemetry": "
|
|
58
|
+
"@nxgt/janus": "^0.8.6",
|
|
59
|
+
"@nxgt/telemetry": ">=0.2.1 <1",
|
|
60
60
|
"typescript": "^6.0.3"
|
|
61
61
|
}
|
|
62
62
|
}
|