@ai-matrx/records-ui 0.115.67 → 0.115.68
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/index.cjs +11 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +11 -6
- package/dist/index.js.map +1 -1
- package/package.json +7 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Changelog — @ai-matrx/records-ui
|
|
2
2
|
|
|
3
|
+
## 0.115.68
|
|
4
|
+
|
|
5
|
+
Automatic changed-only republish (docs/metadata drift since the last tag — see
|
|
6
|
+
`git diff npm/records-ui/v0.115.67..npm/records-ui/v0.115.68 -- apps/shared/records-ui`).
|
|
7
|
+
No source changes intended and no consumer action required.
|
|
8
|
+
|
|
3
9
|
## 0.115.67
|
|
4
10
|
|
|
5
11
|
Automatic changed-only republish (docs/metadata drift since the last tag — see
|
package/dist/index.cjs
CHANGED
|
@@ -28635,17 +28635,22 @@ async function findUnfinishedTable(client, wantedName, wantedKeys, now = Date.no
|
|
|
28635
28635
|
if (!name) return null;
|
|
28636
28636
|
const listed = await client.tableList();
|
|
28637
28637
|
if (!listed.ok) return null;
|
|
28638
|
-
const
|
|
28639
|
-
|
|
28640
|
-
|
|
28641
|
-
|
|
28642
|
-
|
|
28638
|
+
const named = listed.data.filter((t) => !t.is_kernel && t.name.trim().toLowerCase() === name);
|
|
28639
|
+
if (named.length === 0) return null;
|
|
28640
|
+
const headers = await client.recordHeaders({ ids: named.map((t) => t.id) });
|
|
28641
|
+
if (!headers.ok) return null;
|
|
28642
|
+
const madeAt = /* @__PURE__ */ new Map();
|
|
28643
|
+
for (const h of headers.data) {
|
|
28644
|
+
const at = Date.parse(h.created_at);
|
|
28645
|
+
if (h.mine && h.deleted_at === null && Number.isFinite(at) && now - at <= UNFINISHED_WINDOW_MS) madeAt.set(h.id, at);
|
|
28646
|
+
}
|
|
28647
|
+
const candidates = named.filter((t) => madeAt.has(t.id));
|
|
28643
28648
|
if (candidates.length === 0) return null;
|
|
28644
28649
|
const counted = await client.tableRowCounts({ table_ids: candidates.map((t) => t.id) });
|
|
28645
28650
|
if (!counted.ok) return null;
|
|
28646
28651
|
const withRows = new Set(counted.data.filter((c) => c.visible_rows > 0).map((c) => c.table_id));
|
|
28647
28652
|
const wanted = new Set(wantedKeys);
|
|
28648
|
-
const ordered = [...candidates].sort((a, b) =>
|
|
28653
|
+
const ordered = [...candidates].sort((a, b) => (madeAt.get(b.id) ?? 0) - (madeAt.get(a.id) ?? 0));
|
|
28649
28654
|
for (const t of ordered) {
|
|
28650
28655
|
if (withRows.has(t.id)) continue;
|
|
28651
28656
|
const read = await client.fields({ table_id: t.id });
|