refactor keyboard and mouse code: SVG -> div components & logical refactoring. Add some new DEV-features
Some checks failed
CI / checks (push) Failing after 6m56s

This commit is contained in:
Микаэл Оганесян
2026-04-10 02:54:32 +03:00
parent d96c152ae3
commit 84586b5ce2
35 changed files with 1315 additions and 205 deletions

View File

@@ -10,6 +10,7 @@ require('dotenv').config({ path: path.join(__dirname, '..', '.env') });
const defaults = {
SG_API_FALLBACK_ORIGIN: 'https://sparkguardian.ru',
SG_API_BASE_PATH: '/api/v1',
SG_INTERACTIVE_PREROLL_MS: '4000',
};
function val(key) {
@@ -20,11 +21,20 @@ function val(key) {
return defaults[key];
}
function intVal(key) {
const parsed = Number.parseInt(val(key), 10);
if (Number.isFinite(parsed)) {
return parsed;
}
return Number.parseInt(defaults[key], 10);
}
const content = `// Сгенерировано npm run env:sync — правьте .env и снова запустите sync
export const environment = {
production: false,
apiFallbackOrigin: ${JSON.stringify(val('SG_API_FALLBACK_ORIGIN'))},
apiBasePath: ${JSON.stringify(val('SG_API_BASE_PATH'))},
interactivePrerollMs: ${JSON.stringify(intVal('SG_INTERACTIVE_PREROLL_MS'))},
} as const;
`;