t3-code-android-nightly/.repos/effect-smol/scripts/package-swagger.mjs
Julius Marminge 6f9cea00ae
chore(refs): sync Effect and Alchemy references to 4.0.1 and beta.80 (#16170)
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-05 13:22:30 -07:00

23 lines
702 B
JavaScript

/* oxlint-disable no-undef */
import * as Fs from "fs/promises"
const jsBundle = await fetch(
"https://unpkg.com/swagger-ui-dist/swagger-ui-bundle.js"
).then((res) => res.text())
const jsPreset = await fetch(
"https://unpkg.com/swagger-ui-dist/swagger-ui-standalone-preset.js"
).then((res) => res.text())
const css = await fetch(
"https://unpkg.com/swagger-ui-dist/swagger-ui.css"
).then((res) => res.text())
const source = `/* oxlint-disable no-undef */
/** @internal */
export const javascript = ${JSON.stringify(`${jsBundle}\n${jsPreset}`)}
/** @internal */
export const css = ${JSON.stringify(css)}
`
await Fs.writeFile("packages/effect/src/http-api/internal/httpApiSwagger.ts", source)