Repository navigation
feat: a build page for h5p-author sources - #10
Merged
Merged
Conversation
/build turns a source an AI chat wrote with the h5p-author skill into a .h5p in the browser, for a chat whose sandbox cannot install the build tool, as in ChatGPT. The source is pasted, opened, or carried by the link's fragment (#source=, base64url, raw-deflated or not); the build is @missing-elements/h5p-author/browser from h5p-libraries/install's pack; problems are listed by path and copied for the chat; files the source names are chosen and matched by name; the package plays and downloads. Brings the player packages up to date (player 1.5.1, embed 1.7.0, libraries 1.1.0, runtime 1.0.1) so the page plays with the pack the author package pins. Closes #9
This was referenced Nov 9, 2026
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.
Closes #9
What
/build: a source an AI chat wrote with the h5p-author skill becomes a.h5pin the user's browser. It's for a chat whose sandbox cannot install the build tool, as in ChatGPT..jsonfile, or carried by the link:/build#source=<base64url>, holding the JSON or the JSON compressed with raw deflate. The fragment is never sent to a server. A linked source builds at once, unless it names files of its own.@missing-elements/h5p-author/browser, the same build as the command's. Its libraries come from@missing-elements/h5p-libraries/install's pack, which Vite emits here one part per library. A build fetches only the parts its package needs, and the package carries the editor libraries an H5P site's upload check wants.<h5p-player>on the page, and Download <title>.h5p saves it.Files:
build.html,src/build-page.ts(the wiring),src/build-source.ts(no DOM: the fragment, the named files, the chat text, the file name),src/build.css, andvite.config.tsgains the page as a second input under the same CSP. The README has a section on the page.Dependencies
Brought up to date so the page plays with the pack the author package pins: player 1.1.1 → 1.5.1, embed 1.1.0 → 1.7.0, libraries ^1.0.0 → 1.1.0, runtime 1.0.0 → 1.0.1, plus
@missing-elements/h5p-author0.5.0. pnpm resolves one copy of each. This makes Dependabot's #6 and #7 unnecessary.src/h5p-page.tsis unchanged.Testing
pnpm typecheck,pnpm build,pnpm e2e: 10 passed, the 6 existing player tests and 4 new ones ine2e/build.spec.ts:rivers.h5p, a zip that carriesH5PEditor.*, with nothing fetched off the origin;pictures/delta.pngwaits for the file, then builds with it (1 media file).node -e … deflateRawSync … base64url) on a True/False source made a 255-character link, which built and played on the local build with no errors.Not verified: the deployed page on GitHub Pages, and ChatGPT itself opening a link (expected to work, since it's an ordinary link).
Order
Deploy this before the skill change in missing-elements/h5p-offline-player (SKILL.md step 3) reaches users, or the skill's link will 404.