Refresh Inner Breeze website and deploy it from Gitea
Cloudflare Pages / Build and verify the site (push) Failing after 3m32s

This commit is contained in:
waozi committed 2026-11-20 00:54:01 -03:00
1 parent 3423cba76d
commit 43be710898
19 files changed
+537 -290

No files matched your search

+88
View File
@@ -0,0 +1,88 @@
name: Cloudflare Pages
on:
push:
branches: [master]
pull_request:
workflow_dispatch:
concurrency:
group: breeze-pages-${{ gitea.ref }}
cancel-in-progress: false
jobs:
site:
name: Build and verify the site
if: gitea.event_name == 'pull_request' || gitea.ref == 'refs/heads/master'
# The Ubuntu label is registered by the Build runners.
runs-on: alpha-ubuntu24.04
timeout-minutes: 45
env:
PACKAGE_FLAGS: --locked
SITE_ASSET_VERSION: ${{ gitea.sha }}
steps:
- name: Check out Breeze from Gitea
uses: https://github.com/actions/checkout@v4
with:
lfs: true
persist-credentials: false
- name: Set up Node.js
uses: https://github.com/actions/setup-node@v4
with:
node-version: 22
- name: Install site build dependencies
run: .github/scripts/install-apt-packages.sh .github/apt/empty-packages.txt apt-utils gnupg ripgrep unzip zip zstd
- name: Resolve locked package sources on Gitea
env:
GIT_CONFIG_COUNT: '3'
GIT_CONFIG_KEY_0: url.https://git.waozi.xyz/waozi/.insteadOf
GIT_CONFIG_VALUE_0: https://github.com/waozixyz/
GIT_CONFIG_KEY_1: url.https://git.waozi.xyz/kryonlabs/.insteadOf
GIT_CONFIG_VALUE_1: https://github.com/kryonlabs/
GIT_CONFIG_KEY_2: url.https://git.waozi.xyz/ziranlang/.insteadOf
GIT_CONFIG_VALUE_2: https://github.com/ziranlang/
run: make packages
- name: Select the verified web app origin
if: gitea.event_name != 'pull_request'
run: |
set -eu
host=innerbreeze.org
if ! sh site/check-account-origin.sh "$host"; then
host=inbe.waozi.xyz
sh site/check-account-origin.sh "$host"
fi
printf 'SITE_APP_HOST=%s\n' "$host" >> "$GITHUB_ENV"
- name: Build site with the published web app and signed download repository
env:
APT_SIGNING_KEY: ${{ gitea.event_name != 'pull_request' && secrets.APT_SIGNING_KEY || '' }}
run: sh site/build-production.sh
- name: Test website routes, assets and Telegram bridge
run: |
make site-assets-test apt-repo-test
node tests/telegram_bridge_test.mjs
- name: Deploy current master to Cloudflare Pages
if: gitea.event_name != 'pull_request'
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
WRANGLER_SEND_METRICS: 'false'
REVISION: ${{ gitea.sha }}
run: |
set -euo pipefail
test "$(git rev-parse HEAD)" = "$REVISION"
test "$(git ls-remote origin refs/heads/master | cut -f1)" = "$REVISION"
: "${CLOUDFLARE_API_TOKEN:?Missing Gitea Pages deployment token}"
: "${CLOUDFLARE_ACCOUNT_ID:?Missing Gitea Pages account ID}"
# Verify the public domain and the selected app origin before uploading.
curl -fsS --max-time 25 https://innerbreeze.org/ -o /dev/null
sh site/check-account-origin.sh "$SITE_APP_HOST"
npm exec --yes [email protected] -- wrangler pages deploy build/site \
--project-name=inbe --branch=master --commit-hash="$REVISION" --commit-dirty=false
sh site/verify-deployment.sh "$REVISION"
+16 -185
View File
@@ -1,200 +1,31 @@
name: Cloudflare Pages
name: Refresh Gitea Pages after release
on:
push:
branches:
- master
# Refresh available downloads after a release; pushes deploy independently.
workflow_run:
workflows: [Release]
types: [completed]
branches: [master]
pull_request:
workflow_dispatch:
inputs:
released_web:
description: Use the published web app for a website-only update
type: boolean
default: false
permissions:
contents: read
concurrency:
# A failed Release produces a skipped refresh, which must not cancel a push.
group: pages-${{ github.ref }}-${{ github.event_name == 'workflow_run' && github.event.workflow_run.conclusion != 'success' && 'skipped' || 'deploy' }}
# Finish the active deployment; newer pushes replace only the pending refresh.
cancel-in-progress: false
permissions: {}
jobs:
build:
name: Build Site
refresh-gitea-after-release:
name: Refresh Gitea Pages after a successful release
if: github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success'
runs-on: ubuntu-latest
timeout-minutes: 60
if: github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success'
env:
# Production follows the phone-verified release; previews test new source.
USE_RELEASED_WEB: ${{ github.event_name != 'pull_request' || inputs.released_web }}
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
lfs: true
- name: Fetch Ziran packages
uses: ./.github/actions/ziran-packages
- name: Set up Node.js for the web build
uses: actions/setup-node@v4
with:
node-version: 22
- name: Resolve published downloads
- name: Dispatch the current Gitea master workflow
env:
GH_TOKEN: ${{ github.token }}
BREEZE_PAGES_DISPATCH_TOKEN: ${{ secrets.BREEZE_PAGES_DISPATCH_TOKEN }}
run: |
set -euo pipefail
gh api repos/waozixyz/breeze/releases/latest > "$RUNNER_TEMP/inbe-published-release.json"
python3 - "$RUNNER_TEMP/inbe-published-release.json" >> "$GITHUB_ENV" <<'PY'
import json
import re
import sys
from pathlib import Path
release = json.loads(Path(sys.argv[1]).read_text())
tag = release["tag_name"]
version = tag.removeprefix("v")
assert re.fullmatch(r"(?:0|[1-9][0-9]*)\.(?:0|[1-9][0-9]*)\.(?:0|[1-9][0-9]*)", version), "Invalid published release version"
assets = {asset["name"] for asset in release["assets"]}
candidates = [f"inbe-{version}-arm64-v8a.apk", f"inbe-{version}.apk"]
android = next((name for name in candidates if name in assets), None)
assert android is not None, "Published release has no compatible Android APK"
print(f"SITE_RELEASE_VERSION={version}")
print(f"SITE_ANDROID_APK_ASSET={android}")
PY
- name: Install Packages
if: ${{ env.USE_RELEASED_WEB != 'true' }}
timeout-minutes: 15
run: .github/scripts/install-apt-packages.sh .github/apt/web-packages.txt python3-pil
- name: Set Up Emscripten
if: ${{ env.USE_RELEASED_WEB != 'true' }}
uses: ./.github/actions/emscripten
- name: Download Released Web App
if: ${{ env.USE_RELEASED_WEB == 'true' }}
env:
GH_TOKEN: ${{ github.token }}
run: |
set -euo pipefail
version="$SITE_RELEASE_VERSION"
test -n "$version"
mkdir -p build/released-web build/dist/web
gh release download "v$version" --pattern inbe-web.zip --dir build/released-web
unzip -q build/released-web/inbe-web.zip -d build/dist/web
test -s build/dist/web/index.wasm
- name: Web runner diagnostics
if: ${{ env.USE_RELEASED_WEB != 'true' }}
run: |
set -euo pipefail
lscpu
free -m
for browser in chromium chromium-browser google-chrome google-chrome-stable; do
if command -v "$browser" >/dev/null 2>&1; then
"$browser" --version
fi
done
- name: Build Site
run: |
set -euo pipefail
if [ "$USE_RELEASED_WEB" = "true" ]; then
make package-unpackaged-assets
sh site/build.sh
else
export PATH="$INBE_NODE_BIN:$PATH"
node --version
make build-laws
make site
if [ -z "$BREEZE_PAGES_DISPATCH_TOKEN" ]; then
echo '::warning::BREEZE_PAGES_DISPATCH_TOKEN is missing'
exit 0
fi
test -f build/site/index.html
test -f build/site/build/web/index.html
test -f build/site/build/web/index.js
test -f build/site/build/web/index.wasm || test -f build/site/build/web/index.wasm.gz || test -f build/site/build/web/index.wasm.parts.json
if [ "$GITHUB_EVENT_NAME" != "pull_request" ]; then
make site-release-assets-check
else
echo "Skipping release asset availability check for pull request build"
fi
env:
GH_TOKEN: ${{ github.token }}
# apt users follow the published release at https://breeze.waozi.xyz/apt.
- name: Build APT Repository
if: github.event_name != 'pull_request'
env:
GH_TOKEN: ${{ github.token }}
APT_SIGNING_KEY: ${{ secrets.APT_SIGNING_KEY }}
run: |
set -euo pipefail
command -v apt-ftparchive >/dev/null || sudo apt-get install -y --no-install-recommends apt-utils
sh scripts/build-apt-repo.sh build/site/apt "$SITE_RELEASE_VERSION"
- name: Upload Web diagnostics after a failed build
if: ${{ failure() && env.USE_RELEASED_WEB != 'true' }}
uses: actions/upload-artifact@v4
with:
name: inbe-web-diagnostics
path: build/dist/web
if-no-files-found: warn
retention-days: 3
- name: Upload Site Artifact
uses: actions/upload-artifact@v4
with:
name: inbe-site
path: build/site
if-no-files-found: error
deploy-preview:
name: Deploy Preview
runs-on: ubuntu-latest
needs: build
if: github.event_name == 'pull_request'
steps:
- name: Download Site Artifact
uses: actions/download-artifact@v4
with:
name: inbe-site
path: build/site
- name: Deploy Preview To Cloudflare Pages
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
command: pages deploy build/site --project-name=inbe --branch=${{ github.head_ref || github.ref_name }} --commit-hash=${{ github.sha }}
deploy-production:
name: Deploy Production
runs-on: ubuntu-latest
needs: build
if: github.event_name != 'pull_request' && github.ref == 'refs/heads/master'
steps:
- name: Download Site Artifact
uses: actions/download-artifact@v4
with:
name: inbe-site
path: build/site
- name: Deploy Production To Cloudflare Pages
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
command: pages deploy build/site --project-name=inbe --branch=master --commit-hash=${{ github.sha }}
curl --fail-with-body --silent --show-error --max-time 30 \
--request POST \
--header "Authorization: token $BREEZE_PAGES_DISPATCH_TOKEN" \
--header 'Content-Type: application/json' \
--data '{"ref":"master"}' \
'https://git.waozi.xyz/api/v1/repos/waozi/breeze/actions/workflows/pages.yml/dispatches'
+50
View File
@@ -0,0 +1,50 @@
#!/bin/sh
# Package current website source with the public, phone-verified app release.
set -eu
cd "$(dirname "$0")/.."
release_dir=build/released-web
mkdir -p "$release_dir"
curl -fsSL --retry 3 https://api.github.com/repos/waozixyz/breeze/releases/latest -o "$release_dir/release.json"
python3 - "$release_dir/release.json" > "$release_dir/release.env" <<'PY'
import json
import re
import sys
from pathlib import Path
release = json.loads(Path(sys.argv[1]).read_text())
match = re.fullmatch(r"v((?:0|[1-9][0-9]*)\.(?:0|[1-9][0-9]*)\.(?:0|[1-9][0-9]*))", release["tag_name"])
if not match:
raise SystemExit("Unexpected published release tag")
version = match[1]
assets = {asset["name"] for asset in release["assets"]}
android = next((name for name in (f"inbe-{version}-arm64-v8a.apk", f"inbe-{version}.apk") if name in assets), None)
if not android or "inbe-web.zip" not in assets:
raise SystemExit("Published release is missing an Android APK or the web bundle")
print(f"export SITE_RELEASE_VERSION={version}")
print(f"export SITE_ANDROID_APK_ASSET={android}")
PY
. "./$release_dir/release.env"
release_url="https://github.com/waozixyz/breeze/releases/download/v$SITE_RELEASE_VERSION"
curl -fsSL --retry 3 "$release_url/inbe-web.zip" -o "$release_dir/inbe-web.zip"
rm -rf "$release_dir/app"
mkdir -p "$release_dir/app"
unzip -q "$release_dir/inbe-web.zip" -d "$release_dir/app"
test -s "$release_dir/app/index.wasm"
make package-unpackaged-assets
SITE_WEB_DIR="$PWD/$release_dir/app" sh site/build.sh
# Gitea's job token is only valid on Gitea. Downloads still follow the public release.
env -u GITHUB_TOKEN -u GH_TOKEN make site-release-assets-check
if [ -n "${APT_SIGNING_KEY:-}" ]; then
deb_dir="$release_dir/debs"
mkdir -p "$deb_dir"
for arch in amd64 arm64; do
deb="inbe_${SITE_RELEASE_VERSION}_${arch}.deb"
curl -fsSL --retry 3 "$release_url/$deb" -o "$deb_dir/$deb"
done
APT_DEB_DIR="$deb_dir" sh scripts/build-apt-repo.sh build/site/apt "$SITE_RELEASE_VERSION"
else
python3 site/preserve-apt.py build/site/apt
fi
+12 -1
View File
@@ -46,6 +46,7 @@ expand_template_file() {
sed \
-e "s#\\\${version}#$version#g" \
-e "s#\\\${asset_version}#$asset_version#g" \
-e "s#\\\${app_host}#$app_host#g" \
-e "s#\\\${android_apk_asset}#$android_apk_asset#g" \
-e "s#\\\${android_apk_label}#$android_apk_label#g" \
"$src" > "$dst"
@@ -97,13 +98,15 @@ write_site_imports() {
write_web_app_csp_html() {
src=$1
dst=$2
cache_version=$(date +%s)
cache_version=$asset_version
csp="default-src 'self' data: blob:; connect-src 'self' https: wss: http: ws:; script-src 'self' 'unsafe-eval' 'unsafe-inline' https://telegram.org https://account.waozi.xyz; style-src 'self' 'unsafe-inline'; worker-src 'self' 'unsafe-eval' 'unsafe-inline' data: blob:; frame-src https:; img-src data: https:; media-src https:; object-src 'none'"
meta="<meta http-equiv=\"Content-Security-Policy\" content=\"$csp\">"
awk -v meta="$meta" -v version="$cache_version" '
{
gsub(/src="index\.js(\?v=[0-9A-Za-z._-]+)?"/, "src=\"index.js?v=" version "\"")
gsub(/https:\/\/(inbe|breeze)\.waozi\.xyz\//, "https://innerbreeze.org/")
if ($0 ~ /<\/head>/) print " <meta name=\"robots\" content=\"noindex, follow\">"
if ($0 ~ /<meta http-equiv="Content-Security-Policy"/) {
if (!done) print meta
done = 1
@@ -199,6 +202,11 @@ case "$android_apk_asset" in
;;
esac
asset_version=${SITE_ASSET_VERSION:-}
app_host=${SITE_APP_HOST:-innerbreeze.org}
case "$app_host" in
innerbreeze.org|inbe.waozi.xyz) ;;
*) printf 'Error: invalid website app host: %s\n' "$app_host" >&2; exit 1 ;;
esac
if [ -z "$asset_version" ]; then
if git -C "$root_dir" diff --quiet --ignore-submodules HEAD -- 2>/dev/null; then
asset_version=$(git -C "$root_dir" rev-parse --short HEAD 2>/dev/null || date +%s)
@@ -242,6 +250,7 @@ python3 "$root_dir/scripts/prepare-site-assets.py" "$out_dir"
for path in \
index.html \
404.html \
privacy.html \
install-apt.html \
delete-account.html \
@@ -253,6 +262,7 @@ for path in \
robots.txt \
sitemap.xml \
og.png \
og.jpg \
web-assets/dl/inbe-meditation-audio-v1.zip \
web-assets/icons/inbe.png \
web-assets/icons/github.png \
@@ -269,6 +279,7 @@ for path in \
site-icons/favicon-32x32.png \
css/base.css \
css/components.css \
css/landing.css \
theme.css
do
require_output "$path"
+25
View File
@@ -0,0 +1,25 @@
#!/bin/sh
set -eu
host=${1:?Usage: check-account-origin.sh HOST}
case "$host" in
innerbreeze.org|inbe.waozi.xyz) ;;
*) exit 2 ;;
esac
for route in account/delete-with-key sync/challenge sync/login; do
headers=$(curl -fsS --max-time 20 -D - -o /dev/null -X OPTIONS \
-H "Origin: https://$host" \
-H 'Access-Control-Request-Method: POST' \
-H 'Access-Control-Request-Headers: content-type' \
"https://api.waozi.xyz/api/v1/$route") || exit 1
if ! printf '%s\n' "$headers" | awk -v origin="https://$host" '
{ sub(/\r$/, ""); line = tolower($0) }
line == "access-control-allow-origin: " origin { allowed = 1 }
line ~ /^access-control-allow-methods:/ { post = line ~ /[ ,:]post([ ,]|$)/ }
line ~ /^access-control-allow-headers:/ { json = line ~ /[ ,:]content-type([ ,]|$)/ }
END { exit !(allowed && post && json) }
'; then
printf 'Account API does not allow https://%s on %s\n' "$host" "$route" >&2
exit 1
fi
done
printf 'Verified sync and account deletion from https://%s\n' "$host"
+74 -50
View File
@@ -1,56 +1,80 @@
@import url('/assets/editorial/shared.css');
.site-header .brand, .site-header .site-return { min-height: 44px; }
.site-header .site-return { display: inline-flex; align-items: center; }
.botanical { width: 83%; max-width: 340px; justify-self: end; }
.hero .text-link { display: inline-flex; min-height: 44px; align-items: center; gap: 8px; padding-inline: 9px; }
.practice-features { padding-block: 40px 30px; border-top: 1px solid var(--line); }
.practice-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-block: 32px; }
.practice-grid article { min-width: 0; padding: 28px; border: 2px solid var(--ink); border-radius: 20px; background: var(--surface); box-shadow: 0 5px 0 var(--ink); }
.practice-grid article:nth-child(2) { background: var(--sage); }
.practice-grid article:nth-child(3) { background: #fff0bd; }
.practice-grid img { margin-bottom: 24px; }
.practice-grid h3 { margin-bottom: 12px; }
.practice-grid p { color: var(--muted); font-size: 14px; }
.practice-safety { grid-column: 1 / -1; padding-top: 22px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.practice-safety strong { color: var(--ink); font-weight: 600; }
.privacy-band { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 70px; }
.privacy-band h2 { margin-top: 17px; }
.privacy-band > div > p:not(.eyebrow) { color: var(--muted); }
.privacy-band .text-link { display: inline-block; margin-top: 17px; }
.home {
--paper: #f5f3e9;
--ink: #182e28;
--muted: #486057;
--accent: #29584a;
--line: #cbd6c9;
background: radial-gradient(ellipse at 88% 13%, #dce8d9 0%, transparent 39rem), var(--paper);
}
.home h1, .home h2, .home h3, .home .brand { font-family: var(--serif); font-weight: 400; }
.home .brand { min-height: 44px; font-size: clamp(24px, 4vw, 33px); }
.home .brand img { width: 34px; }
.home .site-header { min-height: 76px; }
.home .site-actions { flex-wrap: wrap; gap: 4px 24px; }
.home .text-link { display: inline-flex; align-items: center; min-height: 44px; gap: 8px; color: var(--accent); font-size: 14px; }
.home .hero { min-height: 535px; gap: 40px; padding-block: 62px; }
.home .hero h1 { margin: 0 0 22px; font-size: clamp(65px, 9.3vw, 125px); line-height: .9; }
.home .hero h1 em { color: var(--accent); font-weight: inherit; }
.home .hero-lede { font-size: clamp(16px, 2.3vw, 20px); line-height: 1.6; }
.home .small-note { font-size: 13px; }
.home .button { min-height: 48px; border: 1px solid var(--ink); background: var(--ink); color: #fff; box-shadow: none; font-size: 14px; }
.home .button:hover { background: #345b4e; color: #fff; box-shadow: none; }
.home .botanical {
width: min(100%, 445px);
justify-self: end;
padding: 22px;
border: 1px solid #aabfae;
border-radius: 49% 49% 46% 46%;
animation: botanical-arrive 950ms ease-out both;
}
.home .botanical img { border-radius: inherit; mask-image: radial-gradient(ellipse, #000 54%, transparent 72%); }
@keyframes botanical-arrive {
from { opacity: .6; transform: translateY(10px); }
to { opacity: 1; transform: translateY(0); }
}
.practice-features { padding-block: 40px 34px; border-top: 1px solid var(--line); }
.practice-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-block: 30px; }
.practice-grid article { min-width: 0; padding: 26px; border: 1px solid var(--line); border-radius: 22px; background: #f8faf2; }
.practice-grid article:nth-child(2) { background: #deebdd; }
.practice-grid article:nth-child(3) { background: #f5e8cc; }
.practice-grid img { margin-bottom: 20px; }
.practice-grid h3 { margin-bottom: 9px; }
.practice-grid p, .practice-safety { color: var(--muted); font-size: 14px; }
.practice-safety { padding-top: 18px; border-top: 1px solid var(--line); }
.practice-safety strong { color: var(--ink); }
.dew-band, .privacy-band { display: grid; gap: 24px 56px; align-items: center; }
.dew-band {
grid-template-columns: minmax(0, 1fr) auto;
padding: clamp(24px, 5vw, 52px);
border: 1px solid #bdcebf;
border-radius: 26px;
background: #e5eee2;
}
.dew-band p { max-width: 60ch; margin-top: 14px; }
.privacy-band { grid-template-columns: 1fr 1fr; margin-top: 42px; }
.privacy-band p, .dew-band p { color: var(--muted); }
.download-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 40px; }
.download-grid article { display: grid; grid-template-columns: 36px 1fr; align-items: start; gap: 0 18px; padding: 28px 0; border-top: 1px solid var(--line); }
.platform-icon { width: 28px; height: 28px; margin-top: 4px; object-fit: contain; filter: grayscale(1); mix-blend-mode: multiply; }
.download-grid h3 { font-size: 25px; }
.download-grid p { color: var(--muted); font-size: 12px; margin-top: 9px; }
.link-row { grid-column: 2; display: flex; flex-wrap: wrap; gap: 10px 18px; margin-top: 15px; }
.link-row a { font-size: 11px; }
.migration { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 30px; padding-top: 28px; border-top: 1px solid var(--line); }
.migration h3 { font-size: 25px; }
.migration p { margin-top: 8px; color: var(--muted); font-size: 13px; }
.migration .text-link { display: inline-flex; min-height: 44px; align-items: center; gap: 8px; }
.site-footer { margin-top: 0; }
.site-footer .footer-links { margin-top: 0; }
@media (max-width: 850px) {
.site-header { gap: 18px; }
.site-header .brand { font-size: 25px; }
.site-header .brand img { width: 32px; }
.practice-grid { gap: 16px; }
.practice-grid article { padding: 22px; }
.privacy-band { gap: 30px; }
}
@media (max-width: 650px) {
.download-grid, .practice-grid { grid-template-columns: 1fr; }
.privacy-band { grid-template-columns: 1fr; gap: 24px; }
}
@media (max-width: 540px) {
.site-header { flex-wrap: wrap; gap: 16px; padding-block: 18px; }
.site-actions { width: 100%; justify-content: space-between; }
.site-header .brand { gap: 8px; }
.site-header .site-return { flex-shrink: 0; }
.botanical { width: 55% !important; max-width: 200px; margin-top: -40px !important; margin-bottom: -5px !important; }
.hero-copy { position: relative; z-index: 1; }
.hero .small-note { max-width: 20ch; }
.download-grid article { display: grid; grid-template-columns: 36px 1fr; align-items: start; gap: 0 18px; padding: 22px 0; border-top: 1px solid var(--line); }
.platform-icon { width: 28px; height: 28px; margin-top: 4px; object-fit: contain; filter: grayscale(1); }
.download-grid h3, .migration h3 { font-size: 27px; }
.download-grid p, .migration p { color: var(--muted); margin-top: 8px; }
.link-row { grid-column: 2; display: flex; flex-wrap: wrap; gap: 0 20px; margin-top: 7px; }
.link-row a { display: inline-flex; align-items: center; min-height: 44px; font-size: 13px; }
.migration { padding-top: 24px; border-top: 1px solid var(--line); }
.migration:not(details) { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 30px; }
.web-migration { margin-top: 24px; }
.web-migration summary { padding-block: 9px; cursor: pointer; font-weight: 700; }
.home .site-footer { margin-top: 0; }
.home .footer-links { margin-top: 0; gap: 0 22px; }
.home .footer-links a { display: inline-flex; align-items: center; min-height: 44px; font-size: 13px; }
.home .footer-bottom { font-size: 12px; }
@media (max-width: 680px) {
.home .hero { grid-template-columns: 1fr; min-height: 0; gap: 30px; padding-block: 42px; }
.home .botanical { width: min(66%, 250px); padding: 12px; margin: 0 !important; }
.download-grid, .practice-grid, .privacy-band, .dew-band { grid-template-columns: 1fr; }
.dew-band .button { justify-self: start; }
}
/* The information and migration pages share the same editorial family. */
+47 -29
View File
@@ -5,63 +5,73 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Inner Breeze — breathing, meditation, and habits</title>
<meta name="description" content="Inner Breeze is a calm, local-first app for guided breathing, meditation, and habit tracking on the web, Android, and desktop.">
<link rel="canonical" href="https://breeze.waozi.xyz/">
<link rel="canonical" href="https://innerbreeze.org/">
<link rel="stylesheet" href="/css/landing.css?v=${asset_version}">
<link rel="manifest" href="/manifest.json?v=${asset_version}">
<link rel="icon" type="image/png" sizes="32x32" href="/site-icons/favicon-32x32.png?v=${asset_version}">
<link rel="icon" type="image/png" sizes="192x192" href="/site-icons/icon-192x192.png?v=${asset_version}">
<link rel="apple-touch-icon" href="/site-icons/apple-touch-icon.png?v=${asset_version}">
<meta name="theme-color" content="#fff8ee">
<meta name="theme-color" content="#f5f3e9">
<meta property="og:type" content="website">
<meta property="og:url" content="https://breeze.waozi.xyz/">
<meta property="og:url" content="https://innerbreeze.org/">
<meta property="og:title" content="Inner Breeze">
<meta property="og:description" content="A quieter place for breathing, meditation, and habits.">
<meta property="og:image" content="https://breeze.waozi.xyz/og.png">
<meta property="og:image:type" content="image/png">
<meta property="og:image:width" content="1200">
<meta property="og:image:height" content="630">
<meta property="og:image" content="https://innerbreeze.org/og.jpg">
<meta property="og:image:type" content="image/jpeg">
<meta property="og:image:width" content="1376">
<meta property="og:image:height" content="768">
<meta property="og:image:alt" content="Inner Breeze, breathing, meditation, and habits">
<meta property="og:site_name" content="Inner Breeze">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="Inner Breeze">
<meta name="twitter:description" content="A quieter place for breathing, meditation, and habits.">
<meta name="twitter:image" content="https://breeze.waozi.xyz/og.png">
<meta name="twitter:image" content="https://innerbreeze.org/og.jpg">
<meta name="twitter:image:alt" content="Inner Breeze, breathing, meditation, and habits">
</head>
<body>
<body class="home">
<a class="skip-link" href="#main-content">Skip to content</a>
<header class="site-header">
<a class="brand" href="/" aria-label="Inner Breeze home"><img src="/assets/editorial/lotus.svg" width="43" height="36" alt="">Inner Breeze</a>
<nav class="site-actions" aria-label="Main navigation"><a class="site-return" href="https://waozi.xyz/studio/">← Waozi Studio</a><a class="button button-primary" href="/build/web/index.html">Open web app <span aria-hidden="true">→</span></a></nav>
<nav class="site-actions" aria-label="Main navigation">
<a class="text-link" href="#practices">Practices</a>
<a class="text-link" href="#download">Downloads</a>
<a class="text-link" href="#dew">Dew</a>
</nav>
</header>
<main class="container" id="main-content">
<main class="container" id="main-content" tabindex="-1">
<section class="hero" aria-labelledby="hero-title">
<div class="hero-copy">
<h1 id="hero-title">Make room<br>to breathe.</h1>
<p class="hero-lede">Guided breathing, meditation, and simple habits, at your own pace.</p>
<div class="actions"><a class="button button-primary" href="/build/web/index.html">Open full web app <span aria-hidden="true">→</span></a><a class="text-link" href="#download">Get the app <span aria-hidden="true">→</span></a></div>
<p class="small-note">Free to use · Works offline · No account required</p>
<h1 id="hero-title">Make room<br>to <em>breathe.</em></h1>
<p class="hero-lede">Guided breathing, meditation, and habit tracking. Take a quiet moment now and build a routine at your own pace.</p>
<div class="actions">
<a class="button button-primary" href="/build/web/">Open web app <span aria-hidden="true">↗</span></a>
<a class="text-link" href="#download">Download Inner Breeze <span aria-hidden="true">↓</span></a>
</div>
<p class="small-note">Free to start. No account needed for local practice.</p>
</div>
<figure class="hero-art botanical"><img src="/images/botanical.webp" width="1254" height="1254" alt="A delicate sage-green botanical branch, drawn in ink and watercolor" fetchpriority="high"></figure>
<figure class="hero-art botanical"><img src="/images/botanical.webp" width="1254" height="1254" alt="" fetchpriority="high"></figure>
</section>
<section class="practice-features" id="practices" aria-labelledby="practices-title">
<div class="section-heading">
<p class="eyebrow">At your own pace</p>
<h2 id="practices-title">A little space for you.</h2>
</div>
<div class="section-heading"><h2 id="practices-title">Build a quieter routine.</h2></div>
<div class="practice-grid">
<article><img src="/icons/breathe.png" width="32" height="32" alt=""><h3>Breathe</h3><p>Follow guided patterns or set your own pace.</p></article>
<article><img src="/icons/meditate.png" width="32" height="32" alt=""><h3>Meditate</h3><p>Set a timer and choose a soft background sound.</p></article>
<article><img src="/icons/habits.png" width="32" height="32" alt=""><h3>Build habits</h3><p>Keep your daily routines and saved history together in the full app.</p></article>
<article><img src="/icons/breathe.png" width="32" height="32" alt=""><h3>Breathe</h3><p>Follow a guided breathing pattern or set your own pace.</p></article>
<article><img src="/icons/meditate.png" width="32" height="32" alt=""><h3>Meditate</h3><p>Set a timer and choose a background sound for your session.</p></article>
<article><img src="/icons/habits.png" width="32" height="32" alt=""><h3>Build habits</h3><p>Track your goals, routines, and progress in one place.</p></article>
</div>
<aside class="practice-safety" id="safety" aria-labelledby="safety-title">
<p><strong id="safety-title">Stay seated. Stay gentle.</strong> Intense breathing can cause light-headedness. Never practice while driving, swimming, in water, or anywhere losing consciousness could be dangerous.</p>
<p><strong id="safety-title">Practice somewhere safe.</strong> Intense breathing can cause light-headedness. Stay seated and never practice while driving, swimming, or in water.</p>
</aside>
</section>
<section class="privacy-band section" aria-labelledby="privacy-title"><div><p class="eyebrow">Private by default</p><h2 id="privacy-title">Your data stays<br>with you.</h2></div><div><p>Your history, habits, and preferences stay on your device. No ads or analytics. Sync is optional.</p><a class="text-link" href="/privacy.html">Read about privacy →</a></div></section>
<section class="dew-band section" id="dew" aria-labelledby="dew-title">
<div><h2 id="dew-title">Top up your Dew.</h2><p>Use Dew for optional unlocks in Inner Breeze. Sign in to Waozi Dew with the same account you use in the app to see the available payment methods and current rates.</p></div>
<a class="button button-primary" href="https://dew.waozi.xyz/">Buy Dew <span aria-hidden="true">↗</span></a>
</section>
<section class="privacy-band section" aria-labelledby="privacy-title">
<h2 id="privacy-title">Private by default.</h2>
<div><p>Your history, habits, and preferences are stored on your device. You can turn on sync when you want to use them on other devices.</p><a class="text-link" href="/privacy">Read the privacy policy <span aria-hidden="true">→</span></a></div>
</section>
<section class="download section" id="download" aria-labelledby="download-title">
<div class="section-heading">
<p class="eyebrow">Get the app</p>
<h2 id="download-title">On your device.</h2>
<p class="section-copy">Open Inner Breeze in your browser or install version ${version}.</p>
</div>
@@ -70,7 +80,7 @@
<img class="platform-icon" src="/icons/web.png" alt="">
<div><h3>Web</h3><p>Open a full session without installing anything.</p></div>
<div class="link-row">
<a href="/build/web/index.html">Open web app</a>
<a href="/build/web/">Open web app</a>
<a href="https://github.com/waozixyz/breeze/releases/download/v${version}/inbe-web.zip" target="_blank" rel="noopener">Download bundle</a>
</div>
</article>
@@ -98,7 +108,7 @@
<div class="link-row">
<a href="https://github.com/waozixyz/breeze/releases/download/v${version}/inbe-linux-x86_64.AppImage" target="_blank" rel="noopener">AppImage</a>
<a href="https://github.com/waozixyz/breeze/releases/download/v${version}/inbe_${version}_amd64.deb" target="_blank" rel="noopener">DEB</a>
<a href="/install-apt.html">APT</a>
<a href="/install-apt">APT</a>
<a href="https://github.com/waozixyz/breeze/releases/download/v${version}/inbe-${version}-1.x86_64.rpm" target="_blank" rel="noopener">RPM</a>
<a href="https://github.com/waozixyz/breeze/releases/download/v${version}/inbe-linux-aarch64.AppImage" target="_blank" rel="noopener">ARM64</a>
</div>
@@ -128,10 +138,18 @@
</div>
<a class="text-link" href="/legacy-converter/">Convert old history <span aria-hidden="true">→</span></a>
</aside>
<details class="migration web-migration">
<summary>Used Inner Breeze on the previous website?</summary>
<p>Open the old app in the same browser you used before. Use its data export or export your sync key, then import it in Settings on this website. The two sites have separate browser storage.</p>
<div class="link-row">
<a href="https://inbe.waozi.xyz/build/web/?legacy-origin=1">Open the previous app on inbe.waozi.xyz</a>
<a href="https://breeze.waozi.xyz/build/web/?legacy-origin=1">Open the previous app on breeze.waozi.xyz</a>
</div>
</details>
</section>
</main>
<footer class="site-footer container">
<nav class="footer-links" aria-label="More information"><a href="https://waozi.xyz">Made by Waozi</a><a href="https://github.com/waozixyz/breeze">Source</a><a href="/privacy.html">Privacy</a><a href="/delete-account">Delete sync account</a></nav>
<nav class="footer-links" aria-label="More information"><a href="https://waozi.xyz">Made by Waozi</a><a href="https://git.waozi.xyz/waozi/breeze">Source</a><a href="https://git.waozi.xyz/waozi/breeze/wiki/Home">Wiki</a><a href="/privacy">Privacy</a><a href="/delete-account">Delete sync account</a></nav>
<div class="footer-bottom"><span>© Waozi</span><span>Version ${version}</span></div>
</footer>
</body>
+62
View File
@@ -0,0 +1,62 @@
#!/usr/bin/env python3
"""Copy the currently published APT archive after checking its signatures and hashes."""
import hashlib
import re
import shutil
import subprocess
import sys
from pathlib import Path
ORIGIN = 'https://breeze.waozi.xyz/apt'
KEYRING = Path('packaging/linux/apt/breeze-archive-keyring.gpg').resolve()
DIST = 'dists/stable'
def download(destination, route):
target = destination / route
target.parent.mkdir(parents=True, exist_ok=True)
subprocess.run(['curl', '-fsSL', '--retry', '3', '--max-time', '120',
f'{ORIGIN}/{route}', '-o', target], check=True)
return target
def check_file(path, size, sha256):
with path.open('rb') as stream:
actual = hashlib.file_digest(stream, 'sha256').hexdigest()
if path.stat().st_size != int(size) or actual != sha256:
raise SystemExit(f'APT checksum differs for {path}')
def fields(paragraph):
return dict(line.split(': ', 1) for line in paragraph.splitlines() if ': ' in line and not line.startswith(' '))
def main(destination):
release = download(destination, f'{DIST}/Release')
signature = download(destination, f'{DIST}/Release.gpg')
inrelease = download(destination, f'{DIST}/InRelease')
subprocess.run(['gpgv', '--keyring', KEYRING, signature, release], check=True)
subprocess.run(['gpgv', '--keyring', KEYRING, inrelease], check=True)
cleartext = inrelease.read_text().split('\n\n', 1)[1].split('-----BEGIN PGP SIGNATURE-----', 1)[0]
if cleartext.rstrip() != release.read_text().rstrip():
raise SystemExit('APT Release and InRelease describe different snapshots')
checksums = release.read_text().split('\nSHA256:\n', 1)[1].split('\nSHA512:', 1)[0]
indexed = {name: (size, digest) for digest, size, name in (line.split() for line in checksums.splitlines())}
for architecture in ('amd64', 'arm64'):
index = f'main/binary-{architecture}/Packages'
packages = download(destination, f'{DIST}/{index}')
check_file(packages, *indexed[index])
for paragraph in packages.read_text().strip().split('\n\n'):
package = fields(paragraph)
route = package['Filename']
if not re.fullmatch(rf'pool/main/i/inbe/inbe_[0-9]+\.[0-9]+\.[0-9]+_{architecture}\.deb', route):
raise SystemExit('Unexpected APT package path')
check_file(download(destination, route), package['Size'], package['SHA256'])
shutil.copyfile(KEYRING, destination / 'breeze-archive-keyring.gpg')
download(destination, 'inbe.sources')
print('Preserved the verified live signed APT archive')
if __name__ == '__main__':
main(Path(sys.argv[1]))
+20
View File
@@ -0,0 +1,20 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="robots" content="noindex, follow">
<title>Page not found — Inner Breeze</title>
<link rel="stylesheet" href="/css/landing.css?v=${asset_version}">
</head>
<body>
<main class="document-main">
<h1>Page not found</h1>
<p>This address no longer opens a page on Inner Breeze.</p>
<div class="actions">
<a class="button" href="/">Back to Inner Breeze</a>
<a class="text-link" href="/build/web/">Open web app</a>
</div>
</main>
</body>
</html>
+48 -2
View File
@@ -1,3 +1,29 @@
const canonicalHost = 'innerbreeze.org';
const appHost = '${app_host}';
const accountOnPreviousHost = appHost === 'inbe.waozi.xyz';
const previousHosts = new Set(['inbe.waozi.xyz', 'breeze.waozi.xyz']);
const appPath = /^\/build\/(web|telegram)(?:\/|$)/;
const appEntry = /^\/build\/(web|telegram)(?:\/(?:index(?:\.html)?)?)?$/;
const accountPath = /^\/delete-account(?:[./]|$)/;
function redirectTo(url, host, status) {
const destination = new URL(url);
destination.protocol = 'https:';
destination.hostname = host;
destination.port = '';
return Response.redirect(destination, status);
}
function legacyAsset(url) {
// Old app data is origin-bound. Keep a deliberate way to open it for export,
// along with its same-origin scripts, WASM and other resources.
if (appPath.test(url.pathname)) {
return !appEntry.test(url.pathname) || url.searchParams.get('legacy-origin') === '1';
}
// Installed apt sources and older native downloads retain their stable URLs.
return /^\/(apt|web-assets\/dl)(?:\/|$)/.test(url.pathname);
}
function assetRequest(url, request, method = 'GET') {
const headers = new Headers(request.headers);
for (const name of ['range', 'if-range', 'if-none-match', 'if-modified-since']) {
@@ -79,7 +105,19 @@ async function multipartAsset(url, request, env, manifestResponse, coding) {
export default {
async fetch(request, env) {
const url = new URL(request.url);
if (['GET', 'HEAD'].includes(request.method) &&
const retrieval = request.method === 'GET' || request.method === 'HEAD';
const previousHost = previousHosts.has(url.hostname);
const legacy = previousHost && legacyAsset(url);
const www = url.hostname === 'www.innerbreeze.org';
const accountRoute = accountOnPreviousHost && (appPath.test(url.pathname) || accountPath.test(url.pathname));
if (retrieval && accountRoute && url.hostname !== appHost &&
(url.hostname === canonicalHost || www || (previousHost && !legacy))) {
return redirectTo(url, appHost, 302);
}
if (retrieval && ((previousHost && !legacy && !accountRoute) || www)) {
return redirectTo(url, canonicalHost, 308);
}
if (retrieval &&
/^\/build\/(web|telegram)\/index\.(data|wasm)$/.test(url.pathname)) {
const wasm = url.pathname.endsWith('.wasm');
const manifestUrl = new URL(url);
@@ -113,6 +151,14 @@ export default {
});
}
}
return env.ASSETS.fetch(request);
const response = await env.ASSETS.fetch(request);
if (response.headers.get('Content-Type')?.includes('text/html') &&
(response.status === 404 || url.hostname !== canonicalHost || appPath.test(url.pathname) ||
/^\/(?:404|delete-account|radio|web-assets\/canvas_index)(?:[./]|$)/.test(url.pathname))) {
const headers = new Headers(response.headers);
headers.set('X-Robots-Tag', 'noindex, follow');
return new Response(response.body, {status: response.status, headers});
}
return response;
},
};
+1
View File
@@ -6,6 +6,7 @@
<title>Delete Sync Account - Inner Breeze</title>
<link href="/css/landing.css?v=${asset_version}" rel="stylesheet" />
<meta name="description" content="Delete an Inner Breeze remote sync account using the exported inbe-sync.key file.">
<meta name="robots" content="noindex, follow">
<meta name="theme-color" content="#f7f3eb">
<style>
.account-delete-form {
+1
View File
@@ -6,6 +6,7 @@
<title>Install with APT - Inner Breeze</title>
<link href="/css/landing.css?v=${asset_version}" rel="stylesheet" />
<meta name="description" content="Install Inner Breeze on Debian and Ubuntu from its APT repository and get every release through apt upgrade.">
<link rel="canonical" href="https://innerbreeze.org/install-apt">
<meta name="theme-color" content="#f7f3eb">
<style>
.document-main pre {
+4 -3
View File
@@ -1,16 +1,17 @@
<!DOCTYPE html>
<html lang="en">
<meta charset="utf-8" />
<head>
<meta charset="utf-8">
<title>Inner Breeze Legacy Data Converter</title>
<link href="/css/landing.css?v=${asset_version}" rel="stylesheet" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="Convert inbe-legacy JSON exports into the current Inner Breeze import ZIP format.">
<meta name="theme-color" content="#f7f3eb">
<meta property="og:url" content="https://innerbreeze.org/legacy-converter/">
<meta property="og:title" content="Inner Breeze Legacy Data Converter">
<meta property="og:description" content="Move your original Inner Breeze sessions into the current app—privately, in your browser.">
<meta property="og:image" content="https://inbe.waozi.xyz/og.png">
<link rel="canonical" href="https://inbe.waozi.xyz/legacy-converter/">
<meta property="og:image" content="https://innerbreeze.org/og.jpg">
<link rel="canonical" href="https://innerbreeze.org/legacy-converter/">
<link rel="icon" type="image/png" href="/site-icons/favicon-32x32.png?v=${asset_version}" sizes="32x32">
<link rel="icon" type="image/png" href="/site-icons/icon-192x192.png?v=${asset_version}" sizes="192x192">
<link rel="apple-touch-icon" href="/site-icons/apple-touch-icon.png?v=${asset_version}">
+1 -1
View File
@@ -2,7 +2,7 @@
"name": "Inner Breeze",
"short_name": "Inner Breeze",
"description": "Breathing, meditation sessions, habit tracking, themes, and local-first progress history.",
"start_url": "/build/web/index.html",
"start_url": "/build/web/",
"scope": "/",
"display": "standalone",
"background_color": "#e6f1fa",
+3 -3
View File
@@ -5,17 +5,17 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Privacy Policy — Inner Breeze</title>
<meta name="description" content="How Inner Breeze handles local app data, optional sync, social features, browser extension permissions, and connected services.">
<link rel="canonical" href="https://inbe.waozi.xyz/privacy.html">
<link rel="canonical" href="https://innerbreeze.org/privacy">
<link rel="stylesheet" href="/css/landing.css?v=${asset_version}">
<link rel="icon" type="image/png" sizes="32x32" href="/site-icons/favicon-32x32.png?v=${asset_version}">
<link rel="icon" type="image/png" sizes="192x192" href="/site-icons/icon-192x192.png?v=${asset_version}">
<link rel="apple-touch-icon" href="/site-icons/apple-touch-icon.png?v=${asset_version}">
<meta name="theme-color" content="#f7f3eb">
<meta property="og:type" content="website">
<meta property="og:url" content="https://inbe.waozi.xyz/privacy.html">
<meta property="og:url" content="https://innerbreeze.org/privacy">
<meta property="og:title" content="Privacy Policy — Inner Breeze">
<meta property="og:description" content="Inner Breeze is local-first. Learn what stays on your device and what is shared when you choose an online feature.">
<meta property="og:image" content="https://inbe.waozi.xyz/og.png">
<meta property="og:image" content="https://innerbreeze.org/og.jpg">
</head>
<body>
<header class="topbar">
+1 -1
View File
@@ -1,4 +1,4 @@
User-agent: *
Allow: /
Sitemap: https://inbe.waozi.xyz/sitemap.xml
Sitemap: https://innerbreeze.org/sitemap.xml
+4 -15
View File
@@ -1,18 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://inbe.waozi.xyz/</loc>
<lastmod>2026-05-29</lastmod>
<priority>1.0</priority>
</url>
<url>
<loc>https://inbe.waozi.xyz/privacy.html</loc>
<lastmod>2026-10-29</lastmod>
<priority>0.3</priority>
</url>
<url>
<loc>https://inbe.waozi.xyz/delete-account</loc>
<lastmod>2026-10-29</lastmod>
<priority>0.3</priority>
</url>
<url><loc>https://innerbreeze.org/</loc></url>
<url><loc>https://innerbreeze.org/privacy</loc></url>
<url><loc>https://innerbreeze.org/install-apt</loc></url>
<url><loc>https://innerbreeze.org/legacy-converter/</loc></url>
</urlset>
+30
View File
@@ -147,6 +147,7 @@
let storageEnabled = Boolean(available);
let generation = 0;
let memoryGeneration = 0;
let invoiceOpen = false;
let state = {generation: 0, readable: true, mutation: Promise.resolve()};
if (available) {
if (!storageStates.has(secure)) storageStates.set(secure, state);
@@ -215,6 +216,35 @@
contextCurrent: function () {
return valid && webApp && webApp.initData === context.initData;
},
invoiceAvailable: function () {
return bridge.contextCurrent() && typeof webApp.openInvoice === 'function' &&
typeof webApp.isVersionAtLeast === 'function' && webApp.isVersionAtLeast('6.1');
},
openInvoice: function (invoiceUrl) {
const telegramInvoice = /^https:\/\/t\.me\/(?:\$|invoice\/)[A-Za-z0-9_=-]+$/;
if (!bridge.invoiceAvailable() || invoiceOpen || typeof invoiceUrl !== 'string' ||
invoiceUrl.length > 2048 || !telegramInvoice.test(invoiceUrl)) {
return Promise.resolve('failed');
}
invoiceOpen = true;
// The invoice comes from the payment server. The SDK callback describes
// the dialog only. The caller must read the authoritative purchase status.
return new Promise(function (resolve) {
let settled = false;
function finish(status) {
if (settled) return;
settled = true;
invoiceOpen = false;
const known = ['paid', 'pending', 'cancelled', 'failed'].includes(status);
resolve(known && bridge.contextCurrent() ? status : 'failed');
}
try {
webApp.openInvoice(invoiceUrl, finish);
} catch (_) {
finish('failed');
}
});
},
saveDelegate: async function (capsule) {
if (!capsuleValid(capsule)) throw new Error('invalid delegate capsule');
const current = ++generation;
+50
View File
@@ -0,0 +1,50 @@
#!/bin/sh
set -eu
cd "$(dirname "$0")/.."
revision=${1:?Usage: verify-deployment.sh REVISION}
app_host=${SITE_APP_HOST:-innerbreeze.org}
verify_asset() {
route=$1
file=$2
host=${3:-innerbreeze.org}
attempt=1
while [ "$attempt" -le 5 ]; do
if curl -fsS --compressed --max-time 20 "https://$host$route?revision=$revision" | cmp -s - "$file"; then
printf 'Verified %s\n' "$route"
return
fi
attempt=$((attempt + 1))
sleep 3
done
printf 'Production asset differs: %s\n' "$route" >&2
return 1
}
verify_asset / build/site/index.html
verify_asset /css/landing.css build/site/css/landing.css
verify_asset /robots.txt build/site/robots.txt
verify_asset /sitemap.xml build/site/sitemap.xml
verify_asset /build/web/ build/site/build/web/index.html "$app_host"
verify_asset /build/telegram/ build/site/build/telegram/index.html "$app_host"
verify_asset /delete-account build/site/delete-account.html "$app_host"
verify_asset /apt/dists/stable/InRelease build/site/apt/dists/stable/InRelease
missing_status=$(curl -sS --max-time 20 -o /dev/null -w '%{http_code}' "https://innerbreeze.org/website-missing-route?revision=$revision")
test "$missing_status" = 404
printf 'Verified missing route returns HTTP 404\n'
for host in inbe.waozi.xyz breeze.waozi.xyz; do
path='/privacy?source=previous%2Fsite&lang=en'
result=$(curl -sS --max-time 20 -o /dev/null -w '%{http_code} %{redirect_url}' "https://$host$path")
test "$result" = "308 https://innerbreeze.org$path"
result=$(curl -fsSL --max-time 20 --max-redirs 4 -o /dev/null -w '%{url_effective}' "http://$host$path")
test "$result" = "https://innerbreeze.org$path"
printf 'Verified redirect from %s\n' "$host"
done
if [ "$app_host" = inbe.waozi.xyz ]; then
for route in /build/web/ /build/telegram/ /delete-account; do
route="$route?source=site%2Flaunch&lang=en"
result=$(curl -sS --max-time 20 -o /dev/null -w '%{http_code} %{redirect_url}' "https://innerbreeze.org$route")
test "$result" = "302 https://$app_host$route"
result=$(curl -fsSL --max-time 20 --max-redirs 2 -o /dev/null -w '%{url_effective}' "https://innerbreeze.org$route")
test "$result" = "https://$app_host$route"
printf 'Verified account origin handoff for %s\n' "$route"
done
fi