@toothfairyai/tfdesign 0.4.5 → 0.4.6
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/cli.js +10 -6
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -1634,16 +1634,20 @@ function resolveOption(input, options) {
|
|
|
1634
1634
|
}
|
|
1635
1635
|
async function buildResult(base, project, conversationId, { rounds, finalText, mirrorRoot }) {
|
|
1636
1636
|
const projectId = project.id;
|
|
1637
|
-
const
|
|
1637
|
+
const filesUrl = `${base}/api/projects/${encodeURIComponent(projectId)}/files`;
|
|
1638
|
+
const fetchFiles = async () => (await getJson(filesUrl).catch(() => null))?.files ?? [];
|
|
1639
|
+
let filesRaw = await fetchFiles();
|
|
1640
|
+
for (let wait = 0; filesRaw.length === 0 && wait < 10; wait++) {
|
|
1641
|
+
await new Promise((r) => setTimeout(r, 500));
|
|
1642
|
+
filesRaw = await fetchFiles();
|
|
1643
|
+
}
|
|
1644
|
+
const [projectData] = await Promise.all([
|
|
1638
1645
|
getJson(`${base}/api/projects/${encodeURIComponent(projectId)}`).catch(
|
|
1639
1646
|
() => null
|
|
1640
|
-
)
|
|
1641
|
-
getJson(
|
|
1642
|
-
`${base}/api/projects/${encodeURIComponent(projectId)}/files`
|
|
1643
|
-
).catch(() => null)
|
|
1647
|
+
)
|
|
1644
1648
|
]);
|
|
1645
1649
|
const record = projectData?.project ?? projectData ?? project;
|
|
1646
|
-
const files =
|
|
1650
|
+
const files = filesRaw.filter(
|
|
1647
1651
|
(f) => typeof f?.name === "string" && f.name.length > 0 && !f.name.split("/").some((s) => s.startsWith("."))
|
|
1648
1652
|
);
|
|
1649
1653
|
let entryFile = record?.metadata?.entryFile ?? null;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@toothfairyai/tfdesign",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.6",
|
|
4
4
|
"description": "TF Design — the local design workspace CLI: headless design runs (decks, posters, sites) through the tfdesign daemon, delegable from tfcode.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "Apache-2.0",
|