mirror of
https://github.com/hanzoai/extension.git
synced 2026-10-31 21:57:06 +00:00
src/build.js writes to the extension repo root's dist/<engine>/. Everything that
reads a build was still pointing under packages/browser, and not one of them said
so:
e2e/playwright.config.ts loaded a stale extension into every Playwright run
e2e/fixtures.ts same
e2e/cross-platform.config.ts same
.hanzo/workflows/publish.yml web-ext packaged the Chrome and Firefox stores,
and signed AMO, from a directory a clean checkout
does not have — the store lane could not have worked
tests/webextension-polyfill.test.ts `if (!existsSync) return` — "build pipeline
ships the polyfill" has been asserting nothing
install-extension.sh / launch-brave-hanzo.sh printed a path that isn't there
All repointed. The two polyfill tests build on demand instead of returning early:
an assertion about the bundle has to have a bundle.
tests/output-root.test.ts is the guard — it fails on any tracked file naming the
abandoned root, and would have caught all six at once. It assembles the needle
from parts rather than spelling it, so it is not its own violation.
publish.sh is deleted rather than repointed. It was a second full publish lane to
the same two stores, and it took Chrome and AMO credentials from plaintext
environment variables while .hanzo/workflows/publish.yml — which its own header
calls the system of record — pulls every one of them from KMS. One way to publish.
265/265 green.
Co-authored-by: Hanzo Dev <[email protected]>
76 lines
2.1 KiB
Bash
Executable File
76 lines
2.1 KiB
Bash
Executable File
#!/bin/bash
|
|
# Hanzo Browser Extension Installer
|
|
# Provides instructions and opens browser extension pages
|
|
|
|
EXTENSION_DIR="$(cd "$(dirname "$0")/../../dist" && pwd)"
|
|
|
|
echo "=== Hanzo Browser Extension Installer ==="
|
|
echo ""
|
|
echo "Extension directories:"
|
|
echo " Chrome: $EXTENSION_DIR/chrome"
|
|
echo " Firefox: $EXTENSION_DIR/firefox"
|
|
echo " Safari: $EXTENSION_DIR/safari (requires Xcode)"
|
|
echo ""
|
|
|
|
# Check if servers are running
|
|
if lsof -i :3001 > /dev/null 2>&1; then
|
|
echo "✓ Browser Extension Server running on port 3001"
|
|
else
|
|
echo "✗ Browser Extension Server NOT running"
|
|
echo " Start with: node ../../dist/cli.js start"
|
|
fi
|
|
|
|
if lsof -i :9223 > /dev/null 2>&1; then
|
|
echo "✓ CDP Bridge Server running on port 9223"
|
|
else
|
|
echo "✗ CDP Bridge Server NOT running"
|
|
echo " Start with: node dist/cdp-bridge-server.js"
|
|
fi
|
|
|
|
echo ""
|
|
echo "=== Installation Instructions ==="
|
|
echo ""
|
|
|
|
# Chrome
|
|
echo "CHROME:"
|
|
echo " 1. Open chrome://extensions/"
|
|
echo " 2. Enable 'Developer mode'"
|
|
echo " 3. Click 'Load unpacked'"
|
|
echo " 4. Select: $EXTENSION_DIR"
|
|
echo ""
|
|
|
|
# Firefox
|
|
echo "FIREFOX:"
|
|
echo " 1. Open about:debugging#/runtime/this-firefox"
|
|
echo " 2. Click 'Load Temporary Add-on...'"
|
|
echo " 3. Select: $EXTENSION_DIR/firefox/manifest.json"
|
|
echo ""
|
|
|
|
# Safari
|
|
echo "SAFARI:"
|
|
echo " 1. Open Xcode"
|
|
echo " 2. Create new Safari Web Extension project"
|
|
echo " 3. Copy files from: $EXTENSION_DIR/safari/"
|
|
echo " 4. Build and run"
|
|
echo ""
|
|
|
|
# Open browser extension pages based on arguments
|
|
case "$1" in
|
|
chrome)
|
|
open -a "Google Chrome" "chrome://extensions/"
|
|
;;
|
|
firefox)
|
|
open -a "Firefox Developer Edition" "about:debugging#/runtime/this-firefox" 2>/dev/null || \
|
|
open -a "Firefox" "about:debugging#/runtime/this-firefox"
|
|
;;
|
|
all)
|
|
open -a "Google Chrome" "chrome://extensions/"
|
|
open -a "Firefox Developer Edition" "about:debugging#/runtime/this-firefox" 2>/dev/null || \
|
|
open -a "Firefox" "about:debugging#/runtime/this-firefox"
|
|
;;
|
|
*)
|
|
echo "Usage: $0 [chrome|firefox|all]"
|
|
echo " Opens the extension management page in the specified browser"
|
|
;;
|
|
esac
|