@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.
@@ -7392,7 +7392,10 @@ function autofixDescribeSpec(input, ctx = {}) {
7392
7392
  function describeCheck(spec, ctx = {}) {
7393
7393
  const fixed = autofixDescribeSpec(spec, ctx);
7394
7394
  const v = validateTemplate(fixed.spec, { profile: "describe" });
7395
- return { ...fixed, problems: v.problems.map((p) => ({ at: p.at, says: p.says })) };
7395
+ const sameFields = (t) => (ctx.existingTables ?? []).some((e) => e.fields.map((f) => f.key).sort().join("|") === t.fields.map((f) => f.key).sort().join("|"));
7396
+ const reused = new Set(fixed.spec.tables.filter(sameFields).map((t) => t.token));
7397
+ const problems = v.problems.filter((p) => !(/^This table copies the shared /.test(p.says) && reused.has(/\((\w+)\)/.exec(p.at)?.[1] ?? "")));
7398
+ return { ...fixed, problems: problems.map((p) => ({ at: p.at, says: p.says })) };
7396
7399
  }
7397
7400
 
7398
7401
  // src/templates/describe/repair.ts