mirror of
https://github.com/pyscript/pyscript.git
synced 2025-12-20 10:47:35 -05:00
Compare commits
17 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2f3659b676 | ||
|
|
910c666319 | ||
|
|
eee2f64c1d | ||
|
|
d080246a0f | ||
|
|
98c0f5e50d | ||
|
|
a1268f1aa2 | ||
|
|
69b8884045 | ||
|
|
df1d699fe6 | ||
|
|
84f197b657 | ||
|
|
5bed5ede52 | ||
|
|
f6d5cf06c8 | ||
|
|
30c6c830ae | ||
|
|
d7084f7f55 | ||
|
|
a87d2b3fea | ||
|
|
81a26363a3 | ||
|
|
53e945201d | ||
|
|
181d276c8b |
4
.github/ISSUE_TEMPLATE/bug-report.yml
vendored
4
.github/ISSUE_TEMPLATE/bug-report.yml
vendored
@@ -11,7 +11,9 @@ body:
|
|||||||
|
|
||||||
There will always be more issues than there is time to do them, and so we will need to selectively close issues that don't provide enough information, so we can focus our time on helping people like you who fill out the issue form completely. Thank you for your collaboration!
|
There will always be more issues than there is time to do them, and so we will need to selectively close issues that don't provide enough information, so we can focus our time on helping people like you who fill out the issue form completely. Thank you for your collaboration!
|
||||||
|
|
||||||
There are also already a lot of open issues, so please take 2 minutes and search through existing ones to see if what you are experiencing already exists
|
There are also already a lot of open issues, so please take 2 minutes and search through existing ones to see if what you are experiencing already exists.
|
||||||
|
|
||||||
|
Finally, if you are opening **a bug report related to PyScript.com** please [use this repository instead](https://github.com/anaconda/pyscript-dot-com-issues/issues/new/choose).
|
||||||
|
|
||||||
Thanks for helping PyScript be amazing. We are nothing without people like you helping build a better community 💐!
|
Thanks for helping PyScript be amazing. We are nothing without people like you helping build a better community 💐!
|
||||||
- type: checkboxes
|
- type: checkboxes
|
||||||
|
|||||||
13
.github/dependabot.yml
vendored
Normal file
13
.github/dependabot.yml
vendored
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
# Keep GitHub Actions up to date with GitHub's Dependabot...
|
||||||
|
# https://docs.github.com/en/code-security/dependabot/working-with-dependabot/keeping-your-actions-up-to-date-with-dependabot
|
||||||
|
# https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#package-ecosystem
|
||||||
|
version: 2
|
||||||
|
updates:
|
||||||
|
- package-ecosystem: github-actions
|
||||||
|
directory: /
|
||||||
|
groups:
|
||||||
|
github-actions:
|
||||||
|
patterns:
|
||||||
|
- "*" # Group all Actions updates into a single larger pull request
|
||||||
|
schedule:
|
||||||
|
interval: weekly
|
||||||
6
.github/workflows/prepare-release.yml
vendored
6
.github/workflows/prepare-release.yml
vendored
@@ -17,12 +17,12 @@ jobs:
|
|||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Install node
|
- name: Install node
|
||||||
uses: actions/setup-node@v3
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: 18.x
|
node-version: 18.x
|
||||||
|
|
||||||
- name: Cache node modules
|
- name: Cache node modules
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v4
|
||||||
env:
|
env:
|
||||||
cache-name: cache-node-modules
|
cache-name: cache-node-modules
|
||||||
with:
|
with:
|
||||||
@@ -48,7 +48,7 @@ jobs:
|
|||||||
run: zip -r -q ./build.zip ./dist
|
run: zip -r -q ./build.zip ./dist
|
||||||
|
|
||||||
- name: Prepare Release
|
- name: Prepare Release
|
||||||
uses: softprops/action-gh-release@v1
|
uses: softprops/action-gh-release@v2
|
||||||
with:
|
with:
|
||||||
draft: true
|
draft: true
|
||||||
prerelease: true
|
prerelease: true
|
||||||
|
|||||||
4
.github/workflows/publish-release.yml
vendored
4
.github/workflows/publish-release.yml
vendored
@@ -19,12 +19,12 @@ jobs:
|
|||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Install node
|
- name: Install node
|
||||||
uses: actions/setup-node@v3
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: 18.x
|
node-version: 18.x
|
||||||
|
|
||||||
- name: Cache node modules
|
- name: Cache node modules
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v4
|
||||||
env:
|
env:
|
||||||
cache-name: cache-node-modules
|
cache-name: cache-node-modules
|
||||||
with:
|
with:
|
||||||
|
|||||||
4
.github/workflows/publish-snapshot.yml
vendored
4
.github/workflows/publish-snapshot.yml
vendored
@@ -23,12 +23,12 @@ jobs:
|
|||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Install node
|
- name: Install node
|
||||||
uses: actions/setup-node@v3
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: 18.x
|
node-version: 18.x
|
||||||
|
|
||||||
- name: Cache node modules
|
- name: Cache node modules
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v4
|
||||||
env:
|
env:
|
||||||
cache-name: cache-node-modules
|
cache-name: cache-node-modules
|
||||||
with:
|
with:
|
||||||
|
|||||||
4
.github/workflows/publish-unstable.yml
vendored
4
.github/workflows/publish-unstable.yml
vendored
@@ -24,12 +24,12 @@ jobs:
|
|||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Install node
|
- name: Install node
|
||||||
uses: actions/setup-node@v3
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: 18.x
|
node-version: 18.x
|
||||||
|
|
||||||
- name: Cache node modules
|
- name: Cache node modules
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v4
|
||||||
env:
|
env:
|
||||||
cache-name: cache-node-modules
|
cache-name: cache-node-modules
|
||||||
with:
|
with:
|
||||||
|
|||||||
10
.github/workflows/test.yml
vendored
10
.github/workflows/test.yml
vendored
@@ -37,12 +37,12 @@ jobs:
|
|||||||
run: git log --graph -3
|
run: git log --graph -3
|
||||||
|
|
||||||
- name: Install node
|
- name: Install node
|
||||||
uses: actions/setup-node@v3
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: 20.x
|
node-version: 20.x
|
||||||
|
|
||||||
- name: Cache node modules
|
- name: Cache node modules
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v4
|
||||||
env:
|
env:
|
||||||
cache-name: cache-node-modules
|
cache-name: cache-node-modules
|
||||||
with:
|
with:
|
||||||
@@ -55,7 +55,7 @@ jobs:
|
|||||||
${{ runner.os }}-
|
${{ runner.os }}-
|
||||||
|
|
||||||
- name: setup Miniconda
|
- name: setup Miniconda
|
||||||
uses: conda-incubator/setup-miniconda@v2
|
uses: conda-incubator/setup-miniconda@v3
|
||||||
|
|
||||||
- name: Create and activate virtual environment
|
- name: Create and activate virtual environment
|
||||||
run: |
|
run: |
|
||||||
@@ -76,7 +76,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
make test-integration
|
make test-integration
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v3
|
- uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: pyscript
|
name: pyscript
|
||||||
path: |
|
path: |
|
||||||
@@ -84,7 +84,7 @@ jobs:
|
|||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
retention-days: 7
|
retention-days: 7
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v3
|
- uses: actions/upload-artifact@v4
|
||||||
if: success() || failure()
|
if: success() || failure()
|
||||||
with:
|
with:
|
||||||
name: test_results
|
name: test_results
|
||||||
|
|||||||
2
.github/workflows/test_report.yml
vendored
2
.github/workflows/test_report.yml
vendored
@@ -8,7 +8,7 @@ jobs:
|
|||||||
report:
|
report:
|
||||||
runs-on: ubuntu-latest-8core
|
runs-on: ubuntu-latest-8core
|
||||||
steps:
|
steps:
|
||||||
- uses: dorny/test-reporter@v1.6.0
|
- uses: dorny/test-reporter@v1.8.0
|
||||||
with:
|
with:
|
||||||
artifact: test_results
|
artifact: test_results
|
||||||
name: Test reports
|
name: Test reports
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ repos:
|
|||||||
- id: trailing-whitespace
|
- id: trailing-whitespace
|
||||||
|
|
||||||
- repo: https://github.com/psf/black
|
- repo: https://github.com/psf/black
|
||||||
rev: 23.11.0
|
rev: 24.1.1
|
||||||
hooks:
|
hooks:
|
||||||
- id: black
|
- id: black
|
||||||
exclude: pyscript\.core/src/stdlib/pyscript/__init__\.py
|
exclude: pyscript\.core/src/stdlib/pyscript/__init__\.py
|
||||||
@@ -46,7 +46,7 @@ repos:
|
|||||||
args: [--tab-width, "4"]
|
args: [--tab-width, "4"]
|
||||||
|
|
||||||
- repo: https://github.com/pycqa/isort
|
- repo: https://github.com/pycqa/isort
|
||||||
rev: 5.12.0
|
rev: 5.13.2
|
||||||
hooks:
|
hooks:
|
||||||
- id: isort
|
- id: isort
|
||||||
name: isort (python)
|
name: isort (python)
|
||||||
|
|||||||
100
CONTRIBUTING.md
100
CONTRIBUTING.md
@@ -79,3 +79,103 @@ The Project abides by the Organization's [trademark policy](https://github.com/p
|
|||||||
|
|
||||||
Part of MVG-0.1-beta.
|
Part of MVG-0.1-beta.
|
||||||
Made with love by GitHub. Licensed under the [CC-BY 4.0 License](https://creativecommons.org/licenses/by-sa/4.0/).
|
Made with love by GitHub. Licensed under the [CC-BY 4.0 License](https://creativecommons.org/licenses/by-sa/4.0/).
|
||||||
|
|
||||||
|
# Quick guide to pytest
|
||||||
|
|
||||||
|
We make heavy usage of pytest. Here is a quick guide and collection of useful options:
|
||||||
|
|
||||||
|
- To run all tests in the current directory and subdirectories: pytest
|
||||||
|
|
||||||
|
- To run tests in a specific directory or file: pytest path/to/dir/test_foo.py
|
||||||
|
|
||||||
|
- -s: disables output capturing
|
||||||
|
|
||||||
|
- --pdb: in case of exception, enter a (Pdb) prompt so that you can inspect what went wrong.
|
||||||
|
|
||||||
|
- -v: verbose mode
|
||||||
|
|
||||||
|
- -x: stop the execution as soon as one test fails
|
||||||
|
|
||||||
|
- -k foo: run only the tests whose full name contains foo
|
||||||
|
|
||||||
|
- -k 'foo and bar'
|
||||||
|
|
||||||
|
- -k 'foo and not bar'
|
||||||
|
|
||||||
|
## Running integration tests under pytest
|
||||||
|
|
||||||
|
make test is useful to run all the tests, but during the development is useful to have more control on how tests are run. The following guide assumes that you are in the directory pyscriptjs/tests/integration/.
|
||||||
|
|
||||||
|
### To run all the integration tests, single or multi core
|
||||||
|
|
||||||
|
$ pytest -xv
|
||||||
|
...
|
||||||
|
|
||||||
|
test_00_support.py::TestSupport::test_basic[chromium] PASSED [ 0%]
|
||||||
|
test_00_support.py::TestSupport::test_console[chromium] PASSED [ 1%]
|
||||||
|
test_00_support.py::TestSupport::test_check_js_errors_simple[chromium] PASSED [ 2%]
|
||||||
|
test_00_support.py::TestSupport::test_check_js_errors_expected[chromium] PASSED [ 3%]
|
||||||
|
test_00_support.py::TestSupport::test_check_js_errors_expected_but_didnt_raise[chromium] PASSED [ 4%]
|
||||||
|
test_00_support.py::TestSupport::test_check_js_errors_multiple[chromium] PASSED [ 5%]
|
||||||
|
...
|
||||||
|
|
||||||
|
-x means "stop at the first failure". -v means "verbose", so that you can see all the test names one by one. We try to keep tests in a reasonable order, from most basic to most complex. This way, if you introduced some bug in very basic things, you will notice immediately.
|
||||||
|
|
||||||
|
If you have the pytest-xdist plugin installed, you can run all the integration tests on 4 cores in parallel:
|
||||||
|
|
||||||
|
$ pytest -n 4
|
||||||
|
|
||||||
|
### To run a single test, headless
|
||||||
|
|
||||||
|
$ pytest test_01_basic.py -k test_pyscript_hello -s
|
||||||
|
...
|
||||||
|
[ 0.00 page.goto ] pyscript_hello.html
|
||||||
|
[ 0.01 request ] 200 - fake_server - http://fake_server/pyscript_hello.html
|
||||||
|
...
|
||||||
|
[ 0.17 console.info ] [py-loader] Downloading pyodide-x.y.z...
|
||||||
|
[ 0.18 request ] 200 - CACHED - https://cdn.jsdelivr.net/pyodide/vx.y.z/full/pyodide.js
|
||||||
|
...
|
||||||
|
[ 3.59 console.info ] [pyscript/main] PyScript page fully initialized
|
||||||
|
[ 3.60 console.log ] hello pyscript
|
||||||
|
|
||||||
|
-k selects tests by pattern matching as described above. -s instructs pytest to show the output to the terminal instead of capturing it. In the output you can see various useful things, including network requests and JS console messages.
|
||||||
|
|
||||||
|
### To run a single test, headed
|
||||||
|
|
||||||
|
$ pytest test_01_basic.py -k test_pyscript_hello -s --headed
|
||||||
|
...
|
||||||
|
|
||||||
|
Same as above, but with --headed the browser is shown in a window, and you can interact with it. The browser uses a fake server, which means that HTTP requests are cached.
|
||||||
|
|
||||||
|
Unfortunately, in this mode source maps does not seem to work, and you cannot debug the original typescript source code. This seems to be a bug in playwright, for which we have a workaround:
|
||||||
|
|
||||||
|
$ pytest test_01_basic.py -k test_pyscript_hello -s --headed --no-fake-server
|
||||||
|
...
|
||||||
|
|
||||||
|
As the name implies, -no-fake-server disables the fake server: HTTP requests are not cached, but source-level debugging works.
|
||||||
|
|
||||||
|
Finally:
|
||||||
|
|
||||||
|
$ pytest test_01_basic.py -k test_pyscript_hello -s --dev
|
||||||
|
...
|
||||||
|
|
||||||
|
--dev implies --headed --no-fake-server. In addition, it also automatically open chrome dev tools.
|
||||||
|
|
||||||
|
### To run only main thread or worker tests
|
||||||
|
|
||||||
|
By default, we run each test twice: one with execution_thread = "main" and one with execution_thread = "worker". If you want to run only half of them, you can use -m:
|
||||||
|
|
||||||
|
$ pytest -m main # run only the tests in the main thread
|
||||||
|
$ pytest -m worker # ron only the tests in the web worker
|
||||||
|
|
||||||
|
## Fake server, HTTP cache
|
||||||
|
|
||||||
|
By default, our test machinery uses a playwright router which intercepts and cache HTTP requests, so that for example you don't have to download pyodide again and again. This also enables the possibility of running tests in parallel on multiple cores.
|
||||||
|
|
||||||
|
The cache is stored using the pytest-cache plugin, which means that it survives across sessions.
|
||||||
|
|
||||||
|
If you want to temporarily disable the cache, the easiest thing is to use --no-fake-server, which bypasses it completely.
|
||||||
|
|
||||||
|
If you want to clear the cache, you can use the special option --clear-http-cache:
|
||||||
|
|
||||||
|
NOTE: this works only if you are inside tests/integration, or if you explicitly specify tests/integration from the command line. This is due to how pytest decides to search for and load the various conftest.py.
|
||||||
|
|||||||
382
pyscript.core/package-lock.json
generated
382
pyscript.core/package-lock.json
generated
@@ -1,41 +1,41 @@
|
|||||||
{
|
{
|
||||||
"name": "@pyscript/core",
|
"name": "@pyscript/core",
|
||||||
"version": "0.3.23",
|
"version": "0.4.10",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "@pyscript/core",
|
"name": "@pyscript/core",
|
||||||
"version": "0.3.23",
|
"version": "0.4.10",
|
||||||
"license": "APACHE-2.0",
|
"license": "APACHE-2.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@ungap/with-resolvers": "^0.1.0",
|
"@ungap/with-resolvers": "^0.1.0",
|
||||||
"basic-devtools": "^0.1.6",
|
"basic-devtools": "^0.1.6",
|
||||||
"polyscript": "^0.6.18",
|
"polyscript": "^0.11.3",
|
||||||
"sticky-module": "^0.1.1",
|
"sticky-module": "^0.1.1",
|
||||||
"to-json-callback": "^0.1.1",
|
"to-json-callback": "^0.1.1",
|
||||||
"type-checked-collections": "^0.1.7"
|
"type-checked-collections": "^0.1.7"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@codemirror/commands": "^6.3.3",
|
"@codemirror/commands": "^6.3.3",
|
||||||
"@codemirror/lang-python": "^6.1.3",
|
"@codemirror/lang-python": "^6.1.4",
|
||||||
"@codemirror/language": "^6.10.0",
|
"@codemirror/language": "^6.10.1",
|
||||||
"@codemirror/state": "^6.4.0",
|
"@codemirror/state": "^6.4.1",
|
||||||
"@codemirror/view": "^6.23.1",
|
"@codemirror/view": "^6.26.0",
|
||||||
"@playwright/test": "^1.41.1",
|
"@playwright/test": "^1.42.1",
|
||||||
"@rollup/plugin-commonjs": "^25.0.7",
|
"@rollup/plugin-commonjs": "^25.0.7",
|
||||||
"@rollup/plugin-node-resolve": "^15.2.3",
|
"@rollup/plugin-node-resolve": "^15.2.3",
|
||||||
"@rollup/plugin-terser": "^0.4.4",
|
"@rollup/plugin-terser": "^0.4.4",
|
||||||
"@webreflection/toml-j0.4": "^1.1.3",
|
"@webreflection/toml-j0.4": "^1.1.3",
|
||||||
"@xterm/addon-fit": "^0.9.0-beta.1",
|
"@xterm/addon-fit": "^0.9.0",
|
||||||
"chokidar": "^3.5.3",
|
"chokidar": "^3.6.0",
|
||||||
"codemirror": "^6.0.1",
|
"codemirror": "^6.0.1",
|
||||||
"eslint": "^8.56.0",
|
"eslint": "^8.57.0",
|
||||||
"rollup": "^4.9.6",
|
"rollup": "^4.13.0",
|
||||||
"rollup-plugin-postcss": "^4.0.2",
|
"rollup-plugin-postcss": "^4.0.2",
|
||||||
"rollup-plugin-string": "^3.0.0",
|
"rollup-plugin-string": "^3.0.0",
|
||||||
"static-handler": "^0.4.3",
|
"static-handler": "^0.4.3",
|
||||||
"typescript": "^5.3.3",
|
"typescript": "^5.4.3",
|
||||||
"xterm": "^5.3.0",
|
"xterm": "^5.3.0",
|
||||||
"xterm-readline": "^1.1.1"
|
"xterm-readline": "^1.1.1"
|
||||||
}
|
}
|
||||||
@@ -80,20 +80,22 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@codemirror/lang-python": {
|
"node_modules/@codemirror/lang-python": {
|
||||||
"version": "6.1.3",
|
"version": "6.1.4",
|
||||||
"resolved": "https://registry.npmjs.org/@codemirror/lang-python/-/lang-python-6.1.3.tgz",
|
"resolved": "https://registry.npmjs.org/@codemirror/lang-python/-/lang-python-6.1.4.tgz",
|
||||||
"integrity": "sha512-S9w2Jl74hFlD5nqtUMIaXAq9t5WlM0acCkyuQWUUSvZclk1sV+UfnpFiZzuZSG+hfEaOmxKR5UxY/Uxswn7EhQ==",
|
"integrity": "sha512-b6d1TDqrkCjFNvMO01SWldFiDoZ39yl3tDMC1Y5f8glA2eZpynPxJhwYVTlGFr0stizcJgrp6ojLEGH2myoZAw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@codemirror/autocomplete": "^6.3.2",
|
"@codemirror/autocomplete": "^6.3.2",
|
||||||
"@codemirror/language": "^6.8.0",
|
"@codemirror/language": "^6.8.0",
|
||||||
|
"@codemirror/state": "^6.0.0",
|
||||||
|
"@lezer/common": "^1.2.1",
|
||||||
"@lezer/python": "^1.1.4"
|
"@lezer/python": "^1.1.4"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@codemirror/language": {
|
"node_modules/@codemirror/language": {
|
||||||
"version": "6.10.0",
|
"version": "6.10.1",
|
||||||
"resolved": "https://registry.npmjs.org/@codemirror/language/-/language-6.10.0.tgz",
|
"resolved": "https://registry.npmjs.org/@codemirror/language/-/language-6.10.1.tgz",
|
||||||
"integrity": "sha512-2vaNn9aPGCRFKWcHPFksctzJ8yS5p7YoaT+jHpc0UGKzNuAIx4qy6R5wiqbP+heEEdyaABA582mNqSHzSoYdmg==",
|
"integrity": "sha512-5GrXzrhq6k+gL5fjkAwt90nYDmjlzTIJV8THnxNFtNKWotMIlzzN+CpqxqwXOECnUdOndmSeWntVrVcv5axWRQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@codemirror/state": "^6.0.0",
|
"@codemirror/state": "^6.0.0",
|
||||||
@@ -105,9 +107,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@codemirror/lint": {
|
"node_modules/@codemirror/lint": {
|
||||||
"version": "6.4.2",
|
"version": "6.5.0",
|
||||||
"resolved": "https://registry.npmjs.org/@codemirror/lint/-/lint-6.4.2.tgz",
|
"resolved": "https://registry.npmjs.org/@codemirror/lint/-/lint-6.5.0.tgz",
|
||||||
"integrity": "sha512-wzRkluWb1ptPKdzlsrbwwjYCPLgzU6N88YBAmlZi8WFyuiEduSd05MnJYNogzyc8rPK7pj6m95ptUApc8sHKVA==",
|
"integrity": "sha512-+5YyicIaaAZKU8K43IQi8TBy6mF6giGeWAH7N96Z5LC30Wm5JMjqxOYIE9mxwMG1NbhT2mA3l9hA4uuKUM3E5g==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@codemirror/state": "^6.0.0",
|
"@codemirror/state": "^6.0.0",
|
||||||
@@ -116,9 +118,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@codemirror/search": {
|
"node_modules/@codemirror/search": {
|
||||||
"version": "6.5.5",
|
"version": "6.5.6",
|
||||||
"resolved": "https://registry.npmjs.org/@codemirror/search/-/search-6.5.5.tgz",
|
"resolved": "https://registry.npmjs.org/@codemirror/search/-/search-6.5.6.tgz",
|
||||||
"integrity": "sha512-PIEN3Ke1buPod2EHbJsoQwlbpkz30qGZKcnmH1eihq9+bPQx8gelauUwLYaY4vBOuBAuEhmpDLii4rj/uO0yMA==",
|
"integrity": "sha512-rpMgcsh7o0GuCDUXKPvww+muLA1pDJaFrpq/CCHtpQJYz8xopu4D1hPcKRoDD0YlF8gZaqTNIRa4VRBWyhyy7Q==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@codemirror/state": "^6.0.0",
|
"@codemirror/state": "^6.0.0",
|
||||||
@@ -127,15 +129,15 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@codemirror/state": {
|
"node_modules/@codemirror/state": {
|
||||||
"version": "6.4.0",
|
"version": "6.4.1",
|
||||||
"resolved": "https://registry.npmjs.org/@codemirror/state/-/state-6.4.0.tgz",
|
"resolved": "https://registry.npmjs.org/@codemirror/state/-/state-6.4.1.tgz",
|
||||||
"integrity": "sha512-hm8XshYj5Fo30Bb922QX9hXB/bxOAVH+qaqHBzw5TKa72vOeslyGwd4X8M0c1dJ9JqxlaMceOQ8RsL9tC7gU0A==",
|
"integrity": "sha512-QkEyUiLhsJoZkbumGZlswmAhA7CBU02Wrz7zvH4SrcifbsqwlXShVXg65f3v/ts57W3dqyamEriMhij1Z3Zz4A==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/@codemirror/view": {
|
"node_modules/@codemirror/view": {
|
||||||
"version": "6.23.1",
|
"version": "6.26.0",
|
||||||
"resolved": "https://registry.npmjs.org/@codemirror/view/-/view-6.23.1.tgz",
|
"resolved": "https://registry.npmjs.org/@codemirror/view/-/view-6.26.0.tgz",
|
||||||
"integrity": "sha512-J2Xnn5lFYT1ZN/5ewEoMBCmLlL71lZ3mBdb7cUEuHhX2ESoSrNEucpsDXpX22EuTGm9LOgC9v4Z0wx+Ez8QmGA==",
|
"integrity": "sha512-nSSmzONpqsNzshPOxiKhK203R6BvABepugAe34QfQDbNDslyjkqBuKgrK5ZBvqNXpfxz5iLrlGTmEfhbQyH46A==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@codemirror/state": "^6.4.0",
|
"@codemirror/state": "^6.4.0",
|
||||||
@@ -191,9 +193,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@eslint/js": {
|
"node_modules/@eslint/js": {
|
||||||
"version": "8.56.0",
|
"version": "8.57.0",
|
||||||
"resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.56.0.tgz",
|
"resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.0.tgz",
|
||||||
"integrity": "sha512-gMsVel9D7f2HLkBma9VbtzZRehRogVRfbr++f06nL2vnCGCNlzOD+/MUov/F4p8myyAHspEhVobgjpX64q5m6A==",
|
"integrity": "sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
|
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
|
||||||
@@ -247,9 +249,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@jridgewell/resolve-uri": {
|
"node_modules/@jridgewell/resolve-uri": {
|
||||||
"version": "3.1.1",
|
"version": "3.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz",
|
||||||
"integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==",
|
"integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=6.0.0"
|
"node": ">=6.0.0"
|
||||||
@@ -281,9 +283,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/@jridgewell/trace-mapping": {
|
"node_modules/@jridgewell/trace-mapping": {
|
||||||
"version": "0.3.21",
|
"version": "0.3.22",
|
||||||
"resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.21.tgz",
|
"resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.22.tgz",
|
||||||
"integrity": "sha512-SRfKmRe1KvYnxjEMtxEr+J4HIeMX5YBg/qhRHpxEIGjhX1rshcHlnFUE9K0GazhVKWM7B+nARSkV8LuvJdJ5/g==",
|
"integrity": "sha512-Wf963MzWtA2sjrNt+g18IAln9lKnlRp+K2eH4jjIoF1wYeq3aMREpG09xhlhdzS0EjwU7qmUJYangWa+151vZw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@jridgewell/resolve-uri": "^3.1.0",
|
"@jridgewell/resolve-uri": "^3.1.0",
|
||||||
@@ -306,9 +308,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@lezer/lr": {
|
"node_modules/@lezer/lr": {
|
||||||
"version": "1.3.14",
|
"version": "1.4.0",
|
||||||
"resolved": "https://registry.npmjs.org/@lezer/lr/-/lr-1.3.14.tgz",
|
"resolved": "https://registry.npmjs.org/@lezer/lr/-/lr-1.4.0.tgz",
|
||||||
"integrity": "sha512-z5mY4LStlA3yL7aHT/rqgG614cfcvklS+8oFRFBYrs4YaWLJyKKM4+nN6KopToX0o9Hj6zmH6M5kinOYuy06ug==",
|
"integrity": "sha512-Wst46p51km8gH0ZUmeNrtpRYmdlRHUpN1DQd3GFAyKANi8WVz8c2jHYTf1CVScFaCjQw1iO3ZZdqGDxQPRErTg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@lezer/common": "^1.0.0"
|
"@lezer/common": "^1.0.0"
|
||||||
@@ -361,12 +363,12 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@playwright/test": {
|
"node_modules/@playwright/test": {
|
||||||
"version": "1.41.1",
|
"version": "1.42.1",
|
||||||
"resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.41.1.tgz",
|
"resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.42.1.tgz",
|
||||||
"integrity": "sha512-9g8EWTjiQ9yFBXc6HjCWe41msLpxEX0KhmfmPl9RPLJdfzL4F0lg2BdJ91O9azFdl11y1pmpwdjBiSxvqc+btw==",
|
"integrity": "sha512-Gq9rmS54mjBL/7/MvBaNOBwbfnh7beHvS6oS4srqXFcQHpQCV1+c8JXWE8VLPyRDhgS3H8x8A7hztqI9VnwrAQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"playwright": "1.41.1"
|
"playwright": "1.42.1"
|
||||||
},
|
},
|
||||||
"bin": {
|
"bin": {
|
||||||
"playwright": "cli.js"
|
"playwright": "cli.js"
|
||||||
@@ -470,9 +472,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@rollup/rollup-android-arm-eabi": {
|
"node_modules/@rollup/rollup-android-arm-eabi": {
|
||||||
"version": "4.9.6",
|
"version": "4.13.0",
|
||||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.9.6.tgz",
|
"resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.13.0.tgz",
|
||||||
"integrity": "sha512-MVNXSSYN6QXOulbHpLMKYi60ppyO13W9my1qogeiAqtjb2yR4LSmfU2+POvDkLzhjYLXz9Rf9+9a3zFHW1Lecg==",
|
"integrity": "sha512-5ZYPOuaAqEH/W3gYsRkxQATBW3Ii1MfaT4EQstTnLKViLi2gLSQmlmtTpGucNP3sXEpOiI5tdGhjdE111ekyEg==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"arm"
|
"arm"
|
||||||
],
|
],
|
||||||
@@ -483,9 +485,9 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"node_modules/@rollup/rollup-android-arm64": {
|
"node_modules/@rollup/rollup-android-arm64": {
|
||||||
"version": "4.9.6",
|
"version": "4.13.0",
|
||||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.9.6.tgz",
|
"resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.13.0.tgz",
|
||||||
"integrity": "sha512-T14aNLpqJ5wzKNf5jEDpv5zgyIqcpn1MlwCrUXLrwoADr2RkWA0vOWP4XxbO9aiO3dvMCQICZdKeDrFl7UMClw==",
|
"integrity": "sha512-BSbaCmn8ZadK3UAQdlauSvtaJjhlDEjS5hEVVIN3A4bbl3X+otyf/kOJV08bYiRxfejP3DXFzO2jz3G20107+Q==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"arm64"
|
"arm64"
|
||||||
],
|
],
|
||||||
@@ -496,9 +498,9 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"node_modules/@rollup/rollup-darwin-arm64": {
|
"node_modules/@rollup/rollup-darwin-arm64": {
|
||||||
"version": "4.9.6",
|
"version": "4.13.0",
|
||||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.9.6.tgz",
|
"resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.13.0.tgz",
|
||||||
"integrity": "sha512-CqNNAyhRkTbo8VVZ5R85X73H3R5NX9ONnKbXuHisGWC0qRbTTxnF1U4V9NafzJbgGM0sHZpdO83pLPzq8uOZFw==",
|
"integrity": "sha512-Ovf2evVaP6sW5Ut0GHyUSOqA6tVKfrTHddtmxGQc1CTQa1Cw3/KMCDEEICZBbyppcwnhMwcDce9ZRxdWRpVd6g==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"arm64"
|
"arm64"
|
||||||
],
|
],
|
||||||
@@ -509,9 +511,9 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"node_modules/@rollup/rollup-darwin-x64": {
|
"node_modules/@rollup/rollup-darwin-x64": {
|
||||||
"version": "4.9.6",
|
"version": "4.13.0",
|
||||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.9.6.tgz",
|
"resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.13.0.tgz",
|
||||||
"integrity": "sha512-zRDtdJuRvA1dc9Mp6BWYqAsU5oeLixdfUvkTHuiYOHwqYuQ4YgSmi6+/lPvSsqc/I0Omw3DdICx4Tfacdzmhog==",
|
"integrity": "sha512-U+Jcxm89UTK592vZ2J9st9ajRv/hrwHdnvyuJpa5A2ngGSVHypigidkQJP+YiGL6JODiUeMzkqQzbCG3At81Gg==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"x64"
|
"x64"
|
||||||
],
|
],
|
||||||
@@ -522,9 +524,9 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"node_modules/@rollup/rollup-linux-arm-gnueabihf": {
|
"node_modules/@rollup/rollup-linux-arm-gnueabihf": {
|
||||||
"version": "4.9.6",
|
"version": "4.13.0",
|
||||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.9.6.tgz",
|
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.13.0.tgz",
|
||||||
"integrity": "sha512-oNk8YXDDnNyG4qlNb6is1ojTOGL/tRhbbKeE/YuccItzerEZT68Z9gHrY3ROh7axDc974+zYAPxK5SH0j/G+QQ==",
|
"integrity": "sha512-8wZidaUJUTIR5T4vRS22VkSMOVooG0F4N+JSwQXWSRiC6yfEsFMLTYRFHvby5mFFuExHa/yAp9juSphQQJAijQ==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"arm"
|
"arm"
|
||||||
],
|
],
|
||||||
@@ -535,9 +537,9 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"node_modules/@rollup/rollup-linux-arm64-gnu": {
|
"node_modules/@rollup/rollup-linux-arm64-gnu": {
|
||||||
"version": "4.9.6",
|
"version": "4.13.0",
|
||||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.9.6.tgz",
|
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.13.0.tgz",
|
||||||
"integrity": "sha512-Z3O60yxPtuCYobrtzjo0wlmvDdx2qZfeAWTyfOjEDqd08kthDKexLpV97KfAeUXPosENKd8uyJMRDfFMxcYkDQ==",
|
"integrity": "sha512-Iu0Kno1vrD7zHQDxOmvweqLkAzjxEVqNhUIXBsZ8hu8Oak7/5VTPrxOEZXYC1nmrBVJp0ZcL2E7lSuuOVaE3+w==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"arm64"
|
"arm64"
|
||||||
],
|
],
|
||||||
@@ -548,9 +550,9 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"node_modules/@rollup/rollup-linux-arm64-musl": {
|
"node_modules/@rollup/rollup-linux-arm64-musl": {
|
||||||
"version": "4.9.6",
|
"version": "4.13.0",
|
||||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.9.6.tgz",
|
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.13.0.tgz",
|
||||||
"integrity": "sha512-gpiG0qQJNdYEVad+1iAsGAbgAnZ8j07FapmnIAQgODKcOTjLEWM9sRb+MbQyVsYCnA0Im6M6QIq6ax7liws6eQ==",
|
"integrity": "sha512-C31QrW47llgVyrRjIwiOwsHFcaIwmkKi3PCroQY5aVq4H0A5v/vVVAtFsI1nfBngtoRpeREvZOkIhmRwUKkAdw==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"arm64"
|
"arm64"
|
||||||
],
|
],
|
||||||
@@ -561,9 +563,9 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"node_modules/@rollup/rollup-linux-riscv64-gnu": {
|
"node_modules/@rollup/rollup-linux-riscv64-gnu": {
|
||||||
"version": "4.9.6",
|
"version": "4.13.0",
|
||||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.9.6.tgz",
|
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.13.0.tgz",
|
||||||
"integrity": "sha512-+uCOcvVmFUYvVDr27aiyun9WgZk0tXe7ThuzoUTAukZJOwS5MrGbmSlNOhx1j80GdpqbOty05XqSl5w4dQvcOA==",
|
"integrity": "sha512-Oq90dtMHvthFOPMl7pt7KmxzX7E71AfyIhh+cPhLY9oko97Zf2C9tt/XJD4RgxhaGeAraAXDtqxvKE1y/j35lA==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"riscv64"
|
"riscv64"
|
||||||
],
|
],
|
||||||
@@ -574,9 +576,9 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"node_modules/@rollup/rollup-linux-x64-gnu": {
|
"node_modules/@rollup/rollup-linux-x64-gnu": {
|
||||||
"version": "4.9.6",
|
"version": "4.13.0",
|
||||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.9.6.tgz",
|
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.13.0.tgz",
|
||||||
"integrity": "sha512-HUNqM32dGzfBKuaDUBqFB7tP6VMN74eLZ33Q9Y1TBqRDn+qDonkAUyKWwF9BR9unV7QUzffLnz9GrnKvMqC/fw==",
|
"integrity": "sha512-yUD/8wMffnTKuiIsl6xU+4IA8UNhQ/f1sAnQebmE/lyQ8abjsVyDkyRkWop0kdMhKMprpNIhPmYlCxgHrPoXoA==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"x64"
|
"x64"
|
||||||
],
|
],
|
||||||
@@ -587,9 +589,9 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"node_modules/@rollup/rollup-linux-x64-musl": {
|
"node_modules/@rollup/rollup-linux-x64-musl": {
|
||||||
"version": "4.9.6",
|
"version": "4.13.0",
|
||||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.9.6.tgz",
|
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.13.0.tgz",
|
||||||
"integrity": "sha512-ch7M+9Tr5R4FK40FHQk8VnML0Szi2KRujUgHXd/HjuH9ifH72GUmw6lStZBo3c3GB82vHa0ZoUfjfcM7JiiMrQ==",
|
"integrity": "sha512-9RyNqoFNdF0vu/qqX63fKotBh43fJQeYC98hCaf89DYQpv+xu0D8QFSOS0biA7cGuqJFOc1bJ+m2rhhsKcw1hw==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"x64"
|
"x64"
|
||||||
],
|
],
|
||||||
@@ -600,9 +602,9 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"node_modules/@rollup/rollup-win32-arm64-msvc": {
|
"node_modules/@rollup/rollup-win32-arm64-msvc": {
|
||||||
"version": "4.9.6",
|
"version": "4.13.0",
|
||||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.9.6.tgz",
|
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.13.0.tgz",
|
||||||
"integrity": "sha512-VD6qnR99dhmTQ1mJhIzXsRcTBvTjbfbGGwKAHcu+52cVl15AC/kplkhxzW/uT0Xl62Y/meBKDZvoJSJN+vTeGA==",
|
"integrity": "sha512-46ue8ymtm/5PUU6pCvjlic0z82qWkxv54GTJZgHrQUuZnVH+tvvSP0LsozIDsCBFO4VjJ13N68wqrKSeScUKdA==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"arm64"
|
"arm64"
|
||||||
],
|
],
|
||||||
@@ -613,9 +615,9 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"node_modules/@rollup/rollup-win32-ia32-msvc": {
|
"node_modules/@rollup/rollup-win32-ia32-msvc": {
|
||||||
"version": "4.9.6",
|
"version": "4.13.0",
|
||||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.9.6.tgz",
|
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.13.0.tgz",
|
||||||
"integrity": "sha512-J9AFDq/xiRI58eR2NIDfyVmTYGyIZmRcvcAoJ48oDld/NTR8wyiPUu2X/v1navJ+N/FGg68LEbX3Ejd6l8B7MQ==",
|
"integrity": "sha512-P5/MqLdLSlqxbeuJ3YDeX37srC8mCflSyTrUsgbU1c/U9j6l2g2GiIdYaGD9QjdMQPMSgYm7hgg0551wHyIluw==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"ia32"
|
"ia32"
|
||||||
],
|
],
|
||||||
@@ -626,9 +628,9 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"node_modules/@rollup/rollup-win32-x64-msvc": {
|
"node_modules/@rollup/rollup-win32-x64-msvc": {
|
||||||
"version": "4.9.6",
|
"version": "4.13.0",
|
||||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.9.6.tgz",
|
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.13.0.tgz",
|
||||||
"integrity": "sha512-jqzNLhNDvIZOrt69Ce4UjGRpXJBzhUBzawMwnaDAwyHriki3XollsewxWzOzz+4yOFDkuJHtTsZFwMxhYJWmLQ==",
|
"integrity": "sha512-UKXUQNbO3DOhzLRwHSpa0HnhhCgNODvfoPWv2FCXme8N/ANFfhIPMGuOT+QuKd16+B5yxZ0HdpNlqPvTMS1qfw==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"x64"
|
"x64"
|
||||||
],
|
],
|
||||||
@@ -669,6 +671,11 @@
|
|||||||
"resolved": "https://registry.npmjs.org/@ungap/with-resolvers/-/with-resolvers-0.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/@ungap/with-resolvers/-/with-resolvers-0.1.0.tgz",
|
||||||
"integrity": "sha512-g7f0IkJdPW2xhY7H4iE72DAsIyfuwEFc6JWc2tYFwKDMWWAF699vGjrM348cwQuOXgHpe1gWFe+Eiyjx/ewvvw=="
|
"integrity": "sha512-g7f0IkJdPW2xhY7H4iE72DAsIyfuwEFc6JWc2tYFwKDMWWAF699vGjrM348cwQuOXgHpe1gWFe+Eiyjx/ewvvw=="
|
||||||
},
|
},
|
||||||
|
"node_modules/@webreflection/fetch": {
|
||||||
|
"version": "0.1.5",
|
||||||
|
"resolved": "https://registry.npmjs.org/@webreflection/fetch/-/fetch-0.1.5.tgz",
|
||||||
|
"integrity": "sha512-zCcqCJoNLvdeF41asAK71XPlwSPieeRDsE09albBunJEksuYPYNillKNQjf8p5BqSoTKTuKrW3lUm3MNodUC4g=="
|
||||||
|
},
|
||||||
"node_modules/@webreflection/toml-j0.4": {
|
"node_modules/@webreflection/toml-j0.4": {
|
||||||
"version": "1.1.3",
|
"version": "1.1.3",
|
||||||
"resolved": "https://registry.npmjs.org/@webreflection/toml-j0.4/-/toml-j0.4-1.1.3.tgz",
|
"resolved": "https://registry.npmjs.org/@webreflection/toml-j0.4/-/toml-j0.4-1.1.3.tgz",
|
||||||
@@ -676,14 +683,21 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/@xterm/addon-fit": {
|
"node_modules/@xterm/addon-fit": {
|
||||||
"version": "0.9.0-beta.1",
|
"version": "0.9.0",
|
||||||
"resolved": "https://registry.npmjs.org/@xterm/addon-fit/-/addon-fit-0.9.0-beta.1.tgz",
|
"resolved": "https://registry.npmjs.org/@xterm/addon-fit/-/addon-fit-0.9.0.tgz",
|
||||||
"integrity": "sha512-HmGRUMMamUpQYuQBF2VP1LJ0xzqF85LMFfpaNu84t1Tsrl1lPKJWtqX9FDZ22Rf5q6bnKdbj44TRVAUHgDRbLA==",
|
"integrity": "sha512-hDlPPbTVPYyvwXu/asW8HbJkI/2RMi0cMaJnBZYVeJB0SWP2NeESMCNr+I7CvBlyI0sAxpxOg8Wk4OMkxBz9WA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"xterm": "^5.0.0"
|
"@xterm/xterm": "^5.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/@xterm/xterm": {
|
||||||
|
"version": "5.4.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@xterm/xterm/-/xterm-5.4.0.tgz",
|
||||||
|
"integrity": "sha512-GlyzcZZ7LJjhFevthHtikhiDIl8lnTSgol6eTM4aoSNLcuXu3OEhnbqdCVIjtIil3jjabf3gDtb1S8FGahsuEw==",
|
||||||
|
"dev": true,
|
||||||
|
"peer": true
|
||||||
|
},
|
||||||
"node_modules/acorn": {
|
"node_modules/acorn": {
|
||||||
"version": "8.11.3",
|
"version": "8.11.3",
|
||||||
"resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz",
|
"resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz",
|
||||||
@@ -813,9 +827,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/browserslist": {
|
"node_modules/browserslist": {
|
||||||
"version": "4.22.2",
|
"version": "4.23.0",
|
||||||
"resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.22.2.tgz",
|
"resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.23.0.tgz",
|
||||||
"integrity": "sha512-0UgcrvQmBDvZHFGdYUehrCNIazki7/lUP3kkoi/r3YB2amZbFM9J43ZRkJTXBUZK4gmx56+Sqk9+Vs9mwZx9+A==",
|
"integrity": "sha512-QW8HiM1shhT2GuzkvklfjcKDiWFXHOeFCIA/huJPwHsslwcydgk7X+z2zXpEijP98UCY7HbubZt5J2Zgvf0CaQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
@@ -832,8 +846,8 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"caniuse-lite": "^1.0.30001565",
|
"caniuse-lite": "^1.0.30001587",
|
||||||
"electron-to-chromium": "^1.4.601",
|
"electron-to-chromium": "^1.4.668",
|
||||||
"node-releases": "^2.0.14",
|
"node-releases": "^2.0.14",
|
||||||
"update-browserslist-db": "^1.0.13"
|
"update-browserslist-db": "^1.0.13"
|
||||||
},
|
},
|
||||||
@@ -884,9 +898,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/caniuse-lite": {
|
"node_modules/caniuse-lite": {
|
||||||
"version": "1.0.30001578",
|
"version": "1.0.30001587",
|
||||||
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001578.tgz",
|
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001587.tgz",
|
||||||
"integrity": "sha512-J/jkFgsQ3NEl4w2lCoM9ZPxrD+FoBNJ7uJUpGVjIg/j0OwJosWM36EPDv+Yyi0V4twBk9pPmlFS+PLykgEvUmg==",
|
"integrity": "sha512-HMFNotUmLXn71BQxg8cijvqxnIAofforZOwGsxyXJ0qugTdspUF4sPSJ2vhgprHCB996tIDzEq1ubumPDV8ULA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
@@ -920,16 +934,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/chokidar": {
|
"node_modules/chokidar": {
|
||||||
"version": "3.5.3",
|
"version": "3.6.0",
|
||||||
"resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz",
|
"resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz",
|
||||||
"integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==",
|
"integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"funding": [
|
|
||||||
{
|
|
||||||
"type": "individual",
|
|
||||||
"url": "https://paulmillr.com/funding/"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"anymatch": "~3.1.2",
|
"anymatch": "~3.1.2",
|
||||||
"braces": "~3.0.2",
|
"braces": "~3.0.2",
|
||||||
@@ -942,6 +950,9 @@
|
|||||||
"engines": {
|
"engines": {
|
||||||
"node": ">= 8.10.0"
|
"node": ">= 8.10.0"
|
||||||
},
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://paulmillr.com/funding/"
|
||||||
|
},
|
||||||
"optionalDependencies": {
|
"optionalDependencies": {
|
||||||
"fsevents": "~2.3.2"
|
"fsevents": "~2.3.2"
|
||||||
}
|
}
|
||||||
@@ -970,14 +981,14 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/coincident": {
|
"node_modules/coincident": {
|
||||||
"version": "1.1.1",
|
"version": "1.2.3",
|
||||||
"resolved": "https://registry.npmjs.org/coincident/-/coincident-1.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/coincident/-/coincident-1.2.3.tgz",
|
||||||
"integrity": "sha512-4i6bejrHuY6aOY8uhq56g/psUK2k99y5hImpavQz7yfPNCXuJkmtRYpvBOguC0mdYXPgQjvoz+Odw/WO6q4okg==",
|
"integrity": "sha512-Uxz3BMTWIslzeWjuQnizGWVg0j6khbvHUQ8+5BdM7WuJEm4ALXwq3wluYoB+uF68uPBz/oUOeJnYURKyfjexlA==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@ungap/structured-clone": "^1.2.0",
|
"@ungap/structured-clone": "^1.2.0",
|
||||||
"@ungap/with-resolvers": "^0.1.0",
|
"@ungap/with-resolvers": "^0.1.0",
|
||||||
"gc-hook": "^0.3.0",
|
"gc-hook": "^0.3.1",
|
||||||
"proxy-target": "^3.0.1"
|
"proxy-target": "^3.0.2"
|
||||||
},
|
},
|
||||||
"optionalDependencies": {
|
"optionalDependencies": {
|
||||||
"ws": "^8.16.0"
|
"ws": "^8.16.0"
|
||||||
@@ -1310,9 +1321,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/electron-to-chromium": {
|
"node_modules/electron-to-chromium": {
|
||||||
"version": "1.4.635",
|
"version": "1.4.670",
|
||||||
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.635.tgz",
|
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.670.tgz",
|
||||||
"integrity": "sha512-iu/2D0zolKU3iDGXXxdOzNf72Jnokn+K1IN6Kk4iV6l1Tr2g/qy+mvmtfAiBwZe5S3aB5r92vp+zSZ69scYRrg==",
|
"integrity": "sha512-hcijYOWjOtjKrKPtNA6tuLlA/bTLO3heFG8pQA6mLpq7dRydSWicXova5lyxDzp1iVJaYhK7J2OQlGE52KYn7A==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/emoji-regex": {
|
"node_modules/emoji-regex": {
|
||||||
@@ -1331,9 +1342,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/escalade": {
|
"node_modules/escalade": {
|
||||||
"version": "3.1.1",
|
"version": "3.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz",
|
||||||
"integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==",
|
"integrity": "sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=6"
|
"node": ">=6"
|
||||||
@@ -1352,16 +1363,16 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/eslint": {
|
"node_modules/eslint": {
|
||||||
"version": "8.56.0",
|
"version": "8.57.0",
|
||||||
"resolved": "https://registry.npmjs.org/eslint/-/eslint-8.56.0.tgz",
|
"resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.0.tgz",
|
||||||
"integrity": "sha512-Go19xM6T9puCOWntie1/P997aXxFsOi37JIHRWI514Hc6ZnaHGKY9xFhrU65RT6CcBEzZoGG1e6Nq+DT04ZtZQ==",
|
"integrity": "sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@eslint-community/eslint-utils": "^4.2.0",
|
"@eslint-community/eslint-utils": "^4.2.0",
|
||||||
"@eslint-community/regexpp": "^4.6.1",
|
"@eslint-community/regexpp": "^4.6.1",
|
||||||
"@eslint/eslintrc": "^2.1.4",
|
"@eslint/eslintrc": "^2.1.4",
|
||||||
"@eslint/js": "8.56.0",
|
"@eslint/js": "8.57.0",
|
||||||
"@humanwhocodes/config-array": "^0.11.13",
|
"@humanwhocodes/config-array": "^0.11.14",
|
||||||
"@humanwhocodes/module-importer": "^1.0.1",
|
"@humanwhocodes/module-importer": "^1.0.1",
|
||||||
"@nodelib/fs.walk": "^1.2.8",
|
"@nodelib/fs.walk": "^1.2.8",
|
||||||
"@ungap/structured-clone": "^1.2.0",
|
"@ungap/structured-clone": "^1.2.0",
|
||||||
@@ -1536,9 +1547,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/fastq": {
|
"node_modules/fastq": {
|
||||||
"version": "1.16.0",
|
"version": "1.17.1",
|
||||||
"resolved": "https://registry.npmjs.org/fastq/-/fastq-1.16.0.tgz",
|
"resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz",
|
||||||
"integrity": "sha512-ifCoaXsDrsdkWTtiNJX5uzHDsrck5TzfKKDcuFFTIrrc/BS076qgEIfoIy1VeZqViznfKiysPYTh/QeHtnIsYA==",
|
"integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"reusify": "^1.0.4"
|
"reusify": "^1.0.4"
|
||||||
@@ -1634,9 +1645,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/gc-hook": {
|
"node_modules/gc-hook": {
|
||||||
"version": "0.3.0",
|
"version": "0.3.1",
|
||||||
"resolved": "https://registry.npmjs.org/gc-hook/-/gc-hook-0.3.0.tgz",
|
"resolved": "https://registry.npmjs.org/gc-hook/-/gc-hook-0.3.1.tgz",
|
||||||
"integrity": "sha512-Qkp0HM3z839Ns0LpXFJBXqClNW23wQo6JpUdJAjuf1/2jB+oUWSOMzeMv2yFq8Ur45z8IWw9hpRhkSjxSt5RWg=="
|
"integrity": "sha512-E5M+O/h2o7eZzGhzRZGex6hbB3k4NWqO0eA+OzLRLXxhdbYPajZnynPwAtphnh+cRHPwsj5Z80dqZlfI4eK55A=="
|
||||||
},
|
},
|
||||||
"node_modules/generic-names": {
|
"node_modules/generic-names": {
|
||||||
"version": "4.0.0",
|
"version": "4.0.0",
|
||||||
@@ -1730,9 +1741,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/hasown": {
|
"node_modules/hasown": {
|
||||||
"version": "2.0.0",
|
"version": "2.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.1.tgz",
|
||||||
"integrity": "sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA==",
|
"integrity": "sha512-1/th4MHjnwncwXsIW6QMzlvYL9kG5e/CpVvLRZe4XPa8TOUNbCELqmvhDmnkNsAjwaG4+I8gJJL0JBvTTLO9qA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"function-bind": "^1.1.2"
|
"function-bind": "^1.1.2"
|
||||||
@@ -1765,9 +1776,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/ignore": {
|
"node_modules/ignore": {
|
||||||
"version": "5.3.0",
|
"version": "5.3.1",
|
||||||
"resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.0.tgz",
|
"resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz",
|
||||||
"integrity": "sha512-g7dmpshy+gD7mh88OC9NwSGTKoc3kyLAZQRU1mt53Aw/vnvfXnbC+F/7F7QoYVKbV+KNvJx8wArewKy1vXMtlg==",
|
"integrity": "sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">= 4"
|
"node": ">= 4"
|
||||||
@@ -2065,9 +2076,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/magic-string": {
|
"node_modules/magic-string": {
|
||||||
"version": "0.30.5",
|
"version": "0.30.7",
|
||||||
"resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.5.tgz",
|
"resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.7.tgz",
|
||||||
"integrity": "sha512-7xlpfBaQaP/T6Vh8MO/EqXSW5En6INHEvEXQiuff7Gku0PWjU3uf6w/j9o7O+SpB5fOAkrI5HeoNgwjEO0pFsA==",
|
"integrity": "sha512-8vBuFF/I/+OSLRmdf2wwFCJCz+nSn0m6DPvGH1fS/KiQoSaR+sETbov0eIk9KhEKy8CYqIkIAnbohxT/4H0kuA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@jridgewell/sourcemap-codec": "^1.4.15"
|
"@jridgewell/sourcemap-codec": "^1.4.15"
|
||||||
@@ -2359,12 +2370,12 @@
|
|||||||
"integrity": "sha512-yyVAOFKTAElc7KdLt2+UKGExNYwYb/Y/WE9i+1ezCQsJE8gbKSjewfpRqK2nQgZ4d4hhAAGgDCOcIZVilqE5UA=="
|
"integrity": "sha512-yyVAOFKTAElc7KdLt2+UKGExNYwYb/Y/WE9i+1ezCQsJE8gbKSjewfpRqK2nQgZ4d4hhAAGgDCOcIZVilqE5UA=="
|
||||||
},
|
},
|
||||||
"node_modules/playwright": {
|
"node_modules/playwright": {
|
||||||
"version": "1.41.1",
|
"version": "1.42.1",
|
||||||
"resolved": "https://registry.npmjs.org/playwright/-/playwright-1.41.1.tgz",
|
"resolved": "https://registry.npmjs.org/playwright/-/playwright-1.42.1.tgz",
|
||||||
"integrity": "sha512-gdZAWG97oUnbBdRL3GuBvX3nDDmUOuqzV/D24dytqlKt+eI5KbwusluZRGljx1YoJKZ2NRPaeWiFTeGZO7SosQ==",
|
"integrity": "sha512-PgwB03s2DZBcNRoW+1w9E+VkLBxweib6KTXM0M3tkiT4jVxKSi6PmVJ591J+0u10LUrgxB7dLRbiJqO5s2QPMg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"playwright-core": "1.41.1"
|
"playwright-core": "1.42.1"
|
||||||
},
|
},
|
||||||
"bin": {
|
"bin": {
|
||||||
"playwright": "cli.js"
|
"playwright": "cli.js"
|
||||||
@@ -2377,9 +2388,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/playwright-core": {
|
"node_modules/playwright-core": {
|
||||||
"version": "1.41.1",
|
"version": "1.42.1",
|
||||||
"resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.41.1.tgz",
|
"resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.42.1.tgz",
|
||||||
"integrity": "sha512-/KPO5DzXSMlxSX77wy+HihKGOunh3hqndhqeo/nMxfigiKzogn8kfL0ZBDu0L1RKgan5XHCPmn6zXd2NUJgjhg==",
|
"integrity": "sha512-mxz6zclokgrke9p1vtdy/COWBH+eOZgYUVVU34C73M+4j4HLlQJHtfcqiqqxpP0o8HhMkflvfbquLX5dg6wlfA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"bin": {
|
"bin": {
|
||||||
"playwright-core": "cli.js"
|
"playwright-core": "cli.js"
|
||||||
@@ -2403,26 +2414,27 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/polyscript": {
|
"node_modules/polyscript": {
|
||||||
"version": "0.6.18",
|
"version": "0.11.3",
|
||||||
"resolved": "https://registry.npmjs.org/polyscript/-/polyscript-0.6.18.tgz",
|
"resolved": "https://registry.npmjs.org/polyscript/-/polyscript-0.11.3.tgz",
|
||||||
"integrity": "sha512-naU5tisWCt/a12kl1lIdtphaGUCEDf4mmlzuOcvjayqkmfXUlxLdc9A5VEEZLcleWr5Wtx34aU9IBBG8hfSI6Q==",
|
"integrity": "sha512-0wzunsH9b/h+EoB0tZKMRUg0YoFHraRuBuPK+cJsmUmNr1bVM1LvzFk21grDstXjo6Ah78dEC7SjaA0sSBsJeQ==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@ungap/structured-clone": "^1.2.0",
|
"@ungap/structured-clone": "^1.2.0",
|
||||||
"@ungap/with-resolvers": "^0.1.0",
|
"@ungap/with-resolvers": "^0.1.0",
|
||||||
|
"@webreflection/fetch": "^0.1.5",
|
||||||
"basic-devtools": "^0.1.6",
|
"basic-devtools": "^0.1.6",
|
||||||
"codedent": "^0.1.2",
|
"codedent": "^0.1.2",
|
||||||
"coincident": "^1.1.1",
|
"coincident": "^1.2.3",
|
||||||
"gc-hook": "^0.3.0",
|
"gc-hook": "^0.3.1",
|
||||||
"html-escaper": "^3.0.3",
|
"html-escaper": "^3.0.3",
|
||||||
"proxy-target": "^3.0.1",
|
"proxy-target": "^3.0.2",
|
||||||
"sticky-module": "^0.1.1",
|
"sticky-module": "^0.1.1",
|
||||||
"to-json-callback": "^0.1.1"
|
"to-json-callback": "^0.1.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/postcss": {
|
"node_modules/postcss": {
|
||||||
"version": "8.4.33",
|
"version": "8.4.35",
|
||||||
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.33.tgz",
|
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.35.tgz",
|
||||||
"integrity": "sha512-Kkpbhhdjw2qQs2O2DGX+8m5OVqEcbB9HRBvuYM9pgrjEFUg30A9LmXNlTAUj4S9kgtGyrMbTzVjH7E+s5Re2yg==",
|
"integrity": "sha512-u5U8qYpBCpN13BsiEB0CbR1Hhh4Gc0zLFuedrHJKMctHCHAGrMdG0PRM/KErzAL3CU6/eckEtmHNB3x6e3c0vA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
@@ -2702,9 +2714,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/postcss-modules-local-by-default": {
|
"node_modules/postcss-modules-local-by-default": {
|
||||||
"version": "4.0.3",
|
"version": "4.0.4",
|
||||||
"resolved": "https://registry.npmjs.org/postcss-modules-local-by-default/-/postcss-modules-local-by-default-4.0.3.tgz",
|
"resolved": "https://registry.npmjs.org/postcss-modules-local-by-default/-/postcss-modules-local-by-default-4.0.4.tgz",
|
||||||
"integrity": "sha512-2/u2zraspoACtrbFRnTijMiQtb4GW4BvatjaG/bCjYQo8kLTdevCUlwuBHx2sCnSyrI3x3qj4ZK1j5LQBgzmwA==",
|
"integrity": "sha512-L4QzMnOdVwRm1Qb8m4x8jsZzKAaPAgrUF1r/hjDR2Xj7R+8Zsf97jAlSQzWtKx5YNiNGN8QxmPFIc/sh+RQl+Q==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"icss-utils": "^5.0.0",
|
"icss-utils": "^5.0.0",
|
||||||
@@ -2719,9 +2731,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/postcss-modules-scope": {
|
"node_modules/postcss-modules-scope": {
|
||||||
"version": "3.1.0",
|
"version": "3.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/postcss-modules-scope/-/postcss-modules-scope-3.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/postcss-modules-scope/-/postcss-modules-scope-3.1.1.tgz",
|
||||||
"integrity": "sha512-SaIbK8XW+MZbd0xHPf7kdfA/3eOt7vxJ72IRecn3EzuZVLr1r0orzf0MX/pN8m+NMDoo6X/SQd8oeKqGZd8PXg==",
|
"integrity": "sha512-uZgqzdTleelWjzJY+Fhti6F3C9iF1JR/dODLs/JDefozYcKTBCdD8BIl6nNPbTbcLnGrk56hzwZC2DaGNvYjzA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"postcss-selector-parser": "^6.0.4"
|
"postcss-selector-parser": "^6.0.4"
|
||||||
@@ -2998,9 +3010,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/proxy-target": {
|
"node_modules/proxy-target": {
|
||||||
"version": "3.0.1",
|
"version": "3.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/proxy-target/-/proxy-target-3.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/proxy-target/-/proxy-target-3.0.2.tgz",
|
||||||
"integrity": "sha512-EGskR5UV9bsY3eFXBFJqq/rsDUXw/WAjeuW5YuyYaxd+0F2zgMpuZ/l5NQtju4FBHKIJnBXNGEptGqyisUgdcg=="
|
"integrity": "sha512-FFE1XNwXX/FNC3/P8HiKaJSy/Qk68RitG/QEcLy/bVnTAPlgTAWPZKh0pARLAnpfXQPKyalBhk009NRTgsk8vQ=="
|
||||||
},
|
},
|
||||||
"node_modules/punycode": {
|
"node_modules/punycode": {
|
||||||
"version": "2.3.1",
|
"version": "2.3.1",
|
||||||
@@ -3124,9 +3136,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/rollup": {
|
"node_modules/rollup": {
|
||||||
"version": "4.9.6",
|
"version": "4.13.0",
|
||||||
"resolved": "https://registry.npmjs.org/rollup/-/rollup-4.9.6.tgz",
|
"resolved": "https://registry.npmjs.org/rollup/-/rollup-4.13.0.tgz",
|
||||||
"integrity": "sha512-05lzkCS2uASX0CiLFybYfVkwNbKZG5NFQ6Go0VWyogFTXXbR039UVsegViTntkk4OglHBdF54ccApXRRuXRbsg==",
|
"integrity": "sha512-3YegKemjoQnYKmsBlOHfMLVPPA5xLkQ8MHLLSw/fBrFaVkEayL51DilPpNNLq1exr98F2B1TzrV0FUlN3gWRPg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@types/estree": "1.0.5"
|
"@types/estree": "1.0.5"
|
||||||
@@ -3139,19 +3151,19 @@
|
|||||||
"npm": ">=8.0.0"
|
"npm": ">=8.0.0"
|
||||||
},
|
},
|
||||||
"optionalDependencies": {
|
"optionalDependencies": {
|
||||||
"@rollup/rollup-android-arm-eabi": "4.9.6",
|
"@rollup/rollup-android-arm-eabi": "4.13.0",
|
||||||
"@rollup/rollup-android-arm64": "4.9.6",
|
"@rollup/rollup-android-arm64": "4.13.0",
|
||||||
"@rollup/rollup-darwin-arm64": "4.9.6",
|
"@rollup/rollup-darwin-arm64": "4.13.0",
|
||||||
"@rollup/rollup-darwin-x64": "4.9.6",
|
"@rollup/rollup-darwin-x64": "4.13.0",
|
||||||
"@rollup/rollup-linux-arm-gnueabihf": "4.9.6",
|
"@rollup/rollup-linux-arm-gnueabihf": "4.13.0",
|
||||||
"@rollup/rollup-linux-arm64-gnu": "4.9.6",
|
"@rollup/rollup-linux-arm64-gnu": "4.13.0",
|
||||||
"@rollup/rollup-linux-arm64-musl": "4.9.6",
|
"@rollup/rollup-linux-arm64-musl": "4.13.0",
|
||||||
"@rollup/rollup-linux-riscv64-gnu": "4.9.6",
|
"@rollup/rollup-linux-riscv64-gnu": "4.13.0",
|
||||||
"@rollup/rollup-linux-x64-gnu": "4.9.6",
|
"@rollup/rollup-linux-x64-gnu": "4.13.0",
|
||||||
"@rollup/rollup-linux-x64-musl": "4.9.6",
|
"@rollup/rollup-linux-x64-musl": "4.13.0",
|
||||||
"@rollup/rollup-win32-arm64-msvc": "4.9.6",
|
"@rollup/rollup-win32-arm64-msvc": "4.13.0",
|
||||||
"@rollup/rollup-win32-ia32-msvc": "4.9.6",
|
"@rollup/rollup-win32-ia32-msvc": "4.13.0",
|
||||||
"@rollup/rollup-win32-x64-msvc": "4.9.6",
|
"@rollup/rollup-win32-x64-msvc": "4.13.0",
|
||||||
"fsevents": "~2.3.2"
|
"fsevents": "~2.3.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -3465,9 +3477,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/terser": {
|
"node_modules/terser": {
|
||||||
"version": "5.26.0",
|
"version": "5.27.1",
|
||||||
"resolved": "https://registry.npmjs.org/terser/-/terser-5.26.0.tgz",
|
"resolved": "https://registry.npmjs.org/terser/-/terser-5.27.1.tgz",
|
||||||
"integrity": "sha512-dytTGoE2oHgbNV9nTzgBEPaqAWvcJNl66VZ0BkJqlvp71IjO8CxdBx/ykCNb47cLnCmCvRZ6ZR0tLkqvZCdVBQ==",
|
"integrity": "sha512-29wAr6UU/oQpnTw5HoadwjUZnFQXGdOfj0LjZ4sVxzqwHh/QVkvr7m8y9WoR4iN3FRitVduTc6KdjcW38Npsug==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@jridgewell/source-map": "^0.3.3",
|
"@jridgewell/source-map": "^0.3.3",
|
||||||
@@ -3541,9 +3553,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/typescript": {
|
"node_modules/typescript": {
|
||||||
"version": "5.3.3",
|
"version": "5.4.3",
|
||||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz",
|
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.3.tgz",
|
||||||
"integrity": "sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==",
|
"integrity": "sha512-KrPd3PKaCLr78MalgiwJnA25Nm8HAmdwN3mYUYZgG/wizIo9EainNVQI9/yDavtVFRN2h3k8uf3GLHuhDMgEHg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"bin": {
|
"bin": {
|
||||||
"tsc": "bin/tsc",
|
"tsc": "bin/tsc",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@pyscript/core",
|
"name": "@pyscript/core",
|
||||||
"version": "0.3.23",
|
"version": "0.4.10",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"description": "PyScript",
|
"description": "PyScript",
|
||||||
"module": "./index.js",
|
"module": "./index.js",
|
||||||
@@ -42,31 +42,31 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@ungap/with-resolvers": "^0.1.0",
|
"@ungap/with-resolvers": "^0.1.0",
|
||||||
"basic-devtools": "^0.1.6",
|
"basic-devtools": "^0.1.6",
|
||||||
"polyscript": "^0.6.18",
|
"polyscript": "^0.11.3",
|
||||||
"sticky-module": "^0.1.1",
|
"sticky-module": "^0.1.1",
|
||||||
"to-json-callback": "^0.1.1",
|
"to-json-callback": "^0.1.1",
|
||||||
"type-checked-collections": "^0.1.7"
|
"type-checked-collections": "^0.1.7"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@codemirror/commands": "^6.3.3",
|
"@codemirror/commands": "^6.3.3",
|
||||||
"@codemirror/lang-python": "^6.1.3",
|
"@codemirror/lang-python": "^6.1.4",
|
||||||
"@codemirror/language": "^6.10.0",
|
"@codemirror/language": "^6.10.1",
|
||||||
"@codemirror/state": "^6.4.0",
|
"@codemirror/state": "^6.4.1",
|
||||||
"@codemirror/view": "^6.23.1",
|
"@codemirror/view": "^6.26.0",
|
||||||
"@playwright/test": "^1.41.1",
|
"@playwright/test": "^1.42.1",
|
||||||
"@rollup/plugin-commonjs": "^25.0.7",
|
"@rollup/plugin-commonjs": "^25.0.7",
|
||||||
"@rollup/plugin-node-resolve": "^15.2.3",
|
"@rollup/plugin-node-resolve": "^15.2.3",
|
||||||
"@rollup/plugin-terser": "^0.4.4",
|
"@rollup/plugin-terser": "^0.4.4",
|
||||||
"@webreflection/toml-j0.4": "^1.1.3",
|
"@webreflection/toml-j0.4": "^1.1.3",
|
||||||
"@xterm/addon-fit": "^0.9.0-beta.1",
|
"@xterm/addon-fit": "^0.9.0",
|
||||||
"chokidar": "^3.5.3",
|
"chokidar": "^3.6.0",
|
||||||
"codemirror": "^6.0.1",
|
"codemirror": "^6.0.1",
|
||||||
"eslint": "^8.56.0",
|
"eslint": "^8.57.0",
|
||||||
"rollup": "^4.9.6",
|
"rollup": "^4.13.0",
|
||||||
"rollup-plugin-postcss": "^4.0.2",
|
"rollup-plugin-postcss": "^4.0.2",
|
||||||
"rollup-plugin-string": "^3.0.0",
|
"rollup-plugin-string": "^3.0.0",
|
||||||
"static-handler": "^0.4.3",
|
"static-handler": "^0.4.3",
|
||||||
"typescript": "^5.3.3",
|
"typescript": "^5.4.3",
|
||||||
"xterm": "^5.3.0",
|
"xterm": "^5.3.0",
|
||||||
"xterm-readline": "^1.1.1"
|
"xterm-readline": "^1.1.1"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -29,10 +29,36 @@ import { hooks, main, worker, codeFor, createFunction } from "./hooks.js";
|
|||||||
// generic helper to disambiguate between custom element and script
|
// generic helper to disambiguate between custom element and script
|
||||||
const isScript = ({ tagName }) => tagName === "SCRIPT";
|
const isScript = ({ tagName }) => tagName === "SCRIPT";
|
||||||
|
|
||||||
|
// Used to create either Pyodide or MicroPython workers
|
||||||
|
// with the PyScript module available within the code
|
||||||
|
const [PyWorker, MPWorker] = [...TYPES.entries()].map(
|
||||||
|
([TYPE, interpreter]) =>
|
||||||
|
/**
|
||||||
|
* A `Worker` facade able to bootstrap on the worker thread only a PyScript module.
|
||||||
|
* @param {string} file the python file to run ina worker.
|
||||||
|
* @param {{config?: string | object, async?: boolean}} [options] optional configuration for the worker.
|
||||||
|
* @returns {Promise<Worker & {sync: object}>}
|
||||||
|
*/
|
||||||
|
async function PyScriptWorker(file, options) {
|
||||||
|
await configs.get(TYPE).plugins;
|
||||||
|
const xworker = XWorker.call(
|
||||||
|
new Hook(null, hooked.get(TYPE)),
|
||||||
|
file,
|
||||||
|
{
|
||||||
|
...options,
|
||||||
|
type: interpreter,
|
||||||
|
},
|
||||||
|
);
|
||||||
|
assign(xworker.sync, sync);
|
||||||
|
return xworker.ready;
|
||||||
|
},
|
||||||
|
);
|
||||||
|
|
||||||
// avoid multiple initialization of the same library
|
// avoid multiple initialization of the same library
|
||||||
const [
|
const [
|
||||||
{
|
{
|
||||||
PyWorker: exportedPyWorker,
|
PyWorker: exportedPyWorker,
|
||||||
|
MPWorker: exportedMPWorker,
|
||||||
hooks: exportedHooks,
|
hooks: exportedHooks,
|
||||||
config: exportedConfig,
|
config: exportedConfig,
|
||||||
whenDefined: exportedWhenDefined,
|
whenDefined: exportedWhenDefined,
|
||||||
@@ -40,6 +66,7 @@ const [
|
|||||||
alreadyLive,
|
alreadyLive,
|
||||||
] = stickyModule("@pyscript/core", {
|
] = stickyModule("@pyscript/core", {
|
||||||
PyWorker,
|
PyWorker,
|
||||||
|
MPWorker,
|
||||||
hooks,
|
hooks,
|
||||||
config: {},
|
config: {},
|
||||||
whenDefined,
|
whenDefined,
|
||||||
@@ -48,6 +75,7 @@ const [
|
|||||||
export {
|
export {
|
||||||
TYPES,
|
TYPES,
|
||||||
exportedPyWorker as PyWorker,
|
exportedPyWorker as PyWorker,
|
||||||
|
exportedMPWorker as MPWorker,
|
||||||
exportedHooks as hooks,
|
exportedHooks as hooks,
|
||||||
exportedConfig as config,
|
exportedConfig as config,
|
||||||
exportedWhenDefined as whenDefined,
|
exportedWhenDefined as whenDefined,
|
||||||
@@ -314,24 +342,3 @@ for (const [TYPE, interpreter] of TYPES) {
|
|||||||
// export the used config without allowing leaks through it
|
// export the used config without allowing leaks through it
|
||||||
exportedConfig[TYPE] = structuredClone(config);
|
exportedConfig[TYPE] = structuredClone(config);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* A `Worker` facade able to bootstrap on the worker thread only a PyScript module.
|
|
||||||
* @param {string} file the python file to run ina worker.
|
|
||||||
* @param {{config?: string | object, async?: boolean}} [options] optional configuration for the worker.
|
|
||||||
* @returns {Worker & {sync: ProxyHandler<object>}}
|
|
||||||
*/
|
|
||||||
function PyWorker(file, options) {
|
|
||||||
const hooks = hooked.get("py");
|
|
||||||
// this propagates pyscript worker hooks without needing a pyscript
|
|
||||||
// bootstrap + it passes arguments and it defaults to `pyodide`
|
|
||||||
// as the interpreter to use in the worker, as all hooks assume that
|
|
||||||
// and as `pyodide` is the only default interpreter that can deal with
|
|
||||||
// all the features we need to deliver pyscript out there.
|
|
||||||
const xworker = XWorker.call(new Hook(null, hooks), file, {
|
|
||||||
type: "pyodide",
|
|
||||||
...options,
|
|
||||||
});
|
|
||||||
assign(xworker.sync, sync);
|
|
||||||
return xworker;
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,7 +1,10 @@
|
|||||||
import { FetchError, ErrorCode } from "./exceptions.js";
|
import { FetchError, ErrorCode } from "./exceptions.js";
|
||||||
import { getText } from "polyscript/exports";
|
|
||||||
|
|
||||||
export { getText };
|
/**
|
||||||
|
* @param {Response} response
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
export const getText = (response) => response.text();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This is a fetch wrapper that handles any non 200 responses and throws a
|
* This is a fetch wrapper that handles any non 200 responses and throws a
|
||||||
|
|||||||
@@ -23,9 +23,12 @@ const hooks = {
|
|||||||
|
|
||||||
async function execute({ currentTarget }) {
|
async function execute({ currentTarget }) {
|
||||||
const { env, pySrc, outDiv } = this;
|
const { env, pySrc, outDiv } = this;
|
||||||
|
const hasRunButton = !!currentTarget;
|
||||||
|
|
||||||
|
if (hasRunButton) {
|
||||||
currentTarget.disabled = true;
|
currentTarget.disabled = true;
|
||||||
outDiv.innerHTML = "";
|
outDiv.innerHTML = "";
|
||||||
|
}
|
||||||
|
|
||||||
if (!envs.has(env)) {
|
if (!envs.has(env)) {
|
||||||
const srcLink = URL.createObjectURL(new Blob([""]));
|
const srcLink = URL.createObjectURL(new Blob([""]));
|
||||||
@@ -46,21 +49,25 @@ async function execute({ currentTarget }) {
|
|||||||
// before executing the current code
|
// before executing the current code
|
||||||
envs.get(env).then((xworker) => {
|
envs.get(env).then((xworker) => {
|
||||||
xworker.onerror = ({ error }) => {
|
xworker.onerror = ({ error }) => {
|
||||||
|
if (hasRunButton) {
|
||||||
outDiv.innerHTML += `<span style='color:red'>${
|
outDiv.innerHTML += `<span style='color:red'>${
|
||||||
error.message || error
|
error.message || error
|
||||||
}</span>\n`;
|
}</span>\n`;
|
||||||
|
}
|
||||||
console.error(error);
|
console.error(error);
|
||||||
};
|
};
|
||||||
|
|
||||||
const enable = () => {
|
const enable = () => {
|
||||||
currentTarget.disabled = false;
|
if (hasRunButton) currentTarget.disabled = false;
|
||||||
};
|
};
|
||||||
const { sync } = xworker;
|
const { sync } = xworker;
|
||||||
sync.write = (str) => {
|
sync.write = (str) => {
|
||||||
outDiv.innerText += `${str}\n`;
|
if (hasRunButton) outDiv.innerText += `${str}\n`;
|
||||||
};
|
};
|
||||||
sync.writeErr = (str) => {
|
sync.writeErr = (str) => {
|
||||||
|
if (hasRunButton) {
|
||||||
outDiv.innerHTML += `<span style='color:red'>${str}</span>\n`;
|
outDiv.innerHTML += `<span style='color:red'>${str}</span>\n`;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
sync.runAsync(pySrc).then(enable, enable);
|
sync.runAsync(pySrc).then(enable, enable);
|
||||||
});
|
});
|
||||||
@@ -120,7 +127,6 @@ const init = async (script, type, interpreter) => {
|
|||||||
{ keymap },
|
{ keymap },
|
||||||
{ defaultKeymap },
|
{ defaultKeymap },
|
||||||
] = await Promise.all([
|
] = await Promise.all([
|
||||||
// TODO: find a way to actually produce these bundles locally
|
|
||||||
import(/* webpackIgnore: true */ "../3rd-party/codemirror.js"),
|
import(/* webpackIgnore: true */ "../3rd-party/codemirror.js"),
|
||||||
import(/* webpackIgnore: true */ "../3rd-party/codemirror_state.js"),
|
import(/* webpackIgnore: true */ "../3rd-party/codemirror_state.js"),
|
||||||
import(
|
import(
|
||||||
@@ -131,6 +137,27 @@ const init = async (script, type, interpreter) => {
|
|||||||
import(/* webpackIgnore: true */ "../3rd-party/codemirror_commands.js"),
|
import(/* webpackIgnore: true */ "../3rd-party/codemirror_commands.js"),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
const isSetup = script.hasAttribute("setup");
|
||||||
|
const env = `${interpreter}-${script.getAttribute("env") || getID(type)}`;
|
||||||
|
const source = script.src
|
||||||
|
? await fetch(script.src).then((b) => b.text())
|
||||||
|
: script.textContent;
|
||||||
|
const context = {
|
||||||
|
interpreter,
|
||||||
|
env,
|
||||||
|
get pySrc() {
|
||||||
|
return isSetup ? source : editor.state.doc.toString();
|
||||||
|
},
|
||||||
|
get outDiv() {
|
||||||
|
return isSetup ? null : outDiv;
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
if (isSetup) {
|
||||||
|
execute.call(context, { currentTarget: null });
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const selector = script.getAttribute("target");
|
const selector = script.getAttribute("target");
|
||||||
|
|
||||||
let target;
|
let target;
|
||||||
@@ -149,18 +176,6 @@ const init = async (script, type, interpreter) => {
|
|||||||
if (!target.hasAttribute("exec-id")) target.setAttribute("exec-id", 0);
|
if (!target.hasAttribute("exec-id")) target.setAttribute("exec-id", 0);
|
||||||
if (!target.hasAttribute("root")) target.setAttribute("root", target.id);
|
if (!target.hasAttribute("root")) target.setAttribute("root", target.id);
|
||||||
|
|
||||||
const env = `${interpreter}-${script.getAttribute("env") || getID(type)}`;
|
|
||||||
const context = {
|
|
||||||
interpreter,
|
|
||||||
env,
|
|
||||||
get pySrc() {
|
|
||||||
return editor.state.doc.toString();
|
|
||||||
},
|
|
||||||
get outDiv() {
|
|
||||||
return outDiv;
|
|
||||||
},
|
|
||||||
};
|
|
||||||
|
|
||||||
// @see https://github.com/JeffersGlass/mkdocs-pyscript/blob/main/mkdocs_pyscript/js/makeblocks.js
|
// @see https://github.com/JeffersGlass/mkdocs-pyscript/blob/main/mkdocs_pyscript/js/makeblocks.js
|
||||||
const listener = execute.bind(context);
|
const listener = execute.bind(context);
|
||||||
const [boxDiv, outDiv] = makeBoxDiv(listener, type);
|
const [boxDiv, outDiv] = makeBoxDiv(listener, type);
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ const write = (base, literal) => {
|
|||||||
python.push(`_path = _Path("${base}/${key}")`);
|
python.push(`_path = _Path("${base}/${key}")`);
|
||||||
if (typeof value === "string") {
|
if (typeof value === "string") {
|
||||||
const code = JSON.stringify(value);
|
const code = JSON.stringify(value);
|
||||||
python.push(`_path.write_text(${code})`);
|
python.push(`_path.write_text(${code},encoding="utf-8")`);
|
||||||
} else {
|
} else {
|
||||||
// @see https://github.com/pyscript/pyscript/pull/1813#issuecomment-1781502909
|
// @see https://github.com/pyscript/pyscript/pull/1813#issuecomment-1781502909
|
||||||
python.push(`if not _os.path.exists("${base}/${key}"):`);
|
python.push(`if not _os.path.exists("${base}/${key}"):`);
|
||||||
|
|||||||
@@ -30,6 +30,7 @@
|
|||||||
# as it works transparently in both the main thread and worker cases.
|
# as it works transparently in both the main thread and worker cases.
|
||||||
|
|
||||||
from pyscript.display import HTML, display
|
from pyscript.display import HTML, display
|
||||||
|
from pyscript.fetch import fetch
|
||||||
from pyscript.magic_js import (
|
from pyscript.magic_js import (
|
||||||
RUNNING_IN_WORKER,
|
RUNNING_IN_WORKER,
|
||||||
PyWorker,
|
PyWorker,
|
||||||
|
|||||||
94
pyscript.core/src/stdlib/pyscript/fetch.py
Normal file
94
pyscript.core/src/stdlib/pyscript/fetch.py
Normal file
@@ -0,0 +1,94 @@
|
|||||||
|
import json
|
||||||
|
|
||||||
|
import js
|
||||||
|
|
||||||
|
|
||||||
|
### wrap the response to grant Pythonic results
|
||||||
|
class _Response:
|
||||||
|
def __init__(self, response):
|
||||||
|
self._response = response
|
||||||
|
|
||||||
|
# grant access to response.ok and other fields
|
||||||
|
def __getattr__(self, attr):
|
||||||
|
return getattr(self._response, attr)
|
||||||
|
|
||||||
|
def _as_bytearray(self, buffer):
|
||||||
|
ui8a = js.Uint8Array.new(buffer)
|
||||||
|
size = ui8a.length
|
||||||
|
ba = bytearray(size)
|
||||||
|
for i in range(0, size):
|
||||||
|
ba[i] = ui8a[i]
|
||||||
|
return ba
|
||||||
|
|
||||||
|
# exposed methods with Pythonic results
|
||||||
|
async def arrayBuffer(self):
|
||||||
|
buffer = await self._response.arrayBuffer()
|
||||||
|
# works in Pyodide
|
||||||
|
if hasattr(buffer, "to_py"):
|
||||||
|
return buffer.to_py()
|
||||||
|
# shims in MicroPython
|
||||||
|
return memoryview(self._as_bytearray(buffer))
|
||||||
|
|
||||||
|
async def blob(self):
|
||||||
|
return await self._response.blob()
|
||||||
|
|
||||||
|
async def bytearray(self):
|
||||||
|
buffer = await self._response.arrayBuffer()
|
||||||
|
return self._as_bytearray(buffer)
|
||||||
|
|
||||||
|
async def json(self):
|
||||||
|
return json.loads(await self.text())
|
||||||
|
|
||||||
|
async def text(self):
|
||||||
|
return await self._response.text()
|
||||||
|
|
||||||
|
|
||||||
|
### allow direct await to _Response methods
|
||||||
|
class _DirectResponse:
|
||||||
|
@staticmethod
|
||||||
|
def setup(promise, response):
|
||||||
|
promise._response = _Response(response)
|
||||||
|
return promise._response
|
||||||
|
|
||||||
|
def __init__(self, promise):
|
||||||
|
self._promise = promise
|
||||||
|
promise._response = None
|
||||||
|
promise.arrayBuffer = self.arrayBuffer
|
||||||
|
promise.blob = self.blob
|
||||||
|
promise.bytearray = self.bytearray
|
||||||
|
promise.json = self.json
|
||||||
|
promise.text = self.text
|
||||||
|
|
||||||
|
async def _response(self):
|
||||||
|
if not self._promise._response:
|
||||||
|
await self._promise
|
||||||
|
return self._promise._response
|
||||||
|
|
||||||
|
async def arrayBuffer(self):
|
||||||
|
response = await self._response()
|
||||||
|
return await response.arrayBuffer()
|
||||||
|
|
||||||
|
async def blob(self):
|
||||||
|
response = await self._response()
|
||||||
|
return await response.blob()
|
||||||
|
|
||||||
|
async def bytearray(self):
|
||||||
|
response = await self._response()
|
||||||
|
return await response.bytearray()
|
||||||
|
|
||||||
|
async def json(self):
|
||||||
|
response = await self._response()
|
||||||
|
return await response.json()
|
||||||
|
|
||||||
|
async def text(self):
|
||||||
|
response = await self._response()
|
||||||
|
return await response.text()
|
||||||
|
|
||||||
|
|
||||||
|
def fetch(url, **kw):
|
||||||
|
# workaround Pyodide / MicroPython dict <-> js conversion
|
||||||
|
options = js.JSON.parse(json.dumps(kw))
|
||||||
|
awaited = lambda response, *args: _DirectResponse.setup(promise, response)
|
||||||
|
promise = js.fetch(url, options).then(awaited)
|
||||||
|
_DirectResponse(promise)
|
||||||
|
return promise
|
||||||
18
pyscript.core/src/stdlib/pyscript/ffi.py
Normal file
18
pyscript.core/src/stdlib/pyscript/ffi.py
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
try:
|
||||||
|
import js
|
||||||
|
from pyodide.ffi import create_proxy as _cp
|
||||||
|
from pyodide.ffi import to_js as _py_tjs
|
||||||
|
|
||||||
|
from_entries = js.Object.fromEntries
|
||||||
|
|
||||||
|
def _tjs(value, **kw):
|
||||||
|
if not hasattr(kw, "dict_converter"):
|
||||||
|
kw["dict_converter"] = from_entries
|
||||||
|
return _py_tjs(value, **kw)
|
||||||
|
|
||||||
|
except:
|
||||||
|
from jsffi import create_proxy as _cp
|
||||||
|
from jsffi import to_js as _tjs
|
||||||
|
|
||||||
|
create_proxy = _cp
|
||||||
|
to_js = _tjs
|
||||||
@@ -24,16 +24,33 @@ for name in globalThis.Reflect.ownKeys(js_modules):
|
|||||||
sys.modules["pyscript.js_modules"] = js_modules
|
sys.modules["pyscript.js_modules"] = js_modules
|
||||||
|
|
||||||
if RUNNING_IN_WORKER:
|
if RUNNING_IN_WORKER:
|
||||||
import js
|
|
||||||
import polyscript
|
import polyscript
|
||||||
|
|
||||||
PyWorker = NotSupported(
|
PyWorker = NotSupported(
|
||||||
"pyscript.PyWorker",
|
"pyscript.PyWorker",
|
||||||
"pyscript.PyWorker works only when running in the main thread",
|
"pyscript.PyWorker works only when running in the main thread",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
try:
|
||||||
|
globalThis.SharedArrayBuffer.new(4)
|
||||||
|
import js
|
||||||
|
|
||||||
window = polyscript.xworker.window
|
window = polyscript.xworker.window
|
||||||
document = window.document
|
document = window.document
|
||||||
js.document = document
|
js.document = document
|
||||||
|
except:
|
||||||
|
globalThis.console.debug("SharedArrayBuffer is not available")
|
||||||
|
# in this scenario none of the utilities would work
|
||||||
|
# as expected so we better export these as NotSupported
|
||||||
|
window = NotSupported(
|
||||||
|
"pyscript.window",
|
||||||
|
"pyscript.window in workers works only via SharedArrayBuffer",
|
||||||
|
)
|
||||||
|
document = NotSupported(
|
||||||
|
"pyscript.document",
|
||||||
|
"pyscript.document in workers works only via SharedArrayBuffer",
|
||||||
|
)
|
||||||
|
|
||||||
sync = polyscript.xworker.sync
|
sync = polyscript.xworker.sync
|
||||||
|
|
||||||
# in workers the display does not have a default ID
|
# in workers the display does not have a default ID
|
||||||
|
|||||||
@@ -125,6 +125,14 @@ class Element(BaseElement):
|
|||||||
def html(self, value):
|
def html(self, value):
|
||||||
self._js.innerHTML = value
|
self._js.innerHTML = value
|
||||||
|
|
||||||
|
@property
|
||||||
|
def text(self):
|
||||||
|
return self._js.textContent
|
||||||
|
|
||||||
|
@text.setter
|
||||||
|
def text(self, value):
|
||||||
|
self._js.textContent = value
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def content(self):
|
def content(self):
|
||||||
# TODO: This breaks with with standard template elements. Define how to best
|
# TODO: This breaks with with standard template elements. Define how to best
|
||||||
|
|||||||
19
pyscript.core/test/code-a-part.html
Normal file
19
pyscript.core/test/code-a-part.html
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
<!doctype html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
|
<link rel="stylesheet" href="../dist/core.css">
|
||||||
|
<script type="module">
|
||||||
|
import { hooks } from "../dist/core.js";
|
||||||
|
hooks.main.codeBeforeRun.add('print(0)');
|
||||||
|
hooks.main.codeAfterRun.add('print(2)');
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<script type="py">
|
||||||
|
# raise an error instead to see it on line 1
|
||||||
|
print(1)
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
95
pyscript.core/test/fetch.html
Normal file
95
pyscript.core/test/fetch.html
Normal file
@@ -0,0 +1,95 @@
|
|||||||
|
<!doctype html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
|
<link rel="stylesheet" href="../dist/core.css">
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<script type="module">
|
||||||
|
import fetch from 'https://esm.run/@webreflection/fetch';
|
||||||
|
|
||||||
|
globalThis.fetch_text = await fetch("config.json").text();
|
||||||
|
globalThis.fetch_json = JSON.stringify(await fetch("config.json").json());
|
||||||
|
globalThis.fetch_buffer = new Uint8Array((await fetch("config.json").arrayBuffer())).length;
|
||||||
|
|
||||||
|
document.head.appendChild(
|
||||||
|
Object.assign(
|
||||||
|
document.createElement('script'),
|
||||||
|
{
|
||||||
|
type: 'module',
|
||||||
|
src: '../dist/core.js'
|
||||||
|
}
|
||||||
|
)
|
||||||
|
);
|
||||||
|
</script>
|
||||||
|
<script type="mpy" async>
|
||||||
|
import js, json
|
||||||
|
from pyscript import document, fetch
|
||||||
|
|
||||||
|
fetch_text = await (await fetch("config.json")).text()
|
||||||
|
if (fetch_text != js.fetch_text):
|
||||||
|
raise Exception("fetch_text")
|
||||||
|
|
||||||
|
fetch_text = await fetch("config.json").text()
|
||||||
|
if (fetch_text != js.fetch_text):
|
||||||
|
raise Exception("fetch_text")
|
||||||
|
|
||||||
|
fetch_json = await (await fetch("config.json")).json()
|
||||||
|
if (json.dumps(fetch_json).replace(" ", "") != js.fetch_json):
|
||||||
|
raise Exception("fetch_json")
|
||||||
|
|
||||||
|
fetch_json = await fetch("config.json").json()
|
||||||
|
if (json.dumps(fetch_json).replace(" ", "") != js.fetch_json):
|
||||||
|
raise Exception("fetch_json")
|
||||||
|
|
||||||
|
fetch_buffer = await (await fetch("config.json")).arrayBuffer()
|
||||||
|
if (len(fetch_buffer) != js.fetch_buffer):
|
||||||
|
raise Exception("fetch_buffer")
|
||||||
|
|
||||||
|
fetch_buffer = await fetch("config.json").arrayBuffer()
|
||||||
|
if (len(fetch_buffer) != js.fetch_buffer):
|
||||||
|
raise Exception("fetch_buffer")
|
||||||
|
|
||||||
|
print(await (await fetch("config.json")).bytearray())
|
||||||
|
print(await (await fetch("config.json")).blob())
|
||||||
|
|
||||||
|
if (await fetch("shenanigans.nope")).ok == False:
|
||||||
|
document.documentElement.classList.add('mpy')
|
||||||
|
</script>
|
||||||
|
<script type="py" async>
|
||||||
|
import js, json
|
||||||
|
from pyscript import document, fetch
|
||||||
|
|
||||||
|
fetch_text = await (await fetch("config.json")).text()
|
||||||
|
if (fetch_text != js.fetch_text):
|
||||||
|
raise Exception("fetch_text")
|
||||||
|
|
||||||
|
fetch_text = await fetch("config.json").text()
|
||||||
|
if (fetch_text != js.fetch_text):
|
||||||
|
raise Exception("fetch_text")
|
||||||
|
|
||||||
|
fetch_json = await (await fetch("config.json")).json()
|
||||||
|
if (json.dumps(fetch_json).replace(" ", "") != js.fetch_json):
|
||||||
|
raise Exception("fetch_json")
|
||||||
|
|
||||||
|
fetch_json = await fetch("config.json").json()
|
||||||
|
if (json.dumps(fetch_json).replace(" ", "") != js.fetch_json):
|
||||||
|
raise Exception("fetch_json")
|
||||||
|
|
||||||
|
fetch_buffer = await (await fetch("config.json")).arrayBuffer()
|
||||||
|
if (len(fetch_buffer) != js.fetch_buffer):
|
||||||
|
raise Exception("fetch_buffer")
|
||||||
|
|
||||||
|
fetch_buffer = await fetch("config.json").arrayBuffer()
|
||||||
|
if (len(fetch_buffer) != js.fetch_buffer):
|
||||||
|
raise Exception("fetch_buffer")
|
||||||
|
|
||||||
|
print(await (await fetch("config.json")).bytearray())
|
||||||
|
print(await (await fetch("config.json")).blob())
|
||||||
|
|
||||||
|
if (await fetch("shenanigans.nope")).ok == False:
|
||||||
|
document.documentElement.classList.add('py')
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
26
pyscript.core/test/ffi.html
Normal file
26
pyscript.core/test/ffi.html
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
<!doctype html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
|
<title>PyScript FFI</title>
|
||||||
|
<link rel="stylesheet" href="../dist/core.css">
|
||||||
|
<script type="module" src="../dist/core.js"></script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<script type="mpy">
|
||||||
|
from pyscript import document
|
||||||
|
from pyscript.ffi import to_js
|
||||||
|
document.documentElement.classList.add(
|
||||||
|
to_js({"ok": "mpy"}).ok
|
||||||
|
)
|
||||||
|
</script>
|
||||||
|
<script type="py">
|
||||||
|
from pyscript import document
|
||||||
|
from pyscript.ffi import to_js
|
||||||
|
document.documentElement.classList.add(
|
||||||
|
to_js({"ok": "py"}).ok
|
||||||
|
)
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -78,3 +78,13 @@ test('Pyodide + multiple terminals via Worker', async ({ page }) => {
|
|||||||
await page.goto('http://localhost:8080/test/py-terminals.html');
|
await page.goto('http://localhost:8080/test/py-terminals.html');
|
||||||
await page.waitForSelector('html.first.second');
|
await page.waitForSelector('html.first.second');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test('MicroPython + Pyodide fetch', async ({ page }) => {
|
||||||
|
await page.goto('http://localhost:8080/test/fetch.html');
|
||||||
|
await page.waitForSelector('html.mpy.py');
|
||||||
|
});
|
||||||
|
|
||||||
|
test('MicroPython + Pyodide ffi', async ({ page }) => {
|
||||||
|
await page.goto('http://localhost:8080/test/ffi.html');
|
||||||
|
await page.waitForSelector('html.mpy.py');
|
||||||
|
});
|
||||||
|
|||||||
23
pyscript.core/test/no_sab/index.html
Normal file
23
pyscript.core/test/no_sab/index.html
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<link rel="stylesheet" href="../../dist/core.css">
|
||||||
|
<script type="module">
|
||||||
|
import { PyWorker } from '../../dist/core.js';
|
||||||
|
const { sync } = await PyWorker(
|
||||||
|
'./worker.py',
|
||||||
|
{
|
||||||
|
config: {
|
||||||
|
sync_main_only: true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
document.documentElement.classList.add(
|
||||||
|
await sync.get_class()
|
||||||
|
);
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
</html>
|
||||||
3
pyscript.core/test/no_sab/worker.py
Normal file
3
pyscript.core/test/no_sab/worker.py
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
from pyscript import sync
|
||||||
|
|
||||||
|
sync.get_class = lambda: "ok"
|
||||||
21
pyscript.core/test/py-editor/index.html
Normal file
21
pyscript.core/test/py-editor/index.html
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<link rel="stylesheet" href="../../dist/core.css">
|
||||||
|
<script type="module" src="../../dist/core.js"></script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<script type="mpy-editor" src="task1.py" env="task1" setup></script>
|
||||||
|
<script type="mpy-editor" env="task1">
|
||||||
|
print(a)
|
||||||
|
</script>
|
||||||
|
<script type="mpy-editor" env="task2" setup>
|
||||||
|
b = 2
|
||||||
|
</script>
|
||||||
|
<script type="mpy-editor" env="task2">
|
||||||
|
print(b)
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
1
pyscript.core/test/py-editor/task1.py
Normal file
1
pyscript.core/test/py-editor/task1.py
Normal file
@@ -0,0 +1 @@
|
|||||||
|
a = 1
|
||||||
@@ -98,6 +98,8 @@
|
|||||||
<p class="collection"></p>
|
<p class="collection"></p>
|
||||||
<div class="collection"></div>
|
<div class="collection"></div>
|
||||||
<h3 class="collection"></h3>
|
<h3 class="collection"></h3>
|
||||||
|
|
||||||
|
<div id="element_attribute_tests"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -163,6 +163,30 @@ class TestElement:
|
|||||||
|
|
||||||
assert called
|
assert called
|
||||||
|
|
||||||
|
def test_html_attribute(self):
|
||||||
|
# GIVEN an existing element on the page with a known empty text content
|
||||||
|
div = pydom["#element_attribute_tests"][0]
|
||||||
|
|
||||||
|
# WHEN we set the html attribute
|
||||||
|
div.html = "<b>New Content</b>"
|
||||||
|
|
||||||
|
# EXPECT the element html and underlying JS Element innerHTML property
|
||||||
|
# to match what we expect and what
|
||||||
|
assert div.html == div._js.innerHTML == "<b>New Content</b>"
|
||||||
|
assert div.text == div._js.textContent == "New Content"
|
||||||
|
|
||||||
|
def test_text_attribute(self):
|
||||||
|
# GIVEN an existing element on the page with a known empty text content
|
||||||
|
div = pydom["#element_attribute_tests"][0]
|
||||||
|
|
||||||
|
# WHEN we set the html attribute
|
||||||
|
div.text = "<b>New Content</b>"
|
||||||
|
|
||||||
|
# EXPECT the element html and underlying JS Element innerHTML property
|
||||||
|
# to match what we expect and what
|
||||||
|
assert div.html == div._js.innerHTML == "<b>New Content</b>"
|
||||||
|
assert div.text == div._js.textContent == "<b>New Content</b>"
|
||||||
|
|
||||||
|
|
||||||
class TestCollection:
|
class TestCollection:
|
||||||
def test_iter_eq_children(self):
|
def test_iter_eq_children(self):
|
||||||
|
|||||||
0
pyscript.core/test/test.html
Normal file
0
pyscript.core/test/test.html
Normal file
28
pyscript.core/types/core.d.ts
vendored
28
pyscript.core/types/core.d.ts
vendored
@@ -3,14 +3,26 @@ import TYPES from "./types.js";
|
|||||||
* A `Worker` facade able to bootstrap on the worker thread only a PyScript module.
|
* A `Worker` facade able to bootstrap on the worker thread only a PyScript module.
|
||||||
* @param {string} file the python file to run ina worker.
|
* @param {string} file the python file to run ina worker.
|
||||||
* @param {{config?: string | object, async?: boolean}} [options] optional configuration for the worker.
|
* @param {{config?: string | object, async?: boolean}} [options] optional configuration for the worker.
|
||||||
* @returns {Worker & {sync: ProxyHandler<object>}}
|
* @returns {Promise<Worker & {sync: object}>}
|
||||||
*/
|
*/
|
||||||
declare function exportedPyWorker(file: string, options?: {
|
declare function exportedPyWorker(file: string, options?: {
|
||||||
config?: string | object;
|
config?: string | object;
|
||||||
async?: boolean;
|
async?: boolean;
|
||||||
}): Worker & {
|
}): Promise<Worker & {
|
||||||
sync: ProxyHandler<object>;
|
sync: object;
|
||||||
};
|
}>;
|
||||||
|
/**
|
||||||
|
* A `Worker` facade able to bootstrap on the worker thread only a PyScript module.
|
||||||
|
* @param {string} file the python file to run ina worker.
|
||||||
|
* @param {{config?: string | object, async?: boolean}} [options] optional configuration for the worker.
|
||||||
|
* @returns {Promise<Worker & {sync: object}>}
|
||||||
|
*/
|
||||||
|
declare function exportedMPWorker(file: string, options?: {
|
||||||
|
config?: string | object;
|
||||||
|
async?: boolean;
|
||||||
|
}): Promise<Worker & {
|
||||||
|
sync: object;
|
||||||
|
}>;
|
||||||
declare const exportedHooks: {
|
declare const exportedHooks: {
|
||||||
main: {
|
main: {
|
||||||
onWorker: Set<Function>;
|
onWorker: Set<Function>;
|
||||||
@@ -26,7 +38,11 @@ declare const exportedHooks: {
|
|||||||
};
|
};
|
||||||
worker: {
|
worker: {
|
||||||
onReady: Set<Function>;
|
onReady: Set<Function>;
|
||||||
onBeforeRun: Set<Function>;
|
onBeforeRun: Set<Function>; /**
|
||||||
|
* Given a generic DOM Element, tries to fetch the 'src' attribute, if present.
|
||||||
|
* It either throws an error if the 'src' can't be fetched or it returns a fallback
|
||||||
|
* content as source.
|
||||||
|
*/
|
||||||
onBeforeRunAsync: Set<Function>;
|
onBeforeRunAsync: Set<Function>;
|
||||||
onAfterRun: Set<Function>;
|
onAfterRun: Set<Function>;
|
||||||
onAfterRunAsync: Set<Function>;
|
onAfterRunAsync: Set<Function>;
|
||||||
@@ -39,4 +55,4 @@ declare const exportedHooks: {
|
|||||||
declare const exportedConfig: {};
|
declare const exportedConfig: {};
|
||||||
declare const exportedWhenDefined: (type: string) => Promise<any>;
|
declare const exportedWhenDefined: (type: string) => Promise<any>;
|
||||||
import sync from "./sync.js";
|
import sync from "./sync.js";
|
||||||
export { TYPES, exportedPyWorker as PyWorker, exportedHooks as hooks, exportedConfig as config, exportedWhenDefined as whenDefined };
|
export { TYPES, exportedPyWorker as PyWorker, exportedMPWorker as MPWorker, exportedHooks as hooks, exportedConfig as config, exportedWhenDefined as whenDefined };
|
||||||
|
|||||||
3
pyscript.core/types/fetch.d.ts
vendored
3
pyscript.core/types/fetch.d.ts
vendored
@@ -8,5 +8,4 @@
|
|||||||
* @returns {Promise<Response>}
|
* @returns {Promise<Response>}
|
||||||
*/
|
*/
|
||||||
export function robustFetch(url: string, options?: Request): Promise<Response>;
|
export function robustFetch(url: string, options?: Request): Promise<Response>;
|
||||||
export { getText };
|
export function getText(response: Response): Promise<string>;
|
||||||
import { getText } from "polyscript/exports";
|
|
||||||
|
|||||||
2
pyscript.core/types/stdlib/pyscript.d.ts
vendored
2
pyscript.core/types/stdlib/pyscript.d.ts
vendored
@@ -3,6 +3,8 @@ declare namespace _default {
|
|||||||
"__init__.py": string;
|
"__init__.py": string;
|
||||||
"display.py": string;
|
"display.py": string;
|
||||||
"event_handling.py": string;
|
"event_handling.py": string;
|
||||||
|
"fetch.py": string;
|
||||||
|
"ffi.py": string;
|
||||||
"magic_js.py": string;
|
"magic_js.py": string;
|
||||||
"util.py": string;
|
"util.py": string;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user