@adhdev/daemon-core 1.0.6-rc.5 → 1.0.7-rc.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.js +10 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +10 -6
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
- package/src/providers/provider-loader.ts +21 -4
package/dist/index.mjs
CHANGED
|
@@ -423,10 +423,10 @@ function readInjected(value) {
|
|
|
423
423
|
}
|
|
424
424
|
function getDaemonBuildInfo() {
|
|
425
425
|
if (cached) return cached;
|
|
426
|
-
const commit = readInjected(true ? "
|
|
427
|
-
const commitShort = readInjected(true ? "
|
|
428
|
-
const version = readInjected(true ? "1.0.
|
|
429
|
-
const builtAt = readInjected(true ? "2026-07-
|
|
426
|
+
const commit = readInjected(true ? "08a9c98386a035399bb9d637e1c95cc3a242c165" : void 0) ?? "unknown";
|
|
427
|
+
const commitShort = readInjected(true ? "08a9c983" : void 0) ?? (commit !== "unknown" ? commit.slice(0, 7) : "unknown");
|
|
428
|
+
const version = readInjected(true ? "1.0.7-rc.1" : void 0) ?? readInjected(typeof process !== "undefined" ? process.env?.ADHDEV_PKG_VERSION : void 0) ?? "unknown";
|
|
429
|
+
const builtAt = readInjected(true ? "2026-07-20T04:10:23.643Z" : void 0);
|
|
430
430
|
cached = builtAt ? { commit, commitShort, version, builtAt } : { commit, commitShort, version };
|
|
431
431
|
return cached;
|
|
432
432
|
}
|
|
@@ -56298,10 +56298,14 @@ var ProviderLoader = class _ProviderLoader {
|
|
|
56298
56298
|
} catch {
|
|
56299
56299
|
}
|
|
56300
56300
|
const MIN_INTERVAL_MS = 30 * 60 * 1e3;
|
|
56301
|
-
|
|
56301
|
+
const upstreamProviderCount = this.countProviders(this.upstreamDir);
|
|
56302
|
+
if (upstreamProviderCount > 0 && prevTimestamp && Date.now() - prevTimestamp < MIN_INTERVAL_MS) {
|
|
56302
56303
|
this.log("Upstream check skipped (last check < 30min ago)");
|
|
56303
56304
|
return { updated: false };
|
|
56304
56305
|
}
|
|
56306
|
+
if (upstreamProviderCount === 0 && prevTimestamp && Date.now() - prevTimestamp < MIN_INTERVAL_MS) {
|
|
56307
|
+
this.log("Upstream empty (0 providers) \u2014 forcing fetch despite <30min cooldown");
|
|
56308
|
+
}
|
|
56305
56309
|
const tarballTarget = resolveProviderTarballTarget(this.providerTarballUrl);
|
|
56306
56310
|
try {
|
|
56307
56311
|
const etag = await new Promise((resolve26, reject) => {
|
|
@@ -56341,7 +56345,7 @@ var ProviderLoader = class _ProviderLoader {
|
|
|
56341
56345
|
});
|
|
56342
56346
|
req.end();
|
|
56343
56347
|
});
|
|
56344
|
-
if (etag && etag === prevEtag) {
|
|
56348
|
+
if (etag && etag === prevEtag && upstreamProviderCount > 0) {
|
|
56345
56349
|
this.writeMeta(metaPath, prevEtag, Date.now());
|
|
56346
56350
|
this.log("Upstream unchanged (ETag match)");
|
|
56347
56351
|
return { updated: false };
|