@ai-matrx/records 0.99.14 → 0.99.15
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 +6 -0
- package/dist/core/index.cjs +6 -6
- package/dist/core/index.cjs.map +1 -1
- package/dist/core/index.js +6 -6
- package/dist/core/index.js.map +1 -1
- package/dist/data/index.cjs +6 -6
- package/dist/data/index.cjs.map +1 -1
- package/dist/data/index.js +6 -6
- package/dist/data/index.js.map +1 -1
- package/dist/react/index.cjs +20 -20
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.js +18 -18
- package/dist/react/index.js.map +1 -1
- package/dist/scopes/index.cjs +2 -2
- package/dist/scopes/index.cjs.map +1 -1
- package/dist/scopes/index.js +2 -2
- package/dist/scopes/index.js.map +1 -1
- package/dist/setup/index.cjs +8 -8
- package/dist/setup/index.cjs.map +1 -1
- package/dist/setup/index.js +8 -8
- package/dist/setup/index.js.map +1 -1
- package/dist/typed-table/index.cjs +3 -3
- package/dist/typed-table/index.cjs.map +1 -1
- package/dist/typed-table/index.js +3 -3
- package/dist/typed-table/index.js.map +1 -1
- package/package.json +4 -4
package/dist/data/index.cjs
CHANGED
|
@@ -675,6 +675,7 @@ var defaultOpLedger = ledgerOver((0, import_global_slot2.globalSlot)("ai-matrx.r
|
|
|
675
675
|
var SYSTEM_CONTEXT_TYPE_ID = "__system__";
|
|
676
676
|
|
|
677
677
|
// src/scopes/codec.ts
|
|
678
|
+
var import_uuid4 = require("@ai-matrx/kit/uuid");
|
|
678
679
|
var str = (v, fallback = "") => typeof v === "string" ? v : fallback;
|
|
679
680
|
var strOrNull = (v) => typeof v === "string" ? v : null;
|
|
680
681
|
var num = (v, fallback = 0) => {
|
|
@@ -890,7 +891,6 @@ function systemContextFieldFromStore(row, index) {
|
|
|
890
891
|
item_class: strOrNull(row.item_class)
|
|
891
892
|
};
|
|
892
893
|
}
|
|
893
|
-
var UUID = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
894
894
|
function referencesOf(row) {
|
|
895
895
|
const v = row.value;
|
|
896
896
|
const list = Array.isArray(v) ? v : v == null ? [] : [v];
|
|
@@ -900,7 +900,7 @@ function referencesOf(row) {
|
|
|
900
900
|
const out = [];
|
|
901
901
|
for (const el of list) {
|
|
902
902
|
let ref = null;
|
|
903
|
-
if (typeof el === "string" &&
|
|
903
|
+
if (typeof el === "string" && (0, import_uuid4.isUuidShape)(el)) ref = { id: el, type: toFile ? "file" : "scope" };
|
|
904
904
|
else if (el && typeof el === "object" && typeof el.id === "string") {
|
|
905
905
|
const token = String(el.token ?? "");
|
|
906
906
|
const own = el.label;
|
|
@@ -7216,7 +7216,7 @@ function clientIn(client, organizationId) {
|
|
|
7216
7216
|
}
|
|
7217
7217
|
|
|
7218
7218
|
// src/data/table-port.ts
|
|
7219
|
-
var
|
|
7219
|
+
var import_uuid5 = require("@ai-matrx/kit/uuid");
|
|
7220
7220
|
var DATA_PAGE_CEILING = 500;
|
|
7221
7221
|
var DATA_PAGE_DEFAULT = 50;
|
|
7222
7222
|
var ARCHIVED_CURSOR = "archived:";
|
|
@@ -7235,7 +7235,7 @@ function entityRefsOf2(value, kinds) {
|
|
|
7235
7235
|
const out = [];
|
|
7236
7236
|
for (const item of items) {
|
|
7237
7237
|
const id = typeof item === "string" ? item : item && typeof item === "object" ? item.id : null;
|
|
7238
|
-
if (typeof id !== "string" || !(0,
|
|
7238
|
+
if (typeof id !== "string" || !(0, import_uuid5.isUuidShape)(id)) continue;
|
|
7239
7239
|
const raw = item && typeof item === "object" ? item.token : null;
|
|
7240
7240
|
const token = typeof raw === "string" && raw && raw !== CUSTOM_ROW_TOKEN ? raw : kinds[0];
|
|
7241
7241
|
if (token) out.push({ token, id });
|
|
@@ -7247,7 +7247,7 @@ function relationIdsOf(value) {
|
|
|
7247
7247
|
const out = [];
|
|
7248
7248
|
for (const item of items) {
|
|
7249
7249
|
const id = typeof item === "string" ? item : item && typeof item === "object" ? item.id : null;
|
|
7250
|
-
if (typeof id === "string" && (0,
|
|
7250
|
+
if (typeof id === "string" && (0, import_uuid5.isUuidShape)(id)) out.push(id);
|
|
7251
7251
|
}
|
|
7252
7252
|
return out;
|
|
7253
7253
|
}
|
|
@@ -7344,7 +7344,7 @@ function createTableDataPort({ client, aliases }) {
|
|
|
7344
7344
|
async function getRow(alias, id) {
|
|
7345
7345
|
const binding = bindingOf(alias);
|
|
7346
7346
|
if (!binding) return noSuchAlias(alias);
|
|
7347
|
-
if (!(0,
|
|
7347
|
+
if (!(0, import_uuid5.isUuidShape)(id)) return refuse2("invalid_argument", `"${String(id)}" is not a row id.`);
|
|
7348
7348
|
const shape = await shapeOf(alias, binding);
|
|
7349
7349
|
if (!shape.ok) return shape;
|
|
7350
7350
|
const read = await readByIds(binding, [id]);
|