@ai-matrx/records 0.83.1 → 0.84.0

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.
@@ -7557,7 +7557,10 @@ function autofixDescribeSpec(input, ctx = {}) {
7557
7557
  function describeCheck(spec, ctx = {}) {
7558
7558
  const fixed = autofixDescribeSpec(spec, ctx);
7559
7559
  const v = validateTemplate(fixed.spec, { profile: "describe" });
7560
- return { ...fixed, problems: v.problems.map((p) => ({ at: p.at, says: p.says })) };
7560
+ const sameFields = (t) => (ctx.existingTables ?? []).some((e) => e.fields.map((f) => f.key).sort().join("|") === t.fields.map((f) => f.key).sort().join("|"));
7561
+ const reused = new Set(fixed.spec.tables.filter(sameFields).map((t) => t.token));
7562
+ const problems = v.problems.filter((p) => !(/^This table copies the shared /.test(p.says) && reused.has(/\((\w+)\)/.exec(p.at)?.[1] ?? "")));
7563
+ return { ...fixed, problems: problems.map((p) => ({ at: p.at, says: p.says })) };
7561
7564
  }
7562
7565
 
7563
7566
  // src/templates/describe/repair.ts