Expand description
Embedded WebDev route bundle — the CLI’s own gateway-side surface.
Phase 5 ships five action-dispatch WebDev routes (tags, tagConfig,
alarms, tagHistory, scriptExec) whose sources live under
crates/ignition-core/webdev/routes/ (inside the crate so the
published package embeds them). This module embeds them into the
binary at compile time so ign webdev deploy (05-03) can zip and
upload the bundle with no source checkout — the routes travel with
the binary.
Layering: this module is pure data (constants + include_str!); the
deploy orchestration and the version handshake live in the actions
layer. ROUTE_BUNDLE_VERSION must equal every route’s ROUTE_VERSION
constant and the webdev/routes/VERSION file — the contract tests
below pin all three copies together.
scriptExec is deliberately NOT part of ROUTE_FILES: its source is a
TEMPLATE carrying the __IGN_CLI_SECRET__ substitution marker
(SCRIPT_EXEC_TEMPLATE). Deploy substitutes the deploy-time secret
before packing it, and keeping it out of the always-on bundle makes an
unsubstituted deploy impossible by construction.
Constants§
- MIN_CLI
- Minimum CLI version the deployed routes require (handshake
minCli). - ROUTE_
BUNDLE_ VERSION - Version of the embedded route bundle — the
versionhandshake action in every route answers with this value (asrouteVersion). - ROUTE_
FILES - The always-on deploy set:
(zip_member_path, contents)pairs. - SCRIPT_
EXEC_ TEMPLATE - The scriptExec route TEMPLATE — secret-gated arbitrary script execution.