@jupyterlab/services
Advanced tools
Comparing version 7.3.0-alpha.0 to 7.3.0-alpha.1
@@ -72,6 +72,5 @@ "use strict"; | ||
const { serverSettings } = this; | ||
const { baseUrl, token } = serverSettings; | ||
const { baseUrl } = serverSettings; | ||
const { makeRequest, ResponseError } = serverconnection_1.ServerConnection; | ||
const url = coreutils_1.URLExt.join(baseUrl, SERVICE_EVENTS_URL) + | ||
(token ? `?token=${token}` : ''); | ||
const url = coreutils_1.URLExt.join(baseUrl, SERVICE_EVENTS_URL); | ||
const init = { body: JSON.stringify(event), method: 'POST' }; | ||
@@ -91,5 +90,7 @@ const response = await makeRequest(url, init, serverSettings); | ||
} | ||
const { token, WebSocket, wsUrl } = this.serverSettings; | ||
const url = coreutils_1.URLExt.join(wsUrl, SERVICE_EVENTS_URL, 'subscribe') + | ||
(token ? `?token=${encodeURIComponent(token)}` : ''); | ||
const { appendToken, token, WebSocket, wsUrl } = this.serverSettings; | ||
let url = coreutils_1.URLExt.join(wsUrl, SERVICE_EVENTS_URL, 'subscribe'); | ||
if (appendToken && token !== '') { | ||
url += `?token=${encodeURIComponent(token)}`; | ||
} | ||
const socket = (this._socket = new WebSocket(url)); | ||
@@ -96,0 +97,0 @@ const stream = this._stream; |
{ | ||
"name": "@jupyterlab/services", | ||
"version": "7.3.0-alpha.0", | ||
"version": "7.3.0-alpha.1", | ||
"description": "Client APIs for the Jupyter services REST APIs", | ||
@@ -49,6 +49,6 @@ "keywords": [ | ||
"@jupyter/ydoc": "^2.0.1", | ||
"@jupyterlab/coreutils": "^6.3.0-alpha.0", | ||
"@jupyterlab/nbformat": "^4.3.0-alpha.0", | ||
"@jupyterlab/settingregistry": "^4.3.0-alpha.0", | ||
"@jupyterlab/statedb": "^4.3.0-alpha.0", | ||
"@jupyterlab/coreutils": "^6.3.0-alpha.1", | ||
"@jupyterlab/nbformat": "^4.3.0-alpha.1", | ||
"@jupyterlab/settingregistry": "^4.3.0-alpha.1", | ||
"@jupyterlab/statedb": "^4.3.0-alpha.1", | ||
"@lumino/coreutils": "^2.1.2", | ||
@@ -62,3 +62,3 @@ "@lumino/disposable": "^2.1.2", | ||
"devDependencies": { | ||
"@jupyterlab/testing": "^4.3.0-alpha.0", | ||
"@jupyterlab/testing": "^4.3.0-alpha.1", | ||
"@types/jest": "^29.2.0", | ||
@@ -65,0 +65,0 @@ "@types/ws": "^8.5.3", |
@@ -86,7 +86,5 @@ // Copyright (c) Jupyter Development Team. | ||
const { serverSettings } = this; | ||
const { baseUrl, token } = serverSettings; | ||
const { baseUrl } = serverSettings; | ||
const { makeRequest, ResponseError } = ServerConnection; | ||
const url = | ||
URLExt.join(baseUrl, SERVICE_EVENTS_URL) + | ||
(token ? `?token=${token}` : ''); | ||
const url = URLExt.join(baseUrl, SERVICE_EVENTS_URL); | ||
const init = { body: JSON.stringify(event), method: 'POST' }; | ||
@@ -109,6 +107,7 @@ const response = await makeRequest(url, init, serverSettings); | ||
const { token, WebSocket, wsUrl } = this.serverSettings; | ||
const url = | ||
URLExt.join(wsUrl, SERVICE_EVENTS_URL, 'subscribe') + | ||
(token ? `?token=${encodeURIComponent(token)}` : ''); | ||
const { appendToken, token, WebSocket, wsUrl } = this.serverSettings; | ||
let url = URLExt.join(wsUrl, SERVICE_EVENTS_URL, 'subscribe'); | ||
if (appendToken && token !== '') { | ||
url += `?token=${encodeURIComponent(token)}`; | ||
} | ||
const socket = (this._socket = new WebSocket(url)); | ||
@@ -115,0 +114,0 @@ const stream = this._stream; |
Sorry, the diff of this file is too big to display
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
1212282