@yawlabs/npmjs-mcp 0.11.4 → 0.11.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/dist/index.js +17 -8
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -31887,6 +31887,7 @@ var dependencyTools = [
|
|
|
31887
31887
|
const maxDepth = input.depth ?? 3;
|
|
31888
31888
|
const runLimited = createLimiter(10);
|
|
31889
31889
|
const packumentCache = /* @__PURE__ */ new Map();
|
|
31890
|
+
const failedPackages = /* @__PURE__ */ new Set();
|
|
31890
31891
|
const resolved = /* @__PURE__ */ new Set();
|
|
31891
31892
|
const tree = {};
|
|
31892
31893
|
const warnings = [];
|
|
@@ -31894,16 +31895,24 @@ var dependencyTools = [
|
|
|
31894
31895
|
const hintKey = `${name}@${versionHint2}`;
|
|
31895
31896
|
if (resolved.has(hintKey) || currentDepth > maxDepth) return;
|
|
31896
31897
|
resolved.add(hintKey);
|
|
31897
|
-
let
|
|
31898
|
+
let pending = packumentCache.get(name);
|
|
31899
|
+
if (!pending) {
|
|
31900
|
+
pending = runLimited(() => registryGetAbbreviated(`/${encPkg(name)}`)).then((res) => {
|
|
31901
|
+
if (!res.ok) {
|
|
31902
|
+
warnings.push(`Failed to fetch ${name}: ${res.error}`);
|
|
31903
|
+
return null;
|
|
31904
|
+
}
|
|
31905
|
+
return res.data;
|
|
31906
|
+
});
|
|
31907
|
+
packumentCache.set(name, pending);
|
|
31908
|
+
}
|
|
31909
|
+
const pkg = await pending;
|
|
31898
31910
|
if (!pkg) {
|
|
31899
|
-
|
|
31900
|
-
|
|
31901
|
-
warnings.push(`Failed to fetch ${name}: ${res.error}`);
|
|
31911
|
+
if (!failedPackages.has(name)) {
|
|
31912
|
+
failedPackages.add(name);
|
|
31902
31913
|
tree[hintKey] = { version: versionHint2, dependencies: {}, failed: true };
|
|
31903
|
-
return;
|
|
31904
31914
|
}
|
|
31905
|
-
|
|
31906
|
-
packumentCache.set(name, pkg);
|
|
31915
|
+
return;
|
|
31907
31916
|
}
|
|
31908
31917
|
let resolvedVersion;
|
|
31909
31918
|
if (pkg.versions[versionHint2]) {
|
|
@@ -34201,7 +34210,7 @@ var writeTools = [
|
|
|
34201
34210
|
];
|
|
34202
34211
|
|
|
34203
34212
|
// src/index.ts
|
|
34204
|
-
var version2 = true ? "0.11.
|
|
34213
|
+
var version2 = true ? "0.11.5" : (await null).createRequire(import.meta.url)("../package.json").version;
|
|
34205
34214
|
var subcommand = process.argv[2];
|
|
34206
34215
|
if (subcommand === "version" || subcommand === "--version" || subcommand === "-v" || subcommand === "-V") {
|
|
34207
34216
|
console.log(version2);
|
package/package.json
CHANGED