@venturewild/workspace 0.1.3 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/server/src/config.mjs +13 -1
package/package.json
CHANGED
package/server/src/config.mjs
CHANGED
|
@@ -299,4 +299,16 @@ export function buildConfig(overrides = {}) {
|
|
|
299
299
|
};
|
|
300
300
|
}
|
|
301
301
|
|
|
302
|
-
|
|
302
|
+
// Read from package.json (the single source of truth) so the reported version
|
|
303
|
+
// can never drift from the published release — `npm version` bumps it for free.
|
|
304
|
+
// This previously hardcoded '0.1.0', so every release (0.1.1/0.1.2/0.1.3) shipped
|
|
305
|
+
// a stale version to `--version`, /api/health, doctor, and all telemetry.
|
|
306
|
+
function readAppVersion() {
|
|
307
|
+
try {
|
|
308
|
+
const pkg = JSON.parse(fs.readFileSync(path.join(__dirname, '../../package.json'), 'utf8'));
|
|
309
|
+
return pkg.version || '0.0.0';
|
|
310
|
+
} catch {
|
|
311
|
+
return '0.0.0';
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
export const APP_VERSION = readAppVersion();
|