erne-universal 0.10.4 → 0.10.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dashboard/server.js +3 -5
- package/lib/generate.js +1 -1
- package/lib/init.js +1 -1
- package/lib/scanners/dep-health.js +1 -1
- package/lib/status.js +9 -0
- package/lib/sync-configs.js +2 -1
- package/lib/update.js +5 -5
- package/package.json +1 -1
package/dashboard/server.js
CHANGED
|
@@ -607,20 +607,18 @@ const server = http.createServer(async (req, res) => {
|
|
|
607
607
|
if (urlPath.startsWith('/api/context/')) {
|
|
608
608
|
let body = '';
|
|
609
609
|
let bodyBytes = 0;
|
|
610
|
+
let destroyed = false;
|
|
610
611
|
req.on('data', chunk => {
|
|
611
612
|
bodyBytes += chunk.length;
|
|
612
613
|
if (bodyBytes > MAX_PAYLOAD_BYTES) {
|
|
614
|
+
destroyed = true;
|
|
613
615
|
req.destroy();
|
|
614
616
|
return;
|
|
615
617
|
}
|
|
616
618
|
body += chunk;
|
|
617
619
|
});
|
|
618
620
|
req.on('end', () => {
|
|
619
|
-
if (
|
|
620
|
-
res.writeHead(413, { 'Content-Type': 'application/json' });
|
|
621
|
-
res.end(JSON.stringify({ error: 'Payload too large' }));
|
|
622
|
-
return;
|
|
623
|
-
}
|
|
621
|
+
if (destroyed) return;
|
|
624
622
|
handleContextApi(req, res, urlPath, body);
|
|
625
623
|
});
|
|
626
624
|
return;
|
package/lib/generate.js
CHANGED
|
@@ -282,7 +282,7 @@ function generateConfig(erneRoot, targetDir, detection, profile, mcpSelections)
|
|
|
282
282
|
const agentFiles = fs.readdirSync(agentsSrc);
|
|
283
283
|
for (const file of agentFiles) {
|
|
284
284
|
// Skip native-bridge-builder unless bare-rn
|
|
285
|
-
if (file === 'native-bridge-builder.md' && detection.framework !== 'bare-rn') continue;
|
|
285
|
+
if (file === 'native-bridge-builder.md' && detection.framework !== 'bare-rn' && detection.framework !== 'expo-bare') continue;
|
|
286
286
|
// Skip expo-config-resolver if bare-rn
|
|
287
287
|
if (file === 'expo-config-resolver.md' && detection.framework === 'bare-rn') continue;
|
|
288
288
|
|
package/lib/init.js
CHANGED
|
@@ -52,7 +52,7 @@ function parseArgs() {
|
|
|
52
52
|
break;
|
|
53
53
|
case '--mcp':
|
|
54
54
|
case '-m':
|
|
55
|
-
opts.mcp = args[++i] ? args[i].split(',').map(s => s.trim()) : [];
|
|
55
|
+
opts.mcp = args[++i] ? args[i].split(',').map(s => s.trim()).filter(Boolean) : [];
|
|
56
56
|
break;
|
|
57
57
|
case '--no-mcp':
|
|
58
58
|
opts.noMcp = true;
|
|
@@ -17,7 +17,7 @@ const NPM_TIMEOUT = 5000;
|
|
|
17
17
|
*/
|
|
18
18
|
function scanDepHealth(cwd, deps) {
|
|
19
19
|
const resolvedCwd = path.resolve(cwd);
|
|
20
|
-
const docsDir = path.join(resolvedCwd, 'erne
|
|
20
|
+
const docsDir = path.join(resolvedCwd, '.erne');
|
|
21
21
|
const cachePath = path.join(docsDir, '.dep-health-cache.json');
|
|
22
22
|
|
|
23
23
|
const cache = loadCache(cachePath);
|
package/lib/status.js
CHANGED
|
@@ -17,6 +17,15 @@ const KNOWN_VARIANTS = [
|
|
|
17
17
|
'ui-designer',
|
|
18
18
|
'senior-developer',
|
|
19
19
|
'feature-builder',
|
|
20
|
+
'code-reviewer',
|
|
21
|
+
'tdd-guide',
|
|
22
|
+
'expo-config-resolver',
|
|
23
|
+
'native-bridge-builder',
|
|
24
|
+
'upgrade-assistant',
|
|
25
|
+
'performance-profiler',
|
|
26
|
+
'pipeline-orchestrator',
|
|
27
|
+
'visual-debugger',
|
|
28
|
+
'continuous-learning',
|
|
20
29
|
];
|
|
21
30
|
|
|
22
31
|
/**
|
package/lib/sync-configs.js
CHANGED
|
@@ -206,8 +206,9 @@ function saveSection(result, sectionName, lines) {
|
|
|
206
206
|
result.stack = trimmed;
|
|
207
207
|
} else if (lower.includes('key rules')) {
|
|
208
208
|
result.keyRules = trimmed;
|
|
209
|
+
} else if (lower === 'git') {
|
|
210
|
+
result.git = trimmed;
|
|
209
211
|
}
|
|
210
|
-
// Git is a subsection of Key Rules, handled by splitSubsections
|
|
211
212
|
}
|
|
212
213
|
|
|
213
214
|
/**
|
package/lib/update.js
CHANGED
|
@@ -43,6 +43,11 @@ module.exports = async function update() {
|
|
|
43
43
|
return;
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
+
if (!SEMVER_RE.test(latestVersion)) {
|
|
47
|
+
console.error(` Invalid version format: ${latestVersion}`);
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
|
|
46
51
|
console.log(`\n Updating ${settings.erneVersion} → ${latestVersion}...`);
|
|
47
52
|
|
|
48
53
|
// Re-run init with preserved settings
|
|
@@ -50,11 +55,6 @@ module.exports = async function update() {
|
|
|
50
55
|
console.log(' Running: npx erne-universal@latest init');
|
|
51
56
|
console.log(' Your profile and MCP selections will be preserved.\n');
|
|
52
57
|
|
|
53
|
-
if (!SEMVER_RE.test(latestVersion)) {
|
|
54
|
-
console.error(` Invalid version format: ${latestVersion}`);
|
|
55
|
-
return;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
58
|
try {
|
|
59
59
|
execFileSync('npx', [`erne-universal@${latestVersion}`, 'init'], {
|
|
60
60
|
stdio: 'inherit',
|