From 45ce5ca50d8eb81aabcdc153ce30f3ff4b54af2e Mon Sep 17 00:00:00 2001 From: Jakub Novak Date: Fri, 29 Aug 2025 17:14:45 +0200 Subject: [PATCH] Add pipeline for linting and formatting --- .eslintrc.cjs | 26 + .github/workflows/lint.yml | 69 ++ .../e2b_charts/charts/bars.py | 1 - chart_data_extractor/package.json | 9 +- chart_data_extractor/poetry.lock | 74 +- chart_data_extractor/pyproject.toml | 5 + .../tests/charts/test_blank.py | 1 - .../tests/charts/test_categorical_scale.py | 2 - .../tests/charts/test_log_graph.py | 2 +- js/.eslintrc.cjs | 4 + js/example.mts | 53 +- js/package.json | 6 +- js/src/charts.ts | 24 +- js/src/messaging.ts | 12 +- js/src/sandbox.ts | 12 +- js/src/utils.ts | 12 +- js/tests/benchmarking.js | 31 - js/tests/callbacks.test.ts | 10 +- js/tests/charts/boxAndWhisker.test.ts | 6 +- js/tests/charts/line.test.ts | 18 +- js/tests/env_vars/bash.test.ts | 59 +- js/tests/env_vars/java.test.ts | 59 +- js/tests/env_vars/js.test.ts | 54 +- js/tests/env_vars/python.test.ts | 39 +- js/tests/env_vars/r.test.ts | 25 +- js/tests/images/bar.test.ts | 13 +- js/tests/kernels.test.ts | 4 +- js/tests/languages/deno.test.ts | 49 +- js/tests/runtimes/bun/run.test.ts | 22 +- js/tests/setup.ts | 3 +- package.json | 13 +- pnpm-lock.yaml | 954 +++++++++++++++++- python/async_example.py | 2 +- .../code_interpreter_async.py | 1 - python/e2b_code_interpreter/exceptions.py | 4 +- python/package.json | 6 +- python/poetry.lock | 30 +- python/pyproject.toml | 6 +- python/tests/async/env_vars/test_bash.py | 36 +- python/tests/async/env_vars/test_java.py | 30 +- python/tests/async/env_vars/test_js.py | 30 +- python/tests/async/env_vars/test_python.py | 30 +- python/tests/async/env_vars/test_r.py | 32 +- .../tests/async/test_async_default_kernels.py | 15 +- python/tests/charts/test_log_chart.py | 2 +- python/tests/conftest.py | 4 +- python/tests/performance.py | 6 +- python/tests/sync/test_default_kernels.py | 19 +- template/package.json | 6 +- template/server/contexts.py | 4 +- template/server/main.py | 6 +- template/startup_scripts/0002_data.py | 2 +- 52 files changed, 1554 insertions(+), 388 deletions(-) create mode 100644 .eslintrc.cjs create mode 100644 .github/workflows/lint.yml create mode 100644 js/.eslintrc.cjs delete mode 100644 js/tests/benchmarking.js diff --git a/.eslintrc.cjs b/.eslintrc.cjs new file mode 100644 index 00000000..4746db02 --- /dev/null +++ b/.eslintrc.cjs @@ -0,0 +1,26 @@ +module.exports = { + env: { + node: true, + browser: true, + es6: true, + }, + extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended'], + parser: '@typescript-eslint/parser', + parserOptions: { + ecmaVersion: 'latest', + sourceType: 'module', + }, + ignorePatterns: ['dist/', 'node_modules/', '*.gen.ts'], + plugins: ['@typescript-eslint', 'unused-imports', '@stylistic/ts'], + rules: { + '@typescript-eslint/member-ordering': 'error', + '@typescript-eslint/ban-ts-comment': 'off', // "move fast" mode + '@typescript-eslint/no-explicit-any': 'off', // "move fast" mode + 'linebreak-style': ['error', 'unix'], + 'unused-imports/no-unused-imports': 'error', + // No double quotes + quotes: ['error', 'single', { avoidEscape: true }], + // No extra semicolon + '@stylistic/ts/semi': ['error', 'never'], + }, +} diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 00000000..493bea7d --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,69 @@ +name: Lint + +on: + pull_request: + +jobs: + lint: + name: Lint + runs-on: ubuntu-latest + + steps: + - name: Checkout Repo + uses: actions/checkout@v4 + + - uses: pnpm/action-setup@v4 + with: + version: 9.15.5 + + - name: Setup Node.js 20 + uses: actions/setup-node@v4 + with: + node-version: '20.x' + cache: pnpm + + - name: Configure pnpm + run: | + pnpm config set auto-install-peers true + pnpm config set exclude-links-from-lockfile true + + - name: Install dependencies + run: pnpm install --frozen-lockfile + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.10' + + - name: Install and configure Poetry + uses: snok/install-poetry@v1 + with: + version: 1.5.1 + virtualenvs-create: true + virtualenvs-in-project: true + installer-parallel: true + + - name: Install Python dependencies + working-directory: python + run: | + poetry install --with dev + pip install ruff=="0.11.12" + + - name: Run linting + run: | + pnpm run lint + + - name: Run formatting + run: | + pnpm run format + + - name: Check for uncommitted changes + run: | + if [[ -n $(git status --porcelain) ]]; then + echo "❌ Files are not formatted properly:" + git status --short + git diff + exit 1 + else + echo "✅ No changes detected." + fi \ No newline at end of file diff --git a/chart_data_extractor/e2b_charts/charts/bars.py b/chart_data_extractor/e2b_charts/charts/bars.py index a386ccdc..3d7a9437 100644 --- a/chart_data_extractor/e2b_charts/charts/bars.py +++ b/chart_data_extractor/e2b_charts/charts/bars.py @@ -37,7 +37,6 @@ def _extract_info(self, ax: Axes) -> None: labels = [label.get_text() for label in ax.get_xticklabels()] values = heights for label, value in zip(labels, values): - bar = BarData(label=label, value=value, group=group_label) self.elements.append(bar) diff --git a/chart_data_extractor/package.json b/chart_data_extractor/package.json index 41cb32b8..4015fd6a 100644 --- a/chart_data_extractor/package.json +++ b/chart_data_extractor/package.json @@ -6,6 +6,13 @@ "test": "poetry run pytest -n 4 --verbose -x", "example": "poetry run python3 example.py", "postVersion": "poetry version $(pnpm pkg get version --workspaces=false | tr -d \\\")", - "pretest": "poetry install" + "pretest": "poetry install", + "lint": "poetry run ruff check .", + "format": "poetry run ruff format ." + }, + "devDependencies": { + "@typescript-eslint/eslint-plugin": "^7.11.0", + "@typescript-eslint/parser": "^7.11.0", + "eslint": "^8.57.1" } } diff --git a/chart_data_extractor/poetry.lock b/chart_data_extractor/poetry.lock index 1a4794e9..d1df466b 100644 --- a/chart_data_extractor/poetry.lock +++ b/chart_data_extractor/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 1.8.1 and should not be changed by hand. +# This file is automatically @generated by Poetry 2.1.1 and should not be changed by hand. [[package]] name = "annotated-types" @@ -6,6 +6,7 @@ version = "0.7.0" description = "Reusable constraint types to use with typing.Annotated" optional = false python-versions = ">=3.8" +groups = ["main"] files = [ {file = "annotated_types-0.7.0-py3-none-any.whl", hash = "sha256:1f02e8b43a8fbbc3f3e0d4f0f4bfc8131bcb4eebe8849b8e5c773f3a1c582a53"}, {file = "annotated_types-0.7.0.tar.gz", hash = "sha256:aff07c09a53a08bc8cfccb9c85b05f1aa9a2a6f23728d790723543408344ce89"}, @@ -17,6 +18,8 @@ version = "0.4.6" description = "Cross-platform colored terminal text." optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7" +groups = ["dev"] +markers = "sys_platform == \"win32\"" files = [ {file = "colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6"}, {file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"}, @@ -28,6 +31,7 @@ version = "1.3.0" description = "Python library for calculating contours of 2D quadrilateral grids" optional = false python-versions = ">=3.9" +groups = ["main"] files = [ {file = "contourpy-1.3.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:880ea32e5c774634f9fcd46504bf9f080a41ad855f4fef54f5380f5133d343c7"}, {file = "contourpy-1.3.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:76c905ef940a4474a6289c71d53122a4f77766eef23c03cd57016ce19d0f7b42"}, @@ -112,6 +116,7 @@ version = "0.12.1" description = "Composable style cycles" optional = false python-versions = ">=3.8" +groups = ["main"] files = [ {file = "cycler-0.12.1-py3-none-any.whl", hash = "sha256:85cef7cff222d8644161529808465972e51340599459b8ac3ccbac5a854e0d30"}, {file = "cycler-0.12.1.tar.gz", hash = "sha256:88bb128f02ba341da8ef447245a9e138fae777f6a23943da4540077d3601eb1c"}, @@ -127,6 +132,8 @@ version = "1.2.2" description = "Backport of PEP 654 (exception groups)" optional = false python-versions = ">=3.7" +groups = ["dev"] +markers = "python_version < \"3.11\"" files = [ {file = "exceptiongroup-1.2.2-py3-none-any.whl", hash = "sha256:3111b9d131c238bec2f8f516e123e14ba243563fb135d3fe885990585aa7795b"}, {file = "exceptiongroup-1.2.2.tar.gz", hash = "sha256:47c2edf7c6738fafb49fd34290706d1a1a2f4d1c6df275526b62cbb4aa5393cc"}, @@ -141,6 +148,7 @@ version = "4.54.1" description = "Tools to manipulate font files" optional = false python-versions = ">=3.8" +groups = ["main"] files = [ {file = "fonttools-4.54.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:7ed7ee041ff7b34cc62f07545e55e1468808691dddfd315d51dd82a6b37ddef2"}, {file = "fonttools-4.54.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:41bb0b250c8132b2fcac148e2e9198e62ff06f3cc472065dff839327945c5882"}, @@ -193,18 +201,18 @@ files = [ ] [package.extras] -all = ["brotli (>=1.0.1)", "brotlicffi (>=0.8.0)", "fs (>=2.2.0,<3)", "lxml (>=4.0)", "lz4 (>=1.7.4.2)", "matplotlib", "munkres", "pycairo", "scipy", "skia-pathops (>=0.5.0)", "sympy", "uharfbuzz (>=0.23.0)", "unicodedata2 (>=15.1.0)", "xattr", "zopfli (>=0.1.4)"] +all = ["brotli (>=1.0.1) ; platform_python_implementation == \"CPython\"", "brotlicffi (>=0.8.0) ; platform_python_implementation != \"CPython\"", "fs (>=2.2.0,<3)", "lxml (>=4.0)", "lz4 (>=1.7.4.2)", "matplotlib", "munkres ; platform_python_implementation == \"PyPy\"", "pycairo", "scipy ; platform_python_implementation != \"PyPy\"", "skia-pathops (>=0.5.0)", "sympy", "uharfbuzz (>=0.23.0)", "unicodedata2 (>=15.1.0) ; python_version <= \"3.12\"", "xattr ; sys_platform == \"darwin\"", "zopfli (>=0.1.4)"] graphite = ["lz4 (>=1.7.4.2)"] -interpolatable = ["munkres", "pycairo", "scipy"] +interpolatable = ["munkres ; platform_python_implementation == \"PyPy\"", "pycairo", "scipy ; platform_python_implementation != \"PyPy\""] lxml = ["lxml (>=4.0)"] pathops = ["skia-pathops (>=0.5.0)"] plot = ["matplotlib"] repacker = ["uharfbuzz (>=0.23.0)"] symfont = ["sympy"] -type1 = ["xattr"] +type1 = ["xattr ; sys_platform == \"darwin\""] ufo = ["fs (>=2.2.0,<3)"] -unicode = ["unicodedata2 (>=15.1.0)"] -woff = ["brotli (>=1.0.1)", "brotlicffi (>=0.8.0)", "zopfli (>=0.1.4)"] +unicode = ["unicodedata2 (>=15.1.0) ; python_version <= \"3.12\""] +woff = ["brotli (>=1.0.1) ; platform_python_implementation == \"CPython\"", "brotlicffi (>=0.8.0) ; platform_python_implementation != \"CPython\"", "zopfli (>=0.1.4)"] [[package]] name = "iniconfig" @@ -212,6 +220,7 @@ version = "2.0.0" description = "brain-dead simple config-ini parsing" optional = false python-versions = ">=3.7" +groups = ["dev"] files = [ {file = "iniconfig-2.0.0-py3-none-any.whl", hash = "sha256:b6a85871a79d2e3b22d2d1b94ac2824226a63c6b741c88f7ae975f18b6778374"}, {file = "iniconfig-2.0.0.tar.gz", hash = "sha256:2d91e135bf72d31a410b17c16da610a82cb55f6b0477d1a902134b24a455b8b3"}, @@ -223,6 +232,7 @@ version = "1.4.7" description = "A fast implementation of the Cassowary constraint solver" optional = false python-versions = ">=3.8" +groups = ["main"] files = [ {file = "kiwisolver-1.4.7-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:8a9c83f75223d5e48b0bc9cb1bf2776cf01563e00ade8775ffe13b0b6e1af3a6"}, {file = "kiwisolver-1.4.7-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:58370b1ffbd35407444d57057b57da5d6549d2d854fa30249771775c63b5fe17"}, @@ -346,6 +356,7 @@ version = "3.9.2" description = "Python plotting package" optional = false python-versions = ">=3.9" +groups = ["main"] files = [ {file = "matplotlib-3.9.2-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:9d78bbc0cbc891ad55b4f39a48c22182e9bdaea7fc0e5dbd364f49f729ca1bbb"}, {file = "matplotlib-3.9.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:c375cc72229614632c87355366bdf2570c2dac01ac66b8ad048d2dabadf2d0d4"}, @@ -409,6 +420,7 @@ version = "1.26.4" description = "Fundamental package for array computing in Python" optional = false python-versions = ">=3.9" +groups = ["main"] files = [ {file = "numpy-1.26.4-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:9ff0f4f29c51e2803569d7a51c2304de5554655a60c5d776e35b4a41413830d0"}, {file = "numpy-1.26.4-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:2e4ee3380d6de9c9ec04745830fd9e2eccb3e6cf790d39d7b98ffd19b0dd754a"}, @@ -454,6 +466,7 @@ version = "24.1" description = "Core utilities for Python packages" optional = false python-versions = ">=3.8" +groups = ["main", "dev"] files = [ {file = "packaging-24.1-py3-none-any.whl", hash = "sha256:5b8f2217dbdbd2f7f384c41c628544e6d52f2d0f53c6d0c3ea61aa5d1d7ff124"}, {file = "packaging-24.1.tar.gz", hash = "sha256:026ed72c8ed3fcce5bf8950572258698927fd1dbda10a5e981cdf0ac37f4f002"}, @@ -465,6 +478,7 @@ version = "10.4.0" description = "Python Imaging Library (Fork)" optional = false python-versions = ">=3.8" +groups = ["main"] files = [ {file = "pillow-10.4.0-cp310-cp310-macosx_10_10_x86_64.whl", hash = "sha256:4d9667937cfa347525b319ae34375c37b9ee6b525440f3ef48542fcf66f2731e"}, {file = "pillow-10.4.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:543f3dc61c18dafb755773efc89aae60d06b6596a63914107f75459cf984164d"}, @@ -553,7 +567,7 @@ docs = ["furo", "olefile", "sphinx (>=7.3)", "sphinx-copybutton", "sphinx-inline fpx = ["olefile"] mic = ["olefile"] tests = ["check-manifest", "coverage", "defusedxml", "markdown2", "olefile", "packaging", "pyroma", "pytest", "pytest-cov", "pytest-timeout"] -typing = ["typing-extensions"] +typing = ["typing-extensions ; python_version < \"3.10\""] xmp = ["defusedxml"] [[package]] @@ -562,6 +576,7 @@ version = "1.5.0" description = "plugin and hook calling mechanisms for python" optional = false python-versions = ">=3.8" +groups = ["dev"] files = [ {file = "pluggy-1.5.0-py3-none-any.whl", hash = "sha256:44e1ad92c8ca002de6377e165f3e0f1be63266ab4d554740532335b9d75ea669"}, {file = "pluggy-1.5.0.tar.gz", hash = "sha256:2cffa88e94fdc978c4c574f15f9e59b7f4201d439195c3715ca9e2486f1d0cf1"}, @@ -577,6 +592,7 @@ version = "2.9.2" description = "Data validation using Python type hints" optional = false python-versions = ">=3.8" +groups = ["main"] files = [ {file = "pydantic-2.9.2-py3-none-any.whl", hash = "sha256:f048cec7b26778210e28a0459867920654d48e5e62db0958433636cde4254f12"}, {file = "pydantic-2.9.2.tar.gz", hash = "sha256:d155cef71265d1e9807ed1c32b4c8deec042a44a50a4188b25ac67ecd81a9c0f"}, @@ -592,7 +608,7 @@ typing-extensions = [ [package.extras] email = ["email-validator (>=2.0.0)"] -timezone = ["tzdata"] +timezone = ["tzdata ; python_version >= \"3.9\" and sys_platform == \"win32\""] [[package]] name = "pydantic-core" @@ -600,6 +616,7 @@ version = "2.23.4" description = "Core functionality for Pydantic validation and serialization" optional = false python-versions = ">=3.8" +groups = ["main"] files = [ {file = "pydantic_core-2.23.4-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:b10bd51f823d891193d4717448fab065733958bdb6a6b351967bd349d48d5c9b"}, {file = "pydantic_core-2.23.4-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:4fc714bdbfb534f94034efaa6eadd74e5b93c8fa6315565a222f7b6f42ca1166"}, @@ -701,6 +718,7 @@ version = "3.2.0" description = "pyparsing module - Classes and methods to define and execute parsing grammars" optional = false python-versions = ">=3.9" +groups = ["main"] files = [ {file = "pyparsing-3.2.0-py3-none-any.whl", hash = "sha256:93d9577b88da0bbea8cc8334ee8b918ed014968fd2ec383e868fb8afb1ccef84"}, {file = "pyparsing-3.2.0.tar.gz", hash = "sha256:cbf74e27246d595d9a74b186b810f6fbb86726dbf3b9532efb343f6d7294fe9c"}, @@ -715,6 +733,7 @@ version = "7.4.4" description = "pytest: simple powerful testing with Python" optional = false python-versions = ">=3.7" +groups = ["dev"] files = [ {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, @@ -737,6 +756,7 @@ version = "0.5.2" description = "A py.test plugin that parses environment files before running tests" optional = false python-versions = "*" +groups = ["dev"] files = [ {file = "pytest-dotenv-0.5.2.tar.gz", hash = "sha256:2dc6c3ac6d8764c71c6d2804e902d0ff810fa19692e95fe138aefc9b1aa73732"}, {file = "pytest_dotenv-0.5.2-py3-none-any.whl", hash = "sha256:40a2cece120a213898afaa5407673f6bd924b1fa7eafce6bda0e8abffe2f710f"}, @@ -752,6 +772,7 @@ version = "2.9.0.post0" description = "Extensions to the standard Python datetime module" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,>=2.7" +groups = ["main"] files = [ {file = "python-dateutil-2.9.0.post0.tar.gz", hash = "sha256:37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3"}, {file = "python_dateutil-2.9.0.post0-py2.py3-none-any.whl", hash = "sha256:a8b2bc7bffae282281c8140a97d3aa9c14da0b136dfe83f850eea9a5f7470427"}, @@ -766,6 +787,7 @@ version = "1.0.1" description = "Read key-value pairs from a .env file and set them as environment variables" optional = false python-versions = ">=3.8" +groups = ["dev"] files = [ {file = "python-dotenv-1.0.1.tar.gz", hash = "sha256:e324ee90a023d808f1959c46bcbc04446a10ced277783dc6ee09987c37ec10ca"}, {file = "python_dotenv-1.0.1-py3-none-any.whl", hash = "sha256:f7b63ef50f1b690dddf550d03497b66d609393b40b564ed0d674909a68ebf16a"}, @@ -774,12 +796,41 @@ files = [ [package.extras] cli = ["click (>=5.0)"] +[[package]] +name = "ruff" +version = "0.11.13" +description = "An extremely fast Python linter and code formatter, written in Rust." +optional = false +python-versions = ">=3.7" +groups = ["dev"] +files = [ + {file = "ruff-0.11.13-py3-none-linux_armv6l.whl", hash = "sha256:4bdfbf1240533f40042ec00c9e09a3aade6f8c10b6414cf11b519488d2635d46"}, + {file = "ruff-0.11.13-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:aef9c9ed1b5ca28bb15c7eac83b8670cf3b20b478195bd49c8d756ba0a36cf48"}, + {file = "ruff-0.11.13-py3-none-macosx_11_0_arm64.whl", hash = "sha256:53b15a9dfdce029c842e9a5aebc3855e9ab7771395979ff85b7c1dedb53ddc2b"}, + {file = "ruff-0.11.13-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ab153241400789138d13f362c43f7edecc0edfffce2afa6a68434000ecd8f69a"}, + {file = "ruff-0.11.13-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:6c51f93029d54a910d3d24f7dd0bb909e31b6cd989a5e4ac513f4eb41629f0dc"}, + {file = "ruff-0.11.13-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1808b3ed53e1a777c2ef733aca9051dc9bf7c99b26ece15cb59a0320fbdbd629"}, + {file = "ruff-0.11.13-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:d28ce58b5ecf0f43c1b71edffabe6ed7f245d5336b17805803312ec9bc665933"}, + {file = "ruff-0.11.13-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:55e4bc3a77842da33c16d55b32c6cac1ec5fb0fbec9c8c513bdce76c4f922165"}, + {file = "ruff-0.11.13-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:633bf2c6f35678c56ec73189ba6fa19ff1c5e4807a78bf60ef487b9dd272cc71"}, + {file = "ruff-0.11.13-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4ffbc82d70424b275b089166310448051afdc6e914fdab90e08df66c43bb5ca9"}, + {file = "ruff-0.11.13-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:4a9ddd3ec62a9a89578c85842b836e4ac832d4a2e0bfaad3b02243f930ceafcc"}, + {file = "ruff-0.11.13-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:d237a496e0778d719efb05058c64d28b757c77824e04ffe8796c7436e26712b7"}, + {file = "ruff-0.11.13-py3-none-musllinux_1_2_i686.whl", hash = "sha256:26816a218ca6ef02142343fd24c70f7cd8c5aa6c203bca284407adf675984432"}, + {file = "ruff-0.11.13-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:51c3f95abd9331dc5b87c47ac7f376db5616041173826dfd556cfe3d4977f492"}, + {file = "ruff-0.11.13-py3-none-win32.whl", hash = "sha256:96c27935418e4e8e77a26bb05962817f28b8ef3843a6c6cc49d8783b5507f250"}, + {file = "ruff-0.11.13-py3-none-win_amd64.whl", hash = "sha256:29c3189895a8a6a657b7af4e97d330c8a3afd2c9c8f46c81e2fc5a31866517e3"}, + {file = "ruff-0.11.13-py3-none-win_arm64.whl", hash = "sha256:b4385285e9179d608ff1d2fb9922062663c658605819a6876d8beef0c30b7f3b"}, + {file = "ruff-0.11.13.tar.gz", hash = "sha256:26fa247dc68d1d4e72c179e08889a25ac0c7ba4d78aecfc835d49cbfd60bf514"}, +] + [[package]] name = "six" version = "1.16.0" description = "Python 2 and 3 compatibility utilities" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*" +groups = ["main"] files = [ {file = "six-1.16.0-py2.py3-none-any.whl", hash = "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254"}, {file = "six-1.16.0.tar.gz", hash = "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926"}, @@ -791,6 +842,8 @@ version = "2.0.2" description = "A lil' TOML parser" optional = false python-versions = ">=3.8" +groups = ["dev"] +markers = "python_version < \"3.11\"" files = [ {file = "tomli-2.0.2-py3-none-any.whl", hash = "sha256:2ebe24485c53d303f690b0ec092806a085f07af5a5aa1464f3931eec36caaa38"}, {file = "tomli-2.0.2.tar.gz", hash = "sha256:d46d457a85337051c36524bc5349dd91b1877838e2979ac5ced3e710ed8a60ed"}, @@ -802,12 +855,13 @@ version = "4.12.2" description = "Backported and Experimental Type Hints for Python 3.8+" optional = false python-versions = ">=3.8" +groups = ["main"] files = [ {file = "typing_extensions-4.12.2-py3-none-any.whl", hash = "sha256:04e5ca0351e0f3f85c6853954072df659d0d13fac324d0072316b67d7794700d"}, {file = "typing_extensions-4.12.2.tar.gz", hash = "sha256:1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8"}, ] [metadata] -lock-version = "2.0" +lock-version = "2.1" python-versions = "^3.10" -content-hash = "440d62778fbcd344ce5be61672491bf9e571ba5676add56b26296e30dd2f1bbf" +content-hash = "068c79d18500bf2148afd71e659d29f5cff8a7bc089ddba56de911ba31714bdd" diff --git a/chart_data_extractor/pyproject.toml b/chart_data_extractor/pyproject.toml index 745d7588..1f33bbd0 100644 --- a/chart_data_extractor/pyproject.toml +++ b/chart_data_extractor/pyproject.toml @@ -20,6 +20,8 @@ pydantic = "^2.8.2" pytest = "^7.4.0" python-dotenv = "^1.0.0" pytest-dotenv = "^0.5.2" +ruff = "^0.11.12" + [build-system] requires = ["poetry-core"] @@ -27,3 +29,6 @@ build-backend = "poetry.core.masonry.api" [tool.poetry.urls] "Bug Tracker" = "https://github.com/e2b-dev/code-interpreter/issues" + +[tool.ruff.lint] +ignore = ["F401", "F403"] \ No newline at end of file diff --git a/chart_data_extractor/tests/charts/test_blank.py b/chart_data_extractor/tests/charts/test_blank.py index 5aa77861..7fb95c43 100644 --- a/chart_data_extractor/tests/charts/test_blank.py +++ b/chart_data_extractor/tests/charts/test_blank.py @@ -1,7 +1,6 @@ import matplotlib.pyplot as plt from e2b_charts import chart_figure_to_chart -from e2b_charts.charts import BarChart, ChartType def test_blank_chart(): diff --git a/chart_data_extractor/tests/charts/test_categorical_scale.py b/chart_data_extractor/tests/charts/test_categorical_scale.py index e20ced61..12d87d23 100644 --- a/chart_data_extractor/tests/charts/test_categorical_scale.py +++ b/chart_data_extractor/tests/charts/test_categorical_scale.py @@ -1,6 +1,4 @@ -import numpy as np import matplotlib.pyplot as plt -import datetime from e2b_charts import chart_figure_to_chart from e2b_charts.charts import LineChart diff --git a/chart_data_extractor/tests/charts/test_log_graph.py b/chart_data_extractor/tests/charts/test_log_graph.py index d5482211..b15cb72b 100644 --- a/chart_data_extractor/tests/charts/test_log_graph.py +++ b/chart_data_extractor/tests/charts/test_log_graph.py @@ -40,7 +40,7 @@ def test_log_chart(): assert chart.x_label == "X-axis" assert chart.y_label == "Y-axis (log scale)" - assert chart.x_unit == None + assert chart.x_unit is None assert chart.y_unit == "log scale" assert chart.x_scale == "linear" diff --git a/js/.eslintrc.cjs b/js/.eslintrc.cjs new file mode 100644 index 00000000..b572cd92 --- /dev/null +++ b/js/.eslintrc.cjs @@ -0,0 +1,4 @@ +module.exports = { + root: true, + extends: '../.eslintrc.cjs', +} diff --git a/js/example.mts b/js/example.mts index 217601bd..f96fd065 100644 --- a/js/example.mts +++ b/js/example.mts @@ -1,38 +1,35 @@ -import dotenv from 'dotenv' +import { config } from 'dotenv' import { Sandbox } from './dist' -dotenv.config() +function log(...args: any[]) { + console.log(...args) +} -const code = ` -import matplotlib.pyplot as plt -import numpy as np +config() -x = np.linspace(0, 20, 100) -y = np.sin(x) +const sbx = await Sandbox.create('bwyvo5fk343pbvxst536') +log('ℹ️ sandbox created', sbx.sandboxId) -plt.plot(x, y) -plt.show() +await sbx.runCode('x = 1') +log('Sandbox code executed') -x = np.linspace(0, 10, 100) -plt.plot(x, y) -plt.show() +const sandboxId = await sbx.betaPause() +log('Sandbox paused', sandboxId) -import pandas -pandas.DataFrame({"a": [1, 2, 3]}) -` +// Resume the sandbox from the same state +const sameSbx = await Sandbox.connect(sbx.sandboxId) +log('Sandbox resumed', sameSbx.sandboxId) -const sandbox = await Sandbox.create() -console.log(sandbox.sandboxId) +const execution = await sameSbx.runCode('x+=1; x') +// Output result +log(execution.text) +log(execution.error) +if (execution.text !== '2') { + log('Test failed:', 'Failed to resume sandbox') + throw new Error('Failed to resume sandbox') +} +log('Sandbox resumed successfully') -const execution = await sandbox.runCode(code, { - onStdout(msg) { - console.log('stdout', msg) - }, - onStderr(msg) { - console.log('stderr', msg) - }, -}) -console.log(execution.results[0].formats()) -console.log(execution.results[0].data) -console.log(execution.results.length) +await sbx.kill() +log('Sandbox deleted') diff --git a/js/package.json b/js/package.json index 289407b4..13b41888 100644 --- a/js/package.json +++ b/js/package.json @@ -1,7 +1,7 @@ { "name": "@e2b/code-interpreter", "version": "2.0.0", - "packageManager": "pnpm@8.7.6", + "packageManager": "pnpm@9.15.5", "description": "E2B Code Interpreter - Stateful code execution", "homepage": "https://e2b.dev", "license": "MIT", @@ -34,7 +34,9 @@ "example": "npx tsx example.mts", "test:bun": "bun test tests/runtimes/bun --env-file=.env", "test:deno": "deno test tests/runtimes/deno/ --allow-net --allow-read --allow-env --unstable-sloppy-imports --trace-leaks", - "generate-ref": "./scripts/generate_sdk_ref.sh" + "generate-ref": "./scripts/generate_sdk_ref.sh", + "lint": "eslint src/ tests/", + "format": "prettier --write src/ tests/ example.mts" }, "devDependencies": { "@types/node": "^18.18.6", diff --git a/js/src/charts.ts b/js/src/charts.ts index 584026a6..d7d2a674 100644 --- a/js/src/charts.ts +++ b/js/src/charts.ts @@ -11,20 +11,19 @@ export enum ChartType { UNKNOWN = 'unknown', } - /** * Ax scale types */ export enum ScaleType { - LINEAR = "linear", - DATETIME = "datetime", - CATEGORICAL = "categorical", - LOG = "log", - SYMLOG = "symlog", - LOGIT = "logit", - FUNCTION = "function", - FUNCTIONLOG = "functionlog", - ASINH = "asinh", + LINEAR = 'linear', + DATETIME = 'datetime', + CATEGORICAL = 'categorical', + LOG = 'log', + SYMLOG = 'symlog', + LOGIT = 'logit', + FUNCTION = 'function', + FUNCTIONLOG = 'functionlog', + ASINH = 'asinh', } /** @@ -127,13 +126,14 @@ export function deserializeChart(data: any): Chart { return { ...data } as PieChart case ChartType.BOX_AND_WHISKER: return { ...data } as BoxAndWhiskerChart - case ChartType.SUPERCHART: - const charts = data.data.map((g: any) => deserializeChart(g)) + case ChartType.SUPERCHART: { + const charts: Chart[] = data.data.map((g: any) => deserializeChart(g)) delete data.data return { ...data, data: charts, } as SuperChart + } default: return { ...data, type: ChartType.UNKNOWN } as Chart } diff --git a/js/src/messaging.ts b/js/src/messaging.ts index bf08c58e..11b1a981 100644 --- a/js/src/messaging.ts +++ b/js/src/messaging.ts @@ -35,7 +35,7 @@ export class OutputMessage { * Whether the output is an error. */ public readonly error: boolean - ) { } + ) {} public toString() { return this.line @@ -60,7 +60,7 @@ export class ExecutionError { * The raw traceback of the error. **/ public traceback: string - ) { } + ) {} } /** @@ -68,7 +68,6 @@ export class ExecutionError { */ export type MIMEType = string - type E2BData = { data: Record chart: ChartTypes @@ -185,7 +184,7 @@ export class Result { 'data', 'chart', 'extra', - "text" + 'text', ].includes(key) ) { this.extra[key] = data[key] @@ -293,7 +292,7 @@ export class Execution { * Execution count of the cell. */ public executionCount?: number - ) { } + ) {} /** * Returns the text representation of the main result of the cell. @@ -329,7 +328,7 @@ export async function parseOutput( const msg = JSON.parse(line) switch (msg.type) { - case 'result': + case 'result': { const result = new Result( { ...msg, type: undefined, is_main_result: undefined }, msg.is_main_result @@ -339,6 +338,7 @@ export async function parseOutput( await onResult(result) } break + } case 'stdout': execution.logs.stdout.push(msg.text) if (onStdout) { diff --git a/js/src/sandbox.ts b/js/src/sandbox.ts index 89ffdd27..4272d846 100644 --- a/js/src/sandbox.ts +++ b/js/src/sandbox.ts @@ -122,6 +122,12 @@ export class Sandbox extends BaseSandbox { protected static override readonly defaultTemplate: string = 'code-interpreter-v1' + protected get jupyterUrl(): string { + return `${this.connectionConfig.debug ? 'http' : 'https'}://${this.getHost( + JUPYTER_PORT + )}` + } + /** * Run the code as Python. * @@ -314,10 +320,4 @@ export class Sandbox extends BaseSandbox { throw formatRequestTimeoutError(error) } } - - protected get jupyterUrl(): string { - return `${this.connectionConfig.debug ? 'http' : 'https'}://${this.getHost( - JUPYTER_PORT - )}` - } } diff --git a/js/src/utils.ts b/js/src/utils.ts index 4910d5de..0bf73c3c 100644 --- a/js/src/utils.ts +++ b/js/src/utils.ts @@ -2,7 +2,9 @@ import { TimeoutError } from 'e2b' export function formatRequestTimeoutError(error: unknown) { if (error instanceof Error && error.name === 'AbortError') { - return new TimeoutError('Request timed out — the \'requestTimeoutMs\' option can be used to increase this timeout') + return new TimeoutError( + "Request timed out — the 'requestTimeoutMs' option can be used to increase this timeout" + ) } return error @@ -10,19 +12,21 @@ export function formatRequestTimeoutError(error: unknown) { export function formatExecutionTimeoutError(error: unknown) { if (error instanceof Error && error.name === 'AbortError') { - return new TimeoutError('Execution timed out — the \'timeoutMs\' option can be used to increase this timeout') + return new TimeoutError( + "Execution timed out — the 'timeoutMs' option can be used to increase this timeout" + ) } return error } export async function* readLines(stream: ReadableStream) { - const reader = stream.getReader(); + const reader = stream.getReader() let buffer = '' try { while (true) { - const { done, value } = await reader.read(); + const { done, value } = await reader.read() if (value !== undefined) { buffer += new TextDecoder().decode(value) diff --git a/js/tests/benchmarking.js b/js/tests/benchmarking.js deleted file mode 100644 index f7ba5bbf..00000000 --- a/js/tests/benchmarking.js +++ /dev/null @@ -1,31 +0,0 @@ -const { Sandbox } = require('../dist') -const dotenv = require('dotenv') -dotenv.config() - -const iterations = 10 -let createSandboxTime = 0 -let fistExecTime = 0 -let secondExecTime = 0 - -async function main() { - for (let i = 0; i < iterations; i++) { - console.log('Iteration:', i + 1) - let startTime = new Date() - const sandbox = await Sandbox.create() - createSandboxTime += new Date() - startTime - - startTime = new Date() - await sandbox.runCode('x = 1') - fistExecTime += new Date() - startTime - - startTime = new Date() - const result = await sandbox.runCode('x+=1; x') - secondExecTime += new Date() - startTime - - await sandbox.kill() - } - console.log('Average create sandbox time:', createSandboxTime / iterations) - console.log('Average first exec time:', fistExecTime / iterations) - console.log('Average second exec time:', secondExecTime / iterations) -} -main().catch(console.error) diff --git a/js/tests/callbacks.test.ts b/js/tests/callbacks.test.ts index aeb26e22..abc109ad 100644 --- a/js/tests/callbacks.test.ts +++ b/js/tests/callbacks.test.ts @@ -12,7 +12,6 @@ sandboxTest('callback results', async ({ sandbox }) => { expect(result.results[0].text).toBe('1') }) - sandboxTest('callback error', async ({ sandbox }) => { const errors = [] const result = await sandbox.runCode('xyz', { @@ -35,9 +34,12 @@ sandboxTest('callback stdout', async ({ sandbox }) => { sandboxTest('callback stderr', async ({ sandbox }) => { const stderr = [] - const result = await sandbox.runCode('import sys;print("This is an error message", file=sys.stderr)', { - onStderr: (err) => stderr.push(err), - }) + const result = await sandbox.runCode( + 'import sys;print("This is an error message", file=sys.stderr)', + { + onStderr: (err) => stderr.push(err), + } + ) expect(stderr.length).toBe(1) expect(result.logs.stderr).toEqual(['This is an error message\n']) diff --git a/js/tests/charts/boxAndWhisker.test.ts b/js/tests/charts/boxAndWhisker.test.ts index cfa9109e..47f8985a 100644 --- a/js/tests/charts/boxAndWhisker.test.ts +++ b/js/tests/charts/boxAndWhisker.test.ts @@ -49,7 +49,11 @@ plt.show() const bars = chart.elements expect(bars.length).toBe(3) - expect(bars.map((bar) => bar.label)).toEqual(['Class A', 'Class B', 'Class C']) + expect(bars.map((bar) => bar.label)).toEqual([ + 'Class A', + 'Class B', + 'Class C', + ]) expect(bars.map((bar) => bar.outliers)).toEqual([[], [76], []]) expect(bars.map((bar) => bar.min)).toEqual([78, 84, 75]) expect(bars.map((bar) => bar.first_quartile)).toEqual([85, 84.75, 79]) diff --git a/js/tests/charts/line.test.ts b/js/tests/charts/line.test.ts index 5d34da70..1762bf41 100644 --- a/js/tests/charts/line.test.ts +++ b/js/tests/charts/line.test.ts @@ -46,18 +46,18 @@ plt.show() expect(chart.y_unit).toBe('Hz') expect(chart.x_ticks.every((tick: number) => typeof tick === 'string')).toBe( - true, + true ) expect(new Date(chart.x_ticks[0])).toBeInstanceOf(Date) expect(chart.y_ticks.every((tick: number) => typeof tick === 'number')).toBe( - true, + true ) expect( - chart.y_tick_labels.every((label: string) => typeof label === 'string'), + chart.y_tick_labels.every((label: string) => typeof label === 'string') ).toBe(true) expect( - chart.x_tick_labels.every((label: string) => typeof label === 'string'), + chart.x_tick_labels.every((label: string) => typeof label === 'string') ).toBe(true) const lines = chart.elements @@ -70,11 +70,11 @@ plt.show() expect( firstLine.points.every( (point: [number, number]) => - typeof point[0] === 'string' && typeof point[1] === 'number', - ), + typeof point[0] === 'string' && typeof point[1] === 'number' + ) ).toBe(true) expect(new Date(firstLine.points[0][0])).toEqual( - new Date('2023-09-01T00:00:00.000Z'), + new Date('2023-09-01T00:00:00.000Z') ) expect(secondLine.label).toBe('cos(x)') @@ -82,7 +82,7 @@ plt.show() expect( secondLine.points.every( (point: [number, number]) => - typeof point[0] === 'string' && typeof point[1] === 'number', - ), + typeof point[0] === 'string' && typeof point[1] === 'number' + ) ).toBe(true) }) diff --git a/js/tests/env_vars/bash.test.ts b/js/tests/env_vars/bash.test.ts index 733b96cc..49624856 100644 --- a/js/tests/env_vars/bash.test.ts +++ b/js/tests/env_vars/bash.test.ts @@ -4,24 +4,24 @@ import { isDebug, sandboxTest } from '../setup' import { Sandbox } from '../../src' // Bash Env Vars -sandboxTest.skipIf(isDebug)('env vars on sandbox (bash)', async ({ template }) => { - const sandbox = await Sandbox.create(template, { - envs: { TEST_ENV_VAR: 'supertest' }, - }) - - try { - const result = await sandbox.runCode( - `echo $TEST_ENV_VAR`, - { +sandboxTest.skipIf(isDebug)( + 'env vars on sandbox (bash)', + async ({ template }) => { + const sandbox = await Sandbox.create(template, { + envs: { TEST_ENV_VAR: 'supertest' }, + }) + + try { + const result = await sandbox.runCode('echo $TEST_ENV_VAR', { language: 'bash', - } - ) + }) - expect(result.logs.stdout[0]).toEqual('supertest\n') - } finally { - await sandbox.kill() + expect(result.logs.stdout[0]).toEqual('supertest\n') + } finally { + await sandbox.kill() + } } -}) +) sandboxTest('env vars per execution (bash)', async ({ sandbox }) => { const result = await sandbox.runCode('echo $FOO', { @@ -29,12 +29,9 @@ sandboxTest('env vars per execution (bash)', async ({ sandbox }) => { language: 'bash', }) - const result_empty = await sandbox.runCode( - 'echo ${FOO:-default}', - { - language: 'bash', - } - ) + const result_empty = await sandbox.runCode('echo ${FOO:-default}', { + language: 'bash', + }) expect(result.logs.stdout[0]).toEqual('bar\n') expect(result_empty.logs.stdout[0]).toEqual('default\n') @@ -46,20 +43,14 @@ sandboxTest.skipIf(isDebug)('env vars overwrite', async ({ template }) => { }) try { - const result = await sandbox.runCode( - `echo $TEST_ENV_VAR`, - { - language: 'bash', - envs: { TEST_ENV_VAR: 'overwrite' }, - } - ) + const result = await sandbox.runCode('echo $TEST_ENV_VAR', { + language: 'bash', + envs: { TEST_ENV_VAR: 'overwrite' }, + }) - const result_global_default = await sandbox.runCode( - `echo $TEST_ENV_VAR`, - { - language: 'bash', - } - ) + const result_global_default = await sandbox.runCode('echo $TEST_ENV_VAR', { + language: 'bash', + }) expect(result.logs.stdout[0]).toEqual('overwrite\n') expect(result_global_default.logs.stdout[0]).toEqual('supertest\n') diff --git a/js/tests/env_vars/java.test.ts b/js/tests/env_vars/java.test.ts index 4058848d..9e7f4d8e 100644 --- a/js/tests/env_vars/java.test.ts +++ b/js/tests/env_vars/java.test.ts @@ -4,36 +4,36 @@ import { isDebug, sandboxTest } from '../setup' import { Sandbox } from '../../src' // Java Env Vars -sandboxTest.skipIf(isDebug)('env vars on sandbox (java)', async ({ template }) => { - const sandbox = await Sandbox.create(template, { - envs: { TEST_ENV_VAR: 'supertest' }, - }) +sandboxTest.skipIf(isDebug)( + 'env vars on sandbox (java)', + async ({ template }) => { + const sandbox = await Sandbox.create(template, { + envs: { TEST_ENV_VAR: 'supertest' }, + }) - try { - const result = await sandbox.runCode( - `System.getProperty("TEST_ENV_VAR")`, - { - language: 'java', - } - ) + try { + const result = await sandbox.runCode( + 'System.getProperty("TEST_ENV_VAR")', + { + language: 'java', + } + ) - expect(result.results[0]?.text.trim()).toEqual('supertest') - } finally { - await sandbox.kill() + expect(result.results[0]?.text.trim()).toEqual('supertest') + } finally { + await sandbox.kill() + } } -}) +) sandboxTest('env vars per execution (java)', async ({ sandbox }) => { - const result = await sandbox.runCode( - `System.getProperty("FOO")`, - { - envs: { FOO: 'bar' }, - language: 'java', - } - ) + const result = await sandbox.runCode('System.getProperty("FOO")', { + envs: { FOO: 'bar' }, + language: 'java', + }) const result_empty = await sandbox.runCode( - `System.getProperty("FOO", "default")`, + 'System.getProperty("FOO", "default")', { language: 'java', } @@ -49,16 +49,13 @@ sandboxTest.skipIf(isDebug)('env vars overwrite', async ({ template }) => { }) try { - const result = await sandbox.runCode( - `System.getProperty("TEST_ENV_VAR")`, - { - language: 'java', - envs: { TEST_ENV_VAR: 'overwrite' }, - } - ) + const result = await sandbox.runCode('System.getProperty("TEST_ENV_VAR")', { + language: 'java', + envs: { TEST_ENV_VAR: 'overwrite' }, + }) const result_global_default = await sandbox.runCode( - `System.getProperty("TEST_ENV_VAR")`, + 'System.getProperty("TEST_ENV_VAR")', { language: 'java', } diff --git a/js/tests/env_vars/js.test.ts b/js/tests/env_vars/js.test.ts index 140c36eb..7e87f7bb 100644 --- a/js/tests/env_vars/js.test.ts +++ b/js/tests/env_vars/js.test.ts @@ -4,37 +4,34 @@ import { isDebug, sandboxTest } from '../setup' import { Sandbox } from '../../src' // JavaScript Env Vars -sandboxTest.skipIf(isDebug)('env vars on sandbox (javascript)', async ({ template }) => { - const sandbox = await Sandbox.create(template, { - envs: { TEST_ENV_VAR: 'supertest' }, - }) - - try { - const result = await sandbox.runCode( - `process.env.TEST_ENV_VAR`, - { +sandboxTest.skipIf(isDebug)( + 'env vars on sandbox (javascript)', + async ({ template }) => { + const sandbox = await Sandbox.create(template, { + envs: { TEST_ENV_VAR: 'supertest' }, + }) + + try { + const result = await sandbox.runCode('process.env.TEST_ENV_VAR', { language: 'javascript', - } - ) + }) - expect(result.results[0]?.text.trim()).toEqual('supertest') - } finally { - await sandbox.kill() + expect(result.results[0]?.text.trim()).toEqual('supertest') + } finally { + await sandbox.kill() + } } -}) +) sandboxTest('env vars per execution (javascript)', async ({ sandbox }) => { - const result = await sandbox.runCode("process.env.FOO", { + const result = await sandbox.runCode('process.env.FOO', { envs: { FOO: 'bar' }, language: 'javascript', }) - const result_empty = await sandbox.runCode( - "process.env.FOO || 'default'", - { - language: 'javascript', - } - ) + const result_empty = await sandbox.runCode("process.env.FOO || 'default'", { + language: 'javascript', + }) expect(result.results[0]?.text.trim()).toEqual('bar') expect(result_empty.results[0]?.text.trim()).toEqual('default') @@ -46,16 +43,13 @@ sandboxTest.skipIf(isDebug)('env vars overwrite', async ({ template }) => { }) try { - const result = await sandbox.runCode( - `process.env.TEST_ENV_VAR`, - { - language: 'javascript', - envs: { TEST_ENV_VAR: 'overwrite' }, - } - ) + const result = await sandbox.runCode('process.env.TEST_ENV_VAR', { + language: 'javascript', + envs: { TEST_ENV_VAR: 'overwrite' }, + }) const result_global_default = await sandbox.runCode( - `process.env.TEST_ENV_VAR`, + 'process.env.TEST_ENV_VAR', { language: 'javascript', } diff --git a/js/tests/env_vars/python.test.ts b/js/tests/env_vars/python.test.ts index 7c4c34d6..af1b7150 100644 --- a/js/tests/env_vars/python.test.ts +++ b/js/tests/env_vars/python.test.ts @@ -4,27 +4,30 @@ import { isDebug, sandboxTest } from '../setup' import { Sandbox } from '../../src' // Python Env Vars -sandboxTest.skipIf(isDebug)('env vars on sandbox (python)', async ({ template }) => { - const sandbox = await Sandbox.create(template, { - envs: { TEST_ENV_VAR: 'supertest' }, - }) +sandboxTest.skipIf(isDebug)( + 'env vars on sandbox (python)', + async ({ template }) => { + const sandbox = await Sandbox.create(template, { + envs: { TEST_ENV_VAR: 'supertest' }, + }) - try { - const result = await sandbox.runCode( - `import os; os.getenv('TEST_ENV_VAR')`, - { - language: 'python', - } - ) + try { + const result = await sandbox.runCode( + 'import os; os.getenv("TEST_ENV_VAR")', + { + language: 'python', + } + ) - expect(result.results[0]?.text.trim()).toEqual('supertest') - } finally { - await sandbox.kill() + expect(result.results[0]?.text.trim()).toEqual('supertest') + } finally { + await sandbox.kill() + } } -}) +) sandboxTest('env vars per execution (python)', async ({ sandbox }) => { - const result = await sandbox.runCode("import os; os.getenv('FOO')", { + const result = await sandbox.runCode('import os; os.getenv("FOO")', { envs: { FOO: 'bar' }, language: 'python', }) @@ -47,7 +50,7 @@ sandboxTest.skipIf(isDebug)('env vars overwrite', async ({ template }) => { try { const result = await sandbox.runCode( - `import os; os.getenv('TEST_ENV_VAR')`, + 'import os; os.getenv("TEST_ENV_VAR")', { language: 'python', envs: { TEST_ENV_VAR: 'overwrite' }, @@ -55,7 +58,7 @@ sandboxTest.skipIf(isDebug)('env vars overwrite', async ({ template }) => { ) const result_global_default = await sandbox.runCode( - `import os; os.getenv('TEST_ENV_VAR')`, + 'import os; os.getenv("TEST_ENV_VAR")', { language: 'python', } diff --git a/js/tests/env_vars/r.test.ts b/js/tests/env_vars/r.test.ts index a81778b8..0103fec0 100644 --- a/js/tests/env_vars/r.test.ts +++ b/js/tests/env_vars/r.test.ts @@ -10,11 +10,11 @@ sandboxTest.skipIf(isDebug)('env vars on sandbox (R)', async ({ template }) => { }) try { - const result = await sandbox.runCode(`Sys.getenv("TEST_ENV_VAR")`, { + const result = await sandbox.runCode('Sys.getenv("TEST_ENV_VAR")', { language: 'r', }) - expect(result.results[0]?.text.trim()).toEqual(`[1] "supertest"`) + expect(result.results[0]?.text.trim()).toEqual('[1] "supertest"') } finally { await sandbox.kill() } @@ -33,8 +33,8 @@ sandboxTest('env vars per execution (R)', async ({ sandbox }) => { } ) - expect(result.results[0]?.text.trim()).toEqual(`[1] "bar"`) - expect(result_empty.results[0]?.text.trim()).toEqual(`[1] "default"`) + expect(result.results[0]?.text.trim()).toEqual('[1] "bar"') + expect(result_empty.results[0]?.text.trim()).toEqual('[1] "default"') }) sandboxTest.skipIf(isDebug)('env vars overwrite', async ({ template }) => { @@ -43,17 +43,22 @@ sandboxTest.skipIf(isDebug)('env vars overwrite', async ({ template }) => { }) try { - const result = await sandbox.runCode(`Sys.getenv("TEST_ENV_VAR")`, { + const result = await sandbox.runCode('Sys.getenv("TEST_ENV_VAR")', { language: 'r', envs: { TEST_ENV_VAR: 'overwrite' }, }) - const result_global_default = await sandbox.runCode(`Sys.getenv("TEST_ENV_VAR")`, { - language: 'r', - }) + const result_global_default = await sandbox.runCode( + 'Sys.getenv("TEST_ENV_VAR")', + { + language: 'r', + } + ) - expect(result.results[0]?.text.trim()).toEqual(`[1] "overwrite"`) - expect(result_global_default.results[0]?.text.trim()).toEqual(`[1] "supertest"`) + expect(result.results[0]?.text.trim()).toEqual('[1] "overwrite"') + expect(result_global_default.results[0]?.text.trim()).toEqual( + '[1] "supertest"' + ) } finally { await sandbox.kill() } diff --git a/js/tests/images/bar.test.ts b/js/tests/images/bar.test.ts index d8903b75..698b6655 100644 --- a/js/tests/images/bar.test.ts +++ b/js/tests/images/bar.test.ts @@ -37,9 +37,8 @@ sandboxTest('test image represent', async ({ sandbox }) => { expect(image).toBeDefined() }) - - sandboxTest('get image on save', async ({ sandbox }) => { - const code = ` +sandboxTest('get image on save', async ({ sandbox }) => { + const code = ` import numpy from PIL import Image @@ -49,8 +48,8 @@ sandboxTest('test image represent', async ({ sandbox }) => { image.save("test.png") ` - const execution = await sandbox.runCode(code) + const execution = await sandbox.runCode(code) - const image = execution.results[0].png - expect(image).toBeDefined() - }) + const image = execution.results[0].png + expect(image).toBeDefined() +}) diff --git a/js/tests/kernels.test.ts b/js/tests/kernels.test.ts index 810a9c23..b45c59db 100644 --- a/js/tests/kernels.test.ts +++ b/js/tests/kernels.test.ts @@ -16,5 +16,7 @@ sandboxTest('independence of kernels', async ({ sandbox }) => { sandboxTest('pass context and language', async ({ sandbox }) => { const context = await sandbox.createCodeContext() - await expect(sandbox.runCode({context, language: 'python'})).rejects.toThrowError() + await expect( + sandbox.runCode({ context, language: 'python' }) + ).rejects.toThrowError() }) diff --git a/js/tests/languages/deno.test.ts b/js/tests/languages/deno.test.ts index ee3588b6..a595f7a9 100644 --- a/js/tests/languages/deno.test.ts +++ b/js/tests/languages/deno.test.ts @@ -3,65 +3,82 @@ import { expect } from 'vitest' import { sandboxTest } from '../setup' sandboxTest.skip('js simple', async ({ sandbox }) => { - const result = await sandbox.runCode('console.log("Hello, World!")', { language: "deno" }) + const result = await sandbox.runCode('console.log("Hello, World!")', { + language: 'deno', + }) expect(result.logs.stdout.join().trim()).toEqual('Hello, World!') }) sandboxTest.skip('js import', async ({ sandbox }) => { - const result = await sandbox.runCode('import isOdd from "npm:is-odd"\nisOdd(3)', { language: "deno" }) + const result = await sandbox.runCode( + 'import isOdd from "npm:is-odd"\nisOdd(3)', + { language: 'deno' } + ) expect(result.results[0].text).toEqual('true') }) sandboxTest.skip('js top level await', async ({ sandbox }) => { - const result = await sandbox.runCode(` + const result = await sandbox.runCode( + ` async function main() { return 'Hello, World!' } await main() - `, { language: "deno" }) + `, + { language: 'deno' } + ) expect(result.results[0].text).toEqual('Hello, World!') }) sandboxTest.skip('js es6', async ({ sandbox }) => { - const result = await sandbox.runCode(` + const result = await sandbox.runCode( + ` const add = (x, y) => x + y; - add(1, 2)`, { language: "deno" }) + add(1, 2)`, + { language: 'deno' } + ) expect(result.results[0].text).toEqual('3') }) - sandboxTest.skip('js context', async ({ sandbox }) => { - await sandbox.runCode('const z = 1', { language: "deno" }) - const result = await sandbox.runCode('z', { language: "deno" }) + await sandbox.runCode('const z = 1', { language: 'deno' }) + const result = await sandbox.runCode('z', { language: 'deno' }) expect(result.results[0].text).toEqual('1') }) sandboxTest.skip('js cwd', async ({ sandbox }) => { - const result = await sandbox.runCode('process.cwd()', { language: "deno" }) + const result = await sandbox.runCode('process.cwd()', { language: 'deno' }) expect(result.results[0].text).toEqual('/home/user') - const ctx = await sandbox.createCodeContext({ cwd: '/home', language: "deno" }) + const ctx = await sandbox.createCodeContext({ + cwd: '/home', + language: 'deno', + }) const result2 = await sandbox.runCode('process.cwd()', { context: ctx }) expect(result2.results[0].text).toEqual('/home') }) sandboxTest.skip('ts simple', async ({ sandbox }) => { - const result = await sandbox.runCode(` + const result = await sandbox.runCode( + ` function subtract(x: number, y: number): number { return x - y; } subtract(1, 2) -`, { language: "deno" }) +`, + { language: 'deno' } + ) expect(result.results[0].text).toEqual('-1') }) sandboxTest.skip('test display', async ({ sandbox }) => { - const result = await sandbox.runCode(` + const result = await sandbox.runCode( + ` { [Symbol.for("Jupyter.display")]() { return { @@ -73,7 +90,9 @@ sandboxTest.skip('test display', async ({ sandbox }) => { } } } -`, { language: "deno" }) +`, + { language: 'deno' } + ) expect(result.results[0].html).toBe('

