@staff0rd/assist 0.483.0 → 0.483.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.
- package/dist/commands/sessions/web/bundle.js +366 -366
- package/dist/index.js +23 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -6,7 +6,7 @@ import { Command } from "commander";
|
|
|
6
6
|
// package.json
|
|
7
7
|
var package_default = {
|
|
8
8
|
name: "@staff0rd/assist",
|
|
9
|
-
version: "0.483.
|
|
9
|
+
version: "0.483.2",
|
|
10
10
|
type: "module",
|
|
11
11
|
main: "dist/index.js",
|
|
12
12
|
bin: {
|
|
@@ -31624,11 +31624,32 @@ function safeParse2(line) {
|
|
|
31624
31624
|
}
|
|
31625
31625
|
}
|
|
31626
31626
|
|
|
31627
|
+
// src/commands/sessions/daemon/repoDirExists.ts
|
|
31628
|
+
import { existsSync as existsSync71 } from "fs";
|
|
31629
|
+
function repoDirExists(cwd) {
|
|
31630
|
+
return existsSync71(toGitCwd(cwd));
|
|
31631
|
+
}
|
|
31632
|
+
|
|
31627
31633
|
// src/commands/sessions/daemon/withRepoGroups.ts
|
|
31628
31634
|
function withRepoGroups(sessions) {
|
|
31635
|
+
const existence = /* @__PURE__ */ new Map();
|
|
31636
|
+
const exists = (dir) => {
|
|
31637
|
+
const cached = existence.get(dir);
|
|
31638
|
+
if (cached !== void 0) return cached;
|
|
31639
|
+
const result = repoDirExists(dir);
|
|
31640
|
+
existence.set(dir, result);
|
|
31641
|
+
return result;
|
|
31642
|
+
};
|
|
31629
31643
|
return sessions.map((session) => {
|
|
31630
31644
|
const repoGroup = repoGroupForCwd(session.cwd);
|
|
31631
|
-
|
|
31645
|
+
const dir = repoGroup?.clone || session.cwd;
|
|
31646
|
+
const cwdMissing = Boolean(dir) && !exists(dir);
|
|
31647
|
+
if (!repoGroup && !cwdMissing) return session;
|
|
31648
|
+
return {
|
|
31649
|
+
...session,
|
|
31650
|
+
...repoGroup && { repoGroup },
|
|
31651
|
+
...cwdMissing && { cwdMissing }
|
|
31652
|
+
};
|
|
31632
31653
|
});
|
|
31633
31654
|
}
|
|
31634
31655
|
|