8000 Added __terminal__ in non-persistent donkey (#2260) · pyscript/pyscript@d143b22 · GitHub
[go: up one dir, main page]

Skip to content

Commit d143b22

Browse files
Added __terminal__ in non-persistent donkey (#2260)
1 parent 0d74a60 commit d143b22

File tree

3 files changed

+102
-86
lines changed

3 files changed

+102
-86
lines changed

core/package-lock.json

Lines changed: 97 additions & 82 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

core/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@pyscript/core",
3-
"version": "0.6.20",
3+
"version": "0.6.22",
44
"type": "module",
55
"description": "PyScript",
66
"module": "./index.js",
@@ -63,7 +63,7 @@
6363
"add-promise-listener": "^0.1.3",
6464
"basic-devtools": "^0.1.6",
6565
"polyscript": "^0.16.10",
66-
"sabayon": "^0.6.0",
66+
"sabayon": "^0.6.1",
6767
"sticky-module": "^0.1.1",
6868
"to-json-callback": "^0.1.1",
6969
"type-checked-collections": "^0.1.7"
@@ -88,7 +88,7 @@
8888
"codemirror": "^6.0.1",
8989
"eslint": "^9.16.0",
9090
"flatted": "^3.3.2",
91-
"rollup": "^4.28.0",
91+
"rollup": "^4.28.1",
9292
"rollup-plugin-postcss": "^4.0.2",
9393
"rollup-plugin-string": "^3.0.0",
9494
"static-handler": "^0.5.3",

core/src/plugins/donkey.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ const { stringify } = JSON;
66
const invoke = (name, args) => `${name}(code, ${args.join(", ")})`;
77

88
const donkey = ({ type = "py", persistent, terminal, config }) => {
9-
const args = persistent ? ["globals()", "__locals__"] : ["{}", "{}"];
9+
const globals = terminal ? '{"__terminal__":__terminal__}' : "{}";
10+
const args = persistent ? ["globals()", "__locals__"] : [globals, "{}"];
1011

1112
const src = URL.createObjectURL(
1213
new Blob([

0 commit comments

Comments
 (0)
0