harness: CommonJS scripts under a type-module package

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-10-31 17:55:38 +01:00
commit 1cb18a2795
3 changed files with 3 additions and 3 deletions

View file

@ -7,9 +7,9 @@ npm ci --no-audit --no-fund --ignore-scripts >/out/npmci.log 2>&1
npm run build > /out/build.log 2>&1; echo BUILD_RC=$? >> /out/build.log
printf '{"defaultHomeserver":0,"homeserverList":["127.0.0.1:8080"],"allowCustomHomeservers":true,"featuredCommunities":{"spaces":["#gamecult:test"],"rooms":[],"servers":["test"]},"hashRouter":{"enabled":true,"basename":"/"}}' > dist/config.json
mkdir -p /tmp/pw && cd /tmp/pw && npm init -y >/dev/null && npm i --no-audit --no-fund playwright@1.48.2 >/out/pw.log 2>&1
cp /src/harness/estate/drive.js /tmp/pw/
HSLOG=/out/hslog.txt node /src/harness/estate/fakehs.js /src/dist > /out/hs.out 2>&1 &
cp /src/harness/estate/drive.cjs /tmp/pw/
HSLOG=/out/hslog.txt node /src/harness/estate/fakehs.cjs /src/dist > /out/hs.out 2>&1 &
HS=$!
sleep 2
node /tmp/pw/drive.js; echo DRIVE_RC=$?
node /tmp/pw/drive.cjs; echo DRIVE_RC=$?
kill $HS