@statelyai/inspect
Advanced tools
Comparing version 0.2.3 to 0.2.4
# @statelyai/inspect | ||
## 0.2.4 | ||
### Patch Changes | ||
- [#18](https://github.com/statelyai/inspect/pull/18) [`7d569b1`](https://github.com/statelyai/inspect/commit/7d569b111207d2f9999f2cfa9e270b0c93dc9b9c) Thanks [@davidkpiano](https://github.com/davidkpiano)! - Do not crash on unhandled inspection event type | ||
## 0.2.3 | ||
@@ -4,0 +10,0 @@ |
@@ -69,3 +69,3 @@ "use strict"; | ||
name: "@statelyai/inspect", | ||
version: "0.2.3", | ||
version: "0.2.4", | ||
description: "Inspection utilities for state, actors, workflows, and state machines.", | ||
@@ -190,3 +190,5 @@ main: "dist/index.js", | ||
const convertedEvent = convertXStateEvent(event); | ||
sendAdapter(convertedEvent); | ||
if (convertedEvent) { | ||
sendAdapter(convertedEvent); | ||
} | ||
}); | ||
@@ -261,5 +263,6 @@ } | ||
default: { | ||
throw new Error( | ||
`Invalid inspection event type: ${inspectionEvent.type}` | ||
console.warn( | ||
`Unhandled inspection event type: ${inspectionEvent.type}` | ||
); | ||
return void 0; | ||
} | ||
@@ -266,0 +269,0 @@ } |
@@ -14,3 +14,3 @@ { | ||
"name": "@statelyai/inspect", | ||
"version": "0.2.3", | ||
"version": "0.2.4", | ||
"description": "Inspection utilities for state, actors, workflows, and state machines.", | ||
@@ -17,0 +17,0 @@ "main": "dist/index.js", |
@@ -135,3 +135,5 @@ import { | ||
const convertedEvent = convertXStateEvent(event); | ||
sendAdapter(convertedEvent); | ||
if (convertedEvent) { | ||
sendAdapter(convertedEvent); | ||
} | ||
}); | ||
@@ -153,3 +155,3 @@ }, | ||
inspectionEvent: InspectionEvent | ||
): StatelyInspectionEvent { | ||
): StatelyInspectionEvent | undefined { | ||
switch (inspectionEvent.type) { | ||
@@ -218,7 +220,8 @@ case '@xstate.actor': { | ||
default: { | ||
throw new Error( | ||
`Invalid inspection event type: ${(inspectionEvent as any).type}` | ||
console.warn( | ||
`Unhandled inspection event type: ${(inspectionEvent as any).type}` | ||
); | ||
return undefined; | ||
} | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
74149
1849