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 { Hono } from "hono";
|
||||||
import { validator } from "hono-openapi";
|
import { validator } from "hono-openapi";
|
||||||
import { streamSSE } from "hono/streaming";
|
import { streamSSE } from "hono/streaming";
|
||||||
import contentDisposition from "content-disposition";
|
import { create } from "content-disposition";
|
||||||
import {
|
import {
|
||||||
createRepositoryBody,
|
createRepositoryBody,
|
||||||
createRepositoryDto,
|
createRepositoryDto,
|
||||||
|
|
@ -223,7 +223,7 @@ export const repositoriesController = new Hono()
|
||||||
status: 200,
|
status: 200,
|
||||||
headers: {
|
headers: {
|
||||||
"Content-Type": dumpStream.contentType,
|
"Content-Type": dumpStream.contentType,
|
||||||
"Content-Disposition": contentDisposition(filename, {
|
"Content-Disposition": create(filename, {
|
||||||
fallback: filename.replace(/[^\x20-\x7E]/g, "?"),
|
fallback: filename.replace(/[^\x20-\x7E]/g, "?"),
|
||||||
}),
|
}),
|
||||||
"X-Content-Type-Options": "nosniff",
|
"X-Content-Type-Options": "nosniff",
|
||||||
|
|
|
||||||
1
bun.lock
1
bun.lock
|
|
@ -97,6 +97,7 @@
|
||||||
"happy-dom": "^20.9.0",
|
"happy-dom": "^20.9.0",
|
||||||
"msw": "^2.14.6",
|
"msw": "^2.14.6",
|
||||||
"nitro": "^3.0.1-alpha.2",
|
"nitro": "^3.0.1-alpha.2",
|
||||||
|
"oxfmt": "0.48.0",
|
||||||
"tailwindcss": "^4.3.0",
|
"tailwindcss": "^4.3.0",
|
||||||
"tw-animate-css": "^1.4.0",
|
"tw-animate-css": "^1.4.0",
|
||||||
"typescript": "^6.0.3",
|
"typescript": "^6.0.3",
|
||||||
|
|
|
||||||
|
|
@ -128,6 +128,7 @@
|
||||||
"happy-dom": "^20.9.0",
|
"happy-dom": "^20.9.0",
|
||||||
"msw": "^2.14.6",
|
"msw": "^2.14.6",
|
||||||
"nitro": "^3.0.1-alpha.2",
|
"nitro": "^3.0.1-alpha.2",
|
||||||
|
"oxfmt": "0.48.0",
|
||||||
"tailwindcss": "^4.3.0",
|
"tailwindcss": "^4.3.0",
|
||||||
"tw-animate-css": "^1.4.0",
|
"tw-animate-css": "^1.4.0",
|
||||||
"typescript": "^6.0.3",
|
"typescript": "^6.0.3",
|
||||||
|
|
|
||||||
|
|
@ -9,17 +9,10 @@ export default defineConfig({
|
||||||
plugins: [
|
plugins: [
|
||||||
tanstackStart({
|
tanstackStart({
|
||||||
srcDirectory: "app",
|
srcDirectory: "app",
|
||||||
router: {
|
router: { routesDirectory: "routes" },
|
||||||
routesDirectory: "routes",
|
importProtection: { behavior: "error" },
|
||||||
},
|
|
||||||
importProtection: {
|
|
||||||
behavior: "error",
|
|
||||||
},
|
|
||||||
}),
|
|
||||||
nitro({
|
|
||||||
preset: "bun",
|
|
||||||
plugins: ["./app/server/plugins/bootstrap.ts"],
|
|
||||||
}),
|
}),
|
||||||
|
nitro({ preset: "bun", plugins: ["./app/server/plugins/bootstrap.ts"] }),
|
||||||
viteReact(),
|
viteReact(),
|
||||||
babel({ presets: [reactCompilerPreset()] }),
|
babel({ presets: [reactCompilerPreset()] }),
|
||||||
tailwindcss(),
|
tailwindcss(),
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue