@xcelsior/demo-pipeline 0.1.0 → 0.1.2
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/bin/cli.js
CHANGED
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
*/
|
|
13
13
|
const fs = require("fs");
|
|
14
14
|
const path = require("path");
|
|
15
|
+
const cp = require("child_process");
|
|
15
16
|
|
|
16
17
|
const TEMPLATE = path.join(__dirname, "..", "template");
|
|
17
18
|
const CWD = process.cwd();
|
|
@@ -75,12 +76,33 @@ function run(overwrite) {
|
|
|
75
76
|
}
|
|
76
77
|
}
|
|
77
78
|
|
|
79
|
+
// resolve the project's brand logo immediately (not only at render time)
|
|
80
|
+
function resolveLogo() {
|
|
81
|
+
try {
|
|
82
|
+
const tool = path.join(CWD, "tools", "demo-pipeline");
|
|
83
|
+
const finder = path.join(tool, "pipeline", "find_logo.sh");
|
|
84
|
+
if (!fs.existsSync(finder)) return;
|
|
85
|
+
const found = cp.execSync(`bash "${finder}"`, { encoding: "utf8" }).trim();
|
|
86
|
+
const dest = path.join(tool, "remotion", "public", "brand", "logo-white.png");
|
|
87
|
+
if (!found || !fs.existsSync(found)) { console.log(" logo: none found in repo → xcelsior fallback"); return; }
|
|
88
|
+
if (found.toLowerCase().endsWith(".svg")) {
|
|
89
|
+
try { cp.execSync(`rsvg-convert -w 1400 "${found}" -o "${dest}"`); }
|
|
90
|
+
catch { console.log(` logo: ${found} (svg — run setup for rsvg; resolves on first render)`); return; }
|
|
91
|
+
} else {
|
|
92
|
+
fs.copyFileSync(found, dest);
|
|
93
|
+
}
|
|
94
|
+
console.log(` logo: ${found}`);
|
|
95
|
+
} catch { /* non-fatal */ }
|
|
96
|
+
}
|
|
97
|
+
|
|
78
98
|
if (cmd === "init") {
|
|
79
99
|
run(false);
|
|
100
|
+
resolveLogo();
|
|
80
101
|
console.log("✓ demo-pipeline scaffolded -> tools/demo-pipeline/ + .claude/commands/demo-video.md");
|
|
81
102
|
console.log("Next: edit tools/demo-pipeline/demo.config.json → pnpm --dir tools/demo-pipeline setup → /demo-video");
|
|
82
103
|
} else if (cmd === "update") {
|
|
83
104
|
run(true);
|
|
105
|
+
resolveLogo();
|
|
84
106
|
console.log("✓ engine updated (kept your demo.config.json, capture flow, and brand assets)");
|
|
85
107
|
} else {
|
|
86
108
|
console.log("usage: xcelsior-demo <init|update>");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xcelsior/demo-pipeline",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Scaffold an automated demo-video pipeline (capture real UI → Kokoro voice-over → OpenScreen-style Remotion edit) into any repo. Driven by Claude via /demo-video.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"xcelsior-demo": "bin/cli.js"
|
|
@@ -9,6 +9,9 @@
|
|
|
9
9
|
"bin",
|
|
10
10
|
"template"
|
|
11
11
|
],
|
|
12
|
+
"publishConfig": {
|
|
13
|
+
"access": "public"
|
|
14
|
+
},
|
|
12
15
|
"engines": {
|
|
13
16
|
"node": ">=18.0.0"
|
|
14
17
|
},
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
2
|
+
"project": "REPLACE_ME",
|
|
3
|
+
"baseUrl": "https://your-admin.example.com",
|
|
4
|
+
"auth": {
|
|
5
|
+
"defaultEmail": "you@example.com",
|
|
6
|
+
"note": "Password via env LNG_PWD (never commit it). Email overridable via LNG_EMAIL."
|
|
7
|
+
},
|
|
8
|
+
"brandLogo": "auto",
|
|
9
|
+
"_brandLogo_note": "'auto' discovers this repo's logo (prefers white/transparent); or set an explicit path; falls back to the bundled xcelsior logo.",
|
|
10
|
+
"voice": "af_heart",
|
|
11
|
+
"sim": {
|
|
12
|
+
"udid": "BOOTED_SIM_UDID",
|
|
13
|
+
"appId": "com.yourapp",
|
|
14
|
+
"note": "iOS simulator UDID for the mobile app. xcrun simctl list devices booted"
|
|
15
|
+
}
|
|
15
16
|
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Find the consuming project's brand logo (preferring a white/transparent one for the
|
|
3
|
+
# dark intro). Prints the best match path, or nothing. Searches the repo root.
|
|
4
|
+
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/../../.." && pwd)"
|
|
5
|
+
|
|
6
|
+
mapfile -t cands < <(
|
|
7
|
+
find "$ROOT" \
|
|
8
|
+
\( -path '*/node_modules/*' -o -path '*/.git/*' -o -path '*/dist/*' -o -path '*/.next/*' \
|
|
9
|
+
-o -path '*/.open-next/*' -o -path '*/.expo/*' -o -path '*/.astro/*' -o -path '*/build/*' \
|
|
10
|
+
-o -path '*/Pods/*' -o -path '*/android/*' -o -path '*/ios/*' -o -path '*/coverage/*' \
|
|
11
|
+
-o -path '*/tools/demo-pipeline/*' \) -prune -o \
|
|
12
|
+
-type f \( -iname '*logo*.png' -o -iname '*logo*.svg' \) -print 2>/dev/null
|
|
13
|
+
)
|
|
14
|
+
|
|
15
|
+
best=""; bestscore=-1000
|
|
16
|
+
for f in "${cands[@]}"; do
|
|
17
|
+
n="$(echo "$f" | tr 'A-Z' 'a-z')"; s=0
|
|
18
|
+
case "$n" in *white*) s=$((s+6));; esac
|
|
19
|
+
case "$n" in *full-logo*|*full_logo*|*logo-full*) s=$((s+4));; esac
|
|
20
|
+
case "$n" in *logo*) s=$((s+1));; esac
|
|
21
|
+
case "$n" in */uploads/*|*/public/*|*/assets/*) s=$((s+1));; esac
|
|
22
|
+
case "$n" in *.svg) s=$((s+1));; esac # vector scales crisply
|
|
23
|
+
case "$n" in *favicon*|*icon-*|*app-icon*|*appicon*|*-icon*|*splash*|*black*|*dark*) s=$((s-6));; esac
|
|
24
|
+
if [ $s -gt $bestscore ]; then bestscore=$s; best="$f"; fi
|
|
25
|
+
done
|
|
26
|
+
echo "$best"
|
package/template/pipeline/run.sh
CHANGED
|
@@ -36,7 +36,19 @@ cp "$RUN"/vo/*.wav remotion/public/run/vo/ 2>/dev/null || true
|
|
|
36
36
|
cp "$RUN/events/web.events.json" remotion/src/edit/web.events.json
|
|
37
37
|
cp "$RUN/events/mobile.events.json" remotion/src/edit/mobile.events.json 2>/dev/null || true
|
|
38
38
|
cp "$RUN/vo/manifest.json" remotion/src/edit/vo-manifest.json
|
|
39
|
-
|
|
39
|
+
# brand logo: "auto" -> discover the project's logo; else explicit path; else keep bundled xcelsior fallback
|
|
40
|
+
LOGO_CFG="$(get brandLogo)"; DEST=remotion/public/brand/logo-white.png
|
|
41
|
+
LOGO=""
|
|
42
|
+
if [ "$LOGO_CFG" = "auto" ] || [ -z "$LOGO_CFG" ]; then LOGO="$(bash pipeline/find_logo.sh)"; else LOGO="$LOGO_CFG"; fi
|
|
43
|
+
if [ -n "$LOGO" ] && [ -f "$LOGO" ]; then
|
|
44
|
+
case "$LOGO" in
|
|
45
|
+
*.svg) command -v rsvg-convert >/dev/null && rsvg-convert -w 1400 "$LOGO" -o "$DEST" || echo " (install librsvg to use svg logos; keeping fallback)";;
|
|
46
|
+
*) cp "$LOGO" "$DEST";;
|
|
47
|
+
esac
|
|
48
|
+
echo " logo: $LOGO"
|
|
49
|
+
else
|
|
50
|
+
echo " logo: bundled xcelsior fallback (set demo.config.json brandLogo to override)"
|
|
51
|
+
fi
|
|
40
52
|
[ "${MUSIC:-0}" = "1" ] && .venv/bin/python pipeline/gen_music.py remotion/public/run/music.wav || true
|
|
41
53
|
|
|
42
54
|
echo "== 5/5 render =="
|
|
Binary file
|
package/template/setup.sh
CHANGED
|
@@ -22,6 +22,7 @@ BASE=https://github.com/thewh1teagle/kokoro-onnx/releases/download/model-files-v
|
|
|
22
22
|
echo "[5/5] Remotion deps (the editor)"
|
|
23
23
|
( cd remotion && pnpm install >/dev/null )
|
|
24
24
|
|
|
25
|
+
command -v rsvg-convert >/dev/null || brew install librsvg # convert .svg project logos
|
|
25
26
|
command -v maestro >/dev/null || echo " (mobile only) install Maestro: curl -fsSL https://get.maestro.mobile.dev | bash"
|
|
26
27
|
echo ""
|
|
27
28
|
echo "✅ demo-pipeline ready."
|