effect-machine 0.7.0 → 0.7.2

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/dist/actor.js CHANGED
@@ -6,7 +6,7 @@ import { processEventCore, resolveTransition, runSpawnEffects } from "./internal
6
6
  import { emitWithTimestamp } from "./internal/inspection.js";
7
7
  import { PersistenceAdapterTag, PersistenceError } from "./persistence/adapter.js";
8
8
  import { createPersistentActor, restorePersistentActor } from "./persistence/persistent-actor.js";
9
- import { Cause, Deferred, Effect, Exit, Fiber, Layer, MutableHashMap, Option, PubSub, Queue, Ref, Scope, ServiceMap, Stream, SubscriptionRef } from "effect";
9
+ import { Cause, Deferred, Effect, Exit, Fiber, Layer, MutableHashMap, Option, PubSub, Queue, Ref, Scope, Semaphore, ServiceMap, Stream, SubscriptionRef } from "effect";
10
10
 
11
11
  //#region src/actor.ts
12
12
  /**
@@ -301,7 +301,7 @@ const notifySystemListeners = (listeners, event) => {
301
301
  };
302
302
  const make = Effect.fn("effect-machine.actorSystem.make")(function* () {
303
303
  const actorsMap = MutableHashMap.empty();
304
- const withSpawnGate = (yield* Effect.makeSemaphore(1)).withPermits(1);
304
+ const withSpawnGate = (yield* Semaphore.make(1)).withPermits(1);
305
305
  const eventPubSub = yield* PubSub.unbounded();
306
306
  const eventListeners = /* @__PURE__ */ new Set();
307
307
  const emitSystemEvent = (event) => Effect.sync(() => notifySystemListeners(eventListeners, event)).pipe(Effect.andThen(PubSub.publish(eventPubSub, event)), Effect.catchCause(() => Effect.void), Effect.asVoid);
package/dist/errors.d.ts CHANGED
@@ -8,7 +8,7 @@ declare const DuplicateActorError_base: Schema.ErrorClass<DuplicateActorError, S
8
8
  /** Attempted to spawn/restore actor with ID already in use */
9
9
  declare class DuplicateActorError extends DuplicateActorError_base {}
10
10
  declare const UnprovidedSlotsError_base: Schema.ErrorClass<UnprovidedSlotsError, Schema.TaggedStruct<"UnprovidedSlotsError", {
11
- readonly slots: Schema.Array$<Schema.String>;
11
+ readonly slots: Schema.$Array<Schema.String>;
12
12
  }>, effect_Cause0.YieldableError>;
13
13
  /** Machine has unprovided effect slots */
14
14
  declare class UnprovidedSlotsError extends UnprovidedSlotsError_base {}
@@ -32,8 +32,8 @@ declare const SlotProvisionError_base: Schema.ErrorClass<SlotProvisionError, Sch
32
32
  /** Slot handler not found at runtime (internal error) */
33
33
  declare class SlotProvisionError extends SlotProvisionError_base {}
34
34
  declare const ProvisionValidationError_base: Schema.ErrorClass<ProvisionValidationError, Schema.TaggedStruct<"ProvisionValidationError", {
35
- readonly missing: Schema.Array$<Schema.String>;
36
- readonly extra: Schema.Array$<Schema.String>;
35
+ readonly missing: Schema.$Array<Schema.String>;
36
+ readonly extra: Schema.$Array<Schema.String>;
37
37
  }>, effect_Cause0.YieldableError>;
38
38
  /** Machine.build() validation failed - missing or extra handlers */
39
39
  declare class ProvisionValidationError extends ProvisionValidationError_base {}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "effect-machine",
3
- "version": "0.7.0",
3
+ "version": "0.7.2",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/cevr/effect-machine.git"
@@ -55,7 +55,7 @@
55
55
  "release": "bun run build && changeset publish"
56
56
  },
57
57
  "dependencies": {
58
- "effect": "4.0.0-beta.5"
58
+ "effect": "4.0.0-beta.26"
59
59
  },
60
60
  "devDependencies": {
61
61
  "@changesets/changelog-github": "^0.5.2",
@@ -80,6 +80,6 @@
80
80
  }
81
81
  },
82
82
  "overrides": {
83
- "effect": "4.0.0-beta.5"
83
+ "effect": "4.0.0-beta.26"
84
84
  }
85
85
  }