Releases: ynamite/viterex_addon
Release list
viterex_addon-3.5.8.zip
Fixed
stubs/stylelint.config.js: every Tailwind@applyfailed the lint.
stylelint-config-standardenablesat-rule-prelude-no-invalid, which
cannot parse a utility list (@apply flex gap-2) and reported
Invalid prelude … for at-rule "@apply"on each one. The scaffolded config
now ignores@applyfor that rule (keeping the upstreammediaignore),
like it already does forat-rule-no-unknownandat-rule-no-deprecated.
Existing projects: re-run "Install stubs", or add
"at-rule-prelude-no-invalid": [true, { ignoreAtRules: ["media", "apply"] }]
to therulesof yourstylelint.config.jsby hand.
viterex_addon-3.5.7.zip
Fixed
stubs/.gitignore.example:vendor/and.tools/matched at every
depth. The unanchored patterns also ignored nested directories such as a
project-local addon's committedsrc/addons/<addon>/vendor. They are now
anchored to the project root (/vendor/,/.tools/). Existing projects
keep their old lines — "Install stubs" only appends the new ones, so remove
the unanchoredvendor//.tools/entries by hand if they bite.
viterex_addon-3.5.6.zip
Fixed
stubs/style.css: a glob inside a CSS comment closed it early. The
commented-out@source "../../fragments/**/*.php";contains*/(inside
**/), so the comment ended after/**and left stray tokens in the
scaffolded stylesheet. The hint now suggests the directory form
@source "../../fragments";, which Tailwind scans recursively.
viterex_addon-3.5.5.zip
Fixed
- Scaffolded Tailwind
@sourceglobs were silently dead. The stub's
@source "/src/…"paths resolve as absolute filesystem paths and matched
nothing — Tailwind's default whole-project heuristic scan carried every
project unnoticed, and also tokenized docs/markdown prose into bogus class
candidates (spurioustailwind-clampwarnings at build time, e.g.
clamp-[text,…]). The stub now uses@import "tailwindcss" source(none)
with stylesheet-relative globs (incl.src/assets/jsfor Alpine class
getters), making scanning explicit-only and deterministic.
viterex_addon-3.5.4.zip
Fixed
- Shipped
stubs/biome.jsoncbroke biome in user projects. Biome's tree-wide config discovery found the stub undersrc/addons/viterex_addon/stubs/as a second root config and aborted before checking anything — and since the scaffoldedlintscript isbiome check && stylelint …, stylelint never ran either. The stub now ships asbiome.jsonc.stub(invisible to discovery) and is renamed tobiome.jsoncat install time. Same treatment forstylelint.config.js, which stylelint's per-file upward config lookup could pick up for stub files. - Lint/format script globs scoped to the assets source dir. The
package.jsonstub'sstylelint/prettierglobs were**/*— in a real install they matched core, addon, and vendored files (26k foreign errors in a reported project). They now carry a__VITEREX_ASSETS_SOURCE_DIR__token replaced with the configuredassets_source_dirat scaffold time.
Changed
- Scaffolded biome + stylelint configs understand Tailwind 4 (
@theme,@utility,@variant,--value()/--modifier()…), exclude core/addon/vendored/generated paths in both classic and modern layouts, and exclude machine-managed manifests (composer.json,package.json) from the format gate. Known smells in the massif starter libs are downgraded to warnings so they surface without gating. - Stub
vite.config.jsandstyle.cssnow pass the scaffolded lint gate.
Upgrade note for existing projects: your scaffolded biome.jsonc / stylelint.config.js / package.json are kept as-is; apply the new excludes and scoped globs manually or re-install stubs with overwrite.
viterex_addon-3.5.3.zip
Fixed
Stale host_url (http://localhost) in structure.json after a seeded install (Vite dev server answering with Access-Control-Allow-Origin: http://localhost). The 3.5.2 fix regenerated the file on every cache clear, but Config::getHostUrl() read the domain from rex_yrewrite::getDomains() — static state built at boot from yrewrite's cached config.php. When the database is seeded after that cache was generated (create-viterex: package:install → seed → cache:clear), the CLI cache-clear process still saw zero domains and wrote localhost; only the next cache clear picked up the domain — and a dev server started in between kept the wrong CORS origin until restarted.
getHostUrl() now queries the rex_yrewrite_domain table directly (source of truth, always current), normalizing rows the same way yrewrite does (new pure helper Config::hostUrlFromDomainRows(), unit-tested).
viterex_addon-3.5.2.zip
Fixed
Bogus host_url (http://.) in structure.json (Vite dev server answering with Access-Control-Allow-Origin: http://.). Two defects, both fixed:
Config::getHostUrl()usedrex_yrewrite::getDefaultDomain(), which returns yrewrite's synthetic catch-all (hostnull), not the configured domain. Its URL is built from$_SERVER, so any CLI context — console commands, an installer runningpackage:install— producedhttp://..getHostUrl()now picks the first real yrewrite domain (host set) and only then falls back to$_SERVER.structure.jsonwas only written on addon install and on saving the settings page, so yrewrite domains configured afterwards (e.g. an installer seeding the database afterpackage:install) never reached the file. It is now regenerated on every cache clear (CACHE_DELETEDextension point,LATEso yrewrite rebuilds its own data first) — a plainbin/console cache:clearor the dev badge's cache-clear button self-heals a stalehost_url.
viterex_addon-3.5.1.zip
Fixed
- One-request fatal during addon update (
Class "Ynamite\ViteRex\Csp" not foundinBadge.php): the old version's badgeOUTPUT_FILTERclosure lazy-loads the newBadge.phpafter files are swapped, before the autoloader knows aboutlib/Csp.php.install.phpnow eagerly requiresCspso the late-firing closure resolves it. Takes effect for updates to this release and later.
viterex_addon-3.5.0.zip
Added
- CSP nonce support. Every tag ViteRex emits —
<script type="module">,<link rel="stylesheet">, and the relevant<link rel="modulepreload">/<link rel="preload" as="style">tags, plus the dev badge — now carries the per-request nonce fromrex_response::getNonce()(core ≥5.15.0, with abin2hex(random_bytes(16))fallback on older cores). A project-defined strict CSP (script-src 'self' 'nonce-…'; style-src 'self' 'nonce-…') now works with ViteRex assets out of the box. Stamping is always-on (a stray nonce is inert without a CSP) and requires no configuration. NewYnamite\ViteRex\Csphelper (nonce(),attr()). ViteRex deliberately does not build or send the CSP header — the policy is page-global and remains the project's responsibility. Dev/HMR remains best-effort (Vite injects its own runtime tags ViteRex cannot reach); production is fully clean.