@jupyterlab/services
Advanced tools
Comparing version 0.40.3 to 0.40.4
@@ -659,3 +659,3 @@ // Copyright (c) Jupyter Development Team. | ||
// if token authentication is in use | ||
if (this._token !== '') { | ||
if (this._token) { | ||
url = url + ("&token=" + encodeURIComponent(this._token)); | ||
@@ -662,0 +662,0 @@ } |
@@ -272,9 +272,6 @@ // Copyright (c) Jupyter Development Team. | ||
* | ||
* Otherwise, if `options` are given, we attempt to connect to the existing | ||
* session. | ||
* The promise is fulfilled when the session is ready on the server, | ||
* otherwise the promise is rejected. | ||
* Otherwise, if `options` are given, we resolve the promise after | ||
* confirming that the session exists on the server. | ||
* | ||
* If the session was not already started and no `options` are given, | ||
* the promise is rejected. | ||
* If the session does not exist on the server, the promise is rejected. | ||
*/ | ||
@@ -291,4 +288,12 @@ function connectTo(name, options) { | ||
} | ||
var session = new DefaultTerminalSession(name, options); | ||
return Promise.resolve(session); | ||
return listRunning(options).then(function (models) { | ||
var index = algorithm_1.ArrayExt.findFirstIndex(models, function (model) { | ||
return model.name === name; | ||
}); | ||
if (index !== -1) { | ||
var session = new DefaultTerminalSession(name, options); | ||
return Promise.resolve(session); | ||
} | ||
return Promise.reject('Could not find session'); | ||
}); | ||
} | ||
@@ -295,0 +300,0 @@ DefaultTerminalSession.connectTo = connectTo; |
@@ -41,9 +41,6 @@ // Copyright (c) Jupyter Development Team. | ||
* | ||
* Otherwise, if `options` are given, we attempt to connect to the existing | ||
* session. | ||
* The promise is fulfilled when the session is ready on the server, | ||
* otherwise the promise is rejected. | ||
* Otherwise, if `options` are given, we resolve the promise after | ||
* confirming that the session exists on the server. | ||
* | ||
* If the session was not already started and no `options` are given, | ||
* the promise is rejected. | ||
* If the session does not exist on the server, the promise is rejected. | ||
*/ | ||
@@ -50,0 +47,0 @@ function connectTo(name, options) { |
{ | ||
"name": "@jupyterlab/services", | ||
"version": "0.40.3", | ||
"version": "0.40.4", | ||
"description": "Client APIs for the Jupyter services REST APIs", | ||
@@ -8,6 +8,6 @@ "main": "lib/index.js", | ||
"dependencies": { | ||
"@phosphor/algorithm": "^0.1.0", | ||
"@phosphor/algorithm": "^0.1.1", | ||
"@phosphor/coreutils": "^0.1.5", | ||
"@phosphor/disposable": "^0.1.0", | ||
"@phosphor/signaling": "^0.1.1", | ||
"@phosphor/disposable": "^0.1.1", | ||
"@phosphor/signaling": "^0.1.2", | ||
"@types/minimist": "^1.2.0", | ||
@@ -14,0 +14,0 @@ "@types/text-encoding": "0.0.30", |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
763712
22376
46
Updated@phosphor/algorithm@^0.1.1
Updated@phosphor/disposable@^0.1.1
Updated@phosphor/signaling@^0.1.2