@hexclave/cli 1.0.59 → 1.0.61
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 +4 -3
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
- package/src/commands/dev.test.ts +37 -1
- package/src/commands/dev.ts +9 -5
package/dist/index.js
CHANGED
|
@@ -1462,7 +1462,7 @@ async function resolveDashboardRuntime(opts = {}) {
|
|
|
1462
1462
|
}
|
|
1463
1463
|
//#endregion
|
|
1464
1464
|
//#region src/commands/dev.ts
|
|
1465
|
-
const HEARTBEAT_INTERVAL_MS =
|
|
1465
|
+
const HEARTBEAT_INTERVAL_MS = 1e3;
|
|
1466
1466
|
const HEARTBEAT_STOP_POLL_MS = 100;
|
|
1467
1467
|
const DASHBOARD_RESTART_MIN_UPTIME_MS = 5e3;
|
|
1468
1468
|
const DASHBOARD_START_TIMEOUT_MS = 6e4;
|
|
@@ -1835,7 +1835,7 @@ function isRecord(value) {
|
|
|
1835
1835
|
}
|
|
1836
1836
|
function isConfigSyncEvent(value) {
|
|
1837
1837
|
if (!isRecord(value) || !("config_file_path" in value) || typeof value.config_file_path !== "string" || !("status" in value) || !("created_at_millis" in value) || typeof value.created_at_millis !== "number") return false;
|
|
1838
|
-
if (value.status === "success") return true;
|
|
1838
|
+
if (value.status === "syncing" || value.status === "success") return true;
|
|
1839
1839
|
return value.status === "error" && "error_message" in value && typeof value.error_message === "string";
|
|
1840
1840
|
}
|
|
1841
1841
|
function isHeartbeatResponse(value) {
|
|
@@ -1848,7 +1848,8 @@ function logBrowserSecretConfirmationCode(response) {
|
|
|
1848
1848
|
logDev(expiresInSeconds == null ? `Dashboard browser confirmation code: ${response.browser_secret_confirmation_code}` : `Dashboard browser confirmation code: ${response.browser_secret_confirmation_code} (expires in ${expiresInSeconds}s)`);
|
|
1849
1849
|
}
|
|
1850
1850
|
function logConfigSyncEvents(response) {
|
|
1851
|
-
for (const event of response.config_sync_events ?? []) if (event.status === "
|
|
1851
|
+
for (const event of response.config_sync_events ?? []) if (event.status === "syncing") logDev(`Detected change to config file at ${event.config_file_path}. Syncing...`);
|
|
1852
|
+
else if (event.status === "success") logDev("Updated config sync successful!");
|
|
1852
1853
|
else logDevConfigError(`Config sync failed for ${event.config_file_path}: ${event.error_message}`);
|
|
1853
1854
|
}
|
|
1854
1855
|
function pendingBrowserSecretConfirmationCodeFromState(port) {
|