@jupyterlite/pyodide-kernel-extension 0.6.0 → 0.7.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.
- package/lib/index.js +25 -8
- package/package.json +10 -10
- package/schema/kernel.v0.schema.json +1 -1
package/lib/index.js
CHANGED
|
@@ -10,7 +10,7 @@ const KERNEL_ICON_URL = `data:image/svg+xml;base64,${btoa(KERNEL_ICON_SVG_STR)}`
|
|
|
10
10
|
/**
|
|
11
11
|
* The default CDN fallback for Pyodide
|
|
12
12
|
*/
|
|
13
|
-
const PYODIDE_CDN_URL = 'https://cdn.jsdelivr.net/pyodide/v0.
|
|
13
|
+
const PYODIDE_CDN_URL = 'https://cdn.jsdelivr.net/pyodide/v0.28.1/full/pyodide.js';
|
|
14
14
|
/**
|
|
15
15
|
* The id for the extension, and key in the litePlugins.
|
|
16
16
|
*/
|
|
@@ -76,13 +76,7 @@ const kernel = {
|
|
|
76
76
|
create: async (options) => {
|
|
77
77
|
const { PyodideKernel } = await import('@jupyterlite/pyodide-kernel');
|
|
78
78
|
const mountDrive = !!((serviceWorkerManager === null || serviceWorkerManager === void 0 ? void 0 : serviceWorkerManager.enabled) || crossOriginIsolated);
|
|
79
|
-
|
|
80
|
-
console.info('Pyodide contents will be synced with Jupyter Contents');
|
|
81
|
-
}
|
|
82
|
-
else {
|
|
83
|
-
console.warn('Pyodide contents will NOT be synced with Jupyter Contents');
|
|
84
|
-
}
|
|
85
|
-
return new PyodideKernel({
|
|
79
|
+
const kernel = new PyodideKernel({
|
|
86
80
|
...options,
|
|
87
81
|
pyodideUrl,
|
|
88
82
|
pipliteWheelUrl,
|
|
@@ -94,6 +88,29 @@ const kernel = {
|
|
|
94
88
|
browsingContextId: serviceWorkerManager === null || serviceWorkerManager === void 0 ? void 0 : serviceWorkerManager.browsingContextId,
|
|
95
89
|
logger,
|
|
96
90
|
});
|
|
91
|
+
if (mountDrive) {
|
|
92
|
+
console.info('Pyodide contents will be synced with Jupyter Contents');
|
|
93
|
+
}
|
|
94
|
+
else {
|
|
95
|
+
const warningMessage = 'Pyodide contents will NOT be synced with Jupyter Contents. ' +
|
|
96
|
+
'For full functionality, try using a regular browser tab instead of private/incognito mode, ' +
|
|
97
|
+
'especially in Firefox where this is a known limitation.';
|
|
98
|
+
console.warn(warningMessage);
|
|
99
|
+
// Wait for kernel to be ready before logging the warning
|
|
100
|
+
kernel.ready.then(() => {
|
|
101
|
+
if (loggerRegistry) {
|
|
102
|
+
void logger({
|
|
103
|
+
payload: {
|
|
104
|
+
type: 'text',
|
|
105
|
+
data: warningMessage,
|
|
106
|
+
level: 'warning',
|
|
107
|
+
},
|
|
108
|
+
kernelId: options.id,
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
return kernel;
|
|
97
114
|
},
|
|
98
115
|
});
|
|
99
116
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jupyterlite/pyodide-kernel-extension",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0-alpha.0",
|
|
4
4
|
"description": "JupyterLite - Pyodide Kernel Extension",
|
|
5
5
|
"homepage": "https://github.com/jupyterlite/pyodide-kernel",
|
|
6
6
|
"bugs": {
|
|
@@ -47,17 +47,17 @@
|
|
|
47
47
|
"watch:labextension": "jupyter labextension watch ."
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@jupyterlab/application": "^4.
|
|
51
|
-
"@jupyterlab/coreutils": "^6.
|
|
52
|
-
"@jupyterlab/logconsole": "^4.
|
|
53
|
-
"@jupyterlite/contents": "^0.
|
|
54
|
-
"@jupyterlite/kernel": "^0.
|
|
55
|
-
"@jupyterlite/pyodide-kernel": "^0.
|
|
56
|
-
"@jupyterlite/server": "^0.
|
|
50
|
+
"@jupyterlab/application": "^4.5.0-alpha.1",
|
|
51
|
+
"@jupyterlab/coreutils": "^6.5.0-alpha.1",
|
|
52
|
+
"@jupyterlab/logconsole": "^4.5.0-alpha.1",
|
|
53
|
+
"@jupyterlite/contents": "^0.7.0-alpha.1",
|
|
54
|
+
"@jupyterlite/kernel": "^0.7.0-alpha.1",
|
|
55
|
+
"@jupyterlite/pyodide-kernel": "^0.7.0-alpha.0",
|
|
56
|
+
"@jupyterlite/server": "^0.7.0-alpha.1"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
|
-
"@jupyterlab/builder": "
|
|
60
|
-
"rimraf": "^
|
|
59
|
+
"@jupyterlab/builder": "^4.5.0-alpha.1",
|
|
60
|
+
"rimraf": "^6.0.1",
|
|
61
61
|
"typescript": "~5.2.2"
|
|
62
62
|
},
|
|
63
63
|
"publishConfig": {
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"pyodideUrl": {
|
|
9
9
|
"description": "The path to the main pyodide.js entry point",
|
|
10
10
|
"type": "string",
|
|
11
|
-
"default": "https://cdn.jsdelivr.net/pyodide/v0.
|
|
11
|
+
"default": "https://cdn.jsdelivr.net/pyodide/v0.28.1/full/pyodide.js",
|
|
12
12
|
"format": "uri"
|
|
13
13
|
},
|
|
14
14
|
"disablePyPIFallback": {
|