demobite 1.18.0 → 1.18.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/launcher/index.mjs +3 -1
- package/package.json +1 -1
package/launcher/index.mjs
CHANGED
|
@@ -85,7 +85,9 @@ const killListener = () => {
|
|
|
85
85
|
const printStatus = () => {
|
|
86
86
|
const lock = readJson(LOCK);
|
|
87
87
|
const live = !!(lock?.pid && pidAlive(lock.pid));
|
|
88
|
-
|
|
88
|
+
// the facts come from the last check-in; before the first one, from the key's own config
|
|
89
|
+
const cfgThere = lock?.cwd ? readJson(path.join(lock.cwd, ".recorder", "config.json")) : null;
|
|
90
|
+
const st = { base: cfgThere?.base ?? null, workspace: cfgThere?.workspace?.name ?? null, ...(readJson(STATE) ?? {}) };
|
|
89
91
|
if (live) {
|
|
90
92
|
console.log(` ● Listening as "${st?.name ?? os.hostname()}" since ${new Date(lock.since).toLocaleTimeString(undefined, { hour: "2-digit", minute: "2-digit" })} · for ${st?.workspace ?? "your workspace"} on ${(st?.base ?? "").replace(/^https?:\/\//, "") || "app.demobites.com"} (pid ${lock.pid}${lock.service ? ", login service" : ", a Terminal window"})`);
|
|
91
93
|
if (st?.at) console.log(` last check-in ${ago(st.at)} · ${st.busy ? `recording: ${st.job ?? ""}` : "idle"}${st.last_error ? ` · last error: ${st.last_error}` : ""}`);
|
package/package.json
CHANGED