@opencode-ai/util 0.0.0-dev-18639 → 0.0.0-dev-18650

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/bom.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  export * as Bom from "./bom.js";
2
2
  import { Effect } from "effect";
3
- import { FSUtil } from "./fs-util.js";
3
+ import type { FSUtil } from "./fs-util.js";
4
4
  export declare function split(text: string): {
5
5
  bom: boolean;
6
6
  text: string;
package/dist/bom.js CHANGED
@@ -1,6 +1,5 @@
1
1
  export * as Bom from "./bom.js";
2
2
  import { Effect } from "effect";
3
- import { FSUtil } from "./fs-util.js";
4
3
  const code = 0xfeff;
5
4
  const value = String.fromCharCode(code);
6
5
  export function split(text) {
@@ -171,9 +171,10 @@ export var EffectFlock;
171
171
  // acquireRelease: acquire is uninterruptible, release is guaranteed
172
172
  const handle = yield* Effect.acquireRelease(acquireHandle(lockfile, key, { staleMs, timeoutMs }), (handle) => release(handle));
173
173
  // Heartbeat fiber — scoped, so it's interrupted before release runs
174
- yield* fs
175
- .utimes(handle.heartbeatPath, new Date(), new Date())
176
- .pipe(Effect.ignore, Effect.repeat(Schedule.spaced(Math.max(100, Math.floor(staleMs / 3)))), Effect.forkScoped);
174
+ yield* Effect.suspend(() => {
175
+ const now = new Date();
176
+ return fs.utimes(handle.heartbeatPath, now, now);
177
+ }).pipe(Effect.ignore, Effect.repeat(Schedule.spaced(Math.max(100, Math.floor(staleMs / 3)))), Effect.forkScoped);
177
178
  });
178
179
  const withLock = Function.dual((args) => Effect.isEffect(args[0]), (body, key, dir) => Effect.scoped(Effect.gen(function* () {
179
180
  yield* acquire(key, dir);
package/dist/process.js CHANGED
@@ -115,7 +115,7 @@ const layer = Layer.effect(Service, Effect.gen(function* () {
115
115
  const aborted = options?.signal
116
116
  ? timed.pipe(Effect.raceFirst(waitForAbort(options.signal).pipe(Effect.mapError((cause) => wrapError(description, cause)))))
117
117
  : timed;
118
- return aborted.pipe(Effect.catch((cause) => Effect.fail(wrapError(description, cause))));
118
+ return aborted.pipe(Effect.mapError((cause) => wrapError(description, cause)));
119
119
  };
120
120
  const run = Effect.fn("AppProcess.run")(function* (command, options) {
121
121
  if (options?.stdin === undefined)
@@ -155,7 +155,7 @@ const layer = Layer.effect(Service, Effect.gen(function* () {
155
155
  }));
156
156
  return Stream.concat(lines, tail);
157
157
  }));
158
- const mapped = built.pipe(Stream.catch((cause) => Stream.fail(wrapError(description, cause))));
158
+ const mapped = built.pipe(Stream.mapError((cause) => wrapError(description, cause)));
159
159
  if (!options?.signal)
160
160
  return mapped;
161
161
  const signal = options.signal;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
3
  "name": "@opencode-ai/util",
4
- "version": "0.0.0-dev-18639",
4
+ "version": "0.0.0-dev-18650",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "repository": {