vibe-splain 3.4.0 → 3.4.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.
Files changed (2) hide show
  1. package/dist/index.js +51 -12
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -321,8 +321,10 @@ function inferProductDomain(relPath, importSpecs) {
321
321
  }
322
322
  if (p.includes("booking-audit") || p.includes("bookingaudit"))
323
323
  return "booking_audit";
324
- if (p.includes("bookeventform") || p.includes("availabletimes") || p.includes("availabletimeslots") || p.includes("usebookings") || p.includes("/pages/api/book/") || p.includes("/api/book/") || p.includes("/booking-successful/") || p.includes("/reschedule/") || p.includes("booking-page-wrapper") || p.includes("/book/") && !p.includes("booking-audit"))
324
+ if (p.includes("/pages/api/book/") || p.includes("/api/book/") || p.includes("/booking-successful/") || p.includes("/reschedule/") || p.includes("booking-page-wrapper"))
325
325
  return "booking_creation";
326
+ if (p.includes("bookeventform") || p.includes("availabletimes") || p.includes("availabletimeslots") || p.includes("usebookings") || p.includes("/book/") && !p.includes("booking-audit"))
327
+ return "booking_ui_delegate";
326
328
  if (p.includes("modules/bookings") || p.includes("components/booking/actions") || p.includes("/bookings/[status]") || p.includes("/booking/[uid]") || p.includes("/bookings/"))
327
329
  return "booking_management";
328
330
  if (p.includes("event-types") || p.includes("eventtypes") || p.includes("eventavailabilitytab") || p.includes("eventadvancedtab") || p.includes("eventlimits") || p.includes("eventrecurring"))
