mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-11-02 19:57:13 +00:00
* fix(core): bundled local scripts keep their own place, defer and async The bundler joined every local <script src> into one inline script at the first one's position. That dropped defer and async (a deferred main.js ran before a deferred CDN gsap), moved later files ahead of CDN scripts between them, and let one file's error stop the rest. Each local script is now inlined where it stands with its attributes; a deferred or async one keeps its tag with its file as a data: URL. Inline-script merging also no longer folds in nomodule scripts, which dropped the attribute. * fix: preview scripts run after the runtime when the bundler fails, and inlined files are escaped - When the bundler returns nothing or throws, the preview places the runtime where the bundled page does (end of head) instead of after the composition's scripts or not at all; core's placement moves to insertRuntimeTag. - Every HTML-spec JavaScript MIME type counts as a classic script for merging and the web-font gate. - Inlined local files and merged runs are escaped with escapeInlineScriptSource. * fix: deferred local scripts run late without data: URLs, and authored runtime reads survive - Local defer/async scripts are inlined in their own tag with the attribute kept; the font-gate runner (and its old-runtime fallback) runs an inline classic defer script after the classic scripts, in document order, so a page policy that allows inline scripts but not data: still runs them. - stripEmbeddedRuntimeScripts matches the bootstrap attribute and runtime file names on the tag, not runtime words in an authored script's text. - The preview applies its runtime on every path, so an adapter page without one still gets it; the inline escaper writes <!-- as \x3C!--, valid in a unicode regex. * fix: a deferred inline script waits for the deferred CDN script before it to load * fix: an authored script that mentions the runtime marker no longer stops the runtime being added * fix: only inlined deferred files run late, head ones included, and renders skip a CDN runtime link * fix: deferred head files run as before, and one selector owns the deferred-file rule * fix: a local file's legacy <!-- comment no longer breaks its merged run, and escapes keep case * fix: a local file inlined on its own keeps working with a legacy <!-- comment * test(core): a local non-JavaScript file keeps its text as written
76 lines
4.0 KiB
JSON
76 lines
4.0 KiB
JSON
{
|
|
"guards": {
|
|
"scripts/check-media-use-copy-parity.test.mjs": [
|
|
"skills/media-use/scripts/lib/**",
|
|
"packages/cli/src/media-use/lib/**",
|
|
"scripts/generate-skill-module-copies.mjs",
|
|
"skills/hyperframes/scripts/lib/frame-packets-core.mjs",
|
|
"skills/media-use/audio/scripts/lib/bgm-volume.mjs"
|
|
],
|
|
"scripts/check-test-reachability.test.mjs": [
|
|
".github/workflows/ci.yml",
|
|
"**/package.json",
|
|
"**/*.test.{mjs,ts,tsx}"
|
|
],
|
|
"scripts/creator-editing-capabilities.test.mjs": [
|
|
"skills/**",
|
|
"packages/core/**",
|
|
"packages/engine/**"
|
|
],
|
|
"scripts/registry-primitive-payloads.test.ts": ["registry/**"],
|
|
"scripts/generate-catalog-previews.test.ts": [
|
|
"registry/**",
|
|
"scripts/**",
|
|
"packages/producer/**"
|
|
],
|
|
"scripts/generate-catalog-payloads.test.ts": ["registry/**", "scripts/**"],
|
|
"skills/product-launch-video/scripts/build-frame-subsets.test.mjs": [
|
|
"scripts/generate-captured-font-copies.mjs",
|
|
"skills/product-launch-video/scripts/build-frame.mjs",
|
|
"skills/product-launch-video/scripts/captions.mjs",
|
|
"skills/product-launch-video/scripts/lib/captured-fonts.mjs",
|
|
"skills/faceless-explainer/scripts/build-frame.mjs",
|
|
"skills/faceless-explainer/scripts/captions.mjs",
|
|
"skills/faceless-explainer/scripts/lib/captured-fonts.mjs",
|
|
"skills/pr-to-video/scripts/build-frame.mjs",
|
|
"skills/pr-to-video/scripts/captions.mjs",
|
|
"skills/pr-to-video/scripts/lib/captured-fonts.mjs"
|
|
],
|
|
"scripts/check-skill-import-boundaries.test.mjs": ["skills/**"]
|
|
},
|
|
"runners": [
|
|
{
|
|
"cwd": ".",
|
|
"command": "set -euo pipefail\nmapfile -t SKILLS_TESTS < <(find skills packages/cli/src/media-use -type f -name \"*.test.mjs\" | sort)\nif [ \"${#SKILLS_TESTS[@]}\" -eq 0 ]; then\necho \"::error::No skills/**/*.test.mjs files found. Did the layout change?\"\nexit 1\nfi\nSKILLS_TESTS+=(scripts/check-media-use-copy-parity.test.mjs scripts/creator-editing-capabilities.test.mjs)\nprintf 'Running %d skills test file(s):\\n' \"${#SKILLS_TESTS[@]}\"\nprintf ' * %s\\n' \"${SKILLS_TESTS[@]}\"\nnode --import ./packages/cli/scripts/test-home.mjs --test \"${SKILLS_TESTS[@]}\"",
|
|
"tests": [
|
|
"skills/**/*.test.mjs",
|
|
"packages/cli/src/media-use/**/*.test.mjs",
|
|
"scripts/check-media-use-copy-parity.test.mjs",
|
|
"scripts/creator-editing-capabilities.test.mjs"
|
|
],
|
|
"sources": {},
|
|
"reason": "Shell find plus an explicit parity file; exact command match invalidates this mapping on edits."
|
|
},
|
|
{
|
|
"cwd": ".",
|
|
"command": "bun run producer:test:${{ matrix.lane }}",
|
|
"tests": [
|
|
"packages/producer/src/**/*.test.ts",
|
|
"packages/producer/scripts/test-classification.test.mjs",
|
|
"packages/producer/tests/**/*.test.ts"
|
|
],
|
|
"sources": {
|
|
"packages/producer/scripts/run-test-lane.mjs": "bff02680f19eebcce0df72cdeedbbc05edfdcede3f3f60658fc0cb18ed8c59f6",
|
|
"packages/producer/scripts/test-classification.mjs": "e16151bbd3a3f9767e513fdfb1155fad286855e1b9ffb077ace80d3fe900bd16",
|
|
".github/workflows/ci.yml#job#producer-source-tests": "45da72aa6cf08cdfd5bcf5311e89f12af4842f9eebc6735df19da8c02f4d4864",
|
|
"packages/producer/package.json#script#test:unit": "ae6beda8319d166774be958ea5593cd27dbf7f6c9bce1d787a3fe28dfc3477b1",
|
|
"packages/producer/package.json#script#test:integration": "008589f37d026877595a13501cbb66abd5cbe50e21fdcac6904f45466c3f475d",
|
|
"packages/producer/package.json#script#test:classification": "4ad50d88c81de374dd6ef8a53d702a4b1901483837ecd3d833b1cb0c9a29a058",
|
|
"package.json#script#producer:test:unit": "ded6d4183d455d1f414e41d15794c1aef5323e53b5ea5e2ff349e3bb049c18db",
|
|
"package.json#script#producer:test:integration": "8bb545947f4f8fef3bd5c6c9b1bcb394c7c942d7a3ab90cf4540c662572a278e"
|
|
},
|
|
"reason": "Both unit and integration matrix lanes discover tests under src and tests; workflow and runner sources are pinned to invalidate changed selection."
|
|
}
|
|
]
|
|
}
|