refactor(content-disposition): use new named export

This commit is contained in:
Nicolas Meienberger 2026-05-19 21:06:52 +02:00
parent 815cb31f54
commit 297565159e
No known key found for this signature in database
4 changed files with 7 additions and 12 deletions

View file

@ -2,7 +2,7 @@ import { Readable } from "node:stream";
import { Hono } from "hono";
import { validator } from "hono-openapi";
import { streamSSE } from "hono/streaming";
import contentDisposition from "content-disposition";
import { create } from "content-disposition";
import {
createRepositoryBody,
createRepositoryDto,
@ -223,7 +223,7 @@ export const repositoriesController = new Hono()
status: 200,
headers: {
"Content-Type": dumpStream.contentType,
"Content-Disposition": contentDisposition(filename, {
"Content-Disposition": create(filename, {
fallback: filename.replace(/[^\x20-\x7E]/g, "?"),
}),
"X-Content-Type-Options": "nosniff",

View file

@ -97,6 +97,7 @@
"happy-dom": "^20.9.0",
"msw": "^2.14.6",
"nitro": "^3.0.1-alpha.2",
"oxfmt": "0.48.0",
"tailwindcss": "^4.3.0",
"tw-animate-css": "^1.4.0",
"typescript": "^6.0.3",

View file

@ -128,6 +128,7 @@
"happy-dom": "^20.9.0",
"msw": "^2.14.6",
"nitro": "^3.0.1-alpha.2",
"oxfmt": "0.48.0",
"tailwindcss": "^4.3.0",
"tw-animate-css": "^1.4.0",
"typescript": "^6.0.3",

View file

@ -9,17 +9,10 @@ export default defineConfig({
plugins: [
tanstackStart({
srcDirectory: "app",
router: {
routesDirectory: "routes",
},
importProtection: {
behavior: "error",
},
}),
nitro({
preset: "bun",
plugins: ["./app/server/plugins/bootstrap.ts"],
router: { routesDirectory: "routes" },
importProtection: { behavior: "error" },
}),
nitro({ preset: "bun", plugins: ["./app/server/plugins/bootstrap.ts"] }),
viteReact(),
babel({ presets: [reactCompilerPreset()] }),
tailwindcss(),