👷 ci(build): add SonarQube scan to build workflow
Some checks failed
build-and-push / lint (push) Successful in 5s
build-and-push / sonar (push) Failing after 12s
build-and-push / docker (push) Has been skipped

- introduce SonarQube scanning step for code quality analysis
- update workflow dependencies and execution order

🐛 fix(auth): improve error handling and code formatting

- remove unused imports and fix code indentation
- enhance error handling with improved catch blocks

💄 style(general): standardize code formatting and style consistency

- update various files to ensure consistent code style
- adjust indentation and whitespace for readability
This commit is contained in:
nocci 2025-12-30 12:38:03 +00:00
parent 0e5303da62
commit d40a577f47
7 changed files with 95 additions and 62 deletions

View file

@ -96,21 +96,21 @@ const timeoutPlugin = timeout => enquirer => { // cancel prompt after timeout ms
prompt.hint = () => 'timeout';
prompt.cancel();
}, timeout);
prompt.on('submit', _ => clearTimeout(t));
prompt.on('cancel', _ => clearTimeout(t));
prompt.on('submit', () => clearTimeout(t));
prompt.on('cancel', () => clearTimeout(t));
});
};
enquirer.use(timeoutPlugin(cfg.login_timeout)); // TODO may not want to have this timeout for all prompts; better extend Prompt and add a timeout prompt option
// single prompt that just returns the non-empty value instead of an object
// @ts-ignore
export const prompt = o => enquirer.prompt({ name: 'name', type: 'input', message: 'Enter value', ...o }).then(r => r.name).catch(_ => {});
export const prompt = o => enquirer.prompt({ name: 'name', type: 'input', message: 'Enter value', ...o }).then(r => r.name).catch(() => {});
export const confirm = o => prompt({ type: 'confirm', message: 'Continue?', ...o });
// notifications via apprise CLI
import { execFile } from 'child_process';
import { cfg } from './config.js';
export const notify = html => new Promise((resolve, reject) => {
export const notify = html => new Promise(resolve => {
if (!cfg.notify) {
if (cfg.debug) console.debug('notify: NOTIFY is not set!');
return resolve();