Skip to content

Commit

Permalink
Changeset
Browse files Browse the repository at this point in the history
  • Loading branch information
davidkpiano committed Jul 6, 2024
1 parent 96b5dac commit 6f7b65a
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .changeset/neat-beans-wave.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
"@statelyai/inspect": minor
---

Added new options `sanitizeContext` and `sanitizeEvent` to the inspector configuration. These options allow users to sanitize sensitive data from the context and events before they are sent to the inspector, and also to remove non-serializable data.

Example usage:

```typescript
const inspector = createInspector({
sanitizeContext: (context) => {
// Remove sensitive data from context
const { password, ...safeContext } = context;
return safeContext;
},
sanitizeEvent: (event) => {
// Remove sensitive data from event
if (event.type === 'SUBMIT_FORM') {
const { creditCardNumber, ...safeEvent } = event;
return safeEvent;
}
return event;
}
});

0 comments on commit 6f7b65a

Please sign in to comment.