Packaging
Hosanna Tools resolves config and builds the shared application for Browser, Tizen, webOS, Roku, Apple, and Android targets. The final store submission is still governed by each vendor: Samsung certificates, LG Seller Lounge resources, Roku signing, Xcode archives, Gradle release bundles, and static web hosting have different credentials and release checks.
There is no universal set of package:dev or release:final scripts. Use the scripts in the application’s package.json and keep them thin wrappers around documented HST and platform commands.
Build Before Packaging
Resolve the intended environment and build target explicitly:
# The application-owned script emits the Browser Vite artifact.
npm run build:browser
npx hst build tizen prod device --non-interactive \
--signing-profile samsung-tv-prod
npx hst build webos prod device --non-interactive
npx hst build roku prod device \
--hsc-project platforms/hsconfig-roku.prod.json \
--non-interactive
npx hst build apple-tv prod device \
--bundled \
--non-interactive
npx hst build android-tv prod device \
--bundled \
--non-interactive
Use --dry-run --explain first when a profile, app flavor, or CI environment can alter the resolved plan.
Platform Boundary
| Target | HST/shared output | Final packaging owner |
|---|---|---|
| Browser | Generated source, resolved runtime config, and Vite/static assets | The app’s web build and hosting pipeline |
| Samsung Tizen | Chrome 68-compatible staged Web DOM host and signed .wgt | HST invokes Samsung CLI; external certificate profile and Samsung certification remain vendor-owned |
| LG webOS | Chrome 68-compatible staged Web DOM host and .ipk | HST invokes LG CLI; Developer Mode trust and Seller Lounge release remain vendor-owned |
| Roku | BrightScript, SceneGraph XML, manifest, assets, and source maps | hst roku:package plus Roku signing/certification |
| iOS / Apple TV | Bundled JavaScript/assets and app-owned native project | Xcode archive/export and App Store tooling |
| Android / Android TV | Bundled JavaScript/assets and app-owned Gradle project | Gradle/Android Studio and Play tooling |
For Browser, hst build browser ... emulator resolves build-only inputs but
does not replace the host application's production Vite script.
hst build tizen ... and hst build webos ... bundle, stage, package, and
return an artifact path without discovering or contacting a TV. hst run ... device adds device discovery, install, and launch. Inspection and termination
are separate explicit device commands. Vendor
SDKs, signing keys, accounts, and initial device trust are external prerequisites
and are never npm dependencies or committed project files.
Packaged TV builds use relative URLs, classic IIFE output, Chrome 68 syntax,
and no service worker or production source maps. Production manifests start
with package-local CSP. Add only exact reviewed service origins; development
staging substitutes exact LAN debugger and configured media/API origins into
the host templates. Wildcard origins and unsafe-eval are release failures.
Roku Example
The current hosanna-ui-samples repository exposes:
npm run roku:build:prod
npm run roku:bundle
npm run roku:package
roku:bundle creates the project’s distributable source bundle. hst roku:package can package and sign through a developer-enabled Roku using environment variables such as:
ROKU_IPROKU_DEVPASSWORDROKU_DEV_IDROKU_DEV_PASSWORDROKU_PKG_NAMEorROKU_PKG_KEY_BASE64
Keep all passwords and signing material in an ignored secret store or protected CI variables. Never add default passwords, private IPs, or package keys to documentation or tracked config.
Build Config and Secrets
Tracked behavior belongs under build-config/; confidential overlays belong under ignored secrets/.
npx hst build-config:resolve \
--env prod \
--platform roku \
--out assets/meta/build-config.json \
--manifest-out build/build-config-sources.json \
--explain
In CI, restore ignored overlays from protected base64 variables before resolving:
npx hst build-config:restore-secrets --env prod --quiet
The restore command does not print secret values. Still restrict logs and artifact paths: the resolved runtime config can contain values that should not be published independently.
Release Checks
Before signing or uploading an artifact:
- Confirm the SDK, compiler, lockfile, app profile, environment, and Git revision.
- Generate source and fail if tracked generated output is stale.
- Resolve production config without developer profiles or test credentials.
- Build once and archive that exact output; do not rebuild between QA and release.
- Inspect package contents for source maps, mock data, debug flags, unused assets, and secrets.
- Run platform smoke, launch, deep-link, networking, playback, and recovery checks.
- Record checksums and platform version/build numbers with the release.