@hyperframes/studio-server 0.8.62 → 0.8.64

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 CHANGED
@@ -2404,14 +2404,19 @@ function registerFileRoutes(api, adapter) {
2404
2404
  if ("error" in res) return res.error;
2405
2405
  if (!existsSync3(res.absPath)) {
2406
2406
  if (c.req.query("optional") === "1") {
2407
- return c.json({ filename: res.filePath, content: "" });
2407
+ return c.json({ filename: res.filePath, content: "", missing: true });
2408
2408
  }
2409
2409
  return c.json({ error: "not found" }, 404);
2410
2410
  }
2411
2411
  const content = readFileSync5(res.absPath);
2412
2412
  const version = fileContentVersion(content);
2413
2413
  c.header("ETag", version);
2414
- return c.json({ filename: res.filePath, content: content.toString("utf-8"), version });
2414
+ return c.json({
2415
+ filename: res.filePath,
2416
+ content: content.toString("utf-8"),
2417
+ version,
2418
+ missing: false
2419
+ });
2415
2420
  });
2416
2421
  api.put("/projects/:id/files/*", async (c) => {
2417
2422
  const res = await resolveProjectFile(c, adapter);