chore: generate
This commit is contained in:
@@ -149,23 +149,26 @@ export const layer: Layer.Layer<Service, never, HttpClient.HttpClient | AppProce
|
|||||||
return `Upgrade failed for ${method}.`
|
return `Upgrade failed for ${method}.`
|
||||||
}
|
}
|
||||||
|
|
||||||
const upgradeCurl = Effect.fnUntraced(function* (target: string) {
|
const upgradeCurl = Effect.fnUntraced(
|
||||||
const response = yield* httpOk.execute(HttpClientRequest.get("https://opencode.ai/install"))
|
function* (target: string) {
|
||||||
const body = yield* response.text
|
const response = yield* httpOk.execute(HttpClientRequest.get("https://opencode.ai/install"))
|
||||||
const bodyBytes = new TextEncoder().encode(body)
|
const body = yield* response.text
|
||||||
const result = yield* appProcess.run(
|
const bodyBytes = new TextEncoder().encode(body)
|
||||||
ChildProcess.make("bash", [], {
|
const result = yield* appProcess.run(
|
||||||
stdin: Stream.make(bodyBytes),
|
ChildProcess.make("bash", [], {
|
||||||
env: { VERSION: target },
|
stdin: Stream.make(bodyBytes),
|
||||||
extendEnv: true,
|
env: { VERSION: target },
|
||||||
}),
|
extendEnv: true,
|
||||||
)
|
}),
|
||||||
return {
|
)
|
||||||
code: result.exitCode,
|
return {
|
||||||
stdout: result.stdout.toString("utf8"),
|
code: result.exitCode,
|
||||||
stderr: result.stderr.toString("utf8"),
|
stdout: result.stdout.toString("utf8"),
|
||||||
}
|
stderr: result.stderr.toString("utf8"),
|
||||||
}, Effect.mapError(() => new UpgradeFailedError({ stderr: upgradeFailure("curl") })))
|
}
|
||||||
|
},
|
||||||
|
Effect.mapError(() => new UpgradeFailedError({ stderr: upgradeFailure("curl") })),
|
||||||
|
)
|
||||||
|
|
||||||
const result: Interface = {
|
const result: Interface = {
|
||||||
info: Effect.fn("Installation.info")(function* () {
|
info: Effect.fn("Installation.info")(function* () {
|
||||||
|
|||||||
Reference in New Issue
Block a user