@fails-components/jupyter-launcher 0.0.1-alpha.10 → 0.0.1-alpha.3

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.
package/lib/index.js CHANGED
@@ -80,20 +80,6 @@ const installFetchPatches = ({ allowedSites = undefined, proxySites = undefined,
80
80
  headers: { 'Content-Type': 'text/plain' }
81
81
  });
82
82
  };
83
- const oldImportScripts = globalThis.importScripts;
84
- globalThis.importScripts = (...args) => {
85
- const newargs = args.map(url => {
86
- const urlObj = new URL(url, location.href);
87
- if (allowedOrigins.includes(urlObj.origin)) {
88
- return url;
89
- }
90
- if (proxySites && proxySites.includes(urlObj.origin)) {
91
- return proxyURL + urlObj.hostname + urlObj.pathname;
92
- }
93
- throw new Error('Script is from blocked URL');
94
- });
95
- return oldImportScripts(...newargs);
96
- };
97
83
  const oldWorker = Worker;
98
84
  const NewWorker = function (script, options) {
99
85
  const scriptURL = script instanceof URL ? script : new URL(script, location.href);
@@ -146,20 +132,6 @@ const installFetchPatches = ({ allowedSites = undefined, proxySites = undefined,
146
132
  headers: { 'Content-Type': 'text/plain' }
147
133
  });
148
134
  };
149
- const oldImportScripts = globalThis.importScripts;
150
- globalThis.importScripts = (...args) => {
151
- const newargs = args.map(url => {
152
- const urlObj = new URL(url, location.href);
153
- if (allowedOrigins.includes(urlObj.origin)) {
154
- return url;
155
- }
156
- if (proxySites && proxySites.includes(urlObj.origin)) {
157
- return proxyURL + urlObj.hostname + urlObj.pathname;
158
- }
159
- throw new Error('Script is from blocked URL');
160
- });
161
- return oldImportScripts(...newargs);
162
- };
163
135
  Object.defineProperty(globalThis, 'location', {
164
136
  value: new URL('${scriptURL.href}'),
165
137
  writable: false,
package/package.json CHANGED
@@ -1,15 +1,15 @@
1
1
  {
2
2
  "name": "@fails-components/jupyter-launcher",
3
- "version": "0.0.1-alpha.10",
3
+ "version": "0.0.1-alpha.3",
4
4
  "description": "A collections of plugins steering an iframe with jupyter remotely",
5
5
  "keywords": [
6
6
  "jupyter",
7
7
  "jupyterlab",
8
8
  "jupyterlab-extension"
9
9
  ],
10
- "homepage": "https://github.com/fails-components/jupyterfails",
10
+ "homepage": "",
11
11
  "bugs": {
12
- "url": "https://github.com/fails-components/jupyterfails/issues"
12
+ "url": "/issues"
13
13
  },
14
14
  "license": "BSD-3-Clause",
15
15
  "author": {
@@ -29,7 +29,7 @@
29
29
  "style": "style/index.css",
30
30
  "repository": {
31
31
  "type": "git",
32
- "url": "https://github.com/fails-components/jupyterfails.git"
32
+ "url": "git+https://github.com/fails-components/jupyterfails.git"
33
33
  },
34
34
  "scripts": {
35
35
  "build": "jlpm build:lib && jlpm build:labextension:dev",
package/src/index.ts CHANGED
@@ -283,20 +283,6 @@ const installFetchPatches = ({
283
283
  headers: { 'Content-Type': 'text/plain' }
284
284
  });
285
285
  };
286
- const oldImportScripts = globalThis.importScripts;
287
- globalThis.importScripts = (...args) => {
288
- const newargs = args.map(url => {
289
- const urlObj = new URL(url, location.href);
290
- if (allowedOrigins.includes(urlObj.origin)) {
291
- return url;
292
- }
293
- if (proxySites && proxySites.includes(urlObj.origin)) {
294
- return proxyURL + urlObj.hostname + urlObj.pathname;
295
- }
296
- throw new Error('Script is from blocked URL');
297
- });
298
- return oldImportScripts(...newargs);
299
- };
300
286
  const oldWorker = Worker;
301
287
  const NewWorker = function (
302
288
  script: string | URL,
@@ -353,20 +339,6 @@ const installFetchPatches = ({
353
339
  headers: { 'Content-Type': 'text/plain' }
354
340
  });
355
341
  };
356
- const oldImportScripts = globalThis.importScripts;
357
- globalThis.importScripts = (...args) => {
358
- const newargs = args.map(url => {
359
- const urlObj = new URL(url, location.href);
360
- if (allowedOrigins.includes(urlObj.origin)) {
361
- return url;
362
- }
363
- if (proxySites && proxySites.includes(urlObj.origin)) {
364
- return proxyURL + urlObj.hostname + urlObj.pathname;
365
- }
366
- throw new Error('Script is from blocked URL');
367
- });
368
- return oldImportScripts(...newargs);
369
- };
370
342
  Object.defineProperty(globalThis, 'location', {
371
343
  value: new URL('${scriptURL.href}'),
372
344
  writable: false,