Add fleetbase-source: deploy script, patch scripts, AGENTS.md with session notes

- deploy-biibaye.sh: VPS deploy script
- patch-index-html.js: post-build HTML patching (title, favicon, meta)
- patch-css-colors.js: post-build CSS color replacement (blue -> orange)
- patch-index-html.py: Python alternative for host-side HTML patching
- console-package.json: snapshot with @biibaye/branding link dependency
- AGENTS.md: full session docs for 2026-05-24 and 2026-05-25
This commit is contained in:
2026-05-25 16:43:02 +03:00
parent b9538200ec
commit 05818099e6
6 changed files with 687 additions and 0 deletions

View File

@ -0,0 +1,54 @@
var fs = require('fs');
var path = require('path');
function walkDir(dir, callback) {
fs.readdirSync(dir).forEach(function(f) {
var p = path.join(dir, f);
if (fs.statSync(p).isDirectory()) walkDir(p, callback);
else if (p.endsWith('.css')) callback(p);
});
}
var replacements = [
[/230, 240, 251/g, '255, 240, 230'],
[/186, 213, 245/g, '255, 208, 179'],
[/141, 187, 239/g, '255, 179, 128'],
[/97, 160, 232/g, '255, 122, 51'],
[/52, 133, 226/g, '255, 69, 0'],
[/28, 108, 199/g, '224, 61, 0'],
[/22, 83, 154/g, '179, 49, 0'],
[/16, 59, 109/g, '138, 38, 0'],
[/9, 35, 65/g, '97, 26, 0'],
[/#e6f0fb/gi, '#FFF0E6'],
[/#bad5f5/gi, '#FFD0B3'],
[/#8dbbef/gi, '#FFB380'],
[/#61a0e8/gi, '#FF7A33'],
[/#3485e2/gi, '#FF4500'],
[/#1c6cc7/gi, '#E03D00'],
[/#16539a/gi, '#B33100'],
[/#103b6d/gi, '#8A2600'],
[/#092341/gi, '#611A00'],
[/31, 41, 55/g, '52, 53, 56'],
[/#1f2937/gi, '#343538'],
];
var distDir = 'dist';
if (!fs.existsSync(distDir)) {
distDir = '.';
}
var count = 0;
walkDir(distDir, function(filePath) {
var content = fs.readFileSync(filePath, 'utf8');
var original = content;
replacements.forEach(function(r) {
content = content.replace(r[0], r[1]);
});
if (content !== original) {
fs.writeFileSync(filePath, content);
console.log('Patched: ' + filePath);
count++;
}
});
console.log('Patched ' + count + ' CSS files');