@jupyterlab/services
Advanced tools
Comparing version 0.27.0 to 0.28.0
@@ -463,7 +463,5 @@ import { IIterator } from 'phosphor/lib/algorithm/iteration'; | ||
* | ||
* #### Notes | ||
* This will be `null` until the specs are fetched from | ||
* the server. | ||
* @returns A promise that resolves with the most recently fecthed specs. | ||
*/ | ||
readonly specs: ISpecModels | null; | ||
specs(): Promise<ISpecModels>; | ||
/** | ||
@@ -470,0 +468,0 @@ * Create an iterator over the known running kernels. |
@@ -47,5 +47,7 @@ import { IIterator } from 'phosphor/lib/algorithm/iteration'; | ||
/** | ||
* Get the most recent specs from the server. | ||
* Get the kernel specs. | ||
* | ||
* @returns A promise that resolves with the most recently fetched specs. | ||
*/ | ||
readonly specs: Kernel.ISpecModels; | ||
specs(): Promise<Kernel.ISpecModels>; | ||
/** | ||
@@ -125,2 +127,3 @@ * Create an iterator over the most recent running kernels. | ||
private _refreshTimer; | ||
private _specPromise; | ||
} |
@@ -93,13 +93,17 @@ // Copyright (c) Jupyter Development Team. | ||
}); | ||
Object.defineProperty(KernelManager.prototype, "specs", { | ||
/** | ||
* Get the most recent specs from the server. | ||
*/ | ||
get: function () { | ||
return this._specs; | ||
}, | ||
enumerable: true, | ||
configurable: true | ||
}); | ||
/** | ||
* Get the kernel specs. | ||
* | ||
* @returns A promise that resolves with the most recently fetched specs. | ||
*/ | ||
KernelManager.prototype.specs = function () { | ||
if (this._specs) { | ||
return Promise.resolve(this._specs); | ||
} | ||
if (this._specPromise) { | ||
return this._specPromise; | ||
} | ||
return this.updateSpecs(); | ||
}; | ||
/** | ||
* Create an iterator over the most recent running kernels. | ||
@@ -123,3 +127,7 @@ * | ||
var _this = this; | ||
return kernel_1.Kernel.getSpecs(this._getOptions()).then(function (specs) { | ||
var options = { | ||
baseUrl: this._baseUrl, | ||
ajaxSettings: this.ajaxSettings | ||
}; | ||
this._specPromise = kernel_1.Kernel.getSpecs(options).then(function (specs) { | ||
if (!json_1.deepEqual(specs, _this._specs)) { | ||
@@ -131,2 +139,3 @@ _this._specs = specs; | ||
}); | ||
return this._specPromise; | ||
}; | ||
@@ -133,0 +142,0 @@ /** |
@@ -33,5 +33,7 @@ import { IIterator } from 'phosphor/lib/algorithm/iteration'; | ||
/** | ||
* Get the most recent specs from the server. | ||
* Get the kernel specs. | ||
* | ||
* @returns A promise that resolves with the most recently fetched specs. | ||
*/ | ||
readonly specs: Kernel.ISpecModels | null; | ||
specs(): Promise<Kernel.ISpecModels>; | ||
/** | ||
@@ -114,2 +116,3 @@ * The base url of the manager. | ||
private _refreshTimer; | ||
private _specPromise; | ||
} |
@@ -57,12 +57,16 @@ // Copyright (c) Jupyter Development Team. | ||
}; | ||
Object.defineProperty(SessionManager.prototype, "specs", { | ||
/** | ||
* Get the most recent specs from the server. | ||
*/ | ||
get: function () { | ||
return this._specs; | ||
}, | ||
enumerable: true, | ||
configurable: true | ||
}); | ||
/** | ||
* Get the kernel specs. | ||
* | ||
* @returns A promise that resolves with the most recently fetched specs. | ||
*/ | ||
SessionManager.prototype.specs = function () { | ||
if (this._specs) { | ||
return Promise.resolve(this._specs); | ||
} | ||
if (this._specPromise) { | ||
return this._specPromise; | ||
} | ||
return this.updateSpecs(); | ||
}; | ||
Object.defineProperty(SessionManager.prototype, "baseUrl", { | ||
@@ -127,3 +131,3 @@ /** | ||
}; | ||
return kernel_1.Kernel.getSpecs(options).then(function (specs) { | ||
this._specPromise = kernel_1.Kernel.getSpecs(options).then(function (specs) { | ||
if (!json_1.deepEqual(specs, _this._specs)) { | ||
@@ -135,2 +139,3 @@ _this._specs = specs; | ||
}); | ||
return this._specPromise; | ||
}; | ||
@@ -137,0 +142,0 @@ /** |
@@ -286,9 +286,7 @@ import { IIterator } from 'phosphor/lib/algorithm/iteration'; | ||
/** | ||
* Get the most recent specs from the server. | ||
* Get the kernel specs. | ||
* | ||
* #### Notes | ||
* This will be `null` until the specs are fetched from | ||
* the server. | ||
* @returns A promise that resolves with the most recently fecthed specs. | ||
*/ | ||
readonly specs: Kernel.ISpecModels | null; | ||
specs(): Promise<Kernel.ISpecModels>; | ||
/** | ||
@@ -295,0 +293,0 @@ * Create an iterator over the known running sessions. |
{ | ||
"name": "@jupyterlab/services", | ||
"version": "0.27.0", | ||
"version": "0.28.0", | ||
"description": "Client APIs for the Jupyter services REST APIs", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
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
696864
20356