@systemfsoftware/effect-daemon-spec 0.7.0 → 0.7.1

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.
@@ -57,8 +57,8 @@ export declare type ChildRef = {
57
57
 
58
58
  export declare interface CommonOpts<L extends LockConfig> {
59
59
  readonly name: string;
60
- readonly child?: typeof ChildPolicyConfig.Type;
61
- readonly tick: typeof TickPolicyConfig.Type;
60
+ readonly child?: ChildPolicyConfig;
61
+ readonly tick: TickPolicyConfig;
62
62
  readonly tickHooks?: TickPolicyHooks;
63
63
  readonly lock: L;
64
64
  }
@@ -201,9 +201,9 @@ declare const LockPolicyConfig_base: Schema.Class<LockPolicyConfig, {
201
201
  mode: Schema.optional<Schema.Literal<["none", "required", "optional"]>>;
202
202
  key: Schema.optional<typeof Schema.String>;
203
203
  }>, never, {
204
- readonly mode?: "none" | "required" | "optional" | undefined;
205
- } & {
206
204
  readonly key?: string | undefined;
205
+ } & {
206
+ readonly mode?: "none" | "required" | "optional" | undefined;
207
207
  }, {}, {}>;
208
208
 
209
209
  export declare class LockPrimitive extends LockPrimitive_base {}
@@ -320,7 +320,7 @@ export declare const supervisor: <E, R>(s: Supervisor<E, R, LockConfig>) => Effe
320
320
 
321
321
  export declare class SupervisorBodyExecutorDeps extends SupervisorBodyExecutorDeps_base {}
322
322
 
323
- declare const SupervisorBodyExecutorDeps_base: Context.TagClass<SupervisorBodyExecutorDeps, "SupervisorBodyExecutorDeps", {
323
+ declare const SupervisorBodyExecutorDeps_base: Context.TagClass<SupervisorBodyExecutorDeps, "@systemfsoftware/effect-daemon-spec/internal/supervisor-body.executor/SupervisorBodyExecutorDeps", {
324
324
  readonly onRestart: DaemonReporter["Type"]["onRestart"];
325
325
  readonly onExhausted: DaemonReporter["Type"]["onExhausted"];
326
326
  }>;
@@ -395,7 +395,7 @@ export declare function withLeaderLock<A, E, R>(self: Effect.Effect<A, E, R>, op
395
395
 
396
396
  export declare class WithLeaderLockExecutorDeps extends WithLeaderLockExecutorDeps_base {}
397
397
 
398
- declare const WithLeaderLockExecutorDeps_base: Context.TagClass<WithLeaderLockExecutorDeps, "WithLeaderLockExecutorDeps", {
398
+ declare const WithLeaderLockExecutorDeps_base: Context.TagClass<WithLeaderLockExecutorDeps, "@systemfsoftware/effect-daemon-spec/internal/with-leader-lock.executor/WithLeaderLockExecutorDeps", {
399
399
  readonly withLock: LeaderLock["Type"]["withLock"];
400
400
  }>;
401
401
 
@@ -412,8 +412,8 @@ declare interface Worker_2<E, R, L extends LockConfig = LockConfig> {
412
412
  readonly [WorkerTypeId]: WorkerTypeId;
413
413
  readonly name: string;
414
414
  readonly loop: LoopShape<E, R>;
415
- readonly child: typeof ChildPolicyConfig.Type;
416
- readonly tick: typeof TickPolicyConfig.Type;
415
+ readonly child: ChildPolicyConfig;
416
+ readonly tick: TickPolicyConfig;
417
417
  readonly tickHooks: TickPolicyHooks;
418
418
  readonly lock: L;
419
419
  }
package/dist/index.d.ts CHANGED
@@ -100,9 +100,9 @@ declare const LockPolicyConfig_base: Schema.Class<LockPolicyConfig, {
100
100
  mode: Schema.optional<Schema.Literal<["none", "required", "optional"]>>;
101
101
  key: Schema.optional<typeof Schema.String>;
102
102
  }>, never, {
103
- readonly mode?: "none" | "required" | "optional" | undefined;
104
- } & {
105
103
  readonly key?: string | undefined;
104
+ } & {
105
+ readonly mode?: "none" | "required" | "optional" | undefined;
106
106
  }, {}, {}>;
107
107
  declare class LockPolicyConfig extends LockPolicyConfig_base {}
108
108
  declare const TickPolicyConfig_base: Schema.Class<TickPolicyConfig, {
@@ -144,8 +144,8 @@ type LockConfig = {
144
144
  };
145
145
  interface CommonOpts<L extends LockConfig> {
146
146
  readonly name: string;
147
- readonly child?: typeof ChildPolicyConfig.Type;
148
- readonly tick: typeof TickPolicyConfig.Type;
147
+ readonly child?: ChildPolicyConfig;
148
+ readonly tick: TickPolicyConfig;
149
149
  readonly tickHooks?: TickPolicyHooks;
150
150
  readonly lock: L;
151
151
  }
@@ -185,8 +185,8 @@ interface Worker<E, R, L extends LockConfig = LockConfig> {
185
185
  readonly [WorkerTypeId]: WorkerTypeId;
186
186
  readonly name: string;
187
187
  readonly loop: LoopShape<E, R>;
188
- readonly child: typeof ChildPolicyConfig.Type;
189
- readonly tick: typeof TickPolicyConfig.Type;
188
+ readonly child: ChildPolicyConfig;
189
+ readonly tick: TickPolicyConfig;
190
190
  readonly tickHooks: TickPolicyHooks;
191
191
  readonly lock: L;
192
192
  }
@@ -270,7 +270,7 @@ interface LeaderLockOptions {
270
270
  readonly mode: 'required' | 'optional';
271
271
  readonly acquireRetryBackoff?: Schedule.Schedule<Duration.Duration>;
272
272
  }
273
- declare const WithLeaderLockExecutorDeps_base: Context.TagClass<WithLeaderLockExecutorDeps, "WithLeaderLockExecutorDeps", {
273
+ declare const WithLeaderLockExecutorDeps_base: Context.TagClass<WithLeaderLockExecutorDeps, "@systemfsoftware/effect-daemon-spec/internal/with-leader-lock.executor/WithLeaderLockExecutorDeps", {
274
274
  readonly withLock: LeaderLock["Type"]["withLock"];
275
275
  }>;
276
276
  declare class WithLeaderLockExecutorDeps extends WithLeaderLockExecutorDeps_base {}
@@ -285,7 +285,7 @@ declare const worker: {
285
285
  };
286
286
  //#endregion
287
287
  //#region src/internal/supervisor-body.executor.d.ts
288
- declare const SupervisorBodyExecutorDeps_base: Context.TagClass<SupervisorBodyExecutorDeps, "SupervisorBodyExecutorDeps", {
288
+ declare const SupervisorBodyExecutorDeps_base: Context.TagClass<SupervisorBodyExecutorDeps, "@systemfsoftware/effect-daemon-spec/internal/supervisor-body.executor/SupervisorBodyExecutorDeps", {
289
289
  readonly onRestart: DaemonReporter["Type"]["onRestart"];
290
290
  readonly onExhausted: DaemonReporter["Type"]["onExhausted"];
291
291
  }>;
package/dist/index.mjs CHANGED
@@ -250,7 +250,7 @@ const buildSubscriptionLoop = (worker, loop, health, readyGauge) => {
250
250
  const buildWorkerLoop = (worker, health, readyGauge) => Match.value(worker.loop).pipe(Match.tag("Poll", (loop) => buildPollLoop(worker, loop, health, readyGauge)), Match.tag("Stream", (loop) => buildStreamLoop(worker, loop, health, readyGauge)), Match.tag("Subscription", (loop) => buildSubscriptionLoop(worker, loop, health, readyGauge)), Match.exhaustive);
251
251
  //#endregion
252
252
  //#region src/internal/with-leader-lock.executor.ts
253
- var WithLeaderLockExecutorDeps = class extends Context.Tag("WithLeaderLockExecutorDeps")() {};
253
+ var WithLeaderLockExecutorDeps = class extends Context.Tag("@systemfsoftware/effect-daemon-spec/internal/with-leader-lock.executor/WithLeaderLockExecutorDeps")() {};
254
254
  function withLeaderLock(self, options) {
255
255
  const acquire = Effect.gen(function* () {
256
256
  const out = yield* (yield* WithLeaderLockExecutorDeps).withLock(options.key, self);
@@ -268,7 +268,7 @@ function withLeaderLock(self, options) {
268
268
  //#endregion
269
269
  //#region src/leader-lock.kernel.ts
270
270
  const isModeNone = (lock) => lock.mode === "none";
271
- Context.Tag("DaemonWorkerExecutorDeps")();
271
+ Context.Tag("@systemfsoftware/effect-daemon-spec/daemon-worker.executor/DaemonWorkerExecutorDeps")();
272
272
  const worker = (w) => Effect.gen(function* () {
273
273
  const health = yield* allocateWorkerHealth(w.name);
274
274
  const loop = buildWorkerLoop(w, health, healthStateGauge).pipe(Effect.orDie);
@@ -407,7 +407,7 @@ var ContinueSupervision = class extends Schema.TaggedClass()("ContinueSupervisio
407
407
  Schema.Union(StopSupervision, ContinueSupervision);
408
408
  //#endregion
409
409
  //#region src/internal/supervisor-body.executor.ts
410
- var SupervisorBodyExecutorDeps = class extends Context.Tag("SupervisorBodyExecutorDeps")() {};
410
+ var SupervisorBodyExecutorDeps = class extends Context.Tag("@systemfsoftware/effect-daemon-spec/internal/supervisor-body.executor/SupervisorBodyExecutorDeps")() {};
411
411
  const handleExhausted = (ctx, cause) => Effect.gen(function* () {
412
412
  yield* Effect.zipRight(ctx.health.healthy.close, Metric.set(Metric.tagged(Metric.tagged(healthStateGauge, "daemon", ctx.name), "latch", "healthy"), 0));
413
413
  yield* ctx.reportExhausted(cause);
@@ -609,7 +609,7 @@ const supervisor = (s) => Effect.gen(function* () {
609
609
  yield* Effect.forkScoped(locked.pipe(Effect.orDie));
610
610
  return health;
611
611
  });
612
- Context.Tag("BuildDynamicExecutorDeps")();
612
+ Context.Tag("@systemfsoftware/effect-daemon-spec/internal/build-dynamic.executor/BuildDynamicExecutorDeps")();
613
613
  const buildDynamic = (spec, health) => Effect.gen(function* () {
614
614
  const state = yield* Ref.make({
615
615
  nextId: 0,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@systemfsoftware/effect-daemon-spec",
3
3
  "license": "MIT",
4
- "version": "0.7.0",
4
+ "version": "0.7.1",
5
5
  "author": "Ryan Lee <drdgvhbh@gmail.com>",
6
6
  "repository": {
7
7
  "type": "git",
@@ -48,16 +48,17 @@
48
48
  "tsdown": "^0.22.9",
49
49
  "vite-tsconfig-paths": "^6.1.1",
50
50
  "vitest": "^4",
51
- "@systemfsoftware/arethetypeswrong-cli": "^1.1.0",
52
- "@systemfsoftware/effect-schema-law": "^0.5.0",
53
- "@systemfsoftware/effect-schema-vite": "^1.4.0",
54
- "@systemfsoftware/effect-gherkin-spec": "^0.4.1",
51
+ "@systemfsoftware/effect-cell-types": "^1.0.1",
52
+ "@systemfsoftware/arethetypeswrong-cli": "^1.1.1",
53
+ "@systemfsoftware/effect-schema-law": "^0.6.0",
54
+ "@systemfsoftware/effect-gherkin-spec": "^0.5.0",
55
+ "@systemfsoftware/effect-schema-vite": "^1.5.0",
55
56
  "@systemfsoftware/oxlint-config": "^0.1.0",
56
- "@systemfsoftware/stryker-js-core": "^1.1.6",
57
- "@systemfsoftware/stryker-js-typescript-checker": "^1.1.6",
58
- "@systemfsoftware/tsconfig": "^1.2.6",
59
- "@systemfsoftware/stryker-plugins": "^0.9.0",
60
- "@systemfsoftware/vitest-config": "^0.1.0"
57
+ "@systemfsoftware/stryker-js-core": "^1.2.1",
58
+ "@systemfsoftware/tsconfig": "^1.3.0",
59
+ "@systemfsoftware/stryker-plugins": "^0.10.0",
60
+ "@systemfsoftware/vitest-config": "^0.1.0",
61
+ "@systemfsoftware/stryker-js-typescript-checker": "^1.2.1"
61
62
  },
62
63
  "peerDependencies": {
63
64
  "effect": "^3.22.0"