@jupyterlab/services
Advanced tools
Comparing version 4.0.2 to 4.0.3
@@ -495,3 +495,8 @@ "use strict"; | ||
let baseUrl = this.serverSettings.baseUrl; | ||
return Promise.resolve(coreutils_1.URLExt.join(baseUrl, FILES_URL, coreutils_1.URLExt.encodeParts(localPath))); | ||
let url = coreutils_1.URLExt.join(baseUrl, FILES_URL, coreutils_1.URLExt.encodeParts(localPath)); | ||
const xsrfTokenMatch = document.cookie.match('\\b_xsrf=([^;]*)\\b'); | ||
if (xsrfTokenMatch) { | ||
url = coreutils_1.URLExt.join(url, `?_xsrf=${xsrfTokenMatch[1]}`); | ||
} | ||
return Promise.resolve(url); | ||
} | ||
@@ -498,0 +503,0 @@ /** |
@@ -709,2 +709,14 @@ import { nbformat } from '@jupyterlab/coreutils'; | ||
content: { | ||
/** | ||
* The comm target name to filter returned comms | ||
*/ | ||
target_name?: string; | ||
/** | ||
* Filter for returned comms | ||
* | ||
* @deprecated - this is a non-standard field. Use target_name instead | ||
* | ||
* #### Notes | ||
* See https://github.com/jupyterlab/jupyterlab/issues/6947 | ||
*/ | ||
target?: string; | ||
@@ -711,0 +723,0 @@ }; |
@@ -12,2 +12,13 @@ "use strict"; | ||
function createMessage(options) { | ||
// Backwards compatibility workaround for services 4.0 defining the wrong | ||
// comm_info_request content. This should be removed with the deprecated | ||
// `target` content option in services 5.0. See | ||
// https://github.com/jupyterlab/jupyterlab/issues/6947 | ||
if (options.msgType === 'comm_info_request') { | ||
const content = options.content; | ||
if (content.target_name === undefined) { | ||
content.target_name = content.target; | ||
} | ||
delete content.target; | ||
} | ||
return { | ||
@@ -14,0 +25,0 @@ buffers: options.buffers || [], |
{ | ||
"name": "@jupyterlab/services", | ||
"version": "4.0.2", | ||
"version": "4.0.3", | ||
"description": "Client APIs for the Jupyter services REST APIs", | ||
@@ -66,3 +66,3 @@ "keywords": [ | ||
}, | ||
"gitHead": "325e6244934e6e3b29c630e326953101f7ec172d" | ||
"gitHead": "b5f2c50eda10332be812658b23ad649eca22bf80" | ||
} |
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
1435960
15434