@brizz/sdk 0.1.56 → 0.1.58
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 +11 -0
- package/dist/{chunk-VY6GEZSP.cjs → chunk-JGATEWJB.cjs} +1 -1
- package/dist/{chunk-AWYGZM6I.js → chunk-LXRU77IM.js} +1 -1
- package/dist/chunk-MXKQQ6AU.js +984 -0
- package/dist/chunk-XGD5HD5W.cjs +984 -0
- package/dist/index.cjs +61 -925
- package/dist/index.js +52 -916
- package/dist/{mcp-WIKXDZIJ.js → mcp-2JWY4GGY.js} +1 -1
- package/dist/{mcp-YFR4MUPD.cjs → mcp-YNOK6OX5.cjs} +11 -11
- package/dist/session.cjs +78 -0
- package/dist/session.js +78 -0
- package/dist/types/cjs/internal/log/emit.d.ts +8 -0
- package/dist/types/cjs/internal/log/logging.d.ts +2 -2
- package/dist/types/cjs/internal/trace/session.d.ts +2 -1
- package/dist/types/cjs/session.d.ts +6 -0
- package/dist/types/esm/internal/log/emit.d.ts +8 -0
- package/dist/types/esm/internal/log/logging.d.ts +2 -2
- package/dist/types/esm/internal/trace/session.d.ts +2 -1
- package/dist/types/esm/session.d.ts +6 -0
- package/package.json +24 -13
package/README.md
CHANGED
|
@@ -412,6 +412,17 @@ await startSession('session-123', async () => {
|
|
|
412
412
|
getActiveSession(); // undefined
|
|
413
413
|
```
|
|
414
414
|
|
|
415
|
+
### Lightweight Session Helpers
|
|
416
|
+
|
|
417
|
+
`@brizz/sdk/session` exports the session and context helpers without loading the rest of the SDK,
|
|
418
|
+
which keeps module-heavy setups such as Jest test suites fast and small:
|
|
419
|
+
|
|
420
|
+
```typescript
|
|
421
|
+
import { callWithSessionId, getActiveSession } from '@brizz/sdk/session';
|
|
422
|
+
```
|
|
423
|
+
|
|
424
|
+
Keep `Brizz.initialize()` on the main `@brizz/sdk` entry at startup. Nothing is sent until it runs.
|
|
425
|
+
|
|
415
426
|
### Function Wrapper Pattern
|
|
416
427
|
|
|
417
428
|
For simpler cases where you just need to tag traces with a session ID:
|