mirror of
https://github.com/nexu-io/open-design.git
synced 2026-06-01 03:14:35 +07:00
Settings -> About used to display 0.0.0 in packaged builds because `readCurrentAppVersionInfo` resolved `'../package.json'` relative to `import.meta.url`, which only points at the daemon package root from the flat CLI build (`dist/app-version.js`). The sidecar build emits `dist/src/app-version.js`, where the same relative path lands on the non-existent `dist/package.json`, so `readPackageMetadata` returned null and the version fell back to APP_VERSION_FALLBACK. Walk up from `import.meta.url` to find the nearest real `package.json` instead, so the daemon reports its actual version regardless of whether it runs from TypeScript source (tools-dev), the flat CLI dist, or the nested sidecar dist used by the packaged desktop app. The OD_APP_VERSION env still wins inside `resolveAppVersionInfo`, so callers that already inject it (mac/win packagers) keep working. Also write `appVersion` into the Linux packaged config so Linux follows the same env-injection path as mac/win and stays consistent with the new fallback resolution. Co-authored-by: Cursor <cursoragent@cursor.com> |
||
|---|---|---|
| .. | ||
| dev | ||
| pack | ||
| AGENTS.md | ||