Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .vite-hooks/pre-commit
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
vp lint
vp staged
9,997 changes: 4,000 additions & 5,997 deletions package-lock.json

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,13 @@
"nodejs-file-downloader": "^4.13.0",
"npm-run-all": "^4.1.5",
"typescript": "^5.8.3",
"vite-plus": "latest",
"vitest": "npm:@voidzero-dev/vite-plus-test@latest"
"vite-plus": "0.1.20-alpha.4",
"vitest": "npm:@voidzero-dev/vite-plus-test@0.1.20-alpha.4"
},
"overrides": {
"js-yaml": "^4.1.1",
"vite": "npm:@voidzero-dev/vite-plus-core@latest",
"vitest": "npm:@voidzero-dev/vite-plus-test@latest"
"vite": "npm:@voidzero-dev/vite-plus-core@0.1.20-alpha.4",
"vitest": "npm:@voidzero-dev/vite-plus-test@0.1.20-alpha.4"
},
"packageManager": "npm@11.11.1"
}
1 change: 1 addition & 0 deletions packages/plugin-runtime-types/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"declaration": true,
"declarationDir": "./lib",
"outDir": "./lib",
"rootDir": "./src",
"strict": true,
"types": ["node"]
},
Expand Down
1 change: 1 addition & 0 deletions packages/plugin-runtime/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"moduleResolution": "node16",
"resolveJsonModule": true,
"sourceMap": true,
"rootDir": "./src",
"outDir": "build"
},
"include": ["src"]
Expand Down
2 changes: 1 addition & 1 deletion src-web/components/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ function Sidebar({ className }: { className?: string }) {
await Promise.all(
items
.filter((i) => i.model === "http_request")
.map((i) => sendAnyHttpRequest.mutate(i.id)),
.map((i) => sendAnyHttpRequest.mutateAsync(i.id)),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Since mutateAsync returns a promise that rejects on failure, and this is called within Promise.all inside an async callback that isn't explicitly caught, a failed request will trigger an unhandled promise rejection. Adding a .catch() to the individual mutation calls ensures that the batch process continues and avoids unhandled rejections. This is safe here as individual request states are already tracked and displayed via atoms.

Suggested change
.map((i) => sendAnyHttpRequest.mutateAsync(i.id)),
.map((i) => sendAnyHttpRequest.mutateAsync(i.id).catch(() => {})),

);
},
},
Expand Down
4 changes: 2 additions & 2 deletions src-web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,9 @@
"postcss": "^8.5.6",
"postcss-nesting": "^13.0.2",
"tailwindcss": "^3.4.17",
"vite": "npm:@voidzero-dev/vite-plus-core@latest",
"vite": "npm:@voidzero-dev/vite-plus-core@0.1.20-alpha.4",
"vite-plugin-static-copy": "^3.3.0",
"vite-plugin-svgr": "^4.5.0",
"vite-plus": "latest"
"vite-plus": "0.1.20-alpha.4"
}
}
1 change: 0 additions & 1 deletion src-web/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"useDefineForClassFields": true,
"allowJs": false,
"skipLibCheck": true,
"esModuleInterop": false,
"allowSyntheticDefaultImports": true,
"strict": true,
"noUncheckedIndexedAccess": true,
Expand Down
1 change: 0 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"useDefineForClassFields": true,
"allowJs": false,
"skipLibCheck": true,
"esModuleInterop": false,
"allowSyntheticDefaultImports": true,
"strict": true,
"noUncheckedIndexedAccess": true,
Expand Down
3 changes: 3 additions & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import { defineConfig } from "vite-plus";

export default defineConfig({
staged: {
"*": "vp check --fix",
},
lint: {
ignorePatterns: ["npm/**", "crates/yaak-templates/pkg/**", "**/bindings/gen_*.ts"],
options: {
Expand Down
Loading