Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
*
* #### Notes
* This plugin should only be used by plugins that specifically need to access
* JupyterLab application information, e.g., listing extensions that have been
* loaded or deferred within JupyterLab.
*/
const info: JupyterFrontEndPlugin = {
id: '@jupyterlab/application-extension:info',
activate: (app: JupyterFrontEnd) => {
if (!(app instanceof JupyterLab)) {
throw new Error(`${info.id} must be activated in JupyterLab.`);
}
return app.info;
},
autoStart: true,
provides: JupyterLab.IInfo
};
/**
* The default JupyterLab paths dictionary provider.
*/
const paths: JupyterFrontEndPlugin = {
id: '@jupyterlab/apputils-extension:paths',
activate: (app: JupyterFrontEnd): JupyterFrontEnd.IPaths => {
if (!(app instanceof JupyterLab)) {
throw new Error(`${paths.id} must be activated in JupyterLab.`);
}
return app.paths;
},
autoStart: true,
provides: JupyterFrontEnd.IPaths
};