mirror of
https://github.com/affaan-m/everything-claude-code.git
synced 2026-05-18 23:03:06 +08:00
test: stabilize repair lifecycle on Windows
This commit is contained in:
@@ -3,7 +3,7 @@ const globals = require('globals');
|
|||||||
|
|
||||||
module.exports = [
|
module.exports = [
|
||||||
{
|
{
|
||||||
ignores: ['.opencode/dist/**', '.cursor/**', 'node_modules/**']
|
ignores: ['.opencode/dist/**', '.cursor/**', 'node_modules/**', '.venv/**', 'venv/**', 'coverage/**']
|
||||||
},
|
},
|
||||||
js.configs.recommended,
|
js.configs.recommended,
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ const INSTALL_SCRIPT = path.join(__dirname, '..', '..', 'scripts', 'install-appl
|
|||||||
const DOCTOR_SCRIPT = path.join(__dirname, '..', '..', 'scripts', 'doctor.js');
|
const DOCTOR_SCRIPT = path.join(__dirname, '..', '..', 'scripts', 'doctor.js');
|
||||||
const REPAIR_SCRIPT = path.join(__dirname, '..', '..', 'scripts', 'repair.js');
|
const REPAIR_SCRIPT = path.join(__dirname, '..', '..', 'scripts', 'repair.js');
|
||||||
const REPO_ROOT = path.join(__dirname, '..', '..');
|
const REPO_ROOT = path.join(__dirname, '..', '..');
|
||||||
|
const CLI_TIMEOUT_MS = 30000;
|
||||||
const CURRENT_PACKAGE_VERSION = JSON.parse(
|
const CURRENT_PACKAGE_VERSION = JSON.parse(
|
||||||
fs.readFileSync(path.join(REPO_ROOT, 'package.json'), 'utf8')
|
fs.readFileSync(path.join(REPO_ROOT, 'package.json'), 'utf8')
|
||||||
).version;
|
).version;
|
||||||
@@ -51,7 +52,7 @@ function runNode(scriptPath, args = [], options = {}) {
|
|||||||
env,
|
env,
|
||||||
encoding: 'utf8',
|
encoding: 'utf8',
|
||||||
stdio: ['pipe', 'pipe', 'pipe'],
|
stdio: ['pipe', 'pipe', 'pipe'],
|
||||||
timeout: 10000,
|
timeout: options.timeout || CLI_TIMEOUT_MS,
|
||||||
});
|
});
|
||||||
|
|
||||||
return { code: 0, stdout, stderr: '' };
|
return { code: 0, stdout, stderr: '' };
|
||||||
@@ -59,7 +60,7 @@ function runNode(scriptPath, args = [], options = {}) {
|
|||||||
return {
|
return {
|
||||||
code: error.status || 1,
|
code: error.status || 1,
|
||||||
stdout: error.stdout || '',
|
stdout: error.stdout || '',
|
||||||
stderr: error.stderr || '',
|
stderr: error.stderr || error.message || '',
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user