@jupyter/docprovider 1.0.1 → 1.1.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/lib/ydrive.js +4 -3
  2. package/package.json +1 -1
package/lib/ydrive.js CHANGED
@@ -1,8 +1,9 @@
1
1
  // Copyright (c) Jupyter Development Team.
2
2
  // Distributed under the terms of the Modified BSD License.
3
- import { URLExt } from '@jupyterlab/coreutils';
3
+ import { PageConfig, URLExt } from '@jupyterlab/coreutils';
4
4
  import { Drive } from '@jupyterlab/services';
5
5
  import { WebSocketProvider } from './yprovider';
6
+ const DISABLE_RTC = PageConfig.getOption('disableRTC') === 'true' ? true : false;
6
7
  /**
7
8
  * The url for the default drive service.
8
9
  */
@@ -125,7 +126,7 @@ class SharedModelFactory {
125
126
  /**
126
127
  * Whether the IDrive supports real-time collaboration or not.
127
128
  */
128
- this.collaborative = true;
129
+ this.collaborative = !DISABLE_RTC;
129
130
  this._documentFactories = new Map();
130
131
  }
131
132
  /**
@@ -150,7 +151,7 @@ class SharedModelFactory {
150
151
  console.warn(`Only defined format are supported; got ${options.format}.`);
151
152
  return;
152
153
  }
153
- if (!options.collaborative) {
154
+ if (!this.collaborative || !options.collaborative) {
154
155
  // Bail if the document model does not support collaboration
155
156
  // the `sharedModel` will be the default one.
156
157
  return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jupyter/docprovider",
3
- "version": "1.0.1",
3
+ "version": "1.1.0-alpha.0",
4
4
  "description": "JupyterLab - Document Provider",
5
5
  "homepage": "https://github.com/jupyterlab/jupyter_collaboration",
6
6
  "bugs": {