@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.
- package/CHANGELOG.md +18 -1
- package/dist/data/index.cjs +9 -1
- package/dist/data/index.cjs.map +1 -1
- package/dist/data/index.js +9 -1
- package/dist/data/index.js.map +1 -1
- package/dist/react/index.cjs +9 -1
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.js +9 -1
- package/dist/react/index.js.map +1 -1
- package/dist/templates/index.cjs +4 -1
- package/dist/templates/index.cjs.map +1 -1
- package/dist/templates/index.js +4 -1
- package/dist/templates/index.js.map +1 -1
- package/package.json +2 -2
package/dist/templates/index.cjs
CHANGED
|
@@ -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
|
-
|
|
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
|