feat(cli): add theme_vars_check.php for client MokoOnyx themes #327

Merged
jmiller merged 2 commits from feat/theme-vars-check into main 2026-06-29 16:45:43 +00:00
Owner

Adds cli/theme_vars_check.php — validation for client MokoOnyx theme packages, the logic behind the new Template-Client Theme Variables Check workflow.

Checks:

  • Required CSS variables defined in both light.custom.css and dark.custom.css (33 tokens: accent + Bootstrap contextual colors, -rgb, -text-emphasis, -bg-subtle, body, links).
  • Required files present (templateDetails.xml, light/dark custom CSS, user.css).
  • Manifest sanity: <version> set, update server is the dynamic MokoGitea feed (not a legacy /raw/branch/ URL), and <dlid> present.

Standalone script (plain PHP + getopt, no CliFramework/SourceResolver dependency) so it runs even while the shared framework autoloader is broken. Tested green against a real client repo and red against a repo with missing vars / legacy URL / no dlid.

Authored-by: Moko Consulting

Adds `cli/theme_vars_check.php` — validation for client MokoOnyx theme packages, the logic behind the new Template-Client `Theme Variables Check` workflow. Checks: - **Required CSS variables** defined in **both** `light.custom.css` and `dark.custom.css` (33 tokens: accent + Bootstrap contextual colors, `-rgb`, `-text-emphasis`, `-bg-subtle`, body, links). - **Required files** present (`templateDetails.xml`, light/dark custom CSS, `user.css`). - **Manifest sanity**: `<version>` set, update server is the dynamic MokoGitea feed (not a legacy `/raw/branch/` URL), and `<dlid>` present. Standalone script (plain PHP + `getopt`, no `CliFramework`/`SourceResolver` dependency) so it runs even while the shared framework autoloader is broken. Tested green against a real client repo and red against a repo with missing vars / legacy URL / no dlid. Authored-by: Moko Consulting
jmiller added 1 commit 2026-06-29 16:36:41 +00:00
feat(cli): add theme_vars_check.php for client MokoOnyx themes
Universal: Build & Release / Promote to RC (pull_request) Failing after 3s
Universal: Build & Release / Build & Release Pipeline (pull_request) Has been skipped
Generic: Project CI / Lint & Validate (pull_request) Successful in 31s
Platform: mokocli CI / Gate 1: Code Quality (pull_request) Failing after 56s
pr-check.yml / Branch Policy (pull_request) Has been cancelled
Universal: PR Check / Secret Scan (pull_request) Has been cancelled
Universal: PR Check / Validate PR (pull_request) Has been cancelled
Generic: Repo Health / Access control (pull_request) Has been cancelled
Generic: Repo Health / Site Health (pull_request) Has been cancelled
Generic: Project CI / Tests (pull_request) Has been cancelled
Platform: mokocli CI / Gate 2: Unit Tests (8.1) (pull_request) Has been cancelled
Platform: mokocli CI / Gate 2: Unit Tests (8.2) (pull_request) Has been cancelled
Platform: mokocli CI / Gate 2: Unit Tests (8.3) (pull_request) Has been cancelled
Platform: mokocli CI / Gate 3: Self-Health Check (pull_request) Has been cancelled
Platform: mokocli CI / Gate 4: Governance (pull_request) Has been cancelled
Platform: mokocli CI / Gate 5: Template Integrity (pull_request) Has been cancelled
Platform: mokocli CI / CI Summary (pull_request) Has been cancelled
Universal: PR Check / Build RC Package (pull_request) Has been cancelled
Universal: PR Check / Report Issues (pull_request) Has been cancelled
Generic: Repo Health / Scripts governance (pull_request) Has been cancelled
Generic: Repo Health / Repository health (pull_request) Has been cancelled
Generic: Repo Health / Report: Scripts Governance (pull_request) Has been cancelled
Generic: Repo Health / Report: Repository Health (pull_request) Has been cancelled
7e4d88eea5
Validates a client theme package: required CSS variables defined in both
light.custom.css and dark.custom.css, required files present, and
templateDetails.xml sanity (version, dynamic update server not raw/branch,
dlid). Standalone (no CliFramework dependency).

Authored-by: Moko Consulting
jmiller added 1 commit 2026-06-29 16:45:15 +00:00
feat(cli): derive required vars from MokoOnyx standard theme + repo metadata
Universal: Build & Release / Promote to RC (pull_request) Has been skipped
Universal: Build & Release / Build & Release Pipeline (pull_request) Failing after 6s
Generic: Project CI / Lint & Validate (pull_request) Successful in 16s
Platform: mokocli CI / Gate 1: Code Quality (pull_request) Failing after 1m3s
pr-check.yml / Branch Policy (pull_request) Has been cancelled
Universal: PR Check / Secret Scan (pull_request) Has been cancelled
Universal: PR Check / Validate PR (pull_request) Has been cancelled
Generic: Repo Health / Access control (pull_request) Has been cancelled
Generic: Repo Health / Site Health (pull_request) Has been cancelled
Branch Cleanup / Delete merged branch (pull_request) Has been cancelled
RC Revert / Rename rc/ back to dev/ (pull_request) Has been cancelled
Universal: Workflow Sync Trigger / Sync workflows to live repos (pull_request) Has been cancelled
Generic: Project CI / Tests (pull_request) Has been cancelled
Platform: mokocli CI / Gate 2: Unit Tests (8.1) (pull_request) Has been cancelled
Platform: mokocli CI / Gate 2: Unit Tests (8.2) (pull_request) Has been cancelled
Platform: mokocli CI / Gate 2: Unit Tests (8.3) (pull_request) Has been cancelled
Platform: mokocli CI / Gate 3: Self-Health Check (pull_request) Has been cancelled
Platform: mokocli CI / Gate 4: Governance (pull_request) Has been cancelled
Platform: mokocli CI / Gate 5: Template Integrity (pull_request) Has been cancelled
Platform: mokocli CI / CI Summary (pull_request) Has been cancelled
Universal: PR Check / Build RC Package (pull_request) Has been cancelled
Universal: PR Check / Report Issues (pull_request) Has been cancelled
Generic: Repo Health / Scripts governance (pull_request) Has been cancelled
Generic: Repo Health / Repository health (pull_request) Has been cancelled
Generic: Repo Health / Report: Scripts Governance (pull_request) Has been cancelled
Generic: Repo Health / Report: Repository Health (pull_request) Has been cancelled
b1f2c391cb
- Read the required CSS variable set dynamically from the MokoOnyx standard
  theme (--reference checkout) instead of a hardcoded list, so it auto-syncs.
  Verifies client light/dark custom CSS defines every standard variable.
- Add optional repo-metadata check via Gitea API (--api-base/--repo/--token):
  description, website, topics, default branch.
- Drop unused --strict flag.

Authored-by: Moko Consulting
jmiller merged commit 97f2226288 into main 2026-06-29 16:45:43 +00:00
jmiller deleted branch feat/theme-vars-check 2026-06-29 16:45:43 +00:00
Sign in to join this conversation.
No Reviewers
No labels
Priority -
Type -
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: MokoConsulting/MokoCLI#327