@vibgrate/cli 2026.721.3 → 2026.722.2
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/DOCS.md +185 -0
- package/README.md +2 -1
- package/dist/baseline-BD3A7EXD.js +7 -0
- package/dist/{baseline-37G4TINM.js.map → baseline-BD3A7EXD.js.map} +1 -1
- package/dist/chunk-2O5YZVZV.js +417 -0
- package/dist/chunk-2O5YZVZV.js.map +1 -0
- package/dist/{chunk-ELUFCQDR.js → chunk-3MXNNBLI.js} +240 -2519
- package/dist/chunk-3MXNNBLI.js.map +1 -0
- package/dist/{chunk-JLRF5TFA.js → chunk-5BDHQ7DD.js} +42 -71
- package/dist/chunk-5BDHQ7DD.js.map +1 -0
- package/dist/chunk-6CXTPC74.js +234 -0
- package/dist/chunk-6CXTPC74.js.map +1 -0
- package/dist/chunk-CRAMOEBE.js +675 -0
- package/dist/chunk-CRAMOEBE.js.map +1 -0
- package/dist/chunk-CS37OBE3.js +861 -0
- package/dist/chunk-CS37OBE3.js.map +1 -0
- package/dist/chunk-CT5BS56U.js +23 -0
- package/dist/chunk-CT5BS56U.js.map +1 -0
- package/dist/chunk-GGJZA3Q6.js +961 -0
- package/dist/chunk-GGJZA3Q6.js.map +1 -0
- package/dist/chunk-I7GY7MVN.js +833 -0
- package/dist/chunk-I7GY7MVN.js.map +1 -0
- package/dist/chunk-JBXNQCGE.js +484 -0
- package/dist/chunk-JBXNQCGE.js.map +1 -0
- package/dist/chunk-JFGYT6BI.js +32 -0
- package/dist/chunk-JFGYT6BI.js.map +1 -0
- package/dist/chunk-JYS4OBN2.js +148 -0
- package/dist/chunk-JYS4OBN2.js.map +1 -0
- package/dist/chunk-K3SLGULW.js +50 -0
- package/dist/chunk-K3SLGULW.js.map +1 -0
- package/dist/chunk-LEPTUB4H.js +108 -0
- package/dist/chunk-LEPTUB4H.js.map +1 -0
- package/dist/{chunk-5PLKADD6.js → chunk-NONYJLOJ.js} +4 -3
- package/dist/chunk-NONYJLOJ.js.map +1 -0
- package/dist/{chunk-IKJBELUV.js → chunk-PY3DNX5H.js} +4 -29
- package/dist/chunk-PY3DNX5H.js.map +1 -0
- package/dist/chunk-WNIIKCNF.js +972 -0
- package/dist/chunk-WNIIKCNF.js.map +1 -0
- package/dist/cli.js +2512 -1224
- package/dist/cli.js.map +1 -1
- package/dist/fs-KCABDURV.js +3 -0
- package/dist/fs-KCABDURV.js.map +1 -0
- package/dist/index.d.ts +3 -1
- package/dist/index.js +8 -3
- package/dist/index.js.map +1 -1
- package/dist/interactive-A4DISSIW.js +681 -0
- package/dist/interactive-A4DISSIW.js.map +1 -0
- package/dist/mcp-tools-I6PME3AV.js +3 -0
- package/dist/mcp-tools-I6PME3AV.js.map +1 -0
- package/dist/parse-worker.js +2 -1
- package/dist/parse-worker.js.map +1 -1
- package/dist/session-POJUDFPH.js +6 -0
- package/dist/session-POJUDFPH.js.map +1 -0
- package/dist/session-store-W5RZZHA3.js +3 -0
- package/dist/session-store-W5RZZHA3.js.map +1 -0
- package/dist/stream-json-Q2JGWPHB.js +65 -0
- package/dist/stream-json-Q2JGWPHB.js.map +1 -0
- package/dist/ui-HOVOPWMX.js +4 -0
- package/dist/ui-HOVOPWMX.js.map +1 -0
- package/package.json +1 -1
- package/dist/baseline-37G4TINM.js +0 -6
- package/dist/chunk-5PLKADD6.js.map +0 -1
- package/dist/chunk-ELUFCQDR.js.map +0 -1
- package/dist/chunk-IKJBELUV.js.map +0 -1
- package/dist/chunk-JLRF5TFA.js.map +0 -1
|
@@ -19,7 +19,7 @@ import * as zlib from 'zlib';
|
|
|
19
19
|
import { promisify } from 'util';
|
|
20
20
|
|
|
21
21
|
// src/version.ts
|
|
22
|
-
var VERSION = "2026.
|
|
22
|
+
var VERSION = "2026.722.2";
|
|
23
23
|
var TOP_LEVEL_NODE_MODULES = /^node_modules\/((?:@[^/]+\/)?[^/]+)$/;
|
|
24
24
|
function parsePackageLock(json) {
|
|
25
25
|
const out = /* @__PURE__ */ new Map();
|
|
@@ -138,8 +138,8 @@ async function loadNpmLockIndex(dir, io) {
|
|
|
138
138
|
// src/core-open/utils/timeout.ts
|
|
139
139
|
async function withTimeout(promise, ms) {
|
|
140
140
|
let timer;
|
|
141
|
-
const timeout = new Promise((
|
|
142
|
-
timer = setTimeout(() =>
|
|
141
|
+
const timeout = new Promise((resolve7) => {
|
|
142
|
+
timer = setTimeout(() => resolve7({ ok: false }), ms);
|
|
143
143
|
});
|
|
144
144
|
try {
|
|
145
145
|
const result = await Promise.race([
|
|
@@ -152,7 +152,7 @@ async function withTimeout(promise, ms) {
|
|
|
152
152
|
}
|
|
153
153
|
}
|
|
154
154
|
function runCommand(cmd, args) {
|
|
155
|
-
return new Promise((
|
|
155
|
+
return new Promise((resolve7, reject) => {
|
|
156
156
|
const child = spawn(cmd, args, { stdio: ["ignore", "pipe", "pipe"] });
|
|
157
157
|
let out = "";
|
|
158
158
|
let err = "";
|
|
@@ -164,7 +164,7 @@ function runCommand(cmd, args) {
|
|
|
164
164
|
reject(new Error(`${cmd} ${args.join(" ")} failed (code=${code}): ${err.trim()}`));
|
|
165
165
|
return;
|
|
166
166
|
}
|
|
167
|
-
|
|
167
|
+
resolve7(out);
|
|
168
168
|
});
|
|
169
169
|
});
|
|
170
170
|
}
|
|
@@ -294,7 +294,7 @@ function buildNpmViewChunks(pkgs, platform = process.platform) {
|
|
|
294
294
|
return chunks;
|
|
295
295
|
}
|
|
296
296
|
async function npmViewJson(args, cwd) {
|
|
297
|
-
return new Promise((
|
|
297
|
+
return new Promise((resolve7, reject) => {
|
|
298
298
|
const child = spawn(NPM_COMMAND, ["view", ...args, "--json"], {
|
|
299
299
|
cwd,
|
|
300
300
|
stdio: ["ignore", "pipe", "pipe"]
|
|
@@ -311,13 +311,13 @@ async function npmViewJson(args, cwd) {
|
|
|
311
311
|
}
|
|
312
312
|
const trimmed = out.trim();
|
|
313
313
|
if (!trimmed) {
|
|
314
|
-
|
|
314
|
+
resolve7(null);
|
|
315
315
|
return;
|
|
316
316
|
}
|
|
317
317
|
try {
|
|
318
|
-
|
|
318
|
+
resolve7(JSON.parse(trimmed));
|
|
319
319
|
} catch {
|
|
320
|
-
|
|
320
|
+
resolve7(trimmed.replace(/^"|"$/g, ""));
|
|
321
321
|
}
|
|
322
322
|
});
|
|
323
323
|
});
|
|
@@ -6871,12 +6871,12 @@ function computeDriftScore(projects) {
|
|
|
6871
6871
|
(dep) => ({ unsupported: dep.unsupported === true, abandoned: dep.abandoned === true })
|
|
6872
6872
|
);
|
|
6873
6873
|
const rs = runtimeScore(projects);
|
|
6874
|
-
const
|
|
6874
|
+
const fs8 = frameworkScore(projects);
|
|
6875
6875
|
const ds = depAgg ? 100 - depAgg.drift : null;
|
|
6876
6876
|
const es = eolScore(projects);
|
|
6877
6877
|
const components = [
|
|
6878
6878
|
{ score: rs, weight: 0.25 },
|
|
6879
|
-
{ score:
|
|
6879
|
+
{ score: fs8, weight: 0.25 },
|
|
6880
6880
|
{ score: ds, weight: 0.3 },
|
|
6881
6881
|
{ score: es, weight: 0.2 }
|
|
6882
6882
|
];
|
|
@@ -6885,7 +6885,7 @@ function computeDriftScore(projects) {
|
|
|
6885
6885
|
const buildComponents = () => {
|
|
6886
6886
|
const c = {
|
|
6887
6887
|
runtimeScore: toDrift(Math.round(rs ?? 100)),
|
|
6888
|
-
frameworkScore: toDrift(Math.round(
|
|
6888
|
+
frameworkScore: toDrift(Math.round(fs8 ?? 100)),
|
|
6889
6889
|
dependencyScore: toDrift(Math.round(ds ?? 100)),
|
|
6890
6890
|
eolScore: toDrift(Math.round(es ?? 100))
|
|
6891
6891
|
};
|
|
@@ -6929,7 +6929,7 @@ function computeDriftScore(projects) {
|
|
|
6929
6929
|
else riskLevel = "high";
|
|
6930
6930
|
const measured = [];
|
|
6931
6931
|
if (rs !== null) measured.push("runtime");
|
|
6932
|
-
if (
|
|
6932
|
+
if (fs8 !== null) measured.push("framework");
|
|
6933
6933
|
if (ds !== null) measured.push("dependency");
|
|
6934
6934
|
if (es !== null) measured.push("eol");
|
|
6935
6935
|
return {
|
|
@@ -8266,11 +8266,11 @@ async function findGitDir(startDir) {
|
|
|
8266
8266
|
while (dir !== root) {
|
|
8267
8267
|
const gitPath = path29.join(dir, ".git");
|
|
8268
8268
|
try {
|
|
8269
|
-
const
|
|
8270
|
-
if (
|
|
8269
|
+
const stat3 = await fs2.stat(gitPath);
|
|
8270
|
+
if (stat3.isDirectory()) {
|
|
8271
8271
|
return gitPath;
|
|
8272
8272
|
}
|
|
8273
|
-
if (
|
|
8273
|
+
if (stat3.isFile()) {
|
|
8274
8274
|
const content = (await fs2.readFile(gitPath, "utf8")).trim();
|
|
8275
8275
|
if (content.startsWith("gitdir: ")) {
|
|
8276
8276
|
const resolved = path29.resolve(dir, content.slice(8));
|
|
@@ -8323,8 +8323,8 @@ async function readGitRemoteUrl(gitDir) {
|
|
|
8323
8323
|
async function resolveGitConfigPath(gitDir) {
|
|
8324
8324
|
const directConfig = path29.join(gitDir, "config");
|
|
8325
8325
|
try {
|
|
8326
|
-
const
|
|
8327
|
-
if (
|
|
8326
|
+
const stat3 = await fs2.stat(directConfig);
|
|
8327
|
+
if (stat3.isFile()) return directConfig;
|
|
8328
8328
|
} catch {
|
|
8329
8329
|
}
|
|
8330
8330
|
const commonDirFile = path29.join(gitDir, "commondir");
|
|
@@ -8333,8 +8333,8 @@ async function resolveGitConfigPath(gitDir) {
|
|
|
8333
8333
|
if (!commonDir) return void 0;
|
|
8334
8334
|
const resolvedCommonDir = path29.resolve(gitDir, commonDir);
|
|
8335
8335
|
const commonConfig = path29.join(resolvedCommonDir, "config");
|
|
8336
|
-
const
|
|
8337
|
-
if (
|
|
8336
|
+
const stat3 = await fs2.stat(commonConfig);
|
|
8337
|
+
if (stat3.isFile()) return commonConfig;
|
|
8338
8338
|
} catch {
|
|
8339
8339
|
return void 0;
|
|
8340
8340
|
}
|
|
@@ -8365,8 +8365,8 @@ var ProgressTrace = class _ProgressTrace {
|
|
|
8365
8365
|
flushed = false;
|
|
8366
8366
|
/** Returns a trace when VIBGRATE_TRACE_EVENTS is set, else null. */
|
|
8367
8367
|
static fromEnv() {
|
|
8368
|
-
const
|
|
8369
|
-
return
|
|
8368
|
+
const path33 = process.env.VIBGRATE_TRACE_EVENTS;
|
|
8369
|
+
return path33 ? new _ProgressTrace(path33) : null;
|
|
8370
8370
|
}
|
|
8371
8371
|
record(op, data = {}) {
|
|
8372
8372
|
if (this.flushed) return;
|
|
@@ -9405,7 +9405,7 @@ function manifestAdvisoryToAdvisory(m) {
|
|
|
9405
9405
|
};
|
|
9406
9406
|
}
|
|
9407
9407
|
function sleep(ms) {
|
|
9408
|
-
return new Promise((
|
|
9408
|
+
return new Promise((resolve7) => setTimeout(resolve7, ms));
|
|
9409
9409
|
}
|
|
9410
9410
|
async function fetchJson(url, init, sem) {
|
|
9411
9411
|
return sem.run(async () => {
|
|
@@ -9589,7 +9589,7 @@ var GIT_MAX_BUFFER = 64 * 1024 * 1024;
|
|
|
9589
9589
|
var DEFAULT_MAX_COMMITS = 500;
|
|
9590
9590
|
var FIELD_SEP = "";
|
|
9591
9591
|
function runGit(cwd, args) {
|
|
9592
|
-
return new Promise((
|
|
9592
|
+
return new Promise((resolve7) => {
|
|
9593
9593
|
execFile(
|
|
9594
9594
|
"git",
|
|
9595
9595
|
args,
|
|
@@ -9608,8 +9608,8 @@ function runGit(cwd, args) {
|
|
|
9608
9608
|
}
|
|
9609
9609
|
},
|
|
9610
9610
|
(err, stdout) => {
|
|
9611
|
-
if (err)
|
|
9612
|
-
else
|
|
9611
|
+
if (err) resolve7({ ok: false, stdout: "" });
|
|
9612
|
+
else resolve7({ ok: true, stdout: typeof stdout === "string" ? stdout : String(stdout) });
|
|
9613
9613
|
}
|
|
9614
9614
|
);
|
|
9615
9615
|
});
|
|
@@ -9753,18 +9753,18 @@ function walkV1Dependencies(deps, out) {
|
|
|
9753
9753
|
}
|
|
9754
9754
|
function parsePnpmPackageKey(key) {
|
|
9755
9755
|
const k = key.replace(/^\//, "");
|
|
9756
|
-
let
|
|
9756
|
+
let sep2 = -1;
|
|
9757
9757
|
for (let i = k.startsWith("@") ? 1 : 0; i < k.length - 1; i++) {
|
|
9758
9758
|
if (k[i] === "@" && /[0-9]/.test(k[i + 1])) {
|
|
9759
|
-
|
|
9759
|
+
sep2 = i;
|
|
9760
9760
|
break;
|
|
9761
9761
|
}
|
|
9762
9762
|
}
|
|
9763
9763
|
let name;
|
|
9764
9764
|
let rest;
|
|
9765
|
-
if (
|
|
9766
|
-
name = k.slice(0,
|
|
9767
|
-
rest = k.slice(
|
|
9765
|
+
if (sep2 > 0) {
|
|
9766
|
+
name = k.slice(0, sep2);
|
|
9767
|
+
rest = k.slice(sep2 + 1);
|
|
9768
9768
|
} else {
|
|
9769
9769
|
const slash = k.lastIndexOf("/");
|
|
9770
9770
|
if (slash <= 0) return null;
|
|
@@ -9986,16 +9986,16 @@ function parsePomXml(content) {
|
|
|
9986
9986
|
properties["project.version"] = ownVersion;
|
|
9987
9987
|
properties["project.parent.version"] = ownVersion;
|
|
9988
9988
|
}
|
|
9989
|
-
const
|
|
9989
|
+
const resolve7 = (value) => value.replace(/\$\{([^}]+)\}/g, (_, key) => properties[key] ?? `\${${key}}`);
|
|
9990
9990
|
const deps = project.dependencies?.dependency;
|
|
9991
9991
|
for (const dep of pomArray(deps)) {
|
|
9992
9992
|
if (!dep || typeof dep !== "object") continue;
|
|
9993
9993
|
const d = dep;
|
|
9994
9994
|
if (d.version == null) continue;
|
|
9995
|
-
const groupId = d.groupId != null ?
|
|
9996
|
-
const artifactId = d.artifactId != null ?
|
|
9995
|
+
const groupId = d.groupId != null ? resolve7(String(d.groupId)).trim() : "";
|
|
9996
|
+
const artifactId = d.artifactId != null ? resolve7(String(d.artifactId)).trim() : "";
|
|
9997
9997
|
if (!groupId || !artifactId) continue;
|
|
9998
|
-
const version =
|
|
9998
|
+
const version = resolve7(String(d.version)).trim();
|
|
9999
9999
|
if (!isConcreteMavenVersion(version)) continue;
|
|
10000
10000
|
considerVersion(out, `${groupId}:${artifactId}`, version);
|
|
10001
10001
|
}
|
|
@@ -10978,8 +10978,8 @@ function analyzeUsage(root, packageName, ecosystem) {
|
|
|
10978
10978
|
const full = path29.join(dir, entry.name);
|
|
10979
10979
|
let content;
|
|
10980
10980
|
try {
|
|
10981
|
-
const
|
|
10982
|
-
if (
|
|
10981
|
+
const stat3 = fs5.statSync(full);
|
|
10982
|
+
if (stat3.size > MAX_FILE_BYTES) continue;
|
|
10983
10983
|
content = fs5.readFileSync(full, "utf8");
|
|
10984
10984
|
} catch {
|
|
10985
10985
|
continue;
|
|
@@ -11639,8 +11639,8 @@ async function computeTreeMetadataHash(rootDir, options) {
|
|
|
11639
11639
|
const relPath = relDir ? `${relDir}/${entry.name}` : entry.name;
|
|
11640
11640
|
const absPath = path29.join(absDir, entry.name);
|
|
11641
11641
|
try {
|
|
11642
|
-
const
|
|
11643
|
-
leaves.push(`${relPath}|${
|
|
11642
|
+
const stat3 = await fs2.stat(absPath);
|
|
11643
|
+
leaves.push(`${relPath}|${stat3.size}|${stat3.mtimeMs}`);
|
|
11644
11644
|
} catch {
|
|
11645
11645
|
}
|
|
11646
11646
|
}
|
|
@@ -11656,35 +11656,6 @@ async function computeTreeMetadataHash(rootDir, options) {
|
|
|
11656
11656
|
return digest.digest("hex");
|
|
11657
11657
|
}
|
|
11658
11658
|
|
|
11659
|
-
|
|
11660
|
-
|
|
11661
|
-
|
|
11662
|
-
return text.charCodeAt(0) === 65279 ? text.slice(1) : text;
|
|
11663
|
-
}
|
|
11664
|
-
async function readJsonFile2(filePath) {
|
|
11665
|
-
const txt = await fs2.readFile(filePath, "utf8");
|
|
11666
|
-
return JSON.parse(stripBom(txt));
|
|
11667
|
-
}
|
|
11668
|
-
async function pathExists2(p) {
|
|
11669
|
-
try {
|
|
11670
|
-
await fs2.access(p);
|
|
11671
|
-
return true;
|
|
11672
|
-
} catch {
|
|
11673
|
-
return false;
|
|
11674
|
-
}
|
|
11675
|
-
}
|
|
11676
|
-
async function ensureDir2(dir) {
|
|
11677
|
-
await fs2.mkdir(dir, { recursive: true });
|
|
11678
|
-
}
|
|
11679
|
-
async function writeJsonFile2(filePath, data) {
|
|
11680
|
-
await ensureDir2(path29.dirname(filePath));
|
|
11681
|
-
await fs2.writeFile(filePath, JSON.stringify(data, null, 2) + "\n", "utf8");
|
|
11682
|
-
}
|
|
11683
|
-
async function writeTextFile2(filePath, content) {
|
|
11684
|
-
await ensureDir2(path29.dirname(filePath));
|
|
11685
|
-
await fs2.writeFile(filePath, content, "utf8");
|
|
11686
|
-
}
|
|
11687
|
-
|
|
11688
|
-
export { PROJECT_TYPE_TO_OSV_ECOSYSTEM, VERSION, brandProgressBar, buildVersionTimelines, compactUiPurpose, computeDriftScore, computeRepoFingerprint, computeUpgradeImpact, detectVcs, driftBar, ensureDir2 as ensureDir, fetchRiskySymbols, fetchScanPreflight, findPackageAnyEcosystem, findPackageTimeline, findVersionCrossings, getChangelogSignals, gitHistoryAvailable, loadConfig, normalizeConstraint, parseDsn, pathExists2 as pathExists, prepareCompressedUpload, projectTypeToVulnEcosystem, readJsonFile2 as readJsonFile, resolveHead, resolveRepositoryName, runCoreScan, severityRank, titleBox, versionSatisfies, workingTreeDirty, writeDefaultConfig, writeJsonFile2 as writeJsonFile, writeTextFile2 as writeTextFile };
|
|
11689
|
-
//# sourceMappingURL=chunk-JLRF5TFA.js.map
|
|
11690
|
-
//# sourceMappingURL=chunk-JLRF5TFA.js.map
|
|
11659
|
+
export { PROJECT_TYPE_TO_OSV_ECOSYSTEM, VERSION, brandProgressBar, buildVersionTimelines, compactUiPurpose, computeDriftScore, computeRepoFingerprint, computeUpgradeImpact, detectVcs, driftBar, fetchRiskySymbols, fetchScanPreflight, findPackageAnyEcosystem, findPackageTimeline, findVersionCrossings, getChangelogSignals, gitHistoryAvailable, loadConfig, normalizeConstraint, parseDsn, prepareCompressedUpload, projectTypeToVulnEcosystem, resolveHead, resolveRepositoryName, runCoreScan, severityRank, titleBox, versionSatisfies, workingTreeDirty, writeDefaultConfig };
|
|
11660
|
+
//# sourceMappingURL=chunk-5BDHQ7DD.js.map
|
|
11661
|
+
//# sourceMappingURL=chunk-5BDHQ7DD.js.map
|