mirror of
https://github.com/abhigyanpatwari/GitNexus.git
synced 2026-10-29 06:32:28 +00:00
Some checks failed
Devcontainer Smoke / Config-transform unit tests (push) Has been cancelled
Devcontainer Smoke / Build devcontainer image (default) (push) Has been cancelled
Publish Development Images / publish (core) (push) Has been cancelled
Publish Development Images / publish (ui) (push) Has been cancelled
Devcontainer Smoke / Build devcontainer image (ui) (push) Has been cancelled
CodeQL / Analyze (python) (push) Waiting to run
CodeQL / Analyze (javascript-typescript) (push) Waiting to run
Gitleaks / gitleaks (push) Waiting to run
Publish / ci (push) Blocked by required conditions
Publish / Classify release event (push) Waiting to run
Publish / RC guard (marker + release-PR skip) (push) Blocked by required conditions
Publish / Publish to npm (push) Blocked by required conditions
Publish / Build & Push RC Docker images (push) Blocked by required conditions
Scorecard / Scorecard analysis (push) Waiting to run
Skill copy sync / shipped skills drift guard (push) Waiting to run
Trivy Image Scan / Trivy (gitnexus-cli) (push) Waiting to run
Trivy Image Scan / Trivy (gitnexus-web) (push) Waiting to run
39 lines
1.2 KiB
JavaScript
39 lines
1.2 KiB
JavaScript
'use strict';
|
|
const path = require('node:path');
|
|
const os = require('node:os');
|
|
const { execFileSync } = require('node:child_process');
|
|
const { read, workerBudget } = require('./resources.cjs');
|
|
|
|
const root = path.resolve(process.argv[2] || '/workspace');
|
|
console.log(
|
|
`[doctor] Node ${process.version}; ${os.availableParallelism()} available CPUs; suggested dev test workers ${workerBudget()}`,
|
|
);
|
|
for (const file of [
|
|
'/sys/fs/cgroup/memory.max',
|
|
'/sys/fs/cgroup/memory.current',
|
|
'/sys/fs/cgroup/memory.events',
|
|
'/sys/fs/cgroup/cpu.max',
|
|
'/proc/pressure/memory',
|
|
'/proc/pressure/io',
|
|
'/proc/sys/fs/inotify/max_user_watches',
|
|
'/proc/sys/fs/inotify/max_user_instances',
|
|
])
|
|
console.log(`[doctor] ${file}: ${read(file)}`);
|
|
for (const [command, args] of [
|
|
['findmnt', ['-rn', '-T', root, '-o', 'FSTYPE,OPTIONS']],
|
|
['df', ['-h', root]],
|
|
['df', ['-i', root]],
|
|
['bash', ['-c', 'ulimit -n']],
|
|
]) {
|
|
try {
|
|
console.log(execFileSync(command, args, { encoding: 'utf8', timeout: 5000 }).trim());
|
|
} catch {
|
|
console.log(`[doctor] ${command}: unavailable`);
|
|
}
|
|
}
|
|
try {
|
|
require('./verify-git-hooks.cjs').verifyGitHooks(root);
|
|
console.log('[doctor] Husky hooks verified');
|
|
} catch (error) {
|
|
console.log(`[doctor] Husky: ${error.message}`);
|
|
}
|