@hamak/smart-data-dico 1.12.4 → 1.12.5
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/backend/dist/server.mjs
CHANGED
|
@@ -101439,6 +101439,8 @@ async function executeUpdateEntity(input, services) {
|
|
|
101439
101439
|
const delta = after - before;
|
|
101440
101440
|
const deltaNote = delta === 0 ? "attributes unchanged" : delta > 0 ? `+${delta} attribute${delta === 1 ? "" : "s"}` : `-${Math.abs(delta)} attribute${Math.abs(delta) === 1 ? "" : "s"}`;
|
|
101441
101441
|
const summary = `Updated ${entity.name} (${deltaNote})`;
|
|
101442
|
+
const existingNames = new Set(existing.attributes.map((a) => a.name));
|
|
101443
|
+
const addedAttr = entity.attributes.find((a) => !existingNames.has(a.name));
|
|
101442
101444
|
return {
|
|
101443
101445
|
success: true,
|
|
101444
101446
|
changeKind: "updated",
|
|
@@ -101447,7 +101449,7 @@ async function executeUpdateEntity(input, services) {
|
|
|
101447
101449
|
packageName: input.packageName,
|
|
101448
101450
|
summary,
|
|
101449
101451
|
navigate: `/packages/${input.packageName}/entities/${entity.name}`,
|
|
101450
|
-
highlight: entity.name,
|
|
101452
|
+
highlight: addedAttr ? addedAttr.uuid : entity.name,
|
|
101451
101453
|
message: summary
|
|
101452
101454
|
};
|
|
101453
101455
|
} catch (err) {
|