@ai-matrx/records 0.76.15 → 0.76.17

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.
@@ -326,7 +326,6 @@ var ENTITY_REFERENCE_KINDS = [
326
326
  "data_store",
327
327
  "fc_set",
328
328
  "feature_doc",
329
- "flexible_data",
330
329
  "folder",
331
330
  "game_result",
332
331
  "heatmap_save",
@@ -4566,6 +4565,7 @@ function validateTemplate(raw, options = {}) {
4566
4565
  }
4567
4566
  }
4568
4567
  const refWeek = [0, 1, 2, 3, 4, 5, 6].map((i) => shiftDays(TEMPLATE_REFERENCE_DATE, i));
4568
+ const KEY_PART = "";
4569
4569
  const crossBreaks = () => {
4570
4570
  const out = /* @__PURE__ */ new Map();
4571
4571
  const live = (token) => (state.get(token) ?? []).filter((r) => !r.archived);
@@ -4611,7 +4611,7 @@ function validateTemplate(raw, options = {}) {
4611
4611
  const linked = Array.isArray(ref2) ? ref2.includes(r.key) : ref2 === r.key;
4612
4612
  return linked && (!need.field || (need.in ?? []).includes(storeText(c.values?.[need.field]) ?? ""));
4613
4613
  });
4614
- if (kids.length < (need.min ?? 1)) out.set(`rc|${t.token}|${r.key}|${st}|${kids.length}`, `"${name(t.token, r)}" is ${st}, which needs ${need.min ?? 1} linked ${byToken.get(need.table)?.labelSingular.toLowerCase() ?? need.table}${need.field ? ` in ${(need.in ?? []).join("/")}` : ""}; it has ${kids.length}.`);
4614
+ if (kids.length < (need.min ?? 1)) out.set(["rc", t.token, r.key, st, kids.length].join(KEY_PART), `"${name(t.token, r)}" is ${st}, which needs ${need.min ?? 1} linked ${byToken.get(need.table)?.labelSingular.toLowerCase() ?? need.table}${need.field ? ` in ${(need.in ?? []).join("/")}` : ""}; it has ${kids.length}.`);
4615
4615
  }
4616
4616
  for (const f of t.fields.filter((x) => x.eligible)) {
4617
4617
  const el = f.eligible;
@@ -4625,7 +4625,7 @@ function validateTemplate(raw, options = {}) {
4625
4625
  if (!ok) {
4626
4626
  const target = fieldOf(t.token, f.key)?.relationTarget ?? "";
4627
4627
  const prow = live(target).find((x) => x.key === who);
4628
- out.set(`el|${t.token}|${r.key}|${f.key}|${String(who)}|${on}`, `"${name(t.token, r)}" (${on}) has ${f.label.toLowerCase()} "${prow ? name(target, prow) : String(who)}", who holds no ${byToken.get(el.table)?.labelSingular.toLowerCase() ?? el.table}${el.where ? ` (${Object.values(el.where).join(", ")})` : ""} valid on that day.`);
4628
+ out.set(["el", t.token, r.key, f.key, String(who), on].join(KEY_PART), `"${name(t.token, r)}" (${on}) has ${f.label.toLowerCase()} "${prow ? name(target, prow) : String(who)}", who holds no ${byToken.get(el.table)?.labelSingular.toLowerCase() ?? el.table}${el.where ? ` (${Object.values(el.where).join(", ")})` : ""} valid on that day.`);
4629
4629
  }
4630
4630
  }
4631
4631
  }
@@ -4635,7 +4635,7 @@ function validateTemplate(raw, options = {}) {
4635
4635
  };
4636
4636
  const crossSeen = new Set(crossBreaks().keys());
4637
4637
  for (const [k, msg] of crossBreaks()) {
4638
- const [kind, table, row] = k.split("|");
4638
+ const [kind, table, row] = k.split(KEY_PART);
4639
4639
  if (kind === "rc" || kind === "el") say(`tables (${table}).rows (${row})`, msg);
4640
4640
  }
4641
4641
  const moveOne = (a, at, rawSet) => {