@@ -1250,9 +1252,25 @@ async function extractTsConfigPaths(tsconfigPath, projectRoot, depth = 0) {
1250
1252
  if (baseFile.startsWith(".")) {
1251
1253
  baseFile = join3(dirname2(tsconfigPath), baseFile);
1252
1254
  } else {
1253
- baseFile = join3(projectRoot, "node_modules", baseFile);
1254
- if (!baseFile.endsWith(".json"))
1255
- baseFile += ".json";
1255
+ let currentDir = dirname2(tsconfigPath);
1256
+ let found = false;
1257
+ while (currentDir.length >= projectRoot.length || currentDir === projectRoot) {
1258
+ const candidate = join3(currentDir, "node_modules", baseFile + (baseFile.endsWith(".json") ? "" : ".json"));
1259
+ if (existsSync3(candidate)) {
1260
+ baseFile = candidate;
1261
+ found = true;
1262
+ break;
1263
+ }
1264
+ const parent = dirname2(currentDir);
1265
+ if (parent === currentDir)
1266
+ break;
1267
+ currentDir = parent;
1268
+ }
1269
+ if (!found) {
1270
+ baseFile = join3(projectRoot, "node_modules", baseFile);
1271
+ if (!baseFile.endsWith(".json"))
1272
+ baseFile += ".json";
1273
+ }
1256
1274
  }
1257
1275
  const base = await extractTsConfigPaths(baseFile, projectRoot, depth + 1);
1258
1276
  Object.assign(result, base);
@@ -1319,17 +1337,20 @@ async function discoverWorkspacePackages(projectRoot) {
1319
1337
  return packages;
1320
1338
  }
1321
1339
  var CONVENTIONAL_ALIASES = [
1340
+ { prefix: "~/", replacement: "modules/" },
1322
1341
  { prefix: "~/", replacement: "" },
1342
+ { prefix: "@calcom/web/", replacement: "" },
1343
+ { prefix: "@calcom/web/", replacement: "modules/" },
1323
1344
  { prefix: "@components/", replacement: "components/" },
1324
1345
  { prefix: "@lib/", replacement: "lib/" },
1325
1346
  { prefix: "@server/", replacement: "server/" },
1326
- { prefix: "@calcom/web/", replacement: "" },
1347
+ { prefix: "@calcom/features/", replacement: "../../packages/features/src/" },
1327
1348
  { prefix: "@calcom/features/", replacement: "../packages/features/" },
1328
- { prefix: "@calcom/lib/", replacement: "../packages/lib/" },
1329
- { prefix: "@calcom/prisma/", replacement: "../packages/prisma/" },
1330
- { prefix: "@calcom/trpc/", replacement: "../packages/trpc/" },
1331
- { prefix: "@calcom/ui/", replacement: "../packages/ui/" },
1332
- { prefix: "@calcom/emails/", replacement: "../packages/emails/" }
1349
+ { prefix: "@calcom/lib/", replacement: "../../packages/lib/" },
1350
+ { prefix: "@calcom/prisma/", replacement: "../../packages/prisma/" },
1351
+ { prefix: "@calcom/trpc/", replacement: "../../packages/trpc/" },
1352
+ { prefix: "@calcom/ui/", replacement: "../../packages/ui/" },
1353
+ { prefix: "@calcom/emails/", replacement: "../../packages/emails/" }
1333
1354
  ];
1334
1355
  async function buildAliasMap(projectRoot) {
1335
1356
  const allPaths = await discoverAllTsConfigs(projectRoot, projectRoot);
@@ -1426,8 +1447,10 @@ function resolveImportWithAliasMap(spec, fromAbs, lang, projectRoot, fileSet, ba
1426
1447
  return { resolved, isAlias: true };
1427
1448
  }
1428
1449
  }
1450
+ let matchedPrefix = false;
1429
1451
  for (const { prefix, replacement } of CONVENTIONAL_ALIASES) {
1430
1452
  if (spec.startsWith(prefix)) {
1453
+ matchedPrefix = true;
1431
1454
  const rest = replacement + spec.slice(prefix.length);
1432
1455
  const base = join3(projectRoot, rest);
1433
1456
  const resolved = tryJsCandidates(base, projectRoot, fileSet);
@@ -1435,6 +1458,8 @@ function resolveImportWithAliasMap(spec, fromAbs, lang, projectRoot, fileSet, ba
1435
1458
  return { resolved, isAlias: true };
1436
1459
  }
1437
1460
  }
1461
+ if (matchedPrefix)
1462
+ return { resolved: null, isAlias: true };
1438
1463
  return { resolved: null, isAlias: false };
1439
1464
  }
1440
1465
  return { resolved: resolveGeneric(spec, projectRoot, fileSet, basenameIndex), isAlias: false };
@@ -1556,7 +1581,7 @@ function inferSideEffectProfile(source, importSpecs, productDomain, frameworkRol
1556
1581
  }
1557
1582
  function inferWriteIntents(productDomain, relPath, sideEffectProfile) {
1558
1583
  const intents = [];
1559
- if (productDomain === "booking_creation") {
1584
+ if (productDomain === "booking_creation" || productDomain === "booking_ui_delegate") {
1560
1585
  intents.push("create_booking");
1561
1586
  if (relPath.includes("reschedule") || relPath.includes("Reschedule"))
1562
1587
  intents.push("reschedule_booking");
@@ -1626,6 +1651,10 @@ var DOMAIN_SURFACE_PATTERNS = {
1626
1651
  expected: [/book/i, /booking/i, /reschedule/i, /booking-success/i, /api\/book/i, /create-booking/i],
1627
1652
  wrong: [/event-type/i, /event-types/i, /eventtypes/i, /availability/i, /schedule/i]
1628
1653
  },
1654
+ booking_ui_delegate: {
1655
+ expected: [/book/i, /booking/i, /reschedule/i, /event-type/i, /event-types/i],
1656
+ wrong: [/settings/i, /admin/i, /onboarding/i]
1657
+ },
1629
1658
  payments_webhooks: {
1630
1659
  expected: [/webhook/i, /stripe/i, /payment/i],
1631
1660
  wrong: [/settings/i, /onboarding/i, /profile/i]
@@ -1717,6 +1746,7 @@ function computeLoadBearingScore(gravity, heat, importedByCount, sideEffectProfi
1717
1746
  score += 1;
1718
1747
  const highImpactDomains = [
1719
1748
  "booking_creation",
1749
+ "booking_ui_delegate",
1720
1750
  "payments",
1721
1751
  "auth_oauth",
1722
1752
  "webhooks",
@@ -2976,7 +3006,16 @@ async function buildValidationReport(store, deltaTargets, projectRoot, cr) {
2976
3006
  passed: errors.length === 0,
2977
3007
  errors,
2978
3008
  warnings,
2979
- summary: { errorCount: errors.length, warningCount: warnings.length, passCount, entrypointTraceCoverage: coverage }
3009
+ summary: {
3010
+ errorCount: errors.length,
3011
+ warningCount: warnings.length,
3012
+ passCount,
3013
+ entrypointTraceCoverage: coverage,
3014
+ entrypointTraceCoverageNumerator: tracedCount,
3015
+ entrypointTraceCoverageDenominator: realCount,
3016
+ entrypointTraceCoverageDefinition: "Percentage of real source files, excluding vendored and mock code, successfully traced to a complete runtime entrypoint.",
3017
+ coverageBaselineNote: "Not directly comparable to pre alias resolution scans because isRealSource classification changed."
3018
+ }
2980
3019
  };
2981
3020
  }
2982
3021
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vibe-splain",
3
- "version": "3.4.0",
3
+ "version": "3.4.1",
4
4
  "description": "Architectural mapping and behavioral call-chain engine. Built on a language-agnostic foundation with specialized optimization for TypeScript/JavaScript projects.",
5
5
  "type": "module",
6
6
  "license": "MIT",