@murumets-ee/create 0.1.11 → 0.1.13

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/cli.js CHANGED
@@ -879,6 +879,7 @@ const nextConfig: NextConfig = {
879
879
 
880
880
  export default withNextIntl(nextConfig)
881
881
  `),await e(a(o,"proxy.ts"),`import { NextRequest, NextResponse } from 'next/server'
882
+ import { getSessionCookie } from 'better-auth/cookies'
882
883
  import createMiddleware from 'next-intl/middleware'
883
884
  import { routing } from './i18n/routing'
884
885
 
@@ -893,7 +894,7 @@ export function proxy(request: NextRequest) {
893
894
  const pathWithoutLocale = pathname.replace(localePattern, '') || '/'
894
895
 
895
896
  if (protectedPaths.some((p) => pathWithoutLocale.startsWith(p))) {
896
- const session = request.cookies.get('better-auth.session_token')
897
+ const session = getSessionCookie(request)
897
898
  if (!session) {
898
899
  const locale = pathname.match(localePattern)?.[1] || routing.defaultLocale
899
900
  return NextResponse.redirect(new URL(\`/\${locale}/auth/sign-in\`, request.url))
@@ -1728,6 +1729,7 @@ const nextConfig: NextConfig = {
1728
1729
 
1729
1730
  export default withNextIntl(nextConfig)
1730
1731
  `),await e(h(t,"proxy.ts"),`import { NextRequest, NextResponse } from 'next/server'
1732
+ import { getSessionCookie } from 'better-auth/cookies'
1731
1733
  import createMiddleware from 'next-intl/middleware'
1732
1734
  import { routing } from './i18n/routing'
1733
1735
 
@@ -1744,7 +1746,7 @@ export function proxy(request: NextRequest) {
1744
1746
 
1745
1747
  // Auth check for protected paths
1746
1748
  if (protectedPaths.some((p) => pathWithoutLocale.startsWith(p))) {
1747
- const session = request.cookies.get('better-auth.session_token')
1749
+ const session = getSessionCookie(request)
1748
1750
  if (!session) {
1749
1751
  const locale = pathname.match(localePattern)?.[1] || routing.defaultLocale
1750
1752
  return NextResponse.redirect(new URL(\`/\${locale}/auth/sign-in\`, request.url))
package/dist/index.js CHANGED
@@ -878,6 +878,7 @@ const nextConfig: NextConfig = {
878
878
 
879
879
  export default withNextIntl(nextConfig)
880
880
  `),await e(o(a,"proxy.ts"),`import { NextRequest, NextResponse } from 'next/server'
881
+ import { getSessionCookie } from 'better-auth/cookies'
881
882
  import createMiddleware from 'next-intl/middleware'
882
883
  import { routing } from './i18n/routing'
883
884
 
@@ -892,7 +893,7 @@ export function proxy(request: NextRequest) {
892
893
  const pathWithoutLocale = pathname.replace(localePattern, '') || '/'
893
894
 
894
895
  if (protectedPaths.some((p) => pathWithoutLocale.startsWith(p))) {
895
- const session = request.cookies.get('better-auth.session_token')
896
+ const session = getSessionCookie(request)
896
897
  if (!session) {
897
898
  const locale = pathname.match(localePattern)?.[1] || routing.defaultLocale
898
899
  return NextResponse.redirect(new URL(\`/\${locale}/auth/sign-in\`, request.url))
@@ -1727,6 +1728,7 @@ const nextConfig: NextConfig = {
1727
1728
 
1728
1729
  export default withNextIntl(nextConfig)
1729
1730
  `),await e(p(t,"proxy.ts"),`import { NextRequest, NextResponse } from 'next/server'
1731
+ import { getSessionCookie } from 'better-auth/cookies'
1730
1732
  import createMiddleware from 'next-intl/middleware'
1731
1733
  import { routing } from './i18n/routing'
1732
1734
 
@@ -1743,7 +1745,7 @@ export function proxy(request: NextRequest) {
1743
1745
 
1744
1746
  // Auth check for protected paths
1745
1747
  if (protectedPaths.some((p) => pathWithoutLocale.startsWith(p))) {
1746
- const session = request.cookies.get('better-auth.session_token')
1748
+ const session = getSessionCookie(request)
1747
1749
  if (!session) {
1748
1750
  const locale = pathname.match(localePattern)?.[1] || routing.defaultLocale
1749
1751
  return NextResponse.redirect(new URL(\`/\${locale}/auth/sign-in\`, request.url))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@murumets-ee/create",
3
- "version": "0.1.11",
3
+ "version": "0.1.13",
4
4
  "license": "Elastic-2.0",
5
5
  "type": "module",
6
6
  "bin": {