Skip to content

Commit 3f8e304

Browse files
authored
remove the dependency openai which is just being used in the fake and other package updates (#1750)
* remove the dependency `openai` which is just being used in the fake * update lockfile * fix type * external resvg
1 parent 65aa29f commit 3f8e304

6 files changed

Lines changed: 263 additions & 397 deletions

File tree

bun.lock

Lines changed: 259 additions & 260 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

fake-snippets-api/routes/api/autocomplete/create_autocomplete.ts

Lines changed: 0 additions & 133 deletions
This file was deleted.

fake-snippets-api/routes/api/packages/images/[owner_github_username]/[unscoped_name]/[view_format].ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ export default withRouteSpec({
110110
}
111111

112112
const pngBuffer = await renderAsync(svg)
113-
return new Response(pngBuffer.asPng(), {
113+
return new Response(pngBuffer.asPng().buffer as ArrayBuffer, {
114114
headers: {
115115
"Content-Type": "image/png",
116116
"Cache-Control": "public, max-age=86400, s-maxage=86400",

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@
109109
"autoprefixer": "^10.4.20",
110110
"circuit-json-to-bom-csv": "^0.0.7",
111111
"circuit-json-to-gerber": "^0.0.29",
112-
"circuit-json-to-gltf": "^0.0.4",
112+
"circuit-json-to-gltf": "^0.0.14",
113113
"circuit-json-to-pnp-csv": "^0.0.7",
114114
"circuit-json-to-readable-netlist": "^0.0.13",
115115
"circuit-json-to-simple-3d": "^0.0.7",
@@ -146,7 +146,6 @@
146146
"md5": "^2.3.0",
147147
"ms": "^2.1.3",
148148
"next-themes": "^0.3.0",
149-
"openai": "^5.6.0",
150149
"postcss": "^8.4.47",
151150
"posthog-js": "^1.203.2",
152151
"prompts": "^2.4.2",

src/lib/download-fns/download-gltf-from-circuit-json.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export const downloadGltfFromCircuitJson = async (
2727
typeof (result as any).buffer === "object" &&
2828
(result as any).byteLength !== undefined
2929
) {
30-
const view = result as ArrayBufferView
30+
const view = result as ArrayBuffer
3131
blob = new Blob([view], { type: "model/gltf-binary" })
3232
extension = options?.format
3333
? options.format === "glb"

vite.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,7 @@ export default defineConfig(async (): Promise<UserConfig> => {
215215
main: path.resolve(__dirname, "index.html"),
216216
landing: path.resolve(__dirname, "landing.html"),
217217
},
218+
external: ["@resvg/resvg-js"],
218219
},
219220
},
220221
ssr: {

0 commit comments

Comments
 (0)