This commit is contained in:
Paul Kaplan 2025-05-08 12:29:22 -07:00 committed by GitHub
commit f19352f471
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -4,6 +4,8 @@ const maybeFormatMessage = require('../util/maybe-format-message');
const BlockType = require('./block-type');
let rejectUnofficialExtensions = true;
// These extensions are currently built into the VM repository but should not be loaded at startup.
// TODO: move these out into a separate repository?
// TODO: change extension spec so that library info, including extension ID, can be collected through static methods
@ -154,6 +156,10 @@ class ExtensionManager {
this._loadedExtensions.set(extensionURL, serviceName);
return Promise.resolve();
}
if (rejectUnofficialExtensions) {
return Promise.reject(new Error('Unofficial extensions not supported here'));
}
return new Promise((resolve, reject) => {
// If we `require` this at the global level it breaks non-webpack targets, including tests