From 587eb69032fcd1530858f02fc69a4911aec8c96f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Ml=C3=A1dek?= Date: Thu, 15 Jun 2023 22:35:49 +0200 Subject: [PATCH] feat: upend.js `attr` includes backlinks --- tools/upend_js/index.ts | 9 +++++++++ webui/yarn.lock | 4 ++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/tools/upend_js/index.ts b/tools/upend_js/index.ts index 28dce8a..48ebd04 100644 --- a/tools/upend_js/index.ts +++ b/tools/upend_js/index.ts @@ -74,6 +74,15 @@ export class UpObject { result[entry.attribute].push(entry); }); + this.backlinks.forEach((entry) => { + const attribute = `~${entry.attribute}`; + if (!result[attribute]) { + result[attribute] = []; + } + + result[attribute].push(entry); + }); + return result; } diff --git a/webui/yarn.lock b/webui/yarn.lock index 1005ac0..da6e591 100644 --- a/webui/yarn.lock +++ b/webui/yarn.lock @@ -12585,11 +12585,11 @@ __metadata: "upend@file:../tools/upend_js::locator=upend-kestrel%40workspace%3A.": version: 0.0.1 - resolution: "upend@file:../tools/upend_js#../tools/upend_js::hash=f2ceee&locator=upend-kestrel%40workspace%3A." + resolution: "upend@file:../tools/upend_js#../tools/upend_js::hash=88616b&locator=upend-kestrel%40workspace%3A." dependencies: debug: ^4.3.4 lru-cache: ^7.0.0 - checksum: aaeb2d9605684b048f9b0da394c60108ca655bedcb633aa752d6163094123435b2b4b5408244890822fc1444af5ffb9b0372a69c0a4f04e3b080ced6b77146b7 + checksum: c73ce133f42c9669f15b5d38b2d552722d9df56ec1daa61d31b41d8a0ec6c9064a9424c6e5589d53edeebfc75c447464f10110539b8237c19bf9597987bd6d06 languageName: node linkType: hard