@ai-matrx/records 0.72.6 → 0.72.7
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
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Changelog — @ai-matrx/records
|
|
2
2
|
|
|
3
|
+
## 0.72.7
|
|
4
|
+
|
|
5
|
+
Automatic changed-only republish (docs/metadata drift since the last tag — see
|
|
6
|
+
`git diff npm/records/v0.72.6..npm/records/v0.72.7 -- apps/shared/records`).
|
|
7
|
+
No source changes intended and no consumer action required.
|
|
8
|
+
|
|
3
9
|
## 0.72.6
|
|
4
10
|
|
|
5
11
|
Automatic changed-only republish (docs/metadata drift since the last tag — see
|
package/dist/templates/index.cjs
CHANGED
|
@@ -3604,6 +3604,15 @@ function validateTemplate(raw, options = {}) {
|
|
|
3604
3604
|
const tz = raw.business?.timezone || "UTC";
|
|
3605
3605
|
const tablesRaw = allTables(raw);
|
|
3606
3606
|
const ISO_DAY = /\b\d{4}-\d{2}-\d{2}\b/;
|
|
3607
|
+
const EMAIL_SHAPE = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
|
|
3608
|
+
for (const table of tablesRaw) {
|
|
3609
|
+
for (const f of table.fields.filter((x) => x.parityType === "email" || x.format === "email")) {
|
|
3610
|
+
table.rows?.forEach((row) => {
|
|
3611
|
+
const v = unwrap(row.values?.[f.key]);
|
|
3612
|
+
if (typeof v === "string" && v !== "" && !EMAIL_SHAPE.test(v)) say(`tables (${table.token}).rows (${row.key}).${f.key}`, `"${v}" is not an email address the store will take (no spaces, one @, a dotted domain).`);
|
|
3613
|
+
});
|
|
3614
|
+
}
|
|
3615
|
+
}
|
|
3607
3616
|
for (const table of tablesRaw) {
|
|
3608
3617
|
const tf = table.fields.find((f) => f.key === table.titleField);
|
|
3609
3618
|
if (tf && tf.default !== void 0) say(`tables (${table.token}).fields (${tf.key})`, `"${tf.label}" names each ${table.labelSingular.toLowerCase()}, so it takes no default; ask it on the form instead.`);
|