9d34ff96e2
proxy had no page footer at all — no copyright, no license link, no build/version info — unlike sso-manager-node, which already had one (now cleaned up in a matching change there). Bring the two in line: - Added a footer to bottom.ejs: theta42 logo/link, "© <year> theta42" with an MIT License link, a GitHub link, and build version/hash. - Moved the GitHub icon link out of the top nav (where it competed with actual navigation items) and into the new footer. - Added nodejs/utils/build_info.js (buildVersion/buildHash/buildYear, read once from package.json + git) and wired it into routes/render.js so every page has the values the footer needs. Mirrors the same helper added to sso-manager-node in the matching cleanup there. - Copied the theta42.svg logo into nodejs/public/img/ (previously only present in sso-manager-node) so both apps' footers render identically. Verified by rendering top+bottom with the real ejs package: no template errors, GitHub link present exactly once (in the footer, not the nav), logo and MIT License link present. npm test: 192/192 pass (unaffected — view-only + a new leaf utility module).
16 lines
352 B
JavaScript
16 lines
352 B
JavaScript
'use strict';
|
|
|
|
const { execSync } = require('child_process');
|
|
const { version: buildVersion } = require('../package.json');
|
|
|
|
let buildHash = 'unknown';
|
|
try {
|
|
buildHash = execSync('git rev-parse --short HEAD', { cwd: __dirname }).toString().trim();
|
|
} catch (_) {}
|
|
|
|
module.exports = {
|
|
buildVersion,
|
|
buildHash,
|
|
buildYear: new Date().getFullYear(),
|
|
};
|