@ai-matrx/records 0.77.2 → 0.77.3

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.
@@ -325,6 +325,9 @@ function footprintOf(spec) {
325
325
  }
326
326
  var CATALOGUE_STATUSES = ["planned", "authoring", "checking", "waiting_on_lane_10", "ready", "published", "retired"];
327
327
 
328
+ // src/templates/validate.ts
329
+ import { isUuidShape } from "@ai-matrx/kit/uuid";
330
+
328
331
  // src/templates/confidential.ts
329
332
  var TABLE_KERNEL_ID = "11111111-0000-4000-8000-000000000001";
330
333
  var sqlText = (s) => `'${s.replace(/'/g, "''")}'`;
@@ -3437,7 +3440,6 @@ var sortedJson = (v) => JSON.stringify(Object.keys(v).sort().map((k) => [k, v[k]
3437
3440
  var filled = (v) => storeText(v) !== null && storeText(v) !== "" && !(Array.isArray(v) && v.length === 0);
3438
3441
  var THING_NAME = /^(section|class|course|period|room|bay|item|job|role|team|pool|machine|program|plan|service|procedure|product|group|neighborhood|listing|grant|deal|bid|engagement|matter|account|company|route|site|location|project|event|campaign|unit|vehicle|truck|table|field|view|form)_name$/;
3439
3442
  var FILE_VALUE_RE = /^@file:([A-Za-z0-9_.-]+)$/;
3440
- var UUID_RE = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
3441
3443
  function attachmentProblems(raw, assets) {
3442
3444
  const out = [];
3443
3445
  const say = (at, says) => out.push({ at, says });
@@ -3453,7 +3455,7 @@ function attachmentProblems(raw, assets) {
3453
3455
  if (!a.key || !/^[A-Za-z0-9_.-]+$/.test(a.key)) return say(`${at}.key`, "Each picture has a key (letters, digits, _ . -).");
3454
3456
  if (keys.has(a.key)) say(`${at}.key`, `"${a.key}" is listed twice.`);
3455
3457
  keys.add(a.key);
3456
- if (!a.fileId || !UUID_RE.test(a.fileId)) say(`${at}.fileId`, `"${a.key}" needs the file id from templates/ASSETS.json.`);
3458
+ if (!a.fileId || !isUuidShape(a.fileId)) say(`${at}.fileId`, `"${a.key}" needs the file id from templates/ASSETS.json.`);
3457
3459
  if (!a.name || !a.mime || typeof a.bytes !== "number") say(at, `"${a.key}" copies name, mime and bytes from templates/ASSETS.json.`);
3458
3460
  if (library) {
3459
3461
  const asset = library.get(a.key);