evolcore 0.0.37 → 0.0.38
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/CHANGELOG.md +7 -0
- package/dist/utils/npm-ops.js +22 -6
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dist/utils/npm-ops.js
CHANGED
|
@@ -394,20 +394,36 @@ export async function preparePackageCache(target, registry, options = {}) {
|
|
|
394
394
|
const run = (args) => new Promise((resolve, reject) => {
|
|
395
395
|
let failure = null;
|
|
396
396
|
let output = '';
|
|
397
|
+
let errorOutput = '';
|
|
397
398
|
const child = execFile(npm.command, [...npm.argsPrefix, ...args, '--registry', registry, ...npmConfigArgs(options.npmConfig), '--ignore-scripts'], {
|
|
398
399
|
timeout: 180_000, windowsHide: isWindows, signal: options.signal, maxBuffer: 8 * 1024 * 1024,
|
|
399
|
-
}, (error, stdout) => {
|
|
400
|
+
}, (error, stdout, stderr) => {
|
|
401
|
+
failure = error;
|
|
402
|
+
output = String(stdout ?? '');
|
|
403
|
+
errorOutput = String(stderr ?? '');
|
|
404
|
+
});
|
|
400
405
|
child.once('error', error => { failure = error; });
|
|
401
406
|
child.once('close', code => {
|
|
402
|
-
if (failure
|
|
403
|
-
reject(new Error(options.signal?.aborted
|
|
404
|
-
? 'Package cache preparation timed out or was cancelled' : 'npm cache preparation failed; check registry connectivity, credentials, disk space and permissions'));
|
|
405
|
-
else
|
|
407
|
+
if (!failure && code === 0 && !options.signal?.aborted) {
|
|
406
408
|
resolve(output);
|
|
409
|
+
return;
|
|
410
|
+
}
|
|
411
|
+
if (options.signal?.aborted) {
|
|
412
|
+
reject(new Error('Package cache preparation timed out or was cancelled'));
|
|
413
|
+
return;
|
|
414
|
+
}
|
|
415
|
+
const codeText = failure && 'code' in failure && failure.code ? ` (${String(failure.code)})` : '';
|
|
416
|
+
const detail = (errorOutput || failure?.stderr || failure?.message || '')
|
|
417
|
+
.replace(/\s+/g, ' ').trim().slice(0, 500);
|
|
418
|
+
reject(new Error(`npm cache preparation failed${codeText}${detail ? `: ${detail}` : ''}`));
|
|
407
419
|
});
|
|
408
420
|
});
|
|
409
421
|
options.onPhase?.('downloading');
|
|
410
|
-
|
|
422
|
+
// Revalidate registry metadata before resolving the exact version. A stale
|
|
423
|
+
// install-v1 packument can otherwise report ETARGET even when the registry
|
|
424
|
+
// already contains the selected release. The tarball itself remains cached
|
|
425
|
+
// and is reused when npm can do so.
|
|
426
|
+
await run(['cache', 'add', spec, '--prefer-online']);
|
|
411
427
|
options.onPhase?.('tarball-check');
|
|
412
428
|
const metadata = JSON.parse(await run(['view', spec, 'name', 'version', 'dist', '--json', '--offline']));
|
|
413
429
|
const [packed] = JSON.parse(await run(['pack', spec, '--dry-run', '--json', '--offline']));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "evolcore",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.38",
|
|
4
4
|
"description": "AI Agent gateway connecting Claude, Codex, Gemini, and the bundled ecagent runner to messaging channels with multi-project session management",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|