@hyperframes/studio-server 0.8.222 → 0.8.223

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.
@@ -847,7 +847,7 @@ import { dirname as dirname2, join as join4 } from "path";
847
847
 
848
848
  // src/history/historyId.ts
849
849
  import { randomUUID as randomUUID4 } from "crypto";
850
- import { existsSync, mkdirSync as mkdirSync2, readFileSync as readFileSync4, statSync as statSync2, writeFileSync as writeFileSync2 } from "fs";
850
+ import { existsSync, mkdirSync as mkdirSync2, readFileSync as readFileSync4, statSync as statSync2, utimesSync, writeFileSync as writeFileSync2 } from "fs";
851
851
  import { basename, join as join3, resolve as resolve4 } from "path";
852
852
  import { replaceFileAtomically as replaceFileAtomically3 } from "@hyperframes/core/atomic-file";
853
853
  var ID_PATH = join3(".hyperframes", "history-id");
@@ -909,8 +909,21 @@ var HistoryIdError = class extends Error {
909
909
  this.name = "HistoryIdError";
910
910
  }
911
911
  };
912
+ function markUsed(historyDir) {
913
+ const now = /* @__PURE__ */ new Date();
914
+ try {
915
+ utimesSync(join3(historyDir, "project.json"), now, now);
916
+ } catch {
917
+ return;
918
+ }
919
+ }
912
920
  function recordProject(historyDir, dir, folder) {
913
921
  const record = { dir, ino: folder.ino, born: folder.birthtimeMs, dev: folder.dev };
922
+ const was = readRecord(historyDir);
923
+ if (was?.dir === record.dir && was.ino === record.ino && was.born === record.born && was.dev === record.dev) {
924
+ markUsed(historyDir);
925
+ return;
926
+ }
914
927
  mkdirSync2(historyDir, { recursive: true });
915
928
  replaceFileAtomically3(join3(historyDir, "project.json"), JSON.stringify(record), 420);
916
929
  }
@@ -24,7 +24,7 @@ import {
24
24
  recordRenderSuccess,
25
25
  registerRenderOutput,
26
26
  retainSnapshotOutput
27
- } from "../chunk-CZ2QLV2C.js";
27
+ } from "../chunk-UC72OCMB.js";
28
28
  import "../chunk-QF7MFJJU.js";
29
29
  import "../chunk-SVQFE44C.js";
30
30
  import "../chunk-L3HJVTQE.js";
package/dist/index.js CHANGED
@@ -66,7 +66,7 @@ import {
66
66
  retainSnapshotOutput,
67
67
  serveWhileOpen,
68
68
  settledFileTag
69
- } from "./chunk-CZ2QLV2C.js";
69
+ } from "./chunk-UC72OCMB.js";
70
70
  import {
71
71
  clearElementScreenshotIsolation,
72
72
  getElementScreenshotClip
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hyperframes/studio-server",
3
- "version": "0.8.222",
3
+ "version": "0.8.223",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/heygen-com/hyperframes",
@@ -84,8 +84,8 @@
84
84
  "linkedom": "^0.18.12",
85
85
  "postcss": "^8.5.8",
86
86
  "postcss-selector-parser": "^7.1.2",
87
- "@hyperframes/parsers": "0.8.222",
88
- "@hyperframes/core": "0.8.222"
87
+ "@hyperframes/parsers": "0.8.223",
88
+ "@hyperframes/core": "0.8.223"
89
89
  },
90
90
  "devDependencies": {
91
91
  "@types/node": "^25.0.10",