diff --git a/.gitignore b/.gitignore index eb53d81..6d3d2cb 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ data/ .piston_env node_modules +result diff --git a/api/Dockerfile b/api/Dockerfile deleted file mode 100644 index ace28d0..0000000 --- a/api/Dockerfile +++ /dev/null @@ -1,37 +0,0 @@ -FROM node:15.10.0-buster-slim - -ENV DEBIAN_FRONTEND=noninteractive - -RUN dpkg-reconfigure -p critical dash -RUN for i in $(seq 1001 1500); do \ - groupadd -g $i runner$i && \ - useradd -M runner$i -g $i -u $i ; \ - done -RUN apt-get update && \ - apt-get install -y libxml2 gnupg tar coreutils util-linux libc6-dev \ - binutils build-essential locales libpcre3-dev libevent-dev libgmp3-dev \ - libncurses6 libncurses5 libedit-dev libseccomp-dev rename procps python3 \ - libreadline-dev libblas-dev liblapack-dev libpcre3-dev libarpack2-dev \ - libfftw3-dev libglpk-dev libqhull-dev libqrupdate-dev libsuitesparse-dev \ - libsundials-dev libpcre2-dev curl sudo && \ - rm -rf /var/lib/apt/lists/* - -RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && locale-gen - -RUN mkdir -m 0755 /nix && chown node /nix && touch /nix/piston_detected -RUN runuser -l node -c 'curl -L https://nixos.org/nix/install | sh -s -- --no-daemon ' -RUN runuser -l node -c 'source ~/.profile; nix-env -iA nixpkgs.nixUnstable' -RUN runuser -l node -c 'mkdir -p /home/node/.config/nix/; echo "experimental-features = nix-command flakes" >> /home/node/.config/nix/nix.conf' -RUN cp -r /nix /var/nix - -WORKDIR /piston_api -COPY ["package.json", "package-lock.json", "./"] -RUN npm install -COPY ./src ./src - -RUN make -C ./src/nosocket/ all && make -C ./src/nosocket/ install - -COPY ./entrypoint.sh . - -CMD [ "./entrypoint.sh"] -EXPOSE 2000/tcp diff --git a/api/default.nix b/api/default.nix new file mode 100644 index 0000000..cc6cb70 --- /dev/null +++ b/api/default.nix @@ -0,0 +1,28 @@ +{pkgs, ...}: +with pkgs; { + package = mkYarnPackage { + name = "piston"; + src = ./.; + + yarnPreBuild = '' + mkdir -p $HOME/.node-gyp/${nodejs.version} + echo 9 > $HOME/.node-gyp/${nodejs.version}/installVersion + ln -sfv ${nodejs}/include $HOME/.node-gyp/${nodejs.version} + export npm_config_nodedir=${nodejs} + ''; + + pkgConfig = { + waitpid = { + buildInputs = [ + gcc + gnumake + python3 + ]; + + postInstall = '' + yarn --offline run install + ''; + }; + }; + }; +} \ No newline at end of file diff --git a/api/entrypoint.sh b/api/entrypoint.sh index 17966e5..aedcedd 100755 --- a/api/entrypoint.sh +++ b/api/entrypoint.sh @@ -4,8 +4,11 @@ echo "Starting Piston API" echo "Checking presense of nix store" if [[ ! -f "/nix/piston_detected" ]]; then echo "Nix Store is not loaded, assuming /nix has been mounted - copying contents" - cp -r /var/nix /nix + cp -rp /var/nix/* /nix fi +echo "Adding nix to env" +. ~/.profile + echo "Launching Piston API" -node src +node src \ No newline at end of file diff --git a/api/package-lock.json b/api/package-lock.json deleted file mode 100644 index 2b34fc4..0000000 --- a/api/package-lock.json +++ /dev/null @@ -1,1048 +0,0 @@ -{ - "name": "piston-api", - "version": "3.1.0", - "lockfileVersion": 2, - "requires": true, - "packages": { - "": { - "name": "piston-api", - "version": "3.1.0", - "license": "MIT", - "dependencies": { - "body-parser": "^1.19.0", - "chownr": "^2.0.0", - "express": "^4.17.1", - "express-ws": "^5.0.2", - "is-docker": "^2.1.1", - "logplease": "^1.2.15", - "nocamel": "HexF/nocamel#patch-1", - "node-fetch": "^2.6.1", - "semver": "^7.3.4", - "uuid": "^8.3.2", - "waitpid": "git+https://github.com/HexF/node-waitpid.git" - } - }, - "node_modules/accepts": { - "version": "1.3.7", - "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz", - "integrity": "sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==", - "dependencies": { - "mime-types": "~2.1.24", - "negotiator": "0.6.2" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/array-flatten": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", - "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=" - }, - "node_modules/body-parser": { - "version": "1.19.0", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.0.tgz", - "integrity": "sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw==", - "dependencies": { - "bytes": "3.1.0", - "content-type": "~1.0.4", - "debug": "2.6.9", - "depd": "~1.1.2", - "http-errors": "1.7.2", - "iconv-lite": "0.4.24", - "on-finished": "~2.3.0", - "qs": "6.7.0", - "raw-body": "2.4.0", - "type-is": "~1.6.17" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/bytes": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz", - "integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/chownr": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz", - "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==", - "engines": { - "node": ">=10" - } - }, - "node_modules/content-disposition": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.3.tgz", - "integrity": "sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g==", - "dependencies": { - "safe-buffer": "5.1.2" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/content-type": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", - "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/cookie": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.0.tgz", - "integrity": "sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg==", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/cookie-signature": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", - "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=" - }, - "node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/depd": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", - "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/destroy": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", - "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=" - }, - "node_modules/ee-first": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", - "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" - }, - "node_modules/encodeurl": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", - "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/escape-html": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", - "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=" - }, - "node_modules/etag": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", - "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/express": { - "version": "4.17.1", - "resolved": "https://registry.npmjs.org/express/-/express-4.17.1.tgz", - "integrity": "sha512-mHJ9O79RqluphRrcw2X/GTh3k9tVv8YcoyY4Kkh4WDMUYKRZUq0h1o0w2rrrxBqM7VoeUVqgb27xlEMXTnYt4g==", - "dependencies": { - "accepts": "~1.3.7", - "array-flatten": "1.1.1", - "body-parser": "1.19.0", - "content-disposition": "0.5.3", - "content-type": "~1.0.4", - "cookie": "0.4.0", - "cookie-signature": "1.0.6", - "debug": "2.6.9", - "depd": "~1.1.2", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "finalhandler": "~1.1.2", - "fresh": "0.5.2", - "merge-descriptors": "1.0.1", - "methods": "~1.1.2", - "on-finished": "~2.3.0", - "parseurl": "~1.3.3", - "path-to-regexp": "0.1.7", - "proxy-addr": "~2.0.5", - "qs": "6.7.0", - "range-parser": "~1.2.1", - "safe-buffer": "5.1.2", - "send": "0.17.1", - "serve-static": "1.14.1", - "setprototypeof": "1.1.1", - "statuses": "~1.5.0", - "type-is": "~1.6.18", - "utils-merge": "1.0.1", - "vary": "~1.1.2" - }, - "engines": { - "node": ">= 0.10.0" - } - }, - "node_modules/express-ws": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/express-ws/-/express-ws-5.0.2.tgz", - "integrity": "sha512-0uvmuk61O9HXgLhGl3QhNSEtRsQevtmbL94/eILaliEADZBHZOQUAiHFrGPrgsjikohyrmSG5g+sCfASTt0lkQ==", - "dependencies": { - "ws": "^7.4.6" - }, - "engines": { - "node": ">=4.5.0" - }, - "peerDependencies": { - "express": "^4.0.0 || ^5.0.0-alpha.1" - } - }, - "node_modules/finalhandler": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz", - "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==", - "dependencies": { - "debug": "2.6.9", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "on-finished": "~2.3.0", - "parseurl": "~1.3.3", - "statuses": "~1.5.0", - "unpipe": "~1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/forwarded": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz", - "integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/fresh": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", - "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/http-errors": { - "version": "1.7.2", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.2.tgz", - "integrity": "sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg==", - "dependencies": { - "depd": "~1.1.2", - "inherits": "2.0.3", - "setprototypeof": "1.1.1", - "statuses": ">= 1.5.0 < 2", - "toidentifier": "1.0.0" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/iconv-lite": { - "version": "0.4.24", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", - "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" - }, - "node_modules/ipaddr.js": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", - "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/is-docker": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.1.1.tgz", - "integrity": "sha512-ZOoqiXfEwtGknTiuDEy8pN2CfE3TxMHprvNer1mXiqwkOT77Rw3YVrUQ52EqAOU3QAWDQ+bQdx7HJzrv7LS2Hw==", - "bin": { - "is-docker": "cli.js" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/logplease": { - "version": "1.2.15", - "resolved": "https://registry.npmjs.org/logplease/-/logplease-1.2.15.tgz", - "integrity": "sha512-jLlHnlsPSJjpwUfcNyUxXCl33AYg2cHhIf9QhGL2T4iPT0XPB+xP1LRKFPgIg1M/sg9kAJvy94w9CzBNrfnstA==" - }, - "node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/media-typer": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", - "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/merge-descriptors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", - "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=" - }, - "node_modules/methods": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", - "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/mime": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", - "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", - "bin": { - "mime": "cli.js" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/mime-db": { - "version": "1.46.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.46.0.tgz", - "integrity": "sha512-svXaP8UQRZ5K7or+ZmfNhg2xX3yKDMUzqadsSqi4NCH/KomcH75MAMYAGVlvXn4+b/xOPhS3I2uHKRUzvjY7BQ==", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/mime-types": { - "version": "2.1.29", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.29.tgz", - "integrity": "sha512-Y/jMt/S5sR9OaqteJtslsFZKWOIIqMACsJSiHghlCAyhf7jfVYjKBmLiX8OgpWeW+fjJ2b+Az69aPFPkUOY6xQ==", - "dependencies": { - "mime-db": "1.46.0" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" - }, - "node_modules/negotiator": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz", - "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/nocamel": { - "resolved": "git+ssh://git@github.com/HexF/nocamel.git#89a5bfbbd07c72c302d968b967d0f4fe54846544" - }, - "node_modules/node-fetch": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz", - "integrity": "sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==", - "engines": { - "node": "4.x || >=6.0.0" - } - }, - "node_modules/on-finished": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", - "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", - "dependencies": { - "ee-first": "1.1.1" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/parseurl": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", - "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/path-to-regexp": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", - "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=" - }, - "node_modules/proxy-addr": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.6.tgz", - "integrity": "sha512-dh/frvCBVmSsDYzw6n926jv974gddhkFPfiN8hPOi30Wax25QZyZEGveluCgliBnqmuM+UJmBErbAUFIoDbjOw==", - "dependencies": { - "forwarded": "~0.1.2", - "ipaddr.js": "1.9.1" - }, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/qs": { - "version": "6.7.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz", - "integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==", - "engines": { - "node": ">=0.6" - } - }, - "node_modules/range-parser": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", - "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/raw-body": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.4.0.tgz", - "integrity": "sha512-4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepXs+EsQ9XJ8ipEDoiH70ySUJP3Q==", - "dependencies": { - "bytes": "3.1.0", - "http-errors": "1.7.2", - "iconv-lite": "0.4.24", - "unpipe": "1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "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==" - }, - "node_modules/safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" - }, - "node_modules/semver": { - "version": "7.3.5", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", - "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/send": { - "version": "0.17.1", - "resolved": "https://registry.npmjs.org/send/-/send-0.17.1.tgz", - "integrity": "sha512-BsVKsiGcQMFwT8UxypobUKyv7irCNRHk1T0G680vk88yf6LBByGcZJOTJCrTP2xVN6yI+XjPJcNuE3V4fT9sAg==", - "dependencies": { - "debug": "2.6.9", - "depd": "~1.1.2", - "destroy": "~1.0.4", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "fresh": "0.5.2", - "http-errors": "~1.7.2", - "mime": "1.6.0", - "ms": "2.1.1", - "on-finished": "~2.3.0", - "range-parser": "~1.2.1", - "statuses": "~1.5.0" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/send/node_modules/ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==" - }, - "node_modules/serve-static": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.14.1.tgz", - "integrity": "sha512-JMrvUwE54emCYWlTI+hGrGv5I8dEwmco/00EvkzIIsR7MqrHonbD9pO2MOfFnpFntl7ecpZs+3mW+XbQZu9QCg==", - "dependencies": { - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "parseurl": "~1.3.3", - "send": "0.17.1" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/setprototypeof": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.1.tgz", - "integrity": "sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw==" - }, - "node_modules/statuses": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", - "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/toidentifier": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz", - "integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==", - "engines": { - "node": ">=0.6" - } - }, - "node_modules/type-is": { - "version": "1.6.18", - "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", - "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", - "dependencies": { - "media-typer": "0.3.0", - "mime-types": "~2.1.24" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/unpipe": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", - "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/utils-merge": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", - "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=", - "engines": { - "node": ">= 0.4.0" - } - }, - "node_modules/uuid": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", - "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", - "bin": { - "uuid": "dist/bin/uuid" - } - }, - "node_modules/vary": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", - "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/waitpid": { - "resolved": "git+ssh://git@github.com/HexF/node-waitpid.git#a08d116a5d993a747624fe72ff890167be8c34aa", - "hasInstallScript": true - }, - "node_modules/ws": { - "version": "7.5.3", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.3.tgz", - "integrity": "sha512-kQ/dHIzuLrS6Je9+uv81ueZomEwH0qVYstcAQ4/Z93K8zeko9gtAbttJWzoC5ukqXY1PpoouV3+VSOqEAFt5wg==", - "engines": { - "node": ">=8.3.0" - }, - "peerDependencies": { - "bufferutil": "^4.0.1", - "utf-8-validate": "^5.0.2" - }, - "peerDependenciesMeta": { - "bufferutil": { - "optional": true - }, - "utf-8-validate": { - "optional": true - } - } - }, - "node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" - } - }, - "dependencies": { - "accepts": { - "version": "1.3.7", - "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz", - "integrity": "sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==", - "requires": { - "mime-types": "~2.1.24", - "negotiator": "0.6.2" - } - }, - "array-flatten": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", - "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=" - }, - "body-parser": { - "version": "1.19.0", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.0.tgz", - "integrity": "sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw==", - "requires": { - "bytes": "3.1.0", - "content-type": "~1.0.4", - "debug": "2.6.9", - "depd": "~1.1.2", - "http-errors": "1.7.2", - "iconv-lite": "0.4.24", - "on-finished": "~2.3.0", - "qs": "6.7.0", - "raw-body": "2.4.0", - "type-is": "~1.6.17" - } - }, - "bytes": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz", - "integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==" - }, - "chownr": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz", - "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==" - }, - "content-disposition": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.3.tgz", - "integrity": "sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g==", - "requires": { - "safe-buffer": "5.1.2" - } - }, - "content-type": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", - "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==" - }, - "cookie": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.0.tgz", - "integrity": "sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg==" - }, - "cookie-signature": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", - "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=" - }, - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "requires": { - "ms": "2.0.0" - } - }, - "depd": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", - "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=" - }, - "destroy": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", - "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=" - }, - "ee-first": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", - "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" - }, - "encodeurl": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", - "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=" - }, - "escape-html": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", - "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=" - }, - "etag": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", - "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=" - }, - "express": { - "version": "4.17.1", - "resolved": "https://registry.npmjs.org/express/-/express-4.17.1.tgz", - "integrity": "sha512-mHJ9O79RqluphRrcw2X/GTh3k9tVv8YcoyY4Kkh4WDMUYKRZUq0h1o0w2rrrxBqM7VoeUVqgb27xlEMXTnYt4g==", - "requires": { - "accepts": "~1.3.7", - "array-flatten": "1.1.1", - "body-parser": "1.19.0", - "content-disposition": "0.5.3", - "content-type": "~1.0.4", - "cookie": "0.4.0", - "cookie-signature": "1.0.6", - "debug": "2.6.9", - "depd": "~1.1.2", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "finalhandler": "~1.1.2", - "fresh": "0.5.2", - "merge-descriptors": "1.0.1", - "methods": "~1.1.2", - "on-finished": "~2.3.0", - "parseurl": "~1.3.3", - "path-to-regexp": "0.1.7", - "proxy-addr": "~2.0.5", - "qs": "6.7.0", - "range-parser": "~1.2.1", - "safe-buffer": "5.1.2", - "send": "0.17.1", - "serve-static": "1.14.1", - "setprototypeof": "1.1.1", - "statuses": "~1.5.0", - "type-is": "~1.6.18", - "utils-merge": "1.0.1", - "vary": "~1.1.2" - } - }, - "express-ws": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/express-ws/-/express-ws-5.0.2.tgz", - "integrity": "sha512-0uvmuk61O9HXgLhGl3QhNSEtRsQevtmbL94/eILaliEADZBHZOQUAiHFrGPrgsjikohyrmSG5g+sCfASTt0lkQ==", - "requires": { - "ws": "^7.4.6" - } - }, - "finalhandler": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz", - "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==", - "requires": { - "debug": "2.6.9", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "on-finished": "~2.3.0", - "parseurl": "~1.3.3", - "statuses": "~1.5.0", - "unpipe": "~1.0.0" - } - }, - "forwarded": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz", - "integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=" - }, - "fresh": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", - "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=" - }, - "http-errors": { - "version": "1.7.2", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.2.tgz", - "integrity": "sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg==", - "requires": { - "depd": "~1.1.2", - "inherits": "2.0.3", - "setprototypeof": "1.1.1", - "statuses": ">= 1.5.0 < 2", - "toidentifier": "1.0.0" - } - }, - "iconv-lite": { - "version": "0.4.24", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", - "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", - "requires": { - "safer-buffer": ">= 2.1.2 < 3" - } - }, - "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" - }, - "ipaddr.js": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", - "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==" - }, - "is-docker": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.1.1.tgz", - "integrity": "sha512-ZOoqiXfEwtGknTiuDEy8pN2CfE3TxMHprvNer1mXiqwkOT77Rw3YVrUQ52EqAOU3QAWDQ+bQdx7HJzrv7LS2Hw==" - }, - "logplease": { - "version": "1.2.15", - "resolved": "https://registry.npmjs.org/logplease/-/logplease-1.2.15.tgz", - "integrity": "sha512-jLlHnlsPSJjpwUfcNyUxXCl33AYg2cHhIf9QhGL2T4iPT0XPB+xP1LRKFPgIg1M/sg9kAJvy94w9CzBNrfnstA==" - }, - "lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "requires": { - "yallist": "^4.0.0" - } - }, - "media-typer": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", - "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=" - }, - "merge-descriptors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", - "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=" - }, - "methods": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", - "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=" - }, - "mime": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", - "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==" - }, - "mime-db": { - "version": "1.46.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.46.0.tgz", - "integrity": "sha512-svXaP8UQRZ5K7or+ZmfNhg2xX3yKDMUzqadsSqi4NCH/KomcH75MAMYAGVlvXn4+b/xOPhS3I2uHKRUzvjY7BQ==" - }, - "mime-types": { - "version": "2.1.29", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.29.tgz", - "integrity": "sha512-Y/jMt/S5sR9OaqteJtslsFZKWOIIqMACsJSiHghlCAyhf7jfVYjKBmLiX8OgpWeW+fjJ2b+Az69aPFPkUOY6xQ==", - "requires": { - "mime-db": "1.46.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" - }, - "negotiator": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz", - "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==" - }, - "nocamel": { - "version": "git+ssh://git@github.com/HexF/nocamel.git#89a5bfbbd07c72c302d968b967d0f4fe54846544", - "from": "nocamel@HexF/nocamel#patch-1" - }, - "node-fetch": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz", - "integrity": "sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==" - }, - "on-finished": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", - "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", - "requires": { - "ee-first": "1.1.1" - } - }, - "parseurl": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", - "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==" - }, - "path-to-regexp": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", - "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=" - }, - "proxy-addr": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.6.tgz", - "integrity": "sha512-dh/frvCBVmSsDYzw6n926jv974gddhkFPfiN8hPOi30Wax25QZyZEGveluCgliBnqmuM+UJmBErbAUFIoDbjOw==", - "requires": { - "forwarded": "~0.1.2", - "ipaddr.js": "1.9.1" - } - }, - "qs": { - "version": "6.7.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz", - "integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==" - }, - "range-parser": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", - "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==" - }, - "raw-body": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.4.0.tgz", - "integrity": "sha512-4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepXs+EsQ9XJ8ipEDoiH70ySUJP3Q==", - "requires": { - "bytes": "3.1.0", - "http-errors": "1.7.2", - "iconv-lite": "0.4.24", - "unpipe": "1.0.0" - } - }, - "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==" - }, - "safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" - }, - "semver": { - "version": "7.3.5", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", - "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", - "requires": { - "lru-cache": "^6.0.0" - } - }, - "send": { - "version": "0.17.1", - "resolved": "https://registry.npmjs.org/send/-/send-0.17.1.tgz", - "integrity": "sha512-BsVKsiGcQMFwT8UxypobUKyv7irCNRHk1T0G680vk88yf6LBByGcZJOTJCrTP2xVN6yI+XjPJcNuE3V4fT9sAg==", - "requires": { - "debug": "2.6.9", - "depd": "~1.1.2", - "destroy": "~1.0.4", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "fresh": "0.5.2", - "http-errors": "~1.7.2", - "mime": "1.6.0", - "ms": "2.1.1", - "on-finished": "~2.3.0", - "range-parser": "~1.2.1", - "statuses": "~1.5.0" - }, - "dependencies": { - "ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==" - } - } - }, - "serve-static": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.14.1.tgz", - "integrity": "sha512-JMrvUwE54emCYWlTI+hGrGv5I8dEwmco/00EvkzIIsR7MqrHonbD9pO2MOfFnpFntl7ecpZs+3mW+XbQZu9QCg==", - "requires": { - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "parseurl": "~1.3.3", - "send": "0.17.1" - } - }, - "setprototypeof": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.1.tgz", - "integrity": "sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw==" - }, - "statuses": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", - "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=" - }, - "toidentifier": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz", - "integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==" - }, - "type-is": { - "version": "1.6.18", - "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", - "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", - "requires": { - "media-typer": "0.3.0", - "mime-types": "~2.1.24" - } - }, - "unpipe": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", - "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=" - }, - "utils-merge": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", - "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=" - }, - "uuid": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", - "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==" - }, - "vary": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", - "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=" - }, - "waitpid": { - "version": "git+ssh://git@github.com/HexF/node-waitpid.git#a08d116a5d993a747624fe72ff890167be8c34aa", - "from": "waitpid@git+https://github.com/HexF/node-waitpid.git" - }, - "ws": { - "version": "7.5.3", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.3.tgz", - "integrity": "sha512-kQ/dHIzuLrS6Je9+uv81ueZomEwH0qVYstcAQ4/Z93K8zeko9gtAbttJWzoC5ukqXY1PpoouV3+VSOqEAFt5wg==", - "requires": {} - }, - "yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" - } - } -} diff --git a/api/package.json b/api/package.json index fb107a5..49e55db 100644 --- a/api/package.json +++ b/api/package.json @@ -1,20 +1,28 @@ { "name": "piston-api", - "version": "3.1.0", + "version": "4.0.0", "description": "API for piston - a high performance code execution engine", - "main": "src/index.js", + "main": "src/pistond.js", "dependencies": { "body-parser": "^1.19.0", - "chownr": "^2.0.0", "express": "^4.17.1", "express-ws": "^5.0.2", - "is-docker": "^2.1.1", "logplease": "^1.2.15", - "nocamel": "HexF/nocamel#patch-1", "node-fetch": "^2.6.1", - "semver": "^7.3.4", "uuid": "^8.3.2", - "waitpid": "git+https://github.com/HexF/node-waitpid.git" + "nocamel": "git://github.com/HexF/nocamel.git#patch-1", + "waitpid": "git://github.com/HexF/node-waitpid.git" }, - "license": "MIT" + "license": "MIT", + "scripts": { + "lint": "prettier . --write", + "prepack": "yarn2nix > yarn.nix" + }, + "devDependencies": { + "node2nix": "^1.6.0", + "prettier": "2.2.1" + }, + "bin": { + "pistond": "./src/pistond.js" + } } diff --git a/api/src/api/v2.js b/api/src/api/v2.js index 4f0c3e2..86294b4 100644 --- a/api/src/api/v2.js +++ b/api/src/api/v2.js @@ -5,8 +5,7 @@ const events = require('events'); const runtime = require('../runtime'); const { Job } = require('../job'); -const package = require('../package'); -const logger = require('logplease').create('api/v2'); +const logger = require('logplease').create('api/v3'); const SIGNALS = [ 'SIGABRT', @@ -53,7 +52,6 @@ const SIGNALS = [ function get_job(body) { let { language, - version, args, stdin, files, @@ -69,11 +67,7 @@ function get_job(body) { message: 'language is required as a string', }); } - if (!version || typeof version !== 'string') { - return reject({ - message: 'version is required as a string', - }); - } + if (!files || !Array.isArray(files)) { return reject({ message: 'files is required as an array', @@ -87,10 +81,50 @@ function get_job(body) { } } - const rt = runtime.get_latest_runtime_matching_language_version( - language, - version - ); + if (compile_memory_limit) { + if (typeof compile_memory_limit !== 'number') { + return reject({ + message: 'if specified, compile_memory_limit must be a number', + }); + } + + if ( + config.compile_memory_limit >= 0 && + (compile_memory_limit > config.compile_memory_limit || + compile_memory_limit < 0) + ) { + return reject({ + message: + 'compile_memory_limit cannot exceed the configured limit of ' + + config.compile_memory_limit, + }); + } + } + + if (run_memory_limit) { + if (typeof run_memory_limit !== 'number') { + return reject({ + message: 'if specified, run_memory_limit must be a number', + }); + } + + if ( + config.run_memory_limit >= 0 && + (run_memory_limit > config.run_memory_limit || run_memory_limit < 0) + ) { + return reject({ + message: + 'run_memory_limit cannot exceed the configured limit of ' + + config.run_memory_limit, + }); + } + } + + const rt = runtime.find(rt => [ + ...rt.aliases, + rt.language + ].includes(rt.language)) + if (rt === undefined) { return reject({ message: `${language}-${version} runtime is unknown`, @@ -298,77 +332,4 @@ router.get('/runtimes', (req, res) => { return res.status(200).send(runtimes); }); -router.get('/packages', async (req, res) => { - logger.debug('Request to list packages'); - let packages = await package.get_package_list(); - - packages = packages.map(pkg => { - return { - language: pkg.language, - language_version: pkg.version.raw, - installed: pkg.installed, - }; - }); - - return res.status(200).send(packages); -}); - -router.post('/packages', async (req, res) => { - logger.debug('Request to install package'); - - const { language, version } = req.body; - - const pkg = await package.get_package(language, version); - - if (pkg == null) { - return res.status(404).send({ - message: `Requested package ${language}-${version} does not exist`, - }); - } - - try { - const response = await pkg.install(); - - return res.status(200).send(response); - } catch (e) { - logger.error( - `Error while installing package ${pkg.language}-${pkg.version}:`, - e.message - ); - - return res.status(500).send({ - message: e.message, - }); - } -}); - -router.delete('/packages', async (req, res) => { - logger.debug('Request to uninstall package'); - - const { language, version } = req.body; - - const pkg = await package.get_package(language, version); - - if (pkg == null) { - return res.status(404).send({ - message: `Requested package ${language}-${version} does not exist`, - }); - } - - try { - const response = await pkg.uninstall(); - - return res.status(200).send(response); - } catch (e) { - logger.error( - `Error while uninstalling package ${pkg.language}-${pkg.version}:`, - e.message - ); - - return res.status(500).send({ - message: e.message, - }); - } -}); - module.exports = router; diff --git a/api/src/api/v3.js b/api/src/api/v3.js new file mode 100644 index 0000000..3e8b530 --- /dev/null +++ b/api/src/api/v3.js @@ -0,0 +1,236 @@ +const express = require('express'); +const router = express.Router(); + +const events = require('events'); + +const config = require('../config'); +const runtime = require('../runtime'); +const { Job } = require('../job'); +const logger = require('logplease').create('api/v3'); + +const SIGNALS = ["SIGABRT","SIGALRM","SIGBUS","SIGCHLD","SIGCLD","SIGCONT","SIGEMT","SIGFPE","SIGHUP","SIGILL","SIGINFO","SIGINT","SIGIO","SIGIOT","SIGKILL","SIGLOST","SIGPIPE","SIGPOLL","SIGPROF","SIGPWR","SIGQUIT","SIGSEGV","SIGSTKFLT","SIGSTOP","SIGTSTP","SIGSYS","SIGTERM","SIGTRAP","SIGTTIN","SIGTTOU","SIGUNUSED","SIGURG","SIGUSR1","SIGUSR2","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGWINCH"] +// ref: https://man7.org/linux/man-pages/man7/signal.7.html + +function get_job(body){ + const { + runtime_id, + args, + stdin, + files, + compile_memory_limit, + run_memory_limit, + run_timeout, + compile_timeout + } = body; + + return new Promise((resolve, reject) => { + if (typeof runtime_id !== 'number') { + return reject({ + message: 'runtime_id is required as a number' + }); + } + + if (!Array.isArray(files)) { + return reject({ + message: 'files is required as an array', + }); + } + + for (const [i, file] of files.entries()) { + if (typeof file.content !== 'string') { + return reject({ + message: `files[${i}].content is required as a string`, + }); + } + } + + if (compile_memory_limit) { + if (typeof compile_memory_limit !== 'number') { + return reject({ + message: 'if specified, compile_memory_limit must be a number', + }); + } + + if ( + config.compile_memory_limit >= 0 && + (compile_memory_limit > config.compile_memory_limit || + compile_memory_limit < 0) + ) { + return reject({ + message: + 'compile_memory_limit cannot exceed the configured limit of ' + + config.compile_memory_limit, + }); + } + } + + if (run_memory_limit) { + if (typeof run_memory_limit !== 'number') { + return reject({ + message: 'if specified, run_memory_limit must be a number', + }); + } + + if ( + config.run_memory_limit >= 0 && + (run_memory_limit > config.run_memory_limit || run_memory_limit < 0) + ) { + return reject({ + message: + 'run_memory_limit cannot exceed the configured limit of ' + + config.run_memory_limit, + }); + } + } + const rt = runtime[runtime_id]; + + + if (rt === undefined) { + return reject({ + message: `Runtime #${runtime_id} is unknown`, + }); + } + + resolve(new Job({ + runtime: rt, + args: args || [], + stdin: stdin || "", + files, + timeouts: { + run: run_timeout || 3000, + compile: compile_timeout || 10000, + }, + memory_limits: { + run: run_memory_limit || config.run_memory_limit, + compile: compile_memory_limit || config.compile_memory_limit, + } + })); + }) + +} + +router.use((req, res, next) => { + if (['GET', 'HEAD', 'OPTIONS'].includes(req.method)) { + return next(); + } + + if (!req.headers['content-type'].startsWith('application/json')) { + return res.status(415).send({ + message: 'requests must be of type application/json', + }); + } + + next(); +}); + +router.ws('/connect', async (ws, req) => { + + let job = null; + let eventBus = new events.EventEmitter(); + + eventBus.on("stdout", (data) => ws.send(JSON.stringify({type: "data", stream: "stdout", data: data.toString()}))) + eventBus.on("stderr", (data) => ws.send(JSON.stringify({type: "data", stream: "stderr", data: data.toString()}))) + eventBus.on("stage", (stage)=> ws.send(JSON.stringify({type: "stage", stage}))) + eventBus.on("exit", (stage, status) => ws.send(JSON.stringify({type: "exit", stage, ...status}))) + + ws.on("message", async (data) => { + + try{ + const msg = JSON.parse(data); + + switch(msg.type){ + case "init": + if(job === null){ + job = await get_job(msg); + + await job.prime(); + + ws.send(JSON.stringify({ + type: "runtime", + language: job.runtime.language, + version: job.runtime.version.raw + })) + + await job.execute_interactive(eventBus); + + ws.close(4999, "Job Completed"); + + }else{ + ws.close(4000, "Already Initialized"); + } + break; + case "data": + if(job !== null){ + if(msg.stream === "stdin"){ + eventBus.emit("stdin", msg.data) + }else{ + ws.close(4004, "Can only write to stdin") + } + }else{ + ws.close(4003, "Not yet initialized") + } + break; + case "signal": + if(job !== null){ + if(SIGNALS.includes(msg.signal)){ + eventBus.emit("signal", msg.signal) + }else{ + ws.close(4005, "Invalid signal") + } + }else{ + ws.close(4003, "Not yet initialized") + } + break; + } + + }catch(error){ + ws.send(JSON.stringify({type: "error", message: error.message})) + ws.close(4002, "Notified Error") + // ws.close message is limited to 123 characters, so we notify over WS then close. + } + }) + + ws.on("close", async ()=>{ + if(job !== null){ + await job.cleanup() + } + }) + + setTimeout(()=>{ + //Terminate the socket after 1 second, if not initialized. + if(job === null) + ws.close(4001, "Initialization Timeout"); + }, 1000) +}) + +router.post('/execute', async (req, res) => { + + try{ + const job = await get_job(req.body); + await job.prime(); + + const result = await job.execute(); + + await job.cleanup(); + + return res.status(200).send(result); + }catch(error){ + return res.status(400).json(error); + } +}); + +router.get('/runtimes', (req, res) => { + const runtimes = runtime.map(rt => { + return { + language: rt.language, + version: rt.version.raw, + aliases: rt.aliases, + runtime: rt.runtime, + id: rt.id + }; + }); + + return res.status(200).send(runtimes); +}); + +module.exports = router; diff --git a/api/src/config.js b/api/src/config.js index 5324097..8ddc3f5 100644 --- a/api/src/config.js +++ b/api/src/config.js @@ -171,10 +171,9 @@ const options = [ validators: [(x, raw) => !is_nan(x) || `${raw} is not a number`], }, { - key: 'repo_url', - desc: 'URL of repo index', - default: - 'https://github.com/engineer-man/piston/releases/download/pkgs/index', + key: 'flake_path', + desc: 'Path to nix flake defining runtimes to install', + default: 'github:engineer-man/piston?directory=packages', validators: [], }, { diff --git a/api/src/globals.js b/api/src/globals.js index 933d2ca..f2a6459 100644 --- a/api/src/globals.js +++ b/api/src/globals.js @@ -1,20 +1,9 @@ // Globals are things the user shouldn't change in config, but is good to not use inline constants for -const is_docker = require('is-docker'); -const fs = require('fs'); -const platform = `${is_docker() ? 'docker' : 'baremetal'}-${fs - .read_file_sync('/etc/os-release') - .toString() - .split('\n') - .find(x => x.startsWith('ID')) - .replace('ID=', '')}`; module.exports = { data_directories: { - packages: 'packages', jobs: 'jobs', }, version: require('../package.json').version, - platform, - pkg_installed_file: '.ppman-installed', //Used as indication for if a package was installed clean_directories: ['/dev/shm', '/run/lock', '/tmp', '/var/tmp'], }; diff --git a/api/src/job.js b/api/src/job.js index eef2ffd..e05f017 100644 --- a/api/src/job.js +++ b/api/src/job.js @@ -240,8 +240,8 @@ class Job { if (this.runtime.compiled) { compile = await this.safe_call( - path.join(this.runtime.pkgdir, 'compile'), - code_files.map(x => x.name), + this.runtime.compile, + this.files.map(x => x.name), this.timeouts.compile, this.memory_limits.compile ); @@ -262,7 +262,7 @@ class Job { compile, run, language: this.runtime.language, - version: this.runtime.version.raw, + version: this.runtime.version, }; } diff --git a/api/src/package.js b/api/src/package.js deleted file mode 100644 index 4e4630f..0000000 --- a/api/src/package.js +++ /dev/null @@ -1,226 +0,0 @@ -const logger = require('logplease').create('package'); -const semver = require('semver'); -const config = require('./config'); -const globals = require('./globals'); -const fetch = require('node-fetch'); -const path = require('path'); -const fs = require('fs/promises'); -const fss = require('fs'); -const cp = require('child_process'); -const crypto = require('crypto'); -const runtime = require('./runtime'); -const chownr = require('chownr'); -const util = require('util'); - -class Package { - constructor({ language, version, download, checksum }) { - this.language = language; - this.version = semver.parse(version); - this.checksum = checksum; - this.download = download; - } - - get installed() { - return fss.exists_sync( - path.join(this.install_path, globals.pkg_installed_file) - ); - } - - get install_path() { - return path.join( - config.data_directory, - globals.data_directories.packages, - this.language, - this.version.raw - ); - } - - async install() { - if (this.installed) { - throw new Error('Already installed'); - } - - logger.info(`Installing ${this.language}-${this.version.raw}`); - - if (fss.exists_sync(this.install_path)) { - logger.warn( - `${this.language}-${this.version.raw} has residual files. Removing them.` - ); - await fs.rm(this.install_path, { recursive: true, force: true }); - } - - logger.debug(`Making directory ${this.install_path}`); - await fs.mkdir(this.install_path, { recursive: true }); - - logger.debug( - `Downloading package from ${this.download} in to ${this.install_path}` - ); - const pkgpath = path.join(this.install_path, 'pkg.tar.gz'); - const download = await fetch(this.download); - - const file_stream = fss.create_write_stream(pkgpath); - await new Promise((resolve, reject) => { - download.body.pipe(file_stream); - download.body.on('error', reject); - - file_stream.on('finish', resolve); - }); - - logger.debug('Validating checksums'); - logger.debug(`Assert sha256(pkg.tar.gz) == ${this.checksum}`); - const hash = crypto.create_hash('sha256'); - - const read_stream = fss.create_read_stream(pkgpath); - await new Promise((resolve, reject) => { - read_stream.on('data', chunk => hash.update(chunk)); - read_stream.on('end', () => resolve()); - read_stream.on('error', error => reject(error)); - }); - - const cs = hash.digest('hex'); - - if (cs !== this.checksum) { - throw new Error(`Checksum miss-match want: ${val} got: ${cs}`); - } - - logger.debug( - `Extracting package files from archive ${pkgpath} in to ${this.install_path}` - ); - - await new Promise((resolve, reject) => { - const proc = cp.exec( - `bash -c 'cd "${this.install_path}" && tar xzf ${pkgpath}'` - ); - - proc.once('exit', (code, _) => { - code === 0 ? resolve() : reject(); - }); - - proc.stdout.pipe(process.stdout); - proc.stderr.pipe(process.stderr); - - proc.once('error', reject); - }); - - logger.debug('Registering runtime'); - runtime.load_package(this.install_path); - - logger.debug('Caching environment'); - const get_env_command = `cd ${this.install_path}; source environment; env`; - - const envout = await new Promise((resolve, reject) => { - let stdout = ''; - - const proc = cp.spawn( - 'env', - ['-i', 'bash', '-c', `${get_env_command}`], - { - stdio: ['ignore', 'pipe', 'pipe'], - } - ); - - proc.once('exit', (code, _) => { - code === 0 ? resolve(stdout) : reject(); - }); - - proc.stdout.on('data', data => { - stdout += data; - }); - - proc.once('error', reject); - }); - - const filtered_env = envout - .split('\n') - .filter( - l => - !['PWD', 'OLDPWD', '_', 'SHLVL'].includes( - l.split('=', 2)[0] - ) - ) - .join('\n'); - - await fs.write_file(path.join(this.install_path, '.env'), filtered_env); - - logger.debug('Changing Ownership of package directory'); - await util.promisify(chownr)(this.install_path, 0, 0); - - logger.debug('Writing installed state to disk'); - await fs.write_file( - path.join(this.install_path, globals.pkg_installed_file), - Date.now().toString() - ); - - logger.info(`Installed ${this.language}-${this.version.raw}`); - - return { - language: this.language, - version: this.version.raw, - }; - } - - async uninstall() { - logger.info(`Uninstalling ${this.language}-${this.version.raw}`); - - logger.debug('Finding runtime'); - const found_runtime = runtime.get_runtime_by_name_and_version( - this.language, - this.version.raw - ); - - if (!found_runtime) { - logger.error( - `Uninstalling ${this.language}-${this.version.raw} failed: Not installed` - ); - throw new Error( - `${this.language}-${this.version.raw} is not installed` - ); - } - - logger.debug('Unregistering runtime'); - found_runtime.unregister(); - - logger.debug('Cleaning files from disk'); - await fs.rmdir(this.install_path, { recursive: true }); - - logger.info(`Uninstalled ${this.language}-${this.version.raw}`); - - return { - language: this.language, - version: this.version.raw, - }; - } - - static async get_package_list() { - const repo_content = await fetch(config.repo_url).then(x => x.text()); - - const entries = repo_content.split('\n').filter(x => x.length > 0); - - return entries.map(line => { - const [language, version, checksum, download] = line.split(',', 4); - - return new Package({ - language, - version, - checksum, - download, - }); - }); - } - - static async get_package(lang, version) { - const packages = await Package.get_package_list(); - - const candidates = packages.filter(pkg => { - return ( - pkg.language == lang && semver.satisfies(pkg.version, version) - ); - }); - - candidates.sort((a, b) => semver.rcompare(a.version, b.version)); - - return candidates[0] || null; - } -} - -module.exports = Package; diff --git a/api/src/index.js b/api/src/pistond.js old mode 100644 new mode 100755 similarity index 74% rename from api/src/index.js rename to api/src/pistond.js index 025f5ae..36e12e3 --- a/api/src/index.js +++ b/api/src/pistond.js @@ -5,6 +5,7 @@ const express = require('express'); const expressWs = require('express-ws'); const globals = require('./globals'); const config = require('./config'); +const cp = require('child_process'); const path = require('path'); const fs = require('fs/promises'); const fss = require('fs'); @@ -37,28 +38,11 @@ expressWs(app); }); logger.info('Loading packages'); - const pkgdir = path.join( - config.data_directory, - globals.data_directories.packages - ); - const pkglist = await fs.readdir(pkgdir); - - const languages = await Promise.all( - pkglist.map(lang => { - return fs.readdir(path.join(pkgdir, lang)).then(x => { - return x.map(y => path.join(pkgdir, lang, y)); - }); - }) - ); - - const installed_languages = languages - .flat() - .filter(pkg => - fss.exists_sync(path.join(pkg, globals.pkg_installed_file)) - ); - - installed_languages.for_each(pkg => runtime.load_package(pkg)); + const runtimes_data = cp.execSync(`nix eval --json ${config.flake_path}#pistonRuntimes --apply builtins.attrNames`).toString(); + const runtimes = JSON.parse(runtimes_data); + + runtimes.for_each(pkg => runtime.load_runtime(pkg)); logger.info('Starting API Server'); logger.debug('Constructing Express App'); @@ -76,8 +60,9 @@ expressWs(app); logger.debug('Registering Routes'); const api_v2 = require('./api/v2'); + const api_v3 = require('./api/v3'); app.use('/api/v2', api_v2); - app.use('/api/v2', api_v2); + app.use('/api/v3', api_v3); app.use((req, res, next) => { return res.status(404).send({ message: 'Not Found' }); diff --git a/api/src/runtime.js b/api/src/runtime.js index 6c6f10e..9ebd724 100644 --- a/api/src/runtime.js +++ b/api/src/runtime.js @@ -1,5 +1,5 @@ const logger = require('logplease').create('runtime'); -const semver = require('semver'); +const cp = require('child_process'); const config = require('./config'); const globals = require('./globals'); const fss = require('fs'); @@ -7,32 +7,44 @@ const path = require('path'); const runtimes = []; + class Runtime { constructor({ language, version, aliases, - pkgdir, runtime, + run, + compile, + packageSupport, + flake_key, timeouts, memory_limits, max_process_count, max_open_files, max_file_size, - output_max_size, + output_max_size }) { this.language = language; - this.version = version; - this.aliases = aliases || []; - this.pkgdir = pkgdir; this.runtime = runtime; + this.timeouts = timeouts; this.memory_limits = memory_limits; this.max_process_count = max_process_count; this.max_open_files = max_open_files; this.max_file_size = max_file_size; this.output_max_size = output_max_size; + + this.aliases = aliases; + this.version = version; + + this.run = run; + this.compile = compile; + + this.flake_key = flake_key; + this.package_support = packageSupport; } + static compute_single_limit( language_name, @@ -97,122 +109,61 @@ class Runtime { }; } - static load_package(package_dir) { - let info = JSON.parse( - fss.read_file_sync(path.join(package_dir, 'pkg-info.json')) - ); + ensure_built(){ + logger.info(`Ensuring ${this} is built`); - let { - language, - version, - build_platform, - aliases, - provides, - limit_overrides, - } = info; - version = semver.parse(version); + const flake_key = this.flake_key; - if (build_platform !== globals.platform) { - logger.warn( - `Package ${language}-${version} was built for platform ${build_platform}, ` + - `but our platform is ${globals.platform}` - ); + function _ensure_built(key){ + const command = `nix build ${config.flake_path}#pistonRuntimes.${flake_key}.metadata.${key} --no-link`; + cp.execSync(command, {stdio: "pipe"}) } - if (provides) { - // Multiple languages in 1 package - provides.forEach(lang => { - runtimes.push( - new Runtime({ - language: lang.language, - aliases: lang.aliases, - version, - pkgdir: package_dir, - runtime: language, - ...Runtime.compute_all_limits( - lang.language, - lang.limit_overrides - ), - }) - ); - }); - } else { - runtimes.push( - new Runtime({ - language, - version, - aliases, - pkgdir: package_dir, - ...Runtime.compute_all_limits(language, limit_overrides), - }) - ); - } + _ensure_built("run"); + if(this.compiled) _ensure_built("compile"); + + logger.debug(`Finished ensuring ${this} is installed`) + + } + + static load_runtime(flake_key){ + logger.info(`Loading ${flake_key}`) + const metadata_command = `nix eval --json ${config.flake_path}#pistonRuntimes.${flake_key}.metadata`; + const metadata = JSON.parse(cp.execSync(metadata_command)); + + const this_runtime = new Runtime({ + ...metadata, + ...Runtime.compute_all_limits( + metadata.language, + metadata.limit_overrides + ), + flake_key + }); + + this_runtime.ensure_built(); + + runtimes.push(this_runtime); + + + logger.debug(`Package ${flake_key} was loaded`); - logger.debug(`Package ${language}-${version} was loaded`); } get compiled() { - if (this._compiled === undefined) { - this._compiled = fss.exists_sync(path.join(this.pkgdir, 'compile')); - } - - return this._compiled; + return this.compile !== null; } - get env_vars() { - if (!this._env_vars) { - const env_file = path.join(this.pkgdir, '.env'); - const env_content = fss.read_file_sync(env_file).toString(); - - this._env_vars = {}; - - env_content - .trim() - .split('\n') - .map(line => line.split('=', 2)) - .forEach(([key, val]) => { - this._env_vars[key.trim()] = val.trim(); - }); - } - - return this._env_vars; + get id(){ + return runtimes.indexOf(this); } toString() { - return `${this.language}-${this.version.raw}`; + return `${this.language}-${this.version}`; } - unregister() { - const index = runtimes.indexOf(this); - runtimes.splice(index, 1); //Remove from runtimes list - } } module.exports = runtimes; module.exports.Runtime = Runtime; -module.exports.get_runtimes_matching_language_version = function (lang, ver) { - return runtimes.filter( - rt => - (rt.language == lang || rt.aliases.includes(lang)) && - semver.satisfies(rt.version, ver) - ); -}; -module.exports.get_latest_runtime_matching_language_version = function ( - lang, - ver -) { - return module.exports - .get_runtimes_matching_language_version(lang, ver) - .sort((a, b) => semver.rcompare(a.version, b.version))[0]; -}; +module.exports.load_runtime = Runtime.load_runtime; -module.exports.get_runtime_by_name_and_version = function (runtime, ver) { - return runtimes.find( - rt => - (rt.runtime == runtime || - (rt.runtime === undefined && rt.language == runtime)) && - semver.satisfies(rt.version, ver) - ); -}; - -module.exports.load_package = Runtime.load_package; diff --git a/api/yarn.lock b/api/yarn.lock new file mode 100644 index 0000000..eaef672 --- /dev/null +++ b/api/yarn.lock @@ -0,0 +1,1406 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +abbrev@1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" + integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q== + +accepts@~1.3.7: + version "1.3.7" + resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.7.tgz#531bc726517a3b2b41f850021c6cc15eaab507cd" + integrity sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA== + dependencies: + mime-types "~2.1.24" + negotiator "0.6.2" + +ajv@^6.12.3: + version "6.12.6" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" + integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== + dependencies: + fast-deep-equal "^3.1.1" + fast-json-stable-stringify "^2.0.0" + json-schema-traverse "^0.4.1" + uri-js "^4.2.2" + +ansi-regex@^2.0.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" + integrity sha1-w7M6te42DYbg5ijwRorn7yfWVN8= + +ansi-regex@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" + integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== + +aproba@^1.0.3: + version "1.2.0" + resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a" + integrity sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw== + +are-we-there-yet@~1.1.2: + version "1.1.7" + resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.7.tgz#b15474a932adab4ff8a50d9adfa7e4e926f21146" + integrity sha512-nxwy40TuMiUGqMyRHgCSWZ9FM4VAoRP4xUYSTv5ImRog+h9yISPbVH7H8fASCIzYn9wlEv4zvFL7uKDMCFQm3g== + dependencies: + delegates "^1.0.0" + readable-stream "^2.0.6" + +array-flatten@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2" + integrity sha1-ml9pkFGx5wczKPKgCJaLZOopVdI= + +asn1@~0.2.3: + version "0.2.6" + resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.6.tgz#0d3a7bb6e64e02a90c0303b31f292868ea09a08d" + integrity sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ== + dependencies: + safer-buffer "~2.1.0" + +assert-plus@1.0.0, assert-plus@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" + integrity sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU= + +asynckit@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" + integrity sha1-x57Zf380y48robyXkLzDZkdLS3k= + +aws-sign2@~0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8" + integrity sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg= + +aws4@^1.8.0: + version "1.11.0" + resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.11.0.tgz#d61f46d83b2519250e2784daf5b09479a8b41c59" + integrity sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA== + +balanced-match@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" + integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== + +base64-js@1.5.x: + version "1.5.1" + resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" + integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== + +bcrypt-pbkdf@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz#a4301d389b6a43f9b67ff3ca11a3f6637e360e9e" + integrity sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4= + dependencies: + tweetnacl "^0.14.3" + +body-parser@1.19.1, body-parser@^1.19.0: + version "1.19.1" + resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.19.1.tgz#1499abbaa9274af3ecc9f6f10396c995943e31d4" + integrity sha512-8ljfQi5eBk8EJfECMrgqNGWPEY5jWP+1IzkzkGdFFEwFQZZyaZ21UqdaHktgiMlH0xLHqIFtE/u2OYE5dOtViA== + dependencies: + bytes "3.1.1" + content-type "~1.0.4" + debug "2.6.9" + depd "~1.1.2" + http-errors "1.8.1" + iconv-lite "0.4.24" + on-finished "~2.3.0" + qs "6.9.6" + raw-body "2.4.2" + type-is "~1.6.18" + +brace-expansion@^1.1.7: + version "1.1.11" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" + integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== + dependencies: + balanced-match "^1.0.0" + concat-map "0.0.1" + +buffer-from@^1.0.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" + integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== + +builtins@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/builtins/-/builtins-1.0.3.tgz#cb94faeb61c8696451db36534e1422f94f0aee88" + integrity sha1-y5T662HIaWRR2zZTThQi+U8K7og= + +bytes@3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.1.tgz#3f018291cb4cbad9accb6e6970bca9c8889e879a" + integrity sha512-dWe4nWO/ruEOY7HkUJ5gFt1DCFV9zPRoJr8pV0/ASQermOZjtq8jMjOprC0Kd10GLN+l7xaUPvxzJFWtxGu8Fg== + +caseless@~0.12.0: + version "0.12.0" + resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" + integrity sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw= + +chownr@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/chownr/-/chownr-2.0.0.tgz#15bfbe53d2eab4cf70f18a8cd68ebe5b3cb1dece" + integrity sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ== + +code-point-at@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" + integrity sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c= + +combined-stream@^1.0.6, combined-stream@~1.0.6: + version "1.0.8" + resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" + integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== + dependencies: + delayed-stream "~1.0.0" + +concat-map@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= + +concat-stream@^1.5.2: + version "1.6.2" + resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.2.tgz#904bdf194cd3122fc675c77fc4ac3d4ff0fd1a34" + integrity sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw== + dependencies: + buffer-from "^1.0.0" + inherits "^2.0.3" + readable-stream "^2.2.2" + typedarray "^0.0.6" + +config-chain@~1.1.8: + version "1.1.13" + resolved "https://registry.yarnpkg.com/config-chain/-/config-chain-1.1.13.tgz#fad0795aa6a6cdaff9ed1b68e9dff94372c232f4" + integrity sha512-qj+f8APARXHrM0hraqXYb2/bOVSV4PvJQlNZ/DVj0QrmNM2q2euizkeuVckQ57J+W0mRH6Hvi+k50M4Jul2VRQ== + dependencies: + ini "^1.3.4" + proto-list "~1.2.1" + +console-control-strings@^1.0.0, console-control-strings@~1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" + integrity sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4= + +content-disposition@0.5.4: + version "0.5.4" + resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.4.tgz#8b82b4efac82512a02bb0b1dcec9d2c5e8eb5bfe" + integrity sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ== + dependencies: + safe-buffer "5.2.1" + +content-type@~1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.4.tgz#e138cc75e040c727b1966fe5e5f8c9aee256fe3b" + integrity sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA== + +cookie-signature@1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.0.6.tgz#e303a882b342cc3ee8ca513a79999734dab3ae2c" + integrity sha1-4wOogrNCzD7oylE6eZmXNNqzriw= + +cookie@0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.4.1.tgz#afd713fe26ebd21ba95ceb61f9a8116e50a537d1" + integrity sha512-ZwrFkGJxUR3EIoXtO+yVE69Eb7KlixbaeAWfBQB9vVsNn/o+Yw69gBWSSDK825hQNdN+wF8zELf3dFNl/kxkUA== + +core-util-is@1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" + integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac= + +core-util-is@~1.0.0: + version "1.0.3" + resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.3.tgz#a6042d3634c2b27e9328f837b965fac83808db85" + integrity sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ== + +dashdash@^1.12.0: + version "1.14.1" + resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" + integrity sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA= + dependencies: + assert-plus "^1.0.0" + +debug@2.6.9: + version "2.6.9" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" + integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== + dependencies: + ms "2.0.0" + +delayed-stream@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" + integrity sha1-3zrhmayt+31ECqrgsp4icrJOxhk= + +delegates@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" + integrity sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o= + +depd@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9" + integrity sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak= + +destroy@~1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.0.4.tgz#978857442c44749e4206613e37946205826abd80" + integrity sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA= + +ecc-jsbn@~0.1.1: + version "0.1.2" + resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz#3a83a904e54353287874c564b7549386849a98c9" + integrity sha1-OoOpBOVDUyh4dMVkt1SThoSamMk= + dependencies: + jsbn "~0.1.0" + safer-buffer "^2.1.0" + +ee-first@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" + integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0= + +emoji-regex@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" + integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== + +encodeurl@~1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" + integrity sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k= + +escape-html@~1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" + integrity sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg= + +etag@~1.8.1: + version "1.8.1" + resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" + integrity sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc= + +express-ws@^5.0.2: + version "5.0.2" + resolved "https://registry.yarnpkg.com/express-ws/-/express-ws-5.0.2.tgz#5b02d41b937d05199c6c266d7cc931c823bda8eb" + integrity sha512-0uvmuk61O9HXgLhGl3QhNSEtRsQevtmbL94/eILaliEADZBHZOQUAiHFrGPrgsjikohyrmSG5g+sCfASTt0lkQ== + dependencies: + ws "^7.4.6" + +express@^4.17.1: + version "4.17.2" + resolved "https://registry.yarnpkg.com/express/-/express-4.17.2.tgz#c18369f265297319beed4e5558753cc8c1364cb3" + integrity sha512-oxlxJxcQlYwqPWKVJJtvQiwHgosH/LrLSPA+H4UxpyvSS6jC5aH+5MoHFM+KABgTOt0APue4w66Ha8jCUo9QGg== + dependencies: + accepts "~1.3.7" + array-flatten "1.1.1" + body-parser "1.19.1" + content-disposition "0.5.4" + content-type "~1.0.4" + cookie "0.4.1" + cookie-signature "1.0.6" + debug "2.6.9" + depd "~1.1.2" + encodeurl "~1.0.2" + escape-html "~1.0.3" + etag "~1.8.1" + finalhandler "~1.1.2" + fresh "0.5.2" + merge-descriptors "1.0.1" + methods "~1.1.2" + on-finished "~2.3.0" + parseurl "~1.3.3" + path-to-regexp "0.1.7" + proxy-addr "~2.0.7" + qs "6.9.6" + range-parser "~1.2.1" + safe-buffer "5.2.1" + send "0.17.2" + serve-static "1.14.2" + setprototypeof "1.2.0" + statuses "~1.5.0" + type-is "~1.6.18" + utils-merge "1.0.1" + vary "~1.1.2" + +extend@~3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" + integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g== + +extsprintf@1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05" + integrity sha1-lpGEQOMEGnpBT4xS48V06zw+HgU= + +extsprintf@^1.2.0: + version "1.4.1" + resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.1.tgz#8d172c064867f235c0c84a596806d279bf4bcc07" + integrity sha512-Wrk35e8ydCKDj/ArClo1VrPVmN8zph5V4AtHwIuHhvMXsKf73UT3BOD+azBIW+3wOJ4FhEH7zyaJCFvChjYvMA== + +fast-deep-equal@^3.1.1: + version "3.1.3" + resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" + integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== + +fast-json-stable-stringify@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" + integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== + +finalhandler@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.1.2.tgz#b7e7d000ffd11938d0fdb053506f6ebabe9f587d" + integrity sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA== + dependencies: + debug "2.6.9" + encodeurl "~1.0.2" + escape-html "~1.0.3" + on-finished "~2.3.0" + parseurl "~1.3.3" + statuses "~1.5.0" + unpipe "~1.0.0" + +findit@2.0.x: + version "2.0.0" + resolved "https://registry.yarnpkg.com/findit/-/findit-2.0.0.tgz#6509f0126af4c178551cfa99394e032e13a4d56e" + integrity sha1-ZQnwEmr0wXhVHPqZOU4DLhOk1W4= + +foreachasync@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/foreachasync/-/foreachasync-3.0.0.tgz#5502987dc8714be3392097f32e0071c9dee07cf6" + integrity sha1-VQKYfchxS+M5IJfzLgBxyd7gfPY= + +forever-agent@~0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" + integrity sha1-+8cfDEGt6zf5bFd60e1C2P2sypE= + +form-data@~2.3.2: + version "2.3.3" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.3.tgz#dcce52c05f644f298c6a7ab936bd724ceffbf3a6" + integrity sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ== + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.6" + mime-types "^2.1.12" + +forwarded@0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.2.0.tgz#2269936428aad4c15c7ebe9779a84bf0b2a81811" + integrity sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow== + +fresh@0.5.2: + version "0.5.2" + resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7" + integrity sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac= + +fs-extra@~0.6.1: + version "0.6.4" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-0.6.4.tgz#f46f0c75b7841f8d200b3348cd4d691d5a099d15" + integrity sha1-9G8MdbeEH40gCzNIzU1pHVoJnRU= + dependencies: + jsonfile "~1.0.1" + mkdirp "0.3.x" + ncp "~0.4.2" + rimraf "~2.2.0" + +fs-minipass@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-2.1.0.tgz#7f5036fdbf12c63c169190cbe4199c852271f9fb" + integrity sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg== + dependencies: + minipass "^3.0.0" + +fs.extra@1.3.x: + version "1.3.2" + resolved "https://registry.yarnpkg.com/fs.extra/-/fs.extra-1.3.2.tgz#dd023f93013bee24531f1b33514c37b20fd93349" + integrity sha1-3QI/kwE77iRTHxszUUw3sg/ZM0k= + dependencies: + fs-extra "~0.6.1" + mkdirp "~0.3.5" + walk "^2.3.9" + +fs.realpath@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= + +function-bind@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" + integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== + +gauge@~2.7.3: + version "2.7.4" + resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.7.4.tgz#2c03405c7538c39d7eb37b317022e325fb018bf7" + integrity sha1-LANAXHU4w51+s3sxcCLjJfsBi/c= + dependencies: + aproba "^1.0.3" + console-control-strings "^1.0.0" + has-unicode "^2.0.0" + object-assign "^4.1.0" + signal-exit "^3.0.0" + string-width "^1.0.1" + strip-ansi "^3.0.1" + wide-align "^1.1.0" + +getpass@^0.1.1: + version "0.1.7" + resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa" + integrity sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo= + dependencies: + assert-plus "^1.0.0" + +glob@^7.1.3: + version "7.2.0" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.0.tgz#d15535af7732e02e948f4c41628bd910293f6023" + integrity sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.4" + once "^1.3.0" + path-is-absolute "^1.0.0" + +graceful-fs@^4.1.6: + version "4.2.9" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.9.tgz#041b05df45755e587a24942279b9d113146e1c96" + integrity sha512-NtNxqUcXgpW2iMrfqSfR73Glt39K+BLwWsPs94yR63v45T0Wbej7eRmL5cWfwEgqXnmjQp3zaJTshdRW/qC2ZQ== + +har-schema@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92" + integrity sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI= + +har-validator@~5.1.3: + version "5.1.5" + resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.1.5.tgz#1f0803b9f8cb20c0fa13822df1ecddb36bde1efd" + integrity sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w== + dependencies: + ajv "^6.12.3" + har-schema "^2.0.0" + +has-unicode@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" + integrity sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk= + +has@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" + integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== + dependencies: + function-bind "^1.1.1" + +hosted-git-info@^2.1.4, hosted-git-info@^2.7.1: + version "2.8.9" + resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.9.tgz#dffc0bf9a21c02209090f2aa69429e1414daf3f9" + integrity sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw== + +http-errors@1.8.1: + version "1.8.1" + resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.8.1.tgz#7c3f28577cbc8a207388455dbd62295ed07bd68c" + integrity sha512-Kpk9Sm7NmI+RHhnj6OIWDI1d6fIoFAtFt9RLaTMRlg/8w49juAStsrBgp0Dp4OdxdVbRIeKhtCUvoi/RuAhO4g== + dependencies: + depd "~1.1.2" + inherits "2.0.4" + setprototypeof "1.2.0" + statuses ">= 1.5.0 < 2" + toidentifier "1.0.1" + +http-signature@~1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1" + integrity sha1-muzZJRFHcvPZW2WmCruPfBj7rOE= + dependencies: + assert-plus "^1.0.0" + jsprim "^1.2.2" + sshpk "^1.7.0" + +iconv-lite@0.4.24: + version "0.4.24" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" + integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== + dependencies: + safer-buffer ">= 2.1.2 < 3" + +inflight@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + integrity sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk= + dependencies: + once "^1.3.0" + wrappy "1" + +inherits@2, inherits@2.0.4, inherits@^2.0.3, inherits@~2.0.0, inherits@~2.0.3: + version "2.0.4" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" + integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== + +ini@^1.2.0, ini@^1.3.4: + version "1.3.8" + resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.8.tgz#a29da425b48806f34767a4efce397269af28432c" + integrity sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew== + +ipaddr.js@1.9.1: + version "1.9.1" + resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.9.1.tgz#bff38543eeb8984825079ff3a2a8e6cbd46781b3" + integrity sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g== + +is-core-module@^2.8.1: + version "2.8.1" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.8.1.tgz#f59fdfca701d5879d0a6b100a40aa1560ce27211" + integrity sha512-SdNCUs284hr40hFTFP6l0IfZ/RSrMXF3qgoRHd3/79unUTvrFO/JoXwkGm+5J/Oe3E/b5GsnG330uUNgRpu1PA== + dependencies: + has "^1.0.3" + +is-fullwidth-code-point@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb" + integrity sha1-754xOG8DGn8NZDr4L95QxFfvAMs= + dependencies: + number-is-nan "^1.0.0" + +is-fullwidth-code-point@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" + integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== + +is-typedarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" + integrity sha1-5HnICFjfDBsR3dppQPlgEfzaSpo= + +isarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" + integrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE= + +isstream@~0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" + integrity sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo= + +jsbn@~0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" + integrity sha1-peZUwuWi3rXyAdls77yoDA7y9RM= + +json-schema-traverse@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" + integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== + +json-schema@0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.4.0.tgz#f7de4cf6efab838ebaeb3236474cbba5a1930ab5" + integrity sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA== + +json-stringify-safe@~5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" + integrity sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus= + +jsonfile@~1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-1.0.1.tgz#ea5efe40b83690b98667614a7392fc60e842c0dd" + integrity sha1-6l7+QLg2kLmGZ2FKc5L8YOhCwN0= + +jsprim@^1.2.2: + version "1.4.2" + resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.2.tgz#712c65533a15c878ba59e9ed5f0e26d5b77c5feb" + integrity sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw== + dependencies: + assert-plus "1.0.0" + extsprintf "1.3.0" + json-schema "0.4.0" + verror "1.10.0" + +logplease@^1.2.15: + version "1.2.15" + resolved "https://registry.yarnpkg.com/logplease/-/logplease-1.2.15.tgz#3da442e93751a5992cc19010a826b08d0293c48a" + integrity sha512-jLlHnlsPSJjpwUfcNyUxXCl33AYg2cHhIf9QhGL2T4iPT0XPB+xP1LRKFPgIg1M/sg9kAJvy94w9CzBNrfnstA== + +lru-cache@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94" + integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA== + dependencies: + yallist "^4.0.0" + +media-typer@0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" + integrity sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g= + +merge-descriptors@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61" + integrity sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E= + +methods@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" + integrity sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4= + +mime-db@1.51.0: + version "1.51.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.51.0.tgz#d9ff62451859b18342d960850dc3cfb77e63fb0c" + integrity sha512-5y8A56jg7XVQx2mbv1lu49NR4dokRnhZYTtL+KGfaa27uq4pSTXkwQkFJl4pkRMyNFz/EtYDSkiiEHx3F7UN6g== + +mime-types@^2.1.12, mime-types@~2.1.19, mime-types@~2.1.24: + version "2.1.34" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.34.tgz#5a712f9ec1503511a945803640fafe09d3793c24" + integrity sha512-6cP692WwGIs9XXdOO4++N+7qjqv0rqxxVvJ3VHPh/Sc9mVZcQP+ZGhkKiTvWMQRr2tbHkJP/Yn7Y0npb3ZBs4A== + dependencies: + mime-db "1.51.0" + +mime@1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" + integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg== + +minimatch@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" + integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== + dependencies: + brace-expansion "^1.1.7" + +minimist@^1.2.5: + version "1.2.5" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" + integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw== + +minipass@^3.0.0: + version "3.1.6" + resolved "https://registry.yarnpkg.com/minipass/-/minipass-3.1.6.tgz#3b8150aa688a711a1521af5e8779c1d3bb4f45ee" + integrity sha512-rty5kpw9/z8SX9dmxblFA6edItUmwJgMeYDZRrwlIVN27i8gysGbznJwUggw2V/FVqFSDdWy040ZPS811DYAqQ== + dependencies: + yallist "^4.0.0" + +minizlib@^2.1.1: + version "2.1.2" + resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-2.1.2.tgz#e90d3466ba209b932451508a11ce3d3632145931" + integrity sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg== + dependencies: + minipass "^3.0.0" + yallist "^4.0.0" + +mkdirp@0.3.x, mkdirp@~0.3.5: + version "0.3.5" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.3.5.tgz#de3e5f8961c88c787ee1368df849ac4413eca8d7" + integrity sha1-3j5fiWHIjHh+4TaN+EmsRBPsqNc= + +mkdirp@^0.5.0, mkdirp@^0.5.1: + version "0.5.5" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.5.tgz#d91cefd62d1436ca0f41620e251288d420099def" + integrity sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ== + dependencies: + minimist "^1.2.5" + +mkdirp@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" + integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== + +ms@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" + integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g= + +ms@2.1.3: + version "2.1.3" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" + integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== + +ncp@~0.4.2: + version "0.4.2" + resolved "https://registry.yarnpkg.com/ncp/-/ncp-0.4.2.tgz#abcc6cbd3ec2ed2a729ff6e7c1fa8f01784a8574" + integrity sha1-q8xsvT7C7Spyn/bnwfqPAXhKhXQ= + +negotiator@0.6.2: + version "0.6.2" + resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.2.tgz#feacf7ccf525a77ae9634436a64883ffeca346fb" + integrity sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw== + +nijs@0.0.25: + version "0.0.25" + resolved "https://registry.yarnpkg.com/nijs/-/nijs-0.0.25.tgz#04b035cb530d46859d1018839a518c029133f676" + integrity sha1-BLA1y1MNRoWdEBiDmlGMApEz9nY= + dependencies: + optparse ">= 1.0.3" + slasp "0.0.4" + +"nocamel@git://github.com/HexF/nocamel.git#patch-1": + version "1.1.0" + resolved "git://github.com/HexF/nocamel.git#89a5bfbbd07c72c302d968b967d0f4fe54846544" + +node-fetch@^2.6.1: + version "2.6.7" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.7.tgz#24de9fba827e3b4ae44dc8b20256a379160052ad" + integrity sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ== + dependencies: + whatwg-url "^5.0.0" + +node2nix@^1.6.0: + version "1.10.0" + resolved "https://registry.yarnpkg.com/node2nix/-/node2nix-1.10.0.tgz#e206b9ca228e36878f09d9e8fd931097a2bb58ff" + integrity sha512-3hUEkGeUl9X2FQCeZ9K2/WiSdBjXVKMnGz7qQVGuWnyxwA8xqWi+dQueTd+YmOA7LmZAseQgok1CUcoTR7d2FQ== + dependencies: + base64-js "1.5.x" + findit "2.0.x" + fs.extra "1.3.x" + nijs "0.0.25" + npm-registry-client "8.6.x" + npmconf "2.1.x" + optparse "1.0.x" + semver "7.3.x" + slasp "0.0.4" + spdx-license-ids "3.0.x" + tar "6.1.x" + temp "0.9.x" + +nopt@~3.0.1: + version "3.0.6" + resolved "https://registry.yarnpkg.com/nopt/-/nopt-3.0.6.tgz#c6465dbf08abcd4db359317f79ac68a646b28ff9" + integrity sha1-xkZdvwirzU2zWTF/eaxopkayj/k= + dependencies: + abbrev "1" + +"normalize-package-data@~1.0.1 || ^2.0.0": + version "2.5.0" + resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.5.0.tgz#e66db1838b200c1dfc233225d12cb36520e234a8" + integrity sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA== + dependencies: + hosted-git-info "^2.1.4" + resolve "^1.10.0" + semver "2 || 3 || 4 || 5" + validate-npm-package-license "^3.0.1" + +"npm-package-arg@^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0": + version "6.1.1" + resolved "https://registry.yarnpkg.com/npm-package-arg/-/npm-package-arg-6.1.1.tgz#02168cb0a49a2b75bf988a28698de7b529df5cb7" + integrity sha512-qBpssaL3IOZWi5vEKUKW0cO7kzLeT+EQO9W8RsLOZf76KF9E/K9+wH0C7t06HXPpaH8WH5xF1MExLuCwbTqRUg== + dependencies: + hosted-git-info "^2.7.1" + osenv "^0.1.5" + semver "^5.6.0" + validate-npm-package-name "^3.0.0" + +npm-registry-client@8.6.x: + version "8.6.0" + resolved "https://registry.yarnpkg.com/npm-registry-client/-/npm-registry-client-8.6.0.tgz#7f1529f91450732e89f8518e0f21459deea3e4c4" + integrity sha512-Qs6P6nnopig+Y8gbzpeN/dkt+n7IyVd8f45NTMotGk6Qo7GfBmzwYx6jRLoOOgKiMnaQfYxsuyQlD8Mc3guBhg== + dependencies: + concat-stream "^1.5.2" + graceful-fs "^4.1.6" + normalize-package-data "~1.0.1 || ^2.0.0" + npm-package-arg "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0" + once "^1.3.3" + request "^2.74.0" + retry "^0.10.0" + safe-buffer "^5.1.1" + semver "2 >=2.2.1 || 3.x || 4 || 5" + slide "^1.1.3" + ssri "^5.2.4" + optionalDependencies: + npmlog "2 || ^3.1.0 || ^4.0.0" + +npmconf@2.1.x: + version "2.1.3" + resolved "https://registry.yarnpkg.com/npmconf/-/npmconf-2.1.3.tgz#1cbe5dd02e899d365fed7260b54055473f90a15c" + integrity sha512-iTK+HI68GceCoGOHAQiJ/ik1iDfI7S+cgyG8A+PP18IU3X83kRhQIRhAUNj4Bp2JMx6Zrt5kCiozYa9uGWTjhA== + dependencies: + config-chain "~1.1.8" + inherits "~2.0.0" + ini "^1.2.0" + mkdirp "^0.5.0" + nopt "~3.0.1" + once "~1.3.0" + osenv "^0.1.0" + safe-buffer "^5.1.1" + semver "2 || 3 || 4" + uid-number "0.0.5" + +"npmlog@2 || ^3.1.0 || ^4.0.0": + version "4.1.2" + resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b" + integrity sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg== + dependencies: + are-we-there-yet "~1.1.2" + console-control-strings "~1.1.0" + gauge "~2.7.3" + set-blocking "~2.0.0" + +number-is-nan@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" + integrity sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0= + +oauth-sign@~0.9.0: + version "0.9.0" + resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.9.0.tgz#47a7b016baa68b5fa0ecf3dee08a85c679ac6455" + integrity sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ== + +object-assign@^4.1.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" + integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= + +on-finished@~2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947" + integrity sha1-IPEzZIGwg811M3mSoWlxqi2QaUc= + dependencies: + ee-first "1.1.1" + +once@^1.3.0, once@^1.3.3: + version "1.4.0" + resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E= + dependencies: + wrappy "1" + +once@~1.3.0: + version "1.3.3" + resolved "https://registry.yarnpkg.com/once/-/once-1.3.3.tgz#b2e261557ce4c314ec8304f3fa82663e4297ca20" + integrity sha1-suJhVXzkwxTsgwTz+oJmPkKXyiA= + dependencies: + wrappy "1" + +optparse@1.0.x, "optparse@>= 1.0.3": + version "1.0.5" + resolved "https://registry.yarnpkg.com/optparse/-/optparse-1.0.5.tgz#75e75a96506611eb1c65ba89018ff08a981e2c16" + integrity sha1-dedallBmEescZbqJAY/wipgeLBY= + +os-homedir@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" + integrity sha1-/7xJiDNuDoM94MFox+8VISGqf7M= + +os-tmpdir@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" + integrity sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ= + +osenv@^0.1.0, osenv@^0.1.5: + version "0.1.5" + resolved "https://registry.yarnpkg.com/osenv/-/osenv-0.1.5.tgz#85cdfafaeb28e8677f416e287592b5f3f49ea410" + integrity sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g== + dependencies: + os-homedir "^1.0.0" + os-tmpdir "^1.0.0" + +parseurl@~1.3.3: + version "1.3.3" + resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4" + integrity sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ== + +path-is-absolute@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" + integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= + +path-parse@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" + integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== + +path-to-regexp@0.1.7: + version "0.1.7" + resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c" + integrity sha1-32BBeABfUi8V60SQ5yR6G/qmf4w= + +performance-now@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" + integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns= + +prettier@2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.2.1.tgz#795a1a78dd52f073da0cd42b21f9c91381923ff5" + integrity sha512-PqyhM2yCjg/oKkFPtTGUojv7gnZAoG80ttl45O6x2Ug/rMJw4wcc9k6aaf2hibP7BGVCCM33gZoGjyvt9mm16Q== + +process-nextick-args@~2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" + integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== + +proto-list@~1.2.1: + version "1.2.4" + resolved "https://registry.yarnpkg.com/proto-list/-/proto-list-1.2.4.tgz#212d5bfe1318306a420f6402b8e26ff39647a849" + integrity sha1-IS1b/hMYMGpCD2QCuOJv85ZHqEk= + +proxy-addr@~2.0.7: + version "2.0.7" + resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.7.tgz#f19fe69ceab311eeb94b42e70e8c2070f9ba1025" + integrity sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg== + dependencies: + forwarded "0.2.0" + ipaddr.js "1.9.1" + +psl@^1.1.28: + version "1.8.0" + resolved "https://registry.yarnpkg.com/psl/-/psl-1.8.0.tgz#9326f8bcfb013adcc005fdff056acce020e51c24" + integrity sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ== + +punycode@^2.1.0, punycode@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" + integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== + +qs@6.9.6: + version "6.9.6" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.9.6.tgz#26ed3c8243a431b2924aca84cc90471f35d5a0ee" + integrity sha512-TIRk4aqYLNoJUbd+g2lEdz5kLWIuTMRagAXxl78Q0RiVjAOugHmeKNGdd3cwo/ktpf9aL9epCfFqWDEKysUlLQ== + +qs@~6.5.2: + version "6.5.3" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.3.tgz#3aeeffc91967ef6e35c0e488ef46fb296ab76aad" + integrity sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA== + +range-parser@~1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.1.tgz#3cf37023d199e1c24d1a55b84800c2f3e6468031" + integrity sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg== + +raw-body@2.4.2: + version "2.4.2" + resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.4.2.tgz#baf3e9c21eebced59dd6533ac872b71f7b61cb32" + integrity sha512-RPMAFUJP19WIet/99ngh6Iv8fzAbqum4Li7AD6DtGaW2RpMB/11xDoalPiJMTbu6I3hkbMVkATvZrqb9EEqeeQ== + dependencies: + bytes "3.1.1" + http-errors "1.8.1" + iconv-lite "0.4.24" + unpipe "1.0.0" + +readable-stream@^2.0.6, readable-stream@^2.2.2: + version "2.3.7" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57" + integrity sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw== + 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" + +request@^2.74.0: + version "2.88.2" + resolved "https://registry.yarnpkg.com/request/-/request-2.88.2.tgz#d73c918731cb5a87da047e207234146f664d12b3" + integrity sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw== + dependencies: + aws-sign2 "~0.7.0" + aws4 "^1.8.0" + caseless "~0.12.0" + combined-stream "~1.0.6" + extend "~3.0.2" + forever-agent "~0.6.1" + form-data "~2.3.2" + har-validator "~5.1.3" + http-signature "~1.2.0" + is-typedarray "~1.0.0" + isstream "~0.1.2" + json-stringify-safe "~5.0.1" + mime-types "~2.1.19" + oauth-sign "~0.9.0" + performance-now "^2.1.0" + qs "~6.5.2" + safe-buffer "^5.1.2" + tough-cookie "~2.5.0" + tunnel-agent "^0.6.0" + uuid "^3.3.2" + +resolve@^1.10.0: + version "1.22.0" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.0.tgz#5e0b8c67c15df57a89bdbabe603a002f21731198" + integrity sha512-Hhtrw0nLeSrFQ7phPp4OOcVjLPIeMnRlr5mcnVuMe7M/7eBn98A3hmFRLoFo3DLZkivSYwhRUJTyPyWAk56WLw== + dependencies: + is-core-module "^2.8.1" + path-parse "^1.0.7" + supports-preserve-symlinks-flag "^1.0.0" + +retry@^0.10.0: + version "0.10.1" + resolved "https://registry.yarnpkg.com/retry/-/retry-0.10.1.tgz#e76388d217992c252750241d3d3956fed98d8ff4" + integrity sha1-52OI0heZLCUnUCQdPTlW/tmNj/Q= + +rimraf@~2.2.0: + version "2.2.8" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.2.8.tgz#e439be2aaee327321952730f99a8929e4fc50582" + integrity sha1-5Dm+Kq7jJzIZUnMPmaiSnk/FBYI= + +rimraf@~2.6.2: + version "2.6.3" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.3.tgz#b2d104fe0d8fb27cf9e0a1cda8262dd3833c6cab" + integrity sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA== + dependencies: + glob "^7.1.3" + +safe-buffer@5.2.1, safe-buffer@^5.0.1, safe-buffer@^5.1.1, safe-buffer@^5.1.2: + version "5.2.1" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" + integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== + +safe-buffer@~5.1.0, safe-buffer@~5.1.1: + version "5.1.2" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" + integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== + +"safer-buffer@>= 2.1.2 < 3", safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0: + version "2.1.2" + resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" + integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== + +"semver@2 >=2.2.1 || 3.x || 4 || 5", "semver@2 || 3 || 4 || 5", semver@^5.6.0: + version "5.7.1" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" + integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== + +"semver@2 || 3 || 4": + version "4.3.6" + resolved "https://registry.yarnpkg.com/semver/-/semver-4.3.6.tgz#300bc6e0e86374f7ba61068b5b1ecd57fc6532da" + integrity sha1-MAvG4OhjdPe6YQaLWx7NV/xlMto= + +semver@7.3.x: + version "7.3.5" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.5.tgz#0b621c879348d8998e4b0e4be94b3f12e6018ef7" + integrity sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ== + dependencies: + lru-cache "^6.0.0" + +send@0.17.2: + version "0.17.2" + resolved "https://registry.yarnpkg.com/send/-/send-0.17.2.tgz#926622f76601c41808012c8bf1688fe3906f7820" + integrity sha512-UJYB6wFSJE3G00nEivR5rgWp8c2xXvJ3OPWPhmuteU0IKj8nKbG3DrjiOmLwpnHGYWAVwA69zmTm++YG0Hmwww== + dependencies: + debug "2.6.9" + depd "~1.1.2" + destroy "~1.0.4" + encodeurl "~1.0.2" + escape-html "~1.0.3" + etag "~1.8.1" + fresh "0.5.2" + http-errors "1.8.1" + mime "1.6.0" + ms "2.1.3" + on-finished "~2.3.0" + range-parser "~1.2.1" + statuses "~1.5.0" + +serve-static@1.14.2: + version "1.14.2" + resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.14.2.tgz#722d6294b1d62626d41b43a013ece4598d292bfa" + integrity sha512-+TMNA9AFxUEGuC0z2mevogSnn9MXKb4fa7ngeRMJaaGv8vTwnIEkKi+QGvPt33HSnf8pRS+WGM0EbMtCJLKMBQ== + dependencies: + encodeurl "~1.0.2" + escape-html "~1.0.3" + parseurl "~1.3.3" + send "0.17.2" + +set-blocking@~2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" + integrity sha1-BF+XgtARrppoA93TgrJDkrPYkPc= + +setprototypeof@1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.2.0.tgz#66c9a24a73f9fc28cbe66b09fed3d33dcaf1b424" + integrity sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw== + +signal-exit@^3.0.0: + version "3.0.6" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.6.tgz#24e630c4b0f03fea446a2bd299e62b4a6ca8d0af" + integrity sha512-sDl4qMFpijcGw22U5w63KmD3cZJfBuFlVNbVMKje2keoKML7X2UzWbc4XrmEbDwg0NXJc3yv4/ox7b+JWb57kQ== + +slasp@0.0.4: + version "0.0.4" + resolved "https://registry.yarnpkg.com/slasp/-/slasp-0.0.4.tgz#9adc26ee729a0f95095851a5489f87a5258d57a9" + integrity sha1-mtwm7nKaD5UJWFGlSJ+HpSWNV6k= + +slide@^1.1.3: + version "1.1.6" + resolved "https://registry.yarnpkg.com/slide/-/slide-1.1.6.tgz#56eb027d65b4d2dce6cb2e2d32c4d4afc9e1d707" + integrity sha1-VusCfWW00tzmyy4tMsTUr8nh1wc= + +spdx-correct@^3.0.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.1.1.tgz#dece81ac9c1e6713e5f7d1b6f17d468fa53d89a9" + integrity sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w== + dependencies: + spdx-expression-parse "^3.0.0" + spdx-license-ids "^3.0.0" + +spdx-exceptions@^2.1.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz#3f28ce1a77a00372683eade4a433183527a2163d" + integrity sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A== + +spdx-expression-parse@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz#cf70f50482eefdc98e3ce0a6833e4a53ceeba679" + integrity sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q== + dependencies: + spdx-exceptions "^2.1.0" + spdx-license-ids "^3.0.0" + +spdx-license-ids@3.0.x, spdx-license-ids@^3.0.0: + version "3.0.11" + resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.11.tgz#50c0d8c40a14ec1bf449bae69a0ea4685a9d9f95" + integrity sha512-Ctl2BrFiM0X3MANYgj3CkygxhRmr9mi6xhejbdO960nF6EDJApTYpn0BQnDKlnNBULKiCN1n3w9EBkHK8ZWg+g== + +sshpk@^1.7.0: + version "1.17.0" + resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.17.0.tgz#578082d92d4fe612b13007496e543fa0fbcbe4c5" + integrity sha512-/9HIEs1ZXGhSPE8X6Ccm7Nam1z8KcoCqPdI7ecm1N33EzAetWahvQWVqLZtaZQ+IDKX4IyA2o0gBzqIMkAagHQ== + dependencies: + asn1 "~0.2.3" + assert-plus "^1.0.0" + bcrypt-pbkdf "^1.0.0" + dashdash "^1.12.0" + ecc-jsbn "~0.1.1" + getpass "^0.1.1" + jsbn "~0.1.0" + safer-buffer "^2.0.2" + tweetnacl "~0.14.0" + +ssri@^5.2.4: + version "5.3.0" + resolved "https://registry.yarnpkg.com/ssri/-/ssri-5.3.0.tgz#ba3872c9c6d33a0704a7d71ff045e5ec48999d06" + integrity sha512-XRSIPqLij52MtgoQavH/x/dU1qVKtWUAAZeOHsR9c2Ddi4XerFy3mc1alf+dLJKl9EUIm/Ht+EowFkTUOA6GAQ== + dependencies: + safe-buffer "^5.1.1" + +"statuses@>= 1.5.0 < 2", statuses@~1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c" + integrity sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow= + +string-width@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" + integrity sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M= + dependencies: + code-point-at "^1.0.0" + is-fullwidth-code-point "^1.0.0" + strip-ansi "^3.0.0" + +"string-width@^1.0.2 || 2 || 3 || 4": + version "4.2.3" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" + integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.1" + +string_decoder@~1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" + integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg== + dependencies: + safe-buffer "~5.1.0" + +strip-ansi@^3.0.0, strip-ansi@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" + integrity sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8= + dependencies: + ansi-regex "^2.0.0" + +strip-ansi@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== + dependencies: + ansi-regex "^5.0.1" + +supports-preserve-symlinks-flag@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" + integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== + +tar@6.1.x: + version "6.1.11" + resolved "https://registry.yarnpkg.com/tar/-/tar-6.1.11.tgz#6760a38f003afa1b2ffd0ffe9e9abbd0eab3d621" + integrity sha512-an/KZQzQUkZCkuoAA64hM92X0Urb6VpRhAFllDzz44U2mcD5scmT3zBc4VgVpkugF580+DQn8eAFSyoQt0tznA== + dependencies: + chownr "^2.0.0" + fs-minipass "^2.0.0" + minipass "^3.0.0" + minizlib "^2.1.1" + mkdirp "^1.0.3" + yallist "^4.0.0" + +temp@0.9.x: + version "0.9.4" + resolved "https://registry.yarnpkg.com/temp/-/temp-0.9.4.tgz#cd20a8580cb63635d0e4e9d4bd989d44286e7620" + integrity sha512-yYrrsWnrXMcdsnu/7YMYAofM1ktpL5By7vZhf15CrXijWWrEYZks5AXBudalfSWJLlnen/QUJUB5aoB0kqZUGA== + dependencies: + mkdirp "^0.5.1" + rimraf "~2.6.2" + +toidentifier@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.1.tgz#3be34321a88a820ed1bd80dfaa33e479fbb8dd35" + integrity sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA== + +tough-cookie@~2.5.0: + version "2.5.0" + resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.5.0.tgz#cd9fb2a0aa1d5a12b473bd9fb96fa3dcff65ade2" + integrity sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g== + dependencies: + psl "^1.1.28" + punycode "^2.1.1" + +tr46@~0.0.3: + version "0.0.3" + resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" + integrity sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o= + +tunnel-agent@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" + integrity sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0= + dependencies: + safe-buffer "^5.0.1" + +tweetnacl@^0.14.3, tweetnacl@~0.14.0: + version "0.14.5" + resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" + integrity sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q= + +type-is@~1.6.18: + version "1.6.18" + resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.18.tgz#4e552cd05df09467dcbc4ef739de89f2cf37c131" + integrity sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g== + dependencies: + media-typer "0.3.0" + mime-types "~2.1.24" + +typedarray@^0.0.6: + version "0.0.6" + resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" + integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= + +uid-number@0.0.5: + version "0.0.5" + resolved "https://registry.yarnpkg.com/uid-number/-/uid-number-0.0.5.tgz#5a3db23ef5dbd55b81fce0ec9a2ac6fccdebb81e" + integrity sha1-Wj2yPvXb1VuB/ODsmirG/M3ruB4= + +unpipe@1.0.0, unpipe@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" + integrity sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw= + +uri-js@^4.2.2: + version "4.4.1" + resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" + integrity sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg== + dependencies: + punycode "^2.1.0" + +util-deprecate@~1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" + integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= + +utils-merge@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" + integrity sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM= + +uuid@^3.3.2: + version "3.4.0" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee" + integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== + +uuid@^8.3.2: + version "8.3.2" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" + integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== + +validate-npm-package-license@^3.0.1: + version "3.0.4" + resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a" + integrity sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew== + dependencies: + spdx-correct "^3.0.0" + spdx-expression-parse "^3.0.0" + +validate-npm-package-name@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/validate-npm-package-name/-/validate-npm-package-name-3.0.0.tgz#5fa912d81eb7d0c74afc140de7317f0ca7df437e" + integrity sha1-X6kS2B630MdK/BQN5zF/DKffQ34= + dependencies: + builtins "^1.0.3" + +vary@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" + integrity sha1-IpnwLG3tMNSllhsLn3RSShj2NPw= + +verror@1.10.0: + version "1.10.0" + resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400" + integrity sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA= + dependencies: + assert-plus "^1.0.0" + core-util-is "1.0.2" + extsprintf "^1.2.0" + +"waitpid@git://github.com/HexF/node-waitpid.git": + version "0.1.1" + resolved "git://github.com/HexF/node-waitpid.git#a08d116a5d993a747624fe72ff890167be8c34aa" + +walk@^2.3.9: + version "2.3.15" + resolved "https://registry.yarnpkg.com/walk/-/walk-2.3.15.tgz#1b4611e959d656426bc521e2da5db3acecae2424" + integrity sha512-4eRTBZljBfIISK1Vnt69Gvr2w/wc3U6Vtrw7qiN5iqYJPH7LElcYh/iU4XWhdCy2dZqv1ToMyYlybDylfG/5Vg== + dependencies: + foreachasync "^3.0.0" + +webidl-conversions@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" + integrity sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE= + +whatwg-url@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-5.0.0.tgz#966454e8765462e37644d3626f6742ce8b70965d" + integrity sha1-lmRU6HZUYuN2RNNib2dCzotwll0= + dependencies: + tr46 "~0.0.3" + webidl-conversions "^3.0.0" + +wide-align@^1.1.0: + version "1.1.5" + resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.5.tgz#df1d4c206854369ecf3c9a4898f1b23fbd9d15d3" + integrity sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg== + dependencies: + string-width "^1.0.2 || 2 || 3 || 4" + +wrappy@1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= + +ws@^7.4.6: + version "7.5.6" + resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.6.tgz#e59fc509fb15ddfb65487ee9765c5a51dec5fe7b" + integrity sha512-6GLgCqo2cy2A2rjCNFlxQS6ZljG/coZfZXclldI8FB/1G3CCI36Zd8xy2HrFVACi8tfk5XrgLQEk+P0Tnz9UcA== + +yallist@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" + integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== diff --git a/builder/.gitignore b/builder/.gitignore deleted file mode 100644 index c795b05..0000000 --- a/builder/.gitignore +++ /dev/null @@ -1 +0,0 @@ -build \ No newline at end of file diff --git a/builder/Dockerfile b/builder/Dockerfile deleted file mode 100644 index a769f35..0000000 --- a/builder/Dockerfile +++ /dev/null @@ -1,2 +0,0 @@ -FROM ghcr.io/engineer-man/piston:latest -ADD . /piston/packages/ \ No newline at end of file diff --git a/builder/build.sh b/builder/build.sh deleted file mode 100755 index 8559eaf..0000000 --- a/builder/build.sh +++ /dev/null @@ -1,61 +0,0 @@ -#!/usr/bin/env bash - -# Build a container using the spec file provided - -help_msg(){ - echo "Usage: $0 [specfile] [tag]" - echo - echo "$1" - - exit 1 -} - -cleanup(){ - echo "Exiting..." - docker stop builder_piston_instance && docker rm builder_piston_instance -} - -fetch_packages(){ - local port=$((5535 + $RANDOM % 60000)) - mkdir build - # Start a piston container - docker run \ - -v "$PWD/build":'/piston/packages' \ - --tmpfs /piston/jobs \ - -dit \ - -p $port:2000 \ - --name builder_piston_instance \ - ghcr.io/engineer-man/piston - - # Ensure the CLI is installed - cd ../cli - npm i - cd - - - # Evalulate the specfile - ../cli/index.js -u "http://127.0.0.1:$port" ppman spec $1 -} - -build_container(){ - docker build -t $1 -f "$(dirname $0)/Dockerfile" "$PWD/build" -} - - -SPEC_FILE=$1 -TAG=$2 - -[ -z "$SPEC_FILE" ] && help_msg "specfile is required" -[ -z "$TAG" ] && help_msg "tag is required" - -[ -f "$SPEC_FILE" ] || help_msg "specfile does not exist" - -which node || help_msg "nodejs is required" -which npm || help_msg "npm is required" - -trap cleanup EXIT - -fetch_packages $SPEC_FILE -build_container $TAG - -echo "Start your custom piston container with" -echo "$ docker run --tmpfs /piston/jobs -dit -p 2000:2000 $TAG" \ No newline at end of file diff --git a/cli/commands/ppman.js b/cli/commands/ppman.js deleted file mode 100644 index ad2c879..0000000 --- a/cli/commands/ppman.js +++ /dev/null @@ -1,5 +0,0 @@ -exports.command = 'ppman'; -exports.aliases = ['pkg']; -exports.describe = 'Package Manager'; - -exports.builder = yargs => yargs.commandDir('ppman_commands').demandCommand(); diff --git a/cli/commands/ppman_commands/install.js b/cli/commands/ppman_commands/install.js deleted file mode 100644 index a47665d..0000000 --- a/cli/commands/ppman_commands/install.js +++ /dev/null @@ -1,39 +0,0 @@ -const chalk = require('chalk'); - -exports.command = ['install ']; -exports.aliases = ['i']; -exports.describe = 'Installs the named package'; - -//Splits the package into it's language and version -function split_package(package) { - [language, language_version] = package.split('='); - - res = { - language: language, - version: language_version || '*', - }; - return res; -} - -const msg_format = { - color: p => - `${ - p.language ? chalk.green.bold('✓') : chalk.red.bold('❌') - } Installation ${p.language ? 'succeeded' : 'failed: ' + p.message}`, - monochrome: p => - `Installation ${p.language ? 'succeeded' : 'failed: ' + p.message}`, - json: JSON.stringify, -}; - -exports.handler = async ({ axios, packages }) => { - const requests = packages.map(package => split_package(package)); - for (request of requests) { - try { - const install = await axios.post(`/api/v2/packages`, request); - - console.log(msg_format.color(install.data)); - } catch ({ response }) { - console.error(response.data.message); - } - } -}; diff --git a/cli/commands/ppman_commands/list.js b/cli/commands/ppman_commands/list.js deleted file mode 100644 index 0b09667..0000000 --- a/cli/commands/ppman_commands/list.js +++ /dev/null @@ -1,25 +0,0 @@ -const chalk = require('chalk'); - -exports.command = ['list']; -exports.aliases = ['l']; -exports.describe = 'Lists all available packages'; - -const msg_format = { - color: p => - `${chalk[p.installed ? 'green' : 'red']('•')} ${p.language} ${ - p.language_version - }`, - monochrome: p => - `${p.language} ${p.language_version} ${ - p.installed ? '(INSTALLED)' : '' - }`, - json: JSON.stringify, -}; - -exports.handler = async ({ axios }) => { - const packages = await axios.get('/api/v2/packages'); - - const pkg_msg = packages.data.map(msg_format.color).join('\n'); - - console.log(pkg_msg); -}; diff --git a/cli/commands/ppman_commands/spec.js b/cli/commands/ppman_commands/spec.js deleted file mode 100644 index 9c04857..0000000 --- a/cli/commands/ppman_commands/spec.js +++ /dev/null @@ -1,183 +0,0 @@ -const chalk = require('chalk'); -const fs = require('fs/promises'); -const minimatch = require('minimatch'); -const semver = require('semver'); - -exports.command = ['spec ']; -exports.aliases = ['s']; -exports.describe = - "Install the packages described in the spec file, uninstalling packages which aren't in the list"; - -function does_match(package, rule) { - const nameMatch = minimatch(package.language, rule.package_selector); - const versionMatch = semver.satisfies( - package.language_version, - rule.version_selector - ); - - return nameMatch && versionMatch; -} - -exports.handler = async ({ axios, specfile }) => { - const spec_contents = await fs.readFile(specfile); - const spec_lines = spec_contents.toString().split('\n'); - - const rules = []; - - for (const line of spec_lines) { - const rule = { - _raw: line.trim(), - comment: false, - package_selector: null, - version_selector: null, - negate: false, - }; - - if (line.starts_with('#')) { - rule.comment = true; - } else { - let l = line.trim(); - if (line.starts_with('!')) { - rule.negate = true; - l = line.slice(1).trim(); - } - - const [pkg, ver] = l.split(' ', 2); - rule.package_selector = pkg; - rule.version_selector = ver; - } - - if (rule._raw.length != 0) rules.push(rule); - } - - const packages_req = await axios.get('/api/v2/packages'); - const packages = packages_req.data; - - const installed = packages.filter(pkg => pkg.installed); - - let ensure_packages = []; - - for (const rule of rules) { - if (rule.comment) continue; - - const matches = []; - - if (!rule.negate) { - for (const package of packages) { - if (does_match(package, rule)) matches.push(package); - } - - const latest_matches = matches.filter(pkg => { - const versions = matches - .filter(x => x.language == pkg.language) - .map(x => x.language_version) - .sort(semver.rcompare); - return versions[0] == pkg.language_version; - }); - - for (const match of latest_matches) { - if ( - !ensure_packages.find( - pkg => - pkg.language == match.language && - pkg.language_version == match.language_version - ) - ) - ensure_packages.push(match); - } - } else { - ensure_packages = ensure_packages.filter( - pkg => !does_match(pkg, rule) - ); - } - } - - const operations = []; - - for (const package of ensure_packages) { - if (!package.installed) - operations.push({ - type: 'install', - package: package.language, - version: package.language_version, - }); - } - - for (const installed_package of installed) { - if ( - !ensure_packages.find( - pkg => - pkg.language == installed_package.language && - pkg.language_version == installed_package.language_version - ) - ) - operations.push({ - type: 'uninstall', - package: installed_package.language, - version: installed_package.language_version, - }); - } - - console.log(chalk.bold.yellow('Actions')); - for (const op of operations) { - console.log( - (op.type == 'install' - ? chalk.green('Install') - : chalk.red('Uninstall')) + ` ${op.package} ${op.version}` - ); - } - - if (operations.length == 0) { - console.log(chalk.gray('None')); - } - - for (const op of operations) { - if (op.type == 'install') { - try { - const install = await axios.post(`/api/v2/packages`, { - language: op.package, - version: op.version, - }); - - if (!install.data.language) - throw new Error(install.data.message); // Go to exception handler - - console.log( - chalk.bold.green('Installed'), - op.package, - op.version - ); - } catch (e) { - console.log( - chalk.bold.red('Failed to install') + - ` ${op.package} ${op.version}:`, - e.message - ); - } - } else if (op.type == 'uninstall') { - try { - const install = await axios.delete(`/api/v2/packages`, { - data: { - language: op.package, - version: op.version, - }, - }); - - if (!install.data.language) - throw new Error(install.data.message); // Go to exception handler - - console.log( - chalk.bold.green('Uninstalled'), - op.package, - op.version - ); - } catch (e) { - console.log( - chalk.bold.red('Failed to uninstall') + - ` ${op.package} ${op.version}:`, - e.message - ); - } - } - } -}; diff --git a/cli/commands/ppman_commands/uninstall.js b/cli/commands/ppman_commands/uninstall.js deleted file mode 100644 index 21d2198..0000000 --- a/cli/commands/ppman_commands/uninstall.js +++ /dev/null @@ -1,41 +0,0 @@ -const chalk = require('chalk'); - -exports.command = ['uninstall ']; -exports.aliases = ['u']; -exports.describe = 'Uninstalls the named package'; - -//Splits the package into it's language and version -function split_package(package) { - [language, language_version] = package.split('='); - - res = { - language: language, - version: language_version || '*', - }; - return res; -} - -const msg_format = { - color: p => - `${ - p.language ? chalk.green.bold('✓') : chalk.red.bold('❌') - } Uninstallation ${p.language ? 'succeeded' : 'failed: ' + p.message}`, - monochrome: p => - `Uninstallation ${p.language ? 'succeeded' : 'failed: ' + p.message}`, - json: JSON.stringify, -}; - -exports.handler = async ({ axios, packages }) => { - const requests = packages.map(package => split_package(package)); - for (request of requests) { - try { - const uninstall = await axios.delete(`/api/v2/packages`, { - data: request, - }); - - console.log(msg_format.color(uninstall.data)); - } catch ({ response }) { - console.error(response.data.message); - } - } -}; diff --git a/dev.pps b/dev.pps deleted file mode 100644 index b2e5a8c..0000000 --- a/dev.pps +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env -S piston ppman spec - -# Development Piston Packages -# Defines packages to be installed by developers - -# All packages, latest version -# Don't use this when connected to public repo, in excess of 10GB -* * diff --git a/docker-compose.dev.yaml b/docker-compose.dev.yaml deleted file mode 100644 index e69de29..0000000 diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..17242b3 --- /dev/null +++ b/flake.lock @@ -0,0 +1,26 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1643456774, + "narHash": "sha256-abP2nVe3bsndDQgkGxoLdBqHRzisYJSO6cwdEi+AMVc=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "5cf5cad0da6244da30be1b6da2ff3d44b6f3ebe5", + "type": "github" + }, + "original": { + "owner": "NixOS", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..cce2f11 --- /dev/null +++ b/flake.nix @@ -0,0 +1,118 @@ +{ + description = "Piston packages repo"; + inputs.nixpkgs.url = "github:NixOS/nixpkgs"; + + outputs = { self, nixpkgs }: + let + system = "x86_64-linux"; + pkgs = nixpkgs.legacyPackages.${system}; + args = { + inherit pkgs; + piston = { + mkRuntime = { + language, + version, + runtime? null, + run, + compile? null, + packages? null, + aliases? [], + tests + }: let + compileFile = if compile != null then + pkgs.writeShellScript "compile" compile + else null; + runFile = pkgs.writeShellScript "run" run; + metadata = { + inherit language version runtime aliases; + run = runFile; + compile = compileFile; + packageSupport = packages != null; + }; + in { + inherit packages metadata; + tests = if (builtins.length tests) > 0 then + tests + else abort "Language ${language} doesn't provide any tests"; + }; + mkTest = { + files, + args? [], + stdin? "", + packages? [], + main? null + }: { + inherit files args stdin packages; + main = if main == null then + ( + if (builtins.length (builtins.attrNames files)) == 1 then + (builtins.head (builtins.attrNames files)) + else abort "Could not determine the main file for test - specify it using the 'main' parameter" + ) + else main; + }; + }; + }; + allRuntimes = import ./runtimes args; + in { + piston = args.piston; + pistonRuntimes = { + "bash" = allRuntimes.bash; + }; + + legacyPackages."${system}" = { + piston = (import ./api { inherit pkgs; }).package; + nosocket = (import ./nosocket { inherit pkgs; }).package; + }; + + containerImage = pkgs.dockerTools.buildLayeredImageWithNixDb { + name = "piston"; + tag = "latest"; + + contents = with pkgs; [ + self.legacyPackages."${system}".piston + self.legacyPackages."${system}".nosocket + bash + nixFlakes + coreutils-full + cacert.out + git + gnutar + gzip + gnugrep + util-linux + ]; + + extraCommands = '' + mkdir -p piston/jobs etc/nix {,var/}tmp run/lock + echo -e "experimental-features = nix-command flakes" >> etc/nix/nix.conf + echo "nixbld:x:30000:nixbld1,nixbld10,nixbld11,nixbld12,nixbld13,nixbld14,nixbld15,nixbld16,nixbld17,nixbld18,nixbld19,nixbld2,nixbld20,nixbld21,nixbld22,nixbld23,nixbld24,nixbld25,nixbld26,nixbld27,nixbld28,nixbld29,nixbld3,nixbld30,nixbld31,nixbld32,nixbld4,nixbld5,nixbld6,nixbld7,nixbld8,nixbld9" >> etc/group + for i in $(seq 1 32) + do + echo "nixbld$i:x:$(( $i + 30000 )):30000:Nix build user $i:/var/empty:/run/current-system/sw/bin/nologin" >> etc/passwd + done + ''; + + config = { + Cmd = [ + "${self.legacyPackages."${system}".piston}/bin/pistond" + ]; + + Env = [ + "NIX_PAGER=cat" + "USER=nobody" + "SSL_CERT_FILE=/etc/ssl/certs/ca-bundle.crt" + "GIT_SSL_CAINFO=/etc/ssl/certs/ca-bundle.crt" + "NIX_SSL_CERT_FILE=/etc/ssl/certs/ca-bundle.crt" + + ]; + + ExposedPorts = { + "2000/tcp" = {}; + }; + }; + }; + + + }; +} diff --git a/api/src/nosocket/Makefile b/nosocket/Makefile similarity index 100% rename from api/src/nosocket/Makefile rename to nosocket/Makefile diff --git a/nosocket/default.nix b/nosocket/default.nix new file mode 100644 index 0000000..35efc18 --- /dev/null +++ b/nosocket/default.nix @@ -0,0 +1,24 @@ +{pkgs, ...}: +with pkgs; { + package = stdenv.mkDerivation { + name = "nosocket-1.0.0"; + + dontUnpack = true; + + + src = ./nosocket.c; + + buildInputs = [ + libseccomp + ]; + + buildPhase = '' + gcc $src -O2 -Wall -lseccomp -o nosocket + ''; + + installPhase = '' + mkdir -p $out/bin + cp nosocket $out/bin + ''; + }; +} \ No newline at end of file diff --git a/api/src/nosocket/nosocket.c b/nosocket/nosocket.c similarity index 100% rename from api/src/nosocket/nosocket.c rename to nosocket/nosocket.c diff --git a/package-lock.json b/package-lock.json deleted file mode 100644 index 5c51a1d..0000000 --- a/package-lock.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "name": "piston", - "lockfileVersion": 2, - "requires": true, - "packages": { - "": { - "devDependencies": { - "prettier": "2.4.1" - } - }, - "node_modules/prettier": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.4.1.tgz", - "integrity": "sha512-9fbDAXSBcc6Bs1mZrDYb3XKzDLm4EXXL9sC1LqKP5rZkT6KRr/rf9amVUcODVXgguK/isJz0d0hP72WeaKWsvA==", - "dev": true, - "bin": { - "prettier": "bin-prettier.js" - }, - "engines": { - "node": ">=10.13.0" - } - } - }, - "dependencies": { - "prettier": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.4.1.tgz", - "integrity": "sha512-9fbDAXSBcc6Bs1mZrDYb3XKzDLm4EXXL9sC1LqKP5rZkT6KRr/rf9amVUcODVXgguK/isJz0d0hP72WeaKWsvA==", - "dev": true - } - } -} diff --git a/package.json b/package.json deleted file mode 100644 index 8f07606..0000000 --- a/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "devDependencies": { - "prettier": "2.4.1" - } -} diff --git a/packages/.gitignore b/packages/.gitignore deleted file mode 100644 index d98ab0b..0000000 --- a/packages/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -*/*/* -*.pkg.tar.gz -!*/*/metadata.json -!*/*/build.sh -!*/*/environment -!*/*/run -!*/*/compile -!*/*/test.* \ No newline at end of file diff --git a/packages/CONTRIBUTING.MD b/packages/CONTRIBUTING.MD deleted file mode 100644 index 53deda9..0000000 --- a/packages/CONTRIBUTING.MD +++ /dev/null @@ -1,100 +0,0 @@ -# Contributing packages to the Piston Repository - -## Naming Languages - -Languages should be named after their interpreters, and the command line binaries you call. The language version should use semantic versioning. -For example, the full name of the standard python interpreter is `CPython`, however we would name it `python`, after the main binary which it provides. -In the example of NodeJS, we would call this `node`, after the main binary. - -## Creating new languages - -See [deno/1.7.5/](deno/1.7.5/) or any other directory for examples. - -1. Create a new branch on your fork of engineer-man/piston - -2. Create directories named `[language]/[version]`. See Naming Languages for how to determine the name for your language - -3. Create a file named `build.sh`, adding a shebang for bash `#!/bin/bash` on the first line. -In this file put any steps to compile the specified langauge. -This script should download sources, compile sources and output binaries. They should be dumped into the current working directory, removing any files which aren't required in the process. - -4. Create a file named `run`, containing bash script to run the interpreter. -The first argument given to this script (`$1`) is the name of the main file, with the remaining ones as program arguments. -STDIN is piped directly into the run file, and as such nothing special is required to deal with STDIN, except leaving it open. - -5. Create a file named `compile`, containing bash script to compile sources into binaries. This is only required if the language requires a compling stage. -The first argument is always the main file, followed the names of the other files as additional arguements. If the language does not require a compile stage, don't create a compile file. - -6. Create a file named `environment`, containing `export` statements which edit the environment variables accordingly. The `$PWD` variable should be used, and is set inside the package directory when running on the target system. - -7. Create a test script starting with test, with the file extension of the language. This script should simply output the phrase `OK`. For example, for mono we would create `test.cs` with the content: -```cs -using System; - -public class Test -{ - public static void Main(string[] args) - { - Console.WriteLine("OK"); - } -} -``` - -8. Create a `metadata.json` file which contains metadata about the language and interpreter. This simply contains the language name, as in the folder name, the version as in the folder name, aliases that can be used to call this package, limit overrides (if any) that can be used to override the default constraints and finally a dependencies map. -The dependencies map contains the keys as language names, and the values as semver selectors for packages. -```json -{ - "language": "deno", - "version": "1.7.5", - "dependencies": {}, - "aliases": ["deno-ts", "deno-js"] -} -``` -If the interpreter/compiler provides multiple languages, then the provides property should be used: -```json -{ - "language": "dotnet", - "version": "5.0.201", - "provides": [ - { - "language": "basic.net", - "aliases": [ - "basic", - "visual-basic", - "visual-basic.net", - "vb", - "vb.net", - "vb-dotnet", - "dotnet-vb", - "basic-dotnet", - "dotnet-basic" - ], - "limit_overrides": { "max_process_count": 128 } - }, - { - "language": "fsi", - "aliases": [ - "fsx", - "fsharp-interactive", - "f#-interactive", - "dotnet-fsi", - "fsi-dotnet", - "fsi.net" - ] - } - ] -} -``` - -9. Test your package builds with running `make [language]-[version].pkg.tar.gz`. -If it all goes to plan, you should have a file named `[language]-[version].pkg.tar.gz`, in this case you're good to go, albeit it is preferable to test the package locally as follows -```shell -./piston build-pkg [package] [version] -./piston ppman install [package]=[version] -./piston run [package] -l [version] packages/[package]/[version]/test.* -``` - -10. Commit your changes, using message format of `pkg([language]-[version]): Added [language] [version]` -Any additional commits regarding this package should start with `pkg([language]-[version]): ` - -11. Create a pull request (currently to v3 branch), referencing an Issue number (if there is one associated). diff --git a/packages/Makefile b/packages/Makefile deleted file mode 100644 index 22566f2..0000000 --- a/packages/Makefile +++ /dev/null @@ -1,25 +0,0 @@ -PACKAGES=$(subst /,-,$(shell find * -maxdepth 1 -mindepth 1 -type d)) -BUILD_PLATFORM=$(or ${PLATFORM},baremetal-$(shell grep -oP "^ID=\K.+" /etc/os-release)) - -help: - @echo "You probably don't want to build all package" - @echo "If you do run $`make build-all$`" - @echo - @echo "Run $`make [language]-[version].pkg.tar.gz$` to build a specific language" - -build build-all: $(addsuffix .pkg.tar.gz, ${PACKAGES}) - - -define PKG_RULE -$(1).pkg.tar.gz: $(subst -,/,$(1)) $(subst -,/,$(1))/pkg-info.json - cd $$< && chmod +x ./build.sh && ./build.sh - rm -f $$@ - - tar czf $$@ -C $$< . -endef - -$(foreach pkg,$(PACKAGES),$(eval $(call PKG_RULE,$(pkg)))) - -%/pkg-info.json: %/metadata.json - jq '.build_platform="${BUILD_PLATFORM}"' $< > $@ - diff --git a/packages/README.MD b/packages/README.MD deleted file mode 100644 index bcc3a93..0000000 --- a/packages/README.MD +++ /dev/null @@ -1,7 +0,0 @@ -# Piston Package Build Scripts - -## Building - -```bash -make build-[name]-[version] -``` diff --git a/packages/bash/5.1.0/build.sh b/packages/bash/5.1.0/build.sh deleted file mode 100755 index 657ae7a..0000000 --- a/packages/bash/5.1.0/build.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env bash - -# Put instructions to build your package in here -PREFIX=$(realpath $(dirname $0)) - -mkdir -p build - -cd build - -curl "https://ftp.gnu.org/gnu/bash/bash-5.1.tar.gz" -o bash.tar.gz - -tar xzf bash.tar.gz --strip-components=1 - -# === autoconf based === -./configure --prefix "$PREFIX" - -make -j$(nproc) -make install -j$(nproc) -cd ../ -rm -rf build - diff --git a/packages/bash/5.1.0/environment b/packages/bash/5.1.0/environment deleted file mode 100644 index 780b668..0000000 --- a/packages/bash/5.1.0/environment +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env bash - -# Put 'export' statements here for environment variables -export PATH=$PWD/bin:$PATH diff --git a/packages/bash/5.1.0/metadata.json b/packages/bash/5.1.0/metadata.json deleted file mode 100644 index 9ac1250..0000000 --- a/packages/bash/5.1.0/metadata.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "language": "bash", - "version": "5.1.0", - "aliases": ["sh"] -} diff --git a/packages/bash/5.1.0/run b/packages/bash/5.1.0/run deleted file mode 100644 index a8f3ffb..0000000 --- a/packages/bash/5.1.0/run +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env bash - -# Put instructions to run the runtime -bash "$@" diff --git a/packages/bash/5.1.0/test.bash.sh b/packages/bash/5.1.0/test.bash.sh deleted file mode 100644 index 727518f..0000000 --- a/packages/bash/5.1.0/test.bash.sh +++ /dev/null @@ -1 +0,0 @@ -echo "OK" \ No newline at end of file diff --git a/packages/clojure/1.10.3/build.sh b/packages/clojure/1.10.3/build.sh deleted file mode 100755 index 4633daf..0000000 --- a/packages/clojure/1.10.3/build.sh +++ /dev/null @@ -1,43 +0,0 @@ -#!/usr/bin/env bash - -# Installation location -PREFIX=$(realpath $(dirname $0)) - -# Clojure depends on Java (build and runtime) -mkdir -p java -cd java -curl "https://download.java.net/java/GA/jdk15.0.2/0d1cfde4252546c6931946de8db48ee2/7/GPL/openjdk-15.0.2_linux-x64_bin.tar.gz" -o java.tar.gz -tar xzf java.tar.gz --strip-components=1 -rm java.tar.gz -cd .. - -# Clojure depends on Maven (build) -mkdir -p maven -cd maven -curl "https://apache.claz.org/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.tar.gz" -o maven.tar.gz -tar xzf maven.tar.gz --strip-components=1 -rm maven.tar.gz -cd .. - -# Adding java and maven to the path for building -export PATH=$PWD/java/bin:$PWD/maven/bin:$PATH -export JAVA_HOME=$PWD/java - -# Clojure download -mkdir -p build -cd build -git clone -q "https://github.com/clojure/clojure.git" . -git checkout -b clojure-1.10.3 aaf73b12467df80f5db3e086550a33fee0e1b39e # commit for 1.10.3 release - -# Build using maven -mvn -Plocal -Dmaven.test.skip=true package - -# Get ridda that m2 bloat from Maven and remove Maven itself -cd ../ -rm -rf ~/.m2 -rm -rf maven/ - -# Move the jar for easier reference and cleanup -mkdir -p bin -mv build/clojure.jar bin -rm -rf build diff --git a/packages/clojure/1.10.3/environment b/packages/clojure/1.10.3/environment deleted file mode 100644 index e7ef3b1..0000000 --- a/packages/clojure/1.10.3/environment +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env bash - -# Clojure requires JAVA_HOME to be set and java binary to be in the path -export JAVA_HOME=$PWD/java -export CLOJURE_PATH=$PWD/bin -export PATH=$PWD/java/bin:$PATH diff --git a/packages/clojure/1.10.3/metadata.json b/packages/clojure/1.10.3/metadata.json deleted file mode 100644 index 847ecb6..0000000 --- a/packages/clojure/1.10.3/metadata.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "language": "clojure", - "version": "1.10.3", - "aliases": ["clojure", "clj"] -} diff --git a/packages/clojure/1.10.3/run b/packages/clojure/1.10.3/run deleted file mode 100644 index a8901af..0000000 --- a/packages/clojure/1.10.3/run +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env bash - -# Run clojure with Java referencing the clojure jar location -java -jar $CLOJURE_PATH/clojure.jar "$@" diff --git a/packages/clojure/1.10.3/test.clj b/packages/clojure/1.10.3/test.clj deleted file mode 100644 index 7f50202..0000000 --- a/packages/clojure/1.10.3/test.clj +++ /dev/null @@ -1,5 +0,0 @@ -(ns clojure.examples.main - (:gen-class)) -(defn main [] - (println "OK")) -(main) \ No newline at end of file diff --git a/packages/cobol/3.1.2/build.sh b/packages/cobol/3.1.2/build.sh deleted file mode 100755 index 1156fa8..0000000 --- a/packages/cobol/3.1.2/build.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/env bash - -# Put instructions to build your package in here -PREFIX=$(realpath $(dirname $0)) - -mkdir -p build - -cd build - -curl -OL "https://downloads.sourceforge.net/project/gnucobol/gnucobol/3.1/gnucobol-3.1.2.tar.xz" - -tar xf gnucobol-3.1.2.tar.xz --strip-components=1 - -# === autoconf based === -./configure --prefix "$PREFIX" --without-db - -make -j$(nproc) -make install -j$(nproc) -cd ../ -rm -rf build diff --git a/packages/cobol/3.1.2/compile b/packages/cobol/3.1.2/compile deleted file mode 100755 index 051eb75..0000000 --- a/packages/cobol/3.1.2/compile +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env bash -cobc -o binary --free -x -L lib "$@" -chmod +x binary - diff --git a/packages/cobol/3.1.2/environment b/packages/cobol/3.1.2/environment deleted file mode 100644 index ca711d7..0000000 --- a/packages/cobol/3.1.2/environment +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env bash - -export PATH=$PWD/bin:$PATH -export LD_LIBRARY_PATH=$PWD/lib - diff --git a/packages/cobol/3.1.2/metadata.json b/packages/cobol/3.1.2/metadata.json deleted file mode 100644 index 0a80d3c..0000000 --- a/packages/cobol/3.1.2/metadata.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "language": "cobol", - "version": "3.1.2", - "aliases": ["cob"] -} diff --git a/packages/cobol/3.1.2/run b/packages/cobol/3.1.2/run deleted file mode 100755 index 9dcedfa..0000000 --- a/packages/cobol/3.1.2/run +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env bash - -shift -./binary "$@" - diff --git a/packages/cobol/3.1.2/test.cob b/packages/cobol/3.1.2/test.cob deleted file mode 100644 index 1a03e66..0000000 --- a/packages/cobol/3.1.2/test.cob +++ /dev/null @@ -1,8 +0,0 @@ -*> Test Program -identification division. -program-id. ok-test. - -procedure division. -display "OK" -goback. -end program ok-test. diff --git a/packages/flake.lock b/packages/flake.lock deleted file mode 100644 index 14753b7..0000000 --- a/packages/flake.lock +++ /dev/null @@ -1,41 +0,0 @@ -{ - "nodes": { - "flake-utils": { - "locked": { - "lastModified": 1631561581, - "narHash": "sha256-3VQMV5zvxaVLvqqUrNz3iJelLw30mIVSfZmAaauM3dA=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "7e5bf3925f6fbdfaf50a2a7ca0be2879c4261d19", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "nixpkgs": { - "locked": { - "lastModified": 1633356775, - "narHash": "sha256-UBhRo1qy8xpOGTrjf7r2SFcULkFM+Wn4kchxN1ToDxs=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "38501bec61c1e9447aa4ffc01ba07c40f4515327", - "type": "github" - }, - "original": { - "id": "nixpkgs", - "type": "indirect" - } - }, - "root": { - "inputs": { - "flake-utils": "flake-utils", - "nixpkgs": "nixpkgs" - } - } - }, - "root": "root", - "version": 7 -} diff --git a/packages/flake.nix b/packages/flake.nix deleted file mode 100644 index 17a60d3..0000000 --- a/packages/flake.nix +++ /dev/null @@ -1,47 +0,0 @@ -{ - description = "Piston packages repo"; - inputs.flake-utils.url = "github:numtide/flake-utils"; - - outputs = { self, nixpkgs, flake-utils }: - let - system = "x86_64-linux"; - pkgs = nixpkgs.legacyPackages.${system}; - args = { - inherit pkgs; - piston = { - mkRuntime = { - language, - version, - runtime, - run, - compile? null, - aliases? [] - }: let - packageName = "${runtime}-${language}"; - compileFile = if compile != null then - pkgs.writeShellScript "compile" compile - else null; - runFile = pkgs.writeShellScript "run" run; - metadataFile = pkgs.writeText "metadata.json" (builtins.toJSON { - inherit language version runtime aliases; - }); - in pkgs.runCommandNoCC packageName {} - ( - '' - mkdir -p $out/piston - ln -s ${runFile} $out/piston/run - ln -s ${metadataFile} $out/piston/metadata.json - '' + ( - if compileFile != null then - '' - ln -s ${compileFile} $out/piston/compile - '' else "") - ); - }; - }; - in { - piston = { - "node-javascript" = import ./node-javascript.nix args; - }; - }; -} diff --git a/packages/init b/packages/init deleted file mode 100755 index 68a303b..0000000 --- a/packages/init +++ /dev/null @@ -1,64 +0,0 @@ -#!/usr/bin/env bash - -if [[ $# -lt 3 ]]; then - echo "Usage: $0 [name] [version] [source]" - echo "" - echo "Initializes an empty package" - exit 1 -fi - -NAME=$1 -VERSION=$2 -SOURCE=$3 - -DIR=$NAME/$VERSION - -mkdir -p $DIR - -build_instructions(){ - echo 'PREFIX=$(realpath $(dirname $0))' - echo - echo 'mkdir -p build' - echo - echo 'cd build' - echo - echo "curl \"$SOURCE\" -o $NAME.tar.gz" - echo - echo "tar xzf $NAME.tar.gz --strip-components=1" - echo - - echo "# === autoconf based ===" - echo './configure --prefix "$PREFIX"' - echo - echo 'make -j$(nproc)' - echo 'make install -j$(nproc)' - - echo 'cd ../' - echo 'rm -rf build' - -} - -cd $DIR - -for name in build.sh environment run compile; do - echo "#!/usr/bin/env bash" > "$name" - echo "" >> "$name" -done - -echo "# Put instructions to build your package in here" >> build.sh -echo "" -build_instructions >> build.sh - -echo "# Put 'export' statements here for environment variables" >> environment -echo "export PATH=\$PWD/bin:\$PATH" >> environment - -echo "# Put instructions to run the runtime" >> run -echo "$NAME-$VERSION \"\$@\"" >> run - -echo "# Put instructions to compile source code, remove this file if the language does not require this stage" >> compile - -jq '.language = "'$NAME'" | .version = "'$VERSION'" | .aliases = []' <<< "{}" > metadata.json - -cd - > /dev/null - -echo $DIR diff --git a/packages/node-javascript.nix b/packages/node-javascript.nix deleted file mode 100644 index 911e3c6..0000000 --- a/packages/node-javascript.nix +++ /dev/null @@ -1,17 +0,0 @@ -{pkgs, piston}: -piston.mkRuntime { - language = "javascript"; - version = pkgs.nodejs.version; - runtime = "node"; - - aliases = [ - "node-js" - "node-javascript" - "js" - ]; - - run = '' - ${pkgs.nodejs}/bin/node "$@" - ''; - -} \ No newline at end of file diff --git a/packages/node/15.10.0/build.sh b/packages/node/15.10.0/build.sh deleted file mode 100755 index 6a84798..0000000 --- a/packages/node/15.10.0/build.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash -curl "https://nodejs.org/dist/v15.10.0/node-v15.10.0-linux-x64.tar.xz" -o node.tar.xz -tar xf node.tar.xz --strip-components=1 -rm node.tar.xz diff --git a/packages/node/15.10.0/environment b/packages/node/15.10.0/environment deleted file mode 100644 index bd0ff98..0000000 --- a/packages/node/15.10.0/environment +++ /dev/null @@ -1 +0,0 @@ -export PATH=$PWD/bin:$PATH \ No newline at end of file diff --git a/packages/node/15.10.0/metadata.json b/packages/node/15.10.0/metadata.json deleted file mode 100644 index 3675016..0000000 --- a/packages/node/15.10.0/metadata.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "language": "node", - "version": "15.10.0", - "provides": [ - { - "language": "javascript", - "aliases": ["node-javascript", "node-js", "javascript", "js"] - } - ] -} diff --git a/packages/node/15.10.0/run b/packages/node/15.10.0/run deleted file mode 100644 index 6d1fdee..0000000 --- a/packages/node/15.10.0/run +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -node "$@" \ No newline at end of file diff --git a/packages/node/15.10.0/test.js b/packages/node/15.10.0/test.js deleted file mode 100644 index e106678..0000000 --- a/packages/node/15.10.0/test.js +++ /dev/null @@ -1 +0,0 @@ -console.log('OK'); diff --git a/packages/node/16.3.0/build.sh b/packages/node/16.3.0/build.sh deleted file mode 100755 index bbc19db..0000000 --- a/packages/node/16.3.0/build.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash -curl "https://nodejs.org/dist/v16.3.0/node-v16.3.0-linux-x64.tar.xz" -o node.tar.xz -tar xf node.tar.xz --strip-components=1 -rm node.tar.xz diff --git a/packages/node/16.3.0/environment b/packages/node/16.3.0/environment deleted file mode 100644 index 977a5e8..0000000 --- a/packages/node/16.3.0/environment +++ /dev/null @@ -1 +0,0 @@ -export PATH=$PWD/bin:$PATH diff --git a/packages/node/16.3.0/metadata.json b/packages/node/16.3.0/metadata.json deleted file mode 100644 index ccd146a..0000000 --- a/packages/node/16.3.0/metadata.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "language": "node", - "version": "16.3.0", - "provides": [ - { - "language": "javascript", - "aliases": ["node-javascript", "node-js", "javascript", "js"] - } - ] -} diff --git a/packages/node/16.3.0/run b/packages/node/16.3.0/run deleted file mode 100644 index 6d1fdee..0000000 --- a/packages/node/16.3.0/run +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -node "$@" \ No newline at end of file diff --git a/packages/node/16.3.0/test.js b/packages/node/16.3.0/test.js deleted file mode 100644 index e106678..0000000 --- a/packages/node/16.3.0/test.js +++ /dev/null @@ -1 +0,0 @@ -console.log('OK'); diff --git a/packages/python/2.7.18/build.sh b/packages/python/2.7.18/build.sh deleted file mode 100755 index 131ba96..0000000 --- a/packages/python/2.7.18/build.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash - -PREFIX=$(realpath $(dirname $0)) - -mkdir -p build - -cd build - -curl "https://www.python.org/ftp/python/2.7.18/Python-2.7.18.tgz" -o python.tar.gz -tar xzf python.tar.gz --strip-components=1 -rm python.tar.gz - -./configure --prefix "$PREFIX" --with-ensurepip=install -make -j$(nproc) -make install -j$(nproc) - -cd .. - -rm -rf build -bin/pip2 install -U pip==20.3.* -# Upgrade pip to latest supported version - -bin/pip2 install numpy scipy pycrypto whoosh bcrypt passlib diff --git a/packages/python/2.7.18/environment b/packages/python/2.7.18/environment deleted file mode 100644 index bd0ff98..0000000 --- a/packages/python/2.7.18/environment +++ /dev/null @@ -1 +0,0 @@ -export PATH=$PWD/bin:$PATH \ No newline at end of file diff --git a/packages/python/2.7.18/metadata.json b/packages/python/2.7.18/metadata.json deleted file mode 100644 index b825f8e..0000000 --- a/packages/python/2.7.18/metadata.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "language": "python2", - "version": "2.7.18", - "aliases": ["py2", "python2"] -} diff --git a/packages/python/2.7.18/run b/packages/python/2.7.18/run deleted file mode 100644 index 9858f52..0000000 --- a/packages/python/2.7.18/run +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -python2.7 "$@" \ No newline at end of file diff --git a/packages/python/2.7.18/test.py b/packages/python/2.7.18/test.py deleted file mode 100644 index d9708c5..0000000 --- a/packages/python/2.7.18/test.py +++ /dev/null @@ -1 +0,0 @@ -print "OK" \ No newline at end of file diff --git a/packages/python/3.10.0-alpha.7/build.sh b/packages/python/3.10.0-alpha.7/build.sh deleted file mode 100755 index 914353f..0000000 --- a/packages/python/3.10.0-alpha.7/build.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/bash - -PREFIX=$(realpath $(dirname $0)) - -mkdir -p build - -cd build - -curl "https://www.python.org/ftp/python/3.10.0/Python-3.10.0a7.tgz" -o python.tar.gz -tar xzf python.tar.gz --strip-components=1 -rm python.tar.gz - -./configure --prefix "$PREFIX" --with-ensurepip=install -make -j$(nproc) -make install -j$(nproc) - -cd .. - -rm -rf build - -# This is alpha version, hence most of the libraries are not compatible with python3.10.0 -# bin/pip3 install numpy scipy pandas pycrypto whoosh bcrypt passlib diff --git a/packages/python/3.10.0-alpha.7/environment b/packages/python/3.10.0-alpha.7/environment deleted file mode 100644 index bd0ff98..0000000 --- a/packages/python/3.10.0-alpha.7/environment +++ /dev/null @@ -1 +0,0 @@ -export PATH=$PWD/bin:$PATH \ No newline at end of file diff --git a/packages/python/3.10.0-alpha.7/metadata.json b/packages/python/3.10.0-alpha.7/metadata.json deleted file mode 100644 index 5232a19..0000000 --- a/packages/python/3.10.0-alpha.7/metadata.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "language": "python", - "version": "3.10.0-alpha.7", - "aliases": ["py", "py3", "python3"] -} diff --git a/packages/python/3.10.0-alpha.7/run b/packages/python/3.10.0-alpha.7/run deleted file mode 100644 index ff60df2..0000000 --- a/packages/python/3.10.0-alpha.7/run +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -python3.10 "$@" \ No newline at end of file diff --git a/packages/python/3.10.0-alpha.7/test.py b/packages/python/3.10.0-alpha.7/test.py deleted file mode 100644 index c3135e2..0000000 --- a/packages/python/3.10.0-alpha.7/test.py +++ /dev/null @@ -1,7 +0,0 @@ -working = True - -match working: - case True: - print("OK") - case False: - print() \ No newline at end of file diff --git a/packages/python/3.5.10/build.sh b/packages/python/3.5.10/build.sh deleted file mode 100755 index bced203..0000000 --- a/packages/python/3.5.10/build.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/bash - -PREFIX=$(realpath $(dirname $0)) - -mkdir -p build - -cd build - -curl "https://www.python.org/ftp/python/3.5.10/Python-3.5.10.tgz" -o python.tar.gz -tar xzf python.tar.gz --strip-components=1 -rm python.tar.gz - -./configure --prefix "$PREFIX" --with-ensurepip=install -make -j$(nproc) -make install -j$(nproc) - -cd .. - -rm -rf build - -bin/pip3 install numpy scipy pandas pycrypto whoosh bcrypt passlib diff --git a/packages/python/3.5.10/environment b/packages/python/3.5.10/environment deleted file mode 100644 index bd0ff98..0000000 --- a/packages/python/3.5.10/environment +++ /dev/null @@ -1 +0,0 @@ -export PATH=$PWD/bin:$PATH \ No newline at end of file diff --git a/packages/python/3.5.10/metadata.json b/packages/python/3.5.10/metadata.json deleted file mode 100644 index 5cc61c1..0000000 --- a/packages/python/3.5.10/metadata.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "language": "python", - "version": "3.5.10", - "aliases": ["py", "py3", "python3"] -} diff --git a/packages/python/3.5.10/run b/packages/python/3.5.10/run deleted file mode 100644 index aafa4ab..0000000 --- a/packages/python/3.5.10/run +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -python3.5 "$@" \ No newline at end of file diff --git a/packages/python/3.5.10/test.py b/packages/python/3.5.10/test.py deleted file mode 100644 index 3f2688f..0000000 --- a/packages/python/3.5.10/test.py +++ /dev/null @@ -1 +0,0 @@ -print("OK") \ No newline at end of file diff --git a/packages/python/3.9.1/build.sh b/packages/python/3.9.1/build.sh deleted file mode 100755 index fcae7c7..0000000 --- a/packages/python/3.9.1/build.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/bash - -PREFIX=$(realpath $(dirname $0)) - -mkdir -p build - -cd build - -curl "https://www.python.org/ftp/python/3.9.1/Python-3.9.1.tgz" -o python.tar.gz -tar xzf python.tar.gz --strip-components=1 -rm python.tar.gz - -./configure --prefix "$PREFIX" --with-ensurepip=install -make -j$(nproc) -make install -j$(nproc) - -cd .. - -rm -rf build - -bin/pip3 install numpy scipy pandas pycrypto whoosh bcrypt passlib diff --git a/packages/python/3.9.1/environment b/packages/python/3.9.1/environment deleted file mode 100644 index bd0ff98..0000000 --- a/packages/python/3.9.1/environment +++ /dev/null @@ -1 +0,0 @@ -export PATH=$PWD/bin:$PATH \ No newline at end of file diff --git a/packages/python/3.9.1/metadata.json b/packages/python/3.9.1/metadata.json deleted file mode 100644 index 2a0970f..0000000 --- a/packages/python/3.9.1/metadata.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "language": "python", - "version": "3.9.1", - "aliases": ["py", "py3", "python3"] -} diff --git a/packages/python/3.9.1/run b/packages/python/3.9.1/run deleted file mode 100644 index 450bb76..0000000 --- a/packages/python/3.9.1/run +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -python3.9 "$@" \ No newline at end of file diff --git a/packages/python/3.9.1/test.py b/packages/python/3.9.1/test.py deleted file mode 100644 index 3f2688f..0000000 --- a/packages/python/3.9.1/test.py +++ /dev/null @@ -1 +0,0 @@ -print("OK") \ No newline at end of file diff --git a/packages/python/3.9.4/build.sh b/packages/python/3.9.4/build.sh deleted file mode 100755 index 1966bd9..0000000 --- a/packages/python/3.9.4/build.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/bash - -PREFIX=$(realpath $(dirname $0)) - -mkdir -p build - -cd build - -curl "https://www.python.org/ftp/python/3.9.4/Python-3.9.4.tgz" -o python.tar.gz -tar xzf python.tar.gz --strip-components=1 -rm python.tar.gz - -./configure --prefix "$PREFIX" --with-ensurepip=install -make -j$(nproc) -make install -j$(nproc) - -cd .. - -rm -rf build - -bin/pip3 install numpy scipy pandas pycrypto whoosh bcrypt passlib sympy diff --git a/packages/python/3.9.4/environment b/packages/python/3.9.4/environment deleted file mode 100644 index bd0ff98..0000000 --- a/packages/python/3.9.4/environment +++ /dev/null @@ -1 +0,0 @@ -export PATH=$PWD/bin:$PATH \ No newline at end of file diff --git a/packages/python/3.9.4/metadata.json b/packages/python/3.9.4/metadata.json deleted file mode 100644 index 63f96dc..0000000 --- a/packages/python/3.9.4/metadata.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "language": "python", - "version": "3.9.4", - "aliases": ["py", "py3", "python3"] -} diff --git a/packages/python/3.9.4/run b/packages/python/3.9.4/run deleted file mode 100644 index 450bb76..0000000 --- a/packages/python/3.9.4/run +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -python3.9 "$@" \ No newline at end of file diff --git a/packages/python/3.9.4/test.py b/packages/python/3.9.4/test.py deleted file mode 100644 index f8bcd5c..0000000 --- a/packages/python/3.9.4/test.py +++ /dev/null @@ -1,18 +0,0 @@ -execute = (execute_with := lambda *a, **k: lambda f: f(*a, **k))() - - -@int -@execute -class n: __int__ = lambda _: 69 - - -@execute -class cout: __lshift__ = print - - -@execute_with(n) -def output(n): - return "OK" - - -cout << output diff --git a/packages/test.sh b/packages/test.sh deleted file mode 100755 index 615e2db..0000000 --- a/packages/test.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env bash - -AUTH_HEADER="Authorization: $API_KEY" - -for test_file in */*/test.* -do - IFS='/' read -ra test_parts <<< "$test_file" - IFS='.' read -ra file_parts <<< "$(basename $test_file)" - language=${file_parts[1]} - lang_ver=${test_parts[1]} - - test_src=$(python3 -c "import json; print(json.dumps(open('$test_file').read()))") - - json='{"language":"'$language'","version":"'$lang_ver'","files":[{"content":'$test_src'}]}' - - result=$(curl -s -XPOST -H "Content-Type: application/json" -d "$json" https://emkc.org/api/v2/piston/execute -H $AUTH_HEADER) - - echo "==$test_file: $language-$lang_ver==" - #jq '.' <<<"$result" - jq -r 'if (.run.stdout | contains("OK") ) then (.run.stdout) else (.compile.output + .run.output) end' <<<$result -done diff --git a/public.pps b/public.pps deleted file mode 100755 index f032032..0000000 --- a/public.pps +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/env -S piston ppman spec - -# Public Piston Packages -# Defines packages to be installed on the public piston installation - -# All packages, latest version -* * - -# Except python -!python * - -# Install python 3.* and 2.* -python 3.* -python 2.* diff --git a/readme.md b/readme.md index 0cc0fa4..2bd0c1f 100644 --- a/readme.md +++ b/readme.md @@ -215,6 +215,7 @@ Content-Type: application/json [ { + "id": 1, "language": "bash", "version": "5.1.0", "aliases": [ @@ -222,6 +223,7 @@ Content-Type: application/json ] }, { + "id": 2, "language": "brainfuck", "version": "2.7.3", "aliases": [ @@ -237,35 +239,32 @@ Content-Type: application/json `POST /api/v2/execute` This endpoint requests execution of some arbitrary code. -- `language` (**required**) The language to use for execution, must be a string and must be installed. -- `version` (**required**) The version of the language to use for execution, must be a string containing a SemVer selector for the version or the specific version number to use. -- `files` (**required**) An array of files containing code or other data that should be used for execution. The first file in this array is considered the main file. -- `files[].name` (_optional_) The name of the file to upload, must be a string containing no path or left out. -- `files[].content` (**required**) The content of the files to upload, must be a string containing text to write. -- `files[].encoding` (_optional_) The encoding scheme used for the file content. One of `base64`, `hex` or `utf8`. Defaults to `utf8`. -- `stdin` (_optional_) The text to pass as stdin to the program. Must be a string or left out. Defaults to blank string. -- `args` (_optional_) The arguments to pass to the program. Must be an array or left out. Defaults to `[]`. -- `compile_timeout` (_optional_) The maximum time allowed for the compile stage to finish before bailing out in milliseconds. Must be a number or left out. Defaults to `10000` (10 seconds). -- `run_timeout` (_optional_) The maximum time allowed for the run stage to finish before bailing out in milliseconds. Must be a number or left out. Defaults to `3000` (3 seconds). -- `compile_memory_limit` (_optional_) The maximum amount of memory the compile stage is allowed to use in bytes. Must be a number or left out. Defaults to `-1` (no limit) -- `run_memory_limit` (_optional_) The maximum amount of memory the run stage is allowed to use in bytes. Must be a number or left out. Defaults to `-1` (no limit) +- `language` (**required**) The language to use for execution, must be a string and must be installed. +- `files` (**required**) An array of files containing code or other data that should be used for execution. The first file in this array is considered the main file. +- `files[].name` (_optional_) The name of the file to upload, must be a string containing no path or left out. +- `files[].content` (**required**) The content of the files to upload, must be a string containing text to write. +- `stdin` (_optional_) The text to pass as stdin to the program. Must be a string or left out. Defaults to blank string. +- `args` (_optional_) The arguments to pass to the program. Must be an array or left out. Defaults to `[]`. +- `compile_timeout` (_optional_) The maximum time allowed for the compile stage to finish before bailing out in milliseconds. Must be a number or left out. Defaults to `10000` (10 seconds). +- `run_timeout` (_optional_) The maximum time allowed for the run stage to finish before bailing out in milliseconds. Must be a number or left out. Defaults to `3000` (3 seconds). +- `compile_memory_limit` (_optional_) The maximum amount of memory the compile stage is allowed to use in bytes. Must be a number or left out. Defaults to `-1` (no limit) +- `run_memory_limit` (_optional_) The maximum amount of memory the run stage is allowed to use in bytes. Must be a number or left out. Defaults to `-1` (no limit) ```json { - "language": "js", - "version": "15.10.0", - "files": [ - { - "name": "my_cool_code.js", - "content": "console.log(process.argv)" - } - ], - "stdin": "", - "args": ["1", "2", "3"], - "compile_timeout": 10000, - "run_timeout": 3000, - "compile_memory_limit": -1, - "run_memory_limit": -1 + "language": "js", + "files": [ + { + "name": "my_cool_code.js", + "content": "console.log(process.argv)" + } + ], + "stdin": "", + "args": ["1", "2", "3"], + "compile_timeout": 10000, + "run_timeout": 3000, + "compile_memory_limit": -1, + "run_memory_limit": -1 } ``` diff --git a/repo/.dockerignore b/repo/.dockerignore deleted file mode 100644 index d1470fc..0000000 --- a/repo/.dockerignore +++ /dev/null @@ -1 +0,0 @@ -*.pkg.tar.gz \ No newline at end of file diff --git a/repo/.gitignore b/repo/.gitignore deleted file mode 100644 index c3607c0..0000000 --- a/repo/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -*.pkg.tar.gz -index \ No newline at end of file diff --git a/repo/Dockerfile b/repo/Dockerfile deleted file mode 100644 index de28c11..0000000 --- a/repo/Dockerfile +++ /dev/null @@ -1,20 +0,0 @@ -FROM debian:buster-slim -ENV DEBIAN_FRONTEND noninteractive -RUN apt-get update && apt-get install -y unzip autoconf build-essential libssl-dev \ - pkg-config zlib1g-dev libargon2-dev libsodium-dev libcurl4-openssl-dev \ - sqlite3 libsqlite3-dev libonig-dev libxml2 libxml2-dev bc curl git \ - linux-headers-amd64 perl xz-utils python3 python3-pip gnupg jq zlib1g-dev \ - cmake cmake-doc extra-cmake-modules build-essential gcc binutils bash coreutils \ - util-linux pciutils usbutils coreutils binutils findutils grep libncurses5-dev \ - libncursesw5-dev python3-pip libgmp-dev libmpfr-dev python2 libffi-dev gfortran\ - libreadline-dev libblas-dev liblapack-dev libpcre3-dev libarpack2-dev libfftw3-dev \ - libglpk-dev libqhull-dev libqrupdate-dev libsuitesparse-dev libsundials-dev \ - libbz2-dev liblzma-dev libpcre2-dev gperf bison flex g++ && \ - ln -sf /bin/bash /bin/sh && \ - rm -rf /var/lib/apt/lists/* && \ - update-alternatives --install /usr/bin/python python /usr/bin/python3.7 2 - -ADD entrypoint.sh mkindex.sh / - -ENTRYPOINT ["bash","/entrypoint.sh"] -CMD ["--no-build"] diff --git a/repo/entrypoint.sh b/repo/entrypoint.sh deleted file mode 100755 index 6c47e37..0000000 --- a/repo/entrypoint.sh +++ /dev/null @@ -1,59 +0,0 @@ -cd /piston/packages - -SERVER=1 -BUILD=1 -CI=0 - -echo "Running through arguments.." - -for pkg in "$@" -do - shift - if [[ "$pkg" = "--no-server" ]]; then - echo "Not starting index server after builds" - SERVER=0 - elif [[ "$pkg" = "--no-build" ]]; then - echo "Building no more package" - BUILD=0 - elif [[ "$pkg" = "--ci" ]]; then - echo "Running in CI mode, --no-build, --no-server" - BUILD=0 - SERVER=0 - CI=1 - else - if [[ $BUILD -eq 1 ]]; then - echo "Building package $pkg" - make -j16 $pkg.pkg.tar.gz PLATFORM=docker-debian - echo "Done with package $pkg" - elif [[ $CI -eq 1 ]]; then - echo "Commit SHA: $pkg" - - cd .. - echo "Changed files:" - git diff --name-only $pkg^1 $pkg - PACKAGES=$(git diff --name-only $pkg^1 $pkg | awk -F/ '{ print $2 "-" $3 }' | sort -u) - cd packages - - echo "Building packages: $PACKAGES" - for package in "$PACKAGES"; do - make -j16 $package.pkg.tar.gz PLATFORM=docker-debian - done - - else - echo "Building was disabled, skipping $pkg build=$BUILD ci=$CI" - fi - fi -done - -cd /piston/repo -echo "Creating index" -./mkindex.sh -echo "Index created" - -if [[ $SERVER -eq 1 ]]; then - echo "Starting index server.." - python3 -m http.server -else - echo "Skipping starting index server" -fi -exit 0 \ No newline at end of file diff --git a/repo/mkindex.sh b/repo/mkindex.sh deleted file mode 100755 index c93b444..0000000 --- a/repo/mkindex.sh +++ /dev/null @@ -1,23 +0,0 @@ -BASEURL=http://repo:8000/ - -i=0 - -echo "" > index - -for pkg in $(find ../packages -type f -name "*.pkg.tar.gz") -do - - cp $pkg . - - PKGFILE=$(basename $pkg) - PKGFILENAME=$(echo $PKGFILE | sed 's/\.pkg\.tar\.gz//g') - - PKGNAME=$(echo $PKGFILENAME | grep -oP '^\K.+(?=-)') - PKGVERSION=$(echo $PKGFILENAME | grep -oP '^.+-\K.+') - PKGCHECKSUM=$(sha256sum $PKGFILE | awk '{print $1}') - - echo "$PKGNAME,$PKGVERSION,$PKGCHECKSUM,$BASEURL$PKGFILE" >> index - echo "Adding package $PKGNAME-$PKGVERSION" - - ((i=i+1)) -done \ No newline at end of file diff --git a/result b/result new file mode 120000 index 0000000..d60c5ac --- /dev/null +++ b/result @@ -0,0 +1 @@ +/nix/store/1idnmsddirm1hpxw40r17wsg9p9dscb9-piston.tar.gz \ No newline at end of file diff --git a/runtimes/.scaffold.nix b/runtimes/.scaffold.nix new file mode 100644 index 0000000..51b68aa --- /dev/null +++ b/runtimes/.scaffold.nix @@ -0,0 +1,65 @@ +{pkgs, piston, ...}: +let + # Put your package here, preferibly from nixpkgs. + pkg = pkgs.%RUNTIME%; # this may be incorrect - it is guessed +in piston.mkRuntime { + # Name of the language implemented by this runtime + language = "%LANGUAGE%"; + + # The version of the language + # Usually this is specified on the package + version = pkg.version; + + # Name of the runtime + # This line should be kept if the runtime differs from the language + runtime = "%RUNTIME%"; + + aliases = [ + # Put extensions in here, and other common names + # Example: + # "js" + # "node-javascript" + ]; + + + + # This is the lines of a shell script to compile source code. + # Arguments passed to this script are all the provided source files + # The CWD of this script is a temp directory for a job + # + # If the language only supports JIT compiling, simply remove this line + # See ./python3.nix and ./node-javascript.nix for examples + # + # No shebang needs to be added to this - that is done automatically. + compile = '' + ${pkg}/bin/%RUNTIME% --compile "$@" + ''; + + # This is the lines of a shell script to evaluate a file at $1 + # The remaining arguments are the arguments to launch the application with + # The CWD of this script is a temp directory for a job + # + # If the compile stage is used, $1 still contains the name of the source file. + # It is up to your script to determine the filename of the emitted binary + # + # No shebang needs to be added to this - that is done automatically. + run = '' + ${pkg}/bin/%RUNTIME% "$@" + ''; + + # Specify a list of tests. + # These should output "OK" to STDOUT if everything looks good + tests = [ + (piston.mkTest { + files = { + "test.js" = '' + console.log("OK"); + ''; + }; + args = []; + stdin = ""; + packages = []; + main = "test.js"; + }) + ]; +} \ No newline at end of file diff --git a/runtimes/bash.nix b/runtimes/bash.nix new file mode 100644 index 0000000..9ed8cce --- /dev/null +++ b/runtimes/bash.nix @@ -0,0 +1,28 @@ +{pkgs, piston, ...}: +let + pkg = pkgs.bash; +in piston.mkRuntime { + language = "bash"; + + version = pkg.version; + + runtime = "bash"; + + aliases = [ + "sh" + ]; + + run = '' + ${pkg}/bin/bash "$@" + ''; + + tests = [ + (piston.mkTest { + files = { + "test.sh" = '' + echo OK + ''; + }; + }) + ]; +} \ No newline at end of file diff --git a/runtimes/clojure.nix b/runtimes/clojure.nix new file mode 100644 index 0000000..67c796c --- /dev/null +++ b/runtimes/clojure.nix @@ -0,0 +1,29 @@ +{pkgs, piston, ...}: +let + pkg = pkgs.clojure; +in piston.mkRuntime { + language = "clojure"; + version = pkg.version + ""; #Clojure has X.X.X.X versioning, we want X.X.X + + aliases = [ + "clj" + ]; + + run = '' + ${pkg}/bin/clojure "$@" + ''; + + tests = [ + (piston.mkTest { + files = { + "test.clj" = '' + (ns clojure.examples.main + (:gen-class)) + (defn main [] + (println "OK")) + (main) + ''; + }; + }) + ]; +} \ No newline at end of file diff --git a/runtimes/cobol-gnu-cobol.nix b/runtimes/cobol-gnu-cobol.nix new file mode 100644 index 0000000..af72f5d --- /dev/null +++ b/runtimes/cobol-gnu-cobol.nix @@ -0,0 +1,39 @@ +{pkgs, piston, ...}: +let + pkg = pkgs.gnu-cobol; +in piston.mkRuntime { + language = "cobol"; + version = pkg.version; + runtime = "gnu-cobol"; + + aliases = [ + "cob" + ]; + + compile = '' + ${pkg}/bin/cobc -o binary --free -x -L lib "$@" + chmod +x binary + ''; + + run = '' + shift + ./binary "$@" + ''; + + tests = [ + (piston.mkTest { + files = { + "test.cob" = '' + *> Test Program + identification division. + program-id. ok-test. + + procedure division. + display "OK" + goback. + end program ok-test. + ''; + }; + }) + ]; +} \ No newline at end of file diff --git a/runtimes/default.nix b/runtimes/default.nix new file mode 100644 index 0000000..2c3ddc4 --- /dev/null +++ b/runtimes/default.nix @@ -0,0 +1,8 @@ +args: { + "node-javascript" = import ./node-javascript.nix args; + "python2" = import ./python2.nix args; + "python3" = import ./python3.nix args; + "bash" = import ./bash.nix args; + "clojure" = import ./clojure.nix args; + "cobol-gnu-cobol" = import ./cobol-gnu-cobol.nix args; +} diff --git a/runtimes/node-javascript.nix b/runtimes/node-javascript.nix new file mode 100644 index 0000000..3bf2c78 --- /dev/null +++ b/runtimes/node-javascript.nix @@ -0,0 +1,28 @@ +{pkgs, piston, ...}: +let + pkg = pkgs.nodejs; +in piston.mkRuntime { + language = "javascript"; + version = pkg.version; + runtime = "node"; + + aliases = [ + "node-js" + "node-javascript" + "js" + ]; + + run = '' + ${pkg}/bin/node "$@" + ''; + + tests = [ + (piston.mkTest { + files = { + "test.js" = '' + console.log("OK"); + ''; + }; + }) + ]; +} \ No newline at end of file diff --git a/runtimes/python2.nix b/runtimes/python2.nix new file mode 100644 index 0000000..9b89a20 --- /dev/null +++ b/runtimes/python2.nix @@ -0,0 +1,25 @@ +{pkgs, piston, ...}: +let + pkg = pkgs.python2; +in piston.mkRuntime { + language = "python2"; + version = pkg.version; + + aliases = [ + "py2" + ]; + + run = '' + ${pkg}/bin/python2 "$@" + ''; + + tests = [ + (piston.mkTest { + files = { + "test.py" = '' + print "OK" + ''; + }; + }) + ]; +} \ No newline at end of file diff --git a/runtimes/python3.nix b/runtimes/python3.nix new file mode 100644 index 0000000..9dc2682 --- /dev/null +++ b/runtimes/python3.nix @@ -0,0 +1,26 @@ +{pkgs, piston, ...}: +let + pkg = pkgs.python3; +in piston.mkRuntime { + language = "python3"; + version = pkg.version; + + aliases = [ + "py3" + "py" + ]; + + run = '' + ${pkg}/bin/python3 "$@" + ''; + + tests = [ + (piston.mkTest { + files = { + "test.py" = '' + print("OK") + ''; + }; + }) + ]; +} \ No newline at end of file diff --git a/runtimes/scaffold.sh b/runtimes/scaffold.sh new file mode 100755 index 0000000..fb3aafe --- /dev/null +++ b/runtimes/scaffold.sh @@ -0,0 +1,37 @@ +#!/usr/bin/env sh + +if [[ $# -eq 0 ]]; then + echo "Usage: $0 [runtime name]" + echo + echo "language name: The name of the language to add, e.g. javascript" + echo "runtime name: The name of the runtime to add, e.g. node" + echo " In most cases runtime won't be required, e.g. python3 is both a language and runtime" + exit 1; +fi + +LANGUAGE=$1 +RUNTIME=$1 +NAME=$1 + +if [[ $# -eq 2 ]]; then + RUNTIME=$2 + NAME=$LANGUAGE-$RUNTIME +fi + + +if grep "./$NAME.nix" default.nix > /dev/null; then + echo "ERROR: $NAME already exists" + echo "Remove it from default.nix and retry if this is intended" + exit 1 +else + sed -i '$d' default.nix + echo " \"$NAME\" = import ./$NAME.nix args;" >> default.nix + sed -e 's/%LANGUAGE%/'"$LANGUAGE"'/g' \ + -e 's/%RUNTIME%/'"$RUNTIME"'/g' \ + .scaffold.nix > $NAME.nix + git add $NAME.nix + echo "}" >> default.nix + + echo "Scaffolded $NAME" + echo "Edit $NAME.nix to get started" +fi \ No newline at end of file diff --git a/shell.nix b/shell.nix index 339bead..d8731fe 100644 --- a/shell.nix +++ b/shell.nix @@ -1,5 +1,11 @@ { pkgs ? import {} }: pkgs.mkShell { # nativeBuildInputs is usually what you want -- tools you need to run - nativeBuildInputs = with pkgs; [ nodejs-15_x jq mkdocs ]; + nativeBuildInputs = with pkgs; [ + nodejs-16_x + jq + mkdocs + yarn2nix + yarn + ]; }