- Build: explicitly write tt-native package.json into the bundle in
CI / Build & Test (push) Successful in 3m47s

patchBundle so the runtime never gets empty content for that key
  (fixes "Unexpected end of JSON input" in Module._extensions..json
  when the host is started by the extension on Windows).
- State: treat empty or whitespace-only state.json (and legacy
  persist file) as missing and return default state instead of
  throwing in JSON.parse.
- State: add ensureStorageDir() and call it from message-router
  after setStoragePath so the storage directory exists on fresh
  install before any state is loaded or saved.
This commit is contained in:
Raven Scott
2026-03-06 18:51:53 -05:00
parent 59f0524739
commit 0e0822aa81
4 changed files with 28 additions and 1 deletions
+5
View File
@@ -65,6 +65,10 @@ function setStoragePath(baseDir) {
stateModule.setStoragePath(baseDir);
}
function ensureStorageDir() {
stateModule.ensureStorageDir();
}
// ── Restore persisted state ───────────────────────────────────────────────────
/**
@@ -108,6 +112,7 @@ module.exports = {
setEventEmitter,
// Storage
setStoragePath,
ensureStorageDir,
// Settings
getSettings: settingsModule.getSettings,
updateSettings: settingsModule.updateSettings,