@@ -141,13 +141,13 @@ function sample(): Plugin {
141141 * `/h5p/bundles/`, for a chat that runs Node but reaches no npm registry. The h5p-author skill
142142 * builds there from what it gets from here:
143143 *
144- * - `h5p-author-build.tar.gz`: the command line, every part of the pack with its index, and
145- * `libraries.txt`, which the person downloads once and attaches to a chat whose code can fetch
146- * nothing. ChatGPT's cannot: its download tool saved none of eleven files tried on 2026-11-13,
147- * ours or any site's, and an installed plugin's files never reach it. With this attached it
148- * built, as Claude and Grok did. Every type in one file, since it is downloaded before a type is
149- * chosen; a `.tar.gz`, since ChatGPT took the same files as a `.zip` for a plugin to install and
150- * refused it.
144+ * - `h5p-author-build.tar.gz`: the command line and its licence list , every part of the pack with
145+ * its index, and `libraries.txt`, which the person downloads once and attaches to a chat whose
146+ * code can fetch nothing. ChatGPT's cannot: its download tool saved none of eleven files tried
147+ * on 2026-11-13, ours or any site's, and an installed plugin's files never reach it. With this
148+ * attached it built, as Claude and Grok did. Every type in one file, since it is downloaded
149+ * before a type is chosen; a `.tar.gz`, since ChatGPT took the same files as a `.zip` for a
150+ * plugin to install and refused it.
151151 * - `<type>.zip`, one per content type in the pack (`h5p-author bundle --all`): `parts/`, the
152152 * pack's whole index with the parts a build of that type can read, and `libraries.txt`. With
153153 * the command line, two files a chat that can fetch takes from here: Grok built that way on
@@ -159,6 +159,9 @@ function sample(): Plugin {
159159 * it. Since 0.9.8 its `--version` prints the versions from copies of the two package.json files
160160 * Vite writes in (h5p-offline-player#198); before, it crashed, finding neither beside it. The
161161 * build runs it and stops where it does not print the versions `index.json` says.
162+ * - `h5p-author-LICENSES.txt`: every package bundled into `h5p-author.mjs` with its licence, as
163+ * Vite lists them, since MIT and BSD-3-Clause ask their notices to travel with copies (zod came
164+ * in with h5p-author 0.12.0; zip.js was in already). It goes into the archive with the tool.
162165 * - `index.json`: the author's and the pack's versions, and each bundle's file, size and parts.
163166 * - `libraries.txt`: the pack's licence list, which asks to travel with its libraries.
164167 *
@@ -196,6 +199,7 @@ function bundles(): Plugin {
196199 emptyOutDir : false ,
197200 copyPublicDir : false ,
198201 minify : false ,
202+ license : { fileName : 'h5p-author-LICENSES.txt' } ,
199203 reportCompressedSize : false ,
200204 rolldownOptions : { output : { entryFileNames : 'h5p-author.mjs' , format : 'es' , codeSplitting : false } }
201205 } ,
@@ -208,6 +212,7 @@ function bundles(): Plugin {
208212 // The archive lays them out as a build from the bundles does: `tar -xzf`, then `--libraries parts`.
209213 const archive = tarGz ( [
210214 [ 'h5p-author.mjs' , await readFile ( join ( folder , 'h5p-author.mjs' ) ) ] ,
215+ [ 'h5p-author-LICENSES.txt' , await readFile ( join ( folder , 'h5p-author-LICENSES.txt' ) ) ] ,
211216 [ 'libraries.txt' , await readFile ( join ( folder , 'libraries.txt' ) ) ] ,
212217 [ 'parts/index.json' , await readFile ( join ( parts , 'index.json' ) ) ] ,
213218 ...( await Promise . all ( index . libraries . map ( async ( { folder : part } ) => [ `parts/${ part } .h5p` , await readFile ( join ( parts , `${ part } .h5p` ) ) ] as const ) ) )
@@ -380,6 +385,9 @@ export default defineConfig({
380385 outDir : '_site' ,
381386 emptyOutDir : false ,
382387 assetsDir : ASSETS ,
388+ // Every package bundled into the page's scripts with its licence (zod, zip.js, CodeMirror and
389+ // ours), beside the runtime's and the pack's: MIT and BSD-3-Clause ask it to travel with them.
390+ license : { fileName : `${ ASSETS } /build-page-LICENSES.txt` } ,
383391 rolldownOptions : {
384392 input : { 'build-page' : 'src/h5p/build/build-page.ts' } ,
385393 output : { entryFileNames : 'h5p/build/[name].js' }
0 commit comments