diff --git a/client/FlawedContent.ts b/client/FlawedContent.ts index 56a3beb..d8787d0 100644 --- a/client/FlawedContent.ts +++ b/client/FlawedContent.ts @@ -5,11 +5,11 @@ import { Result } from "../Result" export interface FlawedContent extends Error { status: 400 type: "flawed content" - content: Flaw + content: Flaw | false error?: string } -export function flawedContent(content: Flaw, error?: string): FlawedContent { +export function flawedContent(content: Flaw | false, error?: string): FlawedContent { return { status: 400, type: "flawed content", content, error } } @@ -19,7 +19,7 @@ export namespace FlawedContent { typeof value == "object" && value.status == 400 && value.type == "flawed content" && - Flaw.is(value.content) && + (Flaw.is(value.content) || value.content === false) && (value.error == undefined || typeof value.error == "string") && Result.is(value) ) diff --git a/package-lock.json b/package-lock.json index 86c03b1..62e43f2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4805,10 +4805,11 @@ } }, "node_modules/vite": { - "version": "5.4.14", - "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.14.tgz", - "integrity": "sha512-EK5cY7Q1D8JNhSaPKVK4pwBFvaTmZxEnoKXLG/U9gmdDcihQGNzFlgIvaxezFR4glP1LsuiedwMBqCXH3wZccA==", + "version": "5.4.15", + "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.15.tgz", + "integrity": "sha512-6ANcZRivqL/4WtwPGTKNaosuNJr5tWiftOC7liM7G9+rMb8+oeJeyzymDu4rTN93seySBmbjSfsS3Vzr19KNtA==", "dev": true, + "license": "MIT", "dependencies": { "esbuild": "^0.21.3", "postcss": "^8.4.43", diff --git a/vite.config.ts b/vite.config.ts index 3194b69..5d51e66 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -9,7 +9,7 @@ export default defineConfig({ enabled: true, all: true, cleanOnRerun: true, - thresholds: { statements: 80, branches: 90, functions: 65, lines: 80 }, + thresholds: { statements: 80, branches: 85, functions: 65, lines: 80 }, }, globals: true, include: ["**/*.spec.[tj]s"],