fix(client): emit js import specifiers
This commit is contained in:
@@ -28,11 +28,11 @@ await Effect.runPromise(
|
||||
fileURLToPath(new URL("../src/promise/generated", import.meta.url)),
|
||||
),
|
||||
write(
|
||||
emitEffectImported(effectContract, { module: "../../contract", api: "ClientApi" }),
|
||||
emitEffectImported(effectContract, { module: "../../contract.js", api: "ClientApi" }),
|
||||
fileURLToPath(new URL("../src/effect/generated", import.meta.url)),
|
||||
),
|
||||
write(
|
||||
emitEffectShape(effectContract, { module: "../../contract", api: "ClientApi" }),
|
||||
emitEffectShape(effectContract, { module: "../../contract.js", api: "ClientApi" }),
|
||||
fileURLToPath(new URL("../src/effect/api", import.meta.url)),
|
||||
),
|
||||
],
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Generated by @opencode-ai/httpapi-codegen. Do not edit.
|
||||
import type { Effect, Stream } from "effect"
|
||||
import type { HttpApiClient } from "effect/unstable/httpapi"
|
||||
import type { ClientApi } from "../../contract"
|
||||
import type { ClientApi } from "../../contract.js"
|
||||
|
||||
type RawClient = HttpApiClient.ForApi<typeof ClientApi>
|
||||
type EffectValue<A> = A extends Effect.Effect<infer Success, any, any> ? Success : never
|
||||
|
||||
@@ -3,8 +3,8 @@ import { Effect, Stream, Schema } from "effect"
|
||||
import { Sse } from "effect/unstable/encoding"
|
||||
import { HttpClientError } from "effect/unstable/http"
|
||||
import { HttpApiClient } from "effect/unstable/httpapi"
|
||||
import { ClientApi } from "../../contract"
|
||||
import { ClientError } from "./client-error"
|
||||
import { ClientApi } from "../../contract.js"
|
||||
import { ClientError } from "./client-error.js"
|
||||
|
||||
type RawClient = HttpApiClient.ForApi<typeof ClientApi>
|
||||
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
export { ClientError } from "./client-error"
|
||||
export * as OpenCode from "./client"
|
||||
export { ClientError } from "./client-error.js"
|
||||
export * as OpenCode from "./client.js"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// Core or Server. Preserve these datatype exports so internal model reorganizations do not require caller migrations.
|
||||
import type { Effect } from "effect"
|
||||
|
||||
export * from "./generated/index"
|
||||
export * from "./generated/index.js"
|
||||
export type {
|
||||
AgentApi,
|
||||
AppApi,
|
||||
@@ -43,4 +43,4 @@ export { SessionMessage } from "@opencode-ai/schema/session-message"
|
||||
export { Skill } from "@opencode-ai/schema/skill"
|
||||
export { Prompt } from "@opencode-ai/schema/prompt"
|
||||
export type { OpenCodeEvent } from "@opencode-ai/protocol/groups/event"
|
||||
export type OpenCodeClient = Effect.Success<ReturnType<typeof import("./generated/client").make>>
|
||||
export type OpenCodeClient = Effect.Success<ReturnType<typeof import("./generated/client.js").make>>
|
||||
|
||||
@@ -173,8 +173,8 @@ import type {
|
||||
VcsStatusOutput,
|
||||
VcsDiffInput,
|
||||
VcsDiffOutput,
|
||||
} from "./types"
|
||||
import { ClientError } from "./client-error"
|
||||
} from "./types.js"
|
||||
import { ClientError } from "./client-error.js"
|
||||
|
||||
export interface ClientOptions {
|
||||
readonly baseUrl: string
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
export { ClientError, type ClientErrorReason } from "./client-error"
|
||||
export * as OpenCode from "./client"
|
||||
export * from "./types"
|
||||
export { ClientError, type ClientErrorReason } from "./client-error.js"
|
||||
export * as OpenCode from "./client.js"
|
||||
export * from "./types.js"
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -1,5 +1,5 @@
|
||||
export * as OpenCode from "./opencode"
|
||||
export * as Tool from "./tool"
|
||||
export * as OpenCode from "./opencode.js"
|
||||
export * as Tool from "./tool.js"
|
||||
|
||||
export { ClientError } from "@opencode-ai/client/effect"
|
||||
export {
|
||||
|
||||
Reference in New Issue
Block a user