mirror of
https://github.com/nexu-io/open-design.git
synced 2026-10-27 09:51:12 +01:00
* fix(plugin-previews): validate baked preview metadata against shipped plugins The Home Community gallery renders whatever data/plugin-previews/manifest.json names, and nothing kept that metadata in sync with reality: #4815 deleted 19 example plugins but left all 19 manifest entries behind, #4040 shipped a card showing another plugin's imagery, a failed re-bake silently leaves the old clip serving outdated content, and durationMs recorded the intended walk time rather than the encoded file (23 entries carried holdMs > real duration, so the card's idle loop pointed past the end of the clip). - add scripts/check-plugin-preview-manifest.ts to pnpm guard: every manifest entry must name a shipped plugin, own its clip keys (<id>/<hash>/... or the legacy <id>.<hash>....), carry a coherent fingerprint, and never share a clip with another entry; prune the 19 orphaned entries it caught - bake validation (BAKE_VERSION 5): reject blank clips (whole-clip luma range via ffprobe signalstats), record durationMs from the encoded file, clamp holdMs to it, and write a bake-report.json naming skipped/stale/blank plugins instead of swallowing the failure - strict mode (--strict / PREVIEW_STRICT=1) fails the run when a bake left broken metadata behind; the pre-merge validation workflow now runs strict while the post-merge/nightly publishers stay lenient * fix(plugins): make the hyperframes example self-contained The example loaded cdn.tailwindcss.com (a render-blocking head script the page never used — every style is inline) plus Google Fonts. Inside the sandboxed gallery iframe or on a slow network the stalled script showed a long blank instead of the composition, and the CI bake raced the webfonts. Drop both: the page now renders from local system font stacks with zero external requests, so the live preview, the detail iframe, and the baked clip all show the same content. * fix(plugin-previews): address review — fail fast on probe errors, widen strict trigger paths - probeClipMs/clipLumaRange now throw instead of returning null: ffprobe is required validation infrastructure, and a swallowed probe error silently disabled exactly the checks this PR adds. A thrown error becomes an 'error …' skip, is recorded in bake-report.json under 'errors', and fails strict mode — while the routine skips every sweep has (non-html plugins 404ing the preview route) still never trip strict. - bake-plugin-previews-pr.yml now also triggers on plugins/community/**, .github/actions/bake-previews/**, and itself, so community-plugin preview changes and bake-recipe changes cannot merge without the strict pre-merge validation. * fix(plugin-previews): bake static pages as a held still instead of skipping forever The strict pre-merge bake on this PR caught five manifest entries that could NEVER refresh: example-dating-web, example-html-ppt-zhangzara-8-bit-orbit, example-frame-logo-outro, od-new-generation, example-orbit-notion. All five are (near-)static pages — the CDP screencast only delivers frames when something repaints, so they produce 1-4 frames and the old 'frames < 5' guard skipped them on every bake, nightly included, leaving their committed entries permanently stale (their old clips are the 103-210ms degenerate files in the manifest today). Encode <5-frame captures as a still instead: hold the last frame for the idle-loop span (half before the trailing repeated concat entry, half inherited by it, summing to ~HOLD_MS). Only a zero-frame capture is a real failure now. The blank-luma check still rejects stills of nothing. * fix(plugin-previews): never persist a manifest entry without a fingerprint When the preview fingerprint fetch failed, the loop still rendered and — on an otherwise successful bake — persisted an entry with hash: null and un-fingerprinted keys: metadata the content-hash reuse skip can never match again and the new manifest guard rejects. Treat a missing fingerprint as an infrastructure error instead: skip the plugin, record it under errors in bake-report.json (strict mode exits non-zero), and leave any committed entry untouched for the next sweep. --------- Co-authored-by: Tuola Ge <gexingli@refly.ai>
69 lines
2.7 KiB
JSON
69 lines
2.7 KiB
JSON
{
|
|
"name": "open-design",
|
|
"version": "0.12.1",
|
|
"private": true,
|
|
"packageManager": "pnpm@10.33.2",
|
|
"type": "module",
|
|
"description": "Local-first design product: detects your installed code-agent CLI, runs design skills + design systems, streams artifacts into a sandboxed preview.",
|
|
"license": "Apache-2.0",
|
|
"bin": {
|
|
"od": "./apps/daemon/bin/od.mjs"
|
|
},
|
|
"scripts": {
|
|
"postinstall": "node ./scripts/postinstall.mjs",
|
|
"tools-dev": "pnpm exec tools-dev",
|
|
"tools-pack": "pnpm exec tools-pack",
|
|
"tools-release": "pnpm exec tools-release",
|
|
"tools-serve": "pnpm exec tools-serve",
|
|
"nix:update-hash": "node --experimental-strip-types ./scripts/update-nix-pnpm-deps-hash.ts",
|
|
"guard": "tsx ./scripts/guard.ts && node --import tsx --test scripts/style-policy.test.ts scripts/product-neutrality.test.ts scripts/web-import-isolation.test.ts scripts/check-cross-app-imports.test.ts scripts/approve-fork-pr-workflows.test.ts scripts/lint-craft-references.test.ts scripts/check-design-system-manifests.test.ts scripts/check-plugin-preview-manifest.test.ts",
|
|
"lint:craft": "tsx ./scripts/lint-craft-references.ts",
|
|
"i18n:check": "tsx ./scripts/i18n-check.ts",
|
|
"i18n:coverage": "tsx ./scripts/i18n-coverage-report.ts",
|
|
"sync:community-pets": "node --experimental-strip-types scripts/sync-community-pets.ts",
|
|
"bake:community-pets": "node --experimental-strip-types scripts/bake-community-pets.ts",
|
|
"seed:test-projects": "node --experimental-strip-types scripts/seed-test-projects.ts",
|
|
"seed:curated-design-skills": "node --experimental-strip-types scripts/seed-curated-design-skills.ts",
|
|
"backfill:failed-runs": "node --experimental-strip-types scripts/backfill-failed-runs-with-artifacts.ts",
|
|
"typecheck": "pnpm -r --workspace-concurrency=4 --if-present run typecheck && tsc -p scripts/tsconfig.json --noEmit"
|
|
},
|
|
"devDependencies": {
|
|
"@open-design/components": "workspace:*",
|
|
"@open-design/daemon": "workspace:*",
|
|
"@open-design/tools-dev": "workspace:*",
|
|
"@open-design/tools-pack": "workspace:*",
|
|
"@open-design/tools-release": "workspace:*",
|
|
"@open-design/tools-serve": "workspace:*",
|
|
"@types/node": "20.19.39",
|
|
"tsx": "4.22.3",
|
|
"typescript": "5.9.3"
|
|
},
|
|
"engines": {
|
|
"node": "~24",
|
|
"pnpm": ">=10.33.2 <11"
|
|
},
|
|
"pnpm": {
|
|
"overrides": {
|
|
"brace-expansion": "5.0.6",
|
|
"devalue": "5.8.1",
|
|
"fast-uri": "3.1.2",
|
|
"hono": "4.12.19",
|
|
"ip-address": "10.2.0",
|
|
"postcss": "8.5.15",
|
|
"protobufjs": "8.4.0",
|
|
"qs": "6.15.2",
|
|
"tmp": "0.2.7",
|
|
"yaml": "2.9.0"
|
|
},
|
|
"onlyBuiltDependencies": [
|
|
"better-sqlite3",
|
|
"core-js",
|
|
"electron",
|
|
"electron-winstaller",
|
|
"esbuild",
|
|
"protobufjs",
|
|
"sharp"
|
|
]
|
|
}
|
|
}
|