Add wrapper support for import / export states

Summary: Make sure custom export handlers of classic plugins wrapped in Sandy are respected

Reviewed By: passy

Differential Revision: D29233604

fbshipit-source-id: 7bab33af3422e0b59697438577906ce8580a28ad
This commit is contained in:
Michel Weststrate
2021-06-21 08:35:52 -07:00
committed by Facebook GitHub Bot
parent e40faaef3f
commit 806dd63f68
3 changed files with 48 additions and 9 deletions

View File

@@ -264,6 +264,7 @@ async function exportSandyPluginStates(
if (!res[client.id]) {
res[client.id] = {};
}
// makeObjectSerializable is slow but very convenient by default. If people want to speed things up
res[client.id][pluginId] = await makeObjectSerializable(
await client.sandyPluginStates
.get(pluginId)!