@prestyj/core 5.0.1 → 5.1.1

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.cjs CHANGED
@@ -1744,6 +1744,17 @@ var AuthStorage = class {
1744
1744
  async ensureLoaded() {
1745
1745
  if (!this.loaded) await this.load();
1746
1746
  }
1747
+ /**
1748
+ * Force a re-read from disk, discarding the in-memory cache. Needed when
1749
+ * another process mutates the auth file out-of-band — e.g. the desktop app
1750
+ * writes API keys natively (Rust → ~/.ezcoder/auth.json) without going through
1751
+ * this instance, so a long-lived daemon's cache would otherwise stay stale and
1752
+ * never see a newly added provider key.
1753
+ */
1754
+ async reload() {
1755
+ this.loaded = false;
1756
+ await this.load();
1757
+ }
1747
1758
  async getCredentials(provider) {
1748
1759
  await this.ensureLoaded();
1749
1760
  return this.data[provider];
@@ -2212,7 +2223,7 @@ function performUpdateInBackground(command) {
2212
2223
  }
2213
2224
  function createAutoUpdater(config) {
2214
2225
  const REGISTRY_URL = `https://registry.npmjs.org/${config.packageName}/latest`;
2215
- const periodicMessage = config.periodicMessage ?? (({ currentVersion, latestVersion, updateCommand }) => `Ken just pushed a fresh update \u2014 ${currentVersion} \u2192 ${latestVersion}! I'll grab it on next launch (or run ${updateCommand} if you can't wait).`);
2226
+ const periodicMessage = config.periodicMessage ?? (({ currentVersion, latestVersion, updateCommand }) => `Nolan just pushed a fresh update \u2014 ${currentVersion} \u2192 ${latestVersion}! I'll grab it on next launch (or run ${updateCommand} if you can't wait).`);
2216
2227
  let periodicTimer = null;
2217
2228
  function stateFilePath() {
2218
2229
  return typeof config.stateFilePath === "function" ? config.stateFilePath() : config.stateFilePath;
@@ -2291,7 +2302,7 @@ function createAutoUpdater(config) {
2291
2302
  const info = detectInstallInfo();
2292
2303
  if (info.updateCommand) {
2293
2304
  performUpdateInBackground(info.updateCommand);
2294
- message = `Ken just shipped ${state.latestVersion}! Installing in the background \u2014 takes effect next launch.`;
2305
+ message = `Nolan just shipped ${state.latestVersion}! Installing in the background \u2014 takes effect next launch.`;
2295
2306
  writeState({
2296
2307
  ...state,
2297
2308
  lastCheckedAt: Date.now(),