@helloleo/plugins 0.2.0-beta.7 → 0.2.0-beta.9

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@helloleo/plugins",
3
- "version": "0.2.0-beta.7",
3
+ "version": "0.2.0-beta.9",
4
4
  "description": "OpenCode plugins for HelloLeo",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",
@@ -18,7 +18,7 @@ export function authLibTs(providers: Provider[]): string {
18
18
 
19
19
  const envFields = [
20
20
  "BETTER_AUTH_SECRET?: string",
21
- "BETTER_AUTH_URL?: string",
21
+ "HELLOLEO_URL?: string",
22
22
  ...oauth.flatMap((p) => {
23
23
  const prefix = p.toUpperCase();
24
24
  return [
@@ -72,7 +72,7 @@ function buildAuth() {
72
72
 
73
73
  return betterAuth({
74
74
  secret: e.BETTER_AUTH_SECRET,
75
- baseURL: e.BETTER_AUTH_URL,
75
+ baseURL: e.HELLOLEO_URL || 'http://localhost:3000',
76
76
  database: drizzleAdapter(db, { provider: 'sqlite', schema }),
77
77
  emailAndPassword: {
78
78
  enabled: ${hasPassword},
@@ -75,8 +75,9 @@ export const setupAuthentication = tool({
75
75
  const depsAdded = await addAuthDependencies(dir);
76
76
 
77
77
  const envLines = [
78
- " - dev (.env): BETTER_AUTH_SECRET=<random>, BETTER_AUTH_URL=http://localhost:3000",
79
- " - prod: `wrangler secret put BETTER_AUTH_SECRET`, and BETTER_AUTH_URL as a var in wrangler.jsonc",
78
+ " - dev (.env): BETTER_AUTH_SECRET=<random>",
79
+ " - prod: `wrangler secret put BETTER_AUTH_SECRET`",
80
+ " - HELLOLEO_URL is auto-injected by the platform (preview + production) -- nothing to set for baseURL",
80
81
  ];
81
82
  for (const p of oauth) {
82
83
  const prefix = p.toUpperCase();