@xstate/inspect
Advanced tools
Comparing version 0.6.1 to 0.6.2
# @xstate/inspect | ||
## 0.6.2 | ||
### Patch Changes | ||
- [#2957](https://github.com/statelyai/xstate/pull/2957) [`8550ddda7`](https://github.com/statelyai/xstate/commit/8550ddda73e2ad291e19173d7fa8d13e3336fbb9) Thanks [@davidkpiano](https://github.com/davidkpiano)! - The repository links have been updated from `github.com/davidkpiano` to `github.com/statelyai`. | ||
## 0.6.1 | ||
@@ -13,3 +19,3 @@ | ||
- [#2640](https://github.com/statelyai/xstate/pull/2640) [`c73dfd655`](https://github.com/statelyai/xstate/commit/c73dfd655525546e59f00d0be88b80ab71239427) Thanks [@davidkpiano](https://github.com/davidkpiano)! - A serializer can now be specified as an option for `inspect(...)` in the `.serialize` property. It should be a [replacer function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#the_replacer_parameter): | ||
- [#2640](https://github.com/statelyai/xstate/pull/2640) [`c73dfd655`](https://github.com/statelyai/xstate/commit/c73dfd655525546e59f00d0be88b80ab71239427) Thanks [@davidkpiano](https://github.com/statelyai)! - A serializer can now be specified as an option for `inspect(...)` in the `.serialize` property. It should be a [replacer function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#the_replacer_parameter): | ||
@@ -71,3 +77,3 @@ ```js | ||
- [`d9282107`](https://github.com/davidkpiano/xstate/commit/d9282107b931b867d9cd297ede71b55fe11eb74d) [#1800](https://github.com/davidkpiano/xstate/pull/1800) Thanks [@davidkpiano](https://github.com/davidkpiano)! - Fixed a bug where services were not being registered by the inspect client, affecting the ability to send events to inspected services. | ||
- [`d9282107`](https://github.com/statelyai/xstate/commit/d9282107b931b867d9cd297ede71b55fe11eb74d) [#1800](https://github.com/statelyai/xstate/pull/1800) Thanks [@davidkpiano](https://github.com/statelyai)! - Fixed a bug where services were not being registered by the inspect client, affecting the ability to send events to inspected services. | ||
@@ -78,3 +84,3 @@ ## 0.4.0 | ||
- [`63ba888e`](https://github.com/davidkpiano/xstate/commit/63ba888e19bd2b72f9aad2c9cd36cde297e0ffe5) [#1770](https://github.com/davidkpiano/xstate/pull/1770) Thanks [@davidkpiano](https://github.com/davidkpiano)! - It is now easier for developers to create their own XState inspectors, and even inspect services offline. | ||
- [`63ba888e`](https://github.com/statelyai/xstate/commit/63ba888e19bd2b72f9aad2c9cd36cde297e0ffe5) [#1770](https://github.com/statelyai/xstate/pull/1770) Thanks [@davidkpiano](https://github.com/statelyai)! - It is now easier for developers to create their own XState inspectors, and even inspect services offline. | ||
@@ -142,3 +148,3 @@ A **receiver** is an actor that receives inspector events from a source, such as `"service.register"`, `"service.state"`, `"service.event"`, etc. This update includes two receivers: | ||
- [`a473205d`](https://github.com/davidkpiano/xstate/commit/a473205d214563033cd250094d2344113755bd8b) [#1699](https://github.com/davidkpiano/xstate/pull/1699) Thanks [@davidkpiano](https://github.com/davidkpiano)! - The `@xstate/inspect` tool now uses [`fast-safe-stringify`](https://www.npmjs.com/package/fast-safe-stringify) for internal JSON stringification of machines, states, and events when regular `JSON.stringify()` fails (e.g., due to circular structures). | ||
- [`a473205d`](https://github.com/statelyai/xstate/commit/a473205d214563033cd250094d2344113755bd8b) [#1699](https://github.com/statelyai/xstate/pull/1699) Thanks [@davidkpiano](https://github.com/statelyai)! - The `@xstate/inspect` tool now uses [`fast-safe-stringify`](https://www.npmjs.com/package/fast-safe-stringify) for internal JSON stringification of machines, states, and events when regular `JSON.stringify()` fails (e.g., due to circular structures). | ||
@@ -149,2 +155,2 @@ ## 0.2.0 | ||
- [`1725333a`](https://github.com/davidkpiano/xstate/commit/1725333a6edcc5c1e178228aa869c907d3907be5) [#1599](https://github.com/davidkpiano/xstate/pull/1599) Thanks [@davidkpiano](https://github.com/davidkpiano)! - The `@xstate/inspect` package is now built with Rollup which has fixed an issue with TypeScript compiler inserting references to `this` in the top-level scope of the output modules and thus making it harder for some tools (like Rollup) to re-bundle dist files as `this` in modules (as they are always in strict mode) is `undefined`. | ||
- [`1725333a`](https://github.com/statelyai/xstate/commit/1725333a6edcc5c1e178228aa869c907d3907be5) [#1599](https://github.com/statelyai/xstate/pull/1599) Thanks [@davidkpiano](https://github.com/statelyai)! - The `@xstate/inspect` package is now built with Rollup which has fixed an issue with TypeScript compiler inserting references to `this` in the top-level scope of the output modules and thus making it harder for some tools (like Rollup) to re-bundle dist files as `this` in modules (as they are always in strict mode) is `undefined`. |
@@ -7,3 +7,3 @@ import { Interpreter, EventObject } from 'xstate'; | ||
context: any; | ||
}>>; | ||
}, import("xstate").TypegenDisabled>>; | ||
export declare function createDevTools(): XStateDevInterface; | ||
@@ -10,0 +10,0 @@ export declare function inspect(options?: InspectorOptions): Inspector | undefined; |
@@ -20,10 +20,23 @@ import { ActorRef } from 'xstate'; | ||
client?: Pick<ActorRef<any, any>, "send"> | undefined; | ||
}, any, InspectMachineEvent, { | ||
value: any; | ||
context: { | ||
client?: Pick<ActorRef<any, any>, "send"> | undefined; | ||
}, any, InspectMachineEvent, any, import("xstate").BaseActionObject, import("xstate").ServiceMap, import("xstate").TypegenDisabled & { | ||
missingImplementations: { | ||
actions: never; | ||
delays: never; | ||
guards: never; | ||
services: never; | ||
}; | ||
}, import("xstate").ActionObject<{ | ||
client?: Pick<ActorRef<any, any>, "send"> | undefined; | ||
}, InspectMachineEvent>>; | ||
} & { | ||
eventsCausingActions: Record<string, string>; | ||
eventsCausingDelays: Record<string, string>; | ||
eventsCausingGuards: Record<string, string>; | ||
eventsCausingServices: Record<string, string>; | ||
} & { | ||
indexedActions: import("xstate").IndexByType<import("xstate").BaseActionObject>; | ||
indexedEvents: Record<string, InspectMachineEvent> & { | ||
__XSTATE_ALLOW_ANY_INVOKE_DATA_HACK__: { | ||
data: any; | ||
}; | ||
}; | ||
invokeSrcNameMap: Record<string, "__XSTATE_ALLOW_ANY_INVOKE_DATA_HACK__">; | ||
}>; | ||
//# sourceMappingURL=inspectMachine.d.ts.map |
@@ -1,6 +0,6 @@ | ||
import type { ActorRef, Interpreter, SCXML, State, StateMachine } from 'xstate'; | ||
import type { ActorRef, SCXML, State, StateMachine, AnyInterpreter } from 'xstate'; | ||
import { XStateDevInterface } from 'xstate/lib/devTools'; | ||
import { InspectMachineEvent } from './inspectMachine'; | ||
export declare type MaybeLazy<T> = T | (() => T); | ||
export declare type ServiceListener = (service: Interpreter<any>) => void; | ||
export declare type ServiceListener = (service: AnyInterpreter) => void; | ||
export declare type Replacer = (key: string, value: any) => any; | ||
@@ -13,3 +13,3 @@ export interface InspectorOptions { | ||
} | ||
export interface Inspector extends ActorRef<InspectMachineEvent, State<any, any, any>> { | ||
export interface Inspector extends ActorRef<InspectMachineEvent, State<any, any, any, any, any>> { | ||
/** | ||
@@ -55,3 +55,3 @@ * Disconnects the inspector. | ||
type: 'service.register'; | ||
machine: StateMachine<any, any, any>; | ||
machine: StateMachine<any, any, any, any, any, any, any>; | ||
state: State<any, any>; | ||
@@ -67,3 +67,3 @@ id: string; | ||
type: 'service.state'; | ||
state: State<any, any>; | ||
state: State<any, any, any, any, any>; | ||
sessionId: string; | ||
@@ -70,0 +70,0 @@ } | { |
@@ -7,3 +7,3 @@ import { Interpreter, EventObject } from 'xstate'; | ||
context: any; | ||
}>>; | ||
}, import("xstate").TypegenDisabled>>; | ||
export declare function createDevTools(): XStateDevInterface; | ||
@@ -10,0 +10,0 @@ export declare function inspect(options?: InspectorOptions): Inspector | undefined; |
@@ -20,10 +20,23 @@ import { ActorRef } from 'xstate'; | ||
client?: Pick<ActorRef<any, any>, "send"> | undefined; | ||
}, any, InspectMachineEvent, { | ||
value: any; | ||
context: { | ||
client?: Pick<ActorRef<any, any>, "send"> | undefined; | ||
}, any, InspectMachineEvent, any, import("xstate").BaseActionObject, import("xstate").ServiceMap, import("xstate").TypegenDisabled & { | ||
missingImplementations: { | ||
actions: never; | ||
delays: never; | ||
guards: never; | ||
services: never; | ||
}; | ||
}, import("xstate").ActionObject<{ | ||
client?: Pick<ActorRef<any, any>, "send"> | undefined; | ||
}, InspectMachineEvent>>; | ||
} & { | ||
eventsCausingActions: Record<string, string>; | ||
eventsCausingDelays: Record<string, string>; | ||
eventsCausingGuards: Record<string, string>; | ||
eventsCausingServices: Record<string, string>; | ||
} & { | ||
indexedActions: import("xstate").IndexByType<import("xstate").BaseActionObject>; | ||
indexedEvents: Record<string, InspectMachineEvent> & { | ||
__XSTATE_ALLOW_ANY_INVOKE_DATA_HACK__: { | ||
data: any; | ||
}; | ||
}; | ||
invokeSrcNameMap: Record<string, "__XSTATE_ALLOW_ANY_INVOKE_DATA_HACK__">; | ||
}>; | ||
//# sourceMappingURL=inspectMachine.d.ts.map |
@@ -1,6 +0,6 @@ | ||
import type { ActorRef, Interpreter, SCXML, State, StateMachine } from 'xstate'; | ||
import type { ActorRef, SCXML, State, StateMachine, AnyInterpreter } from 'xstate'; | ||
import { XStateDevInterface } from 'xstate/lib/devTools'; | ||
import { InspectMachineEvent } from './inspectMachine'; | ||
export declare type MaybeLazy<T> = T | (() => T); | ||
export declare type ServiceListener = (service: Interpreter<any>) => void; | ||
export declare type ServiceListener = (service: AnyInterpreter) => void; | ||
export declare type Replacer = (key: string, value: any) => any; | ||
@@ -13,3 +13,3 @@ export interface InspectorOptions { | ||
} | ||
export interface Inspector extends ActorRef<InspectMachineEvent, State<any, any, any>> { | ||
export interface Inspector extends ActorRef<InspectMachineEvent, State<any, any, any, any, any>> { | ||
/** | ||
@@ -55,3 +55,3 @@ * Disconnects the inspector. | ||
type: 'service.register'; | ||
machine: StateMachine<any, any, any>; | ||
machine: StateMachine<any, any, any, any, any, any, any>; | ||
state: State<any, any>; | ||
@@ -67,3 +67,3 @@ id: string; | ||
type: 'service.state'; | ||
state: State<any, any>; | ||
state: State<any, any, any, any, any>; | ||
sessionId: string; | ||
@@ -70,0 +70,0 @@ } | { |
{ | ||
"name": "@xstate/inspect", | ||
"version": "0.6.1", | ||
"version": "0.6.2", | ||
"description": "XState inspection utilities", | ||
@@ -15,3 +15,3 @@ "keywords": [ | ||
"author": "David Khourshid <davidkpiano@gmail.com>", | ||
"homepage": "https://github.com/davidkpiano/xstate/tree/main/packages/xstate-inspect#readme", | ||
"homepage": "https://github.com/statelyai/xstate/tree/main/packages/xstate-inspect#readme", | ||
"license": "MIT", | ||
@@ -30,3 +30,3 @@ "main": "lib/index.js", | ||
"type": "git", | ||
"url": "git+ssh://git@github.com/davidkpiano/xstate.git" | ||
"url": "git+ssh://git@github.com/statelyai/xstate.git" | ||
}, | ||
@@ -37,6 +37,6 @@ "scripts": { | ||
"build": "rollup -c", | ||
"prepublish": "npm run build" | ||
"prepare": "npm run build" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/davidkpiano/xstate/issues" | ||
"url": "https://github.com/statelyai/xstate/issues" | ||
}, | ||
@@ -43,0 +43,0 @@ "devDependencies": { |
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
63652
1333