diff --git a/.package.build.json b/.package.build.json index 69b9216..85136c5 100644 --- a/.package.build.json +++ b/.package.build.json @@ -25,8 +25,8 @@ "pkg": { "patches": { "./node_modules/fetch-blob/streams.cjs": [ - "require('node:stream/web')", - "require('stream').web" + "Object.assign(globalThis, require('node:stream/web'))", + "Object.assign(globalThis, require('stream').web)" ] }, "scripts": "build/*.js", diff --git a/scripts/compile.sh b/scripts/compile.sh index db993ae..eb996c2 100755 --- a/scripts/compile.sh +++ b/scripts/compile.sh @@ -12,9 +12,9 @@ patch_required=$(grep -ER "require\([\"'](node:)?stream/web[\"']\)" node_modules files=$(grep -rlER "require\([\"'](node:)?stream/web[\"']\)" node_modules/*) if [[ ! -z "$patch_required" ]]; then while IFS= read -r file; do - echo '--->' $file - grep -q $file package.json - if [ $? == 1 ]; then + #echo '--->' $file + #grep -q $file package.json + #if [ $? == 1 ]; then echo '--->' $file "UNPATCHED!" echo "Found an error!" echo "Found something you need to patch before building" @@ -25,8 +25,8 @@ if [[ ! -z "$patch_required" ]]; then echo "You need to add all these to pkg.patches to replace with require('stream').web" ./scripts/go_dev.sh exit 1 - fi - echo "OK" + #fi + #echo "OK" done <<< $files fi