Hello world!

') expect(result.results[0].text).toBe('Hello world!') diff --git a/js/tests/runtimes/bun/run.test.ts b/js/tests/runtimes/bun/run.test.ts index 9138e022..71ee3e14 100644 --- a/js/tests/runtimes/bun/run.test.ts +++ b/js/tests/runtimes/bun/run.test.ts @@ -2,13 +2,17 @@ import { expect, test } from 'bun:test' import { Sandbox } from '../../../src' -test('Bun test', async () => { - const sbx = await Sandbox.create({ timeoutMs: 5_000 }) +test( + 'Bun test', + async () => { + const sbx = await Sandbox.create({ timeoutMs: 5_000 }) - try { - const result = await sbx.runCode('print("Hello, World!")') - expect(result.logs.stdout.join('')).toEqual('Hello, World!\n') - } finally { - await sbx.kill() - } -}, { timeout: 30_000 }) + try { + const result = await sbx.runCode('print("Hello, World!")') + expect(result.logs.stdout.join('')).toEqual('Hello, World!\n') + } finally { + await sbx.kill() + } + }, + { timeout: 30_000 } +) diff --git a/js/tests/setup.ts b/js/tests/setup.ts index f6ed8cf1..b11ce4fa 100644 --- a/js/tests/setup.ts +++ b/js/tests/setup.ts @@ -12,6 +12,7 @@ interface SandboxFixture { export const sandboxTest = base.extend({ sandbox: [ + // eslint-disable-next-line no-empty-pattern async ({}, use) => { const sandbox = await Sandbox.create(template, { timeoutMs, @@ -32,7 +33,7 @@ export const sandboxTest = base.extend({ }, { auto: true }, ], - template + template, }) export const isDebug = process.env.E2B_DEBUG !== undefined diff --git a/package.json b/package.json index 42c7b0d6..babe115c 100644 --- a/package.json +++ b/package.json @@ -4,13 +4,20 @@ "scripts": { "version": "changeset version && pnpm run -r postVersion", "publish": "changeset publish && pnpm run -r postPublish", - "rm-node-modules": "find . -name 'node_modules' -type d -prune -exec rm -rf '{}' +" + "rm-node-modules": "find . -name 'node_modules' -type d -prune -exec rm -rf '{}' +", + "lint": "pnpm --if-present --recursive run lint", + "format": "pnpm --if-present --recursive run format" }, - "packageManager": "pnpm@8.7.6", + "packageManager": "pnpm@9.15.5", "devDependencies": { "@changesets/cli": "^2.27.12", "@changesets/read": "^0.6.2", - "changeset": "^0.2.6" + "changeset": "^0.2.6", + "@typescript-eslint/eslint-plugin": "^6.7.2", + "@typescript-eslint/parser": "^6.7.2", + "eslint": "^8.57.1", + "eslint-plugin-unused-imports": "^3.0.0", + "@stylistic/eslint-plugin-ts": "^1.6.2" }, "engines": { "pnpm": ">=9.0.0 <10" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 5123dd42..388adb01 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -14,11 +14,36 @@ importers: '@changesets/read': specifier: ^0.6.2 version: 0.6.2 + '@stylistic/eslint-plugin-ts': + specifier: ^1.6.2 + version: 1.8.1(eslint@8.57.1)(typescript@5.7.3) + '@typescript-eslint/eslint-plugin': + specifier: ^6.7.2 + version: 6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.7.3))(eslint@8.57.1)(typescript@5.7.3) + '@typescript-eslint/parser': + specifier: ^6.7.2 + version: 6.21.0(eslint@8.57.1)(typescript@5.7.3) changeset: specifier: ^0.2.6 version: 0.2.6 - - chart_data_extractor: {} + eslint: + specifier: ^8.57.1 + version: 8.57.1 + eslint-plugin-unused-imports: + specifier: ^3.0.0 + version: 3.2.0(@typescript-eslint/eslint-plugin@6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.7.3))(eslint@8.57.1)(typescript@5.7.3))(eslint@8.57.1) + + chart_data_extractor: + devDependencies: + '@typescript-eslint/eslint-plugin': + specifier: ^7.11.0 + version: 7.18.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.7.3))(eslint@8.57.1)(typescript@5.7.3) + '@typescript-eslint/parser': + specifier: ^7.11.0 + version: 7.18.0(eslint@8.57.1)(typescript@5.7.3) + eslint: + specifier: ^8.57.1 + version: 8.57.1 js: dependencies: @@ -283,6 +308,37 @@ packages: cpu: [x64] os: [win32] + '@eslint-community/eslint-utils@4.7.0': + resolution: {integrity: sha512-dyybb3AcajC7uha6CvhdVRJqaKyn7w2YKqKyAN37NKYgZT36w+iRb0Dymmc5qEJ549c/S31cMMSFd75bteCpCw==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 + + '@eslint-community/regexpp@4.12.1': + resolution: {integrity: sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==} + engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} + + '@eslint/eslintrc@2.1.4': + resolution: {integrity: sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + + '@eslint/js@8.57.1': + resolution: {integrity: sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + + '@humanwhocodes/config-array@0.13.0': + resolution: {integrity: sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw==} + engines: {node: '>=10.10.0'} + deprecated: Use @eslint/config-array instead + + '@humanwhocodes/module-importer@1.0.1': + resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==} + engines: {node: '>=12.22'} + + '@humanwhocodes/object-schema@2.0.3': + resolution: {integrity: sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==} + deprecated: Use @eslint/object-schema instead + '@isaacs/cliui@8.0.2': resolution: {integrity: sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==} engines: {node: '>=12'} @@ -465,12 +521,30 @@ packages: engines: {node: '>=8.10'} hasBin: true + '@stylistic/eslint-plugin-js@1.8.1': + resolution: {integrity: sha512-c5c2C8Mos5tTQd+NWpqwEu7VT6SSRooAguFPMj1cp2RkTYl1ynKoXo8MWy3k4rkbzoeYHrqC2UlUzsroAN7wtQ==} + engines: {node: ^16.0.0 || >=18.0.0} + peerDependencies: + eslint: '>=8.40.0' + + '@stylistic/eslint-plugin-ts@1.8.1': + resolution: {integrity: sha512-/q1m+ZuO1JHfiSF16EATFzv7XSJkc5W6DocfvH5o9oB6WWYFMF77fVoBWnKT3wGptPOc2hkRupRKhmeFROdfWA==} + engines: {node: ^16.0.0 || >=18.0.0} + peerDependencies: + eslint: '>=8.40.0' + + '@types/eslint@8.56.12': + resolution: {integrity: sha512-03ruubjWyOHlmljCVoxSuNDdmfZDzsrrz0P2LeJsOXr+ZwFQ+0yQIwNCwt/GYhV7Z31fgtXJTAEs+FYlEL851g==} + '@types/estree@1.0.7': resolution: {integrity: sha512-w28IoSUCJpidD/TGviZwwMJckNESJZXFu7NBZ5YJ4mEUnNraUn9Pm8HSZm/jDF1pDWYKspWE7oVphigUPRakIQ==} '@types/hast@3.0.4': resolution: {integrity: sha512-WPs+bbQw5aCj+x6laNGWLH3wviHtoCv/P3+otBhbOhJgG8qtpdAMlTCxLtsTWA7LH1Oh/bFCHsBn0TPS5m30EQ==} + '@types/json-schema@7.0.15': + resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==} + '@types/mdast@4.0.4': resolution: {integrity: sha512-kGaNbPh1k7AFzgpud/gMdvIm5xuECykRR+JnWKQno9TAXVa6WIVCGTPvYGekIDL4uwCZQSYbUxNBSb1aUo79oA==} @@ -480,9 +554,128 @@ packages: '@types/node@18.19.75': resolution: {integrity: sha512-UIksWtThob6ZVSyxcOqCLOUNg/dyO1Qvx4McgeuhrEtHTLFTf7BBhEazaE4K806FGTPtzd/2sE90qn4fVr7cyw==} + '@types/semver@7.7.0': + resolution: {integrity: sha512-k107IF4+Xr7UHjwDc7Cfd6PRQfbdkiRabXGRjo07b4WyPahFBZCZ1sE+BNxYIJPPg73UkfOsVOLwqVc/6ETrIA==} + '@types/unist@3.0.3': resolution: {integrity: sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==} + '@typescript-eslint/eslint-plugin@6.21.0': + resolution: {integrity: sha512-oy9+hTPCUFpngkEZUSzbf9MxI65wbKFoQYsgPdILTfbUldp5ovUuphZVe4i30emU9M/kP+T64Di0mxl7dSw3MA==} + engines: {node: ^16.0.0 || >=18.0.0} + peerDependencies: + '@typescript-eslint/parser': ^6.0.0 || ^6.0.0-alpha + eslint: ^7.0.0 || ^8.0.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + + '@typescript-eslint/eslint-plugin@7.18.0': + resolution: {integrity: sha512-94EQTWZ40mzBc42ATNIBimBEDltSJ9RQHCC8vc/PDbxi4k8dVwUAv4o98dk50M1zB+JGFxp43FP7f8+FP8R6Sw==} + engines: {node: ^18.18.0 || >=20.0.0} + peerDependencies: + '@typescript-eslint/parser': ^7.0.0 + eslint: ^8.56.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + + '@typescript-eslint/parser@6.21.0': + resolution: {integrity: sha512-tbsV1jPne5CkFQCgPBcDOt30ItF7aJoZL997JSF7MhGQqOeT3svWRYxiqlfA5RUdlHN6Fi+EI9bxqbdyAUZjYQ==} + engines: {node: ^16.0.0 || >=18.0.0} + peerDependencies: + eslint: ^7.0.0 || ^8.0.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + + '@typescript-eslint/parser@7.18.0': + resolution: {integrity: sha512-4Z+L8I2OqhZV8qA132M4wNL30ypZGYOQVBfMgxDH/K5UX0PNqTu1c6za9ST5r9+tavvHiTWmBnKzpCJ/GlVFtg==} + engines: {node: ^18.18.0 || >=20.0.0} + peerDependencies: + eslint: ^8.56.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + + '@typescript-eslint/scope-manager@6.21.0': + resolution: {integrity: sha512-OwLUIWZJry80O99zvqXVEioyniJMa+d2GrqpUTqi5/v5D5rOrppJVBPa0yKCblcigC0/aYAzxxqQ1B+DS2RYsg==} + engines: {node: ^16.0.0 || >=18.0.0} + + '@typescript-eslint/scope-manager@7.18.0': + resolution: {integrity: sha512-jjhdIE/FPF2B7Z1uzc6i3oWKbGcHb87Qw7AWj6jmEqNOfDFbJWtjt/XfwCpvNkpGWlcJaog5vTR+VV8+w9JflA==} + engines: {node: ^18.18.0 || >=20.0.0} + + '@typescript-eslint/type-utils@6.21.0': + resolution: {integrity: sha512-rZQI7wHfao8qMX3Rd3xqeYSMCL3SoiSQLBATSiVKARdFGCYSRvmViieZjqc58jKgs8Y8i9YvVVhRbHSTA4VBag==} + engines: {node: ^16.0.0 || >=18.0.0} + peerDependencies: + eslint: ^7.0.0 || ^8.0.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + + '@typescript-eslint/type-utils@7.18.0': + resolution: {integrity: sha512-XL0FJXuCLaDuX2sYqZUUSOJ2sG5/i1AAze+axqmLnSkNEVMVYLF+cbwlB2w8D1tinFuSikHmFta+P+HOofrLeA==} + engines: {node: ^18.18.0 || >=20.0.0} + peerDependencies: + eslint: ^8.56.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + + '@typescript-eslint/types@6.21.0': + resolution: {integrity: sha512-1kFmZ1rOm5epu9NZEZm1kckCDGj5UJEf7P1kliH4LKu/RkwpsfqqGmY2OOcUs18lSlQBKLDYBOGxRVtrMN5lpg==} + engines: {node: ^16.0.0 || >=18.0.0} + + '@typescript-eslint/types@7.18.0': + resolution: {integrity: sha512-iZqi+Ds1y4EDYUtlOOC+aUmxnE9xS/yCigkjA7XpTKV6nCBd3Hp/PRGGmdwnfkV2ThMyYldP1wRpm/id99spTQ==} + engines: {node: ^18.18.0 || >=20.0.0} + + '@typescript-eslint/typescript-estree@6.21.0': + resolution: {integrity: sha512-6npJTkZcO+y2/kr+z0hc4HwNfrrP4kNYh57ek7yCNlrBjWQ1Y0OS7jiZTkgumrvkX5HkEKXFZkkdFNkaW2wmUQ==} + engines: {node: ^16.0.0 || >=18.0.0} + peerDependencies: + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + + '@typescript-eslint/typescript-estree@7.18.0': + resolution: {integrity: sha512-aP1v/BSPnnyhMHts8cf1qQ6Q1IFwwRvAQGRvBFkWlo3/lH29OXA3Pts+c10nxRxIBrDnoMqzhgdwVe5f2D6OzA==} + engines: {node: ^18.18.0 || >=20.0.0} + peerDependencies: + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + + '@typescript-eslint/utils@6.21.0': + resolution: {integrity: sha512-NfWVaC8HP9T8cbKQxHcsJBY5YE1O33+jpMwN45qzWWaPDZgLIbo12toGMWnmhvCpd3sIxkpDw3Wv1B3dYrbDQQ==} + engines: {node: ^16.0.0 || >=18.0.0} + peerDependencies: + eslint: ^7.0.0 || ^8.0.0 + + '@typescript-eslint/utils@7.18.0': + resolution: {integrity: sha512-kK0/rNa2j74XuHVcoCZxdFBMF+aq/vH83CXAOHieC+2Gis4mF8jJXT5eAfyD3K0sAxtPuwxaIOIOvhwzVDt/kw==} + engines: {node: ^18.18.0 || >=20.0.0} + peerDependencies: + eslint: ^8.56.0 + + '@typescript-eslint/visitor-keys@6.21.0': + resolution: {integrity: sha512-JJtkDduxLi9bivAB+cYOVMtbkqdPOhZ+ZI5LC47MIRrDV4Yn2o+ZnW10Nkmr28xRpSpdJ6Sm42Hjf2+REYXm0A==} + engines: {node: ^16.0.0 || >=18.0.0} + + '@typescript-eslint/visitor-keys@7.18.0': + resolution: {integrity: sha512-cDF0/Gf81QpY3xYyJKDV14Zwdmid5+uuENhjH2EqFaF0ni+yAyq/LzMaIJdhNJXZI7uLzwIlA+V7oWoyn6Curg==} + engines: {node: ^18.18.0 || >=20.0.0} + '@ungap/structured-clone@1.3.0': resolution: {integrity: sha512-WmoN8qaIAo7WTYWbAZuG8PYEhn5fkz7dZrqTBZ7dtt//lL2Gwms1IcnQ5yHqjDfX8Ft5j4YzDM23f87zBfDe9g==} @@ -515,10 +708,23 @@ packages: '@vitest/utils@3.1.1': resolution: {integrity: sha512-1XIjflyaU2k3HMArJ50bwSh3wKWPD6Q47wz/NUSmRV0zNywPc4w79ARjg/i/aNINHwA+mIALhUVqD9/aUvZNgg==} + acorn-jsx@5.3.2: + resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} + peerDependencies: + acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 + + acorn@8.15.0: + resolution: {integrity: sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==} + engines: {node: '>=0.4.0'} + hasBin: true + aggregate-error@3.1.0: resolution: {integrity: sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==} engines: {node: '>=8'} + ajv@6.12.6: + resolution: {integrity: sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==} + ansi-colors@4.1.3: resolution: {integrity: sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==} engines: {node: '>=6'} @@ -563,6 +769,9 @@ packages: resolution: {integrity: sha512-pbnl5XzGBdrFU/wT4jqmJVPn2B6UHPBOhzMQkY/SPUPB6QtUXtmBHBIwCbXJol93mOpGMnQyP/+BB19q04xj7g==} engines: {node: '>=4'} + brace-expansion@1.1.12: + resolution: {integrity: sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==} + brace-expansion@2.0.2: resolution: {integrity: sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==} @@ -580,6 +789,10 @@ packages: resolution: {integrity: sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==} engines: {node: '>=8'} + callsites@3.1.0: + resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} + engines: {node: '>=6'} + ccount@2.0.1: resolution: {integrity: sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg==} @@ -587,6 +800,10 @@ packages: resolution: {integrity: sha512-mCuXncKXk5iCLhfhwTc0izo0gtEmpz5CtG2y8GiOINBlMVS6v8TMRc5TaLWKS6692m9+dVVfzgeVxR5UxWHTYw==} engines: {node: '>=12'} + chalk@4.1.2: + resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} + engines: {node: '>=10'} + changeset@0.2.6: resolution: {integrity: sha512-d21ym9zLPOKMVhIa8ulJo5IV3QR2NNdK6BWuwg48qJA0XSQaMeDjo1UGThcTn7YDmU08j3UpKyFNvb3zplk8mw==} @@ -636,6 +853,9 @@ packages: compare-versions@6.1.0: resolution: {integrity: sha512-LNZQXhqUvqUTotpZ00qLSaify3b4VFD588aRr8MKFw4CMUr98ytzCW5wDH5qx/DEY5kCDXcbcRuCqL0szEf2tg==} + concat-map@0.0.1: + resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} + consola@3.4.0: resolution: {integrity: sha512-EiPU8G6dQG0GFHNR8ljnZFki/8a+cQwEQ+7wpxdChl02Q8HXlwEZWD5lqAF8vC2sEC3Tehr8hy7vErz88LHyUA==} engines: {node: ^14.18.0 || >=16.10.0} @@ -657,6 +877,9 @@ packages: resolution: {integrity: sha512-h5k/5U50IJJFpzfL6nO9jaaumfjO/f2NjK/oYB2Djzm4p9L+3T9qWpZqZ2hAbLPuuYq9wrU08WQyBTL5GbPk5Q==} engines: {node: '>=6'} + deep-is@0.1.4: + resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==} + defaults@1.0.4: resolution: {integrity: sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==} @@ -675,6 +898,10 @@ packages: resolution: {integrity: sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==} engines: {node: '>=8'} + doctrine@3.0.0: + resolution: {integrity: sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==} + engines: {node: '>=6.0.0'} + dotenv@16.4.7: resolution: {integrity: sha512-47qPchRCykZC03FhkYAhrvwU4xDBFIj1QPqaarj6mdM/hgUzfPHcpkHJOn3mJAufFeeAxAzeGsr5X0M4k6fLZQ==} engines: {node: '>=12'} @@ -718,14 +945,66 @@ packages: engines: {node: '>=18'} hasBin: true + escape-string-regexp@4.0.0: + resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} + engines: {node: '>=10'} + + eslint-plugin-unused-imports@3.2.0: + resolution: {integrity: sha512-6uXyn6xdINEpxE1MtDjxQsyXB37lfyO2yKGVVgtD7WEWQGORSOZjgrD6hBhvGv4/SO+TOlS+UnC6JppRqbuwGQ==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + '@typescript-eslint/eslint-plugin': 6 - 7 + eslint: '8' + peerDependenciesMeta: + '@typescript-eslint/eslint-plugin': + optional: true + + eslint-rule-composer@0.3.0: + resolution: {integrity: sha512-bt+Sh8CtDmn2OajxvNO+BX7Wn4CIWMpTRm3MaiKPCQcnnlm0CS2mhui6QaoeQugs+3Kj2ESKEEGJUdVafwhiCg==} + engines: {node: '>=4.0.0'} + + eslint-scope@7.2.2: + resolution: {integrity: sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + + eslint-visitor-keys@3.4.3: + resolution: {integrity: sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + + eslint@8.57.1: + resolution: {integrity: sha512-ypowyDxpVSYpkXr9WPv2PAZCtNip1Mv5KTW0SCurXv/9iOpcrH9PaqUElksqEB6pChqHGDRCFTyrZlGhnLNGiA==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + deprecated: This version is no longer supported. Please see https://eslint.org/version-support for other options. + hasBin: true + + espree@9.6.1: + resolution: {integrity: sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + esprima@4.0.1: resolution: {integrity: sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==} engines: {node: '>=4'} hasBin: true + esquery@1.6.0: + resolution: {integrity: sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==} + engines: {node: '>=0.10'} + + esrecurse@4.3.0: + resolution: {integrity: sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==} + engines: {node: '>=4.0'} + + estraverse@5.3.0: + resolution: {integrity: sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==} + engines: {node: '>=4.0'} + estree-walker@3.0.3: resolution: {integrity: sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==} + esutils@2.0.3: + resolution: {integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==} + engines: {node: '>=0.10.0'} + expect-type@1.2.1: resolution: {integrity: sha512-/kP8CAwxzLVEeFrMm4kMmy4CCDlpipyA7MYLVrdJIkV0fYF0UaigQHRsxHiuY/GEea+bh4KSv3TIlgr+2UL6bw==} engines: {node: '>=12.0.0'} @@ -737,10 +1016,19 @@ packages: resolution: {integrity: sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==} engines: {node: '>=4'} + fast-deep-equal@3.1.3: + resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} + fast-glob@3.3.3: resolution: {integrity: sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==} engines: {node: '>=8.6.0'} + fast-json-stable-stringify@2.1.0: + resolution: {integrity: sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==} + + fast-levenshtein@2.0.6: + resolution: {integrity: sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==} + fastq@1.19.0: resolution: {integrity: sha512-7SFSRCNjBQIZH/xZR3iy5iQYR8aGBE0h3VG6/cwlbrpdciNYBMotQav8c1XI3HjHH+NikUpP53nPdlZSdWmFzA==} @@ -752,6 +1040,10 @@ packages: picomatch: optional: true + file-entry-cache@6.0.1: + resolution: {integrity: sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==} + engines: {node: ^10.12.0 || >=12.0.0} + fill-range@7.1.1: resolution: {integrity: sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==} engines: {node: '>=8'} @@ -760,6 +1052,17 @@ packages: resolution: {integrity: sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==} engines: {node: '>=8'} + find-up@5.0.0: + resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==} + engines: {node: '>=10'} + + flat-cache@3.2.0: + resolution: {integrity: sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==} + engines: {node: ^10.12.0 || >=12.0.0} + + flatted@3.3.3: + resolution: {integrity: sha512-GX+ysw4PBCz0PzosHDepZGANEuFCMLrnRTiEy9McGjmkCQYwRq4A/X786G/fjM/+OjsWSU1ZrY5qyARZmO/uwg==} + foreground-child@3.1.1: resolution: {integrity: sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg==} engines: {node: '>=14'} @@ -772,6 +1075,9 @@ packages: resolution: {integrity: sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==} engines: {node: '>=6 <7 || >=8'} + fs.realpath@1.0.0: + resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==} + fsevents@2.3.3: resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} @@ -781,11 +1087,23 @@ packages: resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} engines: {node: '>= 6'} + glob-parent@6.0.2: + resolution: {integrity: sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==} + engines: {node: '>=10.13.0'} + glob@10.3.10: resolution: {integrity: sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g==} engines: {node: '>=16 || 14 >=14.17'} hasBin: true + glob@7.2.3: + resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==} + deprecated: Glob versions prior to v9 are no longer supported + + globals@13.24.0: + resolution: {integrity: sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==} + engines: {node: '>=8'} + globby@11.1.0: resolution: {integrity: sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==} engines: {node: '>=10'} @@ -793,6 +1111,13 @@ packages: graceful-fs@4.2.11: resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} + graphemer@1.4.0: + resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==} + + has-flag@4.0.0: + resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} + engines: {node: '>=8'} + hast-util-to-html@9.0.5: resolution: {integrity: sha512-OguPdidb+fbHQSU4Q4ZiLKnzWo8Wwsf5bZfbvu7//a9oTYoqD/fWpe96NuHkoS9h0ccGOTe0C4NGXdtS0iObOw==} @@ -813,10 +1138,25 @@ packages: resolution: {integrity: sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==} engines: {node: '>= 4'} + import-fresh@3.3.1: + resolution: {integrity: sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==} + engines: {node: '>=6'} + + imurmurhash@0.1.4: + resolution: {integrity: sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==} + engines: {node: '>=0.8.19'} + indent-string@4.0.0: resolution: {integrity: sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==} engines: {node: '>=8'} + inflight@1.0.6: + resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==} + deprecated: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful. + + inherits@2.0.4: + resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} + is-extglob@2.1.1: resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} engines: {node: '>=0.10.0'} @@ -833,6 +1173,10 @@ packages: resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} engines: {node: '>=0.12.0'} + is-path-inside@3.0.3: + resolution: {integrity: sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==} + engines: {node: '>=8'} + is-subdir@1.2.0: resolution: {integrity: sha512-2AT6j+gXe/1ueqbW6fLZJiIw3F8iXGJtt0yDrZaBhAZEG1raiTxKWU+IPqMCzQAXOUCKdA4UDMgacKH25XG2Cw==} engines: {node: '>=4'} @@ -864,9 +1208,21 @@ packages: resolution: {integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==} hasBin: true + json-buffer@3.0.1: + resolution: {integrity: sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==} + + json-schema-traverse@0.4.1: + resolution: {integrity: sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==} + + json-stable-stringify-without-jsonify@1.0.1: + resolution: {integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==} + jsonfile@4.0.0: resolution: {integrity: sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==} + keyv@4.5.4: + resolution: {integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==} + knip@5.43.6: resolution: {integrity: sha512-bUCFlg44imdV5vayYxu0pIAB373S8Ufjda0qaI9oRZDH6ltJFwUoAO2j7nafxDmo5G0ZeP4IiLAHqlc3wYIONQ==} engines: {node: '>=18.18.0'} @@ -875,6 +1231,10 @@ packages: '@types/node': '>=18' typescript: '>=5.0.4' + levn@0.4.1: + resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==} + engines: {node: '>= 0.8.0'} + lilconfig@3.1.2: resolution: {integrity: sha512-eop+wDAvpItUys0FWkHIKeC9ybYrTGbU41U5K7+bttZZeohvnY7M9dZ5kB21GNWiFT2q1OoPTvncPCgSOVO5ow==} engines: {node: '>=14'} @@ -893,6 +1253,13 @@ packages: resolution: {integrity: sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==} engines: {node: '>=8'} + locate-path@6.0.0: + resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==} + engines: {node: '>=10'} + + lodash.merge@4.6.2: + resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==} + lodash.sortby@4.7.0: resolution: {integrity: sha512-HDWXG8isMntAyRF5vZ7xKuEvOhT4AhlRt/3czTSjvGUxjYCBVRQY48ViDHyfYz9VIoBkW4TMGQNapx+l3RUwdA==} @@ -949,6 +1316,13 @@ packages: resolution: {integrity: sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==} engines: {node: '>=8.6'} + minimatch@3.1.2: + resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} + + minimatch@9.0.3: + resolution: {integrity: sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==} + engines: {node: '>=16 || 14 >=14.17'} + minimatch@9.0.5: resolution: {integrity: sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==} engines: {node: '>=16 || 14 >=14.17'} @@ -975,6 +1349,9 @@ packages: engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} hasBin: true + natural-compare@1.4.0: + resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} + npm-check-updates@17.1.14: resolution: {integrity: sha512-dr4bXIxETubLI1tFGeock5hN8yVjahvaVpx+lPO4/O2md3zJuxB7FgH3MIoTvQSCgsgkIRpe0skti01IEAA5tA==} engines: {node: ^18.18.0 || >=20.0.0, npm: '>=8.12.1'} @@ -984,6 +1361,9 @@ packages: resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==} engines: {node: '>=0.10.0'} + once@1.4.0: + resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} + oniguruma-to-es@2.3.0: resolution: {integrity: sha512-bwALDxriqfKGfUufKGGepCzu9x7nJQuoRoAFp4AnwehhC2crqrDIAP/uN2qdlsAvSMpeRC3+Yzhqc7hLmle5+g==} @@ -993,6 +1373,10 @@ packages: openapi-typescript-helpers@0.0.8: resolution: {integrity: sha512-1eNjQtbfNi5Z/kFhagDIaIRj6qqDzhjNJKz8cmMW0CVdGwT6e1GLbAfgI0d28VTJa1A8jz82jm/4dG8qNoNS8g==} + optionator@0.9.4: + resolution: {integrity: sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==} + engines: {node: '>= 0.8.0'} + os-tmpdir@1.0.2: resolution: {integrity: sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==} engines: {node: '>=0.10.0'} @@ -1008,10 +1392,18 @@ packages: resolution: {integrity: sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==} engines: {node: '>=6'} + p-limit@3.1.0: + resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==} + engines: {node: '>=10'} + p-locate@4.1.0: resolution: {integrity: sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==} engines: {node: '>=8'} + p-locate@5.0.0: + resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==} + engines: {node: '>=10'} + p-map@2.1.0: resolution: {integrity: sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw==} engines: {node: '>=6'} @@ -1027,6 +1419,10 @@ packages: package-manager-detector@0.2.9: resolution: {integrity: sha512-+vYvA/Y31l8Zk8dwxHhL3JfTuHPm6tlxM2A3GeQyl7ovYnSp1+mzAxClxaOr0qO1TtPxbQxetI7v5XqKLJZk7Q==} + parent-module@1.0.1: + resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==} + engines: {node: '>=6'} + parse-ms@4.0.0: resolution: {integrity: sha512-TXfryirbmq34y8QBwgqCVLi+8oA3oWx2eAnSn62ITyEhEYaWRlVZ2DvMM9eZbMs/RfxPu/PK/aBLyGj4IrqMHw==} engines: {node: '>=18'} @@ -1035,6 +1431,10 @@ packages: resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} engines: {node: '>=8'} + path-is-absolute@1.0.1: + resolution: {integrity: sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==} + engines: {node: '>=0.10.0'} + path-key@3.1.1: resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} engines: {node: '>=8'} @@ -1098,6 +1498,10 @@ packages: resolution: {integrity: sha512-dle9A3yYxlBSrt8Fu+IpjGT8SY8hN0mlaA6GY8t0P5PjIOZemULz/E2Bnm/2dcUOena75OTNkHI76uZBNUUq3A==} engines: {node: ^10 || ^12 || >=14} + prelude-ls@1.2.1: + resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} + engines: {node: '>= 0.8.0'} + prettier@2.8.8: resolution: {integrity: sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==} engines: {node: '>=10.13.0'} @@ -1138,6 +1542,10 @@ packages: regex@5.1.1: resolution: {integrity: sha512-dN5I359AVGPnwzJm2jN1k0W9LPZ+ePvoOeVMMfqIMFz53sSwXkxaJoxr50ptnsC771lK95BnTrVSZxq0b9yCGw==} + resolve-from@4.0.0: + resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==} + engines: {node: '>=4'} + resolve-from@5.0.0: resolution: {integrity: sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==} engines: {node: '>=8'} @@ -1146,6 +1554,11 @@ packages: resolution: {integrity: sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==} engines: {iojs: '>=1.0.0', node: '>=0.10.0'} + rimraf@3.0.2: + resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==} + deprecated: Rimraf versions prior to v4 are no longer supported + hasBin: true + rollup@4.39.0: resolution: {integrity: sha512-thI8kNc02yNvnmJp8dr3fNWJ9tCONDhp6TV35X6HkKGGs9E6q7YWCHbe5vKiTa7TAiNcFEmXKj3X/pG2b3ci0g==} engines: {node: '>=18.0.0', npm: '>=8.0.0'} @@ -1234,6 +1647,10 @@ packages: resolution: {integrity: sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==} engines: {node: '>=4'} + strip-json-comments@3.1.1: + resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} + engines: {node: '>=8'} + strip-json-comments@5.0.1: resolution: {integrity: sha512-0fk9zBqO67Nq5M/m45qHCJxylV/DhBlIOVExqgOMiCCrzrhU6tCibRXNqE3jwJLftzE9SNuZtYbpzcO+i9FiKw==} engines: {node: '>=14.16'} @@ -1246,6 +1663,10 @@ packages: summary@2.1.0: resolution: {integrity: sha512-nMIjMrd5Z2nuB2RZCKJfFMjgS3fygbeyGk9PxPPaJR1RIcyN9yn4A63Isovzm3ZtQuEkLBVgMdPup8UeLH7aQw==} + supports-color@7.2.0: + resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} + engines: {node: '>=8'} + tapable@2.2.1: resolution: {integrity: sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==} engines: {node: '>=6'} @@ -1254,6 +1675,9 @@ packages: resolution: {integrity: sha512-wK0Ri4fOGjv/XPy8SBHZChl8CM7uMc5VML7SqiQ0zG7+J5Vr+RMQDoHa2CNT6KHUnTGIXH34UDMkPzAUyapBZg==} engines: {node: '>=8'} + text-table@0.2.0: + resolution: {integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==} + thenify-all@1.6.0: resolution: {integrity: sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==} engines: {node: '>=0.8'} @@ -1301,6 +1725,12 @@ packages: trim-lines@3.0.1: resolution: {integrity: sha512-kRj8B+YHZCc9kQYdWfJB2/oUl9rA99qbowYYBtr4ui4mZyAQ2JpvVBd/6U2YloATfqBhBTSMhTpgBHtU0Mf3Rg==} + ts-api-utils@1.4.3: + resolution: {integrity: sha512-i3eMG77UTMD0hZhgRS562pv83RC6ukSAC2GMNWc+9dieh/+jDM5u5YG+NHX6VNDRHQcHwmsTHctP9LhbC3WxVw==} + engines: {node: '>=16'} + peerDependencies: + typescript: '>=4.2.0' + ts-interface-checker@0.1.13: resolution: {integrity: sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==} @@ -1323,6 +1753,14 @@ packages: typescript: optional: true + type-check@0.4.0: + resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} + engines: {node: '>= 0.8.0'} + + type-fest@0.20.2: + resolution: {integrity: sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==} + engines: {node: '>=10'} + typedoc-plugin-markdown@4.2.7: resolution: {integrity: sha512-bLsQdweSm48P9j6kGqQ3/4GCH5zu2EnURSkkxqirNc+uVFE9YK825ogDw+WbNkRHIV6eZK/1U43gT7YfglyYOg==} engines: {node: '>= 18'} @@ -1372,6 +1810,9 @@ packages: resolution: {integrity: sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==} engines: {node: '>= 4.0.0'} + uri-js@4.4.1: + resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} + vfile-message@4.0.2: resolution: {integrity: sha512-jRDZ1IMLttGj41KcZvlrYAaI3CfqpLpfpf+Mfig13viT6NKvRzWZ+lXz0Y5D60w6uJIBAOGq9mSHf0gktF0duw==} @@ -1470,6 +1911,10 @@ packages: engines: {node: '>=8'} hasBin: true + word-wrap@1.2.5: + resolution: {integrity: sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==} + engines: {node: '>=0.10.0'} + wrap-ansi@7.0.0: resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==} engines: {node: '>=10'} @@ -1478,6 +1923,9 @@ packages: resolution: {integrity: sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==} engines: {node: '>=12'} + wrappy@1.0.2: + resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} + yallist@4.0.0: resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==} @@ -1486,6 +1934,10 @@ packages: engines: {node: '>= 14'} hasBin: true + yocto-queue@0.1.0: + resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} + engines: {node: '>=10'} + zod-validation-error@3.3.0: resolution: {integrity: sha512-Syib9oumw1NTqEv4LT0e6U83Td9aVRk9iTXPUQr1otyV1PuXQKOvOwhMNqZIq5hluzHP2pMgnOmHEo7kPdI2mw==} engines: {node: '>=18.0.0'} @@ -1730,6 +2182,41 @@ snapshots: '@esbuild/win32-x64@0.25.0': optional: true + '@eslint-community/eslint-utils@4.7.0(eslint@8.57.1)': + dependencies: + eslint: 8.57.1 + eslint-visitor-keys: 3.4.3 + + '@eslint-community/regexpp@4.12.1': {} + + '@eslint/eslintrc@2.1.4': + dependencies: + ajv: 6.12.6 + debug: 4.4.0 + espree: 9.6.1 + globals: 13.24.0 + ignore: 5.3.1 + import-fresh: 3.3.1 + js-yaml: 4.1.0 + minimatch: 3.1.2 + strip-json-comments: 3.1.1 + transitivePeerDependencies: + - supports-color + + '@eslint/js@8.57.1': {} + + '@humanwhocodes/config-array@0.13.0': + dependencies: + '@humanwhocodes/object-schema': 2.0.3 + debug: 4.4.0 + minimatch: 3.1.2 + transitivePeerDependencies: + - supports-color + + '@humanwhocodes/module-importer@1.0.1': {} + + '@humanwhocodes/object-schema@2.0.3': {} + '@isaacs/cliui@8.0.2': dependencies: string-width: 5.1.2 @@ -1900,12 +2387,38 @@ snapshots: ignore: 5.3.1 p-map: 4.0.0 + '@stylistic/eslint-plugin-js@1.8.1(eslint@8.57.1)': + dependencies: + '@types/eslint': 8.56.12 + acorn: 8.15.0 + escape-string-regexp: 4.0.0 + eslint: 8.57.1 + eslint-visitor-keys: 3.4.3 + espree: 9.6.1 + + '@stylistic/eslint-plugin-ts@1.8.1(eslint@8.57.1)(typescript@5.7.3)': + dependencies: + '@stylistic/eslint-plugin-js': 1.8.1(eslint@8.57.1) + '@types/eslint': 8.56.12 + '@typescript-eslint/utils': 6.21.0(eslint@8.57.1)(typescript@5.7.3) + eslint: 8.57.1 + transitivePeerDependencies: + - supports-color + - typescript + + '@types/eslint@8.56.12': + dependencies: + '@types/estree': 1.0.7 + '@types/json-schema': 7.0.15 + '@types/estree@1.0.7': {} '@types/hast@3.0.4': dependencies: '@types/unist': 3.0.3 + '@types/json-schema@7.0.15': {} + '@types/mdast@4.0.4': dependencies: '@types/unist': 3.0.3 @@ -1916,8 +2429,177 @@ snapshots: dependencies: undici-types: 5.26.5 + '@types/semver@7.7.0': {} + '@types/unist@3.0.3': {} + '@typescript-eslint/eslint-plugin@6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.7.3))(eslint@8.57.1)(typescript@5.7.3)': + dependencies: + '@eslint-community/regexpp': 4.12.1 + '@typescript-eslint/parser': 6.21.0(eslint@8.57.1)(typescript@5.7.3) + '@typescript-eslint/scope-manager': 6.21.0 + '@typescript-eslint/type-utils': 6.21.0(eslint@8.57.1)(typescript@5.7.3) + '@typescript-eslint/utils': 6.21.0(eslint@8.57.1)(typescript@5.7.3) + '@typescript-eslint/visitor-keys': 6.21.0 + debug: 4.4.0 + eslint: 8.57.1 + graphemer: 1.4.0 + ignore: 5.3.1 + natural-compare: 1.4.0 + semver: 7.6.0 + ts-api-utils: 1.4.3(typescript@5.7.3) + optionalDependencies: + typescript: 5.7.3 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/eslint-plugin@7.18.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.7.3))(eslint@8.57.1)(typescript@5.7.3)': + dependencies: + '@eslint-community/regexpp': 4.12.1 + '@typescript-eslint/parser': 7.18.0(eslint@8.57.1)(typescript@5.7.3) + '@typescript-eslint/scope-manager': 7.18.0 + '@typescript-eslint/type-utils': 7.18.0(eslint@8.57.1)(typescript@5.7.3) + '@typescript-eslint/utils': 7.18.0(eslint@8.57.1)(typescript@5.7.3) + '@typescript-eslint/visitor-keys': 7.18.0 + eslint: 8.57.1 + graphemer: 1.4.0 + ignore: 5.3.1 + natural-compare: 1.4.0 + ts-api-utils: 1.4.3(typescript@5.7.3) + optionalDependencies: + typescript: 5.7.3 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.7.3)': + dependencies: + '@typescript-eslint/scope-manager': 6.21.0 + '@typescript-eslint/types': 6.21.0 + '@typescript-eslint/typescript-estree': 6.21.0(typescript@5.7.3) + '@typescript-eslint/visitor-keys': 6.21.0 + debug: 4.4.0 + eslint: 8.57.1 + optionalDependencies: + typescript: 5.7.3 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.7.3)': + dependencies: + '@typescript-eslint/scope-manager': 7.18.0 + '@typescript-eslint/types': 7.18.0 + '@typescript-eslint/typescript-estree': 7.18.0(typescript@5.7.3) + '@typescript-eslint/visitor-keys': 7.18.0 + debug: 4.4.0 + eslint: 8.57.1 + optionalDependencies: + typescript: 5.7.3 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/scope-manager@6.21.0': + dependencies: + '@typescript-eslint/types': 6.21.0 + '@typescript-eslint/visitor-keys': 6.21.0 + + '@typescript-eslint/scope-manager@7.18.0': + dependencies: + '@typescript-eslint/types': 7.18.0 + '@typescript-eslint/visitor-keys': 7.18.0 + + '@typescript-eslint/type-utils@6.21.0(eslint@8.57.1)(typescript@5.7.3)': + dependencies: + '@typescript-eslint/typescript-estree': 6.21.0(typescript@5.7.3) + '@typescript-eslint/utils': 6.21.0(eslint@8.57.1)(typescript@5.7.3) + debug: 4.4.0 + eslint: 8.57.1 + ts-api-utils: 1.4.3(typescript@5.7.3) + optionalDependencies: + typescript: 5.7.3 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/type-utils@7.18.0(eslint@8.57.1)(typescript@5.7.3)': + dependencies: + '@typescript-eslint/typescript-estree': 7.18.0(typescript@5.7.3) + '@typescript-eslint/utils': 7.18.0(eslint@8.57.1)(typescript@5.7.3) + debug: 4.4.0 + eslint: 8.57.1 + ts-api-utils: 1.4.3(typescript@5.7.3) + optionalDependencies: + typescript: 5.7.3 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/types@6.21.0': {} + + '@typescript-eslint/types@7.18.0': {} + + '@typescript-eslint/typescript-estree@6.21.0(typescript@5.7.3)': + dependencies: + '@typescript-eslint/types': 6.21.0 + '@typescript-eslint/visitor-keys': 6.21.0 + debug: 4.4.0 + globby: 11.1.0 + is-glob: 4.0.3 + minimatch: 9.0.3 + semver: 7.6.0 + ts-api-utils: 1.4.3(typescript@5.7.3) + optionalDependencies: + typescript: 5.7.3 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/typescript-estree@7.18.0(typescript@5.7.3)': + dependencies: + '@typescript-eslint/types': 7.18.0 + '@typescript-eslint/visitor-keys': 7.18.0 + debug: 4.4.0 + globby: 11.1.0 + is-glob: 4.0.3 + minimatch: 9.0.5 + semver: 7.6.0 + ts-api-utils: 1.4.3(typescript@5.7.3) + optionalDependencies: + typescript: 5.7.3 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/utils@6.21.0(eslint@8.57.1)(typescript@5.7.3)': + dependencies: + '@eslint-community/eslint-utils': 4.7.0(eslint@8.57.1) + '@types/json-schema': 7.0.15 + '@types/semver': 7.7.0 + '@typescript-eslint/scope-manager': 6.21.0 + '@typescript-eslint/types': 6.21.0 + '@typescript-eslint/typescript-estree': 6.21.0(typescript@5.7.3) + eslint: 8.57.1 + semver: 7.6.0 + transitivePeerDependencies: + - supports-color + - typescript + + '@typescript-eslint/utils@7.18.0(eslint@8.57.1)(typescript@5.7.3)': + dependencies: + '@eslint-community/eslint-utils': 4.7.0(eslint@8.57.1) + '@typescript-eslint/scope-manager': 7.18.0 + '@typescript-eslint/types': 7.18.0 + '@typescript-eslint/typescript-estree': 7.18.0(typescript@5.7.3) + eslint: 8.57.1 + transitivePeerDependencies: + - supports-color + - typescript + + '@typescript-eslint/visitor-keys@6.21.0': + dependencies: + '@typescript-eslint/types': 6.21.0 + eslint-visitor-keys: 3.4.3 + + '@typescript-eslint/visitor-keys@7.18.0': + dependencies: + '@typescript-eslint/types': 7.18.0 + eslint-visitor-keys: 3.4.3 + '@ungap/structured-clone@1.3.0': {} '@vitest/expect@3.1.1': @@ -1960,11 +2642,24 @@ snapshots: loupe: 3.1.3 tinyrainbow: 2.0.0 + acorn-jsx@5.3.2(acorn@8.15.0): + dependencies: + acorn: 8.15.0 + + acorn@8.15.0: {} + aggregate-error@3.1.0: dependencies: clean-stack: 2.2.0 indent-string: 4.0.0 + ajv@6.12.6: + dependencies: + fast-deep-equal: 3.1.3 + fast-json-stable-stringify: 2.1.0 + json-schema-traverse: 0.4.1 + uri-js: 4.4.1 + ansi-colors@4.1.3: {} ansi-regex@5.0.1: {} @@ -1995,6 +2690,11 @@ snapshots: dependencies: is-windows: 1.0.2 + brace-expansion@1.1.12: + dependencies: + balanced-match: 1.0.2 + concat-map: 0.0.1 + brace-expansion@2.0.2: dependencies: balanced-match: 1.0.2 @@ -2010,6 +2710,8 @@ snapshots: cac@6.7.14: {} + callsites@3.1.0: {} + ccount@2.0.1: {} chai@5.2.0: @@ -2020,6 +2722,11 @@ snapshots: loupe: 3.1.3 pathval: 2.0.0 + chalk@4.1.2: + dependencies: + ansi-styles: 4.3.0 + supports-color: 7.2.0 + changeset@0.2.6: dependencies: udc: 1.0.1 @@ -2056,6 +2763,8 @@ snapshots: compare-versions@6.1.0: {} + concat-map@0.0.1: {} + consola@3.4.0: {} cross-spawn@7.0.6: @@ -2070,6 +2779,8 @@ snapshots: deep-eql@5.0.2: {} + deep-is@0.1.4: {} + defaults@1.0.4: dependencies: clone: 1.0.4 @@ -2087,6 +2798,10 @@ snapshots: dependencies: path-type: 4.0.0 + doctrine@3.0.0: + dependencies: + esutils: 2.0.3 + dotenv@16.4.7: {} e2b@2.0.1: @@ -2154,12 +2869,91 @@ snapshots: '@esbuild/win32-ia32': 0.25.0 '@esbuild/win32-x64': 0.25.0 + escape-string-regexp@4.0.0: {} + + eslint-plugin-unused-imports@3.2.0(@typescript-eslint/eslint-plugin@6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.7.3))(eslint@8.57.1)(typescript@5.7.3))(eslint@8.57.1): + dependencies: + eslint: 8.57.1 + eslint-rule-composer: 0.3.0 + optionalDependencies: + '@typescript-eslint/eslint-plugin': 6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.7.3))(eslint@8.57.1)(typescript@5.7.3) + + eslint-rule-composer@0.3.0: {} + + eslint-scope@7.2.2: + dependencies: + esrecurse: 4.3.0 + estraverse: 5.3.0 + + eslint-visitor-keys@3.4.3: {} + + eslint@8.57.1: + dependencies: + '@eslint-community/eslint-utils': 4.7.0(eslint@8.57.1) + '@eslint-community/regexpp': 4.12.1 + '@eslint/eslintrc': 2.1.4 + '@eslint/js': 8.57.1 + '@humanwhocodes/config-array': 0.13.0 + '@humanwhocodes/module-importer': 1.0.1 + '@nodelib/fs.walk': 1.2.8 + '@ungap/structured-clone': 1.3.0 + ajv: 6.12.6 + chalk: 4.1.2 + cross-spawn: 7.0.6 + debug: 4.4.0 + doctrine: 3.0.0 + escape-string-regexp: 4.0.0 + eslint-scope: 7.2.2 + eslint-visitor-keys: 3.4.3 + espree: 9.6.1 + esquery: 1.6.0 + esutils: 2.0.3 + fast-deep-equal: 3.1.3 + file-entry-cache: 6.0.1 + find-up: 5.0.0 + glob-parent: 6.0.2 + globals: 13.24.0 + graphemer: 1.4.0 + ignore: 5.3.1 + imurmurhash: 0.1.4 + is-glob: 4.0.3 + is-path-inside: 3.0.3 + js-yaml: 4.1.0 + json-stable-stringify-without-jsonify: 1.0.1 + levn: 0.4.1 + lodash.merge: 4.6.2 + minimatch: 3.1.2 + natural-compare: 1.4.0 + optionator: 0.9.4 + strip-ansi: 6.0.1 + text-table: 0.2.0 + transitivePeerDependencies: + - supports-color + + espree@9.6.1: + dependencies: + acorn: 8.15.0 + acorn-jsx: 5.3.2(acorn@8.15.0) + eslint-visitor-keys: 3.4.3 + esprima@4.0.1: {} + esquery@1.6.0: + dependencies: + estraverse: 5.3.0 + + esrecurse@4.3.0: + dependencies: + estraverse: 5.3.0 + + estraverse@5.3.0: {} + estree-walker@3.0.3: dependencies: '@types/estree': 1.0.7 + esutils@2.0.3: {} + expect-type@1.2.1: {} extendable-error@0.1.7: {} @@ -2170,6 +2964,8 @@ snapshots: iconv-lite: 0.4.24 tmp: 0.0.33 + fast-deep-equal@3.1.3: {} + fast-glob@3.3.3: dependencies: '@nodelib/fs.stat': 2.0.5 @@ -2178,6 +2974,10 @@ snapshots: merge2: 1.4.1 micromatch: 4.0.8 + fast-json-stable-stringify@2.1.0: {} + + fast-levenshtein@2.0.6: {} + fastq@1.19.0: dependencies: reusify: 1.0.4 @@ -2186,6 +2986,10 @@ snapshots: optionalDependencies: picomatch: 4.0.2 + file-entry-cache@6.0.1: + dependencies: + flat-cache: 3.2.0 + fill-range@7.1.1: dependencies: to-regex-range: 5.0.1 @@ -2195,6 +2999,19 @@ snapshots: locate-path: 5.0.0 path-exists: 4.0.0 + find-up@5.0.0: + dependencies: + locate-path: 6.0.0 + path-exists: 4.0.0 + + flat-cache@3.2.0: + dependencies: + flatted: 3.3.3 + keyv: 4.5.4 + rimraf: 3.0.2 + + flatted@3.3.3: {} + foreground-child@3.1.1: dependencies: cross-spawn: 7.0.6 @@ -2212,6 +3029,8 @@ snapshots: jsonfile: 4.0.0 universalify: 0.1.2 + fs.realpath@1.0.0: {} + fsevents@2.3.3: optional: true @@ -2219,6 +3038,10 @@ snapshots: dependencies: is-glob: 4.0.3 + glob-parent@6.0.2: + dependencies: + is-glob: 4.0.3 + glob@10.3.10: dependencies: foreground-child: 3.1.1 @@ -2227,6 +3050,19 @@ snapshots: minipass: 7.0.4 path-scurry: 1.10.1 + glob@7.2.3: + dependencies: + fs.realpath: 1.0.0 + inflight: 1.0.6 + inherits: 2.0.4 + minimatch: 3.1.2 + once: 1.4.0 + path-is-absolute: 1.0.1 + + globals@13.24.0: + dependencies: + type-fest: 0.20.2 + globby@11.1.0: dependencies: array-union: 2.1.0 @@ -2238,6 +3074,10 @@ snapshots: graceful-fs@4.2.11: {} + graphemer@1.4.0: {} + + has-flag@4.0.0: {} + hast-util-to-html@9.0.5: dependencies: '@types/hast': 3.0.4 @@ -2266,8 +3106,22 @@ snapshots: ignore@5.3.1: {} + import-fresh@3.3.1: + dependencies: + parent-module: 1.0.1 + resolve-from: 4.0.0 + + imurmurhash@0.1.4: {} + indent-string@4.0.0: {} + inflight@1.0.6: + dependencies: + once: 1.4.0 + wrappy: 1.0.2 + + inherits@2.0.4: {} + is-extglob@2.1.1: {} is-fullwidth-code-point@3.0.0: {} @@ -2278,6 +3132,8 @@ snapshots: is-number@7.0.0: {} + is-path-inside@3.0.3: {} + is-subdir@1.2.0: dependencies: better-path-resolve: 1.0.0 @@ -2305,10 +3161,20 @@ snapshots: dependencies: argparse: 2.0.1 + json-buffer@3.0.1: {} + + json-schema-traverse@0.4.1: {} + + json-stable-stringify-without-jsonify@1.0.1: {} + jsonfile@4.0.0: optionalDependencies: graceful-fs: 4.2.11 + keyv@4.5.4: + dependencies: + json-buffer: 3.0.1 + knip@5.43.6(@types/node@18.19.75)(typescript@5.7.3): dependencies: '@nodelib/fs.walk': 3.0.1 @@ -2330,6 +3196,11 @@ snapshots: zod: 3.22.4 zod-validation-error: 3.3.0(zod@3.22.4) + levn@0.4.1: + dependencies: + prelude-ls: 1.2.1 + type-check: 0.4.0 + lilconfig@3.1.2: {} lines-and-columns@1.2.4: {} @@ -2344,6 +3215,12 @@ snapshots: dependencies: p-locate: 4.1.0 + locate-path@6.0.0: + dependencies: + p-locate: 5.0.0 + + lodash.merge@4.6.2: {} + lodash.sortby@4.7.0: {} lodash.startcase@4.4.0: {} @@ -2409,6 +3286,14 @@ snapshots: braces: 3.0.3 picomatch: 2.3.1 + minimatch@3.1.2: + dependencies: + brace-expansion: 1.1.12 + + minimatch@9.0.3: + dependencies: + brace-expansion: 2.0.2 + minimatch@9.0.5: dependencies: brace-expansion: 2.0.2 @@ -2429,10 +3314,16 @@ snapshots: nanoid@3.3.8: {} + natural-compare@1.4.0: {} + npm-check-updates@17.1.14: {} object-assign@4.1.1: {} + once@1.4.0: + dependencies: + wrappy: 1.0.2 + oniguruma-to-es@2.3.0: dependencies: emoji-regex-xs: 1.0.0 @@ -2445,6 +3336,15 @@ snapshots: openapi-typescript-helpers@0.0.8: {} + optionator@0.9.4: + dependencies: + deep-is: 0.1.4 + fast-levenshtein: 2.0.6 + levn: 0.4.1 + prelude-ls: 1.2.1 + type-check: 0.4.0 + word-wrap: 1.2.5 + os-tmpdir@1.0.2: {} outdent@0.5.0: {} @@ -2457,10 +3357,18 @@ snapshots: dependencies: p-try: 2.2.0 + p-limit@3.1.0: + dependencies: + yocto-queue: 0.1.0 + p-locate@4.1.0: dependencies: p-limit: 2.3.0 + p-locate@5.0.0: + dependencies: + p-limit: 3.1.0 + p-map@2.1.0: {} p-map@4.0.0: @@ -2471,10 +3379,16 @@ snapshots: package-manager-detector@0.2.9: {} + parent-module@1.0.1: + dependencies: + callsites: 3.1.0 + parse-ms@4.0.0: {} path-exists@4.0.0: {} + path-is-absolute@1.0.1: {} + path-key@3.1.1: {} path-scurry@1.10.1: @@ -2514,6 +3428,8 @@ snapshots: picocolors: 1.1.1 source-map-js: 1.2.1 + prelude-ls@1.2.1: {} + prettier@2.8.8: {} pretty-ms@9.0.0: @@ -2548,10 +3464,16 @@ snapshots: dependencies: regex-utilities: 2.3.0 + resolve-from@4.0.0: {} + resolve-from@5.0.0: {} reusify@1.0.4: {} + rimraf@3.0.2: + dependencies: + glob: 7.2.3 + rollup@4.39.0: dependencies: '@types/estree': 1.0.7 @@ -2659,6 +3581,8 @@ snapshots: strip-bom@3.0.0: {} + strip-json-comments@3.1.1: {} + strip-json-comments@5.0.1: {} sucrase@3.35.0: @@ -2673,10 +3597,16 @@ snapshots: summary@2.1.0: {} + supports-color@7.2.0: + dependencies: + has-flag: 4.0.0 + tapable@2.2.1: {} term-size@2.2.1: {} + text-table@0.2.0: {} + thenify-all@1.6.0: dependencies: thenify: 3.3.1 @@ -2716,6 +3646,10 @@ snapshots: trim-lines@3.0.1: {} + ts-api-utils@1.4.3(typescript@5.7.3): + dependencies: + typescript: 5.7.3 + ts-interface-checker@0.1.13: {} tsup@8.4.0(jiti@2.4.2)(postcss@8.5.3)(typescript@5.7.3)(yaml@2.7.0): @@ -2745,6 +3679,12 @@ snapshots: - tsx - yaml + type-check@0.4.0: + dependencies: + prelude-ls: 1.2.1 + + type-fest@0.20.2: {} + typedoc-plugin-markdown@4.2.7(typedoc@0.26.8(typescript@5.7.3)): dependencies: typedoc: 0.26.8(typescript@5.7.3) @@ -2793,6 +3733,10 @@ snapshots: universalify@0.1.2: {} + uri-js@4.4.1: + dependencies: + punycode: 2.3.1 + vfile-message@4.0.2: dependencies: '@types/unist': 3.0.3 @@ -2895,6 +3839,8 @@ snapshots: siginfo: 2.0.0 stackback: 0.0.2 + word-wrap@1.2.5: {} + wrap-ansi@7.0.0: dependencies: ansi-styles: 4.3.0 @@ -2907,10 +3853,14 @@ snapshots: string-width: 5.1.2 strip-ansi: 7.1.0 + wrappy@1.0.2: {} + yallist@4.0.0: {} yaml@2.7.0: {} + yocto-queue@0.1.0: {} + zod-validation-error@3.3.0(zod@3.22.4): dependencies: zod: 3.22.4 diff --git a/python/async_example.py b/python/async_example.py index a4df65a9..0f7dd78b 100644 --- a/python/async_example.py +++ b/python/async_example.py @@ -47,7 +47,7 @@ async def create_sbx(sbx, i: int): await asyncio.sleep(i * 0.01) - return (await sbx.run_code(f"os.getenv('TEST')", envs={"TEST": str(i)})).text + return (await sbx.run_code("os.getenv('TEST')", envs={"TEST": str(i)})).text async def run(): diff --git a/python/e2b_code_interpreter/code_interpreter_async.py b/python/e2b_code_interpreter/code_interpreter_async.py index 7821eaef..02c3e99a 100644 --- a/python/e2b_code_interpreter/code_interpreter_async.py +++ b/python/e2b_code_interpreter/code_interpreter_async.py @@ -204,7 +204,6 @@ async def run_code( headers={"X-Access-Token": self._envd_access_token}, timeout=(request_timeout, timeout, request_timeout, request_timeout), ) as response: - err = await aextract_exception(response) if err: raise err diff --git a/python/e2b_code_interpreter/exceptions.py b/python/e2b_code_interpreter/exceptions.py index 8d4da0d6..61896921 100644 --- a/python/e2b_code_interpreter/exceptions.py +++ b/python/e2b_code_interpreter/exceptions.py @@ -3,11 +3,11 @@ def format_request_timeout_error() -> Exception: return TimeoutException( - f"Request timed out — the 'request_timeout' option can be used to increase this timeout", + "Request timed out — the 'request_timeout' option can be used to increase this timeout", ) def format_execution_timeout_error() -> Exception: return TimeoutException( - f"Execution timed out — the 'timeout' option can be used to increase this timeout", + "Execution timed out — the 'timeout' option can be used to increase this timeout", ) diff --git a/python/package.json b/python/package.json index 39f5b70b..73445e9e 100644 --- a/python/package.json +++ b/python/package.json @@ -2,7 +2,7 @@ "name": "@e2b/code-interpreter-python", "private": true, "version": "2.0.0", - "packageManager": "pnpm@8.7.6", + "packageManager": "pnpm@9.15.5", "scripts": { "test": "poetry run pytest -n 4 --verbose -x", "example": "poetry run python3 example.py", @@ -10,6 +10,8 @@ "postVersion": "poetry version $(pnpm pkg get version --workspaces=false | tr -d \\\")", "postPublish": "poetry build && poetry config pypi-token.pypi ${PYPI_TOKEN} && poetry publish --skip-existing", "pretest": "poetry install", - "generate-ref": "poetry install && ./scripts/generate_sdk_ref.sh" + "generate-ref": "poetry install && ./scripts/generate_sdk_ref.sh", + "lint": "poetry run ruff check .", + "format": "poetry run ruff format ." } } diff --git a/python/poetry.lock b/python/poetry.lock index 12ef5869..4454f38d 100644 --- a/python/poetry.lock +++ b/python/poetry.lock @@ -1527,6 +1527,34 @@ urllib3 = ">=1.21.1,<3" socks = ["PySocks (>=1.5.6,!=1.5.7)"] use-chardet-on-py3 = ["chardet (>=3.0.2,<6)"] +[[package]] +name = "ruff" +version = "0.11.13" +description = "An extremely fast Python linter and code formatter, written in Rust." +optional = false +python-versions = ">=3.7" +groups = ["dev"] +files = [ + {file = "ruff-0.11.13-py3-none-linux_armv6l.whl", hash = "sha256:4bdfbf1240533f40042ec00c9e09a3aade6f8c10b6414cf11b519488d2635d46"}, + {file = "ruff-0.11.13-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:aef9c9ed1b5ca28bb15c7eac83b8670cf3b20b478195bd49c8d756ba0a36cf48"}, + {file = "ruff-0.11.13-py3-none-macosx_11_0_arm64.whl", hash = "sha256:53b15a9dfdce029c842e9a5aebc3855e9ab7771395979ff85b7c1dedb53ddc2b"}, + {file = "ruff-0.11.13-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ab153241400789138d13f362c43f7edecc0edfffce2afa6a68434000ecd8f69a"}, + {file = "ruff-0.11.13-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:6c51f93029d54a910d3d24f7dd0bb909e31b6cd989a5e4ac513f4eb41629f0dc"}, + {file = "ruff-0.11.13-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1808b3ed53e1a777c2ef733aca9051dc9bf7c99b26ece15cb59a0320fbdbd629"}, + {file = "ruff-0.11.13-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:d28ce58b5ecf0f43c1b71edffabe6ed7f245d5336b17805803312ec9bc665933"}, + {file = "ruff-0.11.13-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:55e4bc3a77842da33c16d55b32c6cac1ec5fb0fbec9c8c513bdce76c4f922165"}, + {file = "ruff-0.11.13-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:633bf2c6f35678c56ec73189ba6fa19ff1c5e4807a78bf60ef487b9dd272cc71"}, + {file = "ruff-0.11.13-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4ffbc82d70424b275b089166310448051afdc6e914fdab90e08df66c43bb5ca9"}, + {file = "ruff-0.11.13-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:4a9ddd3ec62a9a89578c85842b836e4ac832d4a2e0bfaad3b02243f930ceafcc"}, + {file = "ruff-0.11.13-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:d237a496e0778d719efb05058c64d28b757c77824e04ffe8796c7436e26712b7"}, + {file = "ruff-0.11.13-py3-none-musllinux_1_2_i686.whl", hash = "sha256:26816a218ca6ef02142343fd24c70f7cd8c5aa6c203bca284407adf675984432"}, + {file = "ruff-0.11.13-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:51c3f95abd9331dc5b87c47ac7f376db5616041173826dfd556cfe3d4977f492"}, + {file = "ruff-0.11.13-py3-none-win32.whl", hash = "sha256:96c27935418e4e8e77a26bb05962817f28b8ef3843a6c6cc49d8783b5507f250"}, + {file = "ruff-0.11.13-py3-none-win_amd64.whl", hash = "sha256:29c3189895a8a6a657b7af4e97d330c8a3afd2c9c8f46c81e2fc5a31866517e3"}, + {file = "ruff-0.11.13-py3-none-win_arm64.whl", hash = "sha256:b4385285e9179d608ff1d2fb9922062663c658605819a6876d8beef0c30b7f3b"}, + {file = "ruff-0.11.13.tar.gz", hash = "sha256:26fa247dc68d1d4e72c179e08889a25ac0c7ba4d78aecfc835d49cbfd60bf514"}, +] + [[package]] name = "setuptools" version = "78.1.1" @@ -1805,4 +1833,4 @@ type = ["pytest-mypy"] [metadata] lock-version = "2.1" python-versions = "^3.9" -content-hash = "12b33617f4e9b7c089143e4e179c810f98d7f97a465ef7013bd7bf6777306fc8" +content-hash = "c327b7c1391aa1fe74d57cca0f797ee783fe7bf5826b62a2cd6e023bb53d2369" diff --git a/python/pyproject.toml b/python/pyproject.toml index 7c3e9943..4997d706 100644 --- a/python/pyproject.toml +++ b/python/pyproject.toml @@ -22,9 +22,10 @@ python-dotenv = "^1.0.0" pytest-dotenv = "^0.5.2" pytest-asyncio = "^0.23.7" pytest-xdist = "^3.6.1" -black = "23.12.1" pydoc-markdown = "^4.8.2" matplotlib = "^3.8.0" +ruff = "^0.11.12" + [build-system] requires = ["poetry-core"] @@ -32,3 +33,6 @@ build-backend = "poetry.core.masonry.api" [tool.poetry.urls] "Bug Tracker" = "https://github.com/e2b-dev/code-interpreter/issues" + +[tool.ruff.lint] +ignore = ["F401", "F403"] \ No newline at end of file diff --git a/python/tests/async/env_vars/test_bash.py b/python/tests/async/env_vars/test_bash.py index a40bd54c..b94563f9 100644 --- a/python/tests/async/env_vars/test_bash.py +++ b/python/tests/async/env_vars/test_bash.py @@ -1,45 +1,41 @@ import pytest from e2b_code_interpreter.code_interpreter_async import AsyncSandbox + @pytest.mark.skip_debug() async def test_env_vars_on_sandbox(template): - sandbox = await AsyncSandbox.create(template=template, envs={"TEST_ENV_VAR": "supertest"}) + sandbox = await AsyncSandbox.create( + template=template, envs={"TEST_ENV_VAR": "supertest"} + ) try: - result = await sandbox.run_code( - "echo $TEST_ENV_VAR", - language="bash" - ) + result = await sandbox.run_code("echo $TEST_ENV_VAR", language="bash") assert result.logs.stdout[0] == "supertest\n" finally: await sandbox.kill() + async def test_env_vars_per_execution(async_sandbox: AsyncSandbox): result = await async_sandbox.run_code( - "echo $FOO", - envs={"FOO": "bar"}, - language="bash" + "echo $FOO", envs={"FOO": "bar"}, language="bash" ) - - result_empty = await async_sandbox.run_code( - "echo ${FOO:-default}", - language="bash" - ) - + + result_empty = await async_sandbox.run_code("echo ${FOO:-default}", language="bash") + assert result.logs.stdout[0] == "bar\n" assert result_empty.logs.stdout[0] == "default\n" + @pytest.mark.skip_debug() async def test_env_vars_overwrite(template): - sandbox = await AsyncSandbox.create(template=template, envs={"TEST_ENV_VAR": "supertest"}) + sandbox = await AsyncSandbox.create( + template=template, envs={"TEST_ENV_VAR": "supertest"} + ) try: result = await sandbox.run_code( - "echo $TEST_ENV_VAR", - language="bash", - envs={"TEST_ENV_VAR": "overwrite"} + "echo $TEST_ENV_VAR", language="bash", envs={"TEST_ENV_VAR": "overwrite"} ) result_global_default = await sandbox.run_code( - "echo $TEST_ENV_VAR", - language="bash" + "echo $TEST_ENV_VAR", language="bash" ) assert result.logs.stdout[0] == "overwrite\n" assert result_global_default.logs.stdout[0] == "supertest\n" diff --git a/python/tests/async/env_vars/test_java.py b/python/tests/async/env_vars/test_java.py index 79dc7ecc..d33517c8 100644 --- a/python/tests/async/env_vars/test_java.py +++ b/python/tests/async/env_vars/test_java.py @@ -1,48 +1,50 @@ import pytest from e2b_code_interpreter.code_interpreter_async import AsyncSandbox + @pytest.mark.skip_debug() async def test_env_vars_on_sandbox(template): - sandbox = await AsyncSandbox.create(template=template, envs={"TEST_ENV_VAR": "supertest"}) + sandbox = await AsyncSandbox.create( + template=template, envs={"TEST_ENV_VAR": "supertest"} + ) try: result = await sandbox.run_code( - 'System.getProperty("TEST_ENV_VAR")', - language="java" + 'System.getProperty("TEST_ENV_VAR")', language="java" ) assert result.text is not None assert result.text.strip() == "supertest" finally: await sandbox.kill() + async def test_env_vars_per_execution(async_sandbox: AsyncSandbox): result = await async_sandbox.run_code( - 'System.getProperty("FOO")', - envs={"FOO": "bar"}, - language="java" + 'System.getProperty("FOO")', envs={"FOO": "bar"}, language="java" ) - + result_empty = await async_sandbox.run_code( - 'System.getProperty("FOO", "default")', - language="java" + 'System.getProperty("FOO", "default")', language="java" ) - + assert result.text is not None assert result.text.strip() == "bar" assert result_empty.text is not None assert result_empty.text.strip() == "default" + @pytest.mark.skip_debug() async def test_env_vars_overwrite(template): - sandbox = await AsyncSandbox.create(template=template, envs={"TEST_ENV_VAR": "supertest"}) + sandbox = await AsyncSandbox.create( + template=template, envs={"TEST_ENV_VAR": "supertest"} + ) try: result = await sandbox.run_code( 'System.getProperty("TEST_ENV_VAR")', language="java", - envs={"TEST_ENV_VAR": "overwrite"} + envs={"TEST_ENV_VAR": "overwrite"}, ) result_global_default = await sandbox.run_code( - 'System.getProperty("TEST_ENV_VAR")', - language="java" + 'System.getProperty("TEST_ENV_VAR")', language="java" ) assert result.text is not None assert result.text.strip() == "overwrite" diff --git a/python/tests/async/env_vars/test_js.py b/python/tests/async/env_vars/test_js.py index a8c67943..3fa21f27 100644 --- a/python/tests/async/env_vars/test_js.py +++ b/python/tests/async/env_vars/test_js.py @@ -1,48 +1,50 @@ import pytest from e2b_code_interpreter.code_interpreter_async import AsyncSandbox + @pytest.mark.skip_debug() async def test_env_vars_on_sandbox(template): - sandbox = await AsyncSandbox.create(template=template, envs={"TEST_ENV_VAR": "supertest"}) + sandbox = await AsyncSandbox.create( + template=template, envs={"TEST_ENV_VAR": "supertest"} + ) try: result = await sandbox.run_code( - "process.env.TEST_ENV_VAR", - language="javascript" + "process.env.TEST_ENV_VAR", language="javascript" ) assert result.text is not None assert result.text.strip() == "supertest" finally: await sandbox.kill() + async def test_env_vars_per_execution(async_sandbox: AsyncSandbox): result = await async_sandbox.run_code( - "process.env.FOO", - envs={"FOO": "bar"}, - language="javascript" + "process.env.FOO", envs={"FOO": "bar"}, language="javascript" ) - + result_empty = await async_sandbox.run_code( - "process.env.FOO || 'default'", - language="javascript" + "process.env.FOO || 'default'", language="javascript" ) - + assert result.text is not None assert result.text.strip() == "bar" assert result_empty.text is not None assert result_empty.text.strip() == "default" + @pytest.mark.skip_debug() async def test_env_vars_overwrite(template): - sandbox = await AsyncSandbox.create(template=template, envs={"TEST_ENV_VAR": "supertest"}) + sandbox = await AsyncSandbox.create( + template=template, envs={"TEST_ENV_VAR": "supertest"} + ) try: result = await sandbox.run_code( "process.env.TEST_ENV_VAR", language="javascript", - envs={"TEST_ENV_VAR": "overwrite"} + envs={"TEST_ENV_VAR": "overwrite"}, ) result_global_default = await sandbox.run_code( - "process.env.TEST_ENV_VAR", - language="javascript" + "process.env.TEST_ENV_VAR", language="javascript" ) assert result.text is not None assert result.text.strip() == "overwrite" diff --git a/python/tests/async/env_vars/test_python.py b/python/tests/async/env_vars/test_python.py index bf13983b..3173efc9 100644 --- a/python/tests/async/env_vars/test_python.py +++ b/python/tests/async/env_vars/test_python.py @@ -1,48 +1,50 @@ import pytest from e2b_code_interpreter.code_interpreter_async import AsyncSandbox + @pytest.mark.skip_debug() async def test_env_vars_on_sandbox(template): - sandbox = await AsyncSandbox.create(template=template, envs={"TEST_ENV_VAR": "supertest"}) + sandbox = await AsyncSandbox.create( + template=template, envs={"TEST_ENV_VAR": "supertest"} + ) try: result = await sandbox.run_code( - "import os; os.getenv('TEST_ENV_VAR')", - language="python" + "import os; os.getenv('TEST_ENV_VAR')", language="python" ) assert result.text is not None assert result.text.strip() == "supertest" finally: await sandbox.kill() + async def test_env_vars_per_execution(async_sandbox: AsyncSandbox): result = await async_sandbox.run_code( - "import os; os.getenv('FOO')", - envs={"FOO": "bar"}, - language="python" - ) + "import os; os.getenv('FOO')", envs={"FOO": "bar"}, language="python" + ) result_empty = await async_sandbox.run_code( - "import os; os.getenv('FOO', 'default')", - language="python" + "import os; os.getenv('FOO', 'default')", language="python" ) - + assert result.text is not None assert result.text.strip() == "bar" assert result_empty.text is not None assert result_empty.text.strip() == "default" + @pytest.mark.skip_debug() async def test_env_vars_overwrite(template): - sandbox = await AsyncSandbox.create(template=template, envs={"TEST_ENV_VAR": "supertest"}) + sandbox = await AsyncSandbox.create( + template=template, envs={"TEST_ENV_VAR": "supertest"} + ) try: result = await sandbox.run_code( "import os; os.getenv('TEST_ENV_VAR')", language="python", - envs={"TEST_ENV_VAR": "overwrite"} + envs={"TEST_ENV_VAR": "overwrite"}, ) result_global_default = await sandbox.run_code( - "import os; os.getenv('TEST_ENV_VAR')", - language="python" + "import os; os.getenv('TEST_ENV_VAR')", language="python" ) assert result.text is not None assert result.text.strip() == "overwrite" diff --git a/python/tests/async/env_vars/test_r.py b/python/tests/async/env_vars/test_r.py index 4d1a98d5..6ba95651 100644 --- a/python/tests/async/env_vars/test_r.py +++ b/python/tests/async/env_vars/test_r.py @@ -1,48 +1,48 @@ import pytest from e2b_code_interpreter.code_interpreter_async import AsyncSandbox + @pytest.mark.skip_debug() async def test_env_vars_on_sandbox(template): - sandbox = await AsyncSandbox.create(template=template, envs={"TEST_ENV_VAR": "supertest"}) + sandbox = await AsyncSandbox.create( + template=template, envs={"TEST_ENV_VAR": "supertest"} + ) try: - result = await sandbox.run_code( - 'Sys.getenv("TEST_ENV_VAR")', - language="r" - ) + result = await sandbox.run_code('Sys.getenv("TEST_ENV_VAR")', language="r") assert result.results[0].text is not None assert result.results[0].text.strip() == '[1] "supertest"' finally: await sandbox.kill() + async def test_env_vars_per_execution(async_sandbox: AsyncSandbox): result = await async_sandbox.run_code( - 'Sys.getenv("FOO")', - envs={"FOO": "bar"}, - language="r" + 'Sys.getenv("FOO")', envs={"FOO": "bar"}, language="r" ) - + result_empty = await async_sandbox.run_code( - 'Sys.getenv("FOO", unset = "default")', - language="r" + 'Sys.getenv("FOO", unset = "default")', language="r" ) - + assert result.results[0].text is not None assert result.results[0].text.strip() == '[1] "bar"' assert result_empty.results[0].text is not None assert result_empty.results[0].text.strip() == '[1] "default"' + @pytest.mark.skip_debug() async def test_env_vars_overwrite(template): - sandbox = await AsyncSandbox.create(template=template, envs={"TEST_ENV_VAR": "supertest"}) + sandbox = await AsyncSandbox.create( + template=template, envs={"TEST_ENV_VAR": "supertest"} + ) try: result = await sandbox.run_code( 'Sys.getenv("TEST_ENV_VAR")', language="r", - envs={"TEST_ENV_VAR": "overwrite"} + envs={"TEST_ENV_VAR": "overwrite"}, ) result_global_default = await sandbox.run_code( - 'Sys.getenv("TEST_ENV_VAR")', - language="r" + 'Sys.getenv("TEST_ENV_VAR")', language="r" ) assert result.results[0].text is not None assert result.results[0].text.strip() == '[1] "overwrite"' diff --git a/python/tests/async/test_async_default_kernels.py b/python/tests/async/test_async_default_kernels.py index 23b01b35..b2df1dca 100644 --- a/python/tests/async/test_async_default_kernels.py +++ b/python/tests/async/test_async_default_kernels.py @@ -7,18 +7,25 @@ async def test_js_kernel(async_sandbox: AsyncSandbox): ) assert execution.logs.stdout == ["Hello, World!\n"] + async def test_js_esm_imports(async_sandbox: AsyncSandbox): - execution = await async_sandbox.run_code(""" + execution = await async_sandbox.run_code( + """ import { readFileSync } from 'fs' console.log(typeof readFileSync) - """, language="js") + """, + language="js", + ) assert execution.logs.stdout == ["function\n"] async def test_js_top_level_await(async_sandbox: AsyncSandbox): - execution = await async_sandbox.run_code(""" + execution = await async_sandbox.run_code( + """ await Promise.resolve('Hello World!') - """, language="js") + """, + language="js", + ) assert execution.text == "Hello World!" diff --git a/python/tests/charts/test_log_chart.py b/python/tests/charts/test_log_chart.py index 285085e8..e74c9ec5 100644 --- a/python/tests/charts/test_log_chart.py +++ b/python/tests/charts/test_log_chart.py @@ -41,7 +41,7 @@ async def test_log_chart(async_sandbox: AsyncSandbox): assert chart.x_label == "X-axis" assert chart.y_label == "Y-axis (log scale)" - assert chart.x_unit == None + assert chart.x_unit is None assert chart.y_unit == "log scale" assert chart.x_scale == "linear" diff --git a/python/tests/conftest.py b/python/tests/conftest.py index 544f2ca5..3c046928 100644 --- a/python/tests/conftest.py +++ b/python/tests/conftest.py @@ -24,7 +24,7 @@ def sandbox(template, debug): finally: try: sandbox.kill() - except: + except: # noqa: E722 if not debug: warning( "Failed to kill sandbox — this is expected if the test runs with local envd." @@ -40,7 +40,7 @@ async def async_sandbox(template, debug): finally: try: await async_sandbox.kill() - except: + except: # noqa: E722 if not debug: warning( "Failed to kill sandbox — this is expected if the test runs with local envd." diff --git a/python/tests/performance.py b/python/tests/performance.py index 32ae8a95..dbaf99ac 100644 --- a/python/tests/performance.py +++ b/python/tests/performance.py @@ -83,7 +83,7 @@ def create_performance_plot( second_code_run_times, ): """Create and save a performance visualization plot.""" - print(f"\nGenerating performance plot...") + print("\nGenerating performance plot...") fig, (ax1, ax2) = plt.subplots(2, 1, figsize=(12, 10)) # Plot 1: All metrics over iterations @@ -140,7 +140,7 @@ def create_performance_plot( ) ax1.legend() ax1.grid(True, alpha=0.3) - + # Set x-axis to show each iteration step ax1.set_xticks(iterations) ax1.set_xlim(0.5, iterations_count + 0.5) @@ -187,7 +187,7 @@ def create_performance_plot( ) # Save the plot - plot_filename = f"performance_plot.png" + plot_filename = "performance_plot.png" plt.savefig(plot_filename, dpi=300, bbox_inches="tight") print(f"Performance plot saved as: {plot_filename}") diff --git a/python/tests/sync/test_default_kernels.py b/python/tests/sync/test_default_kernels.py index 998a39e8..8dfd4bf9 100644 --- a/python/tests/sync/test_default_kernels.py +++ b/python/tests/sync/test_default_kernels.py @@ -21,22 +21,29 @@ def test_java_kernel(sandbox: Sandbox): def test_js_esm_imports(sandbox: Sandbox): - execution = sandbox.run_code(""" + execution = sandbox.run_code( + """ import { readFileSync } from 'fs' console.log(typeof readFileSync) - """, language="js") + """, + language="js", + ) assert execution.logs.stdout == ["function\n"] def test_js_top_level_await(sandbox: Sandbox): - execution = sandbox.run_code(""" + execution = sandbox.run_code( + """ await Promise.resolve('Hello World!') - """, language="js") + """, + language="js", + ) assert execution.text == "Hello World!" @pytest.mark.skip_debug() def test_ts_kernel(sandbox: Sandbox): - execution = sandbox.run_code("const message: string = 'Hello, World!'; console.log(message)", language="ts") + execution = sandbox.run_code( + "const message: string = 'Hello, World!'; console.log(message)", language="ts" + ) assert execution.logs.stdout == ["Hello, World!\n"] - diff --git a/template/package.json b/template/package.json index f446dd7e..48ca7bfd 100644 --- a/template/package.json +++ b/template/package.json @@ -1,5 +1,9 @@ { "name": "@e2b/code-interpreter-template", "private": true, - "version": "0.1.0" + "version": "0.1.0", + "scripts": { + "lint": "ruff check .", + "format": "ruff format ." + } } diff --git a/template/server/contexts.py b/template/server/contexts.py index d078dc6e..773f3fa8 100644 --- a/template/server/contexts.py +++ b/template/server/contexts.py @@ -11,12 +11,14 @@ logger = logging.Logger(__name__) + def get_kernel_for_language(language: str) -> str: if language == "typescript": return "javascript" return language + def normalize_language(language: Optional[str]) -> str: if not language: return "python" @@ -61,7 +63,7 @@ async def create_context(client, websockets: dict, language: str, cwd: str) -> C logger.info(f"Setting working directory to {cwd}") try: await ws.change_current_directory(cwd, language) - except ExecutionError as e: + except ExecutionError: return PlainTextResponse( "Failed to set working directory", status_code=500, diff --git a/template/server/main.py b/template/server/main.py index 917c87ab..ea89a9d8 100644 --- a/template/server/main.py +++ b/template/server/main.py @@ -121,7 +121,7 @@ async def post_execute(request: Request, exec_request: ExecutionRequest): @app.post("/contexts") async def post_contexts(request: CreateContext) -> Context: - logger.info(f"Creating a new context") + logger.info("Creating a new context") language = normalize_language(request.language) cwd = request.cwd or "/home/user" @@ -134,7 +134,7 @@ async def post_contexts(request: CreateContext) -> Context: @app.get("/contexts") async def get_contexts() -> Set[Context]: - logger.info(f"Listing contexts") + logger.info("Listing contexts") context_ids = websockets.keys() @@ -197,7 +197,7 @@ async def remove_context(context_id: str) -> None: try: await ws.close() - except: + except: # noqa: E722 pass response = await client.delete(f"{JUPYTER_BASE_URL}/api/kernels/{ws.context_id}") diff --git a/template/startup_scripts/0002_data.py b/template/startup_scripts/0002_data.py index 52168f95..1f621904 100644 --- a/template/startup_scripts/0002_data.py +++ b/template/startup_scripts/0002_data.py @@ -15,7 +15,7 @@ def _figure_repr_e2b_chart_(self: Figure): # Get all Axes objects from the Figure try: return chart_figure_to_dict(self) - except: + except: # noqa: E722 return {}