Skip to content

Commit a234439

Browse files
committed
fix pluginmanager dev tools error
1 parent 5b80d8f commit a234439

File tree

1 file changed

+17
-0
lines changed
  • packages/application-extension/src

1 file changed

+17
-0
lines changed

packages/application-extension/src/index.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import {
77
ITreePathUpdater,
88
JupyterFrontEnd,
99
JupyterFrontEndPlugin,
10+
JupyterLab,
1011
} from '@jupyterlab/application';
1112

1213
import {
@@ -159,6 +160,21 @@ const dirty: JupyterFrontEndPlugin<void> = {
159160
},
160161
};
161162

163+
/**
164+
* The application info.
165+
*/
166+
const info: JupyterFrontEndPlugin<JupyterLab.IInfo> = {
167+
id: '@jupyter-notebook/application-extension:info',
168+
autoStart: true,
169+
provides: JupyterLab.IInfo,
170+
activate: (app: JupyterFrontEnd): JupyterLab.IInfo => {
171+
if (!(app instanceof NotebookApp)) {
172+
throw new Error(`${info.id} must be activated in Jupyter Notebook.`);
173+
}
174+
return app.info;
175+
},
176+
};
177+
162178
/**
163179
* The logo plugin.
164180
*/
@@ -1148,6 +1164,7 @@ const zen: JupyterFrontEndPlugin<void> = {
11481164
*/
11491165
const plugins: JupyterFrontEndPlugin<any>[] = [
11501166
dirty,
1167+
info,
11511168
logo,
11521169
menus,
11531170
menuSpacer,

0 commit comments

Comments
 (0)