@vibgrate/cli 2026.715.1 → 2026.717.1

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.
@@ -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.715.1";
22
+ var VERSION = "2026.717.1";
23
23
  var TOP_LEVEL_NODE_MODULES = /^node_modules\/((?:@[^/]+\/)?[^/]+)$/;
24
24
  function parsePackageLock(json) {
25
25
  const out = /* @__PURE__ */ new Map();
@@ -1170,6 +1170,8 @@ var BUNDLED_RUNTIME_CATALOG = {
1170
1170
  };
1171
1171
 
1172
1172
  // src/core-open/scanners/node-scanner.ts
1173
+ var MS_PER_DAY2 = 864e5;
1174
+ var ABANDONED_MAX_DAYS = 730;
1173
1175
  var KNOWN_FRAMEWORKS = {
1174
1176
  // ── Frontend ──
1175
1177
  "react": "React",
@@ -1437,6 +1439,14 @@ async function scanOnePackageJson(packageJsonPath, rootDir, npmCache, cache, cat
1437
1439
  }
1438
1440
  const ageDays = ageDaysBetween(resolvedVersion, latestStable2, meta.releaseDates);
1439
1441
  const libyears = daysToLibyears(ageDays);
1442
+ const latestIso = latestStable2 ? meta.releaseDates?.[latestStable2] : void 0;
1443
+ let abandoned = false;
1444
+ if (latestIso) {
1445
+ const publishedMs = Date.parse(latestIso);
1446
+ if (!Number.isNaN(publishedMs)) {
1447
+ abandoned = (Date.now() - publishedMs) / MS_PER_DAY2 > ABANDONED_MAX_DAYS;
1448
+ }
1449
+ }
1440
1450
  dependencies.push({
1441
1451
  package: pkg,
1442
1452
  section,
@@ -1447,7 +1457,8 @@ async function scanOnePackageJson(packageJsonPath, rootDir, npmCache, cache, cat
1447
1457
  drift,
1448
1458
  license: buildDependencyLicense(meta.license, "registry"),
1449
1459
  ageDays,
1450
- libyears
1460
+ libyears,
1461
+ ...abandoned ? { abandoned: true } : {}
1451
1462
  });
1452
1463
  if (pkg in KNOWN_FRAMEWORKS) {
1453
1464
  frameworks.push({
@@ -6792,11 +6803,6 @@ function frameworkScore(projects) {
6792
6803
  const avgPenalty = Math.min(avgLag * 15, 100);
6793
6804
  return clamp2(100 - (maxPenalty * 0.6 + avgPenalty * 0.4), 0, 100);
6794
6805
  }
6795
- function dependencyScore(projects) {
6796
- const deps = projects.flatMap((p) => p.dependencies);
6797
- const agg = aggregateDependencyDrift(deps);
6798
- return agg ? 100 - agg.drift : null;
6799
- }
6800
6806
  var MONTH_MS = 1e3 * 60 * 60 * 24 * 30;
6801
6807
  function eolScore(projects) {
6802
6808
  const hasRuntimeData = projects.some(
@@ -6855,9 +6861,18 @@ function coverageConfidence(projects) {
6855
6861
  return Math.round(known / total * 100) / 100;
6856
6862
  }
6857
6863
  function computeDriftScore(projects) {
6864
+ const depAgg = aggregateDependencyDrift(
6865
+ projects.flatMap((p) => p.dependencies),
6866
+ // Per-dependency context for the v3 floors: an unsupported/deprecated major
6867
+ // floors drift at 70, an abandoned ("no pulse") package at 50. Threaded from
6868
+ // the row where the ecosystem scanner set it; absent → the floor doesn't
6869
+ // fire (spec §6.1). Transitive weighting still awaits the lockfile graph, so
6870
+ // manifest deps default to direct.
6871
+ (dep) => ({ unsupported: dep.unsupported === true, abandoned: dep.abandoned === true })
6872
+ );
6858
6873
  const rs = runtimeScore(projects);
6859
6874
  const fs9 = frameworkScore(projects);
6860
- const ds = dependencyScore(projects);
6875
+ const ds = depAgg ? 100 - depAgg.drift : null;
6861
6876
  const es = eolScore(projects);
6862
6877
  const components = [
6863
6878
  { score: rs, weight: 0.25 },
@@ -6876,6 +6891,21 @@ function computeDriftScore(projects) {
6876
6891
  };
6877
6892
  return c;
6878
6893
  };
6894
+ const envelope = depAgg ? {
6895
+ mode: depAgg.mode,
6896
+ dependencyDrift: {
6897
+ p95: depAgg.p95,
6898
+ unsupportedShare: depAgg.unsupportedShare,
6899
+ coverage: depAgg.coverage,
6900
+ top: depAgg.top.map((t) => ({
6901
+ package: t.package,
6902
+ drift: t.drift,
6903
+ mode: t.mode,
6904
+ unsupported: t.unsupported,
6905
+ flags: t.flags
6906
+ }))
6907
+ }
6908
+ } : {};
6879
6909
  const active = components.filter((c) => c.score !== null);
6880
6910
  if (active.length === 0) {
6881
6911
  return {
@@ -6883,7 +6913,8 @@ function computeDriftScore(projects) {
6883
6913
  riskLevel: "low",
6884
6914
  components: buildComponents(),
6885
6915
  methodologyVersion: DRIFT_SCORE_METHODOLOGY_VERSION,
6886
- ...confidence !== void 0 ? { confidence } : {}
6916
+ ...confidence !== void 0 ? { confidence } : {},
6917
+ ...envelope
6887
6918
  };
6888
6919
  }
6889
6920
  const totalActiveWeight = active.reduce((sum, c) => sum + c.weight, 0);
@@ -6907,7 +6938,8 @@ function computeDriftScore(projects) {
6907
6938
  components: buildComponents(),
6908
6939
  measured,
6909
6940
  methodologyVersion: DRIFT_SCORE_METHODOLOGY_VERSION,
6910
- ...confidence !== void 0 ? { confidence } : {}
6941
+ ...confidence !== void 0 ? { confidence } : {},
6942
+ ...envelope
6911
6943
  };
6912
6944
  }
6913
6945
  function generateFindings(projects, config) {
@@ -11654,5 +11686,5 @@ async function writeTextFile2(filePath, content) {
11654
11686
  }
11655
11687
 
11656
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 };
11657
- //# sourceMappingURL=chunk-C5AVF7PT.js.map
11658
- //# sourceMappingURL=chunk-C5AVF7PT.js.map
11689
+ //# sourceMappingURL=chunk-M62BGJMK.js.map
11690
+ //# sourceMappingURL=chunk-M62BGJMK.js.map