17 Commits

Author SHA1 Message Date
Andrey Antukh
f7e1bcf87f
🐛 Handle plugin errors gracefully without crashing the UI (#8810)
* 🐛 Handle plugin errors gracefully without crashing the UI

Plugin errors (like 'Set is not a constructor') were propagating to the
global error handler and showing the exception page. This fix:

- Uses a WeakMap to track plugin errors (works in SES hardened environment)
- Wraps setTimeout/setInterval handlers to mark errors and re-throw them
- Frontend global handler checks isPluginError and logs to console

Plugin errors are now logged to console with 'Plugin Error' prefix but
don't crash the main application or show the exception page.

Signed-off-by: AI Agent <agent@penpot.app>

*  Improved handling of plugin errors on initialization

*  Fix test and linter

---------

Signed-off-by: AI Agent <agent@penpot.app>
Co-authored-by: alonso.torres <alonso.torres@kaleidos.net>
2026-04-01 11:37:27 +02:00
Juanfran
0a7d6d98e1
Integrate plugin runtime as npm library (#6852) 2025-07-07 09:46:07 +02:00
alonso.torres
dd0c5b7806 Add support to guides for plugins 2024-09-13 11:30:59 +02:00
alonso.torres
c24b2dadec Change installation data to profile 2024-09-06 11:10:32 +02:00
alonso.torres
be84b1cb01 🐛 Change place for circular dependency workaround 2024-09-03 13:10:28 +02:00
alonso.torres
8ded4811bb Internal refactor of plugin installs 2024-07-12 13:36:00 +02:00
alonso.torres
1b93ccdec9 Remove duplicate permissions in confirm dialog 2024-07-04 12:07:54 +02:00
alonso.torres
395a91c00c Plugins permissions review 2024-07-02 11:01:43 +02:00
alonso.torres
741bf3b666 New plugins permissions dialog 2024-07-02 11:01:43 +02:00
alonso.torres
fb1429956a Changed order of plugins initialization 2024-06-21 12:44:35 +02:00
alonso.torres
e13d543dcd Add geometry utils 2024-06-21 09:29:09 +02:00
alonso.torres
5233654da2 Add support for plugin data into penpot objects 2024-06-10 15:12:51 +02:00
alonso.torres
519b2d7f04 🐛 Fix problem when initializing plugin 2024-05-24 12:22:09 +02:00
alonso.torres
0ffd82299f Refactor to the context api 2024-04-19 01:29:13 +02:00
alonso.torres
7b508f2803 Create feature for plugins 2024-04-19 01:29:13 +02:00
alonso.torres
127b481c38 Refactor of the plugins context 2024-04-19 01:29:13 +02:00
Andrey Antukh
3f473ca765 Plugins proof of concept 2024-04-19 01:29:13 +02:00