Skip to main content

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​

Browser, Tizen, webOS, Roku, Apple, and Android delivery lanes from Hosanna build output to platform-owned packaging and releaseBrowser, Tizen, webOS, Roku, Apple, and Android delivery lanes from Hosanna build output to platform-owned packaging and release

TargetHST/shared outputFinal packaging owner
BrowserGenerated source, resolved runtime config, and Vite/static assetsThe app’s web build and hosting pipeline
Samsung TizenChrome 68-compatible staged Web DOM host and signed .wgtHST invokes Samsung CLI; external certificate profile and Samsung certification remain vendor-owned
LG webOSChrome 68-compatible staged Web DOM host and .ipkHST invokes LG CLI; Developer Mode trust and Seller Lounge release remain vendor-owned
RokuBrightScript, SceneGraph XML, manifest, assets, and source mapshst roku:package plus Roku signing/certification
iOS / Apple TVBundled JavaScript/assets and app-owned native projectXcode archive/export and App Store tooling
Android / Android TVBundled JavaScript/assets and app-owned Gradle projectGradle/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_IP
  • ROKU_DEVPASSWORD
  • ROKU_DEV_ID
  • ROKU_DEV_PASSWORD
  • ROKU_PKG_NAME or ROKU_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​

Six ordered BuildConfig overlays resolving into the canonical runtime file before serving, building, or packagingSix ordered BuildConfig overlays resolving into the canonical runtime file before serving, building, or packaging

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​

CI trust boundary separating untrusted validation from protected signing, promotion of tested bytes, and retained release evidenceCI trust boundary separating untrusted validation from protected signing, promotion of tested bytes, and retained release evidence

Before signing or uploading an artifact:

  1. Confirm the SDK, compiler, lockfile, app profile, environment, and Git revision.
  2. Generate source and fail if tracked generated output is stale.
  3. Resolve production config without developer profiles or test credentials.
  4. Build once and archive that exact output; do not rebuild between QA and release.
  5. Inspect package contents for source maps, mock data, debug flags, unused assets, and secrets.
  6. Run platform smoke, launch, deep-link, networking, playback, and recovery checks.
  7. Record checksums and platform version/build numbers with the release.
Talk to us