refactor(content-disposition): use new named export
This commit is contained in:
parent
815cb31f54
commit
297565159e
4 changed files with 7 additions and 12 deletions
|
|
@ -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",
|
||||
|
|
|
|||
1
bun.lock
1
bun.lock
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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(),
|
||||
|
|
|
|||
Loading…
Reference in a new issue