Skip to content

author 0.11.0

Choose a tag to compare

@alekswebnet alekswebnet released this 18 Nov 11:48

Confine a build to folders: within

buildPackage(source, output, { within: [folder] }) reads local files, and writes the package, only inside the folders given, judged on real paths, so .. and links out are refused. A path outside gets the same answer whether or not a file is there, a file that cannot be read is a problem of the source's, and the problems name no absolute path. For a tool that builds what a model wrote, such as a local MCP server.

Build without writing: check and build --check

buildPackage(source, undefined, { check: true }) and h5p-author build --check source.json run every check a build runs and write no package. A media file named by web address is still downloaded, to a temporary folder removed after.

Fetch from the public internet only: publicFetch

Pass fetch: publicFetch and a build refuses an address on a local or private network however it is written, IPv4 written as IPv6 included, on every redirect, and drops Authorization, Proxy-Authorization and Cookie on a redirect to another site.

The content as text: outline and outlineOf

Every build result has outline: the content as plain lines for a review, made when it is first read. What the author wrote, the right answers marked, score ranges, slides, chapters and questions numbered, a scenario's links, a video's times; interface texts and settings left out. outlineOf(libraries, content) makes one from what loadLibraries loaded, taking its arguments as checkContent does.

Fixed

  • Markup with a > inside a quoted attribute built into text a browser hides, and the link or tag after it swallowed what followed. It is now refused: write > for it (#222).
  • Tags are read as H5P's content check splits markup, so the check for an empty field and the layouts' measures read a < inside an attribute, or one that starts no tag, as the check does.

Full Changelog: author-v0.10.3...author-v0.11.0