|
|
|
|
@ -69,15 +69,13 @@ async function main() {
|
|
|
|
|
// load extra packages
|
|
|
|
|
require('@jupyterlab/celltags');
|
|
|
|
|
|
|
|
|
|
const mimeExtensions = [
|
|
|
|
|
const mimeExtensionsMods = [
|
|
|
|
|
require('@jupyterlab/javascript-extension'),
|
|
|
|
|
require('@jupyterlab/json-extension'),
|
|
|
|
|
require('@jupyterlab/pdf-extension'),
|
|
|
|
|
require('@jupyterlab/vega5-extension')
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
const RetroApp = require('@retrolab/application').RetroApp;
|
|
|
|
|
const app = new RetroApp({ mimeExtensions });
|
|
|
|
|
const mimeExtensions = await Promise.all(mimeExtensionsMods);
|
|
|
|
|
|
|
|
|
|
const disabled = [];
|
|
|
|
|
// TODO: formalize the way the set of initial extensions and plugins are specified
|
|
|
|
|
@ -302,6 +300,20 @@ async function main() {
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// Add the federated mime extensions.
|
|
|
|
|
const federatedMimeExtensions = await Promise.allSettled(
|
|
|
|
|
federatedMimeExtensionPromises
|
|
|
|
|
);
|
|
|
|
|
federatedMimeExtensions.forEach(p => {
|
|
|
|
|
if (p.status === 'fulfilled') {
|
|
|
|
|
for (let plugin of activePlugins(p.value)) {
|
|
|
|
|
mimeExtensions.push(plugin);
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
console.error(p.reason);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// Load all federated component styles and log errors for any that do not
|
|
|
|
|
(await Promise.allSettled(federatedStylePromises))
|
|
|
|
|
.filter(({ status }) => status === 'rejected')
|
|
|
|
|
@ -309,6 +321,9 @@ async function main() {
|
|
|
|
|
console.error(reason);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
const RetroApp = require('@retrolab/application').RetroApp;
|
|
|
|
|
const app = new RetroApp({ mimeExtensions });
|
|
|
|
|
|
|
|
|
|
app.registerPluginModules(mods);
|
|
|
|
|
|
|
|
|
|
// Expose global app instance when in dev mode or when toggled explicitly.
|
|
|
|
|
|