storyforge 0.4.7 → 0.4.9
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/index.js +14 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -681,6 +681,7 @@ async function findOrCreateProject(dir) {
|
|
|
681
681
|
}
|
|
682
682
|
const meta = {
|
|
683
683
|
projectId: project.id,
|
|
684
|
+
projectSlug: project.slug,
|
|
684
685
|
channelId: channel.id,
|
|
685
686
|
title: project.title,
|
|
686
687
|
channelName: channel.name,
|
|
@@ -689,8 +690,19 @@ async function findOrCreateProject(dir) {
|
|
|
689
690
|
};
|
|
690
691
|
saveMeta(dir, meta);
|
|
691
692
|
log.success(`Saved ${metaPath(dir)}`);
|
|
693
|
+
ensureProjectAssetTree(dir, channel.slug, project.slug);
|
|
692
694
|
return meta;
|
|
693
695
|
}
|
|
696
|
+
function ensureProjectAssetTree(dir, channelSlug, projectSlug) {
|
|
697
|
+
const base = path2.join(dir, "channels", channelSlug, "projects", projectSlug);
|
|
698
|
+
const kinds = ["images", "audio", "clips", "scripts", "brand", "renders", "shorts", "gemini-scenes"];
|
|
699
|
+
for (const k of kinds) {
|
|
700
|
+
const p = path2.join(base, k);
|
|
701
|
+
fs2.mkdirSync(p, { recursive: true });
|
|
702
|
+
const keep = path2.join(p, ".gitkeep");
|
|
703
|
+
if (!fs2.existsSync(keep)) fs2.writeFileSync(keep, "");
|
|
704
|
+
}
|
|
705
|
+
}
|
|
694
706
|
function findMonorepoRoot(startDir) {
|
|
695
707
|
let d = startDir;
|
|
696
708
|
for (let i = 0; i < 6; i++) {
|
|
@@ -1457,7 +1469,8 @@ Return ONLY the complete updated TSX. No markdown fences, no explanation.`;
|
|
|
1457
1469
|
res.end(JSON.stringify({ error: "Not found" }));
|
|
1458
1470
|
});
|
|
1459
1471
|
server.listen(port, () => {
|
|
1460
|
-
const
|
|
1472
|
+
const webFragment = meta.projectSlug ?? meta.projectId;
|
|
1473
|
+
const webUrl = `${WEB_URL}/forge/p/${webFragment}/pipeline`;
|
|
1461
1474
|
console.log("");
|
|
1462
1475
|
log.success("Running");
|
|
1463
1476
|
console.log("");
|