beads-map 0.2.1 → 0.2.3
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/.next/BUILD_ID +1 -1
- package/.next/app-build-manifest.json +1 -1
- package/.next/build-manifest.json +2 -2
- package/.next/next-server.js.nft.json +1 -1
- package/.next/prerender-manifest.json +1 -1
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_not-found.html +1 -1
- package/.next/server/app/_not-found.rsc +1 -1
- package/.next/server/app/api/login/route.js +1 -1
- package/.next/server/app/api/oauth/callback/route.js +1 -1
- package/.next/server/app/api/oauth/jwks.json/route.js +1 -1
- package/.next/server/app/api/records/route.js +1 -1
- package/.next/server/app/index.html +1 -1
- package/.next/server/app/index.rsc +2 -2
- package/.next/server/app/page.js +1 -1
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/functions-config-manifest.json +1 -1
- package/.next/server/pages/404.html +1 -1
- package/.next/server/pages/500.html +1 -1
- package/.next/server/server-reference-manifest.json +1 -1
- package/.next/static/chunks/app/{page-8e71d39888a3d96d.js → page-13ee27a84e4a0c70.js} +1 -1
- package/app/page.tsx +1 -1
- package/bin/beads-map.mjs +32 -0
- package/lib/auth/client.ts +8 -8
- package/package.json +1 -1
- /package/.next/static/{FBfBK-4cZCCxEkzufQhCN → I4jrlevHIj8bw3H3sTC8F}/_buildManifest.js +0 -0
- /package/.next/static/{FBfBK-4cZCCxEkzufQhCN → I4jrlevHIj8bw3H3sTC8F}/_ssgManifest.js +0 -0
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
|
-
|
|
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/lib/auth/client.ts
CHANGED
|
@@ -136,23 +136,23 @@ export const createClient = async () => {
|
|
|
136
136
|
const localhostUrl = `http://127.0.0.1:${env.PORT}`;
|
|
137
137
|
const enc = encodeURIComponent;
|
|
138
138
|
|
|
139
|
-
//
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
const
|
|
139
|
+
// Confidential client mode is determined by having both PUBLIC_URL and a JWK
|
|
140
|
+
// private key — not by NODE_ENV. This lets remote deployments work regardless
|
|
141
|
+
// of how Next.js was started (next dev vs next start).
|
|
142
|
+
const hasJwk = !!env.ATPROTO_JWK_PRIVATE;
|
|
143
|
+
const hasPublicUrl = !!publicUrl;
|
|
144
144
|
|
|
145
145
|
let keyset = null;
|
|
146
146
|
try {
|
|
147
|
-
|
|
148
|
-
if (!isLocalDev && publicUrl) {
|
|
147
|
+
if (hasJwk && hasPublicUrl) {
|
|
149
148
|
keyset = await getKeyset();
|
|
150
149
|
}
|
|
151
150
|
} catch (err) {
|
|
152
151
|
console.error("Error getting keyset:", err);
|
|
153
152
|
}
|
|
154
153
|
|
|
155
|
-
const isConfidentialClient = keyset !== null &&
|
|
154
|
+
const isConfidentialClient = keyset !== null && hasPublicUrl;
|
|
155
|
+
const url = isConfidentialClient ? publicUrl : localhostUrl;
|
|
156
156
|
|
|
157
157
|
// Build client metadata based on client type
|
|
158
158
|
const clientMetadata: Record<string, unknown> = {
|
package/package.json
CHANGED
|
File without changes
|
|
File without changes
|