@jupyter-notebook/docmanager-extension 7.7.0-alpha.1 → 7.7.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.js +11 -2
- package/package.json +7 -7
package/lib/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Copyright (c) Jupyter Development Team.
|
|
2
2
|
// Distributed under the terms of the Modified BSD License.
|
|
3
|
-
import {
|
|
3
|
+
import { PathExt, URLExt } from '@jupyterlab/coreutils';
|
|
4
4
|
import { IDocumentWidgetOpener } from '@jupyterlab/docmanager';
|
|
5
5
|
import { INotebookPathOpener, INotebookShell, defaultNotebookPathOpener, } from '@jupyter-notebook/application';
|
|
6
6
|
import { Signal } from '@lumino/signaling';
|
|
@@ -15,7 +15,7 @@ const opener = {
|
|
|
15
15
|
provides: IDocumentWidgetOpener,
|
|
16
16
|
description: 'Open documents in a new browser tab',
|
|
17
17
|
activate: (app, notebookPathOpener, notebookShell) => {
|
|
18
|
-
const baseUrl =
|
|
18
|
+
const baseUrl = app.serviceManager.serverSettings.baseUrl;
|
|
19
19
|
const docRegistry = app.docRegistry;
|
|
20
20
|
const pathOpener = notebookPathOpener !== null && notebookPathOpener !== void 0 ? notebookPathOpener : defaultNotebookPathOpener;
|
|
21
21
|
let id = 0;
|
|
@@ -50,6 +50,15 @@ const opener = {
|
|
|
50
50
|
factory: widgetName,
|
|
51
51
|
});
|
|
52
52
|
}
|
|
53
|
+
// Require both flags: `notebookStartsKernel=False` only sets
|
|
54
|
+
// `shouldStart: false` and must still reuse a running session.
|
|
55
|
+
if (route === 'notebooks' &&
|
|
56
|
+
widget.context.sessionContext.kernelPreference.shouldStart ===
|
|
57
|
+
false &&
|
|
58
|
+
widget.context.sessionContext.kernelPreference.shouldReuse === false) {
|
|
59
|
+
searchParams !== null && searchParams !== void 0 ? searchParams : (searchParams = new URLSearchParams());
|
|
60
|
+
searchParams.set('kernel', 'none');
|
|
61
|
+
}
|
|
53
62
|
pathOpener.open({
|
|
54
63
|
prefix: URLExt.join(baseUrl, route),
|
|
55
64
|
path,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jupyter-notebook/docmanager-extension",
|
|
3
|
-
"version": "7.7.0-alpha.
|
|
3
|
+
"version": "7.7.0-alpha.2",
|
|
4
4
|
"description": "Jupyter Notebook - Document Manager Extension",
|
|
5
5
|
"homepage": "https://github.com/jupyter/notebook",
|
|
6
6
|
"bugs": {
|
|
@@ -38,12 +38,12 @@
|
|
|
38
38
|
"watch": "tsc -b --watch"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@jupyter-notebook/application": "^7.7.0-alpha.
|
|
42
|
-
"@jupyterlab/application": "~4.7.0-alpha.
|
|
43
|
-
"@jupyterlab/coreutils": "~6.7.0-alpha.
|
|
44
|
-
"@jupyterlab/docmanager": "~4.7.0-alpha.
|
|
45
|
-
"@jupyterlab/docregistry": "~4.7.0-alpha.
|
|
46
|
-
"@jupyterlab/services": "~7.7.0-alpha.
|
|
41
|
+
"@jupyter-notebook/application": "^7.7.0-alpha.2",
|
|
42
|
+
"@jupyterlab/application": "~4.7.0-alpha.2",
|
|
43
|
+
"@jupyterlab/coreutils": "~6.7.0-alpha.2",
|
|
44
|
+
"@jupyterlab/docmanager": "~4.7.0-alpha.2",
|
|
45
|
+
"@jupyterlab/docregistry": "~4.7.0-alpha.2",
|
|
46
|
+
"@jupyterlab/services": "~7.7.0-alpha.2",
|
|
47
47
|
"@lumino/algorithm": "^2.0.4",
|
|
48
48
|
"@lumino/signaling": "^2.1.5"
|
|
49
49
|
},
|