mirror of
https://github.com/nexu-io/open-design.git
synced 2026-06-01 03:14:35 +07:00
The packaged app's Settings → About page displays version `0.0.0` instead
of the actual release version because the daemon's `package.json` was
excluded from its `pnpm pack` tarball.
Root cause: `apps/daemon/package.json` declares `"files": ["dist"]`, so
`pnpm pack` only includes the `dist/` directory. At runtime,
`readCurrentAppVersionInfo()` in `apps/daemon/src/app-version.ts` resolves
`new URL('../package.json', import.meta.url)` from the compiled
`dist/app-version.js`, which points at the tarball's root `package.json`.
Because that file isn't packed, the read fails silently, falls through
the catch in `readPackageMetadata()`, and the version falls back to the
`APP_VERSION_FALLBACK = '0.0.0'` constant. `/api/version` and
`/api/health` then report `'0.0.0'` for every packaged install.
Fix: add `"package.json"` to the daemon's `files` array so it ships in
the tarball. The package already declares `"./package.json"` as an
exports entry, so consumers expect this file to be available.
Closes #224
55 lines
1.5 KiB
JSON
55 lines
1.5 KiB
JSON
{
|
|
"name": "@open-design/daemon",
|
|
"version": "0.1.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 && tsc -p tsconfig.sidecar.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": "tsc -p tsconfig.json --noEmit && tsc -p tsconfig.sidecar.json --noEmit && tsc -p tsconfig.tests.json --noEmit"
|
|
},
|
|
"dependencies": {
|
|
"@open-design/contracts": "workspace:0.1.0",
|
|
"@open-design/platform": "workspace:0.1.0",
|
|
"@open-design/sidecar": "workspace:0.1.0",
|
|
"@open-design/sidecar-proto": "workspace:0.1.0",
|
|
"better-sqlite3": "^11.10.0",
|
|
"express": "^4.19.2",
|
|
"jszip": "^3.10.1",
|
|
"multer": "^1.4.5-lts.1"
|
|
},
|
|
"devDependencies": {
|
|
"@types/better-sqlite3": "^7.6.13",
|
|
"@types/express": "^4.17.21",
|
|
"@types/multer": "^1.4.12",
|
|
"@types/node": "^20.17.10",
|
|
"typescript": "^5.6.3",
|
|
"vitest": "^2.1.8"
|
|
},
|
|
"engines": {
|
|
"node": "~24"
|
|
}
|
|
}
|