@actor-system/core
Advanced tools
@@ -166,3 +166,3 @@ import { createPath, resolveActorPath, parsePath } from '../__bundle__/shared/dist/path.js'; | ||
| await actor._stopChildren(); | ||
| this.config.inspector?.tell(lifecycleEvent(actor.self, "Stopped")); | ||
| this.config.inspector?.tell(lifecycleEvent(actor.self, "Stopped", actor._behavior)); | ||
| // Unwatch all actors we were watching | ||
@@ -202,3 +202,3 @@ actor._unwatchAll(); | ||
| actor._receiveSignal(preRestart); | ||
| this.config.inspector?.tell(lifecycleEvent(actor.self, "Restarted")); | ||
| this.config.inspector?.tell(lifecycleEvent(actor.self, "Restarted", actor._behavior)); | ||
| } | ||
@@ -205,0 +205,0 @@ /** @internal */ |
@@ -35,5 +35,5 @@ import { generateMonotonicULID } from '../__bundle__/shared/dist/monotonicULID.js'; | ||
| this.#resolveShutdown = resolve; | ||
| this.system.config.inspector?.tell(lifecycleEvent(this.self, "Started", this._behavior)); | ||
| } | ||
| _initializeBehavior(initialBehavior) { | ||
| this.system.config.inspector?.tell(lifecycleEvent(this.self, "Started")); | ||
| const unfolded = unfold(initialBehavior, this); | ||
@@ -40,0 +40,0 @@ switch (unfolded._tag) { |
@@ -33,4 +33,5 @@ import { Letter } from '@actor-system/mail'; | ||
| readonly event: LifecycleEventType; | ||
| readonly currentBehavior: Behavior<T>; | ||
| } | ||
| declare const lifecycleEvent: <T>(actorRef: ActorRef<T>, event: LifecycleEventType) => LifecycleEvent<T>; | ||
| declare const lifecycleEvent: <T>(actorRef: ActorRef<T>, event: LifecycleEventType, currentBehavior: Behavior<T>) => LifecycleEvent<T>; | ||
| declare const isLifecycleEvent: <T>(value: unknown) => value is LifecycleEvent<T>; | ||
@@ -37,0 +38,0 @@ declare const $unhandledMessageEvent = "inspector.event.unhandledmessage"; |
@@ -33,4 +33,5 @@ import { Letter } from '@actor-system/mail/internal'; | ||
| readonly event: LifecycleEventType; | ||
| readonly currentBehavior: Behavior<T>; | ||
| } | ||
| declare const lifecycleEvent: <T>(actorRef: ActorRef<T>, event: LifecycleEventType) => LifecycleEvent<T>; | ||
| declare const lifecycleEvent: <T>(actorRef: ActorRef<T>, event: LifecycleEventType, currentBehavior: Behavior<T>) => LifecycleEvent<T>; | ||
| declare const isLifecycleEvent: <T>(value: unknown) => value is LifecycleEvent<T>; | ||
@@ -37,0 +38,0 @@ declare const $unhandledMessageEvent = "inspector.event.unhandledmessage"; |
@@ -29,3 +29,3 @@ import { letterGuard } from '@actor-system/mail'; | ||
| const $lifecycleEvent = "inspector.event.lifecycle"; | ||
| const lifecycleEvent = (actorRef, event) => ({ | ||
| const lifecycleEvent = (actorRef, event, currentBehavior) => ({ | ||
| label: $lifecycleEvent, | ||
@@ -35,2 +35,3 @@ timestamp: Date.now(), | ||
| event, | ||
| currentBehavior, | ||
| }); | ||
@@ -37,0 +38,0 @@ const isLifecycleEvent = letterGuard($lifecycleEvent); |
+1
-1
| { | ||
| "name": "@actor-system/core", | ||
| "version": "0.0.14", | ||
| "version": "0.1.0", | ||
| "type": "module", | ||
@@ -5,0 +5,0 @@ "scripts": { |
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
95207
0.25%2286
0.13%