mirror of
https://github.com/anomalyco/hex.git
synced 2026-11-22 06:06:50 +08:00
App Store Connect needs a support URL and a privacy policy URL for Hex for
iPhone, and both returned 404. Adds them as static pages in the Labs pages'
look:
- /hex/iphone (support URL): what Hex for iPhone is, setup (microphone,
Keyboards, Allow Full Access, the General › Keyboard fallback), why Full
Access, a short FAQ (on device, free, languages, music, offline, the
orange dot) and where to get help (GitHub issues, private security
reports).
- /hex/privacy: the iPhone app's privacy policy, from the App Store drafts.
Facts checked against ios/: Hex Keyboard makes no network requests; the only
download Hex itself makes is FluidAudio's Parakeet English model from
Hugging Face where Apple's speech model isn't available (before iOS 26);
Custom vocabulary, Learn how I type and Record typing logs are off by
default and stay in the App Group; typing logs skip secure, one-time code
and card fields and are kept 14 days.
src/labs.ts exports its page shell with a crumb and extra styles, so the
iPhone pages reuse its head (title, description, canonical, Open Graph and
Twitter tags) instead of a second template. The social card moves from
scripts/labs.ts to scripts/card.ts with the kicker ("Hex Labs", "Hex for
iPhone") as a parameter; Labs cards are unchanged. scripts/iphone.ts writes
both pages, their cards and their sitemap entries; build.ts runs it after
the Labs pages.
Verified: bun run build --mode dev, bun test (13 pass), both pages served
at /hex/iphone and /hex/privacy with .html fallback and screenshotted at
1280 px and 390 px, and the two cards inspected.
17 lines
705 B
TypeScript
17 lines
705 B
TypeScript
#!/usr/bin/env bun
|
|
// `bun run build [--mode dev]`: release data from the release service, typecheck, client build
|
|
// (Cloudflare Build Output), SSR build, prerender, then the Labs and iPhone pages.
|
|
import { parseArgs } from "node:util"
|
|
import { $ } from "bun"
|
|
|
|
const { values } = parseArgs({ options: { mode: { type: "string", default: "production" } } })
|
|
const mode = values.mode
|
|
|
|
await $`bun scripts/release-data.ts --mode ${mode}`
|
|
await $`tsc -b`
|
|
await $`vite build --mode ${mode}`
|
|
await $`vite build --mode ${mode} --ssr src/prerender.tsx --outDir dist-server`
|
|
await $`bun scripts/prerender.ts --mode ${mode}`
|
|
await $`bun scripts/labs.ts --mode ${mode}`
|
|
await $`bun scripts/iphone.ts --mode ${mode}`
|