beads-map 0.2.1 → 0.2.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/app/page.tsx CHANGED
@@ -890,7 +890,7 @@ export default function Home() {
890
890
  {projectName}
891
891
  </h1>
892
892
  <span className="font-normal text-zinc-400 text-[15px] hidden sm:inline">
893
- Beads
893
+ heartbeads
894
894
  </span>
895
895
  {repoCount > 1 && (
896
896
  <span className="text-[10px] text-zinc-400 bg-zinc-100 rounded-full px-1.5 py-0.5 font-medium hidden sm:inline">
package/bin/beads-map.mjs CHANGED
@@ -10,6 +10,38 @@ import { fileURLToPath } from "url";
10
10
  const __dirname = fileURLToPath(new URL(".", import.meta.url));
11
11
  const viewerRoot = resolve(__dirname, "..");
12
12
 
13
+ // Load .env.local and .env from the user's working directory.
14
+ // Next.js only loads these from its own cwd (the package dir), not from where
15
+ // the user invoked the CLI. This ensures PUBLIC_URL, ATPROTO_JWK_PRIVATE, etc.
16
+ // are available when running `npx beads-map` from a project directory.
17
+ for (const envFile of [".env.local", ".env"]) {
18
+ const envPath = join(process.cwd(), envFile);
19
+ if (existsSync(envPath)) {
20
+ try {
21
+ const content = readFileSync(envPath, "utf-8");
22
+ for (const line of content.split("\n")) {
23
+ const trimmed = line.trim();
24
+ if (!trimmed || trimmed.startsWith("#")) continue;
25
+ const eqIdx = trimmed.indexOf("=");
26
+ if (eqIdx === -1) continue;
27
+ const key = trimmed.slice(0, eqIdx).trim();
28
+ let val = trimmed.slice(eqIdx + 1).trim();
29
+ // Strip surrounding quotes
30
+ if ((val.startsWith('"') && val.endsWith('"')) ||
31
+ (val.startsWith("'") && val.endsWith("'"))) {
32
+ val = val.slice(1, -1);
33
+ }
34
+ // Don't override existing env vars (explicit shell vars win)
35
+ if (!(key in process.env)) {
36
+ process.env[key] = val;
37
+ }
38
+ }
39
+ } catch {
40
+ // ignore read errors
41
+ }
42
+ }
43
+ }
44
+
13
45
  // Parse CLI args
14
46
  const args = process.argv.slice(2);
15
47
  let port = 3000;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "beads-map",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "description": "Interactive dependency graph viewer for beads (bd) issues",
5
5
  "keywords": [
6
6
  "beads",