@opencode/util 0.0.0-dev-20782 → 0.0.0-dev-20784
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/cross-spawn-spawner.d.ts +1 -1
- package/dist/cross-spawn-spawner.js +2 -2
- package/dist/effect/app-node-platform.d.ts +1 -1
- package/dist/effect/app-node-platform.js +1 -1
- package/dist/fs-util.d.ts +1 -1
- package/dist/observability/logging.js +2 -2
- package/dist/observability/otlp.d.ts +1 -1
- package/dist/observability/otlp.js +1 -1
- package/dist/observability.js +2 -2
- package/dist/process.d.ts +2 -2
- package/dist/process.js +2 -2
- package/package.json +5 -5
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ChildProcessSpawner } from "effect/
|
|
1
|
+
import { ChildProcessSpawner } from "effect/process/ChildProcessSpawner";
|
|
2
2
|
export declare class KilledBySignal extends Error {
|
|
3
3
|
readonly signal: NodeJS.Signals;
|
|
4
4
|
constructor(signal: NodeJS.Signals);
|
|
@@ -2,8 +2,8 @@ import { isArrayNonEmpty } from "effect/Array";
|
|
|
2
2
|
import * as NodeSink from "@effect/platform-node/NodeSink";
|
|
3
3
|
import * as NodeStream from "@effect/platform-node/NodeStream";
|
|
4
4
|
import { Deferred, Effect, Exit, FileSystem, Layer, Path, PlatformError, Predicate, Sink, Stream } from "effect";
|
|
5
|
-
import { ChildProcess } from "effect/
|
|
6
|
-
import { ChildProcessSpawner, ExitCode, make, makeHandle, ProcessId, } from "effect/
|
|
5
|
+
import { ChildProcess } from "effect/process";
|
|
6
|
+
import { ChildProcessSpawner, ExitCode, make, makeHandle, ProcessId, } from "effect/process/ChildProcessSpawner";
|
|
7
7
|
// ast-grep-ignore: no-star-import
|
|
8
8
|
import * as NodeChildProcess from "node:child_process";
|
|
9
9
|
import { PassThrough } from "node:stream";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FileSystem, Path } from "effect";
|
|
2
|
-
import { HttpClient } from "effect/
|
|
2
|
+
import { HttpClient } from "effect/http";
|
|
3
3
|
export declare const filesystem: import("./layer-node.js").Provider<FileSystem.FileSystem, never, import("./layer-node.js").Tag<"global">>;
|
|
4
4
|
export declare const path: import("./layer-node.js").Provider<Path.Path, never, import("./layer-node.js").Tag<"global">>;
|
|
5
5
|
export declare const httpClient: import("./layer-node.js").Provider<HttpClient.HttpClient, never, import("./layer-node.js").Tag<"global">>;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import * as NodeFileSystem from "@effect/platform-node/NodeFileSystem";
|
|
4
4
|
import * as NodePath from "@effect/platform-node/NodePath";
|
|
5
5
|
import { FileSystem, Path } from "effect";
|
|
6
|
-
import { FetchHttpClient, HttpClient } from "effect/
|
|
6
|
+
import { FetchHttpClient, HttpClient } from "effect/http";
|
|
7
7
|
import { makeGlobalNode } from "./app-node.js";
|
|
8
8
|
export const filesystem = makeGlobalNode({ service: FileSystem.FileSystem, layer: NodeFileSystem.layer, deps: [] });
|
|
9
9
|
export const path = makeGlobalNode({ service: Path.Path, layer: NodePath.layer, deps: [] });
|
package/dist/fs-util.d.ts
CHANGED
|
@@ -115,7 +115,7 @@ export declare namespace FSUtil {
|
|
|
115
115
|
readonly rename: (oldPath: string, newPath: string) => Effect.Effect<void, PlatformError, Service>;
|
|
116
116
|
readonly stat: (path: string) => Effect.Effect<FileSystem.File.Info, PlatformError, Service>;
|
|
117
117
|
readonly symlink: (fromPath: string, toPath: string) => Effect.Effect<void, PlatformError, Service>;
|
|
118
|
-
readonly truncate: (path: string, length?:
|
|
118
|
+
readonly truncate: (path: string, length?: number | undefined) => Effect.Effect<void, PlatformError, Service>;
|
|
119
119
|
readonly utimes: (path: string, atime: number | Date, mtime: number | Date) => Effect.Effect<void, PlatformError, Service>;
|
|
120
120
|
readonly writeFile: (path: string, data: Uint8Array<ArrayBufferLike>, options?: {
|
|
121
121
|
readonly flag?: FileSystem.OpenFlag | undefined;
|
|
@@ -89,7 +89,7 @@ export const trim = Effect.fn("Logging.trim")(function* (target, options = {}) {
|
|
|
89
89
|
return;
|
|
90
90
|
const handle = yield* fs.open(target, { flag: "r+" });
|
|
91
91
|
const start = yield* lineStart(handle, size - keep);
|
|
92
|
-
yield* handle.seek(
|
|
92
|
+
yield* handle.seek(0n, "start");
|
|
93
93
|
// Reads run to the current EOF so lines appended since the stat survive; the write cursor always
|
|
94
94
|
// trails the read cursor so the forward copy never overwrites unread bytes.
|
|
95
95
|
const written = yield* fs.stream(target, { offset: start, chunkSize: LOG_TRIM_CHUNK }).pipe(Stream.runFoldEffect(() => 0, (total, chunk) => handle.writeAll(chunk).pipe(Effect.as(total + chunk.length))));
|
|
@@ -119,7 +119,7 @@ function lineStart(handle, from) {
|
|
|
119
119
|
return Effect.gen(function* () {
|
|
120
120
|
let cursor = from;
|
|
121
121
|
while (true) {
|
|
122
|
-
yield* handle.seek(cursor, "start");
|
|
122
|
+
yield* handle.seek(BigInt(cursor), "start");
|
|
123
123
|
const chunk = yield* handle.readAlloc(LOG_TRIM_CHUNK);
|
|
124
124
|
if (Option.isNone(chunk))
|
|
125
125
|
return cursor;
|
|
@@ -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, Scope.Scope | import("effect/
|
|
16
|
+
export declare function loggers(options: Options | undefined, app: App): Effect.Effect<import("effect/Logger").Logger<unknown, void>, never, Scope.Scope | import("effect/http/HttpClient").HttpClient | import("effect/observability/OtlpExporter").Flusher | import("effect/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
|
@@ -2,8 +2,8 @@ export * as Observability from "./observability.js";
|
|
|
2
2
|
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
|
-
import { FetchHttpClient } from "effect/
|
|
6
|
-
import { OtlpExporter, OtlpSerialization } from "effect/
|
|
5
|
+
import { FetchHttpClient } from "effect/http";
|
|
6
|
+
import { OtlpExporter, OtlpSerialization } from "effect/observability";
|
|
7
7
|
import { Logging } from "./observability/logging.js";
|
|
8
8
|
import { Otlp } from "./observability/otlp.js";
|
|
9
9
|
export const Options = Schema.Struct({
|
package/dist/process.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Context, Duration, Effect, Schema, Stream } from "effect";
|
|
2
2
|
import type { PlatformError } from "effect/PlatformError";
|
|
3
|
-
import { ChildProcess } from "effect/
|
|
4
|
-
import { ChildProcessSpawner } from "effect/
|
|
3
|
+
import { ChildProcess } from "effect/process";
|
|
4
|
+
import { ChildProcessSpawner } from "effect/process/ChildProcessSpawner";
|
|
5
5
|
declare const AppProcessError_base: Schema.Class<AppProcessError, Schema.TaggedStruct<"AppProcessError", {
|
|
6
6
|
readonly command: Schema.String;
|
|
7
7
|
readonly exitCode: Schema.optional<Schema.Number>;
|
package/dist/process.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Context, Duration, Effect, Fiber, Layer, Schema, Stream } from "effect";
|
|
2
|
-
import { ChildProcess } from "effect/
|
|
3
|
-
import { ChildProcessSpawner } from "effect/
|
|
2
|
+
import { ChildProcess } from "effect/process";
|
|
3
|
+
import { ChildProcessSpawner } from "effect/process/ChildProcessSpawner";
|
|
4
4
|
import { CrossSpawnSpawner } from "./cross-spawn-spawner.js";
|
|
5
5
|
import { makeGlobalNode } from "./effect/app-node.js";
|
|
6
6
|
export class AppProcessError extends Schema.TaggedError()("AppProcessError", {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/package.json",
|
|
3
3
|
"name": "@opencode/util",
|
|
4
|
-
"version": "0.0.0-dev-
|
|
4
|
+
"version": "0.0.0-dev-20784",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": {
|
|
@@ -44,9 +44,9 @@
|
|
|
44
44
|
"typecheck:dist": "bun run build && bun typecheck --project tsconfig.dist.json"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@effect/opentelemetry": "4.0.0-rc.
|
|
48
|
-
"@effect/platform-node": "4.0.0-rc.
|
|
49
|
-
"@effect/platform-node-shared": "4.0.0-rc.
|
|
47
|
+
"@effect/opentelemetry": "4.0.0-rc.118",
|
|
48
|
+
"@effect/platform-node": "4.0.0-rc.118",
|
|
49
|
+
"@effect/platform-node-shared": "4.0.0-rc.118",
|
|
50
50
|
"@npmcli/arborist": "9.4.0",
|
|
51
51
|
"@npmcli/config": "10.8.1",
|
|
52
52
|
"@opentelemetry/api": "1.9.0",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"@opentelemetry/sdk-trace-base": "2.8.0",
|
|
60
60
|
"@opentelemetry/sdk-trace-node": "2.8.0",
|
|
61
61
|
"cross-spawn": "7.0.6",
|
|
62
|
-
"effect": "4.0.0-rc.
|
|
62
|
+
"effect": "4.0.0-rc.118",
|
|
63
63
|
"glob": "13.0.5",
|
|
64
64
|
"mime-types": "3.0.2",
|
|
65
65
|
"minimatch": "10.2.5",
|