@beff/aula-cli 0.10.0 → 0.12.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/dist/src/{aula-voice-tts-HPJAJO2Q.js → aula-voice-tts-YOS4IQXV.js} +1 -1
- package/dist/src/aula.js +4 -2
- package/dist/src/{chunk-5ABPFV55.js → chunk-2PAZTBSE.js} +2 -2
- package/dist/src/{chunk-JWBPHDVP.js → chunk-4QGX7XXO.js} +1 -1
- package/dist/src/{chunk-F3A54TW5.js → chunk-AXQBWV7J.js} +12 -6
- package/dist/src/{chunk-4PZYWKO5.js → chunk-DC7A435Z.js} +1 -1
- package/dist/src/{chunk-Y56UHOZ2.js → chunk-DN2LVJO3.js} +1 -0
- package/dist/src/{chunk-XLSX5LTB.js → chunk-HD6FTA3H.js} +9 -9
- package/dist/src/{chunk-5TUGYMFH.js → chunk-PZXFW6ZD.js} +3 -3
- package/dist/src/{chunk-QDLUI7QI.js → chunk-RAGZAJKD.js} +1 -1
- package/dist/src/{chunk-DFXG2P7A.js → chunk-T6CAPT32.js} +11 -7
- package/dist/src/{chunk-KCGXC2RV.js → chunk-TDAWUJ2L.js} +1 -1
- package/dist/src/cli.js +9 -9
- package/dist/src/{commands-INPEJKMQ.js → commands-BSDNHYB3.js} +10 -10
- package/dist/src/problems-CGKCPETU.js +18 -0
- package/dist/src/project-EUFMRQXR.js +16 -0
- package/dist/src/{run-5E6WELS7.js → run-ER27SVTA.js} +33 -23
- package/dist/src/{server-OMZWX7LL.js → server-TJTMSDO2.js} +18 -9
- package/dist/src/{site-FFFLW34V.js → site-RGPJOWSU.js} +32 -15
- package/dist/web/app/assets/{5047b09e → bf5dd884}/aula-method.js +1 -1
- package/dist/web/app/assets/bf5dd884/aula.js +1 -0
- package/dist/web/app/assets/{5047b09e → bf5dd884}/build-worker.js +2 -2
- package/dist/web/app/assets/{5047b09e → bf5dd884}/index.js +3 -2
- package/dist/web/app/assets/{index-BL7_U8KF.css → index-qn44kZJM.css} +1 -1
- package/dist/web/app/assets/protocol-Dc79M9p3.js +15 -0
- package/dist/web/app/assets/{src-DTLT9Lbm.js → src-DWqZcp-P.js} +1 -1
- package/dist/web/app/assets/{tex-mathjax-8QilZX4j.js → tex-mathjax-eWNptbJg.js} +1 -1
- package/dist/web/app/index.html +4 -4
- package/dist/web/site/assets/{eed21106 → 07fb5cf0}/aula-method.js +1 -1
- package/dist/web/site/assets/07fb5cf0/aula.js +1 -0
- package/dist/web/site/assets/{eed21106 → 07fb5cf0}/build-worker.js +2 -2
- package/dist/web/site/assets/{eed21106 → 07fb5cf0}/index.js +3 -2
- package/dist/web/site/assets/{index-BL7_U8KF.css → index-qn44kZJM.css} +1 -1
- package/dist/web/site/assets/protocol-F-4tHoAW.js +15 -0
- package/dist/web/site/assets/{src-DpS3WA7l.js → src-DfPcHwz-.js} +1 -1
- package/dist/web/site/assets/{tex-mathjax-CVHS5J80.js → tex-mathjax-DrZV_cwB.js} +1 -1
- package/dist/web/site/index.html +4 -4
- package/package.json +1 -1
- package/dist/src/problems-IWWXSHZN.js +0 -18
- package/dist/src/project-N53JRWMY.js +0 -16
- package/dist/web/app/assets/5047b09e/aula.js +0 -1
- package/dist/web/app/assets/protocol-C3Pseh4g.js +0 -15
- package/dist/web/site/assets/eed21106/aula.js +0 -1
- package/dist/web/site/assets/protocol-BOv1ch3F.js +0 -15
package/dist/src/aula.js
CHANGED
|
@@ -1,21 +1,23 @@
|
|
|
1
1
|
import {
|
|
2
2
|
manim_exports
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-RAGZAJKD.js";
|
|
4
4
|
import {
|
|
5
5
|
defineChapter,
|
|
6
6
|
defineProject,
|
|
7
7
|
embed,
|
|
8
|
+
loadEngine,
|
|
8
9
|
paragraph,
|
|
9
10
|
pronounce,
|
|
10
11
|
say,
|
|
11
12
|
show
|
|
12
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-DN2LVJO3.js";
|
|
13
14
|
import "./chunk-VX7UVLQW.js";
|
|
14
15
|
import "./chunk-CZ7CSFO4.js";
|
|
15
16
|
export {
|
|
16
17
|
defineChapter,
|
|
17
18
|
defineProject,
|
|
18
19
|
embed,
|
|
20
|
+
loadEngine,
|
|
19
21
|
manim_exports as m,
|
|
20
22
|
paragraph,
|
|
21
23
|
pronounce,
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
error,
|
|
5
5
|
projectName,
|
|
6
6
|
wrongArgument
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-T6CAPT32.js";
|
|
8
8
|
import {
|
|
9
9
|
definedAt,
|
|
10
10
|
importUserModule,
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
loadEngine,
|
|
14
14
|
loadTex,
|
|
15
15
|
v8Frames
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-DN2LVJO3.js";
|
|
17
17
|
|
|
18
18
|
// ../aula-project/src/node.ts
|
|
19
19
|
import { existsSync } from "node:fs";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
timeChapter
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-4QGX7XXO.js";
|
|
4
4
|
import {
|
|
5
5
|
check,
|
|
6
6
|
moveFrames,
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
timeline,
|
|
11
11
|
unclearWords,
|
|
12
12
|
words
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-TDAWUJ2L.js";
|
|
14
14
|
import {
|
|
15
15
|
LIST_MODULE,
|
|
16
16
|
Problems,
|
|
@@ -18,10 +18,10 @@ import {
|
|
|
18
18
|
isError,
|
|
19
19
|
linkBundle,
|
|
20
20
|
wrongArgument
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-T6CAPT32.js";
|
|
22
22
|
import {
|
|
23
23
|
manim_exports
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-RAGZAJKD.js";
|
|
25
25
|
import {
|
|
26
26
|
FPS,
|
|
27
27
|
chapterNames,
|
|
@@ -35,7 +35,7 @@ import {
|
|
|
35
35
|
loadEngine,
|
|
36
36
|
readChapter,
|
|
37
37
|
renderChapter
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-DN2LVJO3.js";
|
|
39
39
|
|
|
40
40
|
// ../aula-project/src/chapters.ts
|
|
41
41
|
function chapterIndex(names, name) {
|
|
@@ -486,6 +486,10 @@ async function loadBuiltProjects(bundled, host, modules, player, engineLoaded) {
|
|
|
486
486
|
return { _tag: "Right", right: out };
|
|
487
487
|
}
|
|
488
488
|
var folderOfModule = (module) => module.slice(0, Math.max(0, module.lastIndexOf("/")));
|
|
489
|
+
function listedProjects(projects) {
|
|
490
|
+
if (projects.length === 1 && projects[0]?.folder === "") return [...projects];
|
|
491
|
+
return projects.filter((project) => !project.draft);
|
|
492
|
+
}
|
|
489
493
|
function localProject(name, folder, section, definition, host) {
|
|
490
494
|
const count = definition.chapters.length + 1;
|
|
491
495
|
return {
|
|
@@ -493,6 +497,7 @@ function localProject(name, folder, section, definition, host) {
|
|
|
493
497
|
folder,
|
|
494
498
|
...section === void 0 ? {} : { section },
|
|
495
499
|
title: definition.title,
|
|
500
|
+
draft: definition.draft,
|
|
496
501
|
chapters: count,
|
|
497
502
|
titles: [definition.title, ...definition.chapters.map((c) => c.heading)],
|
|
498
503
|
script: () => {
|
|
@@ -547,5 +552,6 @@ export {
|
|
|
547
552
|
timelineView,
|
|
548
553
|
scriptView,
|
|
549
554
|
workspaceHost,
|
|
550
|
-
loadBuiltProjects
|
|
555
|
+
loadBuiltProjects,
|
|
556
|
+
listedProjects
|
|
551
557
|
};
|
|
@@ -66560,6 +66560,7 @@ function defineProject(fields) {
|
|
|
66560
66560
|
[PROJECT]: true,
|
|
66561
66561
|
storyboard: "",
|
|
66562
66562
|
lexicon: {},
|
|
66563
|
+
draft: false,
|
|
66563
66564
|
...fields,
|
|
66564
66565
|
title: title.text,
|
|
66565
66566
|
titleParts: title.parts,
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
} from "./chunk-F4XRXW6M.js";
|
|
10
10
|
import {
|
|
11
11
|
printDiagnostics
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-PZXFW6ZD.js";
|
|
13
13
|
import {
|
|
14
14
|
chapterIndexes,
|
|
15
15
|
checkProject,
|
|
@@ -30,22 +30,22 @@ import {
|
|
|
30
30
|
timedChapter,
|
|
31
31
|
timelineView,
|
|
32
32
|
wordNotes
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-AXQBWV7J.js";
|
|
34
34
|
import {
|
|
35
35
|
narrateScript,
|
|
36
36
|
scriptAudio,
|
|
37
37
|
wav
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-4QGX7XXO.js";
|
|
39
39
|
import {
|
|
40
40
|
narrationScript
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-TDAWUJ2L.js";
|
|
42
42
|
import {
|
|
43
43
|
host
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-DC7A435Z.js";
|
|
45
45
|
import {
|
|
46
46
|
folderOf,
|
|
47
47
|
nameOf
|
|
48
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-2PAZTBSE.js";
|
|
49
49
|
import {
|
|
50
50
|
ObjectRuntype,
|
|
51
51
|
OptionalFieldRuntype,
|
|
@@ -58,14 +58,14 @@ import {
|
|
|
58
58
|
bundle,
|
|
59
59
|
isError,
|
|
60
60
|
wrongArgument
|
|
61
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-T6CAPT32.js";
|
|
62
62
|
import {
|
|
63
63
|
manim_exports
|
|
64
|
-
} from "./chunk-
|
|
64
|
+
} from "./chunk-RAGZAJKD.js";
|
|
65
65
|
import {
|
|
66
66
|
chapterNames,
|
|
67
67
|
renderChapter
|
|
68
|
-
} from "./chunk-
|
|
68
|
+
} from "./chunk-DN2LVJO3.js";
|
|
69
69
|
|
|
70
70
|
// src/commands.ts
|
|
71
71
|
import path2 from "node:path";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
renderDiagnostic
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-TDAWUJ2L.js";
|
|
4
4
|
import {
|
|
5
5
|
withSource
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-2PAZTBSE.js";
|
|
7
7
|
import {
|
|
8
8
|
loadEngine
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-DN2LVJO3.js";
|
|
10
10
|
|
|
11
11
|
// src/problems.ts
|
|
12
12
|
async function printDiagnostics(capabilities, root, diagnostics, print = (text) => capabilities.log.out(text)) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
diagnosticOf
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-DN2LVJO3.js";
|
|
4
4
|
|
|
5
5
|
// ../../node_modules/.pnpm/@beff+client@1.0.1/node_modules/@beff/client/dist/esm/openapi-pp.js
|
|
6
6
|
var removeNullUnionBranch = (definition) => {
|
|
@@ -1251,12 +1251,10 @@ async function projectModules(tree, root) {
|
|
|
1251
1251
|
});
|
|
1252
1252
|
return errors.length > 0 ? { _tag: "Left", left: errors } : { _tag: "Right", right: found };
|
|
1253
1253
|
}
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
if (listed._tag === "Left") return listed;
|
|
1257
|
-
const projects = listed.right;
|
|
1254
|
+
var NO_PROJECT_MESSAGE = "no project here: run from a project or playlist folder, or pass it (for example: aula web examples)";
|
|
1255
|
+
async function bundleProjects(bundler, tree, root, projects) {
|
|
1258
1256
|
if (projects.length === 0) {
|
|
1259
|
-
throw new Error(
|
|
1257
|
+
throw new Error(NO_PROJECT_MESSAGE);
|
|
1260
1258
|
}
|
|
1261
1259
|
const list = [
|
|
1262
1260
|
...projects.map((project, i) => `import p${String(i)} from ${JSON.stringify(`./${project.module}`)};`),
|
|
@@ -1271,11 +1269,16 @@ async function bundleWorkspace(bundler, tree, root) {
|
|
|
1271
1269
|
return {
|
|
1272
1270
|
_tag: "Right",
|
|
1273
1271
|
right: {
|
|
1274
|
-
bundle: { name: root, projects, code: bundled.right.code, map: bundled.right.map },
|
|
1272
|
+
bundle: { name: root, projects: [...projects], code: bundled.right.code, map: bundled.right.map },
|
|
1275
1273
|
inputs: bundled.right.inputs
|
|
1276
1274
|
}
|
|
1277
1275
|
};
|
|
1278
1276
|
}
|
|
1277
|
+
async function bundleWorkspace(bundler, tree, root) {
|
|
1278
|
+
const listed = await projectModules(tree, root);
|
|
1279
|
+
if (listed._tag === "Left") return listed;
|
|
1280
|
+
return bundleProjects(bundler, tree, root, listed.right);
|
|
1281
|
+
}
|
|
1279
1282
|
|
|
1280
1283
|
// ../aula-project/src/diagnostics.ts
|
|
1281
1284
|
function error(message, more = {}) {
|
|
@@ -1310,6 +1313,7 @@ export {
|
|
|
1310
1313
|
bundle,
|
|
1311
1314
|
projectName,
|
|
1312
1315
|
projectModules,
|
|
1316
|
+
bundleProjects,
|
|
1313
1317
|
bundleWorkspace,
|
|
1314
1318
|
error,
|
|
1315
1319
|
isError,
|
package/dist/src/cli.js
CHANGED
|
@@ -14,8 +14,8 @@ import {
|
|
|
14
14
|
studentWeightFile,
|
|
15
15
|
timeAulaVoice,
|
|
16
16
|
tokenBatches
|
|
17
|
-
} from "./chunk-
|
|
18
|
-
import "./chunk-
|
|
17
|
+
} from "./chunk-TDAWUJ2L.js";
|
|
18
|
+
import "./chunk-DN2LVJO3.js";
|
|
19
19
|
import {
|
|
20
20
|
fault
|
|
21
21
|
} from "./chunk-VX7UVLQW.js";
|
|
@@ -236,7 +236,7 @@ async function aulaVoiceWeightFile(capabilities2, options2) {
|
|
|
236
236
|
function aulaVoice(capabilities2, options2) {
|
|
237
237
|
let loading = null;
|
|
238
238
|
const parts = () => loading ??= (async () => {
|
|
239
|
-
const { aulaVoiceModel } = await import("./aula-voice-tts-
|
|
239
|
+
const { aulaVoiceModel } = await import("./aula-voice-tts-YOS4IQXV.js");
|
|
240
240
|
return { model: await aulaVoiceModel(await aulaVoiceWeightFile(capabilities2, options2)), phonemize };
|
|
241
241
|
})();
|
|
242
242
|
return {
|
|
@@ -284,9 +284,9 @@ var base = Capabilities.create({
|
|
|
284
284
|
},
|
|
285
285
|
spawn
|
|
286
286
|
});
|
|
287
|
-
var { diagnosticsOf, printDiagnostics } = await import("./problems-
|
|
288
|
-
var { host, loadProject } = await import("./project-
|
|
289
|
-
var { USAGE, folderArgs, isHelp, optionsOf, parse, run: run2, siteOptions, webOptions } = await import("./run-
|
|
287
|
+
var { diagnosticsOf, printDiagnostics } = await import("./problems-CGKCPETU.js");
|
|
288
|
+
var { host, loadProject } = await import("./project-EUFMRQXR.js");
|
|
289
|
+
var { USAGE, folderArgs, isHelp, optionsOf, parse, run: run2, siteOptions, webOptions } = await import("./run-ER27SVTA.js");
|
|
290
290
|
var locks = createLocks(base, path3.join(os.homedir(), ".cache/aula/heavy.lock"));
|
|
291
291
|
var render = createRender(base, process.execPath);
|
|
292
292
|
var models = path3.join(os.homedir(), ".cache/aula/models");
|
|
@@ -310,7 +310,7 @@ async function main(argv) {
|
|
|
310
310
|
const args = parse(rest, optionsOf(command));
|
|
311
311
|
if (command === "web") {
|
|
312
312
|
const options2 = webOptions(cwd, args);
|
|
313
|
-
const { serve } = await import("./server-
|
|
313
|
+
const { serve } = await import("./server-TJTMSDO2.js");
|
|
314
314
|
const stop = new AbortController();
|
|
315
315
|
for (const signal of ["SIGINT", "SIGTERM"]) process.once(signal, () => stop.abort());
|
|
316
316
|
const web = Capabilities.create({
|
|
@@ -326,12 +326,12 @@ async function main(argv) {
|
|
|
326
326
|
return 0;
|
|
327
327
|
}
|
|
328
328
|
if (command === "site") {
|
|
329
|
-
const { site } = await import("./site-
|
|
329
|
+
const { site } = await import("./site-RGPJOWSU.js");
|
|
330
330
|
const weights = Capabilities.create({ weights: aulaVoiceWeights(base, fetch, models) });
|
|
331
331
|
return await site(Capabilities.extend(capabilities, weights), siteOptions(cwd, args)) ? 0 : 1;
|
|
332
332
|
}
|
|
333
333
|
if (command === "tokens") {
|
|
334
|
-
const { tokens, tokensArgs } = await import("./commands-
|
|
334
|
+
const { tokens, tokensArgs } = await import("./commands-BSDNHYB3.js");
|
|
335
335
|
tokensArgs(args.positional);
|
|
336
336
|
const tokensOf = createTokens();
|
|
337
337
|
return await tokens(capabilities, tokensOf, createInterface({ input: process.stdin, crlfDelay: Infinity })) ? 0 : 1;
|
|
@@ -7,19 +7,19 @@ import {
|
|
|
7
7
|
timeline,
|
|
8
8
|
tokens,
|
|
9
9
|
tokensArgs
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-HD6FTA3H.js";
|
|
11
11
|
import "./chunk-THQ5Y74K.js";
|
|
12
12
|
import "./chunk-F4XRXW6M.js";
|
|
13
13
|
import "./chunk-4N4NUMKP.js";
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
21
|
-
import "./chunk-
|
|
22
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-PZXFW6ZD.js";
|
|
15
|
+
import "./chunk-AXQBWV7J.js";
|
|
16
|
+
import "./chunk-4QGX7XXO.js";
|
|
17
|
+
import "./chunk-TDAWUJ2L.js";
|
|
18
|
+
import "./chunk-DC7A435Z.js";
|
|
19
|
+
import "./chunk-2PAZTBSE.js";
|
|
20
|
+
import "./chunk-T6CAPT32.js";
|
|
21
|
+
import "./chunk-RAGZAJKD.js";
|
|
22
|
+
import "./chunk-DN2LVJO3.js";
|
|
23
23
|
import "./chunk-VX7UVLQW.js";
|
|
24
24
|
import "./chunk-CZ7CSFO4.js";
|
|
25
25
|
export {
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import {
|
|
2
|
+
printDiagnostics
|
|
3
|
+
} from "./chunk-PZXFW6ZD.js";
|
|
4
|
+
import "./chunk-AXQBWV7J.js";
|
|
5
|
+
import "./chunk-4QGX7XXO.js";
|
|
6
|
+
import "./chunk-TDAWUJ2L.js";
|
|
7
|
+
import "./chunk-2PAZTBSE.js";
|
|
8
|
+
import {
|
|
9
|
+
diagnosticsOf
|
|
10
|
+
} from "./chunk-T6CAPT32.js";
|
|
11
|
+
import "./chunk-RAGZAJKD.js";
|
|
12
|
+
import "./chunk-DN2LVJO3.js";
|
|
13
|
+
import "./chunk-VX7UVLQW.js";
|
|
14
|
+
import "./chunk-CZ7CSFO4.js";
|
|
15
|
+
export {
|
|
16
|
+
diagnosticsOf,
|
|
17
|
+
printDiagnostics
|
|
18
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import {
|
|
2
|
+
exists,
|
|
3
|
+
host,
|
|
4
|
+
loadProject
|
|
5
|
+
} from "./chunk-DC7A435Z.js";
|
|
6
|
+
import "./chunk-2PAZTBSE.js";
|
|
7
|
+
import "./chunk-T6CAPT32.js";
|
|
8
|
+
import "./chunk-RAGZAJKD.js";
|
|
9
|
+
import "./chunk-DN2LVJO3.js";
|
|
10
|
+
import "./chunk-VX7UVLQW.js";
|
|
11
|
+
import "./chunk-CZ7CSFO4.js";
|
|
12
|
+
export {
|
|
13
|
+
exists,
|
|
14
|
+
host,
|
|
15
|
+
loadProject
|
|
16
|
+
};
|
|
@@ -5,21 +5,21 @@ import {
|
|
|
5
5
|
preview,
|
|
6
6
|
script,
|
|
7
7
|
timeline
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-HD6FTA3H.js";
|
|
9
9
|
import "./chunk-THQ5Y74K.js";
|
|
10
10
|
import "./chunk-F4XRXW6M.js";
|
|
11
11
|
import "./chunk-4N4NUMKP.js";
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-PZXFW6ZD.js";
|
|
13
|
+
import "./chunk-AXQBWV7J.js";
|
|
14
|
+
import "./chunk-4QGX7XXO.js";
|
|
15
|
+
import "./chunk-TDAWUJ2L.js";
|
|
16
|
+
import "./chunk-DC7A435Z.js";
|
|
17
|
+
import "./chunk-2PAZTBSE.js";
|
|
18
18
|
import {
|
|
19
19
|
wrongArgument
|
|
20
|
-
} from "./chunk-
|
|
21
|
-
import "./chunk-
|
|
22
|
-
import "./chunk-
|
|
20
|
+
} from "./chunk-T6CAPT32.js";
|
|
21
|
+
import "./chunk-RAGZAJKD.js";
|
|
22
|
+
import "./chunk-DN2LVJO3.js";
|
|
23
23
|
import "./chunk-VX7UVLQW.js";
|
|
24
24
|
import "./chunk-CZ7CSFO4.js";
|
|
25
25
|
|
|
@@ -42,20 +42,24 @@ aula preview <folder> <out> [<chapter>[:<line>] ...]
|
|
|
42
42
|
motion stills, contact sheets and moves.md
|
|
43
43
|
aula export <folder> <file.mp4> the video to send: narrated in this run, H.264 and
|
|
44
44
|
AAC at 1280x720 and 60 fps; needs ffmpeg
|
|
45
|
-
aula web [<folder>] [--port N]
|
|
46
|
-
for
|
|
47
|
-
|
|
48
|
-
|
|
45
|
+
aula web [<folder>] [--port N] [--host H]
|
|
46
|
+
the web app for a project folder (index.ts) or a
|
|
47
|
+
playlist folder of such projects (default: cwd);
|
|
48
|
+
not a monorepo root that also holds kits; draft:
|
|
49
|
+
true projects stay out of a playlist list; the page
|
|
50
|
+
narrates in the browser; --host defaults to 127.0.0.1
|
|
51
|
+
(use 0.0.0.0 to listen on all interfaces)
|
|
49
52
|
aula bundle <folder> <file.zip> the project zip: the project folder, and the
|
|
50
53
|
packages it imports, to share or host
|
|
51
54
|
aula site <folder> <out> [--title <text>] [--base <path>]
|
|
52
|
-
a website of
|
|
53
|
-
|
|
54
|
-
the folder's files
|
|
55
|
-
and the web app, as
|
|
56
|
-
static host; --title
|
|
57
|
-
the
|
|
58
|
-
path such as /aula/
|
|
55
|
+
a website of a project or playlist folder (same as
|
|
56
|
+
aula web; not a monorepo root that also holds kits;
|
|
57
|
+
draft: true projects stay out): the folder's files
|
|
58
|
+
with the packages they import, and the web app, as
|
|
59
|
+
plain files in <out> for any static host; --title
|
|
60
|
+
is the site's title (default: the folder's name);
|
|
61
|
+
--base pins the site to a base path such as /aula/
|
|
62
|
+
(default: it works at any path)
|
|
59
63
|
aula script <folder> [<chapter> ...] the review script: each chapter with its length,
|
|
60
64
|
each spoken beat and what is on screen
|
|
61
65
|
aula timeline <folder> [<chapter> ...]
|
|
@@ -69,6 +73,7 @@ aula tokens Kokoro v1.0's token ids of texts, for trai
|
|
|
69
73
|
Errors make the exit code 1. Warnings do not change it.`;
|
|
70
74
|
var VALUED = {
|
|
71
75
|
"--port": { what: "a port number", number: true },
|
|
76
|
+
"--host": { what: "a host", number: false },
|
|
72
77
|
"--title": { what: "a title", number: false },
|
|
73
78
|
"--base": { what: "a base path", number: false }
|
|
74
79
|
};
|
|
@@ -99,7 +104,7 @@ function parse(argv, allowed) {
|
|
|
99
104
|
}
|
|
100
105
|
var OPTIONS = {
|
|
101
106
|
check: ["--json"],
|
|
102
|
-
web: ["--port"],
|
|
107
|
+
web: ["--port", "--host"],
|
|
103
108
|
site: ["--title", "--base"]
|
|
104
109
|
};
|
|
105
110
|
var isHelp = (command) => command === void 0 || command === "help" || command === "-h" || command === "--help";
|
|
@@ -142,7 +147,12 @@ async function run(capabilities, cwd, command, project, rest, flags = /* @__PURE
|
|
|
142
147
|
function webOptions(cwd, args) {
|
|
143
148
|
if (args.positional.length > 1) throw wrongArgument("aula web takes one folder", "run `aula help` for the usage");
|
|
144
149
|
const port = args.values.get("--port");
|
|
145
|
-
|
|
150
|
+
const host = args.values.get("--host");
|
|
151
|
+
return {
|
|
152
|
+
root: path.resolve(cwd, args.positional[0] ?? "."),
|
|
153
|
+
port: typeof port === "number" ? port : 0,
|
|
154
|
+
host: typeof host === "string" ? host : "127.0.0.1"
|
|
155
|
+
};
|
|
146
156
|
}
|
|
147
157
|
function siteOptions(cwd, args) {
|
|
148
158
|
const [folder, out, ...more] = args.positional;
|
|
@@ -5,19 +5,19 @@ import {
|
|
|
5
5
|
createNodeBundler,
|
|
6
6
|
nodeTree
|
|
7
7
|
} from "./chunk-THQ5Y74K.js";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-4QGX7XXO.js";
|
|
9
9
|
import {
|
|
10
10
|
SERVER_WEIGHTS_PATH
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-TDAWUJ2L.js";
|
|
12
12
|
import {
|
|
13
13
|
exists
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import "./chunk-
|
|
14
|
+
} from "./chunk-DC7A435Z.js";
|
|
15
|
+
import "./chunk-2PAZTBSE.js";
|
|
16
16
|
import {
|
|
17
17
|
bundleWorkspace
|
|
18
|
-
} from "./chunk-
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
18
|
+
} from "./chunk-T6CAPT32.js";
|
|
19
|
+
import "./chunk-RAGZAJKD.js";
|
|
20
|
+
import "./chunk-DN2LVJO3.js";
|
|
21
21
|
import {
|
|
22
22
|
AulaError,
|
|
23
23
|
fault
|
|
@@ -155,7 +155,13 @@ async function watchWorkspaceFolders(capabilities, root, watching) {
|
|
|
155
155
|
}
|
|
156
156
|
}
|
|
157
157
|
}
|
|
158
|
+
function openHost(host) {
|
|
159
|
+
if (host === "0.0.0.0") return "127.0.0.1";
|
|
160
|
+
if (host === "::" || host === "[::]") return "[::1]";
|
|
161
|
+
return host.includes(":") && !host.startsWith("[") ? `[${host}]` : host;
|
|
162
|
+
}
|
|
158
163
|
async function serve(capabilities, options) {
|
|
164
|
+
const host = options.host ?? "127.0.0.1";
|
|
159
165
|
let generation = 0;
|
|
160
166
|
let cached = null;
|
|
161
167
|
const watching = changes(capabilities, () => {
|
|
@@ -203,11 +209,13 @@ async function serve(capabilities, options) {
|
|
|
203
209
|
else response.destroy();
|
|
204
210
|
});
|
|
205
211
|
});
|
|
206
|
-
server.listen(options.port,
|
|
212
|
+
server.listen(options.port, host);
|
|
207
213
|
await once(server, "listening");
|
|
208
214
|
const address = server.address();
|
|
209
215
|
const port = typeof address === "object" && address !== null ? address.port : options.port;
|
|
210
|
-
|
|
216
|
+
const open = `http://${openHost(host)}:${String(port)}/`;
|
|
217
|
+
const bindNote = host === "0.0.0.0" || host === "::" || host === "[::]" ? ` (listening on ${host})` : "";
|
|
218
|
+
capabilities.log.out(`aula web: open ${open} in a browser${bindNote} (Ctrl-C stops it)`);
|
|
211
219
|
options.stop.addEventListener("abort", () => {
|
|
212
220
|
watching.close();
|
|
213
221
|
void bundler.stop();
|
|
@@ -280,6 +288,7 @@ async function answer(capabilities, root, watching, weights, buildBundle, reques
|
|
|
280
288
|
notFound(request, response);
|
|
281
289
|
}
|
|
282
290
|
export {
|
|
291
|
+
openHost,
|
|
283
292
|
pathParts,
|
|
284
293
|
serve
|
|
285
294
|
};
|