From 31ee74bb66818ced847d270651246a2fee0b9763 Mon Sep 17 00:00:00 2001 From: syui Date: Sat, 28 Feb 2026 19:43:45 +0900 Subject: [PATCH] fix ozone-web patch --- install.zsh | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/install.zsh b/install.zsh index 82199f2..daf77d0 100755 --- a/install.zsh +++ b/install.zsh @@ -334,6 +334,41 @@ export const SOCIAL_APP_DOMAIN =\ }' lib/constants.ts 2>/dev/null || true # Fix parseInt() to handle undefined by adding || '' sediment "s/parseInt(env('\([^']*\)'))/parseInt(env('\1') || '0')/g" lib/constants.ts 2>/dev/null || true + + # Add next-runtime-env to package.json if missing (used by lib/constants.ts) + if ! grep -q 'next-runtime-env' package.json 2>/dev/null; then + echo "📦 Adding next-runtime-env to package.json..." + python3 -c " +import json +with open('package.json') as f: + d = json.load(f) +d.setdefault('dependencies', {})['next-runtime-env'] = '^1.6.2' +with open('package.json', 'w') as f: + json.dump(d, f, indent=2) + f.write('\n') +" + echo "✅ Added next-runtime-env" + fi + + # Update @atproto/ozone in service/package.json to latest + echo "📦 Updating @atproto/ozone in service/package.json..." + local latest_ozone_ver + latest_ozone_ver=$(npm view @atproto/ozone version 2>/dev/null) + if [ -n "$latest_ozone_ver" ] && [ -f service/package.json ]; then + python3 -c " +import json, sys +ver = sys.argv[1] +with open('service/package.json') as f: + d = json.load(f) +old = d.get('dependencies', {}).get('@atproto/ozone', '') +d.setdefault('dependencies', {})['@atproto/ozone'] = ver +with open('service/package.json', 'w') as f: + json.dump(d, f, indent=2) + f.write('\n') +print(f'✅ @atproto/ozone: {old} -> {ver}') +" "$latest_ozone_ver" + fi + popd > /dev/null }