If a plug is faulty and never returns a manifest it can brick the silverbullet instance, because this promise never resolves, resulting in the silverbullet instance to never finish initializing.
_lib/plugos/sandboxes/workersandbox.ts
return new Promise((resolve) => {
this.worker!.onmessage = (ev) => {
if (ev.data.type === "manifest") {
this.manifest = ev.data.manifest;
// Set manifest in the plug
this.plug.manifest = this.manifest;
// Set assets in the plug
this.plug.assets = new AssetBundle(
this.manifest?.assets ? this.manifest.assets as AssetJson : {},
);
return resolve();
}
this.onMessage(ev.data);
};
});
If a plug is faulty and never returns a manifest it can brick the silverbullet instance, because this promise never resolves, resulting in the silverbullet instance to never finish initializing. _lib/plugos/sandboxes/workersandbox.ts