@opencode-ai/util 0.0.0-dev-17545 → 0.0.0-dev-17582
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/effect-flock.js +4 -4
- package/dist/fs-util.js +1 -1
- package/dist/npm.js +1 -1
- package/dist/observability/otlp.d.ts +1 -1
- package/dist/observability.js +2 -2
- package/dist/patch.js +2 -2
- package/dist/process.js +1 -1
- package/package.json +4 -4
package/dist/effect-flock.js
CHANGED
|
@@ -11,17 +11,17 @@ export var EffectFlock;
|
|
|
11
11
|
// ---------------------------------------------------------------------------
|
|
12
12
|
// Errors
|
|
13
13
|
// ---------------------------------------------------------------------------
|
|
14
|
-
class LockTimeoutError extends Schema.
|
|
14
|
+
class LockTimeoutError extends Schema.TaggedError()("LockTimeoutError", {
|
|
15
15
|
key: Schema.String,
|
|
16
16
|
}) {
|
|
17
17
|
}
|
|
18
18
|
EffectFlock.LockTimeoutError = LockTimeoutError;
|
|
19
|
-
class LockCompromisedError extends Schema.
|
|
19
|
+
class LockCompromisedError extends Schema.TaggedError()("LockCompromisedError", {
|
|
20
20
|
detail: Schema.String,
|
|
21
21
|
}) {
|
|
22
22
|
}
|
|
23
23
|
EffectFlock.LockCompromisedError = LockCompromisedError;
|
|
24
|
-
class ReleaseError extends Schema.
|
|
24
|
+
class ReleaseError extends Schema.TaggedError()("ReleaseError", {
|
|
25
25
|
detail: Schema.String,
|
|
26
26
|
cause: Schema.optional(Schema.Defect()),
|
|
27
27
|
}) {
|
|
@@ -30,7 +30,7 @@ export var EffectFlock;
|
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
/** Internal: signals "lock is held, retry later". Never leaks to callers. */
|
|
33
|
-
class NotAcquired extends Schema.
|
|
33
|
+
class NotAcquired extends Schema.TaggedError()("NotAcquired", {}) {
|
|
34
34
|
}
|
|
35
35
|
// ---------------------------------------------------------------------------
|
|
36
36
|
// Timing defaults
|
package/dist/fs-util.js
CHANGED
|
@@ -10,7 +10,7 @@ import { makeGlobalNode } from "./effect/app-node.js";
|
|
|
10
10
|
import { filesystem } from "./effect/app-node-platform.js";
|
|
11
11
|
export var FSUtil;
|
|
12
12
|
(function (FSUtil) {
|
|
13
|
-
class FileSystemError extends Schema.
|
|
13
|
+
class FileSystemError extends Schema.TaggedError()("FileSystemError", {
|
|
14
14
|
method: Schema.String,
|
|
15
15
|
cause: Schema.optional(Schema.Defect()),
|
|
16
16
|
}) {
|
package/dist/npm.js
CHANGED
|
@@ -11,7 +11,7 @@ import { LayerNode } from "./effect/layer-node.js";
|
|
|
11
11
|
import { makeRuntime } from "./effect/runtime.js";
|
|
12
12
|
import { NpmConfig } from "./npm-config.js";
|
|
13
13
|
import { resolveModule } from "#runtime-import";
|
|
14
|
-
export class InstallFailedError extends Schema.
|
|
14
|
+
export class InstallFailedError extends Schema.TaggedError()("NpmInstallFailedError", {
|
|
15
15
|
add: Schema.Array(Schema.String).pipe(Schema.optional),
|
|
16
16
|
dir: Schema.String,
|
|
17
17
|
cause: Schema.optional(Schema.Defect()),
|
|
@@ -13,6 +13,6 @@ export declare function resource(app?: App): {
|
|
|
13
13
|
serviceVersion: string;
|
|
14
14
|
attributes: Record<string, string>;
|
|
15
15
|
};
|
|
16
|
-
export declare function loggers(options: Options | undefined, app: App): Effect.Effect<import("effect/Logger").Logger<unknown, void>, never, import("effect/unstable/http/HttpClient").HttpClient | Scope.Scope | import("effect/unstable/observability/OtlpSerialization").OtlpSerialization>[];
|
|
16
|
+
export declare function loggers(options: Options | undefined, app: App): Effect.Effect<import("effect/Logger").Logger<unknown, void>, never, import("effect/unstable/http/HttpClient").HttpClient | Scope.Scope | import("effect/unstable/observability/OtlpExporter").Flusher | import("effect/unstable/observability/OtlpSerialization").OtlpSerialization>[];
|
|
17
17
|
export declare const tracingLayer: (options: Options | undefined, app: App) => Effect.Effect<Layer.Layer<never, never, never>, never, never>;
|
|
18
18
|
export * as Otlp from "./otlp.js";
|
package/dist/observability.js
CHANGED
|
@@ -3,7 +3,7 @@ import * as NodeFileSystem from "@effect/platform-node/NodeFileSystem";
|
|
|
3
3
|
import { LayerNode } from "./effect/layer-node.js";
|
|
4
4
|
import { Effect, Layer, Logger, References, Schema } from "effect";
|
|
5
5
|
import { FetchHttpClient } from "effect/unstable/http";
|
|
6
|
-
import { OtlpSerialization } from "effect/unstable/observability";
|
|
6
|
+
import { OtlpExporter, OtlpSerialization } from "effect/unstable/observability";
|
|
7
7
|
import { Logging } from "./observability/logging.js";
|
|
8
8
|
import { Otlp } from "./observability/otlp.js";
|
|
9
9
|
export const Options = Schema.Struct({
|
|
@@ -24,7 +24,7 @@ export function layer(options = {
|
|
|
24
24
|
};
|
|
25
25
|
const local = Logger.layer(Logging.loggers(app.channel === "local", app.channel), { mergeWithExisting: false }).pipe(Layer.provide(NodeFileSystem.layer), Layer.orDie, Layer.merge(Layer.succeed(References.MinimumLogLevel, Logging.minimumLogLevel())));
|
|
26
26
|
return Layer.unwrap(Effect.gen(function* () {
|
|
27
|
-
const logs = Logger.layer([...Logging.loggers(app.channel === "local", app.channel), ...Otlp.loggers(options, app)], { mergeWithExisting: false }).pipe(Layer.provide(NodeFileSystem.layer), Layer.provide(OtlpSerialization.layerJson), Layer.provide(FetchHttpClient.layer), Layer.orDie, Layer.merge(Layer.succeed(References.MinimumLogLevel, Logging.minimumLogLevel())));
|
|
27
|
+
const logs = Logger.layer([...Logging.loggers(app.channel === "local", app.channel), ...Otlp.loggers(options, app)], { mergeWithExisting: false }).pipe(Layer.provide(NodeFileSystem.layer), Layer.provide(OtlpSerialization.layerJson), Layer.provide(FetchHttpClient.layer), Layer.provide(OtlpExporter.layerFlusher), Layer.orDie, Layer.merge(Layer.succeed(References.MinimumLogLevel, Logging.minimumLogLevel())));
|
|
28
28
|
return Layer.merge(logs, yield* Otlp.tracingLayer(options, app));
|
|
29
29
|
})).pipe(Layer.catchCause(() => local));
|
|
30
30
|
}
|
package/dist/patch.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
export * as Patch from "./patch.js";
|
|
2
2
|
import { Result, Schema } from "effect";
|
|
3
3
|
import { Bom } from "./bom.js";
|
|
4
|
-
export class BoundaryError extends Schema.
|
|
4
|
+
export class BoundaryError extends Schema.TaggedError()("Patch.BoundaryError", {
|
|
5
5
|
boundary: Schema.Literals(["first", "last"]),
|
|
6
6
|
}) {
|
|
7
7
|
get message() {
|
|
8
8
|
return `The ${this.boundary} line of the patch must be '${this.boundary === "first" ? "*** Begin Patch" : "*** End Patch"}'`;
|
|
9
9
|
}
|
|
10
10
|
}
|
|
11
|
-
export class InvalidHunkError extends Schema.
|
|
11
|
+
export class InvalidHunkError extends Schema.TaggedError()("Patch.InvalidHunkError", {
|
|
12
12
|
line: Schema.String,
|
|
13
13
|
lineNumber: Schema.Number,
|
|
14
14
|
reason: Schema.optional(Schema.String),
|
package/dist/process.js
CHANGED
|
@@ -3,7 +3,7 @@ import { ChildProcess } from "effect/unstable/process";
|
|
|
3
3
|
import { ChildProcessSpawner } from "effect/unstable/process/ChildProcessSpawner";
|
|
4
4
|
import { CrossSpawnSpawner } from "./cross-spawn-spawner.js";
|
|
5
5
|
import { makeGlobalNode } from "./effect/app-node.js";
|
|
6
|
-
export class AppProcessError extends Schema.
|
|
6
|
+
export class AppProcessError extends Schema.TaggedError()("AppProcessError", {
|
|
7
7
|
command: Schema.String,
|
|
8
8
|
exitCode: Schema.optional(Schema.Number),
|
|
9
9
|
stderr: Schema.optional(Schema.String),
|
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-
|
|
4
|
+
"version": "0.0.0-dev-17582",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": {
|
|
@@ -43,8 +43,8 @@
|
|
|
43
43
|
"typecheck": "tsgo --noEmit"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@effect/opentelemetry": "4.0.0-beta.
|
|
47
|
-
"@effect/platform-node": "4.0.0-beta.
|
|
46
|
+
"@effect/opentelemetry": "4.0.0-beta.107",
|
|
47
|
+
"@effect/platform-node": "4.0.0-beta.107",
|
|
48
48
|
"@npmcli/arborist": "9.4.0",
|
|
49
49
|
"@npmcli/config": "10.8.1",
|
|
50
50
|
"@opentelemetry/api": "1.9.0",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"@opentelemetry/sdk-trace-base": "2.6.1",
|
|
54
54
|
"@opentelemetry/sdk-trace-node": "2.6.1",
|
|
55
55
|
"cross-spawn": "7.0.6",
|
|
56
|
-
"effect": "4.0.0-beta.
|
|
56
|
+
"effect": "4.0.0-beta.107",
|
|
57
57
|
"glob": "13.0.5",
|
|
58
58
|
"mime-types": "3.0.2",
|
|
59
59
|
"minimatch": "10.2.5",
|