mirror of
https://github.com/penpot/penpot.git
synced 2026-04-25 11:18:36 +00:00
* 🎉 Add get-file-stats RPC command Introduce a new lightweight RPC query that returns aggregate statistics for a single file: page count, shape counts by type, component/color/ typography counts, and inbound and outbound library reference counts. Mirrors the existing get-file-summary permission and decoding pattern. Useful for plugin authors enforcing per-file budgets, the @penpot/library npm SDK, and future admin dashboards. Purely additive — no migrations, no UI, no breaking changes. Signed-off-by: edwin-rivera-dev <bytelogic772@gmail.com> * 🐛 Bind *load-fn* around file data walk in get-file-stats The binding previously wrapped only — a plain key lookup that does not realize any pointers — so by the time walked and accessed on each page, was unbound and every PointerMap dereference threw , failing the three new tests. Move inside the form so the walk runs with available, matching the existing pattern used in . Signed-off-by: Edwin Rivera <bytelogic772@gmail.com> --------- Signed-off-by: edwin-rivera-dev <bytelogic772@gmail.com> Signed-off-by: Edwin Rivera <bytelogic772@gmail.com>