fleetlens 0.2.6 → 0.2.7
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/app/apps/web/.next/BUILD_ID +1 -1
- package/app/apps/web/.next/build-manifest.json +3 -3
- package/app/apps/web/.next/prerender-manifest.json +3 -3
- package/app/apps/web/.next/required-server-files.json +3 -3
- package/app/apps/web/.next/server/app/_global-error.html +1 -1
- package/app/apps/web/.next/server/app/_global-error.rsc +1 -1
- package/app/apps/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/app/apps/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/app/apps/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/app/apps/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/app/apps/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/app/apps/web/.next/server/chunks/ssr/_0xies90._.js +1 -1
- package/app/apps/web/.next/server/middleware-build-manifest.js +3 -3
- package/app/apps/web/.next/server/pages/500.html +1 -1
- package/app/apps/web/.next/server/server-reference-manifest.js +1 -1
- package/app/apps/web/.next/server/server-reference-manifest.json +1 -1
- package/app/apps/web/package.json +1 -1
- package/app/apps/web/server.js +1 -1
- package/app/apps/web/tsconfig.tsbuildinfo +1 -1
- package/dist/daemon-worker.js +27 -5
- package/dist/index.js +5 -5
- package/package.json +1 -1
- /package/app/apps/web/.next/static/{xFotUhEk3wVr-guN_B8n_ → Suh-utGyqGIs9TqCHz3q5}/_buildManifest.js +0 -0
- /package/app/apps/web/.next/static/{xFotUhEk3wVr-guN_B8n_ → Suh-utGyqGIs9TqCHz3q5}/_clientMiddlewareManifest.js +0 -0
- /package/app/apps/web/.next/static/{xFotUhEk3wVr-guN_B8n_ → Suh-utGyqGIs9TqCHz3q5}/_ssgManifest.js +0 -0
package/dist/daemon-worker.js
CHANGED
|
@@ -137,6 +137,7 @@ var STATE_DIR = join2(homedir2(), ".cclens");
|
|
|
137
137
|
var USAGE_LOG = join2(STATE_DIR, "usage.jsonl");
|
|
138
138
|
var DAEMON_LOG = join2(STATE_DIR, "daemon.log");
|
|
139
139
|
var POLL_INTERVAL_MS = 5 * 60 * 1e3;
|
|
140
|
+
var WATCHDOG_INTERVAL_MS = 30 * 1e3;
|
|
140
141
|
mkdirSync2(dirname2(USAGE_LOG), { recursive: true });
|
|
141
142
|
function log(level, message) {
|
|
142
143
|
const line = `${(/* @__PURE__ */ new Date()).toISOString()} ${level.toUpperCase()} ${message}
|
|
@@ -146,7 +147,9 @@ function log(level, message) {
|
|
|
146
147
|
} catch {
|
|
147
148
|
}
|
|
148
149
|
}
|
|
150
|
+
var lastPollAtMs = 0;
|
|
149
151
|
async function tick() {
|
|
152
|
+
lastPollAtMs = Date.now();
|
|
150
153
|
try {
|
|
151
154
|
const snapshot = await fetchUsage();
|
|
152
155
|
appendSnapshot(USAGE_LOG, snapshot);
|
|
@@ -162,11 +165,30 @@ async function tick() {
|
|
|
162
165
|
}
|
|
163
166
|
}
|
|
164
167
|
}
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
168
|
+
function sleep(ms) {
|
|
169
|
+
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
170
|
+
}
|
|
171
|
+
async function runLoop() {
|
|
172
|
+
while (true) {
|
|
173
|
+
const now = Date.now();
|
|
174
|
+
const elapsed = now - lastPollAtMs;
|
|
175
|
+
if (elapsed >= POLL_INTERVAL_MS) {
|
|
176
|
+
if (lastPollAtMs > 0 && elapsed > POLL_INTERVAL_MS * 1.5) {
|
|
177
|
+
log(
|
|
178
|
+
"info",
|
|
179
|
+
`wake-from-sleep catch-up: ${Math.round(elapsed / 1e3)}s since last poll (expected ${POLL_INTERVAL_MS / 1e3}s)`
|
|
180
|
+
);
|
|
181
|
+
}
|
|
182
|
+
await tick();
|
|
183
|
+
}
|
|
184
|
+
await sleep(WATCHDOG_INTERVAL_MS);
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
log(
|
|
188
|
+
"info",
|
|
189
|
+
`daemon started (pid=${process.pid}, interval=${POLL_INTERVAL_MS / 1e3}s, watchdog=${WATCHDOG_INTERVAL_MS / 1e3}s)`
|
|
190
|
+
);
|
|
191
|
+
void runLoop();
|
|
170
192
|
process.on("SIGTERM", () => {
|
|
171
193
|
log("info", `daemon stopping (pid=${process.pid})`);
|
|
172
194
|
process.exit(0);
|
package/dist/index.js
CHANGED
|
@@ -454,9 +454,9 @@ Installed: ${PACKAGE_NAME}@${verify.installedVersion} at ${verify.installedPath
|
|
|
454
454
|
console.warn(
|
|
455
455
|
` \u2022 reinstall in the correct Node env: 'npm install -g ${PACKAGE_NAME}@latest'`
|
|
456
456
|
);
|
|
457
|
-
} else if (verify.installedVersion !== "0.2.
|
|
457
|
+
} else if (verify.installedVersion !== "0.2.7") {
|
|
458
458
|
console.log(
|
|
459
|
-
` \u2192 This process is still running ${"0.2.
|
|
459
|
+
` \u2192 This process is still running ${"0.2.7"}. Next invocation will use ${verify.installedVersion}.`
|
|
460
460
|
);
|
|
461
461
|
}
|
|
462
462
|
}
|
|
@@ -492,7 +492,7 @@ async function checkForUpdate() {
|
|
|
492
492
|
if (process.env.__FLEETLENS_UPDATED === "1" || process.env.__CCLENS_UPDATED === "1") return;
|
|
493
493
|
const latest = await fetchLatestVersion();
|
|
494
494
|
if (latest === null) return;
|
|
495
|
-
const current = "0.2.
|
|
495
|
+
const current = "0.2.7";
|
|
496
496
|
if (!shouldUpdate(current, latest)) return;
|
|
497
497
|
console.log(`Updating ${PACKAGE_NAME} ${current} \u2192 ${latest}...`);
|
|
498
498
|
await stopRunningServices();
|
|
@@ -530,7 +530,7 @@ async function stopRunningServices() {
|
|
|
530
530
|
}
|
|
531
531
|
async function forceUpdate() {
|
|
532
532
|
const latest = await fetchLatestVersion();
|
|
533
|
-
const current = "0.2.
|
|
533
|
+
const current = "0.2.7";
|
|
534
534
|
if (latest === null) {
|
|
535
535
|
console.error("Could not reach npm registry. Check your network.");
|
|
536
536
|
process.exit(1);
|
|
@@ -1761,7 +1761,7 @@ async function main() {
|
|
|
1761
1761
|
case "version":
|
|
1762
1762
|
case "--version":
|
|
1763
1763
|
case "-v":
|
|
1764
|
-
console.log(`fleetlens ${"0.2.
|
|
1764
|
+
console.log(`fleetlens ${"0.2.7"}`);
|
|
1765
1765
|
break;
|
|
1766
1766
|
case "help":
|
|
1767
1767
|
case "--help":
|
package/package.json
CHANGED
/package/app/apps/web/.next/static/{xFotUhEk3wVr-guN_B8n_ → Suh-utGyqGIs9TqCHz3q5}/_buildManifest.js
RENAMED
|
File without changes
|
|
File without changes
|
/package/app/apps/web/.next/static/{xFotUhEk3wVr-guN_B8n_ → Suh-utGyqGIs9TqCHz3q5}/_ssgManifest.js
RENAMED
|
File without changes
|