Summary
Migrates the Safari pipeline from repo-local scripts to the framework commands added in stacksjs/stacks#2008 (+ #2011 for beta-toolchain support). The Safari abstraction now lives in one place — @stacksjs/browser-extension — and this repo keeps only what is genuinely app-specific.
| Before | After |
|---|---|
scripts/build-safari.ts | buddy extension:build --target safari (npm script build:safari, same name) |
scripts/safari-build-app.ts + scripts/safari-sync-resources.ts | buddy extension:safari:app (safari:app) — builds, syncs Resources, xcodebuilds |
scripts/generate-app-icons.ts (icons:app) | rendered by buddy extension:safari:init / scaffold (safari:init added) |
| exclusions hardcoded in the sync script | safariExclude in config/extension.ts |
validate:extension:safari and the package-extension.ts zip stay: the validator's DNR-rule accounting and the versioned zip naming are app-specific and buddy has no equivalent.
Behavior change: privacy.html is now also excluded from the appex Resources (it leaked in before; only popup.html + options.html ship, which is what the manifest references). safari:app no longer produces the zip first — use package:safari for that (CI does).
⚠️ Blocked until the next stacks release
The new buddy commands exist on stacks main (merged) but not in a published npm release yet. After the release:
bun update stacks # ^0.70.73 already permits the new 0.70.xthen this PR's CI goes green and it's ready to merge. Until then build:safari / safari:app will fail on the old installed buddy — expected.
Verification
- Ran the new commands end-to-end from a local stacks checkout:
extension:build --target safari→dist-safari(previously proven byte-equivalent to the old script's output),extension:safari:app --skip-xcodebuild→ Resources synced with exactlypopup.html+options.html. - Signed container app build verified separately on main with Xcode 27 beta (
** BUILD SUCCEEDED **, team cert on app + appex).