@jupyterlab/services
Advanced tools
Comparing version 0.34.1 to 0.34.2
@@ -193,3 +193,3 @@ // Copyright (c) Jupyter Development Team. | ||
function isAvailable() { | ||
return !!utils.getConfigOption('terminalsAvailable'); | ||
return utils.getConfigOption('terminalsAvailable') === 'True'; | ||
} | ||
@@ -347,3 +347,3 @@ DefaultTerminalSession.isAvailable = isAvailable; | ||
function unavailable() { | ||
return Promise.reject(new Error('Terminals Unavailable')); | ||
return Promise.reject('Terminals Unavailable'); | ||
} | ||
@@ -350,0 +350,0 @@ Private.unavailable = unavailable; |
@@ -30,6 +30,6 @@ // Copyright (c) Jupyter Development Team. | ||
this._ajaxSettings = JSON.stringify(options.ajaxSettings || {}); | ||
// Initialize internal data. | ||
this._readyPromise = this._refreshRunning(); | ||
// Set up polling if terminals are available. | ||
// Set up state handling if terminals are available. | ||
if (terminal_1.TerminalSession.isAvailable()) { | ||
// Initialize internal data. | ||
this._readyPromise = this._refreshRunning(); | ||
// Set up polling. | ||
@@ -114,3 +114,3 @@ this._refreshTimer = setInterval(function () { | ||
get: function () { | ||
return this._readyPromise; | ||
return this._readyPromise || Promise.reject('Terminals unavailable'); | ||
}, | ||
@@ -117,0 +117,0 @@ enumerable: true, |
@@ -292,2 +292,14 @@ // Copyright (c) Jupyter Development Team. | ||
} | ||
/** | ||
* Get global configuration data for the Jupyter application. | ||
* | ||
* @param name - The name of the configuration option. | ||
* | ||
* @returns The config value or `undefined` if not found. | ||
* | ||
* #### Notes | ||
* For browser based applications, it is assumed that the page HTML | ||
* includes a script tag with the id `jupyter-config-data` containing the | ||
* configuration as valid JSON. | ||
*/ | ||
function getConfigOption(name) { | ||
@@ -294,0 +306,0 @@ if (configData) { |
{ | ||
"name": "@jupyterlab/services", | ||
"version": "0.34.1", | ||
"version": "0.34.2", | ||
"description": "Client APIs for the Jupyter services REST APIs", | ||
@@ -42,7 +42,7 @@ "main": "lib/index.js", | ||
"prepublish": "npm run build && webpack", | ||
"test:coverage": "istanbul cover --dir test/coverage _mocha -- test/build/**/*.spec.js --foo bar --terminalsAvailable true", | ||
"test:coverage": "istanbul cover --dir test/coverage _mocha -- test/build/**/*.spec.js --foo bar --terminalsAvailable True", | ||
"test:integration": "cd test && python integration_test.py", | ||
"test:devtool": "devtool node_modules/mocha/bin/_mocha -qc test/build/**/**.spec.js --foo bar --terminalsAvailable true", | ||
"test:debug": "mocha test/build/**/*.spec.js --foo bar --terminalsAvailable true --debug-brk", | ||
"test": "mocha test/build/**/*.spec.js --foo bar --terminalsAvailable true" | ||
"test:devtool": "devtool node_modules/mocha/bin/_mocha -qc test/build/**/**.spec.js --foo bar --terminalsAvailable True", | ||
"test:debug": "mocha test/build/**/*.spec.js --foo bar --terminalsAvailable True --debug-brk", | ||
"test": "mocha test/build/**/*.spec.js --foo bar --terminalsAvailable True" | ||
}, | ||
@@ -49,0 +49,0 @@ "repository": { |
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
731793
21471