feat(http-recorder): sync recorder v0.3 (#35619)
This commit is contained in:
parent
05e8d5be73
commit
3dd29094f4
47 changed files with 2697 additions and 2207 deletions
|
|
@ -14,7 +14,13 @@ const build = await Bun.build({
|
|||
})
|
||||
if (!build.success) throw new AggregateError(build.logs, "Failed to build @opencode-ai/http-recorder")
|
||||
|
||||
const publicFiles = new Set(["index.js", "index.d.ts", "effect.d.ts", "socket.d.ts", "types.d.ts"])
|
||||
await Promise.all(
|
||||
(await readdir("dist")).filter((file) => !publicFiles.has(file)).map((file) => rm(`dist/${file}`, { force: true })),
|
||||
(await readdir("dist", { recursive: true }))
|
||||
.filter((file) => file.endsWith(".d.ts") && file !== "index.d.ts" && file !== "api.d.ts")
|
||||
.map((file) => rm(`dist/${file}`)),
|
||||
)
|
||||
|
||||
for (const file of ["dist/index.d.ts", "dist/api.d.ts"]) {
|
||||
if ((await Bun.file(file).text()).includes(["import", "("].join("")))
|
||||
throw new Error(`${file} contains dynamic import syntax`)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue