Skip to content

Commit a87c487

Browse files
committed
Serve the licences of the packages the build page and the archive's tool bundle
1 parent 75fc02a commit a87c487

3 files changed

Lines changed: 22 additions & 10 deletions

File tree

‎src/h5p/build/index.njk‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -328,8 +328,9 @@ csp: "default-src 'self'; script-src 'self'; style-src 'self'; img-src 'self' da
328328
{%- set footNote %}
329329
<p>
330330
Built with <a href="https://github.com/missing-elements/h5p-offline-player">h5p-offline-player</a>
331-
and <code>@missing-elements/h5p-author</code>, MIT. The H5P runtime the player loads is
332-
<a href="/h5p/assets/runtime-LICENSE.txt">GPL-3.0</a>.
331+
and <code>@missing-elements/h5p-author</code>, MIT, among
332+
<a href="/h5p/assets/build-page-LICENSES.txt">the packages the page bundles</a>. The H5P runtime
333+
the player loads is <a href="/h5p/assets/runtime-LICENSE.txt">GPL-3.0</a>.
333334
</p>
334335
{%- endset %}
335336
{% include "site-foot.njk" %}

‎src/h5p/create-with-ai/index.njk‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,10 @@ csp: "default-src 'self'; script-src 'self'; style-src 'self'; img-src 'self'; o
245245
<a href="https://github.com/missing-elements/h5p-offline-player">h5p-offline-player</a>. The H5P
246246
runtime the player loads is <a href="/h5p/assets/runtime-LICENSE.txt">GPL-3.0</a>, and the H5P
247247
libraries in a file are each under their own licence, most MIT, as
248-
<a href="/h5p/assets/libraries-LICENSES.txt">the pack's licence list</a> says.
248+
<a href="/h5p/assets/libraries-LICENSES.txt">the pack's licence list</a> says. The packages
249+
bundled into the build page and into the build archive's tool are listed with their licences
250+
in <a href="/h5p/assets/build-page-LICENSES.txt">the page's list</a> and
251+
<a href="/h5p/bundles/h5p-author-LICENSES.txt">the tool's</a>.
249252
</p>
250253
<p>
251254
Privacy first: nothing you make is sent to this site, and there is no server of ours in

‎vite.config.ts‎

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)