@sma1lboy/kobe 0.9.28 → 0.9.29

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.
@@ -398,7 +398,7 @@ function writeRecord(storeKey, record, path) {
398
398
  records[storeKey] = record;
399
399
  const newest = Object.entries(records).sort(([, a], [, b]) => a.at < b.at ? 1 : -1).slice(0, MAX_RECORDS);
400
400
  mkdirSync(dirname2(path), { recursive: true });
401
- writeFileSync(path, JSON.stringify(Object.fromEntries(newest), null, 2), "utf8");
401
+ writeFileSync(path, JSON.stringify(Object.fromEntries(newest), null, 2), { encoding: "utf8", mode: 384 });
402
402
  }
403
403
 
404
404
  // ../kobe-daemon/src/daemon/pty-freeze-store.ts
@@ -556,10 +556,10 @@ function fileFreezeSink(dir = defaultPtyFreezeDir()) {
556
556
  return {
557
557
  save(record) {
558
558
  try {
559
- mkdirSync2(dir, { recursive: true });
559
+ mkdirSync2(dir, { recursive: true, mode: 448 });
560
560
  const target = recordFile(dir, record.key);
561
561
  const staging = `${target}.${process.pid}.tmp`;
562
- writeFileSync2(staging, JSON.stringify(record), "utf8");
562
+ writeFileSync2(staging, JSON.stringify(record), { encoding: "utf8", mode: 384 });
563
563
  renameSync(staging, target);
564
564
  } catch {}
565
565
  },