@keepgoingdev/cli 1.3.1 → 1.3.2

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.
Files changed (2) hide show
  1. package/dist/index.js +8 -9
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -790,7 +790,7 @@ function registerProject(projectPath, projectName) {
790
790
  data.projects.push({ path: projectPath, name, lastSeen: now });
791
791
  }
792
792
  const cutoff = Date.now() - STALE_PROJECT_MS;
793
- data.projects = data.projects.filter((p) => new Date(p.lastSeen).getTime() > cutoff);
793
+ data.projects = data.projects.filter((p) => new Date(p.lastSeen).getTime() > cutoff && fs2.existsSync(p.path));
794
794
  writeKnownProjects(data);
795
795
  } catch {
796
796
  }
@@ -811,14 +811,15 @@ function pruneStaleTasks(tasks) {
811
811
  });
812
812
  }
813
813
  var KeepGoingWriter = class {
814
+ mainRoot;
814
815
  storagePath;
815
816
  sessionsFilePath;
816
817
  stateFilePath;
817
818
  metaFilePath;
818
819
  currentTasksFilePath;
819
820
  constructor(workspacePath) {
820
- const mainRoot = resolveStorageRoot(workspacePath);
821
- this.storagePath = path5.join(mainRoot, STORAGE_DIR);
821
+ this.mainRoot = resolveStorageRoot(workspacePath);
822
+ this.storagePath = path5.join(this.mainRoot, STORAGE_DIR);
822
823
  this.sessionsFilePath = path5.join(this.storagePath, SESSIONS_FILE);
823
824
  this.stateFilePath = path5.join(this.storagePath, STATE_FILE);
824
825
  this.metaFilePath = path5.join(this.storagePath, META_FILE);
@@ -860,8 +861,7 @@ var KeepGoingWriter = class {
860
861
  };
861
862
  fs3.writeFileSync(this.stateFilePath, JSON.stringify(state, null, 2), "utf-8");
862
863
  this.updateMeta(checkpoint.timestamp);
863
- const mainRoot = resolveStorageRoot(this.storagePath);
864
- registerProject(mainRoot, projectName);
864
+ registerProject(this.mainRoot, projectName);
865
865
  }
866
866
  updateMeta(timestamp) {
867
867
  let meta;
@@ -928,8 +928,7 @@ var KeepGoingWriter = class {
928
928
  upsertSession(update) {
929
929
  this.ensureDir();
930
930
  this.upsertSessionCore(update);
931
- const mainRoot = resolveStorageRoot(this.storagePath);
932
- registerProject(mainRoot);
931
+ registerProject(this.mainRoot);
933
932
  }
934
933
  /** Core upsert logic: merges the update into current-tasks.json and returns the pruned task list. */
935
934
  upsertSessionCore(update) {
@@ -2399,7 +2398,7 @@ import { spawn } from "child_process";
2399
2398
  import { readFileSync, existsSync } from "fs";
2400
2399
  import path10 from "path";
2401
2400
  import os4 from "os";
2402
- var CLI_VERSION = "1.3.1";
2401
+ var CLI_VERSION = "1.3.2";
2403
2402
  var NPM_REGISTRY_URL = "https://registry.npmjs.org/@keepgoingdev/cli/latest";
2404
2403
  var FETCH_TIMEOUT_MS = 5e3;
2405
2404
  var CHECK_INTERVAL_MS = 24 * 60 * 60 * 1e3;
@@ -3940,7 +3939,7 @@ async function main() {
3940
3939
  }
3941
3940
  break;
3942
3941
  case "version":
3943
- console.log(`keepgoing v${"1.3.1"}`);
3942
+ console.log(`keepgoing v${"1.3.2"}`);
3944
3943
  break;
3945
3944
  case "activate":
3946
3945
  await activateCommand({ licenseKey: subcommand });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@keepgoingdev/cli",
3
- "version": "1.3.1",
3
+ "version": "1.3.2",
4
4
  "description": "Terminal CLI for KeepGoing. Resume side projects without the mental friction.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",