@yawlabs/npmjs-mcp 0.11.7 → 0.11.8
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 +32 -10
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -31569,7 +31569,11 @@ var analysisTools = [
|
|
|
31569
31569
|
isDeprecated,
|
|
31570
31570
|
isStale
|
|
31571
31571
|
},
|
|
31572
|
-
|
|
31572
|
+
// Holistic single-string verdict layered priority-first: a deprecated
|
|
31573
|
+
// package supersedes everything (don't use it), a vulnerable package
|
|
31574
|
+
// supersedes maintenance signals (active development doesn't undo a
|
|
31575
|
+
// CVE), then staleness, recency, and the catch-all.
|
|
31576
|
+
assessment: isDeprecated ? "DEPRECATED" : vulnerabilityCount !== null && vulnerabilityCount > 0 ? "VULNERABLE" : isStale ? "STALE" : daysSinceLastPublish !== null && daysSinceLastPublish < 90 ? "ACTIVE" : "MAINTENANCE"
|
|
31573
31577
|
}
|
|
31574
31578
|
};
|
|
31575
31579
|
}
|
|
@@ -31782,7 +31786,12 @@ var authTools = [
|
|
|
31782
31786
|
error: `Token failed /-/whoami check. Token is invalid, expired, or revoked. Create a new one at https://www.npmjs.com/settings/~/tokens. Raw: ${whoami.error}`
|
|
31783
31787
|
};
|
|
31784
31788
|
}
|
|
31785
|
-
const
|
|
31789
|
+
const tfaData = profile.ok ? profile.data?.tfa : null;
|
|
31790
|
+
const tfa = tfaData ? {
|
|
31791
|
+
enabled: !tfaData.pending,
|
|
31792
|
+
mode: tfaData.mode,
|
|
31793
|
+
...tfaData.pending ? { pending: true } : {}
|
|
31794
|
+
} : { enabled: false };
|
|
31786
31795
|
return {
|
|
31787
31796
|
ok: true,
|
|
31788
31797
|
status: 200,
|
|
@@ -31960,7 +31969,7 @@ var dependencyTools = [
|
|
|
31960
31969
|
},
|
|
31961
31970
|
{
|
|
31962
31971
|
name: "npm_license_check",
|
|
31963
|
-
description: "Check the license of a package and its direct production dependencies. Flags missing or non-standard licenses.",
|
|
31972
|
+
description: "Check the license of a package and its direct production dependencies. Flags missing or non-standard licenses. Matches single SPDX license identifiers case-insensitively (so 'mit' and 'MIT' both match). SPDX expressions like '(MIT OR Apache-2.0)' are NOT decomposed \u2014 they are flagged unless added to `allowed` verbatim.",
|
|
31964
31973
|
annotations: {
|
|
31965
31974
|
title: "Check licenses",
|
|
31966
31975
|
readOnlyHint: true,
|
|
@@ -31998,17 +32007,17 @@ var dependencyTools = [
|
|
|
31998
32007
|
};
|
|
31999
32008
|
})
|
|
32000
32009
|
);
|
|
32001
|
-
const
|
|
32002
|
-
|
|
32003
|
-
);
|
|
32010
|
+
const defaultAllowed = ["MIT", "ISC", "BSD-2-Clause", "BSD-3-Clause", "Apache-2.0", "0BSD", "Unlicense"];
|
|
32011
|
+
const allowedInput = input.allowed ?? defaultAllowed;
|
|
32012
|
+
const allowedSet = new Set(allowedInput.map((l) => l.toLowerCase()));
|
|
32004
32013
|
const results = [{ name: pkg.name, version: pkg.version, license: pkg.license ?? "UNKNOWN" }, ...depLicenses];
|
|
32005
|
-
const flagged = results.filter((r) => !allowedSet.has(r.license));
|
|
32014
|
+
const flagged = results.filter((r) => !allowedSet.has(r.license.toLowerCase()));
|
|
32006
32015
|
return {
|
|
32007
32016
|
ok: true,
|
|
32008
32017
|
status: 200,
|
|
32009
32018
|
data: {
|
|
32010
32019
|
total: results.length,
|
|
32011
|
-
allowed:
|
|
32020
|
+
allowed: allowedInput,
|
|
32012
32021
|
flagged: flagged.length,
|
|
32013
32022
|
packages: results,
|
|
32014
32023
|
issues: flagged.length > 0 ? flagged : void 0
|
|
@@ -33365,7 +33374,9 @@ var writeTools = [
|
|
|
33365
33374
|
inputSchema: external_exports.object({
|
|
33366
33375
|
name: external_exports.string().describe("Package name (e.g. '@yawlabs/spend')"),
|
|
33367
33376
|
message: external_exports.string().describe("Deprecation message. Empty string to clear deprecation (use npm_undeprecate instead)."),
|
|
33368
|
-
versionRange: external_exports.string().optional().describe(
|
|
33377
|
+
versionRange: external_exports.string().optional().describe(
|
|
33378
|
+
"Semver range. Omit to deprecate ALL versions. Example: '<1.0.0' or '0.3.x'. Standard semver applies \u2014 bare integers are x-ranges (e.g. '0' means '0.x.x', not exact version 0). For a single version use '=1.2.3'."
|
|
33379
|
+
)
|
|
33369
33380
|
}),
|
|
33370
33381
|
handler: async (input) => {
|
|
33371
33382
|
const authErr = requireAuth();
|
|
@@ -34210,7 +34221,7 @@ var writeTools = [
|
|
|
34210
34221
|
];
|
|
34211
34222
|
|
|
34212
34223
|
// src/index.ts
|
|
34213
|
-
var version2 = true ? "0.11.
|
|
34224
|
+
var version2 = true ? "0.11.8" : (await null).createRequire(import.meta.url)("../package.json").version;
|
|
34214
34225
|
var subcommand = process.argv[2];
|
|
34215
34226
|
if (subcommand === "version" || subcommand === "--version" || subcommand === "-v" || subcommand === "-V") {
|
|
34216
34227
|
console.log(version2);
|
|
@@ -34233,6 +34244,17 @@ var allTools = [
|
|
|
34233
34244
|
...writeTools,
|
|
34234
34245
|
...hookTools
|
|
34235
34246
|
];
|
|
34247
|
+
{
|
|
34248
|
+
const seen = /* @__PURE__ */ new Set();
|
|
34249
|
+
const duplicates = [];
|
|
34250
|
+
for (const t of allTools) {
|
|
34251
|
+
if (seen.has(t.name)) duplicates.push(t.name);
|
|
34252
|
+
else seen.add(t.name);
|
|
34253
|
+
}
|
|
34254
|
+
if (duplicates.length > 0) {
|
|
34255
|
+
throw new Error(`Duplicate tool name(s) registered: ${[...new Set(duplicates)].join(", ")}`);
|
|
34256
|
+
}
|
|
34257
|
+
}
|
|
34236
34258
|
var server = new McpServer({
|
|
34237
34259
|
name: "@yawlabs/npmjs-mcp",
|
|
34238
34260
|
version: version2
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yawlabs/npmjs-mcp",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.8",
|
|
4
4
|
"mcpName": "io.github.YawLabs/npmjs-mcp",
|
|
5
5
|
"description": "npm registry MCP server — package intelligence, security audits, and dependency analysis for AI assistants",
|
|
6
6
|
"license": "MIT",
|