Repository navigation
Serve the build tool and a library bundle per content type at /bundles/ - #15
Merged
Merged
Conversation
…bundles/ For a chat that runs Node and can fetch a file but reaches no npm registry, as ChatGPT's sandbox: the h5p-author skill (author 0.6.0) fetches the command line and the bundle of the source's content type from here and builds with them. The build writes, from the pinned packages: a zip per content type (h5p-author bundle --all), every part of the pack under its own name for an addon a build names, the command line as one file bundled by Vite, the licence list and an index.json. 113 MB in dist/, none of it in git. Closes #14
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 #14.
The h5p-author skill, as of author 0.6.0 (missing-elements/h5p-offline-player#166), builds where npm is unreachable from two files fetched from this site: the build tool, and the bundle of the source's content type. ChatGPT's sandbox runs Node and its download tool takes a file the browsing tool has opened, so the chat builds, sees every problem itself, fixes its source and hands over the package. The build page stays for a chat that can fetch nothing.
What
/bundles/serves/bundles/<type>.zipparts/, the pack's whole index with the parts a build of that type can read, andlibraries.txt. Written bywriteBundles, which ish5p-author bundle --all/bundles/parts/<part>.h5pH5P.MathDisplay-1.0.h5pto fetch from here/bundles/h5p-author.mjs--libraries;--versiondoes not work in it, soindex.jsoncarries the versions/bundles/index.json/bundles/libraries.txtA
bundles()plugin invite.config.tswrites them after the pages, from the packages the lockfile pins, so a Dependabot update of h5p-author or h5p-libraries moves them. They are indist/only: 113 MB (the site 136 MB), within GitHub Pages' 1 GB; the build takes about two seconds longer.@missing-elements/h5p-authormoves to^0.6.0, forwriteBundles.Tested
e2e/bundles.spec.ts, through the preview server, as a chat would:index.jsonlists the bundles, and each is served at its listed size; every part inparts/index.jsonis served; the licences and the tool are there.H5P.QuestionSet.zipare fetched into an empty folder outside the project, so nothing installed is found, then unzipped withunzip, and a quiz is built withnode h5p-author.mjs build … --libraries parts. A source with$$3^2$$then stops, the part is read from the build's own message, fetched from/bundles/parts/, and the build succeeds.The whole suite passes locally, 13 tests, typecheck clean.
After merge
The deploy publishes
/bundles/, and the skill's step 3 starts finding its files; until then it falls back to the build page's link. Then the check only ChatGPT can do: the download tool on a zip from github.io,unziporpython3 -m zipfile, Node 22.16 running the tool.Summary by cubic
Closes #14. Serves the h5p-author build tool and a library bundle per content type at
/bundles/, so an AI chat that runs Node and fetches files but reaches no npm registry can build H5P packages itself. The build page stays for a chat that can fetch nothing.What
/bundles/servesparts/for addons a build names,index.json, andlibraries.txt.h5p-author.mjs, the command line bundled into a single file by Vite so it runs with nothing installed.dist/only (113 MB), from the lockfile-pinned packages, so a Dependabot update of@missing-elements/h5p-authoror@missing-elements/h5p-librariesmoves them.Testing
@missing-elements/h5p-authormoves to^0.6.0forwriteBundles; the build takes about two seconds longer.Written for commit 7077de0. Summary will update on new commits.