create-nextblock 0.2.56 → 0.2.58

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": "create-nextblock",
3
- "version": "0.2.56",
3
+ "version": "0.2.58",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -10,6 +10,8 @@ export const signUpAction = async (formData: FormData) => {
10
10
  const password = formData.get("password")?.toString();
11
11
  const supabase = await createClient();
12
12
  const origin = (await headers()).get("origin");
13
+ const nextPublicUrl = process.env.NEXT_PUBLIC_URL;
14
+ const redirectBase = nextPublicUrl ? `https://${nextPublicUrl}` : origin;
13
15
 
14
16
  if (!email || !password) {
15
17
  return encodedRedirect(
@@ -23,7 +25,7 @@ export const signUpAction = async (formData: FormData) => {
23
25
  email,
24
26
  password,
25
27
  options: {
26
- emailRedirectTo: `${origin}/auth/callback`,
28
+ emailRedirectTo: `${redirectBase}/auth/callback`,
27
29
  },
28
30
  });
29
31
 
@@ -72,6 +74,8 @@ export const forgotPasswordAction = async (formData: FormData) => {
72
74
  const email = formData.get("email")?.toString();
73
75
  const supabase = await createClient();
74
76
  const origin = (await headers()).get("origin");
77
+ const nextPublicUrl = process.env.NEXT_PUBLIC_URL;
78
+ const redirectBase = nextPublicUrl ? `https://${nextPublicUrl}` : origin;
75
79
  const callbackUrl = formData.get("callbackUrl")?.toString();
76
80
 
77
81
  if (!email) {
@@ -79,7 +83,7 @@ export const forgotPasswordAction = async (formData: FormData) => {
79
83
  }
80
84
 
81
85
  const { error } = await supabase.auth.resetPasswordForEmail(email, {
82
- redirectTo: `${origin}/auth/callback?redirect_to=/reset-password`,
86
+ redirectTo: `${redirectBase}/auth/callback?redirect_to=/reset-password`,
83
87
  });
84
88
 
85
89
  if (error) {
@@ -17,8 +17,8 @@ import { getTranslations } from '@/app/cms/settings/extra-translations/actions';
17
17
  import type { Database } from '@nextblock-cms/db';
18
18
  import { headers, cookies } from 'next/headers';
19
19
 
20
- const defaultUrl = process.env.VERCEL_URL
21
- ? `https://${process.env.VERCEL_URL}`
20
+ const defaultUrl = process.env.NEXT_PUBLIC_URL
21
+ ? `https://${process.env.NEXT_PUBLIC_URL}`
22
22
  : "http://localhost:3000";
23
23
 
24
24
  const DEFAULT_LOCALE_FOR_LAYOUT = 'en';
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nextblock-cms/template",
3
- "version": "0.2.34",
3
+ "version": "0.2.36",
4
4
  "private": true,
5
5
  "scripts": {
6
6
  "dev": "next dev",
@@ -24,7 +24,7 @@
24
24
  "js-cookie": "^3.0.5",
25
25
  "lodash.debounce": "^4.0.8",
26
26
  "lucide-react": "^0.534.0",
27
- "next": "^15.5.4",
27
+ "next": "15.5.9",
28
28
  "nodemailer": "^7.0.4",
29
29
  "plaiceholder": "^3.0.0",
30
30
  "react": "19.0.0",