Bump views 0.5.0 + facade CDN 1.0.32 + wc-content-kit FE rebuild#59
Open
AndrewKirkovski wants to merge 3 commits into
Open
Bump views 0.5.0 + facade CDN 1.0.32 + wc-content-kit FE rebuild#59AndrewKirkovski wants to merge 3 commits into
AndrewKirkovski wants to merge 3 commits into
Conversation
Wippy Web Host 1.0.31 release brings:
- @wippy-fe/webcomponent-core: opt-in reactive primitive
(this.reactive.props.subscribe / events.emit) — framework-agnostic
reactive bindings on WippyElement, no Vue dependency for non-Vue
consumers. Vue variant refactored to bridge the core adapter into
Vue refs (composables unchanged).
- $W.sanitize(html, opts?) proxy API — default-allowlisted HTML
sanitizer that auto-allows currently-registered WC tags
(loadByTagName / loadWebComponent / autoload all push into a
per-context tag-allowlist tracker; the tracker mirrors into
hostConfig.allowAdditionalTags so the host's chat sanitizer
picks up on-demand-loaded tags too).
- sanitize-html + markdown-it + markdown-it-async externalized via
the import map — child apps `import sanitizeHtml from 'sanitize-html'`
/ `import MarkdownIt from 'markdown-it'` instead of bundling
their own copies.
- Docs pass: README import-map table covers all 16 entries,
iframe-proxy.md gains Web Component Loading + HTML Sanitization
sections, web_components.spec.md gains a Reactive Bindings
(opt-in) section, pinia-persist README expanded to a full API
reference.
Web Host total tests: 477 across 29 files (+51 from 1.0.30).
Verified end-to-end in app-template-raw with dev FE mode pointing
at the local 1.0.31 build.
Refs updated in src/facade/{_index.yaml, README.md, Makefile,
config_handler_test.lua}. Vendored public/@wippy-fe/loading.js is
byte-identical to 1.0.30 (no change in the loading package source
between releases), so no re-vendor needed this cycle.
wippy lint --level error: 8 entries, no issues.
views (0.5.0):
- New `bundled_meta.lua` library that fetches `dist/wippy-meta.json`
from each consumer's served bundle via self-HTTP and projects it
alongside the YAML registry entry into the wire response shape.
YAML-first per-field priority: registry `meta.*` wins; bundled
meta fills gaps. Each missing-meta entry id is warned at most
once per process lifetime via a shared `store.memory` (the new
`bundled_meta_warn` store entry in _index.yaml).
- `component_registry.lua` + `page_registry.lua`: removed `or ""`
defaults on `name` / `title` / `description` / `tag_name` /
`entry_point` / `props` / `events`. In Lua `""` is truthy and
was blocking the projection's bundled-meta fallback chain. Added
`description` to the ComponentInfo / PageInfo shapes.
- `api/find_by_tag.lua`: added a slow-path scan for consumers
that ship `wippy.tagName` in bundled meta but DON'T declare
`meta.tag_name` in YAML — registry index misses, fallback
iterates all view.components fetching bundled meta to find the
match. Linear in component count × cache-hot self-fetch.
- `api/list_components.lua`: rewired to use
`bundled_meta.project_component_response` instead of an inline
builder, so the list endpoint matches /components/by-tag byte
for byte and picks up `description` automatically.
- Adds bundled_meta tests + extends component_registry tests.
- Published as wippy/views@0.5.0.
facade (0.6.6):
- Bumped the CDN ref `webcomponents-1.0.31` -> `webcomponents-1.0.32`
in `src/facade/{_index.yaml, Makefile, README.md,
config_handler_test.lua}` — matches the gen-2-chat 1.0.32
release that ships @wippy-fe/* 0.0.32 as the canonical FE
bundle.
- Published as wippy/facade@0.6.6 (0.6.5 was taken on hub).
wc-content-kit (0.1.1):
- All three FE packages (mermaid, markdown, chartjs) bumped:
@wippy-fe/theme + webcomponent-core + webcomponent-vue +
proxy from ^0.0.26 to ^0.0.32; added
@wippy-fe/vite-plugin@^0.0.32 as a devDep.
- Each vite.config.ts now wires `wippyComponentPlugin()` so the
build emits `dist/wippy-meta.json` per the wippy-component-1.0
spec — picked up by wippy/views 0.5.0 at serve time.
- Per-package version bumped 0.1.0 -> 0.1.2.
- Lockfiles regenerated under the new peer-dependency graph
(all three were previously pinned at the 0.0.26 set).
- `public/{mermaid,markdown,chartjs}/` rebuilt: each now has its
own `wippy-meta.json` next to `index.js`, mermaid's hashed
chunks rotated to match the new mermaid v11 + chart.js
resolution.
- Published as wippy/wc-content-kit@0.1.1.
Verified end-to-end with app-template-raw configured to pull
from the hub (no `replacements:` in wippy.lock): wippy boots
clean on the new modules, /api/public/components/list returns
all 7 example WCs with full bundled-meta projection
(title/description/props/events sourced correctly), Playwright
loads the Components page and all 7 elements render in the
host (reaction-bar, counter-persist, websocket-log, chart-circle
mermaid, markdown, model-gallery).
…er defaults Two component_registry_test.lua cases asserted the pre-fix behaviour where the registry layer applied `index.js` / `index.html` defaults to `entry_point`. After moving those defaults to `bundled_meta.project_*_response` (so the YAML-first `or` chain correctly falls through to bundled meta when YAML omits the field — Lua "" is truthy and would block the fallback if applied at the registry layer), the registry now returns raw nil. The function-under-test behaviour changed, so the tests need to match the new contract: - "defaults entry_point to index.js" → "returns nil entry_point when YAML omits it (default applied at projection layer)" - "page defaults entry_point to index.html" → same rename for pages. Both tests now assert `test.is_nil(comp.entry_point)` / `test.is_nil(page.entry_point)` with a comment explaining the projection-layer-defaults rationale. The "respects custom entry_point" test is unchanged — when YAML sets `meta.entry_point: main.js`, the registry still surfaces "main.js" as expected. Fixes the failing Test (views) CI check on PR #59. Verified `wippy lint --level error` on src/views still clean (16 entries checked, no issues).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Coordinated bump across three wippy modules to align with @wippy-fe/ 0.0.32* and the new
wippy-meta.jsonbuild-time contract.bundled_meta.lua: fetchesdist/wippy-meta.jsonfrom each consumer via self-HTTP, projects it alongside the YAML registry entry with YAML-first per-field priority. Removedor ""defaults on raw-nil fields incomponent_registry.lua+page_registry.lua(Lua""is truthy, was blocking fallback chains). Added slow-path tag scan +descriptionfield in the wire response.api/list_components.luanow uses the same projection as/components/by-tag(endpoints match byte-for-byte).webcomponents-1.0.31→webcomponents-1.0.32in 4 files. Matches gen-2-chat 1.0.32 / @wippy-fe/* 0.0.32 release.dist/wippy-meta.jsonper the wippy-component-1.0 spec. Per-package version 0.1.0 → 0.1.2, lockfiles regenerated,public/rebuilt.All 3 modules published to hub.
Test plan
wippy lint --level errorclean for all 3 modulesreplacements:in wippy.lock):wippy installclean,wippy runboots,/api/public/components/listreturns 7 components with full bundled-meta projection, Playwright Components page renders all 7 example WCs.