@jupyterlab/services
Advanced tools
Comparing version 6.6.6 to 6.6.7
@@ -38,3 +38,8 @@ "use strict"; | ||
function getSessionUrl(baseUrl, id) { | ||
return coreutils_1.URLExt.join(baseUrl, exports.SESSION_SERVICE_URL, id); | ||
const servicesBase = coreutils_1.URLExt.join(baseUrl, exports.SESSION_SERVICE_URL); | ||
const result = coreutils_1.URLExt.join(servicesBase, id); | ||
if (!result.startsWith(servicesBase)) { | ||
throw new Error('Can only be used for services requests'); | ||
} | ||
return result; | ||
} | ||
@@ -41,0 +46,0 @@ exports.getSessionUrl = getSessionUrl; |
@@ -106,3 +106,8 @@ "use strict"; | ||
function url(base, id) { | ||
return coreutils_1.URLExt.join(base, SERVICE_SETTINGS_URL, id); | ||
const settingsBase = coreutils_1.URLExt.join(base, SERVICE_SETTINGS_URL); | ||
const result = coreutils_1.URLExt.join(settingsBase, id); | ||
if (!result.startsWith(settingsBase)) { | ||
throw new Error('Can only be used for workspaces requests'); | ||
} | ||
return result; | ||
} | ||
@@ -109,0 +114,0 @@ Private.url = url; |
@@ -83,3 +83,7 @@ "use strict"; | ||
Private.errorIfNotAvailable(); | ||
const url = coreutils_1.URLExt.join(settings.baseUrl, exports.TERMINAL_SERVICE_URL, name); | ||
const workspacesBase = coreutils_1.URLExt.join(settings.baseUrl, exports.TERMINAL_SERVICE_URL); | ||
const url = coreutils_1.URLExt.join(workspacesBase, name); | ||
if (!url.startsWith(workspacesBase)) { | ||
throw new Error('Can only be used for terminal requests'); | ||
} | ||
const init = { method: 'DELETE' }; | ||
@@ -86,0 +90,0 @@ const response = await serverconnection_1.ServerConnection.makeRequest(url, init, settings); |
@@ -117,3 +117,8 @@ "use strict"; | ||
function url(base, id) { | ||
return coreutils_1.URLExt.join(base, SERVICE_WORKSPACES_URL, id); | ||
const workspacesBase = coreutils_1.URLExt.join(base, SERVICE_WORKSPACES_URL); | ||
const result = coreutils_1.URLExt.join(workspacesBase, id); | ||
if (!result.startsWith(workspacesBase)) { | ||
throw new Error('Can only be used for workspaces requests'); | ||
} | ||
return result; | ||
} | ||
@@ -120,0 +125,0 @@ Private.url = url; |
{ | ||
"name": "@jupyterlab/services", | ||
"version": "6.6.6", | ||
"version": "6.6.7", | ||
"description": "Client APIs for the Jupyter services REST APIs", | ||
@@ -49,7 +49,7 @@ "keywords": [ | ||
"dependencies": { | ||
"@jupyterlab/coreutils": "^5.6.6", | ||
"@jupyterlab/nbformat": "^3.6.6", | ||
"@jupyterlab/observables": "^4.6.6", | ||
"@jupyterlab/settingregistry": "^3.6.6", | ||
"@jupyterlab/statedb": "^3.6.6", | ||
"@jupyterlab/coreutils": "^5.6.7", | ||
"@jupyterlab/nbformat": "^3.6.7", | ||
"@jupyterlab/observables": "^4.6.7", | ||
"@jupyterlab/settingregistry": "^3.6.7", | ||
"@jupyterlab/statedb": "^3.6.7", | ||
"@lumino/algorithm": "^1.9.0", | ||
@@ -64,3 +64,3 @@ "@lumino/coreutils": "^1.11.0", | ||
"devDependencies": { | ||
"@jupyterlab/testutils": "^3.6.6", | ||
"@jupyterlab/testutils": "^3.6.7", | ||
"@types/jest": "^26.0.10", | ||
@@ -67,0 +67,0 @@ "@types/node-fetch": "^2.5.4", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
1052148
14657