@beff/aula-cli 0.4.2 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/licenses/fonts-OFL-NotoSans.txt +94 -0
- package/dist/src/aula-render.core.wasm +0 -0
- package/dist/src/{chunk-7KT36JRP.js → chunk-2NMVSQG4.js} +83 -93
- package/dist/src/{chunk-46KT47TH.js → chunk-5VYKT646.js} +1 -1
- package/dist/src/chunk-A5QHTZKT.js +6 -0
- package/dist/src/{chunk-CIFP475T.js → chunk-DQ2NGXNI.js} +6 -321
- package/dist/src/chunk-EQ3DVZV5.js +15 -0
- package/dist/src/chunk-IKKANHTF.js +94 -0
- package/dist/src/chunk-JDXHKYLZ.js +369 -0
- package/dist/src/chunk-JVCECTG2.js +77 -0
- package/dist/src/{chunk-BT3Z5CJI.js → chunk-YBHISJLN.js} +70 -31
- package/dist/src/cli.js +12 -7
- package/dist/src/{commands-QCUCX2GF.js → commands-34YCDSR5.js} +8 -5
- package/dist/src/{problems-7BVC64RO.js → problems-U4QXN6RO.js} +4 -2
- package/dist/src/project-WS7P5VIH.js +12 -0
- package/dist/src/render-child.js +284 -9
- package/dist/src/{run-5WC5WRZ2.js → run-7PM6EPND.js} +45 -9
- package/dist/src/{server-GK3EWFX3.js → server-YQYW4FT4.js} +6 -5
- package/dist/src/site-SVNNSF72.js +139 -0
- package/dist/web/app/assets/9733ee91/aula-method.js +1 -0
- package/dist/web/app/assets/9733ee91/aula.js +1 -0
- package/dist/web/app/assets/{dcda3118 → 9733ee91}/build-worker.js +2 -2
- package/dist/web/app/assets/9733ee91/index.js +52 -0
- package/dist/web/app/assets/__vite-browser-external-B57JSoUh.js +1 -0
- package/dist/web/app/assets/aula-voice-worker-CjOTYyla.js +52 -0
- package/dist/web/app/assets/{aula.core5-BhR-OOvz.wasm → aula.core5-CfWXNps1.wasm} +0 -0
- package/dist/web/app/assets/{index-C_rGCAZR.css → index-BXxc0ZmT.css} +1 -1
- package/dist/web/app/assets/protocol-CylXac4E.js +15 -0
- package/dist/web/app/assets/src-CkCfHCj6.js +25 -0
- package/dist/web/app/index.html +4 -4
- package/dist/web/site/assets/64cc3acd/aula-method.js +1 -0
- package/dist/web/site/assets/64cc3acd/aula.js +1 -0
- package/dist/web/site/assets/64cc3acd/build-worker.js +696 -0
- package/dist/web/site/assets/64cc3acd/index.js +52 -0
- package/dist/web/site/assets/__vite-browser-external-BtQTJ51O.js +1 -0
- package/dist/web/site/assets/__vite-browser-external-uE9Q5hLF.js +1 -0
- package/dist/web/site/assets/aula-voice-worker-CbfByYTT.js +54 -0
- package/dist/web/site/assets/aula.core-BtiPQSZi.wasm +0 -0
- package/dist/web/site/assets/aula.core5-CfWXNps1.wasm +0 -0
- package/dist/web/site/assets/esbuild-BaXVPFT2.wasm +0 -0
- package/dist/web/site/assets/index-Dn5gqwRn.css +2 -0
- package/dist/web/site/assets/protocol-C4jhAcOf.js +15 -0
- package/dist/web/site/assets/rolldown-runtime-BLXQ4ufn.js +1 -0
- package/dist/web/site/assets/src-BlEGe8aL.js +25 -0
- package/dist/web/site/index.html +39 -0
- package/package.json +2 -2
- package/dist/src/chunk-GFCJYE75.js +0 -42
- package/dist/src/project-NWT5MDQI.js +0 -11
- package/dist/web/app/assets/__vite-browser-external-BTgt74Au.js +0 -1
- package/dist/web/app/assets/aula-voice-worker-CZGtnmSr.js +0 -52
- package/dist/web/app/assets/dcda3118/aula-method.js +0 -1
- package/dist/web/app/assets/dcda3118/aula.js +0 -1
- package/dist/web/app/assets/dcda3118/index.js +0 -52
- package/dist/web/app/assets/protocol-OKrdpPQW.js +0 -15
- package/dist/web/app/assets/src-DYumAKNc.js +0 -25
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
6
|
+
<title>Aula videos</title>
|
|
7
|
+
<script type="module" crossorigin src="./assets/64cc3acd/index.js"></script>
|
|
8
|
+
<link rel="modulepreload" crossorigin href="./assets/rolldown-runtime-BLXQ4ufn.js">
|
|
9
|
+
<link rel="modulepreload" crossorigin href="./assets/src-BlEGe8aL.js">
|
|
10
|
+
<link rel="modulepreload" crossorigin href="./assets/protocol-C4jhAcOf.js">
|
|
11
|
+
<link rel="stylesheet" crossorigin href="./assets/index-Dn5gqwRn.css">
|
|
12
|
+
</head>
|
|
13
|
+
<body>
|
|
14
|
+
<script>
|
|
15
|
+
// An old copy of this page from the browser's cache names the files of an old build, which
|
|
16
|
+
// a deploy removed (#504). GitHub Pages lets a browser keep a file for 10 minutes. This
|
|
17
|
+
// script gets the page again from the server. When the new page names another entry
|
|
18
|
+
// script, it loads the page again, one time: the flag in sessionStorage stops a loop. It is
|
|
19
|
+
// inline and classic, because the old entry script can be the file that is missing.
|
|
20
|
+
(() => {
|
|
21
|
+
const FLAG = "aula-reloaded";
|
|
22
|
+
const src = document.querySelector('script[type="module"][src]')?.getAttribute("src");
|
|
23
|
+
if (!src) return;
|
|
24
|
+
fetch(location.href, { cache: "no-cache" })
|
|
25
|
+
.then(async (response) => {
|
|
26
|
+
if (!response.ok) return;
|
|
27
|
+
const html = await response.text();
|
|
28
|
+
if (html.includes(src)) {
|
|
29
|
+
sessionStorage.removeItem(FLAG);
|
|
30
|
+
} else if (sessionStorage.getItem(FLAG) === null) {
|
|
31
|
+
sessionStorage.setItem(FLAG, "1");
|
|
32
|
+
location.reload();
|
|
33
|
+
}
|
|
34
|
+
})
|
|
35
|
+
.catch(() => {});
|
|
36
|
+
})();
|
|
37
|
+
</script>
|
|
38
|
+
</body>
|
|
39
|
+
</html>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@beff/aula-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "The aula command: runs chapter modules on the @beff/aula engine, checks and lints them, writes PNG pictures for review, makes project zips, and serves the web player with narration.",
|
|
6
6
|
"license": "MIT AND GPL-3.0-or-later",
|
|
@@ -24,6 +24,6 @@
|
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"esbuild-wasm": "^0.28.2",
|
|
27
|
-
"@beff/aula": "0.
|
|
27
|
+
"@beff/aula": "0.5.0"
|
|
28
28
|
}
|
|
29
29
|
}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
run
|
|
3
|
-
} from "./chunk-2XGNOG2U.js";
|
|
4
|
-
|
|
5
|
-
// src/media.ts
|
|
6
|
-
import path from "node:path";
|
|
7
|
-
var VIDEO = { width: 1280, height: 720, fps: 30 };
|
|
8
|
-
async function ffmpeg(capabilities, args) {
|
|
9
|
-
const ran = await run(capabilities, "ffmpeg", ["-hide_banner", "-loglevel", "error", "-nostdin", "-y", ...args]);
|
|
10
|
-
if (ran.code !== 0) throw new Error(`ffmpeg failed: ${ran.stderr.trim()}`);
|
|
11
|
-
}
|
|
12
|
-
async function duration(capabilities, file) {
|
|
13
|
-
const { stderr } = await run(capabilities, "ffmpeg", ["-i", file]);
|
|
14
|
-
const stamp = stderr.split("Duration: ")[1]?.split(",")[0];
|
|
15
|
-
if (stamp === void 0) throw new Error(`${file}: ffmpeg reports no duration`);
|
|
16
|
-
const [h, m, s, ...rest] = stamp.split(":").map((p) => Number(p.trim()));
|
|
17
|
-
if (h === void 0 || m === void 0 || s === void 0 || rest.length || [h, m, s].some(Number.isNaN)) {
|
|
18
|
-
throw new Error(`${file}: unreadable duration ${stamp}`);
|
|
19
|
-
}
|
|
20
|
-
return h * 3600 + m * 60 + s;
|
|
21
|
-
}
|
|
22
|
-
var signed = (x) => `${x >= 0 ? "+" : ""}${x.toFixed(2)}`;
|
|
23
|
-
async function assemble(capabilities, options) {
|
|
24
|
-
const concat = path.join(options.work, "concat.txt");
|
|
25
|
-
await capabilities.fs.writeFile(concat, options.clips.map((v) => `file '${v}'
|
|
26
|
-
`).join(""));
|
|
27
|
-
const join = ["-f", "concat", "-safe", "0", "-i", concat, "-i", options.audio, "-map", "0:v:0", "-map", "1:a:0"];
|
|
28
|
-
const codecs = ["-c:v", "copy", "-c:a", "aac", "-b:a", "128k", "-movflags", "+faststart"];
|
|
29
|
-
await ffmpeg(capabilities, [...join, ...codecs, options.out]);
|
|
30
|
-
const video = await duration(capabilities, options.out);
|
|
31
|
-
const diff = video - options.seconds;
|
|
32
|
-
capabilities.log.out(`video ${video.toFixed(2)}s narration ${options.seconds.toFixed(2)}s diff ${signed(diff)}s`);
|
|
33
|
-
if (Math.abs(diff) > 1 / VIDEO.fps) {
|
|
34
|
-
throw new Error(`Out of sync: video and narration differ by more than one frame (${options.out})`);
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
export {
|
|
39
|
-
VIDEO,
|
|
40
|
-
ffmpeg,
|
|
41
|
-
assemble
|
|
42
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./aula-voice-worker-CZGtnmSr.js";var t=/* @__PURE__ */ e(((e,t)=>{t.exports={}}));export default t();
|