@vibgrate/cli 1.0.68 → 1.0.70

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.
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  baselineCommand,
3
3
  runBaseline
4
- } from "./chunk-DGQCRO6X.js";
5
- import "./chunk-5DTDDZHE.js";
4
+ } from "./chunk-L37LOGK2.js";
5
+ import "./chunk-RTKLZCLZ.js";
6
6
  import "./chunk-TBE6NQ5Z.js";
7
7
  export {
8
8
  baselineCommand,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  runScan
3
- } from "./chunk-5DTDDZHE.js";
3
+ } from "./chunk-RTKLZCLZ.js";
4
4
  import {
5
5
  writeJsonFile
6
6
  } from "./chunk-TBE6NQ5Z.js";
@@ -7714,6 +7714,30 @@ function extract(content, pattern, sourceFile) {
7714
7714
  }
7715
7715
  return out;
7716
7716
  }
7717
+ function isValidCronExpression(expr) {
7718
+ const trimmed = expr.trim();
7719
+ if (/^@(?:yearly|monthly|weekly|daily|hourly|reboot)$/.test(trimmed)) return true;
7720
+ const FIELD = /^(?:\*(?:\/\d+)?|\d+(?:[,\-]\d+)*(?:\/\d+)?|[?LW]|[\dLW]#\d)$/;
7721
+ const fields = trimmed.split(/\s+/);
7722
+ if (fields.length !== 5 && fields.length !== 6) return false;
7723
+ return fields.every((f) => FIELD.test(f));
7724
+ }
7725
+ function extractValidCronLines(content, sourceFile) {
7726
+ const out = [];
7727
+ const RE = /['"`]((?:[\d*\/,\-?LW#@A-Za-z]+[ \t]+){4,5}[\d*\/,\-?LW#@A-Za-z]+)['"`]/g;
7728
+ let m;
7729
+ while ((m = RE.exec(content)) !== null) {
7730
+ const candidate = m[1].trim();
7731
+ if (isValidCronExpression(candidate)) out.push(`${candidate} (${sourceFile})`);
7732
+ }
7733
+ return out;
7734
+ }
7735
+ function deriveProjectFromPath(relPath) {
7736
+ const parts = relPath.split("/");
7737
+ if (parts.length === 1) return "root";
7738
+ if (parts[0] === "packages" && parts.length >= 2) return parts[1];
7739
+ return parts[0];
7740
+ }
7717
7741
  var LOCKFILE_NAMES = /* @__PURE__ */ new Set([
7718
7742
  "package-lock.json",
7719
7743
  "pnpm-lock.yaml",
@@ -7959,7 +7983,7 @@ async function scanApiSurface(rootDir, fileCache) {
7959
7983
  });
7960
7984
  }
7961
7985
  }
7962
- result.integrations = [...integrationMap.values()].sort((a, b) => a.provider.localeCompare(b.provider));
7986
+ result.integrations = [...integrationMap.values()].filter((i) => i.files.some((f) => !NON_CODE_EXTENSIONS.has(path23.extname(f).toLowerCase()))).sort((a, b) => a.provider.localeCompare(b.provider));
7963
7987
  result.openApiSpecifications = [...new Map(result.openApiSpecifications.map((spec) => [spec.path, spec])).values()].sort((a, b) => a.path.localeCompare(b.path));
7964
7988
  result.webhookUrls = uniq(result.webhookUrls);
7965
7989
  result.callbackEndpoints = uniq(result.callbackEndpoints);
@@ -8033,7 +8057,10 @@ async function scanOperationalResilience(rootDir, fileCache) {
8033
8057
  result.defaultCharacterEncoding.push(...extract(file.content, /\b(?:charset|encoding|UTF-?8|ISO-8859-1)\b[^\n]*/gi, file.relPath));
8034
8058
  result.sessionStores.push(...extract(file.content, /\b(?:sessionStore|redisStore|memoryStore)\b[^\n]*/gi, file.relPath));
8035
8059
  result.distributedLocks.push(...extract(file.content, /\b(?:distributed[_-]?lock|redlock|mutex)\b[^\n]*/gi, file.relPath));
8036
- result.jobSchedulers.push(...extract(file.content, /\b(?:cron|schedule|bullmq|agenda|job[_-]?scheduler)\b[^\n]*/gi, file.relPath));
8060
+ for (const cronLine of extractValidCronLines(file.content, file.relPath)) {
8061
+ const project = deriveProjectFromPath(file.relPath);
8062
+ result.jobSchedulers.push(`[${project}] ${cronLine}`);
8063
+ }
8037
8064
  result.idempotencyKeys.push(...extract(file.content, /\b(?:idempotency[_-]?key|Idempotency-Key)\b[^\n]*/gi, file.relPath));
8038
8065
  result.rateLimitingCounters.push(...extract(file.content, /\b(?:rate[_-]?limit|throttle|quota)\b[^\n]*/gi, file.relPath));
8039
8066
  result.circuitBreakerState.push(...extract(file.content, /\b(?:circuit[_-]?breaker|half[_-]?open|open[_-]?state)\b[^\n]*/gi, file.relPath));
@@ -8050,7 +8077,7 @@ async function scanOperationalResilience(rootDir, fileCache) {
8050
8077
  result.dataMaskingRules.push(...extract(file.content, /\b(?:data[_-]?mask|redact|pii[_-]?mask)\b[^\n]*/gi, file.relPath));
8051
8078
  result.transformationLogic.push(...extract(file.content, /\b(?:transform|mapper|normaliz(?:e|ation))\b[^\n]*/gi, file.relPath));
8052
8079
  result.timezoneHandling.push(...extract(file.content, /\b(?:convertTimezone|tz\(|moment\.tz|DateTimeZone)\b[^\n]*/gi, file.relPath));
8053
- result.encryptionSettings.push(...extract(file.content, /\b(?:kms|encrypt(?:ion)?|cipher|tls|minTlsVersion)\b[^\n]*/gi, file.relPath));
8080
+ result.encryptionSettings.push(...extract(file.content, /(aes-(?:128|192|256)-(?:gcm|cbc|ctr|cfb8?|ofb|ecb|ccm|ocb|wrap(?:-pad)?)|chacha20-poly1305|des-ede3?(?:-(?:cbc|cfb8?|ofb))?|bf-(?:cbc|cfb|ecb|ofb)|aria-(?:128|192|256)-(?:gcm|cbc|ctr|cfb8?|ofb|ecb|ccm)|camellia-(?:128|192|256)-(?:cbc|cfb8?|ofb|ecb)|seed-cbc|rc4(?:-(?:40|hmac-md5))?|rc2-(?:(?:40|64|128)-)?cbc)/gi, file.relPath));
8054
8081
  result.hardcodedSecretSignals.push(...extract(file.content, /\b(?:password|passwd|connectionString|api[_-]?key|secret)\b\s*[:=]\s*['"][^'"]{4,}['"]/gi, file.relPath));
8055
8082
  }
8056
8083
  Object.keys(result).forEach((key) => {
package/dist/cli.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  baselineCommand
4
- } from "./chunk-DGQCRO6X.js";
4
+ } from "./chunk-L37LOGK2.js";
5
5
  import {
6
6
  VERSION,
7
7
  dsnCommand,
@@ -10,7 +10,7 @@ import {
10
10
  pushCommand,
11
11
  scanCommand,
12
12
  writeDefaultConfig
13
- } from "./chunk-5DTDDZHE.js";
13
+ } from "./chunk-RTKLZCLZ.js";
14
14
  import {
15
15
  ensureDir,
16
16
  pathExists,
@@ -39,7 +39,7 @@ var initCommand = new Command("init").description("Initialize vibgrate in a proj
39
39
  console.log(chalk.green("\u2714") + ` Created ${chalk.bold("vibgrate.config.ts")}`);
40
40
  }
41
41
  if (opts.baseline) {
42
- const { runBaseline } = await import("./baseline-ZTTNU7WC.js");
42
+ const { runBaseline } = await import("./baseline-MRLWTPFD.js");
43
43
  await runBaseline(rootDir);
44
44
  }
45
45
  console.log("");
package/dist/index.js CHANGED
@@ -5,7 +5,7 @@ import {
5
5
  formatText,
6
6
  generateFindings,
7
7
  runScan
8
- } from "./chunk-5DTDDZHE.js";
8
+ } from "./chunk-RTKLZCLZ.js";
9
9
  import "./chunk-TBE6NQ5Z.js";
10
10
  export {
11
11
  computeDriftScore,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vibgrate/cli",
3
- "version": "1.0.68",
3
+ "version": "1.0.70",
4
4
  "description": "CLI for measuring upgrade drift across Node, .NET, Python & Java projects",
5
5
  "type": "module",
6
6
  "bin": {