diff --git a/.gear/generate b/.gear/generate deleted file mode 100755 index e8940309f..000000000 --- a/.gear/generate +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/bash -# Re-generate React index.html.gz for llama-server - -cd "$(git rev-parse --show-toplevel)" - -set -exu -o pipefail -hsh --ini -hsh-install git npm -hsh-copy . build -hsh-run --rooter -- bash -c 'echo nameserver 1.1.1.1 > /etc/resolv.conf' -hsh-run --rooter -- bash -c 'echo precedence ::ffff:0:0/96 100 > /etc/gai.conf' -f=tools/server/public/index.html.gz -printf '%s\n\n' "ALT: Re-generate $f" > .git/NPM_I.log -share_network=1 \ -hsh-run --mountpoints=/proc -- bash -e <<-EOF |& tee -a .git/NPM_I.log - export NO_PROXY=${NO_PROXY@Q} HTTPS_PROXY=${HTTPS_PROXY@Q} - set -x - mkdir ~/.npm-global - npm config set prefix ~/.npm-global - npm install -g @aikidosec/safe-chain - PATH=~/.npm-global/bin:\$PATH - - cd /usr/src/build - rm $f - cd tools/server/webui - aikido-npm ci --ignore-scripts - aikido-npm audit --audit-level=critical fix - du -sh node_modules - - npm run build -EOF -hsh-run -- base64 "/usr/src/build/$f" | base64 -d > "$f" -git add "$f" -git diff --cached --quiet || git commit -F .git/NPM_I.log -gear-checklist --update generate-index.html -beep diff --git a/.gear/npm-build b/.gear/npm-build new file mode 100755 index 000000000..cba1bc4b9 --- /dev/null +++ b/.gear/npm-build @@ -0,0 +1,5 @@ +workdir=tools/server/webui +target=tools/server/public/index.html.gz +aikido-npm ci --ignore-scripts +aikido-npm audit --audit-level=critical fix +npm run build