@wix/evalforge-evaluator 0.65.0 → 0.67.0
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/build/index.js
CHANGED
|
@@ -6546,28 +6546,54 @@ spawn error: ${err.message}`;
|
|
|
6546
6546
|
}
|
|
6547
6547
|
async function probeNpmConfig(cwd) {
|
|
6548
6548
|
const homedir = process.env.HOME ?? "~";
|
|
6549
|
-
const [
|
|
6549
|
+
const [
|
|
6550
|
+
cwdNpmrc,
|
|
6551
|
+
homeNpmrc,
|
|
6552
|
+
projectRootNpmrc,
|
|
6553
|
+
globalNpmrc,
|
|
6554
|
+
npmConfigListFull,
|
|
6555
|
+
npmConfigGetRegistry,
|
|
6556
|
+
npmViewWixMcp
|
|
6557
|
+
] = await Promise.all([
|
|
6550
6558
|
(0, import_promises4.readFile)((0, import_path6.join)(cwd, ".npmrc"), "utf8").catch(
|
|
6551
6559
|
(e) => `[not found: ${e.message}]`
|
|
6552
6560
|
),
|
|
6553
6561
|
(0, import_promises4.readFile)((0, import_path6.join)(homedir, ".npmrc"), "utf8").catch(
|
|
6554
6562
|
(e) => `[not found: ${e.message}]`
|
|
6555
6563
|
),
|
|
6556
|
-
|
|
6557
|
-
|
|
6564
|
+
(0, import_promises4.readFile)("/user-code/.npmrc", "utf8").catch(
|
|
6565
|
+
(e) => `[not found: ${e.message}]`
|
|
6566
|
+
),
|
|
6567
|
+
runShellCapture(
|
|
6568
|
+
'echo "=== globalconfig ===" && npm config get globalconfig && cat "$(npm config get globalconfig)" 2>/dev/null || echo "[no global npmrc]" && echo "=== userconfig ===" && npm config get userconfig && cat "$(npm config get userconfig)" 2>/dev/null || echo "[no user npmrc]" && echo "=== prefix ===" && npm config get prefix && cat "$(npm config get prefix)/etc/npmrc" 2>/dev/null || echo "[no prefix npmrc]"',
|
|
6569
|
+
cwd,
|
|
6570
|
+
5e3
|
|
6571
|
+
),
|
|
6572
|
+
runShellCapture("npm config list -l 2>&1 | head -60", cwd, 5e3),
|
|
6573
|
+
runShellCapture("npm config get registry", cwd, 3e3),
|
|
6574
|
+
runShellCapture(
|
|
6575
|
+
"npm view @wix/mcp version --registry https://registry.npmjs.org 2>&1",
|
|
6576
|
+
cwd,
|
|
6577
|
+
1e4
|
|
6578
|
+
)
|
|
6558
6579
|
]);
|
|
6559
6580
|
const npmEnvVars = {};
|
|
6560
6581
|
for (const [key, value] of Object.entries(process.env)) {
|
|
6561
|
-
|
|
6562
|
-
|
|
6582
|
+
const lk = key.toLowerCase();
|
|
6583
|
+
if (lk.startsWith("npm_config") || lk.includes("token") || lk.includes("auth") || lk.includes("registry")) {
|
|
6584
|
+
npmEnvVars[key] = lk.includes("token") || lk.includes("auth") || lk.includes("secret") ? `[REDACTED, length=${(value ?? "").length}]` : value;
|
|
6563
6585
|
}
|
|
6564
6586
|
}
|
|
6565
6587
|
return {
|
|
6566
6588
|
cwd,
|
|
6589
|
+
processCwd: process.cwd(),
|
|
6567
6590
|
cwdNpmrc: cwdNpmrc.slice(0, 1e3),
|
|
6568
6591
|
homeNpmrc: homeNpmrc.slice(0, 1e3),
|
|
6569
|
-
|
|
6592
|
+
projectRootNpmrc: projectRootNpmrc.slice(0, 1e3),
|
|
6593
|
+
globalNpmrc: globalNpmrc.slice(0, 2e3),
|
|
6594
|
+
npmConfigListFull: npmConfigListFull.slice(0, 3e3),
|
|
6570
6595
|
npmConfigGetRegistry: npmConfigGetRegistry.trim(),
|
|
6596
|
+
npmViewWixMcp: npmViewWixMcp.trim().slice(0, 500),
|
|
6571
6597
|
npmEnvVars,
|
|
6572
6598
|
homedir
|
|
6573
6599
|
};
|
|
@@ -6861,6 +6887,7 @@ async function executeWithClaudeCode(skills, scenario, options) {
|
|
|
6861
6887
|
const startTime = /* @__PURE__ */ new Date();
|
|
6862
6888
|
const allMessages = [];
|
|
6863
6889
|
if (options.mcps && options.mcps.length > 0) {
|
|
6890
|
+
process.env.npm_config__auth = "";
|
|
6864
6891
|
await writeMcpToFilesystem(options.cwd, options.mcps);
|
|
6865
6892
|
const probeResults = await probeMcpServers(options.mcps);
|
|
6866
6893
|
if (options.traceContext) {
|
|
@@ -6903,7 +6930,7 @@ async function executeWithClaudeCode(skills, scenario, options) {
|
|
|
6903
6930
|
outputPreview: JSON.stringify({
|
|
6904
6931
|
event: "npm-config-diagnostic",
|
|
6905
6932
|
...npmDiag
|
|
6906
|
-
}).slice(0,
|
|
6933
|
+
}).slice(0, 8e3),
|
|
6907
6934
|
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
6908
6935
|
isComplete: false
|
|
6909
6936
|
},
|