Fixed py-editor offline use case (#2043)

This commit is contained in:
Andrea Giammarchi
2024-05-03 12:23:57 +02:00
committed by GitHub
parent 1a05ea5fd2
commit d1d1c5740f
3 changed files with 5 additions and 3 deletions

View File

@@ -1,12 +1,12 @@
{ {
"name": "@pyscript/core", "name": "@pyscript/core",
"version": "0.4.25", "version": "0.4.26",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "@pyscript/core", "name": "@pyscript/core",
"version": "0.4.25", "version": "0.4.26",
"license": "APACHE-2.0", "license": "APACHE-2.0",
"dependencies": { "dependencies": {
"@ungap/with-resolvers": "^0.1.0", "@ungap/with-resolvers": "^0.1.0",

View File

@@ -1,6 +1,6 @@
{ {
"name": "@pyscript/core", "name": "@pyscript/core",
"version": "0.4.25", "version": "0.4.26",
"type": "module", "type": "module",
"description": "PyScript", "description": "PyScript",
"module": "./index.js", "module": "./index.js",

View File

@@ -42,6 +42,8 @@ async function execute({ currentTarget }) {
? await import(/* webpackIgnore: true */ "../3rd-party/toml.js") ? await import(/* webpackIgnore: true */ "../3rd-party/toml.js")
: JSON; : JSON;
details.config = parse(await fetch(config).then((r) => r.text())); details.config = parse(await fetch(config).then((r) => r.text()));
const { interpreter } = details.config;
if (interpreter) details.version = interpreter;
} }
const xworker = XWorker.call(new Hook(null, hooks), srcLink, details); const xworker = XWorker.call(new Hook(null, hooks), srcLink, details);