@scenar/cli 0.1.20-rc.1 → 0.2.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/package.json +17 -5
- package/src/__tests__/publish-command.test.ts +46 -0
- package/src/__tests__/publish-flow.test.ts +220 -0
- package/src/__tests__/read-viewport.test.ts +45 -0
- package/src/__tests__/run-publish.test.ts +92 -0
- package/src/__tests__/serve-command.test.ts +44 -0
- package/src/__tests__/serve-request-path.test.ts +67 -0
- package/src/__tests__/serve-static-server.test.ts +88 -0
- package/src/api.d.ts +31 -0
- package/src/api.d.ts.map +1 -0
- package/src/api.js +28 -0
- package/src/api.js.map +1 -0
- package/src/api.ts +55 -0
- package/src/bundle/read-viewport.d.ts +23 -0
- package/src/bundle/read-viewport.d.ts.map +1 -0
- package/src/bundle/read-viewport.js +25 -0
- package/src/bundle/read-viewport.js.map +1 -0
- package/src/bundle/read-viewport.ts +36 -0
- package/src/commands/deploy.d.ts.map +1 -1
- package/src/commands/deploy.js +8 -24
- package/src/commands/deploy.js.map +1 -1
- package/src/commands/deploy.ts +10 -28
- package/src/commands/narrate.d.ts.map +1 -1
- package/src/commands/narrate.js +39 -170
- package/src/commands/narrate.js.map +1 -1
- package/src/commands/narrate.ts +48 -289
- package/src/commands/pack.d.ts.map +1 -1
- package/src/commands/pack.js +12 -112
- package/src/commands/pack.js.map +1 -1
- package/src/commands/pack.ts +12 -128
- package/src/commands/publish.d.ts +3 -0
- package/src/commands/publish.d.ts.map +1 -0
- package/src/commands/publish.js +64 -0
- package/src/commands/publish.js.map +1 -0
- package/src/commands/publish.ts +86 -0
- package/src/commands/render.d.ts.map +1 -1
- package/src/commands/render.js +12 -194
- package/src/commands/render.js.map +1 -1
- package/src/commands/render.ts +19 -286
- package/src/commands/serve.d.ts +3 -0
- package/src/commands/serve.d.ts.map +1 -0
- package/src/commands/serve.js +91 -0
- package/src/commands/serve.js.map +1 -0
- package/src/commands/serve.ts +112 -0
- package/src/index.d.ts.map +1 -1
- package/src/index.js +4 -0
- package/src/index.js.map +1 -1
- package/src/index.ts +4 -0
- package/src/narrate/run-narrate.d.ts +43 -0
- package/src/narrate/run-narrate.d.ts.map +1 -0
- package/src/narrate/run-narrate.js +174 -0
- package/src/narrate/run-narrate.js.map +1 -0
- package/src/narrate/run-narrate.ts +298 -0
- package/src/pack/run-pack.d.ts +34 -0
- package/src/pack/run-pack.d.ts.map +1 -0
- package/src/pack/run-pack.js +117 -0
- package/src/pack/run-pack.js.map +1 -0
- package/src/pack/run-pack.ts +163 -0
- package/src/publish/github.d.ts +11 -0
- package/src/publish/github.d.ts.map +1 -0
- package/src/publish/github.js +197 -0
- package/src/publish/github.js.map +1 -0
- package/src/publish/github.ts +216 -0
- package/src/publish/publish-flow.d.ts +110 -0
- package/src/publish/publish-flow.d.ts.map +1 -0
- package/src/publish/publish-flow.js +117 -0
- package/src/publish/publish-flow.js.map +1 -0
- package/src/publish/publish-flow.ts +199 -0
- package/src/publish/run-publish.d.ts +41 -0
- package/src/publish/run-publish.d.ts.map +1 -0
- package/src/publish/run-publish.js +77 -0
- package/src/publish/run-publish.js.map +1 -0
- package/src/publish/run-publish.ts +131 -0
- package/src/render/run-render.d.ts +31 -0
- package/src/render/run-render.d.ts.map +1 -0
- package/src/render/run-render.js +196 -0
- package/src/render/run-render.js.map +1 -0
- package/src/render/run-render.ts +287 -0
- package/src/serve/request-path.d.ts +23 -0
- package/src/serve/request-path.d.ts.map +1 -0
- package/src/serve/request-path.js +52 -0
- package/src/serve/request-path.js.map +1 -0
- package/src/serve/request-path.ts +55 -0
- package/src/serve/run-serve.d.ts +31 -0
- package/src/serve/run-serve.d.ts.map +1 -0
- package/src/serve/run-serve.js +35 -0
- package/src/serve/run-serve.js.map +1 -0
- package/src/serve/run-serve.ts +68 -0
- package/src/serve/static-server.d.ts +38 -0
- package/src/serve/static-server.d.ts.map +1 -0
- package/src/serve/static-server.js +91 -0
- package/src/serve/static-server.js.map +1 -0
- package/src/serve/static-server.ts +118 -0
- package/tsconfig.tsbuildinfo +1 -1
package/src/commands/pack.ts
CHANGED
|
@@ -1,20 +1,6 @@
|
|
|
1
|
-
import { resolve, join, basename } from "node:path";
|
|
2
|
-
import { stat, mkdir, writeFile, rm, readdir, copyFile, access } from "node:fs/promises";
|
|
3
1
|
import { Command } from "commander";
|
|
4
|
-
import { detectRenderExport } from "../render/detect-render-export.js";
|
|
5
|
-
import { resolveProvidersPath } from "../render/resolve-providers.js";
|
|
6
|
-
import { generateEmbedEntry, generateEmbedHtml } from "../pack/generate-embed-entry.js";
|
|
7
|
-
import { runViteBuild } from "../pack/build.js";
|
|
8
|
-
import {
|
|
9
|
-
buildPackManifest,
|
|
10
|
-
writePackManifest,
|
|
11
|
-
writeScenarioJson,
|
|
12
|
-
verifyManifestFilesExist,
|
|
13
|
-
} from "../pack/pack-manifest.js";
|
|
14
2
|
import { DEFAULT_VIEWPORT } from "../pack/viewport.js";
|
|
15
|
-
|
|
16
|
-
/** Generator version stamped into scenario.json (kept in sync with the CLI). */
|
|
17
|
-
const PACK_GENERATOR_VERSION = "0.0.1";
|
|
3
|
+
import { runPack } from "../pack/run-pack.js";
|
|
18
4
|
|
|
19
5
|
/** Default canonical viewport width (matches DemoViewport's default). */
|
|
20
6
|
const DEFAULT_WIDTH = DEFAULT_VIEWPORT.width;
|
|
@@ -38,7 +24,7 @@ export function registerPackCommand(program: Command): void {
|
|
|
38
24
|
"(steps.ts + an index.tsx that exports renderStep, plus an\n" +
|
|
39
25
|
"optional .scenar/providers.tsx and narration/). Produces a static\n" +
|
|
40
26
|
"bundle that boots ScenarioPlayer in the browser, ready for\n" +
|
|
41
|
-
"`scenar deploy`.\n\n" +
|
|
27
|
+
"`scenar serve`, `scenar publish`, or `scenar deploy`.\n\n" +
|
|
42
28
|
"The bundle contains index.html, hashed JS/CSS, a scenario.json\n" +
|
|
43
29
|
"descriptor, and a pack-manifest.json listing every file with its\n" +
|
|
44
30
|
"lowercase-hex sha256 and content type. Output stays within the\n" +
|
|
@@ -57,131 +43,29 @@ export function registerPackCommand(program: Command): void {
|
|
|
57
43
|
)
|
|
58
44
|
.option("--keep-temp", "keep the generated entry directory for debugging")
|
|
59
45
|
.action(async (dir: string, options: PackOptions) => {
|
|
60
|
-
const scenarioDir = resolve(dir);
|
|
61
|
-
|
|
62
|
-
let info;
|
|
63
|
-
try {
|
|
64
|
-
info = await stat(scenarioDir);
|
|
65
|
-
} catch {
|
|
66
|
-
process.stderr.write(`\x1b[31mError:\x1b[0m ${dir} does not exist.\n`);
|
|
67
|
-
process.exitCode = 1;
|
|
68
|
-
return;
|
|
69
|
-
}
|
|
70
|
-
if (!info.isDirectory()) {
|
|
71
|
-
process.stderr.write(
|
|
72
|
-
`\x1b[31mError:\x1b[0m ${dir} is not a directory.\n` +
|
|
73
|
-
"The pack command requires a scenario directory (with steps.ts).\n",
|
|
74
|
-
);
|
|
75
|
-
process.exitCode = 1;
|
|
76
|
-
return;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
const scenarioId = basename(scenarioDir);
|
|
80
|
-
const outDir = options.out ? resolve(options.out) : resolve(`./${scenarioId}-bundle`);
|
|
81
|
-
const width = Number(options.width) || DEFAULT_WIDTH;
|
|
82
|
-
const shellHeight = Number(options.shellHeight) || DEFAULT_SHELL_HEIGHT;
|
|
83
|
-
|
|
84
|
-
// The entry must live inside the scenario directory so the bundler's
|
|
85
|
-
// node_modules resolution walks up into the consumer project.
|
|
86
|
-
const tempDir = join(scenarioDir, ".scenar-pack");
|
|
87
|
-
|
|
88
46
|
try {
|
|
89
|
-
const
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
process.stderr.write(`Narration: ${hasNarration ? "yes (manifest found)" : "none"}\n`);
|
|
97
|
-
process.stderr.write(`Output: ${outDir}\n\n`);
|
|
98
|
-
|
|
99
|
-
// 1. Generate the browser entry + index.html into the temp dir.
|
|
100
|
-
const entrySource = generateEmbedEntry({
|
|
101
|
-
scenarioDir,
|
|
102
|
-
renderFilePath,
|
|
103
|
-
scenarioId,
|
|
104
|
-
hasNarration,
|
|
105
|
-
providersPath,
|
|
106
|
-
canonicalWidth: width,
|
|
107
|
-
shellHeight,
|
|
108
|
-
});
|
|
109
|
-
await mkdir(tempDir, { recursive: true });
|
|
110
|
-
const entryFileName = "entry.tsx";
|
|
111
|
-
const entryHtmlPath = join(tempDir, "index.html");
|
|
112
|
-
await writeFile(join(tempDir, entryFileName), entrySource, "utf-8");
|
|
113
|
-
await writeFile(entryHtmlPath, generateEmbedHtml(scenarioId, entryFileName), "utf-8");
|
|
114
|
-
|
|
115
|
-
// 2. Build the static bundle with Vite.
|
|
116
|
-
process.stderr.write("Bundling embed with Vite...\n");
|
|
117
|
-
await runViteBuild({ root: tempDir, outDir, entryHtmlPath });
|
|
118
|
-
|
|
119
|
-
// 3. Copy the narration manifest + audio. The embed fetches
|
|
120
|
-
// ./narration/manifest.json at runtime and resolves each clip's
|
|
121
|
-
// relative src against it, so both must ship in the bundle.
|
|
122
|
-
if (hasNarration) {
|
|
123
|
-
await copyNarration(scenarioDir, outDir);
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
// 4. Write the required scenario.json descriptor at the bundle root,
|
|
127
|
-
// recording the canonical viewport baked into the bundle so `deploy`
|
|
128
|
-
// can derive a correctly-proportioned embed snippet (DD-004).
|
|
129
|
-
await writeScenarioJson(outDir, scenarioId, PACK_GENERATOR_VERSION, {
|
|
130
|
-
width,
|
|
131
|
-
height: shellHeight,
|
|
47
|
+
const result = await runPack({
|
|
48
|
+
scenarioDir: dir,
|
|
49
|
+
outDir: options.out,
|
|
50
|
+
width: Number(options.width) || DEFAULT_WIDTH,
|
|
51
|
+
shellHeight: Number(options.shellHeight) || DEFAULT_SHELL_HEIGHT,
|
|
52
|
+
keepTemp: options.keepTemp,
|
|
53
|
+
onLog: (message) => process.stderr.write(`${message}\n`),
|
|
132
54
|
});
|
|
133
55
|
|
|
134
|
-
// 5. Compute + write the deploy-facing pack manifest (validates the
|
|
135
|
-
// bundle against the backend allowlist; throws on any violation).
|
|
136
|
-
const manifest = await buildPackManifest(outDir, scenarioId);
|
|
137
|
-
await verifyManifestFilesExist(outDir, manifest);
|
|
138
|
-
await writePackManifest(outDir, manifest);
|
|
139
|
-
|
|
140
|
-
const totalBytes = manifest.files.reduce((sum, f) => sum + f.sizeBytes, 0);
|
|
141
56
|
process.stderr.write(
|
|
142
|
-
`\n\x1b[32m✓\x1b[0m Packed ${manifest.files.length} files
|
|
57
|
+
`\n\x1b[32m✓\x1b[0m Packed ${result.manifest.files.length} files ` +
|
|
58
|
+
`(${formatBytes(result.totalBytes)}) to ${result.outDir}\n`,
|
|
143
59
|
);
|
|
144
|
-
process.stderr.write(` Next: scenar
|
|
60
|
+
process.stderr.write(` Next: scenar serve ${result.outDir}\n`);
|
|
145
61
|
} catch (error) {
|
|
146
62
|
const msg = error instanceof Error ? error.message : String(error);
|
|
147
63
|
process.stderr.write(`\x1b[31mError:\x1b[0m ${msg}\n`);
|
|
148
64
|
process.exitCode = 1;
|
|
149
|
-
} finally {
|
|
150
|
-
if (!options.keepTemp) {
|
|
151
|
-
await rm(tempDir, { recursive: true, force: true }).catch(() => {});
|
|
152
|
-
}
|
|
153
65
|
}
|
|
154
66
|
});
|
|
155
67
|
}
|
|
156
68
|
|
|
157
|
-
/**
|
|
158
|
-
* Copy the narration manifest and every *.mp3 from <scenarioDir>/narration
|
|
159
|
-
* into <outDir>/narration. The manifest is the runtime index the embed fetches;
|
|
160
|
-
* the mp3s are the clips it references by relative src.
|
|
161
|
-
*/
|
|
162
|
-
async function copyNarration(scenarioDir: string, outDir: string): Promise<void> {
|
|
163
|
-
const srcDir = join(scenarioDir, "narration");
|
|
164
|
-
const destDir = join(outDir, "narration");
|
|
165
|
-
await mkdir(destDir, { recursive: true });
|
|
166
|
-
const entries = await readdir(srcDir, { withFileTypes: true });
|
|
167
|
-
for (const entry of entries) {
|
|
168
|
-
if (!entry.isFile()) continue;
|
|
169
|
-
const name = entry.name.toLowerCase();
|
|
170
|
-
if (name === "manifest.json" || name.endsWith(".mp3")) {
|
|
171
|
-
await copyFile(join(srcDir, entry.name), join(destDir, entry.name));
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
async function fileExists(path: string): Promise<boolean> {
|
|
177
|
-
try {
|
|
178
|
-
await access(path);
|
|
179
|
-
return true;
|
|
180
|
-
} catch {
|
|
181
|
-
return false;
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
|
|
185
69
|
function formatBytes(bytes: number): string {
|
|
186
70
|
if (bytes < 1024) return `${bytes} B`;
|
|
187
71
|
if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(1)} KiB`;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"publish.d.ts","sourceRoot":"","sources":["../../../src/commands/publish.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAWpC,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAqE7D"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { runPublish } from "../publish/run-publish.js";
|
|
2
|
+
export function registerPublishCommand(program) {
|
|
3
|
+
program
|
|
4
|
+
.command("publish")
|
|
5
|
+
.description("Publish a packed bundle to GitHub Pages and print its public embed URL.\n\n" +
|
|
6
|
+
"Takes a bundle directory produced by `scenar pack`. Creates (or reuses)\n" +
|
|
7
|
+
"a GitHub repo, publishes the bundle to its gh-pages branch, enables\n" +
|
|
8
|
+
"GitHub Pages, and prints the public URL plus a ready-to-paste <iframe>\n" +
|
|
9
|
+
"snippet.\n\n" +
|
|
10
|
+
"By default many tours share one repo: --repo defaults to `scenar-embeds`\n" +
|
|
11
|
+
"and --path to the packed scenario slug, so the embed serves at\n" +
|
|
12
|
+
"https://<you>.github.io/scenar-embeds/<slug>/ and re-publishing one tour\n" +
|
|
13
|
+
"preserves the others. Pass --path / to publish at the repo root\n" +
|
|
14
|
+
"(a dedicated single-tour repo). Target an org with --org.\n\n" +
|
|
15
|
+
"Requires the GitHub CLI (gh) installed and authenticated (`gh auth\n" +
|
|
16
|
+
"login`). Repos are public by default (GitHub Pages needs Pro for private\n" +
|
|
17
|
+
"repos); pass --private if your plan supports it.\n\n" +
|
|
18
|
+
"For an ephemeral local preview instead, use `scenar serve`.")
|
|
19
|
+
.argument("<bundleDir>", "path to a packed bundle directory (from scenar pack)")
|
|
20
|
+
.option("--repo <name>", "target repository name (default: scenar-embeds)")
|
|
21
|
+
.option("--path <subpath>", "subdirectory within the repo (default: the scenario slug; use / for the root)")
|
|
22
|
+
.option("--org <org>", "publish under a GitHub organization instead of your user account")
|
|
23
|
+
.option("--private", "create the repo private (GitHub Pages requires a paid plan for this)")
|
|
24
|
+
.option("--message <msg>", "commit message for the published snapshot", "Publish Scenar embed")
|
|
25
|
+
.action(async (bundleDir, options) => {
|
|
26
|
+
try {
|
|
27
|
+
process.stderr.write(`Bundle: ${bundleDir}\n`);
|
|
28
|
+
process.stderr.write(`Target: ${options.org ? `${options.org}/` : ""}${options.repo ?? "scenar-embeds"}` +
|
|
29
|
+
`/${options.path ?? "(scenario slug)"} (GitHub Pages)\n\n`);
|
|
30
|
+
const { result, viewport, recordedViewport, snippet } = await runPublish({
|
|
31
|
+
bundleDir,
|
|
32
|
+
repo: options.repo,
|
|
33
|
+
path: options.path,
|
|
34
|
+
org: options.org,
|
|
35
|
+
private: Boolean(options.private),
|
|
36
|
+
message: options.message,
|
|
37
|
+
onLog: (message) => process.stderr.write(`${message}\n`),
|
|
38
|
+
});
|
|
39
|
+
const location = result.path ? `${result.owner}/${result.repo}/${result.path}` : `${result.owner}/${result.repo}`;
|
|
40
|
+
process.stderr.write(`\n\x1b[32m✓\x1b[0m ${result.created ? "Created" : "Updated"} ${location}\n`);
|
|
41
|
+
process.stderr.write(` Repo: ${result.repoUrl}\n`);
|
|
42
|
+
// Bare public URL to stdout (pipeable); everything else to stderr.
|
|
43
|
+
process.stdout.write(`${result.pagesUrl}\n`);
|
|
44
|
+
process.stderr.write("\n GitHub Pages builds asynchronously; the URL goes live in ~1 minute on the first publish.\n");
|
|
45
|
+
if (!recordedViewport) {
|
|
46
|
+
process.stderr.write(" Note: no recorded viewport; snippet uses the default " +
|
|
47
|
+
`${viewport.width}x${viewport.height}. Re-pack with the current CLI ` +
|
|
48
|
+
"to embed at the exact aspect ratio.\n");
|
|
49
|
+
}
|
|
50
|
+
process.stderr.write("\n Embed snippet (paste into any page):\n\n");
|
|
51
|
+
process.stderr.write(`${indent(snippet)}\n`);
|
|
52
|
+
}
|
|
53
|
+
catch (error) {
|
|
54
|
+
const msg = error instanceof Error ? error.message : String(error);
|
|
55
|
+
process.stderr.write(`\x1b[31mError:\x1b[0m ${msg}\n`);
|
|
56
|
+
process.exitCode = 1;
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
/** Indent every line by two spaces (for nesting a block under a heading). */
|
|
61
|
+
function indent(block) {
|
|
62
|
+
return block.replace(/^/gm, " ");
|
|
63
|
+
}
|
|
64
|
+
//# sourceMappingURL=publish.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"publish.js","sourceRoot":"","sources":["../../../src/commands/publish.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAUvD,MAAM,UAAU,sBAAsB,CAAC,OAAgB;IACrD,OAAO;SACJ,OAAO,CAAC,SAAS,CAAC;SAClB,WAAW,CACV,6EAA6E;QAC3E,2EAA2E;QAC3E,uEAAuE;QACvE,0EAA0E;QAC1E,cAAc;QACd,4EAA4E;QAC5E,kEAAkE;QAClE,4EAA4E;QAC5E,mEAAmE;QACnE,+DAA+D;QAC/D,sEAAsE;QACtE,4EAA4E;QAC5E,sDAAsD;QACtD,6DAA6D,CAChE;SACA,QAAQ,CAA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O,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;AACpC,CAAC"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { Command } from "commander";
|
|
2
|
+
import { runPublish } from "../publish/run-publish.js";
|
|
3
|
+
|
|
4
|
+
interface PublishCommandOptions {
|
|
5
|
+
repo?: string;
|
|
6
|
+
path?: string;
|
|
7
|
+
org?: string;
|
|
8
|
+
private?: boolean;
|
|
9
|
+
message?: string;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export function registerPublishCommand(program: Command): void {
|
|
13
|
+
program
|
|
14
|
+
.command("publish")
|
|
15
|
+
.description(
|
|
16
|
+
"Publish a packed bundle to GitHub Pages and print its public embed URL.\n\n" +
|
|
17
|
+
"Takes a bundle directory produced by `scenar pack`. Creates (or reuses)\n" +
|
|
18
|
+
"a GitHub repo, publishes the bundle to its gh-pages branch, enables\n" +
|
|
19
|
+
"GitHub Pages, and prints the public URL plus a ready-to-paste <iframe>\n" +
|
|
20
|
+
"snippet.\n\n" +
|
|
21
|
+
"By default many tours share one repo: --repo defaults to `scenar-embeds`\n" +
|
|
22
|
+
"and --path to the packed scenario slug, so the embed serves at\n" +
|
|
23
|
+
"https://<you>.github.io/scenar-embeds/<slug>/ and re-publishing one tour\n" +
|
|
24
|
+
"preserves the others. Pass --path / to publish at the repo root\n" +
|
|
25
|
+
"(a dedicated single-tour repo). Target an org with --org.\n\n" +
|
|
26
|
+
"Requires the GitHub CLI (gh) installed and authenticated (`gh auth\n" +
|
|
27
|
+
"login`). Repos are public by default (GitHub Pages needs Pro for private\n" +
|
|
28
|
+
"repos); pass --private if your plan supports it.\n\n" +
|
|
29
|
+
"For an ephemeral local preview instead, use `scenar serve`.",
|
|
30
|
+
)
|
|
31
|
+
.argument("<bundleDir>", "path to a packed bundle directory (from scenar pack)")
|
|
32
|
+
.option("--repo <name>", "target repository name (default: scenar-embeds)")
|
|
33
|
+
.option("--path <subpath>", "subdirectory within the repo (default: the scenario slug; use / for the root)")
|
|
34
|
+
.option("--org <org>", "publish under a GitHub organization instead of your user account")
|
|
35
|
+
.option("--private", "create the repo private (GitHub Pages requires a paid plan for this)")
|
|
36
|
+
.option("--message <msg>", "commit message for the published snapshot", "Publish Scenar embed")
|
|
37
|
+
.action(async (bundleDir: string, options: PublishCommandOptions) => {
|
|
38
|
+
try {
|
|
39
|
+
process.stderr.write(`Bundle: ${bundleDir}\n`);
|
|
40
|
+
process.stderr.write(
|
|
41
|
+
`Target: ${options.org ? `${options.org}/` : ""}${options.repo ?? "scenar-embeds"}` +
|
|
42
|
+
`/${options.path ?? "(scenario slug)"} (GitHub Pages)\n\n`,
|
|
43
|
+
);
|
|
44
|
+
|
|
45
|
+
const { result, viewport, recordedViewport, snippet } = await runPublish({
|
|
46
|
+
bundleDir,
|
|
47
|
+
repo: options.repo,
|
|
48
|
+
path: options.path,
|
|
49
|
+
org: options.org,
|
|
50
|
+
private: Boolean(options.private),
|
|
51
|
+
message: options.message,
|
|
52
|
+
onLog: (message) => process.stderr.write(`${message}\n`),
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
const location = result.path ? `${result.owner}/${result.repo}/${result.path}` : `${result.owner}/${result.repo}`;
|
|
56
|
+
process.stderr.write(
|
|
57
|
+
`\n\x1b[32m✓\x1b[0m ${result.created ? "Created" : "Updated"} ${location}\n`,
|
|
58
|
+
);
|
|
59
|
+
process.stderr.write(` Repo: ${result.repoUrl}\n`);
|
|
60
|
+
// Bare public URL to stdout (pipeable); everything else to stderr.
|
|
61
|
+
process.stdout.write(`${result.pagesUrl}\n`);
|
|
62
|
+
process.stderr.write(
|
|
63
|
+
"\n GitHub Pages builds asynchronously; the URL goes live in ~1 minute on the first publish.\n",
|
|
64
|
+
);
|
|
65
|
+
|
|
66
|
+
if (!recordedViewport) {
|
|
67
|
+
process.stderr.write(
|
|
68
|
+
" Note: no recorded viewport; snippet uses the default " +
|
|
69
|
+
`${viewport.width}x${viewport.height}. Re-pack with the current CLI ` +
|
|
70
|
+
"to embed at the exact aspect ratio.\n",
|
|
71
|
+
);
|
|
72
|
+
}
|
|
73
|
+
process.stderr.write("\n Embed snippet (paste into any page):\n\n");
|
|
74
|
+
process.stderr.write(`${indent(snippet)}\n`);
|
|
75
|
+
} catch (error) {
|
|
76
|
+
const msg = error instanceof Error ? error.message : String(error);
|
|
77
|
+
process.stderr.write(`\x1b[31mError:\x1b[0m ${msg}\n`);
|
|
78
|
+
process.exitCode = 1;
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/** Indent every line by two spaces (for nesting a block under a heading). */
|
|
84
|
+
function indent(block: string): string {
|
|
85
|
+
return block.replace(/^/gm, " ");
|
|
86
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"render.d.ts","sourceRoot":"","sources":["../../../src/commands/render.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"render.d.ts","sourceRoot":"","sources":["../../../src/commands/render.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAapC,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CA6C5D"}
|
package/src/commands/render.js
CHANGED
|
@@ -1,10 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { stat, mkdir, access, writeFile, rm } from "node:fs/promises";
|
|
3
|
-
import { pathToFileURL } from "node:url";
|
|
4
|
-
import { loadBundle } from "../util/load-bundle.js";
|
|
5
|
-
import { generateRemotionEntry } from "../render/generate-entry.js";
|
|
6
|
-
import { resolveProvidersPath } from "../render/resolve-providers.js";
|
|
7
|
-
import { detectRenderExport } from "../render/detect-render-export.js";
|
|
1
|
+
import { runRender } from "../render/run-render.js";
|
|
8
2
|
export function registerRenderCommand(program) {
|
|
9
3
|
program
|
|
10
4
|
.command("render")
|
|
@@ -25,201 +19,25 @@ export function registerRenderCommand(program) {
|
|
|
25
19
|
.option("--entry <path>", "path to a custom Remotion entry file")
|
|
26
20
|
.option("--webpack-override <path>", "path to a module that default-exports a Remotion WebpackOverrideFn")
|
|
27
21
|
.action(async (dir, options) => {
|
|
28
|
-
const resolved = resolve(dir);
|
|
29
|
-
let info;
|
|
30
22
|
try {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
process.exitCode = 1;
|
|
42
|
-
return;
|
|
43
|
-
}
|
|
44
|
-
const fps = Number(options.fps) || 30;
|
|
45
|
-
const width = Number(options.width) || 1920;
|
|
46
|
-
const height = Number(options.height) || 1080;
|
|
47
|
-
let tempDir;
|
|
48
|
-
try {
|
|
49
|
-
const bundle = await loadBundle(resolved);
|
|
50
|
-
const scenarioId = bundle.id;
|
|
51
|
-
const compositionId = options.compositionId ?? scenarioId;
|
|
52
|
-
const outputPath = resolveOutputPath(options.out, scenarioId);
|
|
53
|
-
const { entryPoint, generated } = await resolveEntryPoint({
|
|
54
|
-
entryOption: options.entry,
|
|
55
|
-
scenarioDir: resolved,
|
|
56
|
-
scenarioId,
|
|
57
|
-
compositionId,
|
|
58
|
-
hasNarration: !!bundle.narrationManifest,
|
|
59
|
-
fps,
|
|
60
|
-
width,
|
|
61
|
-
height,
|
|
62
|
-
});
|
|
63
|
-
tempDir = generated?.tempDir;
|
|
64
|
-
const webpackOverride = options.webpackOverride
|
|
65
|
-
? await loadWebpackOverride(options.webpackOverride)
|
|
66
|
-
: undefined;
|
|
67
|
-
process.stderr.write(`Scenario: ${scenarioId}\n`);
|
|
68
|
-
process.stderr.write(`Steps: ${bundle.steps.length}\n`);
|
|
69
|
-
process.stderr.write(`Audio: ${bundle.narrationManifest ? "yes (manifest found)" : "none"}\n`);
|
|
70
|
-
process.stderr.write(`Entry: ${generated ? "(auto-generated)" : entryPoint}\n`);
|
|
71
|
-
if (generated?.providersPath) {
|
|
72
|
-
process.stderr.write(`Providers: ${generated.providersPath}\n`);
|
|
73
|
-
}
|
|
74
|
-
if (webpackOverride) {
|
|
75
|
-
process.stderr.write(`Webpack: custom override loaded\n`);
|
|
76
|
-
}
|
|
77
|
-
process.stderr.write(`Output: ${outputPath}\n`);
|
|
78
|
-
process.stderr.write(`Config: ${width}x${height} @ ${fps}fps\n\n`);
|
|
79
|
-
await renderScenario({
|
|
80
|
-
bundle,
|
|
81
|
-
entryPoint,
|
|
82
|
-
compositionId,
|
|
83
|
-
outputPath,
|
|
84
|
-
fps,
|
|
85
|
-
width,
|
|
86
|
-
height,
|
|
87
|
-
webpackOverride,
|
|
23
|
+
const result = await runRender({
|
|
24
|
+
scenarioDir: dir,
|
|
25
|
+
out: options.out,
|
|
26
|
+
fps: Number(options.fps) || 30,
|
|
27
|
+
width: Number(options.width) || 1920,
|
|
28
|
+
height: Number(options.height) || 1080,
|
|
29
|
+
compositionId: options.compositionId,
|
|
30
|
+
entry: options.entry,
|
|
31
|
+
webpackOverride: options.webpackOverride,
|
|
32
|
+
onLog: (message) => process.stderr.write(`${message}\n`),
|
|
88
33
|
});
|
|
89
|
-
process.stderr.write(`\n\x1b[32m✓\x1b[0m Video saved to ${outputPath}\n`);
|
|
34
|
+
process.stderr.write(`\n\x1b[32m✓\x1b[0m Video saved to ${result.outputPath}\n`);
|
|
90
35
|
}
|
|
91
36
|
catch (error) {
|
|
92
37
|
const msg = error instanceof Error ? error.message : String(error);
|
|
93
38
|
process.stderr.write(`\x1b[31mError:\x1b[0m ${msg}\n`);
|
|
94
39
|
process.exitCode = 1;
|
|
95
40
|
}
|
|
96
|
-
finally {
|
|
97
|
-
if (tempDir) {
|
|
98
|
-
await rm(tempDir, { recursive: true, force: true }).catch(() => { });
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
});
|
|
102
|
-
}
|
|
103
|
-
// ---------------------------------------------------------------------------
|
|
104
|
-
// Output path resolution
|
|
105
|
-
// ---------------------------------------------------------------------------
|
|
106
|
-
function resolveOutputPath(outOption, scenarioId) {
|
|
107
|
-
if (!outOption) {
|
|
108
|
-
return resolve(`./${scenarioId}.mp4`);
|
|
109
|
-
}
|
|
110
|
-
if (outOption.endsWith(".mp4")) {
|
|
111
|
-
return resolve(outOption);
|
|
112
|
-
}
|
|
113
|
-
return resolve(join(outOption, `${scenarioId}.mp4`));
|
|
114
|
-
}
|
|
115
|
-
async function resolveEntryPoint(input) {
|
|
116
|
-
// Explicit --entry: use as-is, no generation.
|
|
117
|
-
if (input.entryOption) {
|
|
118
|
-
const resolved = resolve(input.entryOption);
|
|
119
|
-
try {
|
|
120
|
-
await access(resolved);
|
|
121
|
-
}
|
|
122
|
-
catch {
|
|
123
|
-
throw new Error(`Remotion entry point not found: ${input.entryOption}`);
|
|
124
|
-
}
|
|
125
|
-
return { entryPoint: resolved };
|
|
126
|
-
}
|
|
127
|
-
// Auto-generate: detect renderStep export, find providers, write temp entry.
|
|
128
|
-
const renderFilePath = await detectRenderExport(input.scenarioDir);
|
|
129
|
-
const providersPath = await resolveProvidersPath(input.scenarioDir);
|
|
130
|
-
const entrySource = generateRemotionEntry({
|
|
131
|
-
scenarioDir: input.scenarioDir,
|
|
132
|
-
renderFilePath,
|
|
133
|
-
scenarioId: input.scenarioId,
|
|
134
|
-
hasNarration: input.hasNarration,
|
|
135
|
-
providersPath,
|
|
136
|
-
fps: input.fps,
|
|
137
|
-
width: input.width,
|
|
138
|
-
height: input.height,
|
|
139
|
-
compositionId: input.compositionId,
|
|
140
|
-
});
|
|
141
|
-
// Write the entry inside the scenario directory so webpack's standard
|
|
142
|
-
// node_modules resolution walks up from here into the consumer project.
|
|
143
|
-
// A /tmp/ location would fail because no node_modules exist there.
|
|
144
|
-
const tempDir = join(input.scenarioDir, ".scenar-render");
|
|
145
|
-
await mkdir(tempDir, { recursive: true });
|
|
146
|
-
const entryPath = join(tempDir, "index.tsx");
|
|
147
|
-
await writeFile(entryPath, entrySource, "utf-8");
|
|
148
|
-
return {
|
|
149
|
-
entryPoint: entryPath,
|
|
150
|
-
generated: { tempDir, providersPath },
|
|
151
|
-
};
|
|
152
|
-
}
|
|
153
|
-
// ---------------------------------------------------------------------------
|
|
154
|
-
// Webpack override loading
|
|
155
|
-
// ---------------------------------------------------------------------------
|
|
156
|
-
async function loadWebpackOverride(overridePath) {
|
|
157
|
-
const resolved = resolve(overridePath);
|
|
158
|
-
try {
|
|
159
|
-
await access(resolved);
|
|
160
|
-
}
|
|
161
|
-
catch {
|
|
162
|
-
throw new Error(`Webpack override file not found: ${overridePath}`);
|
|
163
|
-
}
|
|
164
|
-
let mod;
|
|
165
|
-
try {
|
|
166
|
-
mod = await import(pathToFileURL(resolved).href);
|
|
167
|
-
}
|
|
168
|
-
catch (err) {
|
|
169
|
-
const detail = err instanceof Error ? err.message : String(err);
|
|
170
|
-
throw new Error(`Failed to import webpack override from ${overridePath}:\n${detail}`);
|
|
171
|
-
}
|
|
172
|
-
const override = (mod.default ?? mod.webpackOverride);
|
|
173
|
-
if (typeof override !== "function") {
|
|
174
|
-
throw new Error(`${overridePath} does not export a webpack override function.\n\n` +
|
|
175
|
-
"Expected a default export or named 'webpackOverride' export:\n\n" +
|
|
176
|
-
' import type { WebpackOverrideFn } from "@remotion/bundler";\n\n' +
|
|
177
|
-
" const webpackOverride: WebpackOverrideFn = (config) => ({\n" +
|
|
178
|
-
" ...config,\n" +
|
|
179
|
-
" // your overrides\n" +
|
|
180
|
-
" });\n\n" +
|
|
181
|
-
" export default webpackOverride;\n");
|
|
182
|
-
}
|
|
183
|
-
return override;
|
|
184
|
-
}
|
|
185
|
-
async function renderScenario(config) {
|
|
186
|
-
const bundler = await import("@remotion/bundler").catch(() => {
|
|
187
|
-
throw new Error("Could not load @remotion/bundler.\n" +
|
|
188
|
-
"Install it: pnpm add @remotion/bundler@4.0.448");
|
|
189
|
-
});
|
|
190
|
-
const renderer = await import("@remotion/renderer").catch(() => {
|
|
191
|
-
throw new Error("Could not load @remotion/renderer.\n" +
|
|
192
|
-
"Install it: pnpm add @remotion/renderer@4.0.448");
|
|
193
|
-
});
|
|
194
|
-
process.stderr.write("Bundling Remotion project...\n");
|
|
195
|
-
const bundleOptions = {
|
|
196
|
-
entryPoint: config.entryPoint,
|
|
197
|
-
};
|
|
198
|
-
if (config.webpackOverride) {
|
|
199
|
-
bundleOptions.webpackOverride = config.webpackOverride;
|
|
200
|
-
}
|
|
201
|
-
const serveUrl = await bundler.bundle(bundleOptions);
|
|
202
|
-
process.stderr.write(`Selecting composition: ${config.compositionId}\n`);
|
|
203
|
-
const composition = await renderer.selectComposition({
|
|
204
|
-
serveUrl,
|
|
205
|
-
id: config.compositionId,
|
|
206
|
-
});
|
|
207
|
-
process.stderr.write(`Composition: ${composition.width}x${composition.height} @ ${composition.fps}fps, ` +
|
|
208
|
-
`${composition.durationInFrames} frames ` +
|
|
209
|
-
`(${(composition.durationInFrames / composition.fps).toFixed(1)}s)\n`);
|
|
210
|
-
const outDir = resolve(config.outputPath, "..");
|
|
211
|
-
await mkdir(outDir, { recursive: true });
|
|
212
|
-
process.stderr.write("Rendering...\n");
|
|
213
|
-
await renderer.renderMedia({
|
|
214
|
-
composition,
|
|
215
|
-
serveUrl,
|
|
216
|
-
codec: "h264",
|
|
217
|
-
outputLocation: config.outputPath,
|
|
218
|
-
onProgress: ({ progress }) => {
|
|
219
|
-
const pct = Math.round(progress * 100);
|
|
220
|
-
process.stderr.write(`\r Progress: ${pct}%`);
|
|
221
|
-
},
|
|
222
41
|
});
|
|
223
|
-
process.stderr.write("\n");
|
|
224
42
|
}
|
|
225
43
|
//# sourceMappingURL=render.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"render.js","sourceRoot":"","sources":["../../../src/commands/render.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"render.js","sourceRoot":"","sources":["../../../src/commands/render.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAYpD,MAAM,UAA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