pithyx validate
pithyx validate checks an app project as the box would check the package built from it: pithyx.json, icon.svg, the built frontend, the package layout, the backend’s Compose file and its images lock. It writes nothing and needs no network. pithyx pack runs the same checks before it writes a package.
Synopsis
Section titled “Synopsis”pithyx validate [project folder] [--frontend <folder>]Options
Section titled “Options”| Option | Value | Type | Default | Description |
|---|---|---|---|---|
--frontend |
<folder> |
string | dist |
The built frontend |
What it checks
Section titled “What it checks”pithyx.jsonagainst the manifest schema and the rules beyond it (id, version ranges, window sizes, references, schedules, elevated rights).icon.svgwith the box’s icon rules. A warningcli.icon.templatewhile it is still the template icon of@pithyx/cli.- The built frontend folder. Hidden files and folders (names starting with
.) stay out of the package with a warningcli.frontend.skipped; links and special files are errors (app.package.invalid, reasonentry_type); a missing folder is the errorcli.frontend.missing. - The package layout as
packwould write it, for example that the manifest’sentryexists belowfrontend/. - With a backend: the Compose file named in
backend.composeagainst the Compose rules and the manifest, thenbackend/images.lock.json: it must exist (cli.lock.missing), parse (cli.lock.invalid) and list exactly the images of the Compose file (cli.lock.stale). An image without an amd64 or an arm64 entry is a warning (cli.lock.platform_missing): the app will not install on boxes of that architecture. A Composehealthchecknext to the manifest’shealthis a warning (cli.compose.healthcheck_redundant): it delays every start and keeps the idle backend busy. Beforepithyx buildthe project may have onlybackend/compose.dev.yaml: thenvalidatechecks that source form against the same rules (withbuildin place ofimage) and warnscli.backend.unbuiltinstead of checking the lock, so it needs no Docker.packstill needs the builtcompose.yaml.
The lock is checked only when the Compose file passes. Warnings never change the exit code.
| File | Access |
|---|---|
pithyx.json, icon.svg |
read |
the frontend folder (--frontend, default dist), every file below it |
read |
README.md, README, LICENSE, LICENSE.md, LICENSE.txt at the project root |
listed for the package when they exist |
the Compose file of backend.compose, backend/images.lock.json |
read |
Exit codes
Section titled “Exit codes”| Code | When |
|---|---|
| 0 | No finding of level error. It prints <id> <version> is valid. |
| 1 | At least one error. |
| 2 | More than one project folder. |
A folder without pithyx.json fails with the error cli.manifest.missing and exit code 1, also when it has a built frontend; pack and lock refuse it the same way.
Findings
Section titled “Findings”Errors with the box’s codes app.manifest.*, app.icon.invalid, app.package.invalid, app.package.layout_invalid, app.compose.* and app.elevated.unsupported, plus the CLI’s own cli.manifest.missing, cli.frontend.*, cli.icon.template and cli.lock.*. Each one with its message is listed under Findings.
Examples
Section titled “Examples”# The project in the current folder, frontend built to dist/pithyx validate
# Another project whose build goes to build/pithyx validate ../photo-app --frontend build