Files
nexu-io-open-design/apps/daemon/package.json
Patrick A 7bc11b398d chore(deps): upgrade express 4 -> 5 in daemon (#2311)
* chore(deps): upgrade express 4.22.1 -> 5.2.1 and @types/express

Breaking changes addressed:
- Renamed all bare wildcard route segments from * to *splat across
  src/server.ts, src/static-resource-routes.ts, src/project-routes.ts,
  src/import-export-routes.ts, and all three test stubs that define
  app.get/options/delete routes using /raw/* or /raw/* patterns
- Updated wildcard param access from (req.params as any)[0] / req.params[0]
  to Array.isArray(req.params.splat) ? req.params.splat.join('/') : String(...)
  to handle the Express 5 / path-to-regexp v8 change where wildcard params
  are now string[] instead of string
- Updated app.get('*') SPA fallback to app.get('/*splat') in server.ts
- Annotated five connector route handlers with Request<{ connectorId: string }>
  so the typed param resolves as string, not string | string[], fixing the
  10 TS2345 / TS2322 errors that surfaced when @types/express moved to 5.0.6
- Fixed two app.listen() beforeAll callbacks in origin-validation.test.ts to
  accept and propagate the optional Error argument Express 5 now passes to
  the listen callback, resolving TS2769 overload mismatch

* chore(nix): refresh daemonHash for rebased lockfile

* fix(daemon): await res.sendFile() in async route handlers for Express 5 compatibility

Express 5 res.sendFile() returns a Promise. Without await, async route
handlers return before the response is sent, causing Express to call
next() and fall through to a 404. Add await to all res.sendFile() calls
in async handlers in static-resource-routes.ts and server.ts.

* fix(daemon): use readFile+send for spritesheet route instead of sendFile

Express 5 res.sendFile() returns undefined (not a Promise). ENOENT errors
call next() asynchronously after the route handler's try/catch has returned,
causing unhandled 404 responses. Replacing with fs.promises.readFile + res.send
keeps the error path fully within the handler's try/catch.

---------

Co-authored-by: Patrick A <259201958+eefynet@users.noreply.github.com>
2026-05-26 03:16:48 +00:00

69 lines
1.9 KiB
JSON

{
"name": "@open-design/daemon",
"version": "0.8.0",
"private": true,
"type": "module",
"main": "./dist/cli.js",
"types": "./dist/cli.d.ts",
"bin": {
"od": "./dist/cli.js"
},
"exports": {
".": {
"types": "./dist/cli.d.ts",
"default": "./dist/cli.js"
},
"./package.json": "./package.json",
"./sidecar": {
"types": "./dist/sidecar/index.d.ts",
"default": "./dist/sidecar/index.js"
}
},
"files": [
"dist",
"package.json"
],
"scripts": {
"build": "tsc -p tsconfig.json",
"daemon": "pnpm run build && node dist/cli.js --no-open",
"dev": "pnpm run build && node dist/cli.js --no-open",
"start": "pnpm run build && node dist/cli.js",
"test": "vitest run -c vitest.config.ts",
"typecheck": "pnpm --filter @open-design/contracts build && pnpm --filter @open-design/registry-protocol build && tsc -p tsconfig.json --noEmit && tsc -p tsconfig.tests.json --noEmit"
},
"dependencies": {
"@modelcontextprotocol/sdk": "1.29.0",
"@open-design/agui-adapter": "workspace:*",
"@open-design/contracts": "workspace:*",
"@open-design/diagnostics": "workspace:*",
"@open-design/platform": "workspace:*",
"@open-design/plugin-runtime": "workspace:*",
"@open-design/registry-protocol": "workspace:*",
"@open-design/sidecar": "workspace:*",
"@open-design/sidecar-proto": "workspace:*",
"@opentelemetry/api": "1.9.1",
"better-sqlite3": "12.10.0",
"blake3-wasm": "2.1.5",
"cheerio": "1.2.0",
"chokidar": "5.0.0",
"express": "5.2.1",
"jszip": "3.10.1",
"multer": "2.1.1",
"posthog-node": "5.34.6",
"prom-client": "15.1.3",
"tar": "7.5.15",
"undici": "7.25.0"
},
"devDependencies": {
"@types/better-sqlite3": "7.6.13",
"@types/express": "5.0.6",
"@types/multer": "2.1.0",
"@types/node": "20.19.39",
"typescript": "5.9.3",
"vitest": "4.1.6"
},
"engines": {
"node": "~24"
}
}