From 5792db84b9cda93be239b86ad4d654cf14a1ef5f Mon Sep 17 00:00:00 2001 From: Razvan Deaconescu Date: Sun, 2 Feb 2025 16:40:51 +0200 Subject: [PATCH 1/4] feat(examples): Introduce Chromium CDP Introduce Chromium running as a browser service using CDP (Chrome DevTools Protocol). It uses Node Playwright to start the browser and the Node `http-proxy` module to proxy websocket communication. Add: * `Kraftfile`: build / run rules * `Dockerfile`: placeholder to extract the filesystem * `package.json` / `package-lock.json`: Node package requirements * `server.js`: Node-based websocket proxy * `wrapper.sh`: helper script to start the Node proxy service (and the browser) * `README.md`: document how to use * `.dockerignore` / `.gitignore`: ignore generated files * `test/`: CDP test client (in Python using Playwright) Signed-off-by: Razvan Deaconescu --- chromium-cdp/.dockerignore | 3 + chromium-cdp/.gitignore | 3 + chromium-cdp/Dockerfile | 241 ++++++++++ chromium-cdp/Kraftfile | 12 + chromium-cdp/README.md | 21 + chromium-cdp/package-lock.json | 227 +++++++++ chromium-cdp/package.json | 8 + chromium-cdp/proxy.js | 60 +++ chromium-cdp/test/.gitignore | 2 + chromium-cdp/test/README.md | 18 + chromium-cdp/test/cdp-screenshot.py | 48 ++ chromium-cdp/test/poetry.lock | 693 ++++++++++++++++++++++++++++ chromium-cdp/test/pyproject.toml | 18 + chromium-cdp/wrapper.sh | 7 + 14 files changed, 1361 insertions(+) create mode 100644 chromium-cdp/.dockerignore create mode 100644 chromium-cdp/.gitignore create mode 100644 chromium-cdp/Dockerfile create mode 100644 chromium-cdp/Kraftfile create mode 100644 chromium-cdp/README.md create mode 100644 chromium-cdp/package-lock.json create mode 100644 chromium-cdp/package.json create mode 100644 chromium-cdp/proxy.js create mode 100644 chromium-cdp/test/.gitignore create mode 100644 chromium-cdp/test/README.md create mode 100644 chromium-cdp/test/cdp-screenshot.py create mode 100644 chromium-cdp/test/poetry.lock create mode 100644 chromium-cdp/test/pyproject.toml create mode 100755 chromium-cdp/wrapper.sh diff --git a/chromium-cdp/.dockerignore b/chromium-cdp/.dockerignore new file mode 100644 index 00000000..6690cae7 --- /dev/null +++ b/chromium-cdp/.dockerignore @@ -0,0 +1,3 @@ +/node_modules/ +/.unikraft/ +/*.png diff --git a/chromium-cdp/.gitignore b/chromium-cdp/.gitignore new file mode 100644 index 00000000..6690cae7 --- /dev/null +++ b/chromium-cdp/.gitignore @@ -0,0 +1,3 @@ +/node_modules/ +/.unikraft/ +/*.png diff --git a/chromium-cdp/Dockerfile b/chromium-cdp/Dockerfile new file mode 100644 index 00000000..57a92802 --- /dev/null +++ b/chromium-cdp/Dockerfile @@ -0,0 +1,241 @@ +FROM debian:bookworm AS build + +ARG NODE_VERSION=22.8.0 + +RUN set -xe; \ + apt-get -yqq update; \ + apt-get -yqq install \ + libcups2 \ + libnss3 \ + libatk1.0-0 \ + libnspr4 \ + libpango1.0-0 \ + libasound2 \ + libatspi2.0-0 \ + libxdamage1 \ + libatk-bridge2.0-0 \ + libxkbcommon0 \ + libdrm2 \ + libxcomposite1 \ + libxfixes3 \ + libxrandr2 \ + libgbm1; \ + apt-get -yqq install \ + ca-certificates \ + curl \ + build-essential \ + libssl-dev \ + git \ + ; + +RUN set -xe; \ + curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh | bash; \ + . ~/.bashrc; \ + nvm install ${NODE_VERSION} \ + ; + +WORKDIR /app +COPY package* . + +RUN set -xe; \ + . ~/.bashrc; \ + npm install \ + ; + +# Strip some binaries +RUN cd /root/.cache/ms-playwright/chromium-*/chrome-linux; \ + strip chrome \ + chrome_crashpad_handler \ + chrome_sandbox \ + chrome-wrapper \ + libEGL.so \ + libGLESv2.so \ + libvk_swiftshader.so \ + libvulkan.so.1 \ + xdg-mime \ + xdg-settings \ + ; \ + cd /root/.cache/ms-playwright/chromium_headless_shell-*/chrome-linux; \ + strip chrome \ + headless_shell \ + libEGL.so \ + libGLESv2.so \ + libvk_swiftshader.so \ + libvulkan.so.1 \ + ; \ + strip /root/.nvm/versions/node/v${NODE_VERSION}/bin/node \ + ; + +RUN mkdir /home/tmp + +FROM scratch + +ARG NODE_VERSION=22.8.0 + +# Create required directories. +COPY --from=build /home/tmp /tmp + +# Chrome binary +COPY --from=build /root/.cache/ms-playwright /root/.cache/ms-playwright + +# Chrome libraries +COPY --from=build /lib/x86_64-linux-gnu/libdl.so.2 \ + /lib/x86_64-linux-gnu/libpthread.so.0 \ + /lib/x86_64-linux-gnu/libgobject-2.0.so.0 \ + /lib/x86_64-linux-gnu/libglib-2.0.so.0 \ + /lib/x86_64-linux-gnu/libnss3.so \ + /lib/x86_64-linux-gnu/libnssutil3.so \ + /lib/x86_64-linux-gnu/libsmime3.so \ + /lib/x86_64-linux-gnu/libnspr4.so \ + /lib/x86_64-linux-gnu/libatk-1.0.so.0 \ + /lib/x86_64-linux-gnu/libatk-bridge-2.0.so.0 \ + /lib/x86_64-linux-gnu/libcups.so.2 \ + /lib/x86_64-linux-gnu/libgio-2.0.so.0 \ + /lib/x86_64-linux-gnu/libdrm.so.2 \ + /lib/x86_64-linux-gnu/libdbus-1.so.3 \ + /lib/x86_64-linux-gnu/libexpat.so.1 \ + /lib/x86_64-linux-gnu/libxcb.so.1 \ + /lib/x86_64-linux-gnu/libxkbcommon.so.0 \ + /lib/x86_64-linux-gnu/libatspi.so.0 \ + /lib/x86_64-linux-gnu/libm.so.6 \ + /lib/x86_64-linux-gnu/libX11.so.6 \ + /lib/x86_64-linux-gnu/libXcomposite.so.1 \ + /lib/x86_64-linux-gnu/libXdamage.so.1 \ + /lib/x86_64-linux-gnu/libXext.so.6 \ + /lib/x86_64-linux-gnu/libXfixes.so.3 \ + /lib/x86_64-linux-gnu/libXrandr.so.2 \ + /lib/x86_64-linux-gnu/libgbm.so.1 \ + /lib/x86_64-linux-gnu/libpango-1.0.so.0 \ + /lib/x86_64-linux-gnu/libcairo.so.2 \ + /lib/x86_64-linux-gnu/libasound.so.2 \ + /lib/x86_64-linux-gnu/libgcc_s.so.1 \ + /lib/x86_64-linux-gnu/libc.so.6 \ + /lib/x86_64-linux-gnu/libffi.so.8 \ + /lib/x86_64-linux-gnu/libpcre2-8.so.0 \ + /lib/x86_64-linux-gnu/libplc4.so \ + /lib/x86_64-linux-gnu/libplds4.so \ + /lib/x86_64-linux-gnu/libgssapi_krb5.so.2 \ + /lib/x86_64-linux-gnu/libavahi-common.so.3 \ + /lib/x86_64-linux-gnu/libavahi-client.so.3 \ + /lib/x86_64-linux-gnu/libgnutls.so.30 \ + /lib/x86_64-linux-gnu/libz.so.1 \ + /lib/x86_64-linux-gnu/libgmodule-2.0.so.0 \ + /lib/x86_64-linux-gnu/libmount.so.1 \ + /lib/x86_64-linux-gnu/libselinux.so.1 \ + /lib/x86_64-linux-gnu/libsystemd.so.0 \ + /lib/x86_64-linux-gnu/libXau.so.6 \ + /lib/x86_64-linux-gnu/libXdmcp.so.6 \ + /lib/x86_64-linux-gnu/libXi.so.6 \ + /lib/x86_64-linux-gnu/libXrender.so.1 \ + /lib/x86_64-linux-gnu/libwayland-server.so.0 \ + /lib/x86_64-linux-gnu/libfribidi.so.0 \ + /lib/x86_64-linux-gnu/libthai.so.0 \ + /lib/x86_64-linux-gnu/libharfbuzz.so.0 \ + /lib/x86_64-linux-gnu/libpixman-1.so.0 \ + /lib/x86_64-linux-gnu/libfontconfig.so.1 \ + /lib/x86_64-linux-gnu/libfreetype.so.6 \ + /lib/x86_64-linux-gnu/libpng16.so.16 \ + /lib/x86_64-linux-gnu/libxcb-shm.so.0 \ + /lib/x86_64-linux-gnu/libxcb-render.so.0 \ + /lib/x86_64-linux-gnu/libkrb5.so.3 \ + /lib/x86_64-linux-gnu/libk5crypto.so.3 \ + /lib/x86_64-linux-gnu/libcom_err.so.2 \ + /lib/x86_64-linux-gnu/libkrb5support.so.0 \ + /lib/x86_64-linux-gnu/libp11-kit.so.0 \ + /lib/x86_64-linux-gnu/libidn2.so.0 \ + /lib/x86_64-linux-gnu/libunistring.so.2 \ + /lib/x86_64-linux-gnu/libtasn1.so.6 \ + /lib/x86_64-linux-gnu/libnettle.so.8 \ + /lib/x86_64-linux-gnu/libhogweed.so.6 \ + /lib/x86_64-linux-gnu/libgmp.so.10 \ + /lib/x86_64-linux-gnu/libblkid.so.1 \ + /lib/x86_64-linux-gnu/libcap.so.2 \ + /lib/x86_64-linux-gnu/libgcrypt.so.20 \ + /lib/x86_64-linux-gnu/liblzma.so.5 \ + /lib/x86_64-linux-gnu/libzstd.so.1 \ + /lib/x86_64-linux-gnu/liblz4.so.1 \ + /lib/x86_64-linux-gnu/libbsd.so.0 \ + /lib/x86_64-linux-gnu/libdatrie.so.1 \ + /lib/x86_64-linux-gnu/libgraphite2.so.3 \ + /lib/x86_64-linux-gnu/libbrotlidec.so.1 \ + /lib/x86_64-linux-gnu/libkeyutils.so.1 \ + /lib/x86_64-linux-gnu/libresolv.so.2 \ + /lib/x86_64-linux-gnu/libgpg-error.so.0 \ + /lib/x86_64-linux-gnu/libmd.so.0 \ + /lib/x86_64-linux-gnu/libbrotlicommon.so.1 \ + /lib/x86_64-linux-gnu/libXcomposite.so.1 \ + /lib/x86_64-linux-gnu/libXfixes.so.3 \ + /lib/x86_64-linux-gnu/libXrandr.so.2 \ + /lib/x86_64-linux-gnu/libgbm.so.1 \ + /lib/x86_64-linux-gnu/ + +# Other Chrome-related libraries +COPY --from=build /usr/lib/x86_64-linux-gnu/libsoftokn3.so \ + /usr/lib/x86_64-linux-gnu/libsqlite3.so.0 \ + /usr/lib/x86_64-linux-gnu/libudev.so.1 \ + /usr/lib/x86_64-linux-gnu/libfreebl3.so \ + /usr/lib/x86_64-linux-gnu/libfreeblpriv3.so \ + /usr/lib/x86_64-linux-gnu/libudev.so.1.7.5 \ + /usr/lib/x86_64-linux-gnu/ + +# Node binary +COPY --from=build /root/.nvm/versions/node/v${NODE_VERSION}/bin/node /usr/bin/node + +# System libraries +COPY --from=build /lib/x86_64-linux-gnu/libc.so.6 \ + /lib/x86_64-linux-gnu/libz.so.1 \ + /lib/x86_64-linux-gnu/libbrotlidec.so.1 \ + /lib/x86_64-linux-gnu/libbrotlienc.so.1 \ + /lib/x86_64-linux-gnu/libnghttp2.so.14 \ + /lib/x86_64-linux-gnu/libcrypto.so.3 \ + /lib/x86_64-linux-gnu/libssl.so.3 \ + /lib/x86_64-linux-gnu/libicui18n.so.72 \ + /lib/x86_64-linux-gnu/libicuuc.so.72 \ + /lib/x86_64-linux-gnu/libstdc++.so.6 \ + /lib/x86_64-linux-gnu/libm.so.6 \ + /lib/x86_64-linux-gnu/libgcc_s.so.1 \ + /lib/x86_64-linux-gnu/libpthread.so.0 \ + /lib/x86_64-linux-gnu/libdl.so.2 \ + /lib/x86_64-linux-gnu/libbrotlicommon.so.1 \ + /lib/x86_64-linux-gnu/libicudata.so.72 \ + /lib/x86_64-linux-gnu/librt.so.1 \ + /lib/x86_64-linux-gnu/libtinfo.so.6 \ + /lib/x86_64-linux-gnu/libproc2.so.0 \ + /lib/x86_64-linux-gnu/ + +COPY --from=build /lib64/ld-linux-x86-64.so.2 /lib64/ld-linux-x86-64.so.2 +COPY --from=build /etc/ld.so.cache /etc/ld.so.cache + +# Dbus and system files +COPY --from=build /usr/lib/dbus-1.0 /usr/lib/dbus-1.0 +COPY --from=build /usr/lib/systemd /usr/lib/systemd +COPY --from=build /usr/lib/tmpfiles.d /usr/lib/tmpfiles.d +COPY --from=build /usr/lib/sysusers.d /usr/lib/sysusers.d +COPY --from=build /usr/lib/sysctl.d /usr/lib/sysctl.d + +# Data files +COPY --from=build /usr/share/fonts /usr/share/fonts + +COPY --from=build /run /run + +# Distro definition +COPY --from=build /etc/os-release /etc/os-release +COPY --from=build /usr/lib/os-release /usr/lib/os-release + +# Configuration files +COPY --from=build /etc /etc + +# Required by wrapper script +COPY --from=build /bin/sh /bin/sh + +# Required by Playwright / Chrome +COPY --from=build /usr/bin/ps /usr/bin/ps + +# Node application, including Playwright. +COPY --from=build /app /app + +# Actual server implementation +COPY ./proxy.js /app/proxy.js + +# Wrapper script set environment +COPY ./wrapper.sh /usr/bin/wrapper.sh diff --git a/chromium-cdp/Kraftfile b/chromium-cdp/Kraftfile new file mode 100644 index 00000000..74e4ec13 --- /dev/null +++ b/chromium-cdp/Kraftfile @@ -0,0 +1,12 @@ +spec: v0.6 + +runtime: base-compat:latest + +labels: + cloud.unikraft.v1.instances/scale_to_zero.policy: "idle" + cloud.unikraft.v1.instances/scale_to_zero.stateful: "true" + cloud.unikraft.v1.instances/scale_to_zero.cooldown_time_ms: 1000 + +rootfs: ./Dockerfile + +cmd: ["/usr/bin/wrapper.sh", "/usr/bin/node", "/app/proxy.js"] diff --git a/chromium-cdp/README.md b/chromium-cdp/README.md new file mode 100644 index 00000000..f33a696c --- /dev/null +++ b/chromium-cdp/README.md @@ -0,0 +1,21 @@ +# Run Chromium (with CDP) on Unikraft Cloud + +Run Chromium as a browser server, exposing a [CDP (Chrome DevTools Protocol)](https://chromedevtools.github.io/devtools-protocol/) websocket interface. +To run Chromium on Unikraft Cloud, first [install the `kraft` CLI tool](https://unikraft.org/docs/cli). +Then clone this repository and `cd` into this directory, and invoke: + +```console +kraft cloud deploy -M 4096 -p 443:8080 . +``` + +The command will deploy the files in the current directory. +It results in the creation of a remote web-based browser service. + +To query the service you need to use a CDP client. +You can use the Python-based implementation in the `test/` directory. + +## Learn more + +- [CDP Documentation](https://chromedevtools.github.io/devtools-protocol/) +- [Unikraft Cloud's Documentation](https://unikraft.cloud/docs/) +- [Building `Dockerfile` Images with `Buildkit`](https://unikraft.org/guides/building-dockerfile-images-with-buildkit) diff --git a/chromium-cdp/package-lock.json b/chromium-cdp/package-lock.json new file mode 100644 index 00000000..9fd4ed7f --- /dev/null +++ b/chromium-cdp/package-lock.json @@ -0,0 +1,227 @@ +{ + "name": "chromium-cdp", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "dependencies": { + "http-proxy": "^1.18.1", + "node-http-proxy-json": "^0.1.9", + "playwright": "^1.47.0", + "playwright-chromium": "^1.47.0" + } + }, + "node_modules/buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", + "license": "MIT" + }, + "node_modules/bufferhelper": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/bufferhelper/-/bufferhelper-0.2.1.tgz", + "integrity": "sha512-asncN5SO1YOZLCV3u26XtrbF9QXhSyq01nQOc1TFt9/gfOn7feOGJoVKk5Ewtj7wvFGPH/eGSKZ5qq/A4/PPfw==", + "license": "MIT", + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/concat-stream": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", + "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", + "engines": [ + "node >= 0.8" + ], + "license": "MIT", + "dependencies": { + "buffer-from": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^2.2.2", + "typedarray": "^0.0.6" + } + }, + "node_modules/core-util-is": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", + "license": "MIT" + }, + "node_modules/eventemitter3": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz", + "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==", + "license": "MIT" + }, + "node_modules/follow-redirects": { + "version": "1.15.9", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.9.tgz", + "integrity": "sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ==", + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], + "license": "MIT", + "engines": { + "node": ">=4.0" + }, + "peerDependenciesMeta": { + "debug": { + "optional": true + } + } + }, + "node_modules/fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/http-proxy": { + "version": "1.18.1", + "resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.18.1.tgz", + "integrity": "sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ==", + "license": "MIT", + "dependencies": { + "eventemitter3": "^4.0.0", + "follow-redirects": "^1.0.0", + "requires-port": "^1.0.0" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "license": "ISC" + }, + "node_modules/isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", + "license": "MIT" + }, + "node_modules/node-http-proxy-json": { + "version": "0.1.9", + "resolved": "https://registry.npmjs.org/node-http-proxy-json/-/node-http-proxy-json-0.1.9.tgz", + "integrity": "sha512-WrKAR/y09BWaz5WqgbxuE6D/XsdhQFkLkSdnRk0a5uBKSINtApMV085MN7JMh+stiyBBltvgSR9SYVIZIpKKKQ==", + "license": "MIT", + "dependencies": { + "bufferhelper": "^0.2.1", + "concat-stream": "^1.5.1" + } + }, + "node_modules/playwright": { + "version": "1.50.1", + "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.50.1.tgz", + "integrity": "sha512-G8rwsOQJ63XG6BbKj2w5rHeavFjy5zynBA9zsJMMtBoe/Uf757oG12NXz6e6OirF7RCrTVAKFXbLmn1RbL7Qaw==", + "license": "Apache-2.0", + "dependencies": { + "playwright-core": "1.50.1" + }, + "bin": { + "playwright": "cli.js" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "fsevents": "2.3.2" + } + }, + "node_modules/playwright-chromium": { + "version": "1.50.1", + "resolved": "https://registry.npmjs.org/playwright-chromium/-/playwright-chromium-1.50.1.tgz", + "integrity": "sha512-0IKyCdwS5dDoGE3EqqfYtX24qF6+ef1UI6OLn2VUi2aHOgsI/KnESRm6/Ws0W78SrwhLi6lLlAL6fQISoO1cfw==", + "hasInstallScript": true, + "license": "Apache-2.0", + "dependencies": { + "playwright-core": "1.50.1" + }, + "bin": { + "playwright": "cli.js" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/playwright-core": { + "version": "1.50.1", + "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.50.1.tgz", + "integrity": "sha512-ra9fsNWayuYumt+NiM069M6OkcRb1FZSK8bgi66AtpFoWkg2+y0bJSNmkFrWhMbEBbVKC/EruAHH3g0zmtwGmQ==", + "license": "Apache-2.0", + "bin": { + "playwright-core": "cli.js" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", + "license": "MIT" + }, + "node_modules/readable-stream": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", + "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", + "license": "MIT", + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/requires-port": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", + "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==", + "license": "MIT" + }, + "node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "license": "MIT" + }, + "node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "license": "MIT", + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, + "node_modules/typedarray": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", + "integrity": "sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==", + "license": "MIT" + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "license": "MIT" + } + } +} diff --git a/chromium-cdp/package.json b/chromium-cdp/package.json new file mode 100644 index 00000000..e55371d0 --- /dev/null +++ b/chromium-cdp/package.json @@ -0,0 +1,8 @@ +{ + "dependencies": { + "playwright": "^1.47.0", + "playwright-chromium": "^1.47.0", + "http-proxy": "^1.18.1", + "node-http-proxy-json": "^0.1.9" + } +} diff --git a/chromium-cdp/proxy.js b/chromium-cdp/proxy.js new file mode 100644 index 00000000..e9771980 --- /dev/null +++ b/chromium-cdp/proxy.js @@ -0,0 +1,60 @@ +const {chromium} = require('playwright'); +var http = require('http'); +var httpProxy = require('http-proxy'); +var modifyResponse = require('node-http-proxy-json'); + +const port = 8080; // Use port 8080 by default +const cdp_host = '127.0.0.1'; +const cdp_port = 9222; + +// +// Launch Chromium browser with CDP enabled. +// +chromium.launch({headless: true, args: [`--remote-debugging-port=${cdp_port}`]}) + +// +// Set up our server to proxy standard HTTP requests. +// +var proxy = new httpProxy.createProxyServer({ + target: { + host: cdp_host, + port: cdp_port + } +}); +var proxyServer = http.createServer(function (req, res) { + req.headers['host'] = `${cdp_host}:${cdp_port}`; + proxy.web(req, res); +}); + +// +// Listen for the `proxyRes` event on `proxy`. +// Update WebSocket URL in JSON response from Chrome CDP. +// +proxy.on('proxyRes', function (proxyRes, req, res) { + if (res.req.url.startsWith("/json")) { + const isHost = (element) => element == 'Host'; + host = res.req.rawHeaders[res.req.rawHeaders.findIndex(isHost)+1]; + + modifyResponse(res, proxyRes, function (body) { + if (body) { + body.webSocketDebuggerUrl = body.webSocketDebuggerUrl.replace(`${cdp_host}:${cdp_port}`, host); + body.webSocketDebuggerUrl = body.webSocketDebuggerUrl.replace("ws://", "wss://"); + } + return body; // return value can be a promise + }); + + res.setHeader('Host', host); + } +}); + +// +// Listen to the `upgrade` event and proxy the +// WebSocket requests as well. +// +proxyServer.on('upgrade', function (req, socket, head) { + proxy.ws(req, socket, head); +}); + +proxyServer.listen(port, () => { + console.log('Server is running on port ' + port); +}); diff --git a/chromium-cdp/test/.gitignore b/chromium-cdp/test/.gitignore new file mode 100644 index 00000000..65cf9231 --- /dev/null +++ b/chromium-cdp/test/.gitignore @@ -0,0 +1,2 @@ +/.venv/ +*.png diff --git a/chromium-cdp/test/README.md b/chromium-cdp/test/README.md new file mode 100644 index 00000000..e1907ff7 --- /dev/null +++ b/chromium-cdp/test/README.md @@ -0,0 +1,18 @@ +# CDP Screenshot Test / Client + +This is Python client using [CDP (Chrome DevTools Protocol)](https://chromedevtools.github.io/devtools-protocol/) to create a screenshot from an existing Chromium instances. + +Set it up in a [Python virtual environment](https://docs.python.org/3/library/venv.html): + +```console +python -m venv .venv +source .venv/bin/activate +pip install poetry +poetry install +``` + +Run the client: + +```console +python cdp-screenshot.py https://..kraft.host +``` diff --git a/chromium-cdp/test/cdp-screenshot.py b/chromium-cdp/test/cdp-screenshot.py new file mode 100644 index 00000000..155605d9 --- /dev/null +++ b/chromium-cdp/test/cdp-screenshot.py @@ -0,0 +1,48 @@ +import sys +from playwright.sync_api import sync_playwright + +if len(sys.argv) != 2: + print(f"Usage: {sys.argv[0]} wss://...", file=sys.stderr) + sys.exit(1) + +cdp_url = sys.argv[1] + +p = sync_playwright().start() + +browser = p.chromium.connect_over_cdp(cdp_url) + +# Open a new browser page. +URL = "https://google.com" +USER_AGENT = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.4.1 Safari/605.1.15" +new_page = browser.new_page(user_agent=USER_AGENT) +new_page.set_extra_http_headers( + {"sec-ch-ua": '"Chromium";v="125", "Not.A/Brand";v="24"'} + ) +new_page.goto(URL) + +MAX_SCREENSHOT_HEIGHT = 16384 +dimensions = new_page.evaluate( + """ + () => { + return { + width: document.documentElement.scrollWidth, + height: document.documentElement.scrollHeight, + deviceScaleFactor: window.devicePixelRatio, + } + } +""" +) + +# Set the viewport to the full page size (up to a maximum height of MAX_ALLOWED_HEIGHT) +new_page.set_viewport_size( + { + "width": dimensions["width"], + "height": min(dimensions["height"], MAX_SCREENSHOT_HEIGHT), + } + ) + +# Take a single screenshot of the entire page +screenshot = new_page.screenshot() + +with open("screenshot.png", "wb") as stream: + stream.write(screenshot) diff --git a/chromium-cdp/test/poetry.lock b/chromium-cdp/test/poetry.lock new file mode 100644 index 00000000..c6767fcc --- /dev/null +++ b/chromium-cdp/test/poetry.lock @@ -0,0 +1,693 @@ +# This file is automatically @generated by Poetry 2.0.0 and should not be changed by hand. + +[[package]] +name = "aiodns" +version = "3.2.0" +description = "Simple DNS resolver for asyncio" +optional = false +python-versions = "*" +groups = ["main"] +files = [ + {file = "aiodns-3.2.0-py3-none-any.whl", hash = "sha256:e443c0c27b07da3174a109fd9e736d69058d808f144d3c9d56dbd1776964c5f5"}, + {file = "aiodns-3.2.0.tar.gz", hash = "sha256:62869b23409349c21b072883ec8998316b234c9a9e36675756e8e317e8768f72"}, +] + +[package.dependencies] +pycares = ">=4.0.0" + +[[package]] +name = "astroid" +version = "3.3.8" +description = "An abstract syntax tree for Python with inference support." +optional = false +python-versions = ">=3.9.0" +groups = ["main"] +files = [ + {file = "astroid-3.3.8-py3-none-any.whl", hash = "sha256:187ccc0c248bfbba564826c26f070494f7bc964fd286b6d9fff4420e55de828c"}, + {file = "astroid-3.3.8.tar.gz", hash = "sha256:a88c7994f914a4ea8572fac479459f4955eeccc877be3f2d959a33273b0cf40b"}, +] + +[[package]] +name = "certifi" +version = "2024.12.14" +description = "Python package for providing Mozilla's CA Bundle." +optional = false +python-versions = ">=3.6" +groups = ["main"] +files = [ + {file = "certifi-2024.12.14-py3-none-any.whl", hash = "sha256:1275f7a45be9464efc1173084eaa30f866fe2e47d389406136d332ed4967ec56"}, + {file = "certifi-2024.12.14.tar.gz", hash = "sha256:b650d30f370c2b724812bee08008be0c4163b163ddaec3f2546c1caf65f191db"}, +] + +[[package]] +name = "cffi" +version = "1.17.1" +description = "Foreign Function Interface for Python calling C code." +optional = false +python-versions = ">=3.8" +groups = ["main"] +files = [ + {file = "cffi-1.17.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:df8b1c11f177bc2313ec4b2d46baec87a5f3e71fc8b45dab2ee7cae86d9aba14"}, + {file = "cffi-1.17.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:8f2cdc858323644ab277e9bb925ad72ae0e67f69e804f4898c070998d50b1a67"}, + {file = "cffi-1.17.1-cp310-cp310-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:edae79245293e15384b51f88b00613ba9f7198016a5948b5dddf4917d4d26382"}, + {file = "cffi-1.17.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:45398b671ac6d70e67da8e4224a065cec6a93541bb7aebe1b198a61b58c7b702"}, + {file = "cffi-1.17.1-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ad9413ccdeda48c5afdae7e4fa2192157e991ff761e7ab8fdd8926f40b160cc3"}, + {file = "cffi-1.17.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5da5719280082ac6bd9aa7becb3938dc9f9cbd57fac7d2871717b1feb0902ab6"}, + {file = "cffi-1.17.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2bb1a08b8008b281856e5971307cc386a8e9c5b625ac297e853d36da6efe9c17"}, + {file = "cffi-1.17.1-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:045d61c734659cc045141be4bae381a41d89b741f795af1dd018bfb532fd0df8"}, + {file = "cffi-1.17.1-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:6883e737d7d9e4899a8a695e00ec36bd4e5e4f18fabe0aca0efe0a4b44cdb13e"}, + {file = "cffi-1.17.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:6b8b4a92e1c65048ff98cfe1f735ef8f1ceb72e3d5f0c25fdb12087a23da22be"}, + {file = "cffi-1.17.1-cp310-cp310-win32.whl", hash = "sha256:c9c3d058ebabb74db66e431095118094d06abf53284d9c81f27300d0e0d8bc7c"}, + {file = "cffi-1.17.1-cp310-cp310-win_amd64.whl", hash = "sha256:0f048dcf80db46f0098ccac01132761580d28e28bc0f78ae0d58048063317e15"}, + {file = "cffi-1.17.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:a45e3c6913c5b87b3ff120dcdc03f6131fa0065027d0ed7ee6190736a74cd401"}, + {file = "cffi-1.17.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:30c5e0cb5ae493c04c8b42916e52ca38079f1b235c2f8ae5f4527b963c401caf"}, + {file = "cffi-1.17.1-cp311-cp311-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f75c7ab1f9e4aca5414ed4d8e5c0e303a34f4421f8a0d47a4d019ceff0ab6af4"}, + {file = "cffi-1.17.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a1ed2dd2972641495a3ec98445e09766f077aee98a1c896dcb4ad0d303628e41"}, + {file = "cffi-1.17.1-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:46bf43160c1a35f7ec506d254e5c890f3c03648a4dbac12d624e4490a7046cd1"}, + {file = "cffi-1.17.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a24ed04c8ffd54b0729c07cee15a81d964e6fee0e3d4d342a27b020d22959dc6"}, + {file = "cffi-1.17.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:610faea79c43e44c71e1ec53a554553fa22321b65fae24889706c0a84d4ad86d"}, + {file = "cffi-1.17.1-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:a9b15d491f3ad5d692e11f6b71f7857e7835eb677955c00cc0aefcd0669adaf6"}, + {file = "cffi-1.17.1-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:de2ea4b5833625383e464549fec1bc395c1bdeeb5f25c4a3a82b5a8c756ec22f"}, + {file = "cffi-1.17.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:fc48c783f9c87e60831201f2cce7f3b2e4846bf4d8728eabe54d60700b318a0b"}, + {file = "cffi-1.17.1-cp311-cp311-win32.whl", hash = "sha256:85a950a4ac9c359340d5963966e3e0a94a676bd6245a4b55bc43949eee26a655"}, + {file = "cffi-1.17.1-cp311-cp311-win_amd64.whl", hash = "sha256:caaf0640ef5f5517f49bc275eca1406b0ffa6aa184892812030f04c2abf589a0"}, + {file = "cffi-1.17.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:805b4371bf7197c329fcb3ead37e710d1bca9da5d583f5073b799d5c5bd1eee4"}, + {file = "cffi-1.17.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:733e99bc2df47476e3848417c5a4540522f234dfd4ef3ab7fafdf555b082ec0c"}, + {file = "cffi-1.17.1-cp312-cp312-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1257bdabf294dceb59f5e70c64a3e2f462c30c7ad68092d01bbbfb1c16b1ba36"}, + {file = "cffi-1.17.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:da95af8214998d77a98cc14e3a3bd00aa191526343078b530ceb0bd710fb48a5"}, + {file = "cffi-1.17.1-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d63afe322132c194cf832bfec0dc69a99fb9bb6bbd550f161a49e9e855cc78ff"}, + {file = "cffi-1.17.1-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f79fc4fc25f1c8698ff97788206bb3c2598949bfe0fef03d299eb1b5356ada99"}, + {file = "cffi-1.17.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b62ce867176a75d03a665bad002af8e6d54644fad99a3c70905c543130e39d93"}, + {file = "cffi-1.17.1-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:386c8bf53c502fff58903061338ce4f4950cbdcb23e2902d86c0f722b786bbe3"}, + {file = "cffi-1.17.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:4ceb10419a9adf4460ea14cfd6bc43d08701f0835e979bf821052f1805850fe8"}, + {file = "cffi-1.17.1-cp312-cp312-win32.whl", hash = "sha256:a08d7e755f8ed21095a310a693525137cfe756ce62d066e53f502a83dc550f65"}, + {file = "cffi-1.17.1-cp312-cp312-win_amd64.whl", hash = "sha256:51392eae71afec0d0c8fb1a53b204dbb3bcabcb3c9b807eedf3e1e6ccf2de903"}, + {file = "cffi-1.17.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:f3a2b4222ce6b60e2e8b337bb9596923045681d71e5a082783484d845390938e"}, + {file = "cffi-1.17.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:0984a4925a435b1da406122d4d7968dd861c1385afe3b45ba82b750f229811e2"}, + {file = "cffi-1.17.1-cp313-cp313-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d01b12eeeb4427d3110de311e1774046ad344f5b1a7403101878976ecd7a10f3"}, + {file = "cffi-1.17.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:706510fe141c86a69c8ddc029c7910003a17353970cff3b904ff0686a5927683"}, + {file = "cffi-1.17.1-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:de55b766c7aa2e2a3092c51e0483d700341182f08e67c63630d5b6f200bb28e5"}, + {file = "cffi-1.17.1-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:c59d6e989d07460165cc5ad3c61f9fd8f1b4796eacbd81cee78957842b834af4"}, + {file = "cffi-1.17.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dd398dbc6773384a17fe0d3e7eeb8d1a21c2200473ee6806bb5e6a8e62bb73dd"}, + {file = "cffi-1.17.1-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:3edc8d958eb099c634dace3c7e16560ae474aa3803a5df240542b305d14e14ed"}, + {file = "cffi-1.17.1-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:72e72408cad3d5419375fc87d289076ee319835bdfa2caad331e377589aebba9"}, + {file = "cffi-1.17.1-cp313-cp313-win32.whl", hash = "sha256:e03eab0a8677fa80d646b5ddece1cbeaf556c313dcfac435ba11f107ba117b5d"}, + {file = "cffi-1.17.1-cp313-cp313-win_amd64.whl", hash = "sha256:f6a16c31041f09ead72d69f583767292f750d24913dadacf5756b966aacb3f1a"}, + {file = "cffi-1.17.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:636062ea65bd0195bc012fea9321aca499c0504409f413dc88af450b57ffd03b"}, + {file = "cffi-1.17.1-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c7eac2ef9b63c79431bc4b25f1cd649d7f061a28808cbc6c47b534bd789ef964"}, + {file = "cffi-1.17.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e221cf152cff04059d011ee126477f0d9588303eb57e88923578ace7baad17f9"}, + {file = "cffi-1.17.1-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:31000ec67d4221a71bd3f67df918b1f88f676f1c3b535a7eb473255fdc0b83fc"}, + {file = "cffi-1.17.1-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:6f17be4345073b0a7b8ea599688f692ac3ef23ce28e5df79c04de519dbc4912c"}, + {file = "cffi-1.17.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0e2b1fac190ae3ebfe37b979cc1ce69c81f4e4fe5746bb401dca63a9062cdaf1"}, + {file = "cffi-1.17.1-cp38-cp38-win32.whl", hash = "sha256:7596d6620d3fa590f677e9ee430df2958d2d6d6de2feeae5b20e82c00b76fbf8"}, + {file = "cffi-1.17.1-cp38-cp38-win_amd64.whl", hash = "sha256:78122be759c3f8a014ce010908ae03364d00a1f81ab5c7f4a7a5120607ea56e1"}, + {file = "cffi-1.17.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:b2ab587605f4ba0bf81dc0cb08a41bd1c0a5906bd59243d56bad7668a6fc6c16"}, + {file = "cffi-1.17.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:28b16024becceed8c6dfbc75629e27788d8a3f9030691a1dbf9821a128b22c36"}, + {file = "cffi-1.17.1-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1d599671f396c4723d016dbddb72fe8e0397082b0a77a4fab8028923bec050e8"}, + {file = "cffi-1.17.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ca74b8dbe6e8e8263c0ffd60277de77dcee6c837a3d0881d8c1ead7268c9e576"}, + {file = "cffi-1.17.1-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f7f5baafcc48261359e14bcd6d9bff6d4b28d9103847c9e136694cb0501aef87"}, + {file = "cffi-1.17.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:98e3969bcff97cae1b2def8ba499ea3d6f31ddfdb7635374834cf89a1a08ecf0"}, + {file = "cffi-1.17.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:cdf5ce3acdfd1661132f2a9c19cac174758dc2352bfe37d98aa7512c6b7178b3"}, + {file = "cffi-1.17.1-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:9755e4345d1ec879e3849e62222a18c7174d65a6a92d5b346b1863912168b595"}, + {file = "cffi-1.17.1-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:f1e22e8c4419538cb197e4dd60acc919d7696e5ef98ee4da4e01d3f8cfa4cc5a"}, + {file = "cffi-1.17.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:c03e868a0b3bc35839ba98e74211ed2b05d2119be4e8a0f224fba9384f1fe02e"}, + {file = "cffi-1.17.1-cp39-cp39-win32.whl", hash = "sha256:e31ae45bc2e29f6b2abd0de1cc3b9d5205aa847cafaecb8af1476a609a2f6eb7"}, + {file = "cffi-1.17.1-cp39-cp39-win_amd64.whl", hash = "sha256:d016c76bdd850f3c626af19b0542c9677ba156e4ee4fccfdd7848803533ef662"}, + {file = "cffi-1.17.1.tar.gz", hash = "sha256:1c39c6016c32bc48dd54561950ebd6836e1670f2ae46128f67cf49e789c52824"}, +] + +[package.dependencies] +pycparser = "*" + +[[package]] +name = "charset-normalizer" +version = "3.4.1" +description = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet." +optional = false +python-versions = ">=3.7" +groups = ["main"] +files = [ + {file = "charset_normalizer-3.4.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:91b36a978b5ae0ee86c394f5a54d6ef44db1de0815eb43de826d41d21e4af3de"}, + {file = "charset_normalizer-3.4.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7461baadb4dc00fd9e0acbe254e3d7d2112e7f92ced2adc96e54ef6501c5f176"}, + {file = "charset_normalizer-3.4.1-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e218488cd232553829be0664c2292d3af2eeeb94b32bea483cf79ac6a694e037"}, + {file = "charset_normalizer-3.4.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:80ed5e856eb7f30115aaf94e4a08114ccc8813e6ed1b5efa74f9f82e8509858f"}, + {file = "charset_normalizer-3.4.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b010a7a4fd316c3c484d482922d13044979e78d1861f0e0650423144c616a46a"}, + {file = "charset_normalizer-3.4.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4532bff1b8421fd0a320463030c7520f56a79c9024a4e88f01c537316019005a"}, + {file = "charset_normalizer-3.4.1-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:d973f03c0cb71c5ed99037b870f2be986c3c05e63622c017ea9816881d2dd247"}, + {file = "charset_normalizer-3.4.1-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:3a3bd0dcd373514dcec91c411ddb9632c0d7d92aed7093b8c3bbb6d69ca74408"}, + {file = "charset_normalizer-3.4.1-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:d9c3cdf5390dcd29aa8056d13e8e99526cda0305acc038b96b30352aff5ff2bb"}, + {file = "charset_normalizer-3.4.1-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:2bdfe3ac2e1bbe5b59a1a63721eb3b95fc9b6817ae4a46debbb4e11f6232428d"}, + {file = "charset_normalizer-3.4.1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:eab677309cdb30d047996b36d34caeda1dc91149e4fdca0b1a039b3f79d9a807"}, + {file = "charset_normalizer-3.4.1-cp310-cp310-win32.whl", hash = "sha256:c0429126cf75e16c4f0ad00ee0eae4242dc652290f940152ca8c75c3a4b6ee8f"}, + {file = "charset_normalizer-3.4.1-cp310-cp310-win_amd64.whl", hash = "sha256:9f0b8b1c6d84c8034a44893aba5e767bf9c7a211e313a9605d9c617d7083829f"}, + {file = "charset_normalizer-3.4.1-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:8bfa33f4f2672964266e940dd22a195989ba31669bd84629f05fab3ef4e2d125"}, + {file = "charset_normalizer-3.4.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:28bf57629c75e810b6ae989f03c0828d64d6b26a5e205535585f96093e405ed1"}, + {file = "charset_normalizer-3.4.1-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f08ff5e948271dc7e18a35641d2f11a4cd8dfd5634f55228b691e62b37125eb3"}, + {file = "charset_normalizer-3.4.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:234ac59ea147c59ee4da87a0c0f098e9c8d169f4dc2a159ef720f1a61bbe27cd"}, + {file = "charset_normalizer-3.4.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fd4ec41f914fa74ad1b8304bbc634b3de73d2a0889bd32076342a573e0779e00"}, + {file = "charset_normalizer-3.4.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:eea6ee1db730b3483adf394ea72f808b6e18cf3cb6454b4d86e04fa8c4327a12"}, + {file = "charset_normalizer-3.4.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:c96836c97b1238e9c9e3fe90844c947d5afbf4f4c92762679acfe19927d81d77"}, + {file = "charset_normalizer-3.4.1-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:4d86f7aff21ee58f26dcf5ae81a9addbd914115cdebcbb2217e4f0ed8982e146"}, + {file = "charset_normalizer-3.4.1-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:09b5e6733cbd160dcc09589227187e242a30a49ca5cefa5a7edd3f9d19ed53fd"}, + {file = "charset_normalizer-3.4.1-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:5777ee0881f9499ed0f71cc82cf873d9a0ca8af166dfa0af8ec4e675b7df48e6"}, + {file = "charset_normalizer-3.4.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:237bdbe6159cff53b4f24f397d43c6336c6b0b42affbe857970cefbb620911c8"}, + {file = "charset_normalizer-3.4.1-cp311-cp311-win32.whl", hash = "sha256:8417cb1f36cc0bc7eaba8ccb0e04d55f0ee52df06df3ad55259b9a323555fc8b"}, + {file = "charset_normalizer-3.4.1-cp311-cp311-win_amd64.whl", hash = "sha256:d7f50a1f8c450f3925cb367d011448c39239bb3eb4117c36a6d354794de4ce76"}, + {file = "charset_normalizer-3.4.1-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:73d94b58ec7fecbc7366247d3b0b10a21681004153238750bb67bd9012414545"}, + {file = "charset_normalizer-3.4.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:dad3e487649f498dd991eeb901125411559b22e8d7ab25d3aeb1af367df5efd7"}, + {file = "charset_normalizer-3.4.1-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c30197aa96e8eed02200a83fba2657b4c3acd0f0aa4bdc9f6c1af8e8962e0757"}, + {file = "charset_normalizer-3.4.1-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2369eea1ee4a7610a860d88f268eb39b95cb588acd7235e02fd5a5601773d4fa"}, + {file = "charset_normalizer-3.4.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bc2722592d8998c870fa4e290c2eec2c1569b87fe58618e67d38b4665dfa680d"}, + {file = "charset_normalizer-3.4.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ffc9202a29ab3920fa812879e95a9e78b2465fd10be7fcbd042899695d75e616"}, + {file = "charset_normalizer-3.4.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:804a4d582ba6e5b747c625bf1255e6b1507465494a40a2130978bda7b932c90b"}, + {file = "charset_normalizer-3.4.1-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:0f55e69f030f7163dffe9fd0752b32f070566451afe180f99dbeeb81f511ad8d"}, + {file = "charset_normalizer-3.4.1-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:c4c3e6da02df6fa1410a7680bd3f63d4f710232d3139089536310d027950696a"}, + {file = "charset_normalizer-3.4.1-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:5df196eb874dae23dcfb968c83d4f8fdccb333330fe1fc278ac5ceeb101003a9"}, + {file = "charset_normalizer-3.4.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:e358e64305fe12299a08e08978f51fc21fac060dcfcddd95453eabe5b93ed0e1"}, + {file = "charset_normalizer-3.4.1-cp312-cp312-win32.whl", hash = "sha256:9b23ca7ef998bc739bf6ffc077c2116917eabcc901f88da1b9856b210ef63f35"}, + {file = "charset_normalizer-3.4.1-cp312-cp312-win_amd64.whl", hash = "sha256:6ff8a4a60c227ad87030d76e99cd1698345d4491638dfa6673027c48b3cd395f"}, + {file = "charset_normalizer-3.4.1-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:aabfa34badd18f1da5ec1bc2715cadc8dca465868a4e73a0173466b688f29dda"}, + {file = "charset_normalizer-3.4.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:22e14b5d70560b8dd51ec22863f370d1e595ac3d024cb8ad7d308b4cd95f8313"}, + {file = "charset_normalizer-3.4.1-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:8436c508b408b82d87dc5f62496973a1805cd46727c34440b0d29d8a2f50a6c9"}, + {file = "charset_normalizer-3.4.1-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2d074908e1aecee37a7635990b2c6d504cd4766c7bc9fc86d63f9c09af3fa11b"}, + {file = "charset_normalizer-3.4.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:955f8851919303c92343d2f66165294848d57e9bba6cf6e3625485a70a038d11"}, + {file = "charset_normalizer-3.4.1-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:44ecbf16649486d4aebafeaa7ec4c9fed8b88101f4dd612dcaf65d5e815f837f"}, + {file = "charset_normalizer-3.4.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:0924e81d3d5e70f8126529951dac65c1010cdf117bb75eb02dd12339b57749dd"}, + {file = "charset_normalizer-3.4.1-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:2967f74ad52c3b98de4c3b32e1a44e32975e008a9cd2a8cc8966d6a5218c5cb2"}, + {file = "charset_normalizer-3.4.1-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:c75cb2a3e389853835e84a2d8fb2b81a10645b503eca9bcb98df6b5a43eb8886"}, + {file = "charset_normalizer-3.4.1-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:09b26ae6b1abf0d27570633b2b078a2a20419c99d66fb2823173d73f188ce601"}, + {file = "charset_normalizer-3.4.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:fa88b843d6e211393a37219e6a1c1df99d35e8fd90446f1118f4216e307e48cd"}, + {file = "charset_normalizer-3.4.1-cp313-cp313-win32.whl", hash = "sha256:eb8178fe3dba6450a3e024e95ac49ed3400e506fd4e9e5c32d30adda88cbd407"}, + {file = "charset_normalizer-3.4.1-cp313-cp313-win_amd64.whl", hash = "sha256:b1ac5992a838106edb89654e0aebfc24f5848ae2547d22c2c3f66454daa11971"}, + {file = "charset_normalizer-3.4.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f30bf9fd9be89ecb2360c7d94a711f00c09b976258846efe40db3d05828e8089"}, + {file = "charset_normalizer-3.4.1-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:97f68b8d6831127e4787ad15e6757232e14e12060bec17091b85eb1486b91d8d"}, + {file = "charset_normalizer-3.4.1-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:7974a0b5ecd505609e3b19742b60cee7aa2aa2fb3151bc917e6e2646d7667dcf"}, + {file = "charset_normalizer-3.4.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fc54db6c8593ef7d4b2a331b58653356cf04f67c960f584edb7c3d8c97e8f39e"}, + {file = "charset_normalizer-3.4.1-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:311f30128d7d333eebd7896965bfcfbd0065f1716ec92bd5638d7748eb6f936a"}, + {file = "charset_normalizer-3.4.1-cp37-cp37m-musllinux_1_2_aarch64.whl", hash = "sha256:7d053096f67cd1241601111b698f5cad775f97ab25d81567d3f59219b5f1adbd"}, + {file = "charset_normalizer-3.4.1-cp37-cp37m-musllinux_1_2_i686.whl", hash = "sha256:807f52c1f798eef6cf26beb819eeb8819b1622ddfeef9d0977a8502d4db6d534"}, + {file = "charset_normalizer-3.4.1-cp37-cp37m-musllinux_1_2_ppc64le.whl", hash = "sha256:dccbe65bd2f7f7ec22c4ff99ed56faa1e9f785482b9bbd7c717e26fd723a1d1e"}, + {file = "charset_normalizer-3.4.1-cp37-cp37m-musllinux_1_2_s390x.whl", hash = "sha256:2fb9bd477fdea8684f78791a6de97a953c51831ee2981f8e4f583ff3b9d9687e"}, + {file = "charset_normalizer-3.4.1-cp37-cp37m-musllinux_1_2_x86_64.whl", hash = "sha256:01732659ba9b5b873fc117534143e4feefecf3b2078b0a6a2e925271bb6f4cfa"}, + {file = "charset_normalizer-3.4.1-cp37-cp37m-win32.whl", hash = "sha256:7a4f97a081603d2050bfaffdefa5b02a9ec823f8348a572e39032caa8404a487"}, + {file = "charset_normalizer-3.4.1-cp37-cp37m-win_amd64.whl", hash = "sha256:7b1bef6280950ee6c177b326508f86cad7ad4dff12454483b51d8b7d673a2c5d"}, + {file = "charset_normalizer-3.4.1-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:ecddf25bee22fe4fe3737a399d0d177d72bc22be6913acfab364b40bce1ba83c"}, + {file = "charset_normalizer-3.4.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8c60ca7339acd497a55b0ea5d506b2a2612afb2826560416f6894e8b5770d4a9"}, + {file = "charset_normalizer-3.4.1-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b7b2d86dd06bfc2ade3312a83a5c364c7ec2e3498f8734282c6c3d4b07b346b8"}, + {file = "charset_normalizer-3.4.1-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:dd78cfcda14a1ef52584dbb008f7ac81c1328c0f58184bf9a84c49c605002da6"}, + {file = "charset_normalizer-3.4.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6e27f48bcd0957c6d4cb9d6fa6b61d192d0b13d5ef563e5f2ae35feafc0d179c"}, + {file = "charset_normalizer-3.4.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:01ad647cdd609225c5350561d084b42ddf732f4eeefe6e678765636791e78b9a"}, + {file = "charset_normalizer-3.4.1-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:619a609aa74ae43d90ed2e89bdd784765de0a25ca761b93e196d938b8fd1dbbd"}, + {file = "charset_normalizer-3.4.1-cp38-cp38-musllinux_1_2_i686.whl", hash = "sha256:89149166622f4db9b4b6a449256291dc87a99ee53151c74cbd82a53c8c2f6ccd"}, + {file = "charset_normalizer-3.4.1-cp38-cp38-musllinux_1_2_ppc64le.whl", hash = "sha256:7709f51f5f7c853f0fb938bcd3bc59cdfdc5203635ffd18bf354f6967ea0f824"}, + {file = "charset_normalizer-3.4.1-cp38-cp38-musllinux_1_2_s390x.whl", hash = "sha256:345b0426edd4e18138d6528aed636de7a9ed169b4aaf9d61a8c19e39d26838ca"}, + {file = "charset_normalizer-3.4.1-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:0907f11d019260cdc3f94fbdb23ff9125f6b5d1039b76003b5b0ac9d6a6c9d5b"}, + {file = "charset_normalizer-3.4.1-cp38-cp38-win32.whl", hash = "sha256:ea0d8d539afa5eb2728aa1932a988a9a7af94f18582ffae4bc10b3fbdad0626e"}, + {file = "charset_normalizer-3.4.1-cp38-cp38-win_amd64.whl", hash = "sha256:329ce159e82018d646c7ac45b01a430369d526569ec08516081727a20e9e4af4"}, + {file = "charset_normalizer-3.4.1-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:b97e690a2118911e39b4042088092771b4ae3fc3aa86518f84b8cf6888dbdb41"}, + {file = "charset_normalizer-3.4.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:78baa6d91634dfb69ec52a463534bc0df05dbd546209b79a3880a34487f4b84f"}, + {file = "charset_normalizer-3.4.1-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1a2bc9f351a75ef49d664206d51f8e5ede9da246602dc2d2726837620ea034b2"}, + {file = "charset_normalizer-3.4.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:75832c08354f595c760a804588b9357d34ec00ba1c940c15e31e96d902093770"}, + {file = "charset_normalizer-3.4.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0af291f4fe114be0280cdd29d533696a77b5b49cfde5467176ecab32353395c4"}, + {file = "charset_normalizer-3.4.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0167ddc8ab6508fe81860a57dd472b2ef4060e8d378f0cc555707126830f2537"}, + {file = "charset_normalizer-3.4.1-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:2a75d49014d118e4198bcee5ee0a6f25856b29b12dbf7cd012791f8a6cc5c496"}, + {file = "charset_normalizer-3.4.1-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:363e2f92b0f0174b2f8238240a1a30142e3db7b957a5dd5689b0e75fb717cc78"}, + {file = "charset_normalizer-3.4.1-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:ab36c8eb7e454e34e60eb55ca5d241a5d18b2c6244f6827a30e451c42410b5f7"}, + {file = "charset_normalizer-3.4.1-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:4c0907b1928a36d5a998d72d64d8eaa7244989f7aaaf947500d3a800c83a3fd6"}, + {file = "charset_normalizer-3.4.1-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:04432ad9479fa40ec0f387795ddad4437a2b50417c69fa275e212933519ff294"}, + {file = "charset_normalizer-3.4.1-cp39-cp39-win32.whl", hash = "sha256:3bed14e9c89dcb10e8f3a29f9ccac4955aebe93c71ae803af79265c9ca5644c5"}, + {file = "charset_normalizer-3.4.1-cp39-cp39-win_amd64.whl", hash = "sha256:49402233c892a461407c512a19435d1ce275543138294f7ef013f0b63d5d3765"}, + {file = "charset_normalizer-3.4.1-py3-none-any.whl", hash = "sha256:d98b1668f06378c6dbefec3b92299716b931cd4e6061f3c875a71ced1780ab85"}, + {file = "charset_normalizer-3.4.1.tar.gz", hash = "sha256:44251f18cd68a75b56585dd00dae26183e102cd5e0f9f1466e6df5da2ed64ea3"}, +] + +[[package]] +name = "colorama" +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 = ["main"] +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"}, +] + +[[package]] +name = "dill" +version = "0.3.9" +description = "serialize all of Python" +optional = false +python-versions = ">=3.8" +groups = ["main"] +files = [ + {file = "dill-0.3.9-py3-none-any.whl", hash = "sha256:468dff3b89520b474c0397703366b7b95eebe6303f108adf9b19da1f702be87a"}, + {file = "dill-0.3.9.tar.gz", hash = "sha256:81aa267dddf68cbfe8029c42ca9ec6a4ab3b22371d1c450abc54422577b4512c"}, +] + +[package.extras] +graph = ["objgraph (>=1.7.2)"] +profile = ["gprof2dot (>=2022.7.29)"] + +[[package]] +name = "greenlet" +version = "3.0.3" +description = "Lightweight in-process concurrent programming" +optional = false +python-versions = ">=3.7" +groups = ["main"] +files = [ + {file = "greenlet-3.0.3-cp310-cp310-macosx_11_0_universal2.whl", hash = "sha256:9da2bd29ed9e4f15955dd1595ad7bc9320308a3b766ef7f837e23ad4b4aac31a"}, + {file = "greenlet-3.0.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d353cadd6083fdb056bb46ed07e4340b0869c305c8ca54ef9da3421acbdf6881"}, + {file = "greenlet-3.0.3-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:dca1e2f3ca00b84a396bc1bce13dd21f680f035314d2379c4160c98153b2059b"}, + {file = "greenlet-3.0.3-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3ed7fb269f15dc662787f4119ec300ad0702fa1b19d2135a37c2c4de6fadfd4a"}, + {file = "greenlet-3.0.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dd4f49ae60e10adbc94b45c0b5e6a179acc1736cf7a90160b404076ee283cf83"}, + {file = "greenlet-3.0.3-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:73a411ef564e0e097dbe7e866bb2dda0f027e072b04da387282b02c308807405"}, + {file = "greenlet-3.0.3-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:7f362975f2d179f9e26928c5b517524e89dd48530a0202570d55ad6ca5d8a56f"}, + {file = "greenlet-3.0.3-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:649dde7de1a5eceb258f9cb00bdf50e978c9db1b996964cd80703614c86495eb"}, + {file = "greenlet-3.0.3-cp310-cp310-win_amd64.whl", hash = "sha256:68834da854554926fbedd38c76e60c4a2e3198c6fbed520b106a8986445caaf9"}, + {file = "greenlet-3.0.3-cp311-cp311-macosx_11_0_universal2.whl", hash = "sha256:b1b5667cced97081bf57b8fa1d6bfca67814b0afd38208d52538316e9422fc61"}, + {file = "greenlet-3.0.3-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:52f59dd9c96ad2fc0d5724107444f76eb20aaccb675bf825df6435acb7703559"}, + {file = "greenlet-3.0.3-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:afaff6cf5200befd5cec055b07d1c0a5a06c040fe5ad148abcd11ba6ab9b114e"}, + {file = "greenlet-3.0.3-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:fe754d231288e1e64323cfad462fcee8f0288654c10bdf4f603a39ed923bef33"}, + {file = "greenlet-3.0.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2797aa5aedac23af156bbb5a6aa2cd3427ada2972c828244eb7d1b9255846379"}, + {file = "greenlet-3.0.3-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:b7f009caad047246ed379e1c4dbcb8b020f0a390667ea74d2387be2998f58a22"}, + {file = "greenlet-3.0.3-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:c5e1536de2aad7bf62e27baf79225d0d64360d4168cf2e6becb91baf1ed074f3"}, + {file = "greenlet-3.0.3-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:894393ce10ceac937e56ec00bb71c4c2f8209ad516e96033e4b3b1de270e200d"}, + {file = "greenlet-3.0.3-cp311-cp311-win_amd64.whl", hash = "sha256:1ea188d4f49089fc6fb283845ab18a2518d279c7cd9da1065d7a84e991748728"}, + {file = "greenlet-3.0.3-cp312-cp312-macosx_11_0_universal2.whl", hash = "sha256:70fb482fdf2c707765ab5f0b6655e9cfcf3780d8d87355a063547b41177599be"}, + {file = "greenlet-3.0.3-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d4d1ac74f5c0c0524e4a24335350edad7e5f03b9532da7ea4d3c54d527784f2e"}, + {file = "greenlet-3.0.3-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:149e94a2dd82d19838fe4b2259f1b6b9957d5ba1b25640d2380bea9c5df37676"}, + {file = "greenlet-3.0.3-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:15d79dd26056573940fcb8c7413d84118086f2ec1a8acdfa854631084393efcc"}, + {file = "greenlet-3.0.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:881b7db1ebff4ba09aaaeae6aa491daeb226c8150fc20e836ad00041bcb11230"}, + {file = "greenlet-3.0.3-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:fcd2469d6a2cf298f198f0487e0a5b1a47a42ca0fa4dfd1b6862c999f018ebbf"}, + {file = "greenlet-3.0.3-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:1f672519db1796ca0d8753f9e78ec02355e862d0998193038c7073045899f305"}, + {file = "greenlet-3.0.3-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:2516a9957eed41dd8f1ec0c604f1cdc86758b587d964668b5b196a9db5bfcde6"}, + {file = "greenlet-3.0.3-cp312-cp312-win_amd64.whl", hash = "sha256:bba5387a6975598857d86de9eac14210a49d554a77eb8261cc68b7d082f78ce2"}, + {file = "greenlet-3.0.3-cp37-cp37m-macosx_11_0_universal2.whl", hash = "sha256:5b51e85cb5ceda94e79d019ed36b35386e8c37d22f07d6a751cb659b180d5274"}, + {file = "greenlet-3.0.3-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:daf3cb43b7cf2ba96d614252ce1684c1bccee6b2183a01328c98d36fcd7d5cb0"}, + {file = "greenlet-3.0.3-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:99bf650dc5d69546e076f413a87481ee1d2d09aaaaaca058c9251b6d8c14783f"}, + {file = "greenlet-3.0.3-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2dd6e660effd852586b6a8478a1d244b8dc90ab5b1321751d2ea15deb49ed414"}, + {file = "greenlet-3.0.3-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e3391d1e16e2a5a1507d83e4a8b100f4ee626e8eca43cf2cadb543de69827c4c"}, + {file = "greenlet-3.0.3-cp37-cp37m-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:e1f145462f1fa6e4a4ae3c0f782e580ce44d57c8f2c7aae1b6fa88c0b2efdb41"}, + {file = "greenlet-3.0.3-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:1a7191e42732df52cb5f39d3527217e7ab73cae2cb3694d241e18f53d84ea9a7"}, + {file = "greenlet-3.0.3-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:0448abc479fab28b00cb472d278828b3ccca164531daab4e970a0458786055d6"}, + {file = "greenlet-3.0.3-cp37-cp37m-win32.whl", hash = "sha256:b542be2440edc2d48547b5923c408cbe0fc94afb9f18741faa6ae970dbcb9b6d"}, + {file = "greenlet-3.0.3-cp37-cp37m-win_amd64.whl", hash = "sha256:01bc7ea167cf943b4c802068e178bbf70ae2e8c080467070d01bfa02f337ee67"}, + {file = "greenlet-3.0.3-cp38-cp38-macosx_11_0_universal2.whl", hash = "sha256:1996cb9306c8595335bb157d133daf5cf9f693ef413e7673cb07e3e5871379ca"}, + {file = "greenlet-3.0.3-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3ddc0f794e6ad661e321caa8d2f0a55ce01213c74722587256fb6566049a8b04"}, + {file = "greenlet-3.0.3-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c9db1c18f0eaad2f804728c67d6c610778456e3e1cc4ab4bbd5eeb8e6053c6fc"}, + {file = "greenlet-3.0.3-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:7170375bcc99f1a2fbd9c306f5be8764eaf3ac6b5cb968862cad4c7057756506"}, + {file = "greenlet-3.0.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6b66c9c1e7ccabad3a7d037b2bcb740122a7b17a53734b7d72a344ce39882a1b"}, + {file = "greenlet-3.0.3-cp38-cp38-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:098d86f528c855ead3479afe84b49242e174ed262456c342d70fc7f972bc13c4"}, + {file = "greenlet-3.0.3-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:81bb9c6d52e8321f09c3d165b2a78c680506d9af285bfccbad9fb7ad5a5da3e5"}, + {file = "greenlet-3.0.3-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:fd096eb7ffef17c456cfa587523c5f92321ae02427ff955bebe9e3c63bc9f0da"}, + {file = "greenlet-3.0.3-cp38-cp38-win32.whl", hash = "sha256:d46677c85c5ba00a9cb6f7a00b2bfa6f812192d2c9f7d9c4f6a55b60216712f3"}, + {file = "greenlet-3.0.3-cp38-cp38-win_amd64.whl", hash = "sha256:419b386f84949bf0e7c73e6032e3457b82a787c1ab4a0e43732898a761cc9dbf"}, + {file = "greenlet-3.0.3-cp39-cp39-macosx_11_0_universal2.whl", hash = "sha256:da70d4d51c8b306bb7a031d5cff6cc25ad253affe89b70352af5f1cb68e74b53"}, + {file = "greenlet-3.0.3-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:086152f8fbc5955df88382e8a75984e2bb1c892ad2e3c80a2508954e52295257"}, + {file = "greenlet-3.0.3-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d73a9fe764d77f87f8ec26a0c85144d6a951a6c438dfe50487df5595c6373eac"}, + {file = "greenlet-3.0.3-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b7dcbe92cc99f08c8dd11f930de4d99ef756c3591a5377d1d9cd7dd5e896da71"}, + {file = "greenlet-3.0.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1551a8195c0d4a68fac7a4325efac0d541b48def35feb49d803674ac32582f61"}, + {file = "greenlet-3.0.3-cp39-cp39-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:64d7675ad83578e3fc149b617a444fab8efdafc9385471f868eb5ff83e446b8b"}, + {file = "greenlet-3.0.3-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:b37eef18ea55f2ffd8f00ff8fe7c8d3818abd3e25fb73fae2ca3b672e333a7a6"}, + {file = "greenlet-3.0.3-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:77457465d89b8263bca14759d7c1684df840b6811b2499838cc5b040a8b5b113"}, + {file = "greenlet-3.0.3-cp39-cp39-win32.whl", hash = "sha256:57e8974f23e47dac22b83436bdcf23080ade568ce77df33159e019d161ce1d1e"}, + {file = "greenlet-3.0.3-cp39-cp39-win_amd64.whl", hash = "sha256:c5ee858cfe08f34712f548c3c363e807e7186f03ad7a5039ebadb29e8c6be067"}, + {file = "greenlet-3.0.3.tar.gz", hash = "sha256:43374442353259554ce33599da8b692d5aa96f8976d567d4badf263371fbe491"}, +] + +[package.extras] +docs = ["Sphinx", "furo"] +test = ["objgraph", "psutil"] + +[[package]] +name = "idna" +version = "3.10" +description = "Internationalized Domain Names in Applications (IDNA)" +optional = false +python-versions = ">=3.6" +groups = ["main"] +files = [ + {file = "idna-3.10-py3-none-any.whl", hash = "sha256:946d195a0d259cbba61165e88e65941f16e9b36ea6ddb97f00452bae8b1287d3"}, + {file = "idna-3.10.tar.gz", hash = "sha256:12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9"}, +] + +[package.extras] +all = ["flake8 (>=7.1.1)", "mypy (>=1.11.2)", "pytest (>=8.3.2)", "ruff (>=0.6.2)"] + +[[package]] +name = "iniconfig" +version = "2.0.0" +description = "brain-dead simple config-ini parsing" +optional = false +python-versions = ">=3.7" +groups = ["main"] +files = [ + {file = "iniconfig-2.0.0-py3-none-any.whl", hash = "sha256:b6a85871a79d2e3b22d2d1b94ac2824226a63c6b741c88f7ae975f18b6778374"}, + {file = "iniconfig-2.0.0.tar.gz", hash = "sha256:2d91e135bf72d31a410b17c16da610a82cb55f6b0477d1a902134b24a455b8b3"}, +] + +[[package]] +name = "isort" +version = "5.13.2" +description = "A Python utility / library to sort Python imports." +optional = false +python-versions = ">=3.8.0" +groups = ["main"] +files = [ + {file = "isort-5.13.2-py3-none-any.whl", hash = "sha256:8ca5e72a8d85860d5a3fa69b8745237f2939afe12dbf656afbcb47fe72d947a6"}, + {file = "isort-5.13.2.tar.gz", hash = "sha256:48fdfcb9face5d58a4f6dde2e72a1fb8dcaf8ab26f95ab49fab84c2ddefb0109"}, +] + +[package.extras] +colors = ["colorama (>=0.4.6)"] + +[[package]] +name = "mccabe" +version = "0.7.0" +description = "McCabe checker, plugin for flake8" +optional = false +python-versions = ">=3.6" +groups = ["main"] +files = [ + {file = "mccabe-0.7.0-py2.py3-none-any.whl", hash = "sha256:6c2d30ab6be0e4a46919781807b4f0d834ebdd6c6e3dca0bda5a15f863427b6e"}, + {file = "mccabe-0.7.0.tar.gz", hash = "sha256:348e0240c33b60bbdf4e523192ef919f28cb2c3d7d5c7794f74009290f236325"}, +] + +[[package]] +name = "packaging" +version = "24.2" +description = "Core utilities for Python packages" +optional = false +python-versions = ">=3.8" +groups = ["main"] +files = [ + {file = "packaging-24.2-py3-none-any.whl", hash = "sha256:09abb1bccd265c01f4a3aa3f7a7db064b36514d2cba19a2f694fe6150451a759"}, + {file = "packaging-24.2.tar.gz", hash = "sha256:c228a6dc5e932d346bc5739379109d49e8853dd8223571c7c5b55260edc0b97f"}, +] + +[[package]] +name = "platformdirs" +version = "4.3.6" +description = "A small Python package for determining appropriate platform-specific dirs, e.g. a `user data dir`." +optional = false +python-versions = ">=3.8" +groups = ["main"] +files = [ + {file = "platformdirs-4.3.6-py3-none-any.whl", hash = "sha256:73e575e1408ab8103900836b97580d5307456908a03e92031bab39e4554cc3fb"}, + {file = "platformdirs-4.3.6.tar.gz", hash = "sha256:357fb2acbc885b0419afd3ce3ed34564c13c9b95c89360cd9563f73aa5e2b907"}, +] + +[package.extras] +docs = ["furo (>=2024.8.6)", "proselint (>=0.14)", "sphinx (>=8.0.2)", "sphinx-autodoc-typehints (>=2.4)"] +test = ["appdirs (==1.4.4)", "covdefaults (>=2.3)", "pytest (>=8.3.2)", "pytest-cov (>=5)", "pytest-mock (>=3.14)"] +type = ["mypy (>=1.11.2)"] + +[[package]] +name = "playwright" +version = "1.45.1" +description = "A high-level API to automate web browsers" +optional = false +python-versions = ">=3.8" +groups = ["main"] +files = [ + {file = "playwright-1.45.1-py3-none-macosx_10_13_x86_64.whl", hash = "sha256:360607e37c00cdf97c74317f010e106ac4671aeaec6a192431dd71a30941da9d"}, + {file = "playwright-1.45.1-py3-none-macosx_11_0_arm64.whl", hash = "sha256:20adc2abf164c5e8969f9066011b152e12c210549edec78cd05bd0e9cf4135b7"}, + {file = "playwright-1.45.1-py3-none-macosx_11_0_universal2.whl", hash = "sha256:5f047cdc6accf4c7084dfc7587a2a5ef790cddc44cbb111e471293c5a91119db"}, + {file = "playwright-1.45.1-py3-none-manylinux1_x86_64.whl", hash = "sha256:f06f6659abe0abf263e5f6661d379fbf85c112745dd31d82332ceae914f58df7"}, + {file = "playwright-1.45.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:87dc3b3d17e12c68830c29b7fdf5e93315221bbb4c6090e83e967e154e2c1828"}, + {file = "playwright-1.45.1-py3-none-win32.whl", hash = "sha256:2b8f517886ef1e2151982f6e7be84be3ef7d8135bdcf8ee705b4e4e99566e866"}, + {file = "playwright-1.45.1-py3-none-win_amd64.whl", hash = "sha256:0d236cf427784e77de352ba1b7d700693c5fe455b8e5f627f6d84ad5b84b5bf5"}, +] + +[package.dependencies] +greenlet = "3.0.3" +pyee = "11.1.0" + +[[package]] +name = "pluggy" +version = "1.5.0" +description = "plugin and hook calling mechanisms for python" +optional = false +python-versions = ">=3.8" +groups = ["main"] +files = [ + {file = "pluggy-1.5.0-py3-none-any.whl", hash = "sha256:44e1ad92c8ca002de6377e165f3e0f1be63266ab4d554740532335b9d75ea669"}, + {file = "pluggy-1.5.0.tar.gz", hash = "sha256:2cffa88e94fdc978c4c574f15f9e59b7f4201d439195c3715ca9e2486f1d0cf1"}, +] + +[package.extras] +dev = ["pre-commit", "tox"] +testing = ["pytest", "pytest-benchmark"] + +[[package]] +name = "pycares" +version = "4.5.0" +description = "Python interface for c-ares" +optional = false +python-versions = ">=3.9" +groups = ["main"] +files = [ + {file = "pycares-4.5.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:13a82fad8239d6fbcf916099bee17d8b5666d0ddb77dace431e0f7961c9427ab"}, + {file = "pycares-4.5.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:fefc7bebbe39b2e3b4b9615471233a8f7356b96129a7db9030313a3ae4ecc42d"}, + {file = "pycares-4.5.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e322e8ce810026f6e0c7c2a254b9ed02191ab8d42fa2ce6808ede1bdccab8e65"}, + {file = "pycares-4.5.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:723ba0803b016294430e40e544503fed9164949b694342c2552ab189e2b688ef"}, + {file = "pycares-4.5.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e48b20b59cdc929cc712a8b22e89c273256e482b49bb8999af98d2c6fc4563c2"}, + {file = "pycares-4.5.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:de6e55bd9af595b112ac6080ac0a0d52b5853d0d8e6d01ac65ff09e51e62490a"}, + {file = "pycares-4.5.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a6f4b9063e3dd70460400367917698f209c10aabb68bf70b09e364895444487d"}, + {file = "pycares-4.5.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:95522d4840d702fd766439a7c7cd747935aa54cf0b8675e9fadd8414dd9dd0df"}, + {file = "pycares-4.5.0-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:e4709ce4fd9dbee24b1397f71a2adb3267323bb5ad5e7fde3f87873d172dd156"}, + {file = "pycares-4.5.0-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:8addbf3408af1010f50fd67ef634a6cb239ccb9c534c32a40713f3b8d306a98e"}, + {file = "pycares-4.5.0-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:d0428ef42fcf575e197047e6a47892404faa34231902a453b3dfed66af4178b3"}, + {file = "pycares-4.5.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:aed5c2732f3a6bdbbfab202267d37044ca1162f690b9d34b7ece97ba43f27453"}, + {file = "pycares-4.5.0-cp310-cp310-win32.whl", hash = "sha256:b1859ea770a7abec40a6d02b5ab03c2396c4900c01f4e50ddb6c0dca4c2a6a7c"}, + {file = "pycares-4.5.0-cp310-cp310-win_amd64.whl", hash = "sha256:9f87d8da20a3a80ab05fe80c14a62bf078bd726ca6af609edbeb376fb97d50ab"}, + {file = "pycares-4.5.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:5ca7a1dba7b88290710db45012e0903c21c839fa0a2b9ddc100bba8e66bfb251"}, + {file = "pycares-4.5.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:160e92588cdf1a0fa3a7015f47990b508d50efd9109ea4d719dee31c058f0648"}, + {file = "pycares-4.5.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0f38e45d23660ed1dafdb956fd263ae4735530ef1578aa2bf2caabb94cee4523"}, + {file = "pycares-4.5.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f742acc6d29a99ffc14e3f154b3848ea05c5533b71065e0f0a0fd99c527491b2"}, + {file = "pycares-4.5.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:ceaf71bcd7b6447705e689b8fee8836c20c6148511a90122981f524a84bfcca9"}, + {file = "pycares-4.5.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:cdc3c0be7b5b83e78e28818fecd0405bd401110dd6e2e66f7f10713c1188362c"}, + {file = "pycares-4.5.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:fd458ee69800195247aa19b5675c5914cbc091c5a220e4f0e96777a31bb555c1"}, + {file = "pycares-4.5.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:0a6649d713df73266708642fc3d04f110c0a66bee510fbce4cc5fed79df42083"}, + {file = "pycares-4.5.0-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:ac57d7bda925c10b997434e7ce30a2c3689c2e96bab9fd0a1165d5577378eecd"}, + {file = "pycares-4.5.0-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:ba17d8e5eeec4b2e0eb1a6a840bae9e62cd1c1c9cbc8dc9db9d1b9fdf33d0b54"}, + {file = "pycares-4.5.0-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:9e9b7d1a8de703283e4735c0e532ba4bc600e88de872dcd1a9a4950cf74d9f4f"}, + {file = "pycares-4.5.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:4c6922ecbe458c13a4a2c1177bbce38abc44b5f086bc82115a92eab34418915f"}, + {file = "pycares-4.5.0-cp311-cp311-win32.whl", hash = "sha256:1004b8a17614e33410b4b1bb68360977667f1cc9ab2dbcfb27240d6703e4cb6a"}, + {file = "pycares-4.5.0-cp311-cp311-win_amd64.whl", hash = "sha256:2c9c1055c622258a0f315560b2880a372363484b87cbef48af092624804caa72"}, + {file = "pycares-4.5.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:506efbe5017807747ccd1bdcb3c2f6e64635bc01fee01a50c0b97d649018c162"}, + {file = "pycares-4.5.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:c469ec9fbe0526f45a98f67c1ea55be03abf30809c4f9c9be4bc93fb6806304d"}, + {file = "pycares-4.5.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:597c0950ede240c3a779f023fcf2442207fc11e570d3ca4ccdbb0db5bbaf2588"}, + {file = "pycares-4.5.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9aa0da03c4df6ed0f87dd52a293bd0508734515041cc5be0f85d9edc1814914f"}, + {file = "pycares-4.5.0-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:aea1ebf52767c777d10a1b3d03844b9b05cc892714b3ee177d5d9fbff74fb9fa"}, + {file = "pycares-4.5.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:eb20d84269ddffb177b6048e3bc03d0b9ffe17592093d900d5544805958d86b3"}, + {file = "pycares-4.5.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3125df81b657971ee5c0333f8f560ba0151db1eb7cf04aea7d783bb433b306c1"}, + {file = "pycares-4.5.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:525c77ea44546c12f379641aee163585d403cf50e29b04a06059d6aac894e956"}, + {file = "pycares-4.5.0-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:1fd87cb26b317a9988abfcfa4e4dbc55d5f20177e5979ad4d854468a9246c187"}, + {file = "pycares-4.5.0-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:a90aecd41188884e57ae32507a2c6b010c60b791a253083761bbb37a488ecaed"}, + {file = "pycares-4.5.0-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:0d3de65cab653979dcc491e03f596566c9d40346c9deb088e0f9fe70600d8737"}, + {file = "pycares-4.5.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:27a77b43604b3ba24e4fc49fd3ea59f50f7d89c7255f1f1ea46928b26cccacfa"}, + {file = "pycares-4.5.0-cp312-cp312-win32.whl", hash = "sha256:6028cb8766f0fea1d2caa69fac23621fbe2cff9ce6968374e165737258703a33"}, + {file = "pycares-4.5.0-cp312-cp312-win_amd64.whl", hash = "sha256:2ce10672c4cfd1c5fb6718e8b25f0336ca11c89aab88aa6df53dafc4e41df740"}, + {file = "pycares-4.5.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:011cd670da7caf55664c944abb71ec39af82b837f8d48da7cf0eec80f5682c4c"}, + {file = "pycares-4.5.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:b5c67930497fb2b1dbcaa85f8c4188fc2cb62e41d787deeed2d33cfe9dd6bf52"}, + {file = "pycares-4.5.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2d435a3b8468c656a7e7180dd7c4794510f6c612c33ad61a0fff6e440621f8b5"}, + {file = "pycares-4.5.0-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:8371f5ee1efb33d6276e275d152c9c5605e5f2e58a9e168519ec1f9e13dd95ae"}, + {file = "pycares-4.5.0-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:c76a9096fd5dc49c61c5235ea7032e8b43f4382800d64ca1e0e0cda700c082aa"}, + {file = "pycares-4.5.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b604af76b57469ff68b44e9e4c857eaee43bc5035f4f183f07f4f7149191fe1b"}, + {file = "pycares-4.5.0-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c589bd4f9160bfdb2f8080cf564bb120a4312cf091db07fe417f8e58a896a63c"}, + {file = "pycares-4.5.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:361262805bb09742c364ec0117842043c950339e38561009bcabbb6ac89458ef"}, + {file = "pycares-4.5.0-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:6d2afb3c0776467055bf33db843ef483d25639be0f32e3a13ef5d4dc64098bf5"}, + {file = "pycares-4.5.0-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:bc7a1d8ed7c7a4de17706a3c89b305b02eb64c778897e6727c043e5b9dd0d853"}, + {file = "pycares-4.5.0-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:5703ec878b5c1efacdbf24ceaedfa606112fc67af5564f4db99c2c210f3ffadc"}, + {file = "pycares-4.5.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:d87758e09dbf52c27ed7cf7bc7eaf8b3226217d10c52b03d61a14d59f40fcae1"}, + {file = "pycares-4.5.0-cp313-cp313-win32.whl", hash = "sha256:3316d490b4ce1a69f034881ac1ea7608f5f24ea5293db24ab574ac70b7d7e407"}, + {file = "pycares-4.5.0-cp313-cp313-win_amd64.whl", hash = "sha256:018e700fb0d1a2db5ec96e404ffa85ed97cc96e96d6af0bb9548111e37cf36a3"}, + {file = "pycares-4.5.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:78c9890d93108c70708babee8a783e6021233f1f0a763d3634add6fd429aae58"}, + {file = "pycares-4.5.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:ba69f8123995aa3df99f6ebc726fc6a4b08e467a957b215c0a82749b901d5eed"}, + {file = "pycares-4.5.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:32d33c4ffae31d1b544adebe0b9aee2be1fb18aedd3f4f91e41c495ccbafd6d8"}, + {file = "pycares-4.5.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:17a060cfc469828abf7f5945964d505bd8c0a756942fee159538f7885169752e"}, + {file = "pycares-4.5.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:c1d0d5e69fa29e41b590a9dd5842454e8f34e2b928c92540aaf87e0161de8120"}, + {file = "pycares-4.5.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f096699c46f5dde2c7a8d91501a36d2d58500f4d63682e2ec14a0fed7cca6402"}, + {file = "pycares-4.5.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:429fe2065581a64a5f024f507b5f679bf37ea0ed39c3ba6289dba907e1c8a8f4"}, + {file = "pycares-4.5.0-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:9ea2f6d48e64b413b97b41b47392087b452af9bf9f9d4d6d05305a159f45909f"}, + {file = "pycares-4.5.0-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:96d3aecd747a3fcd1e12c1ea1481b0813b4e0e80d40f314db7a86dda5bb1bd94"}, + {file = "pycares-4.5.0-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:32919f6eda7f5ea4df3e64149fc5792b0d455277d23d6d0fc365142062f35d80"}, + {file = "pycares-4.5.0-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:37add862461f9a3fc7ee4dd8b68465812b39456e21cebd5a33c414131ac05060"}, + {file = "pycares-4.5.0-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:ed1d050d2c6d74a77c1b6c51fd99426cc000b4202a50d28d6ca75f7433099a6b"}, + {file = "pycares-4.5.0-cp39-cp39-win32.whl", hash = "sha256:887ac451ffe6e39ee46d3d0989c7bb829933d77e1dad5776511d825fc7e6a25b"}, + {file = "pycares-4.5.0-cp39-cp39-win_amd64.whl", hash = "sha256:5c8b87c05740595bc8051dc98e51f022f003750e7da90f62f7a9fd50e330b196"}, + {file = "pycares-4.5.0.tar.gz", hash = "sha256:025b6c2ffea4e9fb8f9a097381c2fecb24aff23fbd6906e70da22ec9ba60e19d"}, +] + +[package.dependencies] +cffi = ">=1.5.0" + +[package.extras] +idna = ["idna (>=2.1)"] + +[[package]] +name = "pycparser" +version = "2.22" +description = "C parser in Python" +optional = false +python-versions = ">=3.8" +groups = ["main"] +files = [ + {file = "pycparser-2.22-py3-none-any.whl", hash = "sha256:c3702b6d3dd8c7abc1afa565d7e63d53a1d0bd86cdc24edd75470f4de499cfcc"}, + {file = "pycparser-2.22.tar.gz", hash = "sha256:491c8be9c040f5390f5bf44a5b07752bd07f56edf992381b05c701439eec10f6"}, +] + +[[package]] +name = "pyee" +version = "11.1.0" +description = "A rough port of Node.js's EventEmitter to Python with a few tricks of its own" +optional = false +python-versions = ">=3.8" +groups = ["main"] +files = [ + {file = "pyee-11.1.0-py3-none-any.whl", hash = "sha256:5d346a7d0f861a4b2e6c47960295bd895f816725b27d656181947346be98d7c1"}, + {file = "pyee-11.1.0.tar.gz", hash = "sha256:b53af98f6990c810edd9b56b87791021a8f54fd13db4edd1142438d44ba2263f"}, +] + +[package.dependencies] +typing-extensions = "*" + +[package.extras] +dev = ["black", "build", "flake8", "flake8-black", "isort", "jupyter-console", "mkdocs", "mkdocs-include-markdown-plugin", "mkdocstrings[python]", "pytest", "pytest-asyncio", "pytest-trio", "sphinx", "toml", "tox", "trio", "trio", "trio-typing", "twine", "twisted", "validate-pyproject[all]"] + +[[package]] +name = "pylint" +version = "3.3.3" +description = "python code static checker" +optional = false +python-versions = ">=3.9.0" +groups = ["main"] +files = [ + {file = "pylint-3.3.3-py3-none-any.whl", hash = "sha256:26e271a2bc8bce0fc23833805a9076dd9b4d5194e2a02164942cb3cdc37b4183"}, + {file = "pylint-3.3.3.tar.gz", hash = "sha256:07c607523b17e6d16e2ae0d7ef59602e332caa762af64203c24b41c27139f36a"}, +] + +[package.dependencies] +astroid = ">=3.3.8,<=3.4.0-dev0" +colorama = {version = ">=0.4.5", markers = "sys_platform == \"win32\""} +dill = [ + {version = ">=0.3.7", markers = "python_version >= \"3.12\""}, + {version = ">=0.3.6", markers = "python_version >= \"3.11\" and python_version < \"3.12\""}, +] +isort = ">=4.2.5,<5.13.0 || >5.13.0,<6" +mccabe = ">=0.6,<0.8" +platformdirs = ">=2.2.0" +tomlkit = ">=0.10.1" + +[package.extras] +spelling = ["pyenchant (>=3.2,<4.0)"] +testutils = ["gitpython (>3)"] + +[[package]] +name = "pytest" +version = "8.3.4" +description = "pytest: simple powerful testing with Python" +optional = false +python-versions = ">=3.8" +groups = ["main"] +files = [ + {file = "pytest-8.3.4-py3-none-any.whl", hash = "sha256:50e16d954148559c9a74109af1eaf0c945ba2d8f30f0a3d3335edde19788b6f6"}, + {file = "pytest-8.3.4.tar.gz", hash = "sha256:965370d062bce11e73868e0335abac31b4d3de0e82f4007408d242b4f8610761"}, +] + +[package.dependencies] +colorama = {version = "*", markers = "sys_platform == \"win32\""} +iniconfig = "*" +packaging = "*" +pluggy = ">=1.5,<2" + +[package.extras] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] + +[[package]] +name = "python-dotenv" +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 = ["main"] +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"}, +] + +[package.extras] +cli = ["click (>=5.0)"] + +[[package]] +name = "requests" +version = "2.32.3" +description = "Python HTTP for Humans." +optional = false +python-versions = ">=3.8" +groups = ["main"] +files = [ + {file = "requests-2.32.3-py3-none-any.whl", hash = "sha256:70761cfe03c773ceb22aa2f671b4757976145175cdfca038c02654d061d6dcc6"}, + {file = "requests-2.32.3.tar.gz", hash = "sha256:55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760"}, +] + +[package.dependencies] +certifi = ">=2017.4.17" +charset-normalizer = ">=2,<4" +idna = ">=2.5,<4" +urllib3 = ">=1.21.1,<3" + +[package.extras] +socks = ["PySocks (>=1.5.6,!=1.5.7)"] +use-chardet-on-py3 = ["chardet (>=3.0.2,<6)"] + +[[package]] +name = "tomlkit" +version = "0.13.2" +description = "Style preserving TOML library" +optional = false +python-versions = ">=3.8" +groups = ["main"] +files = [ + {file = "tomlkit-0.13.2-py3-none-any.whl", hash = "sha256:7a974427f6e119197f670fbbbeae7bef749a6c14e793db934baefc1b5f03efde"}, + {file = "tomlkit-0.13.2.tar.gz", hash = "sha256:fff5fe59a87295b278abd31bec92c15d9bc4a06885ab12bcea52c71119392e79"}, +] + +[[package]] +name = "typing-extensions" +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"}, +] + +[[package]] +name = "urllib3" +version = "2.3.0" +description = "HTTP library with thread-safe connection pooling, file post, and more." +optional = false +python-versions = ">=3.9" +groups = ["main"] +files = [ + {file = "urllib3-2.3.0-py3-none-any.whl", hash = "sha256:1cee9ad369867bfdbbb48b7dd50374c0967a0bb7710050facf0dd6911440e3df"}, + {file = "urllib3-2.3.0.tar.gz", hash = "sha256:f8c5449b3cf0861679ce7e0503c7b44b5ec981bec0d1d3795a07f1ba96f0204d"}, +] + +[package.extras] +brotli = ["brotli (>=1.0.9)", "brotlicffi (>=0.8.0)"] +h2 = ["h2 (>=4,<5)"] +socks = ["pysocks (>=1.5.6,!=1.5.7,<2.0)"] +zstd = ["zstandard (>=0.18.0)"] + +[metadata] +lock-version = "2.1" +python-versions = "^3.11" +content-hash = "c9c5fcce3d066a2c3664868b0d2f601d9144060c57e1cdc8d462ac0a7597be27" diff --git a/chromium-cdp/test/pyproject.toml b/chromium-cdp/test/pyproject.toml new file mode 100644 index 00000000..ec691731 --- /dev/null +++ b/chromium-cdp/test/pyproject.toml @@ -0,0 +1,18 @@ +[tool.poetry] +name = "playwright-cdp" +version = "0.1.0" +description = "Test Playwright with CDP (Chrome DevTools Protocol)" +authors = ["razvand"] +package-mode = false + +[tool.poetry.dependencies] +python = "^3.11" +playwright = "~1.45.0" +requests = "^2.32.3" +python-dotenv = "^1.0.1" +aiodns = "^3.2.0" +pylint = "^3.2.7" +pytest = "^8.3.3" + +[tool.black] +line-length = 100 diff --git a/chromium-cdp/wrapper.sh b/chromium-cdp/wrapper.sh new file mode 100755 index 00000000..f771be01 --- /dev/null +++ b/chromium-cdp/wrapper.sh @@ -0,0 +1,7 @@ +#!/bin/sh + +set -e + +export HOME=/root +cd /app +exec $@ From 6df052fc72fb00c9a7c72c60c199d3badf0c36cb Mon Sep 17 00:00:00 2001 From: Razvan Deaconescu Date: Tue, 4 Feb 2025 23:12:54 +0200 Subject: [PATCH 2/4] feat(examples): Introduce WebSocket server on Node Introduce an echo-reply WebSocket server to be deployed on Unikraft Cloud with Node. It uses the `node:21` image. Add: * `Kraftfile`: build / run rules * `Dockerfile`: placeholder to extract the filesystem * `package.json` / `package-lock.json`: NPM configuration file * `server.js`: implementation of Node WebSocket server * `README.md`: document how to use * `.dockerignore` / `.gitignore`: ignore generated files * workflow files in `../.github/workflows/` Update top-level `README.md` to feature the example. Signed-off-by: Razvan Deaconescu --- .../example-node21-websocket-stable.yaml | 123 ++++++++++++++++++ .../example-node21-websocket-staging.yaml | 123 ++++++++++++++++++ README.md | 1 + node21-websocket/Dockerfile | 11 ++ node21-websocket/Kraftfile | 12 ++ node21-websocket/README.md | 35 +++++ node21-websocket/package-lock.json | 36 +++++ node21-websocket/package.json | 8 ++ node21-websocket/server.js | 24 ++++ 9 files changed, 373 insertions(+) create mode 100644 .github/workflows/example-node21-websocket-stable.yaml create mode 100644 .github/workflows/example-node21-websocket-staging.yaml create mode 100644 node21-websocket/Dockerfile create mode 100644 node21-websocket/Kraftfile create mode 100644 node21-websocket/README.md create mode 100644 node21-websocket/package-lock.json create mode 100644 node21-websocket/package.json create mode 100644 node21-websocket/server.js diff --git a/.github/workflows/example-node21-websocket-stable.yaml b/.github/workflows/example-node21-websocket-stable.yaml new file mode 100644 index 00000000..2ffebf2a --- /dev/null +++ b/.github/workflows/example-node21-websocket-stable.yaml @@ -0,0 +1,123 @@ +name: examples/node21-websocket (stable) + +on: + workflow_dispatch: + + push: + branches: [main] + paths: + - '.github/workflows/example-node21-websocket-stable.yaml' + - 'node21-websocket/**' + - '!node21-websocket/README.md' + + pull_request: + types: [opened, synchronize, reopened] + branches: [main] + paths: + - '.github/workflows/example-node21-websocket-stable.yaml' + - 'node21-websocket/**' + - '!node21-websocket/README.md' + + schedule: + - cron: '0 4 * * 1-6' # Every work day at 4AM + +# Automatically cancel in-progress actions on the same branch +concurrency: + group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }} + cancel-in-progress: true + +env: + UKC_METRO: ${{ vars.UKC_METRO }} + UKC_TOKEN: ${{ secrets.UKC_TOKEN }} + KRAFTKIT_NO_CHECK_UPDATES: true + KRAFTKIT_LOG_LEVEL: debug + +jobs: + integration: + timeout-minutes: 60 + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Test + id: test + uses: unikraft/kraftkit@staging + continue-on-error: true + with: + run: | + set -xe; + + sudo apt-get -yqq update; + sudo apt-get install -y --no-install-recommends nodejs npm; + npm install wscat; + + cd node21-websocket; + + kraft cloud deploy \ + --no-start \ + --memory 1Gi \ + --name node21-websocket-stable-${GITHUB_RUN_ID} \ + --runtime index.unikraft.io/official-testing/node:21 \ + --subdomain node21-websocket-stable-${GITHUB_RUN_ID} \ + -p 443:8080 \ + .; + + # wait for the instance to start + kraft cloud vm start -w 60s node21-websocket-stable-${GITHUB_RUN_ID}; + sleep 5; + + echo "hello" | wscat --connect wss://node21-websocket-stable-${GITHUB_RUN_ID}.${UKC_METRO}.kraft.host | grep "hello" > /dev/null + + - name: Cleanup + uses: unikraft/kraftkit@staging + if: always() + with: + run: | + set -xe; + + kraft cloud vm stop node21-websocket-stable-${GITHUB_RUN_ID} || true; + kraft cloud vm logs node21-websocket-stable-${GITHUB_RUN_ID} || true; + kraft cloud vm rm node21-websocket-stable-${GITHUB_RUN_ID} || true; + kraft cloud img rm index.unikraft.io/test/node21-websocket-stable-${GITHUB_RUN_ID} || true; + + - name: Re-test with debug info + id: re-test + if: ${{ success() && steps.test.outcome == 'failure' }} + uses: unikraft/kraftkit@staging + with: + run: | + set -xe; + + sudo apt-get -yqq update; + sudo apt-get install -y --no-install-recommends nodejs npm; + npm install wscat; + + cd node21-websocket; + + kraft cloud deploy \ + --no-start \ + --memory 1Gi \ + --name node21-websocket-stable-${GITHUB_RUN_ID}-dbg \ + --runtime index.unikraft.io/official-testing/node:21-dbg \ + --subdomain node21-websocket-stable-${GITHUB_RUN_ID}-dbg \ + -p 443:8080 \ + .; + + # wait for the instance to start + kraft cloud vm start -w 60s node21-websocket-stable-${GITHUB_RUN_ID}-dbg + sleep 5; + + echo "hello" | wscat --connect wss://node21-websocket-stable-${GITHUB_RUN_ID}-dbg.${UKC_METRO}.kraft.host | grep "hello" > /dev/null + + - name: Cleanup Debug + uses: unikraft/kraftkit@staging + if: always() + with: + run: | + set -xe; + + kraft cloud vm stop node21-websocket-stable-${GITHUB_RUN_ID}-dbg || true; + kraft cloud vm logs node21-websocket-stable-${GITHUB_RUN_ID}-dbg || true; + kraft cloud vm rm node21-websocket-stable-${GITHUB_RUN_ID}-dbg || true; + kraft cloud img rm index.unikraft.io/test/node21-websocket-stable-${GITHUB_RUN_ID}-dbg || true; diff --git a/.github/workflows/example-node21-websocket-staging.yaml b/.github/workflows/example-node21-websocket-staging.yaml new file mode 100644 index 00000000..3404ed64 --- /dev/null +++ b/.github/workflows/example-node21-websocket-staging.yaml @@ -0,0 +1,123 @@ +name: examples/node21-websocket (staging) + +on: + workflow_dispatch: + + push: + branches: [main] + paths: + - '.github/workflows/example-node21-websocket-staging.yaml' + - 'node21-websocket/**' + - '!node21-websocket/README.md' + + pull_request: + types: [opened, synchronize, reopened] + branches: [main] + paths: + - '.github/workflows/example-node21-websocket-staging.yaml' + - 'node21-websocket/**' + - '!node21-websocket/README.md' + + schedule: + - cron: '0 4 * * 1-6' # Every work day at 4AM + +# Automatically cancel in-progress actions on the same branch +concurrency: + group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }} + cancel-in-progress: true + +env: + UKC_METRO: ${{ vars.UKC_METRO }} + UKC_TOKEN: ${{ secrets.UKC_TOKEN }} + KRAFTKIT_NO_CHECK_UPDATES: true + KRAFTKIT_LOG_LEVEL: debug + +jobs: + integration: + timeout-minutes: 60 + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Test + id: test + uses: unikraft/kraftkit@staging + continue-on-error: true + with: + run: | + set -xe; + + sudo apt-get -yqq update; + sudo apt-get install -y --no-install-recommends nodejs npm grep; + npm install wscat; + + cd node21-websocket; + + kraft cloud deploy \ + --no-start \ + --memory 1Gi \ + --name node21-websocket-staging-${GITHUB_RUN_ID} \ + --runtime index.unikraft.io/official-staging/node:21 \ + --subdomain node21-websocket-staging-${GITHUB_RUN_ID} \ + -p 443:8080 \ + .; + + # wait for the instance to start + kraft cloud vm start -w 60s node21-websocket-staging-${GITHUB_RUN_ID}; + sleep 5; + + echo "hello" | wscat --connect wss://node21-websocket-staging-${GITHUB_RUN_ID}.${UKC_METRO}.kraft.host | grep "hello" > /dev/null + + - name: Cleanup + uses: unikraft/kraftkit@staging + if: always() + with: + run: | + set -xe; + + kraft cloud vm stop node21-websocket-staging-${GITHUB_RUN_ID} || true; + kraft cloud vm logs node21-websocket-staging-${GITHUB_RUN_ID} || true; + kraft cloud vm rm node21-websocket-staging-${GITHUB_RUN_ID} || true; + kraft cloud img rm index.unikraft.io/test/node21-websocket-staging-${GITHUB_RUN_ID} || true; + + - name: Re-test with debug info + id: re-test + if: ${{ success() && steps.test.outcome == 'failure' }} + uses: unikraft/kraftkit@staging + with: + run: | + set -xe; + + sudo apt-get -yqq update; + sudo apt-get install -y --no-install-recommends nodejs npm grep; + npm install wscat; + + cd node21-websocket; + + kraft cloud deploy \ + --no-start \ + --memory 1Gi \ + --name node21-websocket-staging-${GITHUB_RUN_ID}-dbg \ + --runtime index.unikraft.io/official-staging/node:21-dbg \ + --subdomain node21-websocket-staging-${GITHUB_RUN_ID}-dbg \ + -p 443:8080 \ + .; + + # wait for the instance to start + kraft cloud vm start -w 60s node21-websocket-staging-${GITHUB_RUN_ID}-dbg; + sleep 5; + + echo "hello" | wscat --connect wss://node21-websocket-staging-${GITHUB_RUN_ID}-dbg.${UKC_METRO}.kraft.host | grep "hello" > /dev/null + + - name: Cleanup Debug + uses: unikraft/kraftkit@staging + if: always() + with: + run: | + set -xe; + + kraft cloud vm stop node21-websocket-staging-${GITHUB_RUN_ID}-dbg || true; + kraft cloud vm logs node21-websocket-staging-${GITHUB_RUN_ID}-dbg || true; + kraft cloud vm rm node21-websocket-staging-${GITHUB_RUN_ID}-dbg || true; + kraft cloud img rm index.unikraft.io/test/node21-websocket-staging-${GITHUB_RUN_ID}-dbg || true; diff --git a/README.md b/README.md index c0bb312b..d87e3d81 100644 --- a/README.md +++ b/README.md @@ -33,6 +33,7 @@ Example | Unikraft Cloud
`stable` | Unikraft Cloud
`staging` | [`node18-nextjs`](https://github.com/unikraft-cloud/examples/tree/main/node21-nextjs) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-node18-nextjs-stable.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-node18-nextjs-stable.yaml) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-node18-nextjs-staging.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-node18-nextjs-staging.yaml) | [`node21-solidstart`](https://github.com/unikraft-cloud/examples/tree/main/node21-solid-start) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-node21-solidstart-stable.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-node21-solidstart-stable.yaml) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-node21-solidstart-staging.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-node21-solidstart-staging.yaml) | [`node21-remix`](https://github.com/unikraft-cloud/examples/tree/main/node21-remix) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-node21-remix-stable.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-node21-remix-stable.yaml) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-node21-remix-staging.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-node21-remix-staging.yaml) | +[`node21-websocket`](https://github.com/unikraft-cloud/examples/tree/main/node21-websocket) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-node21-websocket-stable.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-node21-websocket-stable.yaml) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-node21-websocket-staging.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-node21-websocket-staging.yaml) | [`node18-prisma`](https://github.com/unikraft-cloud/examples/tree/main/node18-prisma-rest-express) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-node18-prisma-stable.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-node18-prisma-stable.yaml) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-node18-prisma-staging.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-node18-prisma-staging.yaml) | [`node-playwright-chromium`](https://github.com/unikraft-cloud/examples/tree/main/node-playwright-chromium) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-node-playwright-chromium-stable.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-node-playwright-chromium-stable.yaml) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-node-playwright-chromium-staging.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-node-playwright-chromium-staging.yaml) | [`node-playwright-firefox`](https://github.com/unikraft-cloud/examples/tree/main/node-playwright-firefox) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-node-playwright-firefox-stable.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-node-playwright-firefox-stable.yaml) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-node-playwright-firefox-staging.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-node-playwright-firefox-staging.yaml) | diff --git a/node21-websocket/Dockerfile b/node21-websocket/Dockerfile new file mode 100644 index 00000000..6b98bb3f --- /dev/null +++ b/node21-websocket/Dockerfile @@ -0,0 +1,11 @@ +FROM node:21-alpine AS build + +WORKDIR /usr/src +COPY package.json . +COPY package-lock.json . +RUN npm install + +FROM scratch + +COPY --from=build /usr/src /usr/src +COPY ./server.js /usr/src/server.js diff --git a/node21-websocket/Kraftfile b/node21-websocket/Kraftfile new file mode 100644 index 00000000..17c5299f --- /dev/null +++ b/node21-websocket/Kraftfile @@ -0,0 +1,12 @@ +spec: v0.6 + +runtime: node:21 + +labels: + cloud.unikraft.v1.instances/scale_to_zero.policy: "on" + cloud.unikraft.v1.instances/scale_to_zero.stateful: "true" + cloud.unikraft.v1.instances/scale_to_zero.cooldown_time_ms: 1000 + +rootfs: ./Dockerfile + +cmd: ["/usr/bin/node", "/usr/src/server.js"] diff --git a/node21-websocket/README.md b/node21-websocket/README.md new file mode 100644 index 00000000..ebd750c9 --- /dev/null +++ b/node21-websocket/README.md @@ -0,0 +1,35 @@ +# Node 21 WebSocket Server + +[WebSocket](https://en.wikipedia.org/wiki/WebSocket) is a bidirectional communication protocol over TCP, compatible with HTTP. +This example builds an echo-reply WebSocket server in [Node](https://nodejs.org/en). + +To run the Node WebSocket server on Unikraft Cloud, first [install the `kraft` CLI tool](https://unikraft.org/docs/cli). +Then clone this examples repository and `cd` into this directory, and invoke: + +```console +kraft cloud deploy --metro fra0 -p 443:8080 -M 1Gi . +``` + +The command will build the files in the current directory. + +After deploying, you can query the service with a WebSocket client, such as [`wscat`](https://github.com/websockets/wscat). +Install `wscat` with `npm`: + +```console +npm install -g wscat +``` + +Then query the WebSocket server deployed on Unikraft Cloud, using its URL: + +```console +wscat --connect wss://..kraft.host +``` + +Then enter messages, that will be replied by the server. + +## Learn more + +- [WebSocket documentation](https://nextjs.org/docs) +- [ws: A Node.js WebSocket library](https://github.com/websockets/ws) +- [Unikraft Cloud's Documentation](https://unikraft.cloud/docs/) +- [Building `Dockerfile` Images with `Buildkit`](https://unikraft.org/guides/building-dockerfile-images-with-buildkit) diff --git a/node21-websocket/package-lock.json b/node21-websocket/package-lock.json new file mode 100644 index 00000000..37fff0c8 --- /dev/null +++ b/node21-websocket/package-lock.json @@ -0,0 +1,36 @@ +{ + "name": "websocket", + "version": "0.1.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "websocket", + "version": "0.1.0", + "dependencies": { + "ws": "^8.18" + } + }, + "node_modules/ws": { + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.0.tgz", + "integrity": "sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==", + "license": "MIT", + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + } + } +} diff --git a/node21-websocket/package.json b/node21-websocket/package.json new file mode 100644 index 00000000..c0881c90 --- /dev/null +++ b/node21-websocket/package.json @@ -0,0 +1,8 @@ +{ + "name": "websocket", + "type": "module", + "version": "0.1.0", + "dependencies": { + "ws": "^8.18" + } +} diff --git a/node21-websocket/server.js b/node21-websocket/server.js new file mode 100644 index 00000000..5a3f1109 --- /dev/null +++ b/node21-websocket/server.js @@ -0,0 +1,24 @@ +import { WebSocketServer } from 'ws'; + +const port = 8080; +const wss = new WebSocketServer({ port: port }); + +wss.on('connection', function connection(ws, req) { + const ip = req.socket.remoteAddress; + + console.log('Client connected from %s', ip); + ws.send('Connection received. Waiting for messages.'); + + ws.on('error', console.error); + + ws.on('message', function message(data) { + console.log('received: %s', data); + ws.send(data); + }); + + ws.on('close', function close() { + console.log('Client disconnected from %s', ip); + }); +}); + +console.log('WebSocket server is running on ws://localhost:%d', port); From 39ee40be1d7c11c0b7ae60acdfc52e1a5d68a88e Mon Sep 17 00:00:00 2001 From: Razvan Deaconescu Date: Wed, 5 Feb 2025 18:23:11 +0200 Subject: [PATCH 3/4] fix(workflows): Install wscat in node21-websocket workflows Install `wscat` globally using `npm install -g wscat`, as instructed: https://www.npmjs.com/package/wscat Signed-off-by: Razvan Deaconescu --- .github/workflows/example-node21-websocket-stable.yaml | 4 ++-- .github/workflows/example-node21-websocket-staging.yaml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/example-node21-websocket-stable.yaml b/.github/workflows/example-node21-websocket-stable.yaml index 2ffebf2a..c232a133 100644 --- a/.github/workflows/example-node21-websocket-stable.yaml +++ b/.github/workflows/example-node21-websocket-stable.yaml @@ -50,7 +50,7 @@ jobs: sudo apt-get -yqq update; sudo apt-get install -y --no-install-recommends nodejs npm; - npm install wscat; + sudo npm install -g wscat; cd node21-websocket; @@ -91,7 +91,7 @@ jobs: sudo apt-get -yqq update; sudo apt-get install -y --no-install-recommends nodejs npm; - npm install wscat; + sudo npm install -g wscat; cd node21-websocket; diff --git a/.github/workflows/example-node21-websocket-staging.yaml b/.github/workflows/example-node21-websocket-staging.yaml index 3404ed64..22df5bef 100644 --- a/.github/workflows/example-node21-websocket-staging.yaml +++ b/.github/workflows/example-node21-websocket-staging.yaml @@ -50,7 +50,7 @@ jobs: sudo apt-get -yqq update; sudo apt-get install -y --no-install-recommends nodejs npm grep; - npm install wscat; + sudo npm install -g wscat; cd node21-websocket; @@ -91,7 +91,7 @@ jobs: sudo apt-get -yqq update; sudo apt-get install -y --no-install-recommends nodejs npm grep; - npm install wscat; + sudo npm install -g wscat; cd node21-websocket; From 3f2ee1be2f572e677b1929f546457107f09ff3d1 Mon Sep 17 00:00:00 2001 From: Razvan Deaconescu Date: Wed, 5 Feb 2025 21:36:45 +0200 Subject: [PATCH 4/4] fix(workflows): Use websocat instead of wscat Use `websocat` instead of `wscat` as the WebSocket client, as it can be used non-interactively. Signed-off-by: Razvan Deaconescu --- .../example-node21-websocket-stable.yaml | 16 ++++++---------- .../example-node21-websocket-staging.yaml | 16 ++++++---------- 2 files changed, 12 insertions(+), 20 deletions(-) diff --git a/.github/workflows/example-node21-websocket-stable.yaml b/.github/workflows/example-node21-websocket-stable.yaml index c232a133..a3f1e1a1 100644 --- a/.github/workflows/example-node21-websocket-stable.yaml +++ b/.github/workflows/example-node21-websocket-stable.yaml @@ -48,11 +48,9 @@ jobs: run: | set -xe; - sudo apt-get -yqq update; - sudo apt-get install -y --no-install-recommends nodejs npm; - sudo npm install -g wscat; - cd node21-websocket; + wget https://github.com/vi/websocat/releases/download/v1.14.0/websocat.x86_64-unknown-linux-musl; + chmod a+x websocat.x86_64-unknown-linux-musl; kraft cloud deploy \ --no-start \ @@ -67,7 +65,7 @@ jobs: kraft cloud vm start -w 60s node21-websocket-stable-${GITHUB_RUN_ID}; sleep 5; - echo "hello" | wscat --connect wss://node21-websocket-stable-${GITHUB_RUN_ID}.${UKC_METRO}.kraft.host | grep "hello" > /dev/null + echo "hello" | ./websocat.x86_64-unknown-linux-musl wss://node21-websocket-stable-${GITHUB_RUN_ID}.${UKC_METRO}.kraft.host | grep "hello" > /dev/null - name: Cleanup uses: unikraft/kraftkit@staging @@ -89,11 +87,9 @@ jobs: run: | set -xe; - sudo apt-get -yqq update; - sudo apt-get install -y --no-install-recommends nodejs npm; - sudo npm install -g wscat; - cd node21-websocket; + wget https://github.com/vi/websocat/releases/download/v1.14.0/websocat.x86_64-unknown-linux-musl; + chmod a+x websocat.x86_64-unknown-linux-musl; kraft cloud deploy \ --no-start \ @@ -108,7 +104,7 @@ jobs: kraft cloud vm start -w 60s node21-websocket-stable-${GITHUB_RUN_ID}-dbg sleep 5; - echo "hello" | wscat --connect wss://node21-websocket-stable-${GITHUB_RUN_ID}-dbg.${UKC_METRO}.kraft.host | grep "hello" > /dev/null + echo "hello" | ./websocat.x86_64-unknown-linux-musl wss://node21-websocket-stable-${GITHUB_RUN_ID}.${UKC_METRO}.kraft.host | grep "hello" > /dev/null - name: Cleanup Debug uses: unikraft/kraftkit@staging diff --git a/.github/workflows/example-node21-websocket-staging.yaml b/.github/workflows/example-node21-websocket-staging.yaml index 22df5bef..b588f40d 100644 --- a/.github/workflows/example-node21-websocket-staging.yaml +++ b/.github/workflows/example-node21-websocket-staging.yaml @@ -48,11 +48,9 @@ jobs: run: | set -xe; - sudo apt-get -yqq update; - sudo apt-get install -y --no-install-recommends nodejs npm grep; - sudo npm install -g wscat; - cd node21-websocket; + wget https://github.com/vi/websocat/releases/download/v1.14.0/websocat.x86_64-unknown-linux-musl; + chmod a+x websocat.x86_64-unknown-linux-musl; kraft cloud deploy \ --no-start \ @@ -67,7 +65,7 @@ jobs: kraft cloud vm start -w 60s node21-websocket-staging-${GITHUB_RUN_ID}; sleep 5; - echo "hello" | wscat --connect wss://node21-websocket-staging-${GITHUB_RUN_ID}.${UKC_METRO}.kraft.host | grep "hello" > /dev/null + echo "hello" | ./websocat.x86_64-unknown-linux-musl wss://node21-websocket-stable-${GITHUB_RUN_ID}.${UKC_METRO}.kraft.host | grep "hello" > /dev/null - name: Cleanup uses: unikraft/kraftkit@staging @@ -89,11 +87,9 @@ jobs: run: | set -xe; - sudo apt-get -yqq update; - sudo apt-get install -y --no-install-recommends nodejs npm grep; - sudo npm install -g wscat; - cd node21-websocket; + wget https://github.com/vi/websocat/releases/download/v1.14.0/websocat.x86_64-unknown-linux-musl; + chmod a+x websocat.x86_64-unknown-linux-musl; kraft cloud deploy \ --no-start \ @@ -108,7 +104,7 @@ jobs: kraft cloud vm start -w 60s node21-websocket-staging-${GITHUB_RUN_ID}-dbg; sleep 5; - echo "hello" | wscat --connect wss://node21-websocket-staging-${GITHUB_RUN_ID}-dbg.${UKC_METRO}.kraft.host | grep "hello" > /dev/null + echo "hello" | ./websocat.x86_64-unknown-linux-musl wss://node21-websocket-stable-${GITHUB_RUN_ID}.${UKC_METRO}.kraft.host | grep "hello" > /dev/null - name: Cleanup Debug uses: unikraft/kraftkit@staging